vuesp-components 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{VDialog.vue_vue_type_script_setup_true_lang-C_akEjfi.js → VDialog.vue_vue_type_script_setup_true_lang-BPmxvZi7.js} +159 -168
- package/dist/components/app/AppHeader.vue.d.ts.map +1 -1
- package/dist/components/app/AppNav.vue.d.ts.map +1 -1
- package/dist/components/block/service/BlockService.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -1
- package/dist/components/index.es.js +310 -275
- package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +1 -1
- package/dist/components/script/editor/highlighters/index.d.ts.map +1 -1
- package/dist/components/ui/button/types.d.ts +1 -1
- package/dist/components/ui/button/types.d.ts.map +1 -1
- package/dist/components/ui/icon/icons.d.ts +1 -1
- package/dist/components/ui/icon/icons.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.es.js +37 -27
- package/dist/index.es.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as L, resolveComponent as Rt, openBlock as f, createElementBlock as g, Fragment as D, createCommentVNode as T, createElementVNode as l, normalizeClass as M, createVNode as v, withCtx as x, createBlock as O, renderSlot as B, computed as C, withModifiers as Q, toDisplayString as w, unref as H, TransitionGroup as Pt, renderList as K, mergeProps as X, ref as F, watch as _e, resolveDynamicComponent as Ee, Transition as yt, normalizeStyle as Ve, createTextVNode as E, normalizeProps as ae, guardReactiveProps as se, onMounted as he, onUnmounted as Je, reactive as Ut, withDirectives as ot, vShow as ma, vModelText as bt, nextTick as xt, toValue as fa, useTemplateRef as Kt, createSlots as ga, isRef as va, Teleport as pa } from "vue";
|
|
2
|
-
import { a as ha, V as Ht, i as j, j as I, g as Wt, f as kt, k as ya, b as ba, h as xa, d as ge, u as ka, _ as Se, e as le } from "../VDialog.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { I as
|
|
4
|
-
import { f as $a, t as wa, g as Ca, u as tt, s as _a, d as Sa, m as Ta, c as
|
|
5
|
-
import { e as $t, f as
|
|
2
|
+
import { a as ha, V as Ht, i as j, j as I, g as Wt, f as kt, k as ya, b as ba, h as xa, d as ge, u as ka, _ as Se, e as le } from "../VDialog.vue_vue_type_script_setup_true_lang-BPmxvZi7.js";
|
|
3
|
+
import { I as wd, l as Cd, m as _d } from "../VDialog.vue_vue_type_script_setup_true_lang-BPmxvZi7.js";
|
|
4
|
+
import { f as $a, t as wa, g as Ca, u as tt, s as _a, d as Sa, m as Ta, c as za } from "../app-B45sALrX.js";
|
|
5
|
+
import { e as $t, f as Aa, g as Ea, o as Va } from "../useDialog-Buvn63AR.js";
|
|
6
6
|
import { useForm as Ba } from "../composables/index.es.js";
|
|
7
7
|
import { required as Ia, maxLen as La } from "../validate/index.es.js";
|
|
8
8
|
import { a as Ma } from "../paths-CbO4FuTv.js";
|
|
9
|
-
const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" },
|
|
9
|
+
const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, jr = /* @__PURE__ */ L({
|
|
10
10
|
__name: "AppAside",
|
|
11
11
|
props: {
|
|
12
12
|
isSidebar: { type: Boolean, default: !1 }
|
|
@@ -50,7 +50,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
50
50
|
], 64);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
}), Fa = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-card" }, Da = { class: "
|
|
53
|
+
}), Fa = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-card" }, Da = { class: "py-4" }, ja = { class: "container mx-auto flex flex-auto items-center" }, Na = { class: "lg:hidden h-7" }, Ra = { class: "gap-4 hidden lg:flex" }, Pa = { class: "lg:hidden flex gap-4" }, Ua = { class: "ms-2" }, Nr = /* @__PURE__ */ L({
|
|
54
54
|
__name: "AppHeader",
|
|
55
55
|
props: {
|
|
56
56
|
changeTheme: { type: Function },
|
|
@@ -103,11 +103,11 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
103
103
|
default: x(() => [
|
|
104
104
|
v(I, {
|
|
105
105
|
name: "sun",
|
|
106
|
-
class: "dark:hidden"
|
|
106
|
+
class: "size-5 dark:hidden"
|
|
107
107
|
}),
|
|
108
108
|
v(I, {
|
|
109
109
|
name: "moon",
|
|
110
|
-
class: "hidden dark:flex"
|
|
110
|
+
class: "hidden size-5 dark:flex"
|
|
111
111
|
})
|
|
112
112
|
]),
|
|
113
113
|
_: 1
|
|
@@ -155,7 +155,10 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
155
155
|
onClick: b.click
|
|
156
156
|
}, {
|
|
157
157
|
default: x(() => [
|
|
158
|
-
v(I, {
|
|
158
|
+
v(I, {
|
|
159
|
+
name: "more",
|
|
160
|
+
class: "size-5"
|
|
161
|
+
})
|
|
159
162
|
]),
|
|
160
163
|
_: 1
|
|
161
164
|
}, 8, ["onClick"])
|
|
@@ -237,7 +240,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
237
240
|
}), Ja = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Xa = {
|
|
238
241
|
key: 0,
|
|
239
242
|
class: "flex flex-col gap-2 p-2"
|
|
240
|
-
},
|
|
243
|
+
}, Rr = /* @__PURE__ */ L({
|
|
241
244
|
__name: "AppNotification",
|
|
242
245
|
props: {
|
|
243
246
|
value: { type: Boolean },
|
|
@@ -296,10 +299,10 @@ function Qa(e, s) {
|
|
|
296
299
|
])
|
|
297
300
|
]);
|
|
298
301
|
}
|
|
299
|
-
const
|
|
302
|
+
const Pr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex flex-col gap-2" }, ts = { class: "size-5 flex-[0_0_20px] opacity-60" }, as = ["onClick"], ss = { class: "flex flex-col gap-2" }, ls = { class: "flex gap-2 ms-8" }, ns = { class: "size-5 flex-[0_0_20px]" }, os = { class: "flex-1 first-letter:uppercase text-sm" }, is = {
|
|
300
303
|
key: 0,
|
|
301
304
|
class: "mt-2"
|
|
302
|
-
}, rs = { class: "flex flex-col gap-2" }, ds = { class: "flex gap-2 ms-14" }, cs = { class: "size-5 flex-[
|
|
305
|
+
}, rs = { class: "flex flex-col gap-2" }, ds = { class: "flex gap-2 ms-14" }, cs = { class: "size-5 flex-[0_0_20px]" }, us = { class: "flex-1 first-letter:uppercase text-sm" }, Ur = /* @__PURE__ */ L({
|
|
303
306
|
__name: "AppNav",
|
|
304
307
|
props: {
|
|
305
308
|
menu: { default: () => [] },
|
|
@@ -350,7 +353,8 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
350
353
|
}, [
|
|
351
354
|
m.children ? (f(), O(I, {
|
|
352
355
|
key: 0,
|
|
353
|
-
name: "arrow-right"
|
|
356
|
+
name: "arrow-right",
|
|
357
|
+
class: "size-5"
|
|
354
358
|
})) : T("", !0)
|
|
355
359
|
], 10, as)
|
|
356
360
|
]),
|
|
@@ -417,7 +421,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
417
421
|
}, vs = {
|
|
418
422
|
key: 1,
|
|
419
423
|
class: "relative mt-2 block h-4 w-full select-none overflow-hidden rounded-md bg-gray-light-10/70 dark:bg-white/10"
|
|
420
|
-
}, ps = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, hs = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" },
|
|
424
|
+
}, ps = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, hs = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Kr = /* @__PURE__ */ L({
|
|
421
425
|
__name: "AppProgress",
|
|
422
426
|
props: {
|
|
423
427
|
timeout: { default: 5e3 },
|
|
@@ -480,7 +484,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
480
484
|
_: 3
|
|
481
485
|
}));
|
|
482
486
|
}
|
|
483
|
-
}), ys = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, bs = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, xs = { class: "flex gap-2" }, ks = { class: "text-gray-dark-30 dark:text-gray-main" }, $s = { class: "flex gap-2" }, ws = { class: "flex gap-2" }, Cs = { class: "text-gray-dark-30 dark:text-gray-main" }, _s = { class: "flex gap-2" }, Ss = { class: "text-gray-dark-30 dark:text-gray-main" }, Ts = { class: "flex flex-col gap-4 text-sm" },
|
|
487
|
+
}), ys = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, bs = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, xs = { class: "flex gap-2" }, ks = { class: "text-gray-dark-30 dark:text-gray-main" }, $s = { class: "flex gap-2" }, ws = { class: "flex gap-2" }, Cs = { class: "text-gray-dark-30 dark:text-gray-main" }, _s = { class: "flex gap-2" }, Ss = { class: "text-gray-dark-30 dark:text-gray-main" }, Ts = { class: "flex flex-col gap-4 text-sm" }, zs = { class: "flex gap-4" }, Hr = /* @__PURE__ */ L({
|
|
484
488
|
__name: "BlockInfo",
|
|
485
489
|
props: {
|
|
486
490
|
pkg: {},
|
|
@@ -521,17 +525,17 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
521
525
|
]),
|
|
522
526
|
t[4] || (t[4] = l("hr", { class: "dark:text-gray-dark-30 text-gray-light-10 my-2" }, null, -1)),
|
|
523
527
|
l("div", Ts, [
|
|
524
|
-
l("div",
|
|
528
|
+
l("div", zs, [
|
|
525
529
|
B(n.$slots, "links", { links: a.value })
|
|
526
530
|
])
|
|
527
531
|
])
|
|
528
532
|
]);
|
|
529
533
|
};
|
|
530
534
|
}
|
|
531
|
-
}),
|
|
535
|
+
}), As = ["onClick"], Es = { class: "mr-2" }, Vs = { class: "text-sm" }, Bs = { class: "text-gray-main text-xs" }, Is = {
|
|
532
536
|
key: 0,
|
|
533
537
|
class: "flex justify-center"
|
|
534
|
-
}, Ls = { class: "flex justify-end mt-4" },
|
|
538
|
+
}, Ls = { class: "flex justify-end mt-4" }, Wr = /* @__PURE__ */ L({
|
|
535
539
|
__name: "BlockScan",
|
|
536
540
|
props: {
|
|
537
541
|
items: { default: () => [] }
|
|
@@ -558,7 +562,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
558
562
|
l("div", Vs, w(p.ssid), 1),
|
|
559
563
|
l("div", Bs, w(r.$t("security")) + " : " + w(n[p.encryptionType] || "unknown"), 1)
|
|
560
564
|
])
|
|
561
|
-
], 8,
|
|
565
|
+
], 8, As)
|
|
562
566
|
]),
|
|
563
567
|
_: 1
|
|
564
568
|
}, 8, ["items"]),
|
|
@@ -579,7 +583,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
579
583
|
]);
|
|
580
584
|
};
|
|
581
585
|
}
|
|
582
|
-
}), Ms = { class: "md:flex items-center mb-4" }, Os = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Fs = { class: "md:max-w-50" }, Ds = { class: "flex items-center mb-4" }, js = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Ns = { class: "flex items-center mb-4" }, Rs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" },
|
|
586
|
+
}), Ms = { class: "md:flex items-center mb-4" }, Os = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Fs = { class: "md:max-w-50" }, Ds = { class: "flex items-center mb-4" }, js = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Ns = { class: "flex items-center mb-4" }, Rs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Gr = /* @__PURE__ */ L({
|
|
583
587
|
__name: "BlockService",
|
|
584
588
|
props: {
|
|
585
589
|
locale: {},
|
|
@@ -610,7 +614,8 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
610
614
|
v(u, {
|
|
611
615
|
class: "min-w-24",
|
|
612
616
|
color: "red",
|
|
613
|
-
variant: "
|
|
617
|
+
variant: "soft",
|
|
618
|
+
invert: "",
|
|
614
619
|
onClick: r[0] || (r[0] = (i) => a("reboot", i))
|
|
615
620
|
}, {
|
|
616
621
|
default: x(() => [
|
|
@@ -624,6 +629,8 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
624
629
|
v(u, {
|
|
625
630
|
class: "min-w-24",
|
|
626
631
|
color: "red",
|
|
632
|
+
variant: "outline",
|
|
633
|
+
invert: "",
|
|
627
634
|
onClick: r[1] || (r[1] = (i) => a("reset", i))
|
|
628
635
|
}, {
|
|
629
636
|
default: x(() => [
|
|
@@ -635,7 +642,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
635
642
|
], 64);
|
|
636
643
|
};
|
|
637
644
|
}
|
|
638
|
-
}), Ps = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, Us = { class: "flex flex-col w-full items-center gap-2" }, Ks = ["title"], Hs = { class: "absolute left-28 top-1/2 -translate-1/2 text-center text-sm font-bold leading-none text-gray-dark-40 dark:text-white" }, Ws = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Gs = { class: "flex justify-between w-full text-xs" }, Js = { class: "text-gray-dark-25 dark:text-white/50" }, Xs = { class: "text-sm" }, qs = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, Ys = { class: "text-right text-xs" },
|
|
645
|
+
}), Ps = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, Us = { class: "flex flex-col w-full items-center gap-2" }, Ks = ["title"], Hs = { class: "absolute left-28 top-1/2 -translate-1/2 text-center text-sm font-bold leading-none text-gray-dark-40 dark:text-white" }, Ws = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Gs = { class: "flex justify-between w-full text-xs" }, Js = { class: "text-gray-dark-25 dark:text-white/50" }, Xs = { class: "text-sm" }, qs = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, Ys = { class: "text-right text-xs" }, Jr = /* @__PURE__ */ L({
|
|
639
646
|
__name: "BlockStatus",
|
|
640
647
|
props: {
|
|
641
648
|
pkg: {},
|
|
@@ -733,7 +740,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
733
740
|
B(t.$slots, "default")
|
|
734
741
|
]));
|
|
735
742
|
}
|
|
736
|
-
}), el = { class: "md:flex" }, tl = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" },
|
|
743
|
+
}), el = { class: "md:flex" }, tl = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" }, Xr = /* @__PURE__ */ L({
|
|
737
744
|
__name: "BlockUpdate",
|
|
738
745
|
emits: ["update"],
|
|
739
746
|
setup(e, { emit: s }) {
|
|
@@ -787,7 +794,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
787
794
|
]);
|
|
788
795
|
};
|
|
789
796
|
}
|
|
790
|
-
}), al = { class: "flex items-center gap-1.5" },
|
|
797
|
+
}), al = { class: "flex items-center gap-1.5" }, qr = /* @__PURE__ */ L({
|
|
791
798
|
__name: "BlockBreadcrumb",
|
|
792
799
|
props: {
|
|
793
800
|
items: { default: () => [] }
|
|
@@ -814,9 +821,9 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
814
821
|
]),
|
|
815
822
|
r.path ? (f(), O(I, {
|
|
816
823
|
key: 0,
|
|
817
|
-
name: "chevron-
|
|
824
|
+
name: "chevron-down",
|
|
818
825
|
size: 14,
|
|
819
|
-
class: "shrink-0"
|
|
826
|
+
class: "-rotate-90 shrink-0"
|
|
820
827
|
})) : T("", !0)
|
|
821
828
|
], 2))), 128))
|
|
822
829
|
])
|
|
@@ -837,7 +844,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
|
|
|
837
844
|
},
|
|
838
845
|
emits: ["click"],
|
|
839
846
|
setup(e, { emit: s }) {
|
|
840
|
-
const a = s, n = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-light-10 dark:before:border-gray-dark-30/50 hover:before:bg-gray-main/10", t = F({}), { text: o, copy: r, copied: d, isSupported: u } =
|
|
847
|
+
const a = s, n = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-light-10 dark:before:border-gray-dark-30/50 hover:before:bg-gray-main/10", t = F({}), { text: o, copy: r, copied: d, isSupported: u } = Aa(), i = (b) => {
|
|
841
848
|
t.value[b] = !t.value[b];
|
|
842
849
|
}, c = (b) => typeof b == "object", m = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, h) => {
|
|
843
850
|
a("click", { key: b, path: m(b), isObject: h });
|
|
@@ -1360,8 +1367,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1360
1367
|
if (!e.trim()) return;
|
|
1361
1368
|
const n = Jt(e, s);
|
|
1362
1369
|
return n === void 0 && Gt.test(e) ? a.get(e) : n;
|
|
1363
|
-
}, Tl = (e) => e == null || e === "" ? "—" : typeof e == "boolean" ? e ? "да" : "нет" : typeof e == "number" ? Number.isInteger(e) ? String(e) : String(Number(e.toFixed(2))) : String(e),
|
|
1364
|
-
`), st = (e) => typeof e == "number" && !Number.isFinite(e) ? void 0 : e,
|
|
1370
|
+
}, Tl = (e) => e == null || e === "" ? "—" : typeof e == "boolean" ? e ? "да" : "нет" : typeof e == "number" ? Number.isInteger(e) ? String(e) : String(Number(e.toFixed(2))) : String(e), zl = (e) => e.replace(/<br\s*\/?>/gi, `
|
|
1371
|
+
`), st = (e) => typeof e == "number" && !Number.isFinite(e) ? void 0 : e, Al = (e, s) => {
|
|
1365
1372
|
if (!(e == null || e === "")) {
|
|
1366
1373
|
if (s === "number") {
|
|
1367
1374
|
const a = typeof e == "number" ? e : Number.parseFloat(String(e));
|
|
@@ -1380,7 +1387,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1380
1387
|
scale: (s, a = 1, n = 0) => Qe(s) * a + n,
|
|
1381
1388
|
round: (s, a = 0) => Number(Qe(s).toFixed(a)),
|
|
1382
1389
|
clamp: (s, a, n) => Math.min(n, Math.max(a, Qe(s)))
|
|
1383
|
-
}),
|
|
1390
|
+
}), Yr = (e, s, a) => {
|
|
1384
1391
|
const n = { ...St(s), ...a };
|
|
1385
1392
|
return e.slice(0, We).map((t) => st(at(t, n, s)));
|
|
1386
1393
|
}, El = (e, s, a, n) => {
|
|
@@ -1398,7 +1405,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1398
1405
|
return {
|
|
1399
1406
|
id: e.id,
|
|
1400
1407
|
label: e.label.trim() || "Показатель",
|
|
1401
|
-
value:
|
|
1408
|
+
value: zl(r ?? Tl(o)),
|
|
1402
1409
|
raw: o,
|
|
1403
1410
|
style: { ..._t, ...e.style }
|
|
1404
1411
|
};
|
|
@@ -1419,7 +1426,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1419
1426
|
const r = s.bindings[o.key], d = typeof r == "string" ? r : r == null ? void 0 : r.expr, u = typeof r == "object" ? r == null ? void 0 : r.fallback : void 0;
|
|
1420
1427
|
let i;
|
|
1421
1428
|
o.formatFor && (n.v = t[o.formatFor]), d && (i = Jt(d, n), i === void 0 && Gt.test(d) && (i = a.get(d)));
|
|
1422
|
-
const c =
|
|
1429
|
+
const c = Al(i ?? u ?? o.default, o.type);
|
|
1423
1430
|
t[o.key] = c, n[o.key] = c;
|
|
1424
1431
|
}
|
|
1425
1432
|
return t.metrics = Vl(e, s, a, t), t;
|
|
@@ -1655,9 +1662,9 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1655
1662
|
...y,
|
|
1656
1663
|
count: e.definition.fields.filter(($) => ($.block ?? "general") === y.key).length
|
|
1657
1664
|
})).filter((y) => y.count > 0)
|
|
1658
|
-
),
|
|
1665
|
+
), z = C(() => Object.keys(e.definition.metrics ?? {})), V = C(() => z.value.includes(d.value)), W = C(() => e.definition.fields.filter((y) => (y.block ?? "general") === d.value && !y.formatFor)), ne = C(() => W.value.find((y) => y.key.endsWith("Title"))), Ne = C(() => d.value === "general"), ke = C(() => W.value.find((y) => y.key === `${d.value}Flow`)), Xe = C(() => t[d.value] ?? []), it = C(() => {
|
|
1659
1666
|
const y = ke.value;
|
|
1660
|
-
return y ?
|
|
1667
|
+
return y ? ze(y) || String(y.default ?? "") : "";
|
|
1661
1668
|
}), Be = C(() => {
|
|
1662
1669
|
var y;
|
|
1663
1670
|
return ((y = Xe.value.find(($) => $.value === it.value)) == null ? void 0 : y.name) ?? "";
|
|
@@ -1682,7 +1689,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1682
1689
|
return y;
|
|
1683
1690
|
}
|
|
1684
1691
|
return y.startsWith("'") && y.endsWith("'") ? y.slice(1, -1) : y;
|
|
1685
|
-
},
|
|
1692
|
+
}, ze = (y) => {
|
|
1686
1693
|
const $ = r.value.bindings[y.key];
|
|
1687
1694
|
return typeof $ != "string" ? y.plain ? String(y.default ?? "") : "" : y.plain ? rt($) : $;
|
|
1688
1695
|
}, $e = (y, $) => {
|
|
@@ -1693,11 +1700,11 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1693
1700
|
r.value.bindings[y.key] = y.plain ? JSON.stringify($) : $;
|
|
1694
1701
|
}, Me = (y) => e.definition.fields.find(($) => $.formatFor === y.key), G = (y) => {
|
|
1695
1702
|
const $ = Me(y);
|
|
1696
|
-
return $ ?
|
|
1703
|
+
return $ ? ze($) : "";
|
|
1697
1704
|
}, J = (y, $) => {
|
|
1698
1705
|
const S = Me(y);
|
|
1699
1706
|
S && $e(S, $);
|
|
1700
|
-
},
|
|
1707
|
+
}, A = (y) => {
|
|
1701
1708
|
const $ = q.value[y];
|
|
1702
1709
|
return $ === void 0 ? "—" : typeof $ == "boolean" ? $ ? "да" : "нет" : String($);
|
|
1703
1710
|
}, R = (y) => `v + ' ${y.unit ?? "ед."}'`, me = () => {
|
|
@@ -1879,10 +1886,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1879
1886
|
Ne.value ? (f(!0), g(D, { key: 0 }, K(Le.value, (S) => (f(), O(Vt, {
|
|
1880
1887
|
key: S.key,
|
|
1881
1888
|
field: S,
|
|
1882
|
-
"model-value":
|
|
1889
|
+
"model-value": ze(S),
|
|
1883
1890
|
"format-value": G(S),
|
|
1884
1891
|
"has-format": !!Me(S),
|
|
1885
|
-
placeholder:
|
|
1892
|
+
placeholder: A(S.previewKey ?? S.key),
|
|
1886
1893
|
"placeholder-format": R(S),
|
|
1887
1894
|
"show-reset": !1,
|
|
1888
1895
|
"onUpdate:modelValue": (P) => $e(S, P),
|
|
@@ -1892,10 +1899,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1892
1899
|
ne.value ? (f(), O(Vt, {
|
|
1893
1900
|
key: 0,
|
|
1894
1901
|
field: ne.value,
|
|
1895
|
-
"model-value":
|
|
1902
|
+
"model-value": ze(ne.value),
|
|
1896
1903
|
"format-value": G(ne.value),
|
|
1897
1904
|
"has-format": !!Me(ne.value),
|
|
1898
|
-
placeholder:
|
|
1905
|
+
placeholder: A(ne.value.previewKey ?? ne.value.key),
|
|
1899
1906
|
"placeholder-format": R(ne.value),
|
|
1900
1907
|
"show-reset": !1,
|
|
1901
1908
|
"onUpdate:modelValue": $[1] || ($[1] = (S) => $e(ne.value, S)),
|
|
@@ -2057,7 +2064,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2057
2064
|
}, hn = {
|
|
2058
2065
|
key: 0,
|
|
2059
2066
|
class: "py-8 text-center text-sm text-gray-dark-25 dark:text-gray-main"
|
|
2060
|
-
},
|
|
2067
|
+
}, Zr = /* @__PURE__ */ L({
|
|
2061
2068
|
__name: "BlockPicker",
|
|
2062
2069
|
props: {
|
|
2063
2070
|
definitions: {}
|
|
@@ -2093,7 +2100,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2093
2100
|
_: 1
|
|
2094
2101
|
}));
|
|
2095
2102
|
}
|
|
2096
|
-
}),
|
|
2103
|
+
}), Qr = /* @__PURE__ */ L({
|
|
2097
2104
|
__name: "BlockView",
|
|
2098
2105
|
props: {
|
|
2099
2106
|
definition: {},
|
|
@@ -2146,7 +2153,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2146
2153
|
}), bn = { class: "flex flex-col gap-3" }, xn = {
|
|
2147
2154
|
key: 0,
|
|
2148
2155
|
class: "text-sm text-red-500"
|
|
2149
|
-
}, kn = { class: "flex justify-end gap-2" },
|
|
2156
|
+
}, kn = { class: "flex justify-end gap-2" }, ed = /* @__PURE__ */ L({
|
|
2150
2157
|
__name: "BlockImport",
|
|
2151
2158
|
emits: ["close", "import"],
|
|
2152
2159
|
setup(e, { emit: s }) {
|
|
@@ -2228,10 +2235,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2228
2235
|
}, Sn = {
|
|
2229
2236
|
key: 1,
|
|
2230
2237
|
class: "ml-auto shrink-0"
|
|
2231
|
-
}, Tn = ["inert"],
|
|
2238
|
+
}, Tn = ["inert"], zn = {
|
|
2232
2239
|
key: 1,
|
|
2233
2240
|
class: "mt-4 border-t border-gray-light-10/70 pt-4 dark:border-white/10"
|
|
2234
|
-
},
|
|
2241
|
+
}, An = /* @__PURE__ */ L({
|
|
2235
2242
|
__name: "VCard",
|
|
2236
2243
|
props: {
|
|
2237
2244
|
variant: { default: "glass" },
|
|
@@ -2286,7 +2293,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2286
2293
|
}, [
|
|
2287
2294
|
B(o.$slots, "default")
|
|
2288
2295
|
], 8, Tn),
|
|
2289
|
-
o.$slots.footer ? (f(), g("div",
|
|
2296
|
+
o.$slots.footer ? (f(), g("div", zn, [
|
|
2290
2297
|
B(o.$slots, "footer")
|
|
2291
2298
|
])) : T("", !0)
|
|
2292
2299
|
]),
|
|
@@ -2325,18 +2332,18 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2325
2332
|
`), o = (G) => `${Math.abs(G).toFixed(1)} кВт`, r = (G) => {
|
|
2326
2333
|
var J;
|
|
2327
2334
|
return ((J = e.metrics) == null ? void 0 : J[G]) ?? [];
|
|
2328
|
-
}, d = (G, J,
|
|
2335
|
+
}, d = (G, J, A) => {
|
|
2329
2336
|
var Re;
|
|
2330
|
-
const R = ((Re = e.metrics) == null ? void 0 : Re[G]) ?? [], me = R.find((Pe) => Pe.id === J) ?? R[
|
|
2337
|
+
const R = ((Re = e.metrics) == null ? void 0 : Re[G]) ?? [], me = R.find((Pe) => Pe.id === J) ?? R[A];
|
|
2331
2338
|
return me == null ? void 0 : me.raw;
|
|
2332
2339
|
}, u = (G, J) => {
|
|
2333
|
-
const
|
|
2334
|
-
return Number.isFinite(
|
|
2335
|
-
}, i = C(() => u(d("solar", "solar-power", 0), e.solarPower)), c = C(() => u(d("grid", "grid-power", 0), e.gridPower)), m = C(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = C(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = C(() => u(d("house", "house-load", 0), e.loadPower)), h = C(() => i.value > 0 && e.solarFlow !== "idle"), k = C(() => e.solarFlow === "reverse"), _ = C(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), N = C(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), q = C(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), xe = C(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Te = C(() => b.value > 0 && e.houseFlow !== "idle"),
|
|
2340
|
+
const A = typeof G == "number" ? G : Number.parseFloat(String(G));
|
|
2341
|
+
return Number.isFinite(A) ? A : J;
|
|
2342
|
+
}, i = C(() => u(d("solar", "solar-power", 0), e.solarPower)), c = C(() => u(d("grid", "grid-power", 0), e.gridPower)), m = C(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = C(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = C(() => u(d("house", "house-load", 0), e.loadPower)), h = C(() => i.value > 0 && e.solarFlow !== "idle"), k = C(() => e.solarFlow === "reverse"), _ = C(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), N = C(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), q = C(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), xe = C(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Te = C(() => b.value > 0 && e.houseFlow !== "idle"), z = C(() => e.houseFlow !== "reverse"), V = C(() => o(b.value)), W = C(() => r("inverter")), ne = Ea(), Ne = C(() => ne.value === "reduce"), ke = C(() => [
|
|
2336
2343
|
{ id: "solar", active: h.value, reverse: k.value, speed: n(i.value) },
|
|
2337
2344
|
{ id: "battery", active: N.value, reverse: xe.value, speed: n(m.value) },
|
|
2338
2345
|
{ id: "grid", active: _.value, reverse: q.value, speed: n(c.value) },
|
|
2339
|
-
{ id: "home", active: Te.value, reverse:
|
|
2346
|
+
{ id: "home", active: Te.value, reverse: z.value, speed: n(b.value) }
|
|
2340
2347
|
]), Xe = C(() => ke.value.filter((G) => G.active)), it = C(() => [
|
|
2341
2348
|
{
|
|
2342
2349
|
key: "solar",
|
|
@@ -2382,18 +2389,18 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2382
2389
|
let oe = null;
|
|
2383
2390
|
const rt = (G, J) => {
|
|
2384
2391
|
J instanceof HTMLElement ? Le.set(G, J) : Le.delete(G);
|
|
2385
|
-
},
|
|
2386
|
-
const
|
|
2387
|
-
return { x:
|
|
2392
|
+
}, ze = (G, J) => {
|
|
2393
|
+
const A = G.getBoundingClientRect();
|
|
2394
|
+
return { x: A.left - J.left, y: A.top - J.top, width: A.width, height: A.height };
|
|
2388
2395
|
}, $e = () => {
|
|
2389
2396
|
const G = Be.value, J = Ie.value;
|
|
2390
2397
|
if (!G || !J) return;
|
|
2391
|
-
const
|
|
2392
|
-
if (
|
|
2393
|
-
const R =
|
|
2398
|
+
const A = G.getBoundingClientRect();
|
|
2399
|
+
if (A.width < 2 || A.height < 2) return;
|
|
2400
|
+
const R = ze(J, A), me = R.x + R.width / 2, Re = R.y + R.height / 2, Pe = ke.value.map((de) => {
|
|
2394
2401
|
const we = Le.get(de.id);
|
|
2395
2402
|
if (!we) return null;
|
|
2396
|
-
const U =
|
|
2403
|
+
const U = ze(we, A), Ce = U.x + U.width / 2, ye = U.y + U.height / 2, ce = me - Ce, ue = Re - ye, ee = Math.abs(ce) >= Math.abs(ue), Z = ee ? ce > 0 ? "right" : "left" : ue > 0 ? "bottom" : "top", Ye = Z === "left" ? "right" : Z === "right" ? "left" : Z === "top" ? "bottom" : "top";
|
|
2397
2404
|
return { id: de.id, rect: U, nodeSide: Z, portSide: Ye, pos: ee ? ye : Ce };
|
|
2398
2405
|
}).filter((de) => de !== null), Ue = { left: [], right: [], top: [], bottom: [] };
|
|
2399
2406
|
for (const de of Pe) Ue[de.portSide].push(de);
|
|
@@ -2410,7 +2417,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2410
2417
|
qe[U.id] = ct;
|
|
2411
2418
|
});
|
|
2412
2419
|
}
|
|
2413
|
-
Y.value = { width:
|
|
2420
|
+
Y.value = { width: A.width, height: A.height, paths: qe };
|
|
2414
2421
|
}, Me = () => {
|
|
2415
2422
|
if (oe) {
|
|
2416
2423
|
oe.disconnect(), Be.value && oe.observe(Be.value), Ie.value && oe.observe(Ie.value);
|
|
@@ -2421,7 +2428,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2421
2428
|
oe = new ResizeObserver(() => $e()), await xt(), $e(), Me();
|
|
2422
2429
|
}), Je(() => {
|
|
2423
2430
|
oe == null || oe.disconnect(), oe = null;
|
|
2424
|
-
}), (G, J) => (f(), O(
|
|
2431
|
+
}), (G, J) => (f(), O(An, {
|
|
2425
2432
|
title: e.title,
|
|
2426
2433
|
hover: ""
|
|
2427
2434
|
}, {
|
|
@@ -2441,7 +2448,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2441
2448
|
size: "sm",
|
|
2442
2449
|
"aria-label": "Настроить блок",
|
|
2443
2450
|
title: "Настроить блок",
|
|
2444
|
-
onClick: J[0] || (J[0] = (
|
|
2451
|
+
onClick: J[0] || (J[0] = (A) => a("settings"))
|
|
2445
2452
|
}, {
|
|
2446
2453
|
default: x(() => [
|
|
2447
2454
|
v(I, {
|
|
@@ -2456,7 +2463,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2456
2463
|
size: "sm",
|
|
2457
2464
|
"aria-label": "Обновить данные",
|
|
2458
2465
|
title: "Обновить данные",
|
|
2459
|
-
onClick: J[1] || (J[1] = (
|
|
2466
|
+
onClick: J[1] || (J[1] = (A) => a("refresh"))
|
|
2460
2467
|
}, {
|
|
2461
2468
|
default: x(() => [
|
|
2462
2469
|
v(I, {
|
|
@@ -2480,85 +2487,85 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2480
2487
|
viewBox: `0 0 ${Y.value.width} ${Y.value.height}`,
|
|
2481
2488
|
"aria-hidden": "true"
|
|
2482
2489
|
}, [
|
|
2483
|
-
(f(!0), g(D, null, K(ke.value, (
|
|
2484
|
-
id: `energy-path-${
|
|
2485
|
-
key: `rail-${
|
|
2490
|
+
(f(!0), g(D, null, K(ke.value, (A) => (f(), g("path", {
|
|
2491
|
+
id: `energy-path-${A.id}`,
|
|
2492
|
+
key: `rail-${A.id}`,
|
|
2486
2493
|
class: "stroke-current text-gray-main dark:text-white/20 [stroke-width:1.5] [stroke-linecap:round] [stroke-dasharray:2_6] opacity-45",
|
|
2487
|
-
d: Y.value.paths[
|
|
2494
|
+
d: Y.value.paths[A.id],
|
|
2488
2495
|
fill: "none"
|
|
2489
2496
|
}, null, 8, Bn))), 128)),
|
|
2490
|
-
(f(!0), g(D, null, K(Xe.value, (
|
|
2491
|
-
key: `flow-${
|
|
2497
|
+
(f(!0), g(D, null, K(Xe.value, (A) => (f(), g("g", {
|
|
2498
|
+
key: `flow-${A.id}`
|
|
2492
2499
|
}, [
|
|
2493
2500
|
l("path", {
|
|
2494
2501
|
class: "stroke-cyan-main [stroke-width:2.5] [stroke-linecap:round] opacity-55",
|
|
2495
|
-
d: Y.value.paths[
|
|
2502
|
+
d: Y.value.paths[A.id],
|
|
2496
2503
|
fill: "none"
|
|
2497
2504
|
}, null, 8, In),
|
|
2498
2505
|
l("path", {
|
|
2499
2506
|
class: "stroke-cyan-main [stroke-width:10] [stroke-linecap:round] opacity-20 blur-sm",
|
|
2500
|
-
d: Y.value.paths[
|
|
2507
|
+
d: Y.value.paths[A.id],
|
|
2501
2508
|
fill: "none"
|
|
2502
2509
|
}, null, 8, Ln),
|
|
2503
2510
|
l("path", {
|
|
2504
|
-
class: M(["animate-energy-flow stroke-gray-light-30 stroke-2 [stroke-linecap:round] [stroke-dasharray:16_22] opacity-75 drop-shadow-cyan-glow-xs motion-reduce:animate-none motion-reduce:[stroke-dasharray:none]", { "[animation-direction:reverse]":
|
|
2505
|
-
d: Y.value.paths[
|
|
2506
|
-
style: Ve({ animationDuration: `${
|
|
2511
|
+
class: M(["animate-energy-flow stroke-gray-light-30 stroke-2 [stroke-linecap:round] [stroke-dasharray:16_22] opacity-75 drop-shadow-cyan-glow-xs motion-reduce:animate-none motion-reduce:[stroke-dasharray:none]", { "[animation-direction:reverse]": A.reverse }]),
|
|
2512
|
+
d: Y.value.paths[A.id],
|
|
2513
|
+
style: Ve({ animationDuration: `${A.speed}s` }),
|
|
2507
2514
|
fill: "none"
|
|
2508
2515
|
}, null, 14, Mn),
|
|
2509
2516
|
Ne.value ? T("", !0) : (f(), g(D, { key: 0 }, K([0, 1, 2], (R, me) => l("circle", {
|
|
2510
|
-
key: `dot-${
|
|
2517
|
+
key: `dot-${A.id}-${R}`,
|
|
2511
2518
|
r: "2.6",
|
|
2512
2519
|
opacity: "0",
|
|
2513
2520
|
class: "fill-gray-light-30 drop-shadow-cyan-glow-dot"
|
|
2514
2521
|
}, [
|
|
2515
2522
|
l("animateMotion", {
|
|
2516
|
-
dur: `${
|
|
2517
|
-
begin: `${me *
|
|
2523
|
+
dur: `${A.speed}s`,
|
|
2524
|
+
begin: `${me * A.speed / 3}s`,
|
|
2518
2525
|
repeatCount: "indefinite",
|
|
2519
2526
|
calcMode: "linear",
|
|
2520
2527
|
keyTimes: "0;1",
|
|
2521
|
-
keyPoints:
|
|
2528
|
+
keyPoints: A.reverse ? "1;0" : "0;1"
|
|
2522
2529
|
}, [
|
|
2523
2530
|
l("mpath", {
|
|
2524
|
-
href: `#energy-path-${
|
|
2531
|
+
href: `#energy-path-${A.id}`
|
|
2525
2532
|
}, null, 8, Fn)
|
|
2526
2533
|
], 8, On),
|
|
2527
2534
|
l("animate", {
|
|
2528
2535
|
attributeName: "opacity",
|
|
2529
2536
|
values: "0;1;1;0",
|
|
2530
2537
|
keyTimes: "0;0.15;0.85;1",
|
|
2531
|
-
dur: `${
|
|
2532
|
-
begin: `${me *
|
|
2538
|
+
dur: `${A.speed}s`,
|
|
2539
|
+
begin: `${me * A.speed / 3}s`,
|
|
2533
2540
|
repeatCount: "indefinite"
|
|
2534
2541
|
}, null, 8, Dn)
|
|
2535
2542
|
])), 64))
|
|
2536
2543
|
]))), 128))
|
|
2537
2544
|
], 8, Vn)) : T("", !0),
|
|
2538
2545
|
l("div", jn, [
|
|
2539
|
-
(f(!0), g(D, null, K(it.value, (
|
|
2540
|
-
key:
|
|
2546
|
+
(f(!0), g(D, null, K(it.value, (A) => (f(), g("div", {
|
|
2547
|
+
key: A.key,
|
|
2541
2548
|
ref_for: !0,
|
|
2542
|
-
ref: (R) => rt(
|
|
2543
|
-
class: M(
|
|
2549
|
+
ref: (R) => rt(A.key, R),
|
|
2550
|
+
class: M(A.wrapper)
|
|
2544
2551
|
}, [
|
|
2545
2552
|
l("div", {
|
|
2546
|
-
class: M(["relative flex w-full max-w-none flex-col gap-3 rounded-2xl border p-4 shadow-cyan-glow-soft lg:max-w-56",
|
|
2553
|
+
class: M(["relative flex w-full max-w-none flex-col gap-3 rounded-2xl border p-4 shadow-cyan-glow-soft lg:max-w-56", A.card])
|
|
2547
2554
|
}, [
|
|
2548
2555
|
l("div", Nn, [
|
|
2549
2556
|
l("span", {
|
|
2550
|
-
class: M(["grid size-8 shrink-0 place-items-center rounded-lg",
|
|
2557
|
+
class: M(["grid size-8 shrink-0 place-items-center rounded-lg", A.surface])
|
|
2551
2558
|
}, [
|
|
2552
2559
|
v(I, {
|
|
2553
|
-
name:
|
|
2560
|
+
name: A.icon,
|
|
2554
2561
|
size: 16,
|
|
2555
|
-
class: M(
|
|
2562
|
+
class: M(A.tone)
|
|
2556
2563
|
}, null, 8, ["name", "class"])
|
|
2557
2564
|
], 2),
|
|
2558
|
-
l("span", Rn, w(
|
|
2565
|
+
l("span", Rn, w(A.label), 1)
|
|
2559
2566
|
]),
|
|
2560
|
-
|
|
2561
|
-
(f(!0), g(D, null, K(
|
|
2567
|
+
A.metrics.length ? (f(), g("div", Pn, [
|
|
2568
|
+
(f(!0), g(D, null, K(A.metrics, (R) => (f(), g("div", {
|
|
2562
2569
|
key: R.id,
|
|
2563
2570
|
class: "glass-inset rounded-lg px-3 py-2"
|
|
2564
2571
|
}, [
|
|
@@ -2592,14 +2599,14 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2592
2599
|
l("span", Yn, w(e.loadLabel), 1)
|
|
2593
2600
|
]),
|
|
2594
2601
|
l("dl", Zn, [
|
|
2595
|
-
(f(!0), g(D, null, K(W.value, (
|
|
2596
|
-
key:
|
|
2602
|
+
(f(!0), g(D, null, K(W.value, (A) => (f(), g("div", {
|
|
2603
|
+
key: A.id,
|
|
2597
2604
|
class: "glass-inset rounded-md px-3 py-2"
|
|
2598
2605
|
}, [
|
|
2599
|
-
l("dt", Qn, w(
|
|
2606
|
+
l("dt", Qn, w(A.label), 1),
|
|
2600
2607
|
l("dd", {
|
|
2601
|
-
class: M(["mt-0.5 whitespace-pre", H(vt)(
|
|
2602
|
-
}, w(
|
|
2608
|
+
class: M(["mt-0.5 whitespace-pre", H(vt)(A.style)])
|
|
2609
|
+
}, w(A.value), 3)
|
|
2603
2610
|
]))), 128))
|
|
2604
2611
|
]),
|
|
2605
2612
|
l("div", eo, [
|
|
@@ -2674,7 +2681,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2674
2681
|
{ key: "inverterTitle", plain: !0, block: "inverter", label: "Заголовок", type: "string", default: "Инвертор" },
|
|
2675
2682
|
{ key: "loadLabel", plain: !0, block: "inverter", label: "Подпись нагрузки", type: "string", default: "нагрузка" }
|
|
2676
2683
|
]
|
|
2677
|
-
},
|
|
2684
|
+
}, td = /* @__PURE__ */ L({
|
|
2678
2685
|
inheritAttrs: !1,
|
|
2679
2686
|
__name: "EnergyFlowBlock",
|
|
2680
2687
|
props: {
|
|
@@ -2793,7 +2800,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2793
2800
|
...s.metricArgs && Object.keys(s.metricArgs).length ? { A: s.metricArgs } : {},
|
|
2794
2801
|
...s.metrics && Object.keys(s.metrics).length ? { g: Co(s.metrics) } : {}
|
|
2795
2802
|
}))
|
|
2796
|
-
}),
|
|
2803
|
+
}), zo = (e) => {
|
|
2797
2804
|
const s = e.slice(0, go).map((a) => ({
|
|
2798
2805
|
...a,
|
|
2799
2806
|
bindings: Object.fromEntries(
|
|
@@ -2805,7 +2812,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2805
2812
|
for (; s.length > 0 && JSON.stringify(ta(s)).length > po; )
|
|
2806
2813
|
s.pop();
|
|
2807
2814
|
return s;
|
|
2808
|
-
},
|
|
2815
|
+
}, Ao = () => {
|
|
2809
2816
|
for (const e of Zt)
|
|
2810
2817
|
try {
|
|
2811
2818
|
const s = localStorage.getItem(e);
|
|
@@ -2824,7 +2831,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2824
2831
|
}, Vo = (e = mo) => {
|
|
2825
2832
|
const s = async (n) => {
|
|
2826
2833
|
const t = new FormData();
|
|
2827
|
-
t.append("file[0]", new Blob([JSON.stringify(ta(
|
|
2834
|
+
t.append("file[0]", new Blob([JSON.stringify(ta(zo(n)))], { type: "application/json" }), e);
|
|
2828
2835
|
const o = await fetch(Ot, { method: "POST", body: t });
|
|
2829
2836
|
if (!o.ok) throw new Error(`Не удалось сохранить настройки блока: HTTP ${o.status}`);
|
|
2830
2837
|
};
|
|
@@ -2837,7 +2844,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2837
2844
|
}
|
|
2838
2845
|
} catch {
|
|
2839
2846
|
}
|
|
2840
|
-
const n =
|
|
2847
|
+
const n = Ao();
|
|
2841
2848
|
if (n.length)
|
|
2842
2849
|
try {
|
|
2843
2850
|
await s(n), Eo();
|
|
@@ -2845,7 +2852,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2845
2852
|
}
|
|
2846
2853
|
return n;
|
|
2847
2854
|
}, write: s };
|
|
2848
|
-
},
|
|
2855
|
+
}, ad = Vo(), sd = (e, s, a = {}) => {
|
|
2849
2856
|
const n = a.provider ?? uo, t = a.id ?? e.defaultId ?? e.type, o = F({
|
|
2850
2857
|
id: t,
|
|
2851
2858
|
type: e.type,
|
|
@@ -2886,7 +2893,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2886
2893
|
});
|
|
2887
2894
|
}, Bo = { class: "flex-auto flex justify-between" }, Io = { class: "text-sm text-gray-dark-25 font-medium line-clamp-2 overflow-hidden dark:text-gray-light-10" }, Lo = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, Mo = {
|
|
2888
2895
|
key: 0,
|
|
2889
|
-
class: "absolute left-1/2 top-1/2 size-1/2 text-gray-light-10/
|
|
2896
|
+
class: "absolute left-1/2 top-1/2 size-1/2 text-gray-light-10/10 dark:text-white/2 -translate-1/2"
|
|
2890
2897
|
}, Oo = { class: "min-h-60 relative" }, Fo = { class: "pt-6" }, Do = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, jo = { class: "text-center text-xl mt-4" }, je = /* @__PURE__ */ L({
|
|
2891
2898
|
__name: "CardBase",
|
|
2892
2899
|
props: {
|
|
@@ -2948,22 +2955,33 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2948
2955
|
}, {
|
|
2949
2956
|
"header-btn": x(() => [
|
|
2950
2957
|
v(j, {
|
|
2958
|
+
class: "size-8",
|
|
2951
2959
|
color: "transparent",
|
|
2960
|
+
variant: "soft",
|
|
2961
|
+
invert: "",
|
|
2962
|
+
size: "none",
|
|
2952
2963
|
onClick: r
|
|
2953
2964
|
}, {
|
|
2954
2965
|
default: x(() => [
|
|
2955
|
-
v(I, {
|
|
2966
|
+
v(I, {
|
|
2967
|
+
name: "more",
|
|
2968
|
+
class: "size-4"
|
|
2969
|
+
})
|
|
2956
2970
|
]),
|
|
2957
2971
|
_: 1
|
|
2958
2972
|
}),
|
|
2959
2973
|
v(j, {
|
|
2974
|
+
class: "size-8",
|
|
2960
2975
|
color: "transparent",
|
|
2976
|
+
variant: "soft",
|
|
2977
|
+
invert: "",
|
|
2978
|
+
size: "none",
|
|
2961
2979
|
onClick: d
|
|
2962
2980
|
}, {
|
|
2963
2981
|
default: x(() => [
|
|
2964
2982
|
v(I, {
|
|
2965
2983
|
name: "copy",
|
|
2966
|
-
class: "size-4
|
|
2984
|
+
class: "size-4"
|
|
2967
2985
|
})
|
|
2968
2986
|
]),
|
|
2969
2987
|
_: 1
|
|
@@ -2990,7 +3008,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2990
3008
|
}, 8, ["size", "title"])) : T("", !0)
|
|
2991
3009
|
]));
|
|
2992
3010
|
}
|
|
2993
|
-
}), No = { class: "flex justify-end" }, Ro = { class: "flex justify-center py-4" },
|
|
3011
|
+
}), No = { class: "flex justify-end" }, Ro = { class: "flex justify-center py-4" }, ld = /* @__PURE__ */ L({
|
|
2994
3012
|
__name: "CardButton",
|
|
2995
3013
|
props: {
|
|
2996
3014
|
size: {},
|
|
@@ -3059,7 +3077,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3059
3077
|
_: 3
|
|
3060
3078
|
}, 16));
|
|
3061
3079
|
}
|
|
3062
|
-
}), Po = { class: "flex justify-center relative mx-2 my-6" },
|
|
3080
|
+
}), Po = { class: "flex justify-center relative mx-2 my-6" }, nd = /* @__PURE__ */ L({
|
|
3063
3081
|
__name: "CardDate",
|
|
3064
3082
|
props: {
|
|
3065
3083
|
size: {},
|
|
@@ -3144,7 +3162,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3144
3162
|
viewBox: "-7.5 -7.5 75 75",
|
|
3145
3163
|
version: "1.1",
|
|
3146
3164
|
style: { transform: "rotate(-90deg)" }
|
|
3147
|
-
}, Go = ["stroke-dashoffset"], Jo = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" },
|
|
3165
|
+
}, Go = ["stroke-dashoffset"], Jo = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, od = /* @__PURE__ */ L({
|
|
3148
3166
|
__name: "CardDimmer",
|
|
3149
3167
|
props: {
|
|
3150
3168
|
size: {},
|
|
@@ -3234,7 +3252,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3234
3252
|
_: 3
|
|
3235
3253
|
}, 16));
|
|
3236
3254
|
}
|
|
3237
|
-
}),
|
|
3255
|
+
}), id = /* @__PURE__ */ L({
|
|
3238
3256
|
__name: "CardInfo",
|
|
3239
3257
|
props: {
|
|
3240
3258
|
size: {},
|
|
@@ -3269,7 +3287,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3269
3287
|
_: 3
|
|
3270
3288
|
}, 16));
|
|
3271
3289
|
}
|
|
3272
|
-
}), Xo = { class: "flex justify-center relative mx-2 my-6" },
|
|
3290
|
+
}), Xo = { class: "flex justify-center relative mx-2 my-6" }, rd = /* @__PURE__ */ L({
|
|
3273
3291
|
__name: "CardInput",
|
|
3274
3292
|
props: {
|
|
3275
3293
|
size: {},
|
|
@@ -3317,8 +3335,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3317
3335
|
}), {
|
|
3318
3336
|
icon: x(() => [
|
|
3319
3337
|
v(I, {
|
|
3320
|
-
name: "chevron-
|
|
3321
|
-
class: "size-8"
|
|
3338
|
+
name: "chevron-down",
|
|
3339
|
+
class: "size-8 -rotate-90"
|
|
3322
3340
|
})
|
|
3323
3341
|
]),
|
|
3324
3342
|
_: 1
|
|
@@ -3328,7 +3346,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3328
3346
|
_: 3
|
|
3329
3347
|
}, 16));
|
|
3330
3348
|
}
|
|
3331
|
-
}), qo = { class: "flex justify-center py-4" },
|
|
3349
|
+
}), qo = { class: "flex justify-center py-4" }, dd = /* @__PURE__ */ L({
|
|
3332
3350
|
__name: "CardList",
|
|
3333
3351
|
props: {
|
|
3334
3352
|
size: {},
|
|
@@ -3390,7 +3408,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3390
3408
|
default: x(() => [
|
|
3391
3409
|
v(I, {
|
|
3392
3410
|
name: "list-check",
|
|
3393
|
-
class: "size-
|
|
3411
|
+
class: "size-5"
|
|
3394
3412
|
})
|
|
3395
3413
|
]),
|
|
3396
3414
|
_: 1
|
|
@@ -3620,7 +3638,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3620
3638
|
class: "cursor-pointer size-4",
|
|
3621
3639
|
onClick: Q((N) => p(_), ["prevent", "stop"])
|
|
3622
3640
|
}, [
|
|
3623
|
-
v(I, {
|
|
3641
|
+
v(I, {
|
|
3642
|
+
name: "close",
|
|
3643
|
+
class: "size-5"
|
|
3644
|
+
})
|
|
3624
3645
|
], 8, fi)
|
|
3625
3646
|
])
|
|
3626
3647
|
]),
|
|
@@ -3632,7 +3653,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3632
3653
|
onClick: m
|
|
3633
3654
|
}, {
|
|
3634
3655
|
default: x(() => [
|
|
3635
|
-
v(I, {
|
|
3656
|
+
v(I, {
|
|
3657
|
+
name: "add",
|
|
3658
|
+
class: "size-5"
|
|
3659
|
+
})
|
|
3636
3660
|
]),
|
|
3637
3661
|
_: 1
|
|
3638
3662
|
})
|
|
@@ -3640,7 +3664,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3640
3664
|
])) : T("", !0)
|
|
3641
3665
|
]));
|
|
3642
3666
|
}
|
|
3643
|
-
}), vi = { class: "flex flex-col" }, pi = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, hi = { class: "flex-auto order-1" }, yi = { class: "flex-auto gap-x-2 order-1" }, bi = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, xi = { class: "flex gap-2 items-center" }, ki = { class: "flex flex-col gap-4" }, $i = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, wi = { class: "relative group" }, Ci = { class: "select-none" }, _i = ["onClick"], Si = { class: "flex justify-center order-0 md:order-1" }, Ti = { class: "size-32 shrink-0" },
|
|
3667
|
+
}), vi = { class: "flex flex-col" }, pi = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, hi = { class: "flex-auto order-1" }, yi = { class: "flex-auto gap-x-2 order-1" }, bi = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, xi = { class: "flex gap-2 items-center" }, ki = { class: "flex flex-col gap-4" }, $i = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, wi = { class: "relative group" }, Ci = { class: "select-none" }, _i = ["onClick"], Si = { class: "flex justify-center order-0 md:order-1" }, Ti = { class: "size-32 shrink-0" }, zi = { class: "flex gap-4 justify-end" }, Ai = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" }, cd = /* @__PURE__ */ L({
|
|
3644
3668
|
__name: "ItemEdit",
|
|
3645
3669
|
props: {
|
|
3646
3670
|
items: {},
|
|
@@ -3662,36 +3686,36 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3662
3686
|
get: "",
|
|
3663
3687
|
getTo: ""
|
|
3664
3688
|
}), o = F(!1), r = C(() => {
|
|
3665
|
-
var
|
|
3666
|
-
return !((
|
|
3667
|
-
}), d = C(() => !!e.items.filter((
|
|
3689
|
+
var z;
|
|
3690
|
+
return !((z = e.item) != null && z.id);
|
|
3691
|
+
}), d = C(() => !!e.items.filter((z) => {
|
|
3668
3692
|
var V;
|
|
3669
|
-
return
|
|
3670
|
-
}).find((
|
|
3671
|
-
var
|
|
3672
|
-
return (
|
|
3693
|
+
return z.id !== ((V = e.item) == null ? void 0 : V.id);
|
|
3694
|
+
}).find((z) => z.id === (t == null ? void 0 : t.value.id))), u = C(() => t.value.type === "info"), i = C(() => {
|
|
3695
|
+
var z;
|
|
3696
|
+
return (z = t.value.args) == null ? void 0 : z.length;
|
|
3673
3697
|
}), c = C(() => t.value.args.length > 3), m = C(() => {
|
|
3674
3698
|
if (d.value) return !0;
|
|
3675
|
-
const { id:
|
|
3676
|
-
return !
|
|
3677
|
-
}), p = ({ value:
|
|
3678
|
-
const V =
|
|
3679
|
-
t.value.type = V, delete t.value.opts, ["button", "list", "dimmer"].includes(V) && (
|
|
3680
|
-
}, h = (
|
|
3681
|
-
|
|
3682
|
-
}, k = (
|
|
3683
|
-
!t.value.args.length && !t.value.id && (t.value.id =
|
|
3684
|
-
}, q = (
|
|
3685
|
-
|
|
3699
|
+
const { id: z, args: V } = t.value;
|
|
3700
|
+
return !z || !V.length;
|
|
3701
|
+
}), p = ({ value: z }) => t.value.icon = z, b = ({ value: z }) => {
|
|
3702
|
+
const V = z;
|
|
3703
|
+
t.value.type = V, delete t.value.opts, ["button", "list", "dimmer"].includes(V) && (z === "button" && (t.value.opts = {}), z === "list" && (t.value.opts = { items: [] }), z === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
|
|
3704
|
+
}, h = (z) => {
|
|
3705
|
+
z === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), z === "get" && (t.value.get ? delete t.value.get : t.value.get = "a"), z === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
|
|
3706
|
+
}, k = (z) => a("button", z, t.value), _ = (z) => t.value.args = t.value.args.filter((V) => V !== z), N = ({ path: z }) => {
|
|
3707
|
+
!t.value.args.length && !t.value.id && (t.value.id = z), t.value.args.push(z), o.value = !1;
|
|
3708
|
+
}, q = (z, V) => {
|
|
3709
|
+
z === "set" && (t.value.set = V), z === "get" && (t.value.get = V), z === "getTo" && (t.value.getTo = V), V || delete t.value[z];
|
|
3686
3710
|
}, xe = () => {
|
|
3687
3711
|
o.value = !0;
|
|
3688
|
-
}, Te = (
|
|
3689
|
-
t.value.opts || (t.value.opts = {}), t.value.opts[
|
|
3712
|
+
}, Te = (z, V) => {
|
|
3713
|
+
t.value.opts || (t.value.opts = {}), t.value.opts[z] = V, z === "disabled" && !V && delete t.value.opts[z];
|
|
3690
3714
|
};
|
|
3691
3715
|
return he(() => {
|
|
3692
|
-
var
|
|
3693
|
-
(
|
|
3694
|
-
}), (
|
|
3716
|
+
var z;
|
|
3717
|
+
(z = e.item) != null && z.id && (t.value = Sa(e.item));
|
|
3718
|
+
}), (z, V) => (f(), g("div", vi, [
|
|
3695
3719
|
l("div", pi, [
|
|
3696
3720
|
l("div", hi, [
|
|
3697
3721
|
v(ai, {
|
|
@@ -3705,7 +3729,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3705
3729
|
modelValue: t.value.id,
|
|
3706
3730
|
"onUpdate:modelValue": V[0] || (V[0] = (W) => t.value.id = W),
|
|
3707
3731
|
label: "ID",
|
|
3708
|
-
message: d.value ?
|
|
3732
|
+
message: d.value ? z.$t("used") : ""
|
|
3709
3733
|
}, ga({ _: 2 }, [
|
|
3710
3734
|
i.value ? void 0 : {
|
|
3711
3735
|
name: "icon",
|
|
@@ -3715,7 +3739,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3715
3739
|
onClick: xe
|
|
3716
3740
|
}, {
|
|
3717
3741
|
default: x(() => [
|
|
3718
|
-
v(I, {
|
|
3742
|
+
v(I, {
|
|
3743
|
+
name: "search",
|
|
3744
|
+
class: "size-5"
|
|
3745
|
+
})
|
|
3719
3746
|
]),
|
|
3720
3747
|
_: 1
|
|
3721
3748
|
})
|
|
@@ -3740,7 +3767,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3740
3767
|
}, {
|
|
3741
3768
|
item: x(({ item: W }) => [
|
|
3742
3769
|
l("div", xi, [
|
|
3743
|
-
B(
|
|
3770
|
+
B(z.$slots, "icon", {
|
|
3744
3771
|
icon: W.value
|
|
3745
3772
|
}),
|
|
3746
3773
|
l("div", null, w(W.name), 1)
|
|
@@ -3795,8 +3822,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3795
3822
|
value: t.value.set,
|
|
3796
3823
|
args: t.value.args,
|
|
3797
3824
|
prefix: ["v"],
|
|
3798
|
-
"prefix-titles": [
|
|
3799
|
-
"argument-title":
|
|
3825
|
+
"prefix-titles": [z.$t("dashboard.newValue")],
|
|
3826
|
+
"argument-title": z.$t("dashboard.argument"),
|
|
3800
3827
|
disabled: !i.value || u.value,
|
|
3801
3828
|
label: "Set",
|
|
3802
3829
|
onOnIcon: V[3] || (V[3] = (W) => h("set")),
|
|
@@ -3805,7 +3832,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3805
3832
|
v(He, {
|
|
3806
3833
|
value: t.value.get,
|
|
3807
3834
|
args: t.value.args,
|
|
3808
|
-
"argument-title":
|
|
3835
|
+
"argument-title": z.$t("dashboard.argument"),
|
|
3809
3836
|
disabled: !i.value,
|
|
3810
3837
|
label: "Get",
|
|
3811
3838
|
onOnIcon: V[5] || (V[5] = (W) => h("get")),
|
|
@@ -3815,8 +3842,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3815
3842
|
value: t.value.getTo,
|
|
3816
3843
|
args: t.value.args,
|
|
3817
3844
|
prefix: ["v"],
|
|
3818
|
-
"prefix-titles": [
|
|
3819
|
-
"argument-title":
|
|
3845
|
+
"prefix-titles": [z.$t("dashboard.getResult")],
|
|
3846
|
+
"argument-title": z.$t("dashboard.argument"),
|
|
3820
3847
|
disabled: !i.value,
|
|
3821
3848
|
label: "GetTo",
|
|
3822
3849
|
onOnIcon: V[7] || (V[7] = (W) => h("getTo")),
|
|
@@ -3836,11 +3863,11 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3836
3863
|
]),
|
|
3837
3864
|
l("div", Si, [
|
|
3838
3865
|
l("div", Ti, [
|
|
3839
|
-
B(
|
|
3866
|
+
B(z.$slots, "default", { item: t.value })
|
|
3840
3867
|
])
|
|
3841
3868
|
])
|
|
3842
3869
|
]),
|
|
3843
|
-
l("div",
|
|
3870
|
+
l("div", zi, [
|
|
3844
3871
|
v(j, {
|
|
3845
3872
|
class: "px-4",
|
|
3846
3873
|
color: "blue",
|
|
@@ -3848,7 +3875,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3848
3875
|
onClick: V[9] || (V[9] = (W) => k(r.value ? "add" : "save"))
|
|
3849
3876
|
}, {
|
|
3850
3877
|
default: x(() => [
|
|
3851
|
-
E(w(r.value ?
|
|
3878
|
+
E(w(r.value ? z.$t("add") : z.$t("save")), 1)
|
|
3852
3879
|
]),
|
|
3853
3880
|
_: 1
|
|
3854
3881
|
}, 8, ["disabled"]),
|
|
@@ -3859,7 +3886,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3859
3886
|
onClick: V[10] || (V[10] = (W) => k("remove"))
|
|
3860
3887
|
}, {
|
|
3861
3888
|
default: x(() => [
|
|
3862
|
-
E(w(
|
|
3889
|
+
E(w(z.$t("remove")), 1)
|
|
3863
3890
|
]),
|
|
3864
3891
|
_: 1
|
|
3865
3892
|
})
|
|
@@ -3867,11 +3894,11 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3867
3894
|
o.value ? (f(), O(Se, {
|
|
3868
3895
|
key: 0,
|
|
3869
3896
|
size: "md",
|
|
3870
|
-
title:
|
|
3897
|
+
title: z.$t("select"),
|
|
3871
3898
|
onClose: V[11] || (V[11] = (W) => o.value = !1)
|
|
3872
3899
|
}, {
|
|
3873
3900
|
default: x(() => [
|
|
3874
|
-
l("div",
|
|
3901
|
+
l("div", Ai, [
|
|
3875
3902
|
v(wt, {
|
|
3876
3903
|
items: e.object,
|
|
3877
3904
|
onlyValue: !i.value,
|
|
@@ -4016,12 +4043,12 @@ const Fi = () => (e, s) => {
|
|
|
4016
4043
|
selectionEnd: p
|
|
4017
4044
|
};
|
|
4018
4045
|
};
|
|
4019
|
-
let
|
|
4046
|
+
let zt = [], re = null, te = 0, ve = [], Ae = null, Oe = null, At, la, fe = null, De = null;
|
|
4020
4047
|
const ji = (e) => {
|
|
4021
4048
|
const { customSuggestions: s = [], minPrefixLength: a = 1, maxSuggestions: n = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: r, renderMenu: d, renderTooltip: u } = e;
|
|
4022
4049
|
if (!d || !u)
|
|
4023
4050
|
throw new Error("renderMenu and renderTooltip are required");
|
|
4024
|
-
return
|
|
4051
|
+
return zt = [...s].map((i) => r(i)), At = d, la = u, (i, c) => {
|
|
4025
4052
|
if (typeof KeyboardEvent > "u" || !(c instanceof KeyboardEvent))
|
|
4026
4053
|
return;
|
|
4027
4054
|
const { value: m, selectionStart: p } = i, b = c.target;
|
|
@@ -4082,8 +4109,8 @@ const ji = (e) => {
|
|
|
4082
4109
|
};
|
|
4083
4110
|
}
|
|
4084
4111
|
if (!(c.key.length !== 1 || c.ctrlKey || c.metaKey || c.altKey))
|
|
4085
|
-
return
|
|
4086
|
-
|
|
4112
|
+
return Ae && clearTimeout(Ae), Ae = setTimeout(() => {
|
|
4113
|
+
Ae = null;
|
|
4087
4114
|
const h = b.value, k = b.selectionStart, _ = lt(h, k), N = h.slice(_, k);
|
|
4088
4115
|
if (N.length < a) {
|
|
4089
4116
|
be();
|
|
@@ -4100,7 +4127,7 @@ const ji = (e) => {
|
|
|
4100
4127
|
};
|
|
4101
4128
|
function mt(e) {
|
|
4102
4129
|
const s = e.toLowerCase();
|
|
4103
|
-
return
|
|
4130
|
+
return zt.filter((a) => {
|
|
4104
4131
|
const n = a.label.toLowerCase();
|
|
4105
4132
|
return n.startsWith(s) || n.includes(s) || n.split("_").map((t) => t[0]).join("").startsWith(s);
|
|
4106
4133
|
}).sort((a, n) => {
|
|
@@ -4120,7 +4147,7 @@ function lt(e, s) {
|
|
|
4120
4147
|
function Ni(e, s) {
|
|
4121
4148
|
be(), ve = s, te = 0;
|
|
4122
4149
|
const a = na(e);
|
|
4123
|
-
re =
|
|
4150
|
+
re = At(s, te, (n) => {
|
|
4124
4151
|
te = n, Fe();
|
|
4125
4152
|
}), Object.assign(re.style, {
|
|
4126
4153
|
position: "fixed",
|
|
@@ -4131,7 +4158,7 @@ function Ni(e, s) {
|
|
|
4131
4158
|
}
|
|
4132
4159
|
function Fe() {
|
|
4133
4160
|
if (!re || !Oe) return;
|
|
4134
|
-
const e =
|
|
4161
|
+
const e = At(ve, te, (a) => {
|
|
4135
4162
|
te = a, Fe();
|
|
4136
4163
|
}), s = re.getBoundingClientRect();
|
|
4137
4164
|
re.replaceWith(e), re = e, Object.assign(re.style, {
|
|
@@ -4167,7 +4194,7 @@ function ft(e, s) {
|
|
|
4167
4194
|
};
|
|
4168
4195
|
}
|
|
4169
4196
|
function be() {
|
|
4170
|
-
|
|
4197
|
+
Ae && (clearTimeout(Ae), Ae = null), re && (re.remove(), re = null, ve = [], te = 0, Oe = null);
|
|
4171
4198
|
}
|
|
4172
4199
|
function na(e) {
|
|
4173
4200
|
const s = e.getBoundingClientRect(), { value: a, selectionStart: n } = e, o = a.substring(0, n).split(`
|
|
@@ -4189,7 +4216,7 @@ function Nt(e) {
|
|
|
4189
4216
|
Ke();
|
|
4190
4217
|
return;
|
|
4191
4218
|
}
|
|
4192
|
-
const t =
|
|
4219
|
+
const t = zt.find((d) => d.label === n);
|
|
4193
4220
|
if (!t) {
|
|
4194
4221
|
Ke();
|
|
4195
4222
|
return;
|
|
@@ -4209,16 +4236,24 @@ typeof document < "u" && document.addEventListener("mousedown", (e) => {
|
|
|
4209
4236
|
const s = e.target;
|
|
4210
4237
|
re && !re.contains(s) && be(), fe && !fe.contains(s) && Ke();
|
|
4211
4238
|
});
|
|
4212
|
-
const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Ri =
|
|
4213
|
-
|
|
4239
|
+
const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Ri = {
|
|
4240
|
+
comment: "text-gray-dark-25 dark:text-gray-main",
|
|
4241
|
+
str: "text-amber-dark-75 dark:text-amber-dark-35",
|
|
4242
|
+
num: "text-green-dark-55 dark:text-green-light-25",
|
|
4243
|
+
word: "text-purple-main dark:text-purple-light-30",
|
|
4244
|
+
var: "text-cyan-dark-30 dark:text-cyan-light-40",
|
|
4245
|
+
event: "text-amber-dark-75 dark:text-amber-light-45",
|
|
4246
|
+
operator: "text-amber-dark-40"
|
|
4247
|
+
}, Pi = ["else", "end", "call", "fade"], Ui = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ki = (e) => {
|
|
4248
|
+
const s = e.filter((d) => d.type !== "var").map((d) => d.label), r = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Pi, ...s])).map(Ui).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
|
|
4214
4249
|
return new RegExp(r, "g");
|
|
4215
|
-
},
|
|
4216
|
-
const a =
|
|
4250
|
+
}, Hi = (e) => (s) => {
|
|
4251
|
+
const a = Ki(e);
|
|
4217
4252
|
let n = "", t = 0;
|
|
4218
4253
|
for (const o of s.matchAll(a)) {
|
|
4219
4254
|
const [r, d, u, i, c, m, p, b] = o;
|
|
4220
4255
|
let h = "";
|
|
4221
|
-
d ? h = "comment" : u ? h = "str" : i ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), n += gt(s.slice(t, o.index)), n += `<span class="
|
|
4256
|
+
d ? h = "comment" : u ? h = "str" : i ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), n += gt(s.slice(t, o.index)), n += `<span class="${Ri[h] ?? ""}">${gt(r)}</span>`, t = o.index + r.length;
|
|
4222
4257
|
}
|
|
4223
4258
|
return n += gt(s.slice(t)), n;
|
|
4224
4259
|
}, oa = {
|
|
@@ -4226,7 +4261,7 @@ const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
4226
4261
|
func: "text-yellow-600 dark:text-yellow-400",
|
|
4227
4262
|
var: "text-cyan-600 dark:text-cyan-400",
|
|
4228
4263
|
event: "text-purple-600 dark:text-purple-400"
|
|
4229
|
-
},
|
|
4264
|
+
}, Wi = (e, s, a) => {
|
|
4230
4265
|
const n = document.createElement("div");
|
|
4231
4266
|
return n.className = `
|
|
4232
4267
|
fixed z-[10000] min-w-64 max-w-100 max-h-64
|
|
@@ -4249,7 +4284,7 @@ const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
4249
4284
|
${t.description ? `<span class="text-xs text-gray-main dark:text-gray-dark-25">${t.description}</span>` : ""}
|
|
4250
4285
|
`, d.addEventListener("click", () => a(o)), n.appendChild(d);
|
|
4251
4286
|
}), n;
|
|
4252
|
-
},
|
|
4287
|
+
}, Gi = (e, s) => {
|
|
4253
4288
|
const a = document.createElement("div");
|
|
4254
4289
|
a.className = `
|
|
4255
4290
|
fixed z-[10001] px-3 py-2 font-mono text-sm max-w-75
|
|
@@ -4268,7 +4303,7 @@ const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
4268
4303
|
absolute -bottom-1 left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
|
|
4269
4304
|
bg-white dark:bg-gray-dark-30 border-r border-b border-gray-light-10 dark:border-gray-dark-30
|
|
4270
4305
|
`, a.appendChild(o), a;
|
|
4271
|
-
},
|
|
4306
|
+
}, Ji = [
|
|
4272
4307
|
{ label: "if", type: "word", insert: `if:\${$v0<10};
|
|
4273
4308
|
|
|
4274
4309
|
else;
|
|
@@ -4303,7 +4338,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4303
4338
|
{ label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
|
|
4304
4339
|
{ label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
|
|
4305
4340
|
{ label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
|
|
4306
|
-
],
|
|
4341
|
+
], ud = /* @__PURE__ */ L({
|
|
4307
4342
|
__name: "ScriptEditor",
|
|
4308
4343
|
props: {
|
|
4309
4344
|
modelValue: {},
|
|
@@ -4313,7 +4348,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4313
4348
|
setup(e, { emit: s }) {
|
|
4314
4349
|
const a = s;
|
|
4315
4350
|
let n;
|
|
4316
|
-
const t = [...
|
|
4351
|
+
const t = [...Ji, ...e.suggestions];
|
|
4317
4352
|
return _e(
|
|
4318
4353
|
() => e.modelValue,
|
|
4319
4354
|
(o) => {
|
|
@@ -4323,7 +4358,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4323
4358
|
n = new Ii("#editor", {
|
|
4324
4359
|
value: e.modelValue,
|
|
4325
4360
|
lineNumbers: !0,
|
|
4326
|
-
highlighters: [
|
|
4361
|
+
highlighters: [Hi(t)],
|
|
4327
4362
|
plugins: [
|
|
4328
4363
|
Oi(),
|
|
4329
4364
|
Fi(),
|
|
@@ -4335,8 +4370,8 @@ end;`, detail: "event(name: string)" },
|
|
|
4335
4370
|
tooltip: {
|
|
4336
4371
|
enabled: !0
|
|
4337
4372
|
},
|
|
4338
|
-
renderMenu:
|
|
4339
|
-
renderTooltip:
|
|
4373
|
+
renderMenu: Wi,
|
|
4374
|
+
renderTooltip: Gi
|
|
4340
4375
|
}),
|
|
4341
4376
|
Di()
|
|
4342
4377
|
],
|
|
@@ -4350,16 +4385,16 @@ end;`, detail: "event(name: string)" },
|
|
|
4350
4385
|
l("div", { id: "editor" }, null, -1)
|
|
4351
4386
|
])]));
|
|
4352
4387
|
}
|
|
4353
|
-
}),
|
|
4388
|
+
}), Xi = { class: "max-w-4xl mx-auto" }, qi = {
|
|
4354
4389
|
key: 0,
|
|
4355
4390
|
class: "text-sm"
|
|
4356
|
-
},
|
|
4391
|
+
}, Yi = {
|
|
4357
4392
|
key: 0,
|
|
4358
4393
|
class: "text-gray-dark-25"
|
|
4359
|
-
},
|
|
4394
|
+
}, Zi = {
|
|
4360
4395
|
key: 1,
|
|
4361
4396
|
class: "text-red-600"
|
|
4362
|
-
},
|
|
4397
|
+
}, Qi = ["innerHTML"], er = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", tr = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", md = /* @__PURE__ */ L({
|
|
4363
4398
|
__name: "ScriptViewDocs",
|
|
4364
4399
|
props: {
|
|
4365
4400
|
lang: { default: "en" }
|
|
@@ -4381,7 +4416,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4381
4416
|
return;
|
|
4382
4417
|
}
|
|
4383
4418
|
const p = document.createElement("script");
|
|
4384
|
-
p.src =
|
|
4419
|
+
p.src = tr, p.async = !0, p.onload = () => {
|
|
4385
4420
|
window.marked ? (window.marked.setOptions({
|
|
4386
4421
|
gfm: !0,
|
|
4387
4422
|
breaks: !0,
|
|
@@ -4412,7 +4447,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4412
4447
|
}
|
|
4413
4448
|
t.value = !0, o.value = null, a.value = "";
|
|
4414
4449
|
try {
|
|
4415
|
-
const m = `${
|
|
4450
|
+
const m = `${er}${c}.md`, p = await fetch(m);
|
|
4416
4451
|
if (!p.ok)
|
|
4417
4452
|
throw new Error(`HTTP ${p.status}: ${p.statusText}`);
|
|
4418
4453
|
const b = await p.text();
|
|
@@ -4433,18 +4468,18 @@ end;`, detail: "event(name: string)" },
|
|
|
4433
4468
|
const m = c instanceof Error ? c.message : "";
|
|
4434
4469
|
o.value = m, console.error("Initialization error:", c);
|
|
4435
4470
|
}
|
|
4436
|
-
}), (c, m) => (f(), g("div",
|
|
4437
|
-
t.value || o.value ? (f(), g("div",
|
|
4438
|
-
t.value ? (f(), g("span",
|
|
4439
|
-
o.value ? (f(), g("span",
|
|
4471
|
+
}), (c, m) => (f(), g("div", Xi, [
|
|
4472
|
+
t.value || o.value ? (f(), g("div", qi, [
|
|
4473
|
+
t.value ? (f(), g("span", Yi, "⏳")) : T("", !0),
|
|
4474
|
+
o.value ? (f(), g("span", Zi, "❌ " + w(o.value), 1)) : T("", !0)
|
|
4440
4475
|
])) : T("", !0),
|
|
4441
4476
|
l("div", {
|
|
4442
4477
|
class: "docs-content",
|
|
4443
4478
|
innerHTML: a.value
|
|
4444
|
-
}, null, 8,
|
|
4479
|
+
}, null, 8, Qi)
|
|
4445
4480
|
]));
|
|
4446
4481
|
}
|
|
4447
|
-
}),
|
|
4482
|
+
}), ar = { class: "my-4" }, fd = /* @__PURE__ */ L({
|
|
4448
4483
|
__name: "ScriptDialog",
|
|
4449
4484
|
props: {
|
|
4450
4485
|
idScript: {}
|
|
@@ -4464,7 +4499,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4464
4499
|
e.idScript || (r.value = "boot");
|
|
4465
4500
|
}), (c, m) => {
|
|
4466
4501
|
const p = le, b = j;
|
|
4467
|
-
return f(), g("div",
|
|
4502
|
+
return f(), g("div", ar, [
|
|
4468
4503
|
v(p, X({
|
|
4469
4504
|
modelValue: H(r),
|
|
4470
4505
|
"onUpdate:modelValue": m[0] || (m[0] = (h) => va(r) ? r.value = h : null)
|
|
@@ -4486,16 +4521,16 @@ end;`, detail: "event(name: string)" },
|
|
|
4486
4521
|
]);
|
|
4487
4522
|
};
|
|
4488
4523
|
}
|
|
4489
|
-
}),
|
|
4524
|
+
}), sr = ["aria-label"], lr = { class: "hidden lg:inline" }, nr = ["aria-label"], or = { class: "flex items-center gap-3 border-b border-gray-light-10/70 px-4 dark:border-white/10" }, ir = ["placeholder"], rr = { class: "max-h-[55vh] overflow-y-auto p-2" }, dr = ["href"], cr = { class: "min-w-0" }, ur = { class: "flex flex-wrap items-baseline gap-2" }, mr = { class: "text-sm font-medium text-gray-dark-40 dark:text-white" }, fr = {
|
|
4490
4525
|
key: 0,
|
|
4491
4526
|
class: "text-xs uppercase tracking-wider text-gray-main"
|
|
4492
|
-
},
|
|
4527
|
+
}, gr = {
|
|
4493
4528
|
key: 0,
|
|
4494
4529
|
class: "mt-0.5 block truncate text-xs text-gray-dark-25 dark:text-gray-main"
|
|
4495
|
-
},
|
|
4530
|
+
}, vr = {
|
|
4496
4531
|
key: 0,
|
|
4497
4532
|
class: "px-4 py-10 text-center text-sm text-gray-dark-25 dark:text-gray-main"
|
|
4498
|
-
},
|
|
4533
|
+
}, gd = /* @__PURE__ */ L({
|
|
4499
4534
|
__name: "VisionSearch",
|
|
4500
4535
|
props: {
|
|
4501
4536
|
items: {},
|
|
@@ -4535,9 +4570,9 @@ end;`, detail: "event(name: string)" },
|
|
|
4535
4570
|
name: "search",
|
|
4536
4571
|
size: 17
|
|
4537
4572
|
}),
|
|
4538
|
-
l("span",
|
|
4573
|
+
l("span", lr, w(e.label), 1),
|
|
4539
4574
|
c[1] || (c[1] = l("kbd", { class: "hidden rounded border border-gray-light-10/60 px-1.5 py-0.5 font-mono text-xs text-gray-main dark:border-white/10 dark:text-gray-dark-25 lg:inline" }, "⌘K", -1))
|
|
4540
|
-
], 8,
|
|
4575
|
+
], 8, sr),
|
|
4541
4576
|
(f(), O(pa, { to: "body" }, [
|
|
4542
4577
|
a.value ? (f(), g("div", {
|
|
4543
4578
|
key: 0,
|
|
@@ -4550,7 +4585,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4550
4585
|
"aria-modal": "true",
|
|
4551
4586
|
"aria-label": e.dialogLabel
|
|
4552
4587
|
}, [
|
|
4553
|
-
l("div",
|
|
4588
|
+
l("div", or, [
|
|
4554
4589
|
v(I, {
|
|
4555
4590
|
name: "search",
|
|
4556
4591
|
size: 18,
|
|
@@ -4563,12 +4598,12 @@ end;`, detail: "event(name: string)" },
|
|
|
4563
4598
|
type: "search",
|
|
4564
4599
|
placeholder: e.placeholder,
|
|
4565
4600
|
class: "h-14 min-w-0 flex-1 bg-transparent text-sm text-gray-dark-40 placeholder:text-gray-main focus:outline-none dark:text-white dark:placeholder:text-gray-main"
|
|
4566
|
-
}, null, 8,
|
|
4601
|
+
}, null, 8, ir), [
|
|
4567
4602
|
[bt, n.value]
|
|
4568
4603
|
]),
|
|
4569
4604
|
c[2] || (c[2] = l("kbd", { class: "hidden rounded border border-gray-light-10/60 px-1.5 py-0.5 font-mono text-xs text-gray-main dark:border-white/10 dark:text-gray-dark-25 sm:inline" }, "Esc", -1))
|
|
4570
4605
|
]),
|
|
4571
|
-
l("div",
|
|
4606
|
+
l("div", rr, [
|
|
4572
4607
|
(f(!0), g(D, null, K(o.value, (m) => (f(), g("a", {
|
|
4573
4608
|
key: `${m.group}-${m.to}-${m.title}`,
|
|
4574
4609
|
href: m.to,
|
|
@@ -4580,22 +4615,22 @@ end;`, detail: "event(name: string)" },
|
|
|
4580
4615
|
size: 16,
|
|
4581
4616
|
class: "mt-0.5 shrink-0 text-gray-main"
|
|
4582
4617
|
}),
|
|
4583
|
-
l("span",
|
|
4584
|
-
l("span",
|
|
4585
|
-
l("span",
|
|
4586
|
-
m.group ? (f(), g("span",
|
|
4618
|
+
l("span", cr, [
|
|
4619
|
+
l("span", ur, [
|
|
4620
|
+
l("span", mr, w(m.title), 1),
|
|
4621
|
+
m.group ? (f(), g("span", fr, w(m.group), 1)) : T("", !0)
|
|
4587
4622
|
]),
|
|
4588
|
-
m.description ? (f(), g("span",
|
|
4623
|
+
m.description ? (f(), g("span", gr, w(m.description), 1)) : T("", !0)
|
|
4589
4624
|
])
|
|
4590
|
-
], 8,
|
|
4591
|
-
o.value.length ? T("", !0) : (f(), g("p",
|
|
4625
|
+
], 8, dr))), 128)),
|
|
4626
|
+
o.value.length ? T("", !0) : (f(), g("p", vr, w(e.emptyText), 1))
|
|
4592
4627
|
])
|
|
4593
|
-
], 8,
|
|
4628
|
+
], 8, nr)
|
|
4594
4629
|
])) : T("", !0)
|
|
4595
4630
|
]))
|
|
4596
4631
|
], 64));
|
|
4597
4632
|
}
|
|
4598
|
-
}),
|
|
4633
|
+
}), pr = ["aria-label", "title"], vd = /* @__PURE__ */ L({
|
|
4599
4634
|
__name: "VisionThemeToggle",
|
|
4600
4635
|
props: {
|
|
4601
4636
|
labelLight: { default: "Включить светлую тему" },
|
|
@@ -4605,7 +4640,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4605
4640
|
},
|
|
4606
4641
|
setup(e) {
|
|
4607
4642
|
const s = F(Ta("theme") === "light" ? "light" : "dark"), a = (n) => {
|
|
4608
|
-
s.value = n,
|
|
4643
|
+
s.value = n, za(n);
|
|
4609
4644
|
};
|
|
4610
4645
|
return he(async () => {
|
|
4611
4646
|
await xt(), setTimeout(() => a(s.value), 0);
|
|
@@ -4620,9 +4655,9 @@ end;`, detail: "event(name: string)" },
|
|
|
4620
4655
|
name: s.value === "dark" ? "sun" : "moon",
|
|
4621
4656
|
size: 18
|
|
4622
4657
|
}, null, 8, ["name"])
|
|
4623
|
-
], 8,
|
|
4658
|
+
], 8, pr));
|
|
4624
4659
|
}
|
|
4625
|
-
}),
|
|
4660
|
+
}), pd = /* @__PURE__ */ L({
|
|
4626
4661
|
__name: "VAutocomplete",
|
|
4627
4662
|
props: {
|
|
4628
4663
|
modelValue: { default: "" },
|
|
@@ -4667,7 +4702,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4667
4702
|
_: 3
|
|
4668
4703
|
}, 16));
|
|
4669
4704
|
}
|
|
4670
|
-
}),
|
|
4705
|
+
}), hr = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, yr = { class: "p-4" }, hd = /* @__PURE__ */ L({
|
|
4671
4706
|
__name: "VExpansion",
|
|
4672
4707
|
props: {
|
|
4673
4708
|
label: { default: "" },
|
|
@@ -4698,21 +4733,21 @@ end;`, detail: "event(name: string)" },
|
|
|
4698
4733
|
}, [
|
|
4699
4734
|
v(I, {
|
|
4700
4735
|
name: "chevron-down",
|
|
4701
|
-
class: "size-
|
|
4736
|
+
class: "size-5"
|
|
4702
4737
|
})
|
|
4703
4738
|
], 2)
|
|
4704
4739
|
]),
|
|
4705
|
-
l("div",
|
|
4706
|
-
l("div",
|
|
4740
|
+
l("div", hr, [
|
|
4741
|
+
l("div", yr, [
|
|
4707
4742
|
B(o.$slots, "default")
|
|
4708
4743
|
])
|
|
4709
4744
|
])
|
|
4710
4745
|
], 512));
|
|
4711
4746
|
}
|
|
4712
|
-
}),
|
|
4747
|
+
}), br = ["onDragstart", "onDragenter"], xr = {
|
|
4713
4748
|
key: 0,
|
|
4714
4749
|
class: "absolute inset-0 border border-dashed border-blue-600 rounded"
|
|
4715
|
-
},
|
|
4750
|
+
}, yd = /* @__PURE__ */ L({
|
|
4716
4751
|
__name: "VDragDrop",
|
|
4717
4752
|
props: {
|
|
4718
4753
|
items: {},
|
|
@@ -4770,17 +4805,17 @@ end;`, detail: "event(name: string)" },
|
|
|
4770
4805
|
index: h,
|
|
4771
4806
|
isDragging: n.value === b.id
|
|
4772
4807
|
}),
|
|
4773
|
-
o.value === h && n.value !== b.id ? (f(), g("div",
|
|
4774
|
-
], 42,
|
|
4808
|
+
o.value === h && n.value !== b.id ? (f(), g("div", xr)) : T("", !0)
|
|
4809
|
+
], 42, br))), 128))
|
|
4775
4810
|
]),
|
|
4776
4811
|
_: 3
|
|
4777
4812
|
})
|
|
4778
4813
|
], 32));
|
|
4779
4814
|
}
|
|
4780
|
-
}),
|
|
4815
|
+
}), kr = { class: "glass-inset overflow-x-auto rounded-md" }, $r = { class: "min-w-full" }, wr = { class: "border-y border-gray-light-10/70 py-3 dark:border-white/10" }, Cr = { class: "bg-gray-light-30/70 dark:bg-white/[0.04]" }, _r = { class: "flex items-center" }, Sr = { class: "divide-y divide-gray-light-30 dark:divide-white/5" }, Tr = ["onClick"], zr = { class: "flex items-center text-gray-dark-30 dark:text-white/70" }, Ar = { key: 1 }, Er = {
|
|
4781
4816
|
class: "py-3 whitespace-nowrap",
|
|
4782
4817
|
colspan: "9"
|
|
4783
|
-
},
|
|
4818
|
+
}, Vr = { class: "flex items-center justify-center px-2 text-sm text-gray-dark-25 dark:text-white/50" }, bd = /* @__PURE__ */ L({
|
|
4784
4819
|
__name: "VTable",
|
|
4785
4820
|
props: {
|
|
4786
4821
|
headers: { default: () => [] },
|
|
@@ -4789,10 +4824,10 @@ end;`, detail: "event(name: string)" },
|
|
|
4789
4824
|
emits: ["click"],
|
|
4790
4825
|
setup(e, { emit: s }) {
|
|
4791
4826
|
const a = s, n = (r, d) => a("click", r, d), t = (r) => (r == null ? void 0 : r.className) || "", o = (r, { key: d }) => r == null ? void 0 : r[d];
|
|
4792
|
-
return (r, d) => (f(), g("div",
|
|
4793
|
-
l("table",
|
|
4794
|
-
l("thead",
|
|
4795
|
-
l("tr",
|
|
4827
|
+
return (r, d) => (f(), g("div", kr, [
|
|
4828
|
+
l("table", $r, [
|
|
4829
|
+
l("thead", wr, [
|
|
4830
|
+
l("tr", Cr, [
|
|
4796
4831
|
(f(!0), g(D, null, K(e.headers, (u, i) => (f(), g("th", {
|
|
4797
4832
|
key: i,
|
|
4798
4833
|
class: M(["px-4 py-2 whitespace-nowrap font-normal text-gray-dark-25 dark:text-white/50", t(u)])
|
|
@@ -4801,12 +4836,12 @@ end;`, detail: "event(name: string)" },
|
|
|
4801
4836
|
item: u,
|
|
4802
4837
|
i
|
|
4803
4838
|
}, () => [
|
|
4804
|
-
l("div",
|
|
4839
|
+
l("div", _r, w(u.name), 1)
|
|
4805
4840
|
])
|
|
4806
4841
|
], 2))), 128))
|
|
4807
4842
|
])
|
|
4808
4843
|
]),
|
|
4809
|
-
l("tbody",
|
|
4844
|
+
l("tbody", Sr, [
|
|
4810
4845
|
e.items.length ? (f(!0), g(D, { key: 0 }, K(e.items, (u, i) => (f(), g("tr", {
|
|
4811
4846
|
key: i,
|
|
4812
4847
|
class: "transition-colors hover:bg-cyan-main/[0.04] dark:hover:bg-white/[0.04]",
|
|
@@ -4816,7 +4851,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4816
4851
|
key: m,
|
|
4817
4852
|
class: "py-2 px-4"
|
|
4818
4853
|
}, [
|
|
4819
|
-
l("div",
|
|
4854
|
+
l("div", zr, [
|
|
4820
4855
|
B(r.$slots, c.key, {
|
|
4821
4856
|
item: u,
|
|
4822
4857
|
i
|
|
@@ -4825,9 +4860,9 @@ end;`, detail: "event(name: string)" },
|
|
|
4825
4860
|
])
|
|
4826
4861
|
])
|
|
4827
4862
|
]))), 128))
|
|
4828
|
-
], 8,
|
|
4829
|
-
l("td",
|
|
4830
|
-
l("div",
|
|
4863
|
+
], 8, Tr))), 128)) : (f(), g("tr", Ar, [
|
|
4864
|
+
l("td", Er, [
|
|
4865
|
+
l("div", Vr, [
|
|
4831
4866
|
B(r.$slots, "empty", {}, () => [
|
|
4832
4867
|
d[0] || (d[0] = E("The list is empty", -1))
|
|
4833
4868
|
])
|
|
@@ -4838,7 +4873,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4838
4873
|
])
|
|
4839
4874
|
]));
|
|
4840
4875
|
}
|
|
4841
|
-
}),
|
|
4876
|
+
}), xd = /* @__PURE__ */ L({
|
|
4842
4877
|
__name: "VTooltip",
|
|
4843
4878
|
props: {
|
|
4844
4879
|
timeout: {},
|
|
@@ -4879,51 +4914,51 @@ end;`, detail: "event(name: string)" },
|
|
|
4879
4914
|
}
|
|
4880
4915
|
});
|
|
4881
4916
|
export {
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4917
|
+
jr as AppAside,
|
|
4918
|
+
Nr as AppHeader,
|
|
4919
|
+
Ur as AppNav,
|
|
4920
|
+
Rr as AppNotification,
|
|
4921
|
+
Pr as AppOverlay,
|
|
4922
|
+
Kr as AppProgress,
|
|
4923
|
+
qr as BlockBreadcrumb,
|
|
4889
4924
|
Xt as BlockDataSettings,
|
|
4890
4925
|
un as BlockHost,
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4926
|
+
ed as BlockImport,
|
|
4927
|
+
Hr as BlockInfo,
|
|
4928
|
+
Zr as BlockPicker,
|
|
4929
|
+
Wr as BlockScan,
|
|
4930
|
+
Gr as BlockService,
|
|
4896
4931
|
yn as BlockShell,
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4932
|
+
Jr as BlockStatus,
|
|
4933
|
+
Xr as BlockUpdate,
|
|
4934
|
+
Qr as BlockView,
|
|
4900
4935
|
je as CardBase,
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4936
|
+
ld as CardButton,
|
|
4937
|
+
nd as CardDate,
|
|
4938
|
+
od as CardDimmer,
|
|
4939
|
+
id as CardInfo,
|
|
4940
|
+
rd as CardInput,
|
|
4941
|
+
dd as CardList,
|
|
4907
4942
|
Ga as CardNotification,
|
|
4908
4943
|
_t as DEFAULT_METRIC_STYLE,
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4944
|
+
Ji as DEFAULT_SUGGESTIONS,
|
|
4945
|
+
td as EnergyFlowBlock,
|
|
4946
|
+
wd as ICONS,
|
|
4947
|
+
Cd as ICON_NAMES,
|
|
4948
|
+
cd as ItemEdit,
|
|
4914
4949
|
pt as MAX_METRICS,
|
|
4915
4950
|
We as MAX_METRIC_ARGS,
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4951
|
+
fd as ScriptDialog,
|
|
4952
|
+
ud as ScriptEditor,
|
|
4953
|
+
md as ScriptViewDocs,
|
|
4954
|
+
pd as VAutocomplete,
|
|
4920
4955
|
j as VButton,
|
|
4921
|
-
|
|
4956
|
+
An as VCard,
|
|
4922
4957
|
ni as VCheckbox,
|
|
4923
4958
|
Se as VDialog,
|
|
4924
|
-
|
|
4959
|
+
yd as VDragDrop,
|
|
4925
4960
|
Wt as VDropdown,
|
|
4926
|
-
|
|
4961
|
+
hd as VExpansion,
|
|
4927
4962
|
Qs as VFile,
|
|
4928
4963
|
He as VFunc,
|
|
4929
4964
|
I as VIcon,
|
|
@@ -4932,27 +4967,27 @@ export {
|
|
|
4932
4967
|
kt as VList,
|
|
4933
4968
|
wt as VListObject,
|
|
4934
4969
|
xa as VLoader,
|
|
4935
|
-
|
|
4970
|
+
_d as VPopup,
|
|
4936
4971
|
ge as VSelect,
|
|
4937
|
-
|
|
4972
|
+
bd as VTable,
|
|
4938
4973
|
ai as VTabs,
|
|
4939
4974
|
le as VTextField,
|
|
4940
4975
|
Ct as VTextWrapper,
|
|
4941
|
-
|
|
4976
|
+
xd as VTooltip,
|
|
4942
4977
|
ba as VWifiIcon,
|
|
4943
|
-
|
|
4944
|
-
|
|
4978
|
+
gd as VisionSearch,
|
|
4979
|
+
vd as VisionThemeToggle,
|
|
4945
4980
|
ro as createBlockContext,
|
|
4946
4981
|
Vo as createDeviceBlockStorage,
|
|
4947
4982
|
co as createDeviceContext,
|
|
4948
|
-
|
|
4983
|
+
ad as deviceBlockStorage,
|
|
4949
4984
|
uo as deviceProvider,
|
|
4950
4985
|
io as energyFlowDefinition,
|
|
4951
|
-
|
|
4986
|
+
Hi as fullHighlighter,
|
|
4952
4987
|
vt as metricClasses,
|
|
4953
4988
|
Tt as resolveBlockBindings,
|
|
4954
4989
|
Vl as resolveBlockMetrics,
|
|
4955
4990
|
El as resolveMetric,
|
|
4956
|
-
|
|
4957
|
-
|
|
4991
|
+
Yr as resolveMetricArgValues,
|
|
4992
|
+
sd as useBlock
|
|
4958
4993
|
};
|