@opentabs-dev/opentabs-plugin-reddit 0.0.86 → 0.0.88

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.
@@ -60,6 +60,7 @@
60
60
  return new Promise((resolve, reject) => {
61
61
  let settled = false;
62
62
  let poller;
63
+ let lastPredicateError;
63
64
  const isSettled = () => settled;
64
65
  const cleanup = () => {
65
66
  settled = true;
@@ -78,7 +79,8 @@
78
79
  if (isSettled())
79
80
  return;
80
81
  cleanup();
81
- reject(new Error(`waitUntil: timed out after ${timeout}ms waiting for predicate to return true`));
82
+ const errorContext = lastPredicateError instanceof Error ? `: predicate last threw \u2014 ${lastPredicateError.message}` : "";
83
+ reject(new Error(`waitUntil: timed out after ${timeout}ms waiting for predicate to return true${errorContext}`));
82
84
  }, timeout);
83
85
  const check2 = async () => {
84
86
  if (isSettled())
@@ -90,7 +92,8 @@
90
92
  resolve();
91
93
  return;
92
94
  }
93
- } catch {
95
+ } catch (err2) {
96
+ lastPredicateError = err2;
94
97
  }
95
98
  if (!isSettled()) {
96
99
  poller = setTimeout(() => void check2(), interval);
@@ -335,11 +338,11 @@
335
338
  credentials: "include",
336
339
  signal: AbortSignal.timeout(3e4)
337
340
  });
338
- } catch (error48) {
339
- if (error48 instanceof DOMException && error48.name === "TimeoutError") {
341
+ } catch (error51) {
342
+ if (error51 instanceof DOMException && error51.name === "TimeoutError") {
340
343
  throw ToolError.timeout("Reddit API request timed out after 30000ms");
341
344
  }
342
- throw ToolError.internal(`Reddit API network error: ${error48 instanceof Error ? error48.message : String(error48)}`);
345
+ throw ToolError.internal(`Reddit API network error: ${error51 instanceof Error ? error51.message : String(error51)}`);
343
346
  }
344
347
  if (response.status === 429) {
345
348
  const reset = response.headers.get("x-ratelimit-reset");
@@ -384,11 +387,11 @@
384
387
  credentials: "include",
385
388
  signal: AbortSignal.timeout(3e4)
386
389
  });
387
- } catch (error48) {
388
- if (error48 instanceof DOMException && error48.name === "TimeoutError") {
390
+ } catch (error51) {
391
+ if (error51 instanceof DOMException && error51.name === "TimeoutError") {
389
392
  throw ToolError.timeout("Reddit API request timed out after 30000ms");
390
393
  }
391
- throw ToolError.internal(`Reddit API network error: ${error48 instanceof Error ? error48.message : String(error48)}`);
394
+ throw ToolError.internal(`Reddit API network error: ${error51 instanceof Error ? error51.message : String(error51)}`);
392
395
  }
393
396
  if (response.status === 429) {
394
397
  const reset = response.headers.get("x-ratelimit-reset");
@@ -398,7 +401,7 @@
398
401
  if (!response.ok) {
399
402
  const errorText = await response.text().catch(() => response.statusText);
400
403
  if (response.status === 401 || response.status === 403) {
401
- cachedModhash = null;
404
+ clearSessionCache();
402
405
  throw ToolError.auth(`Reddit API HTTP ${response.status}: ${errorText}`);
403
406
  }
404
407
  if (response.status === 404) {
@@ -432,12 +435,12 @@
432
435
  body: form.toString(),
433
436
  signal: AbortSignal.timeout(3e4)
434
437
  });
435
- } catch (error48) {
436
- if (error48 instanceof DOMException && error48.name === "TimeoutError") {
438
+ } catch (error51) {
439
+ if (error51 instanceof DOMException && error51.name === "TimeoutError") {
437
440
  throw ToolError.timeout("Reddit OAuth API request timed out after 30000ms");
438
441
  }
439
442
  throw ToolError.internal(
440
- `Reddit OAuth API network error: ${error48 instanceof Error ? error48.message : String(error48)}`
443
+ `Reddit OAuth API network error: ${error51 instanceof Error ? error51.message : String(error51)}`
441
444
  );
442
445
  }
443
446
  if (response.status === 429) {
@@ -448,7 +451,7 @@
448
451
  if (!response.ok) {
449
452
  const errorText = await response.text().catch(() => response.statusText);
450
453
  if (response.status === 401 || response.status === 403) {
451
- cachedBearerToken = null;
454
+ clearSessionCache();
452
455
  throw ToolError.auth(`Reddit OAuth API HTTP ${response.status}: ${errorText}`);
453
456
  }
454
457
  if (response.status === 404) {
@@ -462,6 +465,11 @@
462
465
  throw ToolError.internal("Failed to parse Reddit OAuth API response");
463
466
  }
464
467
  };
468
+ var clearSessionCache = () => {
469
+ cachedModhash = null;
470
+ cachedBearerToken = null;
471
+ bearerTokenExpiry = 0;
472
+ };
465
473
 
466
474
  // node_modules/zod/v4/classic/external.js
467
475
  var external_exports = {};
@@ -525,6 +533,7 @@
525
533
  ZodOptional: () => ZodOptional,
526
534
  ZodPipe: () => ZodPipe,
527
535
  ZodPrefault: () => ZodPrefault,
536
+ ZodPreprocess: () => ZodPreprocess,
528
537
  ZodPromise: () => ZodPromise,
529
538
  ZodReadonly: () => ZodReadonly,
530
539
  ZodRealError: () => ZodRealError,
@@ -603,6 +612,7 @@
603
612
  int32: () => int32,
604
613
  int64: () => int64,
605
614
  intersection: () => intersection,
615
+ invertCodec: () => invertCodec,
606
616
  ipv4: () => ipv42,
607
617
  ipv6: () => ipv62,
608
618
  iso: () => iso_exports,
@@ -784,6 +794,7 @@
784
794
  $ZodOptional: () => $ZodOptional,
785
795
  $ZodPipe: () => $ZodPipe,
786
796
  $ZodPrefault: () => $ZodPrefault,
797
+ $ZodPreprocess: () => $ZodPreprocess,
787
798
  $ZodPromise: () => $ZodPromise,
788
799
  $ZodReadonly: () => $ZodReadonly,
789
800
  $ZodRealError: () => $ZodRealError,
@@ -983,7 +994,8 @@
983
994
  });
984
995
 
985
996
  // node_modules/zod/v4/core/core.js
986
- var NEVER = Object.freeze({
997
+ var _a;
998
+ var NEVER = /* @__PURE__ */ Object.freeze({
987
999
  status: "aborted"
988
1000
  });
989
1001
  // @__NO_SIDE_EFFECTS__
@@ -1018,10 +1030,10 @@
1018
1030
  }
1019
1031
  Object.defineProperty(Definition, "name", { value: name });
1020
1032
  function _(def) {
1021
- var _a2;
1033
+ var _a3;
1022
1034
  const inst = params?.Parent ? new Definition() : this;
1023
1035
  init(inst, def);
1024
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
1036
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
1025
1037
  for (const fn of inst._zod.deferred) {
1026
1038
  fn();
1027
1039
  }
@@ -1050,7 +1062,8 @@
1050
1062
  this.name = "ZodEncodeError";
1051
1063
  }
1052
1064
  };
1053
- var globalConfig = {};
1065
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
1066
+ var globalConfig = globalThis.__zod_globalConfig;
1054
1067
  function config(newConfig) {
1055
1068
  if (newConfig)
1056
1069
  Object.assign(globalConfig, newConfig);
@@ -1083,6 +1096,7 @@
1083
1096
  defineLazy: () => defineLazy,
1084
1097
  esc: () => esc,
1085
1098
  escapeRegex: () => escapeRegex,
1099
+ explicitlyAborted: () => explicitlyAborted,
1086
1100
  extend: () => extend,
1087
1101
  finalizeIssue: () => finalizeIssue,
1088
1102
  floatSafeRemainder: () => floatSafeRemainder,
@@ -1171,19 +1185,12 @@
1171
1185
  return source.slice(start, end);
1172
1186
  }
1173
1187
  function floatSafeRemainder(val, step) {
1174
- const valDecCount = (val.toString().split(".")[1] || "").length;
1175
- const stepString = step.toString();
1176
- let stepDecCount = (stepString.split(".")[1] || "").length;
1177
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
1178
- const match = stepString.match(/\d?e-(\d?)/);
1179
- if (match?.[1]) {
1180
- stepDecCount = Number.parseInt(match[1]);
1181
- }
1182
- }
1183
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1184
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1185
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1186
- return valInt % stepInt / 10 ** decCount;
1188
+ const ratio = val / step;
1189
+ const roundedRatio = Math.round(ratio);
1190
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
1191
+ if (Math.abs(ratio - roundedRatio) < tolerance)
1192
+ return 0;
1193
+ return ratio - roundedRatio;
1187
1194
  }
1188
1195
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
1189
1196
  function defineLazy(object2, key, getter) {
@@ -1265,7 +1272,10 @@
1265
1272
  function isObject(data) {
1266
1273
  return typeof data === "object" && data !== null && !Array.isArray(data);
1267
1274
  }
1268
- var allowsEval = cached(() => {
1275
+ var allowsEval = /* @__PURE__ */ cached(() => {
1276
+ if (globalConfig.jitless) {
1277
+ return false;
1278
+ }
1269
1279
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
1270
1280
  return false;
1271
1281
  }
@@ -1298,6 +1308,10 @@
1298
1308
  return { ...o };
1299
1309
  if (Array.isArray(o))
1300
1310
  return [...o];
1311
+ if (o instanceof Map)
1312
+ return new Map(o);
1313
+ if (o instanceof Set)
1314
+ return new Set(o);
1301
1315
  return o;
1302
1316
  }
1303
1317
  function numKeys(data) {
@@ -1354,7 +1368,14 @@
1354
1368
  }
1355
1369
  };
1356
1370
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1357
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
1371
+ var primitiveTypes = /* @__PURE__ */ new Set([
1372
+ "string",
1373
+ "number",
1374
+ "bigint",
1375
+ "boolean",
1376
+ "symbol",
1377
+ "undefined"
1378
+ ]);
1358
1379
  function escapeRegex(str) {
1359
1380
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1360
1381
  }
@@ -1523,6 +1544,9 @@
1523
1544
  return clone(schema, def);
1524
1545
  }
1525
1546
  function merge(a, b) {
1547
+ if (a._zod.def.checks?.length) {
1548
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
1549
+ }
1526
1550
  const def = mergeDefs(a._zod.def, {
1527
1551
  get shape() {
1528
1552
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -1532,8 +1556,7 @@
1532
1556
  get catchall() {
1533
1557
  return b._zod.def.catchall;
1534
1558
  },
1535
- checks: []
1536
- // delete existing checks
1559
+ checks: b._zod.def.checks ?? []
1537
1560
  });
1538
1561
  return clone(a, def);
1539
1562
  }
@@ -1616,10 +1639,20 @@
1616
1639
  }
1617
1640
  return false;
1618
1641
  }
1642
+ function explicitlyAborted(x, startIndex = 0) {
1643
+ if (x.aborted === true)
1644
+ return true;
1645
+ for (let i = startIndex; i < x.issues.length; i++) {
1646
+ if (x.issues[i]?.continue === false) {
1647
+ return true;
1648
+ }
1649
+ }
1650
+ return false;
1651
+ }
1619
1652
  function prefixIssues(path, issues) {
1620
1653
  return issues.map((iss) => {
1621
- var _a2;
1622
- (_a2 = iss).path ?? (_a2.path = []);
1654
+ var _a3;
1655
+ (_a3 = iss).path ?? (_a3.path = []);
1623
1656
  iss.path.unshift(path);
1624
1657
  return iss;
1625
1658
  });
@@ -1628,17 +1661,14 @@
1628
1661
  return typeof message === "string" ? message : message?.message;
1629
1662
  }
