@camstack/addon-provider-homematic 1.2.189 → 1.2.191
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/CHANGELOG.md +17 -0
- package/dist/_stub.js +606 -606
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-gabItMV6.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BxV9YeD6.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DsJZKFzR.mjs +26 -0
- package/dist/addon-provider-homematic.css +1 -1
- package/dist/addon.js +1327 -482
- package/dist/addon.mjs +1327 -482
- package/dist/{hostInit-_8HOpx8j.mjs → hostInit-CVYnx4wT.mjs} +3 -3
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-CcrJu_nF.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DtvMyC4I.mjs} +1 -1
- package/package.json +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BekQrhZR.mjs +0 -26
package/dist/_stub.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./virtualExposes-v5SsyBZj.mjs";
|
|
2
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-
|
|
2
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DtvMyC4I.mjs";
|
|
3
3
|
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react__loadShare__.js-iX7UoD9E.mjs";
|
|
4
|
-
import { S as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as
|
|
4
|
+
import { S as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as ee, r as te, s as ne, t as re, u as x, v as ie, x as S, y as ae } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DsJZKFzR.mjs";
|
|
5
5
|
import { n as C, t as w } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-15LkOsGv.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
7
7
|
var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), se = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ce = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), le = (e) => {
|
|
@@ -446,23 +446,23 @@ function Xe(e, t = 0) {
|
|
|
446
446
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
447
447
|
return !1;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function P(e, t) {
|
|
450
450
|
return t.map((t) => {
|
|
451
451
|
var n;
|
|
452
452
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Ze(e) {
|
|
456
456
|
return typeof e == "string" ? e : e?.message;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
let r = e.message ? e.message :
|
|
458
|
+
function F(e, t, n) {
|
|
459
|
+
let r = e.message ? e.message : Ze(e.inst?._zod.def?.error?.(e)) ?? Ze(t?.error?.(e)) ?? Ze(n.customError?.(e)) ?? Ze(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
|
|
460
460
|
return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Qe(e) {
|
|
463
463
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function $e(...e) {
|
|
466
466
|
let [t, n, r] = e;
|
|
467
467
|
return typeof t == "string" ? {
|
|
468
468
|
message: t,
|
|
@@ -473,7 +473,7 @@ function et(...e) {
|
|
|
473
473
|
}
|
|
474
474
|
//#endregion
|
|
475
475
|
//#region ../../node_modules/zod/v4/core/errors.js
|
|
476
|
-
var
|
|
476
|
+
var et = (e, t) => {
|
|
477
477
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
478
478
|
value: e._zod,
|
|
479
479
|
enumerable: !1
|
|
@@ -484,8 +484,8 @@ var tt = (e, t) => {
|
|
|
484
484
|
value: () => e.message,
|
|
485
485
|
enumerable: !1
|
|
486
486
|
});
|
|
487
|
-
},
|
|
488
|
-
function
|
|
487
|
+
}, tt = E("$ZodError", et), nt = E("$ZodError", et, { Parent: Error });
|
|
488
|
+
function rt(e, t = (e) => e.message) {
|
|
489
489
|
let n = {}, r = [];
|
|
490
490
|
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
491
491
|
return {
|
|
@@ -493,7 +493,7 @@ function it(e, t = (e) => e.message) {
|
|
|
493
493
|
fieldErrors: n
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function it(e, t = (e) => e.message) {
|
|
497
497
|
let n = { _errors: [] }, r = (e, i = []) => {
|
|
498
498
|
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
499
499
|
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
@@ -514,7 +514,7 @@ function at(e, t = (e) => e.message) {
|
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
516
516
|
//#region ../../node_modules/zod/v4/core/parse.js
|
|
517
|
-
var
|
|
517
|
+
var at = (e) => (t, n, r, i) => {
|
|
518
518
|
let a = r ? {
|
|
519
519
|
...r,
|
|
520
520
|
async: !1
|
|
@@ -524,11 +524,11 @@ var ot = (e) => (t, n, r, i) => {
|
|
|
524
524
|
}, a);
|
|
525
525
|
if (o instanceof Promise) throw new Se();
|
|
526
526
|
if (o.issues.length) {
|
|
527
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
527
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => F(e, a, D())));
|
|
528
528
|
throw Pe(t, i?.callee), t;
|
|
529
529
|
}
|
|
530
530
|
return o.value;
|
|
531
|
-
},
|
|
531
|
+
}, ot = (e) => async (t, n, r, i) => {
|
|
532
532
|
let a = r ? {
|
|
533
533
|
...r,
|
|
534
534
|
async: !0
|
|
@@ -537,11 +537,11 @@ var ot = (e) => (t, n, r, i) => {
|
|
|
537
537
|
issues: []
|
|
538
538
|
}, a);
|
|
539
539
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
540
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
540
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => F(e, a, D())));
|
|
541
541
|
throw Pe(t, i?.callee), t;
|
|
542
542
|
}
|
|
543
543
|
return o.value;
|
|
544
|
-
},
|
|
544
|
+
}, st = (e) => (t, n, r) => {
|
|
545
545
|
let i = r ? {
|
|
546
546
|
...r,
|
|
547
547
|
async: !1
|
|
@@ -552,12 +552,12 @@ var ot = (e) => (t, n, r, i) => {
|
|
|
552
552
|
if (a instanceof Promise) throw new Se();
|
|
553
553
|
return a.issues.length ? {
|
|
554
554
|
success: !1,
|
|
555
|
-
error: new (e ??
|
|
555
|
+
error: new (e ?? tt)(a.issues.map((e) => F(e, i, D())))
|
|
556
556
|
} : {
|
|
557
557
|
success: !0,
|
|
558
558
|
data: a.value
|
|
559
559
|
};
|
|
560
|
-
},
|
|
560
|
+
}, ct = /* @__PURE__*/ st(nt), lt = (e) => async (t, n, r) => {
|
|
561
561
|
let i = r ? {
|
|
562
562
|
...r,
|
|
563
563
|
async: !0
|
|
@@ -567,66 +567,66 @@ var ot = (e) => (t, n, r, i) => {
|
|
|
567
567
|
}, i);
|
|
568
568
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
569
569
|
success: !1,
|
|
570
|
-
error: new e(a.issues.map((e) =>
|
|
570
|
+
error: new e(a.issues.map((e) => F(e, i, D())))
|
|
571
571
|
} : {
|
|
572
572
|
success: !0,
|
|
573
573
|
data: a.value
|
|
574
574
|
};
|
|
575
|
-
},
|
|
575
|
+
}, ut = /* @__PURE__*/ lt(nt), dt = (e) => (t, n, r) => {
|
|
576
576
|
let i = r ? {
|
|
577
577
|
...r,
|
|
578
578
|
direction: "backward"
|
|
579
579
|
} : { direction: "backward" };
|
|
580
|
-
return
|
|
581
|
-
},
|
|
580
|
+
return at(e)(t, n, i);
|
|
581
|
+
}, ft = (e) => (t, n, r) => at(e)(t, n, r), pt = (e) => async (t, n, r) => {
|
|
582
582
|
let i = r ? {
|
|
583
583
|
...r,
|
|
584
584
|
direction: "backward"
|
|
585
585
|
} : { direction: "backward" };
|
|
586
|
-
return
|
|
587
|
-
},
|
|
586
|
+
return ot(e)(t, n, i);
|
|
587
|
+
}, mt = (e) => async (t, n, r) => ot(e)(t, n, r), ht = (e) => (t, n, r) => {
|
|
588
588
|
let i = r ? {
|
|
589
589
|
...r,
|
|
590
590
|
direction: "backward"
|
|
591
591
|
} : { direction: "backward" };
|
|
592
|
-
return
|
|
593
|
-
},
|
|
592
|
+
return st(e)(t, n, i);
|
|
593
|
+
}, gt = (e) => (t, n, r) => st(e)(t, n, r), _t = (e) => async (t, n, r) => {
|
|
594
594
|
let i = r ? {
|
|
595
595
|
...r,
|
|
596
596
|
direction: "backward"
|
|
597
597
|
} : { direction: "backward" };
|
|
598
|
-
return
|
|
599
|
-
},
|
|
600
|
-
function
|
|
601
|
-
return new RegExp(
|
|
598
|
+
return lt(e)(t, n, i);
|
|
599
|
+
}, vt = (e) => async (t, n, r) => lt(e)(t, n, r), yt = /^[cC][0-9a-z]{6,}$/, bt = /^[0-9a-z]+$/, xt = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, St = /^[0-9a-vA-V]{20}$/, Ct = /^[A-Za-z0-9]{27}$/, wt = /^[a-zA-Z0-9_-]{21}$/, Tt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Et = /^([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})$/, Dt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/, Ot = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, kt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
600
|
+
function At() {
|
|
601
|
+
return new RegExp(kt, "u");
|
|
602
602
|
}
|
|
603
|
-
var
|
|
604
|
-
function
|
|
603
|
+
var jt = /^(?:(?: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])$/, Mt = /^(([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}|:))$/, Nt = /^((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])$/, Pt = /^(([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])$/, Ft = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, It = /^[A-Za-z0-9_-]*$/, Lt = /^https?$/, Rt = /^\+[1-9]\d{6,14}$/, zt = "(?:(?:\\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])))", Bt = /*@__PURE__*/ RegExp(`^${zt}$`);
|
|
604
|
+
function Vt(e) {
|
|
605
605
|
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
606
606
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
return RegExp(`^${
|
|
608
|
+
function Ht(e) {
|
|
609
|
+
return RegExp(`^${Vt(e)}$`);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
let t =
|
|
611
|
+
function Ut(e) {
|
|
612
|
+
let t = Vt({ precision: e.precision }), n = ["Z"];
|
|
613
613
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
614
614
|
let r = `${t}(?:${n.join("|")})`;
|
|
615
|
-
return RegExp(`^${
|
|
615
|
+
return RegExp(`^${zt}T(?:${r})$`);
|
|
616
616
|
}
|
|
617
|
-
var
|
|
617
|
+
var Wt = (e) => {
|
|
618
618
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
619
619
|
return RegExp(`^${t}$`);
|
|
620
|
-
},
|
|
620
|
+
}, Gt = /^-?\d+$/, Kt = /^-?\d+(?:\.\d+)?$/, qt = /^(?:true|false)$/i, Jt = /^null$/i, Yt = /^[^A-Z]*$/, Xt = /^[^a-z]*$/, I = /*@__PURE__*/ E("$ZodCheck", (e, t) => {
|
|
621
621
|
var n;
|
|
622
622
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
623
|
-
}),
|
|
623
|
+
}), Zt = {
|
|
624
624
|
number: "number",
|
|
625
625
|
bigint: "bigint",
|
|
626
626
|
object: "date"
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
let n =
|
|
627
|
+
}, Qt = /*@__PURE__*/ E("$ZodCheckLessThan", (e, t) => {
|
|
628
|
+
I.init(e, t);
|
|
629
|
+
let n = Zt[typeof t.value];
|
|
630
630
|
e._zod.onattach.push((e) => {
|
|
631
631
|
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
632
632
|
t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
@@ -641,9 +641,9 @@ var Gt = (e) => {
|
|
|
641
641
|
continue: !t.abort
|
|
642
642
|
});
|
|
643
643
|
};
|
|
644
|
-
}),
|
|
645
|
-
|
|
646
|
-
let n =
|
|
644
|
+
}), $t = /*@__PURE__*/ E("$ZodCheckGreaterThan", (e, t) => {
|
|
645
|
+
I.init(e, t);
|
|
646
|
+
let n = Zt[typeof t.value];
|
|
647
647
|
e._zod.onattach.push((e) => {
|
|
648
648
|
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
649
649
|
t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
@@ -658,8 +658,8 @@ var Gt = (e) => {
|
|
|
658
658
|
continue: !t.abort
|
|
659
659
|
});
|
|
660
660
|
};
|
|
661
|
-
}),
|
|
662
|
-
|
|
661
|
+
}), en = /*@__PURE__*/ E("$ZodCheckMultipleOf", (e, t) => {
|
|
662
|
+
I.init(e, t), e._zod.onattach.push((e) => {
|
|
663
663
|
var n;
|
|
664
664
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
665
665
|
}), e._zod.check = (n) => {
|
|
@@ -673,12 +673,12 @@ var Gt = (e) => {
|
|
|
673
673
|
continue: !t.abort
|
|
674
674
|
});
|
|
675
675
|
};
|
|
676
|
-
}),
|
|
677
|
-
|
|
676
|
+
}), tn = /*@__PURE__*/ E("$ZodCheckNumberFormat", (e, t) => {
|
|
677
|
+
I.init(e, t), t.format = t.format || "float64";
|
|
678
678
|
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = He[t.format];
|
|
679
679
|
e._zod.onattach.push((e) => {
|
|
680
680
|
let r = e._zod.bag;
|
|
681
|
-
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern =
|
|
681
|
+
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Gt);
|
|
682
682
|
}), e._zod.check = (o) => {
|
|
683
683
|
let s = o.value;
|
|
684
684
|
if (n) {
|
|
@@ -734,9 +734,9 @@ var Gt = (e) => {
|
|
|
734
734
|
continue: !t.abort
|
|
735
735
|
});
|
|
736
736
|
};
|
|
737
|
-
}),
|
|
737
|
+
}), nn = /*@__PURE__*/ E("$ZodCheckMaxLength", (e, t) => {
|
|
738
738
|
var n;
|
|
739
|
-
|
|
739
|
+
I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
740
740
|
let t = e.value;
|
|
741
741
|
return !Oe(t) && t.length !== void 0;
|
|
742
742
|
}), e._zod.onattach.push((e) => {
|
|
@@ -745,7 +745,7 @@ var Gt = (e) => {
|
|
|
745
745
|
}), e._zod.check = (n) => {
|
|
746
746
|
let r = n.value;
|
|
747
747
|
if (r.length <= t.maximum) return;
|
|
748
|
-
let i =
|
|
748
|
+
let i = Qe(r);
|
|
749
749
|
n.issues.push({
|
|
750
750
|
origin: i,
|
|
751
751
|
code: "too_big",
|
|
@@ -756,9 +756,9 @@ var Gt = (e) => {
|
|
|
756
756
|
continue: !t.abort
|
|
757
757
|
});
|
|
758
758
|
};
|
|
759
|
-
}),
|
|
759
|
+
}), rn = /*@__PURE__*/ E("$ZodCheckMinLength", (e, t) => {
|
|
760
760
|
var n;
|
|
761
|
-
|
|
761
|
+
I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
762
762
|
let t = e.value;
|
|
763
763
|
return !Oe(t) && t.length !== void 0;
|
|
764
764
|
}), e._zod.onattach.push((e) => {
|
|
@@ -767,7 +767,7 @@ var Gt = (e) => {
|
|
|
767
767
|
}), e._zod.check = (n) => {
|
|
768
768
|
let r = n.value;
|
|
769
769
|
if (r.length >= t.minimum) return;
|
|
770
|
-
let i =
|
|
770
|
+
let i = Qe(r);
|
|
771
771
|
n.issues.push({
|
|
772
772
|
origin: i,
|
|
773
773
|
code: "too_small",
|
|
@@ -778,9 +778,9 @@ var Gt = (e) => {
|
|
|
778
778
|
continue: !t.abort
|
|
779
779
|
});
|
|
780
780
|
};
|
|
781
|
-
}),
|
|
781
|
+
}), an = /*@__PURE__*/ E("$ZodCheckLengthEquals", (e, t) => {
|
|
782
782
|
var n;
|
|
783
|
-
|
|
783
|
+
I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
784
784
|
let t = e.value;
|
|
785
785
|
return !Oe(t) && t.length !== void 0;
|
|
786
786
|
}), e._zod.onattach.push((e) => {
|
|
@@ -789,7 +789,7 @@ var Gt = (e) => {
|
|
|
789
789
|
}), e._zod.check = (n) => {
|
|
790
790
|
let r = n.value, i = r.length;
|
|
791
791
|
if (i === t.length) return;
|
|
792
|
-
let a =
|
|
792
|
+
let a = Qe(r), o = i > t.length;
|
|
793
793
|
n.issues.push({
|
|
794
794
|
origin: a,
|
|
795
795
|
...o ? {
|
|
@@ -806,9 +806,9 @@ var Gt = (e) => {
|
|
|
806
806
|
continue: !t.abort
|
|
807
807
|
});
|
|
808
808
|
};
|
|
809
|
-
}),
|
|
809
|
+
}), on = /*@__PURE__*/ E("$ZodCheckStringFormat", (e, t) => {
|
|
810
810
|
var n, r;
|
|
811
|
-
|
|
811
|
+
I.init(e, t), e._zod.onattach.push((e) => {
|
|
812
812
|
let n = e._zod.bag;
|
|
813
813
|
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
814
814
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
@@ -822,8 +822,8 @@ var Gt = (e) => {
|
|
|
822
822
|
continue: !t.abort
|
|
823
823
|
});
|
|
824
824
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
825
|
-
}),
|
|
826
|
-
|
|
825
|
+
}), sn = /*@__PURE__*/ E("$ZodCheckRegex", (e, t) => {
|
|
826
|
+
on.init(e, t), e._zod.check = (n) => {
|
|
827
827
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
828
828
|
origin: "string",
|
|
829
829
|
code: "invalid_format",
|
|
@@ -834,12 +834,12 @@ var Gt = (e) => {
|
|
|
834
834
|
continue: !t.abort
|
|
835
835
|
});
|
|
836
836
|
};
|
|
837
|
-
}),
|
|
838
|
-
t.pattern ??=
|
|
839
|
-
}),
|
|
840
|
-
t.pattern ??=
|
|
841
|
-
}),
|
|
842
|
-
|
|
837
|
+
}), cn = /*@__PURE__*/ E("$ZodCheckLowerCase", (e, t) => {
|
|
838
|
+
t.pattern ??= Yt, on.init(e, t);
|
|
839
|
+
}), ln = /*@__PURE__*/ E("$ZodCheckUpperCase", (e, t) => {
|
|
840
|
+
t.pattern ??= Xt, on.init(e, t);
|
|
841
|
+
}), un = /*@__PURE__*/ E("$ZodCheckIncludes", (e, t) => {
|
|
842
|
+
I.init(e, t);
|
|
843
843
|
let n = Be(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
844
844
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
845
845
|
let t = e._zod.bag;
|
|
@@ -855,8 +855,8 @@ var Gt = (e) => {
|
|
|
855
855
|
continue: !t.abort
|
|
856
856
|
});
|
|
857
857
|
};
|
|
858
|
-
}),
|
|
859
|
-
|
|
858
|
+
}), dn = /*@__PURE__*/ E("$ZodCheckStartsWith", (e, t) => {
|
|
859
|
+
I.init(e, t);
|
|
860
860
|
let n = RegExp(`^${Be(t.prefix)}.*`);
|
|
861
861
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
862
862
|
let t = e._zod.bag;
|
|
@@ -872,8 +872,8 @@ var Gt = (e) => {
|
|
|
872
872
|
continue: !t.abort
|
|
873
873
|
});
|
|
874
874
|
};
|
|
875
|
-
}),
|
|
876
|
-
|
|
875
|
+
}), fn = /*@__PURE__*/ E("$ZodCheckEndsWith", (e, t) => {
|
|
876
|
+
I.init(e, t);
|
|
877
877
|
let n = RegExp(`.*${Be(t.suffix)}$`);
|
|
878
878
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
879
879
|
let t = e._zod.bag;
|
|
@@ -889,11 +889,11 @@ var Gt = (e) => {
|
|
|
889
889
|
continue: !t.abort
|
|
890
890
|
});
|
|
891
891
|
};
|
|
892
|
-
}),
|
|
893
|
-
|
|
892
|
+
}), pn = /*@__PURE__*/ E("$ZodCheckOverwrite", (e, t) => {
|
|
893
|
+
I.init(e, t), e._zod.check = (e) => {
|
|
894
894
|
e.value = t.tx(e.value);
|
|
895
895
|
};
|
|
896
|
-
}),
|
|
896
|
+
}), mn = class {
|
|
897
897
|
constructor(e = []) {
|
|
898
898
|
this.content = [], this.indent = 0, this && (this.args = e);
|
|
899
899
|
}
|
|
@@ -912,13 +912,13 @@ var Gt = (e) => {
|
|
|
912
912
|
let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
|
|
913
913
|
return new e(...t, n.join("\n"));
|
|
914
914
|
}
|
|
915
|
-
},
|
|
915
|
+
}, hn = {
|
|
916
916
|
major: 4,
|
|
917
917
|
minor: 4,
|
|
918
918
|
patch: 3
|
|
919
|
-
},
|
|
919
|
+
}, L = /*@__PURE__*/ E("$ZodType", (e, t) => {
|
|
920
920
|
var n;
|
|
921
|
-
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
921
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = hn;
|
|
922
922
|
let r = [...e._zod.def.checks ?? []];
|
|
923
923
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
924
924
|
for (let t of r) for (let n of t._zod.onattach) n(e);
|
|
@@ -975,17 +975,17 @@ var Gt = (e) => {
|
|
|
975
975
|
O(e, "~standard", () => ({
|
|
976
976
|
validate: (t) => {
|
|
977
977
|
try {
|
|
978
|
-
let n =
|
|
978
|
+
let n = ct(e, t);
|
|
979
979
|
return n.success ? { value: n.data } : { issues: n.error?.issues };
|
|
980
980
|
} catch {
|
|
981
|
-
return
|
|
981
|
+
return ut(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
|
|
982
982
|
}
|
|
983
983
|
},
|
|
984
984
|
vendor: "zod",
|
|
985
985
|
version: 1
|
|
986
986
|
}));
|
|
987
|
-
}),
|
|
988
|
-
|
|
987
|
+
}), gn = /*@__PURE__*/ E("$ZodString", (e, t) => {
|
|
988
|
+
L.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Wt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
989
989
|
if (t.coerce) try {
|
|
990
990
|
n.value = String(n.value);
|
|
991
991
|
} catch {}
|
|
@@ -996,11 +996,11 @@ var Gt = (e) => {
|
|
|
996
996
|
inst: e
|
|
997
997
|
}), n;
|
|
998
998
|
};
|
|
999
|
-
}),
|
|
1000
|
-
|
|
1001
|
-
}),
|
|
1002
|
-
t.pattern ??=
|
|
1003
|
-
}),
|
|
999
|
+
}), R = /*@__PURE__*/ E("$ZodStringFormat", (e, t) => {
|
|
1000
|
+
on.init(e, t), gn.init(e, t);
|
|
1001
|
+
}), _n = /*@__PURE__*/ E("$ZodGUID", (e, t) => {
|
|
1002
|
+
t.pattern ??= Et, R.init(e, t);
|
|
1003
|
+
}), vn = /*@__PURE__*/ E("$ZodUUID", (e, t) => {
|
|
1004
1004
|
if (t.version) {
|
|
1005
1005
|
let e = {
|
|
1006
1006
|
v1: 1,
|
|
@@ -1013,16 +1013,16 @@ var Gt = (e) => {
|
|
|
1013
1013
|
v8: 8
|
|
1014
1014
|
}[t.version];
|
|
1015
1015
|
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
1016
|
-
t.pattern ??=
|
|
1017
|
-
} else t.pattern ??=
|
|
1018
|
-
|
|
1019
|
-
}),
|
|
1020
|
-
t.pattern ??=
|
|
1021
|
-
}),
|
|
1022
|
-
|
|
1016
|
+
t.pattern ??= Dt(e);
|
|
1017
|
+
} else t.pattern ??= Dt();
|
|
1018
|
+
R.init(e, t);
|
|
1019
|
+
}), yn = /*@__PURE__*/ E("$ZodEmail", (e, t) => {
|
|
1020
|
+
t.pattern ??= Ot, R.init(e, t);
|
|
1021
|
+
}), bn = /*@__PURE__*/ E("$ZodURL", (e, t) => {
|
|
1022
|
+
R.init(e, t), e._zod.check = (n) => {
|
|
1023
1023
|
try {
|
|
1024
1024
|
let r = n.value.trim();
|
|
1025
|
-
if (!t.normalize && t.protocol?.source ===
|
|
1025
|
+
if (!t.normalize && t.protocol?.source === Lt.source && !/^https?:\/\//i.test(r)) {
|
|
1026
1026
|
n.issues.push({
|
|
1027
1027
|
code: "invalid_format",
|
|
1028
1028
|
format: "url",
|
|
@@ -1062,32 +1062,32 @@ var Gt = (e) => {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
};
|
|
1065
|
-
}),
|
|
1066
|
-
t.pattern ??=
|
|
1067
|
-
}),
|
|
1068
|
-
t.pattern ??=
|
|
1069
|
-
}),
|
|
1070
|
-
t.pattern ??=
|
|
1071
|
-
}),
|
|
1072
|
-
t.pattern ??=
|
|
1073
|
-
}),
|
|
1074
|
-
t.pattern ??=
|
|
1075
|
-
}),
|
|
1076
|
-
t.pattern ??=
|
|
1077
|
-
}),
|
|
1078
|
-
t.pattern ??=
|
|
1079
|
-
}),
|
|
1080
|
-
t.pattern ??=
|
|
1081
|
-
}),
|
|
1082
|
-
t.pattern ??=
|
|
1083
|
-
}),
|
|
1084
|
-
t.pattern ??=
|
|
1085
|
-
}),
|
|
1086
|
-
t.pattern ??=
|
|
1087
|
-
}),
|
|
1088
|
-
t.pattern ??=
|
|
1089
|
-
}),
|
|
1090
|
-
t.pattern ??=
|
|
1065
|
+
}), xn = /*@__PURE__*/ E("$ZodEmoji", (e, t) => {
|
|
1066
|
+
t.pattern ??= At(), R.init(e, t);
|
|
1067
|
+
}), Sn = /*@__PURE__*/ E("$ZodNanoID", (e, t) => {
|
|
1068
|
+
t.pattern ??= wt, R.init(e, t);
|
|
1069
|
+
}), Cn = /*@__PURE__*/ E("$ZodCUID", (e, t) => {
|
|
1070
|
+
t.pattern ??= yt, R.init(e, t);
|
|
1071
|
+
}), wn = /*@__PURE__*/ E("$ZodCUID2", (e, t) => {
|
|
1072
|
+
t.pattern ??= bt, R.init(e, t);
|
|
1073
|
+
}), Tn = /*@__PURE__*/ E("$ZodULID", (e, t) => {
|
|
1074
|
+
t.pattern ??= xt, R.init(e, t);
|
|
1075
|
+
}), En = /*@__PURE__*/ E("$ZodXID", (e, t) => {
|
|
1076
|
+
t.pattern ??= St, R.init(e, t);
|
|
1077
|
+
}), Dn = /*@__PURE__*/ E("$ZodKSUID", (e, t) => {
|
|
1078
|
+
t.pattern ??= Ct, R.init(e, t);
|
|
1079
|
+
}), On = /*@__PURE__*/ E("$ZodISODateTime", (e, t) => {
|
|
1080
|
+
t.pattern ??= Ut(t), R.init(e, t);
|
|
1081
|
+
}), kn = /*@__PURE__*/ E("$ZodISODate", (e, t) => {
|
|
1082
|
+
t.pattern ??= Bt, R.init(e, t);
|
|
1083
|
+
}), An = /*@__PURE__*/ E("$ZodISOTime", (e, t) => {
|
|
1084
|
+
t.pattern ??= Ht(t), R.init(e, t);
|
|
1085
|
+
}), jn = /*@__PURE__*/ E("$ZodISODuration", (e, t) => {
|
|
1086
|
+
t.pattern ??= Tt, R.init(e, t);
|
|
1087
|
+
}), Mn = /*@__PURE__*/ E("$ZodIPv4", (e, t) => {
|
|
1088
|
+
t.pattern ??= jt, R.init(e, t), e._zod.bag.format = "ipv4";
|
|
1089
|
+
}), Nn = /*@__PURE__*/ E("$ZodIPv6", (e, t) => {
|
|
1090
|
+
t.pattern ??= Mt, R.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1091
1091
|
try {
|
|
1092
1092
|
new URL(`http://[${n.value}]`);
|
|
1093
1093
|
} catch {
|
|
@@ -1100,10 +1100,10 @@ var Gt = (e) => {
|
|
|
1100
1100
|
});
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
|
-
}),
|
|
1104
|
-
t.pattern ??=
|
|
1105
|
-
}),
|
|
1106
|
-
t.pattern ??=
|
|
1103
|
+
}), Pn = /*@__PURE__*/ E("$ZodCIDRv4", (e, t) => {
|
|
1104
|
+
t.pattern ??= Nt, R.init(e, t);
|
|
1105
|
+
}), Fn = /*@__PURE__*/ E("$ZodCIDRv6", (e, t) => {
|
|
1106
|
+
t.pattern ??= Pt, R.init(e, t), e._zod.check = (n) => {
|
|
1107
1107
|
let r = n.value.split("/");
|
|
1108
1108
|
try {
|
|
1109
1109
|
if (r.length !== 2) throw Error();
|
|
@@ -1123,7 +1123,7 @@ var Gt = (e) => {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
};
|
|
1125
1125
|
});
|
|
1126
|
-
function
|
|
1126
|
+
function In(e) {
|
|
1127
1127
|
if (e === "") return !0;
|
|
1128
1128
|
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
1129
1129
|
try {
|
|
@@ -1132,9 +1132,9 @@ function Ln(e) {
|
|
|
1132
1132
|
return !1;
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
-
var
|
|
1136
|
-
t.pattern ??=
|
|
1137
|
-
|
|
1135
|
+
var Ln = /*@__PURE__*/ E("$ZodBase64", (e, t) => {
|
|
1136
|
+
t.pattern ??= Ft, R.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1137
|
+
In(n.value) || n.issues.push({
|
|
1138
1138
|
code: "invalid_format",
|
|
1139
1139
|
format: "base64",
|
|
1140
1140
|
input: n.value,
|
|
@@ -1143,14 +1143,14 @@ var Rn = /*@__PURE__*/ E("$ZodBase64", (e, t) => {
|
|
|
1143
1143
|
});
|
|
1144
1144
|
};
|
|
1145
1145
|
});
|
|
1146
|
-
function
|
|
1147
|
-
if (!
|
|
1146
|
+
function Rn(e) {
|
|
1147
|
+
if (!It.test(e)) return !1;
|
|
1148
1148
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1149
|
-
return
|
|
1149
|
+
return In(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1150
1150
|
}
|
|
1151
|
-
var
|
|
1152
|
-
t.pattern ??=
|
|
1153
|
-
|
|
1151
|
+
var zn = /*@__PURE__*/ E("$ZodBase64URL", (e, t) => {
|
|
1152
|
+
t.pattern ??= It, R.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1153
|
+
Rn(n.value) || n.issues.push({
|
|
1154
1154
|
code: "invalid_format",
|
|
1155
1155
|
format: "base64url",
|
|
1156
1156
|
input: n.value,
|
|
@@ -1158,10 +1158,10 @@ var Bn = /*@__PURE__*/ E("$ZodBase64URL", (e, t) => {
|
|
|
1158
1158
|
continue: !t.abort
|
|
1159
1159
|
});
|
|
1160
1160
|
};
|
|
1161
|
-
}),
|
|
1162
|
-
t.pattern ??=
|
|
1161
|
+
}), Bn = /*@__PURE__*/ E("$ZodE164", (e, t) => {
|
|
1162
|
+
t.pattern ??= Rt, R.init(e, t);
|
|
1163
1163
|
});
|
|
1164
|
-
function
|
|
1164
|
+
function Vn(e, t = null) {
|
|
1165
1165
|
try {
|
|
1166
1166
|
let n = e.split(".");
|
|
1167
1167
|
if (n.length !== 3) return !1;
|
|
@@ -1173,9 +1173,9 @@ function Hn(e, t = null) {
|
|
|
1173
1173
|
return !1;
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1178
|
-
|
|
1176
|
+
var Hn = /*@__PURE__*/ E("$ZodJWT", (e, t) => {
|
|
1177
|
+
R.init(e, t), e._zod.check = (n) => {
|
|
1178
|
+
Vn(n.value, t.alg) || n.issues.push({
|
|
1179
1179
|
code: "invalid_format",
|
|
1180
1180
|
format: "jwt",
|
|
1181
1181
|
input: n.value,
|
|
@@ -1183,8 +1183,8 @@ var Un = /*@__PURE__*/ E("$ZodJWT", (e, t) => {
|
|
|
1183
1183
|
continue: !t.abort
|
|
1184
1184
|
});
|
|
1185
1185
|
};
|
|
1186
|
-
}),
|
|
1187
|
-
|
|
1186
|
+
}), Un = /*@__PURE__*/ E("$ZodNumber", (e, t) => {
|
|
1187
|
+
L.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Kt, e._zod.parse = (n, r) => {
|
|
1188
1188
|
if (t.coerce) try {
|
|
1189
1189
|
n.value = Number(n.value);
|
|
1190
1190
|
} catch {}
|
|
@@ -1199,10 +1199,10 @@ var Un = /*@__PURE__*/ E("$ZodJWT", (e, t) => {
|
|
|
1199
1199
|
...a ? { received: a } : {}
|
|
1200
1200
|
}), n;
|
|
1201
1201
|
};
|
|
1202
|
-
}),
|
|
1203
|
-
|
|
1204
|
-
}),
|
|
1205
|
-
|
|
1202
|
+
}), Wn = /*@__PURE__*/ E("$ZodNumberFormat", (e, t) => {
|
|
1203
|
+
tn.init(e, t), Un.init(e, t);
|
|
1204
|
+
}), Gn = /*@__PURE__*/ E("$ZodBoolean", (e, t) => {
|
|
1205
|
+
L.init(e, t), e._zod.pattern = qt, e._zod.parse = (n, r) => {
|
|
1206
1206
|
if (t.coerce) try {
|
|
1207
1207
|
n.value = !!n.value;
|
|
1208
1208
|
} catch {}
|
|
@@ -1214,8 +1214,8 @@ var Un = /*@__PURE__*/ E("$ZodJWT", (e, t) => {
|
|
|
1214
1214
|
inst: e
|
|
1215
1215
|
}), n;
|
|
1216
1216
|
};
|
|
1217
|
-
}),
|
|
1218
|
-
|
|
1217
|
+
}), Kn = /*@__PURE__*/ E("$ZodNull", (e, t) => {
|
|
1218
|
+
L.init(e, t), e._zod.pattern = Jt, e._zod.values = new Set([null]), e._zod.parse = (t, n) => {
|
|
1219
1219
|
let r = t.value;
|
|
1220
1220
|
return r === null || t.issues.push({
|
|
1221
1221
|
expected: "null",
|
|
@@ -1224,21 +1224,21 @@ var Un = /*@__PURE__*/ E("$ZodJWT", (e, t) => {
|
|
|
1224
1224
|
inst: e
|
|
1225
1225
|
}), t;
|
|
1226
1226
|
};
|
|
1227
|
-
}),
|
|
1228
|
-
|
|
1229
|
-
}),
|
|
1230
|
-
|
|
1227
|
+
}), qn = /*@__PURE__*/ E("$ZodUnknown", (e, t) => {
|
|
1228
|
+
L.init(e, t), e._zod.parse = (e) => e;
|
|
1229
|
+
}), Jn = /*@__PURE__*/ E("$ZodNever", (e, t) => {
|
|
1230
|
+
L.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1231
1231
|
expected: "never",
|
|
1232
1232
|
code: "invalid_type",
|
|
1233
1233
|
input: t.value,
|
|
1234
1234
|
inst: e
|
|
1235
1235
|
}), t);
|
|
1236
1236
|
});
|
|
1237
|
-
function
|
|
1238
|
-
e.issues.length && t.issues.push(...
|
|
1237
|
+
function Yn(e, t, n) {
|
|
1238
|
+
e.issues.length && t.issues.push(...P(n, e.issues)), t.value[n] = e.value;
|
|
1239
1239
|
}
|
|
1240
|
-
var
|
|
1241
|
-
|
|
1240
|
+
var Xn = /*@__PURE__*/ E("$ZodArray", (e, t) => {
|
|
1241
|
+
L.init(e, t), e._zod.parse = (n, r) => {
|
|
1242
1242
|
let i = n.value;
|
|
1243
1243
|
if (!Array.isArray(i)) return n.issues.push({
|
|
1244
1244
|
expected: "array",
|
|
@@ -1253,16 +1253,16 @@ var Zn = /*@__PURE__*/ E("$ZodArray", (e, t) => {
|
|
|
1253
1253
|
value: o,
|
|
1254
1254
|
issues: []
|
|
1255
1255
|
}, r);
|
|
1256
|
-
s instanceof Promise ? a.push(s.then((t) =>
|
|
1256
|
+
s instanceof Promise ? a.push(s.then((t) => Yn(t, n, e))) : Yn(s, n, e);
|
|
1257
1257
|
}
|
|
1258
1258
|
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1259
1259
|
};
|
|
1260
1260
|
});
|
|
1261
|
-
function
|
|
1261
|
+
function Zn(e, t, n, r, i, a) {
|
|
1262
1262
|
let o = n in r;
|
|
1263
1263
|
if (e.issues.length) {
|
|
1264
1264
|
if (i && a && !o) return;
|
|
1265
|
-
t.issues.push(...
|
|
1265
|
+
t.issues.push(...P(n, e.issues));
|
|
1266
1266
|
}
|
|
1267
1267
|
if (!o && !i) {
|
|
1268
1268
|
e.issues.length || t.issues.push({
|
|
@@ -1275,7 +1275,7 @@ function Qn(e, t, n, r, i, a) {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Qn(e) {
|
|
1279
1279
|
let t = Object.keys(e.shape);
|
|
1280
1280
|
for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
|
|
1281
1281
|
let n = Ve(e.shape);
|
|
@@ -1287,7 +1287,7 @@ function $n(e) {
|
|
|
1287
1287
|
optionalKeys: new Set(n)
|
|
1288
1288
|
};
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function $n(e, t, n, r, i, a) {
|
|
1291
1291
|
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
|
|
1292
1292
|
for (let i in t) {
|
|
1293
1293
|
if (i === "__proto__" || s.has(i)) continue;
|
|
@@ -1299,7 +1299,7 @@ function er(e, t, n, r, i, a) {
|
|
|
1299
1299
|
value: t[i],
|
|
1300
1300
|
issues: []
|
|
1301
1301
|
}, r);
|
|
1302
|
-
a instanceof Promise ? e.push(a.then((e) =>
|
|
1302
|
+
a instanceof Promise ? e.push(a.then((e) => Zn(e, n, i, t, u, d))) : Zn(a, n, i, t, u, d);
|
|
1303
1303
|
}
|
|
1304
1304
|
return o.length && n.issues.push({
|
|
1305
1305
|
code: "unrecognized_keys",
|
|
@@ -1308,15 +1308,15 @@ function er(e, t, n, r, i, a) {
|
|
|
1308
1308
|
inst: a
|
|
1309
1309
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1310
1310
|
}
|
|
1311
|
-
var
|
|
1312
|
-
if (
|
|
1311
|
+
var er = /*@__PURE__*/ E("$ZodObject", (e, t) => {
|
|
1312
|
+
if (L.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1313
1313
|
let e = t.shape;
|
|
1314
1314
|
Object.defineProperty(t, "shape", { get: () => {
|
|
1315
1315
|
let n = { ...e };
|
|
1316
1316
|
return Object.defineProperty(t, "shape", { value: n }), n;
|
|
1317
1317
|
} });
|
|
1318
1318
|
}
|
|
1319
|
-
let n = De(() =>
|
|
1319
|
+
let n = De(() => Qn(t));
|
|
1320
1320
|
O(e._zod, "propValues", () => {
|
|
1321
1321
|
let e = t.shape, n = {};
|
|
1322
1322
|
for (let t in e) {
|
|
@@ -1345,14 +1345,14 @@ var tr = /*@__PURE__*/ E("$ZodObject", (e, t) => {
|
|
|
1345
1345
|
value: s[e],
|
|
1346
1346
|
issues: []
|
|
1347
1347
|
}, o);
|
|
1348
|
-
a instanceof Promise ? c.push(a.then((n) =>
|
|
1348
|
+
a instanceof Promise ? c.push(a.then((n) => Zn(n, t, e, s, r, i))) : Zn(a, t, e, s, r, i);
|
|
1349
1349
|
}
|
|
1350
|
-
return i ?
|
|
1350
|
+
return i ? $n(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1351
1351
|
};
|
|
1352
|
-
}),
|
|
1353
|
-
|
|
1354
|
-
let n = e._zod.parse, r = De(() =>
|
|
1355
|
-
let t = new
|
|
1352
|
+
}), tr = /*@__PURE__*/ E("$ZodObjectJIT", (e, t) => {
|
|
1353
|
+
er.init(e, t);
|
|
1354
|
+
let n = e._zod.parse, r = De(() => Qn(t)), i = (e) => {
|
|
1355
|
+
let t = new mn([
|
|
1356
1356
|
"shape",
|
|
1357
1357
|
"payload",
|
|
1358
1358
|
"ctx"
|
|
@@ -1434,7 +1434,7 @@ var tr = /*@__PURE__*/ E("$ZodObject", (e, t) => {
|
|
|
1434
1434
|
e._zod.parse = (d, f) => {
|
|
1435
1435
|
u ??= r.value;
|
|
1436
1436
|
let p = d.value;
|
|
1437
|
-
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ?
|
|
1437
|
+
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? $n([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
|
|
1438
1438
|
expected: "object",
|
|
1439
1439
|
code: "invalid_type",
|
|
1440
1440
|
input: p,
|
|
@@ -1442,18 +1442,18 @@ var tr = /*@__PURE__*/ E("$ZodObject", (e, t) => {
|
|
|
1442
1442
|
}), d);
|
|
1443
1443
|
};
|
|
1444
1444
|
});
|
|
1445
|
-
function
|
|
1445
|
+
function nr(e, t, n, r) {
|
|
1446
1446
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1447
1447
|
let i = e.filter((e) => !N(e));
|
|
1448
1448
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1449
1449
|
code: "invalid_union",
|
|
1450
1450
|
input: t.value,
|
|
1451
1451
|
inst: n,
|
|
1452
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1452
|
+
errors: e.map((e) => e.issues.map((e) => F(e, r, D())))
|
|
1453
1453
|
}), t);
|
|
1454
1454
|
}
|
|
1455
|
-
var
|
|
1456
|
-
|
|
1455
|
+
var rr = /*@__PURE__*/ E("$ZodUnion", (e, t) => {
|
|
1456
|
+
L.init(e, t), O(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), O(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), O(e._zod, "values", () => {
|
|
1457
1457
|
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1458
1458
|
}), O(e._zod, "pattern", () => {
|
|
1459
1459
|
if (t.options.every((e) => e._zod.pattern)) {
|
|
@@ -1476,10 +1476,10 @@ var ir = /*@__PURE__*/ E("$ZodUnion", (e, t) => {
|
|
|
1476
1476
|
o.push(t);
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
return a ? Promise.all(o).then((t) =>
|
|
1479
|
+
return a ? Promise.all(o).then((t) => nr(t, r, e, i)) : nr(o, r, e, i);
|
|
1480
1480
|
};
|
|
1481
|
-
}),
|
|
1482
|
-
|
|
1481
|
+
}), ir = /*@__PURE__*/ E("$ZodIntersection", (e, t) => {
|
|
1482
|
+
L.init(e, t), e._zod.parse = (e, n) => {
|
|
1483
1483
|
let r = e.value, i = t.left._zod.run({
|
|
1484
1484
|
value: r,
|
|
1485
1485
|
issues: []
|
|
@@ -1487,10 +1487,10 @@ var ir = /*@__PURE__*/ E("$ZodUnion", (e, t) => {
|
|
|
1487
1487
|
value: r,
|
|
1488
1488
|
issues: []
|
|
1489
1489
|
}, n);
|
|
1490
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) =>
|
|
1490
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => or(e, t, n)) : or(e, i, a);
|
|
1491
1491
|
};
|
|
1492
1492
|
});
|
|
1493
|
-
function
|
|
1493
|
+
function ar(e, t) {
|
|
1494
1494
|
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1495
1495
|
valid: !0,
|
|
1496
1496
|
data: e
|
|
@@ -1501,7 +1501,7 @@ function or(e, t) {
|
|
|
1501
1501
|
...t
|
|
1502
1502
|
};
|
|
1503
1503
|
for (let n of r) {
|
|
1504
|
-
let r =
|
|
1504
|
+
let r = ar(e[n], t[n]);
|
|
1505
1505
|
if (!r.valid) return {
|
|
1506
1506
|
valid: !1,
|
|
1507
1507
|
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
@@ -1520,7 +1520,7 @@ function or(e, t) {
|
|
|
1520
1520
|
};
|
|
1521
1521
|
let n = [];
|
|
1522
1522
|
for (let r = 0; r < e.length; r++) {
|
|
1523
|
-
let i = e[r], a = t[r], o =
|
|
1523
|
+
let i = e[r], a = t[r], o = ar(i, a);
|
|
1524
1524
|
if (!o.valid) return {
|
|
1525
1525
|
valid: !1,
|
|
1526
1526
|
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
@@ -1537,7 +1537,7 @@ function or(e, t) {
|
|
|
1537
1537
|
mergeErrorPath: []
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function or(e, t, n) {
|
|
1541
1541
|
let r = /* @__PURE__ */ new Map(), i;
|
|
1542
1542
|
for (let n of t.issues) if (n.code === "unrecognized_keys") {
|
|
1543
1543
|
i ??= n;
|
|
@@ -1550,12 +1550,12 @@ function sr(e, t, n) {
|
|
|
1550
1550
|
...i,
|
|
1551
1551
|
keys: a
|
|
1552
1552
|
}), N(e)) return e;
|
|
1553
|
-
let o =
|
|
1553
|
+
let o = ar(t.value, n.value);
|
|
1554
1554
|
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1555
1555
|
return e.value = o.data, e;
|
|
1556
1556
|
}
|
|
1557
|
-
var
|
|
1558
|
-
|
|
1557
|
+
var sr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
1558
|
+
L.init(e, t), e._zod.parse = (n, r) => {
|
|
1559
1559
|
let i = n.value;
|
|
1560
1560
|
if (!Le(i)) return n.issues.push({
|
|
1561
1561
|
expected: "record",
|
|
@@ -1578,7 +1578,7 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1578
1578
|
n.issues.push({
|
|
1579
1579
|
code: "invalid_key",
|
|
1580
1580
|
origin: "record",
|
|
1581
|
-
issues: o.issues.map((e) =>
|
|
1581
|
+
issues: o.issues.map((e) => F(e, r, D())),
|
|
1582
1582
|
input: c,
|
|
1583
1583
|
path: [c],
|
|
1584
1584
|
inst: e
|
|
@@ -1590,8 +1590,8 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1590
1590
|
issues: []
|
|
1591
1591
|
}, r);
|
|
1592
1592
|
u instanceof Promise ? a.push(u.then((e) => {
|
|
1593
|
-
e.issues.length && n.issues.push(...
|
|
1594
|
-
})) : (u.issues.length && n.issues.push(...
|
|
1593
|
+
e.issues.length && n.issues.push(...P(c, e.issues)), n.value[l] = e.value;
|
|
1594
|
+
})) : (u.issues.length && n.issues.push(...P(c, u.issues)), n.value[l] = u.value);
|
|
1595
1595
|
}
|
|
1596
1596
|
let c;
|
|
1597
1597
|
for (let e in i) s.has(e) || (c ??= [], c.push(e));
|
|
@@ -1610,7 +1610,7 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1610
1610
|
issues: []
|
|
1611
1611
|
}, r);
|
|
1612
1612
|
if (s instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1613
|
-
if (typeof o == "string" &&
|
|
1613
|
+
if (typeof o == "string" && Kt.test(o) && s.issues.length) {
|
|
1614
1614
|
let e = t.keyType._zod.run({
|
|
1615
1615
|
value: Number(o),
|
|
1616
1616
|
issues: []
|
|
@@ -1622,7 +1622,7 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1622
1622
|
t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
|
|
1623
1623
|
code: "invalid_key",
|
|
1624
1624
|
origin: "record",
|
|
1625
|
-
issues: s.issues.map((e) =>
|
|
1625
|
+
issues: s.issues.map((e) => F(e, r, D())),
|
|
1626
1626
|
input: o,
|
|
1627
1627
|
path: [o],
|
|
1628
1628
|
inst: e
|
|
@@ -1634,14 +1634,14 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1634
1634
|
issues: []
|
|
1635
1635
|
}, r);
|
|
1636
1636
|
c instanceof Promise ? a.push(c.then((e) => {
|
|
1637
|
-
e.issues.length && n.issues.push(...
|
|
1638
|
-
})) : (c.issues.length && n.issues.push(...
|
|
1637
|
+
e.issues.length && n.issues.push(...P(o, e.issues)), n.value[s.value] = e.value;
|
|
1638
|
+
})) : (c.issues.length && n.issues.push(...P(o, c.issues)), n.value[s.value] = c.value);
|
|
1639
1639
|
}
|
|
1640
1640
|
}
|
|
1641
1641
|
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1642
1642
|
};
|
|
1643
|
-
}),
|
|
1644
|
-
|
|
1643
|
+
}), cr = /*@__PURE__*/ E("$ZodEnum", (e, t) => {
|
|
1644
|
+
L.init(e, t);
|
|
1645
1645
|
let n = Te(t.entries), r = new Set(n);
|
|
1646
1646
|
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ze.has(typeof e)).map((e) => typeof e == "string" ? Be(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1647
1647
|
let a = t.value;
|
|
@@ -1652,8 +1652,8 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1652
1652
|
inst: e
|
|
1653
1653
|
}), t;
|
|
1654
1654
|
};
|
|
1655
|
-
}),
|
|
1656
|
-
if (
|
|
1655
|
+
}), lr = /*@__PURE__*/ E("$ZodLiteral", (e, t) => {
|
|
1656
|
+
if (L.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
|
|
1657
1657
|
let n = new Set(t.values);
|
|
1658
1658
|
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? Be(e) : e ? Be(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
|
|
1659
1659
|
let a = r.value;
|
|
@@ -1664,8 +1664,8 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1664
1664
|
inst: e
|
|
1665
1665
|
}), r;
|
|
1666
1666
|
};
|
|
1667
|
-
}),
|
|
1668
|
-
|
|
1667
|
+
}), ur = /*@__PURE__*/ E("$ZodTransform", (e, t) => {
|
|
1668
|
+
L.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
|
|
1669
1669
|
if (r.direction === "backward") throw new Ce(e.constructor.name);
|
|
1670
1670
|
let i = t.transform(n.value, n);
|
|
1671
1671
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
|
|
@@ -1673,53 +1673,53 @@ var cr = /*@__PURE__*/ E("$ZodRecord", (e, t) => {
|
|
|
1673
1673
|
return n.value = i, n.fallback = !0, n;
|
|
1674
1674
|
};
|
|
1675
1675
|
});
|
|
1676
|
-
function
|
|
1676
|
+
function dr(e, t) {
|
|
1677
1677
|
return t === void 0 && (e.issues.length || e.fallback) ? {
|
|
1678
1678
|
issues: [],
|
|
1679
1679
|
value: void 0
|
|
1680
1680
|
} : e;
|
|
1681
1681
|
}
|
|
1682
|
-
var
|
|
1683
|
-
|
|
1682
|
+
var fr = /*@__PURE__*/ E("$ZodOptional", (e, t) => {
|
|
1683
|
+
L.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", O(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), O(e._zod, "pattern", () => {
|
|
1684
1684
|
let e = t.innerType._zod.pattern;
|
|
1685
1685
|
return e ? RegExp(`^(${ke(e.source)})?$`) : void 0;
|
|
1686
1686
|
}), e._zod.parse = (e, n) => {
|
|
1687
1687
|
if (t.innerType._zod.optin === "optional") {
|
|
1688
1688
|
let r = e.value, i = t.innerType._zod.run(e, n);
|
|
1689
|
-
return i instanceof Promise ? i.then((e) =>
|
|
1689
|
+
return i instanceof Promise ? i.then((e) => dr(e, r)) : dr(i, r);
|
|
1690
1690
|
}
|
|
1691
1691
|
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1692
1692
|
};
|
|
1693
|
-
}),
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1696
|
-
|
|
1693
|
+
}), pr = /*@__PURE__*/ E("$ZodExactOptional", (e, t) => {
|
|
1694
|
+
fr.init(e, t), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1695
|
+
}), mr = /*@__PURE__*/ E("$ZodNullable", (e, t) => {
|
|
1696
|
+
L.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "pattern", () => {
|
|
1697
1697
|
let e = t.innerType._zod.pattern;
|
|
1698
1698
|
return e ? RegExp(`^(${ke(e.source)}|null)$`) : void 0;
|
|
1699
1699
|
}), O(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1700
|
-
}),
|
|
1701
|
-
|
|
1700
|
+
}), hr = /*@__PURE__*/ E("$ZodDefault", (e, t) => {
|
|
1701
|
+
L.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1702
1702
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1703
1703
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1704
1704
|
let r = t.innerType._zod.run(e, n);
|
|
1705
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1705
|
+
return r instanceof Promise ? r.then((e) => gr(e, t)) : gr(r, t);
|
|
1706
1706
|
};
|
|
1707
1707
|
});
|
|
1708
|
-
function
|
|
1708
|
+
function gr(e, t) {
|
|
1709
1709
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1710
1710
|
}
|
|
1711
|
-
var
|
|
1712
|
-
|
|
1713
|
-
}),
|
|
1714
|
-
|
|
1711
|
+
var _r = /*@__PURE__*/ E("$ZodPrefault", (e, t) => {
|
|
1712
|
+
L.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1713
|
+
}), vr = /*@__PURE__*/ E("$ZodNonOptional", (e, t) => {
|
|
1714
|
+
L.init(e, t), O(e._zod, "values", () => {
|
|
1715
1715
|
let e = t.innerType._zod.values;
|
|
1716
1716
|
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
1717
1717
|
}), e._zod.parse = (n, r) => {
|
|
1718
1718
|
let i = t.innerType._zod.run(n, r);
|
|
1719
|
-
return i instanceof Promise ? i.then((t) =>
|
|
1719
|
+
return i instanceof Promise ? i.then((t) => yr(t, e)) : yr(i, e);
|
|
1720
1720
|
};
|
|
1721
1721
|
});
|
|
1722
|
-
function
|
|
1722
|
+
function yr(e, t) {
|
|
1723
1723
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1724
1724
|
code: "invalid_type",
|
|
1725
1725
|
expected: "nonoptional",
|
|
@@ -1727,55 +1727,55 @@ function br(e, t) {
|
|
|
1727
1727
|
inst: t
|
|
1728
1728
|
}), e;
|
|
1729
1729
|
}
|
|
1730
|
-
var
|
|
1731
|
-
|
|
1730
|
+
var br = /*@__PURE__*/ E("$ZodCatch", (e, t) => {
|
|
1731
|
+
L.init(e, t), e._zod.optin = "optional", O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1732
1732
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1733
1733
|
let r = t.innerType._zod.run(e, n);
|
|
1734
1734
|
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1735
1735
|
...e,
|
|
1736
|
-
error: { issues: r.issues.map((e) =>
|
|
1736
|
+
error: { issues: r.issues.map((e) => F(e, n, D())) },
|
|
1737
1737
|
input: e.value
|
|
1738
1738
|
}), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1739
1739
|
...e,
|
|
1740
|
-
error: { issues: r.issues.map((e) =>
|
|
1740
|
+
error: { issues: r.issues.map((e) => F(e, n, D())) },
|
|
1741
1741
|
input: e.value
|
|
1742
1742
|
}), e.issues = [], e.fallback = !0), e);
|
|
1743
1743
|
};
|
|
1744
|
-
}),
|
|
1745
|
-
|
|
1744
|
+
}), xr = /*@__PURE__*/ E("$ZodPipe", (e, t) => {
|
|
1745
|
+
L.init(e, t), O(e._zod, "values", () => t.in._zod.values), O(e._zod, "optin", () => t.in._zod.optin), O(e._zod, "optout", () => t.out._zod.optout), O(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1746
1746
|
if (n.direction === "backward") {
|
|
1747
1747
|
let r = t.out._zod.run(e, n);
|
|
1748
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1748
|
+
return r instanceof Promise ? r.then((e) => Sr(e, t.in, n)) : Sr(r, t.in, n);
|
|
1749
1749
|
}
|
|
1750
1750
|
let r = t.in._zod.run(e, n);
|
|
1751
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1751
|
+
return r instanceof Promise ? r.then((e) => Sr(e, t.out, n)) : Sr(r, t.out, n);
|
|
1752
1752
|
};
|
|
1753
1753
|
});
|
|
1754
|
-
function
|
|
1754
|
+
function Sr(e, t, n) {
|
|
1755
1755
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
|
|
1756
1756
|
value: e.value,
|
|
1757
1757
|
issues: e.issues,
|
|
1758
1758
|
fallback: e.fallback
|
|
1759
1759
|
}, n);
|
|
1760
1760
|
}
|
|
1761
|
-
var
|
|
1762
|
-
|
|
1761
|
+
var Cr = /*@__PURE__*/ E("$ZodReadonly", (e, t) => {
|
|
1762
|
+
L.init(e, t), O(e._zod, "propValues", () => t.innerType._zod.propValues), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "optin", () => t.innerType?._zod?.optin), O(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1763
1763
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1764
1764
|
let r = t.innerType._zod.run(e, n);
|
|
1765
|
-
return r instanceof Promise ? r.then(
|
|
1765
|
+
return r instanceof Promise ? r.then(wr) : wr(r);
|
|
1766
1766
|
};
|
|
1767
1767
|
});
|
|
1768
|
-
function
|
|
1768
|
+
function wr(e) {
|
|
1769
1769
|
return e.value = Object.freeze(e.value), e;
|
|
1770
1770
|
}
|
|
1771
|
-
var
|
|
1772
|
-
|
|
1771
|
+
var Tr = /*@__PURE__*/ E("$ZodCustom", (e, t) => {
|
|
1772
|
+
I.init(e, t), L.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1773
1773
|
let r = n.value, i = t.fn(r);
|
|
1774
|
-
if (i instanceof Promise) return i.then((t) =>
|
|
1775
|
-
|
|
1774
|
+
if (i instanceof Promise) return i.then((t) => Er(t, n, r, e));
|
|
1775
|
+
Er(i, n, r, e);
|
|
1776
1776
|
};
|
|
1777
1777
|
});
|
|
1778
|
-
function
|
|
1778
|
+
function Er(e, t, n, r) {
|
|
1779
1779
|
if (!e) {
|
|
1780
1780
|
let e = {
|
|
1781
1781
|
code: "custom",
|
|
@@ -1784,12 +1784,12 @@ function Dr(e, t, n, r) {
|
|
|
1784
1784
|
path: [...r._zod.def.path ?? []],
|
|
1785
1785
|
continue: !r._zod.def.abort
|
|
1786
1786
|
};
|
|
1787
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(
|
|
1787
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push($e(e));
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
//#endregion
|
|
1791
1791
|
//#region ../../node_modules/zod/v4/core/registries.js
|
|
1792
|
-
var
|
|
1792
|
+
var Dr, Or = class {
|
|
1793
1793
|
constructor() {
|
|
1794
1794
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1795
1795
|
}
|
|
@@ -1821,22 +1821,22 @@ var Or, kr = class {
|
|
|
1821
1821
|
return this._map.has(e);
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
|
-
function
|
|
1825
|
-
return new
|
|
1824
|
+
function kr() {
|
|
1825
|
+
return new Or();
|
|
1826
1826
|
}
|
|
1827
|
-
(
|
|
1828
|
-
var
|
|
1827
|
+
(Dr = globalThis).__zod_globalRegistry ?? (Dr.__zod_globalRegistry = kr());
|
|
1828
|
+
var Ar = globalThis.__zod_globalRegistry;
|
|
1829
1829
|
//#endregion
|
|
1830
1830
|
//#region ../../node_modules/zod/v4/core/api.js
|
|
1831
1831
|
// @__NO_SIDE_EFFECTS__
|
|
1832
|
-
function
|
|
1832
|
+
function jr(e, t) {
|
|
1833
1833
|
return new e({
|
|
1834
1834
|
type: "string",
|
|
1835
1835
|
...M(t)
|
|
1836
1836
|
});
|
|
1837
1837
|
}
|
|
1838
1838
|
// @__NO_SIDE_EFFECTS__
|
|
1839
|
-
function
|
|
1839
|
+
function Mr(e, t) {
|
|
1840
1840
|
return new e({
|
|
1841
1841
|
type: "string",
|
|
1842
1842
|
format: "email",
|
|
@@ -1846,7 +1846,7 @@ function Nr(e, t) {
|
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
1848
|
// @__NO_SIDE_EFFECTS__
|
|
1849
|
-
function
|
|
1849
|
+
function Nr(e, t) {
|
|
1850
1850
|
return new e({
|
|
1851
1851
|
type: "string",
|
|
1852
1852
|
format: "guid",
|
|
@@ -1856,7 +1856,7 @@ function Pr(e, t) {
|
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
1858
1858
|
// @__NO_SIDE_EFFECTS__
|
|
1859
|
-
function
|
|
1859
|
+
function Pr(e, t) {
|
|
1860
1860
|
return new e({
|
|
1861
1861
|
type: "string",
|
|
1862
1862
|
format: "uuid",
|
|
@@ -1866,7 +1866,7 @@ function Fr(e, t) {
|
|
|
1866
1866
|
});
|
|
1867
1867
|
}
|
|
1868
1868
|
// @__NO_SIDE_EFFECTS__
|
|
1869
|
-
function
|
|
1869
|
+
function Fr(e, t) {
|
|
1870
1870
|
return new e({
|
|
1871
1871
|
type: "string",
|
|
1872
1872
|
format: "uuid",
|
|
@@ -1877,7 +1877,7 @@ function Ir(e, t) {
|
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
1879
|
// @__NO_SIDE_EFFECTS__
|
|
1880
|
-
function
|
|
1880
|
+
function Ir(e, t) {
|
|
1881
1881
|
return new e({
|
|
1882
1882
|
type: "string",
|
|
1883
1883
|
format: "uuid",
|
|
@@ -1888,7 +1888,7 @@ function Lr(e, t) {
|
|
|
1888
1888
|
});
|
|
1889
1889
|
}
|
|
1890
1890
|
// @__NO_SIDE_EFFECTS__
|
|
1891
|
-
function
|
|
1891
|
+
function Lr(e, t) {
|
|
1892
1892
|
return new e({
|
|
1893
1893
|
type: "string",
|
|
1894
1894
|
format: "uuid",
|
|
@@ -1899,7 +1899,7 @@ function Rr(e, t) {
|
|
|
1899
1899
|
});
|
|
1900
1900
|
}
|
|
1901
1901
|
// @__NO_SIDE_EFFECTS__
|
|
1902
|
-
function
|
|
1902
|
+
function Rr(e, t) {
|
|
1903
1903
|
return new e({
|
|
1904
1904
|
type: "string",
|
|
1905
1905
|
format: "url",
|
|
@@ -1909,7 +1909,7 @@ function zr(e, t) {
|
|
|
1909
1909
|
});
|
|
1910
1910
|
}
|
|
1911
1911
|
// @__NO_SIDE_EFFECTS__
|
|
1912
|
-
function
|
|
1912
|
+
function zr(e, t) {
|
|
1913
1913
|
return new e({
|
|
1914
1914
|
type: "string",
|
|
1915
1915
|
format: "emoji",
|
|
@@ -1919,7 +1919,7 @@ function Br(e, t) {
|
|
|
1919
1919
|
});
|
|
1920
1920
|
}
|
|
1921
1921
|
// @__NO_SIDE_EFFECTS__
|
|
1922
|
-
function
|
|
1922
|
+
function Br(e, t) {
|
|
1923
1923
|
return new e({
|
|
1924
1924
|
type: "string",
|
|
1925
1925
|
format: "nanoid",
|
|
@@ -1929,7 +1929,7 @@ function Vr(e, t) {
|
|
|
1929
1929
|
});
|
|
1930
1930
|
}
|
|
1931
1931
|
// @__NO_SIDE_EFFECTS__
|
|
1932
|
-
function
|
|
1932
|
+
function Vr(e, t) {
|
|
1933
1933
|
return new e({
|
|
1934
1934
|
type: "string",
|
|
1935
1935
|
format: "cuid",
|
|
@@ -1939,7 +1939,7 @@ function Hr(e, t) {
|
|
|
1939
1939
|
});
|
|
1940
1940
|
}
|
|
1941
1941
|
// @__NO_SIDE_EFFECTS__
|
|
1942
|
-
function
|
|
1942
|
+
function Hr(e, t) {
|
|
1943
1943
|
return new e({
|
|
1944
1944
|
type: "string",
|
|
1945
1945
|
format: "cuid2",
|
|
@@ -1949,7 +1949,7 @@ function Ur(e, t) {
|
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
1951
|
// @__NO_SIDE_EFFECTS__
|
|
1952
|
-
function
|
|
1952
|
+
function Ur(e, t) {
|
|
1953
1953
|
return new e({
|
|
1954
1954
|
type: "string",
|
|
1955
1955
|
format: "ulid",
|
|
@@ -1959,7 +1959,7 @@ function Wr(e, t) {
|
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
// @__NO_SIDE_EFFECTS__
|
|
1962
|
-
function
|
|
1962
|
+
function Wr(e, t) {
|
|
1963
1963
|
return new e({
|
|
1964
1964
|
type: "string",
|
|
1965
1965
|
format: "xid",
|
|
@@ -1969,7 +1969,7 @@ function Gr(e, t) {
|
|
|
1969
1969
|
});
|
|
1970
1970
|
}
|
|
1971
1971
|
// @__NO_SIDE_EFFECTS__
|
|
1972
|
-
function
|
|
1972
|
+
function Gr(e, t) {
|
|
1973
1973
|
return new e({
|
|
1974
1974
|
type: "string",
|
|
1975
1975
|
format: "ksuid",
|
|
@@ -1979,7 +1979,7 @@ function Kr(e, t) {
|
|
|
1979
1979
|
});
|
|
1980
1980
|
}
|
|
1981
1981
|
// @__NO_SIDE_EFFECTS__
|
|
1982
|
-
function
|
|
1982
|
+
function Kr(e, t) {
|
|
1983
1983
|
return new e({
|
|
1984
1984
|
type: "string",
|
|
1985
1985
|
format: "ipv4",
|
|
@@ -1989,7 +1989,7 @@ function qr(e, t) {
|
|
|
1989
1989
|
});
|
|
1990
1990
|
}
|
|
1991
1991
|
// @__NO_SIDE_EFFECTS__
|
|
1992
|
-
function
|
|
1992
|
+
function qr(e, t) {
|
|
1993
1993
|
return new e({
|
|
1994
1994
|
type: "string",
|
|
1995
1995
|
format: "ipv6",
|
|
@@ -1999,7 +1999,7 @@ function Jr(e, t) {
|
|
|
1999
1999
|
});
|
|
2000
2000
|
}
|
|
2001
2001
|
// @__NO_SIDE_EFFECTS__
|
|
2002
|
-
function
|
|
2002
|
+
function Jr(e, t) {
|
|
2003
2003
|
return new e({
|
|
2004
2004
|
type: "string",
|
|
2005
2005
|
format: "cidrv4",
|
|
@@ -2009,7 +2009,7 @@ function Yr(e, t) {
|
|
|
2009
2009
|
});
|
|
2010
2010
|
}
|
|
2011
2011
|
// @__NO_SIDE_EFFECTS__
|
|
2012
|
-
function
|
|
2012
|
+
function Yr(e, t) {
|
|
2013
2013
|
return new e({
|
|
2014
2014
|
type: "string",
|
|
2015
2015
|
format: "cidrv6",
|
|
@@ -2019,7 +2019,7 @@ function Xr(e, t) {
|
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
2021
2021
|
// @__NO_SIDE_EFFECTS__
|
|
2022
|
-
function
|
|
2022
|
+
function Xr(e, t) {
|
|
2023
2023
|
return new e({
|
|
2024
2024
|
type: "string",
|
|
2025
2025
|
format: "base64",
|
|
@@ -2029,7 +2029,7 @@ function Zr(e, t) {
|
|
|
2029
2029
|
});
|
|
2030
2030
|
}
|
|
2031
2031
|
// @__NO_SIDE_EFFECTS__
|
|
2032
|
-
function
|
|
2032
|
+
function Zr(e, t) {
|
|
2033
2033
|
return new e({
|
|
2034
2034
|
type: "string",
|
|
2035
2035
|
format: "base64url",
|
|
@@ -2039,7 +2039,7 @@ function Qr(e, t) {
|
|
|
2039
2039
|
});
|
|
2040
2040
|
}
|
|
2041
2041
|
// @__NO_SIDE_EFFECTS__
|
|
2042
|
-
function
|
|
2042
|
+
function Qr(e, t) {
|
|
2043
2043
|
return new e({
|
|
2044
2044
|
type: "string",
|
|
2045
2045
|
format: "e164",
|
|
@@ -2049,7 +2049,7 @@ function $r(e, t) {
|
|
|
2049
2049
|
});
|
|
2050
2050
|
}
|
|
2051
2051
|
// @__NO_SIDE_EFFECTS__
|
|
2052
|
-
function
|
|
2052
|
+
function $r(e, t) {
|
|
2053
2053
|
return new e({
|
|
2054
2054
|
type: "string",
|
|
2055
2055
|
format: "jwt",
|
|
@@ -2059,7 +2059,7 @@ function ei(e, t) {
|
|
|
2059
2059
|
});
|
|
2060
2060
|
}
|
|
2061
2061
|
// @__NO_SIDE_EFFECTS__
|
|
2062
|
-
function
|
|
2062
|
+
function ei(e, t) {
|
|
2063
2063
|
return new e({
|
|
2064
2064
|
type: "string",
|
|
2065
2065
|
format: "datetime",
|
|
@@ -2071,7 +2071,7 @@ function ti(e, t) {
|
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
2073
|
// @__NO_SIDE_EFFECTS__
|
|
2074
|
-
function
|
|
2074
|
+
function ti(e, t) {
|
|
2075
2075
|
return new e({
|
|
2076
2076
|
type: "string",
|
|
2077
2077
|
format: "date",
|
|
@@ -2080,7 +2080,7 @@ function ni(e, t) {
|
|
|
2080
2080
|
});
|
|
2081
2081
|
}
|
|
2082
2082
|
// @__NO_SIDE_EFFECTS__
|
|
2083
|
-
function
|
|
2083
|
+
function ni(e, t) {
|
|
2084
2084
|
return new e({
|
|
2085
2085
|
type: "string",
|
|
2086
2086
|
format: "time",
|
|
@@ -2090,7 +2090,7 @@ function ri(e, t) {
|
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
2092
|
// @__NO_SIDE_EFFECTS__
|
|
2093
|
-
function
|
|
2093
|
+
function ri(e, t) {
|
|
2094
2094
|
return new e({
|
|
2095
2095
|
type: "string",
|
|
2096
2096
|
format: "duration",
|
|
@@ -2099,7 +2099,7 @@ function ii(e, t) {
|
|
|
2099
2099
|
});
|
|
2100
2100
|
}
|
|
2101
2101
|
// @__NO_SIDE_EFFECTS__
|
|
2102
|
-
function
|
|
2102
|
+
function ii(e, t) {
|
|
2103
2103
|
return new e({
|
|
2104
2104
|
type: "number",
|
|
2105
2105
|
checks: [],
|
|
@@ -2107,7 +2107,7 @@ function ai(e, t) {
|
|
|
2107
2107
|
});
|
|
2108
2108
|
}
|
|
2109
2109
|
// @__NO_SIDE_EFFECTS__
|
|
2110
|
-
function
|
|
2110
|
+
function ai(e, t) {
|
|
2111
2111
|
return new e({
|
|
2112
2112
|
type: "number",
|
|
2113
2113
|
check: "number_format",
|
|
@@ -2117,33 +2117,33 @@ function oi(e, t) {
|
|
|
2117
2117
|
});
|
|
2118
2118
|
}
|
|
2119
2119
|
// @__NO_SIDE_EFFECTS__
|
|
2120
|
-
function
|
|
2120
|
+
function oi(e, t) {
|
|
2121
2121
|
return new e({
|
|
2122
2122
|
type: "boolean",
|
|
2123
2123
|
...M(t)
|
|
2124
2124
|
});
|
|
2125
2125
|
}
|
|
2126
2126
|
// @__NO_SIDE_EFFECTS__
|
|
2127
|
-
function
|
|
2127
|
+
function si(e, t) {
|
|
2128
2128
|
return new e({
|
|
2129
2129
|
type: "null",
|
|
2130
2130
|
...M(t)
|
|
2131
2131
|
});
|
|
2132
2132
|
}
|
|
2133
2133
|
// @__NO_SIDE_EFFECTS__
|
|
2134
|
-
function
|
|
2134
|
+
function ci(e) {
|
|
2135
2135
|
return new e({ type: "unknown" });
|
|
2136
2136
|
}
|
|
2137
2137
|
// @__NO_SIDE_EFFECTS__
|
|
2138
|
-
function
|
|
2138
|
+
function li(e, t) {
|
|
2139
2139
|
return new e({
|
|
2140
2140
|
type: "never",
|
|
2141
2141
|
...M(t)
|
|
2142
2142
|
});
|
|
2143
2143
|
}
|
|
2144
2144
|
// @__NO_SIDE_EFFECTS__
|
|
2145
|
-
function
|
|
2146
|
-
return new
|
|
2145
|
+
function ui(e, t) {
|
|
2146
|
+
return new Qt({
|
|
2147
2147
|
check: "less_than",
|
|
2148
2148
|
...M(t),
|
|
2149
2149
|
value: e,
|
|
@@ -2151,8 +2151,8 @@ function di(e, t) {
|
|
|
2151
2151
|
});
|
|
2152
2152
|
}
|
|
2153
2153
|
// @__NO_SIDE_EFFECTS__
|
|
2154
|
-
function
|
|
2155
|
-
return new
|
|
2154
|
+
function di(e, t) {
|
|
2155
|
+
return new Qt({
|
|
2156
2156
|
check: "less_than",
|
|
2157
2157
|
...M(t),
|
|
2158
2158
|
value: e,
|
|
@@ -2160,8 +2160,8 @@ function fi(e, t) {
|
|
|
2160
2160
|
});
|
|
2161
2161
|
}
|
|
2162
2162
|
// @__NO_SIDE_EFFECTS__
|
|
2163
|
-
function
|
|
2164
|
-
return new
|
|
2163
|
+
function fi(e, t) {
|
|
2164
|
+
return new $t({
|
|
2165
2165
|
check: "greater_than",
|
|
2166
2166
|
...M(t),
|
|
2167
2167
|
value: e,
|
|
@@ -2169,8 +2169,8 @@ function pi(e, t) {
|
|
|
2169
2169
|
});
|
|
2170
2170
|
}
|
|
2171
2171
|
// @__NO_SIDE_EFFECTS__
|
|
2172
|
-
function
|
|
2173
|
-
return new
|
|
2172
|
+
function pi(e, t) {
|
|
2173
|
+
return new $t({
|
|
2174
2174
|
check: "greater_than",
|
|
2175
2175
|
...M(t),
|
|
2176
2176
|
value: e,
|
|
@@ -2178,40 +2178,40 @@ function mi(e, t) {
|
|
|
2178
2178
|
});
|
|
2179
2179
|
}
|
|
2180
2180
|
// @__NO_SIDE_EFFECTS__
|
|
2181
|
-
function
|
|
2182
|
-
return new
|
|
2181
|
+
function mi(e, t) {
|
|
2182
|
+
return new en({
|
|
2183
2183
|
check: "multiple_of",
|
|
2184
2184
|
...M(t),
|
|
2185
2185
|
value: e
|
|
2186
2186
|
});
|
|
2187
2187
|
}
|
|
2188
2188
|
// @__NO_SIDE_EFFECTS__
|
|
2189
|
-
function
|
|
2190
|
-
return new
|
|
2189
|
+
function hi(e, t) {
|
|
2190
|
+
return new nn({
|
|
2191
2191
|
check: "max_length",
|
|
2192
2192
|
...M(t),
|
|
2193
2193
|
maximum: e
|
|
2194
2194
|
});
|
|
2195
2195
|
}
|
|
2196
2196
|
// @__NO_SIDE_EFFECTS__
|
|
2197
|
-
function
|
|
2198
|
-
return new
|
|
2197
|
+
function gi(e, t) {
|
|
2198
|
+
return new rn({
|
|
2199
2199
|
check: "min_length",
|
|
2200
2200
|
...M(t),
|
|
2201
2201
|
minimum: e
|
|
2202
2202
|
});
|
|
2203
2203
|
}
|
|
2204
2204
|
// @__NO_SIDE_EFFECTS__
|
|
2205
|
-
function
|
|
2206
|
-
return new
|
|
2205
|
+
function _i(e, t) {
|
|
2206
|
+
return new an({
|
|
2207
2207
|
check: "length_equals",
|
|
2208
2208
|
...M(t),
|
|
2209
2209
|
length: e
|
|
2210
2210
|
});
|
|
2211
2211
|
}
|
|
2212
2212
|
// @__NO_SIDE_EFFECTS__
|
|
2213
|
-
function
|
|
2214
|
-
return new
|
|
2213
|
+
function vi(e, t) {
|
|
2214
|
+
return new sn({
|
|
2215
2215
|
check: "string_format",
|
|
2216
2216
|
format: "regex",
|
|
2217
2217
|
...M(t),
|
|
@@ -2219,24 +2219,24 @@ function yi(e, t) {
|
|
|
2219
2219
|
});
|
|
2220
2220
|
}
|
|
2221
2221
|
// @__NO_SIDE_EFFECTS__
|
|
2222
|
-
function
|
|
2223
|
-
return new
|
|
2222
|
+
function yi(e) {
|
|
2223
|
+
return new cn({
|
|
2224
2224
|
check: "string_format",
|
|
2225
2225
|
format: "lowercase",
|
|
2226
2226
|
...M(e)
|
|
2227
2227
|
});
|
|
2228
2228
|
}
|
|
2229
2229
|
// @__NO_SIDE_EFFECTS__
|
|
2230
|
-
function
|
|
2231
|
-
return new
|
|
2230
|
+
function bi(e) {
|
|
2231
|
+
return new ln({
|
|
2232
2232
|
check: "string_format",
|
|
2233
2233
|
format: "uppercase",
|
|
2234
2234
|
...M(e)
|
|
2235
2235
|
});
|
|
2236
2236
|
}
|
|
2237
2237
|
// @__NO_SIDE_EFFECTS__
|
|
2238
|
-
function
|
|
2239
|
-
return new
|
|
2238
|
+
function xi(e, t) {
|
|
2239
|
+
return new un({
|
|
2240
2240
|
check: "string_format",
|
|
2241
2241
|
format: "includes",
|
|
2242
2242
|
...M(t),
|
|
@@ -2244,8 +2244,8 @@ function Si(e, t) {
|
|
|
2244
2244
|
});
|
|
2245
2245
|
}
|
|
2246
2246
|
// @__NO_SIDE_EFFECTS__
|
|
2247
|
-
function
|
|
2248
|
-
return new
|
|
2247
|
+
function Si(e, t) {
|
|
2248
|
+
return new dn({
|
|
2249
2249
|
check: "string_format",
|
|
2250
2250
|
format: "starts_with",
|
|
2251
2251
|
...M(t),
|
|
@@ -2253,8 +2253,8 @@ function Ci(e, t) {
|
|
|
2253
2253
|
});
|
|
2254
2254
|
}
|
|
2255
2255
|
// @__NO_SIDE_EFFECTS__
|
|
2256
|
-
function
|
|
2257
|
-
return new
|
|
2256
|
+
function Ci(e, t) {
|
|
2257
|
+
return new fn({
|
|
2258
2258
|
check: "string_format",
|
|
2259
2259
|
format: "ends_with",
|
|
2260
2260
|
...M(t),
|
|
@@ -2262,31 +2262,31 @@ function wi(e, t) {
|
|
|
2262
2262
|
});
|
|
2263
2263
|
}
|
|
2264
2264
|
// @__NO_SIDE_EFFECTS__
|
|
2265
|
-
function
|
|
2266
|
-
return new
|
|
2265
|
+
function wi(e) {
|
|
2266
|
+
return new pn({
|
|
2267
2267
|
check: "overwrite",
|
|
2268
2268
|
tx: e
|
|
2269
2269
|
});
|
|
2270
2270
|
}
|
|
2271
2271
|
// @__NO_SIDE_EFFECTS__
|
|
2272
2272
|
function Ti(e) {
|
|
2273
|
-
return /* @__PURE__ */
|
|
2273
|
+
return /* @__PURE__ */ wi((t) => t.normalize(e));
|
|
2274
2274
|
}
|
|
2275
2275
|
// @__NO_SIDE_EFFECTS__
|
|
2276
2276
|
function Ei() {
|
|
2277
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ wi((e) => e.trim());
|
|
2278
2278
|
}
|
|
2279
2279
|
// @__NO_SIDE_EFFECTS__
|
|
2280
2280
|
function Di() {
|
|
2281
|
-
return /* @__PURE__ */
|
|
2281
|
+
return /* @__PURE__ */ wi((e) => e.toLowerCase());
|
|
2282
2282
|
}
|
|
2283
2283
|
// @__NO_SIDE_EFFECTS__
|
|
2284
2284
|
function Oi() {
|
|
2285
|
-
return /* @__PURE__ */
|
|
2285
|
+
return /* @__PURE__ */ wi((e) => e.toUpperCase());
|
|
2286
2286
|
}
|
|
2287
2287
|
// @__NO_SIDE_EFFECTS__
|
|
2288
2288
|
function ki() {
|
|
2289
|
-
return /* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ wi((e) => Ne(e));
|
|
2290
2290
|
}
|
|
2291
2291
|
// @__NO_SIDE_EFFECTS__
|
|
2292
2292
|
function Ai(e, t, n) {
|
|
@@ -2308,17 +2308,17 @@ function ji(e, t, n) {
|
|
|
2308
2308
|
// @__NO_SIDE_EFFECTS__
|
|
2309
2309
|
function Mi(e, t) {
|
|
2310
2310
|
let n = /* @__PURE__ */ Ni((t) => (t.addIssue = (e) => {
|
|
2311
|
-
if (typeof e == "string") t.issues.push(
|
|
2311
|
+
if (typeof e == "string") t.issues.push($e(e, t.value, n._zod.def));
|
|
2312
2312
|
else {
|
|
2313
2313
|
let r = e;
|
|
2314
|
-
r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(
|
|
2314
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push($e(r));
|
|
2315
2315
|
}
|
|
2316
2316
|
}, e(t.value, t)), t);
|
|
2317
2317
|
return n;
|
|
2318
2318
|
}
|
|
2319
2319
|
// @__NO_SIDE_EFFECTS__
|
|
2320
2320
|
function Ni(e, t) {
|
|
2321
|
-
let n = new
|
|
2321
|
+
let n = new I({
|
|
2322
2322
|
check: "custom",
|
|
2323
2323
|
...M(t)
|
|
2324
2324
|
});
|
|
@@ -2330,7 +2330,7 @@ function Pi(e) {
|
|
|
2330
2330
|
let t = e?.target ?? "draft-2020-12";
|
|
2331
2331
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2332
2332
|
processors: e.processors ?? {},
|
|
2333
|
-
metadataRegistry: e?.metadata ??
|
|
2333
|
+
metadataRegistry: e?.metadata ?? Ar,
|
|
2334
2334
|
target: t,
|
|
2335
2335
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2336
2336
|
override: e?.override ?? (() => {}),
|
|
@@ -2718,33 +2718,33 @@ var Li = (e, t = {}) => (n) => {
|
|
|
2718
2718
|
let a = t.seen.get(e);
|
|
2719
2719
|
a.ref = i.innerType;
|
|
2720
2720
|
}, ca = /*@__PURE__*/ E("ZodISODateTime", (e, t) => {
|
|
2721
|
-
|
|
2721
|
+
On.init(e, t), W.init(e, t);
|
|
2722
2722
|
});
|
|
2723
2723
|
function la(e) {
|
|
2724
|
-
return /* @__PURE__ */
|
|
2724
|
+
return /* @__PURE__ */ ei(ca, e);
|
|
2725
2725
|
}
|
|
2726
2726
|
var ua = /*@__PURE__*/ E("ZodISODate", (e, t) => {
|
|
2727
|
-
|
|
2727
|
+
kn.init(e, t), W.init(e, t);
|
|
2728
2728
|
});
|
|
2729
2729
|
function da(e) {
|
|
2730
|
-
return /* @__PURE__ */
|
|
2730
|
+
return /* @__PURE__ */ ti(ua, e);
|
|
2731
2731
|
}
|
|
2732
2732
|
var fa = /*@__PURE__*/ E("ZodISOTime", (e, t) => {
|
|
2733
|
-
|
|
2733
|
+
An.init(e, t), W.init(e, t);
|
|
2734
2734
|
});
|
|
2735
2735
|
function pa(e) {
|
|
2736
|
-
return /* @__PURE__ */
|
|
2736
|
+
return /* @__PURE__ */ ni(fa, e);
|
|
2737
2737
|
}
|
|
2738
2738
|
var ma = /*@__PURE__*/ E("ZodISODuration", (e, t) => {
|
|
2739
|
-
|
|
2739
|
+
jn.init(e, t), W.init(e, t);
|
|
2740
2740
|
});
|
|
2741
2741
|
function ha(e) {
|
|
2742
|
-
return /* @__PURE__ */
|
|
2742
|
+
return /* @__PURE__ */ ri(ma, e);
|
|
2743
2743
|
}
|
|
2744
2744
|
var V = /*@__PURE__*/ E("ZodError", (e, t) => {
|
|
2745
|
-
|
|
2746
|
-
format: { value: (t) =>
|
|
2747
|
-
flatten: { value: (t) =>
|
|
2745
|
+
tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2746
|
+
format: { value: (t) => it(e, t) },
|
|
2747
|
+
flatten: { value: (t) => rt(e, t) },
|
|
2748
2748
|
addIssue: { value: (t) => {
|
|
2749
2749
|
e.issues.push(t), e.message = JSON.stringify(e.issues, Ee, 2);
|
|
2750
2750
|
} },
|
|
@@ -2755,7 +2755,7 @@ var V = /*@__PURE__*/ E("ZodError", (e, t) => {
|
|
|
2755
2755
|
return e.issues.length === 0;
|
|
2756
2756
|
} }
|
|
2757
2757
|
});
|
|
2758
|
-
}, { Parent: Error }), ga = /* @__PURE__ */
|
|
2758
|
+
}, { Parent: Error }), ga = /* @__PURE__ */ at(V), _a = /* @__PURE__ */ ot(V), va = /* @__PURE__ */ st(V), ya = /* @__PURE__ */ lt(V), ba = /* @__PURE__ */ dt(V), xa = /* @__PURE__ */ ft(V), Sa = /* @__PURE__ */ pt(V), Ca = /* @__PURE__ */ mt(V), wa = /* @__PURE__ */ ht(V), Ta = /* @__PURE__ */ gt(V), Ea = /* @__PURE__ */ _t(V), Da = /* @__PURE__ */ vt(V), Oa = /* @__PURE__ */ new WeakMap();
|
|
2759
2759
|
function ka(e, t, n) {
|
|
2760
2760
|
let r = Object.getPrototypeOf(e), i = Oa.get(r);
|
|
2761
2761
|
if (i || (i = /* @__PURE__ */ new Set(), Oa.set(r, i)), !i.has(t)) {
|
|
@@ -2786,7 +2786,7 @@ function ka(e, t, n) {
|
|
|
2786
2786
|
}
|
|
2787
2787
|
}
|
|
2788
2788
|
}
|
|
2789
|
-
var H = /*@__PURE__*/ E("ZodType", (e, t) => (
|
|
2789
|
+
var H = /*@__PURE__*/ E("ZodType", (e, t) => (L.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2790
2790
|
input: Ri(e, "input"),
|
|
2791
2791
|
output: Ri(e, "output")
|
|
2792
2792
|
} }), e.toJSONSchema = Li(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => ga(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => va(e, t, n), e.parseAsync = async (t, n) => _a(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => ya(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => ba(e, t, n), e.decode = (t, n) => xa(e, t, n), e.encodeAsync = async (t, n) => Sa(e, t, n), e.decodeAsync = async (t, n) => Ca(e, t, n), e.safeEncode = (t, n) => wa(e, t, n), e.safeDecode = (t, n) => Ta(e, t, n), e.safeEncodeAsync = async (t, n) => Ea(e, t, n), e.safeDecodeAsync = async (t, n) => Da(e, t, n), ka(e, "ZodType", {
|
|
@@ -2817,7 +2817,7 @@ var H = /*@__PURE__*/ E("ZodType", (e, t) => (I.init(e, t), Object.assign(e["~st
|
|
|
2817
2817
|
return this.check(Ho(e, t));
|
|
2818
2818
|
},
|
|
2819
2819
|
overwrite(e) {
|
|
2820
|
-
return this.check(/* @__PURE__ */
|
|
2820
|
+
return this.check(/* @__PURE__ */ wi(e));
|
|
2821
2821
|
},
|
|
2822
2822
|
optional() {
|
|
2823
2823
|
return Co(this);
|
|
@@ -2863,12 +2863,12 @@ var H = /*@__PURE__*/ E("ZodType", (e, t) => (I.init(e, t), Object.assign(e["~st
|
|
|
2863
2863
|
},
|
|
2864
2864
|
describe(e) {
|
|
2865
2865
|
let t = this.clone();
|
|
2866
|
-
return
|
|
2866
|
+
return Ar.add(t, { description: e }), t;
|
|
2867
2867
|
},
|
|
2868
2868
|
meta(...e) {
|
|
2869
|
-
if (e.length === 0) return
|
|
2869
|
+
if (e.length === 0) return Ar.get(this);
|
|
2870
2870
|
let t = this.clone();
|
|
2871
|
-
return
|
|
2871
|
+
return Ar.add(t, e[0]), t;
|
|
2872
2872
|
},
|
|
2873
2873
|
isOptional() {
|
|
2874
2874
|
return this.safeParse(void 0).success;
|
|
@@ -2881,42 +2881,42 @@ var H = /*@__PURE__*/ E("ZodType", (e, t) => (I.init(e, t), Object.assign(e["~st
|
|
|
2881
2881
|
}
|
|
2882
2882
|
}), Object.defineProperty(e, "description", {
|
|
2883
2883
|
get() {
|
|
2884
|
-
return
|
|
2884
|
+
return Ar.get(e)?.description;
|
|
2885
2885
|
},
|
|
2886
2886
|
configurable: !0
|
|
2887
2887
|
}), e)), Aa = /*@__PURE__*/ E("_ZodString", (e, t) => {
|
|
2888
|
-
|
|
2888
|
+
gn.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Bi(e, t, n, r);
|
|
2889
2889
|
let n = e._zod.bag;
|
|
2890
2890
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, ka(e, "_ZodString", {
|
|
2891
2891
|
regex(...e) {
|
|
2892
|
-
return this.check(/* @__PURE__ */
|
|
2892
|
+
return this.check(/* @__PURE__ */ vi(...e));
|
|
2893
2893
|
},
|
|
2894
2894
|
includes(...e) {
|
|
2895
|
-
return this.check(/* @__PURE__ */
|
|
2895
|
+
return this.check(/* @__PURE__ */ xi(...e));
|
|
2896
2896
|
},
|
|
2897
2897
|
startsWith(...e) {
|
|
2898
|
-
return this.check(/* @__PURE__ */
|
|
2898
|
+
return this.check(/* @__PURE__ */ Si(...e));
|
|
2899
2899
|
},
|
|
2900
2900
|
endsWith(...e) {
|
|
2901
|
-
return this.check(/* @__PURE__ */
|
|
2901
|
+
return this.check(/* @__PURE__ */ Ci(...e));
|
|
2902
2902
|
},
|
|
2903
2903
|
min(...e) {
|
|
2904
|
-
return this.check(/* @__PURE__ */
|
|
2904
|
+
return this.check(/* @__PURE__ */ gi(...e));
|
|
2905
2905
|
},
|
|
2906
2906
|
max(...e) {
|
|
2907
|
-
return this.check(/* @__PURE__ */
|
|
2907
|
+
return this.check(/* @__PURE__ */ hi(...e));
|
|
2908
2908
|
},
|
|
2909
2909
|
length(...e) {
|
|
2910
|
-
return this.check(/* @__PURE__ */
|
|
2910
|
+
return this.check(/* @__PURE__ */ _i(...e));
|
|
2911
2911
|
},
|
|
2912
2912
|
nonempty(...e) {
|
|
2913
|
-
return this.check(/* @__PURE__ */
|
|
2913
|
+
return this.check(/* @__PURE__ */ gi(1, ...e));
|
|
2914
2914
|
},
|
|
2915
2915
|
lowercase(e) {
|
|
2916
|
-
return this.check(/* @__PURE__ */
|
|
2916
|
+
return this.check(/* @__PURE__ */ yi(e));
|
|
2917
2917
|
},
|
|
2918
2918
|
uppercase(e) {
|
|
2919
|
-
return this.check(/* @__PURE__ */
|
|
2919
|
+
return this.check(/* @__PURE__ */ bi(e));
|
|
2920
2920
|
},
|
|
2921
2921
|
trim() {
|
|
2922
2922
|
return this.check(/* @__PURE__ */ Ei());
|
|
@@ -2935,70 +2935,70 @@ var H = /*@__PURE__*/ E("ZodType", (e, t) => (I.init(e, t), Object.assign(e["~st
|
|
|
2935
2935
|
}
|
|
2936
2936
|
});
|
|
2937
2937
|
}), ja = /*@__PURE__*/ E("ZodString", (e, t) => {
|
|
2938
|
-
|
|
2938
|
+
gn.init(e, t), Aa.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ Mr(Ma, t)), e.url = (t) => e.check(/* @__PURE__ */ Rr(Fa, t)), e.jwt = (t) => e.check(/* @__PURE__ */ $r(Xa, t)), e.emoji = (t) => e.check(/* @__PURE__ */ zr(Ia, t)), e.guid = (t) => e.check(/* @__PURE__ */ Nr(Na, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Pr(Pa, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Fr(Pa, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ Ir(Pa, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Lr(Pa, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Br(La, t)), e.guid = (t) => e.check(/* @__PURE__ */ Nr(Na, t)), e.cuid = (t) => e.check(/* @__PURE__ */ Vr(Ra, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Hr(za, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Ur(Ba, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Xr(qa, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Zr(Ja, t)), e.xid = (t) => e.check(/* @__PURE__ */ Wr(Va, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ Gr(Ha, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Kr(Ua, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ qr(Wa, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ Jr(Ga, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Yr(Ka, t)), e.e164 = (t) => e.check(/* @__PURE__ */ Qr(Ya, t)), e.datetime = (t) => e.check(la(t)), e.date = (t) => e.check(da(t)), e.time = (t) => e.check(pa(t)), e.duration = (t) => e.check(ha(t));
|
|
2939
2939
|
});
|
|
2940
2940
|
function U(e) {
|
|
2941
|
-
return /* @__PURE__ */
|
|
2941
|
+
return /* @__PURE__ */ jr(ja, e);
|
|
2942
2942
|
}
|
|
2943
2943
|
var W = /*@__PURE__*/ E("ZodStringFormat", (e, t) => {
|
|
2944
|
-
|
|
2944
|
+
R.init(e, t), Aa.init(e, t);
|
|
2945
2945
|
}), Ma = /*@__PURE__*/ E("ZodEmail", (e, t) => {
|
|
2946
|
-
|
|
2946
|
+
yn.init(e, t), W.init(e, t);
|
|
2947
2947
|
}), Na = /*@__PURE__*/ E("ZodGUID", (e, t) => {
|
|
2948
|
-
|
|
2948
|
+
_n.init(e, t), W.init(e, t);
|
|
2949
2949
|
}), Pa = /*@__PURE__*/ E("ZodUUID", (e, t) => {
|
|
2950
|
-
|
|
2950
|
+
vn.init(e, t), W.init(e, t);
|
|
2951
2951
|
}), Fa = /*@__PURE__*/ E("ZodURL", (e, t) => {
|
|
2952
|
-
|
|
2952
|
+
bn.init(e, t), W.init(e, t);
|
|
2953
2953
|
}), Ia = /*@__PURE__*/ E("ZodEmoji", (e, t) => {
|
|
2954
|
-
|
|
2954
|
+
xn.init(e, t), W.init(e, t);
|
|
2955
2955
|
}), La = /*@__PURE__*/ E("ZodNanoID", (e, t) => {
|
|
2956
|
-
|
|
2956
|
+
Sn.init(e, t), W.init(e, t);
|
|
2957
2957
|
}), Ra = /*@__PURE__*/ E("ZodCUID", (e, t) => {
|
|
2958
|
-
|
|
2958
|
+
Cn.init(e, t), W.init(e, t);
|
|
2959
2959
|
}), za = /*@__PURE__*/ E("ZodCUID2", (e, t) => {
|
|
2960
|
-
|
|
2960
|
+
wn.init(e, t), W.init(e, t);
|
|
2961
2961
|
}), Ba = /*@__PURE__*/ E("ZodULID", (e, t) => {
|
|
2962
|
-
|
|
2962
|
+
Tn.init(e, t), W.init(e, t);
|
|
2963
2963
|
}), Va = /*@__PURE__*/ E("ZodXID", (e, t) => {
|
|
2964
|
-
|
|
2964
|
+
En.init(e, t), W.init(e, t);
|
|
2965
2965
|
}), Ha = /*@__PURE__*/ E("ZodKSUID", (e, t) => {
|
|
2966
|
-
|
|
2966
|
+
Dn.init(e, t), W.init(e, t);
|
|
2967
2967
|
}), Ua = /*@__PURE__*/ E("ZodIPv4", (e, t) => {
|
|
2968
|
-
|
|
2968
|
+
Mn.init(e, t), W.init(e, t);
|
|
2969
2969
|
}), Wa = /*@__PURE__*/ E("ZodIPv6", (e, t) => {
|
|
2970
|
-
|
|
2970
|
+
Nn.init(e, t), W.init(e, t);
|
|
2971
2971
|
}), Ga = /*@__PURE__*/ E("ZodCIDRv4", (e, t) => {
|
|
2972
|
-
|
|
2972
|
+
Pn.init(e, t), W.init(e, t);
|
|
2973
2973
|
}), Ka = /*@__PURE__*/ E("ZodCIDRv6", (e, t) => {
|
|
2974
|
-
|
|
2974
|
+
Fn.init(e, t), W.init(e, t);
|
|
2975
2975
|
}), qa = /*@__PURE__*/ E("ZodBase64", (e, t) => {
|
|
2976
|
-
|
|
2976
|
+
Ln.init(e, t), W.init(e, t);
|
|
2977
2977
|
}), Ja = /*@__PURE__*/ E("ZodBase64URL", (e, t) => {
|
|
2978
|
-
|
|
2978
|
+
zn.init(e, t), W.init(e, t);
|
|
2979
2979
|
}), Ya = /*@__PURE__*/ E("ZodE164", (e, t) => {
|
|
2980
|
-
|
|
2980
|
+
Bn.init(e, t), W.init(e, t);
|
|
2981
2981
|
}), Xa = /*@__PURE__*/ E("ZodJWT", (e, t) => {
|
|
2982
|
-
|
|
2982
|
+
Hn.init(e, t), W.init(e, t);
|
|
2983
2983
|
}), Za = /*@__PURE__*/ E("ZodNumber", (e, t) => {
|
|
2984
|
-
|
|
2984
|
+
Un.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vi(e, t, n, r), ka(e, "ZodNumber", {
|
|
2985
2985
|
gt(e, t) {
|
|
2986
|
-
return this.check(/* @__PURE__ */
|
|
2986
|
+
return this.check(/* @__PURE__ */ fi(e, t));
|
|
2987
2987
|
},
|
|
2988
2988
|
gte(e, t) {
|
|
2989
|
-
return this.check(/* @__PURE__ */
|
|
2989
|
+
return this.check(/* @__PURE__ */ pi(e, t));
|
|
2990
2990
|
},
|
|
2991
2991
|
min(e, t) {
|
|
2992
|
-
return this.check(/* @__PURE__ */
|
|
2992
|
+
return this.check(/* @__PURE__ */ pi(e, t));
|
|
2993
2993
|
},
|
|
2994
2994
|
lt(e, t) {
|
|
2995
|
-
return this.check(/* @__PURE__ */
|
|
2995
|
+
return this.check(/* @__PURE__ */ ui(e, t));
|
|
2996
2996
|
},
|
|
2997
2997
|
lte(e, t) {
|
|
2998
|
-
return this.check(/* @__PURE__ */
|
|
2998
|
+
return this.check(/* @__PURE__ */ di(e, t));
|
|
2999
2999
|
},
|
|
3000
3000
|
max(e, t) {
|
|
3001
|
-
return this.check(/* @__PURE__ */
|
|
3001
|
+
return this.check(/* @__PURE__ */ di(e, t));
|
|
3002
3002
|
},
|
|
3003
3003
|
int(e) {
|
|
3004
3004
|
return this.check($a(e));
|
|
@@ -3007,22 +3007,22 @@ var W = /*@__PURE__*/ E("ZodStringFormat", (e, t) => {
|
|
|
3007
3007
|
return this.check($a(e));
|
|
3008
3008
|
},
|
|
3009
3009
|
positive(e) {
|
|
3010
|
-
return this.check(/* @__PURE__ */
|
|
3010
|
+
return this.check(/* @__PURE__ */ fi(0, e));
|
|
3011
3011
|
},
|
|
3012
3012
|
nonnegative(e) {
|
|
3013
|
-
return this.check(/* @__PURE__ */
|
|
3013
|
+
return this.check(/* @__PURE__ */ pi(0, e));
|
|
3014
3014
|
},
|
|
3015
3015
|
negative(e) {
|
|
3016
|
-
return this.check(/* @__PURE__ */
|
|
3016
|
+
return this.check(/* @__PURE__ */ ui(0, e));
|
|
3017
3017
|
},
|
|
3018
3018
|
nonpositive(e) {
|
|
3019
|
-
return this.check(/* @__PURE__ */
|
|
3019
|
+
return this.check(/* @__PURE__ */ di(0, e));
|
|
3020
3020
|
},
|
|
3021
3021
|
multipleOf(e, t) {
|
|
3022
|
-
return this.check(/* @__PURE__ */
|
|
3022
|
+
return this.check(/* @__PURE__ */ mi(e, t));
|
|
3023
3023
|
},
|
|
3024
3024
|
step(e, t) {
|
|
3025
|
-
return this.check(/* @__PURE__ */
|
|
3025
|
+
return this.check(/* @__PURE__ */ mi(e, t));
|
|
3026
3026
|
},
|
|
3027
3027
|
finite() {
|
|
3028
3028
|
return this;
|
|
@@ -3032,51 +3032,51 @@ var W = /*@__PURE__*/ E("ZodStringFormat", (e, t) => {
|
|
|
3032
3032
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
3033
3033
|
});
|
|
3034
3034
|
function G(e) {
|
|
3035
|
-
return /* @__PURE__ */
|
|
3035
|
+
return /* @__PURE__ */ ii(Za, e);
|
|
3036
3036
|
}
|
|
3037
3037
|
var Qa = /*@__PURE__*/ E("ZodNumberFormat", (e, t) => {
|
|
3038
|
-
|
|
3038
|
+
Wn.init(e, t), Za.init(e, t);
|
|
3039
3039
|
});
|
|
3040
3040
|
function $a(e) {
|
|
3041
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ ai(Qa, e);
|
|
3042
3042
|
}
|
|
3043
3043
|
var eo = /*@__PURE__*/ E("ZodBoolean", (e, t) => {
|
|
3044
|
-
|
|
3044
|
+
Gn.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Hi(e, t, n, r);
|
|
3045
3045
|
});
|
|
3046
3046
|
function K(e) {
|
|
3047
|
-
return /* @__PURE__ */
|
|
3047
|
+
return /* @__PURE__ */ oi(eo, e);
|
|
3048
3048
|
}
|
|
3049
3049
|
var to = /*@__PURE__*/ E("ZodNull", (e, t) => {
|
|
3050
|
-
|
|
3050
|
+
Kn.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ui(e, t, n, r);
|
|
3051
3051
|
});
|
|
3052
3052
|
function no(e) {
|
|
3053
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ si(to, e);
|
|
3054
3054
|
}
|
|
3055
3055
|
var ro = /*@__PURE__*/ E("ZodUnknown", (e, t) => {
|
|
3056
|
-
|
|
3056
|
+
qn.init(e, t), H.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3057
3057
|
});
|
|
3058
3058
|
function io() {
|
|
3059
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ ci(ro);
|
|
3060
3060
|
}
|
|
3061
3061
|
var ao = /*@__PURE__*/ E("ZodNever", (e, t) => {
|
|
3062
|
-
|
|
3062
|
+
Jn.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wi(e, t, n, r);
|
|
3063
3063
|
});
|
|
3064
3064
|
function oo(e) {
|
|
3065
|
-
return /* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ li(ao, e);
|
|
3066
3066
|
}
|
|
3067
3067
|
var so = /*@__PURE__*/ E("ZodArray", (e, t) => {
|
|
3068
|
-
|
|
3068
|
+
Xn.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yi(e, t, n, r), e.element = t.element, ka(e, "ZodArray", {
|
|
3069
3069
|
min(e, t) {
|
|
3070
|
-
return this.check(/* @__PURE__ */
|
|
3070
|
+
return this.check(/* @__PURE__ */ gi(e, t));
|
|
3071
3071
|
},
|
|
3072
3072
|
nonempty(e) {
|
|
3073
|
-
return this.check(/* @__PURE__ */
|
|
3073
|
+
return this.check(/* @__PURE__ */ gi(1, e));
|
|
3074
3074
|
},
|
|
3075
3075
|
max(e, t) {
|
|
3076
|
-
return this.check(/* @__PURE__ */
|
|
3076
|
+
return this.check(/* @__PURE__ */ hi(e, t));
|
|
3077
3077
|
},
|
|
3078
3078
|
length(e, t) {
|
|
3079
|
-
return this.check(/* @__PURE__ */
|
|
3079
|
+
return this.check(/* @__PURE__ */ _i(e, t));
|
|
3080
3080
|
},
|
|
3081
3081
|
unwrap() {
|
|
3082
3082
|
return this.element;
|
|
@@ -3087,7 +3087,7 @@ function q(e, t) {
|
|
|
3087
3087
|
return /* @__PURE__ */ Ai(so, e, t);
|
|
3088
3088
|
}
|
|
3089
3089
|
var co = /*@__PURE__*/ E("ZodObject", (e, t) => {
|
|
3090
|
-
|
|
3090
|
+
tr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi(e, t, n, r), O(e, "shape", () => t.shape), ka(e, "ZodObject", {
|
|
3091
3091
|
keyof() {
|
|
3092
3092
|
return _o(Object.keys(this._zod.def.shape));
|
|
3093
3093
|
},
|
|
@@ -3152,7 +3152,7 @@ function J(e, t) {
|
|
|
3152
3152
|
});
|
|
3153
3153
|
}
|
|
3154
3154
|
var lo = /*@__PURE__*/ E("ZodUnion", (e, t) => {
|
|
3155
|
-
|
|
3155
|
+
rr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi(e, t, n, r), e.options = t.options;
|
|
3156
3156
|
});
|
|
3157
3157
|
function uo(e, t) {
|
|
3158
3158
|
return new lo({
|
|
@@ -3162,7 +3162,7 @@ function uo(e, t) {
|
|
|
3162
3162
|
});
|
|
3163
3163
|
}
|
|
3164
3164
|
var fo = /*@__PURE__*/ E("ZodIntersection", (e, t) => {
|
|
3165
|
-
|
|
3165
|
+
ir.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi(e, t, n, r);
|
|
3166
3166
|
});
|
|
3167
3167
|
function po(e, t) {
|
|
3168
3168
|
return new fo({
|
|
@@ -3172,7 +3172,7 @@ function po(e, t) {
|
|
|
3172
3172
|
});
|
|
3173
3173
|
}
|
|
3174
3174
|
var mo = /*@__PURE__*/ E("ZodRecord", (e, t) => {
|
|
3175
|
-
|
|
3175
|
+
sr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
3176
3176
|
});
|
|
3177
3177
|
function ho(e, t, n) {
|
|
3178
3178
|
return !t || !t._zod ? new mo({
|
|
@@ -3188,7 +3188,7 @@ function ho(e, t, n) {
|
|
|
3188
3188
|
});
|
|
3189
3189
|
}
|
|
3190
3190
|
var go = /*@__PURE__*/ E("ZodEnum", (e, t) => {
|
|
3191
|
-
|
|
3191
|
+
cr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3192
3192
|
let n = new Set(Object.keys(t.entries));
|
|
3193
3193
|
e.extract = (e, r) => {
|
|
3194
3194
|
let i = {};
|
|
@@ -3220,7 +3220,7 @@ function _o(e, t) {
|
|
|
3220
3220
|
});
|
|
3221
3221
|
}
|
|
3222
3222
|
var vo = /*@__PURE__*/ E("ZodLiteral", (e, t) => {
|
|
3223
|
-
|
|
3223
|
+
lr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ki(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
3224
3224
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3225
3225
|
return t.values[0];
|
|
3226
3226
|
} });
|
|
@@ -3233,13 +3233,13 @@ function yo(e, t) {
|
|
|
3233
3233
|
});
|
|
3234
3234
|
}
|
|
3235
3235
|
var bo = /*@__PURE__*/ E("ZodTransform", (e, t) => {
|
|
3236
|
-
|
|
3236
|
+
ur.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ji(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3237
3237
|
if (r.direction === "backward") throw new Ce(e.constructor.name);
|
|
3238
3238
|
n.addIssue = (r) => {
|
|
3239
|
-
if (typeof r == "string") n.issues.push(
|
|
3239
|
+
if (typeof r == "string") n.issues.push($e(r, n.value, t));
|
|
3240
3240
|
else {
|
|
3241
3241
|
let t = r;
|
|
3242
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(
|
|
3242
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push($e(t));
|
|
3243
3243
|
}
|
|
3244
3244
|
};
|
|
3245
3245
|
let i = t.transform(n.value, n);
|
|
@@ -3253,7 +3253,7 @@ function xo(e) {
|
|
|
3253
3253
|
});
|
|
3254
3254
|
}
|
|
3255
3255
|
var So = /*@__PURE__*/ E("ZodOptional", (e, t) => {
|
|
3256
|
-
|
|
3256
|
+
fr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => sa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3257
3257
|
});
|
|
3258
3258
|
function Co(e) {
|
|
3259
3259
|
return new So({
|
|
@@ -3262,7 +3262,7 @@ function Co(e) {
|
|
|
3262
3262
|
});
|
|
3263
3263
|
}
|
|
3264
3264
|
var wo = /*@__PURE__*/ E("ZodExactOptional", (e, t) => {
|
|
3265
|
-
|
|
3265
|
+
pr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => sa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3266
3266
|
});
|
|
3267
3267
|
function To(e) {
|
|
3268
3268
|
return new wo({
|
|
@@ -3271,7 +3271,7 @@ function To(e) {
|
|
|
3271
3271
|
});
|
|
3272
3272
|
}
|
|
3273
3273
|
var Eo = /*@__PURE__*/ E("ZodNullable", (e, t) => {
|
|
3274
|
-
|
|
3274
|
+
mr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => ea(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3275
3275
|
});
|
|
3276
3276
|
function Do(e) {
|
|
3277
3277
|
return new Eo({
|
|
@@ -3280,7 +3280,7 @@ function Do(e) {
|
|
|
3280
3280
|
});
|
|
3281
3281
|
}
|
|
3282
3282
|
var Oo = /*@__PURE__*/ E("ZodDefault", (e, t) => {
|
|
3283
|
-
|
|
3283
|
+
hr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => na(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3284
3284
|
});
|
|
3285
3285
|
function ko(e, t) {
|
|
3286
3286
|
return new Oo({
|
|
@@ -3292,7 +3292,7 @@ function ko(e, t) {
|
|
|
3292
3292
|
});
|
|
3293
3293
|
}
|
|
3294
3294
|
var Ao = /*@__PURE__*/ E("ZodPrefault", (e, t) => {
|
|
3295
|
-
|
|
3295
|
+
_r.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3296
3296
|
});
|
|
3297
3297
|
function jo(e, t) {
|
|
3298
3298
|
return new Ao({
|
|
@@ -3304,7 +3304,7 @@ function jo(e, t) {
|
|
|
3304
3304
|
});
|
|
3305
3305
|
}
|
|
3306
3306
|
var Mo = /*@__PURE__*/ E("ZodNonOptional", (e, t) => {
|
|
3307
|
-
|
|
3307
|
+
vr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3308
3308
|
});
|
|
3309
3309
|
function No(e, t) {
|
|
3310
3310
|
return new Mo({
|
|
@@ -3314,7 +3314,7 @@ function No(e, t) {
|
|
|
3314
3314
|
});
|
|
3315
3315
|
}
|
|
3316
3316
|
var Po = /*@__PURE__*/ E("ZodCatch", (e, t) => {
|
|
3317
|
-
|
|
3317
|
+
br.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => ia(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3318
3318
|
});
|
|
3319
3319
|
function Fo(e, t) {
|
|
3320
3320
|
return new Po({
|
|
@@ -3324,7 +3324,7 @@ function Fo(e, t) {
|
|
|
3324
3324
|
});
|
|
3325
3325
|
}
|
|
3326
3326
|
var Io = /*@__PURE__*/ E("ZodPipe", (e, t) => {
|
|
3327
|
-
|
|
3327
|
+
xr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => aa(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
3328
3328
|
});
|
|
3329
3329
|
function Lo(e, t) {
|
|
3330
3330
|
return new Io({
|
|
@@ -3334,7 +3334,7 @@ function Lo(e, t) {
|
|
|
3334
3334
|
});
|
|
3335
3335
|
}
|
|
3336
3336
|
var Ro = /*@__PURE__*/ E("ZodReadonly", (e, t) => {
|
|
3337
|
-
|
|
3337
|
+
Cr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => oa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3338
3338
|
});
|
|
3339
3339
|
function zo(e) {
|
|
3340
3340
|
return new Ro({
|
|
@@ -3343,7 +3343,7 @@ function zo(e) {
|
|
|
3343
3343
|
});
|
|
3344
3344
|
}
|
|
3345
3345
|
var Bo = /*@__PURE__*/ E("ZodCustom", (e, t) => {
|
|
3346
|
-
|
|
3346
|
+
Tr.init(e, t), H.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi(e, t, n, r);
|
|
3347
3347
|
});
|
|
3348
3348
|
function Vo(e, t = {}) {
|
|
3349
3349
|
return /* @__PURE__ */ ji(Bo, e, t);
|
|
@@ -3523,7 +3523,7 @@ Y.extend({ address: U().min(1) }), Y.extend({
|
|
|
3523
3523
|
});
|
|
3524
3524
|
//#endregion
|
|
3525
3525
|
//#region src/i18n/index.ts
|
|
3526
|
-
var { useT: Z, Trans: cs, translate: ls } =
|
|
3526
|
+
var { useT: Z, Trans: cs, translate: ls } = s("provider-homematic", {
|
|
3527
3527
|
en: {
|
|
3528
3528
|
common: { loading: "Loading…" },
|
|
3529
3529
|
write: { failedTitle: "The CCU refused the change" },
|
|
@@ -3911,7 +3911,7 @@ function $(e, n, o, s, c = {}) {
|
|
|
3911
3911
|
//#endregion
|
|
3912
3912
|
//#region src/ui/use-ccu-write.ts
|
|
3913
3913
|
function ms(e) {
|
|
3914
|
-
let t =
|
|
3914
|
+
let t = te(), n = y(), { t: r } = Z();
|
|
3915
3915
|
return i(async (i) => {
|
|
3916
3916
|
if (!await t({
|
|
3917
3917
|
title: i.title,
|
|
@@ -3956,9 +3956,9 @@ function gs(e) {
|
|
|
3956
3956
|
}) : void 0;
|
|
3957
3957
|
if (t.type === "BOOL") {
|
|
3958
3958
|
let e = typeof n == "boolean" ? n : t.value === !0;
|
|
3959
|
-
return /* @__PURE__ */ w(
|
|
3959
|
+
return /* @__PURE__ */ w(x, {
|
|
3960
3960
|
label: a,
|
|
3961
|
-
children: /* @__PURE__ */ w(
|
|
3961
|
+
children: /* @__PURE__ */ w(re, {
|
|
3962
3962
|
checked: e,
|
|
3963
3963
|
disabled: !t.writable,
|
|
3964
3964
|
onChange: () => r(!e)
|
|
@@ -3967,9 +3967,9 @@ function gs(e) {
|
|
|
3967
3967
|
}
|
|
3968
3968
|
if (t.type === "ENUM" && t.valueList !== null) {
|
|
3969
3969
|
let e = typeof n == "string" ? n : typeof t.value == "string" ? t.value : "";
|
|
3970
|
-
return /* @__PURE__ */ w(
|
|
3970
|
+
return /* @__PURE__ */ w(x, {
|
|
3971
3971
|
label: a,
|
|
3972
|
-
children: /* @__PURE__ */ w(
|
|
3972
|
+
children: /* @__PURE__ */ w(c, {
|
|
3973
3973
|
value: e,
|
|
3974
3974
|
disabled: !t.writable,
|
|
3975
3975
|
onChange: (e) => r(e.target.value),
|
|
@@ -3983,12 +3983,12 @@ function gs(e) {
|
|
|
3983
3983
|
})
|
|
3984
3984
|
});
|
|
3985
3985
|
}
|
|
3986
|
-
let
|
|
3987
|
-
return /* @__PURE__ */ w(
|
|
3986
|
+
let s = t.type === "INTEGER" || t.type === "FLOAT", l = typeof n == "string" ? n : t.value === null ? "" : String(t.value);
|
|
3987
|
+
return /* @__PURE__ */ w(x, {
|
|
3988
3988
|
label: a,
|
|
3989
3989
|
...o === void 0 ? {} : { description: o },
|
|
3990
|
-
children: /* @__PURE__ */ w(
|
|
3991
|
-
type:
|
|
3990
|
+
children: /* @__PURE__ */ w(f, {
|
|
3991
|
+
type: s ? "number" : "text",
|
|
3992
3992
|
value: l,
|
|
3993
3993
|
disabled: !t.writable,
|
|
3994
3994
|
...t.min === null ? {} : { min: t.min },
|
|
@@ -3998,147 +3998,147 @@ function gs(e) {
|
|
|
3998
3998
|
});
|
|
3999
3999
|
}
|
|
4000
4000
|
function _s(t) {
|
|
4001
|
-
let { trpc: n, integrationId: r, device: i, onClose: o } = t, { t: s } = Z(),
|
|
4001
|
+
let { trpc: n, integrationId: r, device: i, onClose: o } = t, { t: s } = Z(), l = ms(n), u = $(n, "getCcuDeviceConfig", e(() => ({
|
|
4002
4002
|
integrationId: r,
|
|
4003
4003
|
address: i.address
|
|
4004
|
-
}), [r, i.address]), ss), [d,
|
|
4004
|
+
}), [r, i.address]), ss), [d, f] = a(null), [m, h] = a({}), [g, v] = a(!1), y = u.data?.channels ?? [], b = y.find((e) => e.channel === d) ?? y[0], ee = e(() => {
|
|
4005
4005
|
let e = {};
|
|
4006
|
-
for (let t of
|
|
4007
|
-
let n =
|
|
4006
|
+
for (let t of b?.params ?? []) {
|
|
4007
|
+
let n = m[`${b?.channel}/${t.parameter}`];
|
|
4008
4008
|
if (n === void 0) continue;
|
|
4009
4009
|
let r = hs(t, n);
|
|
4010
4010
|
r !== void 0 && r !== t.value && (e[t.parameter] = r);
|
|
4011
4011
|
}
|
|
4012
4012
|
return e;
|
|
4013
|
-
}, [
|
|
4014
|
-
if (
|
|
4015
|
-
|
|
4013
|
+
}, [b, m]), te = Object.keys(ee).length, ne = async () => {
|
|
4014
|
+
if (b !== void 0) {
|
|
4015
|
+
v(!0);
|
|
4016
4016
|
try {
|
|
4017
|
-
await
|
|
4017
|
+
await l({
|
|
4018
4018
|
action: "setCcuChannelConfig",
|
|
4019
4019
|
input: {
|
|
4020
4020
|
integrationId: r,
|
|
4021
|
-
channel:
|
|
4021
|
+
channel: b.channel,
|
|
4022
4022
|
values: ee
|
|
4023
4023
|
},
|
|
4024
4024
|
schema: Yo,
|
|
4025
4025
|
title: s("config.confirmTitle"),
|
|
4026
4026
|
message: s("config.confirmMessage", {
|
|
4027
|
-
channel:
|
|
4027
|
+
channel: b.channel,
|
|
4028
4028
|
count: te,
|
|
4029
4029
|
names: Object.keys(ee).join(", ")
|
|
4030
4030
|
}),
|
|
4031
4031
|
confirmLabel: s("config.confirmLabel"),
|
|
4032
4032
|
variant: "warning"
|
|
4033
|
-
}) !== null && (
|
|
4033
|
+
}) !== null && (h({}), u.reload());
|
|
4034
4034
|
} finally {
|
|
4035
|
-
|
|
4035
|
+
v(!1);
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
4038
|
};
|
|
4039
|
-
return /* @__PURE__ */ w(
|
|
4039
|
+
return /* @__PURE__ */ w(p, {
|
|
4040
4040
|
open: !0,
|
|
4041
4041
|
onClose: o,
|
|
4042
4042
|
icon: ve,
|
|
4043
4043
|
width: "lg",
|
|
4044
4044
|
title: s("config.title", { name: i.name ?? i.address }),
|
|
4045
4045
|
testId: "hm-config-dialog",
|
|
4046
|
-
footer: /* @__PURE__ */ w(
|
|
4046
|
+
footer: /* @__PURE__ */ w(S, {
|
|
4047
4047
|
type: "button",
|
|
4048
4048
|
onClick: () => void ne(),
|
|
4049
|
-
disabled: te === 0 ||
|
|
4049
|
+
disabled: te === 0 || g,
|
|
4050
4050
|
children: s("config.save")
|
|
4051
4051
|
}),
|
|
4052
|
-
children:
|
|
4052
|
+
children: u.error === null ? u.data === void 0 ? /* @__PURE__ */ w("p", {
|
|
4053
4053
|
className: "text-sm text-foreground-subtle",
|
|
4054
4054
|
children: s("common.loading")
|
|
4055
|
-
}) :
|
|
4055
|
+
}) : b === void 0 ? /* @__PURE__ */ w("p", {
|
|
4056
4056
|
className: "text-sm text-foreground-subtle",
|
|
4057
4057
|
children: s("config.none")
|
|
4058
4058
|
}) : /* @__PURE__ */ C("div", {
|
|
4059
4059
|
className: "flex flex-col gap-3",
|
|
4060
4060
|
children: [
|
|
4061
|
-
|
|
4061
|
+
y.length > 1 && /* @__PURE__ */ w(x, {
|
|
4062
4062
|
label: s("config.channel"),
|
|
4063
|
-
children: /* @__PURE__ */ w(
|
|
4064
|
-
value:
|
|
4063
|
+
children: /* @__PURE__ */ w(c, {
|
|
4064
|
+
value: b.channel,
|
|
4065
4065
|
onChange: (e) => {
|
|
4066
|
-
|
|
4066
|
+
f(e.target.value), h({});
|
|
4067
4067
|
},
|
|
4068
|
-
options:
|
|
4068
|
+
options: y.map((e) => ({
|
|
4069
4069
|
value: e.channel,
|
|
4070
4070
|
label: e.channelType === null ? e.channel : `${e.channel} · ${e.channelType}`
|
|
4071
4071
|
}))
|
|
4072
4072
|
})
|
|
4073
4073
|
}),
|
|
4074
|
-
|
|
4074
|
+
b.error !== null && /* @__PURE__ */ w("p", {
|
|
4075
4075
|
className: "text-xs text-danger",
|
|
4076
|
-
children: s("config.valuesUnreadable", { error:
|
|
4076
|
+
children: s("config.valuesUnreadable", { error: b.error })
|
|
4077
4077
|
}),
|
|
4078
|
-
|
|
4078
|
+
b.params.map((e) => /* @__PURE__ */ w(gs, {
|
|
4079
4079
|
param: e,
|
|
4080
|
-
edit:
|
|
4081
|
-
onEdit: (t) =>
|
|
4080
|
+
edit: m[`${b.channel}/${e.parameter}`],
|
|
4081
|
+
onEdit: (t) => h((n) => ({
|
|
4082
4082
|
...n,
|
|
4083
|
-
[`${
|
|
4083
|
+
[`${b.channel}/${e.parameter}`]: t
|
|
4084
4084
|
}))
|
|
4085
4085
|
}, e.parameter))
|
|
4086
4086
|
]
|
|
4087
|
-
}) : /* @__PURE__ */ w(
|
|
4087
|
+
}) : /* @__PURE__ */ w(_, {
|
|
4088
4088
|
title: s("config.loadFailed"),
|
|
4089
|
-
message:
|
|
4090
|
-
onRetry:
|
|
4089
|
+
message: u.error,
|
|
4090
|
+
onRetry: u.reload
|
|
4091
4091
|
})
|
|
4092
4092
|
});
|
|
4093
4093
|
}
|
|
4094
4094
|
//#endregion
|
|
4095
4095
|
//#region src/ui/DeleteDeviceDialog.tsx
|
|
4096
4096
|
function vs(e) {
|
|
4097
|
-
let { device: t, onClose: n, onDelete: r } = e, { t: i } = Z(), [o,
|
|
4098
|
-
|
|
4097
|
+
let { device: t, onClose: n, onDelete: r } = e, { t: i } = Z(), [o, s] = a(!1), [c, l] = a(!1), [u, d] = a(!1), f = async () => {
|
|
4098
|
+
d(!0);
|
|
4099
4099
|
try {
|
|
4100
4100
|
await r({
|
|
4101
4101
|
reset: o,
|
|
4102
|
-
force:
|
|
4102
|
+
force: c
|
|
4103
4103
|
});
|
|
4104
4104
|
} finally {
|
|
4105
|
-
|
|
4105
|
+
d(!1);
|
|
4106
4106
|
}
|
|
4107
4107
|
};
|
|
4108
|
-
return /* @__PURE__ */ w(
|
|
4108
|
+
return /* @__PURE__ */ w(p, {
|
|
4109
4109
|
open: !0,
|
|
4110
4110
|
onClose: n,
|
|
4111
4111
|
icon: ye,
|
|
4112
4112
|
width: "md",
|
|
4113
4113
|
title: i("devices.deleteDialogTitle", { name: t.name ?? t.address }),
|
|
4114
4114
|
testId: "hm-delete-device-dialog",
|
|
4115
|
-
footer: /* @__PURE__ */ w(
|
|
4115
|
+
footer: /* @__PURE__ */ w(S, {
|
|
4116
4116
|
type: "button",
|
|
4117
4117
|
variant: "danger",
|
|
4118
|
-
onClick: () => void
|
|
4119
|
-
disabled:
|
|
4118
|
+
onClick: () => void f(),
|
|
4119
|
+
disabled: u,
|
|
4120
4120
|
children: i("devices.deleteContinue")
|
|
4121
4121
|
}),
|
|
4122
4122
|
children: /* @__PURE__ */ C("div", {
|
|
4123
4123
|
className: "flex flex-col gap-3",
|
|
4124
|
-
children: [/* @__PURE__ */ w(
|
|
4124
|
+
children: [/* @__PURE__ */ w(x, {
|
|
4125
4125
|
label: i("devices.deleteResetLabel"),
|
|
4126
4126
|
description: i("devices.deleteResetHint"),
|
|
4127
4127
|
children: /* @__PURE__ */ C("label", {
|
|
4128
4128
|
className: "flex items-center gap-2 text-sm text-foreground",
|
|
4129
|
-
children: [/* @__PURE__ */ w(
|
|
4129
|
+
children: [/* @__PURE__ */ w(re, {
|
|
4130
4130
|
checked: o,
|
|
4131
|
-
onChange: () =>
|
|
4131
|
+
onChange: () => s(!o)
|
|
4132
4132
|
}), /* @__PURE__ */ w("span", { children: i("devices.deleteResetOption") })]
|
|
4133
4133
|
})
|
|
4134
|
-
}), /* @__PURE__ */ w(
|
|
4134
|
+
}), /* @__PURE__ */ w(x, {
|
|
4135
4135
|
label: i("devices.deleteForceLabel"),
|
|
4136
4136
|
description: i("devices.deleteForceHint"),
|
|
4137
4137
|
children: /* @__PURE__ */ C("label", {
|
|
4138
4138
|
className: "flex items-center gap-2 text-sm text-foreground",
|
|
4139
|
-
children: [/* @__PURE__ */ w(
|
|
4140
|
-
checked:
|
|
4141
|
-
onChange: () =>
|
|
4139
|
+
children: [/* @__PURE__ */ w(re, {
|
|
4140
|
+
checked: c,
|
|
4141
|
+
onChange: () => l(!c)
|
|
4142
4142
|
}), /* @__PURE__ */ w("span", { children: i("devices.deleteForceOption") })]
|
|
4143
4143
|
})
|
|
4144
4144
|
})]
|
|
@@ -4170,7 +4170,7 @@ function xs(e) {
|
|
|
4170
4170
|
return e.rssi === null ? "—" : `${e.rssi} dBm`;
|
|
4171
4171
|
}
|
|
4172
4172
|
function Ss(t) {
|
|
4173
|
-
let { trpc: n, integrationId: r } = t, { t: i } = Z(), o = $(n, "listCcuDevices", e(() => ({ integrationId: r }), [r]), Xo), s =
|
|
4173
|
+
let { trpc: n, integrationId: r } = t, { t: i } = Z(), o = $(n, "listCcuDevices", e(() => ({ integrationId: r }), [r]), Xo), s = g(e(() => o.data?.devices ?? [], [o.data]), bs), c = ms(n), [u, d] = a(null), [f, p] = a(null), m = async (e, t) => {
|
|
4174
4174
|
await c({
|
|
4175
4175
|
action: "deleteCcuDevice",
|
|
4176
4176
|
input: {
|
|
@@ -4185,7 +4185,7 @@ function Ss(t) {
|
|
|
4185
4185
|
confirmLabel: i("devices.deleteConfirm"),
|
|
4186
4186
|
variant: "danger"
|
|
4187
4187
|
}) !== null && (d(null), o.reload());
|
|
4188
|
-
},
|
|
4188
|
+
}, h = e(() => [
|
|
4189
4189
|
{
|
|
4190
4190
|
key: "name",
|
|
4191
4191
|
header: i("devices.colDevice"),
|
|
@@ -4219,7 +4219,7 @@ function Ss(t) {
|
|
|
4219
4219
|
header: i("devices.colFirmware"),
|
|
4220
4220
|
render: (e) => /* @__PURE__ */ C("span", {
|
|
4221
4221
|
className: "flex items-center gap-1",
|
|
4222
|
-
children: [Q(e.firmware), e.updatable === !0 && e.availableFirmware !== null && /* @__PURE__ */ w(
|
|
4222
|
+
children: [Q(e.firmware), e.updatable === !0 && e.availableFirmware !== null && /* @__PURE__ */ w(v, {
|
|
4223
4223
|
variant: "info",
|
|
4224
4224
|
children: i("devices.updateTo", { version: e.availableFirmware })
|
|
4225
4225
|
})]
|
|
@@ -4237,7 +4237,7 @@ function Ss(t) {
|
|
|
4237
4237
|
key: "duty",
|
|
4238
4238
|
header: i("devices.colDutyCycle"),
|
|
4239
4239
|
align: "right",
|
|
4240
|
-
render: (e) => e.dutyCycleLimited === !0 ? /* @__PURE__ */ w(
|
|
4240
|
+
render: (e) => e.dutyCycleLimited === !0 ? /* @__PURE__ */ w(v, {
|
|
4241
4241
|
variant: "warning",
|
|
4242
4242
|
children: i("devices.dutyLimited")
|
|
4243
4243
|
}) : us(e.dutyCycle),
|
|
@@ -4251,23 +4251,23 @@ function Ss(t) {
|
|
|
4251
4251
|
render: (e) => /* @__PURE__ */ C("span", {
|
|
4252
4252
|
className: "flex flex-wrap gap-1",
|
|
4253
4253
|
children: [
|
|
4254
|
-
e.unreach === !0 && /* @__PURE__ */ w(
|
|
4254
|
+
e.unreach === !0 && /* @__PURE__ */ w(v, {
|
|
4255
4255
|
variant: "danger",
|
|
4256
4256
|
children: i("devices.unreach")
|
|
4257
4257
|
}),
|
|
4258
|
-
e.sabotage === !0 && /* @__PURE__ */ w(
|
|
4258
|
+
e.sabotage === !0 && /* @__PURE__ */ w(v, {
|
|
4259
4259
|
variant: "danger",
|
|
4260
4260
|
children: i("devices.sabotage")
|
|
4261
4261
|
}),
|
|
4262
|
-
e.lowBattery === !0 && /* @__PURE__ */ w(
|
|
4262
|
+
e.lowBattery === !0 && /* @__PURE__ */ w(v, {
|
|
4263
4263
|
variant: "warning",
|
|
4264
4264
|
children: i("devices.lowBattery")
|
|
4265
4265
|
}),
|
|
4266
|
-
e.configPending === !0 && /* @__PURE__ */ w(
|
|
4266
|
+
e.configPending === !0 && /* @__PURE__ */ w(v, {
|
|
4267
4267
|
variant: "info",
|
|
4268
4268
|
children: i("devices.configPending")
|
|
4269
4269
|
}),
|
|
4270
|
-
ys(e) === "ok" && /* @__PURE__ */ w(
|
|
4270
|
+
ys(e) === "ok" && /* @__PURE__ */ w(v, {
|
|
4271
4271
|
variant: "success",
|
|
4272
4272
|
children: i("devices.ok")
|
|
4273
4273
|
})
|
|
@@ -4279,11 +4279,11 @@ function Ss(t) {
|
|
|
4279
4279
|
header: "",
|
|
4280
4280
|
align: "right",
|
|
4281
4281
|
notSortableReason: "Action column",
|
|
4282
|
-
render: (e) => /* @__PURE__ */ w(
|
|
4282
|
+
render: (e) => /* @__PURE__ */ w(ee, { items: [{
|
|
4283
4283
|
id: "configure",
|
|
4284
4284
|
label: i("devices.configureAction"),
|
|
4285
4285
|
icon: ve,
|
|
4286
|
-
onClick: () =>
|
|
4286
|
+
onClick: () => p(e)
|
|
4287
4287
|
}, {
|
|
4288
4288
|
id: "delete",
|
|
4289
4289
|
label: i("devices.deleteAction"),
|
|
@@ -4293,25 +4293,25 @@ function Ss(t) {
|
|
|
4293
4293
|
}] })
|
|
4294
4294
|
}
|
|
4295
4295
|
], [i]);
|
|
4296
|
-
if (o.error !== null) return /* @__PURE__ */ w(
|
|
4296
|
+
if (o.error !== null) return /* @__PURE__ */ w(_, {
|
|
4297
4297
|
title: i("devices.loadFailed"),
|
|
4298
4298
|
message: o.error,
|
|
4299
4299
|
onRetry: o.reload
|
|
4300
4300
|
});
|
|
4301
|
-
let
|
|
4301
|
+
let y = {
|
|
4302
4302
|
issue: i("devices.groupIssue"),
|
|
4303
4303
|
type: i("devices.groupType")
|
|
4304
|
-
},
|
|
4304
|
+
}, te = (e) => e === "unreach" || e === "sabotage" || e === "lowBattery" || e === "configPending" || e === "ok" ? i(`devices.${e}`) : e;
|
|
4305
4305
|
return /* @__PURE__ */ C("div", {
|
|
4306
4306
|
className: "flex flex-col gap-3",
|
|
4307
4307
|
children: [
|
|
4308
|
-
/* @__PURE__ */ w(
|
|
4308
|
+
/* @__PURE__ */ w(b, {
|
|
4309
4309
|
state: s.state,
|
|
4310
4310
|
facets: s.facets,
|
|
4311
4311
|
groups: s.groups.map((e) => ({
|
|
4312
4312
|
...e,
|
|
4313
|
-
label:
|
|
4314
|
-
...e.id === "issue" ? { facetLabel:
|
|
4313
|
+
label: y[e.id] ?? e.id,
|
|
4314
|
+
...e.id === "issue" ? { facetLabel: te } : {}
|
|
4315
4315
|
})),
|
|
4316
4316
|
labels: {
|
|
4317
4317
|
searchPlaceholder: i("devices.searchPlaceholder"),
|
|
@@ -4324,8 +4324,8 @@ function Ss(t) {
|
|
|
4324
4324
|
onToggleGroupFacet: s.toggleGroupFacet,
|
|
4325
4325
|
onClear: s.clear
|
|
4326
4326
|
}),
|
|
4327
|
-
/* @__PURE__ */ w(
|
|
4328
|
-
columns:
|
|
4327
|
+
/* @__PURE__ */ w(l, {
|
|
4328
|
+
columns: h,
|
|
4329
4329
|
rows: s.rows,
|
|
4330
4330
|
rowKey: (e) => e.address,
|
|
4331
4331
|
minWidthPx: 760,
|
|
@@ -4336,12 +4336,12 @@ function Ss(t) {
|
|
|
4336
4336
|
trpc: n,
|
|
4337
4337
|
integrationId: r,
|
|
4338
4338
|
device: f,
|
|
4339
|
-
onClose: () =>
|
|
4339
|
+
onClose: () => p(null)
|
|
4340
4340
|
}),
|
|
4341
4341
|
u !== null && /* @__PURE__ */ w(vs, {
|
|
4342
4342
|
device: u,
|
|
4343
4343
|
onClose: () => d(null),
|
|
4344
|
-
onDelete: (e) =>
|
|
4344
|
+
onDelete: (e) => m(u, e)
|
|
4345
4345
|
})
|
|
4346
4346
|
]
|
|
4347
4347
|
});
|
|
@@ -4349,54 +4349,54 @@ function Ss(t) {
|
|
|
4349
4349
|
//#endregion
|
|
4350
4350
|
//#region src/ui/GroupFormDialog.tsx
|
|
4351
4351
|
function Cs(e) {
|
|
4352
|
-
let { group: t, candidates: n, onClose: r, onSave: i } = e, { t: o } = Z(), [
|
|
4353
|
-
|
|
4352
|
+
let { group: t, candidates: n, onClose: r, onSave: i } = e, { t: o } = Z(), [s, l] = a(t?.name ?? ""), [u, d] = a(t?.type ?? Zo[0]), [m, h] = a(() => t?.members.map((e) => e.address) ?? []), [g, _] = a(!1), v = (e) => h((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), y = s.trim() !== "" && m.length > 0 && !g, b = async () => {
|
|
4353
|
+
_(!0);
|
|
4354
4354
|
try {
|
|
4355
4355
|
await i({
|
|
4356
|
-
name:
|
|
4357
|
-
type:
|
|
4358
|
-
members:
|
|
4356
|
+
name: s,
|
|
4357
|
+
type: u,
|
|
4358
|
+
members: m
|
|
4359
4359
|
});
|
|
4360
4360
|
} finally {
|
|
4361
|
-
|
|
4361
|
+
_(!1);
|
|
4362
4362
|
}
|
|
4363
4363
|
};
|
|
4364
|
-
return /* @__PURE__ */ w(
|
|
4364
|
+
return /* @__PURE__ */ w(p, {
|
|
4365
4365
|
open: !0,
|
|
4366
4366
|
onClose: r,
|
|
4367
4367
|
icon: pe,
|
|
4368
4368
|
width: "md",
|
|
4369
4369
|
title: t === null ? o("heating.newGroup") : o("heating.editGroup", { name: t.name }),
|
|
4370
4370
|
testId: "hm-group-dialog",
|
|
4371
|
-
footer: /* @__PURE__ */ w(
|
|
4371
|
+
footer: /* @__PURE__ */ w(S, {
|
|
4372
4372
|
type: "button",
|
|
4373
|
-
onClick: () => void
|
|
4374
|
-
disabled: !
|
|
4373
|
+
onClick: () => void b(),
|
|
4374
|
+
disabled: !y,
|
|
4375
4375
|
children: o("heating.save")
|
|
4376
4376
|
}),
|
|
4377
4377
|
children: /* @__PURE__ */ C("div", {
|
|
4378
4378
|
className: "flex flex-col gap-3",
|
|
4379
4379
|
children: [
|
|
4380
|
-
/* @__PURE__ */ w(
|
|
4380
|
+
/* @__PURE__ */ w(x, {
|
|
4381
4381
|
label: o("heating.fieldName"),
|
|
4382
4382
|
required: !0,
|
|
4383
|
-
children: /* @__PURE__ */ w(
|
|
4384
|
-
value:
|
|
4383
|
+
children: /* @__PURE__ */ w(f, {
|
|
4384
|
+
value: s,
|
|
4385
4385
|
onChange: (e) => l(e.target.value)
|
|
4386
4386
|
})
|
|
4387
4387
|
}),
|
|
4388
|
-
t === null && /* @__PURE__ */ w(
|
|
4388
|
+
t === null && /* @__PURE__ */ w(x, {
|
|
4389
4389
|
label: o("heating.fieldType"),
|
|
4390
|
-
children: /* @__PURE__ */ w(
|
|
4391
|
-
value:
|
|
4392
|
-
onChange: (e) =>
|
|
4390
|
+
children: /* @__PURE__ */ w(c, {
|
|
4391
|
+
value: u,
|
|
4392
|
+
onChange: (e) => d(e.target.value),
|
|
4393
4393
|
options: Zo.map((e) => ({
|
|
4394
4394
|
value: e,
|
|
4395
4395
|
label: o(e === "hmip.heating.group" ? "heating.typeHmip" : "heating.typeHomematic")
|
|
4396
4396
|
}))
|
|
4397
4397
|
})
|
|
4398
4398
|
}),
|
|
4399
|
-
/* @__PURE__ */ w(
|
|
4399
|
+
/* @__PURE__ */ w(x, {
|
|
4400
4400
|
label: o("heating.fieldMembers"),
|
|
4401
4401
|
description: o("heating.fieldMembersHint"),
|
|
4402
4402
|
children: n.length === 0 ? /* @__PURE__ */ w("p", {
|
|
@@ -4407,9 +4407,9 @@ function Cs(e) {
|
|
|
4407
4407
|
children: n.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ C("label", {
|
|
4408
4408
|
className: "flex items-center gap-2 text-sm text-foreground",
|
|
4409
4409
|
children: [
|
|
4410
|
-
/* @__PURE__ */ w(
|
|
4411
|
-
checked:
|
|
4412
|
-
onChange: () =>
|
|
4410
|
+
/* @__PURE__ */ w(re, {
|
|
4411
|
+
checked: m.includes(e.address),
|
|
4412
|
+
onChange: () => v(e.address)
|
|
4413
4413
|
}),
|
|
4414
4414
|
/* @__PURE__ */ w("span", { children: e.deviceName ?? e.address }),
|
|
4415
4415
|
/* @__PURE__ */ w("span", {
|
|
@@ -4430,7 +4430,7 @@ function ws(e) {
|
|
|
4430
4430
|
return e === null ? "—" : `${e} °C`;
|
|
4431
4431
|
}
|
|
4432
4432
|
function Ts(t) {
|
|
4433
|
-
let { trpc: n, integrationId: r } = t, { t: i } = Z(), o = $(n, "listHeatingGroups", e(() => ({ integrationId: r }), [r]), ns), s = ms(n), [c,
|
|
4433
|
+
let { trpc: n, integrationId: r } = t, { t: i } = Z(), o = $(n, "listHeatingGroups", e(() => ({ integrationId: r }), [r]), ns), s = ms(n), [c, u] = a({ kind: "closed" }), d = async (e, t) => {
|
|
4434
4434
|
(e === null ? await s({
|
|
4435
4435
|
action: "createHeatingGroup",
|
|
4436
4436
|
input: {
|
|
@@ -4461,7 +4461,7 @@ function Ts(t) {
|
|
|
4461
4461
|
count: t.members.length
|
|
4462
4462
|
}),
|
|
4463
4463
|
confirmLabel: i("heating.updateConfirm")
|
|
4464
|
-
})) !== null && (
|
|
4464
|
+
})) !== null && (u({ kind: "closed" }), o.reload());
|
|
4465
4465
|
}, f = async (e) => {
|
|
4466
4466
|
await s({
|
|
4467
4467
|
action: "deleteHeatingGroup",
|
|
@@ -4475,7 +4475,7 @@ function Ts(t) {
|
|
|
4475
4475
|
confirmLabel: i("heating.deleteConfirm"),
|
|
4476
4476
|
variant: "danger"
|
|
4477
4477
|
}) !== null && o.reload();
|
|
4478
|
-
},
|
|
4478
|
+
}, p = [
|
|
4479
4479
|
{
|
|
4480
4480
|
key: "name",
|
|
4481
4481
|
header: i("heating.colGroup"),
|
|
@@ -4500,11 +4500,11 @@ function Ts(t) {
|
|
|
4500
4500
|
header: "",
|
|
4501
4501
|
align: "right",
|
|
4502
4502
|
notSortableReason: "Action column",
|
|
4503
|
-
render: (e) => /* @__PURE__ */ w(
|
|
4503
|
+
render: (e) => /* @__PURE__ */ w(ee, { items: [{
|
|
4504
4504
|
id: "edit",
|
|
4505
4505
|
label: i("heating.edit"),
|
|
4506
4506
|
icon: me,
|
|
4507
|
-
onClick: () =>
|
|
4507
|
+
onClick: () => u({
|
|
4508
4508
|
kind: "form",
|
|
4509
4509
|
group: e
|
|
4510
4510
|
})
|
|
@@ -4515,7 +4515,7 @@ function Ts(t) {
|
|
|
4515
4515
|
onClick: () => void f(e)
|
|
4516
4516
|
}] })
|
|
4517
4517
|
}
|
|
4518
|
-
],
|
|
4518
|
+
], m = [
|
|
4519
4519
|
{
|
|
4520
4520
|
key: "name",
|
|
4521
4521
|
header: i("heating.colThermostat"),
|
|
@@ -4545,62 +4545,62 @@ function Ts(t) {
|
|
|
4545
4545
|
{
|
|
4546
4546
|
key: "activity",
|
|
4547
4547
|
header: i("heating.colActivity"),
|
|
4548
|
-
render: (e) => /* @__PURE__ */ w(
|
|
4548
|
+
render: (e) => /* @__PURE__ */ w(v, {
|
|
4549
4549
|
variant: e.activity === "heating" ? "warning" : "default",
|
|
4550
4550
|
children: i(`heating.activity_${e.activity}`)
|
|
4551
4551
|
}),
|
|
4552
4552
|
sortValue: (e) => e.activity
|
|
4553
4553
|
}
|
|
4554
4554
|
];
|
|
4555
|
-
if (o.error !== null) return /* @__PURE__ */ w(
|
|
4555
|
+
if (o.error !== null) return /* @__PURE__ */ w(_, {
|
|
4556
4556
|
title: i("heating.loadFailed"),
|
|
4557
4557
|
message: o.error,
|
|
4558
4558
|
onRetry: o.reload
|
|
4559
4559
|
});
|
|
4560
|
-
let
|
|
4560
|
+
let g = o.data;
|
|
4561
4561
|
return /* @__PURE__ */ C("div", {
|
|
4562
4562
|
className: "flex flex-col gap-3",
|
|
4563
4563
|
children: [
|
|
4564
|
-
/* @__PURE__ */ w(
|
|
4564
|
+
/* @__PURE__ */ w(h, {
|
|
4565
4565
|
headingId: "hm-heating-groups",
|
|
4566
4566
|
title: i("heating.groupsTitle"),
|
|
4567
|
-
actions: /* @__PURE__ */ C(
|
|
4567
|
+
actions: /* @__PURE__ */ C(S, {
|
|
4568
4568
|
type: "button",
|
|
4569
4569
|
size: "sm",
|
|
4570
|
-
disabled:
|
|
4571
|
-
onClick: () =>
|
|
4570
|
+
disabled: g === void 0 || g.groupsError !== null,
|
|
4571
|
+
onClick: () => u({
|
|
4572
4572
|
kind: "form",
|
|
4573
4573
|
group: null
|
|
4574
4574
|
}),
|
|
4575
4575
|
children: [/* @__PURE__ */ w(he, { className: "h-4 w-4" }), i("heating.newGroup")]
|
|
4576
4576
|
}),
|
|
4577
|
-
children:
|
|
4577
|
+
children: g?.groupsError ? /* @__PURE__ */ w(_, {
|
|
4578
4578
|
variant: "warning",
|
|
4579
4579
|
title: i("heating.groupsUnavailable"),
|
|
4580
|
-
message:
|
|
4581
|
-
}) : /* @__PURE__ */ w(
|
|
4582
|
-
columns:
|
|
4583
|
-
rows:
|
|
4580
|
+
message: g.groupsError
|
|
4581
|
+
}) : /* @__PURE__ */ w(l, {
|
|
4582
|
+
columns: p,
|
|
4583
|
+
rows: g?.groups ?? [],
|
|
4584
4584
|
rowKey: (e) => e.id,
|
|
4585
4585
|
minWidthPx: 520,
|
|
4586
4586
|
emptyMessage: o.loading ? i("common.loading") : i("heating.noGroups")
|
|
4587
4587
|
})
|
|
4588
4588
|
}),
|
|
4589
|
-
/* @__PURE__ */ w(
|
|
4589
|
+
/* @__PURE__ */ w(h, {
|
|
4590
4590
|
headingId: "hm-heating-thermostats",
|
|
4591
4591
|
title: i("heating.thermostatsTitle"),
|
|
4592
|
-
children: /* @__PURE__ */ w(
|
|
4593
|
-
columns:
|
|
4594
|
-
rows:
|
|
4592
|
+
children: /* @__PURE__ */ w(l, {
|
|
4593
|
+
columns: m,
|
|
4594
|
+
rows: g?.thermostats ?? [],
|
|
4595
4595
|
rowKey: (e) => e.channel,
|
|
4596
4596
|
minWidthPx: 520,
|
|
4597
4597
|
emptyMessage: o.loading ? i("common.loading") : i("heating.noThermostats")
|
|
4598
4598
|
})
|
|
4599
4599
|
}),
|
|
4600
|
-
c.kind === "form" &&
|
|
4600
|
+
c.kind === "form" && g !== void 0 && /* @__PURE__ */ w(Cs, {
|
|
4601
4601
|
group: c.group,
|
|
4602
|
-
candidates:
|
|
4603
|
-
onClose: () =>
|
|
4602
|
+
candidates: g.candidates,
|
|
4603
|
+
onClose: () => u({ kind: "closed" }),
|
|
4604
4604
|
onSave: (e) => d(c.group, e)
|
|
4605
4605
|
})
|
|
4606
4606
|
]
|
|
@@ -4612,8 +4612,8 @@ function Es(e) {
|
|
|
4612
4612
|
return e === null ? "unknown" : e ? "online" : "offline";
|
|
4613
4613
|
}
|
|
4614
4614
|
function Ds(t) {
|
|
4615
|
-
let { trpc: n, integrationId: r } = t, { t: i } = Z(), a = e(() => ({ integrationId: r }), [r]), o = $(n, "ccuOverview", a, qo), s = $(n, "listServiceMessages", a, Jo),
|
|
4616
|
-
await
|
|
4615
|
+
let { trpc: n, integrationId: r } = t, { t: i } = Z(), a = e(() => ({ integrationId: r }), [r]), o = $(n, "ccuOverview", a, qo), s = $(n, "listServiceMessages", a, Jo), c = ms(n), f = async (e) => {
|
|
4616
|
+
await c({
|
|
4617
4617
|
action: "acknowledgeServiceMessage",
|
|
4618
4618
|
input: {
|
|
4619
4619
|
integrationId: r,
|
|
@@ -4627,7 +4627,7 @@ function Ds(t) {
|
|
|
4627
4627
|
}),
|
|
4628
4628
|
confirmLabel: i("overview.ackConfirm")
|
|
4629
4629
|
}) !== null && s.reload();
|
|
4630
|
-
},
|
|
4630
|
+
}, p = [
|
|
4631
4631
|
{
|
|
4632
4632
|
key: "name",
|
|
4633
4633
|
header: i("overview.colInterface"),
|
|
@@ -4637,7 +4637,7 @@ function Ds(t) {
|
|
|
4637
4637
|
{
|
|
4638
4638
|
key: "state",
|
|
4639
4639
|
header: i("overview.colState"),
|
|
4640
|
-
render: (e) => /* @__PURE__ */ w(
|
|
4640
|
+
render: (e) => /* @__PURE__ */ w(u, { status: Es(e.connected) }),
|
|
4641
4641
|
sortValue: (e) => e.connected === null ? null : +!!e.connected
|
|
4642
4642
|
},
|
|
4643
4643
|
{
|
|
@@ -4666,7 +4666,7 @@ function Ds(t) {
|
|
|
4666
4666
|
render: (e) => e.gateways.length,
|
|
4667
4667
|
sortValue: (e) => e.gateways.length
|
|
4668
4668
|
}
|
|
4669
|
-
],
|
|
4669
|
+
], m = [
|
|
4670
4670
|
{
|
|
4671
4671
|
key: "time",
|
|
4672
4672
|
header: i("overview.colWhen"),
|
|
@@ -4676,7 +4676,7 @@ function Ds(t) {
|
|
|
4676
4676
|
{
|
|
4677
4677
|
key: "type",
|
|
4678
4678
|
header: i("overview.colMessage"),
|
|
4679
|
-
render: (e) => /* @__PURE__ */ w(
|
|
4679
|
+
render: (e) => /* @__PURE__ */ w(v, {
|
|
4680
4680
|
variant: "warning",
|
|
4681
4681
|
children: Q(e.type)
|
|
4682
4682
|
}),
|
|
@@ -4693,79 +4693,79 @@ function Ds(t) {
|
|
|
4693
4693
|
header: "",
|
|
4694
4694
|
align: "right",
|
|
4695
4695
|
notSortableReason: "Action column",
|
|
4696
|
-
render: (e) => e.acknowledgeable ? /* @__PURE__ */ w(
|
|
4696
|
+
render: (e) => e.acknowledgeable ? /* @__PURE__ */ w(S, {
|
|
4697
4697
|
type: "button",
|
|
4698
4698
|
size: "sm",
|
|
4699
4699
|
variant: "outline",
|
|
4700
|
-
onClick: () => void
|
|
4700
|
+
onClick: () => void f(e),
|
|
4701
4701
|
children: i("overview.ack")
|
|
4702
4702
|
}) : null
|
|
4703
4703
|
}
|
|
4704
|
-
],
|
|
4704
|
+
], g = o.data?.info ?? null;
|
|
4705
4705
|
return /* @__PURE__ */ C("div", {
|
|
4706
4706
|
className: "flex flex-col gap-3",
|
|
4707
4707
|
children: [
|
|
4708
|
-
o.error !== null && /* @__PURE__ */ w(
|
|
4708
|
+
o.error !== null && /* @__PURE__ */ w(_, {
|
|
4709
4709
|
title: i("overview.loadFailed"),
|
|
4710
4710
|
message: o.error,
|
|
4711
4711
|
onRetry: o.reload
|
|
4712
4712
|
}),
|
|
4713
|
-
/* @__PURE__ */ w(
|
|
4713
|
+
/* @__PURE__ */ w(h, {
|
|
4714
4714
|
headingId: "hm-ccu-info",
|
|
4715
4715
|
title: i("overview.ccuTitle"),
|
|
4716
4716
|
icon: _e,
|
|
4717
|
-
children: o.loading && o.data === void 0 ? /* @__PURE__ */ w(
|
|
4717
|
+
children: o.loading && o.data === void 0 ? /* @__PURE__ */ w(ie, { className: "h-16 w-full" }) : g === null ? /* @__PURE__ */ w(_, {
|
|
4718
4718
|
variant: "warning",
|
|
4719
4719
|
title: i("overview.infoUnavailable"),
|
|
4720
4720
|
message: o.data?.infoError ?? i("overview.infoNoAnswer")
|
|
4721
4721
|
}) : /* @__PURE__ */ C("div", {
|
|
4722
4722
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4",
|
|
4723
4723
|
children: [
|
|
4724
|
-
/* @__PURE__ */ w(
|
|
4724
|
+
/* @__PURE__ */ w(ae, {
|
|
4725
4725
|
label: i("overview.version"),
|
|
4726
|
-
value: Q(
|
|
4726
|
+
value: Q(g.version)
|
|
4727
4727
|
}),
|
|
4728
|
-
/* @__PURE__ */ w(
|
|
4728
|
+
/* @__PURE__ */ w(ae, {
|
|
4729
4729
|
label: i("overview.product"),
|
|
4730
|
-
value: Q(
|
|
4731
|
-
subtext:
|
|
4730
|
+
value: Q(g.product),
|
|
4731
|
+
subtext: g.platform ?? void 0
|
|
4732
4732
|
}),
|
|
4733
|
-
/* @__PURE__ */ w(
|
|
4733
|
+
/* @__PURE__ */ w(ae, {
|
|
4734
4734
|
label: i("overview.hostname"),
|
|
4735
|
-
value: Q(
|
|
4735
|
+
value: Q(g.hostname)
|
|
4736
4736
|
}),
|
|
4737
|
-
/* @__PURE__ */ w(
|
|
4737
|
+
/* @__PURE__ */ w(ae, {
|
|
4738
4738
|
label: i("overview.serial"),
|
|
4739
|
-
value: Q(
|
|
4739
|
+
value: Q(g.serial)
|
|
4740
4740
|
})
|
|
4741
4741
|
]
|
|
4742
4742
|
})
|
|
4743
4743
|
}),
|
|
4744
|
-
/* @__PURE__ */ w(
|
|
4744
|
+
/* @__PURE__ */ w(h, {
|
|
4745
4745
|
headingId: "hm-ccu-interfaces",
|
|
4746
4746
|
title: i("overview.interfacesTitle"),
|
|
4747
|
-
children: o.data?.interfacesError ? /* @__PURE__ */ w(
|
|
4747
|
+
children: o.data?.interfacesError ? /* @__PURE__ */ w(_, {
|
|
4748
4748
|
variant: "warning",
|
|
4749
4749
|
title: i("overview.interfacesUnavailable"),
|
|
4750
4750
|
message: o.data.interfacesError
|
|
4751
|
-
}) : /* @__PURE__ */ w(
|
|
4752
|
-
columns:
|
|
4751
|
+
}) : /* @__PURE__ */ w(l, {
|
|
4752
|
+
columns: p,
|
|
4753
4753
|
rows: o.data?.interfaces ?? [],
|
|
4754
4754
|
rowKey: (e) => e.name,
|
|
4755
4755
|
emptyMessage: o.loading ? i("common.loading") : i("overview.noInterfaces"),
|
|
4756
4756
|
minWidthPx: 560
|
|
4757
4757
|
})
|
|
4758
4758
|
}),
|
|
4759
|
-
/* @__PURE__ */ w(
|
|
4759
|
+
/* @__PURE__ */ w(h, {
|
|
4760
4760
|
headingId: "hm-ccu-messages",
|
|
4761
4761
|
title: i("overview.messagesTitle"),
|
|
4762
4762
|
icon: be,
|
|
4763
|
-
children: s.data?.error ? /* @__PURE__ */ w(
|
|
4763
|
+
children: s.data?.error ? /* @__PURE__ */ w(_, {
|
|
4764
4764
|
variant: "warning",
|
|
4765
4765
|
title: i("overview.messagesUnavailable"),
|
|
4766
4766
|
message: s.data.error
|
|
4767
|
-
}) : s.error === null ? s.data !== void 0 && s.data.messages.length === 0 ? /* @__PURE__ */ w(
|
|
4768
|
-
columns:
|
|
4767
|
+
}) : s.error === null ? s.data !== void 0 && s.data.messages.length === 0 ? /* @__PURE__ */ w(d, { title: i("overview.noMessages") }) : /* @__PURE__ */ w(l, {
|
|
4768
|
+
columns: m,
|
|
4769
4769
|
rows: s.data?.messages ?? [],
|
|
4770
4770
|
rowKey: (e) => e.id,
|
|
4771
4771
|
emptyMessage: i("common.loading"),
|
|
@@ -4774,7 +4774,7 @@ function Ds(t) {
|
|
|
4774
4774
|
columnKey: "time",
|
|
4775
4775
|
dir: "desc"
|
|
4776
4776
|
}
|
|
4777
|
-
}) : /* @__PURE__ */ w(
|
|
4777
|
+
}) : /* @__PURE__ */ w(_, {
|
|
4778
4778
|
message: s.error,
|
|
4779
4779
|
onRetry: s.reload
|
|
4780
4780
|
})
|
|
@@ -4789,23 +4789,23 @@ function js(e) {
|
|
|
4789
4789
|
return e.secondsLeft !== null && e.secondsLeft > 0;
|
|
4790
4790
|
}
|
|
4791
4791
|
function Ms(e) {
|
|
4792
|
-
let { iface: t, busy: n, onStart: r, onStop: i } = e, { t: o } = Z(), [s,
|
|
4792
|
+
let { iface: t, busy: n, onStart: r, onStop: i } = e, { t: o } = Z(), [s, l] = a(String(As)), [u, d] = a(rs[0]), p = Number(s), m = Number.isInteger(p) && p >= 1 && p <= 3600, g = t.error === null ? t.secondsLeft === null ? /* @__PURE__ */ w(v, {
|
|
4793
4793
|
variant: "neutral",
|
|
4794
4794
|
children: o("pairing.statusUnknown")
|
|
4795
|
-
}) : js(t) ? /* @__PURE__ */ w(
|
|
4795
|
+
}) : js(t) ? /* @__PURE__ */ w(v, {
|
|
4796
4796
|
variant: "success",
|
|
4797
4797
|
children: o("pairing.statusOpen", { seconds: t.secondsLeft })
|
|
4798
|
-
}) : /* @__PURE__ */ w(
|
|
4798
|
+
}) : /* @__PURE__ */ w(v, {
|
|
4799
4799
|
variant: "neutral",
|
|
4800
4800
|
children: o("pairing.statusClosed")
|
|
4801
|
-
}) : /* @__PURE__ */ w(
|
|
4801
|
+
}) : /* @__PURE__ */ w(v, {
|
|
4802
4802
|
variant: "danger",
|
|
4803
4803
|
children: o("pairing.statusUnknown")
|
|
4804
4804
|
});
|
|
4805
|
-
return /* @__PURE__ */ w(
|
|
4805
|
+
return /* @__PURE__ */ w(h, {
|
|
4806
4806
|
headingId: `hm-pairing-${t.name}-heading`,
|
|
4807
4807
|
title: t.name,
|
|
4808
|
-
actions:
|
|
4808
|
+
actions: g,
|
|
4809
4809
|
children: /* @__PURE__ */ C("div", {
|
|
4810
4810
|
className: "flex flex-col gap-3 p-3",
|
|
4811
4811
|
"data-testid": `hm-pairing-${t.name}`,
|
|
@@ -4815,20 +4815,20 @@ function Ms(e) {
|
|
|
4815
4815
|
}), /* @__PURE__ */ C("div", {
|
|
4816
4816
|
className: "flex flex-wrap items-end gap-3",
|
|
4817
4817
|
children: [
|
|
4818
|
-
/* @__PURE__ */ w(
|
|
4818
|
+
/* @__PURE__ */ w(x, {
|
|
4819
4819
|
label: o("pairing.fieldSeconds"),
|
|
4820
|
-
children: /* @__PURE__ */ w(
|
|
4820
|
+
children: /* @__PURE__ */ w(f, {
|
|
4821
4821
|
type: "number",
|
|
4822
4822
|
min: 1,
|
|
4823
4823
|
max: 3600,
|
|
4824
4824
|
value: s,
|
|
4825
|
-
onChange: (e) =>
|
|
4825
|
+
onChange: (e) => l(e.target.value)
|
|
4826
4826
|
})
|
|
4827
4827
|
}),
|
|
4828
|
-
t.supportsSecure && /* @__PURE__ */ w(
|
|
4828
|
+
t.supportsSecure && /* @__PURE__ */ w(x, {
|
|
4829
4829
|
label: o("pairing.fieldMode"),
|
|
4830
|
-
children: /* @__PURE__ */ w(
|
|
4831
|
-
value:
|
|
4830
|
+
children: /* @__PURE__ */ w(c, {
|
|
4831
|
+
value: u,
|
|
4832
4832
|
onChange: (e) => d(e.target.value),
|
|
4833
4833
|
options: rs.map((e) => ({
|
|
4834
4834
|
value: e,
|
|
@@ -4836,13 +4836,13 @@ function Ms(e) {
|
|
|
4836
4836
|
}))
|
|
4837
4837
|
})
|
|
4838
4838
|
}),
|
|
4839
|
-
/* @__PURE__ */ w(
|
|
4839
|
+
/* @__PURE__ */ w(S, {
|
|
4840
4840
|
type: "button",
|
|
4841
|
-
disabled: !
|
|
4842
|
-
onClick: () => r(
|
|
4841
|
+
disabled: !m || n,
|
|
4842
|
+
onClick: () => r(p, t.supportsSecure ? u : void 0),
|
|
4843
4843
|
children: o("pairing.start")
|
|
4844
4844
|
}),
|
|
4845
|
-
js(t) && /* @__PURE__ */ w(
|
|
4845
|
+
js(t) && /* @__PURE__ */ w(S, {
|
|
4846
4846
|
type: "button",
|
|
4847
4847
|
variant: "secondary",
|
|
4848
4848
|
disabled: n,
|
|
@@ -4855,11 +4855,11 @@ function Ms(e) {
|
|
|
4855
4855
|
});
|
|
4856
4856
|
}
|
|
4857
4857
|
function Ns(n) {
|
|
4858
|
-
let { trpc: r, integrationId: i } = n, { t: o } = Z(), s = ms(r), c = e(() => ({ integrationId: i }), [i]), l = $(r, "ccuPairingStatus", c, is, { pollMs: Os }), u = (l.data?.interfaces ?? []).some(js), d = $(r, "listCcuDevices", c, Xo, { ...u ? { pollMs: ks } : {} }), [f, p] = a(!1), [m,
|
|
4858
|
+
let { trpc: r, integrationId: i } = n, { t: o } = Z(), s = ms(r), c = e(() => ({ integrationId: i }), [i]), l = $(r, "ccuPairingStatus", c, is, { pollMs: Os }), u = (l.data?.interfaces ?? []).some(js), d = $(r, "listCcuDevices", c, Xo, { ...u ? { pollMs: ks } : {} }), [f, p] = a(!1), [m, g] = a(null);
|
|
4859
4859
|
t(() => {
|
|
4860
|
-
m === null && d.data !== void 0 &&
|
|
4860
|
+
m === null && d.data !== void 0 && g(new Set(d.data.devices.map((e) => e.address)));
|
|
4861
4861
|
}, [m, d.data]);
|
|
4862
|
-
let
|
|
4862
|
+
let v = e(() => m === null ? [] : (d.data?.devices ?? []).filter((e) => !m.has(e.address)), [m, d.data]), y = async (e, t, n, r) => {
|
|
4863
4863
|
p(!0);
|
|
4864
4864
|
try {
|
|
4865
4865
|
await s({
|
|
@@ -4900,23 +4900,23 @@ function Ns(n) {
|
|
|
4900
4900
|
}) : l.data.interfaces.map((e) => /* @__PURE__ */ w(Ms, {
|
|
4901
4901
|
iface: e,
|
|
4902
4902
|
busy: f,
|
|
4903
|
-
onStart: (t, n) => void
|
|
4904
|
-
onStop: () => void
|
|
4903
|
+
onStart: (t, n) => void y(e, !0, t, n),
|
|
4904
|
+
onStop: () => void y(e, !1, 0, void 0)
|
|
4905
4905
|
}, e.name)),
|
|
4906
|
-
/* @__PURE__ */ w(
|
|
4906
|
+
/* @__PURE__ */ w(h, {
|
|
4907
4907
|
headingId: "hm-pairing-found",
|
|
4908
4908
|
title: o("pairing.foundTitle"),
|
|
4909
4909
|
children: d.error !== null && m === null ? /* @__PURE__ */ w("p", {
|
|
4910
4910
|
className: "p-3 text-xs text-danger",
|
|
4911
4911
|
children: d.error
|
|
4912
|
-
}) :
|
|
4912
|
+
}) : v.length === 0 ? /* @__PURE__ */ w("p", {
|
|
4913
4913
|
className: "p-3 text-sm text-foreground-subtle",
|
|
4914
4914
|
"data-testid": "hm-pairing-none",
|
|
4915
4915
|
children: o(u ? "pairing.foundWaiting" : "pairing.foundNone")
|
|
4916
4916
|
}) : /* @__PURE__ */ w("ul", {
|
|
4917
4917
|
className: "flex flex-col gap-1 p-3",
|
|
4918
4918
|
"data-testid": "hm-pairing-found",
|
|
4919
|
-
children:
|
|
4919
|
+
children: v.map((e) => /* @__PURE__ */ C("li", {
|
|
4920
4920
|
className: "flex items-center gap-2 text-sm text-foreground",
|
|
4921
4921
|
children: [/* @__PURE__ */ w("span", { children: e.name ?? e.address }), /* @__PURE__ */ C("span", {
|
|
4922
4922
|
className: "text-xs text-foreground-subtle",
|
|
@@ -4930,11 +4930,11 @@ function Ns(n) {
|
|
|
4930
4930
|
})
|
|
4931
4931
|
})
|
|
4932
4932
|
]
|
|
4933
|
-
}) : /* @__PURE__ */ w(
|
|
4933
|
+
}) : /* @__PURE__ */ w(_, {
|
|
4934
4934
|
title: o("pairing.loadFailed"),
|
|
4935
4935
|
message: l.data.error,
|
|
4936
4936
|
onRetry: l.reload
|
|
4937
|
-
}) : /* @__PURE__ */ w(
|
|
4937
|
+
}) : /* @__PURE__ */ w(_, {
|
|
4938
4938
|
title: o("pairing.loadFailed"),
|
|
4939
4939
|
message: l.error,
|
|
4940
4940
|
onRetry: l.reload
|
|
@@ -4944,18 +4944,18 @@ function Ns(n) {
|
|
|
4944
4944
|
//#region src/page.tsx
|
|
4945
4945
|
var Ps = q(Uo), Fs = {};
|
|
4946
4946
|
function Is(t) {
|
|
4947
|
-
let n = t.trpc, { t: r } = Z(), [i, a] =
|
|
4947
|
+
let n = t.trpc, { t: r } = Z(), [i, a] = ne("ccu"), [o, s] = ne("tab"), l = $(n, "listCcus", Fs, Ps), u = l.data, f = e(() => u === void 0 || u.length === 0 ? null : u.find((e) => e.integrationId === i) ?? u.find((e) => e.connected) ?? u[0] ?? null, [u, i]), p = (e) => l.error === null ? u === void 0 ? /* @__PURE__ */ w(ie, { className: "h-32 w-full" }) : f === null ? /* @__PURE__ */ w(d, {
|
|
4948
4948
|
title: r("page.noCcu"),
|
|
4949
4949
|
description: r("page.noCcuHint")
|
|
4950
|
-
}) : f.connected ? e : /* @__PURE__ */ w(
|
|
4950
|
+
}) : f.connected ? e : /* @__PURE__ */ w(d, {
|
|
4951
4951
|
title: r("page.notConnected", { name: f.name }),
|
|
4952
4952
|
description: r("page.notConnectedHint")
|
|
4953
|
-
}) : /* @__PURE__ */ w(
|
|
4953
|
+
}) : /* @__PURE__ */ w(_, {
|
|
4954
4954
|
title: r("page.loadFailed"),
|
|
4955
4955
|
message: l.error,
|
|
4956
4956
|
onRetry: l.reload
|
|
4957
|
-
}),
|
|
4958
|
-
return /* @__PURE__ */ w(
|
|
4957
|
+
}), h = f?.integrationId ?? "";
|
|
4958
|
+
return /* @__PURE__ */ w(m, {
|
|
4959
4959
|
icon: ge,
|
|
4960
4960
|
title: r("page.title"),
|
|
4961
4961
|
subtitle: f === null ? r("page.subtitle") : f.name,
|
|
@@ -4963,7 +4963,7 @@ function Is(t) {
|
|
|
4963
4963
|
sectionsLabel: r("page.sectionsLabel"),
|
|
4964
4964
|
activeSection: o ?? "overview",
|
|
4965
4965
|
onSectionChange: (e) => s(e === "overview" ? null : e),
|
|
4966
|
-
actions: u !== void 0 && u.length > 1 ? /* @__PURE__ */ w(
|
|
4966
|
+
actions: u !== void 0 && u.length > 1 ? /* @__PURE__ */ w(c, {
|
|
4967
4967
|
"aria-label": r("page.ccuPicker"),
|
|
4968
4968
|
value: f?.integrationId ?? "",
|
|
4969
4969
|
onChange: (e) => a(e.target.value),
|
|
@@ -4978,7 +4978,7 @@ function Is(t) {
|
|
|
4978
4978
|
label: r("page.tabOverview"),
|
|
4979
4979
|
content: p(/* @__PURE__ */ w(Ds, {
|
|
4980
4980
|
trpc: n,
|
|
4981
|
-
integrationId:
|
|
4981
|
+
integrationId: h
|
|
4982
4982
|
}))
|
|
4983
4983
|
},
|
|
4984
4984
|
{
|
|
@@ -4986,7 +4986,7 @@ function Is(t) {
|
|
|
4986
4986
|
label: r("page.tabDevices"),
|
|
4987
4987
|
content: p(/* @__PURE__ */ w(Ss, {
|
|
4988
4988
|
trpc: n,
|
|
4989
|
-
integrationId:
|
|
4989
|
+
integrationId: h
|
|
4990
4990
|
}))
|
|
4991
4991
|
},
|
|
4992
4992
|
{
|
|
@@ -4994,7 +4994,7 @@ function Is(t) {
|
|
|
4994
4994
|
label: r("page.tabHeating"),
|
|
4995
4995
|
content: p(/* @__PURE__ */ w(Ts, {
|
|
4996
4996
|
trpc: n,
|
|
4997
|
-
integrationId:
|
|
4997
|
+
integrationId: h
|
|
4998
4998
|
}))
|
|
4999
4999
|
},
|
|
5000
5000
|
{
|
|
@@ -5002,7 +5002,7 @@ function Is(t) {
|
|
|
5002
5002
|
label: r("page.tabPairing"),
|
|
5003
5003
|
content: p(/* @__PURE__ */ w(Ns, {
|
|
5004
5004
|
trpc: n,
|
|
5005
|
-
integrationId:
|
|
5005
|
+
integrationId: h
|
|
5006
5006
|
}))
|
|
5007
5007
|
}
|
|
5008
5008
|
]
|