@vasakgroup/vue-libvasak 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,31 @@
1
- import { ref as w, onMounted as W, onUnmounted as Oe, watch as K, defineComponent as z, toRef as se, computed as x, createElementBlock as i, unref as P, openBlock as l, normalizeStyle as ee, createCommentVNode as g, createElementVNode as C, createVNode as F, toDisplayString as I, normalizeClass as p, renderSlot as A, createBlock as q, onBeforeUnmount as G, Fragment as U, renderList as Y, withCtx as R, mergeModels as je, useAttrs as Ve, useId as Pe, useModel as Fe, withDirectives as me, mergeProps as J, isRef as Ne, vModelSelect as Re, inject as be, getCurrentInstance as ve, provide as ae, createTextVNode as qe, toHandlers as pe, createSlots as He, withModifiers as T, withKeys as V, Teleport as ge, Transition as ye, nextTick as ne, vShow as Ue, cloneVNode as We, h as Ke, Comment as Ge, Text as Xe } from "vue";
2
- import { listen as Ye } from "@tauri-apps/api/event";
3
- import { getSymbolSource as Je, getIconSource as Qe } from "@vasakgroup/plugin-vicons";
4
- import { getCurrentWindow as Ze } from "@tauri-apps/api/window";
5
- function _e(e, n) {
6
- const t = w("");
1
+ import { ref as $, onMounted as Q, onUnmounted as Ve, watch as X, defineComponent as E, toRef as me, computed as x, createElementBlock as i, unref as V, openBlock as l, normalizeStyle as se, createCommentVNode as g, createElementVNode as C, createVNode as j, toDisplayString as S, normalizeClass as p, renderSlot as B, createBlock as G, onBeforeUnmount as J, Fragment as Y, renderList as ae, withCtx as U, mergeModels as je, useAttrs as Pe, useId as Ne, useModel as Fe, withDirectives as ye, mergeProps as ne, isRef as Re, vModelSelect as He, inject as xe, getCurrentInstance as ke, provide as ue, createTextVNode as We, toHandlers as we, createSlots as qe, withModifiers as A, withKeys as O, Teleport as $e, Transition as Ce, nextTick as ce, vShow as Ue, cloneVNode as Ke, h as Ge, Comment as Ye, Text as Qe } from "vue";
2
+ import { listen as Xe } from "@tauri-apps/api/event";
3
+ import { getSymbolSource as Je, getIconSource as Ze } from "@vasakgroup/plugin-vicons";
4
+ import { getCurrentWindow as _e } from "@tauri-apps/api/window";
5
+ function et(e, n) {
6
+ const t = $("");
7
7
  let a = null, o = !1, s = 0;
8
- async function u() {
9
- const r = ++s, c = e.value;
10
- if (!c) {
8
+ async function c() {
9
+ const u = ++s, d = e.value;
10
+ if (!d) {
11
11
  t.value = "";
12
12
  return;
13
13
  }
14
- const b = n.value === "symbol" ? await Je(c) : await Qe(c);
15
- r === s && (t.value = b);
14
+ const v = n.value === "symbol" ? await Je(d) : await Ze(d);
15
+ u === s && (t.value = v);
16
16
  }
17
- return W(async () => {
18
- const r = await Ye("vicons:theme-changed", u);
17
+ return Q(async () => {
18
+ const u = await Xe("vicons:theme-changed", c);
19
19
  if (o) {
20
- r();
20
+ u();
21
21
  return;
22
22
  }
23
- a = r, await u();
24
- }), Oe(() => {
23
+ a = u, await c();
24
+ }), Ve(() => {
25
25
  o = !0, a?.();
26
- }), K(e, u), t;
26
+ }), X(e, c), t;
27
27
  }
28
- const et = ["src", "alt"], N = /* @__PURE__ */ z({
28
+ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
29
29
  __name: "ThemeIcon",
30
30
  props: {
31
31
  name: {},
@@ -34,23 +34,23 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
34
34
  alt: { default: "" }
35
35
  },
36
36
  setup(e) {
37
- const n = e, t = _e(se(n, "name"), se(n, "type")), a = x(() => `${n.size}px`);
38
- return (o, s) => P(t) ? (l(), i("img", {
37
+ const n = e, t = et(me(n, "name"), me(n, "type")), a = x(() => `${n.size}px`);
38
+ return (o, s) => V(t) ? (l(), i("img", {
39
39
  key: 0,
40
- src: P(t),
40
+ src: V(t),
41
41
  alt: e.alt,
42
- style: ee({ width: a.value, height: a.value }),
42
+ style: se({ width: a.value, height: a.value }),
43
43
  class: "shrink-0 object-contain"
44
- }, null, 12, et)) : (l(), i("span", {
44
+ }, null, 12, tt)) : (l(), i("span", {
45
45
  key: 1,
46
- style: ee({ width: a.value, height: a.value }),
46
+ style: se({ width: a.value, height: a.value }),
47
47
  class: "shrink-0"
48
48
  }, null, 4));
49
49
  }
50
- }), tt = { class: "flex flex-col gap-2" }, at = ["aria-expanded"], nt = {
50
+ }), at = { class: "flex flex-col gap-2" }, nt = ["aria-expanded"], lt = {
51
51
  key: 1,
52
52
  class: "flex flex-col gap-1"
53
- }, he = /* @__PURE__ */ z({
53
+ }, ze = /* @__PURE__ */ E({
54
54
  __name: "SideGroup",
55
55
  props: {
56
56
  title: {},
@@ -58,13 +58,13 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
58
58
  defaultOpen: { type: Boolean, default: !0 }
59
59
  },
60
60
  setup(e) {
61
- const n = e, t = w(n.defaultOpen);
62
- return K(
61
+ const n = e, t = $(n.defaultOpen);
62
+ return X(
63
63
  () => n.collapsed,
64
64
  (a) => {
65
65
  a && (t.value = !0);
66
66
  }
67
- ), (a, o) => (l(), i("section", tt, [
67
+ ), (a, o) => (l(), i("section", at, [
68
68
  e.collapsed ? g("", !0) : (l(), i("button", {
69
69
  key: 0,
70
70
  type: "button",
@@ -72,26 +72,26 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
72
72
  "aria-expanded": t.value,
73
73
  onClick: o[0] || (o[0] = (s) => t.value = !t.value)
74
74
  }, [
75
- C("span", null, I(e.title), 1),
76
- F(N, {
75
+ C("span", null, S(e.title), 1),
76
+ j(N, {
77
77
  name: "pan-down-symbolic",
78
78
  type: "symbol",
79
79
  size: 12,
80
80
  class: p(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
81
81
  }, null, 8, ["class"])
82
- ], 8, at)),
83
- t.value || e.collapsed ? (l(), i("div", nt, [
84
- A(a.$slots, "default")
82
+ ], 8, nt)),
83
+ t.value || e.collapsed ? (l(), i("div", lt, [
84
+ B(a.$slots, "default")
85
85
  ])) : g("", !0)
86
86
  ]));
87
87
  }
88
- }), lt = ["title", "aria-label", "disabled", "aria-current"], ot = { key: 1 }, it = {
88
+ }), ot = ["title", "aria-label", "disabled", "aria-current"], it = { key: 1 }, st = {
89
89
  key: 0,
90
90
  class: "min-w-0 flex-1 truncate font-medium"
91
- }, st = {
91
+ }, rt = {
92
92
  key: 1,
93
93
  class: "rounded-corner bg-ui-surface px-2 py-0.5 font-semibold text-tx-muted text-xs"
94
- }, xe = /* @__PURE__ */ z({
94
+ }, Le = /* @__PURE__ */ E({
95
95
  __name: "SideButton",
96
96
  props: {
97
97
  label: {},
@@ -120,32 +120,32 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
120
120
  class: p(["flex h-8 w-8 shrink-0 items-center justify-center rounded-corner font-semibold text-xs uppercase tracking-wide", e.active ? "border-secondary bg-primary/20" : ""]),
121
121
  "aria-hidden": "true"
122
122
  }, [
123
- e.icon ? (l(), q(N, {
123
+ e.icon ? (l(), G(N, {
124
124
  key: 0,
125
125
  name: e.icon,
126
126
  size: 20
127
- }, null, 8, ["name"])) : (l(), i("span", ot, I(e.label.charAt(0).toUpperCase()), 1))
127
+ }, null, 8, ["name"])) : (l(), i("span", it, S(e.label.charAt(0).toUpperCase()), 1))
128
128
  ], 2),
129
- e.collapsed ? g("", !0) : (l(), i("span", it, I(e.label), 1)),
130
- !e.collapsed && e.badge !== "" ? (l(), i("span", st, I(e.badge), 1)) : g("", !0)
131
- ], 10, lt));
129
+ e.collapsed ? g("", !0) : (l(), i("span", st, S(e.label), 1)),
130
+ !e.collapsed && e.badge !== "" ? (l(), i("span", rt, S(e.badge), 1)) : g("", !0)
131
+ ], 10, ot));
132
132
  }
133
- }), rt = {
133
+ }), ut = {
134
134
  key: 0,
135
135
  class: "flex flex-col gap-2 border-ui-border border-b p-2"
136
- }, ut = { class: "flex items-center gap-2" }, ct = ["aria-label", "aria-expanded"], dt = {
136
+ }, ct = { class: "flex items-center gap-2" }, dt = ["aria-label", "aria-expanded"], ft = {
137
137
  key: 0,
138
138
  class: "min-w-0 flex-1"
139
- }, ft = {
139
+ }, mt = {
140
140
  key: 0,
141
141
  class: "truncate font-semibold text-sm"
142
- }, mt = {
142
+ }, bt = {
143
143
  key: 1,
144
144
  class: "truncate text-tx-muted text-xs"
145
- }, bt = { key: 0 }, vt = {
145
+ }, vt = { key: 0 }, pt = {
146
146
  key: 1,
147
147
  class: "flex border-ui-border border-b p-2"
148
- }, pt = ["aria-label", "aria-expanded"], gt = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, re = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", ue = 767, yt = /* @__PURE__ */ z({
148
+ }, gt = ["aria-label", "aria-expanded"], ht = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, be = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", ve = 767, yt = /* @__PURE__ */ E({
149
149
  __name: "SideBar",
150
150
  props: {
151
151
  title: { default: "" },
@@ -158,97 +158,97 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
158
158
  },
159
159
  emits: ["update:modelValue", "update:collapsed", "change"],
160
160
  setup(e, { expose: n, emit: t }) {
161
- const a = e, o = t, s = w(a.collapsed ?? !1), u = w(!1);
162
- let r = null, c = null;
163
- const b = x(() => u.value || s.value), $ = x(() => !!(a.title || a.subtitle));
161
+ const a = e, o = t, s = $(a.collapsed ?? !1), c = $(!1);
162
+ let u = null, d = null;
163
+ const v = x(() => c.value || s.value), w = x(() => !!(a.title || a.subtitle));
164
164
  x(() => a.categories.length > 0);
165
- function M() {
165
+ function I() {
166
166
  return document.documentElement?.clientWidth || window.innerWidth;
167
167
  }
168
- function L() {
169
- u.value = M() <= ue;
168
+ function z() {
169
+ c.value = I() <= ve;
170
170
  }
171
- function E() {
171
+ function L() {
172
172
  s.value = !s.value, o("update:collapsed", s.value);
173
173
  }
174
- function y(h) {
175
- o("update:modelValue", h), o("change", h);
174
+ function h(k) {
175
+ o("update:modelValue", k), o("change", k);
176
176
  }
177
- return K(
177
+ return X(
178
178
  () => a.collapsed,
179
- (h) => {
180
- h !== void 0 && (s.value = h);
179
+ (k) => {
180
+ k !== void 0 && (s.value = k);
181
181
  }
182
- ), W(() => {
183
- r = window.matchMedia(`(max-width: ${ue}px)`), L(), r.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (c = new ResizeObserver(L), c.observe(document.documentElement));
184
- }), G(() => {
185
- r?.removeEventListener("change", L), window.removeEventListener("resize", L), c?.disconnect(), c = null;
186
- }), n({ collapsed: b }), (h, m) => (l(), i("aside", {
187
- class: p(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", b.value ? "md:w-[84px]" : "md:w-72"]])
182
+ ), Q(() => {
183
+ u = window.matchMedia(`(max-width: ${ve}px)`), z(), u.addEventListener("change", z), window.addEventListener("resize", z), typeof ResizeObserver < "u" && document.documentElement && (d = new ResizeObserver(z), d.observe(document.documentElement));
184
+ }), J(() => {
185
+ u?.removeEventListener("change", z), window.removeEventListener("resize", z), d?.disconnect(), d = null;
186
+ }), n({ collapsed: v }), (k, P) => (l(), i("aside", {
187
+ class: p(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", v.value ? "md:w-[84px]" : "md:w-72"]])
188
188
  }, [
189
- $.value || h.$slots.header ? (l(), i("header", rt, [
190
- C("div", ut, [
189
+ w.value || k.$slots.header ? (l(), i("header", ut, [
190
+ C("div", ct, [
191
191
  C("button", {
192
192
  type: "button",
193
- class: p(re),
194
- "aria-label": b.value ? e.expandLabel : e.collapseLabel,
195
- "aria-expanded": !b.value,
196
- onClick: E
193
+ class: p(be),
194
+ "aria-label": v.value ? e.expandLabel : e.collapseLabel,
195
+ "aria-expanded": !v.value,
196
+ onClick: L
197
197
  }, [
198
- F(N, {
199
- name: b.value ? "pan-end-symbolic" : "pan-start-symbolic",
198
+ j(N, {
199
+ name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
200
200
  type: "symbol",
201
201
  size: 16
202
202
  }, null, 8, ["name"])
203
- ], 8, ct),
204
- $.value && !b.value ? (l(), i("div", dt, [
205
- e.title ? (l(), i("p", ft, I(e.title), 1)) : g("", !0),
206
- e.subtitle ? (l(), i("p", mt, I(e.subtitle), 1)) : g("", !0)
203
+ ], 8, dt),
204
+ w.value && !v.value ? (l(), i("div", ft, [
205
+ e.title ? (l(), i("p", mt, S(e.title), 1)) : g("", !0),
206
+ e.subtitle ? (l(), i("p", bt, S(e.subtitle), 1)) : g("", !0)
207
207
  ])) : g("", !0)
208
208
  ]),
209
- h.$slots.header && !b.value ? (l(), i("div", bt, [
210
- A(h.$slots, "header", { collapsed: b.value })
209
+ k.$slots.header && !v.value ? (l(), i("div", vt, [
210
+ B(k.$slots, "header", { collapsed: v.value })
211
211
  ])) : g("", !0)
212
- ])) : (l(), i("div", vt, [
212
+ ])) : (l(), i("div", pt, [
213
213
  C("button", {
214
214
  type: "button",
215
- class: p(re),
216
- "aria-label": b.value ? e.expandLabel : e.collapseLabel,
217
- "aria-expanded": !b.value,
218
- onClick: E
215
+ class: p(be),
216
+ "aria-label": v.value ? e.expandLabel : e.collapseLabel,
217
+ "aria-expanded": !v.value,
218
+ onClick: L
219
219
  }, [
220
- F(N, {
221
- name: b.value ? "pan-end-symbolic" : "pan-start-symbolic",
220
+ j(N, {
221
+ name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
222
222
  type: "symbol",
223
223
  size: 16
224
224
  }, null, 8, ["name"])
225
- ], 8, pt)
225
+ ], 8, gt)
226
226
  ])),
227
- C("div", gt, [
228
- (l(!0), i(U, null, Y(e.categories, (k) => (l(), q(he, {
229
- key: k.id,
230
- title: k.title,
231
- collapsed: b.value
227
+ C("div", ht, [
228
+ (l(!0), i(Y, null, ae(e.categories, (F) => (l(), G(ze, {
229
+ key: F.id,
230
+ title: F.title,
231
+ collapsed: v.value
232
232
  }, {
233
- default: R(() => [
234
- (l(!0), i(U, null, Y(k.items, (d) => (l(), q(xe, {
235
- key: d.id,
236
- label: d.label,
237
- icon: d.icon,
238
- badge: d.badge,
239
- disabled: d.disabled,
240
- collapsed: b.value,
241
- active: e.modelValue === d.id,
242
- onClick: (v) => y(d.id)
233
+ default: U(() => [
234
+ (l(!0), i(Y, null, ae(F.items, (y) => (l(), G(Le, {
235
+ key: y.id,
236
+ label: y.label,
237
+ icon: y.icon,
238
+ badge: y.badge,
239
+ disabled: y.disabled,
240
+ collapsed: v.value,
241
+ active: e.modelValue === y.id,
242
+ onClick: (r) => h(y.id)
243
243
  }, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
244
244
  ]),
245
245
  _: 2
246
246
  }, 1032, ["title", "collapsed"]))), 128)),
247
- A(h.$slots, "default", { collapsed: b.value })
247
+ B(k.$slots, "default", { collapsed: v.value })
248
248
  ])
249
249
  ], 2));
250
250
  }
251
- }), ht = { class: "flex min-w-0 flex-col gap-1" }, xt = ["for"], kt = { class: "relative flex min-w-0 items-center" }, wt = ["id"], $t = /* @__PURE__ */ z({
251
+ }), xt = { class: "flex min-w-0 flex-col gap-1" }, kt = ["for"], wt = { class: "relative flex min-w-0 items-center" }, $t = ["id"], Ct = /* @__PURE__ */ E({
252
252
  inheritAttrs: !1,
253
253
  __name: "SelectField",
254
254
  props: /* @__PURE__ */ je({
@@ -261,28 +261,28 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
261
261
  }),
262
262
  emits: ["update:modelValue"],
263
263
  setup(e) {
264
- const n = e, t = Ve(), a = Pe(), o = x(() => t.id ?? a), [s, u] = Fe(e, "modelValue", {
265
- set(r) {
266
- return u.number ? Number(r) : r;
264
+ const n = e, t = Pe(), a = Ne(), o = x(() => t.id ?? a), [s, c] = Fe(e, "modelValue", {
265
+ set(u) {
266
+ return c.number ? Number(u) : u;
267
267
  }
268
268
  });
269
- return (r, c) => (l(), i("div", ht, [
269
+ return (u, d) => (l(), i("div", xt, [
270
270
  n.label ? (l(), i("label", {
271
271
  key: 0,
272
272
  for: o.value,
273
273
  class: "text-tx-muted text-xs"
274
- }, I(n.label), 9, xt)) : g("", !0),
275
- C("div", kt, [
276
- me(C("select", J({
274
+ }, S(n.label), 9, kt)) : g("", !0),
275
+ C("div", wt, [
276
+ ye(C("select", ne({
277
277
  id: o.value,
278
- "onUpdate:modelValue": c[0] || (c[0] = (b) => Ne(s) ? s.value = b : null),
278
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => Re(s) ? s.value = v : null),
279
279
  class: "min-w-0 flex-1 appearance-none truncate rounded-corner border border-ui-border bg-ui-surface/60 py-1.5 pr-8 pl-2 text-sm text-tx-main"
280
- }, P(t)), [
281
- A(r.$slots, "default")
282
- ], 16, wt), [
283
- [Re, P(s)]
280
+ }, V(t)), [
281
+ B(u.$slots, "default")
282
+ ], 16, $t), [
283
+ [He, V(s)]
284
284
  ]),
285
- F(N, {
285
+ j(N, {
286
286
  name: "pan-down-symbolic",
287
287
  type: "symbol",
288
288
  size: 14,
@@ -291,112 +291,112 @@ const et = ["src", "alt"], N = /* @__PURE__ */ z({
291
291
  ])
292
292
  ]));
293
293
  }
294
- }), le = /* @__PURE__ */ Symbol("barra de vasak");
295
- function te(e) {
294
+ }), de = /* @__PURE__ */ Symbol("barra de vasak");
295
+ function re(e) {
296
296
  return e === "left" || e === "right" ? "vertical" : "horizontal";
297
297
  }
298
- const Ct = ["top", "bottom", "left", "right"];
299
- function zt(e) {
300
- return typeof e == "string" && Ct.includes(e);
298
+ const zt = ["top", "bottom", "left", "right"];
299
+ function Lt(e) {
300
+ return typeof e == "string" && zt.includes(e);
301
301
  }
302
- function X() {
303
- const e = be(le, null);
302
+ function Z() {
303
+ const e = xe(de, null);
304
304
  if (e) return e;
305
- const n = w("top");
305
+ const n = $("top");
306
306
  return {
307
307
  posicion: n,
308
- orientacion: x(() => te(n.value)),
309
- vertical: x(() => te(n.value) === "vertical")
308
+ orientacion: x(() => re(n.value)),
309
+ vertical: x(() => re(n.value) === "vertical")
310
310
  };
311
311
  }
312
- const oe = ["minimize", "maximize", "close"], Lt = "window", Et = "barPosition";
313
- function Dt(e) {
314
- const t = e?.[Lt]?.[Et];
315
- return zt(t) ? t : null;
312
+ const fe = ["minimize", "maximize", "close"], Et = "window", Dt = "barPosition";
313
+ function Bt(e) {
314
+ const t = e?.[Et]?.[Dt];
315
+ return Lt(t) ? t : null;
316
316
  }
317
- function Bt(e = "top") {
318
- const n = w(e);
317
+ function Mt(e = "top") {
318
+ const n = $(e);
319
319
  let t = null, a = !1;
320
320
  async function o() {
321
321
  try {
322
- const { readConfig: s } = await import("@vasakgroup/plugin-config-manager"), u = await s();
323
- n.value = Dt(u) ?? e;
322
+ const { readConfig: s } = await import("@vasakgroup/plugin-config-manager"), c = await s();
323
+ n.value = Bt(c) ?? e;
324
324
  } catch {
325
325
  }
326
326
  }
327
- return W(async () => {
327
+ return Q(async () => {
328
328
  await o();
329
329
  try {
330
- const { listen: s } = await import("@tauri-apps/api/event"), u = await s("config-changed", () => {
330
+ const { listen: s } = await import("@tauri-apps/api/event"), c = await s("config-changed", () => {
331
331
  o();
332
332
  });
333
333
  if (a) {
334
- u();
334
+ c();
335
335
  return;
336
336
  }
337
- t = u;
337
+ t = c;
338
338
  } catch {
339
339
  }
340
- }), G(() => {
340
+ }), J(() => {
341
341
  a = !0, t?.(), t = null;
342
342
  }), n;
343
343
  }
344
- function ke(e) {
345
- const n = ve(), t = {};
344
+ function Ee(e) {
345
+ const n = ke(), t = {};
346
346
  for (const a of e) {
347
347
  const o = `on${a[0].toUpperCase()}${a.slice(1)}`;
348
348
  n?.vnode.props?.[o] && (t[a] = () => n.emit(a));
349
349
  }
350
350
  return t;
351
351
  }
352
- const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title", "aria-label"], _ = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", we = /* @__PURE__ */ z({
352
+ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title", "aria-label"], ie = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", De = /* @__PURE__ */ E({
353
353
  __name: "WindowControls",
354
354
  props: {
355
- controls: { default: () => oe },
355
+ controls: { default: () => fe },
356
356
  minimizeLabel: { default: "Minimize" },
357
357
  maximizeLabel: { default: "Maximize" },
358
358
  closeLabel: { default: "Close" }
359
359
  },
360
360
  emits: ["minimize", "maximize", "close"],
361
361
  setup(e, { emit: n }) {
362
- const t = e, a = n, { vertical: o } = X(), s = x(() => ({
362
+ const t = e, a = n, { vertical: o } = Z(), s = x(() => ({
363
363
  minimize: t.controls.includes("minimize"),
364
364
  maximize: t.controls.includes("maximize"),
365
365
  close: t.controls.includes("close")
366
366
  }));
367
- function u() {
368
- return Ze();
367
+ function c() {
368
+ return _e();
369
369
  }
370
- const r = ve();
371
- function c(L) {
372
- return !!r?.vnode.props?.[`on${L}`];
370
+ const u = ke();
371
+ function d(z) {
372
+ return !!u?.vnode.props?.[`on${z}`];
373
373
  }
374
- function b() {
375
- if (c("Minimize")) return a("minimize");
376
- u().minimize();
374
+ function v() {
375
+ if (d("Minimize")) return a("minimize");
376
+ c().minimize();
377
377
  }
378
- function $() {
379
- if (c("Maximize")) return a("maximize");
380
- u().toggleMaximize();
378
+ function w() {
379
+ if (d("Maximize")) return a("maximize");
380
+ c().toggleMaximize();
381
381
  }
382
- function M() {
383
- if (c("Close")) return a("close");
384
- u().close();
382
+ function I() {
383
+ if (d("Close")) return a("close");
384
+ c().close();
385
385
  }
386
- return (L, E) => e.controls.length ? (l(), i("div", {
386
+ return (z, L) => e.controls.length ? (l(), i("div", {
387
387
  key: 0,
388
- class: p(["flex shrink-0 gap-1", P(o) ? "flex-col" : ""]),
388
+ class: p(["flex shrink-0 gap-1", V(o) ? "flex-col" : ""]),
389
389
  "data-tauri-drag-region": ""
390
390
  }, [
391
391
  s.value.minimize ? (l(), i("button", {
392
392
  key: 0,
393
393
  type: "button",
394
- class: p([_, "hover:bg-status-success"]),
394
+ class: p([ie, "hover:bg-status-success"]),
395
395
  title: e.minimizeLabel,
396
396
  "aria-label": e.minimizeLabel,
397
- onClick: E[0] || (E[0] = (y) => b())
397
+ onClick: L[0] || (L[0] = (h) => v())
398
398
  }, [
399
- F(N, {
399
+ j(N, {
400
400
  name: "window-minimize",
401
401
  size: 24
402
402
  })
@@ -404,40 +404,40 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
404
404
  s.value.maximize ? (l(), i("button", {
405
405
  key: 1,
406
406
  type: "button",
407
- class: p([_, "hover:bg-status-warning"]),
407
+ class: p([ie, "hover:bg-status-warning"]),
408
408
  title: e.maximizeLabel,
409
409
  "aria-label": e.maximizeLabel,
410
- onClick: E[1] || (E[1] = (y) => $())
410
+ onClick: L[1] || (L[1] = (h) => w())
411
411
  }, [
412
- F(N, {
412
+ j(N, {
413
413
  name: "window-maximize",
414
414
  size: 24
415
415
  })
416
- ], 10, Mt)) : g("", !0),
416
+ ], 10, St)) : g("", !0),
417
417
  s.value.close ? (l(), i("button", {
418
418
  key: 2,
419
419
  type: "button",
420
- class: p([_, "hover:bg-status-error"]),
420
+ class: p([ie, "hover:bg-status-error"]),
421
421
  title: e.closeLabel,
422
422
  "aria-label": e.closeLabel,
423
- onClick: E[2] || (E[2] = (y) => M())
423
+ onClick: L[2] || (L[2] = (h) => I())
424
424
  }, [
425
- F(N, {
425
+ j(N, {
426
426
  name: "window-close",
427
427
  size: 24
428
428
  })
429
- ], 10, St)) : g("", !0)
429
+ ], 10, Tt)) : g("", !0)
430
430
  ], 2)) : g("", !0);
431
431
  }
432
- }), Tt = {
432
+ }), It = {
433
433
  key: 0,
434
434
  class: "flex shrink-0 items-center",
435
435
  "data-tauri-drag-region": ""
436
- }, It = {
436
+ }, Ot = {
437
437
  key: 1,
438
438
  class: "min-w-0 shrink truncate text-sm",
439
439
  "data-tauri-drag-region": ""
440
- }, $e = /* @__PURE__ */ z({
440
+ }, Be = /* @__PURE__ */ E({
441
441
  __name: "AppBar",
442
442
  props: {
443
443
  position: { default: null },
@@ -445,45 +445,45 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
445
445
  minimizeLabel: { default: "Minimize" },
446
446
  maximizeLabel: { default: "Maximize" },
447
447
  closeLabel: { default: "Close" },
448
- controls: { default: () => oe }
448
+ controls: { default: () => fe }
449
449
  },
450
450
  emits: ["minimize", "maximize", "close"],
451
451
  setup(e) {
452
- const n = e, t = X(), a = x(() => n.position ?? t.posicion.value), o = x(() => a.value === "left" || a.value === "right");
453
- return ae(le, {
452
+ const n = e, t = Z(), a = x(() => n.position ?? t.posicion.value), o = x(() => a.value === "left" || a.value === "right");
453
+ return ue(de, {
454
454
  posicion: a,
455
455
  orientacion: x(() => o.value ? "vertical" : "horizontal"),
456
456
  vertical: o
457
- }), (s, u) => (l(), i("div", {
457
+ }), (s, c) => (l(), i("div", {
458
458
  class: p(["relative flex shrink-0 items-center gap-2 p-1 font-title", o.value ? "h-full flex-col" : "w-full"]),
459
459
  "data-tauri-drag-region": ""
460
460
  }, [
461
- s.$slots.identidad ? (l(), i("div", Tt, [
462
- A(s.$slots, "identidad")
461
+ s.$slots.identidad ? (l(), i("div", It, [
462
+ B(s.$slots, "identidad")
463
463
  ])) : g("", !0),
464
- (s.$slots.titulo || e.title) && !o.value ? (l(), i("p", It, [
465
- A(s.$slots, "titulo", {}, () => [
466
- qe(I(e.title), 1)
464
+ (s.$slots.titulo || e.title) && !o.value ? (l(), i("p", Ot, [
465
+ B(s.$slots, "titulo", {}, () => [
466
+ We(S(e.title), 1)
467
467
  ])
468
468
  ])) : g("", !0),
469
469
  C("div", {
470
470
  class: p(["flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-auto", o.value ? "flex-col" : ""]),
471
471
  "data-tauri-drag-region": ""
472
472
  }, [
473
- A(s.$slots, "default")
473
+ B(s.$slots, "default")
474
474
  ], 2),
475
475
  s.$slots.acciones ? (l(), i("div", {
476
476
  key: 2,
477
477
  class: p(["flex shrink-0 items-center gap-1", o.value ? "flex-col" : ""])
478
478
  }, [
479
- A(s.$slots, "acciones")
479
+ B(s.$slots, "acciones")
480
480
  ], 2)) : g("", !0),
481
- F(we, J({
481
+ j(De, ne({
482
482
  controls: e.controls,
483
483
  "minimize-label": e.minimizeLabel,
484
484
  "maximize-label": e.maximizeLabel,
485
485
  "close-label": e.closeLabel
486
- }, pe(P(ke)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
486
+ }, we(V(Ee)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
487
487
  s.$slots.centro ? (l(), i("div", {
488
488
  key: 3,
489
489
  class: p(["pointer-events-none absolute flex items-center justify-center", o.value ? "inset-x-0 top-1/2 -translate-y-1/2 flex-col" : "inset-y-0 left-1/2 -translate-x-1/2"])
@@ -491,12 +491,12 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
491
491
  C("div", {
492
492
  class: p(["pointer-events-auto flex items-center gap-2", o.value ? "flex-col" : ""])
493
493
  }, [
494
- A(s.$slots, "centro")
494
+ B(s.$slots, "centro")
495
495
  ], 2)
496
496
  ], 2)) : g("", !0)
497
497
  ], 2));
498
498
  }
499
- }), Ot = { class: "flex min-h-0 min-w-0 flex-1" }, jt = /* @__PURE__ */ z({
499
+ }), Vt = { class: "flex min-h-0 min-w-0 flex-1" }, jt = /* @__PURE__ */ E({
500
500
  __name: "WindowFrame",
501
501
  props: {
502
502
  position: { default: null },
@@ -504,23 +504,23 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
504
504
  minimizeLabel: { default: "Minimize" },
505
505
  maximizeLabel: { default: "Maximize" },
506
506
  closeLabel: { default: "Close" },
507
- controls: { default: () => oe },
507
+ controls: { default: () => fe },
508
508
  hideBar: { type: Boolean, default: !1 }
509
509
  },
510
510
  emits: ["minimize", "maximize", "close"],
511
511
  setup(e) {
512
- const n = e, t = Bt(), a = x(() => n.position ?? t.value), o = x(() => te(a.value)), s = x(() => o.value === "vertical");
513
- ae(le, { posicion: a, orientacion: o, vertical: s });
514
- const u = {
512
+ const n = e, t = Mt(), a = x(() => n.position ?? t.value), o = x(() => re(a.value)), s = x(() => o.value === "vertical");
513
+ ue(de, { posicion: a, orientacion: o, vertical: s });
514
+ const c = {
515
515
  top: "flex-col",
516
516
  bottom: "flex-col-reverse",
517
517
  left: "flex-row",
518
518
  right: "flex-row-reverse"
519
519
  };
520
- return (r, c) => (l(), i("div", {
521
- class: p(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", u[a.value]])
520
+ return (u, d) => (l(), i("div", {
521
+ class: p(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", c[a.value]])
522
522
  }, [
523
- e.hideBar ? g("", !0) : (l(), q($e, J({
523
+ e.hideBar ? g("", !0) : (l(), G(Be, ne({
524
524
  key: 0,
525
525
  position: a.value,
526
526
  title: e.title,
@@ -528,57 +528,57 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
528
528
  "maximize-label": e.maximizeLabel,
529
529
  "close-label": e.closeLabel,
530
530
  controls: e.controls
531
- }, pe(P(ke)(["minimize", "maximize", "close"]))), He({
532
- default: R(() => [
533
- A(r.$slots, "barra")
531
+ }, we(V(Ee)(["minimize", "maximize", "close"]))), qe({
532
+ default: U(() => [
533
+ B(u.$slots, "barra")
534
534
  ]),
535
535
  _: 2
536
536
  }, [
537
- r.$slots.identidad ? {
537
+ u.$slots.identidad ? {
538
538
  name: "identidad",
539
- fn: R(() => [
540
- A(r.$slots, "identidad")
539
+ fn: U(() => [
540
+ B(u.$slots, "identidad")
541
541
  ]),
542
542
  key: "0"
543
543
  } : void 0,
544
- r.$slots.titulo ? {
544
+ u.$slots.titulo ? {
545
545
  name: "titulo",
546
- fn: R(() => [
547
- A(r.$slots, "titulo")
546
+ fn: U(() => [
547
+ B(u.$slots, "titulo")
548
548
  ]),
549
549
  key: "1"
550
550
  } : void 0,
551
- r.$slots.centro ? {
551
+ u.$slots.centro ? {
552
552
  name: "centro",
553
- fn: R(() => [
554
- A(r.$slots, "centro")
553
+ fn: U(() => [
554
+ B(u.$slots, "centro")
555
555
  ]),
556
556
  key: "2"
557
557
  } : void 0,
558
- r.$slots.acciones ? {
558
+ u.$slots.acciones ? {
559
559
  name: "acciones",
560
- fn: R(() => [
561
- A(r.$slots, "acciones")
560
+ fn: U(() => [
561
+ B(u.$slots, "acciones")
562
562
  ]),
563
563
  key: "3"
564
564
  } : void 0
565
565
  ]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
566
- C("div", Ot, [
567
- A(r.$slots, "default")
566
+ C("div", Vt, [
567
+ B(u.$slots, "default")
568
568
  ])
569
569
  ], 2));
570
570
  }
571
- }), Vt = ["aria-selected", "title", "aria-label", "tabindex"], Pt = {
571
+ }), Pt = ["aria-selected", "title", "aria-label", "tabindex"], Nt = {
572
572
  key: 1,
573
573
  "aria-hidden": "true"
574
574
  }, Ft = {
575
575
  key: 2,
576
576
  class: "min-w-0 flex-1 truncate"
577
- }, Nt = ["title", "aria-label"], Rt = { class: "whitespace-nowrap" }, qt = {
577
+ }, Rt = ["title", "aria-label"], Ht = { class: "whitespace-nowrap" }, Wt = {
578
578
  key: 0,
579
579
  class: "size-2 shrink-0 rounded-full bg-current",
580
580
  "aria-hidden": "true"
581
- }, Ht = ["title", "aria-label"], Ut = 500, ce = 8, de = 6, Ce = /* @__PURE__ */ z({
581
+ }, qt = ["title", "aria-label"], Ut = 500, pe = 8, ge = 6, Me = /* @__PURE__ */ E({
582
582
  __name: "TabItem",
583
583
  props: {
584
584
  tab: {},
@@ -589,165 +589,165 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
589
589
  },
590
590
  emits: ["select", "close", "menu", "mover", "navegar"],
591
591
  setup(e, { emit: n }) {
592
- const t = e, a = n, { vertical: o, posicion: s } = X(), u = w(null), r = w(null), c = w(!1), b = w(!1), $ = w(!1), M = w({ top: 0, left: 0, right: 0 });
593
- let L = null, E = null;
594
- const y = x(() => t.tab.closable !== !1), h = x(() => t.tab.tooltip ?? t.tab.label), m = x(
592
+ const t = e, a = n, { vertical: o, posicion: s } = Z(), c = $(null), u = $(null), d = $(!1), v = $(!1), w = $(!1), I = $({ top: 0, left: 0, right: 0 });
593
+ let z = null, L = null;
594
+ const h = x(() => t.tab.closable !== !1), k = x(() => t.tab.tooltip ?? t.tab.label), P = x(
595
595
  () => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
596
- ), k = x(() => t.tab.label.trim().charAt(0).toUpperCase()), d = x(() => c.value || $.value), v = x(
597
- () => !!t.tab.dirty && !(d.value && y.value)
598
- ), D = x(
599
- () => y.value && (d.value || t.active || !t.tab.dirty)
600
- ), B = x(
601
- () => o.value && (c.value || b.value || $.value)
602
- ), j = x(() => {
603
- const S = { position: "fixed", top: `${M.value.top}px`, zIndex: 50 };
604
- return s.value === "right" ? { ...S, right: `${M.value.right + de}px` } : { ...S, left: `${M.value.left + de}px` };
596
+ ), F = x(() => t.tab.label.trim().charAt(0).toUpperCase()), y = x(() => d.value || w.value), r = x(
597
+ () => !!t.tab.dirty && !(y.value && h.value)
598
+ ), f = x(
599
+ () => h.value && (y.value || t.active || !t.tab.dirty)
600
+ ), b = x(
601
+ () => o.value && (d.value || v.value || w.value)
602
+ ), D = x(() => {
603
+ const M = { position: "fixed", top: `${I.value.top}px`, zIndex: 50 };
604
+ return s.value === "right" ? { ...M, right: `${I.value.right + ge}px` } : { ...M, left: `${I.value.left + ge}px` };
605
605
  });
606
- function ie() {
607
- const S = u.value;
608
- if (!S) return;
609
- const f = S.getBoundingClientRect();
610
- M.value = {
611
- top: f.top,
612
- left: f.right,
613
- right: window.innerWidth - f.left
606
+ function _() {
607
+ const M = c.value;
608
+ if (!M) return;
609
+ const m = M.getBoundingClientRect();
610
+ I.value = {
611
+ top: m.top,
612
+ left: m.right,
613
+ right: window.innerWidth - m.left
614
614
  };
615
615
  }
616
- function De(S) {
617
- const f = S.relatedTarget;
618
- f && r.value?.contains(f) || ($.value = !1);
616
+ function H(M) {
617
+ const m = M.relatedTarget;
618
+ m && u.value?.contains(m) || (w.value = !1);
619
619
  }
620
- function Be() {
621
- c.value = !0, ie();
620
+ function ee() {
621
+ d.value = !0, _();
622
622
  }
623
- function Ae() {
624
- b.value = !0, ie();
623
+ function W() {
624
+ v.value = !0, _();
625
625
  }
626
- function H() {
627
- L !== null && clearTimeout(L), L = null, E = null;
626
+ function R() {
627
+ z !== null && clearTimeout(z), z = null, L = null;
628
628
  }
629
- function Me(S) {
630
- S.button === 0 && (E = { x: S.clientX, y: S.clientY }, L = setTimeout(() => {
631
- E && a("menu", E), H();
629
+ function K(M) {
630
+ M.button === 0 && (L = { x: M.clientX, y: M.clientY }, z = setTimeout(() => {
631
+ L && a("menu", L), R();
632
632
  }, Ut));
633
633
  }
634
- function Se(S) {
635
- if (!E) return;
636
- (Math.abs(S.clientX - E.x) > ce || Math.abs(S.clientY - E.y) > ce) && H();
634
+ function te(M) {
635
+ if (!L) return;
636
+ (Math.abs(M.clientX - L.x) > pe || Math.abs(M.clientY - L.y) > pe) && R();
637
637
  }
638
- function Te(S) {
639
- S.button === 1 && y.value && (S.preventDefault(), a("close"));
638
+ function Ie(M) {
639
+ M.button === 1 && h.value && (M.preventDefault(), a("close"));
640
640
  }
641
- function Ie(S) {
642
- S.preventDefault(), a("menu", { x: S.clientX, y: S.clientY });
641
+ function Oe(M) {
642
+ M.preventDefault(), a("menu", { x: M.clientX, y: M.clientY });
643
643
  }
644
- return G(H), (S, f) => (l(), i("div", {
644
+ return J(R), (M, m) => (l(), i("div", {
645
645
  ref_key: "raiz",
646
- ref: u,
646
+ ref: c,
647
647
  class: p(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
648
648
  e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
649
- P(o) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
649
+ V(o) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
650
650
  ]]),
651
651
  role: "tab",
652
652
  "aria-selected": e.active,
653
- title: h.value,
654
- "aria-label": m.value,
653
+ title: k.value,
654
+ "aria-label": P.value,
655
655
  tabindex: e.tabindex,
656
- onClick: f[5] || (f[5] = T((O) => a("select"), ["stop"])),
656
+ onClick: m[5] || (m[5] = A((T) => a("select"), ["stop"])),
657
657
  onKeydown: [
658
- f[6] || (f[6] = V(T((O) => a("select"), ["stop"]), ["enter"])),
659
- f[7] || (f[7] = V(T((O) => a("select"), ["prevent", "stop"]), ["space"])),
660
- f[8] || (f[8] = V(T((O) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
661
- f[9] || (f[9] = V(T((O) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
662
- f[10] || (f[10] = V(T((O) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
663
- f[11] || (f[11] = V(T((O) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
664
- f[12] || (f[12] = V(T((O) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
665
- f[13] || (f[13] = V(T((O) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
666
- f[14] || (f[14] = V(T((O) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
667
- f[15] || (f[15] = V(T((O) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
668
- f[16] || (f[16] = V(T((O) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
669
- f[17] || (f[17] = V(T((O) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
670
- f[18] || (f[18] = V(T((O) => y.value && a("close"), ["prevent", "stop"]), ["delete"]))
658
+ m[6] || (m[6] = O(A((T) => a("select"), ["stop"]), ["enter"])),
659
+ m[7] || (m[7] = O(A((T) => a("select"), ["prevent", "stop"]), ["space"])),
660
+ m[8] || (m[8] = O(A((T) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
661
+ m[9] || (m[9] = O(A((T) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
662
+ m[10] || (m[10] = O(A((T) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
663
+ m[11] || (m[11] = O(A((T) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
664
+ m[12] || (m[12] = O(A((T) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
665
+ m[13] || (m[13] = O(A((T) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
666
+ m[14] || (m[14] = O(A((T) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
667
+ m[15] || (m[15] = O(A((T) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
668
+ m[16] || (m[16] = O(A((T) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
669
+ m[17] || (m[17] = O(A((T) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
670
+ m[18] || (m[18] = O(A((T) => h.value && a("close"), ["prevent", "stop"]), ["delete"]))
671
671
  ],
672
- onAuxclick: T(Te, ["stop"]),
673
- onContextmenu: Ie,
674
- onPointerdown: Me,
675
- onPointermove: Se,
676
- onPointerup: H,
677
- onPointerleave: H,
678
- onMouseenter: Be,
679
- onMouseleave: f[19] || (f[19] = (O) => c.value = !1),
680
- onFocus: Ae,
681
- onBlur: f[20] || (f[20] = (O) => b.value = !1)
672
+ onAuxclick: A(Ie, ["stop"]),
673
+ onContextmenu: Oe,
674
+ onPointerdown: K,
675
+ onPointermove: te,
676
+ onPointerup: R,
677
+ onPointerleave: R,
678
+ onMouseenter: ee,
679
+ onMouseleave: m[19] || (m[19] = (T) => d.value = !1),
680
+ onFocus: W,
681
+ onBlur: m[20] || (m[20] = (T) => v.value = !1)
682
682
  }, [
683
- e.tab.icon ? (l(), q(N, {
683
+ e.tab.icon ? (l(), G(N, {
684
684
  key: 0,
685
685
  name: e.tab.icon,
686
686
  size: 16,
687
687
  class: "shrink-0"
688
- }, null, 8, ["name"])) : P(o) ? (l(), i("span", Pt, I(k.value), 1)) : g("", !0),
689
- P(o) ? g("", !0) : (l(), i("span", Ft, I(e.tab.label), 1)),
690
- v.value ? (l(), i("span", {
688
+ }, null, 8, ["name"])) : V(o) ? (l(), i("span", Nt, S(F.value), 1)) : g("", !0),
689
+ V(o) ? g("", !0) : (l(), i("span", Ft, S(e.tab.label), 1)),
690
+ r.value ? (l(), i("span", {
691
691
  key: 3,
692
- class: p(["size-2 shrink-0 rounded-full bg-current", P(o) ? "absolute right-0.5 top-0.5" : ""]),
692
+ class: p(["size-2 shrink-0 rounded-full bg-current", V(o) ? "absolute right-0.5 top-0.5" : ""]),
693
693
  "aria-hidden": "true"
694
- }, null, 2)) : D.value && !P(o) ? (l(), i("button", {
694
+ }, null, 2)) : f.value && !V(o) ? (l(), i("button", {
695
695
  key: 4,
696
696
  type: "button",
697
697
  class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
698
698
  title: e.closeLabel,
699
- "aria-label": `${e.closeLabel}: ${m.value}`,
700
- onClick: f[0] || (f[0] = T((O) => a("close"), ["stop"]))
699
+ "aria-label": `${e.closeLabel}: ${P.value}`,
700
+ onClick: m[0] || (m[0] = A((T) => a("close"), ["stop"]))
701
701
  }, [
702
- F(N, {
702
+ j(N, {
703
703
  name: "gtk-close",
704
704
  type: "symbol",
705
705
  size: 12
706
706
  })
707
- ], 8, Nt)) : g("", !0),
708
- (l(), q(ge, { to: "body" }, [
709
- F(ye, {
707
+ ], 8, Rt)) : g("", !0),
708
+ (l(), G($e, { to: "body" }, [
709
+ j(Ce, {
710
710
  "enter-active-class": "transition duration-150 ease-out",
711
711
  "enter-from-class": "opacity-0 scale-95",
712
712
  "leave-active-class": "transition duration-100 ease-in",
713
713
  "leave-to-class": "opacity-0 scale-95"
714
714
  }, {
715
- default: R(() => [
716
- B.value ? (l(), i("div", {
715
+ default: U(() => [
716
+ b.value ? (l(), i("div", {
717
717
  key: 0,
718
718
  class: p(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
719
719
  ref_key: "desplegadoRef",
720
- ref: r,
721
- style: ee(j.value),
722
- onMouseenter: f[2] || (f[2] = (O) => $.value = !0),
723
- onMouseleave: f[3] || (f[3] = (O) => $.value = !1),
724
- onFocusin: f[4] || (f[4] = (O) => $.value = !0),
725
- onFocusout: De
720
+ ref: u,
721
+ style: se(D.value),
722
+ onMouseenter: m[2] || (m[2] = (T) => w.value = !0),
723
+ onMouseleave: m[3] || (m[3] = (T) => w.value = !1),
724
+ onFocusin: m[4] || (m[4] = (T) => w.value = !0),
725
+ onFocusout: H
726
726
  }, [
727
- C("span", Rt, I(e.tab.label), 1),
728
- e.tab.dirty ? (l(), i("span", qt)) : g("", !0),
729
- y.value ? (l(), i("button", {
727
+ C("span", Ht, S(e.tab.label), 1),
728
+ e.tab.dirty ? (l(), i("span", Wt)) : g("", !0),
729
+ h.value ? (l(), i("button", {
730
730
  key: 1,
731
731
  type: "button",
732
732
  class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
733
733
  title: e.closeLabel,
734
- "aria-label": `${e.closeLabel}: ${m.value}`,
735
- onClick: f[1] || (f[1] = T((O) => a("close"), ["stop"]))
734
+ "aria-label": `${e.closeLabel}: ${P.value}`,
735
+ onClick: m[1] || (m[1] = A((T) => a("close"), ["stop"]))
736
736
  }, [
737
- F(N, {
737
+ j(N, {
738
738
  name: "gtk-close",
739
739
  type: "symbol",
740
740
  size: 12
741
741
  })
742
- ], 8, Ht)) : g("", !0)
742
+ ], 8, qt)) : g("", !0)
743
743
  ], 38)) : g("", !0)
744
744
  ]),
745
745
  _: 1
746
746
  })
747
747
  ]))
748
- ], 42, Vt));
748
+ ], 42, Pt));
749
749
  }
750
- }), Wt = ["aria-orientation"], Kt = ["draggable", "onDragstart", "onDragover", "onDrop"], Gt = ["title", "aria-label"], Xt = /* @__PURE__ */ z({
750
+ }), Kt = ["aria-orientation"], Gt = ["draggable", "onDragstart", "onDragover", "onDrop"], Yt = ["title", "aria-label"], Qt = /* @__PURE__ */ E({
751
751
  __name: "TabBar",
752
752
  props: {
753
753
  tabs: {},
@@ -759,83 +759,83 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
759
759
  },
760
760
  emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
761
761
  setup(e, { emit: n }) {
762
- const t = e, a = n, { vertical: o } = X(), s = w(null), u = w(0), r = w(null), c = w(null);
763
- function b(d) {
764
- a("update:modelValue", d), a("select", d);
762
+ const t = e, a = n, { vertical: o } = Z(), s = $(null), c = $(0), u = $(null), d = $(null);
763
+ function v(y) {
764
+ a("update:modelValue", y), a("select", y);
765
765
  }
766
- async function $(d, v) {
767
- const D = t.tabs.length - 1;
768
- if (D < 0) return;
769
- const B = v === "primera" ? 0 : v === "ultima" ? D : v === "anterior" ? (d - 1 + t.tabs.length) % t.tabs.length : (d + 1) % t.tabs.length;
770
- u.value = B, await ne(), s.value?.querySelectorAll('[role="tab"]')?.[B]?.focus();
766
+ async function w(y, r) {
767
+ const f = t.tabs.length - 1;
768
+ if (f < 0) return;
769
+ const b = r === "primera" ? 0 : r === "ultima" ? f : r === "anterior" ? (y - 1 + t.tabs.length) % t.tabs.length : (y + 1) % t.tabs.length;
770
+ c.value = b, await ce(), s.value?.querySelectorAll('[role="tab"]')?.[b]?.focus();
771
771
  }
772
- function M(d, v) {
772
+ function I(y, r) {
773
773
  if (t.fixedOrder) return;
774
- const D = d + v;
775
- if (D < 0 || D >= t.tabs.length) return;
776
- const B = [...t.tabs], [j] = B.splice(d, 1);
777
- j && (B.splice(D, 0, j), u.value = D, a("reorder", B));
774
+ const f = y + r;
775
+ if (f < 0 || f >= t.tabs.length) return;
776
+ const b = [...t.tabs], [D] = b.splice(y, 1);
777
+ D && (b.splice(f, 0, D), c.value = f, a("reorder", b));
778
778
  }
779
- function L(d) {
780
- const v = s.value;
781
- if (!v) return;
782
- const D = d.deltaY || d.deltaX || 0, B = o.value ? v.scrollTop : v.scrollLeft;
783
- o.value ? v.scrollTop += D : v.scrollLeft += D, (o.value ? v.scrollTop : v.scrollLeft) !== B && d.preventDefault();
779
+ function z(y) {
780
+ const r = s.value;
781
+ if (!r) return;
782
+ const f = y.deltaY || y.deltaX || 0, b = o.value ? r.scrollTop : r.scrollLeft;
783
+ o.value ? r.scrollTop += f : r.scrollLeft += f, (o.value ? r.scrollTop : r.scrollLeft) !== b && y.preventDefault();
784
784
  }
785
- function E(d, v) {
786
- t.fixedOrder || (r.value = d, v.dataTransfer?.setData("text/plain", String(d)), v.dataTransfer && (v.dataTransfer.effectAllowed = "move"));
785
+ function L(y, r) {
786
+ t.fixedOrder || (u.value = y, r.dataTransfer?.setData("text/plain", String(y)), r.dataTransfer && (r.dataTransfer.effectAllowed = "move"));
787
787
  }
788
- function y(d, v) {
789
- t.fixedOrder || r.value === null || (v.preventDefault(), c.value = d, v.dataTransfer && (v.dataTransfer.dropEffect = "move"));
788
+ function h(y, r) {
789
+ t.fixedOrder || u.value === null || (r.preventDefault(), d.value = y, r.dataTransfer && (r.dataTransfer.dropEffect = "move"));
790
790
  }
791
- function h(d) {
792
- const v = r.value;
793
- if (m(), t.fixedOrder || v === null || v === d) return;
794
- const D = [...t.tabs], [B] = D.splice(v, 1);
795
- B && (D.splice(d, 0, B), a("reorder", D));
791
+ function k(y) {
792
+ const r = u.value;
793
+ if (P(), t.fixedOrder || r === null || r === y) return;
794
+ const f = [...t.tabs], [b] = f.splice(r, 1);
795
+ b && (f.splice(y, 0, b), a("reorder", f));
796
796
  }
797
- function m() {
798
- r.value = null, c.value = null;
797
+ function P() {
798
+ u.value = null, d.value = null;
799
799
  }
800
- const k = x(
800
+ const F = x(
801
801
  () => o.value ? "flex h-full flex-col items-center gap-1 overflow-y-auto overflow-x-hidden" : "flex items-center gap-1 overflow-x-auto overflow-y-hidden"
802
802
  );
803
- return (d, v) => (l(), i("div", {
804
- class: p(["flex min-h-0 min-w-0 items-center gap-1", P(o) ? "w-full flex-col" : "h-full"]),
803
+ return (y, r) => (l(), i("div", {
804
+ class: p(["flex min-h-0 min-w-0 items-center gap-1", V(o) ? "w-full flex-col" : "h-full"]),
805
805
  role: "tablist",
806
- "aria-orientation": P(o) ? "vertical" : "horizontal"
806
+ "aria-orientation": V(o) ? "vertical" : "horizontal"
807
807
  }, [
808
808
  C("div", {
809
809
  ref_key: "carril",
810
810
  ref: s,
811
- class: p(k.value),
812
- onWheel: L
811
+ class: p(F.value),
812
+ onWheel: z
813
813
  }, [
814
- (l(!0), i(U, null, Y(e.tabs, (D, B) => (l(), i("div", {
815
- key: D.id,
814
+ (l(!0), i(Y, null, ae(e.tabs, (f, b) => (l(), i("div", {
815
+ key: f.id,
816
816
  class: p(["transition-opacity", [
817
- r.value === B ? "opacity-40" : "",
818
- c.value === B && r.value !== B ? "ring-2 ring-secondary rounded-corner" : ""
817
+ u.value === b ? "opacity-40" : "",
818
+ d.value === b && u.value !== b ? "ring-2 ring-secondary rounded-corner" : ""
819
819
  ]]),
820
820
  draggable: !e.fixedOrder,
821
- onDragstart: (j) => E(B, j),
822
- onDragover: (j) => y(B, j),
823
- onDrop: T((j) => h(B), ["prevent"]),
824
- onDragend: m
821
+ onDragstart: (D) => L(b, D),
822
+ onDragover: (D) => h(b, D),
823
+ onDrop: A((D) => k(b), ["prevent"]),
824
+ onDragend: P
825
825
  }, [
826
- F(Ce, {
827
- tab: D,
828
- active: D.id === e.modelValue,
826
+ j(Me, {
827
+ tab: f,
828
+ active: f.id === e.modelValue,
829
829
  "close-label": e.closeLabel,
830
830
  "dirty-label": e.dirtyLabel,
831
- tabindex: B === u.value ? 0 : -1,
832
- onSelect: (j) => b(D.id),
833
- onClose: (j) => a("close", D.id),
834
- onMenu: (j) => a("menu", { id: D.id, ...j }),
835
- onNavegar: (j) => $(B, j),
836
- onMover: (j) => M(B, j)
831
+ tabindex: b === c.value ? 0 : -1,
832
+ onSelect: (D) => v(f.id),
833
+ onClose: (D) => a("close", f.id),
834
+ onMenu: (D) => a("menu", { id: f.id, ...D }),
835
+ onNavegar: (D) => w(b, D),
836
+ onMover: (D) => I(b, D)
837
837
  }, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
838
- ], 42, Kt))), 128))
838
+ ], 42, Gt))), 128))
839
839
  ], 34),
840
840
  e.newLabel ? (l(), i("button", {
841
841
  key: 0,
@@ -843,17 +843,17 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
843
843
  class: "flex size-7 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
844
844
  title: e.newLabel,
845
845
  "aria-label": e.newLabel,
846
- onClick: v[0] || (v[0] = (D) => a("new"))
846
+ onClick: r[0] || (r[0] = (f) => a("new"))
847
847
  }, [
848
- F(N, {
848
+ j(N, {
849
849
  name: "gtk-add",
850
850
  type: "symbol",
851
851
  size: 14
852
852
  })
853
- ], 8, Gt)) : g("", !0)
854
- ], 10, Wt));
853
+ ], 8, Yt)) : g("", !0)
854
+ ], 10, Kt));
855
855
  }
856
- }), Yt = { class: "relative flex shrink-0 items-center" }, Jt = ["title", "aria-label", "aria-expanded"], Qt = ["value", "placeholder", "aria-label"], Zt = /* @__PURE__ */ z({
856
+ }), Xt = { class: "relative flex shrink-0 items-center" }, Jt = ["title", "aria-label", "aria-expanded"], Zt = ["value", "placeholder", "aria-label"], _t = /* @__PURE__ */ E({
857
857
  __name: "BarSearch",
858
858
  props: {
859
859
  modelValue: { default: "" },
@@ -863,67 +863,67 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
863
863
  },
864
864
  emits: ["update:modelValue", "search", "open", "close"],
865
865
  setup(e, { emit: n }) {
866
- const t = e, a = n, { vertical: o, posicion: s } = X(), u = w(!1), r = w(null), c = x(() => o.value || t.collapsed), b = x(() => !c.value || u.value), $ = x(() => {
867
- if (!c.value) return "";
868
- const h = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
869
- return s.value === "left" ? `${h} left-full top-0 ml-1` : s.value === "right" ? `${h} right-full top-0 mr-1` : s.value === "bottom" ? `${h} bottom-full right-0 mb-1` : `${h} top-full right-0 mt-1`;
866
+ const t = e, a = n, { vertical: o, posicion: s } = Z(), c = $(!1), u = $(null), d = x(() => o.value || t.collapsed), v = x(() => !d.value || c.value), w = x(() => {
867
+ if (!d.value) return "";
868
+ const k = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
869
+ return s.value === "left" ? `${k} left-full top-0 ml-1` : s.value === "right" ? `${k} right-full top-0 mr-1` : s.value === "bottom" ? `${k} bottom-full right-0 mb-1` : `${k} top-full right-0 mt-1`;
870
870
  });
871
- async function M() {
872
- u.value = !0, a("open"), await ne(), r.value?.focus();
871
+ async function I() {
872
+ c.value = !0, a("open"), await ce(), u.value?.focus();
873
873
  }
874
- function L() {
875
- u.value && (u.value = !1, a("close"));
874
+ function z() {
875
+ c.value && (c.value = !1, a("close"));
876
876
  }
877
- function E(h) {
878
- a("update:modelValue", h.target.value);
877
+ function L(k) {
878
+ a("update:modelValue", k.target.value);
879
879
  }
880
- function y() {
880
+ function h() {
881
881
  a("search", t.modelValue);
882
882
  }
883
- return (h, m) => (l(), i("div", Yt, [
884
- c.value ? (l(), i("button", {
883
+ return (k, P) => (l(), i("div", Xt, [
884
+ d.value ? (l(), i("button", {
885
885
  key: 0,
886
886
  type: "button",
887
887
  class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
888
888
  title: e.label,
889
889
  "aria-label": e.label,
890
- "aria-expanded": u.value,
891
- onMousedown: m[0] || (m[0] = T(() => {
890
+ "aria-expanded": c.value,
891
+ onMousedown: P[0] || (P[0] = A(() => {
892
892
  }, ["prevent"])),
893
- onClick: m[1] || (m[1] = (k) => u.value ? L() : M())
893
+ onClick: P[1] || (P[1] = (F) => c.value ? z() : I())
894
894
  }, [
895
- F(N, {
895
+ j(N, {
896
896
  name: "system-search",
897
897
  type: "symbol",
898
898
  size: 14
899
899
  })
900
900
  ], 40, Jt)) : g("", !0),
901
- b.value ? (l(), i("div", {
901
+ v.value ? (l(), i("div", {
902
902
  key: 1,
903
- class: p($.value)
903
+ class: p(w.value)
904
904
  }, [
905
905
  C("input", {
906
906
  ref_key: "campo",
907
- ref: r,
907
+ ref: u,
908
908
  type: "search",
909
- class: p(["w-full rounded-corner border border-ui-border bg-ui-bg/80 px-2 py-1 text-sm outline-none focus:border-ui-border-strong", c.value ? "" : "w-48"]),
909
+ class: p(["w-full rounded-corner border border-ui-border bg-ui-bg/80 px-2 py-1 text-sm outline-none focus:border-ui-border-strong", d.value ? "" : "w-48"]),
910
910
  value: e.modelValue,
911
911
  placeholder: e.placeholder || e.label,
912
912
  "aria-label": e.label,
913
- onInput: E,
913
+ onInput: L,
914
914
  onKeydown: [
915
- V(y, ["enter"]),
916
- V(L, ["esc"])
915
+ O(h, ["enter"]),
916
+ O(z, ["esc"])
917
917
  ],
918
- onBlur: L
919
- }, null, 42, Qt)
918
+ onBlur: z
919
+ }, null, 42, Zt)
920
920
  ], 2)) : g("", !0)
921
921
  ]));
922
922
  }
923
- }), _t = ["type", "disabled"], ea = {
923
+ }), ea = ["type", "disabled"], ta = {
924
924
  key: 0,
925
925
  class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
926
- }, ta = ["src", "alt"], aa = { key: 2 }, na = ["src", "alt"], la = /* @__PURE__ */ z({
926
+ }, aa = ["src", "alt"], na = { key: 2 }, la = ["src", "alt"], oa = /* @__PURE__ */ E({
927
927
  __name: "ActionButton",
928
928
  props: {
929
929
  label: {},
@@ -950,12 +950,12 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
950
950
  sm: "px-2 py-1 text-xs",
951
951
  md: "px-3 py-1 text-sm",
952
952
  lg: "px-4 py-2 text-base"
953
- }, u = (r) => {
954
- t.stopPropagation && r.stopPropagation(), t.preventDefault && r.preventDefault(), !t.disabled && !t.loading && a("click");
953
+ }, c = (u) => {
954
+ t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
955
955
  };
956
- return (r, c) => (l(), i("button", {
956
+ return (u, d) => (l(), i("button", {
957
957
  type: t.type,
958
- onClick: u,
958
+ onClick: c,
959
959
  class: p(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
960
960
  o[t.variant],
961
961
  s[t.size],
@@ -965,28 +965,28 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
965
965
  ]]),
966
966
  disabled: t.disabled || t.loading
967
967
  }, [
968
- e.loading ? (l(), i("span", ea)) : g("", !0),
968
+ e.loading ? (l(), i("span", ta)) : g("", !0),
969
969
  t.iconSrc && !t.iconRight ? (l(), i("img", {
970
970
  key: 1,
971
971
  src: t.iconSrc,
972
972
  alt: t.iconAlt || t.label,
973
973
  class: "w-4 h-4"
974
- }, null, 8, ta)) : g("", !0),
975
- t.label ? (l(), i("span", aa, I(t.label), 1)) : g("", !0),
974
+ }, null, 8, aa)) : g("", !0),
975
+ t.label ? (l(), i("span", na, S(t.label), 1)) : g("", !0),
976
976
  t.iconSrc && t.iconRight ? (l(), i("img", {
977
977
  key: 3,
978
978
  src: t.iconSrc,
979
979
  alt: t.iconAlt || t.label,
980
980
  class: "w-4 h-4"
981
- }, null, 8, na)) : g("", !0)
982
- ], 10, _t));
981
+ }, null, 8, la)) : g("", !0)
982
+ ], 10, ea));
983
983
  }
984
- }), Q = (e, n) => {
984
+ }), le = (e, n) => {
985
985
  const t = e.__vccOpts || e;
986
986
  for (const [a, o] of n)
987
987
  t[a] = o;
988
988
  return t;
989
- }, oa = /* @__PURE__ */ Q(la, [["__scopeId", "data-v-2eaf6e27"]]), ia = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, sa = /* @__PURE__ */ z({
989
+ }, ia = /* @__PURE__ */ le(oa, [["__scopeId", "data-v-2eaf6e27"]]), sa = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, ra = /* @__PURE__ */ E({
990
990
  __name: "ConfigSection",
991
991
  props: {
992
992
  title: {},
@@ -997,23 +997,23 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
997
997
  return (n, t) => (l(), i("div", {
998
998
  class: p(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
999
999
  }, [
1000
- C("h3", ia, I(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
1001
- A(n.$slots, "default", {}, void 0, !0)
1000
+ C("h3", sa, S(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
1001
+ B(n.$slots, "default", {}, void 0, !0)
1002
1002
  ], 2));
1003
1003
  }
1004
- }), ra = /* @__PURE__ */ Q(sa, [["__scopeId", "data-v-45bd4eab"]]), ua = { class: "flex items-center gap-3 flex-1 min-w-0" }, ca = ["src", "alt"], da = { class: "min-w-0" }, fa = { class: "font-semibold truncate" }, ma = {
1004
+ }), ua = /* @__PURE__ */ le(ra, [["__scopeId", "data-v-45bd4eab"]]), ca = { class: "flex items-center gap-3 flex-1 min-w-0" }, da = ["src", "alt"], fa = { class: "min-w-0" }, ma = { class: "font-semibold truncate" }, ba = {
1005
1005
  key: 0,
1006
1006
  class: "text-xs text-gray-400 truncate"
1007
- }, ba = {
1007
+ }, va = {
1008
1008
  key: 1,
1009
1009
  class: "text-xs text-gray-400 truncate"
1010
- }, va = {
1010
+ }, pa = {
1011
1011
  key: 2,
1012
1012
  class: "text-xs text-gray-400 flex gap-2 mt-1"
1013
- }, pa = {
1013
+ }, ga = {
1014
1014
  key: 1,
1015
1015
  class: "w-2 h-2 rounded-full bg-green-500"
1016
- }, ga = /* @__PURE__ */ z({
1016
+ }, ha = /* @__PURE__ */ E({
1017
1017
  __name: "DeviceCard",
1018
1018
  props: {
1019
1019
  icon: {},
@@ -1035,48 +1035,48 @@ const At = ["title", "aria-label"], Mt = ["title", "aria-label"], St = ["title",
1035
1035
  }, o = () => {
1036
1036
  t("click");
1037
1037
  };
1038
- return (s, u) => (l(), i("div", {
1038
+ return (s, c) => (l(), i("div", {
1039
1039
  class: p(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
1040
1040
  onClick: o
1041
1041
  }, [
1042
- C("div", ua, [
1042
+ C("div", ca, [
1043
1043
  C("img", {
1044
1044
  src: e.icon,
1045
1045
  alt: e.title,
1046
1046
  class: "h-7 w-7 shrink-0"
1047
- }, null, 8, ca),
1048
- C("div", da, [
1049
- C("div", fa, I(e.title), 1),
1050
- e.subtitle ? (l(), i("div", ma, I(e.subtitle), 1)) : g("", !0),
1051
- e.metadata ? (l(), i("div", ba, I(e.metadata), 1)) : g("", !0),
1052
- e.extraInfo && e.extraInfo.length > 0 ? (l(), i("div", va, [
1053
- (l(!0), i(U, null, Y(e.extraInfo, (r, c) => (l(), i("span", { key: c }, I(r), 1))), 128))
1047
+ }, null, 8, da),
1048
+ C("div", fa, [
1049
+ C("div", ma, S(e.title), 1),
1050
+ e.subtitle ? (l(), i("div", ba, S(e.subtitle), 1)) : g("", !0),
1051
+ e.metadata ? (l(), i("div", va, S(e.metadata), 1)) : g("", !0),
1052
+ e.extraInfo && e.extraInfo.length > 0 ? (l(), i("div", pa, [
1053
+ (l(!0), i(Y, null, ae(e.extraInfo, (u, d) => (l(), i("span", { key: d }, S(u), 1))), 128))
1054
1054
  ])) : g("", !0)
1055
1055
  ])
1056
1056
  ]),
1057
1057
  e.showActionButton ? (l(), i("button", {
1058
1058
  key: 0,
1059
1059
  class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
1060
- onClick: T(a, ["stop"])
1061
- }, I(e.actionLabel), 1)) : g("", !0),
1062
- e.showStatusIndicator && e.isConnected ? (l(), i("div", pa)) : g("", !0)
1060
+ onClick: A(a, ["stop"])
1061
+ }, S(e.actionLabel), 1)) : g("", !0),
1062
+ e.showStatusIndicator && e.isConnected ? (l(), i("div", ga)) : g("", !0)
1063
1063
  ], 2));
1064
1064
  }
1065
- }), ze = /* @__PURE__ */ Symbol("menú de vasak");
1066
- function Z() {
1067
- const e = be(ze, null);
1065
+ }), Ae = /* @__PURE__ */ Symbol("menú de vasak");
1066
+ function oe() {
1067
+ const e = xe(Ae, null);
1068
1068
  if (e) return e;
1069
- const n = w(!1);
1069
+ const n = $(!1);
1070
1070
  return {
1071
1071
  abierto: n,
1072
1072
  idDelMenu: "vsk-menu-suelto",
1073
- idDeLaEtiqueta: w(null),
1073
+ idDeLaEtiqueta: $(null),
1074
1074
  ponerLaEtiqueta: () => {
1075
1075
  },
1076
- disparador: w(null),
1076
+ disparador: $(null),
1077
1077
  ponerElDisparador: () => {
1078
1078
  },
1079
- focoAlAbrir: w("ninguno"),
1079
+ focoAlAbrir: $("ninguno"),
1080
1080
  abrir: () => {
1081
1081
  n.value = !0;
1082
1082
  },
@@ -1088,70 +1088,70 @@ function Z() {
1088
1088
  }
1089
1089
  };
1090
1090
  }
1091
- let fe = 0;
1092
- function Le() {
1093
- return fe += 1, `vsk-menu-${fe}`;
1091
+ let he = 0;
1092
+ function Se() {
1093
+ return he += 1, `vsk-menu-${he}`;
1094
1094
  }
1095
- const ya = { class: "relative inline-block" }, ha = /* @__PURE__ */ z({
1095
+ const ya = { class: "relative inline-block" }, xa = /* @__PURE__ */ E({
1096
1096
  __name: "DropdownMenu",
1097
1097
  props: {
1098
1098
  open: { type: Boolean, default: void 0 }
1099
1099
  },
1100
1100
  emits: ["update:open"],
1101
1101
  setup(e, { emit: n }) {
1102
- const t = e, a = n, o = w(!1), s = w(null), u = w(null), r = w("ninguno"), c = Le();
1103
- let b = null;
1104
- const $ = x({
1102
+ const t = e, a = n, o = $(!1), s = $(null), c = $(null), u = $("ninguno"), d = Se();
1103
+ let v = null;
1104
+ const w = x({
1105
1105
  get: () => t.open ?? o.value,
1106
- set: (y) => {
1107
- t.open === void 0 && (o.value = y), a("update:open", y);
1106
+ set: (h) => {
1107
+ t.open === void 0 && (o.value = h), a("update:open", h);
1108
1108
  }
1109
1109
  });
1110
- K($, (y) => {
1111
- if (y) {
1112
- const h = document.activeElement;
1113
- b = h instanceof HTMLElement ? h : null;
1110
+ X(w, (h) => {
1111
+ if (h) {
1112
+ const k = document.activeElement;
1113
+ v = k instanceof HTMLElement ? k : null;
1114
1114
  } else
1115
- r.value = "ninguno";
1115
+ u.value = "ninguno";
1116
1116
  });
1117
- function M(y = "ninguno") {
1118
- r.value = y, $.value = !0;
1117
+ function I(h = "ninguno") {
1118
+ u.value = h, w.value = !0;
1119
1119
  }
1120
- function L(y = {}) {
1121
- if ($.value = !1, !y.devolverElFoco) return;
1122
- const h = b ?? s.value;
1123
- h?.isConnected && h.focus();
1120
+ function z(h = {}) {
1121
+ if (w.value = !1, !h.devolverElFoco) return;
1122
+ const k = v ?? s.value;
1123
+ k?.isConnected && k.focus();
1124
1124
  }
1125
- function E(y = "ninguno") {
1126
- if ($.value) {
1127
- L({ devolverElFoco: !0 });
1125
+ function L(h = "ninguno") {
1126
+ if (w.value) {
1127
+ z({ devolverElFoco: !0 });
1128
1128
  return;
1129
1129
  }
1130
- M(y);
1130
+ I(h);
1131
1131
  }
1132
- return ae(ze, {
1133
- abierto: $,
1134
- idDelMenu: c,
1135
- idDeLaEtiqueta: u,
1136
- ponerLaEtiqueta: (y) => {
1137
- u.value = y;
1132
+ return ue(Ae, {
1133
+ abierto: w,
1134
+ idDelMenu: d,
1135
+ idDeLaEtiqueta: c,
1136
+ ponerLaEtiqueta: (h) => {
1137
+ c.value = h;
1138
1138
  },
1139
1139
  disparador: s,
1140
- ponerElDisparador: (y) => {
1141
- s.value = y;
1140
+ ponerElDisparador: (h) => {
1141
+ s.value = h;
1142
1142
  },
1143
- focoAlAbrir: r,
1144
- abrir: M,
1145
- cerrar: L,
1146
- alternar: E
1147
- }), (y, h) => (l(), i("div", ya, [
1148
- A(y.$slots, "default")
1143
+ focoAlAbrir: u,
1144
+ abrir: I,
1145
+ cerrar: z,
1146
+ alternar: L
1147
+ }), (h, k) => (l(), i("div", ya, [
1148
+ B(h.$slots, "default")
1149
1149
  ]));
1150
1150
  }
1151
- }), xa = ["id", "aria-labelledby", "inert"], ka = {
1151
+ }), ka = ["id", "aria-labelledby", "inert"], wa = {
1152
1152
  role: "none",
1153
1153
  class: "py-1"
1154
- }, wa = /* @__PURE__ */ z({
1154
+ }, q = 8, $a = /* @__PURE__ */ E({
1155
1155
  inheritAttrs: !1,
1156
1156
  __name: "DropdownMenuContent",
1157
1157
  props: {
@@ -1160,152 +1160,192 @@ const ya = { class: "relative inline-block" }, ha = /* @__PURE__ */ z({
1160
1160
  sideOffset: { default: 4 }
1161
1161
  },
1162
1162
  setup(e) {
1163
- const n = e, t = Z(), { idDelMenu: a, idDeLaEtiqueta: o } = t, s = x(() => t.disparador.value), u = x(() => t.abierto.value), r = w(null), c = w({ top: 0, left: 0 });
1164
- function b() {
1165
- if (!s.value || !r.value) return;
1166
- const m = s.value.getBoundingClientRect(), k = r.value.getBoundingClientRect();
1167
- let d = 0, v = 0;
1168
- switch (n.side) {
1163
+ const n = e, t = oe(), { idDelMenu: a, idDeLaEtiqueta: o } = t, s = x(() => t.disparador.value), c = x(() => t.abierto.value), u = $(null), d = $({
1164
+ top: 0,
1165
+ left: 0,
1166
+ techo: null
1167
+ }), v = {
1168
+ top: "bottom",
1169
+ bottom: "top",
1170
+ left: "right",
1171
+ right: "left"
1172
+ };
1173
+ function w(r, f) {
1174
+ const b = n.sideOffset + q;
1175
+ switch (r) {
1169
1176
  case "bottom":
1170
- d = m.bottom + n.sideOffset;
1171
- break;
1177
+ return window.innerHeight - f.bottom - b;
1172
1178
  case "top":
1173
- d = m.top - k.height - n.sideOffset;
1174
- break;
1175
- case "left":
1176
- v = m.left - k.width - n.sideOffset, d = m.top;
1177
- break;
1179
+ return f.top - b;
1178
1180
  case "right":
1179
- v = m.right + n.sideOffset, d = m.top;
1180
- break;
1181
+ return window.innerWidth - f.right - b;
1182
+ case "left":
1183
+ return f.left - b;
1181
1184
  }
1182
- switch (n.align) {
1183
- case "start":
1184
- (n.side === "bottom" || n.side === "top") && (v = m.left);
1185
+ }
1186
+ function I(r, f, b) {
1187
+ return b < f ? f : Math.min(Math.max(r, f), b);
1188
+ }
1189
+ function z() {
1190
+ if (!s.value || !u.value) return;
1191
+ const r = s.value.getBoundingClientRect(), f = u.value.scrollHeight, b = u.value.offsetWidth, D = n.side === "top" || n.side === "bottom", _ = D ? f : b;
1192
+ let H = n.side;
1193
+ const ee = w(H, r);
1194
+ ee < _ && w(v[H], r) > ee && (H = v[H]);
1195
+ let W = 0, R = 0, K = null;
1196
+ switch (H) {
1197
+ case "bottom": {
1198
+ W = r.bottom + n.sideOffset, K = Math.max(window.innerHeight - W - q, 0);
1185
1199
  break;
1186
- case "center":
1187
- (n.side === "bottom" || n.side === "top") && (v = m.left + m.width / 2 - k.width / 2);
1200
+ }
1201
+ case "top": {
1202
+ K = Math.max(w("top", r), 0), W = r.top - n.sideOffset - Math.min(f, K);
1188
1203
  break;
1189
- case "end":
1190
- (n.side === "bottom" || n.side === "top") && (v = m.right - k.width);
1204
+ }
1205
+ case "left":
1206
+ case "right": {
1207
+ R = H === "right" ? r.right + n.sideOffset : r.left - b - n.sideOffset;
1208
+ const te = window.innerHeight - 2 * q;
1209
+ W = I(r.top, q, window.innerHeight - Math.min(f, te) - q), K = Math.max(window.innerHeight - W - q, 0);
1191
1210
  break;
1211
+ }
1192
1212
  }
1193
- c.value = { top: d, left: v };
1213
+ if (D)
1214
+ switch (n.align) {
1215
+ case "start":
1216
+ R = r.left;
1217
+ break;
1218
+ case "center":
1219
+ R = r.left + r.width / 2 - b / 2;
1220
+ break;
1221
+ case "end":
1222
+ R = r.right - b;
1223
+ break;
1224
+ }
1225
+ R = I(R, q, window.innerWidth - b - q), d.value = { top: W, left: R, techo: K };
1194
1226
  }
1195
- function $() {
1196
- return r.value ? Array.from(r.value.querySelectorAll('[role="menuitem"]')) : [];
1227
+ function L() {
1228
+ return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
1197
1229
  }
1198
- function M(m) {
1199
- const k = $();
1200
- if (!k.length) return;
1201
- const d = k.length;
1202
- k[(m % d + d) % d]?.focus();
1230
+ function h(r) {
1231
+ const f = L();
1232
+ if (!f.length) return;
1233
+ const b = f.length;
1234
+ f[(r % b + b) % b]?.focus();
1203
1235
  }
1204
- function L() {
1205
- const m = document.activeElement;
1206
- return m instanceof HTMLElement ? $().indexOf(m) : -1;
1236
+ function k() {
1237
+ const r = document.activeElement;
1238
+ return r instanceof HTMLElement ? L().indexOf(r) : -1;
1207
1239
  }
1208
- function E(m) {
1209
- const k = L();
1210
- switch (m.key) {
1240
+ function P(r) {
1241
+ const f = k();
1242
+ switch (r.key) {
1211
1243
  case "ArrowDown":
1212
- m.preventDefault(), M(k + 1);
1244
+ r.preventDefault(), h(f + 1);
1213
1245
  break;
1214
1246
  case "ArrowUp":
1215
- m.preventDefault(), M(k <= 0 ? -1 : k - 1);
1247
+ r.preventDefault(), h(f <= 0 ? -1 : f - 1);
1216
1248
  break;
1217
1249
  case "Home":
1218
- m.preventDefault(), M(0);
1250
+ r.preventDefault(), h(0);
1219
1251
  break;
1220
1252
  case "End":
1221
- m.preventDefault(), M(-1);
1253
+ r.preventDefault(), h(-1);
1222
1254
  break;
1223
1255
  case "Escape":
1224
- m.preventDefault(), m.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
1256
+ r.preventDefault(), r.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
1225
1257
  break;
1226
1258
  case "Tab":
1227
- m.preventDefault(), t.cerrar({ devolverElFoco: !0 });
1259
+ r.preventDefault(), t.cerrar({ devolverElFoco: !0 });
1228
1260
  break;
1229
1261
  }
1230
1262
  }
1231
- K(u, async (m) => {
1232
- if (m)
1233
- switch (await ne(), requestAnimationFrame(() => {
1234
- b();
1263
+ X(c, async (r) => {
1264
+ if (r)
1265
+ switch (await ce(), requestAnimationFrame(() => {
1266
+ z();
1235
1267
  }), t.focoAlAbrir.value) {
1236
1268
  case "primero":
1237
- M(0);
1269
+ h(0);
1238
1270
  break;
1239
1271
  case "ultimo":
1240
- M(-1);
1272
+ h(-1);
1241
1273
  break;
1242
1274
  // Abierto con el ratón: el foco va al menú y no a un ítem —no hay
1243
1275
  // ninguno elegido todavía—, que es lo que deja andar las flechas y el
1244
1276
  // Escape sin haber tocado nada.
1245
1277
  default:
1246
- r.value?.focus();
1278
+ u.value?.focus();
1247
1279
  }
1248
1280
  });
1249
- function y() {
1250
- u.value && b();
1281
+ function F(r) {
1282
+ c.value && (r && u.value?.contains(r.target) || z());
1251
1283
  }
1252
- function h(m) {
1253
- const k = m.target, d = !!k.closest("[dropdown-content]"), v = !!s.value?.contains(k);
1254
- !d && !v && t.cerrar();
1284
+ function y(r) {
1285
+ const f = r.target, b = !!f.closest("[dropdown-content]"), D = !!s.value?.contains(f);
1286
+ !b && !D && t.cerrar();
1255
1287
  }
1256
- return W(() => {
1257
- document.addEventListener("click", h), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0);
1258
- }), G(() => {
1259
- document.removeEventListener("click", h), window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
1260
- }), (m, k) => (l(), q(ge, { to: "body" }, [
1261
- F(ye, {
1288
+ return Q(() => {
1289
+ document.addEventListener("click", y), window.addEventListener("resize", F), window.addEventListener("scroll", F, !0);
1290
+ }), J(() => {
1291
+ document.removeEventListener("click", y), window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
1292
+ }), (r, f) => (l(), G($e, { to: "body" }, [
1293
+ j(Ce, {
1262
1294
  "enter-active-class": "transition-all duration-150 ease-in-out",
1263
1295
  "leave-active-class": "transition-all duration-150 ease-in-out",
1264
1296
  "enter-from-class": "opacity-0 scale-95",
1265
1297
  "leave-to-class": "opacity-0 scale-95",
1266
- onEnter: k[1] || (k[1] = (d) => d.offsetHeight),
1267
- onLeave: k[2] || (k[2] = (d) => d.offsetHeight)
1298
+ onEnter: f[1] || (f[1] = (b) => b.offsetHeight),
1299
+ onLeave: f[2] || (f[2] = (b) => b.offsetHeight)
1268
1300
  }, {
1269
- default: R(() => [
1270
- me(C("div", J({
1301
+ default: U(() => [
1302
+ ye(C("div", ne({
1271
1303
  ref_key: "contenido",
1272
- ref: r
1273
- }, m.$attrs, {
1274
- id: P(a),
1304
+ ref: u
1305
+ }, r.$attrs, {
1306
+ id: V(a),
1275
1307
  role: "menu",
1276
1308
  tabindex: "-1",
1277
1309
  "aria-orientation": "vertical",
1278
- "aria-labelledby": P(o) ?? void 0,
1279
- inert: !u.value,
1280
- style: { position: "fixed", top: `${c.value.top}px`, left: `${c.value.left}px`, zIndex: 50 },
1310
+ "aria-labelledby": V(o) ?? void 0,
1311
+ inert: !c.value,
1312
+ style: {
1313
+ position: "fixed",
1314
+ top: `${d.value.top}px`,
1315
+ left: `${d.value.left}px`,
1316
+ maxHeight: d.value.techo === null ? void 0 : `${d.value.techo}px`,
1317
+ overflowY: "auto",
1318
+ overscrollBehavior: "contain",
1319
+ zIndex: 50
1320
+ },
1281
1321
  "dropdown-content": "",
1282
1322
  class: "min-w-30 rounded-corner border border-primary bg-ui-bg/80 shadow-lg focus:outline-none",
1283
- onClick: k[0] || (k[0] = (d) => d.stopPropagation()),
1284
- onKeydown: E
1323
+ onClick: f[0] || (f[0] = (b) => b.stopPropagation()),
1324
+ onKeydown: P
1285
1325
  }), [
1286
- C("div", ka, [
1287
- A(m.$slots, "default")
1326
+ C("div", wa, [
1327
+ B(r.$slots, "default")
1288
1328
  ])
1289
- ], 16, xa), [
1290
- [Ue, u.value]
1329
+ ], 16, ka), [
1330
+ [Ue, c.value]
1291
1331
  ])
1292
1332
  ]),
1293
1333
  _: 3
1294
1334
  })
1295
1335
  ]));
1296
1336
  }
1297
- }), $a = ["aria-disabled", "onKeydown"], Ca = /* @__PURE__ */ z({
1337
+ }), Ca = ["aria-disabled", "onKeydown"], za = /* @__PURE__ */ E({
1298
1338
  __name: "DropdownMenuItem",
1299
1339
  props: {
1300
1340
  disabled: { type: Boolean, default: !1 }
1301
1341
  },
1302
1342
  emits: ["select", "click"],
1303
1343
  setup(e, { emit: n }) {
1304
- const t = e, a = n, o = Z();
1305
- function s(u) {
1306
- t.disabled || (a("select"), a("click", u), o.cerrar({ devolverElFoco: !0 }));
1344
+ const t = e, a = n, o = oe();
1345
+ function s(c) {
1346
+ t.disabled || (a("select"), a("click", c), o.cerrar({ devolverElFoco: !0 }));
1307
1347
  }
1308
- return (u, r) => (l(), i("div", {
1348
+ return (c, u) => (l(), i("div", {
1309
1349
  role: "menuitem",
1310
1350
  tabindex: "0",
1311
1351
  "aria-disabled": e.disabled || void 0,
@@ -1318,53 +1358,53 @@ const ya = { class: "relative inline-block" }, ha = /* @__PURE__ */ z({
1318
1358
  ]),
1319
1359
  onClick: s,
1320
1360
  onKeydown: [
1321
- V(T(s, ["prevent"]), ["enter"]),
1322
- V(T(s, ["prevent"]), ["space"])
1361
+ O(A(s, ["prevent"]), ["enter"]),
1362
+ O(A(s, ["prevent"]), ["space"])
1323
1363
  ]
1324
1364
  }, [
1325
- A(u.$slots, "default")
1326
- ], 42, $a));
1365
+ B(c.$slots, "default")
1366
+ ], 42, Ca));
1327
1367
  }
1328
- }), za = /* @__PURE__ */ z({
1368
+ }), La = /* @__PURE__ */ E({
1329
1369
  __name: "DropdownMenuLabel",
1330
1370
  setup(e) {
1331
- const n = Z(), t = `${Le()}-titulo`;
1332
- return W(() => {
1371
+ const n = oe(), t = `${Se()}-titulo`;
1372
+ return Q(() => {
1333
1373
  n.ponerLaEtiqueta(t);
1334
- }), G(() => {
1374
+ }), J(() => {
1335
1375
  n.ponerLaEtiqueta(null);
1336
1376
  }), (a, o) => (l(), i("div", {
1337
1377
  id: t,
1338
1378
  role: "presentation",
1339
1379
  class: "px-3 py-2 text-sm font-semibold text-tx-main"
1340
1380
  }, [
1341
- A(a.$slots, "default")
1381
+ B(a.$slots, "default")
1342
1382
  ]));
1343
1383
  }
1344
- }), La = {
1384
+ }), Ea = {
1345
1385
  role: "separator",
1346
1386
  "aria-orientation": "horizontal",
1347
1387
  class: "bg-ui-bg/80 my-4 h-0.5"
1348
- }, Ea = /* @__PURE__ */ z({
1388
+ }, Da = /* @__PURE__ */ E({
1349
1389
  __name: "DropdownMenuSeparator",
1350
1390
  setup(e) {
1351
- return (n, t) => (l(), i("div", La));
1391
+ return (n, t) => (l(), i("div", Ea));
1352
1392
  }
1353
1393
  });
1354
- function Ee(e) {
1394
+ function Te(e) {
1355
1395
  const n = e.filter(
1356
- (a) => a.type !== Ge && !(a.type === Xe && typeof a.children == "string" && !a.children.trim())
1396
+ (a) => a.type !== Ye && !(a.type === Qe && typeof a.children == "string" && !a.children.trim())
1357
1397
  );
1358
1398
  if (n.length !== 1) return null;
1359
1399
  const t = n[0];
1360
- return t.type === U && Array.isArray(t.children) ? Ee(t.children) : t;
1400
+ return t.type === Y && Array.isArray(t.children) ? Te(t.children) : t;
1361
1401
  }
1362
- function Da(e) {
1402
+ function Ba(e) {
1363
1403
  if (e instanceof HTMLElement) return e;
1364
1404
  const n = e?.$el;
1365
1405
  return n instanceof HTMLElement ? n : null;
1366
1406
  }
1367
- const Ba = z({
1407
+ const Ma = E({
1368
1408
  name: "DropdownMenuTrigger",
1369
1409
  inheritAttrs: !1,
1370
1410
  props: {
@@ -1374,35 +1414,35 @@ const Ba = z({
1374
1414
  disabled: { type: Boolean, default: !1 }
1375
1415
  },
1376
1416
  setup(e, { slots: n, attrs: t }) {
1377
- const a = Z(), o = w(null);
1417
+ const a = oe(), o = $(null);
1378
1418
  function s() {
1379
- a.ponerElDisparador(Da(o.value));
1419
+ a.ponerElDisparador(Ba(o.value));
1380
1420
  }
1381
- function u() {
1421
+ function c() {
1382
1422
  e.disabled || (s(), a.alternar());
1383
1423
  }
1384
- function r(c) {
1424
+ function u(d) {
1385
1425
  if (!e.disabled)
1386
- switch (c.key) {
1426
+ switch (d.key) {
1387
1427
  case "Enter":
1388
1428
  case " ":
1389
- c.preventDefault(), s(), a.alternar("primero");
1429
+ d.preventDefault(), s(), a.alternar("primero");
1390
1430
  break;
1391
1431
  case "ArrowDown":
1392
- c.preventDefault(), s(), a.abrir("primero");
1432
+ d.preventDefault(), s(), a.abrir("primero");
1393
1433
  break;
1394
1434
  case "ArrowUp":
1395
- c.preventDefault(), s(), a.abrir("ultimo");
1435
+ d.preventDefault(), s(), a.abrir("ultimo");
1396
1436
  break;
1397
1437
  case "Escape":
1398
- a.abierto.value && (c.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
1438
+ a.abierto.value && (d.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
1399
1439
  break;
1400
1440
  }
1401
1441
  }
1402
1442
  return () => {
1403
- const c = {
1404
- ref: ($) => {
1405
- o.value = $, s();
1443
+ const d = {
1444
+ ref: (w) => {
1445
+ o.value = w, s();
1406
1446
  },
1407
1447
  "aria-haspopup": "menu",
1408
1448
  "aria-expanded": a.abierto.value ? "true" : "false",
@@ -1410,21 +1450,21 @@ const Ba = z({
1410
1450
  // a un elemento que el lector no expone —el menú cerrado está
1411
1451
  // `inert`— es una referencia rota.
1412
1452
  "aria-controls": a.abierto.value ? a.idDelMenu : void 0,
1413
- onClick: u,
1414
- onKeydown: r
1415
- }, b = n.default?.() ?? [];
1453
+ onClick: c,
1454
+ onKeydown: u
1455
+ }, v = n.default?.() ?? [];
1416
1456
  if (e.asChild) {
1417
- const $ = Ee(b);
1418
- if ($) return We($, { ...t, ...c });
1457
+ const w = Te(v);
1458
+ if (w) return Ke(w, { ...t, ...d });
1419
1459
  }
1420
- return Ke(
1460
+ return Ge(
1421
1461
  "div",
1422
- { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...c },
1423
- b
1462
+ { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...d },
1463
+ v
1424
1464
  );
1425
1465
  };
1426
1466
  }
1427
- }), Aa = ["for"], Ma = /* @__PURE__ */ z({
1467
+ }), Aa = ["for"], Sa = /* @__PURE__ */ E({
1428
1468
  __name: "FormGroup",
1429
1469
  props: {
1430
1470
  label: {},
@@ -1440,11 +1480,11 @@ const Ba = z({
1440
1480
  key: 0,
1441
1481
  for: e.htmlFor,
1442
1482
  class: p(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
1443
- }, I(e.label), 11, Aa)) : g("", !0),
1444
- A(n.$slots, "default", {}, void 0, !0)
1483
+ }, S(e.label), 11, Aa)) : g("", !0),
1484
+ B(n.$slots, "default", {}, void 0, !0)
1445
1485
  ], 2));
1446
1486
  }
1447
- }), Sa = /* @__PURE__ */ Q(Ma, [["__scopeId", "data-v-c0d9d9cb"]]), Ta = /* @__PURE__ */ z({
1487
+ }), Ta = /* @__PURE__ */ le(Sa, [["__scopeId", "data-v-c0d9d9cb"]]), Ia = /* @__PURE__ */ E({
1448
1488
  __name: "ListCard",
1449
1489
  props: {
1450
1490
  clickable: { type: Boolean, default: !1 },
@@ -1455,7 +1495,7 @@ const Ba = z({
1455
1495
  const t = e, a = n, o = () => {
1456
1496
  t.clickable && a("click");
1457
1497
  };
1458
- return (s, u) => (l(), i("div", {
1498
+ return (s, c) => (l(), i("div", {
1459
1499
  class: p([
1460
1500
  "flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
1461
1501
  {
@@ -1465,13 +1505,13 @@ const Ba = z({
1465
1505
  ]),
1466
1506
  onClick: o
1467
1507
  }, [
1468
- A(s.$slots, "default", {}, void 0, !0)
1508
+ B(s.$slots, "default", {}, void 0, !0)
1469
1509
  ], 2));
1470
1510
  }
1471
- }), Ia = /* @__PURE__ */ Q(Ta, [["__scopeId", "data-v-f86d47da"]]), Oa = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, ja = ["src", "alt", "title"], Va = {
1511
+ }), Oa = /* @__PURE__ */ le(Ia, [["__scopeId", "data-v-f86d47da"]]), Va = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, ja = ["src", "alt", "title"], Pa = {
1472
1512
  key: 1,
1473
1513
  class: "w-8 h-8 flex items-center justify-center"
1474
- }, Pa = ["src", "alt"], Fa = ["min", "max", "value"], Na = /* @__PURE__ */ z({
1514
+ }, Na = ["src", "alt"], Fa = ["min", "max", "value"], Ra = /* @__PURE__ */ E({
1475
1515
  __name: "SliderControl",
1476
1516
  props: {
1477
1517
  icon: {},
@@ -1488,18 +1528,18 @@ const Ba = z({
1488
1528
  setup(e, { emit: n }) {
1489
1529
  const t = e, a = n, o = x(() => {
1490
1530
  if (t.max <= t.min) return 0;
1491
- const c = t.max - t.min, b = t.modelValue - t.min;
1492
- return Math.round(b / c * 100);
1493
- }), s = x(() => t.getPercentageClass ? t.getPercentageClass(o.value) : ""), u = (c) => {
1494
- const b = c.target;
1495
- a("update:modelValue", Number(b.value));
1496
- }, r = () => {
1531
+ const d = t.max - t.min, v = t.modelValue - t.min;
1532
+ return Math.round(v / d * 100);
1533
+ }), s = x(() => t.getPercentageClass ? t.getPercentageClass(o.value) : ""), c = (d) => {
1534
+ const v = d.target;
1535
+ a("update:modelValue", Number(v.value));
1536
+ }, u = () => {
1497
1537
  a("buttonClick");
1498
1538
  };
1499
- return (c, b) => (l(), i("div", Oa, [
1539
+ return (d, v) => (l(), i("div", Va, [
1500
1540
  e.showButton ? (l(), i("button", {
1501
1541
  key: 0,
1502
- onClick: r,
1542
+ onClick: u,
1503
1543
  class: "w-8 h-8 flex items-center justify-center rounded-corner transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80 hover:scale-110 active:scale-95"
1504
1544
  }, [
1505
1545
  C("img", {
@@ -1508,27 +1548,27 @@ const Ba = z({
1508
1548
  title: e.tooltip,
1509
1549
  class: p(["w-6 h-6 transition-all duration-200", e.iconClass])
1510
1550
  }, null, 10, ja)
1511
- ])) : (l(), i("div", Va, [
1551
+ ])) : (l(), i("div", Pa, [
1512
1552
  C("img", {
1513
1553
  src: e.icon,
1514
1554
  alt: e.alt,
1515
1555
  class: "w-6 h-6 transition-all duration-200"
1516
- }, null, 8, Pa)
1556
+ }, null, 8, Na)
1517
1557
  ])),
1518
1558
  C("input", {
1519
1559
  type: "range",
1520
1560
  min: e.min,
1521
1561
  max: e.max,
1522
1562
  value: e.modelValue,
1523
- onInput: u,
1563
+ onInput: c,
1524
1564
  class: "flex-1 transition-all duration-200 hover:scale-105"
1525
1565
  }, null, 40, Fa),
1526
1566
  C("span", {
1527
1567
  class: p(["w-12 text-right transition-all duration-200 font-medium", s.value])
1528
- }, I(o.value) + "% ", 3)
1568
+ }, S(o.value) + "% ", 3)
1529
1569
  ]));
1530
1570
  }
1531
- }), Ra = ["disabled"], qa = /* @__PURE__ */ z({
1571
+ }), Ha = ["disabled"], Wa = /* @__PURE__ */ E({
1532
1572
  __name: "SwitchToggle",
1533
1573
  props: {
1534
1574
  isOn: { type: Boolean },
@@ -1543,7 +1583,7 @@ const Ba = z({
1543
1583
  const t = e, a = n, o = () => {
1544
1584
  a("toggle", !t.isOn);
1545
1585
  };
1546
- return (s, u) => (l(), i("button", {
1586
+ return (s, c) => (l(), i("button", {
1547
1587
  type: "button",
1548
1588
  onClick: o,
1549
1589
  disabled: e.disabled,
@@ -1562,9 +1602,9 @@ const Ba = z({
1562
1602
  e.isOn ? e.size === "small" ? "translate-x-6" : "translate-x-5" : "translate-x-1"
1563
1603
  ])
1564
1604
  }, null, 2)
1565
- ], 10, Ra));
1605
+ ], 10, Ha));
1566
1606
  }
1567
- }), Ha = ["disabled"], Ua = ["src", "alt", "title"], Wa = /* @__PURE__ */ z({
1607
+ }), qa = ["disabled"], Ua = ["src", "alt", "title"], Ka = /* @__PURE__ */ E({
1568
1608
  __name: "ToggleControl",
1569
1609
  props: {
1570
1610
  icon: {},
@@ -1601,12 +1641,12 @@ const Ba = z({
1601
1641
  ...e.iconClass
1602
1642
  }])
1603
1643
  }, null, 10, Ua)
1604
- ], 10, Ha));
1644
+ ], 10, qa));
1605
1645
  }
1606
- }), Ka = ["title"], Ga = ["src", "alt"], Xa = {
1646
+ }), Ga = ["title"], Ya = ["src", "alt"], Qa = {
1607
1647
  key: 0,
1608
1648
  class: "absolute bottom-1 right-1 bg-primary dark:bg-primary-dark text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
1609
- }, Ya = /* @__PURE__ */ z({
1649
+ }, Xa = /* @__PURE__ */ E({
1610
1650
  __name: "TrayIconButton",
1611
1651
  props: {
1612
1652
  icon: {},
@@ -1621,22 +1661,22 @@ const Ba = z({
1621
1661
  },
1622
1662
  emits: ["click"],
1623
1663
  setup(e, { emit: n }) {
1624
- const t = n, a = w(!1), o = () => {
1664
+ const t = n, a = $(!1), o = () => {
1625
1665
  t("click");
1626
1666
  };
1627
- return (s, u) => (l(), i("div", {
1667
+ return (s, c) => (l(), i("div", {
1628
1668
  class: p(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
1629
1669
  title: e.tooltip,
1630
1670
  onClick: o,
1631
- onMouseenter: u[0] || (u[0] = (r) => a.value = !0),
1632
- onMouseleave: u[1] || (u[1] = (r) => a.value = !1)
1671
+ onMouseenter: c[0] || (c[0] = (u) => a.value = !0),
1672
+ onMouseleave: c[1] || (c[1] = (u) => a.value = !1)
1633
1673
  }, [
1634
1674
  C("img", {
1635
1675
  src: e.icon,
1636
1676
  alt: e.alt,
1637
1677
  class: p(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
1638
- }, null, 10, Ga),
1639
- e.badge !== null && e.badge > 0 ? (l(), i("div", Xa, I(e.badge), 1)) : g("", !0),
1678
+ }, null, 10, Ya),
1679
+ e.badge !== null && e.badge > 0 ? (l(), i("div", Qa, S(e.badge), 1)) : g("", !0),
1640
1680
  e.showCustomTooltip && e.customTooltipText ? (l(), i("div", {
1641
1681
  key: 1,
1642
1682
  class: p(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
@@ -1646,38 +1686,38 @@ const Ba = z({
1646
1686
  "opacity-100 translate-y-0": a.value
1647
1687
  }
1648
1688
  ]])
1649
- }, I(e.customTooltipText), 3)) : g("", !0),
1650
- A(s.$slots, "default")
1651
- ], 42, Ka));
1689
+ }, S(e.customTooltipText), 3)) : g("", !0),
1690
+ B(s.$slots, "default")
1691
+ ], 42, Ga));
1652
1692
  }
1653
1693
  }), Ja = [
1654
1694
  yt,
1655
- xe,
1656
- he,
1657
- $t,
1695
+ Le,
1696
+ ze,
1697
+ Ct,
1658
1698
  N,
1659
1699
  jt,
1660
- $e,
1661
- we,
1662
- Xt,
1663
- Ce,
1664
- Zt,
1665
- oa,
1666
- ra,
1667
- ga,
1700
+ Be,
1701
+ De,
1702
+ Qt,
1703
+ Me,
1704
+ _t,
1705
+ ia,
1706
+ ua,
1668
1707
  ha,
1669
- wa,
1670
- Ca,
1708
+ xa,
1709
+ $a,
1671
1710
  za,
1672
- Ea,
1673
- Ba,
1674
- Sa,
1675
- Ia,
1676
- Na,
1677
- qa,
1711
+ La,
1712
+ Da,
1713
+ Ma,
1714
+ Ta,
1715
+ Oa,
1716
+ Ra,
1678
1717
  Wa,
1679
- Ya
1680
- ], tn = {
1718
+ Ka,
1719
+ Xa
1720
+ ], an = {
1681
1721
  install(e) {
1682
1722
  Ja.forEach((n) => {
1683
1723
  e.component(n.name, n);
@@ -1685,41 +1725,41 @@ const Ba = z({
1685
1725
  }
1686
1726
  };
1687
1727
  export {
1688
- oa as ActionButton,
1689
- $e as AppBar,
1690
- Zt as BarSearch,
1691
- ze as CLAVE_DEL_MENU,
1692
- le as CLAVE_DE_LA_BARRA,
1693
- ra as ConfigSection,
1694
- ga as DeviceCard,
1695
- ha as DropdownMenu,
1696
- wa as DropdownMenuContent,
1697
- Ca as DropdownMenuItem,
1698
- za as DropdownMenuLabel,
1699
- Ea as DropdownMenuSeparator,
1700
- Ba as DropdownMenuTrigger,
1701
- Sa as FormGroup,
1702
- oe as LOS_TRES_CONTROLES,
1703
- Ia as ListCard,
1704
- Ct as POSICIONES,
1705
- $t as SelectField,
1728
+ ia as ActionButton,
1729
+ Be as AppBar,
1730
+ _t as BarSearch,
1731
+ Ae as CLAVE_DEL_MENU,
1732
+ de as CLAVE_DE_LA_BARRA,
1733
+ ua as ConfigSection,
1734
+ ha as DeviceCard,
1735
+ xa as DropdownMenu,
1736
+ $a as DropdownMenuContent,
1737
+ za as DropdownMenuItem,
1738
+ La as DropdownMenuLabel,
1739
+ Da as DropdownMenuSeparator,
1740
+ Ma as DropdownMenuTrigger,
1741
+ Ta as FormGroup,
1742
+ fe as LOS_TRES_CONTROLES,
1743
+ Oa as ListCard,
1744
+ zt as POSICIONES,
1745
+ Ct as SelectField,
1706
1746
  yt as SideBar,
1707
- xe as SideButton,
1708
- he as SideGroup,
1709
- Na as SliderControl,
1710
- qa as SwitchToggle,
1711
- Xt as TabBar,
1712
- Ce as TabItem,
1747
+ Le as SideButton,
1748
+ ze as SideGroup,
1749
+ Ra as SliderControl,
1750
+ Wa as SwitchToggle,
1751
+ Qt as TabBar,
1752
+ Me as TabItem,
1713
1753
  N as ThemeIcon,
1714
- Wa as ToggleControl,
1715
- Ya as TrayIconButton,
1716
- we as WindowControls,
1754
+ Ka as ToggleControl,
1755
+ Xa as TrayIconButton,
1756
+ De as WindowControls,
1717
1757
  jt as WindowFrame,
1718
- tn as default,
1719
- zt as esPosicion,
1720
- te as orientacionDe,
1721
- Dt as posicionDe,
1722
- Z as usarElMenu,
1723
- X as usarLaBarra,
1724
- Bt as usarLaPosicionDeLaBarra
1758
+ an as default,
1759
+ Lt as esPosicion,
1760
+ re as orientacionDe,
1761
+ Bt as posicionDe,
1762
+ oe as usarElMenu,
1763
+ Z as usarLaBarra,
1764
+ Mt as usarLaPosicionDeLaBarra
1725
1765
  };