@connectedxm/zpl-generator 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -12,8 +12,8 @@ function u(e, t, n) {
12
12
  c._zod.traits.add(e), t(c, a);
13
13
  const l = i.prototype, f = Object.keys(l);
14
14
  for (let h = 0; h < f.length; h++) {
15
- const d = f[h];
16
- d in c || (c[d] = l[d].bind(c));
15
+ const p = f[h];
16
+ p in c || (c[p] = l[p].bind(c));
17
17
  }
18
18
  }
19
19
  const o = n?.Parent ?? Object;
@@ -154,7 +154,7 @@ function x(e, t, n) {
154
154
  const r = new e._zod.constr(t ?? e._zod.def);
155
155
  return (!t || n?.parent) && (r._zod.parent = e), r;
156
156
  }
157
- function p(e) {
157
+ function d(e) {
158
158
  const t = e;
159
159
  if (!t)
160
160
  return {};
@@ -449,7 +449,7 @@ function Sn(e) {
449
449
  const Zn = (e) => {
450
450
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
451
451
  return new RegExp(`^${t}$`);
452
- }, On = /^-?\d+$/, Tn = /^-?\d+(?:\.\d+)?$/, En = /^(?:true|false)$/i, An = /^[^A-Z]*$/, In = /^[^a-z]*$/, T = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
452
+ }, On = /^-?\d+$/, Tn = /^-?\d+(?:\.\d+)?$/, An = /^(?:true|false)$/i, En = /^[^A-Z]*$/, In = /^[^a-z]*$/, T = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
453
453
  var n;
454
454
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
455
455
  }), ct = {
@@ -666,7 +666,7 @@ const Zn = (e) => {
666
666
  });
667
667
  };
668
668
  }), Fn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
669
- t.pattern ?? (t.pattern = An), ae.init(e, t);
669
+ t.pattern ?? (t.pattern = En), ae.init(e, t);
670
670
  }), Dn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
671
671
  t.pattern ?? (t.pattern = In), ae.init(e, t);
672
672
  }), Ln = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
@@ -773,17 +773,17 @@ const Bn = {
773
773
  continue;
774
774
  } else if (l)
775
775
  continue;
776
- const d = i.issues.length, m = h._zod.check(i);
776
+ const p = i.issues.length, m = h._zod.check(i);
777
777
  if (m instanceof Promise && a?.async === !1)
778
778
  throw new L();
779
779
  if (f || m instanceof Promise)
780
780
  f = (f ?? Promise.resolve()).then(async () => {
781
- await m, i.issues.length !== d && (l || (l = D(i, d)));
781
+ await m, i.issues.length !== p && (l || (l = D(i, p)));
782
782
  });
783
783
  else {
784
- if (i.issues.length === d)
784
+ if (i.issues.length === p)
785
785
  continue;
786
- l || (l = D(i, d));
786
+ l || (l = D(i, p));
787
787
  }
788
788
  }
789
789
  return f ? f.then(() => i) : i;
@@ -1049,7 +1049,7 @@ const gr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1049
1049
  }), _r = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
1050
1050
  Pn.init(e, t), ft.init(e, t);
1051
1051
  }), vr = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
1052
- y.init(e, t), e._zod.pattern = En, e._zod.parse = (n, r) => {
1052
+ y.init(e, t), e._zod.pattern = An, e._zod.parse = (n, r) => {
1053
1053
  if (t.coerce)
1054
1054
  try {
1055
1055
  n.value = !!n.value;
@@ -1129,8 +1129,8 @@ function dt(e, t, n, r, o, s) {
1129
1129
  i.push(h);
1130
1130
  continue;
1131
1131
  }
1132
- const d = a.run({ value: t[h], issues: [] }, r);
1133
- d instanceof Promise ? e.push(d.then((m) => ee(m, n, h, t, f))) : ee(d, n, h, t, f);
1132
+ const p = a.run({ value: t[h], issues: [] }, r);
1133
+ p instanceof Promise ? e.push(p.then((m) => ee(m, n, h, t, f))) : ee(p, n, h, t, f);
1134
1134
  }
1135
1135
  return i.length && n.issues.push({
1136
1136
  code: "unrecognized_keys",
@@ -1178,15 +1178,15 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1178
1178
  }), c;
1179
1179
  c.value = {};
1180
1180
  const f = [], h = i.shape;
1181
- for (const d of i.keys) {
1182
- const m = h[d], $ = m._zod.optout === "optional", z = m._zod.run({ value: l[d], issues: [] }, a);
1183
- z instanceof Promise ? f.push(z.then((G) => ee(G, c, d, l, $))) : ee(z, c, d, l, $);
1181
+ for (const p of i.keys) {
1182
+ const m = h[p], $ = m._zod.optout === "optional", z = m._zod.run({ value: l[p], issues: [] }, a);
1183
+ z instanceof Promise ? f.push(z.then((G) => ee(G, c, p, l, $))) : ee(z, c, p, l, $);
1184
1184
  }
1185
1185
  return s ? dt(f, l, c, a, r.value, e) : f.length ? Promise.all(f).then(() => c) : c;
1186
1186
  };
1187
1187
  }), $r = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1188
1188
  zr.init(e, t);
1189
- const n = e._zod.parse, r = ie(() => pt(t)), o = (d) => {
1189
+ const n = e._zod.parse, r = ie(() => pt(t)), o = (p) => {
1190
1190
  const m = new Wn(["shape", "payload", "ctx"]), $ = r.value, z = (I) => {
1191
1191
  const O = Se(I);
1192
1192
  return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
@@ -1198,59 +1198,59 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1198
1198
  G[I] = `key_${It++}`;
1199
1199
  m.write("const newResult = {};");
1200
1200
  for (const I of $.keys) {
1201
- const O = G[I], A = Se(I), Pt = d[I]?._zod?.optout === "optional";
1201
+ const O = G[I], E = Se(I), Pt = p[I]?._zod?.optout === "optional";
1202
1202
  m.write(`const ${O} = ${z(I)};`), Pt ? m.write(`
1203
1203
  if (${O}.issues.length) {
1204
- if (${A} in input) {
1204
+ if (${E} in input) {
1205
1205
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
1206
1206
  ...iss,
1207
- path: iss.path ? [${A}, ...iss.path] : [${A}]
1207
+ path: iss.path ? [${E}, ...iss.path] : [${E}]
1208
1208
  })));
1209
1209
  }
1210
1210
  }
1211
1211
 
1212
1212
  if (${O}.value === undefined) {
1213
- if (${A} in input) {
1214
- newResult[${A}] = undefined;
1213
+ if (${E} in input) {
1214
+ newResult[${E}] = undefined;
1215
1215
  }
1216
1216
  } else {
1217
- newResult[${A}] = ${O}.value;
1217
+ newResult[${E}] = ${O}.value;
1218
1218
  }
1219
1219
 
1220
1220
  `) : m.write(`
1221
1221
  if (${O}.issues.length) {
1222
1222
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
1223
1223
  ...iss,
1224
- path: iss.path ? [${A}, ...iss.path] : [${A}]
1224
+ path: iss.path ? [${E}, ...iss.path] : [${E}]
1225
1225
  })));
1226
1226
  }
1227
1227
 
1228
1228
  if (${O}.value === undefined) {
1229
- if (${A} in input) {
1230
- newResult[${A}] = undefined;
1229
+ if (${E} in input) {
1230
+ newResult[${E}] = undefined;
1231
1231
  }
1232
1232
  } else {
1233
- newResult[${A}] = ${O}.value;
1233
+ newResult[${E}] = ${O}.value;
1234
1234
  }
1235
1235
 
1236
1236
  `);
1237
1237
  }
1238
1238
  m.write("payload.value = newResult;"), m.write("return payload;");
1239
1239
  const Nt = m.compile();
1240
- return (I, O) => Nt(d, I, O);
1240
+ return (I, O) => Nt(p, I, O);
1241
1241
  };
1242
1242
  let s;
1243
1243
  const i = B, c = !Ke.jitless, l = c && Ct.value, f = t.catchall;
1244
1244
  let h;
1245
- e._zod.parse = (d, m) => {
1245
+ e._zod.parse = (p, m) => {
1246
1246
  h ?? (h = r.value);
1247
- const $ = d.value;
1248
- return i($) ? c && l && m?.async === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), d = s(d, m), f ? dt([], $, d, m, h, e) : d) : n(d, m) : (d.issues.push({
1247
+ const $ = p.value;
1248
+ return i($) ? c && l && m?.async === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), p = s(p, m), f ? dt([], $, p, m, h, e) : p) : n(p, m) : (p.issues.push({
1249
1249
  expected: "object",
1250
1250
  code: "invalid_type",
1251
1251
  input: $,
1252
1252
  inst: e
1253
- }), d);
1253
+ }), p);
1254
1254
  };
