@polagram/core 0.1.2 → 0.3.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.
@@ -7,16 +7,16 @@ const We = {
7
7
  "--)": { type: "async", style: { line: "dotted", head: "async" } },
8
8
  "-x": { type: "destroy", style: { line: "solid", head: "cross" } },
9
9
  "--x": { type: "destroy", style: { line: "dotted", head: "cross" } }
10
- }, Pt = Object.entries(We).reduce(
10
+ }, At = Object.entries(We).reduce(
11
11
  (t, [e, n]) => {
12
12
  const r = JSON.stringify({ type: n.type, style: n.style });
13
13
  return t[r] = e, t;
14
14
  },
15
15
  {}
16
16
  );
17
- function At(t, e) {
17
+ function Zt(t, e) {
18
18
  const n = JSON.stringify({ type: t, style: e });
19
- return Pt[n] || "->>";
19
+ return At[n] || "->>";
20
20
  }
21
21
  class Ke {
22
22
  constructor(e) {
@@ -110,7 +110,7 @@ class Ye {
110
110
  e.id === e.name ? this.add(`${n} ${e.id}`) : this.add(`${n} ${e.id} as ${r}`);
111
111
  }
112
112
  visitMessage(e) {
113
- const n = e.from ?? "[*]", r = e.to ?? "[*]", i = At(e.type, e.style);
113
+ const n = e.from ?? "[*]", r = e.to ?? "[*]", i = Zt(e.type, e.style);
114
114
  let s = "";
115
115
  e.lifecycle?.activateTarget && (s += "+"), e.lifecycle?.deactivateSource && (s += "-"), this.add(`${n}${i}${s}${r}: ${e.text}`);
116
116
  }
@@ -156,7 +156,7 @@ class Ye {
156
156
  this.indentLevel++, e(), this.indentLevel--;
157
157
  }
158
158
  }
159
- class Xe {
159
+ class qe {
160
160
  lines = [];
161
161
  traverser;
162
162
  constructor() {
@@ -237,7 +237,7 @@ class Xe {
237
237
  this.lines.push(e);
238
238
  }
239
239
  }
240
- class qe {
240
+ class Xe {
241
241
  constructor(e) {
242
242
  this.input = e, this.readChar();
243
243
  }
@@ -307,7 +307,7 @@ class qe {
307
307
  };
308
308
  }
309
309
  }
310
- let Zt = class extends qe {
310
+ let Ct = class extends Xe {
311
311
  nextToken() {
312
312
  if (this.skipWhitespace(), this.ch === "%" && this.peekChar() === "%")
313
313
  return this.skipComment(), this.nextToken();
@@ -468,7 +468,7 @@ class Qe {
468
468
  return this.currToken.type;
469
469
  }
470
470
  }
471
- let Ct = class extends Qe {
471
+ let Rt = class extends Qe {
472
472
  currentGroup = null;
473
473
  idCounters = {
474
474
  evt: 0,
@@ -713,13 +713,13 @@ let Ct = class extends Qe {
713
713
  });
714
714
  }
715
715
  };
716
- const Rt = {
716
+ const Lt = {
717
717
  parse: (t) => {
718
- const e = new Zt(t);
719
- return new Ct(e).parse();
718
+ const e = new Ct(t);
719
+ return new Rt(e).parse();
720
720
  }
721
721
  };
722
- class Lt extends qe {
722
+ class xt extends Xe {
723
723
  nextToken() {
724
724
  this.skipWhitespace();
725
725
  const e = this.position, n = this.column;
@@ -835,7 +835,7 @@ class Lt extends qe {
835
835
  return n ? n[1] : "";
836
836
  }
837
837
  }
838
- class xt extends Qe {
838
+ class Dt extends Qe {
839
839
  /**
840
840
  * Type-safe token type checker.
841
841
  * Helps TypeScript understand token type after advance() calls.
@@ -1083,18 +1083,18 @@ class xt extends Qe {
1083
1083
  return this.lexer.getInput().slice(e, n).trim();
1084
1084
  }
1085
1085
  }
1086
- const Dt = {
1086
+ const Ft = {
1087
1087
  parse: (t) => {
1088
- const e = new Lt(t);
1089
- return new xt(e).parse();
1088
+ const e = new xt(t);
1089
+ return new Dt(e).parse();
1090
1090
  }
1091
- }, Ft = {
1091
+ }, jt = {
1092
1092
  ".puml": "plantuml",
1093
1093
  ".plantuml": "plantuml",
1094
1094
  ".pu": "plantuml",
1095
1095
  ".mmd": "mermaid",
1096
1096
  ".mermaid": "mermaid"
1097
- }, jt = [
1097
+ }, Mt = [
1098
1098
  { pattern: /^\s*@startuml/m, format: "plantuml" },
1099
1099
  { pattern: /^\s*sequenceDiagram/m, format: "mermaid" }
1100
1100
  ], be = {
@@ -1125,7 +1125,7 @@ const Dt = {
1125
1125
  */
1126
1126
  detectByExtension(t) {
1127
1127
  const e = t.toLowerCase().match(/\.[^.]+$/)?.[0];
1128
- return e && Ft[e] || null;
1128
+ return e && jt[e] || null;
1129
1129
  },
1130
1130
  /**
1131
1131
  * Detect format based on content patterns.
@@ -1134,7 +1134,7 @@ const Dt = {
1134
1134
  * @returns Detected format, or null if no pattern matches
1135
1135
  */
1136
1136
  detectByContent(t) {
1137
- for (const { pattern: e, format: n } of jt)
1137
+ for (const { pattern: e, format: n } of Mt)
1138
1138
  if (e.test(t))
1139
1139
  return n;
1140
1140
  return null;
@@ -1153,21 +1153,21 @@ const Dt = {
1153
1153
  return ".mmd";
1154
1154
  }
1155
1155
  }
1156
- }, X = /* @__PURE__ */ new Map();
1157
- X.set("mermaid", Rt);
1158
- X.set("plantuml", Dt);
1159
- const Mt = {
1156
+ }, Q = /* @__PURE__ */ new Map();
1157
+ Q.set("mermaid", Lt);
1158
+ Q.set("plantuml", Ft);
1159
+ const Ut = {
1160
1160
  register(t, e) {
1161
- X.set(t, e);
1161
+ Q.set(t, e);
1162
1162
  },
1163
1163
  getParser(t) {
1164
- const e = X.get(t);
1164
+ const e = Q.get(t);
1165
1165
  if (!e)
1166
1166
  throw new Error(`Parser for language '${t}' not found.`);
1167
1167
  return e;
1168
1168
  }
1169
1169
  };
1170
- class ee {
1170
+ class K {
1171
1171
  transform(e) {
1172
1172
  const n = this.mapEvents(e.events);
1173
1173
  return {
@@ -1197,7 +1197,7 @@ class ee {
1197
1197
  };
1198
1198
  }
1199
1199
  }
1200
- class Ut extends ee {
1200
+ class Gt extends K {
1201
1201
  visitFragment(e) {
1202
1202
  const n = super.visitFragment(e);
1203
1203
  if (n.length === 0) return [];
@@ -1210,7 +1210,7 @@ class Ut extends ee {
1210
1210
  ];
1211
1211
  }
1212
1212
  }
1213
- class Gt {
1213
+ class Vt {
1214
1214
  transform(e) {
1215
1215
  const n = this.collectUsedParticipants(e.events), r = e.participants.filter(
1216
1216
  (s) => n.has(s.id)
@@ -1254,7 +1254,7 @@ class Gt {
1254
1254
  return r(e), n;
1255
1255
  }
1256
1256
  }
1257
- class de {
1257
+ class ne {
1258
1258
  // -- Branch / Fragment --
1259
1259
  matchBranch(e, n, r) {
1260
1260
  return !(n.operator && !(Array.isArray(n.operator) ? n.operator : [n.operator]).includes(r) || n.condition && (!e.condition || !this.matchText(e.condition, n.condition)));
@@ -1284,11 +1284,11 @@ class de {
1284
1284
  return !1;
1285
1285
  }
1286
1286
  }
1287
- class Vt extends ee {
1287
+ class Bt extends K {
1288
1288
  constructor(e) {
1289
1289
  super(), this.layer = e;
1290
1290
  }
1291
- matcher = new de();
1291
+ matcher = new ne();
1292
1292
  targetParticipantIds = /* @__PURE__ */ new Set();
1293
1293
  transform(e) {
1294
1294
  return this.resolveTargetParticipants(e), super.transform(e);
@@ -1322,11 +1322,95 @@ class Vt extends ee {
1322
1322
  return !!(e.from && this.targetParticipantIds.has(e.from) || e.to && this.targetParticipantIds.has(e.to));
1323
1323
  }
1324
1324
  }
1325
- class Bt extends ee {
1325
+ class Jt extends K {
1326
+ constructor(e) {
1327
+ super(), this.layer = e;
1328
+ }
1329
+ matcher = new ne();
1330
+ mergedParticipantIds = /* @__PURE__ */ new Set();
1331
+ targetParticipantId = "";
1332
+ transform(e) {
1333
+ const n = this.layer.selector, r = [];
1334
+ if (e.participants.forEach((d) => {
1335
+ this.matcher.matchParticipant(d, n) && r.push(d);
1336
+ }), r.length === 0)
1337
+ return e;
1338
+ this.mergedParticipantIds = new Set(r.map((d) => d.id));
1339
+ const i = this.layer.into || {};
1340
+ let s = i.id, o = i.name;
1341
+ s || (o ? s = o.replace(/[^a-zA-Z0-9-_]/g, "_") : s = r.map((d) => d.id).join("_")), o || (o = s), this.targetParticipantId = s;
1342
+ const a = [], h = !e.participants.some(
1343
+ (d) => d.id === s && !this.mergedParticipantIds.has(d.id)
1344
+ );
1345
+ let p = !1;
1346
+ for (const d of e.participants) {
1347
+ if (this.mergedParticipantIds.has(d.id)) {
1348
+ if (h && !p) {
1349
+ const f = {
1350
+ id: s || "",
1351
+ name: o || "",
1352
+ type: "participant"
1353
+ // Todo: map stereotype?
1354
+ };
1355
+ a.push(f), p = !0;
1356
+ }
1357
+ continue;
1358
+ }
1359
+ d.id, a.push(d);
1360
+ }
1361
+ return e.participants = a, super.transform(e);
1362
+ }
1363
+ visitEvent(e) {
1364
+ if (e.kind === "message")
1365
+ return this.transformMessage(e);
1366
+ if (e.kind === "note")
1367
+ return this.transformNote(e);
1368
+ if (e.kind === "activation")
1369
+ return this.transformActivation(e);
1370
+ if (e.kind === "fragment") {
1371
+ const n = super.visitEvent(e);
1372
+ return n.length > 0 && n[0].kind === "fragment" && n[0].branches.every(
1373
+ (s) => s.events.length === 0
1374
+ ) ? [] : n;
1375
+ }
1376
+ return super.visitEvent(e);
1377
+ }
1378
+ transformMessage(e) {
1379
+ let n = e.from, r = e.to;
1380
+ return n && this.mergedParticipantIds.has(n) && (n = this.targetParticipantId), r && this.mergedParticipantIds.has(r) && (r = this.targetParticipantId), n === this.targetParticipantId && r === this.targetParticipantId ? [] : [
1381
+ {
1382
+ ...e,
1383
+ from: n,
1384
+ to: r
1385
+ }
1386
+ ];
1387
+ }
1388
+ transformNote(e) {
1389
+ const n = /* @__PURE__ */ new Set();
1390
+ let r = !1;
1391
+ for (const o of e.participantIds)
1392
+ this.mergedParticipantIds.has(o) ? (n.add(this.targetParticipantId), r = !0) : n.add(o);
1393
+ if (!r)
1394
+ return [e];
1395
+ const i = Array.from(n);
1396
+ return e.participantIds.every(
1397
+ (o) => this.mergedParticipantIds.has(o)
1398
+ ) ? [] : [
1399
+ {
1400
+ ...e,
1401
+ participantIds: i
1402
+ }
1403
+ ];
1404
+ }
1405
+ transformActivation(e) {
1406
+ return this.mergedParticipantIds.has(e.participantId) ? [] : [e];
1407
+ }
1408
+ }
1409
+ class Wt extends K {
1326
1410
  constructor(e) {
1327
1411
  super(), this.layer = e;
1328
1412
  }
1329
- matcher = new de();
1413
+ matcher = new ne();
1330
1414
  removedParticipantIds = /* @__PURE__ */ new Set();
1331
1415
  transform(e) {
1332
1416
  const n = this.layer.selector;
@@ -1362,11 +1446,11 @@ class Bt extends ee {
1362
1446
  return !!(e.from && this.removedParticipantIds.has(e.from) || e.to && this.removedParticipantIds.has(e.to));
1363
1447
  }
1364
1448
  }
1365
- class Jt extends ee {
1449
+ class Kt extends K {
1366
1450
  constructor(e) {
1367
1451
  super(), this.layer = e;
1368
1452
  }
1369
- matcher = new de();
1453
+ matcher = new ne();
1370
1454
  visitFragment(e) {
1371
1455
  const n = e.branches.find(
1372
1456
  (r) => this.matcher.matchBranch(r, this.layer.selector, e.operator)
@@ -1374,10 +1458,10 @@ class Jt extends ee {
1374
1458
  return n ? this.mapEvents(n.events) : super.visitFragment(e);
1375
1459
  }
1376
1460
  }
1377
- class Wt {
1461
+ class Yt {
1378
1462
  factories = /* @__PURE__ */ new Map();
1379
1463
  constructor() {
1380
- this.registerTyped("resolve", (e) => new Jt(e)), this.registerTyped("focus", (e) => new Vt(e)), this.registerTyped("remove", (e) => new Bt(e));
1464
+ this.registerTyped("resolve", (e) => new Kt(e)), this.registerTyped("focus", (e) => new Bt(e)), this.registerTyped("remove", (e) => new Wt(e)), this.registerTyped("merge", (e) => new Jt(e));
1381
1465
  }
1382
1466
  /**
1383
1467
  * Type-safe registration for a specific layer type.
@@ -1406,18 +1490,18 @@ class Wt {
1406
1490
  return this.factories.has(e);
1407
1491
  }
1408
1492
  }
1409
- const Kt = new Wt();
1410
- class ae {
1493
+ const qt = new Yt();
1494
+ class ue {
1411
1495
  transform(e, n) {
1412
1496
  let r = e;
1413
1497
  for (const i of n) {
1414
- const s = Kt.get(i);
1498
+ const s = qt.get(i);
1415
1499
  s ? r = s.transform(r) : console.warn(`Unknown action: ${i.action}`);
1416
1500
  }
1417
- return r = new Ut().transform(r), r = new Gt().transform(r), r;
1501
+ return r = new Gt().transform(r), r = new Vt().transform(r), r;
1418
1502
  }
1419
1503
  }
1420
- class Fo {
1504
+ class Uo {
1421
1505
  constructor() {
1422
1506
  }
1423
1507
  /**
@@ -1426,11 +1510,11 @@ class Fo {
1426
1510
  * @param format Input format ('mermaid' or 'plantuml')
1427
1511
  */
1428
1512
  static init(e, n = "mermaid") {
1429
- const i = Mt.getParser(n).parse(e);
1430
- return new Yt(i, n);
1513
+ const i = Ut.getParser(n).parse(e);
1514
+ return new Xt(i, n);
1431
1515
  }
1432
1516
  }
1433
- class Yt {
1517
+ class Xt {
1434
1518
  ast;
1435
1519
  layers = [];
1436
1520
  sourceFormat;
@@ -1504,21 +1588,21 @@ class Yt {
1504
1588
  * Generate Mermaid code from the transformed AST.
1505
1589
  */
1506
1590
  toMermaid() {
1507
- const n = new ae().transform(this.ast, this.layers);
1591
+ const n = new ue().transform(this.ast, this.layers);
1508
1592
  return new Ye().generate(n);
1509
1593
  }
1510
1594
  /**
1511
1595
  * Generate PlantUML code from the transformed AST.
1512
1596
  */
1513
1597
  toPlantUML() {
1514
- const n = new ae().transform(this.ast, this.layers);
1515
- return new Xe().generate(n);
1598
+ const n = new ue().transform(this.ast, this.layers);
1599
+ return new qe().generate(n);
1516
1600
  }
1517
1601
  /**
1518
1602
  * Get the transformed AST (for advanced use cases).
1519
1603
  */
1520
1604
  toAST() {
1521
- return new ae().transform(this.ast, this.layers);
1605
+ return new ue().transform(this.ast, this.layers);
1522
1606
  }
1523
1607
  /**
1524
1608
  * Get the source format detected/specified during init.
@@ -1543,17 +1627,17 @@ class Yt {
1543
1627
  return typeof e == "string" || e instanceof RegExp || typeof e == "object" && e !== null && "pattern" in e && !("kind" in e);
1544
1628
  }
1545
1629
  }
1546
- const x = /* @__PURE__ */ new Map();
1547
- x.set("mermaid", () => new Ye());
1548
- x.set("plantuml", () => new Xe());
1549
- const jo = {
1630
+ const D = /* @__PURE__ */ new Map();
1631
+ D.set("mermaid", () => new Ye());
1632
+ D.set("plantuml", () => new qe());
1633
+ const Go = {
1550
1634
  /**
1551
1635
  * Register a custom generator.
1552
1636
  * @param language - Language identifier (e.g., 'mermaid', 'plantuml')
1553
1637
  * @param factory - Factory function that creates a generator instance
1554
1638
  */
1555
1639
  register(t, e) {
1556
- x.set(t, e);
1640
+ D.set(t, e);
1557
1641
  },
1558
1642
  /**
1559
1643
  * Get a generator for the specified language.
@@ -1562,7 +1646,7 @@ const jo = {
1562
1646
  * @throws Error if no generator is registered for the language
1563
1647
  */
1564
1648
  getGenerator(t) {
1565
- const e = x.get(t);
1649
+ const e = D.get(t);
1566
1650
  if (!e)
1567
1651
  throw new Error(`Generator for language '${t}' not found.`);
1568
1652
  return e();
@@ -1571,13 +1655,13 @@ const jo = {
1571
1655
  * Check if a generator is registered for the given language.
1572
1656
  */
1573
1657
  hasGenerator(t) {
1574
- return x.has(t);
1658
+ return D.has(t);
1575
1659
  },
1576
1660
  /**
1577
1661
  * Get list of registered languages.
1578
1662
  */
1579
1663
  getLanguages() {
1580
- return Array.from(x.keys());
1664
+ return Array.from(D.keys());
1581
1665
  }
1582
1666
  };
1583
1667
  function u(t, e, n) {
@@ -1614,7 +1698,7 @@ function u(t, e, n) {
1614
1698
  value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(t)
1615
1699
  }), Object.defineProperty(o, "name", { value: t }), o;
1616
1700
  }
1617
- class F extends Error {
1701
+ class j extends Error {
1618
1702
  constructor() {
1619
1703
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1620
1704
  }
@@ -1625,17 +1709,17 @@ class He extends Error {
1625
1709
  }
1626
1710
  }
1627
1711
  const et = {};
1628
- function Z(t) {
1712
+ function C(t) {
1629
1713
  return et;
1630
1714
  }
1631
1715
  function tt(t) {
1632
1716
  const e = Object.values(t).filter((r) => typeof r == "number");
1633
1717
  return Object.entries(t).filter(([r, i]) => e.indexOf(+r) === -1).map(([r, i]) => i);
1634
1718
  }
1635
- function he(t, e) {
1719
+ function le(t, e) {
1636
1720
  return typeof e == "bigint" ? e.toString() : e;
1637
1721
  }
1638
- function te(t) {
1722
+ function re(t) {
1639
1723
  return {
1640
1724
  get value() {
1641
1725
  {
@@ -1645,14 +1729,14 @@ function te(t) {
1645
1729
  }
1646
1730
  };
1647
1731
  }
1648
- function fe(t) {
1732
+ function me(t) {
1649
1733
  return t == null;
1650
1734
  }
1651
- function me(t) {
1735
+ function ge(t) {
1652
1736
  const e = t.startsWith("^") ? 1 : 0, n = t.endsWith("$") ? t.length - 1 : t.length;
1653
1737
  return t.slice(e, n);
1654
1738
  }
1655
- function Xt(t, e) {
1739
+ function Qt(t, e) {
1656
1740
  const n = (t.toString().split(".")[1] || "").length, r = e.toString();
1657
1741
  let i = (r.split(".")[1] || "").length;
1658
1742
  if (i === 0 && /\d?e-\d?/.test(r)) {
@@ -1679,7 +1763,7 @@ function m(t, e, n) {
1679
1763
  configurable: !0
1680
1764
  });
1681
1765
  }
1682
- function R(t, e, n) {
1766
+ function L(t, e, n) {
1683
1767
  Object.defineProperty(t, e, {
1684
1768
  value: n,
1685
1769
  writable: !0,
@@ -1687,7 +1771,7 @@ function R(t, e, n) {
1687
1771
  configurable: !0
1688
1772
  });
1689
1773
  }
1690
- function L(...t) {
1774
+ function x(...t) {
1691
1775
  const e = {};
1692
1776
  for (const n of t) {
1693
1777
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1695,18 +1779,18 @@ function L(...t) {
1695
1779
  }
1696
1780
  return Object.defineProperties({}, e);
1697
1781
  }
1698
- function ze(t) {
1782
+ function Ie(t) {
1699
1783
  return JSON.stringify(t);
1700
1784
  }
1701
- function qt(t) {
1785
+ function Ht(t) {
1702
1786
  return t.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1703
1787
  }
1704
1788
  const nt = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
1705
1789
  };
1706
- function V(t) {
1790
+ function B(t) {
1707
1791
  return typeof t == "object" && t !== null && !Array.isArray(t);
1708
1792
  }
1709
- const Qt = te(() => {
1793
+ const en = re(() => {
1710
1794
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
1711
1795
  return !1;
1712
1796
  try {
@@ -1716,23 +1800,23 @@ const Qt = te(() => {
1716
1800
  return !1;
1717
1801
  }
1718
1802
  });
1719
- function B(t) {
1720
- if (V(t) === !1)
1803
+ function J(t) {
1804
+ if (B(t) === !1)
1721
1805
  return !1;
1722
1806
  const e = t.constructor;
1723
1807
  if (e === void 0 || typeof e != "function")
1724
1808
  return !0;
1725
1809
  const n = e.prototype;
1726
- return !(V(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1810
+ return !(B(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1727
1811
  }
1728
1812
  function rt(t) {
1729
- return B(t) ? { ...t } : Array.isArray(t) ? [...t] : t;
1813
+ return J(t) ? { ...t } : Array.isArray(t) ? [...t] : t;
1730
1814
  }
1731
- const Ht = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1732
- function j(t) {
1815
+ const tn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1816
+ function M(t) {
1733
1817
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1734
1818
  }
1735
- function P(t, e, n) {
1819
+ function N(t, e, n) {
1736
1820
  const r = new t._zod.constr(e ?? t._zod.def);
1737
1821
  return (!e || n?.parent) && (r._zod.parent = t), r;
1738
1822
  }
@@ -1749,18 +1833,18 @@ function l(t) {
1749
1833
  }
1750
1834
  return delete e.message, typeof e.error == "string" ? { ...e, error: () => e.error } : e;
1751
1835
  }
1752
- function en(t) {
1836
+ function nn(t) {
1753
1837
  return Object.keys(t).filter((e) => t[e]._zod.optin === "optional" && t[e]._zod.optout === "optional");
1754
1838
  }
1755
- const tn = {
1839
+ const rn = {
1756
1840
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
1757
1841
  int32: [-2147483648, 2147483647],
1758
1842
  uint32: [0, 4294967295],
1759
1843
  float32: [-34028234663852886e22, 34028234663852886e22],
1760
1844
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
1761
1845
  };
1762
- function nn(t, e) {
1763
- const n = t._zod.def, r = L(t._zod.def, {
1846
+ function sn(t, e) {
1847
+ const n = t._zod.def, r = x(t._zod.def, {
1764
1848
  get shape() {
1765
1849
  const i = {};
1766
1850
  for (const s in e) {
@@ -1768,14 +1852,14 @@ function nn(t, e) {
1768
1852
  throw new Error(`Unrecognized key: "${s}"`);
1769
1853
  e[s] && (i[s] = n.shape[s]);
1770
1854
  }
1771
- return R(this, "shape", i), i;
1855
+ return L(this, "shape", i), i;
1772
1856
  },
1773
1857
  checks: []
1774
1858
  });
1775
- return P(t, r);
1859
+ return N(t, r);
1776
1860
  }
1777
- function rn(t, e) {
1778
- const n = t._zod.def, r = L(t._zod.def, {
1861
+ function on(t, e) {
1862
+ const n = t._zod.def, r = x(t._zod.def, {
1779
1863
  get shape() {
1780
1864
  const i = { ...t._zod.def.shape };
1781
1865
  for (const s in e) {
@@ -1783,45 +1867,45 @@ function rn(t, e) {
1783
1867
  throw new Error(`Unrecognized key: "${s}"`);
1784
1868
  e[s] && delete i[s];
1785
1869
  }
1786
- return R(this, "shape", i), i;
1870
+ return L(this, "shape", i), i;
1787
1871
  },
1788
1872
  checks: []
1789
1873
  });
1790
- return P(t, r);
1874
+ return N(t, r);
1791
1875
  }
1792
- function sn(t, e) {
1793
- if (!B(e))
1876
+ function an(t, e) {
1877
+ if (!J(e))
1794
1878
  throw new Error("Invalid input to extend: expected a plain object");
1795
1879
  const n = t._zod.def.checks;
1796
1880
  if (n && n.length > 0)
1797
1881
  throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
1798
- const i = L(t._zod.def, {
1882
+ const i = x(t._zod.def, {
1799
1883
  get shape() {
1800
1884
  const s = { ...t._zod.def.shape, ...e };
1801
- return R(this, "shape", s), s;
1885
+ return L(this, "shape", s), s;
1802
1886
  },
1803
1887
  checks: []
1804
1888
  });
1805
- return P(t, i);
1889
+ return N(t, i);
1806
1890
  }
1807
- function on(t, e) {
1808
- if (!B(e))
1891
+ function cn(t, e) {
1892
+ if (!J(e))
1809
1893
  throw new Error("Invalid input to safeExtend: expected a plain object");
1810
1894
  const n = {
1811
1895
  ...t._zod.def,
1812
1896
  get shape() {
1813
1897
  const r = { ...t._zod.def.shape, ...e };
1814
- return R(this, "shape", r), r;
1898
+ return L(this, "shape", r), r;
1815
1899
  },
1816
1900
  checks: t._zod.def.checks
1817
1901
  };
1818
- return P(t, n);
1902
+ return N(t, n);
1819
1903
  }
1820
- function an(t, e) {
1821
- const n = L(t._zod.def, {
1904
+ function un(t, e) {
1905
+ const n = x(t._zod.def, {
1822
1906
  get shape() {
1823
1907
  const r = { ...t._zod.def.shape, ...e._zod.def.shape };
1824
- return R(this, "shape", r), r;
1908
+ return L(this, "shape", r), r;
1825
1909
  },
1826
1910
  get catchall() {
1827
1911
  return e._zod.def.catchall;
@@ -1829,10 +1913,10 @@ function an(t, e) {
1829
1913
  checks: []
1830
1914
  // delete existing checks
1831
1915
  });
1832
- return P(t, n);
1916
+ return N(t, n);
1833
1917
  }
1834
- function cn(t, e, n) {
1835
- const r = L(e._zod.def, {
1918
+ function hn(t, e, n) {
1919
+ const r = x(e._zod.def, {
1836
1920
  get shape() {
1837
1921
  const i = e._zod.def.shape, s = { ...i };
1838
1922
  if (n)
@@ -1850,14 +1934,14 @@ function cn(t, e, n) {
1850
1934
  type: "optional",
1851
1935
  innerType: i[o]
1852
1936
  }) : i[o];
1853
- return R(this, "shape", s), s;
1937
+ return L(this, "shape", s), s;
1854
1938
  },
1855
1939
  checks: []
1856
1940
  });
1857
- return P(e, r);
1941
+ return N(e, r);
1858
1942
  }
1859
- function un(t, e, n) {
1860
- const r = L(e._zod.def, {
1943
+ function pn(t, e, n) {
1944
+ const r = x(e._zod.def, {
1861
1945
  get shape() {
1862
1946
  const i = e._zod.def.shape, s = { ...i };
1863
1947
  if (n)
@@ -1875,13 +1959,13 @@ function un(t, e, n) {
1875
1959
  type: "nonoptional",
1876
1960
  innerType: i[o]
1877
1961
  });
1878
- return R(this, "shape", s), s;
1962
+ return L(this, "shape", s), s;
1879
1963
  },
1880
1964
  checks: []
1881
1965
  });
1882
- return P(e, r);
1966
+ return N(e, r);
1883
1967
  }
1884
- function D(t, e = 0) {
1968
+ function F(t, e = 0) {
1885
1969
  if (t.aborted === !0)
1886
1970
  return !0;
1887
1971
  for (let n = e; n < t.issues.length; n++)
@@ -1895,21 +1979,21 @@ function it(t, e) {
1895
1979
  return (r = n).path ?? (r.path = []), n.path.unshift(t), n;
1896
1980
  });
1897
1981
  }
1898
- function W(t) {
1982
+ function Y(t) {
1899
1983
  return typeof t == "string" ? t : t?.message;
1900
1984
  }
1901
- function C(t, e, n) {
1985
+ function R(t, e, n) {
1902
1986
  const r = { ...t, path: t.path ?? [] };
1903
1987
  if (!t.message) {
1904
- const i = W(t.inst?._zod.def?.error?.(t)) ?? W(e?.error?.(t)) ?? W(n.customError?.(t)) ?? W(n.localeError?.(t)) ?? "Invalid input";
1988
+ const i = Y(t.inst?._zod.def?.error?.(t)) ?? Y(e?.error?.(t)) ?? Y(n.customError?.(t)) ?? Y(n.localeError?.(t)) ?? "Invalid input";
1905
1989
  r.message = i;
1906
1990
  }
1907
1991
  return delete r.inst, delete r.continue, e?.reportInput || delete r.input, r;
1908
1992
  }
1909
- function ge(t) {
1993
+ function ve(t) {
1910
1994
  return Array.isArray(t) ? "array" : typeof t == "string" ? "string" : "unknown";
1911
1995
  }
1912
- function J(...t) {
1996
+ function W(...t) {
1913
1997
  const [e, n, r] = t;
1914
1998
  return typeof e == "string" ? {
1915
1999
  message: e,
@@ -1925,18 +2009,18 @@ const st = (t, e) => {
1925
2009
  }), Object.defineProperty(t, "issues", {
1926
2010
  value: e,
1927
2011
  enumerable: !1
1928
- }), t.message = JSON.stringify(e, he, 2), Object.defineProperty(t, "toString", {
2012
+ }), t.message = JSON.stringify(e, le, 2), Object.defineProperty(t, "toString", {
1929
2013
  value: () => t.message,
1930
2014
  enumerable: !1
1931
2015
  });
1932
2016
  }, ot = u("$ZodError", st), at = u("$ZodError", st, { Parent: Error });
1933
- function hn(t, e = (n) => n.message) {
2017
+ function ln(t, e = (n) => n.message) {
1934
2018
  const n = {}, r = [];
1935
2019
  for (const i of t.issues)
1936
2020
  i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(e(i))) : r.push(e(i));
1937
2021
  return { formErrors: r, fieldErrors: n };
1938
2022
  }
1939
- function pn(t, e = (n) => n.message) {
2023
+ function dn(t, e = (n) => n.message) {
1940
2024
  const n = { _errors: [] }, r = (i) => {
1941
2025
  for (const s of i.issues)
1942
2026
  if (s.code === "invalid_union" && s.errors.length)
@@ -1957,72 +2041,72 @@ function pn(t, e = (n) => n.message) {
1957
2041
  };
1958
2042
  return r(t), n;
1959
2043
  }
1960
- const ve = (t) => (e, n, r, i) => {
2044
+ const _e = (t) => (e, n, r, i) => {
1961
2045
  const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, o = e._zod.run({ value: n, issues: [] }, s);
1962
2046
  if (o instanceof Promise)
1963
- throw new F();
2047
+ throw new j();
1964
2048
  if (o.issues.length) {
1965
- const a = new (i?.Err ?? t)(o.issues.map((c) => C(c, s, Z())));
2049
+ const a = new (i?.Err ?? t)(o.issues.map((c) => R(c, s, C())));
1966
2050
  throw nt(a, i?.callee), a;
1967
2051
  }
1968
2052
  return o.value;
1969
- }, _e = (t) => async (e, n, r, i) => {
2053
+ }, ke = (t) => async (e, n, r, i) => {
1970
2054
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1971
2055
  let o = e._zod.run({ value: n, issues: [] }, s);
1972
2056
  if (o instanceof Promise && (o = await o), o.issues.length) {
1973
- const a = new (i?.Err ?? t)(o.issues.map((c) => C(c, s, Z())));
2057
+ const a = new (i?.Err ?? t)(o.issues.map((c) => R(c, s, C())));
1974
2058
  throw nt(a, i?.callee), a;
1975
2059
  }
1976
2060
  return o.value;
1977
- }, ne = (t) => (e, n, r) => {
2061
+ }, ie = (t) => (e, n, r) => {
1978
2062
  const i = r ? { ...r, async: !1 } : { async: !1 }, s = e._zod.run({ value: n, issues: [] }, i);
1979
2063
  if (s instanceof Promise)
1980
- throw new F();
2064
+ throw new j();
1981
2065
  return s.issues.length ? {
1982
2066
  success: !1,
1983
- error: new (t ?? ot)(s.issues.map((o) => C(o, i, Z())))
2067
+ error: new (t ?? ot)(s.issues.map((o) => R(o, i, C())))
1984
2068
  } : { success: !0, data: s.value };
1985
- }, ln = /* @__PURE__ */ ne(at), re = (t) => async (e, n, r) => {
2069
+ }, fn = /* @__PURE__ */ ie(at), se = (t) => async (e, n, r) => {
1986
2070
  const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1987
2071
  let s = e._zod.run({ value: n, issues: [] }, i);
1988
2072
  return s instanceof Promise && (s = await s), s.issues.length ? {
1989
2073
  success: !1,
1990
- error: new t(s.issues.map((o) => C(o, i, Z())))
2074
+ error: new t(s.issues.map((o) => R(o, i, C())))
1991
2075
  } : { success: !0, data: s.value };
1992
- }, dn = /* @__PURE__ */ re(at), fn = (t) => (e, n, r) => {
1993
- const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1994
- return ve(t)(e, n, i);
1995
- }, mn = (t) => (e, n, r) => ve(t)(e, n, r), gn = (t) => async (e, n, r) => {
2076
+ }, mn = /* @__PURE__ */ se(at), gn = (t) => (e, n, r) => {
1996
2077
  const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1997
2078
  return _e(t)(e, n, i);
1998
- }, vn = (t) => async (e, n, r) => _e(t)(e, n, r), _n = (t) => (e, n, r) => {
2079
+ }, vn = (t) => (e, n, r) => _e(t)(e, n, r), _n = (t) => async (e, n, r) => {
1999
2080
  const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2000
- return ne(t)(e, n, i);
2001
- }, kn = (t) => (e, n, r) => ne(t)(e, n, r), yn = (t) => async (e, n, r) => {
2081
+ return ke(t)(e, n, i);
2082
+ }, kn = (t) => async (e, n, r) => ke(t)(e, n, r), yn = (t) => (e, n, r) => {
2002
2083
  const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2003
- return re(t)(e, n, i);
2004
- }, Tn = (t) => async (e, n, r) => re(t)(e, n, r), wn = /^[cC][^\s-]{8,}$/, bn = /^[0-9a-z]+$/, En = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, zn = /^[0-9a-vA-V]{20}$/, In = /^[A-Za-z0-9]{27}$/, $n = /^[a-zA-Z0-9_-]{21}$/, On = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Sn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Ie = (t) => t ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Nn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Pn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2005
- function An() {
2006
- return new RegExp(Pn, "u");
2084
+ return ie(t)(e, n, i);
2085
+ }, Tn = (t) => (e, n, r) => ie(t)(e, n, r), wn = (t) => async (e, n, r) => {
2086
+ const i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2087
+ return se(t)(e, n, i);
2088
+ }, bn = (t) => async (e, n, r) => se(t)(e, n, r), En = /^[cC][^\s-]{8,}$/, In = /^[0-9a-z]+$/, zn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, $n = /^[0-9a-vA-V]{20}$/, On = /^[A-Za-z0-9]{27}$/, Pn = /^[a-zA-Z0-9_-]{21}$/, Sn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Nn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ze = (t) => t ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, An = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Zn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2089
+ function Cn() {
2090
+ return new RegExp(Zn, "u");
2007
2091
  }
2008
- const Zn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Cn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Rn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Ln = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, xn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ct = /^[A-Za-z0-9_-]*$/, Dn = /^\+(?:[0-9]){6,14}[0-9]$/, ut = "(?:(?:\\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])))", Fn = /* @__PURE__ */ new RegExp(`^${ut}$`);
2092
+ const Rn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ln = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, xn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Dn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Fn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ct = /^[A-Za-z0-9_-]*$/, jn = /^\+(?:[0-9]){6,14}[0-9]$/, ut = "(?:(?:\\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])))", Mn = /* @__PURE__ */ new RegExp(`^${ut}$`);
2009
2093
  function ht(t) {
2010
2094
  const e = "(?:[01]\\d|2[0-3]):[0-5]\\d";
2011
2095
  return typeof t.precision == "number" ? t.precision === -1 ? `${e}` : t.precision === 0 ? `${e}:[0-5]\\d` : `${e}:[0-5]\\d\\.\\d{${t.precision}}` : `${e}(?::[0-5]\\d(?:\\.\\d+)?)?`;
2012
2096
  }
2013
- function jn(t) {
2097
+ function Un(t) {
2014
2098
  return new RegExp(`^${ht(t)}$`);
2015
2099
  }
2016
- function Mn(t) {
2100
+ function Gn(t) {
2017
2101
  const e = ht({ precision: t.precision }), n = ["Z"];
2018
2102
  t.local && n.push(""), t.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
2019
2103
  const r = `${e}(?:${n.join("|")})`;
2020
2104
  return new RegExp(`^${ut}T(?:${r})$`);
2021
2105
  }
2022
- const Un = (t) => {
2106
+ const Vn = (t) => {
2023
2107
  const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
2024
2108
  return new RegExp(`^${e}$`);
2025
- }, Gn = /^-?\d+$/, Vn = /^-?\d+(?:\.\d+)?/, Bn = /^[^A-Z]*$/, Jn = /^[^a-z]*$/, b = /* @__PURE__ */ u("$ZodCheck", (t, e) => {
2109
+ }, Bn = /^-?\d+$/, Jn = /^-?\d+(?:\.\d+)?/, Wn = /^[^A-Z]*$/, Kn = /^[^a-z]*$/, b = /* @__PURE__ */ u("$ZodCheck", (t, e) => {
2026
2110
  var n;
2027
2111
  t._zod ?? (t._zod = {}), t._zod.def = e, (n = t._zod).onattach ?? (n.onattach = []);
2028
2112
  }), pt = {
@@ -2063,14 +2147,14 @@ const Un = (t) => {
2063
2147
  continue: !e.abort
2064
2148
  });
2065
2149
  };
2066
- }), Wn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (t, e) => {
2150
+ }), Yn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (t, e) => {
2067
2151
  b.init(t, e), t._zod.onattach.push((n) => {
2068
2152
  var r;
2069
2153
  (r = n._zod.bag).multipleOf ?? (r.multipleOf = e.value);
2070
2154
  }), t._zod.check = (n) => {
2071
2155
  if (typeof n.value != typeof e.value)
2072
2156
  throw new Error("Cannot mix number and bigint in multiple_of check.");
2073
- (typeof n.value == "bigint" ? n.value % e.value === BigInt(0) : Xt(n.value, e.value) === 0) || n.issues.push({
2157
+ (typeof n.value == "bigint" ? n.value % e.value === BigInt(0) : Qt(n.value, e.value) === 0) || n.issues.push({
2074
2158
  origin: typeof n.value,
2075
2159
  code: "not_multiple_of",
2076
2160
  divisor: e.value,
@@ -2079,12 +2163,12 @@ const Un = (t) => {
2079
2163
  continue: !e.abort
2080
2164
  });
2081
2165
  };
2082
- }), Kn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (t, e) => {
2166
+ }), qn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (t, e) => {
2083
2167
  b.init(t, e), e.format = e.format || "float64";
2084
- const n = e.format?.includes("int"), r = n ? "int" : "number", [i, s] = tn[e.format];
2168
+ const n = e.format?.includes("int"), r = n ? "int" : "number", [i, s] = rn[e.format];
2085
2169
  t._zod.onattach.push((o) => {
2086
2170
  const a = o._zod.bag;
2087
- a.format = e.format, a.minimum = i, a.maximum = s, n && (a.pattern = Gn);
2171
+ a.format = e.format, a.minimum = i, a.maximum = s, n && (a.pattern = Bn);
2088
2172
  }), t._zod.check = (o) => {
2089
2173
  const a = o.value;
2090
2174
  if (n) {
@@ -2136,11 +2220,11 @@ const Un = (t) => {
2136
2220
  inst: t
2137
2221
  });
2138
2222
  };
2139
- }), Yn = /* @__PURE__ */ u("$ZodCheckMaxLength", (t, e) => {
2223
+ }), Xn = /* @__PURE__ */ u("$ZodCheckMaxLength", (t, e) => {
2140
2224
  var n;
2141
2225
  b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
2142
2226
  const i = r.value;
2143
- return !fe(i) && i.length !== void 0;
2227
+ return !me(i) && i.length !== void 0;
2144
2228
  }), t._zod.onattach.push((r) => {
2145
2229
  const i = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
2146
2230
  e.maximum < i && (r._zod.bag.maximum = e.maximum);
@@ -2148,7 +2232,7 @@ const Un = (t) => {
2148
2232
  const i = r.value;
2149
2233
  if (i.length <= e.maximum)
2150
2234
  return;
2151
- const o = ge(i);
2235
+ const o = ve(i);
2152
2236
  r.issues.push({
2153
2237
  origin: o,
2154
2238
  code: "too_big",
@@ -2159,11 +2243,11 @@ const Un = (t) => {
2159
2243
  continue: !e.abort
2160
2244
  });
2161
2245
  };
2162
- }), Xn = /* @__PURE__ */ u("$ZodCheckMinLength", (t, e) => {
2246
+ }), Qn = /* @__PURE__ */ u("$ZodCheckMinLength", (t, e) => {
2163
2247
  var n;
2164
2248
  b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
2165
2249
  const i = r.value;
2166
- return !fe(i) && i.length !== void 0;
2250
+ return !me(i) && i.length !== void 0;
2167
2251
  }), t._zod.onattach.push((r) => {
2168
2252
  const i = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
2169
2253
  e.minimum > i && (r._zod.bag.minimum = e.minimum);
@@ -2171,7 +2255,7 @@ const Un = (t) => {
2171
2255
  const i = r.value;
2172
2256
  if (i.length >= e.minimum)
2173
2257
  return;
2174
- const o = ge(i);
2258
+ const o = ve(i);
2175
2259
  r.issues.push({
2176
2260
  origin: o,
2177
2261
  code: "too_small",
@@ -2182,11 +2266,11 @@ const Un = (t) => {
2182
2266
  continue: !e.abort
2183
2267
  });
2184
2268
  };
2185
- }), qn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (t, e) => {
2269
+ }), Hn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (t, e) => {
2186
2270
  var n;
2187
2271
  b.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
2188
2272
  const i = r.value;
2189
- return !fe(i) && i.length !== void 0;
2273
+ return !me(i) && i.length !== void 0;
2190
2274
  }), t._zod.onattach.push((r) => {
2191
2275
  const i = r._zod.bag;
2192
2276
  i.minimum = e.length, i.maximum = e.length, i.length = e.length;
@@ -2194,7 +2278,7 @@ const Un = (t) => {
2194
2278
  const i = r.value, s = i.length;
2195
2279
  if (s === e.length)
2196
2280
  return;
2197
- const o = ge(i), a = s > e.length;
2281
+ const o = ve(i), a = s > e.length;
2198
2282
  r.issues.push({
2199
2283
  origin: o,
2200
2284
  ...a ? { code: "too_big", maximum: e.length } : { code: "too_small", minimum: e.length },
@@ -2205,7 +2289,7 @@ const Un = (t) => {
2205
2289
  continue: !e.abort
2206
2290
  });
2207
2291
  };
2208
- }), ie = /* @__PURE__ */ u("$ZodCheckStringFormat", (t, e) => {
2292
+ }), oe = /* @__PURE__ */ u("$ZodCheckStringFormat", (t, e) => {
2209
2293
  var n, r;
2210
2294
  b.init(t, e), t._zod.onattach.push((i) => {
2211
2295
  const s = i._zod.bag;
@@ -2222,8 +2306,8 @@ const Un = (t) => {
2222
2306
  });
2223
2307
  }) : (r = t._zod).check ?? (r.check = () => {
2224
2308
  });
2225
- }), Qn = /* @__PURE__ */ u("$ZodCheckRegex", (t, e) => {
2226
- ie.init(t, e), t._zod.check = (n) => {
2309
+ }), er = /* @__PURE__ */ u("$ZodCheckRegex", (t, e) => {
2310
+ oe.init(t, e), t._zod.check = (n) => {
2227
2311
  e.pattern.lastIndex = 0, !e.pattern.test(n.value) && n.issues.push({
2228
2312
  origin: "string",
2229
2313
  code: "invalid_format",
@@ -2234,13 +2318,13 @@ const Un = (t) => {
2234
2318
  continue: !e.abort
2235
2319
  });
2236
2320
  };
2237
- }), Hn = /* @__PURE__ */ u("$ZodCheckLowerCase", (t, e) => {
2238
- e.pattern ?? (e.pattern = Bn), ie.init(t, e);
2239
- }), er = /* @__PURE__ */ u("$ZodCheckUpperCase", (t, e) => {
2240
- e.pattern ?? (e.pattern = Jn), ie.init(t, e);
2241
- }), tr = /* @__PURE__ */ u("$ZodCheckIncludes", (t, e) => {
2321
+ }), tr = /* @__PURE__ */ u("$ZodCheckLowerCase", (t, e) => {
2322
+ e.pattern ?? (e.pattern = Wn), oe.init(t, e);
2323
+ }), nr = /* @__PURE__ */ u("$ZodCheckUpperCase", (t, e) => {
2324
+ e.pattern ?? (e.pattern = Kn), oe.init(t, e);
2325
+ }), rr = /* @__PURE__ */ u("$ZodCheckIncludes", (t, e) => {
2242
2326
  b.init(t, e);
2243
- const n = j(e.includes), r = new RegExp(typeof e.position == "number" ? `^.{${e.position}}${n}` : n);
2327
+ const n = M(e.includes), r = new RegExp(typeof e.position == "number" ? `^.{${e.position}}${n}` : n);
2244
2328
  e.pattern = r, t._zod.onattach.push((i) => {
2245
2329
  const s = i._zod.bag;
2246
2330
  s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
@@ -2255,9 +2339,9 @@ const Un = (t) => {
2255
2339
  continue: !e.abort
2256
2340
  });
2257
2341
  };
2258
- }), nr = /* @__PURE__ */ u("$ZodCheckStartsWith", (t, e) => {
2342
+ }), ir = /* @__PURE__ */ u("$ZodCheckStartsWith", (t, e) => {
2259
2343
  b.init(t, e);
2260
- const n = new RegExp(`^${j(e.prefix)}.*`);
2344
+ const n = new RegExp(`^${M(e.prefix)}.*`);
2261
2345
  e.pattern ?? (e.pattern = n), t._zod.onattach.push((r) => {
2262
2346
  const i = r._zod.bag;
2263
2347
  i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(n);
@@ -2272,9 +2356,9 @@ const Un = (t) => {
2272
2356
  continue: !e.abort
2273
2357
  });
2274
2358
  };
2275
- }), rr = /* @__PURE__ */ u("$ZodCheckEndsWith", (t, e) => {
2359
+ }), sr = /* @__PURE__ */ u("$ZodCheckEndsWith", (t, e) => {
2276
2360
  b.init(t, e);
2277
- const n = new RegExp(`.*${j(e.suffix)}$`);
2361
+ const n = new RegExp(`.*${M(e.suffix)}$`);
2278
2362
  e.pattern ?? (e.pattern = n), t._zod.onattach.push((r) => {
2279
2363
  const i = r._zod.bag;
2280
2364
  i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(n);
@@ -2289,12 +2373,12 @@ const Un = (t) => {
2289
2373
  continue: !e.abort
2290
2374
  });
2291
2375
  };
2292
- }), ir = /* @__PURE__ */ u("$ZodCheckOverwrite", (t, e) => {
2376
+ }), or = /* @__PURE__ */ u("$ZodCheckOverwrite", (t, e) => {
2293
2377
  b.init(t, e), t._zod.check = (n) => {
2294
2378
  n.value = e.tx(n.value);
2295
2379
  };
2296
2380
  });
2297
- class sr {
2381
+ class ar {
2298
2382
  constructor(e = []) {
2299
2383
  this.content = [], this.indent = 0, this && (this.args = e);
2300
2384
  }
@@ -2317,13 +2401,13 @@ class sr {
2317
2401
  `));
2318
2402
  }
2319
2403
  }
2320
- const or = {
2404
+ const cr = {
2321
2405
  major: 4,
2322
2406
  minor: 2,
2323
2407
  patch: 1
2324
2408
  }, k = /* @__PURE__ */ u("$ZodType", (t, e) => {
2325
2409
  var n;
2326
- t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = or;
2410
+ t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = cr;
2327
2411
  const r = [...t._zod.def.checks ?? []];
2328
2412
  t._zod.traits.has("$ZodCheck") && r.unshift(t);
2329
2413
  for (const i of r)
@@ -2335,7 +2419,7 @@ const or = {
2335
2419
  });
2336
2420
  else {
2337
2421
  const i = (o, a, c) => {
2338
- let h = D(o), p;
2422
+ let h = F(o), p;
2339
2423
  for (const d of a) {
2340
2424
  if (d._zod.def.when) {
2341
2425
  if (!d._zod.def.when(o))
@@ -2344,25 +2428,25 @@ const or = {
2344
2428
  continue;
2345
2429
  const f = o.issues.length, v = d._zod.check(o);
2346
2430
  if (v instanceof Promise && c?.async === !1)
2347
- throw new F();
2431
+ throw new j();
2348
2432
  if (p || v instanceof Promise)
2349
2433
  p = (p ?? Promise.resolve()).then(async () => {
2350
- await v, o.issues.length !== f && (h || (h = D(o, f)));
2434
+ await v, o.issues.length !== f && (h || (h = F(o, f)));
2351
2435
  });
2352
2436
  else {
2353
2437
  if (o.issues.length === f)
2354
2438
  continue;
2355
- h || (h = D(o, f));
2439
+ h || (h = F(o, f));
2356
2440
  }
2357
2441
  }
2358
2442
  return p ? p.then(() => o) : o;
2359
2443
  }, s = (o, a, c) => {
2360
- if (D(o))
2444
+ if (F(o))
2361
2445
  return o.aborted = !0, o;
2362
2446
  const h = i(a, r, c);
2363
2447
  if (h instanceof Promise) {
2364
2448
  if (c.async === !1)
2365
- throw new F();
2449
+ throw new j();
2366
2450
  return h.then((p) => t._zod.parse(p, c));
2367
2451
  }
2368
2452
  return t._zod.parse(h, c);
@@ -2377,7 +2461,7 @@ const or = {
2377
2461
  const c = t._zod.parse(o, a);
2378
2462
  if (c instanceof Promise) {
2379
2463
  if (a.async === !1)
2380
- throw new F();
2464
+ throw new j();
2381
2465
  return c.then((h) => i(h, r, a));
2382
2466
  }
2383
2467
  return i(c, r, a);
@@ -2386,17 +2470,17 @@ const or = {
2386
2470
  t["~standard"] = {
2387
2471
  validate: (i) => {
2388
2472
  try {
2389
- const s = ln(t, i);
2473
+ const s = fn(t, i);
2390
2474
  return s.success ? { value: s.data } : { issues: s.error?.issues };
2391
2475
  } catch {
2392
- return dn(t, i).then((o) => o.success ? { value: o.data } : { issues: o.error?.issues });
2476
+ return mn(t, i).then((o) => o.success ? { value: o.data } : { issues: o.error?.issues });
2393
2477
  }
2394
2478
  },
2395
2479
  vendor: "zod",
2396
2480
  version: 1
2397
2481
  };
2398
- }), ke = /* @__PURE__ */ u("$ZodString", (t, e) => {
2399
- k.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? Un(t._zod.bag), t._zod.parse = (n, r) => {
2482
+ }), ye = /* @__PURE__ */ u("$ZodString", (t, e) => {
2483
+ k.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? Vn(t._zod.bag), t._zod.parse = (n, r) => {
2400
2484
  if (e.coerce)
2401
2485
  try {
2402
2486
  n.value = String(n.value);
@@ -2410,10 +2494,10 @@ const or = {
2410
2494
  }), n;
2411
2495
  };
2412
2496
  }), g = /* @__PURE__ */ u("$ZodStringFormat", (t, e) => {
2413
- ie.init(t, e), ke.init(t, e);
2414
- }), ar = /* @__PURE__ */ u("$ZodGUID", (t, e) => {
2415
- e.pattern ?? (e.pattern = Sn), g.init(t, e);
2416
- }), cr = /* @__PURE__ */ u("$ZodUUID", (t, e) => {
2497
+ oe.init(t, e), ye.init(t, e);
2498
+ }), ur = /* @__PURE__ */ u("$ZodGUID", (t, e) => {
2499
+ e.pattern ?? (e.pattern = Nn), g.init(t, e);
2500
+ }), hr = /* @__PURE__ */ u("$ZodUUID", (t, e) => {
2417
2501
  if (e.version) {
2418
2502
  const r = {
2419
2503
  v1: 1,
@@ -2427,13 +2511,13 @@ const or = {
2427
2511
  }[e.version];
2428
2512
  if (r === void 0)
2429
2513
  throw new Error(`Invalid UUID version: "${e.version}"`);
2430
- e.pattern ?? (e.pattern = Ie(r));
2514
+ e.pattern ?? (e.pattern = ze(r));
2431
2515
  } else
2432
- e.pattern ?? (e.pattern = Ie());
2516
+ e.pattern ?? (e.pattern = ze());
2433
2517
  g.init(t, e);
2434
- }), ur = /* @__PURE__ */ u("$ZodEmail", (t, e) => {
2435
- e.pattern ?? (e.pattern = Nn), g.init(t, e);
2436
- }), hr = /* @__PURE__ */ u("$ZodURL", (t, e) => {
2518
+ }), pr = /* @__PURE__ */ u("$ZodEmail", (t, e) => {
2519
+ e.pattern ?? (e.pattern = An), g.init(t, e);
2520
+ }), lr = /* @__PURE__ */ u("$ZodURL", (t, e) => {
2437
2521
  g.init(t, e), t._zod.check = (n) => {
2438
2522
  try {
2439
2523
  const r = n.value.trim(), i = new URL(r);
@@ -2465,32 +2549,32 @@ const or = {
2465
2549
  });
2466
2550
  }
2467
2551
  };
2468
- }), pr = /* @__PURE__ */ u("$ZodEmoji", (t, e) => {
2469
- e.pattern ?? (e.pattern = An()), g.init(t, e);
2470
- }), lr = /* @__PURE__ */ u("$ZodNanoID", (t, e) => {
2471
- e.pattern ?? (e.pattern = $n), g.init(t, e);
2472
- }), dr = /* @__PURE__ */ u("$ZodCUID", (t, e) => {
2473
- e.pattern ?? (e.pattern = wn), g.init(t, e);
2474
- }), fr = /* @__PURE__ */ u("$ZodCUID2", (t, e) => {
2475
- e.pattern ?? (e.pattern = bn), g.init(t, e);
2476
- }), mr = /* @__PURE__ */ u("$ZodULID", (t, e) => {
2552
+ }), dr = /* @__PURE__ */ u("$ZodEmoji", (t, e) => {
2553
+ e.pattern ?? (e.pattern = Cn()), g.init(t, e);
2554
+ }), fr = /* @__PURE__ */ u("$ZodNanoID", (t, e) => {
2555
+ e.pattern ?? (e.pattern = Pn), g.init(t, e);
2556
+ }), mr = /* @__PURE__ */ u("$ZodCUID", (t, e) => {
2477
2557
  e.pattern ?? (e.pattern = En), g.init(t, e);
2478
- }), gr = /* @__PURE__ */ u("$ZodXID", (t, e) => {
2479
- e.pattern ?? (e.pattern = zn), g.init(t, e);
2480
- }), vr = /* @__PURE__ */ u("$ZodKSUID", (t, e) => {
2558
+ }), gr = /* @__PURE__ */ u("$ZodCUID2", (t, e) => {
2481
2559
  e.pattern ?? (e.pattern = In), g.init(t, e);
2482
- }), _r = /* @__PURE__ */ u("$ZodISODateTime", (t, e) => {
2483
- e.pattern ?? (e.pattern = Mn(e)), g.init(t, e);
2484
- }), kr = /* @__PURE__ */ u("$ZodISODate", (t, e) => {
2485
- e.pattern ?? (e.pattern = Fn), g.init(t, e);
2486
- }), yr = /* @__PURE__ */ u("$ZodISOTime", (t, e) => {
2487
- e.pattern ?? (e.pattern = jn(e)), g.init(t, e);
2488
- }), Tr = /* @__PURE__ */ u("$ZodISODuration", (t, e) => {
2560
+ }), vr = /* @__PURE__ */ u("$ZodULID", (t, e) => {
2561
+ e.pattern ?? (e.pattern = zn), g.init(t, e);
2562
+ }), _r = /* @__PURE__ */ u("$ZodXID", (t, e) => {
2563
+ e.pattern ?? (e.pattern = $n), g.init(t, e);
2564
+ }), kr = /* @__PURE__ */ u("$ZodKSUID", (t, e) => {
2489
2565
  e.pattern ?? (e.pattern = On), g.init(t, e);
2490
- }), wr = /* @__PURE__ */ u("$ZodIPv4", (t, e) => {
2491
- e.pattern ?? (e.pattern = Zn), g.init(t, e), t._zod.bag.format = "ipv4";
2492
- }), br = /* @__PURE__ */ u("$ZodIPv6", (t, e) => {
2493
- e.pattern ?? (e.pattern = Cn), g.init(t, e), t._zod.bag.format = "ipv6", t._zod.check = (n) => {
2566
+ }), yr = /* @__PURE__ */ u("$ZodISODateTime", (t, e) => {
2567
+ e.pattern ?? (e.pattern = Gn(e)), g.init(t, e);
2568
+ }), Tr = /* @__PURE__ */ u("$ZodISODate", (t, e) => {
2569
+ e.pattern ?? (e.pattern = Mn), g.init(t, e);
2570
+ }), wr = /* @__PURE__ */ u("$ZodISOTime", (t, e) => {
2571
+ e.pattern ?? (e.pattern = Un(e)), g.init(t, e);
2572
+ }), br = /* @__PURE__ */ u("$ZodISODuration", (t, e) => {
2573
+ e.pattern ?? (e.pattern = Sn), g.init(t, e);
2574
+ }), Er = /* @__PURE__ */ u("$ZodIPv4", (t, e) => {
2575
+ e.pattern ?? (e.pattern = Rn), g.init(t, e), t._zod.bag.format = "ipv4";
2576
+ }), Ir = /* @__PURE__ */ u("$ZodIPv6", (t, e) => {
2577
+ e.pattern ?? (e.pattern = Ln), g.init(t, e), t._zod.bag.format = "ipv6", t._zod.check = (n) => {
2494
2578
  try {
2495
2579
  new URL(`http://[${n.value}]`);
2496
2580
  } catch {
@@ -2503,10 +2587,10 @@ const or = {
2503
2587
  });
2504
2588
  }
2505
2589
  };
2506
- }), Er = /* @__PURE__ */ u("$ZodCIDRv4", (t, e) => {
2507
- e.pattern ?? (e.pattern = Rn), g.init(t, e);
2508
- }), zr = /* @__PURE__ */ u("$ZodCIDRv6", (t, e) => {
2509
- e.pattern ?? (e.pattern = Ln), g.init(t, e), t._zod.check = (n) => {
2590
+ }), zr = /* @__PURE__ */ u("$ZodCIDRv4", (t, e) => {
2591
+ e.pattern ?? (e.pattern = xn), g.init(t, e);
2592
+ }), $r = /* @__PURE__ */ u("$ZodCIDRv6", (t, e) => {
2593
+ e.pattern ?? (e.pattern = Dn), g.init(t, e), t._zod.check = (n) => {
2510
2594
  const r = n.value.split("/");
2511
2595
  try {
2512
2596
  if (r.length !== 2)
@@ -2542,8 +2626,8 @@ function ft(t) {
2542
2626
  return !1;
2543
2627
  }
2544
2628
  }
2545
- const Ir = /* @__PURE__ */ u("$ZodBase64", (t, e) => {
2546
- e.pattern ?? (e.pattern = xn), g.init(t, e), t._zod.bag.contentEncoding = "base64", t._zod.check = (n) => {
2629
+ const Or = /* @__PURE__ */ u("$ZodBase64", (t, e) => {
2630
+ e.pattern ?? (e.pattern = Fn), g.init(t, e), t._zod.bag.contentEncoding = "base64", t._zod.check = (n) => {
2547
2631
  ft(n.value) || n.issues.push({
2548
2632
  code: "invalid_format",
2549
2633
  format: "base64",
@@ -2553,15 +2637,15 @@ const Ir = /* @__PURE__ */ u("$ZodBase64", (t, e) => {
2553
2637
  });
2554
2638
  };
2555
2639
  });
2556
- function $r(t) {
2640
+ function Pr(t) {
2557
2641
  if (!ct.test(t))
2558
2642
  return !1;
2559
2643
  const e = t.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = e.padEnd(Math.ceil(e.length / 4) * 4, "=");
2560
2644
  return ft(n);
2561
2645
  }
2562
- const Or = /* @__PURE__ */ u("$ZodBase64URL", (t, e) => {
2646
+ const Sr = /* @__PURE__ */ u("$ZodBase64URL", (t, e) => {
2563
2647
  e.pattern ?? (e.pattern = ct), g.init(t, e), t._zod.bag.contentEncoding = "base64url", t._zod.check = (n) => {
2564
- $r(n.value) || n.issues.push({
2648
+ Pr(n.value) || n.issues.push({
2565
2649
  code: "invalid_format",
2566
2650
  format: "base64url",
2567
2651
  input: n.value,
@@ -2569,10 +2653,10 @@ const Or = /* @__PURE__ */ u("$ZodBase64URL", (t, e) => {
2569
2653
  continue: !e.abort
2570
2654
  });
2571
2655
  };
2572
- }), Sr = /* @__PURE__ */ u("$ZodE164", (t, e) => {
2573
- e.pattern ?? (e.pattern = Dn), g.init(t, e);
2656
+ }), Nr = /* @__PURE__ */ u("$ZodE164", (t, e) => {
2657
+ e.pattern ?? (e.pattern = jn), g.init(t, e);
2574
2658
  });
2575
- function Nr(t, e = null) {
2659
+ function Ar(t, e = null) {
2576
2660
  try {
2577
2661
  const n = t.split(".");
2578
2662
  if (n.length !== 3)
@@ -2586,9 +2670,9 @@ function Nr(t, e = null) {
2586
2670
  return !1;
2587
2671
  }
2588
2672
  }
2589
- const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
2673
+ const Zr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
2590
2674
  g.init(t, e), t._zod.check = (n) => {
2591
- Nr(n.value, e.alg) || n.issues.push({
2675
+ Ar(n.value, e.alg) || n.issues.push({
2592
2676
  code: "invalid_format",
2593
2677
  format: "jwt",
2594
2678
  input: n.value,
@@ -2597,7 +2681,7 @@ const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
2597
2681
  });
2598
2682
  };
2599
2683
  }), mt = /* @__PURE__ */ u("$ZodNumber", (t, e) => {
2600
- k.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? Vn, t._zod.parse = (n, r) => {
2684
+ k.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? Jn, t._zod.parse = (n, r) => {
2601
2685
  if (e.coerce)
2602
2686
  try {
2603
2687
  n.value = Number(n.value);
@@ -2615,11 +2699,11 @@ const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
2615
2699
  ...s ? { received: s } : {}
2616
2700
  }), n;
2617
2701
  };
2618
- }), Ar = /* @__PURE__ */ u("$ZodNumberFormat", (t, e) => {
2619
- Kn.init(t, e), mt.init(t, e);
2620
- }), Zr = /* @__PURE__ */ u("$ZodUnknown", (t, e) => {
2702
+ }), Cr = /* @__PURE__ */ u("$ZodNumberFormat", (t, e) => {
2703
+ qn.init(t, e), mt.init(t, e);
2704
+ }), Rr = /* @__PURE__ */ u("$ZodUnknown", (t, e) => {
2621
2705
  k.init(t, e), t._zod.parse = (n) => n;
2622
- }), Cr = /* @__PURE__ */ u("$ZodNever", (t, e) => {
2706
+ }), Lr = /* @__PURE__ */ u("$ZodNever", (t, e) => {
2623
2707
  k.init(t, e), t._zod.parse = (n, r) => (n.issues.push({
2624
2708
  expected: "never",
2625
2709
  code: "invalid_type",
@@ -2630,7 +2714,7 @@ const Pr = /* @__PURE__ */ u("$ZodJWT", (t, e) => {
2630
2714
  function $e(t, e, n) {
2631
2715
  t.issues.length && e.issues.push(...it(n, t.issues)), e.value[n] = t.value;
2632
2716
  }
2633
- const Rr = /* @__PURE__ */ u("$ZodArray", (t, e) => {
2717
+ const xr = /* @__PURE__ */ u("$ZodArray", (t, e) => {
2634
2718
  k.init(t, e), t._zod.parse = (n, r) => {
2635
2719
  const i = n.value;
2636
2720
  if (!Array.isArray(i))
@@ -2652,7 +2736,7 @@ const Rr = /* @__PURE__ */ u("$ZodArray", (t, e) => {
2652
2736
  return s.length ? Promise.all(s).then(() => n) : n;
2653
2737
  };
2654
2738
  });
2655
- function q(t, e, n, r) {
2739
+ function H(t, e, n, r) {
2656
2740
  t.issues.length && e.issues.push(...it(n, t.issues)), t.value === void 0 ? n in r && (e.value[n] = void 0) : e.value[n] = t.value;
2657
2741
  }
2658
2742
  function gt(t) {
@@ -2660,7 +2744,7 @@ function gt(t) {
2660
2744
  for (const r of e)
2661
2745
  if (!t.shape?.[r]?._zod?.traits?.has("$ZodType"))
2662
2746
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
2663
- const n = en(t.shape);
2747
+ const n = nn(t.shape);
2664
2748
  return {
2665
2749
  ...t,
2666
2750
  keys: e,
@@ -2679,7 +2763,7 @@ function vt(t, e, n, r, i, s) {
2679
2763
  continue;
2680
2764
  }
2681
2765
  const d = c.run({ value: e[p], issues: [] }, r);
2682
- d instanceof Promise ? t.push(d.then((f) => q(f, n, p, e))) : q(d, n, p, e);
2766
+ d instanceof Promise ? t.push(d.then((f) => H(f, n, p, e))) : H(d, n, p, e);
2683
2767
  }
2684
2768
  return o.length && n.issues.push({
2685
2769
  code: "unrecognized_keys",
@@ -2688,7 +2772,7 @@ function vt(t, e, n, r, i, s) {
2688
2772
  inst: s
2689
2773
  }), t.length ? Promise.all(t).then(() => n) : n;
2690
2774
  }
2691
- const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
2775
+ const Dr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
2692
2776
  if (k.init(t, e), !Object.getOwnPropertyDescriptor(e, "shape")?.get) {
2693
2777
  const a = e.shape;
2694
2778
  Object.defineProperty(e, "shape", {
@@ -2700,7 +2784,7 @@ const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
2700
2784
  }
2701
2785
  });
2702
2786
  }
2703
- const r = te(() => gt(e));
2787
+ const r = re(() => gt(e));
2704
2788
  m(t._zod, "propValues", () => {
2705
2789
  const a = e.shape, c = {};
2706
2790
  for (const h in a) {
@@ -2713,7 +2797,7 @@ const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
2713
2797
  }
2714
2798
  return c;
2715
2799
  });
2716
- const i = V, s = e.catchall;
2800
+ const i = B, s = e.catchall;
2717
2801
  let o;
2718
2802
  t._zod.parse = (a, c) => {
2719
2803
  o ?? (o = r.value);
@@ -2729,50 +2813,50 @@ const Lr = /* @__PURE__ */ u("$ZodObject", (t, e) => {
2729
2813
  const p = [], d = o.shape;
2730
2814
  for (const f of o.keys) {
2731
2815
  const E = d[f]._zod.run({ value: h[f], issues: [] }, c);
2732
- E instanceof Promise ? p.push(E.then((oe) => q(oe, a, f, h))) : q(E, a, f, h);
2816
+ E instanceof Promise ? p.push(E.then((ce) => H(ce, a, f, h))) : H(E, a, f, h);
2733
2817
  }
2734
2818
  return s ? vt(p, h, a, c, r.value, t) : p.length ? Promise.all(p).then(() => a) : a;
2735
2819
  };
2736
- }), xr = /* @__PURE__ */ u("$ZodObjectJIT", (t, e) => {
2737
- Lr.init(t, e);
2738
- const n = t._zod.parse, r = te(() => gt(e)), i = (f) => {
2739
- const v = new sr(["shape", "payload", "ctx"]), E = r.value, oe = (O) => {
2740
- const I = ze(O);
2741
- return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`;
2820
+ }), Fr = /* @__PURE__ */ u("$ZodObjectJIT", (t, e) => {
2821
+ Dr.init(t, e);
2822
+ const n = t._zod.parse, r = re(() => gt(e)), i = (f) => {
2823
+ const v = new ar(["shape", "payload", "ctx"]), E = r.value, ce = (P) => {
2824
+ const O = Ie(P);
2825
+ return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
2742
2826
  };
2743
2827
  v.write("const input = payload.value;");
2744
2828
  const we = /* @__PURE__ */ Object.create(null);
2745
2829
  let St = 0;
2746
- for (const O of E.keys)
2747
- we[O] = `key_${St++}`;
2830
+ for (const P of E.keys)
2831
+ we[P] = `key_${St++}`;
2748
2832
  v.write("const newResult = {};");
2749
- for (const O of E.keys) {
2750
- const I = we[O], U = ze(O);
2751
- v.write(`const ${I} = ${oe(O)};`), v.write(`
2752
- if (${I}.issues.length) {
2753
- payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
2833
+ for (const P of E.keys) {
2834
+ const O = we[P], G = Ie(P);
2835
+ v.write(`const ${O} = ${ce(P)};`), v.write(`
2836
+ if (${O}.issues.length) {
2837
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
2754
2838
  ...iss,
2755
- path: iss.path ? [${U}, ...iss.path] : [${U}]
2839
+ path: iss.path ? [${G}, ...iss.path] : [${G}]
2756
2840
  })));
2757
2841
  }
2758
2842
 
2759
2843
 
2760
- if (${I}.value === undefined) {
2761
- if (${U} in input) {
2762
- newResult[${U}] = undefined;
2844
+ if (${O}.value === undefined) {
2845
+ if (${G} in input) {
2846
+ newResult[${G}] = undefined;
2763
2847
  }
2764
2848
  } else {
2765
- newResult[${U}] = ${I}.value;
2849
+ newResult[${G}] = ${O}.value;
2766
2850
  }
2767
2851
 
2768
2852
  `);
2769
2853
  }
2770
2854
  v.write("payload.value = newResult;"), v.write("return payload;");
2771
2855
  const Nt = v.compile();
2772
- return (O, I) => Nt(f, O, I);
2856
+ return (P, O) => Nt(f, P, O);
2773
2857
  };
2774
2858
  let s;
2775
- const o = V, a = !et.jitless, h = a && Qt.value, p = e.catchall;
2859
+ const o = B, a = !et.jitless, h = a && en.value, p = e.catchall;
2776
2860
  let d;
2777
2861
  t._zod.parse = (f, v) => {
2778
2862
  d ?? (d = r.value);
@@ -2789,12 +2873,12 @@ function Oe(t, e, n, r) {
2789
2873
  for (const s of t)
2790
2874
  if (s.issues.length === 0)
2791
2875
  return e.value = s.value, e;
2792
- const i = t.filter((s) => !D(s));
2876
+ const i = t.filter((s) => !F(s));
2793
2877
  return i.length === 1 ? (e.value = i[0].value, i[0]) : (e.issues.push({
2794
2878
  code: "invalid_union",
2795
2879
  input: e.value,
2796
2880
  inst: n,
2797
- errors: t.map((s) => s.issues.map((o) => C(o, r, Z())))
2881
+ errors: t.map((s) => s.issues.map((o) => R(o, r, C())))
2798
2882
  }), e);
2799
2883
  }
2800
2884
  const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
@@ -2804,7 +2888,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
2804
2888
  }), m(t._zod, "pattern", () => {
2805
2889
  if (e.options.every((i) => i._zod.pattern)) {
2806
2890
  const i = e.options.map((s) => s._zod.pattern);
2807
- return new RegExp(`^(${i.map((s) => me(s.source)).join("|")})$`);
2891
+ return new RegExp(`^(${i.map((s) => ge(s.source)).join("|")})$`);
2808
2892
  }
2809
2893
  });
2810
2894
  const n = e.options.length === 1, r = e.options[0]._zod.run;
@@ -2828,7 +2912,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
2828
2912
  }
2829
2913
  return o ? Promise.all(a).then((c) => Oe(c, i, t, s)) : Oe(a, i, t, s);
2830
2914
  };
2831
- }), Dr = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (t, e) => {
2915
+ }), jr = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (t, e) => {
2832
2916
  e.inclusive = !1, _t.init(t, e);
2833
2917
  const n = t._zod.parse;
2834
2918
  m(t._zod, "propValues", () => {
@@ -2845,7 +2929,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
2845
2929
  }
2846
2930
  return i;
2847
2931
  });
2848
- const r = te(() => {
2932
+ const r = re(() => {
2849
2933
  const i = e.options, s = /* @__PURE__ */ new Map();
2850
2934
  for (const o of i) {
2851
2935
  const a = o._zod.propValues?.[e.discriminator];
@@ -2861,7 +2945,7 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
2861
2945
  });
2862
2946
  t._zod.parse = (i, s) => {
2863
2947
  const o = i.value;
2864
- if (!V(o))
2948
+ if (!B(o))
2865
2949
  return i.issues.push({
2866
2950
  code: "invalid_type",
2867
2951
  expected: "object",
@@ -2879,21 +2963,21 @@ const _t = /* @__PURE__ */ u("$ZodUnion", (t, e) => {
2879
2963
  inst: t
2880
2964
  }), i);
2881
2965
  };
2882
- }), Fr = /* @__PURE__ */ u("$ZodIntersection", (t, e) => {
2966
+ }), Mr = /* @__PURE__ */ u("$ZodIntersection", (t, e) => {
2883
2967
  k.init(t, e), t._zod.parse = (n, r) => {
2884
2968
  const i = n.value, s = e.left._zod.run({ value: i, issues: [] }, r), o = e.right._zod.run({ value: i, issues: [] }, r);
2885
- return s instanceof Promise || o instanceof Promise ? Promise.all([s, o]).then(([c, h]) => Se(n, c, h)) : Se(n, s, o);
2969
+ return s instanceof Promise || o instanceof Promise ? Promise.all([s, o]).then(([c, h]) => Pe(n, c, h)) : Pe(n, s, o);
2886
2970
  };
2887
2971
  });
2888
- function pe(t, e) {
2972
+ function de(t, e) {
2889
2973
  if (t === e)
2890
2974
  return { valid: !0, data: t };
2891
2975
  if (t instanceof Date && e instanceof Date && +t == +e)
2892
2976
  return { valid: !0, data: t };
2893
- if (B(t) && B(e)) {
2977
+ if (J(t) && J(e)) {
2894
2978
  const n = Object.keys(e), r = Object.keys(t).filter((s) => n.indexOf(s) !== -1), i = { ...t, ...e };
2895
2979
  for (const s of r) {
2896
- const o = pe(t[s], e[s]);
2980
+ const o = de(t[s], e[s]);
2897
2981
  if (!o.valid)
2898
2982
  return {
2899
2983
  valid: !1,
@@ -2908,7 +2992,7 @@ function pe(t, e) {
2908
2992
  return { valid: !1, mergeErrorPath: [] };
2909
2993
  const n = [];
2910
2994
  for (let r = 0; r < t.length; r++) {
2911
- const i = t[r], s = e[r], o = pe(i, s);
2995
+ const i = t[r], s = e[r], o = de(i, s);
2912
2996
  if (!o.valid)
2913
2997
  return {
2914
2998
  valid: !1,
@@ -2920,18 +3004,18 @@ function pe(t, e) {
2920
3004
  }
2921
3005
  return { valid: !1, mergeErrorPath: [] };
2922
3006
  }
2923
- function Se(t, e, n) {
2924
- if (e.issues.length && t.issues.push(...e.issues), n.issues.length && t.issues.push(...n.issues), D(t))
3007
+ function Pe(t, e, n) {
3008
+ if (e.issues.length && t.issues.push(...e.issues), n.issues.length && t.issues.push(...n.issues), F(t))
2925
3009
  return t;
2926
- const r = pe(e.value, n.value);
3010
+ const r = de(e.value, n.value);
2927
3011
  if (!r.valid)
2928
3012
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
2929
3013
  return t.value = r.data, t;
2930
3014
  }
2931
- const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
3015
+ const Ur = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
2932
3016
  k.init(t, e);
2933
3017
  const n = tt(e.entries), r = new Set(n);
2934
- t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) => Ht.has(typeof i)).map((i) => typeof i == "string" ? j(i) : i.toString()).join("|")})$`), t._zod.parse = (i, s) => {
3018
+ t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) => tn.has(typeof i)).map((i) => typeof i == "string" ? M(i) : i.toString()).join("|")})$`), t._zod.parse = (i, s) => {
2935
3019
  const o = i.value;
2936
3020
  return r.has(o) || i.issues.push({
2937
3021
  code: "invalid_value",
@@ -2940,11 +3024,11 @@ const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
2940
3024
  inst: t
2941
3025
  }), i;
2942
3026
  };
2943
- }), Mr = /* @__PURE__ */ u("$ZodLiteral", (t, e) => {
3027
+ }), Gr = /* @__PURE__ */ u("$ZodLiteral", (t, e) => {
2944
3028
  if (k.init(t, e), e.values.length === 0)
2945
3029
  throw new Error("Cannot create literal schema with no valid values");
2946
3030
  const n = new Set(e.values);
2947
- t._zod.values = n, t._zod.pattern = new RegExp(`^(${e.values.map((r) => typeof r == "string" ? j(r) : r ? j(r.toString()) : String(r)).join("|")})$`), t._zod.parse = (r, i) => {
3031
+ t._zod.values = n, t._zod.pattern = new RegExp(`^(${e.values.map((r) => typeof r == "string" ? M(r) : r ? M(r.toString()) : String(r)).join("|")})$`), t._zod.parse = (r, i) => {
2948
3032
  const s = r.value;
2949
3033
  return n.has(s) || r.issues.push({
2950
3034
  code: "invalid_value",
@@ -2953,7 +3037,7 @@ const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
2953
3037
  inst: t
2954
3038
  }), r;
2955
3039
  };
2956
- }), Ur = /* @__PURE__ */ u("$ZodTransform", (t, e) => {
3040
+ }), Vr = /* @__PURE__ */ u("$ZodTransform", (t, e) => {
2957
3041
  k.init(t, e), t._zod.parse = (n, r) => {
2958
3042
  if (r.direction === "backward")
2959
3043
  throw new He(t.constructor.name);
@@ -2961,45 +3045,45 @@ const jr = /* @__PURE__ */ u("$ZodEnum", (t, e) => {
2961
3045
  if (r.async)
2962
3046
  return (i instanceof Promise ? i : Promise.resolve(i)).then((o) => (n.value = o, n));
2963
3047
  if (i instanceof Promise)
2964
- throw new F();
3048
+ throw new j();
2965
3049
  return n.value = i, n;
2966
3050
  };
2967
3051
  });
2968
- function Ne(t, e) {
3052
+ function Se(t, e) {
2969
3053
  return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
2970
3054
  }
2971
- const Gr = /* @__PURE__ */ u("$ZodOptional", (t, e) => {
3055
+ const Br = /* @__PURE__ */ u("$ZodOptional", (t, e) => {
2972
3056
  k.init(t, e), t._zod.optin = "optional", t._zod.optout = "optional", m(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, void 0]) : void 0), m(t._zod, "pattern", () => {
2973
3057
  const n = e.innerType._zod.pattern;
2974
- return n ? new RegExp(`^(${me(n.source)})?$`) : void 0;
3058
+ return n ? new RegExp(`^(${ge(n.source)})?$`) : void 0;
2975
3059
  }), t._zod.parse = (n, r) => {
2976
3060
  if (e.innerType._zod.optin === "optional") {
2977
3061
  const i = e.innerType._zod.run(n, r);
2978
- return i instanceof Promise ? i.then((s) => Ne(s, n.value)) : Ne(i, n.value);
3062
+ return i instanceof Promise ? i.then((s) => Se(s, n.value)) : Se(i, n.value);
2979
3063
  }
2980
3064
  return n.value === void 0 ? n : e.innerType._zod.run(n, r);
2981
3065
  };
2982
- }), Vr = /* @__PURE__ */ u("$ZodNullable", (t, e) => {
3066
+ }), Jr = /* @__PURE__ */ u("$ZodNullable", (t, e) => {
2983
3067
  k.init(t, e), m(t._zod, "optin", () => e.innerType._zod.optin), m(t._zod, "optout", () => e.innerType._zod.optout), m(t._zod, "pattern", () => {
2984
3068
  const n = e.innerType._zod.pattern;
2985
- return n ? new RegExp(`^(${me(n.source)}|null)$`) : void 0;
3069
+ return n ? new RegExp(`^(${ge(n.source)}|null)$`) : void 0;
2986
3070
  }), m(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, null]) : void 0), t._zod.parse = (n, r) => n.value === null ? n : e.innerType._zod.run(n, r);
2987
- }), Br = /* @__PURE__ */ u("$ZodDefault", (t, e) => {
3071
+ }), Wr = /* @__PURE__ */ u("$ZodDefault", (t, e) => {
2988
3072
  k.init(t, e), t._zod.optin = "optional", m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
2989
3073
  if (r.direction === "backward")
2990
3074
  return e.innerType._zod.run(n, r);
2991
3075
  if (n.value === void 0)
2992
3076
  return n.value = e.defaultValue, n;
2993
3077
  const i = e.innerType._zod.run(n, r);
2994
- return i instanceof Promise ? i.then((s) => Pe(s, e)) : Pe(i, e);
3078
+ return i instanceof Promise ? i.then((s) => Ne(s, e)) : Ne(i, e);
2995
3079
  };
2996
3080
  });
2997
- function Pe(t, e) {
3081
+ function Ne(t, e) {
2998
3082
  return t.value === void 0 && (t.value = e.defaultValue), t;
2999
3083
  }
3000
- const Jr = /* @__PURE__ */ u("$ZodPrefault", (t, e) => {
3084
+ const Kr = /* @__PURE__ */ u("$ZodPrefault", (t, e) => {
3001
3085
  k.init(t, e), t._zod.optin = "optional", m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = e.defaultValue), e.innerType._zod.run(n, r));
3002
- }), Wr = /* @__PURE__ */ u("$ZodNonOptional", (t, e) => {
3086
+ }), Yr = /* @__PURE__ */ u("$ZodNonOptional", (t, e) => {
3003
3087
  k.init(t, e), m(t._zod, "values", () => {
3004
3088
  const n = e.innerType._zod.values;
3005
3089
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
@@ -3016,7 +3100,7 @@ function Ae(t, e) {
3016
3100
  inst: e
3017
3101
  }), t;
3018
3102
  }
3019
- const Kr = /* @__PURE__ */ u("$ZodCatch", (t, e) => {
3103
+ const qr = /* @__PURE__ */ u("$ZodCatch", (t, e) => {
3020
3104
  k.init(t, e), m(t._zod, "optin", () => e.innerType._zod.optin), m(t._zod, "optout", () => e.innerType._zod.optout), m(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
3021
3105
  if (r.direction === "backward")
3022
3106
  return e.innerType._zod.run(n, r);
@@ -3024,31 +3108,31 @@ const Kr = /* @__PURE__ */ u("$ZodCatch", (t, e) => {
3024
3108
  return i instanceof Promise ? i.then((s) => (n.value = s.value, s.issues.length && (n.value = e.catchValue({
3025
3109
  ...n,
3026
3110
  error: {
3027
- issues: s.issues.map((o) => C(o, r, Z()))
3111
+ issues: s.issues.map((o) => R(o, r, C()))
3028
3112
  },
3029
3113
  input: n.value
3030
3114
  }), n.issues = []), n)) : (n.value = i.value, i.issues.length && (n.value = e.catchValue({
3031
3115
  ...n,
3032
3116
  error: {
3033
- issues: i.issues.map((s) => C(s, r, Z()))
3117
+ issues: i.issues.map((s) => R(s, r, C()))
3034
3118
  },
3035
3119
  input: n.value
3036
3120
  }), n.issues = []), n);
3037
3121
  };
3038
- }), Yr = /* @__PURE__ */ u("$ZodPipe", (t, e) => {
3122
+ }), Xr = /* @__PURE__ */ u("$ZodPipe", (t, e) => {
3039
3123
  k.init(t, e), m(t._zod, "values", () => e.in._zod.values), m(t._zod, "optin", () => e.in._zod.optin), m(t._zod, "optout", () => e.out._zod.optout), m(t._zod, "propValues", () => e.in._zod.propValues), t._zod.parse = (n, r) => {
3040
3124
  if (r.direction === "backward") {
3041
3125
  const s = e.out._zod.run(n, r);
3042
- return s instanceof Promise ? s.then((o) => K(o, e.in, r)) : K(s, e.in, r);
3126
+ return s instanceof Promise ? s.then((o) => q(o, e.in, r)) : q(s, e.in, r);
3043
3127
  }
3044
3128
  const i = e.in._zod.run(n, r);
3045
- return i instanceof Promise ? i.then((s) => K(s, e.out, r)) : K(i, e.out, r);
3129
+ return i instanceof Promise ? i.then((s) => q(s, e.out, r)) : q(i, e.out, r);
3046
3130
  };
3047
3131
  });
3048
- function K(t, e, n) {
3132
+ function q(t, e, n) {
3049
3133
  return t.issues.length ? (t.aborted = !0, t) : e._zod.run({ value: t.value, issues: t.issues }, n);
3050
3134
  }
3051
- const Xr = /* @__PURE__ */ u("$ZodReadonly", (t, e) => {
3135
+ const Qr = /* @__PURE__ */ u("$ZodReadonly", (t, e) => {
3052
3136
  k.init(t, e), m(t._zod, "propValues", () => e.innerType._zod.propValues), m(t._zod, "values", () => e.innerType._zod.values), m(t._zod, "optin", () => e.innerType?._zod?.optin), m(t._zod, "optout", () => e.innerType?._zod?.optout), t._zod.parse = (n, r) => {
3053
3137
  if (r.direction === "backward")
3054
3138
  return e.innerType._zod.run(n, r);
@@ -3059,7 +3143,7 @@ const Xr = /* @__PURE__ */ u("$ZodReadonly", (t, e) => {
3059
3143
  function Ze(t) {
3060
3144
  return t.value = Object.freeze(t.value), t;
3061
3145
  }
3062
- const qr = /* @__PURE__ */ u("$ZodCustom", (t, e) => {
3146
+ const Hr = /* @__PURE__ */ u("$ZodCustom", (t, e) => {
3063
3147
  b.init(t, e), k.init(t, e), t._zod.parse = (n, r) => n, t._zod.check = (n) => {
3064
3148
  const r = n.value, i = e.fn(r);
3065
3149
  if (i instanceof Promise)
@@ -3079,11 +3163,11 @@ function Ce(t, e, n, r) {
3079
3163
  continue: !r._zod.def.abort
3080
3164
  // params: inst._zod.def.params,
3081
3165
  };
3082
- r._zod.def.params && (i.params = r._zod.def.params), e.issues.push(J(i));
3166
+ r._zod.def.params && (i.params = r._zod.def.params), e.issues.push(W(i));
3083
3167
  }
3084
3168
  }
3085
3169
  var Re;
3086
- class Qr {
3170
+ class ei {
3087
3171
  constructor() {
3088
3172
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
3089
3173
  }
@@ -3117,18 +3201,18 @@ class Qr {
3117
3201
  return this._map.has(e);
3118
3202
  }
3119
3203
  }
3120
- function Hr() {
3121
- return new Qr();
3204
+ function ti() {
3205
+ return new ei();
3122
3206
  }
3123
- (Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry = Hr());
3124
- const G = globalThis.__zod_globalRegistry;
3125
- function ei(t, e) {
3207
+ (Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry = ti());
3208
+ const V = globalThis.__zod_globalRegistry;
3209
+ function ni(t, e) {
3126
3210
  return new t({
3127
3211
  type: "string",
3128
3212
  ...l(e)
3129
3213
  });
3130
3214
  }
3131
- function ti(t, e) {
3215
+ function ri(t, e) {
3132
3216
  return new t({
3133
3217
  type: "string",
3134
3218
  format: "email",
@@ -3146,7 +3230,7 @@ function Le(t, e) {
3146
3230
  ...l(e)
3147
3231
  });
3148
3232
  }
3149
- function ni(t, e) {
3233
+ function ii(t, e) {
3150
3234
  return new t({
3151
3235
  type: "string",
3152
3236
  format: "uuid",
@@ -3155,7 +3239,7 @@ function ni(t, e) {
3155
3239
  ...l(e)
3156
3240
  });
3157
3241
  }
3158
- function ri(t, e) {
3242
+ function si(t, e) {
3159
3243
  return new t({
3160
3244
  type: "string",
3161
3245
  format: "uuid",
@@ -3165,7 +3249,7 @@ function ri(t, e) {
3165
3249
  ...l(e)
3166
3250
  });
3167
3251
  }
3168
- function ii(t, e) {
3252
+ function oi(t, e) {
3169
3253
  return new t({
3170
3254
  type: "string",
3171
3255
  format: "uuid",
@@ -3175,7 +3259,7 @@ function ii(t, e) {
3175
3259
  ...l(e)
3176
3260
  });
3177
3261
  }
3178
- function si(t, e) {
3262
+ function ai(t, e) {
3179
3263
  return new t({
3180
3264
  type: "string",
3181
3265
  format: "uuid",
@@ -3185,7 +3269,7 @@ function si(t, e) {
3185
3269
  ...l(e)
3186
3270
  });
3187
3271
  }
3188
- function oi(t, e) {
3272
+ function ci(t, e) {
3189
3273
  return new t({
3190
3274
  type: "string",
3191
3275
  format: "url",
@@ -3194,7 +3278,7 @@ function oi(t, e) {
3194
3278
  ...l(e)
3195
3279
  });
3196
3280
  }
3197
- function ai(t, e) {
3281
+ function ui(t, e) {
3198
3282
  return new t({
3199
3283
  type: "string",
3200
3284
  format: "emoji",
@@ -3203,7 +3287,7 @@ function ai(t, e) {
3203
3287
  ...l(e)
3204
3288
  });
3205
3289
  }
3206
- function ci(t, e) {
3290
+ function hi(t, e) {
3207
3291
  return new t({
3208
3292
  type: "string",
3209
3293
  format: "nanoid",
@@ -3212,7 +3296,7 @@ function ci(t, e) {
3212
3296
  ...l(e)
3213
3297
  });
3214
3298
  }
3215
- function ui(t, e) {
3299
+ function pi(t, e) {
3216
3300
  return new t({
3217
3301
  type: "string",
3218
3302
  format: "cuid",
@@ -3221,7 +3305,7 @@ function ui(t, e) {
3221
3305
  ...l(e)
3222
3306
  });
3223
3307
  }
3224
- function hi(t, e) {
3308
+ function li(t, e) {
3225
3309
  return new t({
3226
3310
  type: "string",
3227
3311
  format: "cuid2",
@@ -3230,7 +3314,7 @@ function hi(t, e) {
3230
3314
  ...l(e)
3231
3315
  });
3232
3316
  }
3233
- function pi(t, e) {
3317
+ function di(t, e) {
3234
3318
  return new t({
3235
3319
  type: "string",
3236
3320
  format: "ulid",
@@ -3239,7 +3323,7 @@ function pi(t, e) {
3239
3323
  ...l(e)
3240
3324
  });
3241
3325
  }
3242
- function li(t, e) {
3326
+ function fi(t, e) {
3243
3327
  return new t({
3244
3328
  type: "string",
3245
3329
  format: "xid",
@@ -3248,7 +3332,7 @@ function li(t, e) {
3248
3332
  ...l(e)
3249
3333
  });
3250
3334
  }
3251
- function di(t, e) {
3335
+ function mi(t, e) {
3252
3336
  return new t({
3253
3337
  type: "string",
3254
3338
  format: "ksuid",
@@ -3257,7 +3341,7 @@ function di(t, e) {
3257
3341
  ...l(e)
3258
3342
  });
3259
3343
  }
3260
- function fi(t, e) {
3344
+ function gi(t, e) {
3261
3345
  return new t({
3262
3346
  type: "string",
3263
3347
  format: "ipv4",
@@ -3266,7 +3350,7 @@ function fi(t, e) {
3266
3350
  ...l(e)
3267
3351
  });
3268
3352
  }
3269
- function mi(t, e) {
3353
+ function vi(t, e) {
3270
3354
  return new t({
3271
3355
  type: "string",
3272
3356
  format: "ipv6",
@@ -3275,7 +3359,7 @@ function mi(t, e) {
3275
3359
  ...l(e)
3276
3360
  });
3277
3361
  }
3278
- function gi(t, e) {
3362
+ function _i(t, e) {
3279
3363
  return new t({
3280
3364
  type: "string",
3281
3365
  format: "cidrv4",
@@ -3284,7 +3368,7 @@ function gi(t, e) {
3284
3368
  ...l(e)
3285
3369
  });
3286
3370
  }
3287
- function vi(t, e) {
3371
+ function ki(t, e) {
3288
3372
  return new t({
3289
3373
  type: "string",
3290
3374
  format: "cidrv6",
@@ -3293,7 +3377,7 @@ function vi(t, e) {
3293
3377
  ...l(e)
3294
3378
  });
3295
3379
  }
3296
- function _i(t, e) {
3380
+ function yi(t, e) {
3297
3381
  return new t({
3298
3382
  type: "string",
3299
3383
  format: "base64",
@@ -3302,7 +3386,7 @@ function _i(t, e) {
3302
3386
  ...l(e)
3303
3387
  });
3304
3388
  }
3305
- function ki(t, e) {
3389
+ function Ti(t, e) {
3306
3390
  return new t({
3307
3391
  type: "string",
3308
3392
  format: "base64url",
@@ -3311,7 +3395,7 @@ function ki(t, e) {
3311
3395
  ...l(e)
3312
3396
  });
3313
3397
  }
3314
- function yi(t, e) {
3398
+ function wi(t, e) {
3315
3399
  return new t({
3316
3400
  type: "string",
3317
3401
  format: "e164",
@@ -3320,7 +3404,7 @@ function yi(t, e) {
3320
3404
  ...l(e)
3321
3405
  });
3322
3406
  }
3323
- function Ti(t, e) {
3407
+ function bi(t, e) {
3324
3408
  return new t({
3325
3409
  type: "string",
3326
3410
  format: "jwt",
@@ -3329,7 +3413,7 @@ function Ti(t, e) {
3329
3413
  ...l(e)
3330
3414
  });
3331
3415
  }
3332
- function wi(t, e) {
3416
+ function Ei(t, e) {
3333
3417
  return new t({
3334
3418
  type: "string",
3335
3419
  format: "datetime",
@@ -3340,7 +3424,7 @@ function wi(t, e) {
3340
3424
  ...l(e)
3341
3425
  });
3342
3426
  }
3343
- function bi(t, e) {
3427
+ function Ii(t, e) {
3344
3428
  return new t({
3345
3429
  type: "string",
3346
3430
  format: "date",
@@ -3348,7 +3432,7 @@ function bi(t, e) {
3348
3432
  ...l(e)
3349
3433
  });
3350
3434
  }
3351
- function Ei(t, e) {
3435
+ function zi(t, e) {
3352
3436
  return new t({
3353
3437
  type: "string",
3354
3438
  format: "time",
@@ -3357,7 +3441,7 @@ function Ei(t, e) {
3357
3441
  ...l(e)
3358
3442
  });
3359
3443
  }
3360
- function zi(t, e) {
3444
+ function $i(t, e) {
3361
3445
  return new t({
3362
3446
  type: "string",
3363
3447
  format: "duration",
@@ -3365,14 +3449,14 @@ function zi(t, e) {
3365
3449
  ...l(e)
3366
3450
  });
3367
3451
  }
3368
- function Ii(t, e) {
3452
+ function Oi(t, e) {
3369
3453
  return new t({
3370
3454
  type: "number",
3371
3455
  checks: [],
3372
3456
  ...l(e)
3373
3457
  });
3374
3458
  }
3375
- function $i(t, e) {
3459
+ function Pi(t, e) {
3376
3460
  return new t({
3377
3461
  type: "number",
3378
3462
  check: "number_format",
@@ -3381,12 +3465,12 @@ function $i(t, e) {
3381
3465
  ...l(e)
3382
3466
  });
3383
3467
  }
3384
- function Oi(t) {
3468
+ function Si(t) {
3385
3469
  return new t({
3386
3470
  type: "unknown"
3387
3471
  });
3388
3472
  }
3389
- function Si(t, e) {
3473
+ function Ni(t, e) {
3390
3474
  return new t({
3391
3475
  type: "never",
3392
3476
  ...l(e)
@@ -3400,7 +3484,7 @@ function xe(t, e) {
3400
3484
  inclusive: !1
3401
3485
  });
3402
3486
  }
3403
- function ce(t, e) {
3487
+ function he(t, e) {
3404
3488
  return new lt({
3405
3489
  check: "less_than",
3406
3490
  ...l(e),
@@ -3416,7 +3500,7 @@ function De(t, e) {
3416
3500
  inclusive: !1
3417
3501
  });
3418
3502
  }
3419
- function ue(t, e) {
3503
+ function pe(t, e) {
3420
3504
  return new dt({
3421
3505
  check: "greater_than",
3422
3506
  ...l(e),
@@ -3425,101 +3509,101 @@ function ue(t, e) {
3425
3509
  });
3426
3510
  }
3427
3511
  function Fe(t, e) {
3428
- return new Wn({
3512
+ return new Yn({
3429
3513
  check: "multiple_of",
3430
3514
  ...l(e),
3431
3515
  value: t
3432
3516
  });
3433
3517
  }
3434
3518
  function kt(t, e) {
3435
- return new Yn({
3519
+ return new Xn({
3436
3520
  check: "max_length",
3437
3521
  ...l(e),
3438
3522
  maximum: t
3439
3523
  });
3440
3524
  }
3441
- function Q(t, e) {
3442
- return new Xn({
3525
+ function ee(t, e) {
3526
+ return new Qn({
3443
3527
  check: "min_length",
3444
3528
  ...l(e),
3445
3529
  minimum: t
3446
3530
  });
3447
3531
  }
3448
3532
  function yt(t, e) {
3449
- return new qn({
3533
+ return new Hn({
3450
3534
  check: "length_equals",
3451
3535
  ...l(e),
3452
3536
  length: t
3453
3537
  });
3454
3538
  }
3455
- function Ni(t, e) {
3456
- return new Qn({
3539
+ function Ai(t, e) {
3540
+ return new er({
3457
3541
  check: "string_format",
3458
3542
  format: "regex",
3459
3543
  ...l(e),
3460
3544
  pattern: t
3461
3545
  });
3462
3546
  }
3463
- function Pi(t) {
3464
- return new Hn({
3547
+ function Zi(t) {
3548
+ return new tr({
3465
3549
  check: "string_format",
3466
3550
  format: "lowercase",
3467
3551
  ...l(t)
3468
3552
  });
3469
3553
  }
3470
- function Ai(t) {
3471
- return new er({
3554
+ function Ci(t) {
3555
+ return new nr({
3472
3556
  check: "string_format",
3473
3557
  format: "uppercase",
3474
3558
  ...l(t)
3475
3559
  });
3476
3560
  }
3477
- function Zi(t, e) {
3478
- return new tr({
3561
+ function Ri(t, e) {
3562
+ return new rr({
3479
3563
  check: "string_format",
3480
3564
  format: "includes",
3481
3565
  ...l(e),
3482
3566
  includes: t
3483
3567
  });
3484
3568
  }
3485
- function Ci(t, e) {
3486
- return new nr({
3569
+ function Li(t, e) {
3570
+ return new ir({
3487
3571
  check: "string_format",
3488
3572
  format: "starts_with",
3489
3573
  ...l(e),
3490
3574
  prefix: t
3491
3575
  });
3492
3576
  }
3493
- function Ri(t, e) {
3494
- return new rr({
3577
+ function xi(t, e) {
3578
+ return new sr({
3495
3579
  check: "string_format",
3496
3580
  format: "ends_with",
3497
3581
  ...l(e),
3498
3582
  suffix: t
3499
3583
  });
3500
3584
  }
3501
- function M(t) {
3502
- return new ir({
3585
+ function U(t) {
3586
+ return new or({
3503
3587
  check: "overwrite",
3504
3588
  tx: t
3505
3589
  });
3506
3590
  }
3507
- function Li(t) {
3508
- return M((e) => e.normalize(t));
3509
- }
3510
- function xi() {
3511
- return M((t) => t.trim());
3512
- }
3513
- function Di() {
3514
- return M((t) => t.toLowerCase());
3591
+ function Di(t) {
3592
+ return U((e) => e.normalize(t));
3515
3593
  }
3516
3594
  function Fi() {
3517
- return M((t) => t.toUpperCase());
3595
+ return U((t) => t.trim());
3518
3596
  }
3519
3597
  function ji() {
3520
- return M((t) => qt(t));
3598
+ return U((t) => t.toLowerCase());
3599
+ }
3600
+ function Mi() {
3601
+ return U((t) => t.toUpperCase());
3521
3602
  }
3522
- function Mi(t, e, n) {
3603
+ function Ui() {
3604
+ return U((t) => Ht(t));
3605
+ }
3606
+ function Gi(t, e, n) {
3523
3607
  return new t({
3524
3608
  type: "array",
3525
3609
  element: e,
@@ -3529,7 +3613,7 @@ function Mi(t, e, n) {
3529
3613
  ...l(n)
3530
3614
  });
3531
3615
  }
3532
- function Ui(t, e, n) {
3616
+ function Vi(t, e, n) {
3533
3617
  return new t({
3534
3618
  type: "custom",
3535
3619
  check: "custom",
@@ -3537,18 +3621,18 @@ function Ui(t, e, n) {
3537
3621
  ...l(n)
3538
3622
  });
3539
3623
  }
3540
- function Gi(t) {
3541
- const e = Vi((n) => (n.addIssue = (r) => {
3624
+ function Bi(t) {
3625
+ const e = Ji((n) => (n.addIssue = (r) => {
3542
3626
  if (typeof r == "string")
3543
- n.issues.push(J(r, n.value, e._zod.def));
3627
+ n.issues.push(W(r, n.value, e._zod.def));
3544
3628
  else {
3545
3629
  const i = r;
3546
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !e._zod.def.abort), n.issues.push(J(i));
3630
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !e._zod.def.abort), n.issues.push(W(i));
3547
3631
  }
3548
3632
  }, t(n.value, n)));
3549
3633
  return e;
3550
3634
  }
3551
- function Vi(t, e) {
3635
+ function Ji(t, e) {
3552
3636
  const n = new b({
3553
3637
  check: "custom",
3554
3638
  ...l(e)
@@ -3559,7 +3643,7 @@ function Tt(t) {
3559
3643
  let e = t?.target ?? "draft-2020-12";
3560
3644
  return e === "draft-4" && (e = "draft-04"), e === "draft-7" && (e = "draft-07"), {
3561
3645
  processors: t.processors ?? {},
3562
- metadataRegistry: t?.metadata ?? G,
3646
+ metadataRegistry: t?.metadata ?? V,
3563
3647
  target: e,
3564
3648
  unrepresentable: t?.unrepresentable ?? "throw",
3565
3649
  override: t?.override ?? (() => {
@@ -3706,8 +3790,8 @@ function bt(t, e) {
3706
3790
  value: {
3707
3791
  ...e["~standard"],
3708
3792
  jsonSchema: {
3709
- input: H(e, "input"),
3710
- output: H(e, "output")
3793
+ input: te(e, "input"),
3794
+ output: te(e, "output")
3711
3795
  }
3712
3796
  },
3713
3797
  enumerable: !1,
@@ -3759,24 +3843,24 @@ function w(t, e) {
3759
3843
  }
3760
3844
  return !1;
3761
3845
  }
3762
- const Bi = (t, e = {}) => (n) => {
3846
+ const Wi = (t, e = {}) => (n) => {
3763
3847
  const r = Tt({ ...n, processors: e });
3764
3848
  return T(t, r), wt(r, t), bt(r, t);
3765
- }, H = (t, e) => (n) => {
3849
+ }, te = (t, e) => (n) => {
3766
3850
  const { libraryOptions: r, target: i } = n ?? {}, s = Tt({ ...r ?? {}, target: i, io: e, processors: {} });
3767
3851
  return T(t, s), wt(s, t), bt(s, t);
3768
- }, Ji = {
3852
+ }, Ki = {
3769
3853
  guid: "uuid",
3770
3854
  url: "uri",
3771
3855
  datetime: "date-time",
3772
3856
  json_string: "json-string",
3773
3857
  regex: ""
3774
3858
  // do not set
3775
- }, Wi = (t, e, n, r) => {
3859
+ }, Yi = (t, e, n, r) => {
3776
3860
  const i = n;
3777
3861
  i.type = "string";
3778
3862
  const { minimum: s, maximum: o, format: a, patterns: c, contentEncoding: h } = t._zod.bag;
3779
- if (typeof s == "number" && (i.minLength = s), typeof o == "number" && (i.maxLength = o), a && (i.format = Ji[a] ?? a, i.format === "" && delete i.format), h && (i.contentEncoding = h), c && c.size > 0) {
3863
+ if (typeof s == "number" && (i.minLength = s), typeof o == "number" && (i.maxLength = o), a && (i.format = Ki[a] ?? a, i.format === "" && delete i.format), h && (i.contentEncoding = h), c && c.size > 0) {
3780
3864
  const p = [...c];
3781
3865
  p.length === 1 ? i.pattern = p[0].source : p.length > 1 && (i.allOf = [
3782
3866
  ...p.map((d) => ({
@@ -3785,16 +3869,16 @@ const Bi = (t, e = {}) => (n) => {
3785
3869
  }))
3786
3870
  ]);
3787
3871
  }
3788
- }, Ki = (t, e, n, r) => {
3872
+ }, qi = (t, e, n, r) => {
3789
3873
  const i = n, { minimum: s, maximum: o, format: a, multipleOf: c, exclusiveMaximum: h, exclusiveMinimum: p } = t._zod.bag;
3790
3874
  typeof a == "string" && a.includes("int") ? i.type = "integer" : i.type = "number", typeof p == "number" && (e.target === "draft-04" || e.target === "openapi-3.0" ? (i.minimum = p, i.exclusiveMinimum = !0) : i.exclusiveMinimum = p), typeof s == "number" && (i.minimum = s, typeof p == "number" && e.target !== "draft-04" && (p >= s ? delete i.minimum : delete i.exclusiveMinimum)), typeof h == "number" && (e.target === "draft-04" || e.target === "openapi-3.0" ? (i.maximum = h, i.exclusiveMaximum = !0) : i.exclusiveMaximum = h), typeof o == "number" && (i.maximum = o, typeof h == "number" && e.target !== "draft-04" && (h <= o ? delete i.maximum : delete i.exclusiveMaximum)), typeof c == "number" && (i.multipleOf = c);
3791
- }, Yi = (t, e, n, r) => {
3792
- n.not = {};
3793
3875
  }, Xi = (t, e, n, r) => {
3794
- }, qi = (t, e, n, r) => {
3876
+ n.not = {};
3877
+ }, Qi = (t, e, n, r) => {
3878
+ }, Hi = (t, e, n, r) => {
3795
3879
  const i = t._zod.def, s = tt(i.entries);
3796
3880
  s.every((o) => typeof o == "number") && (n.type = "number"), s.every((o) => typeof o == "string") && (n.type = "string"), n.enum = s;
3797
- }, Qi = (t, e, n, r) => {
3881
+ }, es = (t, e, n, r) => {
3798
3882
  const i = t._zod.def, s = [];
3799
3883
  for (const o of i.values)
3800
3884
  if (o === void 0) {
@@ -3811,16 +3895,16 @@ const Bi = (t, e = {}) => (n) => {
3811
3895
  n.type = o === null ? "null" : typeof o, e.target === "draft-04" || e.target === "openapi-3.0" ? n.enum = [o] : n.const = o;
3812
3896
  } else
3813
3897
  s.every((o) => typeof o == "number") && (n.type = "number"), s.every((o) => typeof o == "string") && (n.type = "string"), s.every((o) => typeof o == "boolean") && (n.type = "boolean"), s.every((o) => o === null) && (n.type = "null"), n.enum = s;
3814
- }, Hi = (t, e, n, r) => {
3898
+ }, ts = (t, e, n, r) => {
3815
3899
  if (e.unrepresentable === "throw")
3816
3900
  throw new Error("Custom types cannot be represented in JSON Schema");
3817
- }, es = (t, e, n, r) => {
3901
+ }, ns = (t, e, n, r) => {
3818
3902
  if (e.unrepresentable === "throw")
3819
3903
  throw new Error("Transforms cannot be represented in JSON Schema");
3820
- }, ts = (t, e, n, r) => {
3904
+ }, rs = (t, e, n, r) => {
3821
3905
  const i = n, s = t._zod.def, { minimum: o, maximum: a } = t._zod.bag;
3822
3906
  typeof o == "number" && (i.minItems = o), typeof a == "number" && (i.maxItems = a), i.type = "array", i.items = T(s.element, e, { ...r, path: [...r.path, "items"] });
3823
- }, ns = (t, e, n, r) => {
3907
+ }, is = (t, e, n, r) => {
3824
3908
  const i = n, s = t._zod.def;
3825
3909
  i.type = "object", i.properties = {};
3826
3910
  const o = s.shape;
@@ -3837,13 +3921,13 @@ const Bi = (t, e = {}) => (n) => {
3837
3921
  ...r,
3838
3922
  path: [...r.path, "additionalProperties"]
3839
3923
  })) : e.io === "output" && (i.additionalProperties = !1);
3840
- }, rs = (t, e, n, r) => {
3924
+ }, ss = (t, e, n, r) => {
3841
3925
  const i = t._zod.def, s = i.inclusive === !1, o = i.options.map((a, c) => T(a, e, {
3842
3926
  ...r,
3843
3927
  path: [...r.path, s ? "oneOf" : "anyOf", c]
3844
3928
  }));
3845
3929
  s ? n.oneOf = o : n.anyOf = o;
3846
- }, is = (t, e, n, r) => {
3930
+ }, os = (t, e, n, r) => {
3847
3931
  const i = t._zod.def, s = T(i.left, e, {
3848
3932
  ...r,
3849
3933
  path: [...r.path, "allOf", 0]
@@ -3855,25 +3939,25 @@ const Bi = (t, e = {}) => (n) => {
3855
3939
  ...a(o) ? o.allOf : [o]
3856
3940
  ];
3857
3941
  n.allOf = c;
3858
- }, ss = (t, e, n, r) => {
3942
+ }, as = (t, e, n, r) => {
3859
3943
  const i = t._zod.def, s = T(i.innerType, e, r), o = e.seen.get(t);
3860
3944
  e.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
3861
- }, os = (t, e, n, r) => {
3945
+ }, cs = (t, e, n, r) => {
3862
3946
  const i = t._zod.def;
3863
3947
  T(i.innerType, e, r);
3864
3948
  const s = e.seen.get(t);
3865
3949
  s.ref = i.innerType;
3866
- }, as = (t, e, n, r) => {
3950
+ }, us = (t, e, n, r) => {
3867
3951
  const i = t._zod.def;
3868
3952
  T(i.innerType, e, r);
3869
3953
  const s = e.seen.get(t);
3870
3954
  s.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
3871
- }, cs = (t, e, n, r) => {
3955
+ }, hs = (t, e, n, r) => {
3872
3956
  const i = t._zod.def;
3873
3957
  T(i.innerType, e, r);
3874
3958
  const s = e.seen.get(t);
3875
3959
  s.ref = i.innerType, e.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
3876
- }, us = (t, e, n, r) => {
3960
+ }, ps = (t, e, n, r) => {
3877
3961
  const i = t._zod.def;
3878
3962
  T(i.innerType, e, r);
3879
3963
  const s = e.seen.get(t);
@@ -3885,64 +3969,64 @@ const Bi = (t, e = {}) => (n) => {
3885
3969
  throw new Error("Dynamic catch values are not supported in JSON Schema");
3886
3970
  }
3887
3971
  n.default = o;
3888
- }, hs = (t, e, n, r) => {
3972
+ }, ls = (t, e, n, r) => {
3889
3973
  const i = t._zod.def, s = e.io === "input" ? i.in._zod.def.type === "transform" ? i.out : i.in : i.out;
3890
3974
  T(s, e, r);
3891
3975
  const o = e.seen.get(t);
3892
3976
  o.ref = s;
3893
- }, ps = (t, e, n, r) => {
3977
+ }, ds = (t, e, n, r) => {
3894
3978
  const i = t._zod.def;
3895
3979
  T(i.innerType, e, r);
3896
3980
  const s = e.seen.get(t);
3897
3981
  s.ref = i.innerType, n.readOnly = !0;
3898
- }, ls = (t, e, n, r) => {
3982
+ }, fs = (t, e, n, r) => {
3899
3983
  const i = t._zod.def;
3900
3984
  T(i.innerType, e, r);
3901
3985
  const s = e.seen.get(t);
3902
3986
  s.ref = i.innerType;
3903
- }, ds = /* @__PURE__ */ u("ZodISODateTime", (t, e) => {
3904
- _r.init(t, e), _.init(t, e);
3905
- });
3906
- function fs(t) {
3907
- return wi(ds, t);
3908
- }
3909
- const ms = /* @__PURE__ */ u("ZodISODate", (t, e) => {
3910
- kr.init(t, e), _.init(t, e);
3987
+ }, ms = /* @__PURE__ */ u("ZodISODateTime", (t, e) => {
3988
+ yr.init(t, e), _.init(t, e);
3911
3989
  });
3912
3990
  function gs(t) {
3913
- return bi(ms, t);
3991
+ return Ei(ms, t);
3914
3992
  }
3915
- const vs = /* @__PURE__ */ u("ZodISOTime", (t, e) => {
3916
- yr.init(t, e), _.init(t, e);
3993
+ const vs = /* @__PURE__ */ u("ZodISODate", (t, e) => {
3994
+ Tr.init(t, e), _.init(t, e);
3917
3995
  });
3918
3996
  function _s(t) {
3919
- return Ei(vs, t);
3997
+ return Ii(vs, t);
3920
3998
  }
3921
- const ks = /* @__PURE__ */ u("ZodISODuration", (t, e) => {
3922
- Tr.init(t, e), _.init(t, e);
3999
+ const ks = /* @__PURE__ */ u("ZodISOTime", (t, e) => {
4000
+ wr.init(t, e), _.init(t, e);
3923
4001
  });
3924
4002
  function ys(t) {
3925
4003
  return zi(ks, t);
3926
4004
  }
3927
- const Ts = (t, e) => {
4005
+ const Ts = /* @__PURE__ */ u("ZodISODuration", (t, e) => {
4006
+ br.init(t, e), _.init(t, e);
4007
+ });
4008
+ function ws(t) {
4009
+ return $i(Ts, t);
4010
+ }
4011
+ const bs = (t, e) => {
3928
4012
  ot.init(t, e), t.name = "ZodError", Object.defineProperties(t, {
3929
4013
  format: {
3930
- value: (n) => pn(t, n)
4014
+ value: (n) => dn(t, n)
3931
4015
  // enumerable: false,
3932
4016
  },
3933
4017
  flatten: {
3934
- value: (n) => hn(t, n)
4018
+ value: (n) => ln(t, n)
3935
4019
  // enumerable: false,
3936
4020
  },
3937
4021
  addIssue: {
3938
4022
  value: (n) => {
3939
- t.issues.push(n), t.message = JSON.stringify(t.issues, he, 2);
4023
+ t.issues.push(n), t.message = JSON.stringify(t.issues, le, 2);
3940
4024
  }
3941
4025
  // enumerable: false,
3942
4026
  },
3943
4027
  addIssues: {
3944
4028
  value: (n) => {
3945
- t.issues.push(...n), t.message = JSON.stringify(t.issues, he, 2);
4029
+ t.issues.push(...n), t.message = JSON.stringify(t.issues, le, 2);
3946
4030
  }
3947
4031
  // enumerable: false,
3948
4032
  },
@@ -3953,157 +4037,157 @@ const Ts = (t, e) => {
3953
4037
  // enumerable: false,
3954
4038
  }
3955
4039
  });
3956
- }, z = u("ZodError", Ts, {
4040
+ }, $ = u("ZodError", bs, {
3957
4041
  Parent: Error
3958
- }), ws = /* @__PURE__ */ ve(z), bs = /* @__PURE__ */ _e(z), Es = /* @__PURE__ */ ne(z), zs = /* @__PURE__ */ re(z), Is = /* @__PURE__ */ fn(z), $s = /* @__PURE__ */ mn(z), Os = /* @__PURE__ */ gn(z), Ss = /* @__PURE__ */ vn(z), Ns = /* @__PURE__ */ _n(z), Ps = /* @__PURE__ */ kn(z), As = /* @__PURE__ */ yn(z), Zs = /* @__PURE__ */ Tn(z), y = /* @__PURE__ */ u("ZodType", (t, e) => (k.init(t, e), Object.assign(t["~standard"], {
4042
+ }), Es = /* @__PURE__ */ _e($), Is = /* @__PURE__ */ ke($), zs = /* @__PURE__ */ ie($), $s = /* @__PURE__ */ se($), Os = /* @__PURE__ */ gn($), Ps = /* @__PURE__ */ vn($), Ss = /* @__PURE__ */ _n($), Ns = /* @__PURE__ */ kn($), As = /* @__PURE__ */ yn($), Zs = /* @__PURE__ */ Tn($), Cs = /* @__PURE__ */ wn($), Rs = /* @__PURE__ */ bn($), y = /* @__PURE__ */ u("ZodType", (t, e) => (k.init(t, e), Object.assign(t["~standard"], {
3959
4043
  jsonSchema: {
3960
- input: H(t, "input"),
3961
- output: H(t, "output")
4044
+ input: te(t, "input"),
4045
+ output: te(t, "output")
3962
4046
  }
3963
- }), t.toJSONSchema = Bi(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...n) => t.clone(L(e, {
4047
+ }), t.toJSONSchema = Wi(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...n) => t.clone(x(e, {
3964
4048
  checks: [
3965
4049
  ...e.checks ?? [],
3966
4050
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3967
4051
  ]
3968
- })), t.clone = (n, r) => P(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => ws(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Es(t, n, r), t.parseAsync = async (n, r) => bs(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => zs(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Is(t, n, r), t.decode = (n, r) => $s(t, n, r), t.encodeAsync = async (n, r) => Os(t, n, r), t.decodeAsync = async (n, r) => Ss(t, n, r), t.safeEncode = (n, r) => Ns(t, n, r), t.safeDecode = (n, r) => Ps(t, n, r), t.safeEncodeAsync = async (n, r) => As(t, n, r), t.safeDecodeAsync = async (n, r) => Zs(t, n, r), t.refine = (n, r) => t.check(zo(n, r)), t.superRefine = (n) => t.check(Io(n)), t.overwrite = (n) => t.check(M(n)), t.optional = () => Ge(t), t.nullable = () => Ve(t), t.nullish = () => Ge(Ve(t)), t.nonoptional = (n) => _o(t, n), t.array = () => A(t), t.or = (n) => ye([t, n]), t.and = (n) => co(t, n), t.transform = (n) => Be(t, po(n)), t.default = (n) => mo(t, n), t.prefault = (n) => vo(t, n), t.catch = (n) => yo(t, n), t.pipe = (n) => Be(t, n), t.readonly = () => bo(t), t.describe = (n) => {
4052
+ })), t.clone = (n, r) => N(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => Es(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => zs(t, n, r), t.parseAsync = async (n, r) => Is(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => $s(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Os(t, n, r), t.decode = (n, r) => Ps(t, n, r), t.encodeAsync = async (n, r) => Ss(t, n, r), t.decodeAsync = async (n, r) => Ns(t, n, r), t.safeEncode = (n, r) => As(t, n, r), t.safeDecode = (n, r) => Zs(t, n, r), t.safeEncodeAsync = async (n, r) => Cs(t, n, r), t.safeDecodeAsync = async (n, r) => Rs(t, n, r), t.refine = (n, r) => t.check($o(n, r)), t.superRefine = (n) => t.check(Oo(n)), t.overwrite = (n) => t.check(U(n)), t.optional = () => Ge(t), t.nullable = () => Ve(t), t.nullish = () => Ge(Ve(t)), t.nonoptional = (n) => yo(t, n), t.array = () => Z(t), t.or = (n) => ae([t, n]), t.and = (n) => ho(t, n), t.transform = (n) => Be(t, fo(n)), t.default = (n) => vo(t, n), t.prefault = (n) => ko(t, n), t.catch = (n) => wo(t, n), t.pipe = (n) => Be(t, n), t.readonly = () => Io(t), t.describe = (n) => {
3969
4053
  const r = t.clone();
3970
- return G.add(r, { description: n }), r;
4054
+ return V.add(r, { description: n }), r;
3971
4055
  }, Object.defineProperty(t, "description", {
3972
4056
  get() {
3973
- return G.get(t)?.description;
4057
+ return V.get(t)?.description;
3974
4058
  },
3975
4059
  configurable: !0
3976
4060
  }), t.meta = (...n) => {
3977
4061
  if (n.length === 0)
3978
- return G.get(t);
4062
+ return V.get(t);
3979
4063
  const r = t.clone();
3980
- return G.add(r, n[0]), r;
4064
+ return V.add(r, n[0]), r;
3981
4065
  }, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), Et = /* @__PURE__ */ u("_ZodString", (t, e) => {
3982
- ke.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Wi(t, r, i);
4066
+ ye.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Yi(t, r, i);
3983
4067
  const n = t._zod.bag;
3984
- t.format = n.format ?? null, t.minLength = n.minimum ?? null, t.maxLength = n.maximum ?? null, t.regex = (...r) => t.check(Ni(...r)), t.includes = (...r) => t.check(Zi(...r)), t.startsWith = (...r) => t.check(Ci(...r)), t.endsWith = (...r) => t.check(Ri(...r)), t.min = (...r) => t.check(Q(...r)), t.max = (...r) => t.check(kt(...r)), t.length = (...r) => t.check(yt(...r)), t.nonempty = (...r) => t.check(Q(1, ...r)), t.lowercase = (r) => t.check(Pi(r)), t.uppercase = (r) => t.check(Ai(r)), t.trim = () => t.check(xi()), t.normalize = (...r) => t.check(Li(...r)), t.toLowerCase = () => t.check(Di()), t.toUpperCase = () => t.check(Fi()), t.slugify = () => t.check(ji());
3985
- }), Cs = /* @__PURE__ */ u("ZodString", (t, e) => {
3986
- ke.init(t, e), Et.init(t, e), t.email = (n) => t.check(ti(Rs, n)), t.url = (n) => t.check(oi(Ls, n)), t.jwt = (n) => t.check(Ti(qs, n)), t.emoji = (n) => t.check(ai(xs, n)), t.guid = (n) => t.check(Le(je, n)), t.uuid = (n) => t.check(ni(Y, n)), t.uuidv4 = (n) => t.check(ri(Y, n)), t.uuidv6 = (n) => t.check(ii(Y, n)), t.uuidv7 = (n) => t.check(si(Y, n)), t.nanoid = (n) => t.check(ci(Ds, n)), t.guid = (n) => t.check(Le(je, n)), t.cuid = (n) => t.check(ui(Fs, n)), t.cuid2 = (n) => t.check(hi(js, n)), t.ulid = (n) => t.check(pi(Ms, n)), t.base64 = (n) => t.check(_i(Ks, n)), t.base64url = (n) => t.check(ki(Ys, n)), t.xid = (n) => t.check(li(Us, n)), t.ksuid = (n) => t.check(di(Gs, n)), t.ipv4 = (n) => t.check(fi(Vs, n)), t.ipv6 = (n) => t.check(mi(Bs, n)), t.cidrv4 = (n) => t.check(gi(Js, n)), t.cidrv6 = (n) => t.check(vi(Ws, n)), t.e164 = (n) => t.check(yi(Xs, n)), t.datetime = (n) => t.check(fs(n)), t.date = (n) => t.check(gs(n)), t.time = (n) => t.check(_s(n)), t.duration = (n) => t.check(ys(n));
4068
+ t.format = n.format ?? null, t.minLength = n.minimum ?? null, t.maxLength = n.maximum ?? null, t.regex = (...r) => t.check(Ai(...r)), t.includes = (...r) => t.check(Ri(...r)), t.startsWith = (...r) => t.check(Li(...r)), t.endsWith = (...r) => t.check(xi(...r)), t.min = (...r) => t.check(ee(...r)), t.max = (...r) => t.check(kt(...r)), t.length = (...r) => t.check(yt(...r)), t.nonempty = (...r) => t.check(ee(1, ...r)), t.lowercase = (r) => t.check(Zi(r)), t.uppercase = (r) => t.check(Ci(r)), t.trim = () => t.check(Fi()), t.normalize = (...r) => t.check(Di(...r)), t.toLowerCase = () => t.check(ji()), t.toUpperCase = () => t.check(Mi()), t.slugify = () => t.check(Ui());
4069
+ }), Ls = /* @__PURE__ */ u("ZodString", (t, e) => {
4070
+ ye.init(t, e), Et.init(t, e), t.email = (n) => t.check(ri(xs, n)), t.url = (n) => t.check(ci(Ds, n)), t.jwt = (n) => t.check(bi(Hs, n)), t.emoji = (n) => t.check(ui(Fs, n)), t.guid = (n) => t.check(Le(je, n)), t.uuid = (n) => t.check(ii(X, n)), t.uuidv4 = (n) => t.check(si(X, n)), t.uuidv6 = (n) => t.check(oi(X, n)), t.uuidv7 = (n) => t.check(ai(X, n)), t.nanoid = (n) => t.check(hi(js, n)), t.guid = (n) => t.check(Le(je, n)), t.cuid = (n) => t.check(pi(Ms, n)), t.cuid2 = (n) => t.check(li(Us, n)), t.ulid = (n) => t.check(di(Gs, n)), t.base64 = (n) => t.check(yi(qs, n)), t.base64url = (n) => t.check(Ti(Xs, n)), t.xid = (n) => t.check(fi(Vs, n)), t.ksuid = (n) => t.check(mi(Bs, n)), t.ipv4 = (n) => t.check(gi(Js, n)), t.ipv6 = (n) => t.check(vi(Ws, n)), t.cidrv4 = (n) => t.check(_i(Ks, n)), t.cidrv6 = (n) => t.check(ki(Ys, n)), t.e164 = (n) => t.check(wi(Qs, n)), t.datetime = (n) => t.check(gs(n)), t.date = (n) => t.check(_s(n)), t.time = (n) => t.check(ys(n)), t.duration = (n) => t.check(ws(n));
3987
4071
  });
3988
- function $(t) {
3989
- return ei(Cs, t);
4072
+ function I(t) {
4073
+ return ni(Ls, t);
3990
4074
  }
3991
4075
  const _ = /* @__PURE__ */ u("ZodStringFormat", (t, e) => {
3992
4076
  g.init(t, e), Et.init(t, e);
3993
- }), Rs = /* @__PURE__ */ u("ZodEmail", (t, e) => {
3994
- ur.init(t, e), _.init(t, e);
4077
+ }), xs = /* @__PURE__ */ u("ZodEmail", (t, e) => {
4078
+ pr.init(t, e), _.init(t, e);
3995
4079
  }), je = /* @__PURE__ */ u("ZodGUID", (t, e) => {
3996
- ar.init(t, e), _.init(t, e);
3997
- }), Y = /* @__PURE__ */ u("ZodUUID", (t, e) => {
3998
- cr.init(t, e), _.init(t, e);
3999
- }), Ls = /* @__PURE__ */ u("ZodURL", (t, e) => {
4080
+ ur.init(t, e), _.init(t, e);
4081
+ }), X = /* @__PURE__ */ u("ZodUUID", (t, e) => {
4000
4082
  hr.init(t, e), _.init(t, e);
4001
- }), xs = /* @__PURE__ */ u("ZodEmoji", (t, e) => {
4002
- pr.init(t, e), _.init(t, e);
4003
- }), Ds = /* @__PURE__ */ u("ZodNanoID", (t, e) => {
4083
+ }), Ds = /* @__PURE__ */ u("ZodURL", (t, e) => {
4004
4084
  lr.init(t, e), _.init(t, e);
4005
- }), Fs = /* @__PURE__ */ u("ZodCUID", (t, e) => {
4085
+ }), Fs = /* @__PURE__ */ u("ZodEmoji", (t, e) => {
4006
4086
  dr.init(t, e), _.init(t, e);
4007
- }), js = /* @__PURE__ */ u("ZodCUID2", (t, e) => {
4087
+ }), js = /* @__PURE__ */ u("ZodNanoID", (t, e) => {
4008
4088
  fr.init(t, e), _.init(t, e);
4009
- }), Ms = /* @__PURE__ */ u("ZodULID", (t, e) => {
4089
+ }), Ms = /* @__PURE__ */ u("ZodCUID", (t, e) => {
4010
4090
  mr.init(t, e), _.init(t, e);
4011
- }), Us = /* @__PURE__ */ u("ZodXID", (t, e) => {
4091
+ }), Us = /* @__PURE__ */ u("ZodCUID2", (t, e) => {
4012
4092
  gr.init(t, e), _.init(t, e);
4013
- }), Gs = /* @__PURE__ */ u("ZodKSUID", (t, e) => {
4093
+ }), Gs = /* @__PURE__ */ u("ZodULID", (t, e) => {
4014
4094
  vr.init(t, e), _.init(t, e);
4015
- }), Vs = /* @__PURE__ */ u("ZodIPv4", (t, e) => {
4016
- wr.init(t, e), _.init(t, e);
4017
- }), Bs = /* @__PURE__ */ u("ZodIPv6", (t, e) => {
4018
- br.init(t, e), _.init(t, e);
4019
- }), Js = /* @__PURE__ */ u("ZodCIDRv4", (t, e) => {
4095
+ }), Vs = /* @__PURE__ */ u("ZodXID", (t, e) => {
4096
+ _r.init(t, e), _.init(t, e);
4097
+ }), Bs = /* @__PURE__ */ u("ZodKSUID", (t, e) => {
4098
+ kr.init(t, e), _.init(t, e);
4099
+ }), Js = /* @__PURE__ */ u("ZodIPv4", (t, e) => {
4020
4100
  Er.init(t, e), _.init(t, e);
4021
- }), Ws = /* @__PURE__ */ u("ZodCIDRv6", (t, e) => {
4022
- zr.init(t, e), _.init(t, e);
4023
- }), Ks = /* @__PURE__ */ u("ZodBase64", (t, e) => {
4101
+ }), Ws = /* @__PURE__ */ u("ZodIPv6", (t, e) => {
4024
4102
  Ir.init(t, e), _.init(t, e);
4025
- }), Ys = /* @__PURE__ */ u("ZodBase64URL", (t, e) => {
4103
+ }), Ks = /* @__PURE__ */ u("ZodCIDRv4", (t, e) => {
4104
+ zr.init(t, e), _.init(t, e);
4105
+ }), Ys = /* @__PURE__ */ u("ZodCIDRv6", (t, e) => {
4106
+ $r.init(t, e), _.init(t, e);
4107
+ }), qs = /* @__PURE__ */ u("ZodBase64", (t, e) => {
4026
4108
  Or.init(t, e), _.init(t, e);
4027
- }), Xs = /* @__PURE__ */ u("ZodE164", (t, e) => {
4109
+ }), Xs = /* @__PURE__ */ u("ZodBase64URL", (t, e) => {
4028
4110
  Sr.init(t, e), _.init(t, e);
4029
- }), qs = /* @__PURE__ */ u("ZodJWT", (t, e) => {
4030
- Pr.init(t, e), _.init(t, e);
4031
- }), zt = /* @__PURE__ */ u("ZodNumber", (t, e) => {
4032
- mt.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Ki(t, r, i), t.gt = (r, i) => t.check(De(r, i)), t.gte = (r, i) => t.check(ue(r, i)), t.min = (r, i) => t.check(ue(r, i)), t.lt = (r, i) => t.check(xe(r, i)), t.lte = (r, i) => t.check(ce(r, i)), t.max = (r, i) => t.check(ce(r, i)), t.int = (r) => t.check(Me(r)), t.safe = (r) => t.check(Me(r)), t.positive = (r) => t.check(De(0, r)), t.nonnegative = (r) => t.check(ue(0, r)), t.negative = (r) => t.check(xe(0, r)), t.nonpositive = (r) => t.check(ce(0, r)), t.multipleOf = (r, i) => t.check(Fe(r, i)), t.step = (r, i) => t.check(Fe(r, i)), t.finite = () => t;
4111
+ }), Qs = /* @__PURE__ */ u("ZodE164", (t, e) => {
4112
+ Nr.init(t, e), _.init(t, e);
4113
+ }), Hs = /* @__PURE__ */ u("ZodJWT", (t, e) => {
4114
+ Zr.init(t, e), _.init(t, e);
4115
+ }), It = /* @__PURE__ */ u("ZodNumber", (t, e) => {
4116
+ mt.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => qi(t, r, i), t.gt = (r, i) => t.check(De(r, i)), t.gte = (r, i) => t.check(pe(r, i)), t.min = (r, i) => t.check(pe(r, i)), t.lt = (r, i) => t.check(xe(r, i)), t.lte = (r, i) => t.check(he(r, i)), t.max = (r, i) => t.check(he(r, i)), t.int = (r) => t.check(Me(r)), t.safe = (r) => t.check(Me(r)), t.positive = (r) => t.check(De(0, r)), t.nonnegative = (r) => t.check(pe(0, r)), t.negative = (r) => t.check(xe(0, r)), t.nonpositive = (r) => t.check(he(0, r)), t.multipleOf = (r, i) => t.check(Fe(r, i)), t.step = (r, i) => t.check(Fe(r, i)), t.finite = () => t;
4033
4117
  const n = t._zod.bag;
4034
4118
  t.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, t.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, t.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), t.isFinite = !0, t.format = n.format ?? null;
4035
4119
  });
4036
- function Qs(t) {
4037
- return Ii(zt, t);
4120
+ function eo(t) {
4121
+ return Oi(It, t);
4038
4122
  }
4039
- const Hs = /* @__PURE__ */ u("ZodNumberFormat", (t, e) => {
4040
- Ar.init(t, e), zt.init(t, e);
4123
+ const to = /* @__PURE__ */ u("ZodNumberFormat", (t, e) => {
4124
+ Cr.init(t, e), It.init(t, e);
4041
4125
  });
4042
4126
  function Me(t) {
4043
- return $i(Hs, t);
4127
+ return Pi(to, t);
4044
4128
  }
4045
- const eo = /* @__PURE__ */ u("ZodUnknown", (t, e) => {
4046
- Zr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Xi();
4129
+ const no = /* @__PURE__ */ u("ZodUnknown", (t, e) => {
4130
+ Rr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Qi();
4047
4131
  });
4048
4132
  function Ue() {
4049
- return Oi(eo);
4133
+ return Si(no);
4050
4134
  }
4051
- const to = /* @__PURE__ */ u("ZodNever", (t, e) => {
4052
- Cr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Yi(t, n, r);
4135
+ const ro = /* @__PURE__ */ u("ZodNever", (t, e) => {
4136
+ Lr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Xi(t, n, r);
4053
4137
  });
4054
- function no(t) {
4055
- return Si(to, t);
4138
+ function io(t) {
4139
+ return Ni(ro, t);
4056
4140
  }
4057
- const ro = /* @__PURE__ */ u("ZodArray", (t, e) => {
4058
- Rr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ts(t, n, r, i), t.element = e.element, t.min = (n, r) => t.check(Q(n, r)), t.nonempty = (n) => t.check(Q(1, n)), t.max = (n, r) => t.check(kt(n, r)), t.length = (n, r) => t.check(yt(n, r)), t.unwrap = () => t.element;
4141
+ const so = /* @__PURE__ */ u("ZodArray", (t, e) => {
4142
+ xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => rs(t, n, r, i), t.element = e.element, t.min = (n, r) => t.check(ee(n, r)), t.nonempty = (n) => t.check(ee(1, n)), t.max = (n, r) => t.check(kt(n, r)), t.length = (n, r) => t.check(yt(n, r)), t.unwrap = () => t.element;
4059
4143
  });
4060
- function A(t, e) {
4061
- return Mi(ro, t, e);
4144
+ function Z(t, e) {
4145
+ return Gi(so, t, e);
4062
4146
  }
4063
- const io = /* @__PURE__ */ u("ZodObject", (t, e) => {
4064
- xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ns(t, n, r, i), m(t, "shape", () => e.shape), t.keyof = () => Te(Object.keys(t._zod.def.shape)), t.catchall = (n) => t.clone({ ...t._zod.def, catchall: n }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: Ue() }), t.loose = () => t.clone({ ...t._zod.def, catchall: Ue() }), t.strict = () => t.clone({ ...t._zod.def, catchall: no() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => sn(t, n), t.safeExtend = (n) => on(t, n), t.merge = (n) => an(t, n), t.pick = (n) => nn(t, n), t.omit = (n) => rn(t, n), t.partial = (...n) => cn($t, t, n[0]), t.required = (...n) => un(Ot, t, n[0]);
4147
+ const oo = /* @__PURE__ */ u("ZodObject", (t, e) => {
4148
+ Fr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => is(t, n, r, i), m(t, "shape", () => e.shape), t.keyof = () => $t(Object.keys(t._zod.def.shape)), t.catchall = (n) => t.clone({ ...t._zod.def, catchall: n }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: Ue() }), t.loose = () => t.clone({ ...t._zod.def, catchall: Ue() }), t.strict = () => t.clone({ ...t._zod.def, catchall: io() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => an(t, n), t.safeExtend = (n) => cn(t, n), t.merge = (n) => un(t, n), t.pick = (n) => sn(t, n), t.omit = (n) => on(t, n), t.partial = (...n) => hn(Ot, t, n[0]), t.required = (...n) => pn(Pt, t, n[0]);
4065
4149
  });
4066
- function S(t, e) {
4150
+ function z(t, e) {
4067
4151
  const n = {
4068
4152
  type: "object",
4069
4153
  shape: t ?? {},
4070
4154
  ...l(e)
4071
4155
  };
4072
- return new io(n);
4156
+ return new oo(n);
4073
4157
  }
4074
- const It = /* @__PURE__ */ u("ZodUnion", (t, e) => {
4075
- _t.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => rs(t, n, r, i), t.options = e.options;
4158
+ const zt = /* @__PURE__ */ u("ZodUnion", (t, e) => {
4159
+ _t.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ss(t, n, r, i), t.options = e.options;
4076
4160
  });
4077
- function ye(t, e) {
4078
- return new It({
4161
+ function ae(t, e) {
4162
+ return new zt({
4079
4163
  type: "union",
4080
4164
  options: t,
4081
4165
  ...l(e)
4082
4166
  });
4083
4167
  }
4084
- const so = /* @__PURE__ */ u("ZodDiscriminatedUnion", (t, e) => {
4085
- It.init(t, e), Dr.init(t, e);
4168
+ const ao = /* @__PURE__ */ u("ZodDiscriminatedUnion", (t, e) => {
4169
+ zt.init(t, e), jr.init(t, e);
4086
4170
  });
4087
- function oo(t, e, n) {
4088
- return new so({
4171
+ function co(t, e, n) {
4172
+ return new ao({
4089
4173
  type: "union",
4090
4174
  options: e,
4091
4175
  discriminator: t,
4092
4176
  ...l(n)
4093
4177
  });
4094
4178
  }
4095
- const ao = /* @__PURE__ */ u("ZodIntersection", (t, e) => {
4096
- Fr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => is(t, n, r, i);
4179
+ const uo = /* @__PURE__ */ u("ZodIntersection", (t, e) => {
4180
+ Mr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => os(t, n, r, i);
4097
4181
  });
4098
- function co(t, e) {
4099
- return new ao({
4182
+ function ho(t, e) {
4183
+ return new uo({
4100
4184
  type: "intersection",
4101
4185
  left: t,
4102
4186
  right: e
4103
4187
  });
4104
4188
  }
4105
- const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
4106
- jr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => qi(t, r, i), t.enum = e.entries, t.options = Object.values(e.entries);
4189
+ const fe = /* @__PURE__ */ u("ZodEnum", (t, e) => {
4190
+ Ur.init(t, e), y.init(t, e), t._zod.processJSONSchema = (r, i, s) => Hi(t, r, i), t.enum = e.entries, t.options = Object.values(e.entries);
4107
4191
  const n = new Set(Object.keys(e.entries));
4108
4192
  t.extract = (r, i) => {
4109
4193
  const s = {};
@@ -4112,7 +4196,7 @@ const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
4112
4196
  s[o] = e.entries[o];
4113
4197
  else
4114
4198
  throw new Error(`Key ${o} not found in enum`);
4115
- return new le({
4199
+ return new fe({
4116
4200
  ...e,
4117
4201
  checks: [],
4118
4202
  ...l(i),
@@ -4125,7 +4209,7 @@ const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
4125
4209
  delete s[o];
4126
4210
  else
4127
4211
  throw new Error(`Key ${o} not found in enum`);
4128
- return new le({
4212
+ return new fe({
4129
4213
  ...e,
4130
4214
  checks: [],
4131
4215
  ...l(i),
@@ -4133,16 +4217,16 @@ const le = /* @__PURE__ */ u("ZodEnum", (t, e) => {
4133
4217
  });
4134
4218
  };
4135
4219
  });
4136
- function Te(t, e) {
4220
+ function $t(t, e) {
4137
4221
  const n = Array.isArray(t) ? Object.fromEntries(t.map((r) => [r, r])) : t;
4138
- return new le({
4222
+ return new fe({
4139
4223
  type: "enum",
4140
4224
  entries: n,
4141
4225
  ...l(e)
4142
4226
  });
4143
4227
  }
4144
- const uo = /* @__PURE__ */ u("ZodLiteral", (t, e) => {
4145
- Mr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Qi(t, n, r), t.values = new Set(e.values), Object.defineProperty(t, "value", {
4228
+ const po = /* @__PURE__ */ u("ZodLiteral", (t, e) => {
4229
+ Gr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => es(t, n, r), t.values = new Set(e.values), Object.defineProperty(t, "value", {
4146
4230
  get() {
4147
4231
  if (e.values.length > 1)
4148
4232
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -4150,58 +4234,58 @@ const uo = /* @__PURE__ */ u("ZodLiteral", (t, e) => {
4150
4234
  }
4151
4235
  });
4152
4236
  });
4153
- function se(t, e) {
4154
- return new uo({
4237
+ function A(t, e) {
4238
+ return new po({
4155
4239
  type: "literal",
4156
4240
  values: Array.isArray(t) ? t : [t],
4157
4241
  ...l(e)
4158
4242
  });
4159
4243
  }
4160
- const ho = /* @__PURE__ */ u("ZodTransform", (t, e) => {
4161
- Ur.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => es(t, n), t._zod.parse = (n, r) => {
4244
+ const lo = /* @__PURE__ */ u("ZodTransform", (t, e) => {
4245
+ Vr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ns(t, n), t._zod.parse = (n, r) => {
4162
4246
  if (r.direction === "backward")
4163
4247
  throw new He(t.constructor.name);
4164
4248
  n.addIssue = (s) => {
4165
4249
  if (typeof s == "string")
4166
- n.issues.push(J(s, n.value, e));
4250
+ n.issues.push(W(s, n.value, e));
4167
4251
  else {
4168
4252
  const o = s;
4169
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), n.issues.push(J(o));
4253
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), n.issues.push(W(o));
4170
4254
  }
4171
4255
  };
4172
4256
  const i = e.transform(n.value, n);
4173
4257
  return i instanceof Promise ? i.then((s) => (n.value = s, n)) : (n.value = i, n);
4174
4258
  };
4175
4259
  });
4176
- function po(t) {
4177
- return new ho({
4260
+ function fo(t) {
4261
+ return new lo({
4178
4262
  type: "transform",
4179
4263
  transform: t
4180
4264
  });
4181
4265
  }
4182
- const $t = /* @__PURE__ */ u("ZodOptional", (t, e) => {
4183
- Gr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ls(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4266
+ const Ot = /* @__PURE__ */ u("ZodOptional", (t, e) => {
4267
+ Br.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => fs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4184
4268
  });
4185
4269
  function Ge(t) {
4186
- return new $t({
4270
+ return new Ot({
4187
4271
  type: "optional",
4188
4272
  innerType: t
4189
4273
  });
4190
4274
  }
4191
- const lo = /* @__PURE__ */ u("ZodNullable", (t, e) => {
4192
- Vr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ss(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4275
+ const mo = /* @__PURE__ */ u("ZodNullable", (t, e) => {
4276
+ Jr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => as(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4193
4277
  });
4194
4278
  function Ve(t) {
4195
- return new lo({
4279
+ return new mo({
4196
4280
  type: "nullable",
4197
4281
  innerType: t
4198
4282
  });
4199
4283
  }
4200
- const fo = /* @__PURE__ */ u("ZodDefault", (t, e) => {
4201
- Br.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => as(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
4284
+ const go = /* @__PURE__ */ u("ZodDefault", (t, e) => {
4285
+ Wr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => us(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
4202
4286
  });
4203
- function mo(t, e) {
4204
- return new fo({
4287
+ function vo(t, e) {
4288
+ return new go({
4205
4289
  type: "default",
4206
4290
  innerType: t,
4207
4291
  get defaultValue() {
@@ -4209,11 +4293,11 @@ function mo(t, e) {
4209
4293
  }
4210
4294
  });
4211
4295
  }
4212
- const go = /* @__PURE__ */ u("ZodPrefault", (t, e) => {
4213
- Jr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => cs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4296
+ const _o = /* @__PURE__ */ u("ZodPrefault", (t, e) => {
4297
+ Kr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => hs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4214
4298
  });
4215
- function vo(t, e) {
4216
- return new go({
4299
+ function ko(t, e) {
4300
+ return new _o({
4217
4301
  type: "prefault",
4218
4302
  innerType: t,
4219
4303
  get defaultValue() {
@@ -4221,108 +4305,126 @@ function vo(t, e) {
4221
4305
  }
4222
4306
  });
4223
4307
  }
4224
- const Ot = /* @__PURE__ */ u("ZodNonOptional", (t, e) => {
4225
- Wr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => os(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4308
+ const Pt = /* @__PURE__ */ u("ZodNonOptional", (t, e) => {
4309
+ Yr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => cs(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4226
4310
  });
4227
- function _o(t, e) {
4228
- return new Ot({
4311
+ function yo(t, e) {
4312
+ return new Pt({
4229
4313
  type: "nonoptional",
4230
4314
  innerType: t,
4231
4315
  ...l(e)
4232
4316
  });
4233
4317
  }
4234
- const ko = /* @__PURE__ */ u("ZodCatch", (t, e) => {
4235
- Kr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => us(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
4318
+ const To = /* @__PURE__ */ u("ZodCatch", (t, e) => {
4319
+ qr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ps(t, n, r, i), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
4236
4320
  });
4237
- function yo(t, e) {
4238
- return new ko({
4321
+ function wo(t, e) {
4322
+ return new To({
4239
4323
  type: "catch",
4240
4324
  innerType: t,
4241
4325
  catchValue: typeof e == "function" ? e : () => e
4242
4326
  });
4243
4327
  }
4244
- const To = /* @__PURE__ */ u("ZodPipe", (t, e) => {
4245
- Yr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => hs(t, n, r, i), t.in = e.in, t.out = e.out;
4328
+ const bo = /* @__PURE__ */ u("ZodPipe", (t, e) => {
4329
+ Xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ls(t, n, r, i), t.in = e.in, t.out = e.out;
4246
4330
  });
4247
4331
  function Be(t, e) {
4248
- return new To({
4332
+ return new bo({
4249
4333
  type: "pipe",
4250
4334
  in: t,
4251
4335
  out: e
4252
4336
  // ...util.normalizeParams(params),
4253
4337
  });
4254
4338
  }
4255
- const wo = /* @__PURE__ */ u("ZodReadonly", (t, e) => {
4256
- Xr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ps(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4339
+ const Eo = /* @__PURE__ */ u("ZodReadonly", (t, e) => {
4340
+ Qr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ds(t, n, r, i), t.unwrap = () => t._zod.def.innerType;
4257
4341
  });
4258
- function bo(t) {
4259
- return new wo({
4342
+ function Io(t) {
4343
+ return new Eo({
4260
4344
  type: "readonly",
4261
4345
  innerType: t
4262
4346
  });
4263
4347
  }
4264
- const Eo = /* @__PURE__ */ u("ZodCustom", (t, e) => {
4265
- qr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => Hi(t, n);
4348
+ const zo = /* @__PURE__ */ u("ZodCustom", (t, e) => {
4349
+ Hr.init(t, e), y.init(t, e), t._zod.processJSONSchema = (n, r, i) => ts(t, n);
4266
4350
  });
4267
- function zo(t, e = {}) {
4268
- return Ui(Eo, t, e);
4351
+ function $o(t, e = {}) {
4352
+ return Vi(zo, t, e);
4269
4353
  }
4270
- function Io(t) {
4271
- return Gi(t);
4354
+ function Oo(t) {
4355
+ return Bi(t);
4272
4356
  }
4273
- const N = ye([
4274
- $(),
4275
- S({
4276
- pattern: $(),
4277
- flags: $().optional()
4357
+ const S = ae([
4358
+ I(),
4359
+ z({
4360
+ pattern: I(),
4361
+ flags: I().optional()
4278
4362
  })
4279
- ]), $o = S({
4280
- kind: se("fragment"),
4281
- condition: N.optional(),
4282
- operator: ye([$(), A($())]).optional()
4363
+ ]), Po = z({
4364
+ kind: A("fragment"),
4365
+ condition: S.optional(),
4366
+ operator: ae([I(), Z(I())]).optional()
4283
4367
  // Note: Operator types might need to be refined if we want strict enum validation,
4284
4368
  // but string is flexible for now.
4285
- }), Oo = S({
4286
- kind: se("participant"),
4287
- name: N.optional(),
4288
- id: N.optional(),
4289
- stereotype: N.optional()
4290
- }), So = S({
4291
- kind: se("message"),
4292
- text: N.optional(),
4293
- from: N.optional(),
4294
- to: N.optional()
4295
- }), No = S({
4296
- kind: se("group"),
4297
- name: N.optional()
4298
- }), Po = oo("kind", [
4299
- $o,
4300
- Oo,
4301
- So,
4302
- No
4303
- ]), Ao = Te(["focus", "remove", "resolve"]), Zo = S({
4304
- action: Ao,
4369
+ }), Te = z({
4370
+ kind: A("participant"),
4371
+ name: S.optional(),
4372
+ id: S.optional(),
4373
+ stereotype: S.optional()
4374
+ }), So = z({
4375
+ kind: A("message"),
4376
+ text: S.optional(),
4377
+ from: S.optional(),
4378
+ to: S.optional()
4379
+ }), No = z({
4380
+ kind: A("group"),
4381
+ name: S.optional()
4382
+ }), Ao = z({
4383
+ action: A("resolve"),
4305
4384
  selector: Po
4306
- }), Co = S({
4307
- name: $(),
4308
- suffix: $().optional(),
4385
+ }), Zo = z({
4386
+ action: A("focus"),
4387
+ selector: Te
4388
+ }), Co = z({
4389
+ action: A("remove"),
4390
+ selector: ae([
4391
+ Te,
4392
+ So,
4393
+ No
4394
+ ])
4395
+ }), Ro = z({
4396
+ action: A("merge"),
4397
+ into: z({
4398
+ name: I().optional(),
4399
+ id: I().optional(),
4400
+ stereotype: I().optional()
4401
+ }).optional(),
4402
+ selector: Te
4403
+ }), Lo = co("action", [
4404
+ Ao,
4405
+ Zo,
4406
+ Co,
4407
+ Ro
4408
+ ]), xo = z({
4409
+ name: I(),
4410
+ suffix: I().optional(),
4309
4411
  // Defaults to .name in logic
4310
- layers: A(Zo)
4311
- }), Je = Te(["mermaid", "plantuml"]), Ro = S({
4312
- input: A($()),
4313
- outputDir: $(),
4314
- ignore: A($()).optional(),
4315
- lenses: A(Co),
4412
+ layers: Z(Lo)
4413
+ }), Je = $t(["mermaid", "plantuml"]), Do = z({
4414
+ input: Z(I()),
4415
+ outputDir: I(),
4416
+ ignore: Z(I()).optional(),
4417
+ lenses: Z(xo),
4316
4418
  format: Je.optional(),
4317
4419
  // Input format (auto-detected if omitted)
4318
4420
  outputFormat: Je.optional()
4319
4421
  // Output format (same as input if omitted)
4320
- }), Lo = S({
4321
- version: Qs(),
4322
- targets: A(Ro)
4422
+ }), Fo = z({
4423
+ version: eo(),
4424
+ targets: Z(Do)
4323
4425
  });
4324
- function Mo(t) {
4325
- const e = Lo.safeParse(t);
4426
+ function Vo(t) {
4427
+ const e = Fo.safeParse(t);
4326
4428
  if (!e.success) {
4327
4429
  const n = e.error.issues.map((r) => `[${r.path.join(".")}]: ${r.message}`).join(`
4328
4430
  `);
@@ -4333,15 +4435,15 @@ ${n}`);
4333
4435
  }
4334
4436
  export {
4335
4437
  be as FormatDetector,
4336
- jo as GeneratorFactory,
4438
+ Go as GeneratorFactory,
4337
4439
  Ye as MermaidGeneratorVisitor,
4338
- Mt as ParserFactory,
4339
- Xe as PlantUMLGeneratorVisitor,
4340
- Fo as Polagram,
4341
- Yt as PolagramBuilder,
4342
- Lo as PolagramConfigSchema,
4343
- ae as TransformationEngine,
4440
+ Ut as ParserFactory,
4441
+ qe as PlantUMLGeneratorVisitor,
4442
+ Uo as Polagram,
4443
+ Xt as PolagramBuilder,
4444
+ Fo as PolagramConfigSchema,
4445
+ ue as TransformationEngine,
4344
4446
  Ke as Traverser,
4345
- Kt as transformerRegistry,
4346
- Mo as validateConfig
4447
+ qt as transformerRegistry,
4448
+ Vo as validateConfig
4347
4449
  };