1630
1663
  function finalizeIssue(iss, ctx, config2) {
1631
- const full = { ...iss, path: iss.path ?? [] };
1632
- if (!iss.message) {
1633
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1634
- full.message = message;
1664
+ 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";
1665
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
1666
+ rest.path ?? (rest.path = []);
1667
+ rest.message = message;
1668
+ if (ctx?.reportInput) {
1669
+ rest.input = _input;
1635
1670
  }
1636
- delete full.inst;
1637
- delete full.continue;
1638
- if (!ctx?.reportInput) {
1639
- delete full.input;
1640
- }
1641
- return full;
1671
+ return rest;
1642
1672
  }
1643
1673
  function getSizableOrigin(input) {
1644
1674
  if (input instanceof Set)
@@ -1755,10 +1785,10 @@
1755
1785
  };
1756
1786
  var $ZodError = $constructor("$ZodError", initializer);
1757
1787
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
1758
- function flattenError(error48, mapper = (issue2) => issue2.message) {
1788
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
1759
1789
  const fieldErrors = {};
1760
1790
  const formErrors = [];
1761
- for (const sub of error48.issues) {
1791
+ for (const sub of error51.issues) {
1762
1792
  if (sub.path.length > 0) {
1763
1793
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1764
1794
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -1768,50 +1798,53 @@
1768
1798
  }
1769
1799
  return { formErrors, fieldErrors };
1770
1800
  }
1771
- function formatError(error48, mapper = (issue2) => issue2.message) {
1801
+ function formatError(error51, mapper = (issue2) => issue2.message) {
1772
1802
  const fieldErrors = { _errors: [] };
1773
- const processError = (error49) => {
1774
- for (const issue2 of error49.issues) {
1803
+ const processError = (error52, path = []) => {
1804
+ for (const issue2 of error52.issues) {
1775
1805
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1776
- issue2.errors.map((issues) => processError({ issues }));
1806
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
1777
1807
  } else if (issue2.code === "invalid_key") {
1778
- processError({ issues: issue2.issues });
1808
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1779
1809
  } else if (issue2.code === "invalid_element") {
1780
- processError({ issues: issue2.issues });
1781
- } else if (issue2.path.length === 0) {
1782
- fieldErrors._errors.push(mapper(issue2));
1810
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1783
1811
  } else {
1784
- let curr = fieldErrors;
1785
- let i = 0;
1786
- while (i < issue2.path.length) {
1787
- const el = issue2.path[i];
1788
- const terminal = i === issue2.path.length - 1;
1789
- if (!terminal) {
1790
- curr[el] = curr[el] || { _errors: [] };
1791
- } else {
1792
- curr[el] = curr[el] || { _errors: [] };
1793
- curr[el]._errors.push(mapper(issue2));
1812
+ const fullpath = [...path, ...issue2.path];
1813
+ if (fullpath.length === 0) {
1814
+ fieldErrors._errors.push(mapper(issue2));
1815
+ } else {
1816
+ let curr = fieldErrors;
1817
+ let i = 0;
1818
+ while (i < fullpath.length) {
1819
+ const el = fullpath[i];
1820
+ const terminal = i === fullpath.length - 1;
1821
+ if (!terminal) {
1822
+ curr[el] = curr[el] || { _errors: [] };
1823
+ } else {
1824
+ curr[el] = curr[el] || { _errors: [] };
1825
+ curr[el]._errors.push(mapper(issue2));
1826
+ }
1827
+ curr = curr[el];
1828
+ i++;
1794
1829
  }
1795
- curr = curr[el];
1796
- i++;
1797
1830
  }
1798
1831
  }
1799
1832
  }
1800
1833
  };
1801
- processError(error48);
1834
+ processError(error51);
1802
1835
  return fieldErrors;
1803
1836
  }
1804
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
1837
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1805
1838
  const result = { errors: [] };
1806
- const processError = (error49, path = []) => {
1807
- var _a2, _b;
1808
- for (const issue2 of error49.issues) {
1839
+ const processError = (error52, path = []) => {
1840
+ var _a3, _b;
1841
+ for (const issue2 of error52.issues) {
1809
1842
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1810
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
1843
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
1811
1844
  } else if (issue2.code === "invalid_key") {
1812
- processError({ issues: issue2.issues }, issue2.path);
1845
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1813
1846
  } else if (issue2.code === "invalid_element") {
1814
- processError({ issues: issue2.issues }, issue2.path);
1847
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1815
1848
  } else {
1816
1849
  const fullpath = [...path, ...issue2.path];
1817
1850
  if (fullpath.length === 0) {
@@ -1825,7 +1858,7 @@
1825
1858
  const terminal = i === fullpath.length - 1;
1826
1859
  if (typeof el === "string") {
1827
1860
  curr.properties ?? (curr.properties = {});
1828
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
1861
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
1829
1862
  curr = curr.properties[el];
1830
1863
  } else {
1831
1864
  curr.items ?? (curr.items = []);
@@ -1840,7 +1873,7 @@
1840
1873
  }
1841
1874
  }
1842
1875
  };
1843
- processError(error48);
1876
+ processError(error51);
1844
1877
  return result;
1845
1878
  }
1846
1879
  function toDotPath(_path) {
@@ -1861,9 +1894,9 @@
1861
1894
  }
1862
1895
  return segs.join("");
1863
1896
  }
1864
- function prettifyError(error48) {
1897
+ function prettifyError(error51) {
1865
1898
  const lines = [];
1866
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1899
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1867
1900
  for (const issue2 of issues) {
1868
1901
  lines.push(`\u2716 ${issue2.message}`);
1869
1902
  if (issue2.path?.length)
@@ -1874,7 +1907,7 @@
1874
1907
 
1875
1908
  // node_modules/zod/v4/core/parse.js
1876
1909
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
1877
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1910
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1878
1911
  const result = schema._zod.run({ value, issues: [] }, ctx);
1879
1912
  if (result instanceof Promise) {
1880
1913
  throw new $ZodAsyncError();
@@ -1888,7 +1921,7 @@
1888
1921
  };
1889
1922
  var parse = /* @__PURE__ */ _parse($ZodRealError);
1890
1923
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1891
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1924
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1892
1925
  let result = schema._zod.run({ value, issues: [] }, ctx);
1893
1926
  if (result instanceof Promise)
1894
1927
  result = await result;
@@ -1913,7 +1946,7 @@
1913
1946
  };
1914
1947
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
1915
1948
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1916
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1949
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1917
1950
  let result = schema._zod.run({ value, issues: [] }, ctx);
1918
1951
  if (result instanceof Promise)
1919
1952
  result = await result;
@@ -1924,7 +1957,7 @@
1924
1957
  };
1925
1958
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1926
1959
  var _encode = (_Err) => (schema, value, _ctx) => {
1927
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1960
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1928
1961
  return _parse(_Err)(schema, value, ctx);
1929
1962
  };
1930
1963
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -1933,7 +1966,7 @@
1933
1966
  };
1934
1967
  var decode = /* @__PURE__ */ _decode($ZodRealError);
1935
1968
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
1936
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1969
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1937
1970
  return _parseAsync(_Err)(schema, value, ctx);
1938
1971
  };
1939
1972
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -1942,7 +1975,7 @@
1942
1975
  };
1943
1976
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
1944
1977
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
1945
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1978
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1946
1979
  return _safeParse(_Err)(schema, value, ctx);
1947
1980
  };
1948
1981
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -1951,7 +1984,7 @@
1951
1984
  };
1952
1985
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
1953
1986
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1954
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1987
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1955
1988
  return _safeParseAsync(_Err)(schema, value, ctx);
1956
1989
  };
1957
1990
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -1984,6 +2017,7 @@
1984
2017
  hex: () => hex,
1985
2018
  hostname: () => hostname,
1986
2019
  html5Email: () => html5Email,
2020
+ httpProtocol: () => httpProtocol,
1987
2021
  idnEmail: () => idnEmail,
1988
2022
  integer: () => integer,
1989
2023
  ipv4: () => ipv4,
@@ -2022,7 +2056,7 @@
2022
2056
  uuid7: () => uuid7,
2023
2057
  xid: () => xid
2024
2058
  });
2025
- var cuid = /^[cC][^\s-]{8,}$/;
2059
+ var cuid = /^[cC][0-9a-z]{6,}$/;
2026
2060
  var cuid2 = /^[0-9a-z]+$/;
2027
2061
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
2028
2062
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -2061,6 +2095,7 @@
2061
2095
  var base64url = /^[A-Za-z0-9_-]*$/;
2062
2096
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
2063
2097
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
2098
+ var httpProtocol = /^https?$/;
2064
2099
  var e164 = /^\+[1-9]\d{6,14}$/;
2065
2100
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
2066
2101
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -2119,10 +2154,10 @@
2119
2154
 
2120
2155
  // node_modules/zod/v4/core/checks.js
2121
2156
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
2122
- var _a2;
2157
+ var _a3;
2123
2158
  inst._zod ?? (inst._zod = {});
2124
2159
  inst._zod.def = def;
2125
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
2160
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
2126
2161
  });
2127
2162
  var numericOriginMap = {
2128
2163
  number: "number",
@@ -2188,8 +2223,8 @@
2188
2223
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
2189
2224
  $ZodCheck.init(inst, def);
2190
2225
  inst._zod.onattach.push((inst2) => {
2191
- var _a2;
2192
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
2226
+ var _a3;
2227
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
2193
2228
  });
2194
2229
  inst._zod.check = (payload) => {
2195
2230
  if (typeof payload.value !== typeof def.value)
@@ -2322,9 +2357,9 @@
2322
2357
  };
2323
2358
  });
2324
2359
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
2325
- var _a2;
2360
+ var _a3;
2326
2361
  $ZodCheck.init(inst, def);
2327
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2362
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2328
2363
  const val = payload.value;
2329
2364
  return !nullish(val) && val.size !== void 0;
2330
2365
  });
@@ -2350,9 +2385,9 @@
2350
2385
  };
2351
2386
  });
2352
2387
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
2353
- var _a2;
2388
+ var _a3;
2354
2389
  $ZodCheck.init(inst, def);
2355
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2390
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2356
2391
  const val = payload.value;
2357
2392
  return !nullish(val) && val.size !== void 0;
2358
2393
  });
@@ -2378,9 +2413,9 @@
2378
2413
  };
2379
2414
  });
2380
2415
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
2381
- var _a2;
2416
+ var _a3;
2382
2417
  $ZodCheck.init(inst, def);
2383
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2418
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2384
2419
  const val = payload.value;
2385
2420
  return !nullish(val) && val.size !== void 0;
2386
2421
  });
@@ -2408,9 +2443,9 @@
2408
2443
  };
2409
2444
  });
2410
2445
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
2411
- var _a2;
2446
+ var _a3;
2412
2447
  $ZodCheck.init(inst, def);
2413
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2448
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2414
2449
  const val = payload.value;
2415
2450
  return !nullish(val) && val.length !== void 0;
2416
2451
  });
@@ -2437,9 +2472,9 @@
2437
2472
  };
2438
2473
  });
2439
2474
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2440
- var _a2;
2475
+ var _a3;
2441
2476
  $ZodCheck.init(inst, def);
2442
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2477
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2443
2478
  const val = payload.value;
2444
2479
  return !nullish(val) && val.length !== void 0;
2445
2480
  });
@@ -2466,9 +2501,9 @@
2466
2501
  };
2467
2502
  });
2468
2503
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2469
- var _a2;
2504
+ var _a3;
2470
2505
  $ZodCheck.init(inst, def);
2471
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2506
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2472
2507
  const val = payload.value;
2473
2508
  return !nullish(val) && val.length !== void 0;
2474
2509
  });
@@ -2497,7 +2532,7 @@
2497
2532
  };
2498
2533
  });
2499
2534
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
2500
- var _a2, _b;
2535
+ var _a3, _b;
2501
2536
  $ZodCheck.init(inst, def);
2502
2537
  inst._zod.onattach.push((inst2) => {
2503
2538
  const bag = inst2._zod.bag;
@@ -2508,7 +2543,7 @@
2508
2543
  }
2509
2544
  });
2510
2545
  if (def.pattern)
2511
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
2546
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
2512
2547
  def.pattern.lastIndex = 0;
2513
2548
  if (def.pattern.test(payload.value))
2514
2549
  return;
@@ -2704,13 +2739,13 @@
2704
2739
  // node_modules/zod/v4/core/versions.js
2705
2740
  var version = {
2706
2741
  major: 4,
2707
- minor: 3,
2708
- patch: 6
2742
+ minor: 4,
2743
+ patch: 3
2709
2744
  };
2710
2745
 
2711
2746
  // node_modules/zod/v4/core/schemas.js
2712
2747
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2713
- var _a2;
2748
+ var _a3;
2714
2749
  inst ?? (inst = {});
2715
2750
  inst._zod.def = def;
2716
2751
  inst._zod.bag = inst._zod.bag || {};
@@ -2725,7 +2760,7 @@
2725
2760
  }
2726
2761
  }