1255
1255
  });
1256
1256
  function Te(e, t, n, r) {
@@ -1350,7 +1350,7 @@ const ht = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1350
1350
  }), Sr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1351
1351
  y.init(e, t), e._zod.parse = (n, r) => {
1352
1352
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1353
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) => Ee(n, a, l)) : Ee(n, s, i);
1353
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) => Ae(n, a, l)) : Ae(n, s, i);
1354
1354
  };
1355
1355
  });
1356
1356
  function me(e, t) {
@@ -1388,7 +1388,7 @@ function me(e, t) {
1388
1388
  }
1389
1389
  return { valid: !1, mergeErrorPath: [] };
1390
1390
  }
1391
- function Ee(e, t, n) {
1391
+ function Ae(e, t, n) {
1392
1392
  const r = /* @__PURE__ */ new Map();
1393
1393
  let o;
1394
1394
  for (const c of t.issues)
@@ -1449,7 +1449,7 @@ const Zr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1449
1449
  return n.value = o, n;
1450
1450
  };
1451
1451
  });
1452
- function Ae(e, t) {
1452
+ function Ee(e, t) {
1453
1453
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1454
1454
  }
1455
1455
  const mt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
@@ -1459,13 +1459,13 @@ const mt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1459
1459
  }), e._zod.parse = (n, r) => {
1460
1460
  if (t.innerType._zod.optin === "optional") {
1461
1461
  const o = t.innerType._zod.run(n, r);
1462
- return o instanceof Promise ? o.then((s) => Ae(s, n.value)) : Ae(o, n.value);
1462
+ return o instanceof Promise ? o.then((s) => Ee(s, n.value)) : Ee(o, n.value);
1463
1463
  }
1464
1464
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1465
1465
  };
1466
- }), Er = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1466
+ }), Ar = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1467
1467
  mt.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1468
- }), Ar = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1468
+ }), Er = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1469
1469
  y.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
1470
1470
  const n = t.innerType._zod.pattern;
1471
1471
  return n ? new RegExp(`^(${be(n.source)}|null)$`) : void 0;
@@ -1607,7 +1607,7 @@ const J = globalThis.__zod_globalRegistry;
1607
1607
  function Lr(e, t) {
1608
1608
  return new e({
1609
1609
  type: "string",
1610
- ...p(t)
1610
+ ...d(t)
1611
1611
  });
1612
1612
  }
1613
1613
  // @__NO_SIDE_EFFECTS__
@@ -1617,7 +1617,7 @@ function Mr(e, t) {
1617
1617
  format: "email",
1618
1618
  check: "string_format",
1619
1619
  abort: !1,
1620
- ...p(t)
1620
+ ...d(t)
1621
1621
  });
1622
1622
  }
1623
1623
  // @__NO_SIDE_EFFECTS__
@@ -1627,7 +1627,7 @@ function Ce(e, t) {
1627
1627
  format: "guid",
1628
1628
  check: "string_format",
1629
1629
  abort: !1,
1630
- ...p(t)
1630
+ ...d(t)
1631
1631
  });
1632
1632
  }
1633
1633
  // @__NO_SIDE_EFFECTS__
@@ -1637,7 +1637,7 @@ function Ur(e, t) {
1637
1637
  format: "uuid",
1638
1638
  check: "string_format",
1639
1639
  abort: !1,
1640
- ...p(t)
1640
+ ...d(t)
1641
1641
  });
1642
1642
  }
1643
1643
  // @__NO_SIDE_EFFECTS__
@@ -1648,7 +1648,7 @@ function Jr(e, t) {
1648
1648
  check: "string_format",
1649
1649
  abort: !1,
1650
1650
  version: "v4",
1651
- ...p(t)
1651
+ ...d(t)
1652
1652
  });
1653
1653
  }
1654
1654
  // @__NO_SIDE_EFFECTS__
@@ -1659,7 +1659,7 @@ function Wr(e, t) {
1659
1659
  check: "string_format",
1660
1660
  abort: !1,
1661
1661
  version: "v6",
1662
- ...p(t)
1662
+ ...d(t)
1663
1663
  });
1664
1664
  }
1665
1665
  // @__NO_SIDE_EFFECTS__
@@ -1670,7 +1670,7 @@ function Br(e, t) {
1670
1670
  check: "string_format",
1671
1671
  abort: !1,
1672
1672
  version: "v7",
1673
- ...p(t)
1673
+ ...d(t)
1674
1674
  });
1675
1675
  }
1676
1676
  // @__NO_SIDE_EFFECTS__
@@ -1680,7 +1680,7 @@ function Vr(e, t) {
1680
1680
  format: "url",
1681
1681
  check: "string_format",
1682
1682
  abort: !1,
1683
- ...p(t)
1683
+ ...d(t)
1684
1684
  });
1685
1685
  }
1686
1686
  // @__NO_SIDE_EFFECTS__
@@ -1690,7 +1690,7 @@ function Hr(e, t) {
1690
1690
  format: "emoji",
1691
1691
  check: "string_format",
1692
1692
  abort: !1,
1693
- ...p(t)
1693
+ ...d(t)
1694
1694
  });
1695
1695
  }
1696
1696
  // @__NO_SIDE_EFFECTS__
@@ -1700,7 +1700,7 @@ function Yr(e, t) {
1700
1700
  format: "nanoid",
1701
1701
  check: "string_format",
1702
1702
  abort: !1,
1703
- ...p(t)
1703
+ ...d(t)
1704
1704
  });
1705
1705
  }
1706
1706
  // @__NO_SIDE_EFFECTS__
@@ -1710,7 +1710,7 @@ function Gr(e, t) {
1710
1710
  format: "cuid",
1711
1711
  check: "string_format",
1712
1712
  abort: !1,
1713
- ...p(t)
1713
+ ...d(t)
1714
1714
  });
1715
1715
  }
1716
1716
  // @__NO_SIDE_EFFECTS__
@@ -1720,7 +1720,7 @@ function Kr(e, t) {
1720
1720
  format: "cuid2",
1721
1721
  check: "string_format",
1722
1722
  abort: !1,
1723
- ...p(t)
1723
+ ...d(t)
1724
1724
  });
1725
1725
  }
1726
1726
  // @__NO_SIDE_EFFECTS__
@@ -1730,7 +1730,7 @@ function Xr(e, t) {
1730
1730
  format: "ulid",
1731
1731
  check: "string_format",
1732
1732
  abort: !1,
1733
- ...p(t)
1733
+ ...d(t)
1734
1734
  });
1735
1735
  }
1736
1736
  // @__NO_SIDE_EFFECTS__
@@ -1740,7 +1740,7 @@ function qr(e, t) {
1740
1740
  format: "xid",
1741
1741
  check: "string_format",
1742
1742
  abort: !1,
1743
- ...p(t)
1743
+ ...d(t)
1744
1744
  });
1745
1745
  }
1746
1746
  // @__NO_SIDE_EFFECTS__
