@oiij/chrome-tabs 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,79 +1,79 @@
1
- import { inject as Le, onBeforeMount as ze, onMounted as xe, nextTick as $e, watch as O, getCurrentScope as je, onScopeDispose as Te, getCurrentInstance as ke, toValue as j, computed as S, shallowRef as Q, unref as p, ref as Pe, createElementBlock as A, openBlock as I, createElementVNode as $, createStaticVNode as Fe, defineComponent as we, h as re, normalizeClass as C, createCommentVNode as X, normalizeStyle as _, createBlock as ee, resolveDynamicComponent as ie, withModifiers as Oe, createVNode as K, renderSlot as se, TransitionGroup as Ve, withCtx as De, Fragment as He, renderList as We, mergeProps as Ke } from "vue";
1
+ import { inject as Le, onBeforeMount as ze, onMounted as xe, nextTick as $e, watch as P, getCurrentScope as je, onScopeDispose as Te, getCurrentInstance as ke, toValue as L, computed as M, shallowRef as Q, unref as x, ref as Pe, createElementBlock as A, openBlock as I, createElementVNode as k, createStaticVNode as Fe, defineComponent as we, h as re, normalizeClass as C, createCommentVNode as X, normalizeStyle as _, createBlock as ee, resolveDynamicComponent as ie, withModifiers as Oe, createVNode as D, renderSlot as se, TransitionGroup as Ve, withCtx as He, Fragment as We, renderList as De, mergeProps as Ke } from "vue";
2
2
  function qe(e) {
3
3
  let t = ".", n = "__", o = "--", r;
4
4
  if (e) {
5
- let l = e.blockPrefix;
6
- l && (t = l), l = e.elementPrefix, l && (n = l), l = e.modifierPrefix, l && (o = l);
5
+ let a = e.blockPrefix;
6
+ a && (t = a), a = e.elementPrefix, a && (n = a), a = e.modifierPrefix, a && (o = a);
7
7
  }
8
8
  const i = {
9
- install(l) {
10
- r = l.c;
11
- const h = l.context;
12
- h.bem = {}, h.bem.b = null, h.bem.els = null;
9
+ install(a) {
10
+ r = a.c;
11
+ const m = a.context;
12
+ m.bem = {}, m.bem.b = null, m.bem.els = null;
13
13
  }
14
14
  };
15
- function s(l) {
16
- let h, v;
15
+ function s(a) {
16
+ let m, v;
17
17
  return {
18
- before(m) {
19
- h = m.bem.b, v = m.bem.els, m.bem.els = null;
18
+ before(b) {
19
+ m = b.bem.b, v = b.bem.els, b.bem.els = null;
20
20
  },
21
- after(m) {
22
- m.bem.b = h, m.bem.els = v;
21
+ after(b) {
22
+ b.bem.b = m, b.bem.els = v;
23
23
  },
24
- $({ context: m, props: k }) {
25
- return l = typeof l == "string" ? l : l({ context: m, props: k }), m.bem.b = l, `${k?.bPrefix || t}${m.bem.b}`;
24
+ $({ context: b, props: N }) {
25
+ return a = typeof a == "string" ? a : a({ context: b, props: N }), b.bem.b = a, `${N?.bPrefix || t}${b.bem.b}`;
26
26
  }
27
27
  };
28
28
  }
29
- function u(l) {
30
- let h;
29
+ function u(a) {
30
+ let m;
31
31
  return {
32
32
  before(v) {
33
- h = v.bem.els;
33
+ m = v.bem.els;
34
34
  },
35
35
  after(v) {
36
- v.bem.els = h;
36
+ v.bem.els = m;
37
37
  },
38
- $({ context: v, props: m }) {
39
- return l = typeof l == "string" ? l : l({ context: v, props: m }), v.bem.els = l.split(",").map((k) => k.trim()), v.bem.els.map((k) => `${m?.bPrefix || t}${v.bem.b}${n}${k}`).join(", ");
38
+ $({ context: v, props: b }) {
39
+ return a = typeof a == "string" ? a : a({ context: v, props: b }), v.bem.els = a.split(",").map((N) => N.trim()), v.bem.els.map((N) => `${b?.bPrefix || t}${v.bem.b}${n}${N}`).join(", ");
40
40
  }
41
41
  };
42
42
  }
43
- function f(l) {
43
+ function f(a) {
44
44
  return {
45
- $({ context: h, props: v }) {
46
- l = typeof l == "string" ? l : l({ context: h, props: v });
47
- const m = l.split(",").map((L) => L.trim());
48
- function k(L) {
49
- return m.map((Be) => `&${v?.bPrefix || t}${h.bem.b}${L !== void 0 ? `${n}${L}` : ""}${o}${Be}`).join(", ");
45
+ $({ context: m, props: v }) {
46
+ a = typeof a == "string" ? a : a({ context: m, props: v });
47
+ const b = a.split(",").map((F) => F.trim());
48
+ function N(F) {
49
+ return b.map((Be) => `&${v?.bPrefix || t}${m.bem.b}${F !== void 0 ? `${n}${F}` : ""}${o}${Be}`).join(", ");
50
50
  }
51
- const B = h.bem.els;
52
- if (B !== null) {
53
- if (process.env.NODE_ENV !== "production" && B.length >= 2)
54
- throw Error(`[css-render/plugin-bem]: m(${l}) is invalid, using modifier inside multiple elements is not allowed`);
55
- return k(B[0]);
51
+ const G = m.bem.els;
52
+ if (G !== null) {
53
+ if (process.env.NODE_ENV !== "production" && G.length >= 2)
54
+ throw Error(`[css-render/plugin-bem]: m(${a}) is invalid, using modifier inside multiple elements is not allowed`);
55
+ return N(G[0]);
56
56
  } else
57
- return k();
57
+ return N();
58
58
  }
59
59
  };
60
60
  }
61
- function d(l) {
61
+ function d(a) {
62
62
  return {
63
- $({ context: h, props: v }) {
64
- l = typeof l == "string" ? l : l({ context: h, props: v });
65
- const m = h.bem.els;
66
- if (process.env.NODE_ENV !== "production" && m !== null && m.length >= 2)
67
- throw Error(`[css-render/plugin-bem]: notM(${l}) is invalid, using modifier inside multiple elements is not allowed`);
68
- return `&:not(${v?.bPrefix || t}${h.bem.b}${m !== null && m.length > 0 ? `${n}${m[0]}` : ""}${o}${l})`;
63
+ $({ context: m, props: v }) {
64
+ a = typeof a == "string" ? a : a({ context: m, props: v });
65
+ const b = m.bem.els;
66
+ if (process.env.NODE_ENV !== "production" && b !== null && b.length >= 2)
67
+ throw Error(`[css-render/plugin-bem]: notM(${a}) is invalid, using modifier inside multiple elements is not allowed`);
68
+ return `&:not(${v?.bPrefix || t}${m.bem.b}${b !== null && b.length > 0 ? `${n}${b[0]}` : ""}${o}${a})`;
69
69
  }
70
70
  };
71
71
  }
72
72
  return Object.assign(i, {
73
- cB: ((...l) => r(s(l[0]), l[1], l[2])),
74
- cE: ((...l) => r(u(l[0]), l[1], l[2])),
75
- cM: ((...l) => r(f(l[0]), l[1], l[2])),
76
- cNotM: ((...l) => r(d(l[0]), l[1], l[2]))
73
+ cB: ((...a) => r(s(a[0]), a[1], a[2])),
74
+ cE: ((...a) => r(u(a[0]), a[1], a[2])),
75
+ cM: ((...a) => r(f(a[0]), a[1], a[2])),
76
+ cNotM: ((...a) => r(d(a[0]), a[1], a[2]))
77
77
  }), i;
78
78
  }
79
79
  function Ge(e) {
@@ -145,7 +145,7 @@ function Qe(e) {
145
145
  const t = document.createElement("style");
146
146
  return t.setAttribute("cssr-id", e), t;
147
147
  }
148
- function V(e) {
148
+ function O(e) {
149
149
  return e ? /^\s*@(s|m)/.test(e) : !1;
150
150
  }
151
151
  const Xe = /[A-Z]/g;
@@ -207,21 +207,21 @@ function Ee(e, t, n, o, r) {
207
207
  const i = e.$;
208
208
  let s = "";
209
209
  if (!i || typeof i == "string")
210
- V(i) ? s = i : t.push(i);
210
+ O(i) ? s = i : t.push(i);
211
211
  else if (typeof i == "function") {
212
212
  const d = i({
213
213
  context: o.context,
214
214
  props: r
215
215
  });
216
- V(d) ? s = d : t.push(d);
216
+ O(d) ? s = d : t.push(d);
217
217
  } else if (i.before && i.before(o.context), !i.$ || typeof i.$ == "string")
218
- V(i.$) ? s = i.$ : t.push(i.$);
218
+ O(i.$) ? s = i.$ : t.push(i.$);
219
219
  else if (i.$) {
220
220
  const d = i.$({
221
221
  context: o.context,
222
222
  props: r
223
223
  });
224
- V(d) ? s = d : t.push(d);
224
+ O(d) ? s = d : t.push(d);
225
225
  }
226
226
  const u = Je(t), f = le(u, e.props, o, r);
227
227
  s ? n.push(`${s} {`) : f.length && n.push(f), e.children && te(e.children, {
@@ -229,8 +229,8 @@ function Ee(e, t, n, o, r) {
229
229
  props: r
230
230
  }, (d) => {
231
231
  if (typeof d == "string") {
232
- const a = le(u, { raw: d }, o, r);
233
- n.push(a);
232
+ const c = le(u, { raw: d }, o, r);
233
+ n.push(c);
234
234
  } else
235
235
  Ee(d, t, n, o, r);
236
236
  }), t.pop(), s && n.push("}"), i && i.after && i.after(o.context);
@@ -280,18 +280,18 @@ function rt(e, t, n, o, r, i, s, u, f) {
280
280
  return;
281
281
  }
282
282
  u === void 0 && (u = document.head);
283
- const a = ne(n, u);
284
- if (a !== null && !i)
285
- return a;
286
- const c = a ?? Qe(n);
287
- if (d === void 0 && (d = t.render(o)), c.textContent = d, a !== null)
288
- return a;
283
+ const c = ne(n, u);
284
+ if (c !== null && !i)
285
+ return c;
286
+ const l = c ?? Qe(n);
287
+ if (d === void 0 && (d = t.render(o)), l.textContent = d, c !== null)
288
+ return c;
289
289
  if (s) {
290
- const b = u.querySelector(`meta[name="${s}"]`);
291
- if (b)
292
- return u.insertBefore(c, b), ae(t.els, c), c;
290
+ const h = u.querySelector(`meta[name="${s}"]`);
291
+ if (h)
292
+ return u.insertBefore(l, h), ae(t.els, l), l;
293
293
  }
294
- return r ? u.insertBefore(c, u.querySelector("style, link")) : u.appendChild(c), ae(t.els, c), c;
294
+ return r ? u.insertBefore(l, u.querySelector("style, link")) : u.appendChild(l), ae(t.els, l), l;
295
295
  }
296
296
  function it(e) {
297
297
  return tt(this, this.instance, e);
@@ -304,7 +304,7 @@ function ut(e = {}) {
304
304
  const { id: t, parent: n } = e;
305
305
  ot(this.instance, this, t, n);
306
306
  }
307
- const D = function(e, t, n, o) {
307
+ const V = function(e, t, n, o) {
308
308
  return {
309
309
  instance: e,
310
310
  $: t,
@@ -316,7 +316,7 @@ const D = function(e, t, n, o) {
316
316
  unmount: ut
317
317
  };
318
318
  }, lt = function(e, t, n, o) {
319
- return Array.isArray(t) ? D(e, { $: null }, null, t) : Array.isArray(n) ? D(e, t, null, n) : Array.isArray(o) ? D(e, t, n, o) : D(e, t, n, null);
319
+ return Array.isArray(t) ? V(e, { $: null }, null, t) : Array.isArray(n) ? V(e, t, null, n) : Array.isArray(o) ? V(e, t, n, o) : V(e, t, n, null);
320
320
  };
321
321
  function at(e = {}) {
322
322
  const t = {
@@ -399,17 +399,17 @@ function $t(e, t = {}) {
399
399
  };
400
400
  let s;
401
401
  return (f) => {
402
- const d = j(e), a = j(t.maxWait);
403
- return n && i(n), d <= 0 || a !== void 0 && a <= 0 ? (o && (i(o), o = void 0), Promise.resolve(f())) : new Promise((c, b) => {
404
- r = t.rejectOnCancel ? b : c, s = f, a && !o && (o = setTimeout(() => {
405
- n && i(n), o = void 0, c(s());
406
- }, a)), n = setTimeout(() => {
407
- o && i(o), o = void 0, c(f());
402
+ const d = L(e), c = L(t.maxWait);
403
+ return n && i(n), d <= 0 || c !== void 0 && c <= 0 ? (o && (i(o), o = void 0), Promise.resolve(f())) : new Promise((l, h) => {
404
+ r = t.rejectOnCancel ? h : l, s = f, c && !o && (o = setTimeout(() => {
405
+ n && i(n), o = void 0, l(s());
406
+ }, c)), n = setTimeout(() => {
407
+ o && i(o), o = void 0, l(f());
408
408
  }, d);
409
409
  });
410
410
  };
411
411
  }
412
- function q(e) {
412
+ function K(e) {
413
413
  return Array.isArray(e) ? e : [e];
414
414
  }
415
415
  function kt(e) {
@@ -426,7 +426,7 @@ function Ct(e, t = !0, n) {
426
426
  kt() ? xe(e, n) : t ? e() : $e(e);
427
427
  }
428
428
  function It(e, t, n) {
429
- return O(
429
+ return P(
430
430
  e,
431
431
  t,
432
432
  {
@@ -436,36 +436,36 @@ function It(e, t, n) {
436
436
  );
437
437
  }
438
438
  const oe = pt ? window : void 0;
439
- function z(e) {
439
+ function B(e) {
440
440
  var t;
441
- const n = j(e);
441
+ const n = L(e);
442
442
  return (t = n?.$el) != null ? t : n;
443
443
  }
444
444
  function Et(...e) {
445
445
  const t = [], n = () => {
446
446
  t.forEach((u) => u()), t.length = 0;
447
- }, o = (u, f, d, a) => (u.addEventListener(f, d, a), () => u.removeEventListener(f, d, a)), r = S(() => {
448
- const u = q(j(e[0])).filter((f) => f != null);
447
+ }, o = (u, f, d, c) => (u.addEventListener(f, d, c), () => u.removeEventListener(f, d, c)), r = M(() => {
448
+ const u = K(L(e[0])).filter((f) => f != null);
449
449
  return u.every((f) => typeof f != "string") ? u : void 0;
450
450
  }), i = It(
451
451
  () => {
452
452
  var u, f;
453
453
  return [
454
- (f = (u = r.value) == null ? void 0 : u.map((d) => z(d))) != null ? f : [oe].filter((d) => d != null),
455
- q(j(r.value ? e[1] : e[0])),
456
- q(p(r.value ? e[2] : e[1])),
454
+ (f = (u = r.value) == null ? void 0 : u.map((d) => B(d))) != null ? f : [oe].filter((d) => d != null),
455
+ K(L(r.value ? e[1] : e[0])),
456
+ K(x(r.value ? e[2] : e[1])),
457
457
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
458
- j(r.value ? e[3] : e[2])
458
+ L(r.value ? e[3] : e[2])
459
459
  ];
460
460
  },
461
- ([u, f, d, a]) => {
461
+ ([u, f, d, c]) => {
462
462
  if (n(), !u?.length || !f?.length || !d?.length)
463
463
  return;
464
- const c = yt(a) ? { ...a } : a;
464
+ const l = yt(c) ? { ...c } : c;
465
465
  t.push(
466
466
  ...u.flatMap(
467
- (b) => f.flatMap(
468
- (M) => d.map((l) => o(b, M, l, c))
467
+ (h) => f.flatMap(
468
+ ($) => d.map((a) => o(h, $, a, l))
469
469
  )
470
470
  )
471
471
  );
@@ -486,101 +486,101 @@ function St() {
486
486
  // @__NO_SIDE_EFFECTS__
487
487
  function Nt(e) {
488
488
  const t = /* @__PURE__ */ St();
489
- return S(() => (t.value, !!e()));
489
+ return M(() => (t.value, !!e()));
490
490
  }
491
491
  function Mt(e, t, n = {}) {
492
492
  const { window: o = oe, ...r } = n;
493
493
  let i;
494
494
  const s = /* @__PURE__ */ Nt(() => o && "ResizeObserver" in o), u = () => {
495
495
  i && (i.disconnect(), i = void 0);
496
- }, f = S(() => {
497
- const c = j(e);
498
- return Array.isArray(c) ? c.map((b) => z(b)) : [z(c)];
499
- }), d = O(
496
+ }, f = M(() => {
497
+ const l = L(e);
498
+ return Array.isArray(l) ? l.map((h) => B(h)) : [B(l)];
499
+ }), d = P(
500
500
  f,
501
- (c) => {
501
+ (l) => {
502
502
  if (u(), s.value && o) {
503
503
  i = new ResizeObserver(t);
504
- for (const b of c)
505
- b && i.observe(b, r);
504
+ for (const h of l)
505
+ h && i.observe(h, r);
506
506
  }
507
507
  },
508
508
  { immediate: !0, flush: "post" }
509
- ), a = () => {
509
+ ), c = () => {
510
510
  u(), d();
511
511
  };
512
- return Se(a), {
512
+ return Se(c), {
513
513
  isSupported: s,
514
- stop: a
514
+ stop: c
515
515
  };
516
516
  }
517
517
  function At(e, t = { width: 0, height: 0 }, n = {}) {
518
- const { window: o = oe, box: r = "content-box" } = n, i = S(() => {
519
- var c, b;
520
- return (b = (c = z(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : b.includes("svg");
518
+ const { window: o = oe, box: r = "content-box" } = n, i = M(() => {
519
+ var l, h;
520
+ return (h = (l = B(e)) == null ? void 0 : l.namespaceURI) == null ? void 0 : h.includes("svg");
521
521
  }), s = Q(t.width), u = Q(t.height), { stop: f } = Mt(
522
522
  e,
523
- ([c]) => {
524
- const b = r === "border-box" ? c.borderBoxSize : r === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
523
+ ([l]) => {
524
+ const h = r === "border-box" ? l.borderBoxSize : r === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
525
525
  if (o && i.value) {
526
- const M = z(e);
527
- if (M) {
528
- const l = M.getBoundingClientRect();
529
- s.value = l.width, u.value = l.height;
526
+ const $ = B(e);
527
+ if ($) {
528
+ const a = $.getBoundingClientRect();
529
+ s.value = a.width, u.value = a.height;
530
530
  }
531
- } else if (b) {
532
- const M = q(b);
533
- s.value = M.reduce((l, { inlineSize: h }) => l + h, 0), u.value = M.reduce((l, { blockSize: h }) => l + h, 0);
531
+ } else if (h) {
532
+ const $ = K(h);
533
+ s.value = $.reduce((a, { inlineSize: m }) => a + m, 0), u.value = $.reduce((a, { blockSize: m }) => a + m, 0);
534
534
  } else
535
- s.value = c.contentRect.width, u.value = c.contentRect.height;
535
+ s.value = l.contentRect.width, u.value = l.contentRect.height;
536
536
  },
537
537
  n
538
538
  );
539
539
  Ct(() => {
540
- const c = z(e);
541
- c && (s.value = "offsetWidth" in c ? c.offsetWidth : t.width, u.value = "offsetHeight" in c ? c.offsetHeight : t.height);
540
+ const l = B(e);
541
+ l && (s.value = "offsetWidth" in l ? l.offsetWidth : t.width, u.value = "offsetHeight" in l ? l.offsetHeight : t.height);
542
542
  });
543
- const d = O(
544
- () => z(e),
545
- (c) => {
546
- s.value = c ? t.width : 0, u.value = c ? t.height : 0;
543
+ const d = P(
544
+ () => B(e),
545
+ (l) => {
546
+ s.value = l ? t.width : 0, u.value = l ? t.height : 0;
547
547
  }
548
548
  );
549
- function a() {
549
+ function c() {
550
550
  f(), d();
551
551
  }
552
552
  return {
553
553
  width: s,
554
554
  height: u,
555
- stop: a
555
+ stop: c
556
556
  };
557
557
  }
558
558
  function Rt(e) {
559
559
  const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = Pe(), { width: i, height: s } = At(r);
560
- async function u(a) {
560
+ async function u(c) {
561
561
  await $e();
562
- const c = r.value?.querySelector(t);
563
- c && c.scrollIntoView({
562
+ const l = r.value?.querySelector(t);
563
+ l && l.scrollIntoView({
564
564
  behavior: "smooth",
565
565
  block: "nearest",
566
566
  inline: "nearest",
567
- ...a
567
+ ...c
568
568
  });
569
569
  }
570
- function f(a) {
570
+ function f(c) {
571
571
  if (!n) return;
572
- a.preventDefault();
573
- const { deltaY: c } = a;
572
+ c.preventDefault();
573
+ const { deltaY: l } = c;
574
574
  switch (o) {
575
575
  case "vertical":
576
576
  r.value?.scrollBy({
577
- top: c > 0 ? s.value : -s.value,
577
+ top: l > 0 ? s.value : -s.value,
578
578
  behavior: "smooth"
579
579
  });
580
580
  break;
581
581
  case "horizontal":
582
582
  r.value?.scrollBy({
583
- left: c > 0 ? i.value : -i.value,
583
+ left: l > 0 ? i.value : -i.value,
584
584
  behavior: "smooth"
585
585
  });
586
586
  break;
@@ -588,7 +588,7 @@ function Rt(e) {
588
588
  }
589
589
  Et(r, "wheel", f);
590
590
  const d = /* @__PURE__ */ wt(u, 500);
591
- return O([i, s], () => {
591
+ return P([i, s], () => {
592
592
  d();
593
593
  }), {
594
594
  scrollRef: r,
@@ -597,16 +597,16 @@ function Rt(e) {
597
597
  }
598
598
  var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
599
599
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
600
- }, x = function(e, t, n) {
600
+ }, y = function(e, t, n) {
601
601
  return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0;
602
- }, N = function(e, t, n) {
602
+ }, S = function(e, t, n) {
603
603
  return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
604
604
  }, Ne = function(e) {
605
605
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
606
606
  }, de = function(e) {
607
- return { r: N(e.r, 0, 255), g: N(e.g, 0, 255), b: N(e.b, 0, 255), a: N(e.a) };
607
+ return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
608
608
  }, Z = function(e) {
609
- return { r: x(e.r), g: x(e.g), b: x(e.b), a: x(e.a, 3) };
609
+ return { r: y(e.r), g: y(e.g), b: y(e.b), a: y(e.a, 3) };
610
610
  }, Lt = /^#([0-9a-f]{3,8})$/i, H = function(e) {
611
611
  var t = e.toString(16);
612
612
  return t.length < 2 ? "0" + t : t;
@@ -619,18 +619,18 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
619
619
  var i = Math.floor(t), s = o * (1 - n), u = o * (1 - (t - i) * n), f = o * (1 - (1 - t + i) * n), d = i % 6;
620
620
  return { r: 255 * [o, u, s, s, f, o][d], g: 255 * [f, o, o, u, s, s][d], b: 255 * [s, s, f, o, o, u][d], a: r };
621
621
  }, fe = function(e) {
622
- return { h: Ne(e.h), s: N(e.s, 0, 100), l: N(e.l, 0, 100), a: N(e.a) };
622
+ return { h: Ne(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
623
623
  }, he = function(e) {
624
- return { h: x(e.h), s: x(e.s), l: x(e.l), a: x(e.a, 3) };
624
+ return { h: y(e.h), s: y(e.s), l: y(e.l), a: y(e.a, 3) };
625
625
  }, me = function(e) {
626
626
  return Ae((n = (t = e).s, { h: t.h, s: (n *= ((o = t.l) < 50 ? o : 100 - o) / 100) > 0 ? 2 * n / (o + n) * 100 : 0, v: o + n, a: t.a }));
627
627
  var t, n, o;
628
- }, F = function(e) {
628
+ }, T = function(e) {
629
629
  return { h: (t = Me(e)).h, s: (r = (200 - (n = t.s)) * (o = t.v) / 100) > 0 && r < 200 ? n * o / 100 / (r <= 100 ? r : 200 - r) * 100 : 0, l: r / 2, a: t.a };
630
630
  var t, n, o, r;
631
631
  }, zt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, jt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Tt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Pt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ve = { string: [[function(e) {
632
632
  var t = Lt.exec(e);
633
- return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? x(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? x(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
633
+ return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? y(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? y(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
634
634
  }, "hex"], [function(e) {
635
635
  var t = Tt.exec(e) || Pt.exec(e);
636
636
  return t ? t[2] !== t[4] || t[4] !== t[6] ? null : de({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
@@ -651,7 +651,7 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
651
651
  var t = e.h, n = e.s, o = e.v, r = e.a, i = r === void 0 ? 1 : r;
652
652
  if (!R(t) || !R(n) || !R(o)) return null;
653
653
  var s = (function(u) {
654
- return { h: Ne(u.h), s: N(u.s, 0, 100), v: N(u.v, 0, 100), a: N(u.a) };
654
+ return { h: Ne(u.h), s: S(u.s, 0, 100), v: S(u.v, 0, 100), a: S(u.a) };
655
655
  })({ h: Number(t), s: Number(n), v: Number(o), a: Number(i) });
656
656
  return Ae(s);
657
657
  }, "hsv"]] }, be = function(e, t) {
@@ -663,13 +663,13 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
663
663
  }, Ft = function(e) {
664
664
  return typeof e == "string" ? be(e.trim(), ve.string) : typeof e == "object" && e !== null ? be(e, ve.object) : [null, void 0];
665
665
  }, U = function(e, t) {
666
- var n = F(e);
667
- return { h: n.h, s: N(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
666
+ var n = T(e);
667
+ return { h: n.h, s: S(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
668
668
  }, Y = function(e) {
669
669
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
670
670
  }, pe = function(e, t) {
671
- var n = F(e);
672
- return { h: n.h, s: n.s, l: N(n.l + 100 * t, 0, 100), a: n.a };
671
+ var n = T(e);
672
+ return { h: n.h, s: n.s, l: S(n.l + 100 * t, 0, 100), a: n.a };
673
673
  }, ge = (function() {
674
674
  function e(t) {
675
675
  this.parsed = Ft(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
@@ -677,13 +677,13 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
677
677
  return e.prototype.isValid = function() {
678
678
  return this.parsed !== null;
679
679
  }, e.prototype.brightness = function() {
680
- return x(Y(this.rgba), 2);
680
+ return y(Y(this.rgba), 2);
681
681
  }, e.prototype.isDark = function() {
682
682
  return Y(this.rgba) < 0.5;
683
683
  }, e.prototype.isLight = function() {
684
684
  return Y(this.rgba) >= 0.5;
685
685
  }, e.prototype.toHex = function() {
686
- return t = Z(this.rgba), n = t.r, o = t.g, r = t.b, s = (i = t.a) < 1 ? H(x(255 * i)) : "", "#" + H(n) + H(o) + H(r) + s;
686
+ return t = Z(this.rgba), n = t.r, o = t.g, r = t.b, s = (i = t.a) < 1 ? H(y(255 * i)) : "", "#" + H(n) + H(o) + H(r) + s;
687
687
  var t, n, o, r, i, s;
688
688
  }, e.prototype.toRgb = function() {
689
689
  return Z(this.rgba);
@@ -691,12 +691,12 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
691
691
  return t = Z(this.rgba), n = t.r, o = t.g, r = t.b, (i = t.a) < 1 ? "rgba(" + n + ", " + o + ", " + r + ", " + i + ")" : "rgb(" + n + ", " + o + ", " + r + ")";
692
692
  var t, n, o, r, i;
693
693
  }, e.prototype.toHsl = function() {
694
- return he(F(this.rgba));
694
+ return he(T(this.rgba));
695
695
  }, e.prototype.toHslString = function() {
696
- return t = he(F(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
696
+ return t = he(T(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
697
697
  var t, n, o, r, i;
698
698
  }, e.prototype.toHsv = function() {
699
- return t = Me(this.rgba), { h: x(t.h), s: x(t.s), v: x(t.v), a: x(t.a, 3) };
699
+ return t = Me(this.rgba), { h: y(t.h), s: y(t.s), v: y(t.v), a: y(t.a, 3) };
700
700
  var t;
701
701
  }, e.prototype.invert = function() {
702
702
  return E({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
@@ -714,20 +714,20 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
714
714
  }, e.prototype.rotate = function(t) {
715
715
  return t === void 0 && (t = 15), this.hue(this.hue() + t);
716
716
  }, e.prototype.alpha = function(t) {
717
- return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : x(this.rgba.a, 3);
717
+ return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : y(this.rgba.a, 3);
718
718
  var n;
719
719
  }, e.prototype.hue = function(t) {
720
- var n = F(this.rgba);
721
- return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) : x(n.h);
720
+ var n = T(this.rgba);
721
+ return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) : y(n.h);
722
722
  }, e.prototype.isEqual = function(t) {
723
723
  return this.toHex() === E(t).toHex();
724
724
  }, e;
725
725
  })(), E = function(e) {
726
726
  return e instanceof ge ? e : new ge(e);
727
727
  };
728
- const { cssr: Ot, plugin: Vt, namespace: Re } = ct(), { c: g, cB: W, cE: y, cM: J, cNotM: ye } = { ...Ot, ...Vt }, P = `${Re}-chrome-tabs`, w = `${Re}-chrome-tabs-item`, T = "all .2s cubic-bezier(.4, 0, .2, 1)";
729
- function Dt() {
730
- return g([
728
+ const { cssr: Ot, plugin: Vt, namespace: Re } = ct(), { c: p, cB: W, cE: g, cM: J, cNotM: ye } = { ...Ot, ...Vt }, j = `${Re}-chrome-tabs`, w = `${Re}-chrome-tabs-item`, z = "all .2s cubic-bezier(.4, 0, .2, 1)";
729
+ function Ht() {
730
+ return p([
731
731
  W("chrome-tabs", {
732
732
  display: "flex",
733
733
  width: "100%",
@@ -737,18 +737,18 @@ function Dt() {
737
737
  backgroundColor: "var(--background-color)",
738
738
  color: "var(--background-color-dark)"
739
739
  }, [
740
- g("div", {
740
+ p("div", {
741
741
  boxSizing: "border-box"
742
742
  }),
743
- g(".group-move, .group-enter-active, .group-leave-active", {
744
- transition: T
743
+ p(".group-move, .group-enter-active, .group-leave-active", {
744
+ transition: z
745
745
  }),
746
- g(".group-enter-from, .group-leave-to", {
746
+ p(".group-enter-from, .group-leave-to", {
747
747
  opacity: 0
748
748
  }),
749
- g(".group-leave-active", {}),
750
- y("prefix", {}),
751
- y("icon", {
749
+ p(".group-leave-active", {}),
750
+ g("prefix", {}),
751
+ g("icon", {
752
752
  width: "28px",
753
753
  height: "28px",
754
754
  display: "flex",
@@ -757,18 +757,18 @@ function Dt() {
757
757
  padding: "5px",
758
758
  borderRadius: "10px",
759
759
  backgroundColor: "var(--active-background-color)",
760
- transition: T
760
+ transition: z
761
761
  }, [
762
- g("svg", {
762
+ p("svg", {
763
763
  width: "100%",
764
764
  height: "100%",
765
765
  fill: "currentColor"
766
766
  }),
767
- g("&:hover", {
767
+ p("&:hover", {
768
768
  backgroundColor: "var(--primary-color)"
769
769
  })
770
770
  ]),
771
- y("content", {
771
+ g("content", {
772
772
  flex: "1",
773
773
  height: "100%",
774
774
  minWidth: 0,
@@ -776,24 +776,24 @@ function Dt() {
776
776
  marginLeft: "-6px",
777
777
  padding: "0 10px"
778
778
  }),
779
- y("scroll", {
779
+ g("scroll", {
780
780
  position: "relative",
781
781
  display: "flex",
782
782
  alignItems: "center",
783
783
  height: "100%"
784
784
  }, [
785
- y("icon", {
785
+ g("icon", {
786
786
  marginLeft: "5px",
787
787
  borderRadius: "50%",
788
788
  backgroundColor: "transparent",
789
789
  flexShrink: 0
790
790
  }, [
791
- g("&:hover", {
791
+ p("&:hover", {
792
792
  backgroundColor: "var(--primary-color)"
793
793
  })
794
794
  ])
795
795
  ]),
796
- y("suffix", {})
796
+ g("suffix", {})
797
797
  ]),
798
798
  W("chrome-tabs-item", {
799
799
  position: "relative",
@@ -811,24 +811,24 @@ function Dt() {
811
811
  filter: "grayscale(0.5)"
812
812
  }),
813
813
  J("active", [
814
- y("background", {
814
+ g("background", {
815
815
  opacity: 1
816
816
  })
817
817
  ]),
818
818
  ye("active", [
819
- g("&:hover", {}, [
820
- y("content", {
819
+ p("&:hover", {}, [
820
+ g("content", {
821
821
  backgroundColor: "var(--primary-color)"
822
822
  })
823
823
  ])
824
824
  ]),
825
- g("&::first-child", {
825
+ p("&::first-child", {
826
826
  marginLeft: "0 !important"
827
827
  }),
828
- g("&::last-child", {
828
+ p("&::last-child", {
829
829
  marginRight: "0 !important"
830
830
  }),
831
- y("content", {
831
+ g("content", {
832
832
  position: "relative",
833
833
  zIndex: 1,
834
834
  height: "28px",
@@ -837,19 +837,19 @@ function Dt() {
837
837
  gap: "5px",
838
838
  borderRadius: "10px",
839
839
  padding: "0 10px",
840
- transition: T
840
+ transition: z
841
841
  }),
842
- y("slot", {}),
843
- y("icon", {
842
+ g("slot", {}),
843
+ g("icon", {
844
844
  lineHeight: 1
845
845
  }, [
846
- g("svg", {
846
+ p("svg", {
847
847
  width: "1.2em",
848
848
  height: "1.2em",
849
849
  fill: "currentColor"
850
850
  })
851
851
  ]),
852
- y("close", {
852
+ g("close", {
853
853
  width: "16px",
854
854
  height: "16px",
855
855
  padding: "2px",
@@ -857,18 +857,18 @@ function Dt() {
857
857
  alignItems: "center",
858
858
  justifyContent: "center",
859
859
  borderRadius: "50%",
860
- transition: T
860
+ transition: z
861
861
  }, [
862
- g("&:hover", {
862
+ p("&:hover", {
863
863
  backgroundColor: "rgba(0,0,0,0.1)"
864
864
  }),
865
- g("svg", {
865
+ p("svg", {
866
866
  width: "100%",
867
867
  height: "100%",
868
868
  fill: "currentColor"
869
869
  })
870
870
  ]),
871
- y("background", {
871
+ g("background", {
872
872
  position: "absolute",
873
873
  opacity: 0,
874
874
  left: 0,
@@ -878,27 +878,27 @@ function Dt() {
878
878
  width: "100%",
879
879
  display: "flex",
880
880
  alignItems: "flex-end",
881
- transition: T
881
+ transition: z
882
882
  }, [
883
- y("block", {
883
+ g("block", {
884
884
  height: "100%",
885
885
  flex: 1,
886
886
  minWidth: 0,
887
887
  borderRadius: "10px 10px 0 0",
888
888
  backgroundColor: "var(--active-background-color)"
889
889
  }),
890
- g("svg", {
890
+ p("svg", {
891
891
  fill: "var(--active-background-color)"
892
892
  })
893
893
  ]),
894
- y("line", {
894
+ g("line", {
895
895
  position: "absolute",
896
896
  bottom: "12px",
897
897
  right: "4px",
898
898
  height: "16px",
899
899
  width: "2px",
900
900
  borderRadius: "1px",
901
- transition: T,
901
+ transition: z,
902
902
  backgroundColor: "var(--primary-color)",
903
903
  opacity: 0
904
904
  }, [
@@ -907,32 +907,32 @@ function Dt() {
907
907
  })
908
908
  ])
909
909
  ]),
910
- g(".dark", [
910
+ p(".dark", [
911
911
  W("chrome-tabs", {
912
912
  backgroundColor: "var(--background-color-dark)",
913
913
  color: "var(--background-color)"
914
914
  }, [
915
- y("icon", {
915
+ g("icon", {
916
916
  backgroundColor: "var(--active-background-color-dark)"
917
917
  }, [
918
- g("&:hover", {
918
+ p("&:hover", {
919
919
  backgroundColor: "var(--primary-color-dark)"
920
920
  })
921
921
  ])
922
922
  ]),
923
923
  W("chrome-tabs-item", {}, [
924
924
  ye("active", [
925
- g("&:hover", {}, [
926
- y("content", {
925
+ p("&:hover", {}, [
926
+ g("content", {
927
927
  backgroundColor: "var(--primary-color-dark)"
928
928
  })
929
929
  ])
930
930
  ]),
931
- y("background", {}, [
932
- y("block", {
931
+ g("background", {}, [
932
+ g("block", {
933
933
  backgroundColor: "var(--active-background-color-dark)"
934
934
  }),
935
- g("svg", {
935
+ p("svg", {
936
936
  fill: "var(--active-background-color-dark)"
937
937
  })
938
938
  ])
@@ -940,28 +940,28 @@ function Dt() {
940
940
  ])
941
941
  ]);
942
942
  }
943
- const G = (e, t) => {
943
+ const q = (e, t) => {
944
944
  const n = e.__vccOpts || e;
945
945
  for (const [o, r] of t)
946
946
  n[o] = r;
947
947
  return n;
948
- }, Ht = {
949
- name: "RiAddLine"
950
948
  }, Wt = {
949
+ name: "RiAddLine"
950
+ }, Dt = {
951
951
  xmlns: "http://www.w3.org/2000/svg",
952
952
  width: "1em",
953
953
  height: "1em",
954
954
  viewBox: "0 0 24 24"
955
955
  };
956
956
  function Kt(e, t, n, o, r, i) {
957
- return I(), A("svg", Wt, t[0] || (t[0] = [
958
- $("path", {
957
+ return I(), A("svg", Dt, [...t[0] || (t[0] = [
958
+ k("path", {
959
959
  fill: "#757575",
960
960
  d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
961
961
  }, null, -1)
962
- ]));
962
+ ])]);
963
963
  }
964
- const qt = /* @__PURE__ */ G(Ht, [["render", Kt]]), Gt = {
964
+ const qt = /* @__PURE__ */ q(Wt, [["render", Kt]]), Gt = {
965
965
  name: "RiArrowDropDownLine"
966
966
  }, Zt = {
967
967
  xmlns: "http://www.w3.org/2000/svg",
@@ -970,14 +970,14 @@ const qt = /* @__PURE__ */ G(Ht, [["render", Kt]]), Gt = {
970
970
  viewBox: "0 0 24 24"
971
971
  };
972
972
  function Ut(e, t, n, o, r, i) {
973
- return I(), A("svg", Zt, t[0] || (t[0] = [
974
- $("path", {
973
+ return I(), A("svg", Zt, [...t[0] || (t[0] = [
974
+ k("path", {
975
975
  fill: "#757575",
976
976
  d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
977
977
  }, null, -1)
978
- ]));
978
+ ])]);
979
979
  }
980
- const Yt = /* @__PURE__ */ G(Gt, [["render", Ut]]), Jt = {
980
+ const Yt = /* @__PURE__ */ q(Gt, [["render", Ut]]), Jt = {
981
981
  name: "LineMdLoadingTwotoneLoop"
982
982
  }, Qt = {
983
983
  xmlns: "http://www.w3.org/2000/svg",
@@ -986,11 +986,11 @@ const Yt = /* @__PURE__ */ G(Gt, [["render", Ut]]), Jt = {
986
986
  viewBox: "0 0 24 24"
987
987
  };
988
988
  function Xt(e, t, n, o, r, i) {
989
- return I(), A("svg", Qt, t[0] || (t[0] = [
989
+ return I(), A("svg", Qt, [...t[0] || (t[0] = [
990
990
  Fe('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>', 1)
991
- ]));
991
+ ])]);
992
992
  }
993
- const _t = /* @__PURE__ */ G(Jt, [["render", Xt]]), en = {
993
+ const _t = /* @__PURE__ */ q(Jt, [["render", Xt]]), en = {
994
994
  name: "RiCloseLine"
995
995
  }, tn = {
996
996
  xmlns: "http://www.w3.org/2000/svg",
@@ -999,14 +999,14 @@ const _t = /* @__PURE__ */ G(Jt, [["render", Xt]]), en = {
999
999
  viewBox: "0 0 24 24"
1000
1000
  };
1001
1001
  function nn(e, t, n, o, r, i) {
1002
- return I(), A("svg", tn, t[0] || (t[0] = [
1003
- $("path", {
1002
+ return I(), A("svg", tn, [...t[0] || (t[0] = [
1003
+ k("path", {
1004
1004
  fill: "#757575",
1005
1005
  d: "m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"
1006
1006
  }, null, -1)
1007
- ]));
1007
+ ])]);
1008
1008
  }
1009
- const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1009
+ const on = /* @__PURE__ */ q(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1010
1010
  __name: "TabItem",
1011
1011
  props: {
1012
1012
  label: { type: [String, Function] },
@@ -1027,70 +1027,70 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1027
1027
  },
1028
1028
  emits: ["itemClick", "itemContextmenu", "itemClose"],
1029
1029
  setup(e, { emit: t }) {
1030
- const n = t, o = S(() => e.activeIndex !== e.itemIndex && e.activeIndex - 1 !== e.itemIndex), r = S(() => e.activeIndex === e.itemIndex), i = S(() => typeof e.label == "string" ? re("span", { class: `${w}__label` }, e.label) : e.label(e.itemKey, e.itemIndex)), s = S(() => e.loadingIcon?.(e.itemKey, e.itemIndex) ?? re(_t));
1031
- function u(a) {
1032
- a.stopPropagation(), n("itemClick", a), e.onClick?.(e.itemKey, e.itemIndex, a);
1030
+ const n = t, o = M(() => e.activeIndex !== e.itemIndex && e.activeIndex - 1 !== e.itemIndex), r = M(() => e.activeIndex === e.itemIndex), i = M(() => typeof e.label == "string" ? re("span", { class: `${w}__label` }, e.label) : e.label(e.itemKey, e.itemIndex)), s = M(() => e.loadingIcon?.(e.itemKey, e.itemIndex) ?? re(_t));
1031
+ function u(c) {
1032
+ c.stopPropagation(), n("itemClick", c), e.onClick?.(e.itemKey, e.itemIndex, c);
1033
1033
  }
1034
- function f(a) {
1035
- n("itemContextmenu", a), e.onContextMenu?.(e.itemKey, e.itemIndex, a);
1034
+ function f(c) {
1035
+ n("itemContextmenu", c), e.onContextMenu?.(e.itemKey, e.itemIndex, c);
1036
1036
  }
1037
- function d(a) {
1038
- n("itemClose"), e.onClose?.(e.itemKey, e.itemIndex, a);
1037
+ function d(c) {
1038
+ n("itemClose"), e.onClose?.(e.itemKey, e.itemIndex, c);
1039
1039
  }
1040
- return (a, c) => (I(), A("div", {
1040
+ return (c, l) => (I(), A("div", {
1041
1041
  class: C([
1042
- p(w),
1042
+ x(w),
1043
1043
  {
1044
- [`${p(w)}--active`]: r.value,
1045
- [`${p(w)}--disabled`]: typeof a.disabled == "function" ? a.disabled(a.itemKey, a.itemIndex) : a.disabled
1044
+ [`${x(w)}--active`]: r.value,
1045
+ [`${x(w)}--disabled`]: typeof c.disabled == "function" ? c.disabled(c.itemKey, c.itemIndex) : c.disabled
1046
1046
  }
1047
1047
  ]),
1048
1048
  onClick: u,
1049
1049
  onContextmenu: f
1050
1050
  }, [
1051
- $("div", {
1052
- class: C([`${p(w)}__content`])
1051
+ k("div", {
1052
+ class: C([`${x(w)}__content`])
1053
1053
  }, [
1054
- $("div", {
1055
- class: C([`${p(w)}__icon`]),
1056
- style: _({ fontSize: `${a.iconSize}px` })
1054
+ k("div", {
1055
+ class: C([`${x(w)}__icon`]),
1056
+ style: _({ fontSize: `${c.iconSize}px` })
1057
1057
  }, [
1058
- (I(), ee(ie(typeof a.loading == "function" ? a.loading(a.itemKey, a.itemIndex) : a.loading ? s.value : a.icon?.(a.itemKey, a.itemIndex) ?? void 0)))
1058
+ (I(), ee(ie(typeof c.loading == "function" ? c.loading(c.itemKey, c.itemIndex) : c.loading ? s.value : c.icon?.(c.itemKey, c.itemIndex) ?? void 0)))
1059
1059
  ], 6),
1060
- $("div", {
1061
- class: C([`${p(w)}__slot`])
1060
+ k("div", {
1061
+ class: C([`${x(w)}__slot`])
1062
1062
  }, [
1063
1063
  (I(), ee(ie(i.value)))
1064
1064
  ], 2),
1065
- (typeof a.closable == "function" ? a.closable(a.itemKey, a.itemIndex) : a.closable) ? (I(), A("div", {
1065
+ (typeof c.closable == "function" ? c.closable(c.itemKey, c.itemIndex) : c.closable) ? (I(), A("div", {
1066
1066
  key: 0,
1067
- class: C([`${p(w)}__close`]),
1067
+ class: C([`${x(w)}__close`]),
1068
1068
  onClick: Oe(d, ["stop"])
1069
1069
  }, [
1070
- K(on)
1070
+ D(on)
1071
1071
  ], 2)) : X("", !0)
1072
1072
  ], 2),
1073
- $("div", {
1074
- class: C([`${p(w)}__background`])
1073
+ k("div", {
1074
+ class: C([`${x(w)}__background`])
1075
1075
  }, [
1076
- c[0] || (c[0] = $("svg", {
1076
+ l[0] || (l[0] = k("svg", {
1077
1077
  width: "10",
1078
1078
  height: "10"
1079
1079
  }, [
1080
- $("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
1080
+ k("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
1081
1081
  ], -1)),
1082
- $("div", {
1083
- class: C([`${p(w)}__block`])
1082
+ k("div", {
1083
+ class: C([`${x(w)}__block`])
1084
1084
  }, null, 2),
1085
- c[1] || (c[1] = $("svg", {
1085
+ l[1] || (l[1] = k("svg", {
1086
1086
  width: "10",
1087
1087
  height: "10"
1088
1088
  }, [
1089
- $("path", { d: "M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z" })
1089
+ k("path", { d: "M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z" })
1090
1090
  ], -1))
1091
1091
  ], 2),
1092
- $("div", {
1093
- class: C([`${p(w)}__line`, o.value ? `${p(w)}__line--show` : ""])
1092
+ k("div", {
1093
+ class: C([`${x(w)}__line`, o.value ? `${x(w)}__line--show` : ""])
1094
1094
  }, null, 2)
1095
1095
  ], 34));
1096
1096
  }
@@ -1110,76 +1110,85 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1110
1110
  emits: ["update:value", "click", "contextmenu", "close", "add"],
1111
1111
  setup(e, { emit: t }) {
1112
1112
  const n = t;
1113
- bt("n-chrome-tabs", Dt());
1114
- const { background: o = "#F1F1F1", active: r = "#fff", primary: i = "rgba(0,0,0,.1)" } = e.colors ?? {}, s = S(() => e.value ? e.options?.findIndex((h) => h.key === e.value) : 0), { scrollRef: u, scrollToView: f } = Rt({ activeClassName: `.${w}--active`, direction: "horizontal" });
1115
- O(() => e.value, () => {
1116
- f();
1113
+ bt("n-chrome-tabs", Ht());
1114
+ const o = M(() => e.value ? e.options?.findIndex((l) => l.key === e.value) : 0), { scrollRef: r, scrollToView: i } = Rt({ activeClassName: `.${w}--active`, direction: "horizontal" });
1115
+ P(() => e.value, () => {
1116
+ i();
1117
1117
  }, {
1118
1118
  immediate: !0
1119
1119
  });
1120
- const d = S(() => E(o).darken(0.9).toHex()), a = S(() => E(r).darken(0.8).toHex()), c = S(() => E(i).darken(0.3).toHex());
1121
- function b(h, v) {
1122
- n("update:value", h), n("click", h, v);
1120
+ const s = M(() => ({
1121
+ background: "#F1F1F1",
1122
+ active: "#fff",
1123
+ primary: "rgba(0,0,0,.1)",
1124
+ ...e.colors
1125
+ })), u = M(() => ({
1126
+ background: E(s.value.background).darken(0.8).toHex(),
1127
+ active: E(s.value.active).darken(0.8).toHex(),
1128
+ primary: E(s.value.primary).darken(0.3).toHex()
1129
+ }));
1130
+ function f(l, h) {
1131
+ n("update:value", l), n("click", l, h);
1123
1132
  }
1124
- function M(h, v) {
1125
- n("contextmenu", h, v);
1133
+ function d(l, h) {
1134
+ n("contextmenu", l, h);
1126
1135
  }
1127
- function l(h, v) {
1128
- n("close", h, v);
1136
+ function c(l, h) {
1137
+ n("close", l, h);
1129
1138
  }
1130
- return (h, v) => (I(), A("div", {
1131
- class: C([p(P)]),
1139
+ return (l, h) => (I(), A("div", {
1140
+ class: C([x(j)]),
1132
1141
  style: _({
1133
- "--background-color": `${p(o)}`,
1134
- "--background-color-dark": `${d.value}`,
1135
- "--active-background-color": `${p(r)}`,
1136
- "--active-background-color-dark": `${a.value}`,
1137
- "--primary-color": `${p(i)}`,
1138
- "--primary-color-dark": `${c.value}`
1142
+ "--background-color": `${s.value.background}`,
1143
+ "--background-color-dark": `${u.value.background}`,
1144
+ "--active-background-color": `${s.value.active}`,
1145
+ "--active-background-color-dark": `${u.value.active}`,
1146
+ "--primary-color": `${s.value.primary}`,
1147
+ "--primary-color-dark": `${u.value.primary}`
1139
1148
  })
1140
1149
  }, [
1141
- h.dropdown ? (I(), A("div", {
1150
+ l.dropdown ? (I(), A("div", {
1142
1151
  key: 0,
1143
- class: C([`${p(P)}__icon`])
1152
+ class: C([`${x(j)}__icon`])
1144
1153
  }, [
1145
- K(Yt)
1154
+ D(Yt)
1146
1155
  ], 2)) : X("", !0),
1147
- se(h.$slots, "prefix"),
1148
- $("div", {
1156
+ se(l.$slots, "prefix"),
1157
+ k("div", {
1149
1158
  ref_key: "scrollRef",
1150
- ref: u,
1151
- class: C([`${p(P)}__content`, h.contentClass]),
1152
- style: _(h.contentStyle)
1159
+ ref: r,
1160
+ class: C([`${x(j)}__content`, l.contentClass]),
1161
+ style: _(l.contentStyle)
1153
1162
  }, [
1154
- K(Ve, {
1163
+ D(Ve, {
1155
1164
  name: "group",
1156
1165
  tag: "div",
1157
- class: C([`${p(P)}__scroll`])
1166
+ class: C([`${x(j)}__scroll`])
1158
1167
  }, {
1159
- default: De(() => [
1160
- (I(!0), A(He, null, We(h.options, ({ key: m, ...k }, B) => (I(), ee(rn, Ke({
1161
- key: m,
1162
- loading: h.loadingValue === m
1163
- }, { ref_for: !0 }, k, {
1164
- "item-key": m,
1165
- "item-index": B,
1166
- "active-index": s.value,
1167
- "icon-size": h.iconSize,
1168
- onItemClick: (L) => b(m, B),
1169
- onItemContextmenu: (L) => M(m, B),
1170
- onItemClose: (L) => l(m, B)
1168
+ default: He(() => [
1169
+ (I(!0), A(We, null, De(l.options, ({ key: $, ...a }, m) => (I(), ee(rn, Ke({
1170
+ key: $,
1171
+ loading: l.loadingValue === $
1172
+ }, { ref_for: !0 }, a, {
1173
+ "item-key": $,
1174
+ "item-index": m,
1175
+ "active-index": o.value,
1176
+ "icon-size": l.iconSize,
1177
+ onItemClick: (v) => f($, m),
1178
+ onItemContextmenu: (v) => d($, m),
1179
+ onItemClose: (v) => c($, m)
1171
1180
  }), null, 16, ["loading", "item-key", "item-index", "active-index", "icon-size", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
1172
1181
  ]),
1173
1182
  _: 1
1174
1183
  }, 8, ["class"])
1175
1184
  ], 6),
1176
- se(h.$slots, "suffix"),
1177
- h.addable ? (I(), A("div", {
1185
+ se(l.$slots, "suffix"),
1186
+ l.addable ? (I(), A("div", {
1178
1187
  key: 1,
1179
- class: C([`${p(P)}__icon`]),
1180
- onClick: v[0] || (v[0] = (m) => n("add"))
1188
+ class: C([`${x(j)}__icon`]),
1189
+ onClick: h[0] || (h[0] = ($) => n("add"))
1181
1190
  }, [
1182
- K(qt)
1191
+ D(qt)
1183
1192
  ], 2)) : X("", !0)
1184
1193
  ], 6));
1185
1194
  }