@connectedxm/zpl-generator 0.0.13 → 0.0.15
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 +62 -59
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -70,7 +70,7 @@ function _e(e) {
|
|
|
70
70
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
71
71
|
return e.slice(t, n);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Et(e, t) {
|
|
74
74
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
75
75
|
let o = (r.split(".")[1] || "").length;
|
|
76
76
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -449,7 +449,7 @@ function yn(e) {
|
|
|
449
449
|
const wn = (e) => {
|
|
450
450
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
451
451
|
return new RegExp(`^${t}$`);
|
|
452
|
-
}, zn = /^-?\d+$/, $n = /^-?\d+(?:\.\d+)?$/, kn = /^(?:true|false)$/i, Sn = /^[^A-Z]*$/, Zn = /^[^a-z]*$/,
|
|
452
|
+
}, zn = /^-?\d+$/, $n = /^-?\d+(?:\.\d+)?$/, kn = /^(?:true|false)$/i, Sn = /^[^A-Z]*$/, Zn = /^[^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
|
}), nt = {
|
|
@@ -457,7 +457,7 @@ const wn = (e) => {
|
|
|
457
457
|
bigint: "bigint",
|
|
458
458
|
object: "date"
|
|
459
459
|
}, rt = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
|
|
460
|
-
|
|
460
|
+
T.init(e, t);
|
|
461
461
|
const n = nt[typeof t.value];
|
|
462
462
|
e._zod.onattach.push((r) => {
|
|
463
463
|
const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -474,7 +474,7 @@ const wn = (e) => {
|
|
|
474
474
|
});
|
|
475
475
|
};
|
|
476
476
|
}), ot = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
|
|
477
|
-
|
|
477
|
+
T.init(e, t);
|
|
478
478
|
const n = nt[typeof t.value];
|
|
479
479
|
e._zod.onattach.push((r) => {
|
|
480
480
|
const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -491,13 +491,13 @@ const wn = (e) => {
|
|
|
491
491
|
});
|
|
492
492
|
};
|
|
493
493
|
}), On = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
|
|
494
|
-
|
|
494
|
+
T.init(e, t), e._zod.onattach.push((n) => {
|
|
495
495
|
var r;
|
|
496
496
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
497
497
|
}), e._zod.check = (n) => {
|
|
498
498
|
if (typeof n.value != typeof t.value)
|
|
499
499
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
500
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
500
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Et(n.value, t.value) === 0) || n.issues.push({
|
|
501
501
|
origin: typeof n.value,
|
|
502
502
|
code: "not_multiple_of",
|
|
503
503
|
divisor: t.value,
|
|
@@ -506,8 +506,8 @@ const wn = (e) => {
|
|
|
506
506
|
continue: !t.abort
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
|
-
}),
|
|
510
|
-
|
|
509
|
+
}), Tn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
|
|
510
|
+
T.init(e, t), t.format = t.format || "float64";
|
|
511
511
|
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = jt[t.format];
|
|
512
512
|
e._zod.onattach.push((i) => {
|
|
513
513
|
const c = i._zod.bag;
|
|
@@ -567,9 +567,9 @@ const wn = (e) => {
|
|
|
567
567
|
continue: !t.abort
|
|
568
568
|
});
|
|
569
569
|
};
|
|
570
|
-
}),
|
|
570
|
+
}), En = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
|
|
571
571
|
var n;
|
|
572
|
-
|
|
572
|
+
T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
573
573
|
const o = r.value;
|
|
574
574
|
return !me(o) && o.length !== void 0;
|
|
575
575
|
}), e._zod.onattach.push((r) => {
|
|
@@ -592,7 +592,7 @@ const wn = (e) => {
|
|
|
592
592
|
};
|
|
593
593
|
}), In = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
594
594
|
var n;
|
|
595
|
-
|
|
595
|
+
T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
596
596
|
const o = r.value;
|
|
597
597
|
return !me(o) && o.length !== void 0;
|
|
598
598
|
}), e._zod.onattach.push((r) => {
|
|
@@ -615,7 +615,7 @@ const wn = (e) => {
|
|
|
615
615
|
};
|
|
616
616
|
}), An = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
617
617
|
var n;
|
|
618
|
-
|
|
618
|
+
T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
619
619
|
const o = r.value;
|
|
620
620
|
return !me(o) && o.length !== void 0;
|
|
621
621
|
}), e._zod.onattach.push((r) => {
|
|
@@ -638,7 +638,7 @@ const wn = (e) => {
|
|
|
638
638
|
};
|
|
639
639
|
}), se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
|
|
640
640
|
var n, r;
|
|
641
|
-
|
|
641
|
+
T.init(e, t), e._zod.onattach.push((o) => {
|
|
642
642
|
const s = o._zod.bag;
|
|
643
643
|
s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
|
|
644
644
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
@@ -670,7 +670,7 @@ const wn = (e) => {
|
|
|
670
670
|
}), jn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
671
671
|
t.pattern ?? (t.pattern = Zn), se.init(e, t);
|
|
672
672
|
}), xn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
673
|
-
|
|
673
|
+
T.init(e, t);
|
|
674
674
|
const n = L(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
675
675
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
676
676
|
const s = o._zod.bag;
|
|
@@ -687,7 +687,7 @@ const wn = (e) => {
|
|
|
687
687
|
});
|
|
688
688
|
};
|
|
689
689
|
}), Cn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
|
|
690
|
-
|
|
690
|
+
T.init(e, t);
|
|
691
691
|
const n = new RegExp(`^${L(t.prefix)}.*`);
|
|
692
692
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
693
693
|
const o = r._zod.bag;
|
|
@@ -704,7 +704,7 @@ const wn = (e) => {
|
|
|
704
704
|
});
|
|
705
705
|
};
|
|
706
706
|
}), Rn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
|
|
707
|
-
|
|
707
|
+
T.init(e, t);
|
|
708
708
|
const n = new RegExp(`.*${L(t.suffix)}$`);
|
|
709
709
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
710
710
|
const o = r._zod.bag;
|
|
@@ -721,7 +721,7 @@ const wn = (e) => {
|
|
|
721
721
|
});
|
|
722
722
|
};
|
|
723
723
|
}), Dn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
|
|
724
|
-
|
|
724
|
+
T.init(e, t), e._zod.check = (n) => {
|
|
725
725
|
n.value = t.tx(n.value);
|
|
726
726
|
};
|
|
727
727
|
});
|
|
@@ -1047,7 +1047,7 @@ const fr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1047
1047
|
}), n;
|
|
1048
1048
|
};
|
|
1049
1049
|
}), pr = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
|
|
1050
|
-
|
|
1050
|
+
Tn.init(e, t), st.init(e, t);
|
|
1051
1051
|
}), dr = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
|
|
1052
1052
|
y.init(e, t), e._zod.pattern = kn, e._zod.parse = (n, r) => {
|
|
1053
1053
|
if (t.coerce)
|
|
@@ -1198,8 +1198,8 @@ const gr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1198
1198
|
K[A] = `key_${Zt++}`;
|
|
1199
1199
|
m.write("const newResult = {};");
|
|
1200
1200
|
for (const A of $.keys) {
|
|
1201
|
-
const O = K[A], I = ze(A),
|
|
1202
|
-
m.write(`const ${O} = ${z(A)};`),
|
|
1201
|
+
const O = K[A], I = ze(A), Tt = d[A]?._zod?.optout === "optional";
|
|
1202
|
+
m.write(`const ${O} = ${z(A)};`), Tt ? m.write(`
|
|
1203
1203
|
if (${O}.issues.length) {
|
|
1204
1204
|
if (${I} in input) {
|
|
1205
1205
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
@@ -1477,24 +1477,24 @@ const lt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
|
1477
1477
|
if (n.value === void 0)
|
|
1478
1478
|
return n.value = t.defaultValue, n;
|
|
1479
1479
|
const o = t.innerType._zod.run(n, r);
|
|
1480
|
-
return o instanceof Promise ? o.then((s) =>
|
|
1480
|
+
return o instanceof Promise ? o.then((s) => Te(s, t)) : Te(o, t);
|
|
1481
1481
|
};
|
|
1482
1482
|
});
|
|
1483
|
-
function
|
|
1483
|
+
function Te(e, t) {
|
|
1484
1484
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1485
1485
|
}
|
|
1486
1486
|
const Or = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
1487
1487
|
y.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
1488
|
-
}),
|
|
1488
|
+
}), Tr = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
1489
1489
|
y.init(e, t), _(e._zod, "values", () => {
|
|
1490
1490
|
const n = t.innerType._zod.values;
|
|
1491
1491
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
1492
1492
|
}), e._zod.parse = (n, r) => {
|
|
1493
1493
|
const o = t.innerType._zod.run(n, r);
|
|
1494
|
-
return o instanceof Promise ? o.then((s) =>
|
|
1494
|
+
return o instanceof Promise ? o.then((s) => Ee(s, e)) : Ee(o, e);
|
|
1495
1495
|
};
|
|
1496
1496
|
});
|
|
1497
|
-
function
|
|
1497
|
+
function Ee(e, t) {
|
|
1498
1498
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1499
1499
|
code: "invalid_type",
|
|
1500
1500
|
expected: "nonoptional",
|
|
@@ -1502,7 +1502,7 @@ function Te(e, t) {
|
|
|
1502
1502
|
inst: t
|
|
1503
1503
|
}), e;
|
|
1504
1504
|
}
|
|
1505
|
-
const
|
|
1505
|
+
const Er = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
1506
1506
|
y.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1507
1507
|
if (r.direction === "backward")
|
|
1508
1508
|
return t.innerType._zod.run(n, r);
|
|
@@ -1546,7 +1546,7 @@ function Ie(e) {
|
|
|
1546
1546
|
return e.value = Object.freeze(e.value), e;
|
|
1547
1547
|
}
|
|
1548
1548
|
const Nr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
1549
|
-
|
|
1549
|
+
T.init(e, t), y.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
1550
1550
|
const r = n.value, o = t.fn(r);
|
|
1551
1551
|
if (o instanceof Promise)
|
|
1552
1552
|
return o.then((s) => Ae(s, n, r, e));
|
|
@@ -1957,7 +1957,7 @@ function Ce(e, t) {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
// @__NO_SIDE_EFFECTS__
|
|
1959
1959
|
function ft(e, t) {
|
|
1960
|
-
return new
|
|
1960
|
+
return new En({
|
|
1961
1961
|
check: "max_length",
|
|
1962
1962
|
...p(t),
|
|
1963
1963
|
maximum: e
|
|
@@ -2092,7 +2092,7 @@ function Zo(e) {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
// @__NO_SIDE_EFFECTS__
|
|
2094
2094
|
function Oo(e, t) {
|
|
2095
|
-
const n = new
|
|
2095
|
+
const n = new T({
|
|
2096
2096
|
check: "custom",
|
|
2097
2097
|
...p(t)
|
|
2098
2098
|
});
|
|
@@ -2325,13 +2325,13 @@ function Z(e, t) {
|
|
|
2325
2325
|
}
|
|
2326
2326
|
return !1;
|
|
2327
2327
|
}
|
|
2328
|
-
const
|
|
2328
|
+
const To = (e, t = {}) => (n) => {
|
|
2329
2329
|
const r = dt({ ...n, processors: t });
|
|
2330
2330
|
return k(e, r), ht(r, e), mt(r, e);
|
|
2331
2331
|
}, te = (e, t, n = {}) => (r) => {
|
|
2332
2332
|
const { libraryOptions: o, target: s } = r ?? {}, i = dt({ ...o ?? {}, target: s, io: t, processors: n });
|
|
2333
2333
|
return k(e, i), ht(i, e), mt(i, e);
|
|
2334
|
-
},
|
|
2334
|
+
}, Eo = {
|
|
2335
2335
|
guid: "uuid",
|
|
2336
2336
|
url: "uri",
|
|
2337
2337
|
datetime: "date-time",
|
|
@@ -2342,7 +2342,7 @@ const Eo = (e, t = {}) => (n) => {
|
|
|
2342
2342
|
const o = n;
|
|
2343
2343
|
o.type = "string";
|
|
2344
2344
|
const { minimum: s, maximum: i, format: c, patterns: a, contentEncoding: l } = e._zod.bag;
|
|
2345
|
-
if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format =
|
|
2345
|
+
if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = Eo[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), l && (o.contentEncoding = l), a && a.size > 0) {
|
|
2346
2346
|
const f = [...a];
|
|
2347
2347
|
f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
|
|
2348
2348
|
...f.map((h) => ({
|
|
@@ -2521,14 +2521,14 @@ const oi = (e, t) => {
|
|
|
2521
2521
|
// enumerable: false,
|
|
2522
2522
|
}
|
|
2523
2523
|
});
|
|
2524
|
-
},
|
|
2524
|
+
}, E = u("ZodError", oi, {
|
|
2525
2525
|
Parent: Error
|
|
2526
|
-
}), ii = /* @__PURE__ */ ve(
|
|
2526
|
+
}), ii = /* @__PURE__ */ ve(E), si = /* @__PURE__ */ be(E), ci = /* @__PURE__ */ oe(E), ai = /* @__PURE__ */ ie(E), ui = /* @__PURE__ */ Wt(E), li = /* @__PURE__ */ Yt(E), fi = /* @__PURE__ */ Gt(E), pi = /* @__PURE__ */ Kt(E), di = /* @__PURE__ */ Ht(E), hi = /* @__PURE__ */ qt(E), mi = /* @__PURE__ */ Xt(E), _i = /* @__PURE__ */ Qt(E), w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
|
|
2527
2527
|
jsonSchema: {
|
|
2528
2528
|
input: te(e, "input"),
|
|
2529
2529
|
output: te(e, "output")
|
|
2530
2530
|
}
|
|
2531
|
-
}), e.toJSONSchema =
|
|
2531
|
+
}), e.toJSONSchema = To(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(P(t, {
|
|
2532
2532
|
checks: [
|
|
2533
2533
|
...t.checks ?? [],
|
|
2534
2534
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
@@ -2553,7 +2553,7 @@ const oi = (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__ */ po(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ _o(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ go(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ vo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ee(...r)), e.max = (...r) => e.check(/* @__PURE__ */ ft(...r)), e.length = (...r) => e.check(/* @__PURE__ */ pt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ee(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ ho(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ mo(r)), e.trim = () => e.check(/* @__PURE__ */ yo()), e.normalize = (...r) => e.check(/* @__PURE__ */ bo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ wo()), e.toUpperCase = () => e.check(/* @__PURE__ */ zo()), e.slugify = () => e.check(/* @__PURE__ */ $o());
|
|
2555
2555
|
}), gi = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2556
|
-
ye.init(e, t), gt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Cr(vi, n)), e.url = (n) => e.check(/* @__PURE__ */ Lr(bi, n)), e.jwt = (n) => e.check(/* @__PURE__ */ no(ji, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Ur(yi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(Re, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Rr(X, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Dr(X, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Fr(X, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Mr(X, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Jr(wi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(Re, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Br(zi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Vr($i, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Wr(ki, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Qr(Ai, n)), e.base64url = (n) => e.check(/* @__PURE__ */ eo(Ni, n)), e.xid = (n) => e.check(/* @__PURE__ */ Yr(Si, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Gr(Zi, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Kr(Oi, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Hr(
|
|
2556
|
+
ye.init(e, t), gt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Cr(vi, n)), e.url = (n) => e.check(/* @__PURE__ */ Lr(bi, n)), e.jwt = (n) => e.check(/* @__PURE__ */ no(ji, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Ur(yi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(Re, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Rr(X, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Dr(X, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Fr(X, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Mr(X, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Jr(wi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(Re, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Br(zi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Vr($i, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Wr(ki, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Qr(Ai, n)), e.base64url = (n) => e.check(/* @__PURE__ */ eo(Ni, n)), e.xid = (n) => e.check(/* @__PURE__ */ Yr(Si, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Gr(Zi, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Kr(Oi, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Hr(Ti, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ qr(Ei, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Xr(Ii, n)), e.e164 = (n) => e.check(/* @__PURE__ */ to(Pi, n)), e.datetime = (n) => e.check(qo(n)), e.date = (n) => e.check(Qo(n)), e.time = (n) => e.check(ti(n)), e.duration = (n) => e.check(ri(n));
|
|
2557
2557
|
});
|
|
2558
2558
|
function N(e) {
|
|
2559
2559
|
return /* @__PURE__ */ xr(gi, e);
|
|
@@ -2584,9 +2584,9 @@ const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2584
2584
|
qn.init(e, t), b.init(e, t);
|
|
2585
2585
|
}), Oi = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
|
|
2586
2586
|
nr.init(e, t), b.init(e, t);
|
|
2587
|
-
}),
|
|
2587
|
+
}), Ti = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
2588
2588
|
rr.init(e, t), b.init(e, t);
|
|
2589
|
-
}),
|
|
2589
|
+
}), Ei = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
2590
2590
|
or.init(e, t), b.init(e, t);
|
|
2591
2591
|
}), Ii = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
2592
2592
|
ir.init(e, t), b.init(e, t);
|
|
@@ -2814,7 +2814,7 @@ function ns(e, t) {
|
|
|
2814
2814
|
});
|
|
2815
2815
|
}
|
|
2816
2816
|
const zt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
|
|
2817
|
-
|
|
2817
|
+
Tr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2818
2818
|
});
|
|
2819
2819
|
function rs(e, t) {
|
|
2820
2820
|
return new zt({
|
|
@@ -2824,7 +2824,7 @@ function rs(e, t) {
|
|
|
2824
2824
|
});
|
|
2825
2825
|
}
|
|
2826
2826
|
const os = /* @__PURE__ */ u("ZodCatch", (e, t) => {
|
|
2827
|
-
|
|
2827
|
+
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, e.removeCatch = e.unwrap;
|
|
2828
2828
|
});
|
|
2829
2829
|
function is(e, t) {
|
|
2830
2830
|
return new os({
|
|
@@ -2909,10 +2909,10 @@ const ps = {
|
|
|
2909
2909
|
DelayedCut: "D",
|
|
2910
2910
|
EncodeRFID: "F",
|
|
2911
2911
|
Kiosk: "K"
|
|
2912
|
-
}, Os = S(Zs),
|
|
2912
|
+
}, Os = S(Zs), Ts = {
|
|
2913
2913
|
Prepeel: "Y",
|
|
2914
2914
|
NoPrepeel: "N"
|
|
2915
|
-
},
|
|
2915
|
+
}, Es = S(Ts), Is = {
|
|
2916
2916
|
AllMedia: "Y",
|
|
2917
2917
|
ContinuousOnly: "N"
|
|
2918
2918
|
}, As = S(Is), Ns = {
|
|
@@ -3028,20 +3028,20 @@ const ps = {
|
|
|
3028
3028
|
])
|
|
3029
3029
|
}), Ys = {
|
|
3030
3030
|
// DEFAULT
|
|
3031
|
-
Arial: "ARIAL.
|
|
3032
|
-
"Open Sans": "OPEN_SANS.
|
|
3033
|
-
Roboto: "ROBOTO.
|
|
3034
|
-
Lato: "LATO.
|
|
3035
|
-
Montserrat: "MONTSERRAT.
|
|
3036
|
-
Inter: "INTER.
|
|
3037
|
-
Oswald: "OSWALD.
|
|
3031
|
+
Arial: "ARIAL.TTF",
|
|
3032
|
+
"Open Sans": "OPEN_SANS.TTF",
|
|
3033
|
+
Roboto: "ROBOTO.TTF",
|
|
3034
|
+
Lato: "LATO.TTF",
|
|
3035
|
+
Montserrat: "MONTSERRAT.TTF",
|
|
3036
|
+
Inter: "INTER.TTF",
|
|
3037
|
+
Oswald: "OSWALD.TTF",
|
|
3038
3038
|
// CUSTOM
|
|
3039
|
-
Raleway: "RALEWAY.
|
|
3040
|
-
"Raleway Bold": "RALEWAY_BOLD.
|
|
3041
|
-
Paris: "PARIS.
|
|
3042
|
-
London: "LONDON.
|
|
3043
|
-
"GT Walsheim": "GT_WALSHEIM.
|
|
3044
|
-
"Domain Display": "DOMAIN_DISPLAY.
|
|
3039
|
+
Raleway: "RALEWAY.TTF",
|
|
3040
|
+
"Raleway Bold": "RALEWAY_BOLD.TTF",
|
|
3041
|
+
Paris: "PARIS.TTF",
|
|
3042
|
+
London: "LONDON.TTF",
|
|
3043
|
+
"GT Walsheim": "GT_WALSHEIM.TTF",
|
|
3044
|
+
"Domain Display": "DOMAIN_DISPLAY.TTF"
|
|
3045
3045
|
}, St = ce({
|
|
3046
3046
|
type: x("thermal"),
|
|
3047
3047
|
// ~TA adjustment
|
|
@@ -3072,7 +3072,7 @@ const ps = {
|
|
|
3072
3072
|
reverse: Ss,
|
|
3073
3073
|
// ^MM mode, prepeel
|
|
3074
3074
|
postPrintMode: Os,
|
|
3075
|
-
prepeel:
|
|
3075
|
+
prepeel: Es,
|
|
3076
3076
|
// ^PW width
|
|
3077
3077
|
printWidth: g().int().min(2),
|
|
3078
3078
|
// ^LL length, allMedia
|
|
@@ -3228,7 +3228,10 @@ function Qs(e, t) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
function ec(e, t) {
|
|
3230
3230
|
if (e.measuredWidth !== void 0 && e.maxWidth > 0)
|
|
3231
|
-
return Math.max(
|
|
3231
|
+
return Math.max(
|
|
3232
|
+
1,
|
|
3233
|
+
Math.floor((e.measuredWidth + 10) / e.maxWidth) + 1
|
|
3234
|
+
);
|
|
3232
3235
|
const n = t.split("\\&"), r = e.charsPerLine ?? 0;
|
|
3233
3236
|
return tc(n, r);
|
|
3234
3237
|
}
|
|
@@ -3265,7 +3268,7 @@ export {
|
|
|
3265
3268
|
hs as MediaType,
|
|
3266
3269
|
ys as MirrorMode,
|
|
3267
3270
|
Zs as PostPrintMode,
|
|
3268
|
-
|
|
3271
|
+
Ts as PrepeelMode,
|
|
3269
3272
|
zs as PrintDensityAdjustment,
|
|
3270
3273
|
vs as PrintOrientation,
|
|
3271
3274
|
js as QRCodeErrorCorrection,
|
|
@@ -3290,7 +3293,7 @@ export {
|
|
|
3290
3293
|
ms as mediaTypeSchema,
|
|
3291
3294
|
ws as mirrorModeSchema,
|
|
3292
3295
|
Os as postPrintModeSchema,
|
|
3293
|
-
|
|
3296
|
+
Es as prepeelModeSchema,
|
|
3294
3297
|
$s as printDensityAdjustmentSchema,
|
|
3295
3298
|
bs as printOrientationSchema,
|
|
3296
3299
|
xs as qrCodeErrorCorrectionSchema,
|