@@ -1750,7 +1750,7 @@ function Qr(e, t) {
1750
1750
  format: "ksuid",
1751
1751
  check: "string_format",
1752
1752
  abort: !1,
1753
- ...p(t)
1753
+ ...d(t)
1754
1754
  });
1755
1755
  }
1756
1756
  // @__NO_SIDE_EFFECTS__
@@ -1760,7 +1760,7 @@ function eo(e, t) {
1760
1760
  format: "ipv4",
1761
1761
  check: "string_format",
1762
1762
  abort: !1,
1763
- ...p(t)
1763
+ ...d(t)
1764
1764
  });
1765
1765
  }
1766
1766
  // @__NO_SIDE_EFFECTS__
@@ -1770,7 +1770,7 @@ function to(e, t) {
1770
1770
  format: "ipv6",
1771
1771
  check: "string_format",
1772
1772
  abort: !1,
1773
- ...p(t)
1773
+ ...d(t)
1774
1774
  });
1775
1775
  }
1776
1776
  // @__NO_SIDE_EFFECTS__
@@ -1780,7 +1780,7 @@ function no(e, t) {
1780
1780
  format: "cidrv4",
1781
1781
  check: "string_format",
1782
1782
  abort: !1,
1783
- ...p(t)
1783
+ ...d(t)
1784
1784
  });
1785
1785
  }
1786
1786
  // @__NO_SIDE_EFFECTS__
@@ -1790,7 +1790,7 @@ function ro(e, t) {
1790
1790
  format: "cidrv6",
1791
1791
  check: "string_format",
1792
1792
  abort: !1,
1793
- ...p(t)
1793
+ ...d(t)
1794
1794
  });
1795
1795
  }
1796
1796
  // @__NO_SIDE_EFFECTS__
@@ -1800,7 +1800,7 @@ function oo(e, t) {
1800
1800
  format: "base64",
1801
1801
  check: "string_format",
1802
1802
  abort: !1,
1803
- ...p(t)
1803
+ ...d(t)
1804
1804
  });
1805
1805
  }
1806
1806
  // @__NO_SIDE_EFFECTS__
@@ -1810,7 +1810,7 @@ function io(e, t) {
1810
1810
  format: "base64url",
1811
1811
  check: "string_format",
1812
1812
  abort: !1,
1813
- ...p(t)
1813
+ ...d(t)
1814
1814
  });
1815
1815
  }
1816
1816
  // @__NO_SIDE_EFFECTS__
@@ -1820,7 +1820,7 @@ function so(e, t) {
1820
1820
  format: "e164",
1821
1821
  check: "string_format",
1822
1822
  abort: !1,
1823
- ...p(t)
1823
+ ...d(t)
1824
1824
  });
1825
1825
  }
1826
1826
  // @__NO_SIDE_EFFECTS__
@@ -1830,7 +1830,7 @@ function co(e, t) {
1830
1830
  format: "jwt",
1831
1831
  check: "string_format",
1832
1832
  abort: !1,
1833
- ...p(t)
1833
+ ...d(t)
1834
1834
  });
1835
1835
  }
1836
1836
  // @__NO_SIDE_EFFECTS__
@@ -1842,7 +1842,7 @@ function ao(e, t) {
1842
1842
  offset: !1,
1843
1843
  local: !1,
1844
1844
  precision: null,
1845
- ...p(t)
1845
+ ...d(t)
1846
1846
  });
1847
1847
  }
1848
1848
  // @__NO_SIDE_EFFECTS__
@@ -1851,7 +1851,7 @@ function uo(e, t) {
1851
1851
  type: "string",
1852
1852
  format: "date",
1853
1853
  check: "string_format",
1854
- ...p(t)
1854
+ ...d(t)
1855
1855
  });
1856
1856
  }
1857
1857
  // @__NO_SIDE_EFFECTS__
@@ -1861,7 +1861,7 @@ function lo(e, t) {
1861
1861
  format: "time",
1862
1862
  check: "string_format",
1863
1863
  precision: null,
1864
- ...p(t)
1864
+ ...d(t)
1865
1865
  });
1866
1866
  }
1867
1867
  // @__NO_SIDE_EFFECTS__
@@ -1870,7 +1870,7 @@ function fo(e, t) {
1870
1870
  type: "string",
1871
1871
  format: "duration",
1872
1872
  check: "string_format",
1873
- ...p(t)
1873
+ ...d(t)
1874
1874
  });
1875
1875
  }
1876
1876
  // @__NO_SIDE_EFFECTS__
@@ -1878,7 +1878,7 @@ function po(e, t) {
1878
1878
  return new e({
1879
1879
  type: "number",
1880
1880
  checks: [],
1881
- ...p(t)
1881
+ ...d(t)
1882
1882
  });
1883
1883
  }
1884
1884
  // @__NO_SIDE_EFFECTS__
@@ -1888,14 +1888,14 @@ function ho(e, t) {
1888
1888
  check: "number_format",
1889
1889
  abort: !1,
1890
1890
  format: "safeint",
1891
- ...p(t)
1891
+ ...d(t)
1892
1892
  });
1893
1893
  }
1894
1894
  // @__NO_SIDE_EFFECTS__
1895
1895
  function mo(e, t) {
1896
1896
  return new e({
1897
1897
  type: "boolean",
1898
- ...p(t)
1898
+ ...d(t)
1899
1899
  });
1900
1900
  }
1901
1901
  // @__NO_SIDE_EFFECTS__
