vuesp-components 5.1.0 → 5.2.1

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.
@@ -1,12 +1,12 @@
1
- import { defineComponent as M, resolveComponent as lt, openBlock as f, createElementBlock as g, Fragment as D, createCommentVNode as T, createElementVNode as n, normalizeClass as B, createVNode as v, withCtx as x, createBlock as O, renderSlot as I, computed as S, withModifiers as ee, toDisplayString as C, unref as G, TransitionGroup as Kt, renderList as K, mergeProps as Y, ref as F, watch as ye, reactive as bt, onMounted as be, onUnmounted as Ne, resolveDynamicComponent as Be, Transition as xt, normalizeStyle as De, createTextVNode as L, normalizeProps as le, guardReactiveProps as oe, withDirectives as it, vShow as fa, vModelText as kt, nextTick as $t, toValue as ga, useTemplateRef as Wt, createSlots as va, isRef as pa, Teleport as ha } from "vue";
2
- import { a as ya, V as Ht, i as R, j as V, g as Gt, f as wt, k as Ct, b as ba, h as xa, d as he, u as ka, _ as ze, e as ie } from "../VDialog.vue_vue_type_script_setup_true_lang-hhdR9qNq.js";
3
- import { I as Fd, l as jd, m as Dd } from "../VDialog.vue_vue_type_script_setup_true_lang-hhdR9qNq.js";
1
+ import { defineComponent as O, resolveComponent as lt, openBlock as f, createElementBlock as g, Fragment as N, createCommentVNode as T, createElementVNode as n, normalizeClass as B, createVNode as v, withCtx as b, createBlock as M, renderSlot as I, computed as S, withModifiers as ee, toDisplayString as C, unref as J, TransitionGroup as Kt, renderList as K, mergeProps as Y, ref as F, watch as ye, reactive as bt, onMounted as be, onUnmounted as Ne, resolveDynamicComponent as Be, Transition as xt, normalizeStyle as De, createTextVNode as L, normalizeProps as le, guardReactiveProps as oe, withDirectives as it, vShow as fa, vModelText as kt, nextTick as $t, toValue as ga, useTemplateRef as Wt, createSlots as va, isRef as pa, Teleport as ha } from "vue";
2
+ import { a as ya, V as Ht, i as R, j as V, g as Gt, f as wt, k as Ct, b as ba, h as xa, d as he, u as ka, _ as ze, e as ie } from "../VDialog.vue_vue_type_script_setup_true_lang-CvNEU_qY.js";
3
+ import { I as Fd, l as jd, m as Dd } from "../VDialog.vue_vue_type_script_setup_true_lang-CvNEU_qY.js";
4
4
  import { f as $a, t as wa, g as Ca, u as tt, s as Sa, d as _a, m as Ta, c as za } from "../app-3Zj29UoC.js";
5
5
  import { e as St, f as Aa, g as Ea, o as Ba } from "../useDialog-Buvn63AR.js";
6
6
  import { useForm as Va } 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-D9y4c97_.js";
