@agentcash/discovery 1.6.5 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -32,23 +32,22 @@ var index_exports = {};
32
32
  __export(index_exports, {
33
33
  AUDIT_CODES: () => AUDIT_CODES,
34
34
  GuidanceMode: () => GuidanceMode,
35
+ MppProtocolSchema: () => MppProtocolSchema,
35
36
  PaymentInfoSchema: () => PaymentInfoSchema,
36
37
  PaymentProtocolSchema: () => PaymentProtocolSchema,
37
38
  PriceSchema: () => PriceSchema,
38
39
  VALIDATION_CODES: () => VALIDATION_CODES,
40
+ X402ProtocolSchema: () => X402ProtocolSchema,
39
41
  attachProbePayload: () => attachProbePayload,
40
42
  checkEndpointSchema: () => checkEndpointSchema,
41
43
  checkFavicon: () => checkFavicon,
42
44
  checkL2ForOpenAPI: () => checkL2ForOpenAPI,
43
- checkL2ForWellknown: () => checkL2ForWellknown,
44
45
  checkL4ForOpenAPI: () => checkL4ForOpenAPI,
45
- checkL4ForWellknown: () => checkL4ForWellknown,
46
46
  discoverOriginSchema: () => discoverOriginSchema,
47
47
  evaluateMetadataCompleteness: () => evaluateMetadataCompleteness,
48
48
  getL3: () => getL3,
49
49
  getL3ForOpenAPI: () => getL3ForOpenAPI,
50
50
  getL3ForProbe: () => getL3ForProbe,
51
- getMppWellKnown: () => getMppWellKnown,
52
51
  getOpenAPI: () => getOpenAPI,
53
52
  getProbe: () => getProbe,
54
53
  getWarningsFor402Body: () => getWarningsFor402Body,
@@ -56,12 +55,11 @@ __export(index_exports, {
56
55
  getWarningsForL2: () => getWarningsForL2,
57
56
  getWarningsForL3: () => getWarningsForL3,
58
57
  getWarningsForL4: () => getWarningsForL4,
58
+ getWarningsForLegacyWellKnown: () => getWarningsForLegacyWellKnown,
59
59
  getWarningsForMppHeader: () => getWarningsForMppHeader,
60
60
  getWarningsForOpenAPI: () => getWarningsForOpenAPI,
61
- getWarningsForWellKnown: () => getWarningsForWellKnown,
62
- getWellKnown: () => getWellKnown,
63
- getX402WellKnown: () => getX402WellKnown,
64
61
  isOpenApiParseFailure: () => isOpenApiParseFailure,
62
+ probeLegacyWellKnown: () => probeLegacyWellKnown,
65
63
  validatePaymentRequiredDetailed: () => validatePaymentRequiredDetailed
66
64
  });
67
65
  module.exports = __toCommonJS(index_exports);
@@ -69,7 +67,7 @@ module.exports = __toCommonJS(index_exports);
69
67
  // src/core/source/openapi/index.ts
70
68
  var import_neverthrow2 = require("neverthrow");
71
69
 
72
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
70
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
73
71
  var external_exports = {};
74
72
  __export(external_exports, {
75
73
  $brand: () => $brand,
@@ -131,6 +129,7 @@ __export(external_exports, {
131
129
  ZodOptional: () => ZodOptional,
132
130
  ZodPipe: () => ZodPipe,
133
131
  ZodPrefault: () => ZodPrefault,
132
+ ZodPreprocess: () => ZodPreprocess,
134
133
  ZodPromise: () => ZodPromise,
135
134
  ZodReadonly: () => ZodReadonly,
136
135
  ZodRealError: () => ZodRealError,
@@ -209,6 +208,7 @@ __export(external_exports, {
209
208
  int32: () => int32,
210
209
  int64: () => int64,
211
210
  intersection: () => intersection,
211
+ invertCodec: () => invertCodec,
212
212
  ipv4: () => ipv42,
213
213
  ipv6: () => ipv62,
214
214
  iso: () => iso_exports,
@@ -310,7 +310,7 @@ __export(external_exports, {
310
310
  xor: () => xor
311
311
  });
312
312
 
313
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
313
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.js
314
314
  var core_exports2 = {};
315
315
  __export(core_exports2, {
316
316
  $ZodAny: () => $ZodAny,
@@ -390,6 +390,7 @@ __export(core_exports2, {
390
390
  $ZodOptional: () => $ZodOptional,
391
391
  $ZodPipe: () => $ZodPipe,
392
392
  $ZodPrefault: () => $ZodPrefault,
393
+ $ZodPreprocess: () => $ZodPreprocess,
393
394
  $ZodPromise: () => $ZodPromise,
394
395
  $ZodReadonly: () => $ZodReadonly,
395
396
  $ZodRealError: () => $ZodRealError,
@@ -588,8 +589,9 @@ __export(core_exports2, {
588
589
  version: () => version
589
590
  });
590
591
 
591
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
592
- var NEVER = Object.freeze({
592
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
593
+ var _a;
594
+ var NEVER = /* @__PURE__ */ Object.freeze({
593
595
  status: "aborted"
594
596
  });
595
597
  // @__NO_SIDE_EFFECTS__
@@ -624,10 +626,10 @@ function $constructor(name, initializer3, params) {
624
626
  }
625
627
  Object.defineProperty(Definition, "name", { value: name });
626
628
  function _(def) {
627
- var _a2;
629
+ var _a3;
628
630
  const inst = params?.Parent ? new Definition() : this;
629
631
  init(inst, def);
630
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
632
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
631
633
  for (const fn of inst._zod.deferred) {
632
634
  fn();
633
635
  }
@@ -656,14 +658,15 @@ var $ZodEncodeError = class extends Error {
656
658
  this.name = "ZodEncodeError";
657
659
  }
658
660
  };
659
- var globalConfig = {};
661
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
662
+ var globalConfig = globalThis.__zod_globalConfig;
660
663
  function config(newConfig) {
661
664
  if (newConfig)
662
665
  Object.assign(globalConfig, newConfig);
663
666
  return globalConfig;
664
667
  }
665
668
 
666
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
669
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
667
670
  var util_exports = {};
668
671
  __export(util_exports, {
669
672
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -689,6 +692,7 @@ __export(util_exports, {
689
692
  defineLazy: () => defineLazy,
690
693
  esc: () => esc,
691
694
  escapeRegex: () => escapeRegex,
695
+ explicitlyAborted: () => explicitlyAborted,
692
696
  extend: () => extend,
693
697
  finalizeIssue: () => finalizeIssue,
694
698
  floatSafeRemainder: () => floatSafeRemainder,
@@ -777,19 +781,12 @@ function cleanRegex(source) {
777
781
  return source.slice(start, end);
778
782
  }
779
783
  function floatSafeRemainder(val, step) {
780
- const valDecCount = (val.toString().split(".")[1] || "").length;
781
- const stepString = step.toString();
782
- let stepDecCount = (stepString.split(".")[1] || "").length;
783
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
784
- const match = stepString.match(/\d?e-(\d?)/);
785
- if (match?.[1]) {
786
- stepDecCount = Number.parseInt(match[1]);
787
- }
788
- }
789
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
790
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
791
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
792
- return valInt % stepInt / 10 ** decCount;
784
+ const ratio = val / step;
785
+ const roundedRatio = Math.round(ratio);
786
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
787
+ if (Math.abs(ratio - roundedRatio) < tolerance)
788
+ return 0;
789
+ return ratio - roundedRatio;
793
790
  }
794
791
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
795
792
  function defineLazy(object2, key, getter) {
@@ -871,7 +868,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
871
868
  function isObject(data) {
872
869
  return typeof data === "object" && data !== null && !Array.isArray(data);
873
870
  }
874
- var allowsEval = cached(() => {
871
+ var allowsEval = /* @__PURE__ */ cached(() => {
872
+ if (globalConfig.jitless) {
873
+ return false;
874
+ }
875
875
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
876
876
  return false;
877
877
  }
@@ -904,6 +904,10 @@ function shallowClone(o) {
904
904
  return { ...o };
905
905
  if (Array.isArray(o))
906
906
  return [...o];
907
+ if (o instanceof Map)
908
+ return new Map(o);
909
+ if (o instanceof Set)
910
+ return new Set(o);
907
911
  return o;
908
912
  }
909
913
  function numKeys(data) {
@@ -960,7 +964,14 @@ var getParsedType = (data) => {
960
964
  }
961
965
  };
962
966
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
963
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
967
+ var primitiveTypes = /* @__PURE__ */ new Set([
968
+ "string",
969
+ "number",
970
+ "bigint",
971
+ "boolean",
972
+ "symbol",
973
+ "undefined"
974
+ ]);
964
975
  function escapeRegex(str) {
965
976
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
966
977
  }
@@ -1129,6 +1140,9 @@ function safeExtend(schema, shape) {
1129
1140
  return clone(schema, def);
1130
1141
  }
1131
1142
  function merge(a, b) {
1143
+ if (a._zod.def.checks?.length) {
1144
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
1145
+ }
1132
1146
  const def = mergeDefs(a._zod.def, {
1133
1147
  get shape() {
1134
1148
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -1138,8 +1152,7 @@ function merge(a, b) {
1138
1152
  get catchall() {
1139
1153
  return b._zod.def.catchall;
1140
1154
  },
1141
- checks: []
1142
- // delete existing checks
1155
+ checks: b._zod.def.checks ?? []
1143
1156
  });
1144
1157
  return clone(a, def);
1145
1158
  }
@@ -1222,10 +1235,20 @@ function aborted(x, startIndex = 0) {
1222
1235
  }
1223
1236
  return false;
1224
1237
  }
1238
+ function explicitlyAborted(x, startIndex = 0) {
1239
+ if (x.aborted === true)
1240
+ return true;
1241
+ for (let i = startIndex; i < x.issues.length; i++) {
1242
+ if (x.issues[i]?.continue === false) {
1243
+ return true;
1244
+ }
1245
+ }
1246
+ return false;
1247
+ }
1225
1248
  function prefixIssues(path, issues) {
1226
1249
  return issues.map((iss) => {
1227
- var _a2;
1228
- (_a2 = iss).path ?? (_a2.path = []);
1250
+ var _a3;
1251
+ (_a3 = iss).path ?? (_a3.path = []);
1229
1252
  iss.path.unshift(path);
1230
1253
  return iss;
1231
1254
  });
@@ -1234,17 +1257,14 @@ function unwrapMessage(message) {
1234
1257
  return typeof message === "string" ? message : message?.message;
1235
1258
  }
1236
1259
  function finalizeIssue(iss, ctx, config2) {
1237
- const full = { ...iss, path: iss.path ?? [] };
1238
- if (!iss.message) {
1239
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1240
- full.message = message;
1260
+ 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";
1261
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
1262
+ rest.path ?? (rest.path = []);
1263
+ rest.message = message;
1264
+ if (ctx?.reportInput) {
1265
+ rest.input = _input;
1241
1266
  }
1242
- delete full.inst;
1243
- delete full.continue;
1244
- if (!ctx?.reportInput) {
1245
- delete full.input;
1246
- }
1247
- return full;
1267
+ return rest;
1248
1268
  }
1249
1269
  function getSizableOrigin(input) {
1250
1270
  if (input instanceof Set)
@@ -1342,7 +1362,7 @@ var Class = class {
1342
1362
  }
1343
1363
  };
1344
1364
 
1345
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
1365
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
1346
1366
  var initializer = (inst, def) => {
1347
1367
  inst.name = "$ZodError";
1348
1368
  Object.defineProperty(inst, "_zod", {
@@ -1361,10 +1381,10 @@ var initializer = (inst, def) => {
1361
1381
  };
1362
1382
  var $ZodError = $constructor("$ZodError", initializer);
1363
1383
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
1364
- function flattenError(error48, mapper = (issue2) => issue2.message) {
1384
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
1365
1385
  const fieldErrors = {};
1366
1386
  const formErrors = [];
1367
- for (const sub of error48.issues) {
1387
+ for (const sub of error51.issues) {
1368
1388
  if (sub.path.length > 0) {
1369
1389
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1370
1390
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -1374,50 +1394,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
1374
1394
  }
1375
1395
  return { formErrors, fieldErrors };
1376
1396
  }
1377
- function formatError(error48, mapper = (issue2) => issue2.message) {
1397
+ function formatError(error51, mapper = (issue2) => issue2.message) {
1378
1398
  const fieldErrors = { _errors: [] };
1379
- const processError = (error49) => {
1380
- for (const issue2 of error49.issues) {
1399
+ const processError = (error52, path = []) => {
1400
+ for (const issue2 of error52.issues) {
1381
1401
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1382
- issue2.errors.map((issues) => processError({ issues }));
1402
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
1383
1403
  } else if (issue2.code === "invalid_key") {
1384
- processError({ issues: issue2.issues });
1404
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1385
1405
  } else if (issue2.code === "invalid_element") {
1386
- processError({ issues: issue2.issues });
1387
- } else if (issue2.path.length === 0) {
1388
- fieldErrors._errors.push(mapper(issue2));
1406
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1389
1407
  } else {
1390
- let curr = fieldErrors;
1391
- let i = 0;
1392
- while (i < issue2.path.length) {
1393
- const el = issue2.path[i];
1394
- const terminal = i === issue2.path.length - 1;
1395
- if (!terminal) {
1396
- curr[el] = curr[el] || { _errors: [] };
1397
- } else {
1398
- curr[el] = curr[el] || { _errors: [] };
1399
- curr[el]._errors.push(mapper(issue2));
1408
+ const fullpath = [...path, ...issue2.path];
1409
+ if (fullpath.length === 0) {
1410
+ fieldErrors._errors.push(mapper(issue2));
1411
+ } else {
1412
+ let curr = fieldErrors;
1413
+ let i = 0;
1414
+ while (i < fullpath.length) {
1415
+ const el = fullpath[i];
1416
+ const terminal = i === fullpath.length - 1;
1417
+ if (!terminal) {
1418
+ curr[el] = curr[el] || { _errors: [] };
1419
+ } else {
1420
+ curr[el] = curr[el] || { _errors: [] };
1421
+ curr[el]._errors.push(mapper(issue2));
1422
+ }
1423
+ curr = curr[el];
1424
+ i++;
1400
1425
  }
1401
- curr = curr[el];
1402
- i++;
1403
1426
  }
1404
1427
  }
1405
1428
  }
1406
1429
  };
1407
- processError(error48);
1430
+ processError(error51);
1408
1431
  return fieldErrors;
1409
1432
  }
1410
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
1433
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1411
1434
  const result = { errors: [] };
1412
- const processError = (error49, path = []) => {
1413
- var _a2, _b;
1414
- for (const issue2 of error49.issues) {
1435
+ const processError = (error52, path = []) => {
1436
+ var _a3, _b;
1437
+ for (const issue2 of error52.issues) {
1415
1438
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1416
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
1439
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
1417
1440
  } else if (issue2.code === "invalid_key") {
1418
- processError({ issues: issue2.issues }, issue2.path);
1441
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1419
1442
  } else if (issue2.code === "invalid_element") {
1420
- processError({ issues: issue2.issues }, issue2.path);
1443
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1421
1444
  } else {
1422
1445
  const fullpath = [...path, ...issue2.path];
1423
1446
  if (fullpath.length === 0) {
@@ -1431,7 +1454,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
1431
1454
  const terminal = i === fullpath.length - 1;
1432
1455
  if (typeof el === "string") {
1433
1456
  curr.properties ?? (curr.properties = {});
1434
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
1457
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
1435
1458
  curr = curr.properties[el];
1436
1459
  } else {
1437
1460
  curr.items ?? (curr.items = []);
@@ -1446,7 +1469,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
1446
1469
  }
1447
1470
  }
1448
1471
  };
1449
- processError(error48);
1472
+ processError(error51);
1450
1473
  return result;
1451
1474
  }
1452
1475
  function toDotPath(_path) {
@@ -1467,9 +1490,9 @@ function toDotPath(_path) {
1467
1490
  }
1468
1491
  return segs.join("");
1469
1492
  }
1470
- function prettifyError(error48) {
1493
+ function prettifyError(error51) {
1471
1494
  const lines = [];
1472
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1495
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1473
1496
  for (const issue2 of issues) {
1474
1497
  lines.push(`\u2716 ${issue2.message}`);
1475
1498
  if (issue2.path?.length)
@@ -1478,9 +1501,9 @@ function prettifyError(error48) {
1478
1501
  return lines.join("\n");
1479
1502
  }
1480
1503
 
1481
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
1504
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
1482
1505
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
1483
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1506
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1484
1507
  const result = schema._zod.run({ value, issues: [] }, ctx);
1485
1508
  if (result instanceof Promise) {
1486
1509
  throw new $ZodAsyncError();
@@ -1494,7 +1517,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
1494
1517
  };
1495
1518
  var parse = /* @__PURE__ */ _parse($ZodRealError);
1496
1519
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1497
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1520
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1498
1521
  let result = schema._zod.run({ value, issues: [] }, ctx);
1499
1522
  if (result instanceof Promise)
1500
1523
  result = await result;
@@ -1519,7 +1542,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
1519
1542
  };
1520
1543
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
1521
1544
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1522
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1545
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1523
1546
  let result = schema._zod.run({ value, issues: [] }, ctx);
1524
1547
  if (result instanceof Promise)
1525
1548
  result = await result;
@@ -1530,7 +1553,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1530
1553
  };
1531
1554
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1532
1555
  var _encode = (_Err) => (schema, value, _ctx) => {
1533
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1556
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1534
1557
  return _parse(_Err)(schema, value, ctx);
1535
1558
  };
1536
1559
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -1539,7 +1562,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
1539
1562
  };
1540
1563
  var decode = /* @__PURE__ */ _decode($ZodRealError);
1541
1564
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
1542
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1565
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1543
1566
  return _parseAsync(_Err)(schema, value, ctx);
1544
1567
  };
1545
1568
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -1548,7 +1571,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
1548
1571
  };
1549
1572
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
1550
1573
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
1551
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1574
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1552
1575
  return _safeParse(_Err)(schema, value, ctx);
1553
1576
  };
1554
1577
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -1557,7 +1580,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
1557
1580
  };
1558
1581
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
1559
1582
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1560
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1583
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1561
1584
  return _safeParseAsync(_Err)(schema, value, ctx);
1562
1585
  };
1563
1586
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -1566,7 +1589,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1566
1589
  };
1567
1590
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
1568
1591
 
1569
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
1592
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
1570
1593
  var regexes_exports = {};
1571
1594
  __export(regexes_exports, {
1572
1595
  base64: () => base64,
@@ -1590,6 +1613,7 @@ __export(regexes_exports, {
1590
1613
  hex: () => hex,
1591
1614
  hostname: () => hostname,
1592
1615
  html5Email: () => html5Email,
1616
+ httpProtocol: () => httpProtocol,
1593
1617
  idnEmail: () => idnEmail,
1594
1618
  integer: () => integer,
1595
1619
  ipv4: () => ipv4,
@@ -1628,7 +1652,7 @@ __export(regexes_exports, {
1628
1652
  uuid7: () => uuid7,
1629
1653
  xid: () => xid
1630
1654
  });
1631
- var cuid = /^[cC][^\s-]{8,}$/;
1655
+ var cuid = /^[cC][0-9a-z]{6,}$/;
1632
1656
  var cuid2 = /^[0-9a-z]+$/;
1633
1657
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
1634
1658
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -1667,6 +1691,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
1667
1691
  var base64url = /^[A-Za-z0-9_-]*$/;
1668
1692
  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])?)*\.?$/;
1669
1693
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
1694
+ var httpProtocol = /^https?$/;
1670
1695
  var e164 = /^\+[1-9]\d{6,14}$/;
1671
1696
  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])))`;
1672
1697
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -1723,12 +1748,12 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
1723
1748
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
1724
1749
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
1725
1750
 
1726
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
1751
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
1727
1752
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1728
- var _a2;
1753
+ var _a3;
1729
1754
  inst._zod ?? (inst._zod = {});
1730
1755
  inst._zod.def = def;
1731
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
1756
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
1732
1757
  });
1733
1758
  var numericOriginMap = {
1734
1759
  number: "number",
@@ -1794,8 +1819,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
1794
1819
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1795
1820
  $ZodCheck.init(inst, def);
1796
1821
  inst._zod.onattach.push((inst2) => {
1797
- var _a2;
1798
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
1822
+ var _a3;
1823
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
1799
1824
  });
1800
1825
  inst._zod.check = (payload) => {
1801
1826
  if (typeof payload.value !== typeof def.value)
@@ -1928,9 +1953,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1928
1953
  };
1929
1954
  });
1930
1955
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1931
- var _a2;
1956
+ var _a3;
1932
1957
  $ZodCheck.init(inst, def);
1933
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1958
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1934
1959
  const val = payload.value;
1935
1960
  return !nullish(val) && val.size !== void 0;
1936
1961
  });
@@ -1956,9 +1981,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
1956
1981
  };
1957
1982
  });
1958
1983
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1959
- var _a2;
1984
+ var _a3;
1960
1985
  $ZodCheck.init(inst, def);
1961
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1986
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1962
1987
  const val = payload.value;
1963
1988
  return !nullish(val) && val.size !== void 0;
1964
1989
  });
@@ -1984,9 +2009,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
1984
2009
  };
1985
2010
  });
1986
2011
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1987
- var _a2;
2012
+ var _a3;
1988
2013
  $ZodCheck.init(inst, def);
1989
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2014
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1990
2015
  const val = payload.value;
1991
2016
  return !nullish(val) && val.size !== void 0;
1992
2017
  });
@@ -2014,9 +2039,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
2014
2039
  };
2015
2040
  });
2016
2041
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
2017
- var _a2;
2042
+ var _a3;
2018
2043
  $ZodCheck.init(inst, def);
2019
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2044
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2020
2045
  const val = payload.value;
2021
2046
  return !nullish(val) && val.length !== void 0;
2022
2047
  });
@@ -2043,9 +2068,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
2043
2068
  };
2044
2069
  });
2045
2070
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2046
- var _a2;
2071
+ var _a3;
2047
2072
  $ZodCheck.init(inst, def);
2048
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2073
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2049
2074
  const val = payload.value;
2050
2075
  return !nullish(val) && val.length !== void 0;
2051
2076
  });
@@ -2072,9 +2097,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2072
2097
  };
2073
2098
  });
2074
2099
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2075
- var _a2;
2100
+ var _a3;
2076
2101
  $ZodCheck.init(inst, def);
2077
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2102
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2078
2103
  const val = payload.value;
2079
2104
  return !nullish(val) && val.length !== void 0;
2080
2105
  });
@@ -2103,7 +2128,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2103
2128
  };
2104
2129
  });
2105
2130
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
2106
- var _a2, _b;
2131
+ var _a3, _b;
2107
2132
  $ZodCheck.init(inst, def);
2108
2133
  inst._zod.onattach.push((inst2) => {
2109
2134
  const bag = inst2._zod.bag;
@@ -2114,7 +2139,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
2114
2139
  }
2115
2140
  });
2116
2141
  if (def.pattern)
2117
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
2142
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
2118
2143
  def.pattern.lastIndex = 0;
2119
2144
  if (def.pattern.test(payload.value))
2120
2145
  return;
@@ -2271,7 +2296,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
2271
2296
  };
2272
2297
  });
2273
2298
 
2274
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
2299
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
2275
2300
  var Doc = class {
2276
2301
  constructor(args = []) {
2277
2302
  this.content = [];
@@ -2307,16 +2332,16 @@ var Doc = class {
2307
2332
  }
2308
2333
  };
2309
2334
 
2310
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
2335
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
2311
2336
  var version = {
2312
2337
  major: 4,
2313
- minor: 3,
2314
- patch: 6
2338
+ minor: 4,
2339
+ patch: 3
2315
2340
  };
2316
2341
 
2317
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
2342
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
2318
2343
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2319
- var _a2;
2344
+ var _a3;
2320
2345
  inst ?? (inst = {});
2321
2346
  inst._zod.def = def;
2322
2347
  inst._zod.bag = inst._zod.bag || {};
@@ -2331,7 +2356,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2331
2356
  }
2332
2357
  }
2333
2358
  if (checks.length === 0) {
2334
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
2359
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
2335
2360
  inst._zod.deferred?.push(() => {
2336
2361
  inst._zod.run = inst._zod.parse;
2337
2362
  });
@@ -2341,6 +2366,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2341
2366
  let asyncResult;
2342
2367
  for (const ch of checks2) {
2343
2368
  if (ch._zod.def.when) {
2369
+ if (explicitlyAborted(payload))
2370
+ continue;
2344
2371
  const shouldRun = ch._zod.def.when(payload);
2345
2372
  if (!shouldRun)
2346
2373
  continue;
@@ -2481,6 +2508,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
2481
2508
  inst._zod.check = (payload) => {
2482
2509
  try {
2483
2510
  const trimmed = payload.value.trim();
2511
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
2512
+ if (!/^https?:\/\//i.test(trimmed)) {
2513
+ payload.issues.push({
2514
+ code: "invalid_format",
2515
+ format: "url",
2516
+ note: "Invalid URL format",
2517
+ input: payload.value,
2518
+ inst,
2519
+ continue: !def.abort
2520
+ });
2521
+ return;
2522
+ }
2523
+ }
2484
2524
  const url2 = new URL(trimmed);
2485
2525
  if (def.hostname) {
2486
2526
  def.hostname.lastIndex = 0;
@@ -2634,6 +2674,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
2634
2674
  function isValidBase64(data) {
2635
2675
  if (data === "")
2636
2676
  return true;
2677
+ if (/\s/.test(data))
2678
+ return false;
2637
2679
  if (data.length % 4 !== 0)
2638
2680
  return false;
2639
2681
  try {
@@ -2826,8 +2868,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
2826
2868
  $ZodType.init(inst, def);
2827
2869
  inst._zod.pattern = _undefined;
2828
2870
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
2829
- inst._zod.optin = "optional";
2830
- inst._zod.optout = "optional";
2831
2871
  inst._zod.parse = (payload, _ctx) => {
2832
2872
  const input = payload.value;
2833
2873
  if (typeof input === "undefined")
@@ -2956,15 +2996,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2956
2996
  return payload;
2957
2997
  };
2958
2998
  });
2959
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
2999
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
3000
+ const isPresent = key in input;
2960
3001
  if (result.issues.length) {
2961
- if (isOptionalOut && !(key in input)) {
3002
+ if (isOptionalIn && isOptionalOut && !isPresent) {
2962
3003
  return;
2963
3004
  }
2964
3005
  final.issues.push(...prefixIssues(key, result.issues));
2965
3006
  }
3007
+ if (!isPresent && !isOptionalIn) {
3008
+ if (!result.issues.length) {
3009
+ final.issues.push({
3010
+ code: "invalid_type",
3011
+ expected: "nonoptional",
3012
+ input: void 0,
3013
+ path: [key]
3014
+ });
3015
+ }
3016
+ return;
3017
+ }
2966
3018
  if (result.value === void 0) {
2967
- if (key in input) {
3019
+ if (isPresent) {
2968
3020
  final.value[key] = void 0;
2969
3021
  }
2970
3022
  } else {
@@ -2992,8 +3044,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2992
3044
  const keySet = def.keySet;
2993
3045
  const _catchall = def.catchall._zod;
2994
3046
  const t = _catchall.def.type;
3047
+ const isOptionalIn = _catchall.optin === "optional";
2995
3048
  const isOptionalOut = _catchall.optout === "optional";
2996
3049
  for (const key in input) {
3050
+ if (key === "__proto__")
3051
+ continue;
2997
3052
  if (keySet.has(key))
2998
3053
  continue;
2999
3054
  if (t === "never") {
@@ -3002,9 +3057,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
3002
3057
  }
3003
3058
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3004
3059
  if (r instanceof Promise) {
3005
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3060
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3006
3061
  } else {
3007
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3062
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3008
3063
  }
3009
3064
  }
3010
3065
  if (unrecognized.length) {
@@ -3070,12 +3125,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3070
3125
  const shape = value.shape;
3071
3126
  for (const key of value.keys) {
3072
3127
  const el = shape[key];
3128
+ const isOptionalIn = el._zod.optin === "optional";
3073
3129
  const isOptionalOut = el._zod.optout === "optional";
3074
3130
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3075
3131
  if (r instanceof Promise) {
3076
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3132
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3077
3133
  } else {
3078
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3134
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3079
3135
  }
3080
3136
  }
3081
3137
  if (!catchall) {
@@ -3106,9 +3162,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3106
3162
  const id = ids[key];
3107
3163
  const k = esc(key);
3108
3164
  const schema = shape[key];
3165
+ const isOptionalIn = schema?._zod?.optin === "optional";
3109
3166
  const isOptionalOut = schema?._zod?.optout === "optional";
3110
3167
  doc.write(`const ${id} = ${parseStr(key)};`);
3111
- if (isOptionalOut) {
3168
+ if (isOptionalIn && isOptionalOut) {
3112
3169
  doc.write(`
3113
3170
  if (${id}.issues.length) {
3114
3171
  if (${k} in input) {
@@ -3127,6 +3184,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3127
3184
  newResult[${k}] = ${id}.value;
3128
3185
  }
3129
3186
 
3187
+ `);
3188
+ } else if (!isOptionalIn) {
3189
+ doc.write(`
3190
+ const ${id}_present = ${k} in input;
3191
+ if (${id}.issues.length) {
3192
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3193
+ ...iss,
3194
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3195
+ })));
3196
+ }
3197
+ if (!${id}_present && !${id}.issues.length) {
3198
+ payload.issues.push({
3199
+ code: "invalid_type",
3200
+ expected: "nonoptional",
3201
+ input: undefined,
3202
+ path: [${k}]
3203
+ });
3204
+ }
3205
+
3206
+ if (${id}_present) {
3207
+ if (${id}.value === undefined) {
3208
+ newResult[${k}] = undefined;
3209
+ } else {
3210
+ newResult[${k}] = ${id}.value;
3211
+ }
3212
+ }
3213
+
3130
3214
  `);
3131
3215
  } else {
3132
3216
  doc.write(`
@@ -3220,10 +3304,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
3220
3304
  }
3221
3305
  return void 0;
3222
3306
  });
3223
- const single = def.options.length === 1;
3224
- const first = def.options[0]._zod.run;
3307
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3225
3308
  inst._zod.parse = (payload, ctx) => {
3226
- if (single) {
3309
+ if (first) {
3227
3310
  return first(payload, ctx);
3228
3311
  }
3229
3312
  let async = false;
@@ -3276,10 +3359,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
3276
3359
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3277
3360
  $ZodUnion.init(inst, def);
3278
3361
  def.inclusive = false;
3279
- const single = def.options.length === 1;
3280
- const first = def.options[0]._zod.run;
3362
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3281
3363
  inst._zod.parse = (payload, ctx) => {
3282
- if (single) {
3364
+ if (first) {
3283
3365
  return first(payload, ctx);
3284
3366
  }
3285
3367
  let async = false;
@@ -3354,7 +3436,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3354
3436
  if (opt) {
3355
3437
  return opt._zod.run(payload, ctx);
3356
3438
  }
3357
- if (def.unionFallback) {
3439
+ if (def.unionFallback || ctx.direction === "backward") {
3358
3440
  return _super(payload, ctx);
3359
3441
  }
3360
3442
  payload.issues.push({
@@ -3362,6 +3444,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3362
3444
  errors: [],
3363
3445
  note: "No matching discriminator",
3364
3446
  discriminator: def.discriminator,
3447
+ options: Array.from(disc.value.keys()),
3365
3448
  input,
3366
3449
  path: [def.discriminator],
3367
3450
  inst
@@ -3483,64 +3566,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3483
3566
  }
3484
3567
  payload.value = [];
3485
3568
  const proms = [];
3486
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3487
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3569
+ const optinStart = getTupleOptStart(items, "optin");
3570
+ const optoutStart = getTupleOptStart(items, "optout");
3488
3571
  if (!def.rest) {
3489
- const tooBig = input.length > items.length;
3490
- const tooSmall = input.length < optStart - 1;
3491
- if (tooBig || tooSmall) {
3572
+ if (input.length < optinStart) {
3492
3573
  payload.issues.push({
3493
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3574
+ code: "too_small",
3575
+ minimum: optinStart,
3576
+ inclusive: true,
3494
3577
  input,
3495
3578
  inst,
3496
3579
  origin: "array"
3497
3580
  });
3498
3581
  return payload;
3499
3582
  }
3500
- }
3501
- let i = -1;
3502
- for (const item of items) {
3503
- i++;
3504
- if (i >= input.length) {
3505
- if (i >= optStart)
3506
- continue;
3583
+ if (input.length > items.length) {
3584
+ payload.issues.push({
3585
+ code: "too_big",
3586
+ maximum: items.length,
3587
+ inclusive: true,
3588
+ input,
3589
+ inst,
3590
+ origin: "array"
3591
+ });
3507
3592
  }
3508
- const result = item._zod.run({
3509
- value: input[i],
3510
- issues: []
3511
- }, ctx);
3512
- if (result instanceof Promise) {
3513
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3593
+ }
3594
+ const itemResults = new Array(items.length);
3595
+ for (let i = 0; i < items.length; i++) {
3596
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3597
+ if (r instanceof Promise) {
3598
+ proms.push(r.then((rr) => {
3599
+ itemResults[i] = rr;
3600
+ }));
3514
3601
  } else {
3515
- handleTupleResult(result, payload, i);
3602
+ itemResults[i] = r;
3516
3603
  }
3517
3604
  }
3518
3605
  if (def.rest) {
3606
+ let i = items.length - 1;
3519
3607
  const rest = input.slice(items.length);
3520
3608
  for (const el of rest) {
3521
3609
  i++;
3522
- const result = def.rest._zod.run({
3523
- value: el,
3524
- issues: []
3525
- }, ctx);
3610
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
3526
3611
  if (result instanceof Promise) {
3527
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3612
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3528
3613
  } else {
3529
3614
  handleTupleResult(result, payload, i);
3530
3615
  }
3531
3616
  }
3532
3617
  }
3533
- if (proms.length)
3534
- return Promise.all(proms).then(() => payload);
3535
- return payload;
3618
+ if (proms.length) {
3619
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3620
+ }
3621
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3536
3622
  };
3537
3623
  });
3624
+ function getTupleOptStart(items, key) {
3625
+ for (let i = items.length - 1; i >= 0; i--) {
3626
+ if (items[i]._zod[key] !== "optional")
3627
+ return i + 1;
3628
+ }
3629
+ return 0;
3630
+ }
3538
3631
  function handleTupleResult(result, final, index) {
3539
3632
  if (result.issues.length) {
3540
3633
  final.issues.push(...prefixIssues(index, result.issues));
3541
3634
  }
3542
3635
  final.value[index] = result.value;
3543
3636
  }
3637
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3638
+ for (let i = 0; i < items.length; i++) {
3639
+ const r = itemResults[i];
3640
+ const isPresent = i < input.length;
3641
+ if (r.issues.length) {
3642
+ if (!isPresent && i >= optoutStart) {
3643
+ final.value.length = i;
3644
+ break;
3645
+ }
3646
+ final.issues.push(...prefixIssues(i, r.issues));
3647
+ }
3648
+ final.value[i] = r.value;
3649
+ }
3650
+ for (let i = final.value.length - 1; i >= input.length; i--) {
3651
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
3652
+ final.value.length = i;
3653
+ } else {
3654
+ break;
3655
+ }
3656
+ }
3657
+ return final;
3658
+ }
3544
3659
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3545
3660
  $ZodType.init(inst, def);
3546
3661
  inst._zod.parse = (payload, ctx) => {
@@ -3562,19 +3677,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3562
3677
  for (const key of values) {
3563
3678
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3564
3679
  recordKeys.add(typeof key === "number" ? key.toString() : key);
3680
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3681
+ if (keyResult instanceof Promise) {
3682
+ throw new Error("Async schemas not supported in object keys currently");
3683
+ }
3684
+ if (keyResult.issues.length) {
3685
+ payload.issues.push({
3686
+ code: "invalid_key",
3687
+ origin: "record",
3688
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
3689
+ input: key,
3690
+ path: [key],
3691
+ inst
3692
+ });
3693
+ continue;
3694
+ }
3695
+ const outKey = keyResult.value;
3565
3696
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3566
3697
  if (result instanceof Promise) {
3567
3698
  proms.push(result.then((result2) => {
3568
3699
  if (result2.issues.length) {
3569
3700
  payload.issues.push(...prefixIssues(key, result2.issues));
3570
3701
  }
3571
- payload.value[key] = result2.value;
3702
+ payload.value[outKey] = result2.value;
3572
3703
  }));
3573
3704
  } else {
3574
3705
  if (result.issues.length) {
3575
3706
  payload.issues.push(...prefixIssues(key, result.issues));
3576
3707
  }
3577
- payload.value[key] = result.value;
3708
+ payload.value[outKey] = result.value;
3578
3709
  }
3579
3710
  }
3580
3711
  }
@@ -3598,6 +3729,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3598
3729
  for (const key of Reflect.ownKeys(input)) {
3599
3730
  if (key === "__proto__")
3600
3731
  continue;
3732
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
3733
+ continue;
3601
3734
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3602
3735
  if (keyResult instanceof Promise) {
3603
3736
  throw new Error("Async schemas not supported in object keys currently");
@@ -3802,6 +3935,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
3802
3935
  });
3803
3936
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
3804
3937
  $ZodType.init(inst, def);
3938
+ inst._zod.optin = "optional";
3805
3939
  inst._zod.parse = (payload, ctx) => {
3806
3940
  if (ctx.direction === "backward") {
3807
3941
  throw new $ZodEncodeError(inst.constructor.name);
@@ -3811,6 +3945,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3811
3945
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
3812
3946
  return output.then((output2) => {
3813
3947
  payload.value = output2;
3948
+ payload.fallback = true;
3814
3949
  return payload;
3815
3950
  });
3816
3951
  }
@@ -3818,11 +3953,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3818
3953
  throw new $ZodAsyncError();
3819
3954
  }
3820
3955
  payload.value = _out;
3956
+ payload.fallback = true;
3821
3957
  return payload;
3822
3958
  };
3823
3959
  });
3824
3960
  function handleOptionalResult(result, input) {
3825
- if (result.issues.length && input === void 0) {
3961
+ if (input === void 0 && (result.issues.length || result.fallback)) {
3826
3962
  return { issues: [], value: void 0 };
3827
3963
  }
3828
3964
  return result;
@@ -3840,10 +3976,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3840
3976
  });
3841
3977
  inst._zod.parse = (payload, ctx) => {
3842
3978
  if (def.innerType._zod.optin === "optional") {
3979
+ const input = payload.value;
3843
3980
  const result = def.innerType._zod.run(payload, ctx);
3844
3981
  if (result instanceof Promise)
3845
- return result.then((r) => handleOptionalResult(r, payload.value));
3846
- return handleOptionalResult(result, payload.value);
3982
+ return result.then((r) => handleOptionalResult(r, input));
3983
+ return handleOptionalResult(result, input);
3847
3984
  }
3848
3985
  if (payload.value === void 0) {
3849
3986
  return payload;
@@ -3959,7 +4096,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3959
4096
  });
3960
4097
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3961
4098
  $ZodType.init(inst, def);
3962
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
4099
+ inst._zod.optin = "optional";
3963
4100
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3964
4101
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3965
4102
  inst._zod.parse = (payload, ctx) => {
@@ -3979,6 +4116,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3979
4116
  input: payload.value
3980
4117
  });
3981
4118
  payload.issues = [];
4119
+ payload.fallback = true;
3982
4120
  }
3983
4121
  return payload;
3984
4122
  });
@@ -3993,6 +4131,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3993
4131
  input: payload.value
3994
4132
  });
3995
4133
  payload.issues = [];
4134
+ payload.fallback = true;
3996
4135
  }
3997
4136
  return payload;
3998
4137
  };
@@ -4038,7 +4177,7 @@ function handlePipeResult(left, next, ctx) {
4038
4177
  left.aborted = true;
4039
4178
  return left;
4040
4179
  }
4041
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
4180
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
4042
4181
  }
4043
4182
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
4044
4183
  $ZodType.init(inst, def);
@@ -4090,6 +4229,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
4090
4229
  }
4091
4230
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
4092
4231
  }
4232
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
4233
+ $ZodPipe.init(inst, def);
4234
+ });
4093
4235
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
4094
4236
  $ZodType.init(inst, def);
4095
4237
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -4241,7 +4383,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
4241
4383
  });
4242
4384
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4243
4385
  $ZodType.init(inst, def);
4244
- defineLazy(inst._zod, "innerType", () => def.getter());
4386
+ defineLazy(inst._zod, "innerType", () => {
4387
+ const d = def;
4388
+ if (!d._cachedInner)
4389
+ d._cachedInner = def.getter();
4390
+ return d._cachedInner;
4391
+ });
4245
4392
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
4246
4393
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
4247
4394
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4285,7 +4432,7 @@ function handleRefineResult(result, payload, input, inst) {
4285
4432
  }
4286
4433
  }
4287
4434
 
4288
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
4435
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/index.js
4289
4436
  var locales_exports = {};
4290
4437
  __export(locales_exports, {
4291
4438
  ar: () => ar_default,
@@ -4296,6 +4443,7 @@ __export(locales_exports, {
4296
4443
  cs: () => cs_default,
4297
4444
  da: () => da_default,
4298
4445
  de: () => de_default,
4446
+ el: () => el_default,
4299
4447
  en: () => en_default,
4300
4448
  eo: () => eo_default,
4301
4449
  es: () => es_default,
@@ -4304,6 +4452,7 @@ __export(locales_exports, {
4304
4452
  fr: () => fr_default,
4305
4453
  frCA: () => fr_CA_default,
4306
4454
  he: () => he_default,
4455
+ hr: () => hr_default,
4307
4456
  hu: () => hu_default,
4308
4457
  hy: () => hy_default,
4309
4458
  id: () => id_default,
@@ -4323,6 +4472,7 @@ __export(locales_exports, {
4323
4472
  pl: () => pl_default,
4324
4473
  ps: () => ps_default,
4325
4474
  pt: () => pt_default,
4475
+ ro: () => ro_default,
4326
4476
  ru: () => ru_default,
4327
4477
  sl: () => sl_default,
4328
4478
  sv: () => sv_default,
@@ -4339,7 +4489,7 @@ __export(locales_exports, {
4339
4489
  zhTW: () => zh_TW_default
4340
4490
  });
4341
4491
 
4342
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
4492
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.js
4343
4493
  var error = () => {
4344
4494
  const Sizable = {
4345
4495
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -4446,7 +4596,7 @@ function ar_default() {
4446
4596
  };
4447
4597
  }
4448
4598
 
4449
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
4599
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.js
4450
4600
  var error2 = () => {
4451
4601
  const Sizable = {
4452
4602
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -4552,7 +4702,7 @@ function az_default() {
4552
4702
  };
4553
4703
  }
4554
4704
 
4555
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
4705
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.js
4556
4706
  function getBelarusianPlural(count, one, few, many) {
4557
4707
  const absCount = Math.abs(count);
4558
4708
  const lastDigit = absCount % 10;
@@ -4709,7 +4859,7 @@ function be_default() {
4709
4859
  };
4710
4860
  }
4711
4861
 
4712
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
4862
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.js
4713
4863
  var error4 = () => {
4714
4864
  const Sizable = {
4715
4865
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -4830,7 +4980,7 @@ function bg_default() {
4830
4980
  };
4831
4981
  }
4832
4982
 
4833
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
4983
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.js
4834
4984
  var error5 = () => {
4835
4985
  const Sizable = {
4836
4986
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -4939,7 +5089,7 @@ function ca_default() {
4939
5089
  };
4940
5090
  }
4941
5091
 
4942
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
5092
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.js
4943
5093
  var error6 = () => {
4944
5094
  const Sizable = {
4945
5095
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -5051,7 +5201,7 @@ function cs_default() {
5051
5201
  };
5052
5202
  }
5053
5203
 
5054
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
5204
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.js
5055
5205
  var error7 = () => {
5056
5206
  const Sizable = {
5057
5207
  string: { unit: "tegn", verb: "havde" },
@@ -5167,7 +5317,7 @@ function da_default() {
5167
5317
  };
5168
5318
  }
5169
5319
 
5170
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
5320
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.js
5171
5321
  var error8 = () => {
5172
5322
  const Sizable = {
5173
5323
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -5276,8 +5426,118 @@ function de_default() {
5276
5426
  };
5277
5427
  }
5278
5428
 
5279
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
5429
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.js
5280
5430
  var error9 = () => {
5431
+ const Sizable = {
5432
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5433
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5434
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5435
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5436
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
5437
+ };
5438
+ function getSizing(origin) {
5439
+ return Sizable[origin] ?? null;
5440
+ }
5441
+ const FormatDictionary = {
5442
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
5443
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
5444
+ url: "URL",
5445
+ emoji: "emoji",
5446
+ uuid: "UUID",
5447
+ uuidv4: "UUIDv4",
5448
+ uuidv6: "UUIDv6",
5449
+ nanoid: "nanoid",
5450
+ guid: "GUID",
5451
+ cuid: "cuid",
5452
+ cuid2: "cuid2",
5453
+ ulid: "ULID",
5454
+ xid: "XID",
5455
+ ksuid: "KSUID",
5456
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
5457
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
5458
+ time: "ISO \u03CE\u03C1\u03B1",
5459
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
5460
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
5461
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
5462
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
5463
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
5464
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
5465
+ 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",
5466
+ 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",
5467
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
5468
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
5469
+ jwt: "JWT",
5470
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
5471
+ };
5472
+ const TypeDictionary = {
5473
+ nan: "NaN"
5474
+ };
5475
+ return (issue2) => {
5476
+ switch (issue2.code) {
5477
+ case "invalid_type": {
5478
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
5479
+ const receivedType = parsedType(issue2.input);
5480
+ const received = TypeDictionary[receivedType] ?? receivedType;
5481
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
5482
+ 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}`;
5483
+ }
5484
+ 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}`;
5485
+ }
5486
+ case "invalid_value":
5487
+ if (issue2.values.length === 1)
5488
+ 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])}`;
5489
+ 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, "|")}`;
5490
+ case "too_big": {
5491
+ const adj = issue2.inclusive ? "<=" : "<";
5492
+ const sizing = getSizing(issue2.origin);
5493
+ if (sizing)
5494
+ 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"}`;
5495
+ 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()}`;
5496
+ }
5497
+ case "too_small": {
5498
+ const adj = issue2.inclusive ? ">=" : ">";
5499
+ const sizing = getSizing(issue2.origin);
5500
+ if (sizing) {
5501
+ 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}`;
5502
+ }
5503
+ 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()}`;
5504
+ }
5505
+ case "invalid_format": {
5506
+ const _issue = issue2;
5507
+ if (_issue.format === "starts_with") {
5508
+ 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}"`;
5509
+ }
5510
+ if (_issue.format === "ends_with")
5511
+ 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}"`;
5512
+ if (_issue.format === "includes")
5513
+ 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}"`;
5514
+ if (_issue.format === "regex")
5515
+ 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}`;
5516
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
5517
+ }
5518
+ case "not_multiple_of":
5519
+ 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}`;
5520
+ case "unrecognized_keys":
5521
+ 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, ", ")}`;
5522
+ case "invalid_key":
5523
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
5524
+ case "invalid_union":
5525
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
5526
+ case "invalid_element":
5527
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
5528
+ default:
5529
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
5530
+ }
5531
+ };
5532
+ };
5533
+ function el_default() {
5534
+ return {
5535
+ localeError: error9()
5536
+ };
5537
+ }
5538
+
5539
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.js
5540
+ var error10 = () => {
5281
5541
  const Sizable = {
5282
5542
  string: { unit: "characters", verb: "to have" },
5283
5543
  file: { unit: "bytes", verb: "to have" },
@@ -5371,6 +5631,10 @@ var error9 = () => {
5371
5631
  case "invalid_key":
5372
5632
  return `Invalid key in ${issue2.origin}`;
5373
5633
  case "invalid_union":
5634
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
5635
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
5636
+ return `Invalid discriminator value. Expected ${opts}`;
5637
+ }
5374
5638
  return "Invalid input";
5375
5639
  case "invalid_element":
5376
5640
  return `Invalid value in ${issue2.origin}`;
@@ -5381,12 +5645,12 @@ var error9 = () => {
5381
5645
  };
5382
5646
  function en_default() {
5383
5647
  return {
5384
- localeError: error9()
5648
+ localeError: error10()
5385
5649
  };
5386
5650
  }
5387
5651
 
5388
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
5389
- var error10 = () => {
5652
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.js
5653
+ var error11 = () => {
5390
5654
  const Sizable = {
5391
5655
  string: { unit: "karaktrojn", verb: "havi" },
5392
5656
  file: { unit: "bajtojn", verb: "havi" },
@@ -5491,12 +5755,12 @@ var error10 = () => {
5491
5755
  };
5492
5756
  function eo_default() {
5493
5757
  return {
5494
- localeError: error10()
5758
+ localeError: error11()
5495
5759
  };
5496
5760
  }
5497
5761
 
5498
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
5499
- var error11 = () => {
5762
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.js
5763
+ var error12 = () => {
5500
5764
  const Sizable = {
5501
5765
  string: { unit: "caracteres", verb: "tener" },
5502
5766
  file: { unit: "bytes", verb: "tener" },
@@ -5624,12 +5888,12 @@ var error11 = () => {
5624
5888
  };
5625
5889
  function es_default() {
5626
5890
  return {
5627
- localeError: error11()
5891
+ localeError: error12()
5628
5892
  };
5629
5893
  }
5630
5894
 
5631
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
5632
- var error12 = () => {
5895
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.js
5896
+ var error13 = () => {
5633
5897
  const Sizable = {
5634
5898
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
5635
5899
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -5739,12 +6003,12 @@ var error12 = () => {
5739
6003
  };
5740
6004
  function fa_default() {
5741
6005
  return {
5742
- localeError: error12()
6006
+ localeError: error13()
5743
6007
  };
5744
6008
  }
5745
6009
 
5746
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
5747
- var error13 = () => {
6010
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.js
6011
+ var error14 = () => {
5748
6012
  const Sizable = {
5749
6013
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
5750
6014
  file: { unit: "tavua", subject: "tiedoston" },
@@ -5852,12 +6116,12 @@ var error13 = () => {
5852
6116
  };
5853
6117
  function fi_default() {
5854
6118
  return {
5855
- localeError: error13()
6119
+ localeError: error14()
5856
6120
  };
5857
6121
  }
5858
6122
 
5859
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
5860
- var error14 = () => {
6123
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.js
6124
+ var error15 = () => {
5861
6125
  const Sizable = {
5862
6126
  string: { unit: "caract\xE8res", verb: "avoir" },
5863
6127
  file: { unit: "octets", verb: "avoir" },
@@ -5898,9 +6162,27 @@ var error14 = () => {
5898
6162
  template_literal: "entr\xE9e"
5899
6163
  };
5900
6164
  const TypeDictionary = {
5901
- nan: "NaN",
6165
+ string: "cha\xEEne",
5902
6166
  number: "nombre",
5903
- array: "tableau"
6167
+ int: "entier",
6168
+ boolean: "bool\xE9en",
6169
+ bigint: "grand entier",
6170
+ symbol: "symbole",
6171
+ undefined: "ind\xE9fini",
6172
+ null: "null",
6173
+ never: "jamais",
6174
+ void: "vide",
6175
+ date: "date",
6176
+ array: "tableau",
6177
+ object: "objet",
6178
+ tuple: "tuple",
6179
+ record: "enregistrement",
6180
+ map: "carte",
6181
+ set: "ensemble",
6182
+ file: "fichier",
6183
+ nonoptional: "non-optionnel",
6184
+ nan: "NaN",
6185
+ function: "fonction"
5904
6186
  };
5905
6187
  return (issue2) => {
5906
6188
  switch (issue2.code) {
@@ -5921,16 +6203,15 @@ var error14 = () => {
5921
6203
  const adj = issue2.inclusive ? "<=" : "<";
5922
6204
  const sizing = getSizing(issue2.origin);
5923
6205
  if (sizing)
5924
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
5925
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6206
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6207
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
5926
6208
  }
5927
6209
  case "too_small": {
5928
6210
  const adj = issue2.inclusive ? ">=" : ">";
5929
6211
  const sizing = getSizing(issue2.origin);
5930
- if (sizing) {
5931
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5932
- }
5933
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6212
+ if (sizing)
6213
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6214
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
5934
6215
  }
5935
6216
  case "invalid_format": {
5936
6217
  const _issue = issue2;
@@ -5961,12 +6242,12 @@ var error14 = () => {
5961
6242
  };
5962
6243
  function fr_default() {
5963
6244
  return {
5964
- localeError: error14()
6245
+ localeError: error15()
5965
6246
  };
5966
6247
  }
5967
6248
 
5968
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
5969
- var error15 = () => {
6249
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
6250
+ var error16 = () => {
5970
6251
  const Sizable = {
5971
6252
  string: { unit: "caract\xE8res", verb: "avoir" },
5972
6253
  file: { unit: "octets", verb: "avoir" },
@@ -6069,12 +6350,12 @@ var error15 = () => {
6069
6350
  };
6070
6351
  function fr_CA_default() {
6071
6352
  return {
6072
- localeError: error15()
6353
+ localeError: error16()
6073
6354
  };
6074
6355
  }
6075
6356
 
6076
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
6077
- var error16 = () => {
6357
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.js
6358
+ var error17 = () => {
6078
6359
  const TypeNames = {
6079
6360
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
6080
6361
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -6264,24 +6545,24 @@ var error16 = () => {
6264
6545
  };
6265
6546
  function he_default() {
6266
6547
  return {
6267
- localeError: error16()
6548
+ localeError: error17()
6268
6549
  };
6269
6550
  }
6270
6551
 
6271
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
6272
- var error17 = () => {
6552
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.js
6553
+ var error18 = () => {
6273
6554
  const Sizable = {
6274
- string: { unit: "karakter", verb: "legyen" },
6275
- file: { unit: "byte", verb: "legyen" },
6276
- array: { unit: "elem", verb: "legyen" },
6277
- set: { unit: "elem", verb: "legyen" }
6555
+ string: { unit: "znakova", verb: "imati" },
6556
+ file: { unit: "bajtova", verb: "imati" },
6557
+ array: { unit: "stavki", verb: "imati" },
6558
+ set: { unit: "stavki", verb: "imati" }
6278
6559
  };
6279
6560
  function getSizing(origin) {
6280
6561
  return Sizable[origin] ?? null;
6281
6562
  }
6282
6563
  const FormatDictionary = {
6283
- regex: "bemenet",
6284
- email: "email c\xEDm",
6564
+ regex: "unos",
6565
+ email: "email adresa",
6285
6566
  url: "URL",
6286
6567
  emoji: "emoji",
6287
6568
  uuid: "UUID",
@@ -6294,25 +6575,37 @@ var error17 = () => {
6294
6575
  ulid: "ULID",
6295
6576
  xid: "XID",
6296
6577
  ksuid: "KSUID",
6297
- datetime: "ISO id\u0151b\xE9lyeg",
6298
- date: "ISO d\xE1tum",
6299
- time: "ISO id\u0151",
6300
- duration: "ISO id\u0151intervallum",
6301
- ipv4: "IPv4 c\xEDm",
6302
- ipv6: "IPv6 c\xEDm",
6303
- cidrv4: "IPv4 tartom\xE1ny",
6304
- cidrv6: "IPv6 tartom\xE1ny",
6305
- base64: "base64-k\xF3dolt string",
6306
- base64url: "base64url-k\xF3dolt string",
6307
- json_string: "JSON string",
6308
- e164: "E.164 sz\xE1m",
6578
+ datetime: "ISO datum i vrijeme",
6579
+ date: "ISO datum",
6580
+ time: "ISO vrijeme",
6581
+ duration: "ISO trajanje",
6582
+ ipv4: "IPv4 adresa",
6583
+ ipv6: "IPv6 adresa",
6584
+ cidrv4: "IPv4 raspon",
6585
+ cidrv6: "IPv6 raspon",
6586
+ base64: "base64 kodirani tekst",
6587
+ base64url: "base64url kodirani tekst",
6588
+ json_string: "JSON tekst",
6589
+ e164: "E.164 broj",
6309
6590
  jwt: "JWT",
6310
- template_literal: "bemenet"
6591
+ template_literal: "unos"
6311
6592
  };
6312
6593
  const TypeDictionary = {
6313
6594
  nan: "NaN",
6314
- number: "sz\xE1m",
6315
- array: "t\xF6mb"
6595
+ string: "tekst",
6596
+ number: "broj",
6597
+ boolean: "boolean",
6598
+ array: "niz",
6599
+ object: "objekt",
6600
+ set: "skup",
6601
+ file: "datoteka",
6602
+ date: "datum",
6603
+ bigint: "bigint",
6604
+ symbol: "simbol",
6605
+ undefined: "undefined",
6606
+ null: "null",
6607
+ function: "funkcija",
6608
+ map: "mapa"
6316
6609
  };
6317
6610
  return (issue2) => {
6318
6611
  switch (issue2.code) {
@@ -6321,35 +6614,146 @@ var error17 = () => {
6321
6614
  const receivedType = parsedType(issue2.input);
6322
6615
  const received = TypeDictionary[receivedType] ?? receivedType;
6323
6616
  if (/^[A-Z]/.test(issue2.expected)) {
6324
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
6617
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
6325
6618
  }
6326
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
6619
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
6327
6620
  }
6328
6621
  case "invalid_value":
6329
6622
  if (issue2.values.length === 1)
6330
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6331
- return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6623
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
6624
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
6332
6625
  case "too_big": {
6333
6626
  const adj = issue2.inclusive ? "<=" : "<";
6334
6627
  const sizing = getSizing(issue2.origin);
6628
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6335
6629
  if (sizing)
6336
- return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6337
- return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
6630
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
6631
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
6338
6632
  }
6339
6633
  case "too_small": {
6340
6634
  const adj = issue2.inclusive ? ">=" : ">";
6341
6635
  const sizing = getSizing(issue2.origin);
6636
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6342
6637
  if (sizing) {
6343
- return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6638
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6344
6639
  }
6345
- return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
6640
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
6346
6641
  }
6347
6642
  case "invalid_format": {
6348
6643
  const _issue = issue2;
6349
6644
  if (_issue.format === "starts_with")
6350
- return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;
6645
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
6351
6646
  if (_issue.format === "ends_with")
6352
- return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;
6647
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
6648
+ if (_issue.format === "includes")
6649
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
6650
+ if (_issue.format === "regex")
6651
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
6652
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
6653
+ }
6654
+ case "not_multiple_of":
6655
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
6656
+ case "unrecognized_keys":
6657
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
6658
+ case "invalid_key":
6659
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6660
+ case "invalid_union":
6661
+ return "Neispravan unos";
6662
+ case "invalid_element":
6663
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6664
+ default:
6665
+ return `Neispravan unos`;
6666
+ }
6667
+ };
6668
+ };
6669
+ function hr_default() {
6670
+ return {
6671
+ localeError: error18()
6672
+ };
6673
+ }
6674
+
6675
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.js
6676
+ var error19 = () => {
6677
+ const Sizable = {
6678
+ string: { unit: "karakter", verb: "legyen" },
6679
+ file: { unit: "byte", verb: "legyen" },
6680
+ array: { unit: "elem", verb: "legyen" },
6681
+ set: { unit: "elem", verb: "legyen" }
6682
+ };
6683
+ function getSizing(origin) {
6684
+ return Sizable[origin] ?? null;
6685
+ }
6686
+ const FormatDictionary = {
6687
+ regex: "bemenet",
6688
+ email: "email c\xEDm",
6689
+ url: "URL",
6690
+ emoji: "emoji",
6691
+ uuid: "UUID",
6692
+ uuidv4: "UUIDv4",
6693
+ uuidv6: "UUIDv6",
6694
+ nanoid: "nanoid",
6695
+ guid: "GUID",
6696
+ cuid: "cuid",
6697
+ cuid2: "cuid2",
6698
+ ulid: "ULID",
6699
+ xid: "XID",
6700
+ ksuid: "KSUID",
6701
+ datetime: "ISO id\u0151b\xE9lyeg",
6702
+ date: "ISO d\xE1tum",
6703
+ time: "ISO id\u0151",
6704
+ duration: "ISO id\u0151intervallum",
6705
+ ipv4: "IPv4 c\xEDm",
6706
+ ipv6: "IPv6 c\xEDm",
6707
+ cidrv4: "IPv4 tartom\xE1ny",
6708
+ cidrv6: "IPv6 tartom\xE1ny",
6709
+ base64: "base64-k\xF3dolt string",
6710
+ base64url: "base64url-k\xF3dolt string",
6711
+ json_string: "JSON string",
6712
+ e164: "E.164 sz\xE1m",
6713
+ jwt: "JWT",
6714
+ template_literal: "bemenet"
6715
+ };
6716
+ const TypeDictionary = {
6717
+ nan: "NaN",
6718
+ number: "sz\xE1m",
6719
+ array: "t\xF6mb"
6720
+ };
6721
+ return (issue2) => {
6722
+ switch (issue2.code) {
6723
+ case "invalid_type": {
6724
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
6725
+ const receivedType = parsedType(issue2.input);
6726
+ const received = TypeDictionary[receivedType] ?? receivedType;
6727
+ if (/^[A-Z]/.test(issue2.expected)) {
6728
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
6729
+ }
6730
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
6731
+ }
6732
+ case "invalid_value":
6733
+ if (issue2.values.length === 1)
6734
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6735
+ return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6736
+ case "too_big": {
6737
+ const adj = issue2.inclusive ? "<=" : "<";
6738
+ const sizing = getSizing(issue2.origin);
6739
+ if (sizing)
6740
+ return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6741
+ return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
6742
+ }
6743
+ case "too_small": {
6744
+ const adj = issue2.inclusive ? ">=" : ">";
6745
+ const sizing = getSizing(issue2.origin);
6746
+ if (sizing) {
6747
+ return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6748
+ }
6749
+ return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
6750
+ }
6751
+ case "invalid_format": {
6752
+ const _issue = issue2;
6753
+ if (_issue.format === "starts_with")
6754
+ return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;
6755
+ if (_issue.format === "ends_with")
6756
+ return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;
6353
6757
  if (_issue.format === "includes")
6354
6758
  return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`;
6355
6759
  if (_issue.format === "regex")
@@ -6373,11 +6777,11 @@ var error17 = () => {
6373
6777
  };
6374
6778
  function hu_default() {
6375
6779
  return {
6376
- localeError: error17()
6780
+ localeError: error19()
6377
6781
  };
6378
6782
  }
6379
6783
 
6380
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
6784
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.js
6381
6785
  function getArmenianPlural(count, one, many) {
6382
6786
  return Math.abs(count) === 1 ? one : many;
6383
6787
  }
@@ -6388,7 +6792,7 @@ function withDefiniteArticle(word) {
6388
6792
  const lastChar = word[word.length - 1];
6389
6793
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
6390
6794
  }
6391
- var error18 = () => {
6795
+ var error20 = () => {
6392
6796
  const Sizable = {
6393
6797
  string: {
6394
6798
  unit: {
@@ -6521,12 +6925,12 @@ var error18 = () => {
6521
6925
  };
6522
6926
  function hy_default() {
6523
6927
  return {
6524
- localeError: error18()
6928
+ localeError: error20()
6525
6929
  };
6526
6930
  }
6527
6931
 
6528
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
6529
- var error19 = () => {
6932
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.js
6933
+ var error21 = () => {
6530
6934
  const Sizable = {
6531
6935
  string: { unit: "karakter", verb: "memiliki" },
6532
6936
  file: { unit: "byte", verb: "memiliki" },
@@ -6628,12 +7032,12 @@ var error19 = () => {
6628
7032
  };
6629
7033
  function id_default() {
6630
7034
  return {
6631
- localeError: error19()
7035
+ localeError: error21()
6632
7036
  };
6633
7037
  }
6634
7038
 
6635
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
6636
- var error20 = () => {
7039
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.js
7040
+ var error22 = () => {
6637
7041
  const Sizable = {
6638
7042
  string: { unit: "stafi", verb: "a\xF0 hafa" },
6639
7043
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -6738,12 +7142,12 @@ var error20 = () => {
6738
7142
  };
6739
7143
  function is_default() {
6740
7144
  return {
6741
- localeError: error20()
7145
+ localeError: error22()
6742
7146
  };
6743
7147
  }
6744
7148
 
6745
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
6746
- var error21 = () => {
7149
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.js
7150
+ var error23 = () => {
6747
7151
  const Sizable = {
6748
7152
  string: { unit: "caratteri", verb: "avere" },
6749
7153
  file: { unit: "byte", verb: "avere" },
@@ -6828,7 +7232,7 @@ var error21 = () => {
6828
7232
  return `Stringa non valida: deve includere "${_issue.includes}"`;
6829
7233
  if (_issue.format === "regex")
6830
7234
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
6831
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
7235
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
6832
7236
  }
6833
7237
  case "not_multiple_of":
6834
7238
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -6847,12 +7251,12 @@ var error21 = () => {
6847
7251
  };
6848
7252
  function it_default() {
6849
7253
  return {
6850
- localeError: error21()
7254
+ localeError: error23()
6851
7255
  };
6852
7256
  }
6853
7257
 
6854
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
6855
- var error22 = () => {
7258
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.js
7259
+ var error24 = () => {
6856
7260
  const Sizable = {
6857
7261
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
6858
7262
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -6955,12 +7359,12 @@ var error22 = () => {
6955
7359
  };
6956
7360
  function ja_default() {
6957
7361
  return {
6958
- localeError: error22()
7362
+ localeError: error24()
6959
7363
  };
6960
7364
  }
6961
7365
 
6962
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
6963
- var error23 = () => {
7366
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.js
7367
+ var error25 = () => {
6964
7368
  const Sizable = {
6965
7369
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
6966
7370
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -6993,9 +7397,9 @@ var error23 = () => {
6993
7397
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
6994
7398
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6995
7399
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6996
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6997
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6998
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7400
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7401
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7402
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
6999
7403
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
7000
7404
  jwt: "JWT",
7001
7405
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -7003,7 +7407,7 @@ var error23 = () => {
7003
7407
  const TypeDictionary = {
7004
7408
  nan: "NaN",
7005
7409
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
7006
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7410
+ string: "\u10D5\u10D4\u10DA\u10D8",
7007
7411
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
7008
7412
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
7009
7413
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -7041,14 +7445,14 @@ var error23 = () => {
7041
7445
  case "invalid_format": {
7042
7446
  const _issue = issue2;
7043
7447
  if (_issue.format === "starts_with") {
7044
- 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`;
7448
+ 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`;
7045
7449
  }
7046
7450
  if (_issue.format === "ends_with")
7047
- 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`;
7451
+ 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`;
7048
7452
  if (_issue.format === "includes")
7049
- 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`;
7453
+ 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`;
7050
7454
  if (_issue.format === "regex")
7051
- 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}`;
7455
+ 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}`;
7052
7456
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
7053
7457
  }
7054
7458
  case "not_multiple_of":
@@ -7068,12 +7472,12 @@ var error23 = () => {
7068
7472
  };
7069
7473
  function ka_default() {
7070
7474
  return {
7071
- localeError: error23()
7475
+ localeError: error25()
7072
7476
  };
7073
7477
  }
7074
7478
 
7075
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
7076
- var error24 = () => {
7479
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.js
7480
+ var error26 = () => {
7077
7481
  const Sizable = {
7078
7482
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
7079
7483
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7179,17 +7583,17 @@ var error24 = () => {
7179
7583
  };
7180
7584
  function km_default() {
7181
7585
  return {
7182
- localeError: error24()
7586
+ localeError: error26()
7183
7587
  };
7184
7588
  }
7185
7589
 
7186
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
7590
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
7187
7591
  function kh_default() {
7188
7592
  return km_default();
7189
7593
  }
7190
7594
 
7191
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
7192
- var error25 = () => {
7595
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.js
7596
+ var error27 = () => {
7193
7597
  const Sizable = {
7194
7598
  string: { unit: "\uBB38\uC790", verb: "to have" },
7195
7599
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7296,11 +7700,11 @@ var error25 = () => {
7296
7700
  };
7297
7701
  function ko_default() {
7298
7702
  return {
7299
- localeError: error25()
7703
+ localeError: error27()
7300
7704
  };
7301
7705
  }
7302
7706
 
7303
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
7707
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
7304
7708
  var capitalizeFirstCharacter = (text) => {
7305
7709
  return text.charAt(0).toUpperCase() + text.slice(1);
7306
7710
  };
@@ -7314,7 +7718,7 @@ function getUnitTypeFromNumber(number4) {
7314
7718
  return "one";
7315
7719
  return "few";
7316
7720
  }
7317
- var error26 = () => {
7721
+ var error28 = () => {
7318
7722
  const Sizable = {
7319
7723
  string: {
7320
7724
  unit: {
@@ -7500,12 +7904,12 @@ var error26 = () => {
7500
7904
  };
7501
7905
  function lt_default() {
7502
7906
  return {
7503
- localeError: error26()
7907
+ localeError: error28()
7504
7908
  };
7505
7909
  }
7506
7910
 
7507
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
7508
- var error27 = () => {
7911
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.js
7912
+ var error29 = () => {
7509
7913
  const Sizable = {
7510
7914
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
7511
7915
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -7610,12 +8014,12 @@ var error27 = () => {
7610
8014
  };
7611
8015
  function mk_default() {
7612
8016
  return {
7613
- localeError: error27()
8017
+ localeError: error29()
7614
8018
  };
7615
8019
  }
7616
8020
 
7617
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
7618
- var error28 = () => {
8021
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.js
8022
+ var error30 = () => {
7619
8023
  const Sizable = {
7620
8024
  string: { unit: "aksara", verb: "mempunyai" },
7621
8025
  file: { unit: "bait", verb: "mempunyai" },
@@ -7718,12 +8122,12 @@ var error28 = () => {
7718
8122
  };
7719
8123
  function ms_default() {
7720
8124
  return {
7721
- localeError: error28()
8125
+ localeError: error30()
7722
8126
  };
7723
8127
  }
7724
8128
 
7725
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
7726
- var error29 = () => {
8129
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.js
8130
+ var error31 = () => {
7727
8131
  const Sizable = {
7728
8132
  string: { unit: "tekens", verb: "heeft" },
7729
8133
  file: { unit: "bytes", verb: "heeft" },
@@ -7829,12 +8233,12 @@ var error29 = () => {
7829
8233
  };
7830
8234
  function nl_default() {
7831
8235
  return {
7832
- localeError: error29()
8236
+ localeError: error31()
7833
8237
  };
7834
8238
  }
7835
8239
 
7836
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
7837
- var error30 = () => {
8240
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.js
8241
+ var error32 = () => {
7838
8242
  const Sizable = {
7839
8243
  string: { unit: "tegn", verb: "\xE5 ha" },
7840
8244
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -7938,12 +8342,12 @@ var error30 = () => {
7938
8342
  };
7939
8343
  function no_default() {
7940
8344
  return {
7941
- localeError: error30()
8345
+ localeError: error32()
7942
8346
  };
7943
8347
  }
7944
8348
 
7945
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
7946
- var error31 = () => {
8349
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.js
8350
+ var error33 = () => {
7947
8351
  const Sizable = {
7948
8352
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
7949
8353
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -8048,12 +8452,12 @@ var error31 = () => {
8048
8452
  };
8049
8453
  function ota_default() {
8050
8454
  return {
8051
- localeError: error31()
8455
+ localeError: error33()
8052
8456
  };
8053
8457
  }
8054
8458
 
8055
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
8056
- var error32 = () => {
8459
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.js
8460
+ var error34 = () => {
8057
8461
  const Sizable = {
8058
8462
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
8059
8463
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -8163,12 +8567,12 @@ var error32 = () => {
8163
8567
  };
8164
8568
  function ps_default() {
8165
8569
  return {
8166
- localeError: error32()
8570
+ localeError: error34()
8167
8571
  };
8168
8572
  }
8169
8573
 
8170
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
8171
- var error33 = () => {
8574
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.js
8575
+ var error35 = () => {
8172
8576
  const Sizable = {
8173
8577
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
8174
8578
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8273,12 +8677,12 @@ var error33 = () => {
8273
8677
  };
8274
8678
  function pl_default() {
8275
8679
  return {
8276
- localeError: error33()
8680
+ localeError: error35()
8277
8681
  };
8278
8682
  }
8279
8683
 
8280
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
8281
- var error34 = () => {
8684
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.js
8685
+ var error36 = () => {
8282
8686
  const Sizable = {
8283
8687
  string: { unit: "caracteres", verb: "ter" },
8284
8688
  file: { unit: "bytes", verb: "ter" },
@@ -8382,11 +8786,131 @@ var error34 = () => {
8382
8786
  };
8383
8787
  function pt_default() {
8384
8788
  return {
8385
- localeError: error34()
8789
+ localeError: error36()
8790
+ };
8791
+ }
8792
+
8793
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.js
8794
+ var error37 = () => {
8795
+ const Sizable = {
8796
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
8797
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
8798
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8799
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8800
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
8801
+ };
8802
+ function getSizing(origin) {
8803
+ return Sizable[origin] ?? null;
8804
+ }
8805
+ const FormatDictionary = {
8806
+ regex: "intrare",
8807
+ email: "adres\u0103 de email",
8808
+ url: "URL",
8809
+ emoji: "emoji",
8810
+ uuid: "UUID",
8811
+ uuidv4: "UUIDv4",
8812
+ uuidv6: "UUIDv6",
8813
+ nanoid: "nanoid",
8814
+ guid: "GUID",
8815
+ cuid: "cuid",
8816
+ cuid2: "cuid2",
8817
+ ulid: "ULID",
8818
+ xid: "XID",
8819
+ ksuid: "KSUID",
8820
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
8821
+ date: "dat\u0103 ISO",
8822
+ time: "or\u0103 ISO",
8823
+ duration: "durat\u0103 ISO",
8824
+ ipv4: "adres\u0103 IPv4",
8825
+ ipv6: "adres\u0103 IPv6",
8826
+ mac: "adres\u0103 MAC",
8827
+ cidrv4: "interval IPv4",
8828
+ cidrv6: "interval IPv6",
8829
+ base64: "\u0219ir codat base64",
8830
+ base64url: "\u0219ir codat base64url",
8831
+ json_string: "\u0219ir JSON",
8832
+ e164: "num\u0103r E.164",
8833
+ jwt: "JWT",
8834
+ template_literal: "intrare"
8835
+ };
8836
+ const TypeDictionary = {
8837
+ nan: "NaN",
8838
+ string: "\u0219ir",
8839
+ number: "num\u0103r",
8840
+ boolean: "boolean",
8841
+ function: "func\u021Bie",
8842
+ array: "matrice",
8843
+ object: "obiect",
8844
+ undefined: "nedefinit",
8845
+ symbol: "simbol",
8846
+ bigint: "num\u0103r mare",
8847
+ void: "void",
8848
+ never: "never",
8849
+ map: "hart\u0103",
8850
+ set: "set"
8851
+ };
8852
+ return (issue2) => {
8853
+ switch (issue2.code) {
8854
+ case "invalid_type": {
8855
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
8856
+ const receivedType = parsedType(issue2.input);
8857
+ const received = TypeDictionary[receivedType] ?? receivedType;
8858
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
8859
+ }
8860
+ case "invalid_value":
8861
+ if (issue2.values.length === 1)
8862
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
8863
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
8864
+ case "too_big": {
8865
+ const adj = issue2.inclusive ? "<=" : "<";
8866
+ const sizing = getSizing(issue2.origin);
8867
+ if (sizing)
8868
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
8869
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
8870
+ }
8871
+ case "too_small": {
8872
+ const adj = issue2.inclusive ? ">=" : ">";
8873
+ const sizing = getSizing(issue2.origin);
8874
+ if (sizing) {
8875
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8876
+ }
8877
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
8878
+ }
8879
+ case "invalid_format": {
8880
+ const _issue = issue2;
8881
+ if (_issue.format === "starts_with") {
8882
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
8883
+ }
8884
+ if (_issue.format === "ends_with")
8885
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
8886
+ if (_issue.format === "includes")
8887
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
8888
+ if (_issue.format === "regex")
8889
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
8890
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
8891
+ }
8892
+ case "not_multiple_of":
8893
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
8894
+ case "unrecognized_keys":
8895
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
8896
+ case "invalid_key":
8897
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
8898
+ case "invalid_union":
8899
+ return "Intrare invalid\u0103";
8900
+ case "invalid_element":
8901
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
8902
+ default:
8903
+ return `Intrare invalid\u0103`;
8904
+ }
8905
+ };
8906
+ };
8907
+ function ro_default() {
8908
+ return {
8909
+ localeError: error37()
8386
8910
  };
8387
8911
  }
8388
8912
 
8389
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
8913
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.js
8390
8914
  function getRussianPlural(count, one, few, many) {
8391
8915
  const absCount = Math.abs(count);
8392
8916
  const lastDigit = absCount % 10;
@@ -8402,7 +8926,7 @@ function getRussianPlural(count, one, few, many) {
8402
8926
  }
8403
8927
  return many;
8404
8928
  }
8405
- var error35 = () => {
8929
+ var error38 = () => {
8406
8930
  const Sizable = {
8407
8931
  string: {
8408
8932
  unit: {
@@ -8539,12 +9063,12 @@ var error35 = () => {
8539
9063
  };
8540
9064
  function ru_default() {
8541
9065
  return {
8542
- localeError: error35()
9066
+ localeError: error38()
8543
9067
  };
8544
9068
  }
8545
9069
 
8546
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
8547
- var error36 = () => {
9070
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.js
9071
+ var error39 = () => {
8548
9072
  const Sizable = {
8549
9073
  string: { unit: "znakov", verb: "imeti" },
8550
9074
  file: { unit: "bajtov", verb: "imeti" },
@@ -8649,12 +9173,12 @@ var error36 = () => {
8649
9173
  };
8650
9174
  function sl_default() {
8651
9175
  return {
8652
- localeError: error36()
9176
+ localeError: error39()
8653
9177
  };
8654
9178
  }
8655
9179
 
8656
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
8657
- var error37 = () => {
9180
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.js
9181
+ var error40 = () => {
8658
9182
  const Sizable = {
8659
9183
  string: { unit: "tecken", verb: "att ha" },
8660
9184
  file: { unit: "bytes", verb: "att ha" },
@@ -8760,12 +9284,12 @@ var error37 = () => {
8760
9284
  };
8761
9285
  function sv_default() {
8762
9286
  return {
8763
- localeError: error37()
9287
+ localeError: error40()
8764
9288
  };
8765
9289
  }
8766
9290
 
8767
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
8768
- var error38 = () => {
9291
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.js
9292
+ var error41 = () => {
8769
9293
  const Sizable = {
8770
9294
  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" },
8771
9295
  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" },
@@ -8871,12 +9395,12 @@ var error38 = () => {
8871
9395
  };
8872
9396
  function ta_default() {
8873
9397
  return {
8874
- localeError: error38()
9398
+ localeError: error41()
8875
9399
  };
8876
9400
  }
8877
9401
 
8878
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
8879
- var error39 = () => {
9402
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.js
9403
+ var error42 = () => {
8880
9404
  const Sizable = {
8881
9405
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
8882
9406
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -8982,12 +9506,12 @@ var error39 = () => {
8982
9506
  };
8983
9507
  function th_default() {
8984
9508
  return {
8985
- localeError: error39()
9509
+ localeError: error42()
8986
9510
  };
8987
9511
  }
8988
9512
 
8989
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
8990
- var error40 = () => {
9513
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.js
9514
+ var error43 = () => {
8991
9515
  const Sizable = {
8992
9516
  string: { unit: "karakter", verb: "olmal\u0131" },
8993
9517
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -9088,12 +9612,12 @@ var error40 = () => {
9088
9612
  };
9089
9613
  function tr_default() {
9090
9614
  return {
9091
- localeError: error40()
9615
+ localeError: error43()
9092
9616
  };
9093
9617
  }
9094
9618
 
9095
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
9096
- var error41 = () => {
9619
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.js
9620
+ var error44 = () => {
9097
9621
  const Sizable = {
9098
9622
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
9099
9623
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9197,17 +9721,17 @@ var error41 = () => {
9197
9721
  };
9198
9722
  function uk_default() {
9199
9723
  return {
9200
- localeError: error41()
9724
+ localeError: error44()
9201
9725
  };
9202
9726
  }
9203
9727
 
9204
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
9728
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
9205
9729
  function ua_default() {
9206
9730
  return uk_default();
9207
9731
  }
9208
9732
 
9209
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
9210
- var error42 = () => {
9733
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.js
9734
+ var error45 = () => {
9211
9735
  const Sizable = {
9212
9736
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9213
9737
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9313,17 +9837,18 @@ var error42 = () => {
9313
9837
  };
9314
9838
  function ur_default() {
9315
9839
  return {
9316
- localeError: error42()
9840
+ localeError: error45()
9317
9841
  };
9318
9842
  }
9319
9843
 
9320
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
9321
- var error43 = () => {
9844
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.js
9845
+ var error46 = () => {
9322
9846
  const Sizable = {
9323
9847
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
9324
9848
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
9325
9849
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
9326
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
9850
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
9851
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
9327
9852
  };
9328
9853
  function getSizing(origin) {
9329
9854
  return Sizable[origin] ?? null;
@@ -9423,12 +9948,12 @@ var error43 = () => {
9423
9948
  };
9424
9949
  function uz_default() {
9425
9950
  return {
9426
- localeError: error43()
9951
+ localeError: error46()
9427
9952
  };
9428
9953
  }
9429
9954
 
9430
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
9431
- var error44 = () => {
9955
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.js
9956
+ var error47 = () => {
9432
9957
  const Sizable = {
9433
9958
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
9434
9959
  file: { unit: "byte", verb: "c\xF3" },
@@ -9532,12 +10057,12 @@ var error44 = () => {
9532
10057
  };
9533
10058
  function vi_default() {
9534
10059
  return {
9535
- localeError: error44()
10060
+ localeError: error47()
9536
10061
  };
9537
10062
  }
9538
10063
 
9539
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
9540
- var error45 = () => {
10064
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
10065
+ var error48 = () => {
9541
10066
  const Sizable = {
9542
10067
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
9543
10068
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -9642,12 +10167,12 @@ var error45 = () => {
9642
10167
  };
9643
10168
  function zh_CN_default() {
9644
10169
  return {
9645
- localeError: error45()
10170
+ localeError: error48()
9646
10171
  };
9647
10172
  }
9648
10173
 
9649
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
9650
- var error46 = () => {
10174
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
10175
+ var error49 = () => {
9651
10176
  const Sizable = {
9652
10177
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
9653
10178
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -9750,12 +10275,12 @@ var error46 = () => {
9750
10275
  };
9751
10276
  function zh_TW_default() {
9752
10277
  return {
9753
- localeError: error46()
10278
+ localeError: error49()
9754
10279
  };
9755
10280
  }
9756
10281
 
9757
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
9758
- var error47 = () => {
10282
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.js
10283
+ var error50 = () => {
9759
10284
  const Sizable = {
9760
10285
  string: { unit: "\xE0mi", verb: "n\xED" },
9761
10286
  file: { unit: "bytes", verb: "n\xED" },
@@ -9858,12 +10383,12 @@ var error47 = () => {
9858
10383
  };
9859
10384
  function yo_default() {
9860
10385
  return {
9861
- localeError: error47()
10386
+ localeError: error50()
9862
10387
  };
9863
10388
  }
9864
10389
 
9865
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
9866
- var _a;
10390
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
10391
+ var _a2;
9867
10392
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
9868
10393
  var $input = /* @__PURE__ */ Symbol("ZodInput");
9869
10394
  var $ZodRegistry = class {
@@ -9909,10 +10434,10 @@ var $ZodRegistry = class {
9909
10434
  function registry() {
9910
10435
  return new $ZodRegistry();
9911
10436
  }
9912
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10437
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
9913
10438
  var globalRegistry = globalThis.__zod_globalRegistry;
9914
10439
 
9915
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
10440
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
9916
10441
  // @__NO_SIDE_EFFECTS__
9917
10442
  function _string(Class2, params) {
9918
10443
  return new Class2({
@@ -10827,7 +11352,7 @@ function _refine(Class2, fn, _params) {
10827
11352
  return schema;
10828
11353
  }
10829
11354
  // @__NO_SIDE_EFFECTS__
10830
- function _superRefine(fn) {
11355
+ function _superRefine(fn, params) {
10831
11356
  const ch = /* @__PURE__ */ _check((payload) => {
10832
11357
  payload.addIssue = (issue2) => {
10833
11358
  if (typeof issue2 === "string") {
@@ -10844,7 +11369,7 @@ function _superRefine(fn) {
10844
11369
  }
10845
11370
  };
10846
11371
  return fn(payload.value, payload);
10847
- });
11372
+ }, params);
10848
11373
  return ch;
10849
11374
  }
10850
11375
  // @__NO_SIDE_EFFECTS__
@@ -10951,7 +11476,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
10951
11476
  return inst;
10952
11477
  }
10953
11478
 
10954
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
11479
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
10955
11480
  function initializeContext(params) {
10956
11481
  let target = params?.target ?? "draft-2020-12";
10957
11482
  if (target === "draft-4")
@@ -10974,7 +11499,7 @@ function initializeContext(params) {
10974
11499
  };
10975
11500
  }
10976
11501
  function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
10977
- var _a2;
11502
+ var _a3;
10978
11503
  const def = schema._zod.def;
10979
11504
  const seen = ctx.seen.get(schema);
10980
11505
  if (seen) {
@@ -11021,8 +11546,8 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
11021
11546
  delete result.schema.examples;
11022
11547
  delete result.schema.default;
11023
11548
  }
11024
- if (ctx.io === "input" && result.schema._prefault)
11025
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
11549
+ if (ctx.io === "input" && "_prefault" in result.schema)
11550
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
11026
11551
  delete result.schema._prefault;
11027
11552
  const _result = ctx.seen.get(schema);
11028
11553
  return _result.schema;
@@ -11203,10 +11728,15 @@ function finalize(ctx, schema) {
11203
11728
  result.$id = ctx.external.uri(id);
11204
11729
  }
11205
11730
  Object.assign(result, root.def ?? root.schema);
11731
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
11732
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
11733
+ delete result.id;
11206
11734
  const defs = ctx.external?.defs ?? {};
11207
11735
  for (const entry of ctx.seen.entries()) {
11208
11736
  const seen = entry[1];
11209
11737
  if (seen.def && seen.defId) {
11738
+ if (seen.def.id === seen.defId)
11739
+ delete seen.def.id;
11210
11740
  defs[seen.defId] = seen.def;
11211
11741
  }
11212
11742
  }
@@ -11262,6 +11792,8 @@ function isTransforming(_schema, _ctx) {
11262
11792
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
11263
11793
  }
11264
11794
  if (def.type === "pipe") {
11795
+ if (_schema._zod.traits.has("$ZodCodec"))
11796
+ return true;
11265
11797
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
11266
11798
  }
11267
11799
  if (def.type === "object") {
@@ -11303,7 +11835,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
11303
11835
  return finalize(ctx, schema);
11304
11836
  };
11305
11837
 
11306
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
11838
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
11307
11839
  var formatMap = {
11308
11840
  guid: "uuid",
11309
11841
  url: "uri",
@@ -11351,39 +11883,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
11351
11883
  json2.type = "integer";
11352
11884
  else
11353
11885
  json2.type = "number";
11354
- if (typeof exclusiveMinimum === "number") {
11355
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11886
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
11887
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
11888
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
11889
+ if (exMin) {
11890
+ if (legacy) {
11356
11891
  json2.minimum = exclusiveMinimum;
11357
11892
  json2.exclusiveMinimum = true;
11358
11893
  } else {
11359
11894
  json2.exclusiveMinimum = exclusiveMinimum;
11360
11895
  }
11361
- }
11362
- if (typeof minimum === "number") {
11896
+ } else if (typeof minimum === "number") {
11363
11897
  json2.minimum = minimum;
11364
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
11365
- if (exclusiveMinimum >= minimum)
11366
- delete json2.minimum;
11367
- else
11368
- delete json2.exclusiveMinimum;
11369
- }
11370
11898
  }
11371
- if (typeof exclusiveMaximum === "number") {
11372
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11899
+ if (exMax) {
11900
+ if (legacy) {
11373
11901
  json2.maximum = exclusiveMaximum;
11374
11902
  json2.exclusiveMaximum = true;
11375
11903
  } else {
11376
11904
  json2.exclusiveMaximum = exclusiveMaximum;
11377
11905
  }
11378
- }
11379
- if (typeof maximum === "number") {
11906
+ } else if (typeof maximum === "number") {
11380
11907
  json2.maximum = maximum;
11381
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
11382
- if (exclusiveMaximum <= maximum)
11383
- delete json2.maximum;
11384
- else
11385
- delete json2.exclusiveMaximum;
11386
- }
11387
11908
  }
11388
11909
  if (typeof multipleOf === "number")
11389
11910
  json2.multipleOf = multipleOf;
@@ -11555,7 +12076,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
11555
12076
  if (typeof maximum === "number")
11556
12077
  json2.maxItems = maximum;
11557
12078
  json2.type = "array";
11558
- json2.items = process(def.element, ctx, { ...params, path: [...params.path, "items"] });
12079
+ json2.items = process(def.element, ctx, {
12080
+ ...params,
12081
+ path: [...params.path, "items"]
12082
+ });
11559
12083
  };
11560
12084
  var objectProcessor = (schema, ctx, _json, params) => {
11561
12085
  const json2 = _json;
@@ -11748,7 +12272,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
11748
12272
  };
11749
12273
  var pipeProcessor = (schema, ctx, _json, params) => {
11750
12274
  const def = schema._zod.def;
11751
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
12275
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
12276
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
11752
12277
  process(innerType, ctx, params);
11753
12278
  const seen = ctx.seen.get(schema);
11754
12279
  seen.ref = innerType;
@@ -11854,7 +12379,7 @@ function toJSONSchema(input, params) {
11854
12379
  return finalize(ctx, input);
11855
12380
  }
11856
12381
 
11857
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
12382
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
11858
12383
  var JSONSchemaGenerator = class {
11859
12384
  /** @deprecated Access via ctx instead */
11860
12385
  get metadataRegistry() {
@@ -11929,10 +12454,10 @@ var JSONSchemaGenerator = class {
11929
12454
  }
11930
12455
  };
11931
12456
 
11932
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
12457
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
11933
12458
  var json_schema_exports = {};
11934
12459
 
11935
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
12460
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
11936
12461
  var schemas_exports2 = {};
11937
12462
  __export(schemas_exports2, {
11938
12463
  ZodAny: () => ZodAny,
@@ -11982,6 +12507,7 @@ __export(schemas_exports2, {
11982
12507
  ZodOptional: () => ZodOptional,
11983
12508
  ZodPipe: () => ZodPipe,
11984
12509
  ZodPrefault: () => ZodPrefault,
12510
+ ZodPreprocess: () => ZodPreprocess,
11985
12511
  ZodPromise: () => ZodPromise,
11986
12512
  ZodReadonly: () => ZodReadonly,
11987
12513
  ZodRecord: () => ZodRecord,
@@ -12042,6 +12568,7 @@ __export(schemas_exports2, {
12042
12568
  int32: () => int32,
12043
12569
  int64: () => int64,
12044
12570
  intersection: () => intersection,
12571
+ invertCodec: () => invertCodec,
12045
12572
  ipv4: () => ipv42,
12046
12573
  ipv6: () => ipv62,
12047
12574
  json: () => json,
@@ -12101,7 +12628,7 @@ __export(schemas_exports2, {
12101
12628
  xor: () => xor
12102
12629
  });
12103
12630
 
12104
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
12631
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/checks.js
12105
12632
  var checks_exports2 = {};
12106
12633
  __export(checks_exports2, {
12107
12634
  endsWith: () => _endsWith,
@@ -12135,7 +12662,7 @@ __export(checks_exports2, {
12135
12662
  uppercase: () => _uppercase
12136
12663
  });
12137
12664
 
12138
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
12665
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
12139
12666
  var iso_exports = {};
12140
12667
  __export(iso_exports, {
12141
12668
  ZodISODate: () => ZodISODate,
@@ -12176,7 +12703,7 @@ function duration2(params) {
12176
12703
  return _isoDuration(ZodISODuration, params);
12177
12704
  }
12178
12705
 
12179
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
12706
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
12180
12707
  var initializer2 = (inst, issues) => {
12181
12708
  $ZodError.init(inst, issues);
12182
12709
  inst.name = "ZodError";
@@ -12211,12 +12738,12 @@ var initializer2 = (inst, issues) => {
12211
12738
  }
12212
12739
  });
12213
12740
  };
12214
- var ZodError = $constructor("ZodError", initializer2);
12215
- var ZodRealError = $constructor("ZodError", initializer2, {
12741
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
12742
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12216
12743
  Parent: Error
12217
12744
  });
12218
12745
 
12219
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
12746
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
12220
12747
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
12221
12748
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
12222
12749
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -12230,7 +12757,44 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
12230
12757
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
12231
12758
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12232
12759
 
12233
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
12760
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
12761
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
12762
+ function _installLazyMethods(inst, group, methods) {
12763
+ const proto = Object.getPrototypeOf(inst);
12764
+ let installed = _installedGroups.get(proto);
12765
+ if (!installed) {
12766
+ installed = /* @__PURE__ */ new Set();
12767
+ _installedGroups.set(proto, installed);
12768
+ }
12769
+ if (installed.has(group))
12770
+ return;
12771
+ installed.add(group);
12772
+ for (const key in methods) {
12773
+ const fn = methods[key];
12774
+ Object.defineProperty(proto, key, {
12775
+ configurable: true,
12776
+ enumerable: false,
12777
+ get() {
12778
+ const bound = fn.bind(this);
12779
+ Object.defineProperty(this, key, {
12780
+ configurable: true,
12781
+ writable: true,
12782
+ enumerable: true,
12783
+ value: bound
12784
+ });
12785
+ return bound;
12786
+ },
12787
+ set(v) {
12788
+ Object.defineProperty(this, key, {
12789
+ configurable: true,
12790
+ writable: true,
12791
+ enumerable: true,
12792
+ value: v
12793
+ });
12794
+ }
12795
+ });
12796
+ }
12797
+ }
12234
12798
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12235
12799
  $ZodType.init(inst, def);
12236
12800
  Object.assign(inst["~standard"], {
@@ -12243,23 +12807,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12243
12807
  inst.def = def;
12244
12808
  inst.type = def.type;
12245
12809
  Object.defineProperty(inst, "_def", { value: def });
12246
- inst.check = (...checks) => {
12247
- return inst.clone(util_exports.mergeDefs(def, {
12248
- checks: [
12249
- ...def.checks ?? [],
12250
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12251
- ]
12252
- }), {
12253
- parent: true
12254
- });
12255
- };
12256
- inst.with = inst.check;
12257
- inst.clone = (def2, params) => clone(inst, def2, params);
12258
- inst.brand = () => inst;
12259
- inst.register = ((reg, meta3) => {
12260
- reg.add(inst, meta3);
12261
- return inst;
12262
- });
12263
12810
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
12264
12811
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
12265
12812
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -12273,70 +12820,165 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12273
12820
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
12274
12821
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
12275
12822
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
12276
- inst.refine = (check2, params) => inst.check(refine(check2, params));
12277
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
12278
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
12279
- inst.optional = () => optional(inst);
12280
- inst.exactOptional = () => exactOptional(inst);
12281
- inst.nullable = () => nullable(inst);
12282
- inst.nullish = () => optional(nullable(inst));
12283
- inst.nonoptional = (params) => nonoptional(inst, params);
12284
- inst.array = () => array(inst);
12285
- inst.or = (arg) => union([inst, arg]);
12286
- inst.and = (arg) => intersection(inst, arg);
12287
- inst.transform = (tx) => pipe(inst, transform(tx));
12288
- inst.default = (def2) => _default2(inst, def2);
12289
- inst.prefault = (def2) => prefault(inst, def2);
12290
- inst.catch = (params) => _catch2(inst, params);
12291
- inst.pipe = (target) => pipe(inst, target);
12292
- inst.readonly = () => readonly(inst);
12293
- inst.describe = (description) => {
12294
- const cl = inst.clone();
12295
- globalRegistry.add(cl, { description });
12296
- return cl;
12297
- };
12823
+ _installLazyMethods(inst, "ZodType", {
12824
+ check(...chks) {
12825
+ const def2 = this.def;
12826
+ return this.clone(util_exports.mergeDefs(def2, {
12827
+ checks: [
12828
+ ...def2.checks ?? [],
12829
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12830
+ ]
12831
+ }), { parent: true });
12832
+ },
12833
+ with(...chks) {
12834
+ return this.check(...chks);
12835
+ },
12836
+ clone(def2, params) {
12837
+ return clone(this, def2, params);
12838
+ },
12839
+ brand() {
12840
+ return this;
12841
+ },
12842
+ register(reg, meta3) {
12843
+ reg.add(this, meta3);
12844
+ return this;
12845
+ },
12846
+ refine(check2, params) {
12847
+ return this.check(refine(check2, params));
12848
+ },
12849
+ superRefine(refinement, params) {
12850
+ return this.check(superRefine(refinement, params));
12851
+ },
12852
+ overwrite(fn) {
12853
+ return this.check(_overwrite(fn));
12854
+ },
12855
+ optional() {
12856
+ return optional(this);
12857
+ },
12858
+ exactOptional() {
12859
+ return exactOptional(this);
12860
+ },
12861
+ nullable() {
12862
+ return nullable(this);
12863
+ },
12864
+ nullish() {
12865
+ return optional(nullable(this));
12866
+ },
12867
+ nonoptional(params) {
12868
+ return nonoptional(this, params);
12869
+ },
12870
+ array() {
12871
+ return array(this);
12872
+ },
12873
+ or(arg) {
12874
+ return union([this, arg]);
12875
+ },
12876
+ and(arg) {
12877
+ return intersection(this, arg);
12878
+ },
12879
+ transform(tx) {
12880
+ return pipe(this, transform(tx));
12881
+ },
12882
+ default(d) {
12883
+ return _default2(this, d);
12884
+ },
12885
+ prefault(d) {
12886
+ return prefault(this, d);
12887
+ },
12888
+ catch(params) {
12889
+ return _catch2(this, params);
12890
+ },
12891
+ pipe(target) {
12892
+ return pipe(this, target);
12893
+ },
12894
+ readonly() {
12895
+ return readonly(this);
12896
+ },
12897
+ describe(description) {
12898
+ const cl = this.clone();
12899
+ globalRegistry.add(cl, { description });
12900
+ return cl;
12901
+ },
12902
+ meta(...args) {
12903
+ if (args.length === 0)
12904
+ return globalRegistry.get(this);
12905
+ const cl = this.clone();
12906
+ globalRegistry.add(cl, args[0]);
12907
+ return cl;
12908
+ },
12909
+ isOptional() {
12910
+ return this.safeParse(void 0).success;
12911
+ },
12912
+ isNullable() {
12913
+ return this.safeParse(null).success;
12914
+ },
12915
+ apply(fn) {
12916
+ return fn(this);
12917
+ }
12918
+ });
12298
12919
  Object.defineProperty(inst, "description", {
12299
12920
  get() {
12300
12921
  return globalRegistry.get(inst)?.description;
12301
12922
  },
12302
12923
  configurable: true
12303
12924
  });
12304
- inst.meta = (...args) => {
12305
- if (args.length === 0) {
12306
- return globalRegistry.get(inst);
12925
+ return inst;
12926
+ });
12927
+ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
12928
+ $ZodString.init(inst, def);
12929
+ ZodType.init(inst, def);
12930
+ inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
12931
+ const bag = inst._zod.bag;
12932
+ inst.format = bag.format ?? null;
12933
+ inst.minLength = bag.minimum ?? null;
12934
+ inst.maxLength = bag.maximum ?? null;
12935
+ _installLazyMethods(inst, "_ZodString", {
12936
+ regex(...args) {
12937
+ return this.check(_regex(...args));
12938
+ },
12939
+ includes(...args) {
12940
+ return this.check(_includes(...args));
12941
+ },
12942
+ startsWith(...args) {
12943
+ return this.check(_startsWith(...args));
12944
+ },
12945
+ endsWith(...args) {
12946
+ return this.check(_endsWith(...args));
12947
+ },
12948
+ min(...args) {
12949
+ return this.check(_minLength(...args));
12950
+ },
12951
+ max(...args) {
12952
+ return this.check(_maxLength(...args));
12953
+ },
12954
+ length(...args) {
12955
+ return this.check(_length(...args));
12956
+ },
12957
+ nonempty(...args) {
12958
+ return this.check(_minLength(1, ...args));
12959
+ },
12960
+ lowercase(params) {
12961
+ return this.check(_lowercase(params));
12962
+ },
12963
+ uppercase(params) {
12964
+ return this.check(_uppercase(params));
12965
+ },
12966
+ trim() {
12967
+ return this.check(_trim());
12968
+ },
12969
+ normalize(...args) {
12970
+ return this.check(_normalize(...args));
12971
+ },
12972
+ toLowerCase() {
12973
+ return this.check(_toLowerCase());
12974
+ },
12975
+ toUpperCase() {
12976
+ return this.check(_toUpperCase());
12977
+ },
12978
+ slugify() {
12979
+ return this.check(_slugify());
12307
12980
  }
12308
- const cl = inst.clone();
12309
- globalRegistry.add(cl, args[0]);
12310
- return cl;
12311
- };
12312
- inst.isOptional = () => inst.safeParse(void 0).success;
12313
- inst.isNullable = () => inst.safeParse(null).success;
12314
- inst.apply = (fn) => fn(inst);
12315
- return inst;
12316
- });
12317
- var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
12318
- $ZodString.init(inst, def);
12319
- ZodType.init(inst, def);
12320
- inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
12321
- const bag = inst._zod.bag;
12322
- inst.format = bag.format ?? null;
12323
- inst.minLength = bag.minimum ?? null;
12324
- inst.maxLength = bag.maximum ?? null;
12325
- inst.regex = (...args) => inst.check(_regex(...args));
12326
- inst.includes = (...args) => inst.check(_includes(...args));
12327
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
12328
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
12329
- inst.min = (...args) => inst.check(_minLength(...args));
12330
- inst.max = (...args) => inst.check(_maxLength(...args));
12331
- inst.length = (...args) => inst.check(_length(...args));
12332
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
12333
- inst.lowercase = (params) => inst.check(_lowercase(params));
12334
- inst.uppercase = (params) => inst.check(_uppercase(params));
12335
- inst.trim = () => inst.check(_trim());
12336
- inst.normalize = (...args) => inst.check(_normalize(...args));
12337
- inst.toLowerCase = () => inst.check(_toLowerCase());
12338
- inst.toUpperCase = () => inst.check(_toUpperCase());
12339
- inst.slugify = () => inst.check(_slugify());
12981
+ });
12340
12982
  });
12341
12983
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
12342
12984
  $ZodString.init(inst, def);
@@ -12415,7 +13057,7 @@ function url(params) {
12415
13057
  }
12416
13058
  function httpUrl(params) {
12417
13059
  return _url(ZodURL, {
12418
- protocol: /^https?$/,
13060
+ protocol: regexes_exports.httpProtocol,
12419
13061
  hostname: regexes_exports.domain,
12420
13062
  ...util_exports.normalizeParams(params)
12421
13063
  });
@@ -12557,21 +13199,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
12557
13199
  $ZodNumber.init(inst, def);
12558
13200
  ZodType.init(inst, def);
12559
13201
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
12560
- inst.gt = (value, params) => inst.check(_gt(value, params));
12561
- inst.gte = (value, params) => inst.check(_gte(value, params));
12562
- inst.min = (value, params) => inst.check(_gte(value, params));
12563
- inst.lt = (value, params) => inst.check(_lt(value, params));
12564
- inst.lte = (value, params) => inst.check(_lte(value, params));
12565
- inst.max = (value, params) => inst.check(_lte(value, params));
12566
- inst.int = (params) => inst.check(int(params));
12567
- inst.safe = (params) => inst.check(int(params));
12568
- inst.positive = (params) => inst.check(_gt(0, params));
12569
- inst.nonnegative = (params) => inst.check(_gte(0, params));
12570
- inst.negative = (params) => inst.check(_lt(0, params));
12571
- inst.nonpositive = (params) => inst.check(_lte(0, params));
12572
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
12573
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
12574
- inst.finite = () => inst;
13202
+ _installLazyMethods(inst, "ZodNumber", {
13203
+ gt(value, params) {
13204
+ return this.check(_gt(value, params));
13205
+ },
13206
+ gte(value, params) {
13207
+ return this.check(_gte(value, params));
13208
+ },
13209
+ min(value, params) {
13210
+ return this.check(_gte(value, params));
13211
+ },
13212
+ lt(value, params) {
13213
+ return this.check(_lt(value, params));
13214
+ },
13215
+ lte(value, params) {
13216
+ return this.check(_lte(value, params));
13217
+ },
13218
+ max(value, params) {
13219
+ return this.check(_lte(value, params));
13220
+ },
13221
+ int(params) {
13222
+ return this.check(int(params));
13223
+ },
13224
+ safe(params) {
13225
+ return this.check(int(params));
13226
+ },
13227
+ positive(params) {
13228
+ return this.check(_gt(0, params));
13229
+ },
13230
+ nonnegative(params) {
13231
+ return this.check(_gte(0, params));
13232
+ },
13233
+ negative(params) {
13234
+ return this.check(_lt(0, params));
13235
+ },
13236
+ nonpositive(params) {
13237
+ return this.check(_lte(0, params));
13238
+ },
13239
+ multipleOf(value, params) {
13240
+ return this.check(_multipleOf(value, params));
13241
+ },
13242
+ step(value, params) {
13243
+ return this.check(_multipleOf(value, params));
13244
+ },
13245
+ finite() {
13246
+ return this;
13247
+ }
13248
+ });
12575
13249
  const bag = inst._zod.bag;
12576
13250
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
12577
13251
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -12718,11 +13392,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
12718
13392
  ZodType.init(inst, def);
12719
13393
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
12720
13394
  inst.element = def.element;
12721
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
12722
- inst.nonempty = (params) => inst.check(_minLength(1, params));
12723
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
12724
- inst.length = (len, params) => inst.check(_length(len, params));
12725
- inst.unwrap = () => inst.element;
13395
+ _installLazyMethods(inst, "ZodArray", {
13396
+ min(n, params) {
13397
+ return this.check(_minLength(n, params));
13398
+ },
13399
+ nonempty(params) {
13400
+ return this.check(_minLength(1, params));
13401
+ },
13402
+ max(n, params) {
13403
+ return this.check(_maxLength(n, params));
13404
+ },
13405
+ length(n, params) {
13406
+ return this.check(_length(n, params));
13407
+ },
13408
+ unwrap() {
13409
+ return this.element;
13410
+ }
13411
+ });
12726
13412
  });
12727
13413
  function array(element, params) {
12728
13414
  return _array(ZodArray, element, params);
@@ -12738,23 +13424,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
12738
13424
  util_exports.defineLazy(inst, "shape", () => {
12739
13425
  return def.shape;
12740
13426
  });
12741
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
12742
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
12743
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
12744
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
12745
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
12746
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
12747
- inst.extend = (incoming) => {
12748
- return util_exports.extend(inst, incoming);
12749
- };
12750
- inst.safeExtend = (incoming) => {
12751
- return util_exports.safeExtend(inst, incoming);
12752
- };
12753
- inst.merge = (other) => util_exports.merge(inst, other);
12754
- inst.pick = (mask) => util_exports.pick(inst, mask);
12755
- inst.omit = (mask) => util_exports.omit(inst, mask);
12756
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
12757
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
13427
+ _installLazyMethods(inst, "ZodObject", {
13428
+ keyof() {
13429
+ return _enum2(Object.keys(this._zod.def.shape));
13430
+ },
13431
+ catchall(catchall) {
13432
+ return this.clone({ ...this._zod.def, catchall });
13433
+ },
13434
+ passthrough() {
13435
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13436
+ },
13437
+ loose() {
13438
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13439
+ },
13440
+ strict() {
13441
+ return this.clone({ ...this._zod.def, catchall: never() });
13442
+ },
13443
+ strip() {
13444
+ return this.clone({ ...this._zod.def, catchall: void 0 });
13445
+ },
13446
+ extend(incoming) {
13447
+ return util_exports.extend(this, incoming);
13448
+ },
13449
+ safeExtend(incoming) {
13450
+ return util_exports.safeExtend(this, incoming);
13451
+ },
13452
+ merge(other) {
13453
+ return util_exports.merge(this, other);
13454
+ },
13455
+ pick(mask) {
13456
+ return util_exports.pick(this, mask);
13457
+ },
13458
+ omit(mask) {
13459
+ return util_exports.omit(this, mask);
13460
+ },
13461
+ partial(...args) {
13462
+ return util_exports.partial(ZodOptional, this, args[0]);
13463
+ },
13464
+ required(...args) {
13465
+ return util_exports.required(ZodNonOptional, this, args[0]);
13466
+ }
13467
+ });
12758
13468
  });
12759
13469
  function object(shape, params) {
12760
13470
  const def = {
@@ -12859,6 +13569,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
12859
13569
  inst.valueType = def.valueType;
12860
13570
  });
12861
13571
  function record(keyType, valueType, params) {
13572
+ if (!valueType || !valueType._zod) {
13573
+ return new ZodRecord({
13574
+ type: "record",
13575
+ keyType: string2(),
13576
+ valueType: keyType,
13577
+ ...util_exports.normalizeParams(valueType)
13578
+ });
13579
+ }
12862
13580
  return new ZodRecord({
12863
13581
  type: "record",
12864
13582
  keyType,
@@ -13030,10 +13748,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
13030
13748
  if (output instanceof Promise) {
13031
13749
  return output.then((output2) => {
13032
13750
  payload.value = output2;
13751
+ payload.fallback = true;
13033
13752
  return payload;
13034
13753
  });
13035
13754
  }
13036
13755
  payload.value = output;
13756
+ payload.fallback = true;
13037
13757
  return payload;
13038
13758
  };
13039
13759
  });
@@ -13188,6 +13908,20 @@ function codec(in_, out, params) {
13188
13908
  reverseTransform: params.encode
13189
13909
  });
13190
13910
  }
13911
+ function invertCodec(codec2) {
13912
+ const def = codec2._zod.def;
13913
+ return new ZodCodec({
13914
+ type: "pipe",
13915
+ in: def.out,
13916
+ out: def.in,
13917
+ transform: def.reverseTransform,
13918
+ reverseTransform: def.transform
13919
+ });
13920
+ }
13921
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
13922
+ ZodPipe.init(inst, def);
13923
+ $ZodPreprocess.init(inst, def);
13924
+ });
13191
13925
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13192
13926
  $ZodReadonly.init(inst, def);
13193
13927
  ZodType.init(inst, def);
@@ -13267,8 +14001,8 @@ function custom(fn, _params) {
13267
14001
  function refine(fn, _params = {}) {
13268
14002
  return _refine(ZodCustom, fn, _params);
13269
14003
  }
13270
- function superRefine(fn) {
13271
- return _superRefine(fn);
14004
+ function superRefine(fn, params) {
14005
+ return _superRefine(fn, params);
13272
14006
  }
13273
14007
  var describe2 = describe;
13274
14008
  var meta2 = meta;
@@ -13306,10 +14040,14 @@ function json(params) {
13306
14040
  return jsonSchema;
13307
14041
  }
13308
14042
  function preprocess(fn, schema) {
13309
- return pipe(transform(fn), schema);
14043
+ return new ZodPreprocess({
14044
+ type: "pipe",
14045
+ in: transform(fn),
14046
+ out: schema
14047
+ });
13310
14048
  }
13311
14049
 
13312
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
14050
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
13313
14051
  var ZodIssueCode = {
13314
14052
  invalid_type: "invalid_type",
13315
14053
  too_big: "too_big",
@@ -13335,7 +14073,7 @@ var ZodFirstPartyTypeKind;
13335
14073
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
13336
14074
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
13337
14075
 
13338
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
14076
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
13339
14077
  var z = {
13340
14078
  ...schemas_exports2,
13341
14079
  ...checks_exports2,
@@ -13727,12 +14465,6 @@ function convertBaseSchema(schema, ctx) {
13727
14465
  default:
13728
14466
  throw new Error(`Unsupported type: ${type}`);
13729
14467
  }
13730
- if (schema.description) {
13731
- zodSchema = zodSchema.describe(schema.description);
13732
- }
13733
- if (schema.default !== void 0) {
13734
- zodSchema = zodSchema.default(schema.default);
13735
- }
13736
14468
  return zodSchema;
13737
14469
  }
13738
14470
  function convertSchema(schema, ctx) {
@@ -13769,6 +14501,9 @@ function convertSchema(schema, ctx) {
13769
14501
  if (schema.readOnly === true) {
13770
14502
  baseSchema = z.readonly(baseSchema);
13771
14503
  }
14504
+ if (schema.default !== void 0) {
14505
+ baseSchema = baseSchema.default(schema.default);
14506
+ }
13772
14507
  const extraMeta = {};
13773
14508
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
13774
14509
  for (const key of coreMetadataKeys) {
@@ -13790,26 +14525,35 @@ function convertSchema(schema, ctx) {
13790
14525
  if (Object.keys(extraMeta).length > 0) {
13791
14526
  ctx.registry.add(baseSchema, extraMeta);
13792
14527
  }
14528
+ if (schema.description) {
14529
+ baseSchema = baseSchema.describe(schema.description);
14530
+ }
13793
14531
  return baseSchema;
13794
14532
  }
13795
14533
  function fromJSONSchema(schema, params) {
13796
14534
  if (typeof schema === "boolean") {
13797
14535
  return schema ? z.any() : z.never();
13798
14536
  }
13799
- const version2 = detectVersion(schema, params?.defaultTarget);
13800
- const defs = schema.$defs || schema.definitions || {};
14537
+ let normalized;
14538
+ try {
14539
+ normalized = JSON.parse(JSON.stringify(schema));
14540
+ } catch {
14541
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
14542
+ }
14543
+ const version2 = detectVersion(normalized, params?.defaultTarget);
14544
+ const defs = normalized.$defs || normalized.definitions || {};
13801
14545
  const ctx = {
13802
14546
  version: version2,
13803
14547
  defs,
13804
14548
  refs: /* @__PURE__ */ new Map(),
13805
14549
  processing: /* @__PURE__ */ new Set(),
13806
- rootSchema: schema,
14550
+ rootSchema: normalized,
13807
14551
  registry: params?.registry ?? globalRegistry
13808
14552
  };
13809
- return convertSchema(schema, ctx);
14553
+ return convertSchema(normalized, ctx);
13810
14554
  }
13811
14555
 
13812
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
14556
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
13813
14557
  var coerce_exports = {};
13814
14558
  __export(coerce_exports, {
13815
14559
  bigint: () => bigint3,
@@ -13834,7 +14578,7 @@ function date4(params) {
13834
14578
  return _coercedDate(ZodDate, params);
13835
14579
  }
13836
14580
 
13837
- // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
14581
+ // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
13838
14582
  config(en_default());
13839
14583
 
13840
14584
  // src/core/payment-info.ts
@@ -13983,7 +14727,6 @@ var LegacyPaymentInfoSchema = external_exports.object({
13983
14727
  minPrice: external_exports.string().optional(),
13984
14728
  maxPrice: external_exports.string().optional(),
13985
14729
  protocols: external_exports.array(external_exports.string()).optional(),
13986
- // RFC §4.4 spec fields
13987
14730
  intent: external_exports.string().optional(),
13988
14731
  method: external_exports.string().optional(),
13989
14732
  amount: external_exports.union([external_exports.string(), external_exports.null()]).optional(),
@@ -14004,9 +14747,8 @@ var OpenApiOperationSchema = external_exports.object({
14004
14747
  description: external_exports.string().optional(),
14005
14748
  tags: external_exports.array(external_exports.string()).optional(),
14006
14749
  security: external_exports.array(external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))).optional(),
14007
- // `in` / `name` are spec-required, but a single malformed parameter must not
14008
- // abort the whole spec keep them optional so discovery is resilient to
14009
- // non-conformant OpenAPI documents in the wild.
14750
+ // `in` / `name` are spec-required but kept optional so a single malformed
14751
+ // parameter cannot abort parsing of an otherwise-valid spec.
14010
14752
  parameters: external_exports.array(
14011
14753
  external_exports.object({
14012
14754
  in: external_exports.string().optional(),
@@ -14020,7 +14762,6 @@ var OpenApiOperationSchema = external_exports.object({
14020
14762
  content: external_exports.record(external_exports.string(), external_exports.object({ schema: external_exports.unknown().optional() }))
14021
14763
  }).optional(),
14022
14764
  responses: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
14023
- // Permissive: vendor extension shape is validated at runtime, never at parse time.
14024
14765
  "x-payment-info": external_exports.unknown().optional()
14025
14766
  });
14026
14767
  var OpenApiPathItemSchema = external_exports.object({
@@ -14034,7 +14775,6 @@ var OpenApiPathItemSchema = external_exports.object({
14034
14775
  trace: OpenApiOperationSchema.optional()
14035
14776
  });
14036
14777
  var OpenApiDocSchema = external_exports.object({
14037
- // TODO(zdql): We should inherit a canonical OpenAPI schema and then extend with our types.
14038
14778
  openapi: external_exports.string(),
14039
14779
  info: external_exports.object({
14040
14780
  title: external_exports.string(),
@@ -14050,24 +14790,23 @@ var OpenApiDocSchema = external_exports.object({
14050
14790
  "x-discovery": external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
14051
14791
  paths: external_exports.record(external_exports.string(), OpenApiPathItemSchema)
14052
14792
  });
14053
- var WellKnownDocSchema = external_exports.object({
14054
- version: external_exports.number().optional(),
14055
- resources: external_exports.array(external_exports.string()).default([]),
14056
- mppResources: external_exports.array(external_exports.string()).optional(),
14057
- description: external_exports.string().optional(),
14058
- ownershipProofs: external_exports.array(external_exports.string()).optional(),
14059
- instructions: external_exports.string().optional()
14060
- });
14061
- var WellKnownParsedSchema = external_exports.object({
14062
- routes: external_exports.array(
14063
- external_exports.object({
14064
- path: external_exports.string(),
14065
- method: external_exports.enum(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"]),
14066
- price: external_exports.string().optional()
14067
- })
14068
- ),
14069
- instructions: external_exports.string().optional()
14070
- });
14793
+
14794
+ // src/core/lib/constants.ts
14795
+ var HTTP_METHODS = /* @__PURE__ */ new Set([
14796
+ "GET",
14797
+ "POST",
14798
+ "PUT",
14799
+ "DELETE",
14800
+ "PATCH",
14801
+ "HEAD",
14802
+ "OPTIONS",
14803
+ "TRACE"
14804
+ ]);
14805
+ var OPENAPI_EXT = {
14806
+ authKind: "x-agentcash-auth-kind",
14807
+ provenance: "x-agentcash-provenance"
14808
+ };
14809
+ var SIWX_AUTH_KIND = "siwx";
14071
14810
 
14072
14811
  // src/core/source/openapi/utils.ts
14073
14812
  function isRecord(value) {
@@ -14078,7 +14817,12 @@ function resolveSecurityFlags(requirements, securitySchemes) {
14078
14817
  let hasSiwx = false;
14079
14818
  for (const requirement of requirements) {
14080
14819
  for (const schemeName of Object.keys(requirement)) {
14081
- if (schemeName === "siwx") {
14820
+ if (schemeName === SIWX_AUTH_KIND) {
14821
+ hasSiwx = true;
14822
+ continue;
14823
+ }
14824
+ const def = securitySchemes[schemeName];
14825
+ if (isRecord(def) && def[OPENAPI_EXT.authKind] === SIWX_AUTH_KIND) {
14082
14826
  hasSiwx = true;
14083
14827
  continue;
14084
14828
  }
@@ -14086,7 +14830,6 @@ function resolveSecurityFlags(requirements, securitySchemes) {
14086
14830
  hasApiKey = true;
14087
14831
  continue;
14088
14832
  }
14089
- const def = securitySchemes[schemeName];
14090
14833
  if (isRecord(def) && def["type"] === "apiKey") hasApiKey = true;
14091
14834
  }
14092
14835
  }
@@ -14094,7 +14837,9 @@ function resolveSecurityFlags(requirements, securitySchemes) {
14094
14837
  }
14095
14838
  function inferAuthMode(operation, globalSecurity, securitySchemes) {
14096
14839
  const hasXPaymentInfo = Boolean(operation["x-payment-info"]);
14097
- const effectiveSecurity = operation.security !== void 0 && operation.security.length > 0 ? operation.security : globalSecurity ?? [];
14840
+ const operationOptsOutOfSecurity = Array.isArray(operation.security) && operation.security.length === 0;
14841
+ if (operationOptsOutOfSecurity && !hasXPaymentInfo) return "unprotected";
14842
+ const effectiveSecurity = operation.security !== void 0 ? operation.security : globalSecurity ?? [];
14098
14843
  const { hasApiKey, hasSiwx } = resolveSecurityFlags(effectiveSecurity, securitySchemes ?? {});
14099
14844
  if (hasXPaymentInfo && hasApiKey) return "apiKey+paid";
14100
14845
  if (hasXPaymentInfo) return "paid";
@@ -14103,19 +14848,6 @@ function inferAuthMode(operation, globalSecurity, securitySchemes) {
14103
14848
  return void 0;
14104
14849
  }
14105
14850
 
14106
- // src/core/lib/constants.ts
14107
- var HTTP_METHODS = /* @__PURE__ */ new Set([
14108
- "GET",
14109
- "POST",
14110
- "PUT",
14111
- "DELETE",
14112
- "PATCH",
14113
- "HEAD",
14114
- "OPTIONS",
14115
- "TRACE"
14116
- ]);
14117
- var DEFAULT_MISSING_METHOD = "POST";
14118
-
14119
14851
  // src/core/lib/url.ts
14120
14852
  function ensureProtocol(target) {
14121
14853
  const trimmed = target.trim();
@@ -14140,11 +14872,6 @@ function normalizePath(pathname) {
14140
14872
  const normalized = prefixed.replace(/\/+/g, "/");
14141
14873
  return normalized !== "/" ? normalized.replace(/\/$/, "") : "/";
14142
14874
  }
14143
- function parseMethod(value) {
14144
- if (!value) return void 0;
14145
- const upper = value.toUpperCase();
14146
- return HTTP_METHODS.has(upper) ? upper : void 0;
14147
- }
14148
14875
  function toAbsoluteUrl(origin, value) {
14149
14876
  try {
14150
14877
  if (/^https?:\/\//i.test(value)) return new URL(value);
@@ -14156,9 +14883,9 @@ function toAbsoluteUrl(origin, value) {
14156
14883
 
14157
14884
  // src/core/source/fetch.ts
14158
14885
  var import_neverthrow = require("neverthrow");
14159
- function toFetchError(err3) {
14160
- const cause = err3 instanceof DOMException && (err3.name === "TimeoutError" || err3.name === "AbortError") ? "timeout" : "network";
14161
- return { cause, message: String(err3) };
14886
+ function toFetchError(err2) {
14887
+ const cause = err2 instanceof DOMException && (err2.name === "TimeoutError" || err2.name === "AbortError") ? "timeout" : "network";
14888
+ return { cause, message: String(err2) };
14162
14889
  }
14163
14890
  function fetchSafe(url2, init) {
14164
14891
  return import_neverthrow.ResultAsync.fromPromise(fetch(url2, init), toFetchError);
@@ -14264,179 +14991,6 @@ function getOpenAPI(origin, headers, signal, specificationOverrideUrl) {
14264
14991
  });
14265
14992
  }
14266
14993
 
14267
- // src/core/source/wellknown/index.ts
14268
- var import_neverthrow5 = require("neverthrow");
14269
-
14270
- // src/core/source/wellknown/x402.ts
14271
- var import_neverthrow3 = require("neverthrow");
14272
- function toWellKnownParsed(origin, doc) {
14273
- const routes = doc.resources.flatMap((entry) => {
14274
- const trimmed = entry.trim();
14275
- if (!trimmed) return [];
14276
- const parts = trimmed.split(/\s+/);
14277
- const maybeMethod = parts.length >= 2 ? parseMethod(parts[0]) : void 0;
14278
- const target = maybeMethod ? parts.slice(1).join(" ") : trimmed;
14279
- const absolute = toAbsoluteUrl(origin, target);
14280
- if (!absolute) return [];
14281
- return [
14282
- {
14283
- path: normalizePath(absolute.pathname),
14284
- method: maybeMethod ?? DEFAULT_MISSING_METHOD
14285
- }
14286
- ];
14287
- });
14288
- return { routes, ...doc.instructions ? { instructions: doc.instructions } : {} };
14289
- }
14290
- async function parseBody2(response, origin, url2) {
14291
- try {
14292
- const payload = await response.json();
14293
- const doc = WellKnownDocSchema.safeParse(payload);
14294
- if (!doc.success) return null;
14295
- const parsed = WellKnownParsedSchema.safeParse(toWellKnownParsed(origin, doc.data));
14296
- if (!parsed.success) return null;
14297
- return {
14298
- raw: payload,
14299
- ...parsed.data,
14300
- protocol: "x402",
14301
- fetchedUrl: url2
14302
- };
14303
- } catch {
14304
- return null;
14305
- }
14306
- }
14307
- function getX402WellKnown(origin, headers, signal) {
14308
- const url2 = `${origin}/.well-known/x402`;
14309
- return fetchSafe(url2, {
14310
- method: "GET",
14311
- headers: { Accept: "application/json", ...headers },
14312
- signal
14313
- }).andThen((response) => {
14314
- if (!response.ok) return (0, import_neverthrow3.okAsync)(null);
14315
- return import_neverthrow3.ResultAsync.fromSafePromise(parseBody2(response, origin, url2));
14316
- });
14317
- }
14318
-
14319
- // src/core/source/wellknown/mpp.ts
14320
- var import_neverthrow4 = require("neverthrow");
14321
- var MppEndpointSchema = external_exports.object({
14322
- method: external_exports.string(),
14323
- path: external_exports.string(),
14324
- description: external_exports.string().optional(),
14325
- payment: external_exports.object({
14326
- intent: external_exports.string().optional(),
14327
- method: external_exports.string().optional(),
14328
- amount: external_exports.string().optional(),
14329
- currency: external_exports.string().optional()
14330
- }).optional()
14331
- });
14332
- var MppWellKnownDocSchema = external_exports.object({
14333
- version: external_exports.number().optional(),
14334
- name: external_exports.string().optional(),
14335
- description: external_exports.string().optional(),
14336
- categories: external_exports.array(external_exports.string()).optional(),
14337
- methods: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
14338
- endpoints: external_exports.array(MppEndpointSchema).default([]),
14339
- docs: external_exports.object({
14340
- homepage: external_exports.string().optional(),
14341
- apiReference: external_exports.string().optional()
14342
- }).optional()
14343
- });
14344
- var MPP_DECIMALS = 6;
14345
- function formatMppAmount(raw) {
14346
- if (!raw) return void 0;
14347
- const n = Number(raw);
14348
- if (!Number.isFinite(n)) return void 0;
14349
- return `$${(n / 10 ** MPP_DECIMALS).toFixed(MPP_DECIMALS)}`;
14350
- }
14351
- function toWellKnownParsed2(doc) {
14352
- const routes = doc.endpoints.flatMap((entry) => {
14353
- const method = parseMethod(entry.method);
14354
- if (!method) return [];
14355
- const path = normalizePath(entry.path);
14356
- if (!path) return [];
14357
- const price = formatMppAmount(entry.payment?.amount);
14358
- return [{ path, method, ...price ? { price } : {} }];
14359
- });
14360
- return {
14361
- routes,
14362
- ...doc.description ? { instructions: doc.description } : {}
14363
- };
14364
- }
14365
- async function parseBody3(response, url2) {
14366
- try {
14367
- const payload = await response.json();
14368
- const doc = MppWellKnownDocSchema.safeParse(payload);
14369
- if (!doc.success) return null;
14370
- const parsed = WellKnownParsedSchema.safeParse(toWellKnownParsed2(doc.data));
14371
- if (!parsed.success) return null;
14372
- return {
14373
- raw: payload,
14374
- ...parsed.data,
14375
- ...doc.data.name ? { title: doc.data.name } : {},
14376
- ...doc.data.description ? { description: doc.data.description } : {},
14377
- protocol: "mpp",
14378
- fetchedUrl: url2
14379
- };
14380
- } catch {
14381
- return null;
14382
- }
14383
- }
14384
- function getMppWellKnown(origin, headers, signal) {
14385
- const url2 = `${origin}/.well-known/mpp`;
14386
- return fetchSafe(url2, {
14387
- method: "GET",
14388
- headers: { Accept: "application/json", ...headers },
14389
- signal
14390
- }).andThen((response) => {
14391
- if (!response.ok) return (0, import_neverthrow4.okAsync)(null);
14392
- return import_neverthrow4.ResultAsync.fromSafePromise(parseBody3(response, url2));
14393
- });
14394
- }
14395
-
14396
- // src/core/source/wellknown/index.ts
14397
- function mergeError(a, b) {
14398
- return {
14399
- cause: a.cause === "network" || b.cause === "network" ? "network" : "timeout",
14400
- message: `x402: ${a.message} | mpp: ${b.message}`
14401
- };
14402
- }
14403
- function merge2(x402, mpp) {
14404
- const seen = /* @__PURE__ */ new Set();
14405
- const routes = [...x402.routes, ...mpp.routes].filter((r) => {
14406
- const key = `${r.method} ${r.path}`;
14407
- if (seen.has(key)) return false;
14408
- seen.add(key);
14409
- return true;
14410
- });
14411
- return {
14412
- raw: { ...mpp.raw, ...x402.raw },
14413
- routes,
14414
- protocol: "x402+mpp",
14415
- // Prefer x402 instructions; fall back to mpp
14416
- ...x402.instructions || mpp.instructions ? { instructions: x402.instructions ?? mpp.instructions } : {},
14417
- fetchedUrl: x402.fetchedUrl
14418
- };
14419
- }
14420
- function getWellKnown(origin, headers, signal) {
14421
- return new import_neverthrow5.ResultAsync(
14422
- Promise.all([
14423
- getX402WellKnown(origin, headers, signal),
14424
- getMppWellKnown(origin, headers, signal)
14425
- ]).then(([x402Result, mppResult]) => {
14426
- const x402 = x402Result.isOk() ? x402Result.value : null;
14427
- const mpp = mppResult.isOk() ? mppResult.value : null;
14428
- if (x402 && mpp) return (0, import_neverthrow5.ok)(merge2(x402, mpp));
14429
- if (x402) return (0, import_neverthrow5.ok)(x402);
14430
- if (mpp) return (0, import_neverthrow5.ok)(mpp);
14431
- if (x402Result.isErr() && mppResult.isErr())
14432
- return (0, import_neverthrow5.err)(mergeError(x402Result.error, mppResult.error));
14433
- if (x402Result.isErr()) return (0, import_neverthrow5.err)(x402Result.error);
14434
- if (mppResult.isErr()) return (0, import_neverthrow5.err)(mppResult.error);
14435
- return (0, import_neverthrow5.ok)(null);
14436
- })
14437
- );
14438
- }
14439
-
14440
14994
  // src/core/layers/l2.ts
14441
14995
  function formatPrice2(pricing) {
14442
14996
  const sym = pricing.currency ?? "USD";
@@ -14471,28 +15025,6 @@ function checkL2ForOpenAPI(openApi) {
14471
15025
  source: "openapi"
14472
15026
  };
14473
15027
  }
14474
- var WELL_KNOWN_PROTOCOLS = {
14475
- x402: ["x402"],
14476
- mpp: ["mpp"],
14477
- "x402+mpp": ["x402", "mpp"]
14478
- };
14479
- function checkL2ForWellknown(wellKnown) {
14480
- const protocols = WELL_KNOWN_PROTOCOLS[wellKnown.protocol];
14481
- const routes = wellKnown.routes.map((route) => ({
14482
- path: route.path,
14483
- method: route.method,
14484
- summary: `${route.method} ${route.path}`,
14485
- authMode: "paid",
14486
- protocols,
14487
- ...route.price ? { price: route.price } : {}
14488
- }));
14489
- return {
14490
- ...wellKnown.title ? { title: wellKnown.title } : {},
14491
- ...wellKnown.description ? { description: wellKnown.description } : {},
14492
- routes,
14493
- source: `well-known/${wellKnown.protocol}`
14494
- };
14495
- }
14496
15028
 
14497
15029
  // src/core/layers/l4.ts
14498
15030
  function checkL4ForOpenAPI(openApi) {
@@ -14501,12 +15033,6 @@ function checkL4ForOpenAPI(openApi) {
14501
15033
  }
14502
15034
  return null;
14503
15035
  }
14504
- function checkL4ForWellknown(wellKnown) {
14505
- if (wellKnown.instructions) {
14506
- return { guidance: wellKnown.instructions, source: `well-known/${wellKnown.protocol}` };
14507
- }
14508
- return null;
14509
- }
14510
15036
 
14511
15037
  // src/core/lib/tokens.ts
14512
15038
  function estimateTokenCount(text) {
@@ -14528,27 +15054,9 @@ function isOpenApiSource(raw) {
14528
15054
 
14529
15055
  // src/runtime/discover.ts
14530
15056
  var GUIDANCE_AUTO_INCLUDE_MAX_TOKENS_LENGTH = 1e3;
14531
- function extractFromWellknown(raw) {
14532
- if (Array.isArray(raw["ownershipProofs"])) {
14533
- const proofs = raw["ownershipProofs"].filter(
14534
- (p) => typeof p === "string"
14535
- );
14536
- if (proofs.length > 0) return proofs;
14537
- }
14538
- return void 0;
14539
- }
14540
- function extractFromOpenapi(raw) {
14541
- const xDiscovery = raw["x-discovery"];
14542
- if (xDiscovery && typeof xDiscovery === "object" && !Array.isArray(xDiscovery)) {
14543
- const proofs = xDiscovery["ownershipProofs"];
14544
- if (Array.isArray(proofs)) {
14545
- const filtered = proofs.filter((p) => typeof p === "string");
14546
- if (filtered.length > 0) return filtered;
14547
- }
14548
- }
14549
- const legacy = raw["x-agentcash-provenance"];
14550
- if (legacy && typeof legacy === "object" && !Array.isArray(legacy)) {
14551
- const proofs = legacy["ownershipProofs"];
15057
+ function extractOwnershipProofs(value) {
15058
+ if (value && typeof value === "object" && !Array.isArray(value)) {
15059
+ const proofs = value["ownershipProofs"];
14552
15060
  if (Array.isArray(proofs)) {
14553
15061
  const filtered = proofs.filter((p) => typeof p === "string");
14554
15062
  if (filtered.length > 0) return filtered;
@@ -14556,6 +15064,11 @@ function extractFromOpenapi(raw) {
14556
15064
  }
14557
15065
  return void 0;
14558
15066
  }
15067
+ function extractFromOpenapi(raw) {
15068
+ const canonical = extractOwnershipProofs(raw[OPENAPI_EXT.provenance]);
15069
+ if (canonical) return canonical;
15070
+ return extractOwnershipProofs(raw["x-discovery"]);
15071
+ }
14559
15072
  function withGuidance(base, l4, guidanceMode) {
14560
15073
  if (guidanceMode === "never" /* Never */) return { ...base, guidanceAvailable: !!l4 };
14561
15074
  if (!l4) return { ...base, guidanceAvailable: false };
@@ -14565,6 +15078,17 @@ function withGuidance(base, l4, guidanceMode) {
14565
15078
  }
14566
15079
  return { ...base, guidanceAvailable: true, guidanceTokens: tokens };
14567
15080
  }
15081
+ function inferTrustTier(source, ownershipProofs) {
15082
+ if (ownershipProofs?.length) return "ownership_verified";
15083
+ if (source) return "origin_hosted";
15084
+ return "unverified";
15085
+ }
15086
+ function decorateRoutes(origin, routes) {
15087
+ return routes.map((route) => ({
15088
+ ...route,
15089
+ resourceKey: `${origin} ${route.method} ${route.path}`
15090
+ }));
15091
+ }
14568
15092
  async function discoverOriginSchema(options) {
14569
15093
  const origin = normalizeOrigin(options.target);
14570
15094
  const guidanceMode = options.guidance ?? "auto" /* Auto */;
@@ -14574,60 +15098,40 @@ async function discoverOriginSchema(options) {
14574
15098
  options.signal,
14575
15099
  options.specificationOverrideUrl
14576
15100
  );
14577
- const openApiRaw = openApiResult.isOk() ? openApiResult.value : null;
14578
- const openApi = isOpenApiSource(openApiRaw) ? openApiRaw : null;
14579
- if (openApi) {
14580
- const l22 = checkL2ForOpenAPI(openApi);
14581
- const l42 = checkL4ForOpenAPI(openApi);
14582
- const ownershipProofs2 = extractFromOpenapi(openApi.raw);
14583
- const base2 = {
14584
- found: true,
14585
- origin,
14586
- source: "openapi",
14587
- ...l22.title ? {
14588
- info: {
14589
- title: l22.title,
14590
- ...l22.description ? { description: l22.description } : {},
14591
- ...l22.version ? { version: l22.version } : {}
14592
- }
14593
- } : {},
14594
- endpoints: l22.routes,
14595
- ...ownershipProofs2 ? { ownershipProofs: ownershipProofs2 } : {}
14596
- };
14597
- return withGuidance(base2, l42, guidanceMode);
14598
- }
14599
- const wellKnownResult = await getWellKnown(origin, options.headers, options.signal);
14600
- if (wellKnownResult.isErr()) {
15101
+ if (openApiResult.isErr()) {
14601
15102
  return {
14602
15103
  found: false,
14603
15104
  origin,
14604
- cause: wellKnownResult.error.cause,
14605
- message: wellKnownResult.error.message
15105
+ cause: openApiResult.error.cause,
15106
+ message: openApiResult.error.message
14606
15107
  };
14607
15108
  }
14608
- const wellKnown = wellKnownResult.value;
14609
- if (!wellKnown) return { found: false, origin, cause: "not_found" };
14610
- const l2 = checkL2ForWellknown(wellKnown);
14611
- const l4 = checkL4ForWellknown(wellKnown);
14612
- const ownershipProofs = extractFromWellknown(wellKnown.raw);
15109
+ const openApi = isOpenApiSource(openApiResult.value) ? openApiResult.value : null;
15110
+ if (!openApi) return { found: false, origin, cause: "not_found" };
15111
+ const l2 = checkL2ForOpenAPI(openApi);
15112
+ if (l2.routes.length === 0) return { found: false, origin, cause: "not_found" };
15113
+ const l4 = checkL4ForOpenAPI(openApi);
15114
+ const ownershipProofs = extractFromOpenapi(openApi.raw);
14613
15115
  const base = {
14614
15116
  found: true,
14615
15117
  origin,
14616
- source: l2.source,
15118
+ source: "openapi",
15119
+ trustTier: inferTrustTier(l2.source, ownershipProofs),
14617
15120
  ...l2.title ? {
14618
15121
  info: {
14619
15122
  title: l2.title,
14620
- ...l2.description ? { description: l2.description } : {}
15123
+ ...l2.description ? { description: l2.description } : {},
15124
+ ...l2.version ? { version: l2.version } : {}
14621
15125
  }
14622
15126
  } : {},
14623
- endpoints: l2.routes,
15127
+ endpoints: decorateRoutes(origin, l2.routes),
14624
15128
  ...ownershipProofs ? { ownershipProofs } : {}
14625
15129
  };
14626
15130
  return withGuidance(base, l4, guidanceMode);
14627
15131
  }
14628
15132
 
14629
15133
  // src/core/source/probe/index.ts
14630
- var import_neverthrow7 = require("neverthrow");
15134
+ var import_neverthrow4 = require("neverthrow");
14631
15135
 
14632
15136
  // src/core/protocols/x402/v1/schema.ts
14633
15137
  function extractSchemas(accepts) {
@@ -15016,12 +15520,10 @@ function extractSchemas3(payload) {
15016
15520
  return {};
15017
15521
  }
15018
15522
  function parseInputSchema(payload) {
15019
- const schema = extractSchemas3(payload).inputSchema;
15020
- return schema;
15523
+ return extractSchemas3(payload).inputSchema;
15021
15524
  }
15022
15525
  function parseOutputSchema(payload) {
15023
- const schema = extractSchemas3(payload).outputSchema;
15024
- return schema;
15526
+ return extractSchemas3(payload).outputSchema;
15025
15527
  }
15026
15528
 
15027
15529
  // src/core/protocols/x402/v1/parse-payment-required.ts
@@ -15032,9 +15534,9 @@ async function parsePaymentRequiredBody(response) {
15032
15534
  }
15033
15535
 
15034
15536
  // src/core/lib/base64.ts
15035
- var import_neverthrow6 = require("neverthrow");
15537
+ var import_neverthrow3 = require("neverthrow");
15036
15538
  function safeBase64DecodeUtf8(encoded) {
15037
- return import_neverthrow6.Result.fromThrowable(
15539
+ return import_neverthrow3.Result.fromThrowable(
15038
15540
  () => {
15039
15541
  if (typeof Buffer !== "undefined") {
15040
15542
  return Buffer.from(encoded, "base64").toString("utf8");
@@ -15102,8 +15604,8 @@ function probeMethod(url2, method, path, headers, signal, inputBody) {
15102
15604
  ...hasBody ? { body: JSON.stringify(inputBody) } : {},
15103
15605
  signal
15104
15606
  }).andThen((response) => {
15105
- if (!isUsableStatus(response.status)) return import_neverthrow7.ResultAsync.fromSafePromise(Promise.resolve(null));
15106
- return import_neverthrow7.ResultAsync.fromSafePromise(
15607
+ if (!isUsableStatus(response.status)) return import_neverthrow4.ResultAsync.fromSafePromise(Promise.resolve(null));
15608
+ return import_neverthrow4.ResultAsync.fromSafePromise(
15107
15609
  (async () => {
15108
15610
  let authHint = response.status === 402 ? "paid" : "unprotected";
15109
15611
  let paymentRequiredBody;
@@ -15134,7 +15636,7 @@ function probeMethod(url2, method, path, headers, signal, inputBody) {
15134
15636
  }
15135
15637
  function getProbe(url2, headers, signal, inputBody) {
15136
15638
  const path = normalizePath(new URL(url2).pathname || "/");
15137
- return import_neverthrow7.ResultAsync.fromSafePromise(
15639
+ return import_neverthrow4.ResultAsync.fromSafePromise(
15138
15640
  Promise.all(
15139
15641
  [...HTTP_METHODS].map(
15140
15642
  (method) => probeMethod(url2, method, path, headers, signal, inputBody).match(
@@ -15147,9 +15649,9 @@ function getProbe(url2, headers, signal, inputBody) {
15147
15649
  }
15148
15650
 
15149
15651
  // src/core/protocols/mpp/index.ts
15150
- var import_neverthrow8 = require("neverthrow");
15652
+ var import_neverthrow5 = require("neverthrow");
15151
15653
  function parseBase64Json(encoded) {
15152
- return import_neverthrow8.Result.fromThrowable(
15654
+ return import_neverthrow5.Result.fromThrowable(
15153
15655
  () => {
15154
15656
  const decoded = safeBase64DecodeUtf8(encoded);
15155
15657
  if (decoded.isErr()) throw decoded.error;
@@ -15318,6 +15820,10 @@ function resolveOperationPaymentInfo(operation) {
15318
15820
  ...names.length > 0 ? { protocols: names } : {}
15319
15821
  };
15320
15822
  }
15823
+ function extractSecurityRequirements(raw) {
15824
+ if (!Array.isArray(raw)) return void 0;
15825
+ return raw.filter((entry) => isRecord(entry));
15826
+ }
15321
15827
  function getL3ForOpenAPI(openApi, path, method) {
15322
15828
  const document = openApi.raw;
15323
15829
  const paths = isRecord(document.paths) ? document.paths : void 0;
@@ -15329,10 +15835,13 @@ function getL3ForOpenAPI(openApi, path, method) {
15329
15835
  const resolvedOperation = resolveRefs(operation, document);
15330
15836
  const summary = typeof resolvedOperation.summary === "string" ? resolvedOperation.summary : typeof resolvedOperation.description === "string" ? resolvedOperation.description : void 0;
15331
15837
  const paymentResolved = resolveOperationPaymentInfo(resolvedOperation);
15838
+ const globalSecurity = extractSecurityRequirements(document.security);
15839
+ const components = isRecord(document.components) ? document.components : void 0;
15840
+ const securitySchemes = isRecord(components?.securitySchemes) ? components.securitySchemes : void 0;
15332
15841
  return {
15333
15842
  source: "openapi",
15334
15843
  ...summary ? { summary } : {},
15335
- authMode: inferAuthMode(resolvedOperation) ?? void 0,
15844
+ authMode: inferAuthMode(resolvedOperation, globalSecurity, securitySchemes) ?? void 0,
15336
15845
  ...paymentResolved?.price ? { estimatedPrice: paymentResolved.price } : {},
15337
15846
  ...paymentResolved?.currency ? { currency: paymentResolved.currency } : {},
15338
15847
  ...paymentResolved?.protocols ? { protocols: paymentResolved.protocols } : {},
@@ -15532,13 +16041,9 @@ function evaluateMetadataCompleteness(metadata) {
15532
16041
 
15533
16042
  // src/audit/codes.ts
15534
16043
  var AUDIT_CODES = {
15535
- // ─── Source presence ─────────────────────────────────────────────────────────
15536
16044
  OPENAPI_NOT_FOUND: "OPENAPI_NOT_FOUND",
15537
- WELLKNOWN_NOT_FOUND: "WELLKNOWN_NOT_FOUND",
15538
- // ─── OpenAPI quality ─────────────────────────────────────────────────────────
15539
16045
  OPENAPI_PARSE_ERROR: "OPENAPI_PARSE_ERROR",
15540
16046
  OPENAPI_NO_ROUTES: "OPENAPI_NO_ROUTES",
15541
- // ─── L2 route-list checks ────────────────────────────────────────────────────
15542
16047
  L2_NO_ROUTES: "L2_NO_ROUTES",
15543
16048
  L2_ROUTE_COUNT_HIGH: "L2_ROUTE_COUNT_HIGH",
15544
16049
  L2_AUTH_MODE_MISSING: "L2_AUTH_MODE_MISSING",
@@ -15551,16 +16056,14 @@ var AUDIT_CODES = {
15551
16056
  L2_PROTOCOLS_MISSING_ON_PAID: "L2_PROTOCOLS_MISSING_ON_PAID",
15552
16057
  L2_X402_MALFORMED: "L2_X402_MALFORMED",
15553
16058
  L2_MPP_MALFORMED: "L2_MPP_MALFORMED",
15554
- // ─── L3 endpoint advisory checks ─────────────────────────────────────────────
16059
+ LEGACY_WELL_KNOWN_FOUND: "LEGACY_WELL_KNOWN_FOUND",
15555
16060
  L3_NOT_FOUND: "L3_NOT_FOUND",
15556
16061
  L3_INPUT_SCHEMA_MISSING: "L3_INPUT_SCHEMA_MISSING",
15557
16062
  L3_AUTH_MODE_MISSING: "L3_AUTH_MODE_MISSING",
15558
16063
  L3_PROTOCOLS_MISSING_ON_PAID: "L3_PROTOCOLS_MISSING_ON_PAID",
15559
16064
  L3_PAYMENT_OPTIONS_MISSING_ON_PAID: "L3_PAYMENT_OPTIONS_MISSING_ON_PAID",
15560
- // ─── L4 guidance checks ──────────────────────────────────────────────────────
15561
16065
  L4_GUIDANCE_MISSING: "L4_GUIDANCE_MISSING",
15562
16066
  L4_GUIDANCE_TOO_LONG: "L4_GUIDANCE_TOO_LONG",
15563
- // ─── MPP WWW-Authenticate header checks ──────────────────────────────────────
15564
16067
  MPP_HEADER_MISSING: "MPP_HEADER_MISSING",
15565
16068
  MPP_NO_PAYMENT_CHALLENGES: "MPP_NO_PAYMENT_CHALLENGES",
15566
16069
  MPP_CHALLENGE_ID_MISSING: "MPP_CHALLENGE_ID_MISSING",
@@ -15613,7 +16116,8 @@ function validateWithCoinbaseSchema(body) {
15613
16116
  code: VALIDATION_CODES.COINBASE_SCHEMA_INVALID,
15614
16117
  severity: "error",
15615
16118
  message: `Coinbase schema validation failed at ${path}: ${issue2.message}`,
15616
- path
16119
+ path,
16120
+ stage: "payment_required"
15617
16121
  };
15618
16122
  });
15619
16123
  }
@@ -15657,7 +16161,8 @@ function validateWithCoinbaseSchema2(body) {
15657
16161
  code: VALIDATION_CODES.COINBASE_SCHEMA_INVALID,
15658
16162
  severity: "error",
15659
16163
  message: `Coinbase schema validation failed at ${path}: ${issue2.message}`,
15660
- path
16164
+ path,
16165
+ stage: "payment_required"
15661
16166
  };
15662
16167
  });
15663
16168
  }
@@ -15821,7 +16326,8 @@ function getWarningsFor402Body(body) {
15821
16326
  code: VALIDATION_CODES.X402_NOT_OBJECT,
15822
16327
  severity: "error",
15823
16328
  message: "Payment required payload must be a JSON object",
15824
- path: "$"
16329
+ path: "$",
16330
+ stage: "payment_required"
15825
16331
  }
15826
16332
  ];
15827
16333
  }
@@ -15832,7 +16338,8 @@ function getWarningsFor402Body(body) {
15832
16338
  code: versionRaw === void 0 ? VALIDATION_CODES.X402_VERSION_MISSING : VALIDATION_CODES.X402_VERSION_UNSUPPORTED,
15833
16339
  severity: "error",
15834
16340
  message: versionRaw === void 0 ? "x402Version is required" : `Unsupported x402Version '${String(versionRaw)}'`,
15835
- path: "x402Version"
16341
+ path: "x402Version",
16342
+ stage: "payment_required"
15836
16343
  }
15837
16344
  ];
15838
16345
  }
@@ -15903,16 +16410,7 @@ function getWarningsFor402Body(body) {
15903
16410
  stage: "payment_required"
15904
16411
  });
15905
16412
  }
15906
- return [
15907
- ...coinbaseIssues,
15908
- ...issues.map((issue2) => ({
15909
- code: issue2.code,
15910
- severity: issue2.severity,
15911
- message: issue2.message,
15912
- ...issue2.hint ? { hint: issue2.hint } : {},
15913
- ...issue2.path ? { path: issue2.path } : {}
15914
- }))
15915
- ];
16413
+ return [...coinbaseIssues, ...issues];
15916
16414
  }
15917
16415
  function getWarningsForL3(l3) {
15918
16416
  if (l3 === null) {
@@ -15931,7 +16429,7 @@ function getWarningsForL3(l3) {
15931
16429
  code: AUDIT_CODES.L3_AUTH_MODE_MISSING,
15932
16430
  severity: "warn",
15933
16431
  message: "Endpoint has no auth mode in the spec.",
15934
- hint: "Declare auth mode via security schemes or x-payment-info so agents can plan payment."
16432
+ hint: "Reference a security scheme, add x-payment-info, or set `security: []` on the operation to mark it as explicitly public."
15935
16433
  });
15936
16434
  }
15937
16435
  if (l3.authMode === "paid" && !l3.inputSchema) {
@@ -15967,9 +16465,6 @@ function getWarningsForL3(l3) {
15967
16465
  return warnings;
15968
16466
  }
15969
16467
 
15970
- // src/flags.ts
15971
- var DEFAULT_COMPAT_MODE = "on";
15972
-
15973
16468
  // src/x402scan-validation/payment-required.ts
15974
16469
  function summarizeIssues(issues) {
15975
16470
  const summary = { errorCount: 0, warnCount: 0, infoCount: 0, byCode: {} };
@@ -15982,19 +16477,15 @@ function summarizeIssues(issues) {
15982
16477
  return summary;
15983
16478
  }
15984
16479
  function validatePaymentRequiredDetailed(payload, options = {}) {
15985
- const compatMode = options.compatMode ?? DEFAULT_COMPAT_MODE;
15986
16480
  const requireInputSchema = options.requireInputSchema ?? true;
15987
16481
  const requireOutputSchema = options.requireOutputSchema ?? true;
15988
16482
  const issues = getWarningsFor402Body(payload).filter((w) => {
15989
16483
  if (!requireInputSchema && w.code === VALIDATION_CODES.SCHEMA_INPUT_MISSING) return false;
15990
16484
  if (!requireOutputSchema && w.code === VALIDATION_CODES.SCHEMA_OUTPUT_MISSING) return false;
15991
16485
  return true;
15992
- }).map((w) => ({
15993
- ...w,
15994
- // Downgrade output schema severity when not in strict mode
15995
- severity: w.code === VALIDATION_CODES.SCHEMA_OUTPUT_MISSING && compatMode !== "strict" ? "warn" : w.severity,
15996
- stage: "payment_required"
15997
- }));
16486
+ }).map(
16487
+ (w) => w.code === VALIDATION_CODES.SCHEMA_OUTPUT_MISSING ? { ...w, severity: "warn" } : w
16488
+ );
15998
16489
  if (options.metadata) {
15999
16490
  issues.push(...evaluateMetadataCompleteness(options.metadata));
16000
16491
  }
@@ -16159,19 +16650,6 @@ ${details}`,
16159
16650
  }
16160
16651
  return warnings;
16161
16652
  }
16162
- function getWarningsForWellKnown(wellKnown) {
16163
- if (wellKnown === null) {
16164
- return [
16165
- {
16166
- code: AUDIT_CODES.WELLKNOWN_NOT_FOUND,
16167
- severity: "info",
16168
- message: "No /.well-known/x402 resource found at this origin.",
16169
- hint: "Expose /.well-known/x402 as a fallback for agents that cannot read OpenAPI."
16170
- }
16171
- ];
16172
- }
16173
- return [];
16174
- }
16175
16653
 
16176
16654
  // src/audit/warnings/l2.ts
16177
16655
  var KNOWN_PRICING_MODES = /* @__PURE__ */ new Set(["fixed", "dynamic"]);
@@ -16211,7 +16689,7 @@ function getWarningsForL2(l2) {
16211
16689
  code: AUDIT_CODES.L2_AUTH_MODE_MISSING,
16212
16690
  severity: "warn",
16213
16691
  message: `Route ${loc} is missing an auth mode declaration.`,
16214
- hint: "Set x-payment-info.authMode (or securitySchemes) so agents know if payment is required.",
16692
+ hint: "Reference a security scheme, add x-payment-info, or set `security: []` on the operation to mark it as explicitly public.",
16215
16693
  path: route.path
16216
16694
  });
16217
16695
  }
@@ -16292,7 +16770,7 @@ function getWarningsForL4(l4) {
16292
16770
  }
16293
16771
 
16294
16772
  // src/audit/warnings/favicon.ts
16295
- var import_neverthrow9 = require("neverthrow");
16773
+ var import_neverthrow6 = require("neverthrow");
16296
16774
  var COMMON_PATHS = ["/favicon.ico", "/favicon.png", "/favicon.svg"];
16297
16775
  var TIMEOUT = AbortSignal.timeout(5e3);
16298
16776
  function isImage(res) {
@@ -16300,12 +16778,12 @@ function isImage(res) {
16300
16778
  }
16301
16779
  function checkUrl(url2) {
16302
16780
  return fetchSafe(url2, { method: "HEAD", signal: TIMEOUT }).andThen((res) => {
16303
- if (res.ok) return (0, import_neverthrow9.okAsync)(isImage(res));
16781
+ if (res.ok) return (0, import_neverthrow6.okAsync)(isImage(res));
16304
16782
  if (res.status === 405 || res.status === 403) {
16305
16783
  return fetchSafe(url2, { signal: TIMEOUT }).map((getRes) => getRes.ok && isImage(getRes));
16306
16784
  }
16307
- return (0, import_neverthrow9.okAsync)(false);
16308
- }).orElse(() => (0, import_neverthrow9.okAsync)(false));
16785
+ return (0, import_neverthrow6.okAsync)(false);
16786
+ }).orElse(() => (0, import_neverthrow6.okAsync)(false));
16309
16787
  }
16310
16788
  function resolveHref(href, origin) {
16311
16789
  if (href.startsWith("//")) return `https:${href}`;
@@ -16334,15 +16812,15 @@ function extractIconHrefs(html, origin) {
16334
16812
  function getHtmlIconHrefs(origin) {
16335
16813
  return fetchSafe(origin, { signal: TIMEOUT }).andThen((res) => {
16336
16814
  if (!res.ok || !(res.headers.get("content-type") ?? "").includes("text/html"))
16337
- return (0, import_neverthrow9.okAsync)("");
16338
- return import_neverthrow9.ResultAsync.fromSafePromise(res.text());
16339
- }).map((html) => html ? extractIconHrefs(html, origin) : []).orElse(() => (0, import_neverthrow9.okAsync)([]));
16815
+ return (0, import_neverthrow6.okAsync)("");
16816
+ return import_neverthrow6.ResultAsync.fromSafePromise(res.text());
16817
+ }).map((html) => html ? extractIconHrefs(html, origin) : []).orElse(() => (0, import_neverthrow6.okAsync)([]));
16340
16818
  }
16341
16819
  function checkFavicon(origin) {
16342
16820
  const normalizedOrigin = origin.replace(/\/$/, "");
16343
16821
  return getHtmlIconHrefs(normalizedOrigin).andThen((hrefs) => {
16344
16822
  const candidates = [...hrefs, ...COMMON_PATHS.map((p) => `${normalizedOrigin}${p}`)];
16345
- return import_neverthrow9.ResultAsync.fromSafePromise(
16823
+ return import_neverthrow6.ResultAsync.fromSafePromise(
16346
16824
  Promise.all(candidates.map((url2) => checkUrl(url2).then((r) => r.isOk() && r.value))).then(
16347
16825
  (results) => results.some(Boolean)
16348
16826
  )
@@ -16362,27 +16840,60 @@ function getWarningsForFavicon(origin) {
16362
16840
  ];
16363
16841
  });
16364
16842
  }
16843
+
16844
+ // src/audit/legacy-well-known.ts
16845
+ var import_neverthrow7 = require("neverthrow");
16846
+ async function exists(url2, headers, signal) {
16847
+ const result = await fetchSafe(url2, {
16848
+ method: "GET",
16849
+ headers: { Accept: "application/json", ...headers },
16850
+ signal
16851
+ });
16852
+ if (result.isErr()) return false;
16853
+ return result.value.ok;
16854
+ }
16855
+ function probeLegacyWellKnown(origin, headers, signal) {
16856
+ return import_neverthrow7.ResultAsync.fromSafePromise(
16857
+ Promise.all([
16858
+ exists(`${origin}/.well-known/x402`, headers, signal),
16859
+ exists(`${origin}/.well-known/mpp`, headers, signal)
16860
+ ]).then(([x402, mpp]) => ({ x402, mpp }))
16861
+ );
16862
+ }
16863
+ function getWarningsForLegacyWellKnown(probe) {
16864
+ const paths = [];
16865
+ if (probe.x402) paths.push("/.well-known/x402");
16866
+ if (probe.mpp) paths.push("/.well-known/mpp");
16867
+ if (paths.length === 0) return [];
16868
+ return [
16869
+ {
16870
+ code: AUDIT_CODES.LEGACY_WELL_KNOWN_FOUND,
16871
+ severity: "info",
16872
+ message: `Legacy discovery document detected at ${paths.join(" and ")}. agentcash-discovery no longer parses these.`,
16873
+ hint: "Publish an OpenAPI spec at /openapi.json to be discovered."
16874
+ }
16875
+ ];
16876
+ }
16365
16877
  // Annotate the CommonJS export names for ESM import in node:
16366
16878
  0 && (module.exports = {
16367
16879
  AUDIT_CODES,
16368
16880
  GuidanceMode,
16881
+ MppProtocolSchema,
16369
16882
  PaymentInfoSchema,
16370
16883
  PaymentProtocolSchema,
16371
16884
  PriceSchema,
16372
16885
  VALIDATION_CODES,
16886
+ X402ProtocolSchema,
16373
16887
  attachProbePayload,
16374
16888
  checkEndpointSchema,
16375
16889
  checkFavicon,
16376
16890
  checkL2ForOpenAPI,
16377
- checkL2ForWellknown,
16378
16891
  checkL4ForOpenAPI,
16379
- checkL4ForWellknown,
16380
16892
  discoverOriginSchema,
16381
16893
  evaluateMetadataCompleteness,
16382
16894
  getL3,
16383
16895
  getL3ForOpenAPI,
16384
16896
  getL3ForProbe,
16385
- getMppWellKnown,
16386
16897
  getOpenAPI,
16387
16898
  getProbe,
16388
16899
  getWarningsFor402Body,
@@ -16390,11 +16901,10 @@ function getWarningsForFavicon(origin) {
16390
16901
  getWarningsForL2,
16391
16902
  getWarningsForL3,
16392
16903
  getWarningsForL4,
16904
+ getWarningsForLegacyWellKnown,
16393
16905
  getWarningsForMppHeader,
16394
16906
  getWarningsForOpenAPI,
16395
- getWarningsForWellKnown,
16396
- getWellKnown,
16397
- getX402WellKnown,
16398
16907
  isOpenApiParseFailure,
16908
+ probeLegacyWellKnown,
16399
16909
  validatePaymentRequiredDetailed
16400
16910
  });