@@ -1908,14 +1908,14 @@ function go(e) {
1908
1908
  function _o(e, t) {
1909
1909
  return new e({
1910
1910
  type: "never",
1911
- ...p(t)
1911
+ ...d(t)
1912
1912
  });
1913
1913
  }
1914
1914
  // @__NO_SIDE_EFFECTS__
1915
1915
  function Re(e, t) {
1916
1916
  return new at({
1917
1917
  check: "less_than",
1918
- ...p(t),
1918
+ ...d(t),
1919
1919
  value: e,
1920
1920
  inclusive: !1
1921
1921
  });
@@ -1924,7 +1924,7 @@ function Re(e, t) {
1924
1924
  function fe(e, t) {
1925
1925
  return new at({
1926
1926
  check: "less_than",
1927
- ...p(t),
1927
+ ...d(t),
1928
1928
  value: e,
1929
1929
  inclusive: !0
1930
1930
  });
@@ -1933,7 +1933,7 @@ function fe(e, t) {
1933
1933
  function Fe(e, t) {
1934
1934
  return new ut({
1935
1935
  check: "greater_than",
1936
- ...p(t),
1936
+ ...d(t),
1937
1937
  value: e,
1938
1938
  inclusive: !1
1939
1939
  });
@@ -1942,7 +1942,7 @@ function Fe(e, t) {
1942
1942
  function pe(e, t) {
1943
1943
  return new ut({
1944
1944
  check: "greater_than",
1945
- ...p(t),
1945
+ ...d(t),
1946
1946
  value: e,
1947
1947
  inclusive: !0
1948
1948
  });
@@ -1951,7 +1951,7 @@ function pe(e, t) {
1951
1951
  function De(e, t) {
1952
1952
  return new Nn({
1953
1953
  check: "multiple_of",
1954
- ...p(t),
1954
+ ...d(t),
1955
1955
  value: e
1956
1956
  });
1957
1957
  }
@@ -1959,7 +1959,7 @@ function De(e, t) {
1959
1959
  function gt(e, t) {
1960
1960
  return new xn({
1961
1961
  check: "max_length",
1962
- ...p(t),
1962
+ ...d(t),
1963
1963
  maximum: e
1964
1964
  });
1965
1965
  }
@@ -1967,7 +1967,7 @@ function gt(e, t) {
1967
1967
  function te(e, t) {
1968
1968
  return new jn({
1969
1969
  check: "min_length",
1970
- ...p(t),
1970
+ ...d(t),
1971
1971
  minimum: e
1972
1972
  });
1973
1973
  }
@@ -1975,7 +1975,7 @@ function te(e, t) {
1975
1975
  function _t(e, t) {
1976
1976
  return new Cn({
1977
1977
  check: "length_equals",
1978
- ...p(t),
1978
+ ...d(t),
1979
1979
  length: e
1980
1980
  });
1981
1981
  }
@@ -1984,7 +1984,7 @@ function vo(e, t) {
1984
1984
  return new Rn({
1985
1985
  check: "string_format",
1986
1986
  format: "regex",
1987
- ...p(t),
1987
+ ...d(t),
1988
1988
  pattern: e
1989
1989
  });
1990
1990
  }
@@ -1993,7 +1993,7 @@ function bo(e) {
1993
1993
  return new Fn({
1994
1994
  check: "string_format",
1995
1995
  format: "lowercase",
1996
- ...p(e)
1996
+ ...d(e)
1997
1997
  });
1998
1998
  }
1999
1999
  // @__NO_SIDE_EFFECTS__
@@ -2001,7 +2001,7 @@ function yo(e) {
2001
2001
  return new Dn({
2002
2002
  check: "string_format",
2003
2003
  format: "uppercase",
2004
- ...p(e)
2004
+ ...d(e)
2005
2005
  });
2006
2006
  }
2007
2007
  // @__NO_SIDE_EFFECTS__
@@ -2009,7 +2009,7 @@ function wo(e, t) {
2009
2009
  return new Ln({
2010
2010
  check: "string_format",
2011
2011
  format: "includes",
2012
- ...p(t),
2012
+ ...d(t),
2013
2013
  includes: e
2014
2014
  });
2015
2015
  }
@@ -2018,7 +2018,7 @@ function zo(e, t) {
2018
2018
  return new Mn({
2019
2019
  check: "string_format",
2020
2020
  format: "starts_with",
2021
- ...p(t),
2021
+ ...d(t),
2022
2022
  prefix: e
2023
2023
  });
2024
2024
  }
@@ -2027,7 +2027,7 @@ function $o(e, t) {
2027
2027
  return new Un({
2028
2028
  check: "string_format",
2029
2029
  format: "ends_with",
2030
- ...p(t),
2030
+ ...d(t),
2031
2031
  suffix: e
2032
2032
  });
2033
2033
  }
@@ -2059,23 +2059,23 @@ function To() {
2059
2059
  return /* @__PURE__ */ U((e) => jt(e));
2060
2060
  }
2061
2061
  // @__NO_SIDE_EFFECTS__
2062
- function Eo(e, t, n) {
2062
+ function Ao(e, t, n) {
2063
2063
  return new e({
2064
2064
  type: "array",
2065
2065
  element: t,
2066
2066
  // get element() {
2067
2067
  // return element;
2068
2068
  // },
2069
- ...p(n)
2069
+ ...d(n)
2070
2070
  });
2071
2071
  }
2072
2072
  // @__NO_SIDE_EFFECTS__
2073
- function Ao(e, t, n) {
2073
+ function Eo(e, t, n) {
2074
2074
  return new e({
2075
2075
  type: "custom",
2076
2076
  check: "custom",
2077
2077
  fn: t,
2078
- ...p(n)
2078
+ ...d(n)
2079
2079
  });
2080
2080
  }
2081
2081
  // @__NO_SIDE_EFFECTS__
@@ -2094,7 +2094,7 @@ function Io(e) {
2094
2094
  function No(e, t) {
2095
2095
  const n = new T({
2096
2096
  check: "custom",
2097
- ...p(t)
2097
+ ...d(t)
2098
2098
  });
2099
2099
  return n._zod.check = e, n;
2100
2100
  }
@@ -2134,10 +2134,10 @@ function S(e, t, n = { path: [], schemaPath: [] }) {
2134
2134
  if (e._zod.processJSONSchema)
2135
2135
  e._zod.processJSONSchema(t, i.schema, f);
2136
2136
  else {
2137
- const d = i.schema, m = t.processors[o.type];
2137
+ const p = i.schema, m = t.processors[o.type];
2138
2138
  if (!m)
2139
2139
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2140
- m(e, t, d, f);
2140
+ m(e, t, p, f);
2141
2141
  }
2142
2142
  const h = e._zod.parent;
2143
2143
  h && (i.ref || (i.ref = h), S(h, t, f), t.seen.get(h).isParent = !0);
@@ -2162,11 +2162,11 @@ function bt(e, t) {
2162
2162
  const o = (i) => {
2163
2163
  const c = e.target === "draft-2020-12" ? "$defs" : "definitions";
2164
2164
  if (e.external) {
2165
- const h = e.external.registry.get(i[0])?.id, d = e.external.uri ?? (($) => $);
2165
+ const h = e.external.registry.get(i[0])?.id, p = e.external.uri ?? (($) => $);
2166
2166
  if (h)
2167
- return { ref: d(h) };
2167
+ return { ref: p(h) };
2168
2168
  const m = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
2169
- return i[1].defId = m, { defId: m, ref: `${d("__shared")}#/${c}/${m}` };
2169
+ return i[1].defId = m, { defId: m, ref: `${p("__shared")}#/${c}/${m}` };
2170
2170
  }
2171
2171
  if (i[1] === n)
2172
2172
  return { ref: "#" };
@@ -2228,21 +2228,21 @@ function yt(e, t) {
2228
2228
  const a = c.def ?? c.schema, l = { ...a }, f = c.ref;
2229
2229
  if (c.ref = null, f) {
2230
2230
  r(f);
2231
- const d = e.seen.get(f), m = d.schema;
2231
+ const p = e.seen.get(f), m = p.schema;
2232
2232
  if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(m)) : Object.assign(a, m), Object.assign(a, l), i._zod.parent === f)
2233
2233
  for (const z in a)
2234
2234
  z === "$ref" || z === "allOf" || z in l || delete a[z];
2235
- if (m.$ref && d.def)
2235
+ if (m.$ref && p.def)
2236
2236
  for (const z in a)
2237
- z === "$ref" || z === "allOf" || z in d.def && JSON.stringify(a[z]) === JSON.stringify(d.def[z]) && delete a[z];
2237
+ z === "$ref" || z === "allOf" || z in p.def && JSON.stringify(a[z]) === JSON.stringify(p.def[z]) && delete a[z];
2238
2238
  }
2239
2239
  const h = i._zod.parent;
2240
2240
  if (h && h !== f) {
2241
2241
  r(h);
2242
- const d = e.seen.get(h);
2243
- if (d?.schema.$ref && (a.$ref = d.schema.$ref, d.def))
2242
+ const p = e.seen.get(h);
2243
+ if (p?.schema.$ref && (a.$ref = p.schema.$ref, p.def))
2244
2244
  for (const m in a)
2245
- m === "$ref" || m === "allOf" || m in d.def && JSON.stringify(a[m]) === JSON.stringify(d.def[m]) && delete a[m];
2245
+ m === "$ref" || m === "allOf" || m in p.def && JSON.stringify(a[m]) === JSON.stringify(p.def[m]) && delete a[m];
2246
2246
  }
2247
2247
  e.override({
2248
2248
  zodSchema: i,
@@ -2521,9 +2521,9 @@ const ui = (e, t) => {
2521
2521
  // enumerable: false,
2522
2522
  }
2523
2523
  });
2524
- }, E = u("ZodError", ui, {
2524
+ }, A = u("ZodError", ui, {
2525
2525
  Parent: Error
2526
- }), li = /* @__PURE__ */ we(E), fi = /* @__PURE__ */ ze(E), pi = /* @__PURE__ */ se(E), di = /* @__PURE__ */ ce(E), hi = /* @__PURE__ */ Xt(E), mi = /* @__PURE__ */ qt(E), gi = /* @__PURE__ */ Qt(E), _i = /* @__PURE__ */ en(E), vi = /* @__PURE__ */ tn(E), bi = /* @__PURE__ */ nn(E), yi = /* @__PURE__ */ rn(E), wi = /* @__PURE__ */ on(E), w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
2526
+ }), li = /* @__PURE__ */ we(A), fi = /* @__PURE__ */ ze(A), pi = /* @__PURE__ */ se(A), di = /* @__PURE__ */ ce(A), hi = /* @__PURE__ */ Xt(A), mi = /* @__PURE__ */ qt(A), gi = /* @__PURE__ */ Qt(A), _i = /* @__PURE__ */ en(A), vi = /* @__PURE__ */ tn(A), bi = /* @__PURE__ */ nn(A), yi = /* @__PURE__ */ rn(A), wi = /* @__PURE__ */ on(A), w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
2527
2527
  jsonSchema: {
2528
2528
  input: ne(e, "input"),
2529
2529
  output: ne(e, "output")
@@ -2553,7 +2553,7 @@ const ui = (e, t) => {
2553
2553
  const n = e._zod.bag;
2554
2554
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ vo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ wo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ zo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ $o(...r)), e.min = (...r) => e.check(/* @__PURE__ */ te(...r)), e.max = (...r) => e.check(/* @__PURE__ */ gt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ _t(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ te(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ bo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ yo(r)), e.trim = () => e.check(/* @__PURE__ */ So()), e.normalize = (...r) => e.check(/* @__PURE__ */ ko(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Zo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Oo()), e.slugify = () => e.check(/* @__PURE__ */ To());
2555
2555
  }), zi = /* @__PURE__ */ u("ZodString", (e, t) => {
2556
- $e.init(e, t), zt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Mr($i, n)), e.url = (n) => e.check(/* @__PURE__ */ Vr(ki, n)), e.jwt = (n) => e.check(/* @__PURE__ */ co(Di, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Hr(Si, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ce(Le, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Ur(q, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Jr(q, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Wr(q, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Br(q, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Yr(Zi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ce(Le, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Gr(Oi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Kr(Ti, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Xr(Ei, n)), e.base64 = (n) => e.check(/* @__PURE__ */ oo(Ci, n)), e.base64url = (n) => e.check(/* @__PURE__ */ io(Ri, n)), e.xid = (n) => e.check(/* @__PURE__ */ qr(Ai, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Qr(Ii, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ eo(Ni, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ to(Pi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ no(xi, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ ro(ji, n)), e.e164 = (n) => e.check(/* @__PURE__ */ so(Fi, n)), e.datetime = (n) => e.check(ni(n)), e.date = (n) => e.check(oi(n)), e.time = (n) => e.check(si(n)), e.duration = (n) => e.check(ai(n));
2556
+ $e.init(e, t), zt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Mr($i, n)), e.url = (n) => e.check(/* @__PURE__ */ Vr(ki, n)), e.jwt = (n) => e.check(/* @__PURE__ */ co(Di, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Hr(Si, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ce(Le, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Ur(q, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Jr(q, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Wr(q, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Br(q, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Yr(Zi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ce(Le, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Gr(Oi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Kr(Ti, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Xr(Ai, n)), e.base64 = (n) => e.check(/* @__PURE__ */ oo(Ci, n)), e.base64url = (n) => e.check(/* @__PURE__ */ io(Ri, n)), e.xid = (n) => e.check(/* @__PURE__ */ qr(Ei, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Qr(Ii, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ eo(Ni, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ to(Pi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ no(xi, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ ro(ji, n)), e.e164 = (n) => e.check(/* @__PURE__ */ so(Fi, n)), e.datetime = (n) => e.check(ni(n)), e.date = (n) => e.check(oi(n)), e.time = (n) => e.check(si(n)), e.duration = (n) => e.check(ai(n));
2557
2557
  });
2558
2558
  function N(e) {
2559
2559
  return /* @__PURE__ */ Lr(zi, e);
@@ -2576,9 +2576,9 @@ const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2576
2576
  qn.init(e, t), b.init(e, t);
2577
2577
  }), Ti = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2578
2578
  Qn.init(e, t), b.init(e, t);
2579
- }), Ei = /* @__PURE__ */ u("ZodULID", (e, t) => {
2579
+ }), Ai = /* @__PURE__ */ u("ZodULID", (e, t) => {
2580
2580
  er.init(e, t), b.init(e, t);
2581
- }), Ai = /* @__PURE__ */ u("ZodXID", (e, t) => {
2581
+ }), Ei = /* @__PURE__ */ u("ZodXID", (e, t) => {
2582
2582
  tr.init(e, t), b.init(e, t);
2583
2583
  }), Ii = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2584
2584
  nr.init(e, t), b.init(e, t);
@@ -2634,7 +2634,7 @@ const Bi = /* @__PURE__ */ u("ZodArray", (e, t) => {
2634
2634
  wr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ te(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ te(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ gt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ _t(n, r)), e.unwrap = () => e.element;
2635
2635
  });
2636
2636
  function ge(e, t) {
2637
- return /* @__PURE__ */ Eo(Bi, e, t);
2637
+ return /* @__PURE__ */ Ao(Bi, e, t);
2638
2638
  }
2639
2639
  const Vi = /* @__PURE__ */ u("ZodObject", (e, t) => {
2640
2640
  $r.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), g(e, "shape", () => t.shape), e.keyof = () => St(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Je() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Je() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Wi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Ut(e, n), e.safeExtend = (n) => Jt(e, n), e.merge = (n) => Wt(e, n), e.pick = (n) => Lt(e, n), e.omit = (n) => Mt(e, n), e.partial = (...n) => Bt(Zt, e, n[0]), e.required = (...n) => Vt(Ot, e, n[0]);
@@ -2643,7 +2643,7 @@ function ue(e, t) {
2643
2643
  const n = {
2644
2644
  type: "object",
2645
2645
  shape: e ?? {},
2646
- ...p(t)
2646
+ ...d(t)
2647
2647
  };
2648
2648
  return new Vi(n);
2649
2649
  }
@@ -2654,7 +2654,7 @@ function Hi(e, t) {
2654
2654
  return new kt({
2655
2655
  type: "union",
2656
2656
  options: e,
2657
- ...p(t)
2657
+ ...d(t)
2658
2658
  });
2659
2659
  }
2660
2660
  const Yi = /* @__PURE__ */ u("ZodDiscriminatedUnion", (e, t) => {
@@ -2665,7 +2665,7 @@ function Gi(e, t, n) {
2665
2665
  type: "union",
2666
2666
  options: t,
2667
2667
  discriminator: e,
2668
- ...p(n)
2668
+ ...d(n)
2669
2669
  });
2670
2670
  }
2671
2671
  const Ki = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
@@ -2691,7 +2691,7 @@ const re = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2691
2691
  return new re({
2692
2692
  ...t,
2693
2693
  checks: [],
2694
- ...p(o),
2694
+ ...d(o),
2695
2695
  entries: s
2696
2696
  });
2697
2697
  }, e.exclude = (r, o) => {
@@ -2704,7 +2704,7 @@ const re = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2704
2704
  return new re({
2705
2705
  ...t,
2706
2706
  checks: [],
2707
- ...p(o),
2707
+ ...d(o),
2708
2708
  entries: s
2709
2709
  });
2710
2710
  };
@@ -2714,14 +2714,14 @@ function St(e, t) {
2714
2714
  return new re({
2715
2715
  type: "enum",
2716
2716
  entries: n,
2717
- ...p(t)
2717
+ ...d(t)
2718
2718
  });
2719
2719
  }
2720
2720
  function k(e, t) {
2721
2721
  return new re({
2722
2722
  type: "enum",
2723
2723
  entries: e,
2724
- ...p(t)
2724
+ ...d(t)
2725
2725
  });
2726
2726
  }
2727
2727
  const qi = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
@@ -2737,7 +2737,7 @@ function j(e, t) {
2737
2737
  return new qi({
2738
2738
  type: "literal",
2739
2739
  values: Array.isArray(e) ? e : [e],
2740
- ...p(t)
2740
+ ...d(t)
2741
2741
  });
2742
2742
  }
2743
2743
  const Qi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
@@ -2772,7 +2772,7 @@ function We(e) {
2772
2772
  });
2773
2773
  }
2774
2774
  const ts = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2775
- Er.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => wt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2775
+ Ar.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => wt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2776
2776
  });
2777
2777
  function ns(e) {
2778
2778
  return new ts({
@@ -2781,7 +2781,7 @@ function ns(e) {
2781
2781
  });
2782
2782
  }
2783
2783
  const rs = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2784
- Ar.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Yo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2784
+ Er.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Yo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2785
2785
  });
2786
2786
  function Be(e) {
2787
2787
  return new rs({
@@ -2820,7 +2820,7 @@ function as(e, t) {
2820
2820
  return new Ot({
2821
2821
  type: "nonoptional",
2822
2822
  innerType: e,
2823
- ...p(t)
2823
+ ...d(t)
2824
2824
  });
2825
2825
  }
2826
2826
  const us = /* @__PURE__ */ u("ZodCatch", (e, t) => {
@@ -2857,7 +2857,7 @@ const hs = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2857
2857
  Rr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uo(e, n);
2858
2858
  });
2859
2859
  function ms(e, t = {}) {
2860
- return /* @__PURE__ */ Ao(hs, e, t);
2860
+ return /* @__PURE__ */ Eo(hs, e, t);
2861
2861
  }
2862
2862
  function gs(e) {
2863
2863
  return /* @__PURE__ */ Io(e);
@@ -2897,10 +2897,10 @@ const _s = {
2897
2897
  Half: "B"
2898
2898
  }, Ts = k(
2899
2899
  Os
2900
- ), Es = {
2900
+ ), As = {
2901
2901
  Enable: "Y",
2902
2902
  Disable: "N"
2903
- }, As = k(Es), Is = {
2903
+ }, Es = k(As), Is = {
2904
2904
  TearOff: "T",
2905
2905
  PeelOff: "P",
2906
2906
  Rewind: "R",
@@ -2920,12 +2920,12 @@ const _s = {
2920
2920
  Rotate90: "R",
2921
2921
  Rotate180: "I",
2922
2922
  Rotate270: "B"
2923
- }, Tt = k(_e), Et = {
2923
+ }, Tt = k(_e), At = {
2924
2924
  Left: "L",
2925
2925
  Right: "R",
2926
2926
  Center: "C",
2927
2927
  Justified: "J"
2928
- }, Rs = k(Et), Q = {
2928
+ }, Rs = k(At), Q = {
2929
2929
  Left: "L",
2930
2930
  Right: "R",
2931
2931
  Center: "C"
@@ -2946,13 +2946,14 @@ const _s = {
2946
2946
  accountTiers: "accountTiers",
2947
2947
  pass: "pass",
2948
2948
  passResponses: "passResponses",
2949
- passAttributes: "passAttributes"
2949
+ passAttributes: "passAttributes",
2950
+ passAddOns: "passAddOns"
2950
2951
  }, Ws = k(Js), W = {
2951
2952
  None: "None",
2952
2953
  Uppercase: "Uppercase",
2953
2954
  Lowercase: "Lowercase",
2954
2955
  Capitalize: "Capitalize"
2955
- }, Bs = k(W), fc = ue({
2956
+ }, Bs = k(W), pc = ue({
2956
2957
  word: N(),
2957
2958
  width: _(),
2958
2959
  spaceWidth: _()
@@ -3013,7 +3014,11 @@ const _s = {
3013
3014
  }), Gs = le.extend({
3014
3015
  type: j("image"),
3015
3016
  // ^CF imagePath
3016
- data: N()
3017
+ data: N(),
3018
+ // When set, the image renders only if the resolved source value equals the
3019
+ // match string — or, for multi-value sources (e.g. multi-select responses),
3020
+ // contains it as one of its comma-separated values.
3021
+ valueMatch: N().optional()
3017
3022
  }), Ks = Gi("type", [
3018
3023
  Vs,
3019
3024
  Hs,
@@ -3054,7 +3059,7 @@ const _s = {
3054
3059
  London: "LONDON.TTF",
3055
3060
  "GT Walsheim": "GT_WALSHEIM.TTF",
3056
3061
  "Domain Display": "DOMAIN_DISPLAY.TTF"
3057
- }, At = ue({
3062
+ }, Et = ue({
3058
3063
  type: j("thermal"),
3059
3064
  // ~TA adjustment
3060
3065
  tearOffAdjustment: _().int().min(0).max(120),
@@ -3081,7 +3086,7 @@ const _s = {
3081
3086
  // ~SD darkness
3082
3087
  darkness: _().int().min(0).max(30),
3083
3088
  // ^LR reverse
3084
- reverse: As,
3089
+ reverse: Es,
3085
3090
  // ^MM mode, prepeel
3086
3091
  postPrintMode: Ns,
3087
3092
  prepeel: xs,
@@ -3094,14 +3099,14 @@ const _s = {
3094
3099
  fields: ge(Ks),
3095
3100
  fonts: ge(Xs)
3096
3101
  });
3097
- function pc(e) {
3098
- return At.safeParse(e);
3099
- }
3100
3102
  function dc(e) {
3101
- return At.parse(e);
3103
+ return Et.safeParse(e);
3104
+ }
3105
+ function hc(e) {
3106
+ return Et.parse(e);
3102
3107
  }
3103
3108
  const He = 1.05;
3104
- function hc(e, t, n) {
3109
+ function mc(e, t, n) {
3105
3110
  if (e.type === "thermal")
3106
3111
  return Qs(e, t, n);
3107
3112
  throw new Error(`Unsupported badge type: ${e.type}`);
@@ -3150,7 +3155,7 @@ function tc(e, t, n) {
3150
3155
  case "qrcode":
3151
3156
  return ac(e, r);
3152
3157
  case "image":
3153
- return uc(e, r);
3158
+ return uc(e, r) ? lc(e, r) : void 0;
3154
3159
  default: {
3155
3160
  const o = e;
3156
3161
  throw new Error(`Unsupported field type: ${o.type}`);
@@ -3172,7 +3177,7 @@ function nc(e, t) {
3172
3177
  break;
3173
3178
  case "accountAttributes":
3174
3179
  h = t.accountAttributes.find(
3175
- (d) => d.id === l
3180
+ (p) => p.id === l
3176
3181
  )?.value;
3177
3182
  break;
3178
3183
  case "accountTiers":
@@ -3182,19 +3187,28 @@ function nc(e, t) {
3182
3187
  h = t.pass[l];
3183
3188
  break;
3184
3189
  case "passResponses":
3185
- h = t.passResponses.find((d) => d.name === l)?.value;
3190
+ h = t.passResponses.find(
3191
+ (p) => p.name === l || p.id === l
3192
+ )?.value;
3186
3193
  break;
3187
3194
  case "passAttributes":
3188
- h = t.passAttributes.find((d) => d.name === l)?.value;
3195
+ h = t.passAttributes.find(
3196
+ (p) => p.name === l || p.id === l
3197
+ )?.value;
3198
+ break;
3199
+ case "passAddOns":
3200
+ h = t.passAddOns?.find(
3201
+ ({ addOn: p }) => p.name === l || p.id === l
3202
+ )?.addOn.name;
3189
3203
  break;
3190
3204
  default:
3191
3205
  h = "";
3192
3206
  break;
3193
3207
  }
3194
3208
  if (h != null && h !== "") {
3195
- const d = String(h);
3209
+ const p = String(h);
3196
3210
  if (f !== void 0) {
3197
- const $ = d.split(",")[f];
3211
+ const $ = p.split(",")[f];
3198
3212
  if ($ !== void 0) {
3199
3213
  const z = $.trim();
3200
3214
  if (z) {
@@ -3203,7 +3217,7 @@ function nc(e, t) {
3203
3217
  }
3204
3218
  }
3205
3219
  } else {
3206
- i = d;
3220
+ i = p;
3207
3221
  break;
3208
3222
  }
3209
3223
  }
@@ -3237,7 +3251,7 @@ function oc(e, t) {
3237
3251
  i = Math.min(a, e.maxLines);
3238
3252
  }
3239
3253
  const c = `^FB${e.maxWidth},${i},${e.lineSpacing},${e.alignment},${e.hangingIndent}`;
3240
- return e.alignment === Et.Center && (t = t + "\\&"), `${s}${e.x},${e.y}${o}${c}^FD${t}^FS`;
3254
+ return e.alignment === At.Center && (t = t + "\\&"), `${s}${e.x},${e.y}${o}${c}^FD${t}^FS`;
3241
3255
  }
3242
3256
  function oe(e, t, n) {
3243
3257
  const r = e.fontHeight > 0 ? n / e.fontHeight : 1;
@@ -3256,7 +3270,7 @@ function oe(e, t, n) {
3256
3270
  );
3257
3271
  return a;
3258
3272
  }
3259
- function mc(e, t) {
3273
+ function gc(e, t) {
3260
3274
  return oe(e, t, e.fontHeight);
3261
3275
  }
3262
3276
  function ic(e, t) {
@@ -3299,6 +3313,10 @@ function ac(e, t) {
3299
3313
  return `${n}${e.x},${e.y}${r}^FDQA,${t}^FS`;
3300
3314
  }
3301
3315
  function uc(e, t) {
3316
+ const n = e.valueMatch?.trim();
3317
+ return !n || t.trim() === n ? !0 : t.split(",").some((r) => r.trim() === n);
3318
+ }
3319
+ function lc(e, t) {
3302
3320
  if (t === "") return "";
3303
3321
  let n = "^FO";
3304
3322
  return e.verticalAlignment === Y.End && (n = "^FT"), `${n}${e.x},${e.y}^GF${e.data}^FS`;
@@ -3316,25 +3334,25 @@ export {
3316
3334
  Os as PrintDensityAdjustment,
3317
3335
  $s as PrintOrientation,
3318
3336
  Ds as QRCodeErrorCorrection,
3319
- Es as ReverseMode,
3337
+ As as ReverseMode,
3320
3338
  Js as SourceType,
3321
- Et as TextAlignment,
3339
+ At as TextAlignment,
3322
3340
  W as TextTransformation,
3323
3341
  ws as ThermalMediaType,
3324
3342
  Y as VerticalAlignment,
3325
3343
  Ms as YesNo,
3326
3344
  Cs as allMediaModeSchema,
3327
3345
  vs as backfeedActionSchema,
3328
- At as badgeSchema,
3346
+ Et as badgeSchema,
3329
3347
  Fs as barcodeAlignmentSchema,
3330
3348
  Hs as barcodeFieldSchema,
3331
3349
  ic as calculateFittedFontHeight,
3332
- mc as countLines,
3350
+ gc as countLines,
3333
3351
  oe as countLinesAtHeight,
3334
3352
  Ks as fieldSchema,
3335
3353
  Tt as fontOrientationSchema,
3336
3354
  Xs as fontSchema,
3337
- hc as generate,
3355
+ mc as generate,
3338
3356
  nc as getFieldValue,
3339
3357
  Gs as imageFieldSchema,
3340
3358
  ys as mediaTypeSchema,
@@ -3345,15 +3363,15 @@ export {
3345
3363
  ks as printOrientationSchema,
3346
3364
  Ls as qrCodeErrorCorrectionSchema,
3347
3365
  Ys as qrcodeFieldSchema,
3348
- As as reverseModeSchema,
3366
+ Es as reverseModeSchema,
3349
3367
  Ws as sourceTypeSchema,
3350
3368
  Rs as textAlignmentSchema,
3351
3369
  Vs as textFieldSchema,
3352
3370
  Bs as textTransformationSchema,
3353
3371
  zs as thermalMediaTypeSchema,
3354
- pc as validateBadge,
3355
- dc as validateBadgeOrThrow,
3372
+ dc as validateBadge,
3373
+ hc as validateBadgeOrThrow,
3356
3374
  Us as verticalAlignmentSchema,
3357
- fc as wordWidthSchema,
3375
+ pc as wordWidthSchema,
3358
3376
  de as yesNoSchema
3359
3377
  };
@@ -20,13 +20,23 @@ export interface SourcePass {
20
20
  passType: string;
21
21
  }
22
22
  export interface SourcePassAttribute {
23
+ id: string;
23
24
  name: string;
24
25
  value: string;
25
26
  }
26
27
  export interface SourcePassResponse {
28
+ id: string;
27
29
  name: string;
28
30
  value: string;
29
31
  }
32
+ export interface SourcePassAddOn {
33
+ id: string;
34
+ addOn: {
35
+ id: string;
36
+ name: string;
37
+ shortDescription: string;
38
+ };
39
+ }
30
40
  export interface SourceData {
31
41
  account: SourceAccount;
32
42
  accountAttributes: SourceAccountAttribute[];
@@ -34,4 +44,5 @@ export interface SourceData {
34
44
  pass: SourcePass;
35
45
  passResponses: SourcePassResponse[];
36
46
  passAttributes: SourcePassAttribute[];
47
+ passAddOns: SourcePassAddOn[];
37
48
  }
@@ -206,6 +206,7 @@ export declare const SourceType: {
206
206
  readonly pass: "pass";
207
207
  readonly passResponses: "passResponses";
208
208
  readonly passAttributes: "passAttributes";
209
+ readonly passAddOns: "passAddOns";
209
210
  };
210
211
  export declare const sourceTypeSchema: z.ZodEnum<{
211
212
  readonly account: "account";
@@ -214,6 +215,7 @@ export declare const sourceTypeSchema: z.ZodEnum<{
214
215
  readonly pass: "pass";
215
216
  readonly passResponses: "passResponses";
216
217
  readonly passAttributes: "passAttributes";
218
+ readonly passAddOns: "passAddOns";
217
219
  }>;
218
220
  export type SourceType = z.infer<typeof sourceTypeSchema>;
219
221
  export declare const TextTransformation: {
@@ -251,6 +253,7 @@ export declare const textFieldSchema: z.ZodObject<{
251
253
  readonly pass: "pass";
252
254
  readonly passResponses: "passResponses";
253
255
  readonly passAttributes: "passAttributes";
256
+ readonly passAddOns: "passAddOns";
254
257
  }>;
255
258
  sourceLookup: z.ZodString;
256
259
  sourceSeperator: z.ZodString;
@@ -303,6 +306,7 @@ export declare const barcodeFieldSchema: z.ZodObject<{
303
306
  readonly pass: "pass";
304
307
  readonly passResponses: "passResponses";
305
308
  readonly passAttributes: "passAttributes";
309
+ readonly passAddOns: "passAddOns";
306
310
  }>;
307
311
  sourceLookup: z.ZodString;
308
312
  sourceSeperator: z.ZodString;
@@ -352,6 +356,7 @@ export declare const qrcodeFieldSchema: z.ZodObject<{
352
356
  readonly pass: "pass";
353
357
  readonly passResponses: "passResponses";
354
358
  readonly passAttributes: "passAttributes";
359
+ readonly passAddOns: "passAddOns";
355
360
  }>;
356
361
  sourceLookup: z.ZodString;
357
362
  sourceSeperator: z.ZodString;
@@ -386,6 +391,7 @@ export declare const imageFieldSchema: z.ZodObject<{
386
391
  readonly pass: "pass";
387
392
  readonly passResponses: "passResponses";
388
393
  readonly passAttributes: "passAttributes";
394
+ readonly passAddOns: "passAddOns";
389
395
  }>;
390
396
  sourceLookup: z.ZodString;
391
397
  sourceSeperator: z.ZodString;
@@ -393,6 +399,7 @@ export declare const imageFieldSchema: z.ZodObject<{
393
399
  editable: z.ZodBoolean;
394
400
  type: z.ZodLiteral<"image">;
395
401
  data: z.ZodString;
402
+ valueMatch: z.ZodOptional<z.ZodString>;
396
403
  }, z.core.$strip>;
397
404
  export type ImageField = z.infer<typeof imageFieldSchema>;
398
405
  export declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -411,6 +418,7 @@ export declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
411
418
  readonly pass: "pass";
412
419
  readonly passResponses: "passResponses";
413
420
  readonly passAttributes: "passAttributes";
421
+ readonly passAddOns: "passAddOns";
414
422
  }>;
415
423
  sourceLookup: z.ZodString;
416
424
  sourceSeperator: z.ZodString;
@@ -461,6 +469,7 @@ export declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
461
469
  readonly pass: "pass";
462
470
  readonly passResponses: "passResponses";
463
471
  readonly passAttributes: "passAttributes";
472
+ readonly passAddOns: "passAddOns";
464
473
  }>;
465
474
  sourceLookup: z.ZodString;
466
475
  sourceSeperator: z.ZodString;
@@ -508,6 +517,7 @@ export declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
508
517
  readonly pass: "pass";
509
518
  readonly passResponses: "passResponses";
510
519
  readonly passAttributes: "passAttributes";
520
+ readonly passAddOns: "passAddOns";
511
521
  }>;
512
522
  sourceLookup: z.ZodString;
513
523
  sourceSeperator: z.ZodString;
@@ -540,6 +550,7 @@ export declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
540
550
  readonly pass: "pass";
541
551
  readonly passResponses: "passResponses";
542
552
  readonly passAttributes: "passAttributes";
553
+ readonly passAddOns: "passAddOns";
543
554
  }>;
544
555
  sourceLookup: z.ZodString;
545
556
  sourceSeperator: z.ZodString;
@@ -547,6 +558,7 @@ export declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
547
558
  editable: z.ZodBoolean;
548
559
  type: z.ZodLiteral<"image">;
549
560
  data: z.ZodString;
561
+ valueMatch: z.ZodOptional<z.ZodString>;
550
562
  }, z.core.$strip>], "type">;
551
563
  export type Field = z.infer<typeof fieldSchema>;
552
564
  export declare const fontSchema: z.ZodObject<{
@@ -672,6 +684,7 @@ export declare const badgeSchema: z.ZodObject<{
672
684
  readonly pass: "pass";
673
685
  readonly passResponses: "passResponses";
674
686
  readonly passAttributes: "passAttributes";
687
+ readonly passAddOns: "passAddOns";
675
688
  }>;
676
689
  sourceLookup: z.ZodString;
677
690
  sourceSeperator: z.ZodString;
@@ -722,6 +735,7 @@ export declare const badgeSchema: z.ZodObject<{
722
735
  readonly pass: "pass";
723
736
  readonly passResponses: "passResponses";
724
737
  readonly passAttributes: "passAttributes";
738
+ readonly passAddOns: "passAddOns";
725
739
  }>;
726
740
  sourceLookup: z.ZodString;
727
741
  sourceSeperator: z.ZodString;
@@ -769,6 +783,7 @@ export declare const badgeSchema: z.ZodObject<{
769
783
  readonly pass: "pass";
770
784
  readonly passResponses: "passResponses";
771
785
  readonly passAttributes: "passAttributes";
786
+ readonly passAddOns: "passAddOns";
772
787
  }>;
773
788
  sourceLookup: z.ZodString;
774
789
  sourceSeperator: z.ZodString;
@@ -801,6 +816,7 @@ export declare const badgeSchema: z.ZodObject<{
801
816
  readonly pass: "pass";
802
817
  readonly passResponses: "passResponses";
803
818
  readonly passAttributes: "passAttributes";
819
+ readonly passAddOns: "passAddOns";
804
820
  }>;
805
821
  sourceLookup: z.ZodString;
806
822
  sourceSeperator: z.ZodString;
@@ -808,6 +824,7 @@ export declare const badgeSchema: z.ZodObject<{
808
824
  editable: z.ZodBoolean;
809
825
  type: z.ZodLiteral<"image">;
810
826
  data: z.ZodString;
827
+ valueMatch: z.ZodOptional<z.ZodString>;
811
828
  }, z.core.$strip>], "type">>;
812
829
  fonts: z.ZodArray<z.ZodObject<{
813
830
  alias: z.ZodString;
@@ -875,7 +892,7 @@ export declare function validateBadge(data: Badge): z.ZodSafeParseResult<{
875
892
  y: number;
876
893
  defaultValue: string;
877
894
  verticalAlignment: "start" | "end";
878
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
895
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
879
896
  sourceLookup: string;
880
897
  sourceSeperator: string;
881
898
  hideEmpty: boolean;
@@ -900,7 +917,7 @@ export declare function validateBadge(data: Badge): z.ZodSafeParseResult<{
900
917
  y: number;
901
918
  defaultValue: string;
902
919
  verticalAlignment: "start" | "end";
903
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
920
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
904
921
  sourceLookup: string;
905
922
  sourceSeperator: string;
906
923
  hideEmpty: boolean;
@@ -919,7 +936,7 @@ export declare function validateBadge(data: Badge): z.ZodSafeParseResult<{
919
936
  y: number;
920
937
  defaultValue: string;
921
938
  verticalAlignment: "start" | "end";
922
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
939
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
923
940
  sourceLookup: string;
924
941
  sourceSeperator: string;
925
942
  hideEmpty: boolean;
@@ -936,13 +953,14 @@ export declare function validateBadge(data: Badge): z.ZodSafeParseResult<{
936
953
  y: number;
937
954
  defaultValue: string;
938
955
  verticalAlignment: "start" | "end";
939
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
956
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
940
957
  sourceLookup: string;
941
958
  sourceSeperator: string;
942
959
  hideEmpty: boolean;
943
960
  editable: boolean;
944
961
  type: "image";
945
962
  data: string;
963
+ valueMatch?: string | undefined;
946
964
  })[];
947
965
  fonts: {
948
966
  alias: string;
@@ -984,7 +1002,7 @@ export declare function validateBadgeOrThrow(data: Badge): {
984
1002
  y: number;
985
1003
  defaultValue: string;
986
1004
  verticalAlignment: "start" | "end";
987
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
1005
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
988
1006
  sourceLookup: string;
989
1007
  sourceSeperator: string;
990
1008
  hideEmpty: boolean;
@@ -1009,7 +1027,7 @@ export declare function validateBadgeOrThrow(data: Badge): {
1009
1027
  y: number;
1010
1028
  defaultValue: string;
1011
1029
  verticalAlignment: "start" | "end";
1012
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
1030
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
1013
1031
  sourceLookup: string;
1014
1032
  sourceSeperator: string;
1015
1033
  hideEmpty: boolean;
@@ -1028,7 +1046,7 @@ export declare function validateBadgeOrThrow(data: Badge): {
1028
1046
  y: number;
1029
1047
  defaultValue: string;
1030
1048
  verticalAlignment: "start" | "end";
1031
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
1049
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
1032
1050
  sourceLookup: string;
1033
1051
  sourceSeperator: string;
1034
1052
  hideEmpty: boolean;
@@ -1045,13 +1063,14 @@ export declare function validateBadgeOrThrow(data: Badge): {
1045
1063
  y: number;
1046
1064
  defaultValue: string;
1047
1065
  verticalAlignment: "start" | "end";
1048
- sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes";
1066
+ sourceType: "account" | "accountAttributes" | "accountTiers" | "pass" | "passResponses" | "passAttributes" | "passAddOns";
1049
1067
  sourceLookup: string;
1050
1068
  sourceSeperator: string;
1051
1069
  hideEmpty: boolean;
1052
1070
  editable: boolean;
1053
1071
  type: "image";
1054
1072
  data: string;
1073
+ valueMatch?: string | undefined;
1055
1074
  })[];
1056
1075
  fonts: {
1057
1076
  alias: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/zpl-generator",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",