9
- const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Qr = /* @__PURE__ */ M({
9
+ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Qr = /* @__PURE__ */ O({
10
10
  __name: "AppAside",
11
11
  props: {
12
12
  isSidebar: { type: Boolean, default: !1 }
@@ -18,7 +18,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
18
18
  };
19
19
  return (t, o) => {
20
20
  const i = lt("router-link");
21
- return f(), g(D, null, [
21
+ return f(), g(N, null, [
22
22
  e.isSidebar ? (f(), g("div", {
23
23
  key: 0,
24
24
  class: "lg:hidden overlay fixed left-0 top-0 h-full w-full bg-black/40 z-10 bg-blur",
@@ -31,11 +31,11 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
31
31
  class: B([e.isSidebar ? "justify-center" : "justify-between", "sidebar-header flex items-center gap-2 border-b border-gray-light-10/60 pt-6 pb-6 justify-between dark:border-white/5"])
32
32
  }, [
33
33
  v(i, { to: "/" }, {
34
- default: x(() => [
35
- e.isSidebar ? (f(), O(ya, {
34
+ default: b(() => [
35
+ e.isSidebar ? (f(), M(ya, {
36
36
  key: 0,
37
37
  class: "h-7 text-cyan-main"
38
- })) : (f(), O(Ht, {
38
+ })) : (f(), M(Ht, {
39
39
  key: 1,
40
40
  class: "h-7 text-cyan-main"
41
41
  }))
@@ -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" }, ja = { class: "py-4" }, Da = { class: "container mx-auto flex flex-auto items-center" }, Na = { class: "lg:hidden h-7" }, Pa = { class: "gap-4 hidden items-center lg:flex" }, Ra = { class: "lg:hidden flex gap-4" }, Ua = { class: "ms-2" }, ed = /* @__PURE__ */ M({
53
+ }), Fa = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-card" }, ja = { class: "py-4" }, Da = { class: "container mx-auto flex flex-auto items-center" }, Na = { class: "lg:hidden h-7" }, Pa = { class: "gap-4 hidden items-center lg:flex" }, Ra = { class: "lg:hidden flex gap-4" }, Ua = { class: "ms-2" }, ed = /* @__PURE__ */ O({
54
54
  __name: "AppHeader",
55
55
  props: {
56
56
  changeTheme: { type: Function },
@@ -63,22 +63,22 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
63
63
  { name: "Theme", value: 1 },
64
64
  { name: "Notification", value: 2 },
65
65
  { name: "Logout", value: 3 }
66
- ], t = S(() => !!e.notifications.find((c) => c.isNew)), o = (c) => a("sidebar", c), i = (c) => a("notif", c), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), u = () => {
66
+ ], t = S(() => !!e.notifications.find((c) => c.isNew)), o = (c) => a("sidebar", c), i = (c) => a("notif", c), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), m = () => {
67
67
  e.changeTheme && e.changeTheme();
68
- }, r = ({ value: c }, m) => {
69
- c == 1 && u(), c == 2 && i(m), c == 3 && d();
68
+ }, r = ({ value: c }, u) => {
69
+ c == 1 && m(), c == 2 && i(u), c == 3 && d();
70
70
  };
71
- return (c, m) => {
71
+ return (c, u) => {
72
72
  const p = lt("router-link");
73
73
  return f(), g("header", Fa, [
74
- m[3] || (m[3] = n("div", { class: "pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/35 to-transparent" }, null, -1)),
74
+ u[3] || (u[3] = n("div", { class: "pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/35 to-transparent" }, null, -1)),
75
75
  n("div", ja, [
76
76
  n("div", Da, [
77
77
  v(R, {
78
78
  type: "icon",
79
79
  onClick: o
80
80
  }, {
81
- default: x(() => [
81
+ default: b(() => [
82
82
  v(V, {
83
83
  name: "menu",
84
84
  class: "size-5"
@@ -86,24 +86,24 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
86
86
  ]),
87
87
  _: 1
88
88
  }),
89
- m[1] || (m[1] = n("div", { class: "lg:hidden flex-auto" }, null, -1)),
89
+ u[1] || (u[1] = n("div", { class: "lg:hidden flex-auto" }, null, -1)),
90
90
  n("div", Na, [
91
91
  v(p, { to: "/" }, {
92
- default: x(() => [
92
+ default: b(() => [
93
93
  v(Ht, { class: "h-7 text-cyan-main" })
94
94
  ]),
95
95
  _: 1
96
96
  })
97
97
  ]),
98
98
  I(c.$slots, "status"),
99
- m[2] || (m[2] = n("div", { class: "flex-auto" }, null, -1)),
99
+ u[2] || (u[2] = n("div", { class: "flex-auto" }, null, -1)),
100
100
  n("div", Pa, [
101
101
  I(c.$slots, "actions"),
102
102
  v(R, {
103
103
  type: "icon",
104
- onClick: u
104
+ onClick: m
105
105
  }, {
106
- default: x(() => [
106
+ default: b(() => [
107
107
  v(V, {
108
108
  name: "sun",
109
109
  class: "size-5 dark:hidden"
@@ -119,10 +119,10 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
119
119
  type: "icon",
120
120
  onClick: i
121
121
  }, {
122
- default: x(() => [
122
+ default: b(() => [
123
123
  n("span", {
124
124
  class: B([t.value ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
125
- }, [...m[0] || (m[0] = [
125
+ }, [...u[0] || (u[0] = [
126
126
  n("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
127
127
  ])], 2),
128
128
  v(V, {
@@ -133,12 +133,12 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
133
133
  _: 1
134
134
  }),
135
135
  I(c.$slots, "account", {}, () => [
136
- e.showLogout ? (f(), O(R, {
136
+ e.showLogout ? (f(), M(R, {
137
137
  key: 0,
138
138
  type: "icon",
139
139
  onClick: ee(d, ["prevent"])
140
140
  }, {
141
- default: x(() => [
141
+ default: b(() => [
142
142
  v(V, {
143
143
  name: "logout",
144
144
  class: "size-5"
@@ -154,13 +154,13 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
154
154
  right: "0",
155
155
  top: "0"
156
156
  }, {
157
- activator: x(({ on: b }) => [
157
+ activator: b(({ on: k }) => [
158
158
  v(R, {
159
159
  type: "icon",
160
160
  class: "flex",
161
- onClick: b.click
161
+ onClick: k.click
162
162
  }, {
163
- default: x(() => [
163
+ default: b(() => [
164
164
  v(V, {
165
165
  name: "more",
166
166
  class: "size-5"
@@ -169,13 +169,13 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
169
169
  _: 1
170
170
  }, 8, ["onClick"])
171
171
  ]),
172
- default: x(() => [
172
+ default: b(() => [
173
173
  v(wt, {
174
174
  items: l,
175
175
  onClick: r
176
176
  }, {
177
- default: x(({ item: b }) => [
178
- n("span", Ua, C(b.name), 1)
177
+ default: b(({ item: k }) => [
178
+ n("span", Ua, C(k.name), 1)
179
179
  ]),
180
180
  _: 1
181
181
  })
@@ -188,7 +188,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
188
188
  ]);
189
189
  };
190
190
  }
191
- }), Ka = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Wa = { class: "flex-auto text-xs" }, Ha = { class: "text-gray-dark-25 dark:text-gray-main mt-1" }, Ga = /* @__PURE__ */ M({
191
+ }), Ka = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Wa = { class: "flex-auto text-xs" }, Ha = { class: "text-gray-dark-25 dark:text-gray-main mt-1" }, Ga = /* @__PURE__ */ O({
192
192
  __name: "CardNotification",
193
193
  props: {
194
194
  empty: {},
@@ -200,8 +200,8 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
200
200
  },
201
201
  emits: ["remove", "read"],
202
202
  setup(e, { emit: s }) {
203
- const a = e, l = s, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], o = (u) => t[u], i = (u) => l("remove", u), d = (u) => l("read", u);
204
- return (u, r) => (f(), g("div", Ka, [
203
+ const a = e, l = s, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], o = (m) => t[m], i = (m) => l("remove", m), d = (m) => l("read", m);
204
+ return (m, r) => (f(), g("div", Ka, [
205
205
  n("div", {
206
206
  class: B(["absolute left-0 top-0 w-1 h-full", o(a.color)])
207
207
  }, null, 2),
@@ -210,7 +210,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
210
210
  type: "icon",
211
211
  onClick: d
212
212
  }, {
213
- default: x(() => [
213
+ default: b(() => [
214
214
  n("span", {
215
215
  class: B([a.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
216
216
  }, [...r[0] || (r[0] = [
@@ -225,7 +225,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
225
225
  }),
226
226
  n("div", Wa, [
227
227
  n("div", null, C(a.text), 1),
228
- n("div", Ha, C(G($a)(a.date)) + " (" + C(G(wa)(a.date)) + ")", 1)
228
+ n("div", Ha, C(J($a)(a.date)) + " (" + C(J(wa)(a.date)) + ")", 1)
229
229
  ]),
230
230
  v(R, {
231
231
  class: "shrink-0",
@@ -233,7 +233,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
233
233
  size: "sm",
234
234
  onClick: i
235
235
  }, {
236
- default: x(() => [
236
+ default: b(() => [
237
237
  v(V, {
238
238
  name: "close",
239
239
  class: "size-4"
@@ -246,7 +246,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
246
246
  }), Ja = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, qa = {
247
247
  key: 0,
248
248
  class: "flex flex-col gap-2 p-2"
249
- }, td = /* @__PURE__ */ M({
249
+ }, td = /* @__PURE__ */ O({
250
250
  __name: "AppNotification",
251
251
  props: {
252
252
  value: { type: Boolean },
@@ -254,8 +254,8 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
254
254
  },
255
255
  emits: ["close", "remove", "read"],
256
256
  setup(e, { emit: s }) {
257
- const a = e, l = s, t = S(() => !!a.notifications.find((r) => r.isNew)), o = S(() => !!a.notifications.length), i = (r) => l("close", r), d = (r) => l("remove", r), u = (r) => l("read", r);
258
- return (r, c) => (f(), g(D, null, [
257
+ const a = e, l = s, t = S(() => !!a.notifications.find((r) => r.isNew)), o = S(() => !!a.notifications.length), i = (r) => l("close", r), d = (r) => l("remove", r), m = (r) => l("read", r);
258
+ return (r, c) => (f(), g(N, null, [
259
259
  a.value ? (f(), g("div", {
260
260
  key: 0,
261
261
  class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
@@ -275,16 +275,16 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
275
275
  "leave-from-class": "opacity-100 translate-x-0",
276
276
  "leave-to-class": "opacity-0 translate-x-1/2"
277
277
  }, {
278
- default: x(() => [
279
- (f(!0), g(D, null, K(a.notifications, (m) => (f(), g("div", {
280
- key: m.date,
278
+ default: b(() => [
279
+ (f(!0), g(N, null, K(a.notifications, (u) => (f(), g("div", {
280
+ key: u.date,
281
281
  class: "relative"
282
282
  }, [
283
- I(r.$slots, "card", { item: m }, () => [
284
- v(Ga, Y({ ref_for: !0 }, m, {
283
+ I(r.$slots, "card", { item: u }, () => [
284
+ v(Ga, Y({ ref_for: !0 }, u, {
285
285
  class: "rounded-md border border-gray-light-10/60 bg-white/50 dark:border-white/5 dark:bg-white/[0.03]",
286
- onRemove: (p) => d(m),
287
- onRead: (p) => u(m)
286
+ onRemove: (p) => d(u),
287
+ onRead: (p) => m(u)
288
288
  }), null, 16, ["onRemove", "onRead"])
289
289
  ])
290
290
  ]))), 128))
@@ -311,7 +311,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
311
311
  }, ts = ["title"], as = {
312
312
  key: 0,
313
313
  class: "min-w-0 flex-1 truncate text-sm"
314
- }, ss = ["aria-expanded", "aria-label"], ns = ["inert"], ls = { class: "mt-1 ml-3 space-y-1 border-l border-gray-light-10/70 pb-1 pl-2 dark:border-white/10" }, os = /* @__PURE__ */ M({
314
+ }, ss = ["aria-expanded", "aria-label"], ns = ["inert"], ls = { class: "mt-1 ml-3 space-y-1 border-l border-gray-light-10/70 pb-1 pl-2 dark:border-white/10" }, os = /* @__PURE__ */ O({
315
315
  name: "AppNavItem",
316
316
  __name: "AppNavItem",
317
317
  props: {
@@ -323,43 +323,43 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
323
323
  emits: ["select"],
324
324
  setup(e, { emit: s }) {
325
325
  const a = e, l = s, t = S(() => a.item.icon ?? "layout-grid"), o = S(() => {
326
- var m;
327
- return !!((m = a.item.children) != null && m.length);
328
- }), i = F(!1), d = (m, p) => {
329
- var b;
330
- return m.path ? m.path === "/" ? p === "/" : p === m.path || p.startsWith(m.path) ? !0 : !!((b = m.children) != null && b.some((h) => d(h, p))) : !1;
331
- }, u = S(() => {
332
- const m = a.item.path;
333
- return m ? m === "/" ? a.activePath === "/" : a.activePath === m || a.activePath.startsWith(m) : !1;
326
+ var u;
327
+ return !!((u = a.item.children) != null && u.length);
328
+ }), i = F(!1), d = (u, p) => {
329
+ var k;
330
+ return u.path ? u.path === "/" ? p === "/" : p === u.path || p.startsWith(u.path) ? !0 : !!((k = u.children) != null && k.some((h) => d(h, p))) : !1;
331
+ }, m = S(() => {
332
+ const u = a.item.path;
333
+ return u ? u === "/" ? a.activePath === "/" : a.activePath === u || a.activePath.startsWith(u) : !1;
334
334
  }), r = S(() => {
335
- var m;
336
- return !!((m = a.item.children) != null && m.some((p) => d(p, a.activePath)));
335
+ var u;
336
+ return !!((u = a.item.children) != null && u.some((p) => d(p, a.activePath)));
337
337
  }), c = () => {
338
338
  o.value && (i.value = !i.value);
339
339
  };
340
340
  return ye(
341
- [u, r],
342
- ([m, p]) => {
343
- (m || p) && o.value && (i.value = !0);
341
+ [m, r],
342
+ ([u, p]) => {
343
+ (u || p) && o.value && (i.value = !0);
344
344
  },
345
345
  { immediate: !0 }
346
- ), (m, p) => {
347
- const b = lt("router-link"), h = lt("AppNavItem", !0);
346
+ ), (u, p) => {
347
+ const k = lt("router-link"), h = lt("AppNavItem", !0);
348
348
  return f(), g("li", null, [
349
349
  n("div", {
350
350
  class: B(["group relative flex items-center rounded-md transition-colors", [
351
- u.value ? "bg-gradient-to-r from-cyan-main/15 via-cyan-main/5 to-transparent text-cyan-main before:absolute before:left-0 before:top-1/2 before:h-5 before:w-0.5 before:-translate-y-1/2 before:rounded-full before:bg-cyan-main" : "text-gray-dark-25 hover:bg-black/5 dark:text-gray-light-10 dark:hover:bg-white/5",
351
+ m.value ? "bg-gradient-to-r from-cyan-main/15 via-cyan-main/5 to-transparent text-cyan-main before:absolute before:left-0 before:top-1/2 before:h-5 before:w-0.5 before:-translate-y-1/2 before:rounded-full before:bg-cyan-main" : "text-gray-dark-25 hover:bg-black/5 dark:text-gray-light-10 dark:hover:bg-white/5",
352
352
  e.compact ? "lg:justify-center lg:px-2" : ""
353
353
  ]])
354
354
  }, [
355
- e.item.path ? (f(), O(b, {
355
+ e.item.path ? (f(), M(k, {
356
356
  key: 0,
357
357
  to: e.item.path,
358
358
  class: B(["flex min-w-0 flex-1 items-center gap-2.5 px-3 py-2", e.compact ? "lg:justify-center lg:px-0" : ""]),
359
359
  title: e.compact ? e.item.name : void 0,
360
- onClick: p[0] || (p[0] = (k) => l("select"))
360
+ onClick: p[0] || (p[0] = (x) => l("select"))
361
361
  }, {
362
- default: x(() => [
362
+ default: b(() => [
363
363
  v(V, {
364
364
  name: t.value,
365
365
  class: "size-5 shrink-0 opacity-70"
@@ -401,9 +401,9 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
401
401
  }, [
402
402
  n("div", null, [
403
403
  n("ul", ls, [
404
- (f(!0), g(D, null, K(e.item.children, (k) => (f(), O(h, {
405
- key: `${k.name}:${k.path ?? ""}`,
406
- item: k,
404
+ (f(!0), g(N, null, K(e.item.children, (x) => (f(), M(h, {
405
+ key: `${x.name}:${x.path ?? ""}`,
406
+ item: x,
407
407
  level: e.level + 1,
408
408
  "active-path": e.activePath,
409
409
  compact: e.compact,
@@ -421,7 +421,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
421
421
  }, fs = { class: "size-5 flex-[0_0_20px] opacity-60" }, gs = ["onClick"], vs = { class: "flex flex-col gap-2" }, ps = { class: "flex gap-2 ms-8" }, hs = { class: "size-5 flex-[0_0_20px]" }, ys = { class: "flex-1 first-letter:uppercase text-sm" }, bs = {
422
422
  key: 0,
423
423
  class: "mt-2"
424
- }, xs = { class: "flex flex-col gap-2" }, ks = { class: "flex gap-2 ms-14" }, $s = { class: "size-5 flex-[0_0_20px]" }, ws = { class: "flex-1 first-letter:uppercase text-sm" }, Cs = /* @__PURE__ */ M({
424
+ }, xs = { class: "flex flex-col gap-2" }, ks = { class: "flex gap-2 ms-14" }, $s = { class: "size-5 flex-[0_0_20px]" }, ws = { class: "flex-1 first-letter:uppercase text-sm" }, Cs = /* @__PURE__ */ O({
425
425
  __name: "AppNav",
426
426
  props: {
427
427
  menu: { default: () => [] },
@@ -432,49 +432,49 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
432
432
  },
433
433
  emits: ["sidebar"],
434
434
  setup(e, { emit: s }) {
435
- const a = s, l = F(""), t = F(!1), o = bt({}), i = S(() => e.isSidebar && t.value), d = (j) => j.key ?? j.title, u = (j) => !!o[d(j)], r = (j, Z) => {
435
+ const a = s, l = F(""), t = F(!1), o = bt({}), i = S(() => e.isSidebar && t.value), d = (D) => D.key ?? D.title, m = (D) => !!o[d(D)], r = (D, Z) => {
436
436
  var w;
437
- return j.path ? j.path === "/" ? Z === "/" : Z === j.path || Z.startsWith(j.path) ? !0 : !!((w = j.children) != null && w.some((A) => r(A, Z))) : !1;
437
+ return D.path ? D.path === "/" ? Z === "/" : Z === D.path || Z.startsWith(D.path) ? !0 : !!((w = D.children) != null && w.some((A) => r(A, Z))) : !1;
438
438
  }, c = () => {
439
- for (const j of e.groups)
440
- j.items.some((Z) => r(Z, e.fullPath)) && (o[d(j)] = !1);
441
- }, m = () => {
439
+ for (const D of e.groups)
440
+ D.items.some((Z) => r(Z, e.fullPath)) && (o[d(D)] = !1);
441
+ }, u = () => {
442
442
  try {
443
443
  localStorage.setItem(e.storageKey, JSON.stringify(o));
444
444
  } catch {
445
445
  return;
446
446
  }
447
- }, p = (j) => {
448
- const Z = d(j);
449
- o[Z] = !o[Z], m();
450
- }, b = () => {
447
+ }, p = (D) => {
448
+ const Z = d(D);
449
+ o[Z] = !o[Z], u();
450
+ }, k = () => {
451
451
  typeof window > "u" || (t.value = window.matchMedia("(min-width: 1024px)").matches);
452
452
  }, h = () => {
453
453
  t.value || a("sidebar", !1);
454
- }, k = (j) => {
455
- h(), l.value !== j.name && (l.value = l.value === j.name ? "" : j.name);
454
+ }, x = (D) => {
455
+ h(), l.value !== D.name && (l.value = l.value === D.name ? "" : D.name);
456
456
  }, z = () => {
457
- const j = { services: !0, settings: !0 };
457
+ const D = { services: !0, settings: !0 };
458
458
  try {
459
459
  const Z = localStorage.getItem(e.storageKey);
460
- Object.assign(o, Z ? { ...j, ...JSON.parse(Z) } : j);
460
+ Object.assign(o, Z ? { ...D, ...JSON.parse(Z) } : D);
461
461
  } catch {
462
- Object.assign(o, j);
462
+ Object.assign(o, D);
463
463
  }
464
464
  c();
465
- }, P = (j) => e.fullPath === j, X = (j) => j ? e.fullPath === j || e.fullPath.startsWith(j) : !1;
465
+ }, j = (D) => e.fullPath === D, H = (D) => D ? e.fullPath === D || e.fullPath.startsWith(D) : !1;
466
466
  return ye(() => e.fullPath, c), ye(() => e.groups, c, { deep: !0 }), be(() => {
467
- b(), z(), window.addEventListener("resize", b, { passive: !0 });
467
+ k(), z(), window.addEventListener("resize", k, { passive: !0 });
468
468
  }), Ne(() => {
469
- window.removeEventListener("resize", b);
469
+ window.removeEventListener("resize", k);
470
470
  }), ye(
471
471
  () => e.menu,
472
472
  () => {
473
- var j;
474
- return l.value = ((j = Ca(e.menu, e.fullPath)) == null ? void 0 : j.name) || "";
473
+ var D;
474
+ return l.value = ((D = Ca(e.menu, e.fullPath)) == null ? void 0 : D.name) || "";
475
475
  }
476
- ), (j, Z) => (f(), g("nav", rs, [
477
- e.groups.length ? (f(!0), g(D, { key: 0 }, K(e.groups, (w, A) => (f(), g("div", {
476
+ ), (D, Z) => (f(), g("nav", rs, [
477
+ e.groups.length ? (f(!0), g(N, { key: 0 }, K(e.groups, (w, A) => (f(), g("div", {
478
478
  key: w.key ?? w.title,
479
479
  class: B(i.value && A ? "mt-2 border-t border-gray-light-10/60 pt-2 dark:border-white/10" : "")
480
480
  }, [
@@ -482,24 +482,24 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
482
482
  key: 0,
483
483
  type: "button",
484
484
  class: "mb-1 flex w-full items-center justify-between rounded-md px-3 py-2 text-xs font-semibold uppercase tracking-[0.16em] text-gray-main transition hover:text-gray-dark-25 dark:hover:text-gray-light-10",
485
- "aria-expanded": !u(w),
486
- onClick: (N) => p(w)
485
+ "aria-expanded": !m(w),
486
+ onClick: (P) => p(w)
487
487
  }, [
488
488
  n("span", null, C(w.title), 1),
489
489
  v(V, {
490
490
  name: "chevron-down",
491
- class: B(["size-3.5 transition-transform", u(w) ? "-rotate-90" : ""])
491
+ class: B(["size-3.5 transition-transform", m(w) ? "-rotate-90" : ""])
492
492
  }, null, 8, ["class"])
493
493
  ], 8, ds)),
494
494
  n("div", {
495
- class: B(["nav-collapse", { open: i.value || !u(w) }]),
496
- inert: !i.value && u(w)
495
+ class: B(["nav-collapse", { open: i.value || !m(w) }]),
496
+ inert: !i.value && m(w)
497
497
  }, [
498
498
  n("div", null, [
499
499
  n("ul", us, [
500
- (f(!0), g(D, null, K(w.items, (N) => (f(), O(is, {
501
- key: `${N.name}:${N.path ?? ""}`,
502
- item: N,
500
+ (f(!0), g(N, null, K(w.items, (P) => (f(), M(is, {
501
+ key: `${P.name}:${P.path ?? ""}`,
502
+ item: P,
503
503
  level: 0,
504
504
  "active-path": e.fullPath,
505
505
  compact: i.value,
@@ -509,26 +509,26 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
509
509
  ])
510
510
  ], 10, cs)
511
511
  ], 2))), 128)) : (f(), g("ul", ms, [
512
- (f(!0), g(D, null, K(e.menu, (w) => (f(), g("li", {
512
+ (f(!0), g(N, null, K(e.menu, (w) => (f(), g("li", {
513
513
  key: w.name
514
514
  }, [
515
- (f(), O(Be(w.path ? "router-link" : "span"), {
515
+ (f(), M(Be(w.path ? "router-link" : "span"), {
516
516
  to: w.path,
517
- class: B(["flex gap-2 items-center px-3 py-2 rounded", P(w.path) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"]),
518
- onClick: ee((A) => k(w), ["prevent", "stop"])
517
+ class: B(["flex gap-2 items-center px-3 py-2 rounded", j(w.path) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"]),
518
+ onClick: ee((A) => x(w), ["prevent", "stop"])
519
519
  }, {
520
- default: x(() => [
520
+ default: b(() => [
521
521
  n("div", fs, [
522
- I(j.$slots, "icon", { item: w }, void 0, !0)
522
+ I(D.$slots, "icon", { item: w }, void 0, !0)
523
523
  ]),
524
524
  n("span", {
525
525
  class: B(["flex-1 first-letter:uppercase text-sm", e.isSidebar ? "lg:hidden" : ""])
526
526
  }, C(w.name), 3),
527
527
  n("button", {
528
528
  class: B(["cursor-pointer", [e.isSidebar ? "lg:hidden" : ""]]),
529
- onClick: ee((A) => k(w), ["prevent", "stop"])
529
+ onClick: ee((A) => x(w), ["prevent", "stop"])
530
530
  }, [
531
- w.children ? (f(), O(V, {
531
+ w.children ? (f(), M(V, {
532
532
  key: 0,
533
533
  name: "arrow-right",
534
534
  class: "size-5"
@@ -542,16 +542,16 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
542
542
  class: B(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", l.value === w.name ? "block" : "hidden"]])
543
543
  }, [
544
544
  n("ul", vs, [
545
- (f(!0), g(D, null, K(w.children, ({ name: A, path: N, icon: ae, children: xe }) => (f(), g("li", { key: A }, [
546
- (f(), O(Be(N ? "router-link" : "span"), {
547
- to: N,
548
- class: B(["flex gap-2 items-center px-3 py-2 rounded", P(N) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
545
+ (f(!0), g(N, null, K(w.children, ({ name: A, path: P, icon: ae, children: xe }) => (f(), g("li", { key: A }, [
546
+ (f(), M(Be(P ? "router-link" : "span"), {
547
+ to: P,
548
+ class: B(["flex gap-2 items-center px-3 py-2 rounded", j(P) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
549
549
  }, {
550
- default: x(() => [
550
+ default: b(() => [
551
551
  n("div", ps, [
552
552
  n("div", hs, [
553
- I(j.$slots, "icon-children", {
554
- item: { name: A, path: N, icon: ae }
553
+ I(D.$slots, "icon-children", {
554
+ item: { name: A, path: P, icon: ae }
555
555
  }, void 0, !0)
556
556
  ]),
557
557
  n("span", ys, C(A), 1)
@@ -559,19 +559,19 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
559
559
  ]),
560
560
  _: 2
561
561
  }, 1032, ["to", "class"])),
562
- xe != null && xe.length && X(N) ? (f(), g("div", bs, [
562
+ xe != null && xe.length && H(P) ? (f(), g("div", bs, [
563
563
  n("ul", xs, [
564
- (f(!0), g(D, null, K(xe, (re) => (f(), g("li", {
564
+ (f(!0), g(N, null, K(xe, (re) => (f(), g("li", {
565
565
  key: re.name
566
566
  }, [
567
- (f(), O(Be(re.path ? "router-link" : "span"), {
567
+ (f(), M(Be(re.path ? "router-link" : "span"), {
568
568
  to: re.path,
569
- class: B(["flex gap-2 items-center px-3 py-2 rounded", P(re.path) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
569
+ class: B(["flex gap-2 items-center px-3 py-2 rounded", j(re.path) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
570
570
  }, {
571
- default: x(() => [
571
+ default: b(() => [
572
572
  n("div", ks, [
573
573
  n("div", $s, [
574
- I(j.$slots, "icon-children", { item: re }, void 0, !0)
574
+ I(D.$slots, "icon-children", { item: re }, void 0, !0)
575
575
  ]),
576
576
  n("span", ws, C(re.name), 1)
577
577
  ])
@@ -598,7 +598,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
598
598
  }, zs = {
599
599
  key: 0,
600
600
  class: "relative mt-2 block h-4 w-full select-none overflow-hidden rounded-md bg-gray-light-10/70 dark:bg-white/10"
601
- }, As = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, Es = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, nd = /* @__PURE__ */ M({
601
+ }, As = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, Es = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, nd = /* @__PURE__ */ O({
602
602
  __name: "AppProgress",
603
603
  props: {
604
604
  status: { default: 0 },
@@ -611,15 +611,15 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
611
611
  setup(e, { emit: s }) {
612
612
  const a = s, l = F(!1), t = () => {
613
613
  l.value = !1, a("close");
614
- }, o = S(() => !!e.length), i = S(() => !!(o.value && d.value === 100 && !e.status)), d = S(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), u = St(() => {
614
+ }, o = S(() => !!e.length), i = S(() => !!(o.value && d.value === 100 && !e.status)), d = S(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), m = St(() => {
615
615
  l.value = !1;
616
616
  }, e.timeout);
617
617
  return ye(
618
618
  () => [e.size, e.status],
619
619
  () => {
620
- l.value = !0, u();
620
+ l.value = !0, m();
621
621
  }
622
- ), (r, c) => (f(), O(xt, {
622
+ ), (r, c) => (f(), M(xt, {
623
623
  "enter-active-class": "duration-300 ease-out",
624
624
  "enter-from-class": "transform opacity-0 translate-x-full",
625
625
  "enter-to-class": "opacity-100 translate-x-0",
@@ -627,7 +627,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
627
627
  "leave-from-class": "opacity-100 translate-y-0",
628
628
  "leave-to-class": "transform opacity-0 -translate-y-8"
629
629
  }, {
630
- default: x(() => [
630
+ default: b(() => [
631
631
  l.value ? (f(), g("div", Ss, [
632
632
  n("div", _s, [
633
633
  I(r.$slots, "default", { isDone: i.value }, () => [
@@ -658,7 +658,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
658
658
  _: 3
659
659
  }));
660
660
  }
661
- }), Bs = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, Vs = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, Is = { class: "flex gap-2" }, Ls = { class: "text-gray-dark-30 dark:text-gray-main" }, Ms = { class: "flex gap-2" }, Os = { class: "flex gap-2" }, Fs = { class: "text-gray-dark-30 dark:text-gray-main" }, js = { class: "flex gap-2" }, Ds = { class: "text-gray-dark-30 dark:text-gray-main" }, Ns = { class: "flex flex-col gap-4 text-sm" }, Ps = { class: "flex gap-4" }, ld = /* @__PURE__ */ M({
661
+ }), Bs = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, Vs = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, Is = { class: "flex gap-2" }, Ls = { class: "text-gray-dark-30 dark:text-gray-main" }, Ms = { class: "flex gap-2" }, Os = { class: "flex gap-2" }, Fs = { class: "text-gray-dark-30 dark:text-gray-main" }, js = { class: "flex gap-2" }, Ds = { class: "text-gray-dark-30 dark:text-gray-main" }, Ns = { class: "flex flex-col gap-4 text-sm" }, Ps = { class: "flex gap-4" }, ld = /* @__PURE__ */ O({
662
662
  __name: "BlockInfo",
663
663
  props: {
664
664
  id: { default: 0 },
@@ -672,9 +672,9 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
672
672
  },
673
673
  setup(e) {
674
674
  const s = S(() => e.firmware.join(".")), a = S(() => {
675
- var t, o, i, d, u, r, c;
675
+ var t, o, i, d, m, r, c;
676
676
  const l = [];
677
- return (t = e.pkg) != null && t.homepage && l.push({ name: "homepage", href: e.pkg.homepage }), (i = (o = e.pkg) == null ? void 0 : o.repository) != null && i.url && l.push({ name: "repository", href: e.pkg.repository.url }), (u = (d = e.pkg) == null ? void 0 : d.bugs) != null && u.url && l.push({ name: "bugs", href: e.pkg.bugs.url }), (r = e.pkg) != null && r.author && l.push({ name: "author", href: `mailto:${(c = e.pkg) == null ? void 0 : c.author}` }), l;
677
+ return (t = e.pkg) != null && t.homepage && l.push({ name: "homepage", href: e.pkg.homepage }), (i = (o = e.pkg) == null ? void 0 : o.repository) != null && i.url && l.push({ name: "repository", href: e.pkg.repository.url }), (m = (d = e.pkg) == null ? void 0 : d.bugs) != null && m.url && l.push({ name: "bugs", href: e.pkg.bugs.url }), (r = e.pkg) != null && r.author && l.push({ name: "author", href: `mailto:${(c = e.pkg) == null ? void 0 : c.author}` }), l;
678
678
  });
679
679
  return (l, t) => {
680
680
  var o, i;
@@ -709,7 +709,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
709
709
  }), Rs = ["onClick"], Us = { class: "mr-2" }, Ks = { class: "text-sm" }, Ws = { class: "text-gray-main text-xs" }, Hs = {
710
710
  key: 0,
711
711
  class: "flex justify-center"
712
- }, Gs = { class: "flex justify-end mt-4" }, od = /* @__PURE__ */ M({
712
+ }, Gs = { class: "flex justify-end mt-4" }, od = /* @__PURE__ */ O({
713
713
  __name: "BlockScan",
714
714
  props: {
715
715
  items: { default: () => [] }
@@ -718,19 +718,19 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
718
718
  setup(e, { emit: s }) {
719
719
  const a = s, l = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (i) => a("select", i), o = (i) => a("scan", i);
720
720
  return (i, d) => {
721
- const u = ba, r = wt, c = xa, m = R;
721
+ const m = ba, r = wt, c = xa, u = R;
722
722
  return f(), g("div", null, [
723
723
  v(r, {
724
724
  items: e.items,
725
725
  class: "bg-transparent! ring-0!"
726
726
  }, {
727
- default: x(({ item: p }) => [
727
+ default: b(({ item: p }) => [
728
728
  n("div", {
729
729
  class: "flex items-center w-full",
730
- onClick: (b) => t(p)
730
+ onClick: (k) => t(p)
731
731
  }, [
732
732
  n("div", Us, [
733
- v(u, le(oe(p)), null, 16)
733
+ v(m, le(oe(p)), null, 16)
734
734
  ]),
735
735
  n("div", null, [
736
736
  n("div", Ks, C(p.ssid), 1),
@@ -744,11 +744,11 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
744
744
  v(c, { class: "text-cyan-main" })
745
745
  ])),
746
746
  n("div", Gs, [
747
- v(m, {
747
+ v(u, {
748
748
  color: "blue",
749
749
  onClick: o
750
750
  }, {
751
- default: x(() => [
751
+ default: b(() => [
752
752
  L(C(i.$t("scan")), 1)
753
753
  ]),
754
754
  _: 1
@@ -757,7 +757,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
757
757
  ]);
758
758
  };
759
759
  }
760
- }), Js = { class: "md:flex items-center mb-4" }, qs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Xs = { class: "md:max-w-50" }, Ys = { class: "flex items-center mb-4" }, Zs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Qs = { class: "flex items-center mb-4" }, en = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, id = /* @__PURE__ */ M({
760
+ }), Js = { class: "md:flex items-center mb-4" }, qs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Xs = { class: "md:max-w-50" }, Ys = { class: "flex items-center mb-4" }, Zs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Qs = { class: "flex items-center mb-4" }, en = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, id = /* @__PURE__ */ O({
761
761
  __name: "BlockService",
762
762
  props: {
763
763
  locale: {},
@@ -770,8 +770,8 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
770
770
  return (i = e.locales.find((d) => d.value === o)) == null ? void 0 : i.name;
771
771
  };
772
772
  return (o, i) => {
773
- const d = he, u = R;
774
- return f(), g(D, null, [
773
+ const d = he, m = R;
774
+ return f(), g(N, null, [
775
775
  n("div", Js, [
776
776
  n("div", qs, C(o.$t("selectLang")), 1),
777
777
  n("div", Xs, [
@@ -785,13 +785,13 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
785
785
  ]),
786
786
  n("div", Ys, [
787
787
  n("div", Zs, C(o.$t("rebootDev")), 1),
788
- v(u, {
788
+ v(m, {
789
789
  class: "min-w-24",
790
790
  color: "red",
791
791
  variant: "ghost",
792
792
  onClick: i[0] || (i[0] = (r) => a("reboot", r))
793
793
  }, {
794
- default: x(() => [
794
+ default: b(() => [
795
795
  L(C(o.$t("reboot")), 1)
796
796
  ]),
797
797
  _: 1
@@ -799,13 +799,13 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
799
799
  ]),
800
800
  n("div", Qs, [
801
801
  n("div", en, C(o.$t("resetConf")), 1),
802
- v(u, {
802
+ v(m, {
803
803
  class: "min-w-24",
804
804
  color: "red",
805
805
  variant: "muted",
806
806
  onClick: i[1] || (i[1] = (r) => a("reset", r))
807
807
  }, {
808
- default: x(() => [
808
+ default: b(() => [
809
809
  L(C(o.$t("reset")), 1)
810
810
  ]),
811
811
  _: 1
@@ -814,7 +814,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
814
814
  ], 64);
815
815
  };
816
816
  }
817
- }), tn = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, an = { class: "flex flex-col w-full items-center gap-2" }, sn = ["title"], nn = { 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" }, ln = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, on = { class: "flex justify-between w-full text-xs" }, rn = { class: "text-gray-dark-25 dark:text-white/50" }, dn = { class: "text-sm" }, cn = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, un = { class: "text-right text-xs" }, rd = /* @__PURE__ */ M({
817
+ }), tn = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, an = { class: "flex flex-col w-full items-center gap-2" }, sn = ["title"], nn = { 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" }, ln = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, on = { class: "flex justify-between w-full text-xs" }, rn = { class: "text-gray-dark-25 dark:text-white/50" }, dn = { class: "text-sm" }, cn = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, un = { class: "text-right text-xs" }, rd = /* @__PURE__ */ O({
818
818
  __name: "BlockStatus",
819
819
  props: {
820
820
  id: { default: 0 },
@@ -834,12 +834,12 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
834
834
  { name: "available", value: tt(e.totalBytes - e.usedBytes) },
835
835
  { name: "total", value: tt(e.totalBytes) }
836
836
  ]), o = S(() => {
837
- var u;
837
+ var m;
838
838
  return [
839
839
  { name: "uptime", value: Sa(s.value) },
840
840
  { name: "id", value: `${e.id.toString(16)} (${e.id})` },
841
841
  { name: "firmware", value: l.value },
842
- { name: "version", value: (u = e.pkg) == null ? void 0 : u.version }
842
+ { name: "version", value: (m = e.pkg) == null ? void 0 : m.version }
843
843
  ];
844
844
  }), i = S(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), d = () => {
845
845
  s.value++, a = setTimeout(d, 1e3);
@@ -848,8 +848,8 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
848
848
  d();
849
849
  }), Ne(() => {
850
850
  s.value = 0, a && clearTimeout(a);
851
- }), (u, r) => {
852
- var c, m, p;
851
+ }), (m, r) => {
852
+ var c, u, p;
853
853
  return f(), g("div", tn, [
854
854
  n("div", an, [
855
855
  n("div", {
@@ -865,38 +865,38 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
865
865
  ], 4)
866
866
  ], 8, sn),
867
867
  n("div", on, [
868
- (f(!0), g(D, null, K(t.value, (b) => (f(), g("div", {
869
- key: b.name,
868
+ (f(!0), g(N, null, K(t.value, (k) => (f(), g("div", {
869
+ key: k.name,
870
870
  class: "flex-auto"
871
871
  }, [
872
872
  n("div", rn, [
873
- I(u.$slots, "name", { item: b })
873
+ I(m.$slots, "name", { item: k })
874
874
  ]),
875
- n("div", null, C(b.value), 1)
875
+ n("div", null, C(k.value), 1)
876
876
  ]))), 128))
877
877
  ])
878
878
  ]),
879
879
  n("div", dn, [
880
- (f(!0), g(D, null, K(o.value, (b) => (f(), g("div", {
881
- key: b.name,
880
+ (f(!0), g(N, null, K(o.value, (k) => (f(), g("div", {
881
+ key: k.name,
882
882
  class: "flex justify-between items-center"
883
883
  }, [
884
884
  n("div", cn, [
885
- I(u.$slots, "name", { item: b })
885
+ I(m.$slots, "name", { item: k })
886
886
  ]),
887
- n("div", un, C(b.value), 1)
887
+ n("div", un, C(k.value), 1)
888
888
  ]))), 128))
889
889
  ]),
890
890
  n("div", null, [
891
- I(u.$slots, "default", {
891
+ I(m.$slots, "default", {
892
892
  home: (c = e.pkg) == null ? void 0 : c.homepage,
893
- repo: (p = (m = e.pkg) == null ? void 0 : m.repository) == null ? void 0 : p.url
893
+ repo: (p = (u = e.pkg) == null ? void 0 : u.repository) == null ? void 0 : p.url
894
894
  })
895
895
  ])
896
896
  ]);
897
897
  };
898
898
  }
899
- }), mn = { class: "flex items-center cursor-pointer" }, fn = ["multiple", "accept"], gn = /* @__PURE__ */ M({
899
+ }), mn = { class: "flex items-center cursor-pointer" }, fn = ["multiple", "accept"], gn = /* @__PURE__ */ O({
900
900
  __name: "VFile",
901
901
  props: {
902
902
  multiple: { type: [Boolean, String], default: !1 },
@@ -920,38 +920,38 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
920
920
  I(t.$slots, "default")
921
921
  ]));
922
922
  }
923
- }), vn = { class: "md:flex" }, pn = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" }, dd = /* @__PURE__ */ M({
923
+ }), vn = { class: "md:flex" }, pn = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" }, dd = /* @__PURE__ */ O({
924
924
  __name: "BlockUpdate",
925
925
  emits: ["update"],
926
926
  setup(e, { emit: s }) {
927
- const a = s, l = bt({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((u) => `${u.name} (${tt(u.size)})`).join("") : "", o = (d, u) => {
927
+ const a = s, l = bt({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((m) => `${m.name} (${tt(m.size)})`).join("") : "", o = (d, m) => {
928
928
  const r = new FormData();
929
929
  for (let c = 0; c < d.length; c++) {
930
- const m = d.item(c);
931
- if (!m) return;
932
- r.append(`file[${c}]`, m, u);
930
+ const u = d.item(c);
931
+ if (!u) return;
932
+ r.append(`file[${c}]`, u, m);
933
933
  }
934
934
  return r;
935
- }, i = (d, u) => {
936
- if (!u) return;
937
- const r = o(u, d);
935
+ }, i = (d, m) => {
936
+ if (!m) return;
937
+ const r = o(m, d);
938
938
  r && a("update", d, r);
939
939
  };
940
- return (d, u) => {
940
+ return (d, m) => {
941
941
  const r = R;
942
942
  return f(), g("div", null, [
943
- (f(!0), g(D, null, K(l, (c, m) => (f(), g("div", {
944
- key: m,
943
+ (f(!0), g(N, null, K(l, (c, u) => (f(), g("div", {
944
+ key: u,
945
945
  class: "mb-4 flex items-center"
946
946
  }, [
947
947
  v(gn, {
948
948
  accept: ".bin",
949
- onChange: (p) => l[m] = p,
949
+ onChange: (p) => l[u] = p,
950
950
  class: "flex-auto"
951
951
  }, {
952
- default: x(() => [
952
+ default: b(() => [
953
953
  n("div", vn, [
954
- n("h6", pn, C(m) + ":", 1),
954
+ n("h6", pn, C(u) + ":", 1),
955
955
  I(d.$slots, "default", {
956
956
  file: t(c)
957
957
  })
@@ -963,9 +963,9 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
963
963
  class: "min-w-24",
964
964
  color: "blue",
965
965
  disabled: !c,
966
- onClick: (p) => i(`${m}.bin`, c)
966
+ onClick: (p) => i(`${u}.bin`, c)
967
967
  }, {
968
- default: x(() => [
968
+ default: b(() => [
969
969
  L(C(d.$t("btnUpdate")), 1)
970
970
  ]),
971
971
  _: 1
@@ -974,7 +974,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
974
974
  ]);
975
975
  };
976
976
  }
977
- }), hn = { class: "flex items-center gap-1.5" }, cd = /* @__PURE__ */ M({
977
+ }), hn = { class: "flex items-center gap-1.5" }, cd = /* @__PURE__ */ O({
978
978
  __name: "BlockBreadcrumb",
979
979
  props: {
980
980
  items: { default: () => [] }
@@ -984,22 +984,22 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
984
984
  const a = s, l = (t) => a("click", t);
985
985
  return (t, o) => (f(), g("nav", null, [
986
986
  n("ol", hn, [
987
- (f(!0), g(D, null, K(e.items, (i, d) => (f(), g("li", {
987
+ (f(!0), g(N, null, K(e.items, (i, d) => (f(), g("li", {
988
988
  key: d,
989
989
  class: B(["inline-flex items-center gap-1.5 text-sm text-gray-dark-25 dark:text-gray-main", i.path ? "" : "text-gray-dark-30 dark:text-white/90"])
990
990
  }, [
991
991
  I(t.$slots, "default", { item: i }, () => [
992
- (f(), O(Be(i.path ? "a" : "span"), {
992
+ (f(), M(Be(i.path ? "a" : "span"), {
993
993
  href: i.path,
994
- onClick: (u) => l(i)
994
+ onClick: (m) => l(i)
995
995
  }, {
996
- default: x(() => [
996
+ default: b(() => [
997
997
  L(C(i.name), 1)
998
998
  ]),
999
999
  _: 2
1000
1000
  }, 1032, ["href", "onClick"]))
1001
1001
  ]),
1002
- i.path ? (f(), O(V, {
1002
+ i.path ? (f(), M(V, {
1003
1003
  key: 0,
1004
1004
  name: "chevron-down",
1005
1005
  size: 14,
@@ -1015,44 +1015,49 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
1015
1015
  }, xn = { class: "dark:text-gray-light-10" }, kn = { class: "flex items-center z-10" }, $n = {
1016
1016
  key: 0,
1017
1017
  class: "flex ps-5"
1018
- }, wn = { class: "font-medium dark:text-gray-light-10" }, mt = "ms-2 opacity-20 transition-all hover:opacity-70", _t = /* @__PURE__ */ M({
1018
+ }, wn = { class: "font-medium dark:text-gray-light-10" }, mt = "ms-2 opacity-20 transition-all hover:opacity-70", _t = /* @__PURE__ */ O({
1019
1019
  __name: "VListObject",
1020
1020
  props: {
1021
1021
  items: { default: () => ({}) },
1022
1022
  path: { default: "" },
1023
- onlyValue: { type: Boolean, default: !1 }
1023
+ onlyValue: { type: Boolean, default: !1 },
1024
+ canAdd: { type: Function }
1024
1025
  },
1025
1026
  emits: ["click"],
1026
1027
  setup(e, { emit: s }) {
1027
- const a = s, l = () => "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: i, copied: d, isSupported: u } = Aa(), r = (b) => {
1028
- t.value[b] = !t.value[b];
1029
- }, c = (b) => typeof b == "object", m = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, h) => {
1030
- a("click", { key: b, path: m(b), isObject: h });
1028
+ const a = s, l = () => "relative before:pointer-events-none before:absolute before:w-full before:h-8 before:top-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: i, copied: d, isSupported: m } = Aa(), r = (h, x) => {
1029
+ if (c(x)) {
1030
+ t.value[h] = !t.value[h];
1031
+ return;
1032
+ }
1033
+ p(h) && a("click", { key: h, path: u(h), isObject: !1 });
1034
+ }, c = (h) => typeof h == "object" && h !== null, u = (h) => `${e.path ? e.path + "." : ""}${h}`, p = (h) => !e.canAdd || e.canAdd(u(h)), k = (h, x) => {
1035
+ a("click", { key: h, path: u(h), isObject: x });
1031
1036
  };
1032
- return (b, h) => (f(), g("ul", null, [
1033
- (f(!0), g(D, null, K(e.items, (k, z) => (f(), g("li", {
1034
- key: z,
1035
- class: B(c(k) ? "" : `flex items-center ${l()}`)
1037
+ return (h, x) => (f(), g("ul", null, [
1038
+ (f(!0), g(N, null, K(e.items, (z, j) => (f(), g("li", {
1039
+ key: j,
1040
+ class: B(c(z) ? "" : `flex items-center ${l()}`)
1036
1041
  }, [
1037
1042
  n("div", {
1038
- class: B(["flex items-center cursor-pointer ps-2 h-8", c(k) ? `${l()}` : ""]),
1039
- onClick: (P) => r(z)
1043
+ class: B(["flex items-center cursor-pointer ps-2 h-8", c(z) ? `${l()}` : ""]),
1044
+ onClick: (H) => r(j, z)
1040
1045
  }, [
1041
- c(k) ? (f(), g("div", bn, [
1046
+ c(z) ? (f(), g("div", bn, [
1042
1047
  v(V, {
1043
1048
  name: "folder",
1044
1049
  class: "size-5"
1045
1050
  })
1046
1051
  ])) : T("", !0),
1047
- n("div", xn, C(z), 1),
1048
- G(u) ? (f(), O(R, {
1052
+ n("div", xn, C(j), 1),
1053
+ J(m) ? (f(), M(R, {
1049
1054
  key: 1,
1050
1055
  class: B(mt),
1051
1056
  variant: "ghost",
1052
1057
  size: "sm",
1053
- onClick: ee((P) => G(i)(m(z)), ["stop"])
1058
+ onClick: ee((H) => J(i)(u(j)), ["stop"])
1054
1059
  }, {
1055
- default: x(() => [
1060
+ default: b(() => [
1056
1061
  v(V, {
1057
1062
  name: "copy",
1058
1063
  class: "size-5"
@@ -1060,21 +1065,21 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
1060
1065
  ]),
1061
1066
  _: 1
1062
1067
  }, 8, ["onClick"])) : T("", !0),
1063
- G(o) === m(z) ? (f(), g("span", {
1068
+ J(o) === u(j) ? (f(), g("span", {
1064
1069
  key: 2,
1065
- class: B(["text-gray-dark-25 transition-all duration-1000 text-sm", G(d) ? "opacity-100" : "opacity-0"])
1066
- }, C(b.$t("copied")), 3)) : T("", !0),
1067
- !e.onlyValue && c(k) ? (f(), g(D, { key: 3 }, [
1068
- h[1] || (h[1] = n("div", { class: "flex-auto" }, null, -1)),
1070
+ class: B(["text-gray-dark-25 transition-all duration-1000 text-sm", J(d) ? "opacity-100" : "opacity-0"])
1071
+ }, C(h.$t("copied")), 3)) : T("", !0),
1072
+ !e.onlyValue && c(z) && p(j) ? (f(), g(N, { key: 3 }, [
1073
+ x[1] || (x[1] = n("div", { class: "flex-auto" }, null, -1)),
1069
1074
  n("div", kn, [
1070
1075
  v(R, {
1071
1076
  class: B(mt),
1072
1077
  variant: "ghost",
1073
1078
  size: "sm",
1074
- title: b.$t("add"),
1075
- onClick: ee((P) => p(z, c(k)), ["stop"])
1079
+ title: h.$t("add"),
1080
+ onClick: ee((H) => k(j, c(z)), ["stop"])
1076
1081
  }, {
1077
- default: x(() => [
1082
+ default: b(() => [
1078
1083
  v(V, {
1079
1084
  name: "add",
1080
1085
  class: "size-5"
@@ -1085,39 +1090,41 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
1085
1090
  ])
1086
1091
  ], 64)) : T("", !0)
1087
1092
  ], 10, yn),
1088
- c(k) ? (f(), g("div", $n, [
1093
+ c(z) ? (f(), g("div", $n, [
1089
1094
  it(v(_t, {
1090
1095
  class: "flex-auto",
1091
- path: m(z),
1092
- items: k,
1096
+ path: u(j),
1097
+ items: z,
1093
1098
  onlyValue: e.onlyValue,
1094
- onClick: h[0] || (h[0] = (P) => a("click", P))
1095
- }, null, 8, ["path", "items", "onlyValue"]), [
1096
- [fa, t.value[z]]
1099
+ canAdd: e.canAdd,
1100
+ onClick: x[0] || (x[0] = (H) => a("click", H))
1101
+ }, null, 8, ["path", "items", "onlyValue", "canAdd"]), [
1102
+ [fa, t.value[j]]
1097
1103
  ])
1098
- ])) : (f(), g(D, { key: 1 }, [
1099
- h[2] || (h[2] = n("div", { class: "flex-auto gap-3" }, null, -1)),
1100
- n("div", wn, C(k), 1),
1101
- v(R, {
1104
+ ])) : (f(), g(N, { key: 1 }, [
1105
+ x[2] || (x[2] = n("div", { class: "flex-auto gap-3" }, null, -1)),
1106
+ n("div", wn, C(z), 1),
1107
+ p(j) ? (f(), M(R, {
1108
+ key: 0,
1102
1109
  class: B(mt),
1103
1110
  variant: "ghost",
1104
1111
  size: "sm",
1105
- title: b.$t("add"),
1106
- onClick: ee((P) => p(z, c(k)), ["stop"])
1112
+ title: h.$t("add"),
1113
+ onClick: ee((H) => k(j, c(z)), ["stop"])
1107
1114
  }, {
1108
- default: x(() => [
1115
+ default: b(() => [
1109
1116
  v(V, {
1110
1117
  name: "add",
1111
1118
  class: "size-5"
1112
1119
  })
1113
1120
  ]),
1114
1121
  _: 1
1115
- }, 8, ["title", "onClick"])
1122
+ }, 8, ["title", "onClick"])) : T("", !0)
1116
1123
  ], 64))
1117
1124
  ], 2))), 128))
1118
1125
  ]));
1119
1126
  }
1120
- }), Cn = { class: "flex w-full relative" }, Sn = ["disabled", "aria-label", "title"], Tt = /* @__PURE__ */ M({
1127
+ }), Cn = { class: "flex w-full relative" }, Sn = ["disabled", "aria-label", "title"], Tt = /* @__PURE__ */ O({
1121
1128
  __name: "VTextWrapper",
1122
1129
  props: {
1123
1130
  active: { type: Boolean },
@@ -1130,17 +1137,17 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
1130
1137
  emits: ["icon"],
1131
1138
  setup(e, { emit: s }) {
1132
1139
  const a = e, l = s, { labelClass: t, borderClass: o, contentClass: i, slotClass: d } = ka(a, "wrapper");
1133
- return (u, r) => (f(), g("div", Cn, [
1140
+ return (m, r) => (f(), g("div", Cn, [
1134
1141
  n("div", {
1135
- class: B(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-cyan-main/60", [G(d), G(o)]])
1142
+ class: B(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-cyan-main/60", [J(d), J(o)]])
1136
1143
  }, [
1137
1144
  n("span", {
1138
- class: B(["absolute -translate-y-1/2 rounded transition-all", G(t)])
1145
+ class: B(["absolute -translate-y-1/2 rounded transition-all", J(t)])
1139
1146
  }, C(a.label), 3),
1140
1147
  n("div", {
1141
- class: B(G(i))
1148
+ class: B(J(i))
1142
1149
  }, [
1143
- I(u.$slots, "default")
1150
+ I(m.$slots, "default")
1144
1151
  ], 2),
1145
1152
  a.hideIcon ? T("", !0) : (f(), g("button", {
1146
1153
  key: 0,
@@ -1151,7 +1158,7 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
1151
1158
  class: B(["flex h-full flex-[0_0_50px] items-center justify-center rounded-r-md border-l border-gray-light-10 text-gray-main transition hover:text-cyan-main disabled:pointer-events-none disabled:opacity-40 dark:border-white/10", { "cursor-pointer": !a.disabled && !a.iconDisabled }]),
1152
1159
  onClick: r[0] || (r[0] = (c) => l("icon", c))
1153
1160
  }, [
1154
- I(u.$slots, "icon", {}, () => [
1161
+ I(m.$slots, "icon", {}, () => [
1155
1162
  v(V, {
1156
1163
  name: "add",
1157
1164
  class: "size-4"
@@ -1161,17 +1168,17 @@ const ad = /* @__PURE__ */ Ct(Xa, [["render", Qa]]), es = {
1161
1168
  ], 2)
1162
1169
  ]));
1163
1170
  }
1164
- }), _n = /* @__PURE__ */ M({
1171
+ }), _n = /* @__PURE__ */ O({
1165
1172
  __name: "BlockDataHelp",
1166
1173
  emits: ["close"],
1167
1174
  setup(e, { emit: s }) {
1168
1175
  const a = s;
1169
- return (l, t) => (f(), O(ze, {
1176
+ return (l, t) => (f(), M(ze, {
1170
1177
  title: "Как настроить блок",
1171
1178
  size: "md",
1172
1179
  onClose: t[0] || (t[0] = (o) => a("close"))
1173
1180
  }, {
1174
- default: x(() => [...t[1] || (t[1] = [
1181
+ default: b(() => [...t[1] || (t[1] = [
1175
1182
  n("div", { class: "flex flex-col gap-4 text-sm leading-relaxed text-gray-dark-25 dark:text-gray-light-10" }, [
1176
1183
  n("section", null, [
1177
1184
  n("h5", { class: "mb-1 text-base font-semibold text-gray-dark-40 dark:text-white" }, "Блоки и данные"),
@@ -1274,7 +1281,7 @@ v + ' кВт·ч<br>выработка за день'`),
1274
1281
  }), Tn = { class: "glass-inset rounded-xl p-3" }, zn = { class: "flex items-end gap-2" }, An = {
1275
1282
  key: 0,
1276
1283
  class: "mt-1.5 text-xs text-gray-dark-25 dark:text-gray-main"
1277
- }, Lt = /* @__PURE__ */ M({
1284
+ }, Lt = /* @__PURE__ */ O({
1278
1285
  __name: "BlockFieldCard",
1279
1286
  props: {
1280
1287
  field: {},
@@ -1293,14 +1300,14 @@ v + ' кВт·ч<br>выработка за день'`),
1293
1300
  n("div", {
1294
1301
  class: B(["grid min-w-0 flex-1 gap-2", { "sm:grid-cols-2": e.hasFormat }])
1295
1302
  }, [
1296
- e.field.plain ? (f(), O(ie, {
1303
+ e.field.plain ? (f(), M(ie, {
1297
1304
  key: 0,
1298
1305
  active: "",
1299
1306
  "hide-message": "",
1300
1307
  "model-value": e.modelValue,
1301
1308
  label: e.field.label,
1302
1309
  "onUpdate:modelValue": t[0] || (t[0] = (o) => a("update:modelValue", o))
1303
- }, null, 8, ["model-value", "label"])) : (f(), O(ie, {
1310
+ }, null, 8, ["model-value", "label"])) : (f(), M(ie, {
1304
1311
  key: 1,
1305
1312
  active: "",
1306
1313
  "hide-message": "",
@@ -1310,7 +1317,7 @@ v + ' кВт·ч<br>выработка за день'`),
1310
1317
  "onUpdate:modelValue": t[1] || (t[1] = (o) => a("update:modelValue", o)),
1311
1318
  onOnIcon: t[2] || (t[2] = (o) => a("pick"))
1312
1319
  }, {
1313
- icon: x(() => [
1320
+ icon: b(() => [
1314
1321
  v(V, {
1315
1322
  name: "search",
1316
1323
  size: 16
@@ -1318,7 +1325,7 @@ v + ' кВт·ч<br>выработка за день'`),
1318
1325
  ]),
1319
1326
  _: 1
1320
1327
  }, 8, ["model-value", "label", "placeholder"])),
1321
- e.hasFormat ? (f(), O(ie, {
1328
+ e.hasFormat ? (f(), M(ie, {
1322
1329
  key: 2,
1323
1330
  active: "",
1324
1331
  "hide-message": "",
@@ -1328,7 +1335,7 @@ v + ' кВт·ч<br>выработка за день'`),
1328
1335
  "onUpdate:modelValue": t[3] || (t[3] = (o) => a("update:format", o))
1329
1336
  }, null, 8, ["model-value", "placeholder"])) : T("", !0)
1330
1337
  ], 2),
1331
- e.showReset ? (f(), O(R, {
1338
+ e.showReset ? (f(), M(R, {
1332
1339
  key: 0,
1333
1340
  type: "icon",
1334
1341
  class: "shrink-0",
@@ -1336,7 +1343,7 @@ v + ' кВт·ч<br>выработка за день'`),
1336
1343
  title: "Сбросить поле",
1337
1344
  onClick: t[4] || (t[4] = (o) => a("reset"))
1338
1345
  }, {
1339
- default: x(() => [
1346
+ default: b(() => [
1340
1347
  v(V, {
1341
1348
  name: "refresh",
1342
1349
  size: 14
@@ -1348,7 +1355,7 @@ v + ' кВт·ч<br>выработка за день'`),
1348
1355
  e.field.hint ? (f(), g("p", An, C(e.field.hint), 1)) : T("", !0)
1349
1356
  ]));
1350
1357
  }
1351
- }), En = { class: "flex gap-1 text-amber-500 self-start text-nowrap select-none" }, Bn = ["title"], Vn = ["title"], In = { class: "flex flex-auto" }, Ln = ["disabled"], He = /* @__PURE__ */ M({
1358
+ }), En = { class: "flex gap-1 text-amber-500 self-start text-nowrap select-none" }, Bn = ["title"], Vn = ["title"], In = { class: "flex flex-auto" }, Ln = ["disabled"], He = /* @__PURE__ */ O({
1352
1359
  __name: "VFunc",
1353
1360
  props: {
1354
1361
  label: {},
@@ -1375,51 +1382,51 @@ v + ' кВт·ч<br>выработка за день'`),
1375
1382
  }, d = St((r) => {
1376
1383
  const c = r.target;
1377
1384
  i(c.value) && a("change", c.value);
1378
- }, 500), u = (r) => a("icon", r);
1385
+ }, 500), m = (r) => a("icon", r);
1379
1386
  return ye(
1380
1387
  () => e.value,
1381
1388
  (r) => {
1382
1389
  const c = r ?? "";
1383
1390
  c !== o.value && (o.value = c);
1384
1391
  }
1385
- ), (r, c) => (f(), O(Tt, {
1392
+ ), (r, c) => (f(), M(Tt, {
1386
1393
  active: !!e.value,
1387
1394
  disabled: e.disabled,
1388
1395
  label: e.label,
1389
1396
  hideIcon: e.hideIcon,
1390
- onIcon: u
1397
+ onIcon: m
1391
1398
  }, {
1392
- icon: x(() => [
1393
- e.value ? (f(), O(V, {
1399
+ icon: b(() => [
1400
+ e.value ? (f(), M(V, {
1394
1401
  key: 0,
1395
1402
  name: "close",
1396
1403
  class: "size-4"
1397
- })) : (f(), O(V, {
1404
+ })) : (f(), M(V, {
1398
1405
  key: 1,
1399
1406
  name: "add",
1400
1407
  class: "size-4"
1401
1408
  }))
1402
1409
  ]),
1403
- default: x(() => [
1404
- e.value ? (f(), g(D, { key: 0 }, [
1410
+ default: b(() => [
1411
+ e.value ? (f(), g(N, { key: 0 }, [
1405
1412
  n("div", En, [
1406
1413
  c[4] || (c[4] = L(" ( ", -1)),
1407
- (f(!0), g(D, null, K(e.prefix, (m, p) => {
1408
- var b;
1409
- return f(), g(D, {
1414
+ (f(!0), g(N, null, K(e.prefix, (u, p) => {
1415
+ var k;
1416
+ return f(), g(N, {
1410
1417
  key: `prefix-${p}`
1411
1418
  }, [
1412
1419
  n("span", {
1413
1420
  class: "text-blue-400/80",
1414
- title: (b = e.prefixTitles) == null ? void 0 : b[p]
1415
- }, C(m), 9, Bn),
1421
+ title: (k = e.prefixTitles) == null ? void 0 : k[p]
1422
+ }, C(u), 9, Bn),
1416
1423
  c[2] || (c[2] = n("span", { class: "last:hidden" }, ",", -1))
1417
1424
  ], 64);
1418
1425
  }), 128)),
1419
- (f(!0), g(D, null, K(e.args, (m, p) => (f(), g(D, { key: m }, [
1426
+ (f(!0), g(N, null, K(e.args, (u, p) => (f(), g(N, { key: u }, [
1420
1427
  n("span", {
1421
1428
  class: "text-blue-400/80",
1422
- title: e.argumentTitle ? `${e.argumentTitle}: ${m}` : m
1429
+ title: e.argumentTitle ? `${e.argumentTitle}: ${u}` : u
1423
1430
  }, C(t(p)), 9, Vn),
1424
1431
  c[3] || (c[3] = n("span", { class: "last:hidden" }, ",", -1))
1425
1432
  ], 64))), 128)),
@@ -1427,12 +1434,12 @@ v + ' кВт·ч<br>выработка за день'`),
1427
1434
  ]),
1428
1435
  n("div", In, [
1429
1436
  it(n("textarea", {
1430
- "onUpdate:modelValue": c[0] || (c[0] = (m) => o.value = m),
1437
+ "onUpdate:modelValue": c[0] || (c[0] = (u) => o.value = u),
1431
1438
  class: "outline-0 w-full resize-none field-sizing-content",
1432
1439
  type: "text",
1433
1440
  disabled: e.disabled,
1434
1441
  onInput: c[1] || (c[1] = //@ts-ignore
1435
- (...m) => G(d) && G(d)(...m))
1442
+ (...u) => J(d) && J(d)(...u))
1436
1443
  }, null, 40, Ln), [
1437
1444
  [kt, o.value]
1438
1445
  ])
@@ -1572,8 +1579,8 @@ v + ' кВт·ч<br>выработка за день'`),
1572
1579
  return e.slice(0, Ge).map((t) => st(at(t, l, s)));
1573
1580
  }, Wn = (e, s, a, l) => {
1574
1581
  const t = { ...At(a), ...l };
1575
- s.slice(0, Ge).forEach((d, u) => {
1576
- t[yt[u]] = st(at(d, t, a));
1582
+ s.slice(0, Ge).forEach((d, m) => {
1583
+ t[yt[m]] = st(at(d, t, a));
1577
1584
  });
1578
1585
  let o = st(at(e.value, t, a));
1579
1586
  o === void 0 && (o = t.a), t.v = o, t.a = t.a ?? o;
@@ -1590,27 +1597,27 @@ v + ' кВт·ч<br>выработка за день'`),
1590
1597
  style: { ...zt, ...e.style }
1591
1598
  };
1592
1599
  }, Hn = (e, s, a, l) => {
1593
- var i, d, u, r;
1600
+ var i, d, m, r;
1594
1601
  const t = /* @__PURE__ */ new Set([
1595
1602
  ...Object.keys(e.metrics ?? {}),
1596
1603
  ...Object.keys(s.metrics ?? {})
1597
1604
  ]), o = {};
1598
1605
  for (const c of t) {
1599
- const m = ((i = s.metrics) == null ? void 0 : i[c]) ?? ((d = e.metrics) == null ? void 0 : d[c]) ?? [], p = ((u = s.metricArgs) == null ? void 0 : u[c]) ?? ((r = e.metricArgs) == null ? void 0 : r[c]) ?? [];
1600
- o[c] = m.slice(0, ht).map((b) => Wn(b, p, a, l));
1606
+ const u = ((i = s.metrics) == null ? void 0 : i[c]) ?? ((d = e.metrics) == null ? void 0 : d[c]) ?? [], p = ((m = s.metricArgs) == null ? void 0 : m[c]) ?? ((r = e.metricArgs) == null ? void 0 : r[c]) ?? [];
1607
+ o[c] = u.slice(0, ht).map((k) => Wn(k, p, a, l));
1601
1608
  }
1602
1609
  return o;
1603
1610
  }, Et = (e, s, a) => {
1604
1611
  const l = At(a), t = {};
1605
1612
  for (const o of e.fields) {
1606
- const i = s.bindings[o.key], d = typeof i == "string" ? i : i == null ? void 0 : i.expr, u = typeof i == "object" ? i == null ? void 0 : i.fallback : void 0;
1613
+ const i = s.bindings[o.key], d = typeof i == "string" ? i : i == null ? void 0 : i.expr, m = typeof i == "object" ? i == null ? void 0 : i.fallback : void 0;
1607
1614
  let r;
1608
1615
  o.formatFor && (l.v = t[o.formatFor]), d && (r = qt(d, l), r === void 0 && Jt.test(d) && (r = a.get(d)));
1609
- const c = Kn(r ?? u ?? o.default, o.type);
1616
+ const c = Kn(r ?? m ?? o.default, o.type);
1610
1617
  t[o.key] = c, l[o.key] = c;
1611
1618
  }
1612
1619
  return t.metrics = Hn(e, s, a, t), t;
1613
- }, Gn = { class: "glass-inset rounded-xl p-3" }, Jn = { class: "flex items-center gap-2" }, qn = { class: "min-w-0 flex-1" }, Xn = { class: "mt-2 flex flex-col gap-2" }, Yn = /* @__PURE__ */ M({
1620
+ }, Gn = { class: "glass-inset rounded-xl p-3" }, Jn = { class: "flex items-center gap-2" }, qn = { class: "min-w-0 flex-1" }, Xn = { class: "mt-2 flex flex-col gap-2" }, Yn = /* @__PURE__ */ O({
1614
1621
  __name: "BlockMetricCard",
1615
1622
  props: {
1616
1623
  metric: {},
@@ -1638,7 +1645,7 @@ v + ' кВт·ч<br>выработка за день'`),
1638
1645
  title: "Стиль показателя",
1639
1646
  onClick: o[1] || (o[1] = (i) => a("open-style"))
1640
1647
  }, {
1641
- default: x(() => [
1648
+ default: b(() => [
1642
1649
  v(V, {
1643
1650
  name: "palette",
1644
1651
  size: 18
@@ -1653,7 +1660,7 @@ v + ' кВт·ч<br>выработка за день'`),
1653
1660
  title: "Удалить показатель",
1654
1661
  onClick: o[2] || (o[2] = (i) => a("remove"))
1655
1662
  }, {
1656
- default: x(() => [
1663
+ default: b(() => [
1657
1664
  v(V, {
1658
1665
  name: "trash",
1659
1666
  size: 14
@@ -1678,7 +1685,7 @@ v + ' кВт·ч<br>выработка за день'`),
1678
1685
  v(He, {
1679
1686
  value: e.metric.value,
1680
1687
  args: e.args,
1681
- params: [...G(yt)],
1688
+ params: [...J(yt)],
1682
1689
  label: "Значение",
1683
1690
  onIcon: o[5] || (o[5] = (i) => a("toggle-field", "value")),
1684
1691
  onChange: o[6] || (o[6] = (i) => a("change", { value: i })),
@@ -1687,7 +1694,7 @@ v + ' кВт·ч<br>выработка за день'`),
1687
1694
  v(He, {
1688
1695
  value: e.metric.format,
1689
1696
  args: e.args,
1690
- params: [...G(yt)],
1697
+ params: [...J(yt)],
1691
1698
  prefix: ["v"],
1692
1699
  label: "Формат",
1693
1700
  onIcon: o[7] || (o[7] = (i) => a("toggle-field", "format")),
@@ -1697,7 +1704,7 @@ v + ' кВт·ч<br>выработка за день'`),
1697
1704
  ])
1698
1705
  ]));
1699
1706
  }
1700
- }), Zn = { class: "flex min-h-96 flex-col gap-4" }, Qn = { class: "text-sm text-gray-dark-25 dark:text-gray-main" }, el = { class: "font-medium text-gray-dark-40 dark:text-white" }, tl = { class: "glass-inset rounded-md p-3" }, al = { class: "grid gap-3 sm:grid-cols-2" }, sl = { class: "mt-auto flex justify-end" }, nl = /* @__PURE__ */ M({
1707
+ }), Zn = { class: "flex min-h-96 flex-col gap-4" }, Qn = { class: "text-sm text-gray-dark-25 dark:text-gray-main" }, el = { class: "font-medium text-gray-dark-40 dark:text-white" }, tl = { class: "glass-inset rounded-md p-3" }, al = { class: "grid gap-3 sm:grid-cols-2" }, sl = { class: "mt-auto flex justify-end" }, nl = /* @__PURE__ */ O({
1701
1708
  __name: "BlockMetricStyleDialog",
1702
1709
  props: {
1703
1710
  label: {},
@@ -1706,61 +1713,61 @@ v + ' кВт·ч<br>выработка за день'`),
1706
1713
  },
1707
1714
  emits: ["close", "update"],
1708
1715
  setup(e, { emit: s }) {
1709
- const a = s, l = S(() => ({ ...zt, ...e.style })), t = (h, k) => {
1716
+ const a = s, l = S(() => ({ ...zt, ...e.style })), t = (h, x) => {
1710
1717
  var z;
1711
- return ((z = h.find((P) => P.value === k)) == null ? void 0 : z.name) ?? "";
1712
- }, o = S(() => t(Mt, l.value.size)), i = S(() => t(Ot, l.value.color)), d = S(() => t(Ft, l.value.weight)), u = S(() => t(jt, l.value.align)), r = (h) => {
1718
+ return ((z = h.find((j) => j.value === x)) == null ? void 0 : z.name) ?? "";
1719
+ }, o = S(() => t(Mt, l.value.size)), i = S(() => t(Ot, l.value.color)), d = S(() => t(Ft, l.value.weight)), m = S(() => t(jt, l.value.align)), r = (h) => {
1713
1720
  a("update", { ...l.value, ...h });
1714
- }, c = (h) => r({ size: h.value }), m = (h) => r({ color: h.value }), p = (h) => r({ weight: h.value }), b = (h) => r({ align: h.value });
1715
- return (h, k) => (f(), O(ze, {
1721
+ }, c = (h) => r({ size: h.value }), u = (h) => r({ color: h.value }), p = (h) => r({ weight: h.value }), k = (h) => r({ align: h.value });
1722
+ return (h, x) => (f(), M(ze, {
1716
1723
  title: "Стиль показателя",
1717
1724
  size: "md",
1718
- onClose: k[1] || (k[1] = (z) => a("close"))
1725
+ onClose: x[1] || (x[1] = (z) => a("close"))
1719
1726
  }, {
1720
- default: x(() => [
1727
+ default: b(() => [
1721
1728
  n("div", Zn, [
1722
1729
  n("p", Qn, [
1723
- k[2] || (k[2] = L(" Показатель: ", -1)),
1730
+ x[2] || (x[2] = L(" Показатель: ", -1)),
1724
1731
  n("span", el, C(e.label), 1)
1725
1732
  ]),
1726
1733
  n("div", tl, [
1727
- k[3] || (k[3] = n("span", { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, "Предпросмотр", -1)),
1734
+ x[3] || (x[3] = n("span", { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, "Предпросмотр", -1)),
1728
1735
  n("span", {
1729
- class: B(["mt-1 block whitespace-pre", G(pt)(l.value)])
1736
+ class: B(["mt-1 block whitespace-pre", J(pt)(l.value)])
1730
1737
  }, C(e.preview || "1 234 кВт·ч"), 3)
1731
1738
  ]),
1732
1739
  n("div", al, [
1733
1740
  v(he, {
1734
1741
  "model-value": o.value,
1735
- items: G(Mt),
1742
+ items: J(Mt),
1736
1743
  label: "Размер",
1737
1744
  onChange: c
1738
1745
  }, null, 8, ["model-value", "items"]),
1739
1746
  v(he, {
1740
1747
  "model-value": i.value,
1741
- items: G(Ot),
1748
+ items: J(Ot),
1742
1749
  label: "Цвет",
1743
- onChange: m
1750
+ onChange: u
1744
1751
  }, null, 8, ["model-value", "items"]),
1745
1752
  v(he, {
1746
1753
  "model-value": d.value,
1747
- items: G(Ft),
1754
+ items: J(Ft),
1748
1755
  label: "Начертание",
1749
1756
  onChange: p
1750
1757
  }, null, 8, ["model-value", "items"]),
1751
1758
  v(he, {
1752
- "model-value": u.value,
1753
- items: G(jt),
1759
+ "model-value": m.value,
1760
+ items: J(jt),
1754
1761
  label: "Выравнивание",
1755
- onChange: b
1762
+ onChange: k
1756
1763
  }, null, 8, ["model-value", "items"])
1757
1764
  ]),
1758
1765
  n("div", sl, [
1759
1766
  v(R, {
1760
1767
  color: "blue",
1761
- onClick: k[0] || (k[0] = (z) => a("close"))
1768
+ onClick: x[0] || (x[0] = (z) => a("close"))
1762
1769
  }, {
1763
- default: x(() => [...k[4] || (k[4] = [
1770
+ default: b(() => [...x[4] || (x[4] = [
1764
1771
  L("Готово", -1)
1765
1772
  ])]),
1766
1773
  _: 1
@@ -1792,7 +1799,7 @@ v + ' кВт·ч<br>выработка за день'`),
1792
1799
  }, $l = ["onDragover", "onDrop"], wl = {
1793
1800
  key: 3,
1794
1801
  class: "glass-inset rounded-xl p-3"
1795
- }, Cl = { class: "relative max-h-120 overflow-auto scrollbar" }, Xt = /* @__PURE__ */ M({
1802
+ }, Cl = { class: "relative max-h-120 overflow-auto scrollbar" }, Xt = /* @__PURE__ */ O({
1796
1803
  __name: "BlockDataSettings",
1797
1804
  props: {
1798
1805
  definition: {},
@@ -1835,14 +1842,14 @@ v + ' кВт·ч<br>выработка за день'`),
1835
1842
  for (const [_, W] of Object.entries(e.definition.metrics ?? {}))
1836
1843
  $.metrics[_] || ($.metrics[_] = JSON.parse(JSON.stringify(W)));
1837
1844
  return $;
1838
- }, i = F(o(e.config)), d = F("general"), u = F(!1), r = F(!1), c = F(null), m = F(null), p = F(null), b = F(null), h = F(null), k = F(null);
1839
- let z = JSON.stringify(i.value), P = null;
1840
- const X = S(() => Et(e.definition, i.value, e.context)), j = S(() => X.value.metrics ?? {}), Z = S(
1845
+ }, i = F(o(e.config)), d = F("general"), m = F(!1), r = F(!1), c = F(null), u = F(null), p = F(null), k = F(null), h = F(null), x = F(null);
1846
+ let z = JSON.stringify(i.value), j = null;
1847
+ const H = S(() => Et(e.definition, i.value, e.context)), D = S(() => H.value.metrics ?? {}), Z = S(
1841
1848
  () => l.map((y) => ({
1842
1849
  ...y,
1843
1850
  count: e.definition.fields.filter(($) => ($.block ?? "general") === y.key).length
1844
1851
  })).filter((y) => y.count > 0)
1845
- ), w = S(() => Object.keys(e.definition.metrics ?? {})), A = S(() => w.value.includes(d.value)), N = S(() => e.definition.fields.filter((y) => (y.block ?? "general") === d.value && !y.formatFor)), ae = S(() => N.value.find((y) => y.key.endsWith("Title"))), xe = S(() => d.value === "general"), re = S(() => N.value.find((y) => y.key === `${d.value}Flow`)), qe = S(() => t[d.value] ?? []), rt = S(() => {
1852
+ ), w = S(() => Object.keys(e.definition.metrics ?? {})), A = S(() => w.value.includes(d.value)), P = S(() => e.definition.fields.filter((y) => (y.block ?? "general") === d.value && !y.formatFor)), ae = S(() => P.value.find((y) => y.key.endsWith("Title"))), xe = S(() => d.value === "general"), re = S(() => P.value.find((y) => y.key === `${d.value}Flow`)), qe = S(() => t[d.value] ?? []), rt = S(() => {
1846
1853
  const y = re.value;
1847
1854
  return y ? Ae(y) || String(y.default ?? "") : "";
1848
1855
  }), Ve = S(() => {
@@ -1850,7 +1857,7 @@ v + ' кВт·ч<br>выработка за день'`),
1850
1857
  return ((y = qe.value.find(($) => $.value === rt.value)) == null ? void 0 : y.name) ?? "";
1851
1858
  }), Ie = (y) => {
1852
1859
  re.value && Se(re.value, y.value);
1853
- }, Le = S(() => xe.value ? N.value : []), Q = S(() => {
1860
+ }, Le = S(() => xe.value ? P.value : []), Q = S(() => {
1854
1861
  var y;
1855
1862
  return A.value ? ((y = i.value.metricArgs) == null ? void 0 : y[d.value]) ?? [] : [];
1856
1863
  }), de = S(() => {
@@ -1878,22 +1885,22 @@ v + ' кВт·ч<br>выработка за день'`),
1878
1885
  return;
1879
1886
  }
1880
1887
  i.value.bindings[y.key] = y.plain ? JSON.stringify($) : $;
1881
- }, Me = (y) => e.definition.fields.find(($) => $.formatFor === y.key), J = (y) => {
1888
+ }, Me = (y) => e.definition.fields.find(($) => $.formatFor === y.key), q = (y) => {
1882
1889
  const $ = Me(y);
1883
1890
  return $ ? Ae($) : "";
1884
- }, q = (y, $) => {
1891
+ }, X = (y, $) => {
1885
1892
  const _ = Me(y);
1886
1893
  _ && Se(_, $);
1887
1894
  }, E = (y) => {
1888
- const $ = X.value[y];
1895
+ const $ = H.value[y];
1889
1896
  return $ === void 0 ? "—" : typeof $ == "boolean" ? $ ? "да" : "нет" : String($);
1890
1897
  }, U = (y) => `v + ' ${y.unit ?? "ед."}'`, ve = () => {
1891
- P && (clearTimeout(P), P = null);
1898
+ j && (clearTimeout(j), j = null);
1892
1899
  const y = o(i.value), $ = JSON.stringify(y);
1893
1900
  $ !== z && (z = $, a("update:config", y));
1894
1901
  };
1895
1902
  ye(i, () => {
1896
- P && clearTimeout(P), P = setTimeout(ve, 500);
1903
+ j && clearTimeout(j), j = setTimeout(ve, 500);
1897
1904
  }, { deep: !0 });
1898
1905
  const Ue = () => {
1899
1906
  ve(), a("close");
@@ -1921,10 +1928,10 @@ v + ' кВт·ч<br>выработка за день'`),
1921
1928
  };
1922
1929
  }, _e = (y, $) => {
1923
1930
  p.value = y === "enter" ? $ : null;
1924
- }, H = () => `metric-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 6)}`, Te = () => {
1931
+ }, G = () => `metric-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 6)}`, Te = () => {
1925
1932
  var $;
1926
1933
  const y = ($ = i.value.metrics) == null ? void 0 : $[d.value];
1927
- !A.value || !y || y.length >= ht || y.push({ id: H(), label: "Показатель", value: "", format: "" });
1934
+ !A.value || !y || y.length >= ht || y.push({ id: G(), label: "Показатель", value: "", format: "" });
1928
1935
  }, we = (y) => {
1929
1936
  var _;
1930
1937
  const $ = (_ = i.value.metrics) == null ? void 0 : _[d.value];
@@ -1939,23 +1946,23 @@ v + ' кВт·ч<br>выработка за день'`),
1939
1946
  }
1940
1947
  Ze(y, { format: y.format ? "" : "v" });
1941
1948
  }, ge = (y) => {
1942
- m.value = y;
1949
+ u.value = y;
1943
1950
  }, se = (y) => {
1944
- m.value && Ze(m.value, { style: y });
1951
+ u.value && Ze(u.value, { style: y });
1945
1952
  }, te = (y, $) => {
1946
1953
  h.value = $, y.dataTransfer && (y.dataTransfer.effectAllowed = "move", y.dataTransfer.setData("text/plain", String($)));
1947
1954
  }, Ye = (y) => {
1948
- h.value !== null && (k.value = y);
1955
+ h.value !== null && (x.value = y);
1949
1956
  }, ut = (y) => {
1950
1957
  const $ = h.value;
1951
- if (h.value = null, k.value = null, $ === null || $ === y) return;
1958
+ if (h.value = null, x.value = null, $ === null || $ === y) return;
1952
1959
  const _ = [...de.value], [W] = _.splice($, 1);
1953
1960
  _.splice(y, 0, W), i.value.metrics = { ...i.value.metrics ?? {}, [d.value]: _ };
1954
1961
  }, ra = () => {
1955
- h.value = null, k.value = null;
1962
+ h.value = null, x.value = null;
1956
1963
  }, da = (y) => {
1957
1964
  var $, _;
1958
- return ((_ = ($ = j.value[d.value]) == null ? void 0 : $.find((W) => W.id === y.id)) == null ? void 0 : _.value) ?? "";
1965
+ return ((_ = ($ = D.value[d.value]) == null ? void 0 : $.find((W) => W.id === y.id)) == null ? void 0 : _.value) ?? "";
1959
1966
  }, Ze = (y, $) => {
1960
1967
  Object.assign(y, $);
1961
1968
  }, ca = () => {
@@ -1963,7 +1970,7 @@ v + ' кВт·ч<br>выработка за день'`),
1963
1970
  W.href = _, W.download = `${e.definition.type}.json`, W.click(), URL.revokeObjectURL(_);
1964
1971
  }, ua = () => {
1965
1972
  var y;
1966
- return (y = b.value) == null ? void 0 : y.click();
1973
+ return (y = k.value) == null ? void 0 : y.click();
1967
1974
  }, It = (y) => typeof y == "object" && y !== null && !Array.isArray(y), ma = async (y) => {
1968
1975
  var W;
1969
1976
  const $ = y.target, _ = (W = $.files) == null ? void 0 : W[0];
@@ -1981,21 +1988,21 @@ v + ' кВт·ч<br>выработка за день'`),
1981
1988
  $.value = "";
1982
1989
  }
1983
1990
  };
1984
- return Ne(ve), (y, $) => (f(), O(ze, {
1991
+ return Ne(ve), (y, $) => (f(), M(ze, {
1985
1992
  title: "Настройка блока",
1986
1993
  size: "lg",
1987
1994
  onClose: Ue
1988
1995
  }, {
1989
- "header-btn": x(() => [
1996
+ "header-btn": b(() => [
1990
1997
  n("div", ll, [
1991
1998
  v(R, {
1992
1999
  type: "icon",
1993
2000
  size: "sm",
1994
2001
  "aria-label": "Справка",
1995
2002
  title: "Справка",
1996
- onClick: $[0] || ($[0] = (_) => u.value = !0)
2003
+ onClick: $[0] || ($[0] = (_) => m.value = !0)
1997
2004
  }, {
1998
- default: x(() => [
2005
+ default: b(() => [
1999
2006
  v(V, {
2000
2007
  name: "help",
2001
2008
  size: 16
@@ -2010,7 +2017,7 @@ v + ' кВт·ч<br>выработка за день'`),
2010
2017
  title: "Импорт",
2011
2018
  onClick: ua
2012
2019
  }, {
2013
- default: x(() => [
2020
+ default: b(() => [
2014
2021
  v(V, {
2015
2022
  name: "upload",
2016
2023
  size: 16
@@ -2025,7 +2032,7 @@ v + ' кВт·ч<br>выработка за день'`),
2025
2032
  title: "Экспорт",
2026
2033
  onClick: ca
2027
2034
  }, {
2028
- default: x(() => [
2035
+ default: b(() => [
2029
2036
  v(V, {
2030
2037
  name: "download",
2031
2038
  size: 16
@@ -2035,10 +2042,10 @@ v + ' кВт·ч<br>выработка за день'`),
2035
2042
  })
2036
2043
  ])
2037
2044
  ]),
2038
- default: x(() => [
2045
+ default: b(() => [
2039
2046
  n("input", {
2040
2047
  ref_key: "fileInput",
2041
- ref: b,
2048
+ ref: k,
2042
2049
  type: "file",
2043
2050
  accept: "application/json,.json",
2044
2051
  class: "hidden",
@@ -2046,7 +2053,7 @@ v + ' кВт·ч<br>выработка за день'`),
2046
2053
  }, null, 544),
2047
2054
  n("div", ol, [
2048
2055
  n("nav", il, [
2049
- (f(!0), g(D, null, K(Z.value, (_) => (f(), g("button", {
2056
+ (f(!0), g(N, null, K(Z.value, (_) => (f(), g("button", {
2050
2057
  key: _.key,
2051
2058
  type: "button",
2052
2059
  class: B(["flex items-center gap-2 rounded-md px-3 py-2 text-left transition", d.value === _.key ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"]),
@@ -2063,43 +2070,43 @@ v + ' кВт·ч<br>выработка за день'`),
2063
2070
  ], 10, rl))), 128))
2064
2071
  ]),
2065
2072
  n("div", ml, [
2066
- xe.value ? (f(!0), g(D, { key: 0 }, K(Le.value, (_) => (f(), O(Lt, {
2073
+ xe.value ? (f(!0), g(N, { key: 0 }, K(Le.value, (_) => (f(), M(Lt, {
2067
2074
  key: _.key,
2068
2075
  field: _,
2069
2076
  "model-value": Ae(_),
2070
- "format-value": J(_),
2077
+ "format-value": q(_),
2071
2078
  "has-format": !!Me(_),
2072
2079
  placeholder: E(_.previewKey ?? _.key),
2073
2080
  "placeholder-format": U(_),
2074
2081
  "show-reset": !1,
2075
2082
  "onUpdate:modelValue": (W) => Se(_, W),
2076
- "onUpdate:format": (W) => q(_, W),
2083
+ "onUpdate:format": (W) => X(_, W),
2077
2084
  onPick: (W) => Ke(_.key)
2078
- }, null, 8, ["field", "model-value", "format-value", "has-format", "placeholder", "placeholder-format", "onUpdate:modelValue", "onUpdate:format", "onPick"]))), 128)) : (f(), g(D, { key: 1 }, [
2079
- ae.value ? (f(), O(Lt, {
2085
+ }, null, 8, ["field", "model-value", "format-value", "has-format", "placeholder", "placeholder-format", "onUpdate:modelValue", "onUpdate:format", "onPick"]))), 128)) : (f(), g(N, { key: 1 }, [
2086
+ ae.value ? (f(), M(Lt, {
2080
2087
  key: 0,
2081
2088
  field: ae.value,
2082
2089
  "model-value": Ae(ae.value),
2083
- "format-value": J(ae.value),
2090
+ "format-value": q(ae.value),
2084
2091
  "has-format": !!Me(ae.value),
2085
2092
  placeholder: E(ae.value.previewKey ?? ae.value.key),
2086
2093
  "placeholder-format": U(ae.value),
2087
2094
  "show-reset": !1,
2088
2095
  "onUpdate:modelValue": $[1] || ($[1] = (_) => Se(ae.value, _)),
2089
- "onUpdate:format": $[2] || ($[2] = (_) => q(ae.value, _)),
2096
+ "onUpdate:format": $[2] || ($[2] = (_) => X(ae.value, _)),
2090
2097
  onPick: $[3] || ($[3] = (_) => Ke(ae.value.key))
2091
2098
  }, null, 8, ["field", "model-value", "format-value", "has-format", "placeholder", "placeholder-format"])) : T("", !0),
2092
2099
  A.value ? (f(), g("section", fl, [
2093
2100
  v(Tt, {
2094
2101
  active: !!Q.value.length,
2095
- "icon-disabled": Q.value.length >= G(Ge),
2102
+ "icon-disabled": Q.value.length >= J(Ge),
2096
2103
  label: "Аргументы",
2097
2104
  "icon-label": "Добавить аргумент",
2098
2105
  onIcon: $[4] || ($[4] = (_) => Xe())
2099
2106
  }, {
2100
- default: x(() => [
2107
+ default: b(() => [
2101
2108
  Q.value.length ? (f(), g("div", gl, [
2102
- (f(!0), g(D, null, K(Q.value, (_, W) => (f(), g("div", {
2109
+ (f(!0), g(N, null, K(Q.value, (_, W) => (f(), g("div", {
2103
2110
  key: _,
2104
2111
  class: "flex items-center rounded-full bg-gray-light-10 dark:bg-gray-dark-40/50 px-2 py-1 text-xs"
2105
2112
  }, [
@@ -2131,10 +2138,10 @@ v + ' кВт·ч<br>выработка за день'`),
2131
2138
  size: "sm",
2132
2139
  "aria-label": "Добавить показатель",
2133
2140
  title: "Добавить показатель",
2134
- disabled: de.value.length >= G(ht),
2141
+ disabled: de.value.length >= J(ht),
2135
2142
  onClick: Te
2136
2143
  }, {
2137
- default: x(() => [
2144
+ default: b(() => [
2138
2145
  v(V, {
2139
2146
  name: "add",
2140
2147
  size: 14
@@ -2144,9 +2151,9 @@ v + ' кВт·ч<br>выработка за день'`),
2144
2151
  }, 8, ["disabled"])
2145
2152
  ]),
2146
2153
  de.value.length ? (f(), g("div", kl, [
2147
- (f(!0), g(D, null, K(de.value, (_, W) => (f(), g("div", {
2154
+ (f(!0), g(N, null, K(de.value, (_, W) => (f(), g("div", {
2148
2155
  key: _.id,
2149
- class: B(["rounded-xl transition", { "ring-1 ring-cyan-main/50": k.value === W }]),
2156
+ class: B(["rounded-xl transition", { "ring-1 ring-cyan-main/50": x.value === W }]),
2150
2157
  onDragover: ee((ce) => Ye(W), ["prevent"]),
2151
2158
  onDrop: ee((ce) => ut(W), ["prevent"])
2152
2159
  }, [
@@ -2176,21 +2183,21 @@ v + ' кВт·ч<br>выработка за день'`),
2176
2183
  ], 64))
2177
2184
  ])
2178
2185
  ]),
2179
- m.value ? (f(), O(nl, {
2186
+ u.value ? (f(), M(nl, {
2180
2187
  key: 0,
2181
- label: m.value.label,
2182
- style: De(m.value.style),
2183
- preview: da(m.value),
2188
+ label: u.value.label,
2189
+ style: De(u.value.style),
2190
+ preview: da(u.value),
2184
2191
  onUpdate: se,
2185
- onClose: $[5] || ($[5] = (_) => m.value = null)
2192
+ onClose: $[5] || ($[5] = (_) => u.value = null)
2186
2193
  }, null, 8, ["label", "style", "preview"])) : T("", !0),
2187
- r.value ? (f(), O(ze, {
2194
+ r.value ? (f(), M(ze, {
2188
2195
  key: 1,
2189
2196
  title: "Выбор данных",
2190
2197
  size: "md",
2191
2198
  onClose: $[6] || ($[6] = (_) => r.value = !1)
2192
2199
  }, {
2193
- default: x(() => [
2200
+ default: b(() => [
2194
2201
  n("div", Cl, [
2195
2202
  v(_t, {
2196
2203
  items: e.context.roots,
@@ -2200,15 +2207,15 @@ v + ' кВт·ч<br>выработка за день'`),
2200
2207
  ]),
2201
2208
  _: 1
2202
2209
  })) : T("", !0),
2203
- u.value ? (f(), O(_n, {
2210
+ m.value ? (f(), M(_n, {
2204
2211
  key: 2,
2205
- onClose: $[7] || ($[7] = (_) => u.value = !1)
2212
+ onClose: $[7] || ($[7] = (_) => m.value = !1)
2206
2213
  })) : T("", !0)
2207
2214
  ]),
2208
2215
  _: 1
2209
2216
  }));
2210
2217
  }
2211
- }), Sl = /* @__PURE__ */ M({
2218
+ }), Sl = /* @__PURE__ */ O({
2212
2219
  __name: "BlockHost",
2213
2220
  props: {
2214
2221
  definition: {},
@@ -2221,19 +2228,19 @@ v + ' кВт·ч<br>выработка за день'`),
2221
2228
  const a = s, l = F(!1), t = S(() => e.definition.component), o = S(() => Et(e.definition, e.config, e.context)), i = (d) => {
2222
2229
  a("update:config", d);
2223
2230
  };
2224
- return (d, u) => (f(), g(D, null, [
2225
- (f(), O(Be(t.value), Y(o.value, {
2231
+ return (d, m) => (f(), g(N, null, [
2232
+ (f(), M(Be(t.value), Y(o.value, {
2226
2233
  editable: "",
2227
- onSettings: u[0] || (u[0] = (r) => l.value = !0)
2234
+ onSettings: m[0] || (m[0] = (r) => l.value = !0)
2228
2235
  }), null, 16)),
2229
- l.value ? (f(), O(Xt, {
2236
+ l.value ? (f(), M(Xt, {
2230
2237
  key: 0,
2231
2238
  definition: e.definition,
2232
2239
  config: e.config,
2233
2240
  context: e.context,
2234
2241
  removable: e.removable,
2235
- onClose: u[1] || (u[1] = (r) => l.value = !1),
2236
- onRemove: u[2] || (u[2] = (r) => a("remove")),
2242
+ onClose: m[1] || (m[1] = (r) => l.value = !1),
2243
+ onRemove: m[2] || (m[2] = (r) => a("remove")),
2237
2244
  "onUpdate:config": i
2238
2245
  }, null, 8, ["definition", "config", "context", "removable"])) : T("", !0)
2239
2246
  ], 64));
@@ -2244,7 +2251,7 @@ v + ' кВт·ч<br>выработка за день'`),
2244
2251
  }, Bl = {
2245
2252
  key: 0,
2246
2253
  class: "py-8 text-center text-sm text-gray-dark-25 dark:text-gray-main"
2247
- }, md = /* @__PURE__ */ M({
2254
+ }, md = /* @__PURE__ */ O({
2248
2255
  __name: "BlockPicker",
2249
2256
  props: {
2250
2257
  definitions: {}
@@ -2252,14 +2259,14 @@ v + ' кВт·ч<br>выработка за день'`),
2252
2259
  emits: ["close", "select"],
2253
2260
  setup(e, { emit: s }) {
2254
2261
  const a = s;
2255
- return (l, t) => (f(), O(ze, {
2262
+ return (l, t) => (f(), M(ze, {
2256
2263
  title: "Добавить блок",
2257
2264
  size: "md",
2258
2265
  onClose: t[0] || (t[0] = (o) => a("close"))
2259
2266
  }, {
2260
- default: x(() => [
2267
+ default: b(() => [
2261
2268
  n("div", _l, [
2262
- (f(!0), g(D, null, K(e.definitions, (o) => (f(), g("button", {
2269
+ (f(!0), g(N, null, K(e.definitions, (o) => (f(), g("button", {
2263
2270
  key: o.type,
2264
2271
  type: "button",
2265
2272
  class: "glass-inset flex flex-col items-start rounded-xl p-4 text-left transition hover:border-cyan-main/30 hover:bg-cyan-main/5",
@@ -2280,7 +2287,7 @@ v + ' кВт·ч<br>выработка за день'`),
2280
2287
  _: 1
2281
2288
  }));
2282
2289
  }
2283
- }), fd = /* @__PURE__ */ M({
2290
+ }), fd = /* @__PURE__ */ O({
2284
2291
  __name: "BlockView",
2285
2292
  props: {
2286
2293
  definition: {},
@@ -2292,7 +2299,7 @@ v + ' кВт·ч<br>выработка за день'`),
2292
2299
  emits: ["update:config", "remove"],
2293
2300
  setup(e, { emit: s }) {
2294
2301
  const a = s, l = S(() => e.provider.createContext(e.source));
2295
- return (t, o) => (f(), O(Sl, {
2302
+ return (t, o) => (f(), M(Sl, {
2296
2303
  definition: e.definition,
2297
2304
  config: e.config,
2298
2305
  context: l.value,
@@ -2301,7 +2308,7 @@ v + ' кВт·ч<br>выработка за день'`),
2301
2308
  onRemove: o[1] || (o[1] = (i) => a("remove"))
2302
2309
  }, null, 8, ["definition", "config", "context", "removable"]));
2303
2310
  }
2304
- }), Vl = /* @__PURE__ */ M({
2311
+ }), Vl = /* @__PURE__ */ O({
2305
2312
  inheritAttrs: !1,
2306
2313
  __name: "BlockShell",
2307
2314
  props: {
@@ -2314,12 +2321,12 @@ v + ' кВт·ч<br>выработка за день'`),
2314
2321
  emits: ["update:config"],
2315
2322
  setup(e, { emit: s }) {
2316
2323
  const a = s, l = F(!1), t = S(() => e.definition.component);
2317
- return (o, i) => (f(), g(D, null, [
2318
- (f(), O(Be(t.value), Y(o.$attrs, {
2324
+ return (o, i) => (f(), g(N, null, [
2325
+ (f(), M(Be(t.value), Y(o.$attrs, {
2319
2326
  editable: e.editable,
2320
2327
  onSettings: i[0] || (i[0] = (d) => l.value = !0)
2321
2328
  }), null, 16, ["editable"])),
2322
- l.value ? (f(), O(Xt, {
2329
+ l.value ? (f(), M(Xt, {
2323
2330
  key: 0,
2324
2331
  definition: e.definition,
2325
2332
  config: e.config,
@@ -2333,36 +2340,36 @@ v + ' кВт·ч<br>выработка за день'`),
2333
2340
  }), Il = { class: "flex flex-col gap-3" }, Ll = {
2334
2341
  key: 0,
2335
2342
  class: "text-sm text-red-500"
2336
- }, Ml = { class: "flex justify-end gap-2" }, gd = /* @__PURE__ */ M({
2343
+ }, Ml = { class: "flex justify-end gap-2" }, gd = /* @__PURE__ */ O({
2337
2344
  __name: "BlockImport",
2338
2345
  emits: ["close", "import"],
2339
2346
  setup(e, { emit: s }) {
2340
- const a = s, l = F(""), t = F(""), o = (u) => typeof u == "object" && u !== null && !Array.isArray(u), i = () => {
2347
+ const a = s, l = F(""), t = F(""), o = (m) => typeof m == "object" && m !== null && !Array.isArray(m), i = () => {
2341
2348
  try {
2342
- const u = JSON.parse(l.value);
2343
- return !o(u) || typeof u.type != "string" || !o(u.bindings) ? (t.value = "Нужен JSON блока с полями type и bindings.", null) : {
2349
+ const m = JSON.parse(l.value);
2350
+ return !o(m) || typeof m.type != "string" || !o(m.bindings) ? (t.value = "Нужен JSON блока с полями type и bindings.", null) : {
2344
2351
  id: `imported-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`,
2345
- type: u.type,
2346
- provider: typeof u.provider == "string" ? u.provider : void 0,
2347
- bindings: u.bindings,
2348
- units: o(u.units) ? u.units : void 0,
2349
- metricArgs: o(u.metricArgs) ? u.metricArgs : void 0,
2350
- metrics: o(u.metrics) ? u.metrics : void 0
2352
+ type: m.type,
2353
+ provider: typeof m.provider == "string" ? m.provider : void 0,
2354
+ bindings: m.bindings,
2355
+ units: o(m.units) ? m.units : void 0,
2356
+ metricArgs: o(m.metricArgs) ? m.metricArgs : void 0,
2357
+ metrics: o(m.metrics) ? m.metrics : void 0
2351
2358
  };
2352
2359
  } catch {
2353
2360
  return t.value = "Не удалось разобрать JSON.", null;
2354
2361
  }
2355
2362
  }, d = () => {
2356
2363
  t.value = "";
2357
- const u = i();
2358
- u && (a("import", u), a("close"));
2364
+ const m = i();
2365
+ m && (a("import", m), a("close"));
2359
2366
  };
2360
- return (u, r) => (f(), O(ze, {
2367
+ return (m, r) => (f(), M(ze, {
2361
2368
  title: "Импорт блока",
2362
2369
  size: "md",
2363
2370
  onClose: r[2] || (r[2] = (c) => a("close"))
2364
2371
  }, {
2365
- default: x(() => [
2372
+ default: b(() => [
2366
2373
  n("div", Il, [
2367
2374
  r[5] || (r[5] = n("p", { class: "text-sm text-gray-dark-25 dark:text-gray-main" }, " Вставь JSON, который был скопирован кнопкой «Экспорт». ", -1)),
2368
2375
  it(n("textarea", {
@@ -2380,7 +2387,7 @@ v + ' кВт·ч<br>выработка за день'`),
2380
2387
  variant: "outline",
2381
2388
  onClick: r[1] || (r[1] = (c) => a("close"))
2382
2389
  }, {
2383
- default: x(() => [...r[3] || (r[3] = [
2390
+ default: b(() => [...r[3] || (r[3] = [
2384
2391
  L("Отмена", -1)
2385
2392
  ])]),
2386
2393
  _: 1
@@ -2389,7 +2396,7 @@ v + ' кВт·ч<br>выработка за день'`),
2389
2396
  color: "blue",
2390
2397
  onClick: d
2391
2398
  }, {
2392
- default: x(() => [...r[4] || (r[4] = [
2399
+ default: b(() => [...r[4] || (r[4] = [
2393
2400
  L("Добавить", -1)
2394
2401
  ])]),
2395
2402
  _: 1
@@ -2418,7 +2425,7 @@ v + ' кВт·ч<br>выработка за день'`),
2418
2425
  }, Pl = ["inert"], Rl = {
2419
2426
  key: 1,
2420
2427
  class: "mt-4 border-t border-gray-light-10/70 pt-4 dark:border-white/10"
2421
- }, Ul = /* @__PURE__ */ M({
2428
+ }, Ul = /* @__PURE__ */ O({
2422
2429
  __name: "VCard",
2423
2430
  props: {
2424
2431
  variant: { default: "glass" },
@@ -2453,11 +2460,11 @@ v + ' кВт·ч<br>выработка за день'`),
2453
2460
  l[e.tone],
2454
2461
  e.hover ? "hover:border-cyan-main/25 hover:shadow-cyan-glow" : ""
2455
2462
  ]);
2456
- return (o, i) => (f(), O(Be(e.as), {
2463
+ return (o, i) => (f(), M(Be(e.as), {
2457
2464
  class: B(t.value),
2458
2465
  "aria-disabled": e.disabled || void 0
2459
2466
  }, {
2460
- default: x(() => [
2467
+ default: b(() => [
2461
2468
  e.title || e.subtitle || o.$slots.header ? (f(), g("div", Ol, [
2462
2469
  e.title || e.subtitle ? (f(), g("div", Fl, [
2463
2470
  e.title ? (f(), g("h3", jl, C(e.title), 1)) : T("", !0),
@@ -2483,7 +2490,7 @@ v + ' кВт·ч<br>выработка за день'`),
2483
2490
  }), Kl = { class: "flex items-center gap-2" }, Wl = ["viewBox"], Hl = ["id", "d"], Gl = ["d"], Jl = ["d"], ql = ["d"], Xl = ["dur", "begin", "keyPoints"], Yl = ["href"], Zl = ["dur", "begin"], Ql = { class: "relative grid h-full grid-cols-2 grid-rows-3 gap-3 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]" }, eo = { class: "flex items-center gap-2" }, to = { class: "min-w-0 flex-1 truncate text-sm font-semibold" }, ao = {
2484
2491
  key: 0,
2485
2492
  class: "flex flex-col gap-2"
2486
- }, so = { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, no = { class: "col-span-2 row-start-2 grid place-items-center lg:col-span-1 lg:col-start-2 lg:row-span-3 lg:self-center" }, lo = { class: "relative" }, oo = { class: "flex items-center gap-2" }, io = { class: "grid size-9 place-items-center rounded-lg bg-cyan-main/15" }, ro = { class: "text-sm font-semibold text-gray-dark-30 dark:text-white" }, co = { class: "mt-3" }, uo = { class: "whitespace-pre-line text-2xl font-bold text-gray-dark-40 dark:text-white" }, mo = { class: "ml-1 text-xs text-gray-dark-25 dark:text-gray-main" }, fo = { class: "mt-3 grid grid-cols-2 gap-2" }, go = { class: "min-w-0 truncate text-xs text-gray-dark-25 dark:text-gray-main" }, vo = { class: "glass-inset mt-2 rounded-md px-3 py-2" }, po = { class: "flex items-center justify-between gap-2 text-xs" }, ho = { class: "whitespace-pre-line font-semibold" }, yo = { class: "mt-2 h-1.5 overflow-hidden rounded-full bg-gray-light-10/70 dark:bg-white/10" }, bo = /* @__PURE__ */ M({
2493
+ }, so = { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, no = { class: "col-span-2 row-start-2 grid place-items-center lg:col-span-1 lg:col-start-2 lg:row-span-3 lg:self-center" }, lo = { class: "relative" }, oo = { class: "flex items-center gap-2" }, io = { class: "grid size-9 place-items-center rounded-lg bg-cyan-main/15" }, ro = { class: "text-sm font-semibold text-gray-dark-30 dark:text-white" }, co = { class: "mt-3" }, uo = { class: "whitespace-pre-line text-2xl font-bold text-gray-dark-40 dark:text-white" }, mo = { class: "ml-1 text-xs text-gray-dark-25 dark:text-gray-main" }, fo = { class: "mt-3 grid grid-cols-2 gap-2" }, go = { class: "min-w-0 truncate text-xs text-gray-dark-25 dark:text-gray-main" }, vo = { class: "glass-inset mt-2 rounded-md px-3 py-2" }, po = { class: "flex items-center justify-between gap-2 text-xs" }, ho = { class: "whitespace-pre-line font-semibold" }, yo = { class: "mt-2 h-1.5 overflow-hidden rounded-full bg-gray-light-10/70 dark:bg-white/10" }, bo = /* @__PURE__ */ O({
2487
2494
  __name: "EnergyFlowCard",
2488
2495
  props: {
2489
2496
  title: { default: "Сетевой инвертор" },
@@ -2508,23 +2515,23 @@ v + ' кВт·ч<br>выработка за день'`),
2508
2515
  },
2509
2516
  emits: ["refresh", "settings"],
2510
2517
  setup(e, { emit: s }) {
2511
- const a = s, l = (J) => Math.min(4.2, Math.max(1.6, 4.2 - Math.abs(J) * 0.55)), t = (J) => J.replace(/<br\s*\/?>/gi, `
2512
- `), o = (J) => `${Math.abs(J).toFixed(1)} кВт`, i = (J) => {
2513
- var q;
2514
- return ((q = e.metrics) == null ? void 0 : q[J]) ?? [];
2515
- }, d = (J, q, E) => {
2518
+ const a = s, l = (q) => Math.min(4.2, Math.max(1.6, 4.2 - Math.abs(q) * 0.55)), t = (q) => q.replace(/<br\s*\/?>/gi, `
2519
+ `), o = (q) => `${Math.abs(q).toFixed(1)} кВт`, i = (q) => {
2520
+ var X;
2521
+ return ((X = e.metrics) == null ? void 0 : X[q]) ?? [];
2522
+ }, d = (q, X, E) => {
2516
2523
  var Re;
2517
- const U = ((Re = e.metrics) == null ? void 0 : Re[J]) ?? [], ve = U.find((Ue) => Ue.id === q) ?? U[E];
2524
+ const U = ((Re = e.metrics) == null ? void 0 : Re[q]) ?? [], ve = U.find((Ue) => Ue.id === X) ?? U[E];
2518
2525
  return ve == null ? void 0 : ve.raw;
2519
- }, u = (J, q) => {
2520
- const E = typeof J == "number" ? J : Number.parseFloat(String(J));
2521
- return Number.isFinite(E) ? E : q;
2522
- }, r = S(() => u(d("solar", "solar-power", 0), e.solarPower)), c = S(() => u(d("grid", "grid-power", 0), e.gridPower)), m = S(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = S(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = S(() => u(d("house", "house-load", 0), e.loadPower)), h = S(() => r.value > 0 && e.solarFlow !== "idle"), k = S(() => e.solarFlow === "reverse"), z = S(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), P = S(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), X = S(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), j = S(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Z = S(() => b.value > 0 && e.houseFlow !== "idle"), w = S(() => e.houseFlow !== "reverse"), A = S(() => o(b.value)), N = S(() => i("inverter")), ae = Ea(), xe = S(() => ae.value === "reduce"), re = S(() => [
2523
- { id: "solar", active: h.value, reverse: k.value, speed: l(r.value) },
2524
- { id: "battery", active: P.value, reverse: j.value, speed: l(m.value) },
2525
- { id: "grid", active: z.value, reverse: X.value, speed: l(c.value) },
2526
- { id: "home", active: Z.value, reverse: w.value, speed: l(b.value) }
2527
- ]), qe = S(() => re.value.filter((J) => J.active)), rt = S(() => [
2526
+ }, m = (q, X) => {
2527
+ const E = typeof q == "number" ? q : Number.parseFloat(String(q));
2528
+ return Number.isFinite(E) ? E : X;
2529
+ }, r = S(() => m(d("solar", "solar-power", 0), e.solarPower)), c = S(() => m(d("grid", "grid-power", 0), e.gridPower)), u = S(() => m(d("battery", "battery-power", 0), e.batteryPower)), p = S(() => m(d("battery", "battery-soc", 1), e.batterySoc)), k = S(() => m(d("house", "house-load", 0), e.loadPower)), h = S(() => r.value > 0 && e.solarFlow !== "idle"), x = S(() => e.solarFlow === "reverse"), z = S(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), j = S(() => u.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), H = S(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), D = S(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : u.value > 0), Z = S(() => k.value > 0 && e.houseFlow !== "idle"), w = S(() => e.houseFlow !== "reverse"), A = S(() => o(k.value)), P = S(() => i("inverter")), ae = Ea(), xe = S(() => ae.value === "reduce"), re = S(() => [
2530
+ { id: "solar", active: h.value, reverse: x.value, speed: l(r.value) },
2531
+ { id: "battery", active: j.value, reverse: D.value, speed: l(u.value) },
2532
+ { id: "grid", active: z.value, reverse: H.value, speed: l(c.value) },
2533
+ { id: "home", active: Z.value, reverse: w.value, speed: l(k.value) }
2534
+ ]), qe = S(() => re.value.filter((q) => q.active)), rt = S(() => [
2528
2535
  {
2529
2536
  key: "solar",
2530
2537
  wrapper: "col-start-1 row-start-1 self-start justify-self-start",
@@ -2567,52 +2574,52 @@ v + ' кВт·ч<br>выработка за день'`),
2567
2574
  }
2568
2575
  ]), Ve = F(null), Ie = F(null), Le = /* @__PURE__ */ new Map(), Q = F(null);
2569
2576
  let de = null;
2570
- const dt = (J, q) => {
2571
- q instanceof HTMLElement ? Le.set(J, q) : Le.delete(J);
2572
- }, Ae = (J, q) => {
2573
- const E = J.getBoundingClientRect();
2574
- return { x: E.left - q.left, y: E.top - q.top, width: E.width, height: E.height };
2577
+ const dt = (q, X) => {
2578
+ X instanceof HTMLElement ? Le.set(q, X) : Le.delete(q);
2579
+ }, Ae = (q, X) => {
2580
+ const E = q.getBoundingClientRect();
2581
+ return { x: E.left - X.left, y: E.top - X.top, width: E.width, height: E.height };
2575
2582
  }, Se = () => {
2576
- const J = Ve.value, q = Ie.value;
2577
- if (!J || !q) return;
2578
- const E = J.getBoundingClientRect();
2583
+ const q = Ve.value, X = Ie.value;
2584
+ if (!q || !X) return;
2585
+ const E = q.getBoundingClientRect();
2579
2586
  if (E.width < 2 || E.height < 2) return;
2580
- const U = Ae(q, E), ve = U.x + U.width / 2, Re = U.y + U.height / 2, Ue = re.value.map((me) => {
2587
+ const U = Ae(X, E), ve = U.x + U.width / 2, Re = U.y + U.height / 2, Ue = re.value.map((me) => {
2581
2588
  const _e = Le.get(me.id);
2582
2589
  if (!_e) return null;
2583
- const H = Ae(_e, E), Te = H.x + H.width / 2, we = H.y + H.height / 2, fe = ve - Te, ge = Re - we, se = Math.abs(fe) >= Math.abs(ge), te = se ? fe > 0 ? "right" : "left" : ge > 0 ? "bottom" : "top", Ye = te === "left" ? "right" : te === "right" ? "left" : te === "top" ? "bottom" : "top";
2584
- return { id: me.id, rect: H, nodeSide: te, portSide: Ye, pos: se ? we : Te };
2590
+ const G = Ae(_e, E), Te = G.x + G.width / 2, we = G.y + G.height / 2, fe = ve - Te, ge = Re - we, se = Math.abs(fe) >= Math.abs(ge), te = se ? fe > 0 ? "right" : "left" : ge > 0 ? "bottom" : "top", Ye = te === "left" ? "right" : te === "right" ? "left" : te === "top" ? "bottom" : "top";
2591
+ return { id: me.id, rect: G, nodeSide: te, portSide: Ye, pos: se ? we : Te };
2585
2592
  }).filter((me) => me !== null), Ke = { left: [], right: [], top: [], bottom: [] };
2586
2593
  for (const me of Ue) Ke[me.portSide].push(me);
2587
2594
  const Xe = {}, ct = ["left", "right", "top", "bottom"];
2588
2595
  for (const me of ct) {
2589
- const _e = Ke[me].sort((H, Te) => H.pos - Te.pos);
2590
- _e.forEach((H, Te) => {
2596
+ const _e = Ke[me].sort((G, Te) => G.pos - Te.pos);
2597
+ _e.forEach((G, Te) => {
2591
2598
  const we = _e.length === 1 ? 0.5 : (Te + 1) / (_e.length + 1);
2592
2599
  let fe = 0, ge = 0;
2593
2600
  me === "left" ? (fe = U.x, ge = U.y + U.height * we) : me === "right" ? (fe = U.x + U.width, ge = U.y + U.height * we) : me === "top" ? (fe = U.x + U.width * we, ge = U.y) : (fe = U.x + U.width * we, ge = U.y + U.height);
2594
2601
  let se = 0, te = 0;
2595
- H.nodeSide === "left" ? (se = H.rect.x, te = H.rect.y + H.rect.height / 2) : H.nodeSide === "right" ? (se = H.rect.x + H.rect.width, te = H.rect.y + H.rect.height / 2) : H.nodeSide === "top" ? (se = H.rect.x + H.rect.width / 2, te = H.rect.y) : (se = H.rect.x + H.rect.width / 2, te = H.rect.y + H.rect.height);
2596
- const ut = H.portSide === "left" || H.portSide === "right" ? `M${se.toFixed(1)} ${te.toFixed(1)} C${(se + (fe - se) * 0.55).toFixed(1)} ${te.toFixed(1)} ${(se + (fe - se) * 0.55).toFixed(1)} ${ge.toFixed(1)} ${fe.toFixed(1)} ${ge.toFixed(1)}` : `M${se.toFixed(1)} ${te.toFixed(1)} C${se.toFixed(1)} ${(te + (ge - te) * 0.55).toFixed(1)} ${fe.toFixed(1)} ${(te + (ge - te) * 0.55).toFixed(1)} ${fe.toFixed(1)} ${ge.toFixed(1)}`;
2597
- Xe[H.id] = ut;
2602
+ G.nodeSide === "left" ? (se = G.rect.x, te = G.rect.y + G.rect.height / 2) : G.nodeSide === "right" ? (se = G.rect.x + G.rect.width, te = G.rect.y + G.rect.height / 2) : G.nodeSide === "top" ? (se = G.rect.x + G.rect.width / 2, te = G.rect.y) : (se = G.rect.x + G.rect.width / 2, te = G.rect.y + G.rect.height);
2603
+ const ut = G.portSide === "left" || G.portSide === "right" ? `M${se.toFixed(1)} ${te.toFixed(1)} C${(se + (fe - se) * 0.55).toFixed(1)} ${te.toFixed(1)} ${(se + (fe - se) * 0.55).toFixed(1)} ${ge.toFixed(1)} ${fe.toFixed(1)} ${ge.toFixed(1)}` : `M${se.toFixed(1)} ${te.toFixed(1)} C${se.toFixed(1)} ${(te + (ge - te) * 0.55).toFixed(1)} ${fe.toFixed(1)} ${(te + (ge - te) * 0.55).toFixed(1)} ${fe.toFixed(1)} ${ge.toFixed(1)}`;
2604
+ Xe[G.id] = ut;
2598
2605
  });
2599
2606
  }
2600
2607
  Q.value = { width: E.width, height: E.height, paths: Xe };
2601
2608
  }, Me = () => {
2602
2609
  if (de) {
2603
2610
  de.disconnect(), Ve.value && de.observe(Ve.value), Ie.value && de.observe(Ie.value);
2604
- for (const J of Le.values()) de.observe(J);
2611
+ for (const q of Le.values()) de.observe(q);
2605
2612
  }
2606
2613
  };
2607
2614
  return be(async () => {
2608
2615
  de = new ResizeObserver(() => Se()), await $t(), Se(), Me();
2609
2616
  }), Ne(() => {
2610
2617
  de == null || de.disconnect(), de = null;
2611
- }), (J, q) => (f(), O(Ul, {
2618
+ }), (q, X) => (f(), M(Ul, {
2612
2619
  title: e.title,
2613
2620
  hover: ""
2614
2621
  }, {
2615
- header: x(() => [
2622
+ header: b(() => [
2616
2623
  n("div", Kl, [
2617
2624
  n("span", {
2618
2625
  class: B(["inline-flex items-center gap-2 rounded-full border px-2.5 py-1 text-xs font-medium", e.online ? "border-emerald-500/25 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "border-gray-light-10/60 bg-gray-dark-25/10 text-gray-dark-25 dark:border-white/10 dark:text-gray-main"])
@@ -2622,15 +2629,15 @@ v + ' кВт·ч<br>выработка за день'`),
2622
2629
  }, null, 2),
2623
2630
  L(" " + C(e.online ? "Онлайн" : "Не в сети"), 1)
2624
2631
  ], 2),
2625
- e.editable ? (f(), O(R, {
2632
+ e.editable ? (f(), M(R, {
2626
2633
  key: 0,
2627
2634
  type: "icon",
2628
2635
  size: "sm",
2629
2636
  "aria-label": "Настроить блок",
2630
2637
  title: "Настроить блок",
2631
- onClick: q[0] || (q[0] = (E) => a("settings"))
2638
+ onClick: X[0] || (X[0] = (E) => a("settings"))
2632
2639
  }, {
2633
- default: x(() => [
2640
+ default: b(() => [
2634
2641
  v(V, {
2635
2642
  name: "settings",
2636
2643
  size: 16
@@ -2643,9 +2650,9 @@ v + ' кВт·ч<br>выработка за день'`),
2643
2650
  size: "sm",
2644
2651
  "aria-label": "Обновить данные",
2645
2652
  title: "Обновить данные",
2646
- onClick: q[1] || (q[1] = (E) => a("refresh"))
2653
+ onClick: X[1] || (X[1] = (E) => a("refresh"))
2647
2654
  }, {
2648
- default: x(() => [
2655
+ default: b(() => [
2649
2656
  v(V, {
2650
2657
  name: "refresh",
2651
2658
  size: 16
@@ -2655,7 +2662,7 @@ v + ' кВт·ч<br>выработка за день'`),
2655
2662
  })
2656
2663
  ])
2657
2664
  ]),
2658
- default: x(() => [
2665
+ default: b(() => [
2659
2666
  n("div", {
2660
2667
  ref_key: "containerRef",
2661
2668
  ref: Ve,
@@ -2667,14 +2674,14 @@ v + ' кВт·ч<br>выработка за день'`),
2667
2674
  viewBox: `0 0 ${Q.value.width} ${Q.value.height}`,
2668
2675
  "aria-hidden": "true"
2669
2676
  }, [
2670
- (f(!0), g(D, null, K(re.value, (E) => (f(), g("path", {
2677
+ (f(!0), g(N, null, K(re.value, (E) => (f(), g("path", {
2671
2678
  id: `energy-path-${E.id}`,
2672
2679
  key: `rail-${E.id}`,
2673
2680
  class: "stroke-current text-gray-main dark:text-white/20 [stroke-width:1.5] [stroke-linecap:round] [stroke-dasharray:2_6] opacity-45",
2674
2681
  d: Q.value.paths[E.id],
2675
2682
  fill: "none"
2676
2683
  }, null, 8, Hl))), 128)),
2677
- (f(!0), g(D, null, K(qe.value, (E) => (f(), g("g", {
2684
+ (f(!0), g(N, null, K(qe.value, (E) => (f(), g("g", {
2678
2685
  key: `flow-${E.id}`
2679
2686
  }, [
2680
2687
  n("path", {
@@ -2693,7 +2700,7 @@ v + ' кВт·ч<br>выработка за день'`),
2693
2700
  style: De({ animationDuration: `${E.speed}s` }),
2694
2701
  fill: "none"
2695
2702
  }, null, 14, ql),
2696
- xe.value ? T("", !0) : (f(), g(D, { key: 0 }, K([0, 1, 2], (U, ve) => n("circle", {
2703
+ xe.value ? T("", !0) : (f(), g(N, { key: 0 }, K([0, 1, 2], (U, ve) => n("circle", {
2697
2704
  key: `dot-${E.id}-${U}`,
2698
2705
  r: "2.6",
2699
2706
  opacity: "0",
@@ -2723,7 +2730,7 @@ v + ' кВт·ч<br>выработка за день'`),
2723
2730
  ]))), 128))
2724
2731
  ], 8, Wl)) : T("", !0),
2725
2732
  n("div", Ql, [
2726
- (f(!0), g(D, null, K(rt.value, (E) => (f(), g("div", {
2733
+ (f(!0), g(N, null, K(rt.value, (E) => (f(), g("div", {
2727
2734
  key: E.key,
2728
2735
  ref_for: !0,
2729
2736
  ref: (U) => dt(E.key, U),
@@ -2745,13 +2752,13 @@ v + ' кВт·ч<br>выработка за день'`),
2745
2752
  n("span", to, C(E.label), 1)
2746
2753
  ]),
2747
2754
  E.metrics.length ? (f(), g("div", ao, [
2748
- (f(!0), g(D, null, K(E.metrics, (U) => (f(), g("div", {
2755
+ (f(!0), g(N, null, K(E.metrics, (U) => (f(), g("div", {
2749
2756
  key: U.id,
2750
2757
  class: "glass-inset rounded-lg px-3 py-2"
2751
2758
  }, [
2752
2759
  n("span", so, C(U.label), 1),
2753
2760
  n("span", {
2754
- class: B(["mt-0.5 block whitespace-pre", G(pt)(U.style)])
2761
+ class: B(["mt-0.5 block whitespace-pre", J(pt)(U.style)])
2755
2762
  }, C(U.value), 3)
2756
2763
  ]))), 128))
2757
2764
  ])) : T("", !0)
@@ -2763,7 +2770,7 @@ v + ' кВт·ч<br>выработка за день'`),
2763
2770
  ref: Ie,
2764
2771
  class: "relative w-full max-w-72 rounded-2xl border border-cyan-main/30 bg-cyan-main/10 p-4 text-cyan-main shadow-cyan-glow"
2765
2772
  }, [
2766
- q[3] || (q[3] = n("span", { class: "absolute -inset-2 rounded-3xl border border-cyan-main/15" }, null, -1)),
2773
+ X[3] || (X[3] = n("span", { class: "absolute -inset-2 rounded-3xl border border-cyan-main/15" }, null, -1)),
2767
2774
  n("div", lo, [
2768
2775
  n("div", oo, [
2769
2776
  n("span", io, [
@@ -2779,19 +2786,19 @@ v + ' кВт·ч<br>выработка за день'`),
2779
2786
  n("span", mo, C(e.loadLabel), 1)
2780
2787
  ]),
2781
2788
  n("dl", fo, [
2782
- (f(!0), g(D, null, K(N.value, (E) => (f(), g("div", {
2789
+ (f(!0), g(N, null, K(P.value, (E) => (f(), g("div", {
2783
2790
  key: E.id,
2784
2791
  class: "glass-inset rounded-md px-3 py-2"
2785
2792
  }, [
2786
2793
  n("dt", go, C(E.label), 1),
2787
2794
  n("dd", {
2788
- class: B(["mt-0.5 whitespace-pre", G(pt)(E.style)])
2795
+ class: B(["mt-0.5 whitespace-pre", J(pt)(E.style)])
2789
2796
  }, C(E.value), 3)
2790
2797
  ]))), 128))
2791
2798
  ]),
2792
2799
  n("div", vo, [
2793
2800
  n("div", po, [
2794
- q[2] || (q[2] = n("span", { class: "text-gray-dark-25 dark:text-gray-main" }, "Батарея", -1)),
2801
+ X[2] || (X[2] = n("span", { class: "text-gray-dark-25 dark:text-gray-main" }, "Батарея", -1)),
2795
2802
  n("span", ho, C(p.value) + " %", 1)
2796
2803
  ]),
2797
2804
  n("div", yo, [
@@ -2861,7 +2868,7 @@ v + ' кВт·ч<br>выработка за день'`),
2861
2868
  { key: "inverterTitle", plain: !0, block: "inverter", label: "Заголовок", type: "string", default: "Инвертор" },
2862
2869
  { key: "loadLabel", plain: !0, block: "inverter", label: "Подпись нагрузки", type: "string", default: "нагрузка" }
2863
2870
  ]
2864
- }, vd = /* @__PURE__ */ M({
2871
+ }, vd = /* @__PURE__ */ O({
2865
2872
  inheritAttrs: !1,
2866
2873
  __name: "EnergyFlowBlock",
2867
2874
  props: {
@@ -2873,8 +2880,8 @@ v + ' кВт·ч<br>выработка за день'`),
2873
2880
  emits: ["update:config"],
2874
2881
  setup(e, { emit: s }) {
2875
2882
  const a = s;
2876
- return (l, t) => (f(), O(Vl, Y({
2877
- definition: G($o),
2883
+ return (l, t) => (f(), M(Vl, Y({
2884
+ definition: J($o),
2878
2885
  config: e.config,
2879
2886
  context: e.context,
2880
2887
  editable: e.editable,
@@ -3040,10 +3047,10 @@ v + ' кВт·ч<br>выработка за день'`),
3040
3047
  title: e.name,
3041
3048
  bindings: { ...e.defaults ?? {} },
3042
3049
  units: {}
3043
- }), i = S(() => l.createContext(ga(s))), d = S(() => Et(e, o.value, i.value)), u = S(() => ({ ...o.value.units ?? {} })), r = async () => {
3050
+ }), i = S(() => l.createContext(ga(s))), d = S(() => Et(e, o.value, i.value)), m = S(() => ({ ...o.value.units ?? {} })), r = async () => {
3044
3051
  if (a.storage)
3045
3052
  try {
3046
- const p = (await a.storage.read()).find((b) => b.id === t);
3053
+ const p = (await a.storage.read()).find((k) => k.id === t);
3047
3054
  if (!p) return;
3048
3055
  o.value = {
3049
3056
  ...o.value,
@@ -3055,11 +3062,11 @@ v + ' кВт·ч<br>выработка за день'`),
3055
3062
  };
3056
3063
  } catch {
3057
3064
  }
3058
- }, c = async (m) => {
3059
- if (o.value = m, !!a.storage)
3065
+ }, c = async (u) => {
3066
+ if (o.value = u, !!a.storage)
3060
3067
  try {
3061
3068
  const p = await a.storage.read();
3062
- await a.storage.write([...p.filter((b) => b.id !== m.id), m]);
3069
+ await a.storage.write([...p.filter((k) => k.id !== u.id), u]);
3063
3070
  } catch {
3064
3071
  }
3065
3072
  };
@@ -3067,14 +3074,14 @@ v + ' кВт·ч<br>выработка за день'`),
3067
3074
  config: o,
3068
3075
  context: i,
3069
3076
  data: d,
3070
- units: u,
3077
+ units: m,
3071
3078
  load: r,
3072
3079
  update: c
3073
3080
  });
3074
3081
  }, Ho = { class: "flex-auto flex justify-between" }, Go = { class: "text-sm text-gray-dark-25 font-medium line-clamp-2 overflow-hidden dark:text-gray-light-10" }, Jo = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, qo = {
3075
3082
  key: 0,
3076
- class: "absolute left-1/2 top-1/2 size-1/2 text-gray-light-10/10 dark:text-white/2 -translate-1/2"
3077
- }, Xo = { class: "min-h-60 relative" }, Yo = { class: "pt-6" }, Zo = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, Qo = { class: "text-center text-xl mt-4" }, Pe = /* @__PURE__ */ M({
3083
+ class: "pointer-events-none absolute left-1/2 top-1/2 size-1/2 text-gray-light-10/10 dark:text-white/2 -translate-1/2"
3084
+ }, Xo = { class: "min-h-60 relative" }, Yo = { class: "pt-6" }, Zo = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, Qo = { class: "text-center text-xl mt-4" }, Pe = /* @__PURE__ */ O({
3078
3085
  __name: "CardBase",
3079
3086
  props: {
3080
3087
  size: {},
@@ -3094,53 +3101,55 @@ v + ' кВт·ч<br>выработка за день'`),
3094
3101
  },
3095
3102
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3096
3103
  setup(e, { emit: s }) {
3097
- const a = e, l = s, t = F(!1), o = S(() => ["button", "dimmer"].includes(a.type || "") && a.value ? "text-amber-500" : "text-gray-main dark:text-gray-light-10"), i = (m) => l("edit", m), d = (m) => l("clone", m), u = () => t.value = !0, r = (m) => l("open", m), c = (m) => {
3098
- t.value = !1, l("close", m);
3104
+ const a = e, l = s, t = F(!1), o = S(() => ["button", "dimmer"].includes(a.type || "") && a.value ? "text-amber-500" : "text-gray-main dark:text-gray-light-10"), i = (u) => l("edit", u), d = (u) => l("clone", u), m = () => t.value = !0, r = (u) => l("open", u), c = (u) => {
3105
+ t.value = !1, l("close", u);
3099
3106
  };
3100
- return (m, p) => (f(), g("div", {
3107
+ return (u, p) => (f(), g("div", {
3101
3108
  class: "glass-inset relative flex aspect-square rounded-xl cursor-pointer flex-col p-2 transition-all hover:border-cyan-main/25 hover:shadow-cyan-glow",
3102
- onClick: u
3109
+ onClick: m
3103
3110
  }, [
3104
3111
  n("div", Ho, [
3105
3112
  n("div", {
3106
3113
  class: B([o.value, "size-8 animate-shake"])
3107
3114
  }, [
3108
- I(m.$slots, "icon", le(oe(a)))
3115
+ I(u.$slots, "icon", le(oe(a)))
3109
3116
  ], 2),
3110
- I(m.$slots, "header", le(oe(a)))
3117
+ I(u.$slots, "header", le(oe(a)))
3111
3118
  ]),
3112
3119
  n("div", null, [
3113
- I(m.$slots, "body", le(oe(a)), () => [
3120
+ I(u.$slots, "body", le(oe(a)), () => [
3114
3121
  n("h6", Go, [
3115
- I(m.$slots, "name", le(oe(a)), () => [
3122
+ I(u.$slots, "name", le(oe(a)), () => [
3116
3123
  L(C(a.name), 1)
3117
3124
  ])
3118
3125
  ]),
3119
3126
  n("div", Jo, [
3120
- I(m.$slots, "value", le(oe(a)), () => [
3127
+ I(u.$slots, "value", le(oe(a)), () => [
3121
3128
  L(C(a.valueTo || a.value), 1)
3122
3129
  ])
3123
3130
  ])
3124
3131
  ])
3125
3132
  ]),
3126
3133
  a.icon ? (f(), g("div", qo, [
3127
- I(m.$slots, "icon", le(oe(a)))
3134
+ I(u.$slots, "icon", le(oe(a)))
3128
3135
  ])) : T("", !0),
3129
- t.value ? (f(), O(ze, {
3136
+ t.value ? (f(), M(ze, {
3130
3137
  key: 1,
3131
3138
  size: a.size || "sm",
3132
3139
  title: e.name,
3133
3140
  onClose: c,
3134
3141
  onOpen: r
3135
3142
  }, {
3136
- "header-btn": x(() => [
3143
+ "header-btn": b(() => [
3137
3144
  v(R, {
3138
3145
  class: "size-8",
3139
3146
  variant: "ghost",
3140
3147
  size: "none",
3148
+ title: "Edit",
3149
+ "aria-label": "Edit",
3141
3150
  onClick: i
3142
3151
  }, {
3143
- default: x(() => [
3152
+ default: b(() => [
3144
3153
  v(V, {
3145
3154
  name: "more",
3146
3155
  class: "size-4"
@@ -3152,9 +3161,11 @@ v + ' кВт·ч<br>выработка за день'`),
3152
3161
  class: "size-8",
3153
3162
  variant: "ghost",
3154
3163
  size: "none",
3164
+ title: "Copy",
3165
+ "aria-label": "Copy",
3155
3166
  onClick: d
3156
3167
  }, {
3157
- default: x(() => [
3168
+ default: b(() => [
3158
3169
  v(V, {
3159
3170
  name: "copy",
3160
3171
  class: "size-4"
@@ -3163,17 +3174,17 @@ v + ' кВт·ч<br>выработка за день'`),
3163
3174
  _: 1
3164
3175
  })
3165
3176
  ]),
3166
- default: x(() => [
3177
+ default: b(() => [
3167
3178
  n("div", Xo, [
3168
3179
  n("div", Yo, [
3169
3180
  n("h3", Zo, [
3170
- I(m.$slots, "dialog-name", le(oe(a)), () => [
3181
+ I(u.$slots, "dialog-name", le(oe(a)), () => [
3171
3182
  L(C(a.name), 1)
3172
3183
  ])
3173
3184
  ]),
3174
- I(m.$slots, "dialog", le(oe(a))),
3185
+ I(u.$slots, "dialog", le(oe(a))),
3175
3186
  n("p", Qo, [
3176
- I(m.$slots, "dialog-value", le(oe(a)), () => [
3187
+ I(u.$slots, "dialog-value", le(oe(a)), () => [
3177
3188
  L(C(a.valueTo || a.value), 1)
3178
3189
  ])
3179
3190
  ])
@@ -3184,7 +3195,7 @@ v + ' кВт·ч<br>выработка за день'`),
3184
3195
  }, 8, ["size", "title"])) : T("", !0)
3185
3196
  ]));
3186
3197
  }
3187
- }), ei = { class: "flex justify-end" }, ti = { class: "flex justify-center py-4" }, yd = /* @__PURE__ */ M({
3198
+ }), ei = { class: "flex justify-end" }, ti = { class: "flex justify-center py-4" }, yd = /* @__PURE__ */ O({
3188
3199
  __name: "CardButton",
3189
3200
  props: {
3190
3201
  size: {},
@@ -3208,22 +3219,22 @@ v + ' кВт·ч<br>выработка за день'`),
3208
3219
  const { disabled: d } = i;
3209
3220
  return { disabled: !!d };
3210
3221
  }, o = () => l("setState", !a.value);
3211
- return (i, d) => (f(), O(Pe, Y(a, {
3212
- onClick: d[0] || (d[0] = (u) => l("click", u)),
3213
- onEdit: d[1] || (d[1] = (u) => l("edit", u)),
3214
- onClone: d[2] || (d[2] = (u) => l("clone", u))
3222
+ return (i, d) => (f(), M(Pe, Y(a, {
3223
+ onClick: d[0] || (d[0] = (m) => l("click", m)),
3224
+ onEdit: d[1] || (d[1] = (m) => l("edit", m)),
3225
+ onClone: d[2] || (d[2] = (m) => l("clone", m))
3215
3226
  }), {
3216
- icon: x((u) => [
3217
- I(i.$slots, "icon", le(oe(u)))
3227
+ icon: b((m) => [
3228
+ I(i.$slots, "icon", le(oe(m)))
3218
3229
  ]),
3219
- header: x((u) => [
3230
+ header: b((m) => [
3220
3231
  n("div", ei, [
3221
- v(R, Y(t(u), {
3232
+ v(R, Y(t(m), {
3222
3233
  type: "icon",
3223
3234
  class: a.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10",
3224
3235
  onClick: ee(o, ["stop"])
3225
3236
  }), {
3226
- default: x(() => [
3237
+ default: b(() => [
3227
3238
  v(V, {
3228
3239
  name: "shut",
3229
3240
  class: "size-8"
@@ -3233,14 +3244,14 @@ v + ' кВт·ч<br>выработка за день'`),
3233
3244
  }, 16, ["class"])
3234
3245
  ])
3235
3246
  ]),
3236
- dialog: x((u) => [
3247
+ dialog: b((m) => [
3237
3248
  n("div", ti, [
3238
- v(R, Y(t(u), {
3249
+ v(R, Y(t(m), {
3239
3250
  type: "icon",
3240
3251
  class: ["size-18", a.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10"],
3241
3252
  onClick: ee(o, ["stop"])
3242
3253
  }), {
3243
- default: x(() => [
3254
+ default: b(() => [
3244
3255
  v(V, {
3245
3256
  name: "shut",
3246
3257
  class: "size-16"
@@ -3253,7 +3264,7 @@ v + ' кВт·ч<br>выработка за день'`),
3253
3264
  _: 3
3254
3265
  }, 16));
3255
3266
  }
3256
- }), ai = { class: "flex justify-center relative mx-2 my-6" }, bd = /* @__PURE__ */ M({
3267
+ }), ai = { class: "flex justify-center relative mx-2 my-6" }, bd = /* @__PURE__ */ O({
3257
3268
  __name: "CardDate",
3258
3269
  props: {
3259
3270
  size: {},
@@ -3274,33 +3285,33 @@ v + ' кВт·ч<br>выработка за день'`),
3274
3285
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3275
3286
  setup(e, { emit: s }) {
3276
3287
  const a = e, l = s, t = Wt("time"), o = (r) => new Date(+r * 1e3).toISOString().slice(0, 16), i = (r) => {
3277
- var m;
3278
- const c = (m = r == null ? void 0 : r.target) == null ? void 0 : m.valueAsNumber;
3288
+ var u;
3289
+ const c = (u = r == null ? void 0 : r.target) == null ? void 0 : u.valueAsNumber;
3279
3290
  c && l("setState", c / 1e3);
3280
- }, d = ({ name: r, value: c, opts: m = {} }) => {
3281
- const { disabled: p } = m;
3291
+ }, d = ({ name: r, value: c, opts: u = {} }) => {
3292
+ const { disabled: p } = u;
3282
3293
  return { label: r, modelValue: o(c), disabled: p };
3283
- }, u = () => {
3284
- var c, m;
3285
- const r = (m = (c = t.value) == null ? void 0 : c.$el) == null ? void 0 : m.querySelector("input");
3294
+ }, m = () => {
3295
+ var c, u;
3296
+ const r = (u = (c = t.value) == null ? void 0 : c.$el) == null ? void 0 : u.querySelector("input");
3286
3297
  r != null && r.showPicker && r.showPicker();
3287
3298
  };
3288
- return (r, c) => (f(), O(Pe, Y(a, {
3289
- onClick: c[0] || (c[0] = (m) => l("click", m)),
3290
- onEdit: c[1] || (c[1] = (m) => l("edit", m)),
3291
- onClone: c[2] || (c[2] = (m) => l("clone", m))
3299
+ return (r, c) => (f(), M(Pe, Y(a, {
3300
+ onClick: c[0] || (c[0] = (u) => l("click", u)),
3301
+ onEdit: c[1] || (c[1] = (u) => l("edit", u)),
3302
+ onClone: c[2] || (c[2] = (u) => l("clone", u))
3292
3303
  }), {
3293
- icon: x((m) => [
3294
- I(r.$slots, "icon", le(oe(m)))
3304
+ icon: b((u) => [
3305
+ I(r.$slots, "icon", le(oe(u)))
3295
3306
  ]),
3296
- header: x((m) => [
3307
+ header: b((u) => [
3297
3308
  n("div", null, [
3298
3309
  v(R, {
3299
3310
  type: "icon",
3300
3311
  class: "text-gray-dark-25 dark:text-gray-light-10",
3301
- onClick: ee(u, ["stop"])
3312
+ onClick: ee(m, ["stop"])
3302
3313
  }, {
3303
- default: x(() => [
3314
+ default: b(() => [
3304
3315
  v(V, {
3305
3316
  name: "clock",
3306
3317
  class: "size-7"
@@ -3311,7 +3322,7 @@ v + ' кВт·ч<br>выработка за день'`),
3311
3322
  v(ie, Y({
3312
3323
  ref_key: "time",
3313
3324
  ref: t
3314
- }, d(m), {
3325
+ }, d(u), {
3315
3326
  type: "datetime-local",
3316
3327
  class: "size-0",
3317
3328
  hidden: "",
@@ -3319,9 +3330,9 @@ v + ' кВт·ч<br>выработка за день'`),
3319
3330
  }), null, 16)
3320
3331
  ])
3321
3332
  ]),
3322
- dialog: x((m) => [
3333
+ dialog: b((u) => [
3323
3334
  n("div", ai, [
3324
- v(ie, Y(d(m), {
3335
+ v(ie, Y(d(u), {
3325
3336
  type: "datetime-local",
3326
3337
  onChange: i
3327
3338
  }), null, 16)
@@ -3338,7 +3349,7 @@ v + ' кВт·ч<br>выработка за день'`),
3338
3349
  viewBox: "-7.5 -7.5 75 75",
3339
3350
  version: "1.1",
3340
3351
  style: { transform: "rotate(-90deg)" }
3341
- }, ii = ["stroke-dashoffset"], ri = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, xd = /* @__PURE__ */ M({
3352
+ }, ii = ["stroke-dashoffset"], ri = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, xd = /* @__PURE__ */ O({
3342
3353
  __name: "CardDimmer",
3343
3354
  props: {
3344
3355
  size: {},
@@ -3358,31 +3369,31 @@ v + ' кВт·ч<br>выработка за день'`),
3358
3369
  },
3359
3370
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3360
3371
  setup(e, { emit: s }) {
3361
- const a = e, l = s, t = F(0), o = ({ opts: c, value: m }) => Math.round(100 * +m / ((c == null ? void 0 : c.max) || 255)), i = ({ opts: c, value: m }) => Math.round(187 - +m / ((c == null ? void 0 : c.max) || 255) * 187), d = ({ value: c, opts: m }) => {
3362
- const { min: p = 0, max: b = 255, step: h = 1, disabled: k } = m || {};
3363
- return { min: p, max: b, step: h, value: c, disabled: !!k, class: k ? "" : "cursor-pointer" };
3364
- }, u = (c) => l("setState", +c.target.value || 0), r = ({ value: c }) => {
3372
+ const a = e, l = s, t = F(0), o = ({ opts: c, value: u }) => Math.round(100 * +u / ((c == null ? void 0 : c.max) || 255)), i = ({ opts: c, value: u }) => Math.round(187 - +u / ((c == null ? void 0 : c.max) || 255) * 187), d = ({ value: c, opts: u }) => {
3373
+ const { min: p = 0, max: k = 255, step: h = 1, disabled: x } = u || {};
3374
+ return { min: p, max: k, step: h, value: c, disabled: !!x, class: x ? "" : "cursor-pointer" };
3375
+ }, m = (c) => l("setState", +c.target.value || 0), r = ({ value: c }) => {
3365
3376
  +c != 0 ? (t.value = +c, l("setState", 0)) : l("setState", c ? 0 : t.value || 255);
3366
3377
  };
3367
- return (c, m) => (f(), O(Pe, Y(a, {
3368
- onClick: m[0] || (m[0] = (p) => l("click", p)),
3369
- onEdit: m[1] || (m[1] = (p) => l("edit", p)),
3370
- onClone: m[2] || (m[2] = (p) => l("clone", p))
3378
+ return (c, u) => (f(), M(Pe, Y(a, {
3379
+ onClick: u[0] || (u[0] = (p) => l("click", p)),
3380
+ onEdit: u[1] || (u[1] = (p) => l("edit", p)),
3381
+ onClone: u[2] || (u[2] = (p) => l("clone", p))
3371
3382
  }), {
3372
- icon: x((p) => [
3383
+ icon: b((p) => [
3373
3384
  I(c.$slots, "icon", le(oe(p)))
3374
3385
  ]),
3375
- header: x((p) => [
3386
+ header: b((p) => [
3376
3387
  n("div", si, [
3377
3388
  n("div", ni, [
3378
3389
  v(R, Y(d(p), {
3379
3390
  type: "icon",
3380
- onClick: ee((b) => r(p), ["stop"])
3391
+ onClick: ee((k) => r(p), ["stop"])
3381
3392
  }), {
3382
- default: x(() => [
3393
+ default: b(() => [
3383
3394
  n("div", li, [
3384
3395
  (f(), g("svg", oi, [
3385
- m[3] || (m[3] = n("circle", {
3396
+ u[3] || (u[3] = n("circle", {
3386
3397
  class: "stroke-gray-light-10 dark:stroke-gray-dark-30",
3387
3398
  r: "30",
3388
3399
  cx: "30",
@@ -3409,11 +3420,11 @@ v + ' кВт·ч<br>выработка за день'`),
3409
3420
  ])
3410
3421
  ])
3411
3422
  ]),
3412
- dialog: x((p) => [
3423
+ dialog: b((p) => [
3413
3424
  n("div", {
3414
3425
  class: B(["flex justify-center relative mx-2 my-6", d(p).disabled ? "opacity-40" : ""])
3415
3426
  }, [
3416
- m[4] || (m[4] = n("div", { class: "absolute h-10 w-full top-0 left-0 bg-gray-main dark:bg-gray-dark-30 z-0 rounded-md" }, null, -1)),
3427
+ u[4] || (u[4] = n("div", { class: "absolute h-10 w-full top-0 left-0 bg-gray-main dark:bg-gray-dark-30 z-0 rounded-md" }, null, -1)),
3417
3428
  n("div", {
3418
3429
  class: "absolute h-10 top-0 left-0 bg-blue-600 dark:bg-blue-400 z-0 rounded-md transition-[width_0.3s_linear]",
3419
3430
  style: De(`width: ${o(p)}%`)
@@ -3421,14 +3432,14 @@ v + ' кВт·ч<br>выработка за день'`),
3421
3432
  n("div", ri, C(o(p)) + " %", 1),
3422
3433
  n("input", Y({ type: "range" }, d(p), {
3423
3434
  class: "w-full h-10 z-10 appearance-none opacity-0",
3424
- onChange: u
3435
+ onChange: m
3425
3436
  }), null, 16)
3426
3437
  ], 2)
3427
3438
  ]),
3428
3439
  _: 3
3429
3440
  }, 16));
3430
3441
  }
3431
- }), kd = /* @__PURE__ */ M({
3442
+ }), kd = /* @__PURE__ */ O({
3432
3443
  __name: "CardInfo",
3433
3444
  props: {
3434
3445
  size: {},
@@ -3449,21 +3460,21 @@ v + ' кВт·ч<br>выработка за день'`),
3449
3460
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3450
3461
  setup(e, { emit: s }) {
3451
3462
  const a = e, l = s;
3452
- return (t, o) => (f(), O(Pe, Y(a, {
3463
+ return (t, o) => (f(), M(Pe, Y(a, {
3453
3464
  onClick: o[0] || (o[0] = (i) => l("click", i)),
3454
3465
  onEdit: o[1] || (o[1] = (i) => l("edit", i)),
3455
3466
  onClone: o[2] || (o[2] = (i) => l("clone", i))
3456
3467
  }), {
3457
- icon: x((i) => [
3468
+ icon: b((i) => [
3458
3469
  I(t.$slots, "icon", le(oe(i)))
3459
3470
  ]),
3460
- default: x(() => [
3471
+ default: b(() => [
3461
3472
  I(t.$slots, "dialog")
3462
3473
  ]),
3463
3474
  _: 3
3464
3475
  }, 16));
3465
3476
  }
3466
- }), di = { class: "flex justify-center relative mx-2 my-6" }, $d = /* @__PURE__ */ M({
3477
+ }), di = { class: "flex justify-center relative mx-2 my-6" }, $d = /* @__PURE__ */ O({
3467
3478
  __name: "CardInput",
3468
3479
  props: {
3469
3480
  size: {},
@@ -3483,8 +3494,8 @@ v + ' кВт·ч<br>выработка за день'`),
3483
3494
  },
3484
3495
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3485
3496
  setup(e, { emit: s }) {
3486
- const a = e, l = s, t = F(a.value || ""), o = ({ name: d, opts: u = {} }) => {
3487
- const { disabled: r } = u;
3497
+ const a = e, l = s, t = F(a.value || ""), o = ({ name: d, opts: m = {} }) => {
3498
+ const { disabled: r } = m;
3488
3499
  return { label: d, disabled: r };
3489
3500
  }, i = (d) => l("setState", d.target.value);
3490
3501
  return ye(
@@ -3492,24 +3503,24 @@ v + ' кВт·ч<br>выработка за день'`),
3492
3503
  (d) => {
3493
3504
  t.value = d;
3494
3505
  }
3495
- ), (d, u) => (f(), O(Pe, Y(a, {
3496
- onClick: u[1] || (u[1] = (r) => l("click", r)),
3497
- onEdit: u[2] || (u[2] = (r) => l("edit", r)),
3498
- onClone: u[3] || (u[3] = (r) => l("clone", r))
3506
+ ), (d, m) => (f(), M(Pe, Y(a, {
3507
+ onClick: m[1] || (m[1] = (r) => l("click", r)),
3508
+ onEdit: m[2] || (m[2] = (r) => l("edit", r)),
3509
+ onClone: m[3] || (m[3] = (r) => l("clone", r))
3499
3510
  }), {
3500
- icon: x((r) => [
3511
+ icon: b((r) => [
3501
3512
  I(d.$slots, "icon", le(oe(r)))
3502
3513
  ]),
3503
- dialog: x((r) => [
3514
+ dialog: b((r) => [
3504
3515
  n("div", di, [
3505
3516
  v(ie, Y({
3506
3517
  modelValue: t.value,
3507
- "onUpdate:modelValue": u[0] || (u[0] = (c) => t.value = c)
3518
+ "onUpdate:modelValue": m[0] || (m[0] = (c) => t.value = c)
3508
3519
  }, o(r), {
3509
3520
  onEnter: i,
3510
3521
  onBlur: i
3511
3522
  }), {
3512
- icon: x(() => [
3523
+ icon: b(() => [
3513
3524
  v(V, {
3514
3525
  name: "chevron-down",
3515
3526
  class: "size-8 -rotate-90"
@@ -3522,7 +3533,7 @@ v + ' кВт·ч<br>выработка за день'`),
3522
3533
  _: 3
3523
3534
  }, 16));
3524
3535
  }
3525
- }), ci = { class: "flex justify-center py-4" }, wd = /* @__PURE__ */ M({
3536
+ }), ci = { class: "flex justify-center py-4" }, wd = /* @__PURE__ */ O({
3526
3537
  __name: "CardList",
3527
3538
  props: {
3528
3539
  size: {},
@@ -3542,31 +3553,31 @@ v + ' кВт·ч<br>выработка за день'`),
3542
3553
  },
3543
3554
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3544
3555
  setup(e, { emit: s }) {
3545
- const a = e, l = s, t = ({ value: d }) => l("setState", d), o = ({ opts: d, value: u }) => {
3556
+ const a = e, l = s, t = ({ value: d }) => l("setState", d), o = ({ opts: d, value: m }) => {
3546
3557
  var r;
3547
- return Array.isArray(d == null ? void 0 : d.items) && ((r = d == null ? void 0 : d.items.find((c) => c.value == u)) == null ? void 0 : r.name) || u;
3548
- }, i = ({ name: d, value: u, opts: r = {} }) => {
3549
- var b;
3550
- const { items: c = [], disabled: m } = r, p = ((b = c.find((h) => h.value == u)) == null ? void 0 : b.name) || u;
3551
- return { label: d, modelValue: p, items: c, disabled: !!m };
3558
+ return Array.isArray(d == null ? void 0 : d.items) && ((r = d == null ? void 0 : d.items.find((c) => c.value == m)) == null ? void 0 : r.name) || m;
3559
+ }, i = ({ name: d, value: m, opts: r = {} }) => {
3560
+ var k;
3561
+ const { items: c = [], disabled: u } = r, p = ((k = c.find((h) => h.value == m)) == null ? void 0 : k.name) || m;
3562
+ return { label: d, modelValue: p, items: c, disabled: !!u };
3552
3563
  };
3553
- return (d, u) => (f(), O(Pe, Y(a, {
3554
- onClick: u[1] || (u[1] = (r) => l("click", r)),
3555
- onEdit: u[2] || (u[2] = (r) => l("edit", r)),
3556
- onClone: u[3] || (u[3] = (r) => l("clone", r))
3564
+ return (d, m) => (f(), M(Pe, Y(a, {
3565
+ onClick: m[1] || (m[1] = (r) => l("click", r)),
3566
+ onEdit: m[2] || (m[2] = (r) => l("edit", r)),
3567
+ onClone: m[3] || (m[3] = (r) => l("clone", r))
3557
3568
  }), {
3558
- icon: x((r) => [
3569
+ icon: b((r) => [
3559
3570
  I(d.$slots, "icon", le(oe(r)))
3560
3571
  ]),
3561
- value: x((r) => [
3572
+ value: b((r) => [
3562
3573
  L(C(o(r)), 1)
3563
3574
  ]),
3564
- "dialog-value": x((r) => [
3575
+ "dialog-value": b((r) => [
3565
3576
  L(C(o(r)), 1)
3566
3577
  ]),
3567
- header: x((r) => [
3578
+ header: b((r) => [
3568
3579
  n("div", {
3569
- onClick: u[0] || (u[0] = ee(() => {
3580
+ onClick: m[0] || (m[0] = ee(() => {
3570
3581
  }, ["prevent", "stop"]))
3571
3582
  }, [
3572
3583
  v(he, Y(i(r), {
@@ -3575,13 +3586,13 @@ v + ' кВт·ч<br>выработка за день'`),
3575
3586
  left: "-115px",
3576
3587
  onChange: t
3577
3588
  }), {
3578
- activator: x(({ on: c }) => [
3589
+ activator: b(({ on: c }) => [
3579
3590
  v(R, {
3580
3591
  type: "icon",
3581
3592
  class: "text-gray-dark-25 dark:text-gray-light-10",
3582
3593
  onClick: ee(c.click, ["stop"])
3583
3594
  }, {
3584
- default: x(() => [
3595
+ default: b(() => [
3585
3596
  v(V, {
3586
3597
  name: "list-check",
3587
3598
  class: "size-5"
@@ -3594,7 +3605,7 @@ v + ' кВт·ч<br>выработка за день'`),
3594
3605
  }, 16)
3595
3606
  ])
3596
3607
  ]),
3597
- dialog: x((r) => [
3608
+ dialog: b((r) => [
3598
3609
  n("div", ci, [
3599
3610
  v(he, Y(i(r), {
3600
3611
  top: "-50%",
@@ -3606,7 +3617,7 @@ v + ' кВт·ч<br>выработка за день'`),
3606
3617
  _: 3
3607
3618
  }, 16));
3608
3619
  }
3609
- }), ui = { class: "glass-inset rounded-md p-1" }, mi = { class: "flex gap-1" }, fi = ["onClick"], gi = { class: "relative my-4" }, vi = { key: 0 }, pi = /* @__PURE__ */ M({
3620
+ }), ui = { class: "glass-inset rounded-md p-1" }, mi = { class: "flex gap-1" }, fi = ["onClick"], gi = { class: "relative my-4" }, vi = { key: 0 }, pi = /* @__PURE__ */ O({
3610
3621
  __name: "VTabs",
3611
3622
  props: {
3612
3623
  value: {},
@@ -3623,17 +3634,17 @@ v + ' кВт·ч<br>выработка за день'`),
3623
3634
  return s({
3624
3635
  setActiveTab: i,
3625
3636
  activeTab: t
3626
- }), (d, u) => (f(), g("div", null, [
3637
+ }), (d, m) => (f(), g("div", null, [
3627
3638
  n("div", ui, [
3628
3639
  n("div", mi, [
3629
- (f(!0), g(D, null, K(e.items, (r, c) => (f(), g("div", {
3640
+ (f(!0), g(N, null, K(e.items, (r, c) => (f(), g("div", {
3630
3641
  key: c,
3631
3642
  class: "relative flex-auto"
3632
3643
  }, [
3633
3644
  n("button", {
3634
3645
  type: "button",
3635
3646
  class: "w-full",
3636
- onClick: (m) => i(c)
3647
+ onClick: (u) => i(c)
3637
3648
  }, [
3638
3649
  n("div", {
3639
3650
  class: B([[o(c), e.size === "sm" ? "px-2 py-1 text-xs" : "px-3 py-2 text-sm"], "rounded-md font-medium transition"])
@@ -3652,7 +3663,7 @@ v + ' кВт·ч<br>выработка за день'`),
3652
3663
  ])
3653
3664
  ]),
3654
3665
  n("div", gi, [
3655
- (f(!0), g(D, null, K(e.items, (r, c) => (f(), g("div", {
3666
+ (f(!0), g(N, null, K(e.items, (r, c) => (f(), g("div", {
3656
3667
  key: c,
3657
3668
  class: "tab-panel"
3658
3669
  }, [
@@ -3664,7 +3675,7 @@ v + ' кВт·ч<br>выработка за день'`),
3664
3675
  "leave-from-class": "transform opacity-100 translate-x-0",
3665
3676
  "leave-to-class": "transform opacity-0 -translate-x-2"
3666
3677
  }, {
3667
- default: x(() => [
3678
+ default: b(() => [
3668
3679
  t.value === c ? (f(), g("div", vi, [
3669
3680
  I(d.$slots, `tab-${c}`)
3670
3681
  ])) : T("", !0)
@@ -3675,7 +3686,7 @@ v + ' кВт·ч<br>выработка за день'`),
3675
3686
  ])
3676
3687
  ]));
3677
3688
  }
3678
- }), hi = ["checked", "disabled"], yi = { class: "text-sm ms-2 peer-disabled:opacity-40" }, bi = /* @__PURE__ */ M({
3689
+ }), hi = ["checked", "disabled"], yi = { class: "text-sm ms-2 peer-disabled:opacity-40" }, bi = /* @__PURE__ */ O({
3679
3690
  __name: "VCheckbox",
3680
3691
  props: {
3681
3692
  modelValue: { type: [Number, Boolean], default: !1 },
@@ -3721,7 +3732,7 @@ v + ' кВт·ч<br>выработка за день'`),
3721
3732
  }), xi = { class: "flex flex-col" }, ki = { class: "flex gap-4 mb-6" }, $i = {
3722
3733
  key: 0,
3723
3734
  class: "flex gap-4"
3724
- }, wi = { key: 1 }, Ci = { class: "flex flex-col md:flex-row gap-4" }, Si = { class: "flex gap-4" }, _i = { class: "flex justify-between flex-auto" }, Ti = ["onClick"], zi = /* @__PURE__ */ M({
3735
+ }, wi = { key: 1 }, Ci = { class: "flex flex-col md:flex-row gap-4" }, Si = { class: "flex gap-4" }, _i = { class: "flex justify-between flex-auto" }, Ti = ["onClick"], zi = /* @__PURE__ */ O({
3725
3736
  __name: "ItemOptions",
3726
3737
  props: {
3727
3738
  min: { default: 0 },
@@ -3734,27 +3745,27 @@ v + ' кВт·ч<br>выработка за день'`),
3734
3745
  },
3735
3746
  emits: ["update"],
3736
3747
  setup(e, { emit: s }) {
3737
- const a = s, l = S(() => e.items.map((h, k) => ({ ...h, id: ++k }))), t = F({ name: "", value: "" }), o = S(() => e.items.length + 1), i = S(() => {
3748
+ const a = s, l = S(() => e.items.map((h, x) => ({ ...h, id: ++x }))), t = F({ name: "", value: "" }), o = S(() => e.items.length + 1), i = S(() => {
3738
3749
  var h;
3739
3750
  return !((h = t.value) != null && h.id);
3740
- }), d = (h) => e.type === h, u = (h, k) => a("update", h, k), r = (h) => h.map(({ name: k, value: z }) => ({ name: k, value: z })), c = ({ id: h, name: k, value: z }) => t.value = { id: h, name: k, value: z }, m = () => {
3751
+ }), d = (h) => e.type === h, m = (h, x) => a("update", h, x), r = (h) => h.map(({ name: x, value: z }) => ({ name: x, value: z })), c = ({ id: h, name: x, value: z }) => t.value = { id: h, name: x, value: z }, u = () => {
3741
3752
  const h = o.value;
3742
- t.value = { name: `New_${h}`, value: `${h}`, id: h }, u("items", r([...l.value, t.value]));
3753
+ t.value = { name: `New_${h}`, value: `${h}`, id: h }, m("items", r([...l.value, t.value]));
3743
3754
  }, p = (h) => {
3744
- t.value.name === h.name && (t.value = { name: "", value: "" }), u("items", r(l.value.filter((k) => k.value !== h.value)));
3745
- }, b = St(() => {
3755
+ t.value.name === h.name && (t.value = { name: "", value: "" }), m("items", r(l.value.filter((x) => x.value !== h.value)));
3756
+ }, k = St(() => {
3746
3757
  const h = t.value;
3747
3758
  if (!h.name || !h.value) return;
3748
- const k = l.value.map((z) => z.id === h.id ? h : z);
3749
- u("items", r(k));
3759
+ const x = l.value.map((z) => z.id === h.id ? h : z);
3760
+ m("items", r(x));
3750
3761
  }, 300);
3751
- return (h, k) => (f(), g("div", xi, [
3762
+ return (h, x) => (f(), g("div", xi, [
3752
3763
  n("div", ki, [
3753
3764
  v(bi, {
3754
3765
  modelValue: e.disabled,
3755
- "onUpdate:modelValue": k[0] || (k[0] = (z) => u("disabled", z ? 1 : 0))
3766
+ "onUpdate:modelValue": x[0] || (x[0] = (z) => m("disabled", z ? 1 : 0))
3756
3767
  }, {
3757
- default: x(() => [...k[6] || (k[6] = [
3768
+ default: b(() => [...x[6] || (x[6] = [
3758
3769
  L("Disabled", -1)
3759
3770
  ])]),
3760
3771
  _: 1
@@ -3764,17 +3775,17 @@ v + ' кВт·ч<br>выработка за день'`),
3764
3775
  v(ie, {
3765
3776
  modelValue: e.min,
3766
3777
  label: "Min",
3767
- "onUpdate:modelValue": k[1] || (k[1] = (z) => u("min", +z))
3778
+ "onUpdate:modelValue": x[1] || (x[1] = (z) => m("min", +z))
3768
3779
  }, null, 8, ["modelValue"]),
3769
3780
  v(ie, {
3770
3781
  modelValue: e.max,
3771
3782
  label: "Max",
3772
- "onUpdate:modelValue": k[2] || (k[2] = (z) => u("max", +z))
3783
+ "onUpdate:modelValue": x[2] || (x[2] = (z) => m("max", +z))
3773
3784
  }, null, 8, ["modelValue"]),
3774
3785
  v(ie, {
3775
3786
  modelValue: e.step,
3776
3787
  label: "Step",
3777
- "onUpdate:modelValue": k[3] || (k[3] = (z) => u("step", +z))
3788
+ "onUpdate:modelValue": x[3] || (x[3] = (z) => m("step", +z))
3778
3789
  }, null, 8, ["modelValue"])
3779
3790
  ])) : T("", !0),
3780
3791
  d("list") ? (f(), g("div", wi, [
@@ -3782,8 +3793,8 @@ v + ' кВт·ч<br>выработка за день'`),
3782
3793
  v(ie, {
3783
3794
  modelValue: t.value.name,
3784
3795
  "onUpdate:modelValue": [
3785
- k[4] || (k[4] = (z) => t.value.name = z),
3786
- G(b)
3796
+ x[4] || (x[4] = (z) => t.value.name = z),
3797
+ J(k)
3787
3798
  ],
3788
3799
  disabled: i.value,
3789
3800
  label: "Name"
@@ -3791,8 +3802,8 @@ v + ' кВт·ч<br>выработка за день'`),
3791
3802
  v(ie, {
3792
3803
  modelValue: t.value.value,
3793
3804
  "onUpdate:modelValue": [
3794
- k[5] || (k[5] = (z) => t.value.value = z),
3795
- G(b)
3805
+ x[5] || (x[5] = (z) => t.value.value = z),
3806
+ J(k)
3796
3807
  ],
3797
3808
  disabled: i.value,
3798
3809
  label: "Value"
@@ -3807,12 +3818,12 @@ v + ' кВт·ч<br>выработка за день'`),
3807
3818
  bottom: "0",
3808
3819
  onChange: c
3809
3820
  }, {
3810
- item: x(({ item: z }) => [
3821
+ item: b(({ item: z }) => [
3811
3822
  n("div", _i, [
3812
3823
  n("span", null, C(z.name), 1),
3813
3824
  n("button", {
3814
3825
  class: "cursor-pointer size-4",
3815
- onClick: ee((P) => p(z), ["prevent", "stop"])
3826
+ onClick: ee((j) => p(z), ["prevent", "stop"])
3816
3827
  }, [
3817
3828
  v(V, {
3818
3829
  name: "close",
@@ -3826,9 +3837,9 @@ v + ' кВт·ч<br>выработка за день'`),
3826
3837
  v(R, {
3827
3838
  class: "px-4",
3828
3839
  color: "blue",
3829
- onClick: m
3840
+ onClick: u
3830
3841
  }, {
3831
- default: x(() => [
3842
+ default: b(() => [
3832
3843
  v(V, {
3833
3844
  name: "add",
3834
3845
  class: "size-5"
@@ -3840,7 +3851,7 @@ v + ' кВт·ч<br>выработка за день'`),
3840
3851
  ])) : T("", !0)
3841
3852
  ]));
3842
3853
  }
3843
- }), Ai = { class: "flex flex-col" }, Ei = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, Bi = { class: "flex-auto order-1" }, Vi = { class: "flex-auto gap-x-2 order-1" }, Ii = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, Li = { class: "flex gap-2 items-center" }, Mi = { class: "flex flex-col gap-4" }, Oi = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Fi = { class: "relative group" }, ji = { class: "select-none" }, Di = ["onClick"], Ni = { class: "flex justify-center order-0 md:order-1" }, Pi = { class: "size-32 shrink-0" }, Ri = { class: "flex gap-4 justify-end" }, Ui = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" }, Cd = /* @__PURE__ */ M({
3854
+ }), Ai = { class: "flex flex-col" }, Ei = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, Bi = { class: "flex-auto order-1" }, Vi = { class: "flex-auto gap-x-2 order-1" }, Ii = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, Li = { class: "flex gap-2 items-center" }, Mi = { class: "flex flex-col gap-4" }, Oi = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Fi = { class: "relative group" }, ji = { class: "select-none" }, Di = ["onClick"], Ni = { class: "flex justify-center order-0 md:order-1" }, Pi = { class: "size-32 shrink-0" }, Ri = { class: "flex gap-4 justify-end" }, Ui = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" }, Cd = /* @__PURE__ */ O({
3844
3855
  __name: "ItemEdit",
3845
3856
  props: {
3846
3857
  items: {},
@@ -3867,23 +3878,23 @@ v + ' кВт·ч<br>выработка за день'`),
3867
3878
  }), d = S(() => !!e.items.filter((w) => {
3868
3879
  var A;
3869
3880
  return w.id !== ((A = e.item) == null ? void 0 : A.id);
3870
- }).find((w) => w.id === (t == null ? void 0 : t.value.id))), u = S(() => t.value.type === "info"), r = S(() => {
3881
+ }).find((w) => w.id === (t == null ? void 0 : t.value.id))), m = S(() => t.value.type === "info"), r = S(() => {
3871
3882
  var w;
3872
3883
  return (w = t.value.args) == null ? void 0 : w.length;
3873
- }), c = S(() => t.value.args.length > 3), m = S(() => {
3884
+ }), c = S(() => t.value.args.length > 3), u = S(() => {
3874
3885
  if (d.value) return !0;
3875
3886
  const { id: w, args: A } = t.value;
3876
3887
  return !w || !A.length;
3877
- }), p = ({ value: w }) => t.value.icon = w, b = ({ value: w }) => {
3888
+ }), p = ({ value: w }) => t.value.icon = w, k = ({ value: w }) => {
3878
3889
  const A = w;
3879
3890
  t.value.type = A, delete t.value.opts, ["button", "list", "dimmer"].includes(A) && (w === "button" && (t.value.opts = {}), w === "list" && (t.value.opts = { items: [] }), w === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
3880
3891
  }, h = (w) => {
3881
3892
  w === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), w === "get" && (t.value.get ? delete t.value.get : t.value.get = "a"), w === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
3882
- }, k = (w) => a("button", w, t.value), z = (w) => t.value.args = t.value.args.filter((A) => A !== w), P = ({ path: w }) => {
3893
+ }, x = (w) => a("button", w, t.value), z = (w) => t.value.args = t.value.args.filter((A) => A !== w), j = ({ path: w }) => {
3883
3894
  !t.value.args.length && !t.value.id && (t.value.id = w), t.value.args.push(w), o.value = !1;
3884
- }, X = (w, A) => {
3895
+ }, H = (w, A) => {
3885
3896
  w === "set" && (t.value.set = A), w === "get" && (t.value.get = A), w === "getTo" && (t.value.getTo = A), A || delete t.value[w];
3886
- }, j = () => {
3897
+ }, D = () => {
3887
3898
  o.value = !0;
3888
3899
  }, Z = (w, A) => {
3889
3900
  t.value.opts || (t.value.opts = {}), t.value.opts[w] = A, w === "disabled" && !A && delete t.value.opts[w];
@@ -3899,22 +3910,22 @@ v + ' кВт·ч<br>выработка за день'`),
3899
3910
  value: 0,
3900
3911
  items: l
3901
3912
  }, {
3902
- "tab-0": x(() => [
3913
+ "tab-0": b(() => [
3903
3914
  n("div", Vi, [
3904
3915
  v(ie, {
3905
3916
  modelValue: t.value.id,
3906
- "onUpdate:modelValue": A[0] || (A[0] = (N) => t.value.id = N),
3917
+ "onUpdate:modelValue": A[0] || (A[0] = (P) => t.value.id = P),
3907
3918
  label: "ID",
3908
3919
  message: d.value ? w.$t("used") : ""
3909
3920
  }, va({ _: 2 }, [
3910
3921
  r.value ? void 0 : {
3911
3922
  name: "icon",
3912
- fn: x(() => [
3923
+ fn: b(() => [
3913
3924
  v(R, {
3914
3925
  variant: "ghost",
3915
- onClick: j
3926
+ onClick: D
3916
3927
  }, {
3917
- default: x(() => [
3928
+ default: b(() => [
3918
3929
  v(V, {
3919
3930
  name: "search",
3920
3931
  class: "size-5"
@@ -3928,7 +3939,7 @@ v + ' кВт·ч<br>выработка за день'`),
3928
3939
  ]), 1032, ["modelValue", "message"]),
3929
3940
  v(ie, {
3930
3941
  modelValue: t.value.name,
3931
- "onUpdate:modelValue": A[1] || (A[1] = (N) => t.value.name = N),
3942
+ "onUpdate:modelValue": A[1] || (A[1] = (P) => t.value.name = P),
3932
3943
  label: "Name"
3933
3944
  }, null, 8, ["modelValue"]),
3934
3945
  n("div", Ii, [
@@ -3941,12 +3952,12 @@ v + ' кВт·ч<br>выработка за день'`),
3941
3952
  items: e.listIcons,
3942
3953
  onChange: p
3943
3954
  }, {
3944
- item: x(({ item: N }) => [
3955
+ item: b(({ item: P }) => [
3945
3956
  n("div", Li, [
3946
3957
  I(w.$slots, "icon", {
3947
- icon: N.value
3958
+ icon: P.value
3948
3959
  }),
3949
- n("div", null, C(N.name), 1)
3960
+ n("div", null, C(P.name), 1)
3950
3961
  ])
3951
3962
  ]),
3952
3963
  _: 3
@@ -3957,32 +3968,32 @@ v + ' кВт·ч<br>выработка за день'`),
3957
3968
  top: "unset",
3958
3969
  label: "Type",
3959
3970
  items: e.listDashboard,
3960
- onChange: b
3971
+ onChange: k
3961
3972
  }, null, 8, ["model-value", "items"])
3962
3973
  ])
3963
3974
  ])
3964
3975
  ]),
3965
- "tab-1": x(() => [
3976
+ "tab-1": b(() => [
3966
3977
  n("div", Mi, [
3967
3978
  v(Tt, {
3968
3979
  active: !!t.value.args.length,
3969
3980
  disabled: c.value,
3970
3981
  label: "Arguments",
3971
- onIcon: A[2] || (A[2] = (N) => o.value = !0)
3982
+ onIcon: A[2] || (A[2] = (P) => o.value = !0)
3972
3983
  }, {
3973
- default: x(() => [
3984
+ default: b(() => [
3974
3985
  n("div", Oi, [
3975
- (f(!0), g(D, null, K(t.value.args, (N, ae) => (f(), g("div", {
3976
- key: N,
3986
+ (f(!0), g(N, null, K(t.value.args, (P, ae) => (f(), g("div", {
3987
+ key: P,
3977
3988
  class: "flex items-center rounded-full bg-gray-light-10 dark:bg-gray-dark-40/50 px-2 py-1 text-xs"
3978
3989
  }, [
3979
3990
  n("div", Fi, [
3980
- n("span", ji, C(N), 1)
3991
+ n("span", ji, C(P), 1)
3981
3992
  ]),
3982
3993
  ae || t.value.args.length < 2 ? (f(), g("button", {
3983
3994
  key: 0,
3984
3995
  class: "ms-1 shrink-0 cursor-pointer text-gray-main transition hover:text-rose-500",
3985
- onClick: (xe) => z(N)
3996
+ onClick: (xe) => z(P)
3986
3997
  }, [
3987
3998
  v(V, {
3988
3999
  name: "close",
@@ -4000,10 +4011,10 @@ v + ' кВт·ч<br>выработка за день'`),
4000
4011
  prefix: ["v"],
4001
4012
  "prefix-titles": [w.$t("dashboard.newValue")],
4002
4013
  "argument-title": w.$t("dashboard.argument"),
4003
- disabled: !r.value || u.value,
4014
+ disabled: !r.value || m.value,
4004
4015
  label: "Set",
4005
- onOnIcon: A[3] || (A[3] = (N) => h("set")),
4006
- onChange: A[4] || (A[4] = (N) => X("set", N))
4016
+ onIcon: A[3] || (A[3] = (P) => h("set")),
4017
+ onChange: A[4] || (A[4] = (P) => H("set", P))
4007
4018
  }, null, 8, ["value", "args", "prefix-titles", "argument-title", "disabled"]),
4008
4019
  v(He, {
4009
4020
  value: t.value.get,
@@ -4011,8 +4022,8 @@ v + ' кВт·ч<br>выработка за день'`),
4011
4022
  "argument-title": w.$t("dashboard.argument"),
4012
4023
  disabled: !r.value,
4013
4024
  label: "Get",
4014
- onOnIcon: A[5] || (A[5] = (N) => h("get")),
4015
- onChange: A[6] || (A[6] = (N) => X("get", N))
4025
+ onIcon: A[5] || (A[5] = (P) => h("get")),
4026
+ onChange: A[6] || (A[6] = (P) => H("get", P))
4016
4027
  }, null, 8, ["value", "args", "argument-title", "disabled"]),
4017
4028
  v(He, {
4018
4029
  value: t.value.getTo,
@@ -4022,12 +4033,12 @@ v + ' кВт·ч<br>выработка за день'`),
4022
4033
  "argument-title": w.$t("dashboard.argument"),
4023
4034
  disabled: !r.value,
4024
4035
  label: "GetTo",
4025
- onOnIcon: A[7] || (A[7] = (N) => h("getTo")),
4026
- onChange: A[8] || (A[8] = (N) => X("getTo", N))
4036
+ onIcon: A[7] || (A[7] = (P) => h("getTo")),
4037
+ onChange: A[8] || (A[8] = (P) => H("getTo", P))
4027
4038
  }, null, 8, ["value", "args", "prefix-titles", "argument-title", "disabled"])
4028
4039
  ])
4029
4040
  ]),
4030
- "tab-2": x(() => [
4041
+ "tab-2": b(() => [
4031
4042
  v(zi, Y(t.value.opts, {
4032
4043
  value: t.value.value,
4033
4044
  type: t.value.type,
@@ -4047,10 +4058,10 @@ v + ' кВт·ч<br>выработка за день'`),
4047
4058
  v(R, {
4048
4059
  class: "px-4",
4049
4060
  color: "blue",
4050
- disabled: m.value,
4051
- onClick: A[9] || (A[9] = (N) => k(i.value ? "add" : "save"))
4061
+ disabled: u.value,
4062
+ onClick: A[9] || (A[9] = (P) => x(i.value ? "add" : "save"))
4052
4063
  }, {
4053
- default: x(() => [
4064
+ default: b(() => [
4054
4065
  L(C(i.value ? w.$t("add") : w.$t("save")), 1)
4055
4066
  ]),
4056
4067
  _: 1
@@ -4059,26 +4070,26 @@ v + ' кВт·ч<br>выработка за день'`),
4059
4070
  class: "px-4",
4060
4071
  color: "red",
4061
4072
  variant: "outline",
4062
- onClick: A[10] || (A[10] = (N) => k("remove"))
4073
+ onClick: A[10] || (A[10] = (P) => x("remove"))
4063
4074
  }, {
4064
- default: x(() => [
4075
+ default: b(() => [
4065
4076
  L(C(w.$t("remove")), 1)
4066
4077
  ]),
4067
4078
  _: 1
4068
4079
  })
4069
4080
  ]),
4070
- o.value ? (f(), O(ze, {
4081
+ o.value ? (f(), M(ze, {
4071
4082
  key: 0,
4072
4083
  size: "md",
4073
4084
  title: w.$t("select"),
4074
- onClose: A[11] || (A[11] = (N) => o.value = !1)
4085
+ onClose: A[11] || (A[11] = (P) => o.value = !1)
4075
4086
  }, {
4076
- default: x(() => [
4087
+ default: b(() => [
4077
4088
  n("div", Ui, [
4078
4089
  v(_t, {
4079
4090
  items: e.object,
4080
4091
  onlyValue: !r.value,
4081
- onClick: P
4092
+ onClick: j
4082
4093
  }, null, 8, ["items", "onlyValue"])
4083
4094
  ])
4084
4095
  ]),
@@ -4113,8 +4124,8 @@ class Gi {
4113
4124
  const a = s;
4114
4125
  if (a.isComposing || a.keyCode === 229) return;
4115
4126
  const l = function(t, o) {
4116
- const { value: i, selectionStart: d, selectionEnd: u } = o.target;
4117
- return t.reduce((r, c) => ({ ...r, ...c(r, o) }), { value: i, selectionStart: d, selectionEnd: u });
4127
+ const { value: i, selectionStart: d, selectionEnd: m } = o.target;
4128
+ return t.reduce((r, c) => ({ ...r, ...c(r, o) }), { value: i, selectionStart: d, selectionEnd: m });
4118
4129
  }(this.options.plugins, s);
4119
4130
  this.update(l);
4120
4131
  }, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
@@ -4162,7 +4173,7 @@ function na(e) {
4162
4173
  }
4163
4174
  const Rt = { alt: "altKey", control: "ctrlKey", ctrl: "ctrlKey", meta: "metaKey", shift: "shiftKey", "ctrl/cmd": typeof window < "u" && window.navigator && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) ? "metaKey" : "ctrlKey" }, Ji = { add: "=" }, qi = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
4164
4175
  function Je(e, s) {
4165
- const a = e.split("+").reduce((u, r) => Rt[r] ? (u.modifiers[Rt[r]] = !0, u) : { ...u, key: Ji[r] || r.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), l = Object.keys(a.modifiers).every((u) => a.modifiers[u] ? s[u] : !s[u]);
4176
+ const a = e.split("+").reduce((m, r) => Rt[r] ? (m.modifiers[Rt[r]] = !0, m) : { ...m, key: Ji[r] || r.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), l = Object.keys(a.modifiers).every((m) => a.modifiers[m] ? s[m] : !s[m]);
4166
4177
  if (!a.key) return l;
4167
4178
  const t = s.key != null && s.key.toLowerCase() === a.key, o = (i = a.key, /^[a-z]$/.test(i) ? `key${i}` : /^[0-9]$/.test(i) ? `digit${i}` : qi[i] || null);
4168
4179
  var i;
@@ -4175,15 +4186,15 @@ function Xi(e = {}) {
4175
4186
  const i = (d) => {
4176
4187
  l = l.slice(0, t + 1), l.push(d), l.length > s && (l = l.slice(l.length - s)), t = l.length - 1;
4177
4188
  };
4178
- return (d, u) => {
4179
- const r = u.type === "keydown" && Je("ctrl/cmd+z", u), c = u.type === "keydown" && (Je("ctrl/cmd+shift+z", u) || Je("ctrl+y", u));
4180
- if ((r || c) && u.preventDefault(), t === null) return l = [d], void (t = 0);
4189
+ return (d, m) => {
4190
+ const r = m.type === "keydown" && Je("ctrl/cmd+z", m), c = m.type === "keydown" && (Je("ctrl/cmd+shift+z", m) || Je("ctrl+y", m));
4191
+ if ((r || c) && m.preventDefault(), t === null) return l = [d], void (t = 0);
4181
4192
  if (r) return o = null, l[t].value !== d.value ? i(d) : l[t] = d, t = Math.max(0, t - 1), l[t];
4182
4193
  if (c) return o = null, l[t].value !== d.value ? void i(d) : (t = Math.min(l.length - 1, t + 1), l[t]);
4183
- if (u.type === "keydown") return l[t].value !== d.value ? (o = null, void i(d)) : void (l[t] = d);
4184
- if (u.type === "input") {
4185
- const m = u.timeStamp, p = m != null && o != null && m - o <= a;
4186
- if (o = m ?? null, p) return void (l[t] = d);
4194
+ if (m.type === "keydown") return l[t].value !== d.value ? (o = null, void i(d)) : void (l[t] = d);
4195
+ if (m.type === "input") {
4196
+ const u = m.timeStamp, p = u != null && o != null && u - o <= a;
4197
+ if (o = u ?? null, p) return void (l[t] = d);
4187
4198
  i(d);
4188
4199
  }
4189
4200
  };
@@ -4212,26 +4223,26 @@ const Yi = () => (e, s) => {
4212
4223
  const c = a.substring(o, d).trimEnd();
4213
4224
  if (c.endsWith(";") || c.length === 0)
4214
4225
  return;
4215
- const m = a.slice(0, d) + ";" + a.slice(d), p = l + 1;
4226
+ const u = a.slice(0, d) + ";" + a.slice(d), p = l + 1;
4216
4227
  return {
4217
- value: m,
4228
+ value: u,
4218
4229
  selectionStart: p,
4219
4230
  selectionEnd: p
4220
4231
  };
4221
4232
  };
4222
4233
  let Bt = [], ue = null, ne = 0, ke = [], Ee = null, Oe = null, Vt, la, pe = null, je = null;
4223
4234
  const Qi = (e) => {
4224
- const { customSuggestions: s = [], minPrefixLength: a = 1, maxSuggestions: l = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: i, renderMenu: d, renderTooltip: u } = e;
4225
- if (!d || !u)
4235
+ const { customSuggestions: s = [], minPrefixLength: a = 1, maxSuggestions: l = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: i, renderMenu: d, renderTooltip: m } = e;
4236
+ if (!d || !m)
4226
4237
  throw new Error("renderMenu and renderTooltip are required");
4227
- return Bt = [...s].map((r) => i(r)), Vt = d, la = u, (r, c) => {
4238
+ return Bt = [...s].map((r) => i(r)), Vt = d, la = m, (r, c) => {
4228
4239
  if (typeof KeyboardEvent > "u" || !(c instanceof KeyboardEvent))
4229
4240
  return;
4230
- const { value: m, selectionStart: p } = r, b = c.target;
4231
- if (Oe = b, o.enabled !== !1 && !b.dataset.tooltipInitialized && (b.dataset.tooltipInitialized = "true", b.addEventListener("mouseup", () => {
4232
- setTimeout(() => Ut(b), 100);
4233
- }), b.addEventListener("keyup", () => {
4234
- setTimeout(() => Ut(b), 100);
4241
+ const { value: u, selectionStart: p } = r, k = c.target;
4242
+ if (Oe = k, o.enabled !== !1 && !k.dataset.tooltipInitialized && (k.dataset.tooltipInitialized = "true", k.addEventListener("mouseup", () => {
4243
+ setTimeout(() => Ut(k), 100);
4244
+ }), k.addEventListener("keyup", () => {
4245
+ setTimeout(() => Ut(k), 100);
4235
4246
  })), ue) {
4236
4247
  switch (c.key) {
4237
4248
  case "ArrowDown":
@@ -4255,12 +4266,12 @@ const Qi = (e) => {
4255
4266
  case "Backspace":
4256
4267
  setTimeout(() => {
4257
4268
  if (Oe) {
4258
- const h = Oe.value, k = Oe.selectionStart, z = nt(h, k), P = h.slice(z, k);
4259
- if (P.length < a)
4269
+ const h = Oe.value, x = Oe.selectionStart, z = nt(h, x), j = h.slice(z, x);
4270
+ if (j.length < a)
4260
4271
  Ce();
4261
4272
  else {
4262
- const X = ft(P).slice(0, l);
4263
- X.length === 0 ? Ce() : (ke = X, ne = 0, Fe());
4273
+ const H = ft(j).slice(0, l);
4274
+ H.length === 0 ? Ce() : (ke = H, ne = 0, Fe());
4264
4275
  }
4265
4276
  }
4266
4277
  }, 0);
@@ -4271,33 +4282,33 @@ const Qi = (e) => {
4271
4282
  }
4272
4283
  if (Je("tab", c)) {
4273
4284
  c.preventDefault();
4274
- const h = nt(m, p), k = m.slice(h, p);
4275
- if (k.length > 0) {
4276
- const j = ft(k);
4277
- if (j.length > 0)
4278
- return gt(r, j[0]);
4285
+ const h = nt(u, p), x = u.slice(h, p);
4286
+ if (x.length > 0) {
4287
+ const D = ft(x);
4288
+ if (D.length > 0)
4289
+ return gt(r, D[0]);
4279
4290
  }
4280
- const z = " ".repeat(t), P = m.slice(0, p) + z + m.slice(p), X = p + t;
4291
+ const z = " ".repeat(t), j = u.slice(0, p) + z + u.slice(p), H = p + t;
4281
4292
  return {
4282
- value: P,
4283
- selectionStart: X,
4284
- selectionEnd: X
4293
+ value: j,
4294
+ selectionStart: H,
4295
+ selectionEnd: H
4285
4296
  };
4286
4297
  }
4287
4298
  if (!(c.key.length !== 1 || c.ctrlKey || c.metaKey || c.altKey))
4288
4299
  return Ee && clearTimeout(Ee), Ee = setTimeout(() => {
4289
4300
  Ee = null;
4290
- const h = b.value, k = b.selectionStart, z = nt(h, k), P = h.slice(z, k);
4291
- if (P.length < a) {
4301
+ const h = k.value, x = k.selectionStart, z = nt(h, x), j = h.slice(z, x);
4302
+ if (j.length < a) {
4292
4303
  Ce();
4293
4304
  return;
4294
4305
  }
4295
- let X = ft(P);
4296
- if (X = X.slice(0, l), X.length === 0) {
4306
+ let H = ft(j);
4307
+ if (H = H.slice(0, l), H.length === 0) {
4297
4308
  Ce();
4298
4309
  return;
4299
4310
  }
4300
- ke = X, ne = 0, ue ? Fe() : er(b, X);
4311
+ ke = H, ne = 0, ue ? Fe() : er(k, H);
4301
4312
  }, 0), { ...r };
4302
4313
  };
4303
4314
  };
@@ -4310,8 +4321,8 @@ function ft(e) {
4310
4321
  const t = a.label.toLowerCase(), o = l.label.toLowerCase(), i = t.startsWith(s), d = o.startsWith(s);
4311
4322
  if (i && !d) return -1;
4312
4323
  if (!i && d) return 1;
4313
- const u = t.indexOf(s), r = o.indexOf(s);
4314
- return u !== r ? u - r : t.length !== o.length ? t.length - o.length : t.localeCompare(o);
4324
+ const m = t.indexOf(s), r = o.indexOf(s);
4325
+ return m !== r ? m - r : t.length !== o.length ? t.length - o.length : t.localeCompare(o);
4315
4326
  });
4316
4327
  }
4317
4328
  function nt(e, s) {
@@ -4347,25 +4358,25 @@ function Fe() {
4347
4358
  function gt(e, s) {
4348
4359
  const { value: a, selectionStart: l } = e, t = nt(a, l), o = s.insert || s.label, i = /\$\{([^}]*)\}/g;
4349
4360
  let d = o;
4350
- const u = [];
4361
+ const m = [];
4351
4362
  let r;
4352
4363
  for (; (r = i.exec(o)) !== null; ) {
4353
- const h = r[1], k = r.index, z = r[0].length;
4354
- u.push({ index: k, text: h, length: z });
4364
+ const h = r[1], x = r.index, z = r[0].length;
4365
+ m.push({ index: x, text: h, length: z });
4355
4366
  }
4356
4367
  d = o.replace(/\$\{([^}]*)\}/g, "$1");
4357
- const c = u[0];
4358
- let m = t + d.length, p = t + d.length;
4368
+ const c = m[0];
4369
+ let u = t + d.length, p = t + d.length;
4359
4370
  if (c) {
4360
- let h = 0, k = 0, z = !1;
4361
- for (; k < o.length && !z; ) {
4362
- const P = u.find((X) => X.index === k);
4363
- P ? (h += P.text.length, k += P.length, P === c && (m = t + h - P.text.length, p = t + h, z = !0)) : (h++, k++);
4371
+ let h = 0, x = 0, z = !1;
4372
+ for (; x < o.length && !z; ) {
4373
+ const j = m.find((H) => H.index === x);
4374
+ j ? (h += j.text.length, x += j.length, j === c && (u = t + h - j.text.length, p = t + h, z = !0)) : (h++, x++);
4364
4375
  }
4365
4376
  }
4366
4377
  return {
4367
4378
  value: a.slice(0, t) + d + a.slice(l),
4368
- selectionStart: m,
4379
+ selectionStart: u,
4369
4380
  selectionEnd: p
4370
4381
  };
4371
4382
  }
@@ -4374,10 +4385,10 @@ function Ce() {
4374
4385
  }
4375
4386
  function oa(e) {
4376
4387
  const s = e.getBoundingClientRect(), { value: a, selectionStart: l } = e, o = a.substring(0, l).split(`
4377
- `), i = o.length, d = o[o.length - 1] || "", u = parseInt(getComputedStyle(e).lineHeight) || 20;
4388
+ `), i = o.length, d = o[o.length - 1] || "", m = parseInt(getComputedStyle(e).lineHeight) || 20;
4378
4389
  return {
4379
4390
  left: s.left + 10 + d.length * 8,
4380
- top: s.top + (i - 1) * u
4391
+ top: s.top + (i - 1) * m
4381
4392
  };
4382
4393
  }
4383
4394
  function Ut(e) {
@@ -4427,9 +4438,9 @@ const vt = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "
4427
4438
  const a = nr(e);
4428
4439
  let l = "", t = 0;
4429
4440
  for (const o of s.matchAll(a)) {
4430
- const [i, d, u, r, c, m, p, b] = o;
4441
+ const [i, d, m, r, c, u, p, k] = o;
4431
4442
  let h = "";
4432
- d ? h = "comment" : u ? h = "str" : r ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), l += vt(s.slice(t, o.index)), l += `<span class="${tr[h] ?? ""}">${vt(i)}</span>`, t = o.index + i.length;
4443
+ d ? h = "comment" : m ? h = "str" : r ? h = "num" : c ? h = "word" : u ? h = "var" : p ? h = "event" : k && (h = "operator"), l += vt(s.slice(t, o.index)), l += `<span class="${tr[h] ?? ""}">${vt(i)}</span>`, t = o.index + i.length;
4433
4444
  }
4434
4445
  return l += vt(s.slice(t)), l;
4435
4446
  }, ia = {
@@ -4451,10 +4462,10 @@ const vt = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "
4451
4462
  rounded transition-colors duration-100 border-l-2
4452
4463
  ${i ? "border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/30" : "border-transparent hover:bg-gray-light-30 dark:hover:bg-gray-dark-30"}
4453
4464
  `;
4454
- const u = ia[t.type] || "text-gray-dark-30 dark:text-gray-light-10";
4465
+ const m = ia[t.type] || "text-gray-dark-30 dark:text-gray-light-10";
4455
4466
  d.innerHTML = `
4456
4467
  <div class="flex items-center gap-2 flex-1">
4457
- <span class="${u} font-medium">${t.label}</span>
4468
+ <span class="${m} font-medium">${t.label}</span>
4458
4469
  ${t.detail ? `<span class="text-xs text-gray-dark-25 dark:text-gray-main ml-2">${t.detail}</span>` : ""}
4459
4470
  </div>
4460
4471
  ${t.description ? `<span class="text-xs text-gray-main dark:text-gray-dark-25">${t.description}</span>` : ""}
@@ -4516,7 +4527,7 @@ end;`, detail: "event(name: string)" },
4516
4527
  { label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
4517
4528
  { label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
4518
4529
  { label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
4519
- ], Sd = /* @__PURE__ */ M({
4530
+ ], Sd = /* @__PURE__ */ O({
4520
4531
  __name: "ScriptEditor",
4521
4532
  props: {
4522
4533
  modelValue: {},
@@ -4572,7 +4583,7 @@ end;`, detail: "event(name: string)" },
4572
4583
  }, mr = {
4573
4584
  key: 1,
4574
4585
  class: "text-red-600"
4575
- }, fr = ["innerHTML"], gr = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", vr = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", _d = /* @__PURE__ */ M({
4586
+ }, fr = ["innerHTML"], gr = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", vr = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", _d = /* @__PURE__ */ O({
4576
4587
  __name: "ScriptViewDocs",
4577
4588
  props: {
4578
4589
  lang: { default: "en" }
@@ -4580,9 +4591,9 @@ end;`, detail: "event(name: string)" },
4580
4591
  setup(e) {
4581
4592
  const s = F(""), a = F(""), l = F(null), t = F(!1), o = F(null);
4582
4593
  let i = null;
4583
- const d = () => new Promise((c, m) => {
4594
+ const d = () => new Promise((c, u) => {
4584
4595
  if (typeof window > "u" || typeof document > "u") {
4585
- m(new Error("Markdown loading is available only in a browser"));
4596
+ u(new Error("Markdown loading is available only in a browser"));
4586
4597
  return;
4587
4598
  }
4588
4599
  if (window.marked) {
@@ -4599,22 +4610,22 @@ end;`, detail: "event(name: string)" },
4599
4610
  gfm: !0,
4600
4611
  breaks: !0,
4601
4612
  headerIds: !1
4602
- }), c(window.marked)) : m(new Error("Marked library not found after loading"));
4613
+ }), c(window.marked)) : u(new Error("Marked library not found after loading"));
4603
4614
  }, p.onerror = () => {
4604
- m(new Error("Failed to load Marked library from CDN"));
4615
+ u(new Error("Failed to load Marked library from CDN"));
4605
4616
  }, document.head.appendChild(p);
4606
- }), u = (c) => {
4607
- const m = c.split(`
4617
+ }), m = (c) => {
4618
+ const u = c.split(`
4608
4619
  `), p = {};
4609
- let b = !0;
4610
- for (const h of m) {
4611
- if (b && h.startsWith("#")) {
4612
- b = !1;
4620
+ let k = !0;
4621
+ for (const h of u) {
4622
+ if (k && h.startsWith("#")) {
4623
+ k = !1;
4613
4624
  continue;
4614
4625
  }
4615
- if (b && h.includes(":")) {
4616
- const [k, z] = h.split(":").map((P) => P.trim());
4617
- k && z && (k.toLowerCase().includes("version") && (p.version = z), (k.toLowerCase().includes("обновлено") || k.toLowerCase().includes("updated")) && (p.updated = z));
4626
+ if (k && h.includes(":")) {
4627
+ const [x, z] = h.split(":").map((j) => j.trim());
4628
+ x && z && (x.toLowerCase().includes("version") && (p.version = z), (x.toLowerCase().includes("обновлено") || x.toLowerCase().includes("updated")) && (p.updated = z));
4618
4629
  }
4619
4630
  }
4620
4631
  return p;
@@ -4625,14 +4636,14 @@ end;`, detail: "event(name: string)" },
4625
4636
  }
4626
4637
  t.value = !0, o.value = null, a.value = "";
4627
4638
  try {
4628
- const m = `${gr}${c}.md`, p = await fetch(m);
4639
+ const u = `${gr}${c}.md`, p = await fetch(u);
4629
4640
  if (!p.ok)
4630
4641
  throw new Error(`HTTP ${p.status}: ${p.statusText}`);
4631
- const b = await p.text();
4632
- s.value = b, l.value = u(b), a.value = i.parse(b);
4633
- } catch (m) {
4634
- const p = m instanceof Error ? m.message : "";
4635
- o.value = p, console.error("Error loading docs:", m);
4642
+ const k = await p.text();
4643
+ s.value = k, l.value = m(k), a.value = i.parse(k);
4644
+ } catch (u) {
4645
+ const p = u instanceof Error ? u.message : "";
4646
+ o.value = p, console.error("Error loading docs:", u);
4636
4647
  } finally {
4637
4648
  t.value = !1;
4638
4649
  }
@@ -4643,10 +4654,10 @@ end;`, detail: "event(name: string)" },
4643
4654
  const c = e.lang ? "ru" : "en";
4644
4655
  await r(c);
4645
4656
  } catch (c) {
4646
- const m = c instanceof Error ? c.message : "";
4647
- o.value = m, console.error("Initialization error:", c);
4657
+ const u = c instanceof Error ? c.message : "";
4658
+ o.value = u, console.error("Initialization error:", c);
4648
4659
  }
4649
- }), (c, m) => (f(), g("div", dr, [
4660
+ }), (c, u) => (f(), g("div", dr, [
4650
4661
  t.value || o.value ? (f(), g("div", cr, [
4651
4662
  t.value ? (f(), g("span", ur, "⏳")) : T("", !0),
4652
4663
  o.value ? (f(), g("span", mr, "❌ " + C(o.value), 1)) : T("", !0)
@@ -4657,7 +4668,7 @@ end;`, detail: "event(name: string)" },
4657
4668
  }, null, 8, fr)
4658
4669
  ]));
4659
4670
  }
4660
- }), pr = { class: "my-4" }, Td = /* @__PURE__ */ M({
4671
+ }), pr = { class: "my-4" }, Td = /* @__PURE__ */ O({
4661
4672
  __name: "ScriptDialog",
4662
4673
  props: {
4663
4674
  idScript: {}
@@ -4668,30 +4679,30 @@ end;`, detail: "event(name: string)" },
4668
4679
  validationSchema: () => ({
4669
4680
  name: [Ia, La(8)]
4670
4681
  })
4671
- }), [i, d] = l("name"), u = () => {
4682
+ }), [i, d] = l("name"), m = () => {
4672
4683
  a("add", i.value);
4673
4684
  }, r = t(() => {
4674
- u(), i.value = "", a("close", new Event("close"));
4685
+ m(), i.value = "", a("close", new Event("close"));
4675
4686
  });
4676
4687
  return be(() => {
4677
4688
  e.idScript || (i.value = "boot");
4678
- }), (c, m) => {
4679
- const p = ie, b = R;
4689
+ }), (c, u) => {
4690
+ const p = ie, k = R;
4680
4691
  return f(), g("div", pr, [
4681
4692
  v(p, Y({
4682
- modelValue: G(i),
4683
- "onUpdate:modelValue": m[0] || (m[0] = (h) => pa(i) ? i.value = h : null)
4684
- }, G(d), {
4693
+ modelValue: J(i),
4694
+ "onUpdate:modelValue": u[0] || (u[0] = (h) => pa(i) ? i.value = h : null)
4695
+ }, J(d), {
4685
4696
  disabled: !e.idScript,
4686
4697
  label: c.$t("name")
4687
4698
  }), null, 16, ["modelValue", "disabled", "label"]),
4688
- v(b, {
4699
+ v(k, {
4689
4700
  class: "w-full",
4690
4701
  color: "blue",
4691
- disabled: !G(o),
4692
- onClick: G(r)
4702
+ disabled: !J(o),
4703
+ onClick: J(r)
4693
4704
  }, {
4694
- default: x(() => [
4705
+ default: b(() => [
4695
4706
  L(C(c.$t("add")), 1)
4696
4707
  ]),
4697
4708
  _: 1
@@ -4708,7 +4719,7 @@ end;`, detail: "event(name: string)" },
4708
4719
  }, Ar = {
4709
4720
  key: 0,
4710
4721
  class: "px-4 py-10 text-center text-sm text-gray-dark-25 dark:text-gray-main"
4711
- }, zd = /* @__PURE__ */ M({
4722
+ }, zd = /* @__PURE__ */ O({
4712
4723
  __name: "VisionSearch",
4713
4724
  props: {
4714
4725
  items: {},
@@ -4720,13 +4731,13 @@ end;`, detail: "event(name: string)" },
4720
4731
  setup(e) {
4721
4732
  const s = e, a = F(!1), l = F(""), t = F(null), o = S(() => {
4722
4733
  const r = l.value.trim().toLowerCase();
4723
- return (r ? s.items.filter((m) => `${m.title} ${m.description ?? ""} ${m.group ?? ""}`.toLowerCase().includes(r)) : s.items).slice(0, 14);
4734
+ return (r ? s.items.filter((u) => `${u.title} ${u.description ?? ""} ${u.group ?? ""}`.toLowerCase().includes(r)) : s.items).slice(0, 14);
4724
4735
  }), i = async () => {
4725
4736
  var r;
4726
4737
  a.value = !0, l.value = "", await $t(), (r = t.value) == null || r.focus();
4727
4738
  }, d = () => {
4728
4739
  a.value = !1, l.value = "";
4729
- }, u = (r) => {
4740
+ }, m = (r) => {
4730
4741
  if ((r.metaKey || r.ctrlKey) && r.key.toLowerCase() === "k") {
4731
4742
  r.preventDefault(), a.value ? d() : i();
4732
4743
  return;
@@ -4735,9 +4746,9 @@ end;`, detail: "event(name: string)" },
4735
4746
  };
4736
4747
  return ye(a, (r) => {
4737
4748
  typeof document < "u" && (document.body.style.overflow = r ? "hidden" : "");
4738
- }), be(() => window.addEventListener("keydown", u)), Ne(() => {
4739
- window.removeEventListener("keydown", u), typeof document < "u" && (document.body.style.overflow = "");
4740
- }), (r, c) => (f(), g(D, null, [
4749
+ }), be(() => window.addEventListener("keydown", m)), Ne(() => {
4750
+ window.removeEventListener("keydown", m), typeof document < "u" && (document.body.style.overflow = "");
4751
+ }), (r, c) => (f(), g(N, null, [
4741
4752
  n("button", {
4742
4753
  type: "button",
4743
4754
  class: "inline-flex h-9 items-center gap-2 rounded-md px-2.5 text-xs text-gray-dark-25 transition-colors hover:bg-white/50 hover:text-violet-main dark:text-gray-main dark:hover:bg-white/5 dark:hover:text-white",
@@ -4751,7 +4762,7 @@ end;`, detail: "event(name: string)" },
4751
4762
  n("span", yr, C(e.label), 1),
4752
4763
  c[1] || (c[1] = n("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))
4753
4764
  ], 8, hr),
4754
- (f(), O(ha, { to: "body" }, [
4765
+ (f(), M(ha, { to: "body" }, [
4755
4766
  a.value ? (f(), g("div", {
4756
4767
  key: 0,
4757
4768
  class: "fixed inset-0 z-[100] flex items-start justify-center overflow-y-auto bg-slate-900/40 px-4 pt-[12vh] backdrop-blur-sm dark:bg-black/60",
@@ -4772,7 +4783,7 @@ end;`, detail: "event(name: string)" },
4772
4783
  it(n("input", {
4773
4784
  ref_key: "input",
4774
4785
  ref: t,
4775
- "onUpdate:modelValue": c[0] || (c[0] = (m) => l.value = m),
4786
+ "onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
4776
4787
  type: "search",
4777
4788
  placeholder: e.placeholder,
4778
4789
  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"
@@ -4782,9 +4793,9 @@ end;`, detail: "event(name: string)" },
4782
4793
  c[2] || (c[2] = n("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))
4783
4794
  ]),
4784
4795
  n("div", $r, [
4785
- (f(!0), g(D, null, K(o.value, (m) => (f(), g("a", {
4786
- key: `${m.group}-${m.to}-${m.title}`,
4787
- href: m.to,
4796
+ (f(!0), g(N, null, K(o.value, (u) => (f(), g("a", {
4797
+ key: `${u.group}-${u.to}-${u.title}`,
4798
+ href: u.to,
4788
4799
  class: "flex items-start gap-3 rounded-md px-3 py-2.5 transition-colors hover:bg-white/50 dark:hover:bg-white/5",
4789
4800
  onClick: d
4790
4801
  }, [
@@ -4795,10 +4806,10 @@ end;`, detail: "event(name: string)" },
4795
4806
  }),
4796
4807
  n("span", Cr, [
4797
4808
  n("span", Sr, [
4798
- n("span", _r, C(m.title), 1),
4799
- m.group ? (f(), g("span", Tr, C(m.group), 1)) : T("", !0)
4809
+ n("span", _r, C(u.title), 1),
4810
+ u.group ? (f(), g("span", Tr, C(u.group), 1)) : T("", !0)
4800
4811
  ]),
4801
- m.description ? (f(), g("span", zr, C(m.description), 1)) : T("", !0)
4812
+ u.description ? (f(), g("span", zr, C(u.description), 1)) : T("", !0)
4802
4813
  ])
4803
4814
  ], 8, wr))), 128)),
4804
4815
  o.value.length ? T("", !0) : (f(), g("p", Ar, C(e.emptyText), 1))
@@ -4808,7 +4819,7 @@ end;`, detail: "event(name: string)" },
4808
4819
  ]))
4809
4820
  ], 64));
4810
4821
  }
4811
- }), Er = ["aria-label", "title"], Ad = /* @__PURE__ */ M({
4822
+ }), Er = ["aria-label", "title"], Ad = /* @__PURE__ */ O({
4812
4823
  __name: "VisionThemeToggle",
4813
4824
  props: {
4814
4825
  labelLight: { default: "Включить светлую тему" },
@@ -4835,7 +4846,7 @@ end;`, detail: "event(name: string)" },
4835
4846
  }, null, 8, ["name"])
4836
4847
  ], 8, Er));
4837
4848
  }
4838
- }), Ed = /* @__PURE__ */ M({
4849
+ }), Ed = /* @__PURE__ */ O({
4839
4850
  __name: "VAutocomplete",
4840
4851
  props: {
4841
4852
  modelValue: { default: "" },
@@ -4849,11 +4860,11 @@ end;`, detail: "event(name: string)" },
4849
4860
  const a = s, l = (o) => a("update:modelValue", o), t = (o, i) => {
4850
4861
  o.click(new Event("click")), a("select", i);
4851
4862
  };
4852
- return (o, i) => (f(), O(Gt, Y(o.$attrs, {
4863
+ return (o, i) => (f(), M(Gt, Y(o.$attrs, {
4853
4864
  top: "50px",
4854
4865
  "hide-on-click": ""
4855
4866
  }), {
4856
- activator: x(({ on: d }) => [
4867
+ activator: b(({ on: d }) => [
4857
4868
  v(ie, {
4858
4869
  "model-value": e.modelValue,
4859
4870
  name: e.name,
@@ -4863,13 +4874,13 @@ end;`, detail: "event(name: string)" },
4863
4874
  onClick: d.open
4864
4875
  }, null, 8, ["model-value", "name", "message", "label", "onClick"])
4865
4876
  ]),
4866
- default: x(({ on: d, isLgOrLarger: u }) => [
4877
+ default: b(({ on: d, isLgOrLarger: m }) => [
4867
4878
  v(wt, {
4868
4879
  items: e.items,
4869
- plain: !u,
4880
+ plain: !m,
4870
4881
  onClick: (r) => t(d, r)
4871
4882
  }, {
4872
- default: x(({ item: r }) => [
4883
+ default: b(({ item: r }) => [
4873
4884
  I(o.$slots, "default", { item: r }, () => [
4874
4885
  L(C(r.name), 1)
4875
4886
  ])
@@ -4880,7 +4891,7 @@ end;`, detail: "event(name: string)" },
4880
4891
  _: 3
4881
4892
  }, 16));
4882
4893
  }
4883
- }), Br = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, Vr = { class: "p-4" }, Bd = /* @__PURE__ */ M({
4894
+ }), Br = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, Vr = { class: "p-4" }, Bd = /* @__PURE__ */ O({
4884
4895
  __name: "VExpansion",
4885
4896
  props: {
4886
4897
  label: { default: "" },
@@ -4925,7 +4936,7 @@ end;`, detail: "event(name: string)" },
4925
4936
  }), Ir = ["onDragstart", "onDragenter"], Lr = {
4926
4937
  key: 0,
4927
4938
  class: "absolute inset-0 border border-dashed border-blue-600 rounded"
4928
- }, Vd = /* @__PURE__ */ M({
4939
+ }, Vd = /* @__PURE__ */ O({
4929
4940
  __name: "VDragDrop",
4930
4941
  props: {
4931
4942
  items: {},
@@ -4933,26 +4944,26 @@ end;`, detail: "event(name: string)" },
4933
4944
  },
4934
4945
  emits: ["update:items", "order-change"],
4935
4946
  setup(e, { emit: s }) {
4936
- const a = s, l = F(null), t = F(0), o = F(-1), i = ({ id: m }) => ({
4937
- "opacity-30 scale-105 z-10": l.value === m,
4938
- "transition-transform duration-200": l.value !== m
4939
- }), d = (m, p, b) => {
4940
- l.value = p, t.value = b, m.dataTransfer.effectAllowed = "move";
4941
- }, u = (m) => {
4942
- l.value !== null && (o.value = m);
4947
+ const a = s, l = F(null), t = F(0), o = F(-1), i = ({ id: u }) => ({
4948
+ "opacity-30 scale-105 z-10": l.value === u,
4949
+ "transition-transform duration-200": l.value !== u
4950
+ }), d = (u, p, k) => {
4951
+ l.value = p, t.value = k, u.dataTransfer.effectAllowed = "move";
4952
+ }, m = (u) => {
4953
+ l.value !== null && (o.value = u);
4943
4954
  }, r = () => {
4944
4955
  l.value = null, o.value = -1;
4945
- }, c = (m) => {
4946
- if (m.preventDefault(), l.value && o.value !== -1) {
4947
- const p = e.items.findIndex((h) => h[e.itemKey] === l.value), b = o.value;
4948
- if (p !== b && b !== -1) {
4949
- const h = [...e.items], [k] = h.splice(p, 1);
4950
- h.splice(b, 0, k), a("update:items", h), a("order-change", { fromIndex: p, toIndex: b, movedItem: k, newOrder: h });
4956
+ }, c = (u) => {
4957
+ if (u.preventDefault(), l.value && o.value !== -1) {
4958
+ const p = e.items.findIndex((h) => h[e.itemKey] === l.value), k = o.value;
4959
+ if (p !== k && k !== -1) {
4960
+ const h = [...e.items], [x] = h.splice(p, 1);
4961
+ h.splice(k, 0, x), a("update:items", h), a("order-change", { fromIndex: p, toIndex: k, movedItem: x, newOrder: h });
4951
4962
  }
4952
4963
  }
4953
4964
  o.value = -1;
4954
4965
  };
4955
- return (m, p) => (f(), g("div", {
4966
+ return (u, p) => (f(), g("div", {
4956
4967
  onDragover: p[1] || (p[1] = ee(() => {
4957
4968
  }, ["prevent"])),
4958
4969
  onDrop: c
@@ -4966,24 +4977,24 @@ end;`, detail: "event(name: string)" },
4966
4977
  "leave-to-class": "opacity-0 translate-x-8",
4967
4978
  "move-class": "transition-all duration-300 ease"
4968
4979
  }, {
4969
- default: x(() => [
4970
- (f(!0), g(D, null, K(e.items, (b, h) => (f(), g("div", {
4971
- key: `${b.id}_drug`,
4972
- class: B(["relative group", i(b)]),
4980
+ default: b(() => [
4981
+ (f(!0), g(N, null, K(e.items, (k, h) => (f(), g("div", {
4982
+ key: `${k.id}_drug`,
4983
+ class: B(["relative group", i(k)]),
4973
4984
  draggable: "true",
4974
- onDragstart: (k) => d(k, b.id, h),
4975
- onDragenter: (k) => u(h),
4985
+ onDragstart: (x) => d(x, k.id, h),
4986
+ onDragenter: (x) => m(h),
4976
4987
  onDragend: r,
4977
4988
  onDragover: p[0] || (p[0] = ee(() => {
4978
4989
  }, ["prevent"]))
4979
4990
  }, [
4980
- I(m.$slots, "default", {
4981
- item: b,
4982
- key: b.id,
4991
+ I(u.$slots, "default", {
4992
+ item: k,
4993
+ key: k.id,
4983
4994
  index: h,
4984
- isDragging: l.value === b.id
4995
+ isDragging: l.value === k.id
4985
4996
  }),
4986
- o.value === h && l.value !== b.id ? (f(), g("div", Lr)) : T("", !0)
4997
+ o.value === h && l.value !== k.id ? (f(), g("div", Lr)) : T("", !0)
4987
4998
  ], 42, Ir))), 128))
4988
4999
  ]),
4989
5000
  _: 3
@@ -4993,7 +5004,7 @@ end;`, detail: "event(name: string)" },
4993
5004
  }), Mr = { class: "glass-inset overflow-x-auto rounded-md" }, Or = { class: "min-w-full" }, Fr = { class: "border-y border-gray-light-10/70 py-3 dark:border-white/10" }, jr = { class: "bg-gray-light-30/70 dark:bg-white/[0.04]" }, Dr = { class: "flex items-center" }, Nr = { class: "divide-y divide-gray-light-30 dark:divide-white/5" }, Pr = ["onClick"], Rr = { class: "flex items-center text-gray-dark-30 dark:text-white/70" }, Ur = { key: 1 }, Kr = {
4994
5005
  class: "py-3 whitespace-nowrap",
4995
5006
  colspan: "9"
4996
- }, Wr = { class: "flex items-center justify-center px-2 text-sm text-gray-dark-25 dark:text-white/50" }, Id = /* @__PURE__ */ M({
5007
+ }, Wr = { class: "flex items-center justify-center px-2 text-sm text-gray-dark-25 dark:text-white/50" }, Id = /* @__PURE__ */ O({
4997
5008
  __name: "VTable",
4998
5009
  props: {
4999
5010
  headers: { default: () => [] },
@@ -5006,35 +5017,35 @@ end;`, detail: "event(name: string)" },
5006
5017
  n("table", Or, [
5007
5018
  n("thead", Fr, [
5008
5019
  n("tr", jr, [
5009
- (f(!0), g(D, null, K(e.headers, (u, r) => (f(), g("th", {
5020
+ (f(!0), g(N, null, K(e.headers, (m, r) => (f(), g("th", {
5010
5021
  key: r,
5011
- class: B(["px-4 py-2 whitespace-nowrap font-normal text-gray-dark-25 dark:text-white/50", t(u)])
5022
+ class: B(["px-4 py-2 whitespace-nowrap font-normal text-gray-dark-25 dark:text-white/50", t(m)])
5012
5023
  }, [
5013
5024
  I(i.$slots, "header", {
5014
- item: u,
5025
+ item: m,
5015
5026
  i: r
5016
5027
  }, () => [
5017
- n("div", Dr, C(u.name), 1)
5028
+ n("div", Dr, C(m.name), 1)
5018
5029
  ])
5019
5030
  ], 2))), 128))
5020
5031
  ])
5021
5032
  ]),
5022
5033
  n("tbody", Nr, [
5023
- e.items.length ? (f(!0), g(D, { key: 0 }, K(e.items, (u, r) => (f(), g("tr", {
5034
+ e.items.length ? (f(!0), g(N, { key: 0 }, K(e.items, (m, r) => (f(), g("tr", {
5024
5035
  key: r,
5025
5036
  class: "transition-colors hover:bg-cyan-main/[0.04] dark:hover:bg-white/[0.04]",
5026
- onClick: (c) => l(u, c)
5037
+ onClick: (c) => l(m, c)
5027
5038
  }, [
5028
- (f(!0), g(D, null, K(e.headers, (c, m) => (f(), g("td", {
5029
- key: m,
5039
+ (f(!0), g(N, null, K(e.headers, (c, u) => (f(), g("td", {
5040
+ key: u,
5030
5041
  class: "py-2 px-4"
5031
5042
  }, [
5032
5043
  n("div", Rr, [
5033
5044
  I(i.$slots, c.key, {
5034
- item: u,
5045
+ item: m,
5035
5046
  i: r
5036
5047
  }, () => [
5037
- L(C(o(u, c)), 1)
5048
+ L(C(o(m, c)), 1)
5038
5049
  ])
5039
5050
  ])
5040
5051
  ]))), 128))
@@ -5051,7 +5062,7 @@ end;`, detail: "event(name: string)" },
5051
5062
  ])
5052
5063
  ]));
5053
5064
  }
5054
- }), Ld = /* @__PURE__ */ M({
5065
+ }), Ld = /* @__PURE__ */ O({
5055
5066
  __name: "VTooltip",
5056
5067
  props: {
5057
5068
  timeout: {},
@@ -5083,7 +5094,7 @@ end;`, detail: "event(name: string)" },
5083
5094
  "leave-from-class": "opacity-100 translate-y-0",
5084
5095
  "leave-to-class": "transform opacity-0 -translate-y-2"
5085
5096
  }, {
5086
- default: x(() => [
5097
+ default: b(() => [
5087
5098
  I(o.$slots, "default", { show: s.value })
5088
5099
  ]),
5089
5100
  _: 3