vuesp-components 3.0.1 → 3.0.2

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,20 +1,20 @@
1
- import { defineComponent as L, resolveComponent as Rt, openBlock as f, createElementBlock as g, Fragment as D, createCommentVNode as T, createElementVNode as l, normalizeClass as M, createVNode as v, withCtx as x, createBlock as O, renderSlot as B, computed as C, withModifiers as Q, toDisplayString as w, unref as H, TransitionGroup as Pt, renderList as K, mergeProps as X, ref as F, watch as _e, resolveDynamicComponent as Ee, Transition as yt, normalizeStyle as Ve, createTextVNode as E, normalizeProps as ae, guardReactiveProps as se, onMounted as he, onUnmounted as Je, reactive as Ut, withDirectives as ot, vShow as ma, vModelText as bt, nextTick as xt, toValue as fa, useTemplateRef as Kt, createSlots as ga, isRef as va, Teleport as pa } from "vue";
2
- import { a as ha, V as Ht, i as j, j as I, g as Wt, f as kt, k as ya, b as ba, h as xa, d as ge, u as ka, _ as Se, e as le } from "../VDialog.vue_vue_type_script_setup_true_lang-C_akEjfi.js";
3
- import { I as $d, l as wd, m as Cd } from "../VDialog.vue_vue_type_script_setup_true_lang-C_akEjfi.js";
4
- import { f as $a, t as wa, g as Ca, u as tt, s as _a, d as Sa, m as Ta, c as Aa } from "../app-B45sALrX.js";
5
- import { e as $t, f as za, g as Ea, o as Va } from "../useDialog-Buvn63AR.js";
6
- import { useForm as Ba } from "../composables/index.es.js";
7
- import { required as Ia, maxLen as La } from "../validate/index.es.js";
8
- import { a as Ma } from "../paths-CbO4FuTv.js";
9
- const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Dr = /* @__PURE__ */ L({
1
+ import { defineComponent as L, resolveComponent as Rt, openBlock as f, createElementBlock as g, Fragment as D, createCommentVNode as T, createElementVNode as l, normalizeClass as M, createVNode as v, withCtx as x, createBlock as O, renderSlot as B, computed as C, withModifiers as Q, toDisplayString as w, unref as H, TransitionGroup as Pt, renderList as K, mergeProps as X, ref as F, watch as _e, resolveDynamicComponent as Ee, Transition as yt, normalizeStyle as Ve, createTextVNode as E, normalizeProps as se, guardReactiveProps as ae, onMounted as he, onUnmounted as Je, reactive as Ut, withDirectives as ot, vShow as ms, vModelText as bt, nextTick as xt, toValue as fs, useTemplateRef as Kt, createSlots as gs, isRef as vs, Teleport as ps } from "vue";
2
+ import { a as hs, V as Ht, i as j, j as I, g as Wt, f as kt, k as ys, b as bs, h as xs, d as ge, u as ks, _ as Se, e as le } from "../VDialog.vue_vue_type_script_setup_true_lang-DoK7s9gY.js";
3
+ import { I as $d, l as wd, m as Cd } from "../VDialog.vue_vue_type_script_setup_true_lang-DoK7s9gY.js";
4
+ import { f as $s, t as ws, g as Cs, u as tt, s as _s, d as Ss, m as Ts, c as zs } from "../app-B45sALrX.js";
5
+ import { e as $t, f as As, g as Es, o as Vs } from "../useDialog-Buvn63AR.js";
6
+ import { useForm as Bs } from "../composables/index.es.js";
7
+ import { required as Is, maxLen as Ls } from "../validate/index.es.js";
8
+ import { a as Ms } from "../paths-CbO4FuTv.js";
9
+ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Dr = /* @__PURE__ */ L({
10
10
  __name: "AppAside",
11
11
  props: {
12
12
  isSidebar: { type: Boolean, default: !1 }
13
13
  },
14
14
  emits: ["sidebar"],
15
- setup(e, { emit: s }) {
16
- const a = s, n = () => {
17
- e.isSidebar && a("sidebar", !e.isSidebar);
15
+ setup(e, { emit: a }) {
16
+ const s = a, n = () => {
17
+ e.isSidebar && s("sidebar", !e.isSidebar);
18
18
  };
19
19
  return (t, o) => {
20
20
  const r = Rt("router-link");
@@ -32,7 +32,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
32
32
  }, [
33
33
  v(r, { to: "/" }, {
34
34
  default: x(() => [
35
- e.isSidebar ? (f(), O(ha, {
35
+ e.isSidebar ? (f(), O(hs, {
36
36
  key: 0,
37
37
  class: "h-7 text-cyan-main"
38
38
  })) : (f(), O(Ht, {
@@ -43,36 +43,36 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
43
43
  _: 1
44
44
  })
45
45
  ], 2),
46
- l("div", Oa, [
46
+ l("div", Os, [
47
47
  B(t.$slots, "default")
48
48
  ])
49
49
  ], 2)
50
50
  ], 64);
51
51
  };
52
52
  }
53
- }), Fa = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-card" }, Da = { class: "px-4 py-4 sm:px-6 lg:px-8" }, ja = { class: "container mx-auto flex flex-auto items-center" }, Na = { class: "lg:hidden h-7" }, Ra = { class: "gap-4 hidden lg:flex" }, Pa = { class: "lg:hidden flex gap-4" }, Ua = { class: "ms-2" }, jr = /* @__PURE__ */ L({
53
+ }), Fs = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-card" }, Ds = { class: "px-4 py-4 sm:px-6 lg:px-8" }, js = { class: "container mx-auto flex flex-auto items-center" }, Ns = { class: "lg:hidden h-7" }, Rs = { class: "gap-4 hidden lg:flex" }, Ps = { class: "lg:hidden flex gap-4" }, Us = { class: "ms-2" }, jr = /* @__PURE__ */ L({
54
54
  __name: "AppHeader",
55
55
  props: {
56
56
  changeTheme: { type: Function },
57
57
  notifications: {}
58
58
  },
59
59
  emits: ["sidebar", "notif"],
60
- setup(e, { emit: s }) {
61
- const a = s, n = [
60
+ setup(e, { emit: a }) {
61
+ const s = a, n = [
62
62
  { name: "Theme", value: 1 },
63
63
  { name: "Notification", value: 2 },
64
64
  { name: "Logout", value: 3 }
65
- ], t = C(() => !!e.notifications.find((c) => c.isNew)), o = (c) => a("sidebar", c), r = (c) => a("notif", c), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), u = () => {
65
+ ], t = C(() => !!e.notifications.find((c) => c.isNew)), o = (c) => s("sidebar", c), r = (c) => s("notif", c), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), u = () => {
66
66
  e.changeTheme && e.changeTheme();
67
67
  }, i = ({ value: c }, m) => {
68
68
  c == 1 && u(), c == 2 && r(m), c == 3 && d();
69
69
  };
70
70
  return (c, m) => {
71
71
  const p = Rt("router-link");
72
- return f(), g("header", Fa, [
72
+ return f(), g("header", Fs, [
73
73
  m[3] || (m[3] = l("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
- l("div", Da, [
75
- l("div", ja, [
74
+ l("div", Ds, [
75
+ l("div", js, [
76
76
  v(j, {
77
77
  type: "icon",
78
78
  onClick: o
@@ -86,7 +86,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
86
86
  _: 1
87
87
  }),
88
88
  m[1] || (m[1] = l("div", { class: "lg:hidden flex-auto" }, null, -1)),
89
- l("div", Na, [
89
+ l("div", Ns, [
90
90
  v(p, { to: "/" }, {
91
91
  default: x(() => [
92
92
  v(Ht, { class: "h-7 text-cyan-main" })
@@ -95,7 +95,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
95
95
  })
96
96
  ]),
97
97
  m[2] || (m[2] = l("div", { class: "flex-auto" }, null, -1)),
98
- l("div", Ra, [
98
+ l("div", Rs, [
99
99
  v(j, {
100
100
  type: "icon",
101
101
  onClick: u
@@ -103,11 +103,11 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
103
103
  default: x(() => [
104
104
  v(I, {
105
105
  name: "sun",
106
- class: "dark:hidden"
106
+ class: "size-5 dark:hidden"
107
107
  }),
108
108
  v(I, {
109
109
  name: "moon",
110
- class: "hidden dark:flex"
110
+ class: "hidden size-5 dark:flex"
111
111
  })
112
112
  ]),
113
113
  _: 1
@@ -142,7 +142,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
142
142
  _: 1
143
143
  })
144
144
  ]),
145
- l("div", Pa, [
145
+ l("div", Ps, [
146
146
  v(Wt, {
147
147
  left: "unset",
148
148
  right: "0",
@@ -155,7 +155,10 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
155
155
  onClick: b.click
156
156
  }, {
157
157
  default: x(() => [
158
- v(I, { name: "more" })
158
+ v(I, {
159
+ name: "more",
160
+ class: "size-5"
161
+ })
159
162
  ]),
160
163
  _: 1
161
164
  }, 8, ["onClick"])
@@ -166,7 +169,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
166
169
  onClick: i
167
170
  }, {
168
171
  default: x(({ item: b }) => [
169
- l("span", Ua, w(b.name), 1)
172
+ l("span", Us, w(b.name), 1)
170
173
  ]),
171
174
  _: 1
172
175
  })
@@ -179,7 +182,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
179
182
  ]);
180
183
  };
181
184
  }
182
- }), Ka = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Ha = { class: "flex-auto text-xs" }, Wa = { class: "text-gray-dark-25 dark:text-gray-main mt-1" }, Ga = /* @__PURE__ */ L({
185
+ }), Ks = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Hs = { class: "flex-auto text-xs" }, Ws = { class: "text-gray-dark-25 dark:text-gray-main mt-1" }, Gs = /* @__PURE__ */ L({
183
186
  __name: "CardNotification",
184
187
  props: {
185
188
  empty: {},
@@ -190,11 +193,11 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
190
193
  text: {}
191
194
  },
192
195
  emits: ["remove", "read"],
193
- setup(e, { emit: s }) {
194
- const a = e, n = s, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], o = (u) => t[u], r = (u) => n("remove", u), d = (u) => n("read", u);
195
- return (u, i) => (f(), g("div", Ka, [
196
+ setup(e, { emit: a }) {
197
+ const s = e, n = a, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], o = (u) => t[u], r = (u) => n("remove", u), d = (u) => n("read", u);
198
+ return (u, i) => (f(), g("div", Ks, [
196
199
  l("div", {
197
- class: M(["absolute left-0 top-0 w-1 h-full", o(a.color)])
200
+ class: M(["absolute left-0 top-0 w-1 h-full", o(s.color)])
198
201
  }, null, 2),
199
202
  v(j, {
200
203
  class: "shrink-0",
@@ -203,7 +206,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
203
206
  }, {
204
207
  default: x(() => [
205
208
  l("span", {
206
- class: M([a.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
209
+ class: M([s.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
207
210
  }, [...i[0] || (i[0] = [
208
211
  l("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
209
212
  ])], 2),
@@ -214,9 +217,9 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
214
217
  ]),
215
218
  _: 1
216
219
  }),
217
- l("div", Ha, [
218
- l("div", null, w(a.text), 1),
219
- l("div", Wa, w(H($a)(a.date)) + " (" + w(H(wa)(a.date)) + ")", 1)
220
+ l("div", Hs, [
221
+ l("div", null, w(s.text), 1),
222
+ l("div", Ws, w(H($s)(s.date)) + " (" + w(H(ws)(s.date)) + ")", 1)
220
223
  ]),
221
224
  v(j, {
222
225
  class: "shrink-0",
@@ -234,7 +237,7 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
234
237
  })
235
238
  ]));
236
239
  }
237
- }), Ja = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Xa = {
240
+ }), Js = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Xs = {
238
241
  key: 0,
239
242
  class: "flex flex-col gap-2 p-2"
240
243
  }, Nr = /* @__PURE__ */ L({
@@ -244,20 +247,20 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
244
247
  notifications: {}
245
248
  },
246
249
  emits: ["close", "remove", "read"],
247
- setup(e, { emit: s }) {
248
- const a = e, n = s, t = C(() => !!a.notifications.find((i) => i.isNew)), o = C(() => !!a.notifications.length), r = (i) => n("close", i), d = (i) => n("remove", i), u = (i) => n("read", i);
250
+ setup(e, { emit: a }) {
251
+ const s = e, n = a, t = C(() => !!s.notifications.find((i) => i.isNew)), o = C(() => !!s.notifications.length), r = (i) => n("close", i), d = (i) => n("remove", i), u = (i) => n("read", i);
249
252
  return (i, c) => (f(), g(D, null, [
250
- a.value ? (f(), g("div", {
253
+ s.value ? (f(), g("div", {
251
254
  key: 0,
252
255
  class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
253
256
  onClick: r
254
257
  })) : T("", !0),
255
258
  l("aside", {
256
- class: M([a.value ? "translate-x-0 " : "translate-x-full", "overflow-x-hidden fixed top-18 bottom-0 right-0 flex w-72 md:w-80 border-l border-gray-light-10/70 flex-col overflow-y-auto transition-all duration-350 dark:border-white/10 bg-white/90 backdrop-blur-2xl dark:bg-night-main/80"])
259
+ class: M([s.value ? "translate-x-0 " : "translate-x-full", "overflow-x-hidden fixed top-18 bottom-0 right-0 flex w-72 md:w-80 border-l border-gray-light-10/70 flex-col overflow-y-auto transition-all duration-350 dark:border-white/10 bg-white/90 backdrop-blur-2xl dark:bg-night-main/80"])
257
260
  }, [
258
- l("div", Ja, [
261
+ l("div", Js, [
259
262
  B(i.$slots, "header", { isNew: t.value }),
260
- o.value ? (f(), g("div", Xa, [
263
+ o.value ? (f(), g("div", Xs, [
261
264
  v(Pt, {
262
265
  "enter-active-class": "transition-all duration-300 ",
263
266
  "enter-from-class": "opacity-0 translate-x-1/2",
@@ -267,12 +270,12 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
267
270
  "leave-to-class": "opacity-0 translate-x-1/2"
268
271
  }, {
269
272
  default: x(() => [
270
- (f(!0), g(D, null, K(a.notifications, (m) => (f(), g("div", {
273
+ (f(!0), g(D, null, K(s.notifications, (m) => (f(), g("div", {
271
274
  key: m.date,
272
275
  class: "relative"
273
276
  }, [
274
277
  B(i.$slots, "card", { item: m }, () => [
275
- v(Ga, X({ ref_for: !0 }, m, {
278
+ v(Gs, X({ ref_for: !0 }, m, {
276
279
  class: "rounded-md border border-gray-light-10/60 bg-white/50 dark:border-white/5 dark:bg-white/[0.03]",
277
280
  onRemove: (p) => d(m),
278
281
  onRead: (p) => u(m)
@@ -287,19 +290,19 @@ const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
287
290
  ], 2)
288
291
  ], 64));
289
292
  }
290
- }), qa = {}, Ya = { class: "fixed h-full w-full top-0 left-0 z-20" }, Za = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
291
- function Qa(e, s) {
292
- return f(), g("div", Ya, [
293
- s[0] || (s[0] = l("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
294
- l("div", Za, [
293
+ }), qs = {}, Ys = { class: "fixed h-full w-full top-0 left-0 z-20" }, Zs = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
294
+ function Qs(e, a) {
295
+ return f(), g("div", Ys, [
296
+ a[0] || (a[0] = l("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
297
+ l("div", Zs, [
295
298
  B(e.$slots, "default")
296
299
  ])
297
300
  ]);
298
301
  }
299
- const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex flex-col gap-2" }, ts = { class: "size-6 flex-[0_0_24px] opacity-60" }, as = ["onClick"], ss = { class: "flex flex-col gap-2" }, ls = { class: "flex gap-2 ms-8" }, ns = { class: "size-5 flex-[0_0_24px]" }, os = { class: "flex-1 first-letter:uppercase text-sm" }, is = {
302
+ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex flex-col gap-2" }, ta = { class: "size-5 flex-[0_0_20px] opacity-60" }, sa = ["onClick"], aa = { class: "flex flex-col gap-2" }, la = { class: "flex gap-2 ms-8" }, na = { class: "size-5 flex-[0_0_20px]" }, oa = { class: "flex-1 first-letter:uppercase text-sm" }, ia = {
300
303
  key: 0,
301
304
  class: "mt-2"
302
- }, rs = { class: "flex flex-col gap-2" }, ds = { class: "flex gap-2 ms-14" }, cs = { class: "size-5 flex-[0_0_24px]" }, us = { class: "flex-1 first-letter:uppercase text-sm" }, Pr = /* @__PURE__ */ L({
305
+ }, ra = { class: "flex flex-col gap-2" }, da = { class: "flex gap-2 ms-14" }, ca = { class: "size-5 flex-[0_0_20px]" }, ua = { class: "flex-1 first-letter:uppercase text-sm" }, Pr = /* @__PURE__ */ L({
303
306
  __name: "AppNav",
304
307
  props: {
305
308
  menu: { default: () => [] },
@@ -307,9 +310,9 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
307
310
  isSidebar: { type: Boolean, default: !1 }
308
311
  },
309
312
  emits: ["sidebar"],
310
- setup(e, { emit: s }) {
311
- const a = s, n = F(""), t = ({ name: i }) => {
312
- e.isSidebar && a("sidebar", !e.isSidebar), n.value !== i && (n.value = n.value === i ? "" : i);
313
+ setup(e, { emit: a }) {
314
+ const s = a, n = F(""), t = ({ name: i }) => {
315
+ e.isSidebar && s("sidebar", !e.isSidebar), n.value !== i && (n.value = n.value === i ? "" : i);
313
316
  }, o = (i) => e.fullPath === i, r = (i) => i ? e.fullPath === i || e.fullPath.startsWith(i) : !1, d = (i, c) => !i.path || c === "/" || i.path === "/" ? !1 : i.path === c || c.includes(i.path), u = (i, c) => (i == null ? void 0 : i.find(
314
317
  (m) => {
315
318
  var p;
@@ -325,10 +328,10 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
325
328
  () => e.menu,
326
329
  () => {
327
330
  var i;
328
- return n.value = ((i = u(e.menu, e.fullPath) ?? Ca(e.menu, e.fullPath)) == null ? void 0 : i.name) || "";
331
+ return n.value = ((i = u(e.menu, e.fullPath) ?? Cs(e.menu, e.fullPath)) == null ? void 0 : i.name) || "";
329
332
  }
330
333
  ), (i, c) => (f(), g("nav", null, [
331
- l("ul", es, [
334
+ l("ul", ea, [
332
335
  (f(!0), g(D, null, K(e.menu, (m) => (f(), g("li", {
333
336
  key: m.name
334
337
  }, [
@@ -338,7 +341,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
338
341
  onClick: Q((p) => t(m), ["prevent", "stop"])
339
342
  }, {
340
343
  default: x(() => [
341
- l("div", ts, [
344
+ l("div", ta, [
342
345
  B(i.$slots, "icon", { item: m })
343
346
  ]),
344
347
  l("span", {
@@ -350,9 +353,10 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
350
353
  }, [
351
354
  m.children ? (f(), O(I, {
352
355
  key: 0,
353
- name: "arrow-right"
356
+ name: "arrow-right",
357
+ class: "size-5"
354
358
  })) : T("", !0)
355
- ], 10, as)
359
+ ], 10, sa)
356
360
  ]),
357
361
  _: 2
358
362
  }, 1032, ["to", "class", "onClick"])),
@@ -360,26 +364,26 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
360
364
  key: 0,
361
365
  class: M(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", n.value === m.name ? "block" : "hidden"]])
362
366
  }, [
363
- l("ul", ss, [
367
+ l("ul", aa, [
364
368
  (f(!0), g(D, null, K(m.children, ({ name: p, path: b, icon: h, children: k }) => (f(), g("li", { key: p }, [
365
369
  (f(), O(Ee(b ? "router-link" : "span"), {
366
370
  to: b,
367
371
  class: M(["flex gap-2 items-center px-3 py-2 rounded", o(b) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
368
372
  }, {
369
373
  default: x(() => [
370
- l("div", ls, [
371
- l("div", ns, [
374
+ l("div", la, [
375
+ l("div", na, [
372
376
  B(i.$slots, "icon-children", {
373
377
  item: { name: p, path: b, icon: h }
374
378
  })
375
379
  ]),
376
- l("span", os, w(p), 1)
380
+ l("span", oa, w(p), 1)
377
381
  ])
378
382
  ]),
379
383
  _: 2
380
384
  }, 1032, ["to", "class"])),
381
- k != null && k.length && r(b) ? (f(), g("div", is, [
382
- l("ul", rs, [
385
+ k != null && k.length && r(b) ? (f(), g("div", ia, [
386
+ l("ul", ra, [
383
387
  (f(!0), g(D, null, K(k, (_) => (f(), g("li", {
384
388
  key: _.name
385
389
  }, [
@@ -388,11 +392,11 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
388
392
  class: M(["flex gap-2 items-center px-3 py-2 rounded", o(_.path) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
389
393
  }, {
390
394
  default: x(() => [
391
- l("div", ds, [
392
- l("div", cs, [
395
+ l("div", da, [
396
+ l("div", ca, [
393
397
  B(i.$slots, "icon-children", { item: _ })
394
398
  ]),
395
- l("span", us, w(_.name), 1)
399
+ l("span", ua, w(_.name), 1)
396
400
  ])
397
401
  ]),
398
402
  _: 2
@@ -407,17 +411,17 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
407
411
  ])
408
412
  ]));
409
413
  }
410
- }), ms = {
414
+ }), ma = {
411
415
  key: 0,
412
416
  class: "glass-inset w-full min-w-64 max-w-xs rounded-xl p-4 shadow-lg",
413
417
  role: "alert"
414
- }, fs = { class: "flex items-center gap-4 text-sm" }, gs = {
418
+ }, fa = { class: "flex items-center gap-4 text-sm" }, ga = {
415
419
  key: 0,
416
420
  class: "text-green-600"
417
- }, vs = {
421
+ }, va = {
418
422
  key: 1,
419
423
  class: "relative mt-2 block h-4 w-full select-none overflow-hidden rounded-md bg-gray-light-10/70 dark:bg-white/10"
420
- }, ps = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, hs = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Ur = /* @__PURE__ */ L({
424
+ }, pa = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, ha = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Ur = /* @__PURE__ */ L({
421
425
  __name: "AppProgress",
422
426
  props: {
423
427
  timeout: { default: 5e3 },
@@ -428,13 +432,13 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
428
432
  length: { default: 0 }
429
433
  },
430
434
  setup(e) {
431
- const s = F(!1), a = C(() => !!e.length), n = C(() => !!(a.value && t.value === 100 && !e.status)), t = C(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), o = $t(() => {
432
- s.value = !1;
435
+ const a = F(!1), s = C(() => !!e.length), n = C(() => !!(s.value && t.value === 100 && !e.status)), t = C(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), o = $t(() => {
436
+ a.value = !1;
433
437
  }, e.timeout);
434
438
  return _e(
435
439
  () => [e.size, e.status],
436
440
  () => {
437
- s.value = !0, o();
441
+ a.value = !0, o();
438
442
  }
439
443
  ), (r, d) => (f(), O(yt, {
440
444
  "enter-active-class": "duration-300 ease-out",
@@ -445,15 +449,15 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
445
449
  "leave-to-class": "transform opacity-0 -translate-y-8"
446
450
  }, {
447
451
  default: x(() => [
448
- s.value ? (f(), g("div", ms, [
449
- l("div", fs, [
452
+ a.value ? (f(), g("div", ma, [
453
+ l("div", fa, [
450
454
  B(r.$slots, "default", { isDone: n.value }, () => [
451
455
  d[1] || (d[1] = l("div", { class: "flex-auto" }, "Progress...", -1)),
452
- n.value ? (f(), g("span", gs, "Done")) : T("", !0)
456
+ n.value ? (f(), g("span", ga, "Done")) : T("", !0)
453
457
  ]),
454
458
  l("button", {
455
459
  class: "cursor-pointer transition text-gray-dark-30 dark:text-gray-main self-start hover:text-gray-dark-25",
456
- onClick: d[0] || (d[0] = (u) => s.value = !1)
460
+ onClick: d[0] || (d[0] = (u) => a.value = !1)
457
461
  }, [
458
462
  v(I, {
459
463
  name: "close",
@@ -461,18 +465,18 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
461
465
  })
462
466
  ])
463
467
  ]),
464
- a.value ? (f(), g("div", {
468
+ s.value ? (f(), g("div", {
465
469
  key: 0,
466
470
  class: "h-0.5 fixed top-0 left-0 w-full bg-blue-600 transition-all duration-500",
467
471
  style: Ve(`width: ${t.value}%`)
468
472
  }, null, 4)) : T("", !0),
469
- a.value ? (f(), g("div", vs, [
470
- l("div", ps, w(t.value) + "%", 1),
473
+ s.value ? (f(), g("div", va, [
474
+ l("div", pa, w(t.value) + "%", 1),
471
475
  l("div", {
472
476
  class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
473
477
  style: Ve(`width: ${t.value}%`)
474
478
  }, [
475
- l("div", hs, w(t.value) + "%", 1)
479
+ l("div", ha, w(t.value) + "%", 1)
476
480
  ], 4)
477
481
  ])) : T("", !0)
478
482
  ])) : T("", !0)
@@ -480,7 +484,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
480
484
  _: 3
481
485
  }));
482
486
  }
483
- }), ys = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, bs = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, xs = { class: "flex gap-2" }, ks = { class: "text-gray-dark-30 dark:text-gray-main" }, $s = { class: "flex gap-2" }, ws = { class: "flex gap-2" }, Cs = { class: "text-gray-dark-30 dark:text-gray-main" }, _s = { class: "flex gap-2" }, Ss = { class: "text-gray-dark-30 dark:text-gray-main" }, Ts = { class: "flex flex-col gap-4 text-sm" }, As = { class: "flex gap-4" }, Kr = /* @__PURE__ */ L({
487
+ }), ya = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, ba = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, xa = { class: "flex gap-2" }, ka = { class: "text-gray-dark-30 dark:text-gray-main" }, $a = { class: "flex gap-2" }, wa = { class: "flex gap-2" }, Ca = { class: "text-gray-dark-30 dark:text-gray-main" }, _a = { class: "flex gap-2" }, Sa = { class: "text-gray-dark-30 dark:text-gray-main" }, Ta = { class: "flex flex-col gap-4 text-sm" }, za = { class: "flex gap-4" }, Kr = /* @__PURE__ */ L({
484
488
  __name: "BlockInfo",
485
489
  props: {
486
490
  pkg: {},
@@ -493,7 +497,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
493
497
  board: {}
494
498
  },
495
499
  setup(e) {
496
- const s = C(() => e.firmware.join(".")), a = C(() => {
500
+ const a = C(() => e.firmware.join(".")), s = C(() => {
497
501
  var t, o, r, d, u, i, c;
498
502
  const n = [];
499
503
  return (t = e.pkg) != null && t.homepage && n.push({ name: "homepage", href: e.pkg.homepage }), (r = (o = e.pkg) == null ? void 0 : o.repository) != null && r.url && n.push({ name: "repository", href: e.pkg.repository.url }), (u = (d = e.pkg) == null ? void 0 : d.bugs) != null && u.url && n.push({ name: "bugs", href: e.pkg.bugs.url }), (i = e.pkg) != null && i.author && n.push({ name: "author", href: `mailto:${(c = e.pkg) == null ? void 0 : c.author}` }), n;
@@ -501,46 +505,46 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
501
505
  return (n, t) => {
502
506
  var o, r;
503
507
  return f(), g("div", null, [
504
- l("p", ys, w((o = e.pkg) == null ? void 0 : o.description), 1),
505
- l("div", bs, [
506
- l("div", xs, [
508
+ l("p", ya, w((o = e.pkg) == null ? void 0 : o.description), 1),
509
+ l("div", ba, [
510
+ l("div", xa, [
507
511
  t[0] || (t[0] = E(" Firmware (hw): ", -1)),
508
- l("span", ks, w(s.value), 1)
512
+ l("span", ka, w(a.value), 1)
509
513
  ]),
510
- l("div", $s, [
511
- l("div", ws, [
514
+ l("div", $a, [
515
+ l("div", wa, [
512
516
  t[1] || (t[1] = E(" Version (web): ", -1)),
513
- l("span", Cs, w((r = e.pkg) == null ? void 0 : r.version), 1)
517
+ l("span", Ca, w((r = e.pkg) == null ? void 0 : r.version), 1)
514
518
  ])
515
519
  ]),
516
520
  t[3] || (t[3] = l("div", { class: "flex-auto" }, null, -1)),
517
- l("div", _s, [
521
+ l("div", _a, [
518
522
  t[2] || (t[2] = E(" ID: ", -1)),
519
- l("span", Ss, w(e.id.toString(16)), 1)
523
+ l("span", Sa, w(e.id.toString(16)), 1)
520
524
  ])
521
525
  ]),
522
526
  t[4] || (t[4] = l("hr", { class: "dark:text-gray-dark-30 text-gray-light-10 my-2" }, null, -1)),
523
- l("div", Ts, [
524
- l("div", As, [
525
- B(n.$slots, "links", { links: a.value })
527
+ l("div", Ta, [
528
+ l("div", za, [
529
+ B(n.$slots, "links", { links: s.value })
526
530
  ])
527
531
  ])
528
532
  ]);
529
533
  };
530
534
  }
531
- }), zs = ["onClick"], Es = { class: "mr-2" }, Vs = { class: "text-sm" }, Bs = { class: "text-gray-main text-xs" }, Is = {
535
+ }), Aa = ["onClick"], Ea = { class: "mr-2" }, Va = { class: "text-sm" }, Ba = { class: "text-gray-main text-xs" }, Ia = {
532
536
  key: 0,
533
537
  class: "flex justify-center"
534
- }, Ls = { class: "flex justify-end mt-4" }, Hr = /* @__PURE__ */ L({
538
+ }, La = { class: "flex justify-end mt-4" }, Hr = /* @__PURE__ */ L({
535
539
  __name: "BlockScan",
536
540
  props: {
537
541
  items: { default: () => [] }
538
542
  },
539
543
  emits: ["scan", "select"],
540
- setup(e, { emit: s }) {
541
- const a = s, n = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (r) => a("select", r), o = (r) => a("scan", r);
544
+ setup(e, { emit: a }) {
545
+ const s = a, n = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (r) => s("select", r), o = (r) => s("scan", r);
542
546
  return (r, d) => {
543
- const u = ba, i = kt, c = xa, m = j;
547
+ const u = bs, i = kt, c = xs, m = j;
544
548
  return f(), g("div", null, [
545
549
  v(i, {
546
550
  items: e.items,
@@ -551,21 +555,21 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
551
555
  class: "flex items-center w-full",
552
556
  onClick: (b) => t(p)
553
557
  }, [
554
- l("div", Es, [
555
- v(u, ae(se(p)), null, 16)
558
+ l("div", Ea, [
559
+ v(u, se(ae(p)), null, 16)
556
560
  ]),
557
561
  l("div", null, [
558
- l("div", Vs, w(p.ssid), 1),
559
- l("div", Bs, w(r.$t("security")) + " : " + w(n[p.encryptionType] || "unknown"), 1)
562
+ l("div", Va, w(p.ssid), 1),
563
+ l("div", Ba, w(r.$t("security")) + " : " + w(n[p.encryptionType] || "unknown"), 1)
560
564
  ])
561
- ], 8, zs)
565
+ ], 8, Aa)
562
566
  ]),
563
567
  _: 1
564
568
  }, 8, ["items"]),
565
- e.items.length ? T("", !0) : (f(), g("div", Is, [
569
+ e.items.length ? T("", !0) : (f(), g("div", Ia, [
566
570
  v(c, { class: "text-cyan-main" })
567
571
  ])),
568
- l("div", Ls, [
572
+ l("div", La, [
569
573
  v(m, {
570
574
  color: "blue",
571
575
  onClick: o
@@ -579,24 +583,24 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
579
583
  ]);
580
584
  };
581
585
  }
582
- }), Ms = { class: "md:flex items-center mb-4" }, Os = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Fs = { class: "md:max-w-50" }, Ds = { class: "flex items-center mb-4" }, js = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Ns = { class: "flex items-center mb-4" }, Rs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Wr = /* @__PURE__ */ L({
586
+ }), Ma = { class: "md:flex items-center mb-4" }, Oa = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Fa = { class: "md:max-w-50" }, Da = { class: "flex items-center mb-4" }, ja = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Na = { class: "flex items-center mb-4" }, Ra = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Wr = /* @__PURE__ */ L({
583
587
  __name: "BlockService",
584
588
  props: {
585
589
  locale: {},
586
590
  locales: {}
587
591
  },
588
592
  emits: ["reboot", "reset", "locale"],
589
- setup(e, { emit: s }) {
590
- const a = s, n = (o) => a("locale", o), t = (o) => {
593
+ setup(e, { emit: a }) {
594
+ const s = a, n = (o) => s("locale", o), t = (o) => {
591
595
  var r;
592
596
  return (r = e.locales.find((d) => d.value === o)) == null ? void 0 : r.name;
593
597
  };
594
598
  return (o, r) => {
595
599
  const d = ge, u = j;
596
600
  return f(), g(D, null, [
597
- l("div", Ms, [
598
- l("div", Os, w(o.$t("selectLang")), 1),
599
- l("div", Fs, [
601
+ l("div", Ma, [
602
+ l("div", Oa, w(o.$t("selectLang")), 1),
603
+ l("div", Fa, [
600
604
  v(d, {
601
605
  "model-value": t(e.locale),
602
606
  label: o.$t("lang"),
@@ -605,13 +609,13 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
605
609
  }, null, 8, ["model-value", "label", "items"])
606
610
  ])
607
611
  ]),
608
- l("div", Ds, [
609
- l("div", js, w(o.$t("rebootDev")), 1),
612
+ l("div", Da, [
613
+ l("div", ja, w(o.$t("rebootDev")), 1),
610
614
  v(u, {
611
615
  class: "min-w-24",
612
616
  color: "red",
613
617
  variant: "outline",
614
- onClick: r[0] || (r[0] = (i) => a("reboot", i))
618
+ onClick: r[0] || (r[0] = (i) => s("reboot", i))
615
619
  }, {
616
620
  default: x(() => [
617
621
  E(w(o.$t("reboot")), 1)
@@ -619,12 +623,12 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
619
623
  _: 1
620
624
  })
621
625
  ]),
622
- l("div", Ns, [
623
- l("div", Rs, w(o.$t("resetConf")), 1),
626
+ l("div", Na, [
627
+ l("div", Ra, w(o.$t("resetConf")), 1),
624
628
  v(u, {
625
629
  class: "min-w-24",
626
630
  color: "red",
627
- onClick: r[1] || (r[1] = (i) => a("reset", i))
631
+ onClick: r[1] || (r[1] = (i) => s("reset", i))
628
632
  }, {
629
633
  default: x(() => [
630
634
  E(w(o.$t("reset")), 1)
@@ -635,7 +639,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
635
639
  ], 64);
636
640
  };
637
641
  }
638
- }), Ps = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, Us = { class: "flex flex-col w-full items-center gap-2" }, Ks = ["title"], Hs = { class: "absolute left-28 top-1/2 -translate-1/2 text-center text-sm font-bold leading-none text-gray-dark-40 dark:text-white" }, Ws = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Gs = { class: "flex justify-between w-full text-xs" }, Js = { class: "text-gray-dark-25 dark:text-white/50" }, Xs = { class: "text-sm" }, qs = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, Ys = { class: "text-right text-xs" }, Gr = /* @__PURE__ */ L({
642
+ }), Pa = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, Ua = { class: "flex flex-col w-full items-center gap-2" }, Ka = ["title"], Ha = { 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" }, Wa = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Ga = { class: "flex justify-between w-full text-xs" }, Ja = { class: "text-gray-dark-25 dark:text-white/50" }, Xa = { class: "text-sm" }, qa = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, Ya = { class: "text-right text-xs" }, Gr = /* @__PURE__ */ L({
639
643
  __name: "BlockStatus",
640
644
  props: {
641
645
  pkg: {},
@@ -648,8 +652,8 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
648
652
  board: {}
649
653
  },
650
654
  setup(e) {
651
- const s = F(e.uptime);
652
- let a = null;
655
+ const a = F(e.uptime);
656
+ let s = null;
653
657
  const n = C(() => e.firmware.join(".")), t = C(() => [
654
658
  { name: "used", value: tt(e.usedBytes) },
655
659
  { name: "available", value: tt(e.totalBytes - e.usedBytes) },
@@ -657,55 +661,55 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
657
661
  ]), o = C(() => {
658
662
  var u;
659
663
  return [
660
- { name: "uptime", value: _a(s.value) },
664
+ { name: "uptime", value: _s(a.value) },
661
665
  { name: "id", value: `${e.id.toString(16)} (${e.id})` },
662
666
  { name: "firmware", value: n.value },
663
667
  { name: "version", value: (u = e.pkg) == null ? void 0 : u.version }
664
668
  ];
665
669
  }), r = C(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), d = () => {
666
- s.value++, a = setTimeout(d, 1e3);
670
+ a.value++, s = setTimeout(d, 1e3);
667
671
  };
668
672
  return he(() => {
669
673
  d();
670
674
  }), Je(() => {
671
- s.value = 0, a && clearTimeout(a);
675
+ a.value = 0, s && clearTimeout(s);
672
676
  }), (u, i) => {
673
677
  var c, m, p;
674
- return f(), g("div", Ps, [
675
- l("div", Us, [
678
+ return f(), g("div", Pa, [
679
+ l("div", Ua, [
676
680
  l("div", {
677
681
  class: "relative block h-4 w-full select-none overflow-hidden rounded-md bg-gray-light-10/70 dark:bg-white/10",
678
682
  title: `${r.value}%`
679
683
  }, [
680
- l("div", Hs, w(r.value) + "%", 1),
684
+ l("div", Ha, w(r.value) + "%", 1),
681
685
  l("div", {
682
686
  class: "relative h-4 overflow-hidden rounded-md bg-cyan-main transition-all duration-500",
683
687
  style: Ve(`width: ${r.value}%`)
684
688
  }, [
685
- l("div", Ws, w(r.value) + "%", 1)
689
+ l("div", Wa, w(r.value) + "%", 1)
686
690
  ], 4)
687
- ], 8, Ks),
688
- l("div", Gs, [
691
+ ], 8, Ka),
692
+ l("div", Ga, [
689
693
  (f(!0), g(D, null, K(t.value, (b) => (f(), g("div", {
690
694
  key: b.name,
691
695
  class: "flex-auto"
692
696
  }, [
693
- l("div", Js, [
697
+ l("div", Ja, [
694
698
  B(u.$slots, "name", { item: b })
695
699
  ]),
696
700
  l("div", null, w(b.value), 1)
697
701
  ]))), 128))
698
702
  ])
699
703
  ]),
700
- l("div", Xs, [
704
+ l("div", Xa, [
701
705
  (f(!0), g(D, null, K(o.value, (b) => (f(), g("div", {
702
706
  key: b.name,
703
707
  class: "flex justify-between items-center"
704
708
  }, [
705
- l("div", qs, [
709
+ l("div", qa, [
706
710
  B(u.$slots, "name", { item: b })
707
711
  ]),
708
- l("div", Ys, w(b.value), 1)
712
+ l("div", Ya, w(b.value), 1)
709
713
  ]))), 128))
710
714
  ]),
711
715
  l("div", null, [
@@ -717,15 +721,15 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
717
721
  ]);
718
722
  };
719
723
  }
720
- }), Zs = { class: "flex items-center cursor-pointer" }, Qs = /* @__PURE__ */ L({
724
+ }), Za = { class: "flex items-center cursor-pointer" }, Qa = /* @__PURE__ */ L({
721
725
  __name: "VFile",
722
726
  emits: ["change"],
723
- setup(e, { emit: s }) {
724
- const a = s, n = async (t) => {
727
+ setup(e, { emit: a }) {
728
+ const s = a, n = async (t) => {
725
729
  const o = t.target;
726
- o.files && a("change", o.files);
730
+ o.files && s("change", o.files);
727
731
  };
728
- return (t, o) => (f(), g("label", Zs, [
732
+ return (t, o) => (f(), g("label", Za, [
729
733
  l("input", X({
730
734
  type: "file",
731
735
  class: "hidden"
@@ -736,8 +740,8 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
736
740
  }), el = { class: "md:flex" }, tl = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" }, Jr = /* @__PURE__ */ L({
737
741
  __name: "BlockUpdate",
738
742
  emits: ["update"],
739
- setup(e, { emit: s }) {
740
- const a = s, n = Ut({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((u) => `${u.name} (${tt(u.size)})`).join("") : "", o = (d, u) => {
743
+ setup(e, { emit: a }) {
744
+ const s = a, n = Ut({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((u) => `${u.name} (${tt(u.size)})`).join("") : "", o = (d, u) => {
741
745
  const i = new FormData();
742
746
  for (let c = 0; c < d.length; c++) {
743
747
  const m = d.item(c);
@@ -748,7 +752,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
748
752
  }, r = (d, u) => {
749
753
  if (!u) return;
750
754
  const i = o(u, d);
751
- i && a("update", d, i);
755
+ i && s("update", d, i);
752
756
  };
753
757
  return (d, u) => {
754
758
  const i = j;
@@ -757,7 +761,7 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
757
761
  key: m,
758
762
  class: "mb-4 flex items-center"
759
763
  }, [
760
- v(Qs, {
764
+ v(Qa, {
761
765
  accept: ".bin",
762
766
  onChange: (p) => n[m] = p,
763
767
  class: "flex-auto"
@@ -787,16 +791,16 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
787
791
  ]);
788
792
  };
789
793
  }
790
- }), al = { class: "flex items-center gap-1.5" }, Xr = /* @__PURE__ */ L({
794
+ }), sl = { class: "flex items-center gap-1.5" }, Xr = /* @__PURE__ */ L({
791
795
  __name: "BlockBreadcrumb",
792
796
  props: {
793
797
  items: { default: () => [] }
794
798
  },
795
799
  emits: ["click"],
796
- setup(e, { emit: s }) {
797
- const a = s, n = (t) => a("click", t);
800
+ setup(e, { emit: a }) {
801
+ const s = a, n = (t) => s("click", t);
798
802
  return (t, o) => (f(), g("nav", null, [
799
- l("ol", al, [
803
+ l("ol", sl, [
800
804
  (f(!0), g(D, null, K(e.items, (r, d) => (f(), g("li", {
801
805
  key: d,
802
806
  class: M(["inline-flex items-center gap-1.5 text-sm text-gray-dark-25 dark:text-gray-main", r.path ? "" : "text-gray-dark-30 dark:text-white/90"])
@@ -814,15 +818,15 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
814
818
  ]),
815
819
  r.path ? (f(), O(I, {
816
820
  key: 0,
817
- name: "chevron-right",
821
+ name: "chevron-down",
818
822
  size: 14,
819
- class: "shrink-0"
823
+ class: "-rotate-90 shrink-0"
820
824
  })) : T("", !0)
821
825
  ], 2))), 128))
822
826
  ])
823
827
  ]));
824
828
  }
825
- }), sl = ["onClick"], ll = {
829
+ }), al = ["onClick"], ll = {
826
830
  key: 0,
827
831
  class: "me-1"
828
832
  }, nl = { class: "dark:text-gray-light-10" }, ol = { class: "flex items-center z-10" }, il = {
@@ -836,11 +840,11 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
836
840
  onlyValue: { type: Boolean, default: !1 }
837
841
  },
838
842
  emits: ["click"],
839
- setup(e, { emit: s }) {
840
- const a = s, n = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-light-10 dark:before:border-gray-dark-30/50 hover:before:bg-gray-main/10", t = F({}), { text: o, copy: r, copied: d, isSupported: u } = za(), i = (b) => {
843
+ setup(e, { emit: a }) {
844
+ const s = a, n = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-light-10 dark:before:border-gray-dark-30/50 hover:before:bg-gray-main/10", t = F({}), { text: o, copy: r, copied: d, isSupported: u } = As(), i = (b) => {
841
845
  t.value[b] = !t.value[b];
842
846
  }, c = (b) => typeof b == "object", m = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, h) => {
843
- a("click", { key: b, path: m(b), isObject: h });
847
+ s("click", { key: b, path: m(b), isObject: h });
844
848
  };
845
849
  return (b, h) => (f(), g("ul", null, [
846
850
  (f(!0), g(D, null, K(e.items, (k, _) => (f(), g("li", {
@@ -897,16 +901,16 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
897
901
  }, 8, ["title", "onClick"])
898
902
  ])
899
903
  ], 64)) : T("", !0)
900
- ], 10, sl),
904
+ ], 10, al),
901
905
  c(k) ? (f(), g("div", il, [
902
906
  ot(v(wt, {
903
907
  class: "flex-auto",
904
908
  path: m(_),
905
909
  items: k,
906
910
  onlyValue: e.onlyValue,
907
- onClick: h[0] || (h[0] = (N) => a("click", N))
911
+ onClick: h[0] || (h[0] = (N) => s("click", N))
908
912
  }, null, 8, ["path", "items", "onlyValue"]), [
909
- [ma, t.value[_]]
913
+ [ms, t.value[_]]
910
914
  ])
911
915
  ])) : (f(), g(D, { key: 1 }, [
912
916
  h[2] || (h[2] = l("div", { class: "flex-auto gap-3" }, null, -1)),
@@ -941,27 +945,27 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
941
945
  iconLabel: {}
942
946
  },
943
947
  emits: ["icon"],
944
- setup(e, { emit: s }) {
945
- const a = e, n = s, { labelClass: t, borderClass: o, contentClass: r, slotClass: d } = ka(a, "wrapper");
948
+ setup(e, { emit: a }) {
949
+ const s = e, n = a, { labelClass: t, borderClass: o, contentClass: r, slotClass: d } = ks(s, "wrapper");
946
950
  return (u, i) => (f(), g("div", dl, [
947
951
  l("div", {
948
952
  class: M(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-cyan-main/60", [H(d), H(o)]])
949
953
  }, [
950
954
  l("span", {
951
955
  class: M(["absolute -translate-y-1/2 rounded transition-all", H(t)])
952
- }, w(a.label), 3),
956
+ }, w(s.label), 3),
953
957
  l("div", {
954
958
  class: M(H(r))
955
959
  }, [
956
960
  B(u.$slots, "default")
957
961
  ], 2),
958
- a.hideIcon ? T("", !0) : (f(), g("button", {
962
+ s.hideIcon ? T("", !0) : (f(), g("button", {
959
963
  key: 0,
960
964
  type: "button",
961
- disabled: a.disabled || a.iconDisabled,
962
- "aria-label": a.iconLabel || void 0,
963
- title: a.iconLabel || void 0,
964
- class: M(["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 }]),
965
+ disabled: s.disabled || s.iconDisabled,
966
+ "aria-label": s.iconLabel || void 0,
967
+ title: s.iconLabel || void 0,
968
+ class: M(["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": !s.disabled && !s.iconDisabled }]),
965
969
  onClick: i[0] || (i[0] = (c) => n("icon", c))
966
970
  }, [
967
971
  B(u.$slots, "icon", {}, () => [
@@ -977,12 +981,12 @@ const Rr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex fl
977
981
  }), ul = /* @__PURE__ */ L({
978
982
  __name: "BlockDataHelp",
979
983
  emits: ["close"],
980
- setup(e, { emit: s }) {
981
- const a = s;
984
+ setup(e, { emit: a }) {
985
+ const s = a;
982
986
  return (n, t) => (f(), O(Se, {
983
987
  title: "Как настроить блок",
984
988
  size: "md",
985
- onClose: t[0] || (t[0] = (o) => a("close"))
989
+ onClose: t[0] || (t[0] = (o) => s("close"))
986
990
  }, {
987
991
  default: x(() => [...t[1] || (t[1] = [
988
992
  l("div", { class: "flex flex-col gap-4 text-sm leading-relaxed text-gray-dark-25 dark:text-gray-light-10" }, [
@@ -1099,8 +1103,8 @@ v + ' кВт·ч<br>выработка за день'`),
1099
1103
  showReset: { type: Boolean, default: !0 }
1100
1104
  },
1101
1105
  emits: ["update:modelValue", "update:format", "pick", "reset"],
1102
- setup(e, { emit: s }) {
1103
- const a = s;
1106
+ setup(e, { emit: a }) {
1107
+ const s = a;
1104
1108
  return (n, t) => (f(), g("div", ml, [
1105
1109
  l("div", fl, [
1106
1110
  l("div", {
@@ -1112,7 +1116,7 @@ v + ' кВт·ч<br>выработка за день'`),
1112
1116
  "hide-message": "",
1113
1117
  "model-value": e.modelValue,
1114
1118
  label: e.field.label,
1115
- "onUpdate:modelValue": t[0] || (t[0] = (o) => a("update:modelValue", o))
1119
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => s("update:modelValue", o))
1116
1120
  }, null, 8, ["model-value", "label"])) : (f(), O(le, {
1117
1121
  key: 1,
1118
1122
  active: "",
@@ -1120,8 +1124,8 @@ v + ' кВт·ч<br>выработка за день'`),
1120
1124
  "model-value": e.modelValue,
1121
1125
  label: e.field.label,
1122
1126
  placeholder: e.placeholder,
1123
- "onUpdate:modelValue": t[1] || (t[1] = (o) => a("update:modelValue", o)),
1124
- onOnIcon: t[2] || (t[2] = (o) => a("pick"))
1127
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => s("update:modelValue", o)),
1128
+ onOnIcon: t[2] || (t[2] = (o) => s("pick"))
1125
1129
  }, {
1126
1130
  icon: x(() => [
1127
1131
  v(I, {
@@ -1138,7 +1142,7 @@ v + ' кВт·ч<br>выработка за день'`),
1138
1142
  "model-value": e.formatValue,
1139
1143
  label: "Формат",
1140
1144
  placeholder: e.placeholderFormat,
1141
- "onUpdate:modelValue": t[3] || (t[3] = (o) => a("update:format", o))
1145
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => s("update:format", o))
1142
1146
  }, null, 8, ["model-value", "placeholder"])) : T("", !0)
1143
1147
  ], 2),
1144
1148
  e.showReset ? (f(), O(j, {
@@ -1147,7 +1151,7 @@ v + ' кВт·ч<br>выработка за день'`),
1147
1151
  class: "shrink-0",
1148
1152
  "aria-label": "Сбросить поле",
1149
1153
  title: "Сбросить поле",
1150
- onClick: t[4] || (t[4] = (o) => a("reset"))
1154
+ onClick: t[4] || (t[4] = (o) => s("reset"))
1151
1155
  }, {
1152
1156
  default: x(() => [
1153
1157
  v(I, {
@@ -1175,8 +1179,8 @@ v + ' кВт·ч<br>выработка за день'`),
1175
1179
  hideIcon: { type: Boolean, default: !1 }
1176
1180
  },
1177
1181
  emits: ["change", "icon"],
1178
- setup(e, { emit: s }) {
1179
- const a = s, n = ["a", "b", "c", "d"], t = (i) => {
1182
+ setup(e, { emit: a }) {
1183
+ const s = a, n = ["a", "b", "c", "d"], t = (i) => {
1180
1184
  var c;
1181
1185
  return ((c = e.params) == null ? void 0 : c[i]) ?? n[i] ?? "";
1182
1186
  }, o = F(e.value || ""), r = (i) => {
@@ -1187,8 +1191,8 @@ v + ' кВт·ч<br>выработка за день'`),
1187
1191
  }
1188
1192
  }, d = $t((i) => {
1189
1193
  const c = i.target;
1190
- r(c.value) && a("change", c.value);
1191
- }, 500), u = (i) => a("icon", i);
1194
+ r(c.value) && s("change", c.value);
1195
+ }, 500), u = (i) => s("icon", i);
1192
1196
  return _e(
1193
1197
  () => e.value,
1194
1198
  (i) => {
@@ -1301,12 +1305,12 @@ v + ' кВт·ч<br>выработка за день'`),
1301
1305
  { value: "left", name: "Слева" },
1302
1306
  { value: "right", name: "Справа" }
1303
1307
  ], vt = (e) => {
1304
- const s = { ..._t, ...e };
1308
+ const a = { ..._t, ...e };
1305
1309
  return [
1306
- xl[s.size],
1307
- kl[s.color],
1308
- $l[s.weight],
1309
- wl[s.align]
1310
+ xl[a.size],
1311
+ kl[a.color],
1312
+ $l[a.weight],
1313
+ wl[a.align]
1310
1314
  ].join(" ");
1311
1315
  }, Gt = /^[A-Za-z_$][\w$]*(\.[\w$]+)+$/, Cl = /^[A-Za-z_$][\w$]*$/, _l = /* @__PURE__ */ new Set([
1312
1316
  "await",
@@ -1349,80 +1353,80 @@ v + ' кВт·ч<br>выработка за день'`),
1349
1353
  "while",
1350
1354
  "with",
1351
1355
  "yield"
1352
- ]), pt = 10, We = 4, ht = ["a", "b", "c", "d"], Sl = (e) => Cl.test(e) && !_l.has(e), Jt = (e, s) => {
1356
+ ]), pt = 10, We = 4, ht = ["a", "b", "c", "d"], Sl = (e) => Cl.test(e) && !_l.has(e), Jt = (e, a) => {
1353
1357
  try {
1354
- const a = Object.keys(s).filter(Sl), n = a.map((o) => s[o]);
1355
- return new Function(...a, `"use strict"; return (${e});`)(...n);
1358
+ const s = Object.keys(a).filter(Sl), n = s.map((o) => a[o]);
1359
+ return new Function(...s, `"use strict"; return (${e});`)(...n);
1356
1360
  } catch {
1357
1361
  return;
1358
1362
  }
1359
- }, at = (e, s, a) => {
1363
+ }, st = (e, a, s) => {
1360
1364
  if (!e.trim()) return;
1361
- const n = Jt(e, s);
1362
- return n === void 0 && Gt.test(e) ? a.get(e) : n;
1363
- }, Tl = (e) => e == null || e === "" ? "—" : typeof e == "boolean" ? e ? "да" : "нет" : typeof e == "number" ? Number.isInteger(e) ? String(e) : String(Number(e.toFixed(2))) : String(e), Al = (e) => e.replace(/<br\s*\/?>/gi, `
1364
- `), st = (e) => typeof e == "number" && !Number.isFinite(e) ? void 0 : e, zl = (e, s) => {
1365
+ const n = Jt(e, a);
1366
+ return n === void 0 && Gt.test(e) ? s.get(e) : n;
1367
+ }, Tl = (e) => e == null || e === "" ? "—" : typeof e == "boolean" ? e ? "да" : "нет" : typeof e == "number" ? Number.isInteger(e) ? String(e) : String(Number(e.toFixed(2))) : String(e), zl = (e) => e.replace(/<br\s*\/?>/gi, `
1368
+ `), at = (e) => typeof e == "number" && !Number.isFinite(e) ? void 0 : e, Al = (e, a) => {
1365
1369
  if (!(e == null || e === "")) {
1366
- if (s === "number") {
1367
- const a = typeof e == "number" ? e : Number.parseFloat(String(e));
1368
- return Number.isFinite(a) ? a : void 0;
1370
+ if (a === "number") {
1371
+ const s = typeof e == "number" ? e : Number.parseFloat(String(e));
1372
+ return Number.isFinite(s) ? s : void 0;
1369
1373
  }
1370
- return s === "boolean" ? typeof e == "boolean" ? e : e === 1 || e === "1" || e === "true" : String(e);
1374
+ return a === "boolean" ? typeof e == "boolean" ? e : e === 1 || e === "1" || e === "true" : String(e);
1371
1375
  }
1372
1376
  }, Qe = (e) => {
1373
- const s = typeof e == "number" ? e : Number.parseFloat(String(e));
1374
- return Number.isFinite(s) ? s : 0;
1377
+ const a = typeof e == "number" ? e : Number.parseFloat(String(e));
1378
+ return Number.isFinite(a) ? a : 0;
1375
1379
  }, St = (e) => ({
1376
1380
  ...e.helpers,
1377
1381
  ...e.roots,
1378
1382
  get: e.get,
1379
- num: (s) => Qe(s),
1380
- scale: (s, a = 1, n = 0) => Qe(s) * a + n,
1381
- round: (s, a = 0) => Number(Qe(s).toFixed(a)),
1382
- clamp: (s, a, n) => Math.min(n, Math.max(a, Qe(s)))
1383
- }), qr = (e, s, a) => {
1384
- const n = { ...St(s), ...a };
1385
- return e.slice(0, We).map((t) => st(at(t, n, s)));
1386
- }, El = (e, s, a, n) => {
1387
- const t = { ...St(a), ...n };
1388
- s.slice(0, We).forEach((d, u) => {
1389
- t[ht[u]] = st(at(d, t, a));
1383
+ num: (a) => Qe(a),
1384
+ scale: (a, s = 1, n = 0) => Qe(a) * s + n,
1385
+ round: (a, s = 0) => Number(Qe(a).toFixed(s)),
1386
+ clamp: (a, s, n) => Math.min(n, Math.max(s, Qe(a)))
1387
+ }), qr = (e, a, s) => {
1388
+ const n = { ...St(a), ...s };
1389
+ return e.slice(0, We).map((t) => at(st(t, n, a)));
1390
+ }, El = (e, a, s, n) => {
1391
+ const t = { ...St(s), ...n };
1392
+ a.slice(0, We).forEach((d, u) => {
1393
+ t[ht[u]] = at(st(d, t, s));
1390
1394
  });
1391
- let o = st(at(e.value, t, a));
1395
+ let o = at(st(e.value, t, s));
1392
1396
  o === void 0 && (o = t.a), t.v = o, t.a = t.a ?? o;
1393
1397
  let r;
1394
1398
  if (e.format.trim() && o !== void 0 && o !== null) {
1395
- const d = st(at(e.format, t, a));
1399
+ const d = at(st(e.format, t, s));
1396
1400
  d != null && (r = String(d));
1397
1401
  }
1398
1402
  return {
1399
1403
  id: e.id,
1400
1404
  label: e.label.trim() || "Показатель",
1401
- value: Al(r ?? Tl(o)),
1405
+ value: zl(r ?? Tl(o)),
1402
1406
  raw: o,
1403
1407
  style: { ..._t, ...e.style }
1404
1408
  };
1405
- }, Vl = (e, s, a, n) => {
1409
+ }, Vl = (e, a, s, n) => {
1406
1410
  var r, d, u, i;
1407
1411
  const t = /* @__PURE__ */ new Set([
1408
1412
  ...Object.keys(e.metrics ?? {}),
1409
- ...Object.keys(s.metrics ?? {})
1413
+ ...Object.keys(a.metrics ?? {})
1410
1414
  ]), o = {};
1411
1415
  for (const c of t) {
1412
- const m = ((r = s.metrics) == null ? void 0 : r[c]) ?? ((d = e.metrics) == null ? void 0 : d[c]) ?? [], p = ((u = s.metricArgs) == null ? void 0 : u[c]) ?? ((i = e.metricArgs) == null ? void 0 : i[c]) ?? [];
1413
- o[c] = m.slice(0, pt).map((b) => El(b, p, a, n));
1416
+ const m = ((r = a.metrics) == null ? void 0 : r[c]) ?? ((d = e.metrics) == null ? void 0 : d[c]) ?? [], p = ((u = a.metricArgs) == null ? void 0 : u[c]) ?? ((i = e.metricArgs) == null ? void 0 : i[c]) ?? [];
1417
+ o[c] = m.slice(0, pt).map((b) => El(b, p, s, n));
1414
1418
  }
1415
1419
  return o;
1416
- }, Tt = (e, s, a) => {
1417
- const n = St(a), t = {};
1420
+ }, Tt = (e, a, s) => {
1421
+ const n = St(s), t = {};
1418
1422
  for (const o of e.fields) {
1419
- const r = s.bindings[o.key], d = typeof r == "string" ? r : r == null ? void 0 : r.expr, u = typeof r == "object" ? r == null ? void 0 : r.fallback : void 0;
1423
+ const r = a.bindings[o.key], d = typeof r == "string" ? r : r == null ? void 0 : r.expr, u = typeof r == "object" ? r == null ? void 0 : r.fallback : void 0;
1420
1424
  let i;
1421
- o.formatFor && (n.v = t[o.formatFor]), d && (i = Jt(d, n), i === void 0 && Gt.test(d) && (i = a.get(d)));
1422
- const c = zl(i ?? u ?? o.default, o.type);
1425
+ o.formatFor && (n.v = t[o.formatFor]), d && (i = Jt(d, n), i === void 0 && Gt.test(d) && (i = s.get(d)));
1426
+ const c = Al(i ?? u ?? o.default, o.type);
1423
1427
  t[o.key] = c, n[o.key] = c;
1424
1428
  }
1425
- return t.metrics = Vl(e, s, a, t), t;
1429
+ return t.metrics = Vl(e, a, s, t), t;
1426
1430
  }, Bl = { class: "glass-inset rounded-xl p-3" }, Il = { class: "flex items-center gap-2" }, Ll = { class: "min-w-0 flex-1" }, Ml = { class: "mt-2 flex flex-col gap-2" }, Ol = /* @__PURE__ */ L({
1427
1431
  __name: "BlockMetricCard",
1428
1432
  props: {
@@ -1431,8 +1435,8 @@ v + ' кВт·ч<br>выработка за день'`),
1431
1435
  args: {}
1432
1436
  },
1433
1437
  emits: ["remove", "open-style", "toggle-field", "dragstart", "dragend", "change", "hover"],
1434
- setup(e, { emit: s }) {
1435
- const a = s, n = (t, o) => a("hover", t, o);
1438
+ setup(e, { emit: a }) {
1439
+ const s = a, n = (t, o) => s("hover", t, o);
1436
1440
  return (t, o) => (f(), g("div", Bl, [
1437
1441
  l("div", Il, [
1438
1442
  l("div", Ll, [
@@ -1441,7 +1445,7 @@ v + ' кВт·ч<br>выработка за день'`),
1441
1445
  "hide-message": "",
1442
1446
  "model-value": e.metric.label,
1443
1447
  label: "Название",
1444
- "onUpdate:modelValue": o[0] || (o[0] = (r) => a("change", { label: r }))
1448
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => s("change", { label: r }))
1445
1449
  }, null, 8, ["model-value"])
1446
1450
  ]),
1447
1451
  v(j, {
@@ -1449,7 +1453,7 @@ v + ' кВт·ч<br>выработка за день'`),
1449
1453
  size: "sm",
1450
1454
  "aria-label": "Стиль показателя",
1451
1455
  title: "Стиль показателя",
1452
- onClick: o[1] || (o[1] = (r) => a("open-style"))
1456
+ onClick: o[1] || (o[1] = (r) => s("open-style"))
1453
1457
  }, {
1454
1458
  default: x(() => [
1455
1459
  v(I, {
@@ -1464,7 +1468,7 @@ v + ' кВт·ч<br>выработка за день'`),
1464
1468
  size: "sm",
1465
1469
  "aria-label": "Удалить показатель",
1466
1470
  title: "Удалить показатель",
1467
- onClick: o[2] || (o[2] = (r) => a("remove"))
1471
+ onClick: o[2] || (o[2] = (r) => s("remove"))
1468
1472
  }, {
1469
1473
  default: x(() => [
1470
1474
  v(I, {
@@ -1478,8 +1482,8 @@ v + ' кВт·ч<br>выработка за день'`),
1478
1482
  draggable: "true",
1479
1483
  class: "-me-1 grid size-8 shrink-0 cursor-grab place-items-center rounded-md text-gray-main transition hover:bg-white/5 hover:text-white active:cursor-grabbing",
1480
1484
  title: "Перетащить показатель",
1481
- onDragstart: o[3] || (o[3] = (r) => a("dragstart", r, e.index)),
1482
- onDragend: o[4] || (o[4] = (r) => a("dragend"))
1485
+ onDragstart: o[3] || (o[3] = (r) => s("dragstart", r, e.index)),
1486
+ onDragend: o[4] || (o[4] = (r) => s("dragend"))
1483
1487
  }, [
1484
1488
  v(I, {
1485
1489
  name: "grip",
@@ -1493,8 +1497,8 @@ v + ' кВт·ч<br>выработка за день'`),
1493
1497
  args: e.args,
1494
1498
  params: [...H(ht)],
1495
1499
  label: "Значение",
1496
- onIcon: o[5] || (o[5] = (r) => a("toggle-field", "value")),
1497
- onChange: o[6] || (o[6] = (r) => a("change", { value: r })),
1500
+ onIcon: o[5] || (o[5] = (r) => s("toggle-field", "value")),
1501
+ onChange: o[6] || (o[6] = (r) => s("change", { value: r })),
1498
1502
  onHover: n
1499
1503
  }, null, 8, ["value", "args", "params"]),
1500
1504
  v(He, {
@@ -1503,8 +1507,8 @@ v + ' кВт·ч<br>выработка за день'`),
1503
1507
  params: [...H(ht)],
1504
1508
  prefix: ["v"],
1505
1509
  label: "Формат",
1506
- onIcon: o[7] || (o[7] = (r) => a("toggle-field", "format")),
1507
- onChange: o[8] || (o[8] = (r) => a("change", { format: r })),
1510
+ onIcon: o[7] || (o[7] = (r) => s("toggle-field", "format")),
1511
+ onChange: o[8] || (o[8] = (r) => s("change", { format: r })),
1508
1512
  onHover: n
1509
1513
  }, null, 8, ["value", "args", "params"])
1510
1514
  ])
@@ -1518,17 +1522,17 @@ v + ' кВт·ч<br>выработка за день'`),
1518
1522
  preview: { default: "" }
1519
1523
  },
1520
1524
  emits: ["close", "update"],
1521
- setup(e, { emit: s }) {
1522
- const a = s, n = C(() => ({ ..._t, ...e.style })), t = (h, k) => {
1525
+ setup(e, { emit: a }) {
1526
+ const s = a, n = C(() => ({ ..._t, ...e.style })), t = (h, k) => {
1523
1527
  var _;
1524
1528
  return ((_ = h.find((N) => N.value === k)) == null ? void 0 : _.name) ?? "";
1525
1529
  }, o = C(() => t(Bt, n.value.size)), r = C(() => t(It, n.value.color)), d = C(() => t(Lt, n.value.weight)), u = C(() => t(Mt, n.value.align)), i = (h) => {
1526
- a("update", { ...n.value, ...h });
1530
+ s("update", { ...n.value, ...h });
1527
1531
  }, c = (h) => i({ size: h.value }), m = (h) => i({ color: h.value }), p = (h) => i({ weight: h.value }), b = (h) => i({ align: h.value });
1528
1532
  return (h, k) => (f(), O(Se, {
1529
1533
  title: "Стиль показателя",
1530
1534
  size: "md",
1531
- onClose: k[1] || (k[1] = (_) => a("close"))
1535
+ onClose: k[1] || (k[1] = (_) => s("close"))
1532
1536
  }, {
1533
1537
  default: x(() => [
1534
1538
  l("div", Fl, [
@@ -1571,7 +1575,7 @@ v + ' кВт·ч<br>выработка за день'`),
1571
1575
  l("div", Pl, [
1572
1576
  v(j, {
1573
1577
  color: "blue",
1574
- onClick: k[0] || (k[0] = (_) => a("close"))
1578
+ onClick: k[0] || (k[0] = (_) => s("close"))
1575
1579
  }, {
1576
1580
  default: x(() => [...k[4] || (k[4] = [
1577
1581
  E("Готово", -1)
@@ -1593,7 +1597,7 @@ v + ' кВт·ч<br>выработка за день'`),
1593
1597
  }, Ql = {
1594
1598
  key: 0,
1595
1599
  class: "flex gap-2 flex-wrap flex-auto px-2 py-1"
1596
- }, en = { class: "relative group" }, tn = { class: "select-none" }, an = ["onClick"], sn = {
1600
+ }, en = { class: "relative group" }, tn = { class: "select-none" }, sn = ["onClick"], an = {
1597
1601
  key: 2,
1598
1602
  class: "flex flex-col gap-2"
1599
1603
  }, ln = { class: "flex items-center justify-between gap-2" }, nn = {
@@ -1613,8 +1617,8 @@ v + ' кВт·ч<br>выработка за день'`),
1613
1617
  context: {}
1614
1618
  },
1615
1619
  emits: ["close", "update:config"],
1616
- setup(e, { emit: s }) {
1617
- const a = s, n = [
1620
+ setup(e, { emit: a }) {
1621
+ const s = a, n = [
1618
1622
  { key: "general", label: "Основное", icon: "settings" },
1619
1623
  { key: "solar", label: "Солнце", icon: "sun" },
1620
1624
  { key: "grid", label: "Сеть", icon: "plug" },
@@ -1655,9 +1659,9 @@ v + ' кВт·ч<br>выработка за день'`),
1655
1659
  ...y,
1656
1660
  count: e.definition.fields.filter(($) => ($.block ?? "general") === y.key).length
1657
1661
  })).filter((y) => y.count > 0)
1658
- ), A = C(() => Object.keys(e.definition.metrics ?? {})), V = C(() => A.value.includes(d.value)), W = C(() => e.definition.fields.filter((y) => (y.block ?? "general") === d.value && !y.formatFor)), ne = C(() => W.value.find((y) => y.key.endsWith("Title"))), Ne = C(() => d.value === "general"), ke = C(() => W.value.find((y) => y.key === `${d.value}Flow`)), Xe = C(() => t[d.value] ?? []), it = C(() => {
1662
+ ), z = C(() => Object.keys(e.definition.metrics ?? {})), V = C(() => z.value.includes(d.value)), W = C(() => e.definition.fields.filter((y) => (y.block ?? "general") === d.value && !y.formatFor)), ne = C(() => W.value.find((y) => y.key.endsWith("Title"))), Ne = C(() => d.value === "general"), ke = C(() => W.value.find((y) => y.key === `${d.value}Flow`)), Xe = C(() => t[d.value] ?? []), it = C(() => {
1659
1663
  const y = ke.value;
1660
- return y ? Ae(y) || String(y.default ?? "") : "";
1664
+ return y ? ze(y) || String(y.default ?? "") : "";
1661
1665
  }), Be = C(() => {
1662
1666
  var y;
1663
1667
  return ((y = Xe.value.find(($) => $.value === it.value)) == null ? void 0 : y.name) ?? "";
@@ -1682,7 +1686,7 @@ v + ' кВт·ч<br>выработка за день'`),
1682
1686
  return y;
1683
1687
  }
1684
1688
  return y.startsWith("'") && y.endsWith("'") ? y.slice(1, -1) : y;
1685
- }, Ae = (y) => {
1689
+ }, ze = (y) => {
1686
1690
  const $ = r.value.bindings[y.key];
1687
1691
  return typeof $ != "string" ? y.plain ? String(y.default ?? "") : "" : y.plain ? rt($) : $;
1688
1692
  }, $e = (y, $) => {
@@ -1693,23 +1697,23 @@ v + ' кВт·ч<br>выработка за день'`),
1693
1697
  r.value.bindings[y.key] = y.plain ? JSON.stringify($) : $;
1694
1698
  }, Me = (y) => e.definition.fields.find(($) => $.formatFor === y.key), G = (y) => {
1695
1699
  const $ = Me(y);
1696
- return $ ? Ae($) : "";
1700
+ return $ ? ze($) : "";
1697
1701
  }, J = (y, $) => {
1698
1702
  const S = Me(y);
1699
1703
  S && $e(S, $);
1700
- }, z = (y) => {
1704
+ }, A = (y) => {
1701
1705
  const $ = q.value[y];
1702
1706
  return $ === void 0 ? "—" : typeof $ == "boolean" ? $ ? "да" : "нет" : String($);
1703
1707
  }, R = (y) => `v + ' ${y.unit ?? "ед."}'`, me = () => {
1704
1708
  N && (clearTimeout(N), N = null);
1705
1709
  const y = o(r.value), $ = JSON.stringify(y);
1706
- $ !== _ && (_ = $, a("update:config", y));
1710
+ $ !== _ && (_ = $, s("update:config", y));
1707
1711
  };
1708
1712
  _e(r, () => {
1709
1713
  N && clearTimeout(N), N = setTimeout(me, 500);
1710
1714
  }, { deep: !0 });
1711
1715
  const Pe = () => {
1712
- me(), a("close");
1716
+ me(), s("close");
1713
1717
  }, Ue = (y) => {
1714
1718
  c.value = { kind: "field", key: y }, i.value = !0;
1715
1719
  }, qe = (y) => {
@@ -1764,20 +1768,20 @@ v + ' кВт·ч<br>выработка за день'`),
1764
1768
  if (h.value = null, k.value = null, $ === null || $ === y) return;
1765
1769
  const S = [...oe.value], [P] = S.splice($, 1);
1766
1770
  S.splice(y, 0, P), r.value.metrics = { ...r.value.metrics ?? {}, [d.value]: S };
1767
- }, ia = () => {
1771
+ }, is = () => {
1768
1772
  h.value = null, k.value = null;
1769
- }, ra = (y) => {
1773
+ }, rs = (y) => {
1770
1774
  var $, S;
1771
1775
  return ((S = ($ = xe.value[d.value]) == null ? void 0 : $.find((P) => P.id === y.id)) == null ? void 0 : S.value) ?? "";
1772
1776
  }, Ze = (y, $) => {
1773
1777
  Object.assign(y, $);
1774
- }, da = () => {
1778
+ }, ds = () => {
1775
1779
  const y = JSON.stringify(r.value, null, 2), $ = new Blob([y], { type: "application/json" }), S = URL.createObjectURL($), P = document.createElement("a");
1776
1780
  P.href = S, P.download = `${e.definition.type}.json`, P.click(), URL.revokeObjectURL(S);
1777
- }, ca = () => {
1781
+ }, cs = () => {
1778
1782
  var y;
1779
1783
  return (y = b.value) == null ? void 0 : y.click();
1780
- }, Et = (y) => typeof y == "object" && y !== null && !Array.isArray(y), ua = async (y) => {
1784
+ }, Et = (y) => typeof y == "object" && y !== null && !Array.isArray(y), us = async (y) => {
1781
1785
  var P;
1782
1786
  const $ = y.target, S = (P = $.files) == null ? void 0 : P[0];
1783
1787
  if (S)
@@ -1821,7 +1825,7 @@ v + ' кВт·ч<br>выработка за день'`),
1821
1825
  size: "sm",
1822
1826
  "aria-label": "Импорт",
1823
1827
  title: "Импорт",
1824
- onClick: ca
1828
+ onClick: cs
1825
1829
  }, {
1826
1830
  default: x(() => [
1827
1831
  v(I, {
@@ -1836,7 +1840,7 @@ v + ' кВт·ч<br>выработка за день'`),
1836
1840
  size: "sm",
1837
1841
  "aria-label": "Экспорт",
1838
1842
  title: "Экспорт",
1839
- onClick: da
1843
+ onClick: ds
1840
1844
  }, {
1841
1845
  default: x(() => [
1842
1846
  v(I, {
@@ -1855,7 +1859,7 @@ v + ' кВт·ч<br>выработка за день'`),
1855
1859
  type: "file",
1856
1860
  accept: "application/json,.json",
1857
1861
  class: "hidden",
1858
- onChange: ua
1862
+ onChange: us
1859
1863
  }, null, 544),
1860
1864
  l("div", Hl, [
1861
1865
  l("nav", Wl, [
@@ -1879,10 +1883,10 @@ v + ' кВт·ч<br>выработка за день'`),
1879
1883
  Ne.value ? (f(!0), g(D, { key: 0 }, K(Le.value, (S) => (f(), O(Vt, {
1880
1884
  key: S.key,
1881
1885
  field: S,
1882
- "model-value": Ae(S),
1886
+ "model-value": ze(S),
1883
1887
  "format-value": G(S),
1884
1888
  "has-format": !!Me(S),
1885
- placeholder: z(S.previewKey ?? S.key),
1889
+ placeholder: A(S.previewKey ?? S.key),
1886
1890
  "placeholder-format": R(S),
1887
1891
  "show-reset": !1,
1888
1892
  "onUpdate:modelValue": (P) => $e(S, P),
@@ -1892,10 +1896,10 @@ v + ' кВт·ч<br>выработка за день'`),
1892
1896
  ne.value ? (f(), O(Vt, {
1893
1897
  key: 0,
1894
1898
  field: ne.value,
1895
- "model-value": Ae(ne.value),
1899
+ "model-value": ze(ne.value),
1896
1900
  "format-value": G(ne.value),
1897
1901
  "has-format": !!Me(ne.value),
1898
- placeholder: z(ne.value.previewKey ?? ne.value.key),
1902
+ placeholder: A(ne.value.previewKey ?? ne.value.key),
1899
1903
  "placeholder-format": R(ne.value),
1900
1904
  "show-reset": !1,
1901
1905
  "onUpdate:modelValue": $[1] || ($[1] = (S) => $e(ne.value, S)),
@@ -1929,14 +1933,14 @@ v + ' кВт·ч<br>выработка за день'`),
1929
1933
  name: "close",
1930
1934
  class: "size-5"
1931
1935
  })
1932
- ], 8, an)) : T("", !0)
1936
+ ], 8, sn)) : T("", !0)
1933
1937
  ]))), 128))
1934
1938
  ])) : T("", !0)
1935
1939
  ]),
1936
1940
  _: 1
1937
1941
  }, 8, ["active", "icon-disabled"])
1938
1942
  ])) : T("", !0),
1939
- V.value ? (f(), g("section", sn, [
1943
+ V.value ? (f(), g("section", an, [
1940
1944
  l("div", ln, [
1941
1945
  $[8] || ($[8] = l("h4", { class: "text-sm font-semibold" }, "Показатели", -1)),
1942
1946
  v(j, {
@@ -1971,7 +1975,7 @@ v + ' кВт·ч<br>выработка за день'`),
1971
1975
  onOpenStyle: (ie) => ue(S),
1972
1976
  onToggleField: (ie) => ce(S, ie),
1973
1977
  onDragstart: Z,
1974
- onDragend: ia,
1978
+ onDragend: is,
1975
1979
  onChange: (ie) => Ze(S, ie),
1976
1980
  onHover: we
1977
1981
  }, null, 8, ["metric", "index", "args", "onRemove", "onOpenStyle", "onToggleField", "onChange"])
@@ -1993,7 +1997,7 @@ v + ' кВт·ч<br>выработка за день'`),
1993
1997
  key: 0,
1994
1998
  label: m.value.label,
1995
1999
  style: Ve(m.value.style),
1996
- preview: ra(m.value),
2000
+ preview: rs(m.value),
1997
2001
  onUpdate: ee,
1998
2002
  onClose: $[5] || ($[5] = (S) => m.value = null)
1999
2003
  }, null, 8, ["label", "style", "preview"])) : T("", !0),
@@ -2030,9 +2034,9 @@ v + ' кВт·ч<br>выработка за день'`),
2030
2034
  removable: { type: Boolean, default: !1 }
2031
2035
  },
2032
2036
  emits: ["update:config", "remove"],
2033
- setup(e, { emit: s }) {
2034
- const a = s, n = F(!1), t = C(() => e.definition.component), o = C(() => Tt(e.definition, e.config, e.context)), r = (d) => {
2035
- a("update:config", d);
2037
+ setup(e, { emit: a }) {
2038
+ const s = a, n = F(!1), t = C(() => e.definition.component), o = C(() => Tt(e.definition, e.config, e.context)), r = (d) => {
2039
+ s("update:config", d);
2036
2040
  };
2037
2041
  return (d, u) => (f(), g(D, null, [
2038
2042
  (f(), O(Ee(t.value), X(o.value, {
@@ -2046,7 +2050,7 @@ v + ' кВт·ч<br>выработка за день'`),
2046
2050
  context: e.context,
2047
2051
  removable: e.removable,
2048
2052
  onClose: u[1] || (u[1] = (i) => n.value = !1),
2049
- onRemove: u[2] || (u[2] = (i) => a("remove")),
2053
+ onRemove: u[2] || (u[2] = (i) => s("remove")),
2050
2054
  "onUpdate:config": r
2051
2055
  }, null, 8, ["definition", "config", "context", "removable"])) : T("", !0)
2052
2056
  ], 64));
@@ -2063,12 +2067,12 @@ v + ' кВт·ч<br>выработка за день'`),
2063
2067
  definitions: {}
2064
2068
  },
2065
2069
  emits: ["close", "select"],
2066
- setup(e, { emit: s }) {
2067
- const a = s;
2070
+ setup(e, { emit: a }) {
2071
+ const s = a;
2068
2072
  return (n, t) => (f(), O(Se, {
2069
2073
  title: "Добавить блок",
2070
2074
  size: "md",
2071
- onClose: t[0] || (t[0] = (o) => a("close"))
2075
+ onClose: t[0] || (t[0] = (o) => s("close"))
2072
2076
  }, {
2073
2077
  default: x(() => [
2074
2078
  l("div", mn, [
@@ -2076,7 +2080,7 @@ v + ' кВт·ч<br>выработка за день'`),
2076
2080
  key: o.type,
2077
2081
  type: "button",
2078
2082
  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",
2079
- onClick: (r) => a("select", o.type)
2083
+ onClick: (r) => s("select", o.type)
2080
2084
  }, [
2081
2085
  l("span", gn, [
2082
2086
  v(I, {
@@ -2103,15 +2107,15 @@ v + ' кВт·ч<br>выработка за день'`),
2103
2107
  removable: { type: Boolean, default: !1 }
2104
2108
  },
2105
2109
  emits: ["update:config", "remove"],
2106
- setup(e, { emit: s }) {
2107
- const a = s, n = C(() => e.provider.createContext(e.source));
2110
+ setup(e, { emit: a }) {
2111
+ const s = a, n = C(() => e.provider.createContext(e.source));
2108
2112
  return (t, o) => (f(), O(un, {
2109
2113
  definition: e.definition,
2110
2114
  config: e.config,
2111
2115
  context: n.value,
2112
2116
  removable: e.removable,
2113
- "onUpdate:config": o[0] || (o[0] = (r) => a("update:config", r)),
2114
- onRemove: o[1] || (o[1] = (r) => a("remove"))
2117
+ "onUpdate:config": o[0] || (o[0] = (r) => s("update:config", r)),
2118
+ onRemove: o[1] || (o[1] = (r) => s("remove"))
2115
2119
  }, null, 8, ["definition", "config", "context", "removable"]));
2116
2120
  }
2117
2121
  }), yn = /* @__PURE__ */ L({
@@ -2125,8 +2129,8 @@ v + ' кВт·ч<br>выработка за день'`),
2125
2129
  removable: { type: Boolean, default: !1 }
2126
2130
  },
2127
2131
  emits: ["update:config"],
2128
- setup(e, { emit: s }) {
2129
- const a = s, n = F(!1), t = C(() => e.definition.component);
2132
+ setup(e, { emit: a }) {
2133
+ const s = a, n = F(!1), t = C(() => e.definition.component);
2130
2134
  return (o, r) => (f(), g(D, null, [
2131
2135
  (f(), O(Ee(t.value), X(o.$attrs, {
2132
2136
  editable: e.editable,
@@ -2139,7 +2143,7 @@ v + ' кВт·ч<br>выработка за день'`),
2139
2143
  context: e.context,
2140
2144
  removable: e.removable,
2141
2145
  onClose: r[1] || (r[1] = (d) => n.value = !1),
2142
- "onUpdate:config": r[2] || (r[2] = (d) => a("update:config", d))
2146
+ "onUpdate:config": r[2] || (r[2] = (d) => s("update:config", d))
2143
2147
  }, null, 8, ["definition", "config", "context", "removable"])) : T("", !0)
2144
2148
  ], 64));
2145
2149
  }
@@ -2149,8 +2153,8 @@ v + ' кВт·ч<br>выработка за день'`),
2149
2153
  }, kn = { class: "flex justify-end gap-2" }, Qr = /* @__PURE__ */ L({
2150
2154
  __name: "BlockImport",
2151
2155
  emits: ["close", "import"],
2152
- setup(e, { emit: s }) {
2153
- const a = s, n = F(""), t = F(""), o = (u) => typeof u == "object" && u !== null && !Array.isArray(u), r = () => {
2156
+ setup(e, { emit: a }) {
2157
+ const s = a, n = F(""), t = F(""), o = (u) => typeof u == "object" && u !== null && !Array.isArray(u), r = () => {
2154
2158
  try {
2155
2159
  const u = JSON.parse(n.value);
2156
2160
  return !o(u) || typeof u.type != "string" || !o(u.bindings) ? (t.value = "Нужен JSON блока с полями type и bindings.", null) : {
@@ -2168,12 +2172,12 @@ v + ' кВт·ч<br>выработка за день'`),
2168
2172
  }, d = () => {
2169
2173
  t.value = "";
2170
2174
  const u = r();
2171
- u && (a("import", u), a("close"));
2175
+ u && (s("import", u), s("close"));
2172
2176
  };
2173
2177
  return (u, i) => (f(), O(Se, {
2174
2178
  title: "Импорт блока",
2175
2179
  size: "md",
2176
- onClose: i[2] || (i[2] = (c) => a("close"))
2180
+ onClose: i[2] || (i[2] = (c) => s("close"))
2177
2181
  }, {
2178
2182
  default: x(() => [
2179
2183
  l("div", bn, [
@@ -2191,7 +2195,7 @@ v + ' кВт·ч<br>выработка за день'`),
2191
2195
  v(j, {
2192
2196
  color: "gray",
2193
2197
  variant: "outline",
2194
- onClick: i[1] || (i[1] = (c) => a("close"))
2198
+ onClick: i[1] || (i[1] = (c) => s("close"))
2195
2199
  }, {
2196
2200
  default: x(() => [...i[3] || (i[3] = [
2197
2201
  E("Отмена", -1)
@@ -2228,10 +2232,10 @@ v + ' кВт·ч<br>выработка за день'`),
2228
2232
  }, Sn = {
2229
2233
  key: 1,
2230
2234
  class: "ml-auto shrink-0"
2231
- }, Tn = ["inert"], An = {
2235
+ }, Tn = ["inert"], zn = {
2232
2236
  key: 1,
2233
2237
  class: "mt-4 border-t border-gray-light-10/70 pt-4 dark:border-white/10"
2234
- }, zn = /* @__PURE__ */ L({
2238
+ }, An = /* @__PURE__ */ L({
2235
2239
  __name: "VCard",
2236
2240
  props: {
2237
2241
  variant: { default: "glass" },
@@ -2244,12 +2248,12 @@ v + ' кВт·ч<br>выработка за день'`),
2244
2248
  as: { default: "div" }
2245
2249
  },
2246
2250
  setup(e) {
2247
- const s = {
2251
+ const a = {
2248
2252
  glass: "glass-inset",
2249
2253
  solid: "border border-gray-light-10/70 bg-white/80 dark:border-white/10 dark:bg-night-light-10/80",
2250
2254
  outline: "border border-gray-light-10/70 bg-transparent dark:border-white/10",
2251
2255
  ghost: "bg-transparent"
2252
- }, a = {
2256
+ }, s = {
2253
2257
  none: "",
2254
2258
  lg: "p-5 sm:p-6"
2255
2259
  }, n = {
@@ -2261,8 +2265,8 @@ v + ' кВт·ч<br>выработка за день'`),
2261
2265
  accent: "!border-violet-main/30 !bg-violet-main/10 text-violet-main"
2262
2266
  }, t = C(() => [
2263
2267
  "relative rounded-xl transition-all duration-300",
2264
- s[e.variant],
2265
- a[e.padding],
2268
+ a[e.variant],
2269
+ s[e.padding],
2266
2270
  n[e.tone],
2267
2271
  e.hover ? "hover:border-cyan-main/25 hover:shadow-cyan-glow" : ""
2268
2272
  ]);
@@ -2286,7 +2290,7 @@ v + ' кВт·ч<br>выработка за день'`),
2286
2290
  }, [
2287
2291
  B(o.$slots, "default")
2288
2292
  ], 8, Tn),
2289
- o.$slots.footer ? (f(), g("div", An, [
2293
+ o.$slots.footer ? (f(), g("div", zn, [
2290
2294
  B(o.$slots, "footer")
2291
2295
  ])) : T("", !0)
2292
2296
  ]),
@@ -2296,7 +2300,7 @@ v + ' кВт·ч<br>выработка за день'`),
2296
2300
  }), En = { class: "flex items-center gap-2" }, Vn = ["viewBox"], Bn = ["id", "d"], In = ["d"], Ln = ["d"], Mn = ["d"], On = ["dur", "begin", "keyPoints"], Fn = ["href"], Dn = ["dur", "begin"], jn = { class: "relative grid h-full grid-cols-2 grid-rows-3 gap-3 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]" }, Nn = { class: "flex items-center gap-2" }, Rn = { class: "min-w-0 flex-1 truncate text-sm font-semibold" }, Pn = {
2297
2301
  key: 0,
2298
2302
  class: "flex flex-col gap-2"
2299
- }, Un = { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, Kn = { 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" }, Hn = { class: "relative" }, Wn = { class: "flex items-center gap-2" }, Gn = { class: "grid size-9 place-items-center rounded-lg bg-cyan-main/15" }, Jn = { class: "text-sm font-semibold text-gray-dark-30 dark:text-white" }, Xn = { class: "mt-3" }, qn = { class: "whitespace-pre-line text-2xl font-bold text-gray-dark-40 dark:text-white" }, Yn = { class: "ml-1 text-xs text-gray-dark-25 dark:text-gray-main" }, Zn = { class: "mt-3 grid grid-cols-2 gap-2" }, Qn = { class: "min-w-0 truncate text-xs text-gray-dark-25 dark:text-gray-main" }, eo = { class: "glass-inset mt-2 rounded-md px-3 py-2" }, to = { class: "flex items-center justify-between gap-2 text-xs" }, ao = { class: "whitespace-pre-line font-semibold" }, so = { class: "mt-2 h-1.5 overflow-hidden rounded-full bg-gray-light-10/70 dark:bg-white/10" }, lo = /* @__PURE__ */ L({
2303
+ }, Un = { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, Kn = { 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" }, Hn = { class: "relative" }, Wn = { class: "flex items-center gap-2" }, Gn = { class: "grid size-9 place-items-center rounded-lg bg-cyan-main/15" }, Jn = { class: "text-sm font-semibold text-gray-dark-30 dark:text-white" }, Xn = { class: "mt-3" }, qn = { class: "whitespace-pre-line text-2xl font-bold text-gray-dark-40 dark:text-white" }, Yn = { class: "ml-1 text-xs text-gray-dark-25 dark:text-gray-main" }, Zn = { class: "mt-3 grid grid-cols-2 gap-2" }, Qn = { class: "min-w-0 truncate text-xs text-gray-dark-25 dark:text-gray-main" }, eo = { class: "glass-inset mt-2 rounded-md px-3 py-2" }, to = { class: "flex items-center justify-between gap-2 text-xs" }, so = { class: "whitespace-pre-line font-semibold" }, ao = { class: "mt-2 h-1.5 overflow-hidden rounded-full bg-gray-light-10/70 dark:bg-white/10" }, lo = /* @__PURE__ */ L({
2300
2304
  __name: "EnergyFlowCard",
2301
2305
  props: {
2302
2306
  title: { default: "Сетевой инвертор" },
@@ -2320,23 +2324,23 @@ v + ' кВт·ч<br>выработка за день'`),
2320
2324
  metrics: { default: () => ({}) }
2321
2325
  },
2322
2326
  emits: ["refresh", "settings"],
2323
- setup(e, { emit: s }) {
2324
- const a = s, n = (G) => Math.min(4.2, Math.max(1.6, 4.2 - Math.abs(G) * 0.55)), t = (G) => G.replace(/<br\s*\/?>/gi, `
2327
+ setup(e, { emit: a }) {
2328
+ const s = a, n = (G) => Math.min(4.2, Math.max(1.6, 4.2 - Math.abs(G) * 0.55)), t = (G) => G.replace(/<br\s*\/?>/gi, `
2325
2329
  `), o = (G) => `${Math.abs(G).toFixed(1)} кВт`, r = (G) => {
2326
2330
  var J;
2327
2331
  return ((J = e.metrics) == null ? void 0 : J[G]) ?? [];
2328
- }, d = (G, J, z) => {
2332
+ }, d = (G, J, A) => {
2329
2333
  var Re;
2330
- const R = ((Re = e.metrics) == null ? void 0 : Re[G]) ?? [], me = R.find((Pe) => Pe.id === J) ?? R[z];
2334
+ const R = ((Re = e.metrics) == null ? void 0 : Re[G]) ?? [], me = R.find((Pe) => Pe.id === J) ?? R[A];
2331
2335
  return me == null ? void 0 : me.raw;
2332
2336
  }, u = (G, J) => {
2333
- const z = typeof G == "number" ? G : Number.parseFloat(String(G));
2334
- return Number.isFinite(z) ? z : J;
2335
- }, i = C(() => u(d("solar", "solar-power", 0), e.solarPower)), c = C(() => u(d("grid", "grid-power", 0), e.gridPower)), m = C(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = C(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = C(() => u(d("house", "house-load", 0), e.loadPower)), h = C(() => i.value > 0 && e.solarFlow !== "idle"), k = C(() => e.solarFlow === "reverse"), _ = C(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), N = C(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), q = C(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), xe = C(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Te = C(() => b.value > 0 && e.houseFlow !== "idle"), A = C(() => e.houseFlow !== "reverse"), V = C(() => o(b.value)), W = C(() => r("inverter")), ne = Ea(), Ne = C(() => ne.value === "reduce"), ke = C(() => [
2337
+ const A = typeof G == "number" ? G : Number.parseFloat(String(G));
2338
+ return Number.isFinite(A) ? A : J;
2339
+ }, i = C(() => u(d("solar", "solar-power", 0), e.solarPower)), c = C(() => u(d("grid", "grid-power", 0), e.gridPower)), m = C(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = C(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = C(() => u(d("house", "house-load", 0), e.loadPower)), h = C(() => i.value > 0 && e.solarFlow !== "idle"), k = C(() => e.solarFlow === "reverse"), _ = C(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), N = C(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), q = C(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), xe = C(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Te = C(() => b.value > 0 && e.houseFlow !== "idle"), z = C(() => e.houseFlow !== "reverse"), V = C(() => o(b.value)), W = C(() => r("inverter")), ne = Es(), Ne = C(() => ne.value === "reduce"), ke = C(() => [
2336
2340
  { id: "solar", active: h.value, reverse: k.value, speed: n(i.value) },
2337
2341
  { id: "battery", active: N.value, reverse: xe.value, speed: n(m.value) },
2338
2342
  { id: "grid", active: _.value, reverse: q.value, speed: n(c.value) },
2339
- { id: "home", active: Te.value, reverse: A.value, speed: n(b.value) }
2343
+ { id: "home", active: Te.value, reverse: z.value, speed: n(b.value) }
2340
2344
  ]), Xe = C(() => ke.value.filter((G) => G.active)), it = C(() => [
2341
2345
  {
2342
2346
  key: "solar",
@@ -2382,18 +2386,18 @@ v + ' кВт·ч<br>выработка за день'`),
2382
2386
  let oe = null;
2383
2387
  const rt = (G, J) => {
2384
2388
  J instanceof HTMLElement ? Le.set(G, J) : Le.delete(G);
2385
- }, Ae = (G, J) => {
2386
- const z = G.getBoundingClientRect();
2387
- return { x: z.left - J.left, y: z.top - J.top, width: z.width, height: z.height };
2389
+ }, ze = (G, J) => {
2390
+ const A = G.getBoundingClientRect();
2391
+ return { x: A.left - J.left, y: A.top - J.top, width: A.width, height: A.height };
2388
2392
  }, $e = () => {
2389
2393
  const G = Be.value, J = Ie.value;
2390
2394
  if (!G || !J) return;
2391
- const z = G.getBoundingClientRect();
2392
- if (z.width < 2 || z.height < 2) return;
2393
- const R = Ae(J, z), me = R.x + R.width / 2, Re = R.y + R.height / 2, Pe = ke.value.map((de) => {
2395
+ const A = G.getBoundingClientRect();
2396
+ if (A.width < 2 || A.height < 2) return;
2397
+ const R = ze(J, A), me = R.x + R.width / 2, Re = R.y + R.height / 2, Pe = ke.value.map((de) => {
2394
2398
  const we = Le.get(de.id);
2395
2399
  if (!we) return null;
2396
- const U = Ae(we, z), Ce = U.x + U.width / 2, ye = U.y + U.height / 2, ce = me - Ce, ue = Re - ye, ee = Math.abs(ce) >= Math.abs(ue), Z = ee ? ce > 0 ? "right" : "left" : ue > 0 ? "bottom" : "top", Ye = Z === "left" ? "right" : Z === "right" ? "left" : Z === "top" ? "bottom" : "top";
2400
+ const U = ze(we, A), Ce = U.x + U.width / 2, ye = U.y + U.height / 2, ce = me - Ce, ue = Re - ye, ee = Math.abs(ce) >= Math.abs(ue), Z = ee ? ce > 0 ? "right" : "left" : ue > 0 ? "bottom" : "top", Ye = Z === "left" ? "right" : Z === "right" ? "left" : Z === "top" ? "bottom" : "top";
2397
2401
  return { id: de.id, rect: U, nodeSide: Z, portSide: Ye, pos: ee ? ye : Ce };
2398
2402
  }).filter((de) => de !== null), Ue = { left: [], right: [], top: [], bottom: [] };
2399
2403
  for (const de of Pe) Ue[de.portSide].push(de);
@@ -2410,7 +2414,7 @@ v + ' кВт·ч<br>выработка за день'`),
2410
2414
  qe[U.id] = ct;
2411
2415
  });
2412
2416
  }
2413
- Y.value = { width: z.width, height: z.height, paths: qe };
2417
+ Y.value = { width: A.width, height: A.height, paths: qe };
2414
2418
  }, Me = () => {
2415
2419
  if (oe) {
2416
2420
  oe.disconnect(), Be.value && oe.observe(Be.value), Ie.value && oe.observe(Ie.value);
@@ -2421,7 +2425,7 @@ v + ' кВт·ч<br>выработка за день'`),
2421
2425
  oe = new ResizeObserver(() => $e()), await xt(), $e(), Me();
2422
2426
  }), Je(() => {
2423
2427
  oe == null || oe.disconnect(), oe = null;
2424
- }), (G, J) => (f(), O(zn, {
2428
+ }), (G, J) => (f(), O(An, {
2425
2429
  title: e.title,
2426
2430
  hover: ""
2427
2431
  }, {
@@ -2441,7 +2445,7 @@ v + ' кВт·ч<br>выработка за день'`),
2441
2445
  size: "sm",
2442
2446
  "aria-label": "Настроить блок",
2443
2447
  title: "Настроить блок",
2444
- onClick: J[0] || (J[0] = (z) => a("settings"))
2448
+ onClick: J[0] || (J[0] = (A) => s("settings"))
2445
2449
  }, {
2446
2450
  default: x(() => [
2447
2451
  v(I, {
@@ -2456,7 +2460,7 @@ v + ' кВт·ч<br>выработка за день'`),
2456
2460
  size: "sm",
2457
2461
  "aria-label": "Обновить данные",
2458
2462
  title: "Обновить данные",
2459
- onClick: J[1] || (J[1] = (z) => a("refresh"))
2463
+ onClick: J[1] || (J[1] = (A) => s("refresh"))
2460
2464
  }, {
2461
2465
  default: x(() => [
2462
2466
  v(I, {
@@ -2480,85 +2484,85 @@ v + ' кВт·ч<br>выработка за день'`),
2480
2484
  viewBox: `0 0 ${Y.value.width} ${Y.value.height}`,
2481
2485
  "aria-hidden": "true"
2482
2486
  }, [
2483
- (f(!0), g(D, null, K(ke.value, (z) => (f(), g("path", {
2484
- id: `energy-path-${z.id}`,
2485
- key: `rail-${z.id}`,
2487
+ (f(!0), g(D, null, K(ke.value, (A) => (f(), g("path", {
2488
+ id: `energy-path-${A.id}`,
2489
+ key: `rail-${A.id}`,
2486
2490
  class: "stroke-current text-gray-main dark:text-white/20 [stroke-width:1.5] [stroke-linecap:round] [stroke-dasharray:2_6] opacity-45",
2487
- d: Y.value.paths[z.id],
2491
+ d: Y.value.paths[A.id],
2488
2492
  fill: "none"
2489
2493
  }, null, 8, Bn))), 128)),
2490
- (f(!0), g(D, null, K(Xe.value, (z) => (f(), g("g", {
2491
- key: `flow-${z.id}`
2494
+ (f(!0), g(D, null, K(Xe.value, (A) => (f(), g("g", {
2495
+ key: `flow-${A.id}`
2492
2496
  }, [
2493
2497
  l("path", {
2494
2498
  class: "stroke-cyan-main [stroke-width:2.5] [stroke-linecap:round] opacity-55",
2495
- d: Y.value.paths[z.id],
2499
+ d: Y.value.paths[A.id],
2496
2500
  fill: "none"
2497
2501
  }, null, 8, In),
2498
2502
  l("path", {
2499
2503
  class: "stroke-cyan-main [stroke-width:10] [stroke-linecap:round] opacity-20 blur-sm",
2500
- d: Y.value.paths[z.id],
2504
+ d: Y.value.paths[A.id],
2501
2505
  fill: "none"
2502
2506
  }, null, 8, Ln),
2503
2507
  l("path", {
2504
- class: M(["animate-energy-flow stroke-gray-light-30 stroke-2 [stroke-linecap:round] [stroke-dasharray:16_22] opacity-75 drop-shadow-cyan-glow-xs motion-reduce:animate-none motion-reduce:[stroke-dasharray:none]", { "[animation-direction:reverse]": z.reverse }]),
2505
- d: Y.value.paths[z.id],
2506
- style: Ve({ animationDuration: `${z.speed}s` }),
2508
+ class: M(["animate-energy-flow stroke-gray-light-30 stroke-2 [stroke-linecap:round] [stroke-dasharray:16_22] opacity-75 drop-shadow-cyan-glow-xs motion-reduce:animate-none motion-reduce:[stroke-dasharray:none]", { "[animation-direction:reverse]": A.reverse }]),
2509
+ d: Y.value.paths[A.id],
2510
+ style: Ve({ animationDuration: `${A.speed}s` }),
2507
2511
  fill: "none"
2508
2512
  }, null, 14, Mn),
2509
2513
  Ne.value ? T("", !0) : (f(), g(D, { key: 0 }, K([0, 1, 2], (R, me) => l("circle", {
2510
- key: `dot-${z.id}-${R}`,
2514
+ key: `dot-${A.id}-${R}`,
2511
2515
  r: "2.6",
2512
2516
  opacity: "0",
2513
2517
  class: "fill-gray-light-30 drop-shadow-cyan-glow-dot"
2514
2518
  }, [
2515
2519
  l("animateMotion", {
2516
- dur: `${z.speed}s`,
2517
- begin: `${me * z.speed / 3}s`,
2520
+ dur: `${A.speed}s`,
2521
+ begin: `${me * A.speed / 3}s`,
2518
2522
  repeatCount: "indefinite",
2519
2523
  calcMode: "linear",
2520
2524
  keyTimes: "0;1",
2521
- keyPoints: z.reverse ? "1;0" : "0;1"
2525
+ keyPoints: A.reverse ? "1;0" : "0;1"
2522
2526
  }, [
2523
2527
  l("mpath", {
2524
- href: `#energy-path-${z.id}`
2528
+ href: `#energy-path-${A.id}`
2525
2529
  }, null, 8, Fn)
2526
2530
  ], 8, On),
2527
2531
  l("animate", {
2528
2532
  attributeName: "opacity",
2529
2533
  values: "0;1;1;0",
2530
2534
  keyTimes: "0;0.15;0.85;1",
2531
- dur: `${z.speed}s`,
2532
- begin: `${me * z.speed / 3}s`,
2535
+ dur: `${A.speed}s`,
2536
+ begin: `${me * A.speed / 3}s`,
2533
2537
  repeatCount: "indefinite"
2534
2538
  }, null, 8, Dn)
2535
2539
  ])), 64))
2536
2540
  ]))), 128))
2537
2541
  ], 8, Vn)) : T("", !0),
2538
2542
  l("div", jn, [
2539
- (f(!0), g(D, null, K(it.value, (z) => (f(), g("div", {
2540
- key: z.key,
2543
+ (f(!0), g(D, null, K(it.value, (A) => (f(), g("div", {
2544
+ key: A.key,
2541
2545
  ref_for: !0,
2542
- ref: (R) => rt(z.key, R),
2543
- class: M(z.wrapper)
2546
+ ref: (R) => rt(A.key, R),
2547
+ class: M(A.wrapper)
2544
2548
  }, [
2545
2549
  l("div", {
2546
- class: M(["relative flex w-full max-w-none flex-col gap-3 rounded-2xl border p-4 shadow-cyan-glow-soft lg:max-w-56", z.card])
2550
+ class: M(["relative flex w-full max-w-none flex-col gap-3 rounded-2xl border p-4 shadow-cyan-glow-soft lg:max-w-56", A.card])
2547
2551
  }, [
2548
2552
  l("div", Nn, [
2549
2553
  l("span", {
2550
- class: M(["grid size-8 shrink-0 place-items-center rounded-lg", z.surface])
2554
+ class: M(["grid size-8 shrink-0 place-items-center rounded-lg", A.surface])
2551
2555
  }, [
2552
2556
  v(I, {
2553
- name: z.icon,
2557
+ name: A.icon,
2554
2558
  size: 16,
2555
- class: M(z.tone)
2559
+ class: M(A.tone)
2556
2560
  }, null, 8, ["name", "class"])
2557
2561
  ], 2),
2558
- l("span", Rn, w(z.label), 1)
2562
+ l("span", Rn, w(A.label), 1)
2559
2563
  ]),
2560
- z.metrics.length ? (f(), g("div", Pn, [
2561
- (f(!0), g(D, null, K(z.metrics, (R) => (f(), g("div", {
2564
+ A.metrics.length ? (f(), g("div", Pn, [
2565
+ (f(!0), g(D, null, K(A.metrics, (R) => (f(), g("div", {
2562
2566
  key: R.id,
2563
2567
  class: "glass-inset rounded-lg px-3 py-2"
2564
2568
  }, [
@@ -2592,22 +2596,22 @@ v + ' кВт·ч<br>выработка за день'`),
2592
2596
  l("span", Yn, w(e.loadLabel), 1)
2593
2597
  ]),
2594
2598
  l("dl", Zn, [
2595
- (f(!0), g(D, null, K(W.value, (z) => (f(), g("div", {
2596
- key: z.id,
2599
+ (f(!0), g(D, null, K(W.value, (A) => (f(), g("div", {
2600
+ key: A.id,
2597
2601
  class: "glass-inset rounded-md px-3 py-2"
2598
2602
  }, [
2599
- l("dt", Qn, w(z.label), 1),
2603
+ l("dt", Qn, w(A.label), 1),
2600
2604
  l("dd", {
2601
- class: M(["mt-0.5 whitespace-pre", H(vt)(z.style)])
2602
- }, w(z.value), 3)
2605
+ class: M(["mt-0.5 whitespace-pre", H(vt)(A.style)])
2606
+ }, w(A.value), 3)
2603
2607
  ]))), 128))
2604
2608
  ]),
2605
2609
  l("div", eo, [
2606
2610
  l("div", to, [
2607
2611
  J[2] || (J[2] = l("span", { class: "text-gray-dark-25 dark:text-gray-main" }, "Батарея", -1)),
2608
- l("span", ao, w(p.value) + " %", 1)
2612
+ l("span", so, w(p.value) + " %", 1)
2609
2613
  ]),
2610
- l("div", so, [
2614
+ l("div", ao, [
2611
2615
  l("div", {
2612
2616
  class: "h-full rounded-full bg-emerald-500 transition-all duration-500",
2613
2617
  style: Ve({ width: `${p.value}%` })
@@ -2684,8 +2688,8 @@ v + ' кВт·ч<br>выработка за день'`),
2684
2688
  removable: { type: Boolean, default: !1 }
2685
2689
  },
2686
2690
  emits: ["update:config"],
2687
- setup(e, { emit: s }) {
2688
- const a = s;
2691
+ setup(e, { emit: a }) {
2692
+ const s = a;
2689
2693
  return (n, t) => (f(), O(yn, X({
2690
2694
  definition: H(io),
2691
2695
  config: e.config,
@@ -2693,17 +2697,17 @@ v + ' кВт·ч<br>выработка за день'`),
2693
2697
  editable: e.editable,
2694
2698
  removable: e.removable
2695
2699
  }, n.$attrs, {
2696
- "onUpdate:config": t[0] || (t[0] = (o) => a("update:config", o))
2700
+ "onUpdate:config": t[0] || (t[0] = (o) => s("update:config", o))
2697
2701
  }), null, 16, ["definition", "config", "context", "editable", "removable"]));
2698
2702
  }
2699
- }), ro = (e, s, a, n) => ({
2703
+ }), ro = (e, a, s, n) => ({
2700
2704
  kind: e,
2701
- roots: s,
2702
- helpers: a,
2705
+ roots: a,
2706
+ helpers: s,
2703
2707
  meta: n,
2704
- get: (t) => Ma(t, s)
2708
+ get: (t) => Ms(t, a)
2705
2709
  }), co = (e) => {
2706
- const s = ro("device", {
2710
+ const a = ro("device", {
2707
2711
  device: e.device ?? {},
2708
2712
  ports: e.ports ?? {},
2709
2713
  dallas: e.dallas ?? {},
@@ -2711,18 +2715,18 @@ v + ' кВт·ч<br>выработка за день'`),
2711
2715
  slots: e.slots ?? {},
2712
2716
  discovery: e.discovery ?? {}
2713
2717
  });
2714
- return s.helpers = {
2715
- port: (a) => s.get(`ports.${String(a)}`),
2716
- dallas: (a) => s.get(`dallas.${String(a)}`)
2717
- }, s;
2718
+ return a.helpers = {
2719
+ port: (s) => a.get(`ports.${String(s)}`),
2720
+ dallas: (s) => a.get(`dallas.${String(s)}`)
2721
+ }, a;
2718
2722
  }, uo = {
2719
2723
  id: "vuesp.device",
2720
2724
  label: "Устройство vuesp",
2721
2725
  createContext: (e) => co(e)
2722
2726
  }, mo = "/tmp/blocks.json", Ot = "/fs", fo = 1, go = 8, qt = 10, Yt = 4, nt = 512, vo = 64, po = 8192, Zt = ["vuesp.blocks", "vuesp.block.energy"], ho = ["xs", "sm", "base", "lg", "xl"], yo = ["default", "muted", "primary", "success", "warning", "danger"], bo = ["normal", "medium", "semibold"], xo = ["left", "right"], pe = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Qt = (e) => {
2723
2727
  if (!pe(e)) return;
2724
- const s = {};
2725
- return typeof e.size == "string" && ho.includes(e.size) && (s.size = e.size), typeof e.color == "string" && yo.includes(e.color) && (s.color = e.color), typeof e.weight == "string" && bo.includes(e.weight) && (s.weight = e.weight), typeof e.align == "string" && xo.includes(e.align) && (s.align = e.align), Object.keys(s).length ? s : void 0;
2728
+ const a = {};
2729
+ return typeof e.size == "string" && ho.includes(e.size) && (a.size = e.size), typeof e.color == "string" && yo.includes(e.color) && (a.color = e.color), typeof e.weight == "string" && bo.includes(e.weight) && (a.weight = e.weight), typeof e.align == "string" && xo.includes(e.align) && (a.align = e.align), Object.keys(a).length ? a : void 0;
2726
2730
  }, ko = (e) => !pe(e) || typeof e.i != "string" || !e.i ? null : {
2727
2731
  id: e.i,
2728
2732
  label: typeof e.l == "string" ? e.l : "",
@@ -2731,31 +2735,31 @@ v + ' кВт·ч<br>выработка за день'`),
2731
2735
  style: Qt(e.s)
2732
2736
  }, $o = (e) => {
2733
2737
  if (!pe(e)) return;
2734
- const s = {};
2735
- for (const [a, n] of Object.entries(e))
2736
- Array.isArray(n) && (s[a] = n.filter((t) => typeof t == "string").slice(0, Yt));
2737
- return Object.keys(s).length ? s : void 0;
2738
+ const a = {};
2739
+ for (const [s, n] of Object.entries(e))
2740
+ Array.isArray(n) && (a[s] = n.filter((t) => typeof t == "string").slice(0, Yt));
2741
+ return Object.keys(a).length ? a : void 0;
2738
2742
  }, wo = (e) => {
2739
2743
  if (!pe(e)) return;
2740
- const s = {};
2741
- for (const [a, n] of Object.entries(e)) {
2744
+ const a = {};
2745
+ for (const [s, n] of Object.entries(e)) {
2742
2746
  if (!Array.isArray(n)) continue;
2743
2747
  const t = n.map(ko).filter((o) => o !== null).slice(0, qt);
2744
- (t.length || Array.isArray(n)) && (s[a] = t);
2748
+ (t.length || Array.isArray(n)) && (a[s] = t);
2745
2749
  }
2746
- return Object.keys(s).length ? s : void 0;
2750
+ return Object.keys(a).length ? a : void 0;
2747
2751
  }, Co = (e) => {
2748
2752
  if (!e) return;
2749
- const s = {};
2750
- for (const [a, n] of Object.entries(e))
2751
- n && (s[a] = n.map((t) => ({
2753
+ const a = {};
2754
+ for (const [s, n] of Object.entries(e))
2755
+ n && (a[s] = n.map((t) => ({
2752
2756
  i: t.id,
2753
2757
  l: t.label,
2754
2758
  v: t.value,
2755
2759
  f: t.format,
2756
2760
  ...t.style && Object.keys(t.style).length ? { s: t.style } : {}
2757
2761
  })));
2758
- return Object.keys(s).length ? s : void 0;
2762
+ return Object.keys(a).length ? a : void 0;
2759
2763
  }, _o = (e) => ({
2760
2764
  id: e.id.slice(0, 64),
2761
2765
  label: String(e.label ?? "").slice(0, vo),
@@ -2764,54 +2768,54 @@ v + ' кВт·ч<br>выработка за день'`),
2764
2768
  ...e.style ? { style: Qt(e.style) } : {}
2765
2769
  }), So = (e) => {
2766
2770
  if (!e) return;
2767
- const s = {};
2768
- for (const [a, n] of Object.entries(e))
2769
- Array.isArray(n) && (s[a] = n.slice(0, Yt).map((t) => String(t).slice(0, nt)));
2770
- return Object.keys(s).length ? s : void 0;
2771
+ const a = {};
2772
+ for (const [s, n] of Object.entries(e))
2773
+ Array.isArray(n) && (a[s] = n.slice(0, Yt).map((t) => String(t).slice(0, nt)));
2774
+ return Object.keys(a).length ? a : void 0;
2771
2775
  }, To = (e) => {
2772
2776
  if (!e) return;
2773
- const s = {};
2774
- for (const [a, n] of Object.entries(e))
2775
- n && (s[a] = n.slice(0, qt).map(_o));
2776
- return Object.keys(s).length ? s : void 0;
2777
- }, ea = (e) => Array.isArray(e) ? e : pe(e) && typeof e.type == "string" && pe(e.bindings) ? [e] : !pe(e) || !Array.isArray(e.b) ? [] : e.b.filter(pe).map((s) => ({
2778
- id: String(s.i ?? ""),
2779
- type: String(s.t ?? ""),
2780
- provider: s.p ? String(s.p) : void 0,
2781
- bindings: pe(s.m) ? s.m : {},
2782
- units: pe(s.u) ? s.u : void 0,
2783
- metricArgs: $o(s.A),
2784
- metrics: wo(s.g)
2785
- })).filter((s) => s.id && s.type), ta = (e) => ({
2777
+ const a = {};
2778
+ for (const [s, n] of Object.entries(e))
2779
+ n && (a[s] = n.slice(0, qt).map(_o));
2780
+ return Object.keys(a).length ? a : void 0;
2781
+ }, es = (e) => Array.isArray(e) ? e : pe(e) && typeof e.type == "string" && pe(e.bindings) ? [e] : !pe(e) || !Array.isArray(e.b) ? [] : e.b.filter(pe).map((a) => ({
2782
+ id: String(a.i ?? ""),
2783
+ type: String(a.t ?? ""),
2784
+ provider: a.p ? String(a.p) : void 0,
2785
+ bindings: pe(a.m) ? a.m : {},
2786
+ units: pe(a.u) ? a.u : void 0,
2787
+ metricArgs: $o(a.A),
2788
+ metrics: wo(a.g)
2789
+ })).filter((a) => a.id && a.type), ts = (e) => ({
2786
2790
  v: fo,
2787
- b: e.map((s) => ({
2788
- i: s.id,
2789
- t: s.type,
2790
- ...s.provider ? { p: s.provider } : {},
2791
- m: s.bindings,
2792
- ...s.units && Object.keys(s.units).length ? { u: s.units } : {},
2793
- ...s.metricArgs && Object.keys(s.metricArgs).length ? { A: s.metricArgs } : {},
2794
- ...s.metrics && Object.keys(s.metrics).length ? { g: Co(s.metrics) } : {}
2791
+ b: e.map((a) => ({
2792
+ i: a.id,
2793
+ t: a.type,
2794
+ ...a.provider ? { p: a.provider } : {},
2795
+ m: a.bindings,
2796
+ ...a.units && Object.keys(a.units).length ? { u: a.units } : {},
2797
+ ...a.metricArgs && Object.keys(a.metricArgs).length ? { A: a.metricArgs } : {},
2798
+ ...a.metrics && Object.keys(a.metrics).length ? { g: Co(a.metrics) } : {}
2795
2799
  }))
2796
- }), Ao = (e) => {
2797
- const s = e.slice(0, go).map((a) => ({
2798
- ...a,
2800
+ }), zo = (e) => {
2801
+ const a = e.slice(0, go).map((s) => ({
2802
+ ...s,
2799
2803
  bindings: Object.fromEntries(
2800
- Object.entries(a.bindings).map(([n, t]) => [n, typeof t == "string" ? t.slice(0, nt) : t]).filter(([, n]) => n !== "")
2804
+ Object.entries(s.bindings).map(([n, t]) => [n, typeof t == "string" ? t.slice(0, nt) : t]).filter(([, n]) => n !== "")
2801
2805
  ),
2802
- metricArgs: So(a.metricArgs),
2803
- metrics: To(a.metrics)
2806
+ metricArgs: So(s.metricArgs),
2807
+ metrics: To(s.metrics)
2804
2808
  }));
2805
- for (; s.length > 0 && JSON.stringify(ta(s)).length > po; )
2806
- s.pop();
2807
- return s;
2808
- }, zo = () => {
2809
+ for (; a.length > 0 && JSON.stringify(ts(a)).length > po; )
2810
+ a.pop();
2811
+ return a;
2812
+ }, Ao = () => {
2809
2813
  for (const e of Zt)
2810
2814
  try {
2811
- const s = localStorage.getItem(e);
2812
- if (!s) continue;
2813
- const a = ea(JSON.parse(s));
2814
- if (a.length) return a;
2815
+ const a = localStorage.getItem(e);
2816
+ if (!a) continue;
2817
+ const s = es(JSON.parse(a));
2818
+ if (s.length) return s;
2815
2819
  } catch {
2816
2820
  }
2817
2821
  return [];
@@ -2822,9 +2826,9 @@ v + ' кВт·ч<br>выработка за день'`),
2822
2826
  } catch {
2823
2827
  }
2824
2828
  }, Vo = (e = mo) => {
2825
- const s = async (n) => {
2829
+ const a = async (n) => {
2826
2830
  const t = new FormData();
2827
- t.append("file[0]", new Blob([JSON.stringify(ta(Ao(n)))], { type: "application/json" }), e);
2831
+ t.append("file[0]", new Blob([JSON.stringify(ts(zo(n)))], { type: "application/json" }), e);
2828
2832
  const o = await fetch(Ot, { method: "POST", body: t });
2829
2833
  if (!o.ok) throw new Error(`Не удалось сохранить настройки блока: HTTP ${o.status}`);
2830
2834
  };
@@ -2832,31 +2836,31 @@ v + ' кВт·ч<br>выработка за день'`),
2832
2836
  try {
2833
2837
  const t = await fetch(`${Ot}?file=${e}`);
2834
2838
  if (t.ok) {
2835
- const o = ea(await t.json());
2839
+ const o = es(await t.json());
2836
2840
  if (o.length) return o;
2837
2841
  }
2838
2842
  } catch {
2839
2843
  }
2840
- const n = zo();
2844
+ const n = Ao();
2841
2845
  if (n.length)
2842
2846
  try {
2843
- await s(n), Eo();
2847
+ await a(n), Eo();
2844
2848
  } catch {
2845
2849
  }
2846
2850
  return n;
2847
- }, write: s };
2848
- }, td = Vo(), ad = (e, s, a = {}) => {
2849
- const n = a.provider ?? uo, t = a.id ?? e.defaultId ?? e.type, o = F({
2851
+ }, write: a };
2852
+ }, td = Vo(), sd = (e, a, s = {}) => {
2853
+ const n = s.provider ?? uo, t = s.id ?? e.defaultId ?? e.type, o = F({
2850
2854
  id: t,
2851
2855
  type: e.type,
2852
2856
  provider: n.id,
2853
2857
  title: e.name,
2854
2858
  bindings: { ...e.defaults ?? {} },
2855
2859
  units: {}
2856
- }), r = C(() => n.createContext(fa(s))), d = C(() => Tt(e, o.value, r.value)), u = C(() => ({ ...o.value.units ?? {} })), i = async () => {
2857
- if (a.storage)
2860
+ }), r = C(() => n.createContext(fs(a))), d = C(() => Tt(e, o.value, r.value)), u = C(() => ({ ...o.value.units ?? {} })), i = async () => {
2861
+ if (s.storage)
2858
2862
  try {
2859
- const p = (await a.storage.read()).find((b) => b.id === t);
2863
+ const p = (await s.storage.read()).find((b) => b.id === t);
2860
2864
  if (!p) return;
2861
2865
  o.value = {
2862
2866
  ...o.value,
@@ -2869,10 +2873,10 @@ v + ' кВт·ч<br>выработка за день'`),
2869
2873
  } catch {
2870
2874
  }
2871
2875
  }, c = async (m) => {
2872
- if (o.value = m, !!a.storage)
2876
+ if (o.value = m, !!s.storage)
2873
2877
  try {
2874
- const p = await a.storage.read();
2875
- await a.storage.write([...p.filter((b) => b.id !== m.id), m]);
2878
+ const p = await s.storage.read();
2879
+ await s.storage.write([...p.filter((b) => b.id !== m.id), m]);
2876
2880
  } catch {
2877
2881
  }
2878
2882
  };
@@ -2886,7 +2890,7 @@ v + ' кВт·ч<br>выработка за день'`),
2886
2890
  });
2887
2891
  }, Bo = { class: "flex-auto flex justify-between" }, Io = { class: "text-sm text-gray-dark-25 font-medium line-clamp-2 overflow-hidden dark:text-gray-light-10" }, Lo = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, Mo = {
2888
2892
  key: 0,
2889
- class: "absolute left-1/2 top-1/2 size-1/2 text-gray-light-10/30 dark:text-white/10 -translate-1/2"
2893
+ class: "absolute left-1/2 top-1/2 size-1/2 text-gray-light-10/10 dark:text-white/2 -translate-1/2"
2890
2894
  }, Oo = { class: "min-h-60 relative" }, Fo = { class: "pt-6" }, Do = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, jo = { class: "text-center text-xl mt-4" }, je = /* @__PURE__ */ L({
2891
2895
  __name: "CardBase",
2892
2896
  props: {
@@ -2906,8 +2910,8 @@ v + ' кВт·ч<br>выработка за день'`),
2906
2910
  meta: {}
2907
2911
  },
2908
2912
  emits: ["edit", "close", "click", "clone", "open", "setState"],
2909
- setup(e, { emit: s }) {
2910
- const a = e, n = s, t = F(!1), o = C(() => ["button", "dimmer"].includes(a.type || "") && a.value ? "text-amber-500" : "text-gray-main dark:text-gray-light-10"), r = (m) => n("edit", m), d = (m) => n("clone", m), u = () => t.value = !0, i = (m) => n("open", m), c = (m) => {
2913
+ setup(e, { emit: a }) {
2914
+ const s = e, n = a, t = F(!1), o = C(() => ["button", "dimmer"].includes(s.type || "") && s.value ? "text-amber-500" : "text-gray-main dark:text-gray-light-10"), r = (m) => n("edit", m), d = (m) => n("clone", m), u = () => t.value = !0, i = (m) => n("open", m), c = (m) => {
2911
2915
  t.value = !1, n("close", m);
2912
2916
  };
2913
2917
  return (m, p) => (f(), g("div", {
@@ -2918,30 +2922,30 @@ v + ' кВт·ч<br>выработка за день'`),
2918
2922
  l("div", {
2919
2923
  class: M([o.value, "size-8 animate-shake"])
2920
2924
  }, [
2921
- B(m.$slots, "icon", ae(se(a)))
2925
+ B(m.$slots, "icon", se(ae(s)))
2922
2926
  ], 2),
2923
- B(m.$slots, "header", ae(se(a)))
2927
+ B(m.$slots, "header", se(ae(s)))
2924
2928
  ]),
2925
2929
  l("div", null, [
2926
- B(m.$slots, "body", ae(se(a)), () => [
2930
+ B(m.$slots, "body", se(ae(s)), () => [
2927
2931
  l("h6", Io, [
2928
- B(m.$slots, "name", ae(se(a)), () => [
2929
- E(w(a.name), 1)
2932
+ B(m.$slots, "name", se(ae(s)), () => [
2933
+ E(w(s.name), 1)
2930
2934
  ])
2931
2935
  ]),
2932
2936
  l("div", Lo, [
2933
- B(m.$slots, "value", ae(se(a)), () => [
2934
- E(w(a.valueTo || a.value), 1)
2937
+ B(m.$slots, "value", se(ae(s)), () => [
2938
+ E(w(s.valueTo || s.value), 1)
2935
2939
  ])
2936
2940
  ])
2937
2941
  ])
2938
2942
  ]),
2939
- a.icon ? (f(), g("div", Mo, [
2940
- B(m.$slots, "icon", ae(se(a)))
2943
+ s.icon ? (f(), g("div", Mo, [
2944
+ B(m.$slots, "icon", se(ae(s)))
2941
2945
  ])) : T("", !0),
2942
2946
  t.value ? (f(), O(Se, {
2943
2947
  key: 1,
2944
- size: a.size || "sm",
2948
+ size: s.size || "sm",
2945
2949
  title: e.name,
2946
2950
  onClose: c,
2947
2951
  onOpen: i
@@ -2952,7 +2956,10 @@ v + ' кВт·ч<br>выработка за день'`),
2952
2956
  onClick: r
2953
2957
  }, {
2954
2958
  default: x(() => [
2955
- v(I, { name: "more" })
2959
+ v(I, {
2960
+ name: "more",
2961
+ class: "size-5"
2962
+ })
2956
2963
  ]),
2957
2964
  _: 1
2958
2965
  }),
@@ -2973,14 +2980,14 @@ v + ' кВт·ч<br>выработка за день'`),
2973
2980
  l("div", Oo, [
2974
2981
  l("div", Fo, [
2975
2982
  l("h3", Do, [
2976
- B(m.$slots, "dialog-name", ae(se(a)), () => [
2977
- E(w(a.name), 1)
2983
+ B(m.$slots, "dialog-name", se(ae(s)), () => [
2984
+ E(w(s.name), 1)
2978
2985
  ])
2979
2986
  ]),
2980
- B(m.$slots, "dialog", ae(se(a))),
2987
+ B(m.$slots, "dialog", se(ae(s))),
2981
2988
  l("p", jo, [
2982
- B(m.$slots, "dialog-value", ae(se(a)), () => [
2983
- E(w(a.valueTo || a.value), 1)
2989
+ B(m.$slots, "dialog-value", se(ae(s)), () => [
2990
+ E(w(s.valueTo || s.value), 1)
2984
2991
  ])
2985
2992
  ])
2986
2993
  ])
@@ -2990,7 +2997,7 @@ v + ' кВт·ч<br>выработка за день'`),
2990
2997
  }, 8, ["size", "title"])) : T("", !0)
2991
2998
  ]));
2992
2999
  }
2993
- }), No = { class: "flex justify-end" }, Ro = { class: "flex justify-center py-4" }, sd = /* @__PURE__ */ L({
3000
+ }), No = { class: "flex justify-end" }, Ro = { class: "flex justify-center py-4" }, ad = /* @__PURE__ */ L({
2994
3001
  __name: "CardButton",
2995
3002
  props: {
2996
3003
  size: {},
@@ -3009,24 +3016,24 @@ v + ' кВт·ч<br>выработка за день'`),
3009
3016
  meta: {}
3010
3017
  },
3011
3018
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3012
- setup(e, { emit: s }) {
3013
- const a = e, n = s, t = ({ opts: r = {} }) => {
3019
+ setup(e, { emit: a }) {
3020
+ const s = e, n = a, t = ({ opts: r = {} }) => {
3014
3021
  const { disabled: d } = r;
3015
3022
  return { disabled: !!d };
3016
- }, o = () => n("setState", !a.value);
3017
- return (r, d) => (f(), O(je, X(a, {
3023
+ }, o = () => n("setState", !s.value);
3024
+ return (r, d) => (f(), O(je, X(s, {
3018
3025
  onClick: d[0] || (d[0] = (u) => n("click", u)),
3019
3026
  onEdit: d[1] || (d[1] = (u) => n("edit", u)),
3020
3027
  onClone: d[2] || (d[2] = (u) => n("clone", u))
3021
3028
  }), {
3022
3029
  icon: x((u) => [
3023
- B(r.$slots, "icon", ae(se(u)))
3030
+ B(r.$slots, "icon", se(ae(u)))
3024
3031
  ]),
3025
3032
  header: x((u) => [
3026
3033
  l("div", No, [
3027
3034
  v(j, X(t(u), {
3028
3035
  type: "icon",
3029
- class: a.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10",
3036
+ class: s.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10",
3030
3037
  onClick: Q(o, ["stop"])
3031
3038
  }), {
3032
3039
  default: x(() => [
@@ -3043,7 +3050,7 @@ v + ' кВт·ч<br>выработка за день'`),
3043
3050
  l("div", Ro, [
3044
3051
  v(j, X(t(u), {
3045
3052
  type: "icon",
3046
- class: ["size-18", a.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10"],
3053
+ class: ["size-18", s.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10"],
3047
3054
  onClick: Q(o, ["stop"])
3048
3055
  }), {
3049
3056
  default: x(() => [
@@ -3078,8 +3085,8 @@ v + ' кВт·ч<br>выработка за день'`),
3078
3085
  meta: {}
3079
3086
  },
3080
3087
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3081
- setup(e, { emit: s }) {
3082
- const a = e, n = s, t = Kt("time"), o = (i) => new Date(+i * 1e3).toISOString().slice(0, 16), r = (i) => {
3088
+ setup(e, { emit: a }) {
3089
+ const s = e, n = a, t = Kt("time"), o = (i) => new Date(+i * 1e3).toISOString().slice(0, 16), r = (i) => {
3083
3090
  var m;
3084
3091
  const c = (m = i == null ? void 0 : i.target) == null ? void 0 : m.valueAsNumber;
3085
3092
  c && n("setState", c / 1e3);
@@ -3091,13 +3098,13 @@ v + ' кВт·ч<br>выработка за день'`),
3091
3098
  const i = (m = (c = t.value) == null ? void 0 : c.$el) == null ? void 0 : m.querySelector("input");
3092
3099
  i != null && i.showPicker && i.showPicker();
3093
3100
  };
3094
- return (i, c) => (f(), O(je, X(a, {
3101
+ return (i, c) => (f(), O(je, X(s, {
3095
3102
  onClick: c[0] || (c[0] = (m) => n("click", m)),
3096
3103
  onEdit: c[1] || (c[1] = (m) => n("edit", m)),
3097
3104
  onClone: c[2] || (c[2] = (m) => n("clone", m))
3098
3105
  }), {
3099
3106
  icon: x((m) => [
3100
- B(i.$slots, "icon", ae(se(m)))
3107
+ B(i.$slots, "icon", se(ae(m)))
3101
3108
  ]),
3102
3109
  header: x((m) => [
3103
3110
  l("div", null, [
@@ -3163,20 +3170,20 @@ v + ' кВт·ч<br>выработка за день'`),
3163
3170
  meta: {}
3164
3171
  },
3165
3172
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3166
- setup(e, { emit: s }) {
3167
- const a = e, n = s, t = F(0), o = ({ opts: c, value: m }) => Math.round(100 * +m / ((c == null ? void 0 : c.max) || 255)), r = ({ opts: c, value: m }) => Math.round(187 - +m / ((c == null ? void 0 : c.max) || 255) * 187), d = ({ value: c, opts: m }) => {
3173
+ setup(e, { emit: a }) {
3174
+ const s = e, n = a, t = F(0), o = ({ opts: c, value: m }) => Math.round(100 * +m / ((c == null ? void 0 : c.max) || 255)), r = ({ opts: c, value: m }) => Math.round(187 - +m / ((c == null ? void 0 : c.max) || 255) * 187), d = ({ value: c, opts: m }) => {
3168
3175
  const { min: p = 0, max: b = 255, step: h = 1, disabled: k } = m || {};
3169
3176
  return { min: p, max: b, step: h, value: c, disabled: !!k, class: k ? "" : "cursor-pointer" };
3170
3177
  }, u = (c) => n("setState", +c.target.value || 0), i = ({ value: c }) => {
3171
3178
  +c != 0 ? (t.value = +c, n("setState", 0)) : n("setState", c ? 0 : t.value || 255);
3172
3179
  };
3173
- return (c, m) => (f(), O(je, X(a, {
3180
+ return (c, m) => (f(), O(je, X(s, {
3174
3181
  onClick: m[0] || (m[0] = (p) => n("click", p)),
3175
3182
  onEdit: m[1] || (m[1] = (p) => n("edit", p)),
3176
3183
  onClone: m[2] || (m[2] = (p) => n("clone", p))
3177
3184
  }), {
3178
3185
  icon: x((p) => [
3179
- B(c.$slots, "icon", ae(se(p)))
3186
+ B(c.$slots, "icon", se(ae(p)))
3180
3187
  ]),
3181
3188
  header: x((p) => [
3182
3189
  l("div", Uo, [
@@ -3253,15 +3260,15 @@ v + ' кВт·ч<br>выработка за день'`),
3253
3260
  meta: {}
3254
3261
  },
3255
3262
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3256
- setup(e, { emit: s }) {
3257
- const a = e, n = s;
3258
- return (t, o) => (f(), O(je, X(a, {
3263
+ setup(e, { emit: a }) {
3264
+ const s = e, n = a;
3265
+ return (t, o) => (f(), O(je, X(s, {
3259
3266
  onClick: o[0] || (o[0] = (r) => n("click", r)),
3260
3267
  onEdit: o[1] || (o[1] = (r) => n("edit", r)),
3261
3268
  onClone: o[2] || (o[2] = (r) => n("clone", r))
3262
3269
  }), {
3263
3270
  icon: x((r) => [
3264
- B(t.$slots, "icon", ae(se(r)))
3271
+ B(t.$slots, "icon", se(ae(r)))
3265
3272
  ]),
3266
3273
  default: x(() => [
3267
3274
  B(t.$slots, "dialog")
@@ -3288,23 +3295,23 @@ v + ' кВт·ч<br>выработка за день'`),
3288
3295
  meta: {}
3289
3296
  },
3290
3297
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3291
- setup(e, { emit: s }) {
3292
- const a = e, n = s, t = F(a.value || ""), o = ({ name: d, opts: u = {} }) => {
3298
+ setup(e, { emit: a }) {
3299
+ const s = e, n = a, t = F(s.value || ""), o = ({ name: d, opts: u = {} }) => {
3293
3300
  const { disabled: i } = u;
3294
3301
  return { label: d, disabled: i };
3295
3302
  }, r = (d) => n("setState", d.target.value);
3296
3303
  return _e(
3297
- () => a.value,
3304
+ () => s.value,
3298
3305
  (d) => {
3299
3306
  t.value = d;
3300
3307
  }
3301
- ), (d, u) => (f(), O(je, X(a, {
3308
+ ), (d, u) => (f(), O(je, X(s, {
3302
3309
  onClick: u[1] || (u[1] = (i) => n("click", i)),
3303
3310
  onEdit: u[2] || (u[2] = (i) => n("edit", i)),
3304
3311
  onClone: u[3] || (u[3] = (i) => n("clone", i))
3305
3312
  }), {
3306
3313
  icon: x((i) => [
3307
- B(d.$slots, "icon", ae(se(i)))
3314
+ B(d.$slots, "icon", se(ae(i)))
3308
3315
  ]),
3309
3316
  dialog: x((i) => [
3310
3317
  l("div", Xo, [
@@ -3317,8 +3324,8 @@ v + ' кВт·ч<br>выработка за день'`),
3317
3324
  }), {
3318
3325
  icon: x(() => [
3319
3326
  v(I, {
3320
- name: "chevron-right",
3321
- class: "size-8"
3327
+ name: "chevron-down",
3328
+ class: "size-8 -rotate-90"
3322
3329
  })
3323
3330
  ]),
3324
3331
  _: 1
@@ -3347,8 +3354,8 @@ v + ' кВт·ч<br>выработка за день'`),
3347
3354
  meta: {}
3348
3355
  },
3349
3356
  emits: ["edit", "close", "click", "clone", "open", "setState"],
3350
- setup(e, { emit: s }) {
3351
- const a = e, n = s, t = ({ value: d }) => n("setState", d), o = ({ opts: d, value: u }) => {
3357
+ setup(e, { emit: a }) {
3358
+ const s = e, n = a, t = ({ value: d }) => n("setState", d), o = ({ opts: d, value: u }) => {
3352
3359
  var i;
3353
3360
  return Array.isArray(d == null ? void 0 : d.items) && ((i = d == null ? void 0 : d.items.find((c) => c.value == u)) == null ? void 0 : i.name) || u;
3354
3361
  }, r = ({ name: d, value: u, opts: i = {} }) => {
@@ -3356,13 +3363,13 @@ v + ' кВт·ч<br>выработка за день'`),
3356
3363
  const { items: c = [], disabled: m } = i, p = ((b = c.find((h) => h.value == u)) == null ? void 0 : b.name) || u;
3357
3364
  return { label: d, modelValue: p, items: c, disabled: !!m };
3358
3365
  };
3359
- return (d, u) => (f(), O(je, X(a, {
3366
+ return (d, u) => (f(), O(je, X(s, {
3360
3367
  onClick: u[1] || (u[1] = (i) => n("click", i)),
3361
3368
  onEdit: u[2] || (u[2] = (i) => n("edit", i)),
3362
3369
  onClone: u[3] || (u[3] = (i) => n("clone", i))
3363
3370
  }), {
3364
3371
  icon: x((i) => [
3365
- B(d.$slots, "icon", ae(se(i)))
3372
+ B(d.$slots, "icon", se(ae(i)))
3366
3373
  ]),
3367
3374
  value: x((i) => [
3368
3375
  E(w(o(i)), 1)
@@ -3390,7 +3397,7 @@ v + ' кВт·ч<br>выработка за день'`),
3390
3397
  default: x(() => [
3391
3398
  v(I, {
3392
3399
  name: "list-check",
3393
- class: "size-6"
3400
+ class: "size-5"
3394
3401
  })
3395
3402
  ]),
3396
3403
  _: 1
@@ -3412,7 +3419,7 @@ v + ' кВт·ч<br>выработка за день'`),
3412
3419
  _: 3
3413
3420
  }, 16));
3414
3421
  }
3415
- }), Yo = { class: "glass-inset rounded-md p-1" }, Zo = { class: "flex gap-1" }, Qo = ["onClick"], ei = { class: "relative my-4" }, ti = { key: 0 }, ai = /* @__PURE__ */ L({
3422
+ }), Yo = { class: "glass-inset rounded-md p-1" }, Zo = { class: "flex gap-1" }, Qo = ["onClick"], ei = { class: "relative my-4" }, ti = { key: 0 }, si = /* @__PURE__ */ L({
3416
3423
  __name: "VTabs",
3417
3424
  props: {
3418
3425
  value: {},
@@ -3420,13 +3427,13 @@ v + ' кВт·ч<br>выработка за день'`),
3420
3427
  size: { default: "md" }
3421
3428
  },
3422
3429
  emits: ["click"],
3423
- setup(e, { expose: s, emit: a }) {
3424
- const n = a, t = F(e.value || 0), o = (d) => [
3430
+ setup(e, { expose: a, emit: s }) {
3431
+ const n = s, t = F(e.value || 0), o = (d) => [
3425
3432
  t.value === d ? "bg-cyan-main/10 text-cyan-main" : "text-gray-dark-25 hover:bg-white/5 dark:text-white/50 dark:hover:bg-white/5"
3426
3433
  ], r = (d) => {
3427
3434
  t.value = d, n("click", d);
3428
3435
  };
3429
- return s({
3436
+ return a({
3430
3437
  setActiveTab: r,
3431
3438
  activeTab: t
3432
3439
  }), (d, u) => (f(), g("div", null, [
@@ -3481,18 +3488,18 @@ v + ' кВт·ч<br>выработка за день'`),
3481
3488
  ])
3482
3489
  ]));
3483
3490
  }
3484
- }), si = ["checked", "disabled"], li = { class: "text-sm ms-2 peer-disabled:opacity-40" }, ni = /* @__PURE__ */ L({
3491
+ }), ai = ["checked", "disabled"], li = { class: "text-sm ms-2 peer-disabled:opacity-40" }, ni = /* @__PURE__ */ L({
3485
3492
  __name: "VCheckbox",
3486
3493
  props: {
3487
3494
  modelValue: { type: [Number, Boolean], default: !1 },
3488
3495
  disabled: { type: Boolean, default: !1 }
3489
3496
  },
3490
3497
  emits: ["update:modelValue", "click"],
3491
- setup(e, { emit: s }) {
3492
- const a = s, n = (o) => {
3498
+ setup(e, { emit: a }) {
3499
+ const s = a, n = (o) => {
3493
3500
  const r = o.target;
3494
- a("update:modelValue", r.checked);
3495
- }, t = (o) => a("click", o);
3501
+ s("update:modelValue", r.checked);
3502
+ }, t = (o) => s("click", o);
3496
3503
  return (o, r) => (f(), g("label", {
3497
3504
  class: M(["inline-flex items-center relative", { "cursor-pointer": !e.disabled }]),
3498
3505
  onClick: t
@@ -3503,7 +3510,7 @@ v + ' кВт·ч<br>выработка за день'`),
3503
3510
  disabled: e.disabled,
3504
3511
  class: "peer size-5 appearance-none rounded-md border border-gray-light-10/80 bg-transparent transition-all checked:border-blue-main disabled:opacity-40 not-disabled:cursor-pointer dark:border-white/15",
3505
3512
  onChange: n
3506
- }, null, 40, si),
3513
+ }, null, 40, ai),
3507
3514
  r[0] || (r[0] = l("button", { class: "pointer-events-none absolute left-2.5 top-1/2 -translate-x-1/2 -translate-y-1/2 text-blue-main opacity-0 peer-checked:opacity-100 peer-disabled:opacity-40 dark:text-white" }, [
3508
3515
  l("svg", {
3509
3516
  class: "h-3.5 w-3.5",
@@ -3539,11 +3546,11 @@ v + ' кВт·ч<br>выработка за день'`),
3539
3546
  type: {}
3540
3547
  },
3541
3548
  emits: ["update"],
3542
- setup(e, { emit: s }) {
3543
- const a = s, n = C(() => e.items.map((h, k) => ({ ...h, id: ++k }))), t = F({ name: "", value: "" }), o = C(() => e.items.length + 1), r = C(() => {
3549
+ setup(e, { emit: a }) {
3550
+ const s = a, n = C(() => e.items.map((h, k) => ({ ...h, id: ++k }))), t = F({ name: "", value: "" }), o = C(() => e.items.length + 1), r = C(() => {
3544
3551
  var h;
3545
3552
  return !((h = t.value) != null && h.id);
3546
- }), d = (h) => e.type === h, u = (h, k) => a("update", h, k), i = (h) => h.map(({ name: k, value: _ }) => ({ name: k, value: _ })), c = ({ id: h, name: k, value: _ }) => t.value = { id: h, name: k, value: _ }, m = () => {
3553
+ }), d = (h) => e.type === h, u = (h, k) => s("update", h, k), i = (h) => h.map(({ name: k, value: _ }) => ({ name: k, value: _ })), c = ({ id: h, name: k, value: _ }) => t.value = { id: h, name: k, value: _ }, m = () => {
3547
3554
  const h = o.value;
3548
3555
  t.value = { name: `New_${h}`, value: `${h}`, id: h }, u("items", i([...n.value, t.value]));
3549
3556
  }, p = (h) => {
@@ -3620,7 +3627,10 @@ v + ' кВт·ч<br>выработка за день'`),
3620
3627
  class: "cursor-pointer size-4",
3621
3628
  onClick: Q((N) => p(_), ["prevent", "stop"])
3622
3629
  }, [
3623
- v(I, { name: "close" })
3630
+ v(I, {
3631
+ name: "close",
3632
+ class: "size-5"
3633
+ })
3624
3634
  ], 8, fi)
3625
3635
  ])
3626
3636
  ]),
@@ -3632,7 +3642,10 @@ v + ' кВт·ч<br>выработка за день'`),
3632
3642
  onClick: m
3633
3643
  }, {
3634
3644
  default: x(() => [
3635
- v(I, { name: "add" })
3645
+ v(I, {
3646
+ name: "add",
3647
+ class: "size-5"
3648
+ })
3636
3649
  ]),
3637
3650
  _: 1
3638
3651
  })
@@ -3640,7 +3653,7 @@ v + ' кВт·ч<br>выработка за день'`),
3640
3653
  ])) : T("", !0)
3641
3654
  ]));
3642
3655
  }
3643
- }), vi = { class: "flex flex-col" }, pi = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, hi = { class: "flex-auto order-1" }, yi = { class: "flex-auto gap-x-2 order-1" }, bi = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, xi = { class: "flex gap-2 items-center" }, ki = { class: "flex flex-col gap-4" }, $i = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, wi = { class: "relative group" }, Ci = { class: "select-none" }, _i = ["onClick"], Si = { class: "flex justify-center order-0 md:order-1" }, Ti = { class: "size-32 shrink-0" }, Ai = { class: "flex gap-4 justify-end" }, zi = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" }, dd = /* @__PURE__ */ L({
3656
+ }), vi = { class: "flex flex-col" }, pi = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, hi = { class: "flex-auto order-1" }, yi = { class: "flex-auto gap-x-2 order-1" }, bi = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, xi = { class: "flex gap-2 items-center" }, ki = { class: "flex flex-col gap-4" }, $i = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, wi = { class: "relative group" }, Ci = { class: "select-none" }, _i = ["onClick"], Si = { class: "flex justify-center order-0 md:order-1" }, Ti = { class: "size-32 shrink-0" }, zi = { class: "flex gap-4 justify-end" }, Ai = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" }, dd = /* @__PURE__ */ L({
3644
3657
  __name: "ItemEdit",
3645
3658
  props: {
3646
3659
  items: {},
@@ -3650,8 +3663,8 @@ v + ' кВт·ч<br>выработка за день'`),
3650
3663
  listIcons: {}
3651
3664
  },
3652
3665
  emits: ["button"],
3653
- setup(e, { emit: s }) {
3654
- const a = s, n = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = F({
3666
+ setup(e, { emit: a }) {
3667
+ const s = a, n = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = F({
3655
3668
  id: "",
3656
3669
  name: "",
3657
3670
  type: "button",
@@ -3662,39 +3675,39 @@ v + ' кВт·ч<br>выработка за день'`),
3662
3675
  get: "",
3663
3676
  getTo: ""
3664
3677
  }), o = F(!1), r = C(() => {
3665
- var A;
3666
- return !((A = e.item) != null && A.id);
3667
- }), d = C(() => !!e.items.filter((A) => {
3678
+ var z;
3679
+ return !((z = e.item) != null && z.id);
3680
+ }), d = C(() => !!e.items.filter((z) => {
3668
3681
  var V;
3669
- return A.id !== ((V = e.item) == null ? void 0 : V.id);
3670
- }).find((A) => A.id === (t == null ? void 0 : t.value.id))), u = C(() => t.value.type === "info"), i = C(() => {
3671
- var A;
3672
- return (A = t.value.args) == null ? void 0 : A.length;
3682
+ return z.id !== ((V = e.item) == null ? void 0 : V.id);
3683
+ }).find((z) => z.id === (t == null ? void 0 : t.value.id))), u = C(() => t.value.type === "info"), i = C(() => {
3684
+ var z;
3685
+ return (z = t.value.args) == null ? void 0 : z.length;
3673
3686
  }), c = C(() => t.value.args.length > 3), m = C(() => {
3674
3687
  if (d.value) return !0;
3675
- const { id: A, args: V } = t.value;
3676
- return !A || !V.length;
3677
- }), p = ({ value: A }) => t.value.icon = A, b = ({ value: A }) => {
3678
- const V = A;
3679
- t.value.type = V, delete t.value.opts, ["button", "list", "dimmer"].includes(V) && (A === "button" && (t.value.opts = {}), A === "list" && (t.value.opts = { items: [] }), A === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
3680
- }, h = (A) => {
3681
- A === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), A === "get" && (t.value.get ? delete t.value.get : t.value.get = "a"), A === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
3682
- }, k = (A) => a("button", A, t.value), _ = (A) => t.value.args = t.value.args.filter((V) => V !== A), N = ({ path: A }) => {
3683
- !t.value.args.length && !t.value.id && (t.value.id = A), t.value.args.push(A), o.value = !1;
3684
- }, q = (A, V) => {
3685
- A === "set" && (t.value.set = V), A === "get" && (t.value.get = V), A === "getTo" && (t.value.getTo = V), V || delete t.value[A];
3688
+ const { id: z, args: V } = t.value;
3689
+ return !z || !V.length;
3690
+ }), p = ({ value: z }) => t.value.icon = z, b = ({ value: z }) => {
3691
+ const V = z;
3692
+ t.value.type = V, delete t.value.opts, ["button", "list", "dimmer"].includes(V) && (z === "button" && (t.value.opts = {}), z === "list" && (t.value.opts = { items: [] }), z === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
3693
+ }, h = (z) => {
3694
+ z === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), z === "get" && (t.value.get ? delete t.value.get : t.value.get = "a"), z === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
3695
+ }, k = (z) => s("button", z, t.value), _ = (z) => t.value.args = t.value.args.filter((V) => V !== z), N = ({ path: z }) => {
3696
+ !t.value.args.length && !t.value.id && (t.value.id = z), t.value.args.push(z), o.value = !1;
3697
+ }, q = (z, V) => {
3698
+ z === "set" && (t.value.set = V), z === "get" && (t.value.get = V), z === "getTo" && (t.value.getTo = V), V || delete t.value[z];
3686
3699
  }, xe = () => {
3687
3700
  o.value = !0;
3688
- }, Te = (A, V) => {
3689
- t.value.opts || (t.value.opts = {}), t.value.opts[A] = V, A === "disabled" && !V && delete t.value.opts[A];
3701
+ }, Te = (z, V) => {
3702
+ t.value.opts || (t.value.opts = {}), t.value.opts[z] = V, z === "disabled" && !V && delete t.value.opts[z];
3690
3703
  };
3691
3704
  return he(() => {
3692
- var A;
3693
- (A = e.item) != null && A.id && (t.value = Sa(e.item));
3694
- }), (A, V) => (f(), g("div", vi, [
3705
+ var z;
3706
+ (z = e.item) != null && z.id && (t.value = Ss(e.item));
3707
+ }), (z, V) => (f(), g("div", vi, [
3695
3708
  l("div", pi, [
3696
3709
  l("div", hi, [
3697
- v(ai, {
3710
+ v(si, {
3698
3711
  class: "flex-auto min-h-75",
3699
3712
  value: 0,
3700
3713
  items: n
@@ -3705,8 +3718,8 @@ v + ' кВт·ч<br>выработка за день'`),
3705
3718
  modelValue: t.value.id,
3706
3719
  "onUpdate:modelValue": V[0] || (V[0] = (W) => t.value.id = W),
3707
3720
  label: "ID",
3708
- message: d.value ? A.$t("used") : ""
3709
- }, ga({ _: 2 }, [
3721
+ message: d.value ? z.$t("used") : ""
3722
+ }, gs({ _: 2 }, [
3710
3723
  i.value ? void 0 : {
3711
3724
  name: "icon",
3712
3725
  fn: x(() => [
@@ -3715,7 +3728,10 @@ v + ' кВт·ч<br>выработка за день'`),
3715
3728
  onClick: xe
3716
3729
  }, {
3717
3730
  default: x(() => [
3718
- v(I, { name: "menu-search" })
3731
+ v(I, {
3732
+ name: "search",
3733
+ class: "size-5"
3734
+ })
3719
3735
  ]),
3720
3736
  _: 1
3721
3737
  })
@@ -3740,7 +3756,7 @@ v + ' кВт·ч<br>выработка за день'`),
3740
3756
  }, {
3741
3757
  item: x(({ item: W }) => [
3742
3758
  l("div", xi, [
3743
- B(A.$slots, "icon", {
3759
+ B(z.$slots, "icon", {
3744
3760
  icon: W.value
3745
3761
  }),
3746
3762
  l("div", null, w(W.name), 1)
@@ -3795,8 +3811,8 @@ v + ' кВт·ч<br>выработка за день'`),
3795
3811
  value: t.value.set,
3796
3812
  args: t.value.args,
3797
3813
  prefix: ["v"],
3798
- "prefix-titles": [A.$t("dashboard.newValue")],
3799
- "argument-title": A.$t("dashboard.argument"),
3814
+ "prefix-titles": [z.$t("dashboard.newValue")],
3815
+ "argument-title": z.$t("dashboard.argument"),
3800
3816
  disabled: !i.value || u.value,
3801
3817
  label: "Set",
3802
3818
  onOnIcon: V[3] || (V[3] = (W) => h("set")),
@@ -3805,7 +3821,7 @@ v + ' кВт·ч<br>выработка за день'`),
3805
3821
  v(He, {
3806
3822
  value: t.value.get,
3807
3823
  args: t.value.args,
3808
- "argument-title": A.$t("dashboard.argument"),
3824
+ "argument-title": z.$t("dashboard.argument"),
3809
3825
  disabled: !i.value,
3810
3826
  label: "Get",
3811
3827
  onOnIcon: V[5] || (V[5] = (W) => h("get")),
@@ -3815,8 +3831,8 @@ v + ' кВт·ч<br>выработка за день'`),
3815
3831
  value: t.value.getTo,
3816
3832
  args: t.value.args,
3817
3833
  prefix: ["v"],
3818
- "prefix-titles": [A.$t("dashboard.getResult")],
3819
- "argument-title": A.$t("dashboard.argument"),
3834
+ "prefix-titles": [z.$t("dashboard.getResult")],
3835
+ "argument-title": z.$t("dashboard.argument"),
3820
3836
  disabled: !i.value,
3821
3837
  label: "GetTo",
3822
3838
  onOnIcon: V[7] || (V[7] = (W) => h("getTo")),
@@ -3836,11 +3852,11 @@ v + ' кВт·ч<br>выработка за день'`),
3836
3852
  ]),
3837
3853
  l("div", Si, [
3838
3854
  l("div", Ti, [
3839
- B(A.$slots, "default", { item: t.value })
3855
+ B(z.$slots, "default", { item: t.value })
3840
3856
  ])
3841
3857
  ])
3842
3858
  ]),
3843
- l("div", Ai, [
3859
+ l("div", zi, [
3844
3860
  v(j, {
3845
3861
  class: "px-4",
3846
3862
  color: "blue",
@@ -3848,7 +3864,7 @@ v + ' кВт·ч<br>выработка за день'`),
3848
3864
  onClick: V[9] || (V[9] = (W) => k(r.value ? "add" : "save"))
3849
3865
  }, {
3850
3866
  default: x(() => [
3851
- E(w(r.value ? A.$t("add") : A.$t("save")), 1)
3867
+ E(w(r.value ? z.$t("add") : z.$t("save")), 1)
3852
3868
  ]),
3853
3869
  _: 1
3854
3870
  }, 8, ["disabled"]),
@@ -3859,7 +3875,7 @@ v + ' кВт·ч<br>выработка за день'`),
3859
3875
  onClick: V[10] || (V[10] = (W) => k("remove"))
3860
3876
  }, {
3861
3877
  default: x(() => [
3862
- E(w(A.$t("remove")), 1)
3878
+ E(w(z.$t("remove")), 1)
3863
3879
  ]),
3864
3880
  _: 1
3865
3881
  })
@@ -3867,11 +3883,11 @@ v + ' кВт·ч<br>выработка за день'`),
3867
3883
  o.value ? (f(), O(Se, {
3868
3884
  key: 0,
3869
3885
  size: "md",
3870
- title: A.$t("select"),
3886
+ title: z.$t("select"),
3871
3887
  onClose: V[11] || (V[11] = (W) => o.value = !1)
3872
3888
  }, {
3873
3889
  default: x(() => [
3874
- l("div", zi, [
3890
+ l("div", Ai, [
3875
3891
  v(wt, {
3876
3892
  items: e.object,
3877
3893
  onlyValue: !i.value,
@@ -3883,94 +3899,94 @@ v + ' кВт·ч<br>выработка за день'`),
3883
3899
  }, 8, ["title"])) : T("", !0)
3884
3900
  ]));
3885
3901
  }
3886
- }), Ft = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Ei = { lineHeight: "inherit", whiteSpace: "pre-wrap", wordBreak: "keep-all", overflowWrap: "break-word", background: "none", position: "absolute", width: "100%", height: "100%", zIndex: "1", resize: "none", caretColor: "currentColor", padding: "inherit", outline: "none", fontSize: "inherit", fontFamily: "inherit", letterSpacing: "inherit", boxSizing: "border-box", border: "none", top: "0px", left: "0px", color: "inherit", overflow: "hidden", "-webkit-font-smoothing": "antialiased", "-webkit-text-fill-color": "transparent" }, Vi = { lineHeight: "inherit", position: "relative", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "0", width: "100%", margin: "0", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Bi = { lineHeight: "inherit", position: "absolute", width: "100%", height: "100%", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "inherit", margin: "0", top: "0px", left: "0px", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, aa = (e) => sa(e);
3902
+ }), Ft = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Ei = { lineHeight: "inherit", whiteSpace: "pre-wrap", wordBreak: "keep-all", overflowWrap: "break-word", background: "none", position: "absolute", width: "100%", height: "100%", zIndex: "1", resize: "none", caretColor: "currentColor", padding: "inherit", outline: "none", fontSize: "inherit", fontFamily: "inherit", letterSpacing: "inherit", boxSizing: "border-box", border: "none", top: "0px", left: "0px", color: "inherit", overflow: "hidden", "-webkit-font-smoothing": "antialiased", "-webkit-text-fill-color": "transparent" }, Vi = { lineHeight: "inherit", position: "relative", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "0", width: "100%", margin: "0", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Bi = { lineHeight: "inherit", position: "absolute", width: "100%", height: "100%", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "inherit", margin: "0", top: "0px", left: "0px", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, ss = (e) => as(e);
3887
3903
  function Dt(e) {
3888
- const s = Array.isArray(e) ? e : [e];
3889
- return s.length === 0 ? aa : (a) => s.reduce((n, t, o) => t(n, { html: o > 0 }), a);
3904
+ const a = Array.isArray(e) ? e : [e];
3905
+ return a.length === 0 ? ss : (s) => a.reduce((n, t, o) => t(n, { html: o > 0 }), s);
3890
3906
  }
3891
3907
  class Ii {
3892
- constructor(s, a = {}) {
3893
- if (this.lines = null, !s) throw new Error("selector is not defined");
3894
- if (this.root = s instanceof Node ? s : document.querySelector(s), !this.root) throw new Error(`element with "${s}" selector is not exist`);
3895
- const n = { value: "", styles: {}, plugins: [], highlighter: aa }, { highlighters: t, ...o } = a;
3908
+ constructor(a, s = {}) {
3909
+ if (this.lines = null, !a) throw new Error("selector is not defined");
3910
+ if (this.root = a instanceof Node ? a : document.querySelector(a), !this.root) throw new Error(`element with "${a}" selector is not exist`);
3911
+ const n = { value: "", styles: {}, plugins: [], highlighter: ss }, { highlighters: t, ...o } = s;
3896
3912
  this.options = { ...n, ...o, highlighter: t ? Dt(t) : n.highlighter }, this.options.value = this.options.value == null ? "" : String(this.options.value), this.init();
3897
3913
  }
3898
3914
  init() {
3899
3915
  this.textarea = document.createElement("textarea"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocomplete", "off"), this.pre = document.createElement("pre");
3900
- const s = Object.keys(Ft).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
3916
+ const a = Object.keys(Ft).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
3901
3917
  this.initialRootStyles = {};
3902
- const a = this.root.style;
3903
- s.forEach((n) => {
3904
- this.initialRootStyles[n] = a[n] || "";
3918
+ const s = this.root.style;
3919
+ a.forEach((n) => {
3920
+ this.initialRootStyles[n] = s[n] || "";
3905
3921
  }), Object.assign(this.root.style, Ft, this.options.styles), Object.assign(this.textarea.style, Ei), Object.assign(this.pre.style, Vi), this.basePaddingLeft = this.root.style.paddingLeft || "", this.root.appendChild(this.textarea), this.root.appendChild(this.pre), this.addTextareaEvents(), this.update({ value: this.options.value }), this.updateLines();
3906
3922
  }
3907
3923
  addTextareaEvents() {
3908
- this.handleEvent = (s) => {
3909
- if (s.type === "keydown" && this.textarea.readOnly) return;
3910
- const a = s;
3911
- if (a.isComposing || a.keyCode === 229) return;
3924
+ this.handleEvent = (a) => {
3925
+ if (a.type === "keydown" && this.textarea.readOnly) return;
3926
+ const s = a;
3927
+ if (s.isComposing || s.keyCode === 229) return;
3912
3928
  const n = function(t, o) {
3913
3929
  const { value: r, selectionStart: d, selectionEnd: u } = o.target;
3914
3930
  return t.reduce((i, c) => ({ ...i, ...c(i, o) }), { value: r, selectionStart: d, selectionEnd: u });
3915
- }(this.options.plugins, s);
3931
+ }(this.options.plugins, a);
3916
3932
  this.update(n);
3917
3933
  }, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
3918
3934
  }
3919
- update(s) {
3935
+ update(a) {
3920
3936
  if (!this.textarea) return;
3921
- let { value: a, selectionStart: n, selectionEnd: t } = s;
3922
- a != null && (a = String(a), n == null && (n = this.textarea.selectionStart), t == null && (t = this.textarea.selectionEnd), this.textarea.value !== a && (this.textarea.value = a)), n != null && (this.textarea.selectionStart = n), t != null && (this.textarea.selectionEnd = t), a !== this.value && a != null && (this.value = a, this.render(), this.updateCallback && this.updateCallback(a));
3937
+ let { value: s, selectionStart: n, selectionEnd: t } = a;
3938
+ s != null && (s = String(s), n == null && (n = this.textarea.selectionStart), t == null && (t = this.textarea.selectionEnd), this.textarea.value !== s && (this.textarea.value = s)), n != null && (this.textarea.selectionStart = n), t != null && (this.textarea.selectionEnd = t), s !== this.value && s != null && (this.value = s, this.render(), this.updateCallback && this.updateCallback(s));
3923
3939
  }
3924
- updateOptions(s) {
3940
+ updateOptions(a) {
3925
3941
  if (!this.textarea) return;
3926
- const { highlighters: a, ...n } = s;
3927
- if (this.options = { ...this.options, ...n, highlighter: a ? Dt(a) : this.options.highlighter }, s.styles) {
3942
+ const { highlighters: s, ...n } = a;
3943
+ if (this.options = { ...this.options, ...n, highlighter: s ? Dt(s) : this.options.highlighter }, a.styles) {
3928
3944
  const t = this.root.style;
3929
- Object.keys(s.styles).forEach((o) => {
3945
+ Object.keys(a.styles).forEach((o) => {
3930
3946
  o in this.initialRootStyles || (this.initialRootStyles[o] = t[o] || "");
3931
- }), Object.assign(this.root.style, s.styles), ("paddingLeft" in s.styles || "padding" in s.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
3947
+ }), Object.assign(this.root.style, a.styles), ("paddingLeft" in a.styles || "padding" in a.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
3932
3948
  }
3933
- this.lines && !this.options.lineNumbers && (et(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), s.value != null && this.update({ value: s.value }), this.render();
3949
+ this.lines && !this.options.lineNumbers && (et(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), a.value != null && this.update({ value: a.value }), this.render();
3934
3950
  }
3935
3951
  render() {
3936
- const s = this.options.highlighter(this.value);
3937
- this.pre.innerHTML = s + "<br/>", this.updateLines();
3952
+ const a = this.options.highlighter(this.value);
3953
+ this.pre.innerHTML = a + "<br/>", this.updateLines();
3938
3954
  }
3939
3955
  updateLines() {
3940
3956
  if (!this.options.lineNumbers) return;
3941
3957
  this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style, Bi));
3942
- const s = this.value.split(`
3943
- `), a = s.length.toString().length;
3944
- this.root.style.paddingLeft = `${a + 1}ch`, this.lines.innerHTML = s.map((n, t) => `${`<span class="yace-line" style="position: absolute; opacity: .3; left: 0; width: ${a}ch; text-align: right">${1 + t}</span>`}${`<span style="color: transparent; pointer-events: none">${sa(n)}</span>`}`).join(`
3958
+ const a = this.value.split(`
3959
+ `), s = a.length.toString().length;
3960
+ this.root.style.paddingLeft = `${s + 1}ch`, this.lines.innerHTML = a.map((n, t) => `${`<span class="yace-line" style="position: absolute; opacity: .3; left: 0; width: ${s}ch; text-align: right">${1 + t}</span>`}${`<span style="color: transparent; pointer-events: none">${as(n)}</span>`}`).join(`
3945
3961
  `);
3946
3962
  }
3947
3963
  destroy() {
3948
3964
  this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent), et(this.textarea), et(this.pre), et(this.lines), Object.assign(this.root.style, this.initialRootStyles), Object.assign(this, { textarea: null, pre: null, lines: null, updateCallback: null, handleEvent: null, initialRootStyles: null, options: null, root: null }));
3949
3965
  }
3950
- onUpdate(s) {
3951
- this.updateCallback = s;
3966
+ onUpdate(a) {
3967
+ this.updateCallback = a;
3952
3968
  }
3953
3969
  }
3954
3970
  function et(e) {
3955
3971
  e && e.parentNode && e.parentNode.removeChild(e);
3956
3972
  }
3957
- function sa(e) {
3973
+ function as(e) {
3958
3974
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
3959
3975
  }
3960
3976
  const jt = { 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" }, Li = { add: "=" }, Mi = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
3961
- function Ge(e, s) {
3962
- const a = e.split("+").reduce((u, i) => jt[i] ? (u.modifiers[jt[i]] = !0, u) : { ...u, key: Li[i] || i.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), n = Object.keys(a.modifiers).every((u) => a.modifiers[u] ? s[u] : !s[u]);
3963
- if (!a.key) return n;
3964
- const t = s.key != null && s.key.toLowerCase() === a.key, o = (r = a.key, /^[a-z]$/.test(r) ? `key${r}` : /^[0-9]$/.test(r) ? `digit${r}` : Mi[r] || null);
3977
+ function Ge(e, a) {
3978
+ const s = e.split("+").reduce((u, i) => jt[i] ? (u.modifiers[jt[i]] = !0, u) : { ...u, key: Li[i] || i.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), n = Object.keys(s.modifiers).every((u) => s.modifiers[u] ? a[u] : !a[u]);
3979
+ if (!s.key) return n;
3980
+ const t = a.key != null && a.key.toLowerCase() === s.key, o = (r = s.key, /^[a-z]$/.test(r) ? `key${r}` : /^[0-9]$/.test(r) ? `digit${r}` : Mi[r] || null);
3965
3981
  var r;
3966
- const d = !s.isComposing && o != null && s.code != null && s.code.toLowerCase() === o;
3982
+ const d = !a.isComposing && o != null && a.code != null && a.code.toLowerCase() === o;
3967
3983
  return n && (t || d);
3968
3984
  }
3969
3985
  function Oi(e = {}) {
3970
- const s = Math.max(1, e.limit == null ? 300 : e.limit), a = e.coalesceMs == null ? 300 : e.coalesceMs;
3986
+ const a = Math.max(1, e.limit == null ? 300 : e.limit), s = e.coalesceMs == null ? 300 : e.coalesceMs;
3971
3987
  let n = [], t = null, o = null;
3972
3988
  const r = (d) => {
3973
- n = n.slice(0, t + 1), n.push(d), n.length > s && (n = n.slice(n.length - s)), t = n.length - 1;
3989
+ n = n.slice(0, t + 1), n.push(d), n.length > a && (n = n.slice(n.length - a)), t = n.length - 1;
3974
3990
  };
3975
3991
  return (d, u) => {
3976
3992
  const i = u.type === "keydown" && Ge("ctrl/cmd+z", u), c = u.type === "keydown" && (Ge("ctrl/cmd+shift+z", u) || Ge("ctrl+y", u));
@@ -3979,49 +3995,49 @@ function Oi(e = {}) {
3979
3995
  if (c) return o = null, n[t].value !== d.value ? void r(d) : (t = Math.min(n.length - 1, t + 1), n[t]);
3980
3996
  if (u.type === "keydown") return n[t].value !== d.value ? (o = null, void r(d)) : void (n[t] = d);
3981
3997
  if (u.type === "input") {
3982
- const m = u.timeStamp, p = m != null && o != null && m - o <= a;
3998
+ const m = u.timeStamp, p = m != null && o != null && m - o <= s;
3983
3999
  if (o = m ?? null, p) return void (n[t] = d);
3984
4000
  r(d);
3985
4001
  }
3986
4002
  };
3987
4003
  }
3988
- const Fi = () => (e, s) => {
3989
- const { value: a, selectionStart: n, selectionEnd: t } = e;
3990
- if (!Ge("enter", s) || s.type !== "keydown") return;
3991
- const o = a.substring(0, n).split(`
4004
+ const Fi = () => (e, a) => {
4005
+ const { value: s, selectionStart: n, selectionEnd: t } = e;
4006
+ if (!Ge("enter", a) || a.type !== "keydown") return;
4007
+ const o = s.substring(0, n).split(`
3992
4008
  `).pop(), r = /^\s+/.exec(o);
3993
4009
  if (!r) return;
3994
- s.preventDefault();
4010
+ a.preventDefault();
3995
4011
  const d = `
3996
4012
  ` + r[0];
3997
- return { value: a.substring(0, n) + d + a.substring(t), selectionStart: n + d.length, selectionEnd: n + d.length };
3998
- }, Di = () => (e, s) => {
3999
- if (typeof KeyboardEvent > "u" || !(s instanceof KeyboardEvent) || s.key !== "Enter")
4013
+ return { value: s.substring(0, n) + d + s.substring(t), selectionStart: n + d.length, selectionEnd: n + d.length };
4014
+ }, Di = () => (e, a) => {
4015
+ if (typeof KeyboardEvent > "u" || !(a instanceof KeyboardEvent) || a.key !== "Enter")
4000
4016
  return;
4001
- const { value: a, selectionStart: n, selectionEnd: t } = e;
4017
+ const { value: s, selectionStart: n, selectionEnd: t } = e;
4002
4018
  if (n !== t)
4003
4019
  return;
4004
- const o = a.lastIndexOf(`
4005
- `, n - 1) + 1, r = a.indexOf(`
4006
- `, n), d = r === -1 ? a.length : r;
4007
- if (a.slice(n, d).trim().length > 0)
4020
+ const o = s.lastIndexOf(`
4021
+ `, n - 1) + 1, r = s.indexOf(`
4022
+ `, n), d = r === -1 ? s.length : r;
4023
+ if (s.slice(n, d).trim().length > 0)
4008
4024
  return;
4009
- const c = a.substring(o, d).trimEnd();
4025
+ const c = s.substring(o, d).trimEnd();
4010
4026
  if (c.endsWith(";") || c.length === 0)
4011
4027
  return;
4012
- const m = a.slice(0, d) + ";" + a.slice(d), p = n + 1;
4028
+ const m = s.slice(0, d) + ";" + s.slice(d), p = n + 1;
4013
4029
  return {
4014
4030
  value: m,
4015
4031
  selectionStart: p,
4016
4032
  selectionEnd: p
4017
4033
  };
4018
4034
  };
4019
- let At = [], re = null, te = 0, ve = [], ze = null, Oe = null, zt, la, fe = null, De = null;
4035
+ let zt = [], re = null, te = 0, ve = [], Ae = null, Oe = null, At, ls, fe = null, De = null;
4020
4036
  const ji = (e) => {
4021
- const { customSuggestions: s = [], minPrefixLength: a = 1, maxSuggestions: n = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: r, renderMenu: d, renderTooltip: u } = e;
4037
+ const { customSuggestions: a = [], minPrefixLength: s = 1, maxSuggestions: n = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: r, renderMenu: d, renderTooltip: u } = e;
4022
4038
  if (!d || !u)
4023
4039
  throw new Error("renderMenu and renderTooltip are required");
4024
- return At = [...s].map((i) => r(i)), zt = d, la = u, (i, c) => {
4040
+ return zt = [...a].map((i) => r(i)), At = d, ls = u, (i, c) => {
4025
4041
  if (typeof KeyboardEvent > "u" || !(c instanceof KeyboardEvent))
4026
4042
  return;
4027
4043
  const { value: m, selectionStart: p } = i, b = c.target;
@@ -4053,7 +4069,7 @@ const ji = (e) => {
4053
4069
  setTimeout(() => {
4054
4070
  if (Oe) {
4055
4071
  const h = Oe.value, k = Oe.selectionStart, _ = lt(h, k), N = h.slice(_, k);
4056
- if (N.length < a)
4072
+ if (N.length < s)
4057
4073
  be();
4058
4074
  else {
4059
4075
  const q = mt(N).slice(0, n);
@@ -4082,10 +4098,10 @@ const ji = (e) => {
4082
4098
  };
4083
4099
  }
4084
4100
  if (!(c.key.length !== 1 || c.ctrlKey || c.metaKey || c.altKey))
4085
- return ze && clearTimeout(ze), ze = setTimeout(() => {
4086
- ze = null;
4101
+ return Ae && clearTimeout(Ae), Ae = setTimeout(() => {
4102
+ Ae = null;
4087
4103
  const h = b.value, k = b.selectionStart, _ = lt(h, k), N = h.slice(_, k);
4088
- if (N.length < a) {
4104
+ if (N.length < s) {
4089
4105
  be();
4090
4106
  return;
4091
4107
  }
@@ -4099,50 +4115,50 @@ const ji = (e) => {
4099
4115
  };
4100
4116
  };
4101
4117
  function mt(e) {
4102
- const s = e.toLowerCase();
4103
- return At.filter((a) => {
4104
- const n = a.label.toLowerCase();
4105
- return n.startsWith(s) || n.includes(s) || n.split("_").map((t) => t[0]).join("").startsWith(s);
4106
- }).sort((a, n) => {
4107
- const t = a.label.toLowerCase(), o = n.label.toLowerCase(), r = t.startsWith(s), d = o.startsWith(s);
4118
+ const a = e.toLowerCase();
4119
+ return zt.filter((s) => {
4120
+ const n = s.label.toLowerCase();
4121
+ return n.startsWith(a) || n.includes(a) || n.split("_").map((t) => t[0]).join("").startsWith(a);
4122
+ }).sort((s, n) => {
4123
+ const t = s.label.toLowerCase(), o = n.label.toLowerCase(), r = t.startsWith(a), d = o.startsWith(a);
4108
4124
  if (r && !d) return -1;
4109
4125
  if (!r && d) return 1;
4110
- const u = t.indexOf(s), i = o.indexOf(s);
4126
+ const u = t.indexOf(a), i = o.indexOf(a);
4111
4127
  return u !== i ? u - i : t.length !== o.length ? t.length - o.length : t.localeCompare(o);
4112
4128
  });
4113
4129
  }
4114
- function lt(e, s) {
4115
- let a = s;
4116
- for (; a > 0 && /[a-zA-Z0-9_$]/.test(e[a - 1]); )
4117
- a--;
4118
- return a;
4130
+ function lt(e, a) {
4131
+ let s = a;
4132
+ for (; s > 0 && /[a-zA-Z0-9_$]/.test(e[s - 1]); )
4133
+ s--;
4134
+ return s;
4119
4135
  }
4120
- function Ni(e, s) {
4121
- be(), ve = s, te = 0;
4122
- const a = na(e);
4123
- re = zt(s, te, (n) => {
4136
+ function Ni(e, a) {
4137
+ be(), ve = a, te = 0;
4138
+ const s = ns(e);
4139
+ re = At(a, te, (n) => {
4124
4140
  te = n, Fe();
4125
4141
  }), Object.assign(re.style, {
4126
4142
  position: "fixed",
4127
- left: `${a.left}px`,
4128
- top: `${a.top + 24}px`,
4143
+ left: `${s.left}px`,
4144
+ top: `${s.top + 24}px`,
4129
4145
  zIndex: "10000"
4130
4146
  }), document.body.appendChild(re);
4131
4147
  }
4132
4148
  function Fe() {
4133
4149
  if (!re || !Oe) return;
4134
- const e = zt(ve, te, (a) => {
4135
- te = a, Fe();
4136
- }), s = re.getBoundingClientRect();
4150
+ const e = At(ve, te, (s) => {
4151
+ te = s, Fe();
4152
+ }), a = re.getBoundingClientRect();
4137
4153
  re.replaceWith(e), re = e, Object.assign(re.style, {
4138
4154
  position: "fixed",
4139
- left: `${s.left}px`,
4140
- top: `${s.top}px`,
4155
+ left: `${a.left}px`,
4156
+ top: `${a.top}px`,
4141
4157
  zIndex: "10000"
4142
4158
  });
4143
4159
  }
4144
- function ft(e, s) {
4145
- const { value: a, selectionStart: n } = e, t = lt(a, n), o = s.insert || s.label, r = /\$\{([^}]*)\}/g;
4160
+ function ft(e, a) {
4161
+ const { value: s, selectionStart: n } = e, t = lt(s, n), o = a.insert || a.label, r = /\$\{([^}]*)\}/g;
4146
4162
  let d = o;
4147
4163
  const u = [];
4148
4164
  let i;
@@ -4161,40 +4177,40 @@ function ft(e, s) {
4161
4177
  }
4162
4178
  }
4163
4179
  return {
4164
- value: a.slice(0, t) + d + a.slice(n),
4180
+ value: s.slice(0, t) + d + s.slice(n),
4165
4181
  selectionStart: m,
4166
4182
  selectionEnd: p
4167
4183
  };
4168
4184
  }
4169
4185
  function be() {
4170
- ze && (clearTimeout(ze), ze = null), re && (re.remove(), re = null, ve = [], te = 0, Oe = null);
4186
+ Ae && (clearTimeout(Ae), Ae = null), re && (re.remove(), re = null, ve = [], te = 0, Oe = null);
4171
4187
  }
4172
- function na(e) {
4173
- const s = e.getBoundingClientRect(), { value: a, selectionStart: n } = e, o = a.substring(0, n).split(`
4188
+ function ns(e) {
4189
+ const a = e.getBoundingClientRect(), { value: s, selectionStart: n } = e, o = s.substring(0, n).split(`
4174
4190
  `), r = o.length, d = o[o.length - 1] || "", u = parseInt(getComputedStyle(e).lineHeight) || 20;
4175
4191
  return {
4176
- left: s.left + 10 + d.length * 8,
4177
- top: s.top + (r - 1) * u
4192
+ left: a.left + 10 + d.length * 8,
4193
+ top: a.top + (r - 1) * u
4178
4194
  };
4179
4195
  }
4180
4196
  function Nt(e) {
4181
4197
  De && clearTimeout(De), De = setTimeout(() => {
4182
- const s = e.selectionStart, a = e.selectionEnd;
4183
- if (s === a) {
4198
+ const a = e.selectionStart, s = e.selectionEnd;
4199
+ if (a === s) {
4184
4200
  Ke();
4185
4201
  return;
4186
4202
  }
4187
- const n = e.value.substring(s, a).trim();
4203
+ const n = e.value.substring(a, s).trim();
4188
4204
  if (!n) {
4189
4205
  Ke();
4190
4206
  return;
4191
4207
  }
4192
- const t = At.find((d) => d.label === n);
4208
+ const t = zt.find((d) => d.label === n);
4193
4209
  if (!t) {
4194
4210
  Ke();
4195
4211
  return;
4196
4212
  }
4197
- const o = na(e), r = la(t, o);
4213
+ const o = ns(e), r = ls(t, o);
4198
4214
  r.style.opacity = "0", fe && fe.remove(), fe = r, document.body.appendChild(fe), requestAnimationFrame(() => {
4199
4215
  fe && (fe.style.opacity = "1");
4200
4216
  }), setTimeout(() => Ke(), 3e3);
@@ -4206,27 +4222,27 @@ function Ke() {
4206
4222
  }, 150));
4207
4223
  }
4208
4224
  typeof document < "u" && document.addEventListener("mousedown", (e) => {
4209
- const s = e.target;
4210
- re && !re.contains(s) && be(), fe && !fe.contains(s) && Ke();
4225
+ const a = e.target;
4226
+ re && !re.contains(a) && be(), fe && !fe.contains(a) && Ke();
4211
4227
  });
4212
4228
  const gt = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Ri = ["else", "end", "call", "fade"], Pi = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ui = (e) => {
4213
- const s = e.filter((d) => d.type !== "var").map((d) => d.label), r = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Ri, ...s])).map(Pi).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
4229
+ const a = e.filter((d) => d.type !== "var").map((d) => d.label), r = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Ri, ...a])).map(Pi).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
4214
4230
  return new RegExp(r, "g");
4215
- }, Ki = (e) => (s) => {
4216
- const a = Ui(e);
4231
+ }, Ki = (e) => (a) => {
4232
+ const s = Ui(e);
4217
4233
  let n = "", t = 0;
4218
- for (const o of s.matchAll(a)) {
4234
+ for (const o of a.matchAll(s)) {
4219
4235
  const [r, d, u, i, c, m, p, b] = o;
4220
4236
  let h = "";
4221
- d ? h = "comment" : u ? h = "str" : i ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), n += gt(s.slice(t, o.index)), n += `<span class="tok--${h}">${gt(r)}</span>`, t = o.index + r.length;
4237
+ d ? h = "comment" : u ? h = "str" : i ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), n += gt(a.slice(t, o.index)), n += `<span class="tok--${h}">${gt(r)}</span>`, t = o.index + r.length;
4222
4238
  }
4223
- return n += gt(s.slice(t)), n;
4224
- }, oa = {
4239
+ return n += gt(a.slice(t)), n;
4240
+ }, os = {
4225
4241
  word: "text-blue-600 dark:text-blue-400",
4226
4242
  func: "text-yellow-600 dark:text-yellow-400",
4227
4243
  var: "text-cyan-600 dark:text-cyan-400",
4228
4244
  event: "text-purple-600 dark:text-purple-400"
4229
- }, Hi = (e, s, a) => {
4245
+ }, Hi = (e, a, s) => {
4230
4246
  const n = document.createElement("div");
4231
4247
  return n.className = `
4232
4248
  fixed z-[10000] min-w-64 max-w-100 max-h-64
@@ -4234,40 +4250,40 @@ const gt = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "
4234
4250
  border-gray-light-10 dark:border-gray-dark-30 bg-white dark:bg-gray-dark-30
4235
4251
  text-sm font-mono scrollbar pointer-events-none
4236
4252
  `, e.forEach((t, o) => {
4237
- const r = o === s, d = document.createElement("div");
4253
+ const r = o === a, d = document.createElement("div");
4238
4254
  d.className = `
4239
4255
  flex items-center justify-between gap-2 px-3 py-1.5 cursor-pointer
4240
4256
  rounded transition-colors duration-100 border-l-2
4241
4257
  ${r ? "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"}
4242
4258
  `;
4243
- const u = oa[t.type] || "text-gray-dark-30 dark:text-gray-light-10";
4259
+ const u = os[t.type] || "text-gray-dark-30 dark:text-gray-light-10";
4244
4260
  d.innerHTML = `
4245
4261
  <div class="flex items-center gap-2 flex-1">
4246
4262
  <span class="${u} font-medium">${t.label}</span>
4247
4263
  ${t.detail ? `<span class="text-xs text-gray-dark-25 dark:text-gray-main ml-2">${t.detail}</span>` : ""}
4248
4264
  </div>
4249
4265
  ${t.description ? `<span class="text-xs text-gray-main dark:text-gray-dark-25">${t.description}</span>` : ""}
4250
- `, d.addEventListener("click", () => a(o)), n.appendChild(d);
4266
+ `, d.addEventListener("click", () => s(o)), n.appendChild(d);
4251
4267
  }), n;
4252
- }, Wi = (e, s) => {
4253
- const a = document.createElement("div");
4254
- a.className = `
4268
+ }, Wi = (e, a) => {
4269
+ const s = document.createElement("div");
4270
+ s.className = `
4255
4271
  fixed z-[10001] px-3 py-2 font-mono text-sm max-w-75
4256
4272
  min-w-12 min-h-5 rounded-lg shadow-lg border
4257
4273
  pointer-events-none transition-opacity duration-150
4258
4274
  bg-white dark:bg-gray-dark-30 border-gray-light-10 dark:border-gray-dark-30
4259
4275
  text-gray-dark-30 dark:text-gray-light-10 pointer-events-none
4260
- `, a.style.cssText = `
4261
- left: ${s.left + 40}px; top: ${s.top - 10}px;
4276
+ `, s.style.cssText = `
4277
+ left: ${a.left + 40}px; top: ${a.top - 10}px;
4262
4278
  transform: translateX(-50%) translateY(-100%); opacity: 0;
4263
4279
  `;
4264
- let t = `<div class="font-medium ${oa[e.type] || "text-gray-dark-30 dark:text-gray-light-10"}">${e.label}</div>`;
4265
- e.detail && (t += `<div class="text-gray-dark-25 dark:text-gray-main mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-main dark:text-gray-dark-25 text-xs mt-1 pt-1 border-t border-gray-light-10 dark:border-gray-dark-30">${e.description}</div>`), a.innerHTML = t;
4280
+ let t = `<div class="font-medium ${os[e.type] || "text-gray-dark-30 dark:text-gray-light-10"}">${e.label}</div>`;
4281
+ e.detail && (t += `<div class="text-gray-dark-25 dark:text-gray-main mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-main dark:text-gray-dark-25 text-xs mt-1 pt-1 border-t border-gray-light-10 dark:border-gray-dark-30">${e.description}</div>`), s.innerHTML = t;
4266
4282
  const o = document.createElement("div");
4267
4283
  return o.className = `
4268
4284
  absolute -bottom-1 left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
4269
4285
  bg-white dark:bg-gray-dark-30 border-r border-b border-gray-light-10 dark:border-gray-dark-30
4270
- `, a.appendChild(o), a;
4286
+ `, s.appendChild(o), s;
4271
4287
  }, Gi = [
4272
4288
  { label: "if", type: "word", insert: `if:\${$v0<10};
4273
4289
 
@@ -4310,8 +4326,8 @@ end;`, detail: "event(name: string)" },
4310
4326
  suggestions: { default: () => [] }
4311
4327
  },
4312
4328
  emits: ["update:modelValue", "update"],
4313
- setup(e, { emit: s }) {
4314
- const a = s;
4329
+ setup(e, { emit: a }) {
4330
+ const s = a;
4315
4331
  let n;
4316
4332
  const t = [...Gi, ...e.suggestions];
4317
4333
  return _e(
@@ -4342,7 +4358,7 @@ end;`, detail: "event(name: string)" },
4342
4358
  ],
4343
4359
  styles: { fontSize: "14px" }
4344
4360
  }), n.onUpdate((o) => {
4345
- a("update:modelValue", o);
4361
+ s("update:modelValue", o);
4346
4362
  });
4347
4363
  }), Je(() => {
4348
4364
  n.destroy();
@@ -4365,7 +4381,7 @@ end;`, detail: "event(name: string)" },
4365
4381
  lang: { default: "en" }
4366
4382
  },
4367
4383
  setup(e) {
4368
- const s = F(""), a = F(""), n = F(null), t = F(!1), o = F(null);
4384
+ const a = F(""), s = F(""), n = F(null), t = F(!1), o = F(null);
4369
4385
  let r = null;
4370
4386
  const d = () => new Promise((c, m) => {
4371
4387
  if (typeof window > "u" || typeof document > "u") {
@@ -4410,13 +4426,13 @@ end;`, detail: "event(name: string)" },
4410
4426
  o.value = "error";
4411
4427
  return;
4412
4428
  }
4413
- t.value = !0, o.value = null, a.value = "";
4429
+ t.value = !0, o.value = null, s.value = "";
4414
4430
  try {
4415
4431
  const m = `${Qi}${c}.md`, p = await fetch(m);
4416
4432
  if (!p.ok)
4417
4433
  throw new Error(`HTTP ${p.status}: ${p.statusText}`);
4418
4434
  const b = await p.text();
4419
- s.value = b, n.value = u(b), a.value = r.parse(b);
4435
+ a.value = b, n.value = u(b), s.value = r.parse(b);
4420
4436
  } catch (m) {
4421
4437
  const p = m instanceof Error ? m.message : "";
4422
4438
  o.value = p, console.error("Error loading docs:", m);
@@ -4440,7 +4456,7 @@ end;`, detail: "event(name: string)" },
4440
4456
  ])) : T("", !0),
4441
4457
  l("div", {
4442
4458
  class: "docs-content",
4443
- innerHTML: a.value
4459
+ innerHTML: s.value
4444
4460
  }, null, 8, Zi)
4445
4461
  ]));
4446
4462
  }
@@ -4450,15 +4466,15 @@ end;`, detail: "event(name: string)" },
4450
4466
  idScript: {}
4451
4467
  },
4452
4468
  emits: ["add", "close"],
4453
- setup(e, { emit: s }) {
4454
- const a = s, { defineField: n, handleSubmit: t, isValid: o } = Ba({
4469
+ setup(e, { emit: a }) {
4470
+ const s = a, { defineField: n, handleSubmit: t, isValid: o } = Bs({
4455
4471
  validationSchema: () => ({
4456
- name: [Ia, La(8)]
4472
+ name: [Is, Ls(8)]
4457
4473
  })
4458
4474
  }), [r, d] = n("name"), u = () => {
4459
- a("add", r.value);
4475
+ s("add", r.value);
4460
4476
  }, i = t(() => {
4461
- u(), r.value = "", a("close", new Event("close"));
4477
+ u(), r.value = "", s("close", new Event("close"));
4462
4478
  });
4463
4479
  return he(() => {
4464
4480
  e.idScript || (r.value = "boot");
@@ -4467,7 +4483,7 @@ end;`, detail: "event(name: string)" },
4467
4483
  return f(), g("div", tr, [
4468
4484
  v(p, X({
4469
4485
  modelValue: H(r),
4470
- "onUpdate:modelValue": m[0] || (m[0] = (h) => va(r) ? r.value = h : null)
4486
+ "onUpdate:modelValue": m[0] || (m[0] = (h) => vs(r) ? r.value = h : null)
4471
4487
  }, H(d), {
4472
4488
  disabled: !e.idScript,
4473
4489
  label: c.$t("name")
@@ -4486,7 +4502,7 @@ end;`, detail: "event(name: string)" },
4486
4502
  ]);
4487
4503
  };
4488
4504
  }
4489
- }), ar = ["aria-label"], sr = { class: "hidden lg:inline" }, lr = ["aria-label"], nr = { class: "flex items-center gap-3 border-b border-gray-light-10/70 px-4 dark:border-white/10" }, or = ["placeholder"], ir = { class: "max-h-[55vh] overflow-y-auto p-2" }, rr = ["href"], dr = { class: "min-w-0" }, cr = { class: "flex flex-wrap items-baseline gap-2" }, ur = { class: "text-sm font-medium text-gray-dark-40 dark:text-white" }, mr = {
4505
+ }), sr = ["aria-label"], ar = { class: "hidden lg:inline" }, lr = ["aria-label"], nr = { class: "flex items-center gap-3 border-b border-gray-light-10/70 px-4 dark:border-white/10" }, or = ["placeholder"], ir = { class: "max-h-[55vh] overflow-y-auto p-2" }, rr = ["href"], dr = { class: "min-w-0" }, cr = { class: "flex flex-wrap items-baseline gap-2" }, ur = { class: "text-sm font-medium text-gray-dark-40 dark:text-white" }, mr = {
4490
4506
  key: 0,
4491
4507
  class: "text-xs uppercase tracking-wider text-gray-main"
4492
4508
  }, fr = {
@@ -4505,22 +4521,22 @@ end;`, detail: "event(name: string)" },
4505
4521
  emptyText: { default: "Ничего не найдено. Попробуйте другой запрос." }
4506
4522
  },
4507
4523
  setup(e) {
4508
- const s = e, a = F(!1), n = F(""), t = F(null), o = C(() => {
4524
+ const a = e, s = F(!1), n = F(""), t = F(null), o = C(() => {
4509
4525
  const i = n.value.trim().toLowerCase();
4510
- return (i ? s.items.filter((m) => `${m.title} ${m.description ?? ""} ${m.group ?? ""}`.toLowerCase().includes(i)) : s.items).slice(0, 14);
4526
+ return (i ? a.items.filter((m) => `${m.title} ${m.description ?? ""} ${m.group ?? ""}`.toLowerCase().includes(i)) : a.items).slice(0, 14);
4511
4527
  }), r = async () => {
4512
4528
  var i;
4513
- a.value = !0, n.value = "", await xt(), (i = t.value) == null || i.focus();
4529
+ s.value = !0, n.value = "", await xt(), (i = t.value) == null || i.focus();
4514
4530
  }, d = () => {
4515
- a.value = !1, n.value = "";
4531
+ s.value = !1, n.value = "";
4516
4532
  }, u = (i) => {
4517
4533
  if ((i.metaKey || i.ctrlKey) && i.key.toLowerCase() === "k") {
4518
- i.preventDefault(), a.value ? d() : r();
4534
+ i.preventDefault(), s.value ? d() : r();
4519
4535
  return;
4520
4536
  }
4521
- i.key === "Escape" && a.value && d();
4537
+ i.key === "Escape" && s.value && d();
4522
4538
  };
4523
- return _e(a, (i) => {
4539
+ return _e(s, (i) => {
4524
4540
  typeof document < "u" && (document.body.style.overflow = i ? "hidden" : "");
4525
4541
  }), he(() => window.addEventListener("keydown", u)), Je(() => {
4526
4542
  window.removeEventListener("keydown", u), typeof document < "u" && (document.body.style.overflow = "");
@@ -4535,11 +4551,11 @@ end;`, detail: "event(name: string)" },
4535
4551
  name: "search",
4536
4552
  size: 17
4537
4553
  }),
4538
- l("span", sr, w(e.label), 1),
4554
+ l("span", ar, w(e.label), 1),
4539
4555
  c[1] || (c[1] = l("kbd", { class: "hidden rounded border border-gray-light-10/60 px-1.5 py-0.5 font-mono text-xs text-gray-main dark:border-white/10 dark:text-gray-dark-25 lg:inline" }, "⌘K", -1))
4540
- ], 8, ar),
4541
- (f(), O(pa, { to: "body" }, [
4542
- a.value ? (f(), g("div", {
4556
+ ], 8, sr),
4557
+ (f(), O(ps, { to: "body" }, [
4558
+ s.value ? (f(), g("div", {
4543
4559
  key: 0,
4544
4560
  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",
4545
4561
  onClick: Q(d, ["self"])
@@ -4604,20 +4620,20 @@ end;`, detail: "event(name: string)" },
4604
4620
  titleDark: { default: "Тёмная тема" }
4605
4621
  },
4606
4622
  setup(e) {
4607
- const s = F(Ta("theme") === "light" ? "light" : "dark"), a = (n) => {
4608
- s.value = n, Aa(n);
4623
+ const a = F(Ts("theme") === "light" ? "light" : "dark"), s = (n) => {
4624
+ a.value = n, zs(n);
4609
4625
  };
4610
4626
  return he(async () => {
4611
- await xt(), setTimeout(() => a(s.value), 0);
4627
+ await xt(), setTimeout(() => s(a.value), 0);
4612
4628
  }), (n, t) => (f(), g("button", {
4613
4629
  type: "button",
4614
4630
  class: "grid size-9 place-items-center rounded-md text-gray-dark-25 transition-colors hover:bg-white/50 hover:text-violet-main dark:text-gray-light-10 dark:hover:bg-white/5 dark:hover:text-white",
4615
- "aria-label": s.value === "dark" ? e.labelLight : e.labelDark,
4616
- title: s.value === "dark" ? e.titleLight : e.titleDark,
4617
- onClick: t[0] || (t[0] = (o) => a(s.value === "dark" ? "light" : "dark"))
4631
+ "aria-label": a.value === "dark" ? e.labelLight : e.labelDark,
4632
+ title: a.value === "dark" ? e.titleLight : e.titleDark,
4633
+ onClick: t[0] || (t[0] = (o) => s(a.value === "dark" ? "light" : "dark"))
4618
4634
  }, [
4619
4635
  v(I, {
4620
- name: s.value === "dark" ? "sun" : "moon",
4636
+ name: a.value === "dark" ? "sun" : "moon",
4621
4637
  size: 18
4622
4638
  }, null, 8, ["name"])
4623
4639
  ], 8, vr));
@@ -4632,9 +4648,9 @@ end;`, detail: "event(name: string)" },
4632
4648
  items: {}
4633
4649
  },
4634
4650
  emits: ["update:modelValue", "select"],
4635
- setup(e, { emit: s }) {
4636
- const a = s, n = (o) => a("update:modelValue", o), t = (o, r) => {
4637
- o.click(new Event("click")), a("select", r);
4651
+ setup(e, { emit: a }) {
4652
+ const s = a, n = (o) => s("update:modelValue", o), t = (o, r) => {
4653
+ o.click(new Event("click")), s("select", r);
4638
4654
  };
4639
4655
  return (o, r) => (f(), O(Wt, X(o.$attrs, {
4640
4656
  top: "50px",
@@ -4674,18 +4690,18 @@ end;`, detail: "event(name: string)" },
4674
4690
  value: { type: Boolean, default: !1 }
4675
4691
  },
4676
4692
  setup(e) {
4677
- const s = F(null), a = F(e.value), n = () => {
4678
- if (!s.value) return;
4679
- const o = s.value.querySelector(".v-expansion__content");
4680
- o && (o.style.maxHeight = a.value ? `${o.scrollHeight}px` : "0");
4693
+ const a = F(null), s = F(e.value), n = () => {
4694
+ if (!a.value) return;
4695
+ const o = a.value.querySelector(".v-expansion__content");
4696
+ o && (o.style.maxHeight = s.value ? `${o.scrollHeight}px` : "0");
4681
4697
  }, t = () => {
4682
- a.value = !a.value, n();
4698
+ s.value = !s.value, n();
4683
4699
  };
4684
4700
  return he(() => {
4685
4701
  n();
4686
4702
  }), (o, r) => (f(), g("div", {
4687
4703
  ref_key: "root",
4688
- ref: s,
4704
+ ref: a,
4689
4705
  class: "glass-inset mb-2 overflow-hidden rounded-md"
4690
4706
  }, [
4691
4707
  l("div", {
@@ -4694,11 +4710,11 @@ end;`, detail: "event(name: string)" },
4694
4710
  }, [
4695
4711
  l("h4", null, w(e.label), 1),
4696
4712
  l("div", {
4697
- class: M(["transition text-gray-main", { "rotate-x-180": a.value }])
4713
+ class: M(["transition text-gray-main", { "rotate-x-180": s.value }])
4698
4714
  }, [
4699
4715
  v(I, {
4700
4716
  name: "chevron-down",
4701
- class: "size-6"
4717
+ class: "size-5"
4702
4718
  })
4703
4719
  ], 2)
4704
4720
  ]),
@@ -4719,8 +4735,8 @@ end;`, detail: "event(name: string)" },
4719
4735
  itemKey: { default: "id" }
4720
4736
  },
4721
4737
  emits: ["update:items", "order-change"],
4722
- setup(e, { emit: s }) {
4723
- const a = s, n = F(null), t = F(0), o = F(-1), r = ({ id: m }) => ({
4738
+ setup(e, { emit: a }) {
4739
+ const s = a, n = F(null), t = F(0), o = F(-1), r = ({ id: m }) => ({
4724
4740
  "opacity-30 scale-105 z-10": n.value === m,
4725
4741
  "transition-transform duration-200": n.value !== m
4726
4742
  }), d = (m, p, b) => {
@@ -4734,7 +4750,7 @@ end;`, detail: "event(name: string)" },
4734
4750
  const p = e.items.findIndex((h) => h[e.itemKey] === n.value), b = o.value;
4735
4751
  if (p !== b && b !== -1) {
4736
4752
  const h = [...e.items], [k] = h.splice(p, 1);
4737
- h.splice(b, 0, k), a("update:items", h), a("order-change", { fromIndex: p, toIndex: b, movedItem: k, newOrder: h });
4753
+ h.splice(b, 0, k), s("update:items", h), s("order-change", { fromIndex: p, toIndex: b, movedItem: k, newOrder: h });
4738
4754
  }
4739
4755
  }
4740
4756
  o.value = -1;
@@ -4777,7 +4793,7 @@ end;`, detail: "event(name: string)" },
4777
4793
  })
4778
4794
  ], 32));
4779
4795
  }
4780
- }), xr = { class: "glass-inset overflow-x-auto rounded-md" }, kr = { class: "min-w-full" }, $r = { class: "border-y border-gray-light-10/70 py-3 dark:border-white/10" }, wr = { class: "bg-gray-light-30/70 dark:bg-white/[0.04]" }, Cr = { class: "flex items-center" }, _r = { class: "divide-y divide-gray-light-30 dark:divide-white/5" }, Sr = ["onClick"], Tr = { class: "flex items-center text-gray-dark-30 dark:text-white/70" }, Ar = { key: 1 }, zr = {
4796
+ }), xr = { class: "glass-inset overflow-x-auto rounded-md" }, kr = { class: "min-w-full" }, $r = { class: "border-y border-gray-light-10/70 py-3 dark:border-white/10" }, wr = { class: "bg-gray-light-30/70 dark:bg-white/[0.04]" }, Cr = { class: "flex items-center" }, _r = { class: "divide-y divide-gray-light-30 dark:divide-white/5" }, Sr = ["onClick"], Tr = { class: "flex items-center text-gray-dark-30 dark:text-white/70" }, zr = { key: 1 }, Ar = {
4781
4797
  class: "py-3 whitespace-nowrap",
4782
4798
  colspan: "9"
4783
4799
  }, Er = { class: "flex items-center justify-center px-2 text-sm text-gray-dark-25 dark:text-white/50" }, yd = /* @__PURE__ */ L({
@@ -4787,8 +4803,8 @@ end;`, detail: "event(name: string)" },
4787
4803
  items: { default: () => [] }
4788
4804
  },
4789
4805
  emits: ["click"],
4790
- setup(e, { emit: s }) {
4791
- const a = s, n = (r, d) => a("click", r, d), t = (r) => (r == null ? void 0 : r.className) || "", o = (r, { key: d }) => r == null ? void 0 : r[d];
4806
+ setup(e, { emit: a }) {
4807
+ const s = a, n = (r, d) => s("click", r, d), t = (r) => (r == null ? void 0 : r.className) || "", o = (r, { key: d }) => r == null ? void 0 : r[d];
4792
4808
  return (r, d) => (f(), g("div", xr, [
4793
4809
  l("table", kr, [
4794
4810
  l("thead", $r, [
@@ -4825,8 +4841,8 @@ end;`, detail: "event(name: string)" },
4825
4841
  ])
4826
4842
  ])
4827
4843
  ]))), 128))
4828
- ], 8, Sr))), 128)) : (f(), g("tr", Ar, [
4829
- l("td", zr, [
4844
+ ], 8, Sr))), 128)) : (f(), g("tr", zr, [
4845
+ l("td", Ar, [
4830
4846
  l("div", Er, [
4831
4847
  B(r.$slots, "empty", {}, () => [
4832
4848
  d[0] || (d[0] = E("The list is empty", -1))
@@ -4845,20 +4861,20 @@ end;`, detail: "event(name: string)" },
4845
4861
  disabled: { type: Boolean }
4846
4862
  },
4847
4863
  setup(e) {
4848
- const s = F(!1), a = () => {
4849
- e.disabled || (s.value = !0);
4864
+ const a = F(!1), s = () => {
4865
+ e.disabled || (a.value = !0);
4850
4866
  }, n = () => {
4851
- s.value = !1;
4867
+ a.value = !1;
4852
4868
  }, t = Kt("tooltip");
4853
- return Va(t, () => n()), (o, r) => (f(), g("div", {
4869
+ return Vs(t, () => n()), (o, r) => (f(), g("div", {
4854
4870
  ref: "tooltip",
4855
4871
  class: "relative v-tooltip",
4856
- onMouseenter: a,
4872
+ onMouseenter: s,
4857
4873
  onMouseleave: n
4858
4874
  }, [
4859
4875
  l("button", {
4860
4876
  type: "button",
4861
- onClick: a
4877
+ onClick: s
4862
4878
  }, [
4863
4879
  B(o.$slots, "activator")
4864
4880
  ]),
@@ -4871,7 +4887,7 @@ end;`, detail: "event(name: string)" },
4871
4887
  "leave-to-class": "transform opacity-0 -translate-y-2"
4872
4888
  }, {
4873
4889
  default: x(() => [
4874
- B(o.$slots, "default", { show: s.value })
4890
+ B(o.$slots, "default", { show: a.value })
4875
4891
  ]),
4876
4892
  _: 3
4877
4893
  })
@@ -4898,13 +4914,13 @@ export {
4898
4914
  Jr as BlockUpdate,
4899
4915
  Zr as BlockView,
4900
4916
  je as CardBase,
4901
- sd as CardButton,
4917
+ ad as CardButton,
4902
4918
  ld as CardDate,
4903
4919
  nd as CardDimmer,
4904
4920
  od as CardInfo,
4905
4921
  id as CardInput,
4906
4922
  rd as CardList,
4907
- Ga as CardNotification,
4923
+ Gs as CardNotification,
4908
4924
  _t as DEFAULT_METRIC_STYLE,
4909
4925
  Gi as DEFAULT_SUGGESTIONS,
4910
4926
  ed as EnergyFlowBlock,
@@ -4918,28 +4934,28 @@ export {
4918
4934
  ud as ScriptViewDocs,
4919
4935
  vd as VAutocomplete,
4920
4936
  j as VButton,
4921
- zn as VCard,
4937
+ An as VCard,
4922
4938
  ni as VCheckbox,
4923
4939
  Se as VDialog,
4924
4940
  hd as VDragDrop,
4925
4941
  Wt as VDropdown,
4926
4942
  pd as VExpansion,
4927
- Qs as VFile,
4943
+ Qa as VFile,
4928
4944
  He as VFunc,
4929
4945
  I as VIcon,
4930
4946
  Ht as VIconLogo,
4931
- ha as VIconLogoMini,
4947
+ hs as VIconLogoMini,
4932
4948
  kt as VList,
4933
4949
  wt as VListObject,
4934
- xa as VLoader,
4950
+ xs as VLoader,
4935
4951
  Cd as VPopup,
4936
4952
  ge as VSelect,
4937
4953
  yd as VTable,
4938
- ai as VTabs,
4954
+ si as VTabs,
4939
4955
  le as VTextField,
4940
4956
  Ct as VTextWrapper,
4941
4957
  bd as VTooltip,
4942
- ba as VWifiIcon,
4958
+ bs as VWifiIcon,
4943
4959
  fd as VisionSearch,
4944
4960
  gd as VisionThemeToggle,
4945
4961
  ro as createBlockContext,
@@ -4954,5 +4970,5 @@ export {
4954
4970
  Vl as resolveBlockMetrics,
4955
4971
  El as resolveMetric,
4956
4972
  qr as resolveMetricArgValues,
4957
- ad as useBlock
4973
+ sd as useBlock
4958
4974
  };