2727
2762
  if (checks.length === 0) {
2728
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
2763
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
2729
2764
  inst._zod.deferred?.push(() => {
2730
2765
  inst._zod.run = inst._zod.parse;
2731
2766
  });
@@ -2735,6 +2770,8 @@
2735
2770
  let asyncResult;
2736
2771
  for (const ch of checks2) {
2737
2772
  if (ch._zod.def.when) {
2773
+ if (explicitlyAborted(payload))
2774
+ continue;
2738
2775
  const shouldRun = ch._zod.def.when(payload);
2739
2776
  if (!shouldRun)
2740
2777
  continue;
@@ -2875,6 +2912,19 @@
2875
2912
  inst._zod.check = (payload) => {
2876
2913
  try {
2877
2914
  const trimmed = payload.value.trim();
2915
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
2916
+ if (!/^https?:\/\//i.test(trimmed)) {
2917
+ payload.issues.push({
2918
+ code: "invalid_format",
2919
+ format: "url",
2920
+ note: "Invalid URL format",
2921
+ input: payload.value,
2922
+ inst,
2923
+ continue: !def.abort
2924
+ });
2925
+ return;
2926
+ }
2927
+ }
2878
2928
  const url2 = new URL(trimmed);
2879
2929
  if (def.hostname) {
2880
2930
  def.hostname.lastIndex = 0;
@@ -3028,6 +3078,8 @@
3028
3078
  function isValidBase64(data) {
3029
3079
  if (data === "")
3030
3080
  return true;
3081
+ if (/\s/.test(data))
3082
+ return false;
3031
3083
  if (data.length % 4 !== 0)
3032
3084
  return false;
3033
3085
  try {
@@ -3220,8 +3272,6 @@
3220
3272
  $ZodType.init(inst, def);
3221
3273
  inst._zod.pattern = _undefined;
3222
3274
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
3223
- inst._zod.optin = "optional";
3224
- inst._zod.optout = "optional";
3225
3275
  inst._zod.parse = (payload, _ctx) => {
3226
3276
  const input = payload.value;
3227
3277
  if (typeof input === "undefined")
@@ -3350,15 +3400,27 @@
3350
3400
  return payload;
3351
3401
  };
3352
3402
  });
3353
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
3403
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
3404
+ const isPresent = key in input;
3354
3405
  if (result.issues.length) {
3355
- if (isOptionalOut && !(key in input)) {
3406
+ if (isOptionalIn && isOptionalOut && !isPresent) {
3356
3407
  return;
3357
3408
  }
3358
3409
  final.issues.push(...prefixIssues(key, result.issues));
3359
3410
  }
3411
+ if (!isPresent && !isOptionalIn) {
3412
+ if (!result.issues.length) {
3413
+ final.issues.push({
3414
+ code: "invalid_type",
3415
+ expected: "nonoptional",
3416
+ input: void 0,
3417
+ path: [key]
3418
+ });
3419
+ }
3420
+ return;
3421
+ }
3360
3422
  if (result.value === void 0) {
3361
- if (key in input) {
3423
+ if (isPresent) {
3362
3424
  final.value[key] = void 0;
3363
3425
  }
3364
3426
  } else {
@@ -3386,8 +3448,11 @@
3386
3448
  const keySet = def.keySet;
3387
3449
  const _catchall = def.catchall._zod;
3388
3450
  const t = _catchall.def.type;
3451
+ const isOptionalIn = _catchall.optin === "optional";
3389
3452
  const isOptionalOut = _catchall.optout === "optional";
3390
3453
  for (const key in input) {
3454
+ if (key === "__proto__")
3455
+ continue;
3391
3456
  if (keySet.has(key))
3392
3457
  continue;
3393
3458
  if (t === "never") {
@@ -3396,9 +3461,9 @@
3396
3461
  }
3397
3462
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3398
3463
  if (r instanceof Promise) {
3399
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3464
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3400
3465
  } else {
3401
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3466
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3402
3467
  }
3403
3468
  }
3404
3469
  if (unrecognized.length) {
@@ -3464,12 +3529,13 @@
3464
3529
  const shape = value.shape;
3465
3530
  for (const key of value.keys) {
3466
3531
  const el = shape[key];
3532
+ const isOptionalIn = el._zod.optin === "optional";
3467
3533
  const isOptionalOut = el._zod.optout === "optional";
3468
3534
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3469
3535
  if (r instanceof Promise) {
3470
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3536
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3471
3537
  } else {
3472
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3538
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3473
3539
  }
3474
3540
  }
3475
3541
  if (!catchall) {
@@ -3500,9 +3566,10 @@
3500
3566
  const id = ids[key];
3501
3567
  const k = esc(key);
3502
3568
  const schema = shape[key];
3569
+ const isOptionalIn = schema?._zod?.optin === "optional";
3503
3570
  const isOptionalOut = schema?._zod?.optout === "optional";
3504
3571
  doc.write(`const ${id} = ${parseStr(key)};`);
3505
- if (isOptionalOut) {
3572
+ if (isOptionalIn && isOptionalOut) {
3506
3573
  doc.write(`
3507
3574
  if (${id}.issues.length) {
3508
3575
  if (${k} in input) {
@@ -3521,6 +3588,33 @@
3521
3588
  newResult[${k}] = ${id}.value;
3522
3589
  }
3523
3590
 
3591
+ `);
3592
+ } else if (!isOptionalIn) {
3593
+ doc.write(`
3594
+ const ${id}_present = ${k} in input;
3595
+ if (${id}.issues.length) {
3596
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3597
+ ...iss,
3598
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3599
+ })));
3600
+ }
3601
+ if (!${id}_present && !${id}.issues.length) {
3602
+ payload.issues.push({
3603
+ code: "invalid_type",
3604
+ expected: "nonoptional",
3605
+ input: undefined,
3606
+ path: [${k}]
3607
+ });
3608
+ }
3609
+
3610
+ if (${id}_present) {
3611
+ if (${id}.value === undefined) {
3612
+ newResult[${k}] = undefined;
3613
+ } else {
3614
+ newResult[${k}] = ${id}.value;
3615
+ }
3616
+ }
3617
+
3524
3618
  `);
3525
3619
  } else {
3526
3620
  doc.write(`
@@ -3614,10 +3708,9 @@
3614
3708
  }
3615
3709
  return void 0;
3616
3710
  });
3617
- const single = def.options.length === 1;
3618
- const first = def.options[0]._zod.run;
3711
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3619
3712
  inst._zod.parse = (payload, ctx) => {
3620
- if (single) {
3713
+ if (first) {
3621
3714
  return first(payload, ctx);
3622
3715
  }
3623
3716
  let async = false;
@@ -3670,10 +3763,9 @@
3670
3763
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3671
3764
  $ZodUnion.init(inst, def);
3672
3765
  def.inclusive = false;
3673
- const single = def.options.length === 1;
3674
- const first = def.options[0]._zod.run;
3766
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3675
3767
  inst._zod.parse = (payload, ctx) => {
3676
- if (single) {
3768
+ if (first) {
3677
3769
  return first(payload, ctx);
3678
3770
  }
3679
3771
  let async = false;
@@ -3748,7 +3840,7 @@
3748
3840
  if (opt) {
3749
3841
  return opt._zod.run(payload, ctx);
3750
3842
  }
3751
- if (def.unionFallback) {
3843
+ if (def.unionFallback || ctx.direction === "backward") {
3752
3844
  return _super(payload, ctx);
3753
3845
  }
3754
3846
  payload.issues.push({
@@ -3756,6 +3848,7 @@
3756
3848
  errors: [],
3757
3849
  note: "No matching discriminator",
3758
3850
  discriminator: def.discriminator,
3851
+ options: Array.from(disc.value.keys()),
3759
3852
  input,
3760
3853
  path: [def.discriminator],
3761
3854
  inst
@@ -3877,64 +3970,96 @@
3877
3970
  }
3878
3971
  payload.value = [];
3879
3972
  const proms = [];
3880
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3881
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3973
+ const optinStart = getTupleOptStart(items, "optin");
3974
+ const optoutStart = getTupleOptStart(items, "optout");
3882
3975
  if (!def.rest) {
3883
- const tooBig = input.length > items.length;
3884
- const tooSmall = input.length < optStart - 1;
3885
- if (tooBig || tooSmall) {
3976
+ if (input.length < optinStart) {
3886
3977
  payload.issues.push({
3887
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3978
+ code: "too_small",
3979
+ minimum: optinStart,
3980
+ inclusive: true,
3888
3981
  input,
3889
3982
  inst,
3890
3983
  origin: "array"
3891
3984
  });
3892
3985
  return payload;
3893
3986
  }
3894
- }
3895
- let i = -1;
3896
- for (const item of items) {
3897
- i++;
3898
- if (i >= input.length) {
3899
- if (i >= optStart)
3900
- continue;
3987
+ if (input.length > items.length) {
3988
+ payload.issues.push({
3989
+ code: "too_big",
3990
+ maximum: items.length,
3991
+ inclusive: true,
3992
+ input,
3993
+ inst,
3994
+ origin: "array"
3995
+ });
3901
3996
  }
3902
- const result = item._zod.run({
3903
- value: input[i],
3904
- issues: []
3905
- }, ctx);
3906
- if (result instanceof Promise) {
3907
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3997
+ }
3998
+ const itemResults = new Array(items.length);
3999
+ for (let i = 0; i < items.length; i++) {
4000
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
4001
+ if (r instanceof Promise) {
4002
+ proms.push(r.then((rr) => {
4003
+ itemResults[i] = rr;
4004
+ }));
3908
4005
  } else {
3909
- handleTupleResult(result, payload, i);
4006
+ itemResults[i] = r;
3910
4007
  }
3911
4008
  }
3912
4009
  if (def.rest) {
4010
+ let i = items.length - 1;
3913
4011
  const rest = input.slice(items.length);
3914
4012
  for (const el of rest) {
3915
4013
  i++;
3916
- const result = def.rest._zod.run({
3917
- value: el,
3918
- issues: []
3919
- }, ctx);
4014
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
3920
4015
  if (result instanceof Promise) {
3921
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
4016
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3922
4017
  } else {
3923
4018
  handleTupleResult(result, payload, i);
3924
4019
  }
3925
4020
  }
3926
4021
  }
3927
- if (proms.length)
3928
- return Promise.all(proms).then(() => payload);
3929
- return payload;
4022
+ if (proms.length) {
4023
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
4024
+ }
4025
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3930
4026
  };
3931
4027
  });
4028
+ function getTupleOptStart(items, key) {
4029
+ for (let i = items.length - 1; i >= 0; i--) {
4030
+ if (items[i]._zod[key] !== "optional")
4031
+ return i + 1;
4032
+ }
4033
+ return 0;
4034
+ }
3932
4035
  function handleTupleResult(result, final, index) {
3933
4036
  if (result.issues.length) {
3934
4037
  final.issues.push(...prefixIssues(index, result.issues));
3935
4038
  }
3936
4039
  final.value[index] = result.value;
3937
4040
  }
4041
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
4042
+ for (let i = 0; i < items.length; i++) {
4043
+ const r = itemResults[i];
4044
+ const isPresent = i < input.length;
4045
+ if (r.issues.length) {
4046
+ if (!isPresent && i >= optoutStart) {
4047
+ final.value.length = i;
4048
+ break;
4049
+ }
4050
+ final.issues.push(...prefixIssues(i, r.issues));
4051
+ }
4052
+ final.value[i] = r.value;
4053
+ }
4054
+ for (let i = final.value.length - 1; i >= input.length; i--) {
4055
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
4056
+ final.value.length = i;
4057
+ } else {
4058
+ break;
4059
+ }
4060
+ }
4061
+ return final;
4062
+ }
3938
4063
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3939
4064
  $ZodType.init(inst, def);
3940
4065
  inst._zod.parse = (payload, ctx) => {
@@ -3956,19 +4081,35 @@
3956
4081
  for (const key of values) {
3957
4082
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3958
4083
  recordKeys.add(typeof key === "number" ? key.toString() : key);
4084
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
4085
+ if (keyResult instanceof Promise) {
4086
+ throw new Error("Async schemas not supported in object keys currently");
4087
+ }
4088
+ if (keyResult.issues.length) {
4089
+ payload.issues.push({
4090
+ code: "invalid_key",
4091
+ origin: "record",
4092
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
4093
+ input: key,
4094
+ path: [key],
4095
+ inst
4096
+ });
4097
+ continue;
4098
+ }
4099
+ const outKey = keyResult.value;
3959
4100
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3960
4101
  if (result instanceof Promise) {
3961
4102
  proms.push(result.then((result2) => {
3962
4103
  if (result2.issues.length) {
3963
4104
  payload.issues.push(...prefixIssues(key, result2.issues));
3964
4105
  }
3965
- payload.value[key] = result2.value;
4106
+ payload.value[outKey] = result2.value;
3966
4107
  }));
3967
4108
  } else {
3968
4109
  if (result.issues.length) {
3969
4110
  payload.issues.push(...prefixIssues(key, result.issues));
3970
4111
  }
3971
- payload.value[key] = result.value;
4112
+ payload.value[outKey] = result.value;
3972
4113
  }
3973
4114
  }
3974
4115
  }
@@ -3992,6 +4133,8 @@
3992
4133
  for (const key of Reflect.ownKeys(input)) {
3993
4134
  if (key === "__proto__")
3994
4135
  continue;
4136
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
4137
+ continue;
3995
4138
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3996
4139
  if (keyResult instanceof Promise) {
3997
4140
  throw new Error("Async schemas not supported in object keys currently");
@@ -4196,6 +4339,7 @@
4196
4339
  });
4197
4340
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
4198
4341
  $ZodType.init(inst, def);
4342
+ inst._zod.optin = "optional";
4199
4343
  inst._zod.parse = (payload, ctx) => {
4200
4344
  if (ctx.direction === "backward") {
4201
4345
  throw new $ZodEncodeError(inst.constructor.name);
@@ -4205,6 +4349,7 @@
4205
4349
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
4206
4350
  return output.then((output2) => {
4207
4351
  payload.value = output2;
4352
+ payload.fallback = true;
4208
4353
  return payload;
4209
4354
  });
4210
4355
  }
@@ -4212,11 +4357,12 @@
4212
4357
  throw new $ZodAsyncError();
4213
4358
  }
4214
4359
  payload.value = _out;
4360
+ payload.fallback = true;
4215
4361
  return payload;
4216
4362
  };
4217
4363
  });
4218
4364
  function handleOptionalResult(result, input) {
4219
- if (result.issues.length && input === void 0) {
4365
+ if (input === void 0 && (result.issues.length || result.fallback)) {
4220
4366
  return { issues: [], value: void 0 };
4221
4367
  }
4222
4368
  return result;
@@ -4234,10 +4380,11 @@
4234
4380
  });
4235
4381
  inst._zod.parse = (payload, ctx) => {
4236
4382
  if (def.innerType._zod.optin === "optional") {
4383
+ const input = payload.value;
4237
4384
  const result = def.innerType._zod.run(payload, ctx);
4238
4385
  if (result instanceof Promise)
4239
- return result.then((r) => handleOptionalResult(r, payload.value));
4240
- return handleOptionalResult(result, payload.value);
4386
+ return result.then((r) => handleOptionalResult(r, input));
4387
+ return handleOptionalResult(result, input);
4241
4388
  }
4242
4389
  if (payload.value === void 0) {
4243
4390
  return payload;
@@ -4353,7 +4500,7 @@
4353
4500
  });
4354
4501
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
4355
4502
  $ZodType.init(inst, def);
4356
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
4503
+ inst._zod.optin = "optional";
4357
4504
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
4358
4505
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
4359
4506
  inst._zod.parse = (payload, ctx) => {
@@ -4373,6 +4520,7 @@
4373
4520
  input: payload.value
4374
4521
  });
4375
4522
  payload.issues = [];
4523
+ payload.fallback = true;
4376
4524
  }
4377
4525
  return payload;
4378
4526
  });
@@ -4387,6 +4535,7 @@
4387
4535
  input: payload.value
4388
4536
  });
4389
4537
  payload.issues = [];
4538
+ payload.fallback = true;
4390
4539
  }
4391
4540
  return payload;
4392
4541
  };
@@ -4432,7 +4581,7 @@
4432
4581
  left.aborted = true;
4433
4582
  return left;
4434
4583
  }
4435
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
4584
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
4436
4585
  }
4437
4586
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
4438
4587
  $ZodType.init(inst, def);
@@ -4484,6 +4633,9 @@
4484
4633
  }
4485
4634
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
4486
4635
  }
4636
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
4637
+ $ZodPipe.init(inst, def);
4638
+ });
4487
4639
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
4488
4640
  $ZodType.init(inst, def);
4489
4641
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -4635,7 +4787,12 @@
4635
4787
  });
4636
4788
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4637
4789
  $ZodType.init(inst, def);
4638
- defineLazy(inst._zod, "innerType", () => def.getter());
4790
+ defineLazy(inst._zod, "innerType", () => {
4791
+ const d = def;
4792
+ if (!d._cachedInner)
4793
+ d._cachedInner = def.getter();
4794
+ return d._cachedInner;
4795
+ });
4639
4796
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
4640
4797
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
4641
4798
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4690,6 +4847,7 @@
4690
4847
  cs: () => cs_default,
4691
4848
  da: () => da_default,
4692
4849
  de: () => de_default,
4850
+ el: () => el_default,
4693
4851
  en: () => en_default,
4694
4852
  eo: () => eo_default,
4695
4853
  es: () => es_default,
@@ -4698,6 +4856,7 @@
4698
4856
  fr: () => fr_default,
4699
4857
  frCA: () => fr_CA_default,
4700
4858
  he: () => he_default,
4859
+ hr: () => hr_default,
4701
4860
  hu: () => hu_default,
4702
4861
  hy: () => hy_default,
4703
4862
  id: () => id_default,
@@ -4717,6 +4876,7 @@
4717
4876
  pl: () => pl_default,
4718
4877
  ps: () => ps_default,
4719
4878
  pt: () => pt_default,
4879
+ ro: () => ro_default,
4720
4880
  ru: () => ru_default,
4721
4881
  sl: () => sl_default,
4722
4882
  sv: () => sv_default,
@@ -5670,8 +5830,118 @@
5670
5830
  };
5671
5831
  }
5672
5832
 
5673
- // node_modules/zod/v4/locales/en.js
5833
+ // node_modules/zod/v4/locales/el.js
5674
5834
  var error9 = () => {
5835
+ const Sizable = {
5836
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5837
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5838
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5839
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5840
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
5841
+ };
5842
+ function getSizing(origin) {
5843
+ return Sizable[origin] ?? null;
5844
+ }
5845
+ const FormatDictionary = {
5846
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
5847
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
5848
+ url: "URL",
5849
+ emoji: "emoji",
5850
+ uuid: "UUID",
5851
+ uuidv4: "UUIDv4",
5852
+ uuidv6: "UUIDv6",
5853
+ nanoid: "nanoid",
5854
+ guid: "GUID",
5855
+ cuid: "cuid",
5856
+ cuid2: "cuid2",
5857
+ ulid: "ULID",
5858
+ xid: "XID",
5859
+ ksuid: "KSUID",
5860
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
5861
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
5862
+ time: "ISO \u03CE\u03C1\u03B1",
5863
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
5864
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
5865
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
5866
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
5867
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
5868
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
5869
+ 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",
5870
+ 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",
5871
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
5872
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
5873
+ jwt: "JWT",
5874
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
5875
+ };
5876
+ const TypeDictionary = {
5877
+ nan: "NaN"
5878
+ };
5879
+ return (issue2) => {
5880
+ switch (issue2.code) {
5881
+ case "invalid_type": {
5882
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
5883
+ const receivedType = parsedType(issue2.input);
5884
+ const received = TypeDictionary[receivedType] ?? receivedType;
5885
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
5886
+ 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}`;
5887
+ }
5888
+ 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}`;
5889
+ }
5890
+ case "invalid_value":
5891
+ if (issue2.values.length === 1)
5892
+ 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])}`;
5893
+ 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, "|")}`;
5894
+ case "too_big": {
5895
+ const adj = issue2.inclusive ? "<=" : "<";
5896
+ const sizing = getSizing(issue2.origin);
5897
+ if (sizing)
5898
+ 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"}`;
5899
+ 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()}`;
5900
+ }
5901
+ case "too_small": {
5902
+ const adj = issue2.inclusive ? ">=" : ">";
5903
+ const sizing = getSizing(issue2.origin);
5904
+ if (sizing) {
5905
+ 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}`;
5906
+ }
5907
+ 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()}`;
5908
+ }
5909
+ case "invalid_format": {
5910
+ const _issue = issue2;
5911
+ if (_issue.format === "starts_with") {
5912
+ 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}"`;
5913
+ }
5914
+ if (_issue.format === "ends_with")
5915
+ 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}"`;
5916
+ if (_issue.format === "includes")
5917
+ 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}"`;
5918
+ if (_issue.format === "regex")
5919
+ 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}`;
5920
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
5921
+ }
5922
+ case "not_multiple_of":
5923
+ 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}`;
5924
+ case "unrecognized_keys":
5925
+ 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, ", ")}`;
5926
+ case "invalid_key":
5927
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
5928
+ case "invalid_union":
5929
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
5930
+ case "invalid_element":
5931
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
5932
+ default:
5933
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
5934
+ }
5935
+ };
5936
+ };
5937
+ function el_default() {
5938
+ return {
5939
+ localeError: error9()
5940
+ };
5941
+ }
5942
+
5943
+ // node_modules/zod/v4/locales/en.js
5944
+ var error10 = () => {
5675
5945
  const Sizable = {
5676
5946
  string: { unit: "characters", verb: "to have" },
5677
5947
  file: { unit: "bytes", verb: "to have" },
@@ -5765,6 +6035,10 @@
5765
6035
  case "invalid_key":
5766
6036
  return `Invalid key in ${issue2.origin}`;
5767
6037
  case "invalid_union":
6038
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
6039
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
6040
+ return `Invalid discriminator value. Expected ${opts}`;
6041
+ }
5768
6042
  return "Invalid input";
5769
6043
  case "invalid_element":
5770
6044
  return `Invalid value in ${issue2.origin}`;
@@ -5775,12 +6049,12 @@
5775
6049
  };
5776
6050
  function en_default() {
5777
6051
  return {
5778
- localeError: error9()
6052
+ localeError: error10()
5779
6053
  };
5780
6054
  }
5781
6055
 
5782
6056
  // node_modules/zod/v4/locales/eo.js
5783
- var error10 = () => {
6057
+ var error11 = () => {
5784
6058
  const Sizable = {
5785
6059
  string: { unit: "karaktrojn", verb: "havi" },
5786
6060
  file: { unit: "bajtojn", verb: "havi" },
@@ -5885,12 +6159,12 @@
5885
6159
  };
5886
6160
  function eo_default() {
5887
6161
  return {
5888
- localeError: error10()
6162
+ localeError: error11()
5889
6163
  };
5890
6164
  }
5891
6165
 
5892
6166
  // node_modules/zod/v4/locales/es.js
5893
- var error11 = () => {
6167
+ var error12 = () => {
5894
6168
  const Sizable = {
5895
6169
  string: { unit: "caracteres", verb: "tener" },
5896
6170
  file: { unit: "bytes", verb: "tener" },
@@ -6018,12 +6292,12 @@
6018
6292
  };
6019
6293
  function es_default() {
6020
6294
  return {
6021
- localeError: error11()
6295
+ localeError: error12()
6022
6296
  };
6023
6297
  }
6024
6298
 
6025
6299
  // node_modules/zod/v4/locales/fa.js
6026
- var error12 = () => {
6300
+ var error13 = () => {
6027
6301
  const Sizable = {
6028
6302
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
6029
6303
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -6133,12 +6407,12 @@
6133
6407
  };
6134
6408
  function fa_default() {
6135
6409
  return {
6136
- localeError: error12()
6410
+ localeError: error13()
6137
6411
  };
6138
6412
  }
6139
6413
 
6140
6414
  // node_modules/zod/v4/locales/fi.js
6141
- var error13 = () => {
6415
+ var error14 = () => {
6142
6416
  const Sizable = {
6143
6417
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
6144
6418
  file: { unit: "tavua", subject: "tiedoston" },
@@ -6246,12 +6520,12 @@
6246
6520
  };
6247
6521
  function fi_default() {
6248
6522
  return {
6249
- localeError: error13()
6523
+ localeError: error14()
6250
6524
  };
6251
6525
  }
6252
6526
 
6253
6527
  // node_modules/zod/v4/locales/fr.js
6254
- var error14 = () => {
6528
+ var error15 = () => {
6255
6529
  const Sizable = {
6256
6530
  string: { unit: "caract\xE8res", verb: "avoir" },
6257
6531
  file: { unit: "octets", verb: "avoir" },
@@ -6292,9 +6566,27 @@
6292
6566
  template_literal: "entr\xE9e"
6293
6567
  };
6294
6568
  const TypeDictionary = {
6295
- nan: "NaN",
6569
+ string: "cha\xEEne",
6296
6570
  number: "nombre",
6297
- array: "tableau"
6571
+ int: "entier",
6572
+ boolean: "bool\xE9en",
6573
+ bigint: "grand entier",
6574
+ symbol: "symbole",
6575
+ undefined: "ind\xE9fini",
6576
+ null: "null",
6577
+ never: "jamais",
6578
+ void: "vide",
6579
+ date: "date",
6580
+ array: "tableau",
6581
+ object: "objet",
6582
+ tuple: "tuple",
6583
+ record: "enregistrement",
6584
+ map: "carte",
6585
+ set: "ensemble",
6586
+ file: "fichier",
6587
+ nonoptional: "non-optionnel",
6588
+ nan: "NaN",
6589
+ function: "fonction"
6298
6590
  };
6299
6591
  return (issue2) => {
6300
6592
  switch (issue2.code) {
@@ -6315,16 +6607,15 @@
6315
6607
  const adj = issue2.inclusive ? "<=" : "<";
6316
6608
  const sizing = getSizing(issue2.origin);
6317
6609
  if (sizing)
6318
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6319
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6610
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6611
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6320
6612
  }
6321
6613
  case "too_small": {
6322
6614
  const adj = issue2.inclusive ? ">=" : ">";
6323
6615
  const sizing = getSizing(issue2.origin);
6324
- if (sizing) {
6325
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6326
- }
6327
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6616
+ if (sizing)
6617
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6618
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6328
6619
  }
6329
6620
  case "invalid_format": {
6330
6621
  const _issue = issue2;
@@ -6355,12 +6646,12 @@
6355
6646
  };
6356
6647
  function fr_default() {
6357
6648
  return {
6358
- localeError: error14()
6649
+ localeError: error15()
6359
6650
  };
6360
6651
  }
6361
6652
 
6362
6653
  // node_modules/zod/v4/locales/fr-CA.js
6363
- var error15 = () => {
6654
+ var error16 = () => {
6364
6655
  const Sizable = {
6365
6656
  string: { unit: "caract\xE8res", verb: "avoir" },
6366
6657
  file: { unit: "octets", verb: "avoir" },
@@ -6463,12 +6754,12 @@
6463
6754
  };
6464
6755
  function fr_CA_default() {
6465
6756
  return {
6466
- localeError: error15()
6757
+ localeError: error16()
6467
6758
  };
6468
6759
  }
6469
6760
 
6470
6761
  // node_modules/zod/v4/locales/he.js
6471
- var error16 = () => {
6762
+ var error17 = () => {
6472
6763
  const TypeNames = {
6473
6764
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
6474
6765
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -6658,24 +6949,24 @@
6658
6949
  };
6659
6950
  function he_default() {
6660
6951
  return {
6661
- localeError: error16()
6952
+ localeError: error17()
6662
6953
  };
6663
6954
  }
6664
6955
 
6665
- // node_modules/zod/v4/locales/hu.js
6666
- var error17 = () => {
6956
+ // node_modules/zod/v4/locales/hr.js
6957
+ var error18 = () => {
6667
6958
  const Sizable = {
6668
- string: { unit: "karakter", verb: "legyen" },
6669
- file: { unit: "byte", verb: "legyen" },
6670
- array: { unit: "elem", verb: "legyen" },
6671
- set: { unit: "elem", verb: "legyen" }
6959
+ string: { unit: "znakova", verb: "imati" },
6960
+ file: { unit: "bajtova", verb: "imati" },
6961
+ array: { unit: "stavki", verb: "imati" },
6962
+ set: { unit: "stavki", verb: "imati" }
6672
6963
  };
6673
6964
  function getSizing(origin) {
6674
6965
  return Sizable[origin] ?? null;
6675
6966
  }
6676
6967
  const FormatDictionary = {
6677
- regex: "bemenet",
6678
- email: "email c\xEDm",
6968
+ regex: "unos",
6969
+ email: "email adresa",
6679
6970
  url: "URL",
6680
6971
  emoji: "emoji",
6681
6972
  uuid: "UUID",
@@ -6688,25 +6979,37 @@
6688
6979
  ulid: "ULID",
6689
6980
  xid: "XID",
6690
6981
  ksuid: "KSUID",
6691
- datetime: "ISO id\u0151b\xE9lyeg",
6692
- date: "ISO d\xE1tum",
6693
- time: "ISO id\u0151",
6694
- duration: "ISO id\u0151intervallum",
6695
- ipv4: "IPv4 c\xEDm",
6696
- ipv6: "IPv6 c\xEDm",
6697
- cidrv4: "IPv4 tartom\xE1ny",
6698
- cidrv6: "IPv6 tartom\xE1ny",
6699
- base64: "base64-k\xF3dolt string",
6700
- base64url: "base64url-k\xF3dolt string",
6701
- json_string: "JSON string",
6702
- e164: "E.164 sz\xE1m",
6982
+ datetime: "ISO datum i vrijeme",
6983
+ date: "ISO datum",
6984
+ time: "ISO vrijeme",
6985
+ duration: "ISO trajanje",
6986
+ ipv4: "IPv4 adresa",
6987
+ ipv6: "IPv6 adresa",
6988
+ cidrv4: "IPv4 raspon",
6989
+ cidrv6: "IPv6 raspon",
6990
+ base64: "base64 kodirani tekst",
6991
+ base64url: "base64url kodirani tekst",
6992
+ json_string: "JSON tekst",
6993
+ e164: "E.164 broj",
6703
6994
  jwt: "JWT",
6704
- template_literal: "bemenet"
6995
+ template_literal: "unos"
6705
6996
  };
6706
6997
  const TypeDictionary = {
6707
6998
  nan: "NaN",
6708
- number: "sz\xE1m",
6709
- array: "t\xF6mb"
6999
+ string: "tekst",
7000
+ number: "broj",
7001
+ boolean: "boolean",
7002
+ array: "niz",
7003
+ object: "objekt",
7004
+ set: "skup",
7005
+ file: "datoteka",
7006
+ date: "datum",
7007
+ bigint: "bigint",
7008
+ symbol: "simbol",
7009
+ undefined: "undefined",
7010
+ null: "null",
7011
+ function: "funkcija",
7012
+ map: "mapa"
6710
7013
  };
6711
7014
  return (issue2) => {
6712
7015
  switch (issue2.code) {
@@ -6715,14 +7018,125 @@
6715
7018
  const receivedType = parsedType(issue2.input);
6716
7019
  const received = TypeDictionary[receivedType] ?? receivedType;
6717
7020
  if (/^[A-Z]/.test(issue2.expected)) {
6718
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
7021
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
6719
7022
  }
6720
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
7023
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
6721
7024
  }
6722
7025
  case "invalid_value":
6723
7026
  if (issue2.values.length === 1)
6724
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6725
- return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
7027
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
7028
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
7029
+ case "too_big": {
7030
+ const adj = issue2.inclusive ? "<=" : "<";
7031
+ const sizing = getSizing(issue2.origin);
7032
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
7033
+ if (sizing)
7034
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
7035
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
7036
+ }
7037
+ case "too_small": {
7038
+ const adj = issue2.inclusive ? ">=" : ">";
7039
+ const sizing = getSizing(issue2.origin);
7040
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
7041
+ if (sizing) {
7042
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
7043
+ }
7044
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
7045
+ }
7046
+ case "invalid_format": {
7047
+ const _issue = issue2;
7048
+ if (_issue.format === "starts_with")
7049
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
7050
+ if (_issue.format === "ends_with")
7051
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
7052
+ if (_issue.format === "includes")
7053
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
7054
+ if (_issue.format === "regex")
7055
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
7056
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
7057
+ }
7058
+ case "not_multiple_of":
7059
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
7060
+ case "unrecognized_keys":
7061
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
7062
+ case "invalid_key":
7063
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
7064
+ case "invalid_union":
7065
+ return "Neispravan unos";
7066
+ case "invalid_element":
7067
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
7068
+ default:
7069
+ return `Neispravan unos`;
7070
+ }
7071
+ };
7072
+ };
7073
+ function hr_default() {
7074
+ return {
7075
+ localeError: error18()
7076
+ };
7077
+ }
7078
+
7079
+ // node_modules/zod/v4/locales/hu.js
7080
+ var error19 = () => {
7081
+ const Sizable = {
7082
+ string: { unit: "karakter", verb: "legyen" },
7083
+ file: { unit: "byte", verb: "legyen" },
7084
+ array: { unit: "elem", verb: "legyen" },
7085
+ set: { unit: "elem", verb: "legyen" }
7086
+ };
7087
+ function getSizing(origin) {
7088
+ return Sizable[origin] ?? null;
7089
+ }
7090
+ const FormatDictionary = {
7091
+ regex: "bemenet",
7092
+ email: "email c\xEDm",
7093
+ url: "URL",
7094
+ emoji: "emoji",
7095
+ uuid: "UUID",
7096
+ uuidv4: "UUIDv4",
7097
+ uuidv6: "UUIDv6",
7098
+ nanoid: "nanoid",
7099
+ guid: "GUID",
7100
+ cuid: "cuid",
7101
+ cuid2: "cuid2",
7102
+ ulid: "ULID",
7103
+ xid: "XID",
7104
+ ksuid: "KSUID",
7105
+ datetime: "ISO id\u0151b\xE9lyeg",
7106
+ date: "ISO d\xE1tum",
7107
+ time: "ISO id\u0151",
7108
+ duration: "ISO id\u0151intervallum",
7109
+ ipv4: "IPv4 c\xEDm",
7110
+ ipv6: "IPv6 c\xEDm",
7111
+ cidrv4: "IPv4 tartom\xE1ny",
7112
+ cidrv6: "IPv6 tartom\xE1ny",
7113
+ base64: "base64-k\xF3dolt string",
7114
+ base64url: "base64url-k\xF3dolt string",
7115
+ json_string: "JSON string",
7116
+ e164: "E.164 sz\xE1m",
7117
+ jwt: "JWT",
7118
+ template_literal: "bemenet"
7119
+ };
7120
+ const TypeDictionary = {
7121
+ nan: "NaN",
7122
+ number: "sz\xE1m",
7123
+ array: "t\xF6mb"
7124
+ };
7125
+ return (issue2) => {
7126
+ switch (issue2.code) {
7127
+ case "invalid_type": {
7128
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
7129
+ const receivedType = parsedType(issue2.input);
7130
+ const received = TypeDictionary[receivedType] ?? receivedType;
7131
+ if (/^[A-Z]/.test(issue2.expected)) {
7132
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
7133
+ }
7134
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
7135
+ }
7136
+ case "invalid_value":
7137
+ if (issue2.values.length === 1)
7138
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
7139
+ return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6726
7140
  case "too_big": {
6727
7141
  const adj = issue2.inclusive ? "<=" : "<";
6728
7142
  const sizing = getSizing(issue2.origin);
@@ -6767,7 +7181,7 @@
6767
7181
  };
6768
7182
  function hu_default() {
6769
7183
  return {
6770
- localeError: error17()
7184
+ localeError: error19()
6771
7185
  };
6772
7186
  }
6773
7187
 
@@ -6782,7 +7196,7 @@
6782
7196
  const lastChar = word[word.length - 1];
6783
7197
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
6784
7198
  }
6785
- var error18 = () => {
7199
+ var error20 = () => {
6786
7200
  const Sizable = {
6787
7201
  string: {
6788
7202
  unit: {
@@ -6915,12 +7329,12 @@
6915
7329
  };
6916
7330
  function hy_default() {
6917
7331
  return {
6918
- localeError: error18()
7332
+ localeError: error20()
6919
7333
  };
6920
7334
  }
6921
7335
 
6922
7336
  // node_modules/zod/v4/locales/id.js
6923
- var error19 = () => {
7337
+ var error21 = () => {
6924
7338
  const Sizable = {
6925
7339
  string: { unit: "karakter", verb: "memiliki" },
6926
7340
  file: { unit: "byte", verb: "memiliki" },
@@ -7022,12 +7436,12 @@
7022
7436
  };
7023
7437
  function id_default() {
7024
7438
  return {
7025
- localeError: error19()
7439
+ localeError: error21()
7026
7440
  };
7027
7441
  }
7028
7442
 
7029
7443
  // node_modules/zod/v4/locales/is.js
7030
- var error20 = () => {
7444
+ var error22 = () => {
7031
7445
  const Sizable = {
7032
7446
  string: { unit: "stafi", verb: "a\xF0 hafa" },
7033
7447
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -7132,12 +7546,12 @@
7132
7546
  };
7133
7547
  function is_default() {
7134
7548
  return {
7135
- localeError: error20()
7549
+ localeError: error22()
7136
7550
  };
7137
7551
  }
7138
7552
 
7139
7553
  // node_modules/zod/v4/locales/it.js
7140
- var error21 = () => {
7554
+ var error23 = () => {
7141
7555
  const Sizable = {
7142
7556
  string: { unit: "caratteri", verb: "avere" },
7143
7557
  file: { unit: "byte", verb: "avere" },
@@ -7222,7 +7636,7 @@
7222
7636
  return `Stringa non valida: deve includere "${_issue.includes}"`;
7223
7637
  if (_issue.format === "regex")
7224
7638
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
7225
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
7639
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
7226
7640
  }
7227
7641
  case "not_multiple_of":
7228
7642
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -7241,12 +7655,12 @@
7241
7655
  };
7242
7656
  function it_default() {
7243
7657
  return {
7244
- localeError: error21()
7658
+ localeError: error23()
7245
7659
  };
7246
7660
  }
7247
7661
 
7248
7662
  // node_modules/zod/v4/locales/ja.js
7249
- var error22 = () => {
7663
+ var error24 = () => {
7250
7664
  const Sizable = {
7251
7665
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
7252
7666
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -7349,12 +7763,12 @@
7349
7763
  };
7350
7764
  function ja_default() {
7351
7765
  return {
7352
- localeError: error22()
7766
+ localeError: error24()
7353
7767
  };
7354
7768
  }
7355
7769
 
7356
7770
  // node_modules/zod/v4/locales/ka.js
7357
- var error23 = () => {
7771
+ var error25 = () => {
7358
7772
  const Sizable = {
7359
7773
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
7360
7774
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -7387,9 +7801,9 @@
7387
7801
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
7388
7802
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
7389
7803
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
7390
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7391
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7392
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7804
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7805
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7806
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
7393
7807
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
7394
7808
  jwt: "JWT",
7395
7809
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -7397,7 +7811,7 @@
7397
7811
  const TypeDictionary = {
7398
7812
  nan: "NaN",
7399
7813
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
7400
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7814
+ string: "\u10D5\u10D4\u10DA\u10D8",
7401
7815
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
7402
7816
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
7403
7817
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -7435,14 +7849,14 @@
7435
7849
  case "invalid_format": {
7436
7850
  const _issue = issue2;
7437
7851
  if (_issue.format === "starts_with") {
7438
- 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`;
7852
+ 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`;
7439
7853
  }
7440
7854
  if (_issue.format === "ends_with")
7441
- 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`;
7855
+ 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`;
7442
7856
  if (_issue.format === "includes")
7443
- 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`;
7857
+ 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`;
7444
7858
  if (_issue.format === "regex")
7445
- 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}`;
7859
+ 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}`;
7446
7860
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
7447
7861
  }
7448
7862
  case "not_multiple_of":
@@ -7462,12 +7876,12 @@
7462
7876
  };
7463
7877
  function ka_default() {
7464
7878
  return {
7465
- localeError: error23()
7879
+ localeError: error25()
7466
7880
  };
7467
7881
  }
7468
7882
 
7469
7883
  // node_modules/zod/v4/locales/km.js
7470
- var error24 = () => {
7884
+ var error26 = () => {
7471
7885
  const Sizable = {
7472
7886
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
7473
7887
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7573,7 +7987,7 @@
7573
7987
  };
7574
7988
  function km_default() {
7575
7989
  return {
7576
- localeError: error24()
7990
+ localeError: error26()
7577
7991
  };
7578
7992
  }
7579
7993
 
@@ -7583,7 +7997,7 @@
7583
7997
  }
7584
7998
 
7585
7999
  // node_modules/zod/v4/locales/ko.js
7586
- var error25 = () => {
8000
+ var error27 = () => {
7587
8001
  const Sizable = {
7588
8002
  string: { unit: "\uBB38\uC790", verb: "to have" },
7589
8003
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7690,7 +8104,7 @@
7690
8104
  };
7691
8105
  function ko_default() {
7692
8106
  return {
7693
- localeError: error25()
8107
+ localeError: error27()
7694
8108
  };
7695
8109
  }
7696
8110
 
@@ -7708,7 +8122,7 @@
7708
8122
  return "one";
7709
8123
  return "few";
7710
8124
  }
7711
- var error26 = () => {
8125
+ var error28 = () => {
7712
8126
  const Sizable = {
7713
8127
  string: {
7714
8128
  unit: {
@@ -7894,12 +8308,12 @@
7894
8308
  };
7895
8309
  function lt_default() {
7896
8310
  return {
7897
- localeError: error26()
8311
+ localeError: error28()
7898
8312
  };
7899
8313
  }
7900
8314
 
7901
8315
  // node_modules/zod/v4/locales/mk.js
7902
- var error27 = () => {
8316
+ var error29 = () => {
7903
8317
  const Sizable = {
7904
8318
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
7905
8319
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -8004,12 +8418,12 @@
8004
8418
  };
8005
8419
  function mk_default() {
8006
8420
  return {
8007
- localeError: error27()
8421
+ localeError: error29()
8008
8422
  };
8009
8423
  }
8010
8424
 
8011
8425
  // node_modules/zod/v4/locales/ms.js
8012
- var error28 = () => {
8426
+ var error30 = () => {
8013
8427
  const Sizable = {
8014
8428
  string: { unit: "aksara", verb: "mempunyai" },
8015
8429
  file: { unit: "bait", verb: "mempunyai" },
@@ -8112,12 +8526,12 @@
8112
8526
  };
8113
8527
  function ms_default() {
8114
8528
  return {
8115
- localeError: error28()
8529
+ localeError: error30()
8116
8530
  };
8117
8531
  }
8118
8532
 
8119
8533
  // node_modules/zod/v4/locales/nl.js
8120
- var error29 = () => {
8534
+ var error31 = () => {
8121
8535
  const Sizable = {
8122
8536
  string: { unit: "tekens", verb: "heeft" },
8123
8537
  file: { unit: "bytes", verb: "heeft" },
@@ -8223,12 +8637,12 @@
8223
8637
  };
8224
8638
  function nl_default() {
8225
8639
  return {
8226
- localeError: error29()
8640
+ localeError: error31()
8227
8641
  };
8228
8642
  }
8229
8643
 
8230
8644
  // node_modules/zod/v4/locales/no.js
8231
- var error30 = () => {
8645
+ var error32 = () => {
8232
8646
  const Sizable = {
8233
8647
  string: { unit: "tegn", verb: "\xE5 ha" },
8234
8648
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -8332,12 +8746,12 @@
8332
8746
  };
8333
8747
  function no_default() {
8334
8748
  return {
8335
- localeError: error30()
8749
+ localeError: error32()
8336
8750
  };
8337
8751
  }
8338
8752
 
8339
8753
  // node_modules/zod/v4/locales/ota.js
8340
- var error31 = () => {
8754
+ var error33 = () => {
8341
8755
  const Sizable = {
8342
8756
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
8343
8757
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -8442,12 +8856,12 @@
8442
8856
  };
8443
8857
  function ota_default() {
8444
8858
  return {
8445
- localeError: error31()
8859
+ localeError: error33()
8446
8860
  };
8447
8861
  }
8448
8862
 
8449
8863
  // node_modules/zod/v4/locales/ps.js
8450
- var error32 = () => {
8864
+ var error34 = () => {
8451
8865
  const Sizable = {
8452
8866
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
8453
8867
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -8557,12 +8971,12 @@
8557
8971
  };
8558
8972
  function ps_default() {
8559
8973
  return {
8560
- localeError: error32()
8974
+ localeError: error34()
8561
8975
  };
8562
8976
  }
8563
8977
 
8564
8978
  // node_modules/zod/v4/locales/pl.js
8565
- var error33 = () => {
8979
+ var error35 = () => {
8566
8980
  const Sizable = {
8567
8981
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
8568
8982
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8667,12 +9081,12 @@
8667
9081
  };
8668
9082
  function pl_default() {
8669
9083
  return {
8670
- localeError: error33()
9084
+ localeError: error35()
8671
9085
  };
8672
9086
  }
8673
9087
 
8674
9088
  // node_modules/zod/v4/locales/pt.js
8675
- var error34 = () => {
9089
+ var error36 = () => {
8676
9090
  const Sizable = {
8677
9091
  string: { unit: "caracteres", verb: "ter" },
8678
9092
  file: { unit: "bytes", verb: "ter" },
@@ -8776,7 +9190,127 @@
8776
9190
  };
8777
9191
  function pt_default() {
8778
9192
  return {
8779
- localeError: error34()
9193
+ localeError: error36()
9194
+ };
9195
+ }
9196
+
9197
+ // node_modules/zod/v4/locales/ro.js
9198
+ var error37 = () => {
9199
+ const Sizable = {
9200
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
9201
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
9202
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
9203
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
9204
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
9205
+ };
9206
+ function getSizing(origin) {
9207
+ return Sizable[origin] ?? null;
9208
+ }
9209
+ const FormatDictionary = {
9210
+ regex: "intrare",
9211
+ email: "adres\u0103 de email",
9212
+ url: "URL",
9213
+ emoji: "emoji",
9214
+ uuid: "UUID",
9215
+ uuidv4: "UUIDv4",
9216
+ uuidv6: "UUIDv6",
9217
+ nanoid: "nanoid",
9218
+ guid: "GUID",
9219
+ cuid: "cuid",
9220
+ cuid2: "cuid2",
9221
+ ulid: "ULID",
9222
+ xid: "XID",
9223
+ ksuid: "KSUID",
9224
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
9225
+ date: "dat\u0103 ISO",
9226
+ time: "or\u0103 ISO",
9227
+ duration: "durat\u0103 ISO",
9228
+ ipv4: "adres\u0103 IPv4",
9229
+ ipv6: "adres\u0103 IPv6",
9230
+ mac: "adres\u0103 MAC",
9231
+ cidrv4: "interval IPv4",
9232
+ cidrv6: "interval IPv6",
9233
+ base64: "\u0219ir codat base64",
9234
+ base64url: "\u0219ir codat base64url",
9235
+ json_string: "\u0219ir JSON",
9236
+ e164: "num\u0103r E.164",
9237
+ jwt: "JWT",
9238
+ template_literal: "intrare"
9239
+ };
9240
+ const TypeDictionary = {
9241
+ nan: "NaN",
9242
+ string: "\u0219ir",
9243
+ number: "num\u0103r",
9244
+ boolean: "boolean",
9245
+ function: "func\u021Bie",
9246
+ array: "matrice",
9247
+ object: "obiect",
9248
+ undefined: "nedefinit",
9249
+ symbol: "simbol",
9250
+ bigint: "num\u0103r mare",
9251
+ void: "void",
9252
+ never: "never",
9253
+ map: "hart\u0103",
9254
+ set: "set"
9255
+ };
9256
+ return (issue2) => {
9257
+ switch (issue2.code) {
9258
+ case "invalid_type": {
9259
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
9260
+ const receivedType = parsedType(issue2.input);
9261
+ const received = TypeDictionary[receivedType] ?? receivedType;
9262
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
9263
+ }
9264
+ case "invalid_value":
9265
+ if (issue2.values.length === 1)
9266
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
9267
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
9268
+ case "too_big": {
9269
+ const adj = issue2.inclusive ? "<=" : "<";
9270
+ const sizing = getSizing(issue2.origin);
9271
+ if (sizing)
9272
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
9273
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
9274
+ }
9275
+ case "too_small": {
9276
+ const adj = issue2.inclusive ? ">=" : ">";
9277
+ const sizing = getSizing(issue2.origin);
9278
+ if (sizing) {
9279
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
9280
+ }
9281
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
9282
+ }
9283
+ case "invalid_format": {
9284
+ const _issue = issue2;
9285
+ if (_issue.format === "starts_with") {
9286
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
9287
+ }
9288
+ if (_issue.format === "ends_with")
9289
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
9290
+ if (_issue.format === "includes")
9291
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
9292
+ if (_issue.format === "regex")
9293
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
9294
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
9295
+ }
9296
+ case "not_multiple_of":
9297
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
9298
+ case "unrecognized_keys":
9299
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
9300
+ case "invalid_key":
9301
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
9302
+ case "invalid_union":
9303
+ return "Intrare invalid\u0103";
9304
+ case "invalid_element":
9305
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
9306
+ default:
9307
+ return `Intrare invalid\u0103`;
9308
+ }
9309
+ };
9310
+ };
9311
+ function ro_default() {
9312
+ return {
9313
+ localeError: error37()
8780
9314
  };
8781
9315
  }
8782
9316
 
@@ -8796,7 +9330,7 @@
8796
9330
  }
8797
9331
  return many;
8798
9332
  }
8799
- var error35 = () => {
9333
+ var error38 = () => {
8800
9334
  const Sizable = {
8801
9335
  string: {
8802
9336
  unit: {
@@ -8933,12 +9467,12 @@
8933
9467
  };
8934
9468
  function ru_default() {
8935
9469
  return {
8936
- localeError: error35()
9470
+ localeError: error38()
8937
9471
  };
8938
9472
  }
8939
9473
 
8940
9474
  // node_modules/zod/v4/locales/sl.js
8941
- var error36 = () => {
9475
+ var error39 = () => {
8942
9476
  const Sizable = {
8943
9477
  string: { unit: "znakov", verb: "imeti" },
8944
9478
  file: { unit: "bajtov", verb: "imeti" },
@@ -9043,12 +9577,12 @@
9043
9577
  };
9044
9578
  function sl_default() {
9045
9579
  return {
9046
- localeError: error36()
9580
+ localeError: error39()
9047
9581
  };
9048
9582
  }
9049
9583
 
9050
9584
  // node_modules/zod/v4/locales/sv.js
9051
- var error37 = () => {
9585
+ var error40 = () => {
9052
9586
  const Sizable = {
9053
9587
  string: { unit: "tecken", verb: "att ha" },
9054
9588
  file: { unit: "bytes", verb: "att ha" },
@@ -9154,12 +9688,12 @@
9154
9688
  };
9155
9689
  function sv_default() {
9156
9690
  return {
9157
- localeError: error37()
9691
+ localeError: error40()
9158
9692
  };
9159
9693
  }
9160
9694
 
9161
9695
  // node_modules/zod/v4/locales/ta.js
9162
- var error38 = () => {
9696
+ var error41 = () => {
9163
9697
  const Sizable = {
9164
9698
  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" },
9165
9699
  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" },
@@ -9265,12 +9799,12 @@
9265
9799
  };
9266
9800
  function ta_default() {
9267
9801
  return {
9268
- localeError: error38()
9802
+ localeError: error41()
9269
9803
  };
9270
9804
  }
9271
9805
 
9272
9806
  // node_modules/zod/v4/locales/th.js
9273
- var error39 = () => {
9807
+ var error42 = () => {
9274
9808
  const Sizable = {
9275
9809
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
9276
9810
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -9376,12 +9910,12 @@
9376
9910
  };
9377
9911
  function th_default() {
9378
9912
  return {
9379
- localeError: error39()
9913
+ localeError: error42()
9380
9914
  };
9381
9915
  }
9382
9916
 
9383
9917
  // node_modules/zod/v4/locales/tr.js
9384
- var error40 = () => {
9918
+ var error43 = () => {
9385
9919
  const Sizable = {
9386
9920
  string: { unit: "karakter", verb: "olmal\u0131" },
9387
9921
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -9482,12 +10016,12 @@
9482
10016
  };
9483
10017
  function tr_default() {
9484
10018
  return {
9485
- localeError: error40()
10019
+ localeError: error43()
9486
10020
  };
9487
10021
  }
9488
10022
 
9489
10023
  // node_modules/zod/v4/locales/uk.js
9490
- var error41 = () => {
10024
+ var error44 = () => {
9491
10025
  const Sizable = {
9492
10026
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
9493
10027
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9591,7 +10125,7 @@
9591
10125
  };
9592
10126
  function uk_default() {
9593
10127
  return {
9594
- localeError: error41()
10128
+ localeError: error44()
9595
10129
  };
9596
10130
  }
9597
10131
 
@@ -9601,7 +10135,7 @@
9601
10135
  }
9602
10136
 
9603
10137
  // node_modules/zod/v4/locales/ur.js
9604
- var error42 = () => {
10138
+ var error45 = () => {
9605
10139
  const Sizable = {
9606
10140
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9607
10141
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9707,17 +10241,18 @@
9707
10241
  };
9708
10242
  function ur_default() {
9709
10243
  return {
9710
- localeError: error42()
10244
+ localeError: error45()
9711
10245
  };
9712
10246
  }
9713
10247
 
9714
10248
  // node_modules/zod/v4/locales/uz.js
9715
- var error43 = () => {
10249
+ var error46 = () => {
9716
10250
  const Sizable = {
9717
10251
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
9718
10252
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
9719
10253
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
9720
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
10254
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
10255
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
9721
10256
  };
9722
10257
  function getSizing(origin) {
9723
10258
  return Sizable[origin] ?? null;
@@ -9817,12 +10352,12 @@
9817
10352
  };
9818
10353
  function uz_default() {
9819
10354
  return {
9820
- localeError: error43()
10355
+ localeError: error46()
9821
10356
  };
9822
10357
  }
9823
10358
 
9824
10359
  // node_modules/zod/v4/locales/vi.js
9825
- var error44 = () => {
10360
+ var error47 = () => {
9826
10361
  const Sizable = {
9827
10362
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
9828
10363
  file: { unit: "byte", verb: "c\xF3" },
@@ -9926,12 +10461,12 @@
9926
10461
  };
9927
10462
  function vi_default() {
9928
10463
  return {
9929
- localeError: error44()
10464
+ localeError: error47()
9930
10465
  };
9931
10466
  }
9932
10467
 
9933
10468
  // node_modules/zod/v4/locales/zh-CN.js
9934
- var error45 = () => {
10469
+ var error48 = () => {
9935
10470
  const Sizable = {
9936
10471
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
9937
10472
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -10036,12 +10571,12 @@
10036
10571
  };
10037
10572
  function zh_CN_default() {
10038
10573
  return {
10039
- localeError: error45()
10574
+ localeError: error48()
10040
10575
  };
10041
10576
  }
10042
10577
 
10043
10578
  // node_modules/zod/v4/locales/zh-TW.js
10044
- var error46 = () => {
10579
+ var error49 = () => {
10045
10580
  const Sizable = {
10046
10581
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
10047
10582
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -10144,12 +10679,12 @@
10144
10679
  };
10145
10680
  function zh_TW_default() {
10146
10681
  return {
10147
- localeError: error46()
10682
+ localeError: error49()
10148
10683
  };
10149
10684
  }
10150
10685
 
10151
10686
  // node_modules/zod/v4/locales/yo.js
10152
- var error47 = () => {
10687
+ var error50 = () => {
10153
10688
  const Sizable = {
10154
10689
  string: { unit: "\xE0mi", verb: "n\xED" },
10155
10690
  file: { unit: "bytes", verb: "n\xED" },
@@ -10252,12 +10787,12 @@
10252
10787
  };
10253
10788
  function yo_default() {
10254
10789
  return {
10255
- localeError: error47()
10790
+ localeError: error50()
10256
10791
  };
10257
10792
  }
10258
10793
 
10259
10794
  // node_modules/zod/v4/core/registries.js
10260
- var _a;
10795
+ var _a2;
10261
10796
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
10262
10797
  var $input = /* @__PURE__ */ Symbol("ZodInput");
10263
10798
  var $ZodRegistry = class {
@@ -10303,7 +10838,7 @@
10303
10838
  function registry() {
10304
10839
  return new $ZodRegistry();
10305
10840
  }
10306
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10841
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
10307
10842
  var globalRegistry = globalThis.__zod_globalRegistry;
10308
10843
 
10309
10844
  // node_modules/zod/v4/core/api.js
@@ -11221,7 +11756,7 @@
11221
11756
  return schema;
11222
11757
  }
11223
11758
  // @__NO_SIDE_EFFECTS__
11224
- function _superRefine(fn) {
11759
+ function _superRefine(fn, params) {
11225
11760
  const ch = /* @__PURE__ */ _check((payload) => {
11226
11761
  payload.addIssue = (issue2) => {
11227
11762
  if (typeof issue2 === "string") {
@@ -11238,7 +11773,7 @@
11238
11773
  }
11239
11774
  };
11240
11775
  return fn(payload.value, payload);
11241
- });
11776
+ }, params);
11242
11777
  return ch;
11243
11778
  }
11244
11779
  // @__NO_SIDE_EFFECTS__
@@ -11368,7 +11903,7 @@
11368
11903
  };
11369
11904
  }
11370
11905
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
11371
- var _a2;
11906
+ var _a3;
11372
11907
  const def = schema._zod.def;
11373
11908
  const seen = ctx.seen.get(schema);
11374
11909
  if (seen) {
@@ -11415,8 +11950,8 @@
11415
11950
  delete result.schema.examples;
11416
11951
  delete result.schema.default;
11417
11952
  }
11418
- if (ctx.io === "input" && result.schema._prefault)
11419
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
11953
+ if (ctx.io === "input" && "_prefault" in result.schema)
11954
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
11420
11955
  delete result.schema._prefault;
11421
11956
  const _result = ctx.seen.get(schema);
11422
11957
  return _result.schema;
@@ -11597,10 +12132,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11597
12132
  result.$id = ctx.external.uri(id);
11598
12133
  }
11599
12134
  Object.assign(result, root.def ?? root.schema);
12135
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
12136
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
12137
+ delete result.id;
11600
12138
  const defs = ctx.external?.defs ?? {};
11601
12139
  for (const entry of ctx.seen.entries()) {
11602
12140
  const seen = entry[1];
11603
12141
  if (seen.def && seen.defId) {
12142
+ if (seen.def.id === seen.defId)
12143
+ delete seen.def.id;
11604
12144
  defs[seen.defId] = seen.def;
11605
12145
  }
11606
12146
  }
@@ -11656,6 +12196,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11656
12196
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
11657
12197
  }
11658
12198
  if (def.type === "pipe") {
12199
+ if (_schema._zod.traits.has("$ZodCodec"))
12200
+ return true;
11659
12201
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
11660
12202
  }
11661
12203
  if (def.type === "object") {
@@ -11745,39 +12287,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11745
12287
  json2.type = "integer";
11746
12288
  else
11747
12289
  json2.type = "number";
11748
- if (typeof exclusiveMinimum === "number") {
11749
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
12290
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
12291
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
12292
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
12293
+ if (exMin) {
12294
+ if (legacy) {
11750
12295
  json2.minimum = exclusiveMinimum;
11751
12296
  json2.exclusiveMinimum = true;
11752
12297
  } else {
11753
12298
  json2.exclusiveMinimum = exclusiveMinimum;
11754
12299
  }
11755
- }
11756
- if (typeof minimum === "number") {
12300
+ } else if (typeof minimum === "number") {
11757
12301
  json2.minimum = minimum;
11758
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
11759
- if (exclusiveMinimum >= minimum)
11760
- delete json2.minimum;
11761
- else
11762
- delete json2.exclusiveMinimum;
11763
- }
11764
12302
  }
11765
- if (typeof exclusiveMaximum === "number") {
11766
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
12303
+ if (exMax) {
12304
+ if (legacy) {
11767
12305
  json2.maximum = exclusiveMaximum;
11768
12306
  json2.exclusiveMaximum = true;
11769
12307
  } else {
11770
12308
  json2.exclusiveMaximum = exclusiveMaximum;
11771
12309
  }
11772
- }
11773
- if (typeof maximum === "number") {
12310
+ } else if (typeof maximum === "number") {
11774
12311
  json2.maximum = maximum;
11775
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
11776
- if (exclusiveMaximum <= maximum)
11777
- delete json2.maximum;
11778
- else
11779
- delete json2.exclusiveMaximum;
11780
- }
11781
12312
  }
11782
12313
  if (typeof multipleOf === "number")
11783
12314
  json2.multipleOf = multipleOf;
@@ -11949,7 +12480,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11949
12480
  if (typeof maximum === "number")
11950
12481
  json2.maxItems = maximum;
11951
12482
  json2.type = "array";
11952
- json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
12483
+ json2.items = process2(def.element, ctx, {
12484
+ ...params,
12485
+ path: [...params.path, "items"]
12486
+ });
11953
12487
  };
11954
12488
  var objectProcessor = (schema, ctx, _json, params) => {
11955
12489
  const json2 = _json;
@@ -12142,7 +12676,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12142
12676
  };
12143
12677
  var pipeProcessor = (schema, ctx, _json, params) => {
12144
12678
  const def = schema._zod.def;
12145
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
12679
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
12680
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
12146
12681
  process2(innerType, ctx, params);
12147
12682
  const seen = ctx.seen.get(schema);
12148
12683
  seen.ref = innerType;
@@ -12376,6 +12911,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12376
12911
  ZodOptional: () => ZodOptional,
12377
12912
  ZodPipe: () => ZodPipe,
12378
12913
  ZodPrefault: () => ZodPrefault,
12914
+ ZodPreprocess: () => ZodPreprocess,
12379
12915
  ZodPromise: () => ZodPromise,
12380
12916
  ZodReadonly: () => ZodReadonly,
12381
12917
  ZodRecord: () => ZodRecord,
@@ -12436,6 +12972,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12436
12972
  int32: () => int32,
12437
12973
  int64: () => int64,
12438
12974
  intersection: () => intersection,
12975
+ invertCodec: () => invertCodec,
12439
12976
  ipv4: () => ipv42,
12440
12977
  ipv6: () => ipv62,
12441
12978
  json: () => json,
@@ -12605,8 +13142,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12605
13142
  }
12606
13143
  });
12607
13144
  };
12608
- var ZodError = $constructor("ZodError", initializer2);
12609
- var ZodRealError = $constructor("ZodError", initializer2, {
13145
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
13146
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12610
13147
  Parent: Error
12611
13148
  });
12612
13149
 
@@ -12625,6 +13162,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12625
13162
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12626
13163
 
12627
13164
  // node_modules/zod/v4/classic/schemas.js
13165
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
13166
+ function _installLazyMethods(inst, group, methods) {
13167
+ const proto = Object.getPrototypeOf(inst);
13168
+ let installed = _installedGroups.get(proto);
13169
+ if (!installed) {
13170
+ installed = /* @__PURE__ */ new Set();
13171
+ _installedGroups.set(proto, installed);
13172
+ }
13173
+ if (installed.has(group))
13174
+ return;
13175
+ installed.add(group);
13176
+ for (const key in methods) {
13177
+ const fn = methods[key];
13178
+ Object.defineProperty(proto, key, {
13179
+ configurable: true,
13180
+ enumerable: false,
13181
+ get() {
13182
+ const bound = fn.bind(this);
13183
+ Object.defineProperty(this, key, {
13184
+ configurable: true,
13185
+ writable: true,
13186
+ enumerable: true,
13187
+ value: bound
13188
+ });
13189
+ return bound;
13190
+ },
13191
+ set(v) {
13192
+ Object.defineProperty(this, key, {
13193
+ configurable: true,
13194
+ writable: true,
13195
+ enumerable: true,
13196
+ value: v
13197
+ });
13198
+ }
13199
+ });
13200
+ }
13201
+ }
12628
13202
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12629
13203
  $ZodType.init(inst, def);
12630
13204
  Object.assign(inst["~standard"], {
@@ -12637,23 +13211,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12637
13211
  inst.def = def;
12638
13212
  inst.type = def.type;
12639
13213
  Object.defineProperty(inst, "_def", { value: def });
12640
- inst.check = (...checks) => {
12641
- return inst.clone(util_exports.mergeDefs(def, {
12642
- checks: [
12643
- ...def.checks ?? [],
12644
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12645
- ]
12646
- }), {
12647
- parent: true
12648
- });
12649
- };
12650
- inst.with = inst.check;
12651
- inst.clone = (def2, params) => clone(inst, def2, params);
12652
- inst.brand = () => inst;
12653
- inst.register = ((reg, meta3) => {
12654
- reg.add(inst, meta3);
12655
- return inst;
12656
- });
12657
13214
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
12658
13215
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
12659
13216
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -12667,45 +13224,108 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12667
13224
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
12668
13225
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
12669
13226
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
12670
- inst.refine = (check2, params) => inst.check(refine(check2, params));
12671
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
12672
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
12673
- inst.optional = () => optional(inst);
12674
- inst.exactOptional = () => exactOptional(inst);
12675
- inst.nullable = () => nullable(inst);
12676
- inst.nullish = () => optional(nullable(inst));
12677
- inst.nonoptional = (params) => nonoptional(inst, params);
12678
- inst.array = () => array(inst);
12679
- inst.or = (arg) => union([inst, arg]);
12680
- inst.and = (arg) => intersection(inst, arg);
12681
- inst.transform = (tx) => pipe(inst, transform(tx));
12682
- inst.default = (def2) => _default2(inst, def2);
12683
- inst.prefault = (def2) => prefault(inst, def2);
12684
- inst.catch = (params) => _catch2(inst, params);
12685
- inst.pipe = (target) => pipe(inst, target);
12686
- inst.readonly = () => readonly(inst);
12687
- inst.describe = (description) => {
12688
- const cl = inst.clone();
12689
- globalRegistry.add(cl, { description });
12690
- return cl;
12691
- };
13227
+ _installLazyMethods(inst, "ZodType", {
13228
+ check(...chks) {
13229
+ const def2 = this.def;
13230
+ return this.clone(util_exports.mergeDefs(def2, {
13231
+ checks: [
13232
+ ...def2.checks ?? [],
13233
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
13234
+ ]
13235
+ }), { parent: true });
13236
+ },
13237
+ with(...chks) {
13238
+ return this.check(...chks);
13239
+ },
13240
+ clone(def2, params) {
13241
+ return clone(this, def2, params);
13242
+ },
13243
+ brand() {
13244
+ return this;
13245
+ },
13246
+ register(reg, meta3) {
13247
+ reg.add(this, meta3);
13248
+ return this;
13249
+ },
13250
+ refine(check2, params) {
13251
+ return this.check(refine(check2, params));
13252
+ },
13253
+ superRefine(refinement, params) {
13254
+ return this.check(superRefine(refinement, params));
13255
+ },
13256
+ overwrite(fn) {
13257
+ return this.check(_overwrite(fn));
13258
+ },
13259
+ optional() {
13260
+ return optional(this);
13261
+ },
13262
+ exactOptional() {
13263
+ return exactOptional(this);
13264
+ },
13265
+ nullable() {
13266
+ return nullable(this);
13267
+ },
13268
+ nullish() {
13269
+ return optional(nullable(this));
13270
+ },
13271
+ nonoptional(params) {
13272
+ return nonoptional(this, params);
13273
+ },
13274
+ array() {
13275
+ return array(this);
13276
+ },
13277
+ or(arg) {
13278
+ return union([this, arg]);
13279
+ },
13280
+ and(arg) {
13281
+ return intersection(this, arg);
13282
+ },
13283
+ transform(tx) {
13284
+ return pipe(this, transform(tx));
13285
+ },
13286
+ default(d) {
13287
+ return _default2(this, d);
13288
+ },
13289
+ prefault(d) {
13290
+ return prefault(this, d);
13291
+ },
13292
+ catch(params) {
13293
+ return _catch2(this, params);
13294
+ },
13295
+ pipe(target) {
13296
+ return pipe(this, target);
13297
+ },
13298
+ readonly() {
13299
+ return readonly(this);
13300
+ },
13301
+ describe(description) {
13302
+ const cl = this.clone();
13303
+ globalRegistry.add(cl, { description });
13304
+ return cl;
13305
+ },
13306
+ meta(...args) {
13307
+ if (args.length === 0)
13308
+ return globalRegistry.get(this);
13309
+ const cl = this.clone();
13310
+ globalRegistry.add(cl, args[0]);
13311
+ return cl;
13312
+ },
13313
+ isOptional() {
13314
+ return this.safeParse(void 0).success;
13315
+ },
13316
+ isNullable() {
13317
+ return this.safeParse(null).success;
13318
+ },
13319
+ apply(fn) {
13320
+ return fn(this);
13321
+ }
13322
+ });
12692
13323
  Object.defineProperty(inst, "description", {
12693
13324
  get() {
12694
13325
  return globalRegistry.get(inst)?.description;
12695
13326
  },
12696
13327
  configurable: true
12697
13328
  });
12698
- inst.meta = (...args) => {
12699
- if (args.length === 0) {
12700
- return globalRegistry.get(inst);
12701
- }
12702
- const cl = inst.clone();
12703
- globalRegistry.add(cl, args[0]);
12704
- return cl;
12705
- };
12706
- inst.isOptional = () => inst.safeParse(void 0).success;
12707
- inst.isNullable = () => inst.safeParse(null).success;
12708
- inst.apply = (fn) => fn(inst);
12709
13329
  return inst;
12710
13330
  });
12711
13331
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -12716,21 +13336,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12716
13336
  inst.format = bag.format ?? null;
12717
13337
  inst.minLength = bag.minimum ?? null;
12718
13338
  inst.maxLength = bag.maximum ?? null;
12719
- inst.regex = (...args) => inst.check(_regex(...args));
12720
- inst.includes = (...args) => inst.check(_includes(...args));
12721
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
12722
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
12723
- inst.min = (...args) => inst.check(_minLength(...args));
12724
- inst.max = (...args) => inst.check(_maxLength(...args));
12725
- inst.length = (...args) => inst.check(_length(...args));
12726
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
12727
- inst.lowercase = (params) => inst.check(_lowercase(params));
12728
- inst.uppercase = (params) => inst.check(_uppercase(params));
12729
- inst.trim = () => inst.check(_trim());
12730
- inst.normalize = (...args) => inst.check(_normalize(...args));
12731
- inst.toLowerCase = () => inst.check(_toLowerCase());
12732
- inst.toUpperCase = () => inst.check(_toUpperCase());
12733
- inst.slugify = () => inst.check(_slugify());
13339
+ _installLazyMethods(inst, "_ZodString", {
13340
+ regex(...args) {
13341
+ return this.check(_regex(...args));
13342
+ },
13343
+ includes(...args) {
13344
+ return this.check(_includes(...args));
13345
+ },
13346
+ startsWith(...args) {
13347
+ return this.check(_startsWith(...args));
13348
+ },
13349
+ endsWith(...args) {
13350
+ return this.check(_endsWith(...args));
13351
+ },
13352
+ min(...args) {
13353
+ return this.check(_minLength(...args));
13354
+ },
13355
+ max(...args) {
13356
+ return this.check(_maxLength(...args));
13357
+ },
13358
+ length(...args) {
13359
+ return this.check(_length(...args));
13360
+ },
13361
+ nonempty(...args) {
13362
+ return this.check(_minLength(1, ...args));
13363
+ },
13364
+ lowercase(params) {
13365
+ return this.check(_lowercase(params));
13366
+ },
13367
+ uppercase(params) {
13368
+ return this.check(_uppercase(params));
13369
+ },
13370
+ trim() {
13371
+ return this.check(_trim());
13372
+ },
13373
+ normalize(...args) {
13374
+ return this.check(_normalize(...args));
13375
+ },
13376
+ toLowerCase() {
13377
+ return this.check(_toLowerCase());
13378
+ },
13379
+ toUpperCase() {
13380
+ return this.check(_toUpperCase());
13381
+ },
13382
+ slugify() {
13383
+ return this.check(_slugify());
13384
+ }
13385
+ });
12734
13386
  });
12735
13387
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
12736
13388
  $ZodString.init(inst, def);
@@ -12809,7 +13461,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12809
13461
  }
12810
13462
  function httpUrl(params) {
12811
13463
  return _url(ZodURL, {
12812
- protocol: /^https?$/,
13464
+ protocol: regexes_exports.httpProtocol,
12813
13465
  hostname: regexes_exports.domain,
12814
13466
  ...util_exports.normalizeParams(params)
12815
13467
  });
@@ -12951,21 +13603,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12951
13603
  $ZodNumber.init(inst, def);
12952
13604
  ZodType.init(inst, def);
12953
13605
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
12954
- inst.gt = (value, params) => inst.check(_gt(value, params));
12955
- inst.gte = (value, params) => inst.check(_gte(value, params));
12956
- inst.min = (value, params) => inst.check(_gte(value, params));
12957
- inst.lt = (value, params) => inst.check(_lt(value, params));
12958
- inst.lte = (value, params) => inst.check(_lte(value, params));
12959
- inst.max = (value, params) => inst.check(_lte(value, params));
12960
- inst.int = (params) => inst.check(int(params));
12961
- inst.safe = (params) => inst.check(int(params));
12962
- inst.positive = (params) => inst.check(_gt(0, params));
12963
- inst.nonnegative = (params) => inst.check(_gte(0, params));
12964
- inst.negative = (params) => inst.check(_lt(0, params));
12965
- inst.nonpositive = (params) => inst.check(_lte(0, params));
12966
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
12967
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
12968
- inst.finite = () => inst;
13606
+ _installLazyMethods(inst, "ZodNumber", {
13607
+ gt(value, params) {
13608
+ return this.check(_gt(value, params));
13609
+ },
13610
+ gte(value, params) {
13611
+ return this.check(_gte(value, params));
13612
+ },
13613
+ min(value, params) {
13614
+ return this.check(_gte(value, params));
13615
+ },
13616
+ lt(value, params) {
13617
+ return this.check(_lt(value, params));
13618
+ },
13619
+ lte(value, params) {
13620
+ return this.check(_lte(value, params));
13621
+ },
13622
+ max(value, params) {
13623
+ return this.check(_lte(value, params));
13624
+ },
13625
+ int(params) {
13626
+ return this.check(int(params));
13627
+ },
13628
+ safe(params) {
13629
+ return this.check(int(params));
13630
+ },
13631
+ positive(params) {
13632
+ return this.check(_gt(0, params));
13633
+ },
13634
+ nonnegative(params) {
13635
+ return this.check(_gte(0, params));
13636
+ },
13637
+ negative(params) {
13638
+ return this.check(_lt(0, params));
13639
+ },
13640
+ nonpositive(params) {
13641
+ return this.check(_lte(0, params));
13642
+ },
13643
+ multipleOf(value, params) {
13644
+ return this.check(_multipleOf(value, params));
13645
+ },
13646
+ step(value, params) {
13647
+ return this.check(_multipleOf(value, params));
13648
+ },
13649
+ finite() {
13650
+ return this;
13651
+ }
13652
+ });
12969
13653
  const bag = inst._zod.bag;
12970
13654
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
12971
13655
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -13112,11 +13796,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13112
13796
  ZodType.init(inst, def);
13113
13797
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
13114
13798
  inst.element = def.element;
13115
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
13116
- inst.nonempty = (params) => inst.check(_minLength(1, params));
13117
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
13118
- inst.length = (len, params) => inst.check(_length(len, params));
13119
- inst.unwrap = () => inst.element;
13799
+ _installLazyMethods(inst, "ZodArray", {
13800
+ min(n, params) {
13801
+ return this.check(_minLength(n, params));
13802
+ },
13803
+ nonempty(params) {
13804
+ return this.check(_minLength(1, params));
13805
+ },
13806
+ max(n, params) {
13807
+ return this.check(_maxLength(n, params));
13808
+ },
13809
+ length(n, params) {
13810
+ return this.check(_length(n, params));
13811
+ },
13812
+ unwrap() {
13813
+ return this.element;
13814
+ }
13815
+ });
13120
13816
  });
13121
13817
  function array(element, params) {
13122
13818
  return _array(ZodArray, element, params);
@@ -13132,23 +13828,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13132
13828
  util_exports.defineLazy(inst, "shape", () => {
13133
13829
  return def.shape;
13134
13830
  });
13135
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
13136
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
13137
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13138
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13139
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
13140
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
13141
- inst.extend = (incoming) => {
13142
- return util_exports.extend(inst, incoming);
13143
- };
13144
- inst.safeExtend = (incoming) => {
13145
- return util_exports.safeExtend(inst, incoming);
13146
- };
13147
- inst.merge = (other) => util_exports.merge(inst, other);
13148
- inst.pick = (mask) => util_exports.pick(inst, mask);
13149
- inst.omit = (mask) => util_exports.omit(inst, mask);
13150
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
13151
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
13831
+ _installLazyMethods(inst, "ZodObject", {
13832
+ keyof() {
13833
+ return _enum2(Object.keys(this._zod.def.shape));
13834
+ },
13835
+ catchall(catchall) {
13836
+ return this.clone({ ...this._zod.def, catchall });
13837
+ },
13838
+ passthrough() {
13839
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13840
+ },
13841
+ loose() {
13842
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13843
+ },
13844
+ strict() {
13845
+ return this.clone({ ...this._zod.def, catchall: never() });
13846
+ },
13847
+ strip() {
13848
+ return this.clone({ ...this._zod.def, catchall: void 0 });
13849
+ },
13850
+ extend(incoming) {
13851
+ return util_exports.extend(this, incoming);
13852
+ },
13853
+ safeExtend(incoming) {
13854
+ return util_exports.safeExtend(this, incoming);
13855
+ },
13856
+ merge(other) {
13857
+ return util_exports.merge(this, other);
13858
+ },
13859
+ pick(mask) {
13860
+ return util_exports.pick(this, mask);
13861
+ },
13862
+ omit(mask) {
13863
+ return util_exports.omit(this, mask);
13864
+ },
13865
+ partial(...args) {
13866
+ return util_exports.partial(ZodOptional, this, args[0]);
13867
+ },
13868
+ required(...args) {
13869
+ return util_exports.required(ZodNonOptional, this, args[0]);
13870
+ }
13871
+ });
13152
13872
  });
13153
13873
  function object(shape, params) {
13154
13874
  const def = {
@@ -13253,6 +13973,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13253
13973
  inst.valueType = def.valueType;
13254
13974
  });
13255
13975
  function record(keyType, valueType, params) {
13976
+ if (!valueType || !valueType._zod) {
13977
+ return new ZodRecord({
13978
+ type: "record",
13979
+ keyType: string2(),
13980
+ valueType: keyType,
13981
+ ...util_exports.normalizeParams(valueType)
13982
+ });
13983
+ }
13256
13984
  return new ZodRecord({
13257
13985
  type: "record",
13258
13986
  keyType,
@@ -13424,10 +14152,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13424
14152
  if (output instanceof Promise) {
13425
14153
  return output.then((output2) => {
13426
14154
  payload.value = output2;
14155
+ payload.fallback = true;
13427
14156
  return payload;
13428
14157
  });
13429
14158
  }
13430
14159
  payload.value = output;
14160
+ payload.fallback = true;
13431
14161
  return payload;
13432
14162
  };
13433
14163
  });
@@ -13582,6 +14312,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13582
14312
  reverseTransform: params.encode
13583
14313
  });
13584
14314
  }
14315
+ function invertCodec(codec2) {
14316
+ const def = codec2._zod.def;
14317
+ return new ZodCodec({
14318
+ type: "pipe",
14319
+ in: def.out,
14320
+ out: def.in,
14321
+ transform: def.reverseTransform,
14322
+ reverseTransform: def.transform
14323
+ });
14324
+ }
14325
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
14326
+ ZodPipe.init(inst, def);
14327
+ $ZodPreprocess.init(inst, def);
14328
+ });
13585
14329
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13586
14330
  $ZodReadonly.init(inst, def);
13587
14331
  ZodType.init(inst, def);
@@ -13661,8 +14405,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13661
14405
  function refine(fn, _params = {}) {
13662
14406
  return _refine(ZodCustom, fn, _params);
13663
14407
  }
13664
- function superRefine(fn) {
13665
- return _superRefine(fn);
14408
+ function superRefine(fn, params) {
14409
+ return _superRefine(fn, params);
13666
14410
  }
13667
14411
  var describe2 = describe;
13668
14412
  var meta2 = meta;
@@ -13700,7 +14444,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13700
14444
  return jsonSchema;
13701
14445
  }
13702
14446
  function preprocess(fn, schema) {
13703
- return pipe(transform(fn), schema);
14447
+ return new ZodPreprocess({
14448
+ type: "pipe",
14449
+ in: transform(fn),
14450
+ out: schema
14451
+ });
13704
14452
  }
13705
14453
 
13706
14454
  // node_modules/zod/v4/classic/compat.js
@@ -14121,12 +14869,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14121
14869
  default:
14122
14870
  throw new Error(`Unsupported type: ${type}`);
14123
14871
  }
14124
- if (schema.description) {
14125
- zodSchema = zodSchema.describe(schema.description);
14126
- }
14127
- if (schema.default !== void 0) {
14128
- zodSchema = zodSchema.default(schema.default);
14129
- }
14130
14872
  return zodSchema;
14131
14873
  }
14132
14874
  function convertSchema(schema, ctx) {
@@ -14163,6 +14905,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14163
14905
  if (schema.readOnly === true) {
14164
14906
  baseSchema = z.readonly(baseSchema);
14165
14907
  }
14908
+ if (schema.default !== void 0) {
14909
+ baseSchema = baseSchema.default(schema.default);
14910
+ }
14166
14911
  const extraMeta = {};
14167
14912
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
14168
14913
  for (const key of coreMetadataKeys) {
@@ -14184,23 +14929,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14184
14929
  if (Object.keys(extraMeta).length > 0) {
14185
14930
  ctx.registry.add(baseSchema, extraMeta);
14186
14931
  }
14932
+ if (schema.description) {
14933
+ baseSchema = baseSchema.describe(schema.description);
14934
+ }
14187
14935
  return baseSchema;
14188
14936
  }
14189
14937
  function fromJSONSchema(schema, params) {
14190
14938
  if (typeof schema === "boolean") {
14191
14939
  return schema ? z.any() : z.never();
14192
14940
  }
14193
- const version2 = detectVersion(schema, params?.defaultTarget);
14194
- const defs = schema.$defs || schema.definitions || {};
14941
+ let normalized;
14942
+ try {
14943
+ normalized = JSON.parse(JSON.stringify(schema));
14944
+ } catch {
14945
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
14946
+ }
14947
+ const version2 = detectVersion(normalized, params?.defaultTarget);
14948
+ const defs = normalized.$defs || normalized.definitions || {};
14195
14949
  const ctx = {
14196
14950
  version: version2,
14197
14951
  defs,
14198
14952
  refs: /* @__PURE__ */ new Map(),
14199
14953
  processing: /* @__PURE__ */ new Set(),
14200
- rootSchema: schema,
14954
+ rootSchema: normalized,
14201
14955
  registry: params?.registry ?? globalRegistry
14202
14956
  };
14203
- return convertSchema(schema, ctx);
14957
+ return convertSchema(normalized, ctx);
14204
14958
  }
14205
14959
 
14206
14960
  // node_modules/zod/v4/classic/coerce.js
@@ -14702,9 +15456,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14702
15456
  score: external_exports.number().describe("Net score (upvotes minus downvotes)"),
14703
15457
  upvote_ratio: external_exports.number().describe("Ratio of upvotes to total votes (0.0 to 1.0)"),
14704
15458
  num_comments: external_exports.number().describe("Number of comments"),
14705
- url: external_exports.string().describe("URL the post links to (or the post URL for self posts)"),
15459
+ url: external_exports.string().nullable().describe("URL the post links to (or the post URL for self posts) \u2014 null when include_body is false"),
14706
15460
  permalink: external_exports.string().describe("Permalink path to the post on Reddit"),
14707
- selftext: external_exports.string().describe("Self post body text (empty for link posts)"),
15461
+ selftext: external_exports.string().nullable().describe("Self post body text (empty for link posts) \u2014 null when include_body is false"),
14708
15462
  is_self: external_exports.boolean().describe("Whether this is a self/text post"),
14709
15463
  created_utc: external_exports.number().describe("Post creation time as Unix timestamp"),
14710
15464
  link_flair_text: external_exports.string().nullable().describe("Link flair text if set")
@@ -14721,7 +15475,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14721
15475
  sort: external_exports.enum(["hot", "new", "top", "rising", "controversial"]).optional().describe('Sort order (default "hot")'),
14722
15476
  t: external_exports.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe('Time period for "top" and "controversial" sort (default "day")'),
14723
15477
  limit: external_exports.number().int().min(1).max(100).optional().describe("Number of posts to return (default 25, max 100)"),
14724
- after: external_exports.string().optional().describe('Pagination cursor \u2014 fullname of the last item (e.g., "t3_abc123")')
15478
+ after: external_exports.string().optional().describe('Pagination cursor \u2014 fullname of the last item (e.g., "t3_abc123")'),
15479
+ include_body: external_exports.boolean().optional().describe(
15480
+ "Whether to include post body text (selftext) and external URL. Defaults to false \u2014 titles and metadata only. Set true when you need to read post contents (doubles-to-triples the response size)."
15481
+ )
14725
15482
  }),
14726
15483
  output: external_exports.object({
14727
15484
  posts: external_exports.array(postSchema).describe("Array of posts"),
@@ -14731,6 +15488,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14731
15488
  const sub = params.subreddit ? `/r/${params.subreddit}` : "";
14732
15489
  const sort = params.sort ?? "hot";
14733
15490
  const path = `${sub}/${sort}.json`;
15491
+ const includeBody = params.include_body ?? false;
14734
15492
  const queryParams = {
14735
15493
  limit: String(params.limit ?? 25)
14736
15494
  };
@@ -14751,9 +15509,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14751
15509
  score: child.data.score,
14752
15510
  upvote_ratio: child.data.upvote_ratio,
14753
15511
  num_comments: child.data.num_comments,
14754
- url: child.data.url,
15512
+ url: includeBody ? child.data.url : null,
14755
15513
  permalink: child.data.permalink,
14756
- selftext: child.data.selftext ?? "",
15514
+ selftext: includeBody ? child.data.selftext ?? "" : null,
14757
15515
  is_self: child.data.is_self,
14758
15516
  created_utc: child.data.created_utc,
14759
15517
  link_flair_text: child.data.link_flair_text ?? null
@@ -14817,8 +15575,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14817
15575
  created_utc: external_exports.number().describe("Creation timestamp"),
14818
15576
  permalink: external_exports.string().describe("Reddit permalink"),
14819
15577
  title: external_exports.string().nullable().describe("Post title (null for comments)"),
14820
- selftext: external_exports.string().nullable().describe("Post body (null for comments)"),
14821
- body: external_exports.string().nullable().describe("Comment body (null for posts)"),
15578
+ selftext: external_exports.string().nullable().describe("Post body (null for comments, null when include_body is false)"),
15579
+ body: external_exports.string().nullable().describe("Comment body (null for posts, null when include_body is false)"),
14822
15580
  link_title: external_exports.string().nullable().describe("Parent post title (for comments)"),
14823
15581
  link_id: external_exports.string().nullable().describe("Parent post fullname, e.g. t3_abc123 (for comments)"),
14824
15582
  parent_id: external_exports.string().nullable().describe("Parent comment/post fullname (for comments)"),
@@ -14837,13 +15595,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14837
15595
  sort: external_exports.enum(["hot", "new", "top", "controversial"]).optional().describe('Sort order (default "new")'),
14838
15596
  t: external_exports.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe('Time period for "top" and "controversial" sort'),
14839
15597
  limit: external_exports.number().int().min(1).max(100).optional().describe("Number of results (default 25, max 100)"),
14840
- after: external_exports.string().optional().describe("Pagination cursor for the next page")
15598
+ after: external_exports.string().optional().describe("Pagination cursor for the next page"),
15599
+ include_body: external_exports.boolean().optional().describe(
15600
+ "Whether to include post/comment body text (selftext/body). Defaults to false \u2014 titles, link_ids, and metadata only. Set true when you need to read item contents."
15601
+ )
14841
15602
  }),
14842
15603
  output: external_exports.object({
14843
15604
  items: external_exports.array(contentItemSchema).describe("User content items"),
14844
15605
  after: external_exports.string().nullable().describe("Pagination cursor for next page")
14845
15606
  }),
14846
15607
  handle: async (params) => {
15608
+ const includeBody = params.include_body ?? false;
14847
15609
  const queryParams = {
14848
15610
  limit: String(params.limit ?? 25)
14849
15611
  };
@@ -14865,8 +15627,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14865
15627
  created_utc: child.data.created_utc,
14866
15628
  permalink: child.data.permalink,
14867
15629
  title: child.data.title ?? null,
14868
- selftext: child.data.selftext ?? null,
14869
- body: child.data.body ?? null,
15630
+ selftext: includeBody ? child.data.selftext ?? null : null,
15631
+ body: includeBody ? child.data.body ?? null : null,
14870
15632
  link_title: child.data.link_title ?? null,
14871
15633
  link_id: child.data.link_id ?? null,
14872
15634
  parent_id: child.data.parent_id ?? null,
@@ -14988,7 +15750,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14988
15750
  sort: external_exports.enum(["relevance", "hot", "top", "new", "comments"]).optional().describe('Sort order (default "relevance")'),
14989
15751
  t: external_exports.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe('Time period filter (default "all")'),
14990
15752
  limit: external_exports.number().int().min(1).max(100).optional().describe("Number of results (default 25, max 100)"),
14991
- after: external_exports.string().optional().describe("Pagination cursor for the next page")
15753
+ after: external_exports.string().optional().describe("Pagination cursor for the next page"),
15754
+ include_body: external_exports.boolean().optional().describe(
15755
+ "Whether to include post body text (selftext) and external URL. Defaults to false \u2014 titles and metadata only. Set true when you need to read post contents (doubles-to-triples the response size)."
15756
+ )
14992
15757
  }),
14993
15758
  output: external_exports.object({
14994
15759
  posts: external_exports.array(
@@ -15000,9 +15765,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15000
15765
  subreddit: external_exports.string().describe("Subreddit name"),
15001
15766
  score: external_exports.number().describe("Post score"),
15002
15767
  num_comments: external_exports.number().describe("Number of comments"),
15003
- url: external_exports.string().describe("Post URL"),
15768
+ url: external_exports.string().nullable().describe("Post URL \u2014 null when include_body is false"),
15004
15769
  permalink: external_exports.string().describe("Reddit permalink"),
15005
- selftext: external_exports.string().describe("Self post body"),
15770
+ selftext: external_exports.string().nullable().describe("Self post body \u2014 null when include_body is false"),
15006
15771
  is_self: external_exports.boolean().describe("Whether this is a text post"),
15007
15772
  created_utc: external_exports.number().describe("Creation timestamp")
15008
15773
  })
@@ -15011,6 +15776,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15011
15776
  }),
15012
15777
  handle: async (params) => {
15013
15778
  const base = params.subreddit ? `/r/${params.subreddit}` : "";
15779
+ const includeBody = params.include_body ?? false;
15014
15780
  const queryParams = {
15015
15781
  q: params.query,
15016
15782
  limit: String(params.limit ?? 25),
@@ -15029,9 +15795,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15029
15795
  subreddit: child.data.subreddit,
15030
15796
  score: child.data.score,
15031
15797
  num_comments: child.data.num_comments,
15032
- url: child.data.url,
15798
+ url: includeBody ? child.data.url : null,
15033
15799
  permalink: child.data.permalink,
15034
- selftext: child.data.selftext ?? "",
15800
+ selftext: includeBody ? child.data.selftext ?? "" : null,
15035
15801
  is_self: child.data.is_self,
15036
15802
  created_utc: child.data.created_utc
15037
15803
  })),
@@ -15300,10 +16066,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15300
16066
  if (isAuthenticated()) return true;
15301
16067
  return waitForAuth();
15302
16068
  }
16069
+ teardown() {
16070
+ clearSessionCache();
16071
+ }
15303
16072
  };
15304
16073
  var src_default = new RedditPlugin();
15305
16074
 
15306
- // dist/_adapter_entry_63873cb8-67b7-4aa0-9d9f-d3ea8fdd5270.ts
16075
+ // dist/_adapter_entry_bd91b398-9b85-44bc-b113-aa5aa00a4c04.ts
15307
16076
  if (!globalThis.__openTabs) {
15308
16077
  globalThis.__openTabs = {};
15309
16078
  } else {
@@ -15391,6 +16160,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15391
16160
  const origHandle = tool.handle;
15392
16161
  tool.handle = async function(...handleArgs) {
15393
16162
  const startTime = performance.now();
16163
+ const runtime = globalThis.__openTabs;
16164
+ runtime._pluginName = "reddit";
15394
16165
  if (hasLifecycleHooks && typeof src_default.onToolInvocationStart === "function") {
15395
16166
  try {
15396
16167
  src_default.onToolInvocationStart(tool.name);
@@ -15519,5 +16290,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15519
16290
  };
15520
16291
  delete src_default.onDeactivate;
15521
16292
  }
15522
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="26334ce06696f5e6aa3d7ae6c49c2ccf0d6fedb80216ec13060c2e1eef16ef9a";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
16293
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="e0f60963dce60e8a8a5cd9f67ad7423a81c52f42963e6acbf093cfd9468eacd7";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15523
16294
  //# sourceMappingURL=adapter.iife.js.map