@oiij/chrome-tabs 0.0.6 → 0.0.8
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/Tabs.vue.d.ts +32 -10
- package/dist/index.cjs +7 -7
- package/dist/index.d.ts +18 -10
- package/dist/index.js +398 -387
- package/dist/index.umd.cjs +6 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { inject as Le, onBeforeMount as
|
|
2
|
-
function
|
|
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";
|
|
2
|
+
function qe(e) {
|
|
3
3
|
let t = ".", n = "__", o = "--", r;
|
|
4
4
|
if (e) {
|
|
5
5
|
let l = e.blockPrefix;
|
|
@@ -8,85 +8,85 @@ function Ge(e) {
|
|
|
8
8
|
const i = {
|
|
9
9
|
install(l) {
|
|
10
10
|
r = l.c;
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const h = l.context;
|
|
12
|
+
h.bem = {}, h.bem.b = null, h.bem.els = null;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
function s(l) {
|
|
16
|
-
let
|
|
16
|
+
let h, v;
|
|
17
17
|
return {
|
|
18
18
|
before(m) {
|
|
19
|
-
|
|
19
|
+
h = m.bem.b, v = m.bem.els, m.bem.els = null;
|
|
20
20
|
},
|
|
21
21
|
after(m) {
|
|
22
|
-
m.bem.b =
|
|
22
|
+
m.bem.b = h, m.bem.els = v;
|
|
23
23
|
},
|
|
24
|
-
$({ context: m, props:
|
|
25
|
-
return l = typeof l == "string" ? l : l({ context: m, props:
|
|
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}`;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
function u(l) {
|
|
30
|
-
let
|
|
30
|
+
let h;
|
|
31
31
|
return {
|
|
32
|
-
before(
|
|
33
|
-
|
|
32
|
+
before(v) {
|
|
33
|
+
h = v.bem.els;
|
|
34
34
|
},
|
|
35
|
-
after(
|
|
36
|
-
|
|
35
|
+
after(v) {
|
|
36
|
+
v.bem.els = h;
|
|
37
37
|
},
|
|
38
|
-
$({ context:
|
|
39
|
-
return l = typeof l == "string" ? l : l({ context:
|
|
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(", ");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function f(l) {
|
|
44
44
|
return {
|
|
45
|
-
$({ context:
|
|
46
|
-
l = typeof l == "string" ? l : l({ context:
|
|
47
|
-
const m = l.split(",").map((
|
|
48
|
-
function
|
|
49
|
-
return m.map((
|
|
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(", ");
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
51
|
+
const B = h.bem.els;
|
|
52
|
+
if (B !== null) {
|
|
53
|
+
if (process.env.NODE_ENV !== "production" && B.length >= 2)
|
|
54
54
|
throw Error(`[css-render/plugin-bem]: m(${l}) is invalid, using modifier inside multiple elements is not allowed`);
|
|
55
|
-
return
|
|
55
|
+
return k(B[0]);
|
|
56
56
|
} else
|
|
57
|
-
return
|
|
57
|
+
return k();
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function d(l) {
|
|
62
62
|
return {
|
|
63
|
-
$({ context:
|
|
64
|
-
l = typeof l == "string" ? l : l({ context:
|
|
65
|
-
const m =
|
|
63
|
+
$({ context: h, props: v }) {
|
|
64
|
+
l = typeof l == "string" ? l : l({ context: h, props: v });
|
|
65
|
+
const m = h.bem.els;
|
|
66
66
|
if (process.env.NODE_ENV !== "production" && m !== null && m.length >= 2)
|
|
67
67
|
throw Error(`[css-render/plugin-bem]: notM(${l}) is invalid, using modifier inside multiple elements is not allowed`);
|
|
68
|
-
return `&:not(${
|
|
68
|
+
return `&:not(${v?.bPrefix || t}${h.bem.b}${m !== null && m.length > 0 ? `${n}${m[0]}` : ""}${o}${l})`;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
return Object.assign(i, {
|
|
73
73
|
cB: ((...l) => r(s(l[0]), l[1], l[2])),
|
|
74
74
|
cE: ((...l) => r(u(l[0]), l[1], l[2])),
|
|
75
|
-
cM: ((...l) => r(
|
|
76
|
-
cNotM: ((...l) => r(
|
|
75
|
+
cM: ((...l) => r(f(l[0]), l[1], l[2])),
|
|
76
|
+
cNotM: ((...l) => r(d(l[0]), l[1], l[2]))
|
|
77
77
|
}), i;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ge(e) {
|
|
80
80
|
let t = 0;
|
|
81
81
|
for (let n = 0; n < e.length; ++n)
|
|
82
82
|
e[n] === "&" && ++t;
|
|
83
83
|
return t;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
function
|
|
85
|
+
const Ce = /\s*,(?![^(]*\))\s*/g, Ze = /\s+/g;
|
|
86
|
+
function Ue(e, t) {
|
|
87
87
|
const n = [];
|
|
88
|
-
return t.split(
|
|
89
|
-
let r =
|
|
88
|
+
return t.split(Ce).forEach((o) => {
|
|
89
|
+
let r = Ge(o);
|
|
90
90
|
if (r) {
|
|
91
91
|
if (r === 1) {
|
|
92
92
|
e.forEach((s) => {
|
|
@@ -109,30 +109,30 @@ function Ye(e, t) {
|
|
|
109
109
|
for (; r--; ) {
|
|
110
110
|
const s = [];
|
|
111
111
|
i.forEach((u) => {
|
|
112
|
-
e.forEach((
|
|
113
|
-
s.push(u.replace("&",
|
|
112
|
+
e.forEach((f) => {
|
|
113
|
+
s.push(u.replace("&", f));
|
|
114
114
|
});
|
|
115
115
|
}), i = s;
|
|
116
116
|
}
|
|
117
117
|
i.forEach((s) => n.push(s));
|
|
118
118
|
}), n;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Ye(e, t) {
|
|
121
121
|
const n = [];
|
|
122
|
-
return t.split(
|
|
122
|
+
return t.split(Ce).forEach((o) => {
|
|
123
123
|
e.forEach((r) => {
|
|
124
124
|
n.push((r && r + " ") + o);
|
|
125
125
|
});
|
|
126
126
|
}), n;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Je(e) {
|
|
129
129
|
let t = [""];
|
|
130
130
|
return e.forEach((n) => {
|
|
131
131
|
n = n && n.trim(), // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
132
|
-
n && (n.includes("&") ? t =
|
|
133
|
-
}), t.join(", ").replace(
|
|
132
|
+
n && (n.includes("&") ? t = Ue(t, n) : t = Ye(t, n));
|
|
133
|
+
}), t.join(", ").replace(Ze, " ");
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ue(e) {
|
|
136
136
|
if (!e)
|
|
137
137
|
return;
|
|
138
138
|
const t = e.parentElement;
|
|
@@ -141,33 +141,33 @@ function le(e) {
|
|
|
141
141
|
function ne(e, t) {
|
|
142
142
|
return (t ?? document.head).querySelector(`style[cssr-id="${e}"]`);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Qe(e) {
|
|
145
145
|
const t = document.createElement("style");
|
|
146
146
|
return t.setAttribute("cssr-id", e), t;
|
|
147
147
|
}
|
|
148
148
|
function V(e) {
|
|
149
149
|
return e ? /^\s*@(s|m)/.test(e) : !1;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
function
|
|
153
|
-
return e.replace(
|
|
151
|
+
const Xe = /[A-Z]/g;
|
|
152
|
+
function Ie(e) {
|
|
153
|
+
return e.replace(Xe, (t) => "-" + t.toLowerCase());
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function _e(e, t = " ") {
|
|
156
156
|
return typeof e == "object" && e !== null ? ` {
|
|
157
|
-
` + Object.entries(e).map((n) => t + ` ${
|
|
157
|
+
` + Object.entries(e).map((n) => t + ` ${Ie(n[0])}: ${n[1]};`).join(`
|
|
158
158
|
`) + `
|
|
159
159
|
` + t + "}" : `: ${e};`;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function et(e, t, n) {
|
|
162
162
|
return typeof e == "function" ? e({
|
|
163
163
|
context: t.context,
|
|
164
164
|
props: n
|
|
165
165
|
}) : e;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function le(e, t, n, o) {
|
|
168
168
|
if (!t)
|
|
169
169
|
return "";
|
|
170
|
-
const r =
|
|
170
|
+
const r = et(t, n, o);
|
|
171
171
|
if (!r)
|
|
172
172
|
return "";
|
|
173
173
|
if (typeof r == "string")
|
|
@@ -182,14 +182,14 @@ ${r}
|
|
|
182
182
|
e + " {"
|
|
183
183
|
] : [];
|
|
184
184
|
return i.forEach((u) => {
|
|
185
|
-
const
|
|
185
|
+
const f = r[u];
|
|
186
186
|
if (u === "raw") {
|
|
187
187
|
s.push(`
|
|
188
|
-
` +
|
|
188
|
+
` + f + `
|
|
189
189
|
`);
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
|
-
u =
|
|
192
|
+
u = Ie(u), f != null && s.push(` ${u}${_e(f)}`);
|
|
193
193
|
}), e && s.push("}"), s.join(`
|
|
194
194
|
`);
|
|
195
195
|
}
|
|
@@ -203,45 +203,45 @@ function te(e, t, n) {
|
|
|
203
203
|
} else o && n(o);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Ee(e, t, n, o, r) {
|
|
207
207
|
const i = e.$;
|
|
208
208
|
let s = "";
|
|
209
209
|
if (!i || typeof i == "string")
|
|
210
210
|
V(i) ? s = i : t.push(i);
|
|
211
211
|
else if (typeof i == "function") {
|
|
212
|
-
const
|
|
212
|
+
const d = i({
|
|
213
213
|
context: o.context,
|
|
214
214
|
props: r
|
|
215
215
|
});
|
|
216
|
-
V(
|
|
216
|
+
V(d) ? s = d : t.push(d);
|
|
217
217
|
} else if (i.before && i.before(o.context), !i.$ || typeof i.$ == "string")
|
|
218
218
|
V(i.$) ? s = i.$ : t.push(i.$);
|
|
219
219
|
else if (i.$) {
|
|
220
|
-
const
|
|
220
|
+
const d = i.$({
|
|
221
221
|
context: o.context,
|
|
222
222
|
props: r
|
|
223
223
|
});
|
|
224
|
-
V(
|
|
224
|
+
V(d) ? s = d : t.push(d);
|
|
225
225
|
}
|
|
226
|
-
const u =
|
|
227
|
-
s ? n.push(`${s} {`) :
|
|
226
|
+
const u = Je(t), f = le(u, e.props, o, r);
|
|
227
|
+
s ? n.push(`${s} {`) : f.length && n.push(f), e.children && te(e.children, {
|
|
228
228
|
context: o.context,
|
|
229
229
|
props: r
|
|
230
|
-
}, (
|
|
231
|
-
if (typeof
|
|
232
|
-
const
|
|
233
|
-
n.push(
|
|
230
|
+
}, (d) => {
|
|
231
|
+
if (typeof d == "string") {
|
|
232
|
+
const a = le(u, { raw: d }, o, r);
|
|
233
|
+
n.push(a);
|
|
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);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function tt(e, t, n) {
|
|
239
239
|
const o = [];
|
|
240
|
-
return
|
|
240
|
+
return Ee(e, [], o, t, n), o.join(`
|
|
241
241
|
|
|
242
242
|
`);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function nt(e) {
|
|
245
245
|
for (var t = 0, n, o = 0, r = e.length; r >= 4; ++o, r -= 4)
|
|
246
246
|
n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
|
|
247
247
|
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
|
|
@@ -261,66 +261,66 @@ function rt(e) {
|
|
|
261
261
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
262
262
|
}
|
|
263
263
|
typeof window < "u" && (window.__cssrContext = {});
|
|
264
|
-
function
|
|
264
|
+
function ot(e, t, n, o) {
|
|
265
265
|
const { els: r } = t;
|
|
266
266
|
if (n === void 0)
|
|
267
|
-
r.forEach(
|
|
267
|
+
r.forEach(ue), t.els = [];
|
|
268
268
|
else {
|
|
269
269
|
const i = ne(n, o);
|
|
270
|
-
i && r.includes(i) && (
|
|
270
|
+
i && r.includes(i) && (ue(i), t.els = r.filter((s) => s !== i));
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function ae(e, t) {
|
|
274
274
|
e.push(t);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
let
|
|
278
|
-
if (n === void 0 && (
|
|
279
|
-
|
|
276
|
+
function rt(e, t, n, o, r, i, s, u, f) {
|
|
277
|
+
let d;
|
|
278
|
+
if (n === void 0 && (d = t.render(o), n = nt(d)), f) {
|
|
279
|
+
f.adapter(n, d ?? t.render(o));
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
u === void 0 && (u = document.head);
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
285
|
-
return
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
return
|
|
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;
|
|
289
289
|
if (s) {
|
|
290
290
|
const b = u.querySelector(`meta[name="${s}"]`);
|
|
291
291
|
if (b)
|
|
292
|
-
return u.insertBefore(
|
|
292
|
+
return u.insertBefore(c, b), ae(t.els, c), c;
|
|
293
293
|
}
|
|
294
|
-
return r ? u.insertBefore(
|
|
294
|
+
return r ? u.insertBefore(c, u.querySelector("style, link")) : u.appendChild(c), ae(t.els, c), c;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
return
|
|
296
|
+
function it(e) {
|
|
297
|
+
return tt(this, this.instance, e);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function st(e = {}) {
|
|
300
300
|
const { id: t, ssr: n, props: o, head: r = !1, force: i = !1, anchorMetaName: s, parent: u } = e;
|
|
301
|
-
return
|
|
301
|
+
return rt(this.instance, this, t, o, r, i, s, u, n);
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function ut(e = {}) {
|
|
304
304
|
const { id: t, parent: n } = e;
|
|
305
|
-
|
|
305
|
+
ot(this.instance, this, t, n);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const D = function(e, t, n, o) {
|
|
308
308
|
return {
|
|
309
309
|
instance: e,
|
|
310
310
|
$: t,
|
|
311
311
|
props: n,
|
|
312
312
|
children: o,
|
|
313
313
|
els: [],
|
|
314
|
-
render:
|
|
315
|
-
mount:
|
|
316
|
-
unmount:
|
|
314
|
+
render: it,
|
|
315
|
+
mount: st,
|
|
316
|
+
unmount: ut
|
|
317
317
|
};
|
|
318
|
-
},
|
|
319
|
-
return Array.isArray(t) ?
|
|
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);
|
|
320
320
|
};
|
|
321
|
-
function
|
|
321
|
+
function at(e = {}) {
|
|
322
322
|
const t = {
|
|
323
|
-
c: ((...n) =>
|
|
323
|
+
c: ((...n) => lt(t, ...n)),
|
|
324
324
|
use: (n, ...o) => n.install(t, ...o),
|
|
325
325
|
find: ne,
|
|
326
326
|
context: {},
|
|
@@ -328,8 +328,8 @@ function ft(e = {}) {
|
|
|
328
328
|
};
|
|
329
329
|
return t;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
const { namespace: t = "n", blockPrefix: n = `.${t}-`, elementPrefix: o = "__", modifierPrefix: r = "--" } = e ?? {}, i =
|
|
331
|
+
function ct(e) {
|
|
332
|
+
const { namespace: t = "n", blockPrefix: n = `.${t}-`, elementPrefix: o = "__", modifierPrefix: r = "--" } = e ?? {}, i = at(), s = qe({
|
|
333
333
|
blockPrefix: n,
|
|
334
334
|
elementPrefix: o,
|
|
335
335
|
modifierPrefix: r
|
|
@@ -343,29 +343,29 @@ function dt(e) {
|
|
|
343
343
|
plugin: s
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
const
|
|
347
|
-
function
|
|
346
|
+
const dt = "@css-render/vue3-ssr";
|
|
347
|
+
function ft(e, t) {
|
|
348
348
|
return `<style cssr-id="${e}">
|
|
349
349
|
${t}
|
|
350
350
|
</style>`;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function ht(e, t, n) {
|
|
353
353
|
const { styles: o, ids: r } = n;
|
|
354
|
-
r.has(e) || o !== null && (r.add(e), o.push(
|
|
354
|
+
r.has(e) || o !== null && (r.add(e), o.push(ft(e, t)));
|
|
355
355
|
}
|
|
356
|
-
const
|
|
357
|
-
function
|
|
358
|
-
if (
|
|
356
|
+
const mt = typeof document < "u";
|
|
357
|
+
function vt() {
|
|
358
|
+
if (mt)
|
|
359
359
|
return;
|
|
360
|
-
const e = Le(
|
|
360
|
+
const e = Le(dt, null);
|
|
361
361
|
if (e !== null)
|
|
362
362
|
return {
|
|
363
|
-
adapter: (t, n) =>
|
|
363
|
+
adapter: (t, n) => ht(t, n, e),
|
|
364
364
|
context: e
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
const n =
|
|
367
|
+
function bt(e, t) {
|
|
368
|
+
const n = vt();
|
|
369
369
|
function o() {
|
|
370
370
|
t.mount({
|
|
371
371
|
id: e,
|
|
@@ -373,18 +373,18 @@ function gt(e, t) {
|
|
|
373
373
|
ssr: n
|
|
374
374
|
});
|
|
375
375
|
}
|
|
376
|
-
n ? o() :
|
|
376
|
+
n ? o() : ze(() => {
|
|
377
377
|
o();
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
380
|
+
function Se(e) {
|
|
381
|
+
return je() ? (Te(e), !0) : !1;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
383
|
+
const pt = typeof window < "u" && typeof document < "u";
|
|
384
384
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
385
|
-
const
|
|
385
|
+
const gt = Object.prototype.toString, yt = (e) => gt.call(e) === "[object Object]", ce = () => {
|
|
386
386
|
};
|
|
387
|
-
function
|
|
387
|
+
function xt(e, t) {
|
|
388
388
|
function n(...o) {
|
|
389
389
|
return new Promise((r, i) => {
|
|
390
390
|
Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(r).catch(i);
|
|
@@ -392,41 +392,41 @@ function kt(e, t) {
|
|
|
392
392
|
}
|
|
393
393
|
return n;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
let n, o, r =
|
|
397
|
-
const i = (
|
|
398
|
-
clearTimeout(
|
|
395
|
+
function $t(e, t = {}) {
|
|
396
|
+
let n, o, r = ce;
|
|
397
|
+
const i = (f) => {
|
|
398
|
+
clearTimeout(f), r(), r = ce;
|
|
399
399
|
};
|
|
400
400
|
let s;
|
|
401
|
-
return (
|
|
402
|
-
const
|
|
403
|
-
return n && i(n),
|
|
404
|
-
r = t.rejectOnCancel ? b :
|
|
405
|
-
n && i(n), o = void 0,
|
|
406
|
-
},
|
|
407
|
-
o && i(o), o = void 0,
|
|
408
|
-
},
|
|
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());
|
|
408
|
+
}, d);
|
|
409
409
|
});
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
function q(e) {
|
|
413
413
|
return Array.isArray(e) ? e : [e];
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
return
|
|
415
|
+
function kt(e) {
|
|
416
|
+
return ke();
|
|
417
417
|
}
|
|
418
418
|
// @__NO_SIDE_EFFECTS__
|
|
419
|
-
function
|
|
420
|
-
return
|
|
421
|
-
|
|
419
|
+
function wt(e, t = 200, n = {}) {
|
|
420
|
+
return xt(
|
|
421
|
+
$t(t, n),
|
|
422
422
|
e
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
|
|
425
|
+
function Ct(e, t = !0, n) {
|
|
426
|
+
kt() ? xe(e, n) : t ? e() : $e(e);
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
return
|
|
428
|
+
function It(e, t, n) {
|
|
429
|
+
return O(
|
|
430
430
|
e,
|
|
431
431
|
t,
|
|
432
432
|
{
|
|
@@ -435,37 +435,37 @@ function Mt(e, t, n) {
|
|
|
435
435
|
}
|
|
436
436
|
);
|
|
437
437
|
}
|
|
438
|
-
const oe =
|
|
439
|
-
function
|
|
438
|
+
const oe = pt ? window : void 0;
|
|
439
|
+
function z(e) {
|
|
440
440
|
var t;
|
|
441
441
|
const n = j(e);
|
|
442
442
|
return (t = n?.$el) != null ? t : n;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Et(...e) {
|
|
445
445
|
const t = [], n = () => {
|
|
446
446
|
t.forEach((u) => u()), t.length = 0;
|
|
447
|
-
}, o = (u,
|
|
448
|
-
const u = q(j(e[0])).filter((
|
|
449
|
-
return u.every((
|
|
450
|
-
}), i =
|
|
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);
|
|
449
|
+
return u.every((f) => typeof f != "string") ? u : void 0;
|
|
450
|
+
}), i = It(
|
|
451
451
|
() => {
|
|
452
|
-
var u,
|
|
452
|
+
var u, f;
|
|
453
453
|
return [
|
|
454
|
-
(
|
|
454
|
+
(f = (u = r.value) == null ? void 0 : u.map((d) => z(d))) != null ? f : [oe].filter((d) => d != null),
|
|
455
455
|
q(j(r.value ? e[1] : e[0])),
|
|
456
456
|
q(p(r.value ? e[2] : e[1])),
|
|
457
457
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
458
458
|
j(r.value ? e[3] : e[2])
|
|
459
459
|
];
|
|
460
460
|
},
|
|
461
|
-
([u,
|
|
462
|
-
if (n(), !u?.length || !
|
|
461
|
+
([u, f, d, a]) => {
|
|
462
|
+
if (n(), !u?.length || !f?.length || !d?.length)
|
|
463
463
|
return;
|
|
464
|
-
const
|
|
464
|
+
const c = yt(a) ? { ...a } : a;
|
|
465
465
|
t.push(
|
|
466
466
|
...u.flatMap(
|
|
467
|
-
(b) =>
|
|
468
|
-
(
|
|
467
|
+
(b) => f.flatMap(
|
|
468
|
+
(M) => d.map((l) => o(b, M, l, c))
|
|
469
469
|
)
|
|
470
470
|
)
|
|
471
471
|
);
|
|
@@ -474,216 +474,216 @@ function Nt(...e) {
|
|
|
474
474
|
), s = () => {
|
|
475
475
|
i(), n();
|
|
476
476
|
};
|
|
477
|
-
return
|
|
477
|
+
return Se(n), s;
|
|
478
478
|
}
|
|
479
479
|
// @__NO_SIDE_EFFECTS__
|
|
480
480
|
function St() {
|
|
481
|
-
const e = Q(!1), t =
|
|
482
|
-
return t &&
|
|
481
|
+
const e = Q(!1), t = ke();
|
|
482
|
+
return t && xe(() => {
|
|
483
483
|
e.value = !0;
|
|
484
484
|
}, t), e;
|
|
485
485
|
}
|
|
486
486
|
// @__NO_SIDE_EFFECTS__
|
|
487
|
-
function
|
|
487
|
+
function Nt(e) {
|
|
488
488
|
const t = /* @__PURE__ */ St();
|
|
489
|
-
return
|
|
489
|
+
return S(() => (t.value, !!e()));
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Mt(e, t, n = {}) {
|
|
492
492
|
const { window: o = oe, ...r } = n;
|
|
493
493
|
let i;
|
|
494
|
-
const s = /* @__PURE__ */
|
|
494
|
+
const s = /* @__PURE__ */ Nt(() => o && "ResizeObserver" in o), u = () => {
|
|
495
495
|
i && (i.disconnect(), i = void 0);
|
|
496
|
-
},
|
|
497
|
-
const
|
|
498
|
-
return Array.isArray(
|
|
499
|
-
}),
|
|
500
|
-
|
|
501
|
-
(
|
|
496
|
+
}, f = S(() => {
|
|
497
|
+
const c = j(e);
|
|
498
|
+
return Array.isArray(c) ? c.map((b) => z(b)) : [z(c)];
|
|
499
|
+
}), d = O(
|
|
500
|
+
f,
|
|
501
|
+
(c) => {
|
|
502
502
|
if (u(), s.value && o) {
|
|
503
503
|
i = new ResizeObserver(t);
|
|
504
|
-
for (const b of
|
|
504
|
+
for (const b of c)
|
|
505
505
|
b && i.observe(b, r);
|
|
506
506
|
}
|
|
507
507
|
},
|
|
508
508
|
{ immediate: !0, flush: "post" }
|
|
509
|
-
),
|
|
510
|
-
u(),
|
|
509
|
+
), a = () => {
|
|
510
|
+
u(), d();
|
|
511
511
|
};
|
|
512
|
-
return
|
|
512
|
+
return Se(a), {
|
|
513
513
|
isSupported: s,
|
|
514
|
-
stop:
|
|
514
|
+
stop: a
|
|
515
515
|
};
|
|
516
516
|
}
|
|
517
|
-
function
|
|
518
|
-
const { window: o = oe, box: r = "content-box" } = n, i =
|
|
519
|
-
var
|
|
520
|
-
return (b = (
|
|
521
|
-
}), s = Q(t.width), u = Q(t.height), { stop:
|
|
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");
|
|
521
|
+
}), s = Q(t.width), u = Q(t.height), { stop: f } = Mt(
|
|
522
522
|
e,
|
|
523
|
-
([
|
|
524
|
-
const b = r === "border-box" ?
|
|
523
|
+
([c]) => {
|
|
524
|
+
const b = r === "border-box" ? c.borderBoxSize : r === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
525
525
|
if (o && i.value) {
|
|
526
|
-
const
|
|
527
|
-
if (
|
|
528
|
-
const l =
|
|
526
|
+
const M = z(e);
|
|
527
|
+
if (M) {
|
|
528
|
+
const l = M.getBoundingClientRect();
|
|
529
529
|
s.value = l.width, u.value = l.height;
|
|
530
530
|
}
|
|
531
531
|
} else if (b) {
|
|
532
|
-
const
|
|
533
|
-
s.value =
|
|
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);
|
|
534
534
|
} else
|
|
535
|
-
s.value =
|
|
535
|
+
s.value = c.contentRect.width, u.value = c.contentRect.height;
|
|
536
536
|
},
|
|
537
537
|
n
|
|
538
538
|
);
|
|
539
|
-
|
|
540
|
-
const
|
|
541
|
-
|
|
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);
|
|
542
542
|
});
|
|
543
|
-
const
|
|
544
|
-
() =>
|
|
545
|
-
(
|
|
546
|
-
s.value =
|
|
543
|
+
const d = O(
|
|
544
|
+
() => z(e),
|
|
545
|
+
(c) => {
|
|
546
|
+
s.value = c ? t.width : 0, u.value = c ? t.height : 0;
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
|
-
function
|
|
550
|
-
|
|
549
|
+
function a() {
|
|
550
|
+
f(), d();
|
|
551
551
|
}
|
|
552
552
|
return {
|
|
553
553
|
width: s,
|
|
554
554
|
height: u,
|
|
555
|
-
stop:
|
|
555
|
+
stop: a
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r =
|
|
560
|
-
async function u(
|
|
561
|
-
await
|
|
562
|
-
const
|
|
563
|
-
|
|
558
|
+
function Rt(e) {
|
|
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) {
|
|
561
|
+
await $e();
|
|
562
|
+
const c = r.value?.querySelector(t);
|
|
563
|
+
c && c.scrollIntoView({
|
|
564
564
|
behavior: "smooth",
|
|
565
565
|
block: "nearest",
|
|
566
566
|
inline: "nearest",
|
|
567
|
-
...
|
|
567
|
+
...a
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function f(a) {
|
|
571
571
|
if (!n) return;
|
|
572
|
-
|
|
573
|
-
const { deltaY:
|
|
572
|
+
a.preventDefault();
|
|
573
|
+
const { deltaY: c } = a;
|
|
574
574
|
switch (o) {
|
|
575
575
|
case "vertical":
|
|
576
576
|
r.value?.scrollBy({
|
|
577
|
-
top:
|
|
577
|
+
top: c > 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:
|
|
583
|
+
left: c > 0 ? i.value : -i.value,
|
|
584
584
|
behavior: "smooth"
|
|
585
585
|
});
|
|
586
586
|
break;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
return
|
|
592
|
-
|
|
589
|
+
Et(r, "wheel", f);
|
|
590
|
+
const d = /* @__PURE__ */ wt(u, 500);
|
|
591
|
+
return O([i, s], () => {
|
|
592
|
+
d();
|
|
593
593
|
}), {
|
|
594
594
|
scrollRef: r,
|
|
595
595
|
scrollToView: u
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
var
|
|
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
|
-
},
|
|
600
|
+
}, x = 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
602
|
}, N = 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
607
|
return { r: N(e.r, 0, 255), g: N(e.g, 0, 255), b: N(e.b, 0, 255), a: N(e.a) };
|
|
608
608
|
}, Z = function(e) {
|
|
609
|
-
return { r:
|
|
610
|
-
},
|
|
609
|
+
return { r: x(e.r), g: x(e.g), b: x(e.b), a: x(e.a, 3) };
|
|
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;
|
|
613
|
-
},
|
|
613
|
+
}, Me = function(e) {
|
|
614
614
|
var t = e.r, n = e.g, o = e.b, r = e.a, i = Math.max(t, n, o), s = i - Math.min(t, n, o), u = s ? i === t ? (n - o) / s : i === n ? 2 + (o - t) / s : 4 + (t - n) / s : 0;
|
|
615
615
|
return { h: 60 * (u < 0 ? u + 6 : u), s: i ? s / i * 100 : 0, v: i / 255 * 100, a: r };
|
|
616
|
-
},
|
|
616
|
+
}, Ae = function(e) {
|
|
617
617
|
var t = e.h, n = e.s, o = e.v, r = e.a;
|
|
618
618
|
t = t / 360 * 6, n /= 100, o /= 100;
|
|
619
|
-
var i = Math.floor(t), s = o * (1 - n), u = o * (1 - (t - i) * n),
|
|
620
|
-
return { r: 255 * [o, u, s, s,
|
|
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
|
+
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
|
+
}, 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) };
|
|
621
623
|
}, he = function(e) {
|
|
622
|
-
return { h:
|
|
624
|
+
return { h: x(e.h), s: x(e.s), l: x(e.l), a: x(e.a, 3) };
|
|
623
625
|
}, me = function(e) {
|
|
624
|
-
return { h:
|
|
625
|
-
}, ve = function(e) {
|
|
626
|
-
return Re((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 }));
|
|
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
|
-
},
|
|
629
|
-
return { h: (t =
|
|
628
|
+
}, F = function(e) {
|
|
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
|
-
},
|
|
632
|
-
var t =
|
|
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 ?
|
|
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
|
+
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;
|
|
634
634
|
}, "hex"], [function(e) {
|
|
635
|
-
var t =
|
|
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;
|
|
637
637
|
}, "rgb"], [function(e) {
|
|
638
|
-
var t =
|
|
638
|
+
var t = zt.exec(e) || jt.exec(e);
|
|
639
639
|
if (!t) return null;
|
|
640
|
-
var n, o, r =
|
|
641
|
-
return
|
|
640
|
+
var n, o, r = fe({ h: (n = t[1], o = t[2], o === void 0 && (o = "deg"), Number(n) * (Bt[o] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
|
|
641
|
+
return me(r);
|
|
642
642
|
}, "hsl"]], object: [[function(e) {
|
|
643
643
|
var t = e.r, n = e.g, o = e.b, r = e.a, i = r === void 0 ? 1 : r;
|
|
644
|
-
return
|
|
644
|
+
return R(t) && R(n) && R(o) ? de({ r: Number(t), g: Number(n), b: Number(o), a: Number(i) }) : null;
|
|
645
645
|
}, "rgb"], [function(e) {
|
|
646
646
|
var t = e.h, n = e.s, o = e.l, r = e.a, i = r === void 0 ? 1 : r;
|
|
647
|
-
if (!
|
|
648
|
-
var s =
|
|
649
|
-
return
|
|
647
|
+
if (!R(t) || !R(n) || !R(o)) return null;
|
|
648
|
+
var s = fe({ h: Number(t), s: Number(n), l: Number(o), a: Number(i) });
|
|
649
|
+
return me(s);
|
|
650
650
|
}, "hsl"], [function(e) {
|
|
651
651
|
var t = e.h, n = e.s, o = e.v, r = e.a, i = r === void 0 ? 1 : r;
|
|
652
|
-
if (!
|
|
652
|
+
if (!R(t) || !R(n) || !R(o)) return null;
|
|
653
653
|
var s = (function(u) {
|
|
654
|
-
return { h:
|
|
654
|
+
return { h: Ne(u.h), s: N(u.s, 0, 100), v: N(u.v, 0, 100), a: N(u.a) };
|
|
655
655
|
})({ h: Number(t), s: Number(n), v: Number(o), a: Number(i) });
|
|
656
|
-
return
|
|
657
|
-
}, "hsv"]] },
|
|
656
|
+
return Ae(s);
|
|
657
|
+
}, "hsv"]] }, be = function(e, t) {
|
|
658
658
|
for (var n = 0; n < t.length; n++) {
|
|
659
659
|
var o = t[n][0](e);
|
|
660
660
|
if (o) return [o, t[n][1]];
|
|
661
661
|
}
|
|
662
662
|
return [null, void 0];
|
|
663
|
-
},
|
|
664
|
-
return typeof e == "string" ?
|
|
663
|
+
}, Ft = function(e) {
|
|
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 =
|
|
666
|
+
var n = F(e);
|
|
667
667
|
return { h: n.h, s: N(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
|
-
},
|
|
671
|
-
var n =
|
|
670
|
+
}, pe = function(e, t) {
|
|
671
|
+
var n = F(e);
|
|
672
672
|
return { h: n.h, s: n.s, l: N(n.l + 100 * t, 0, 100), a: n.a };
|
|
673
|
-
},
|
|
673
|
+
}, ge = (function() {
|
|
674
674
|
function e(t) {
|
|
675
|
-
this.parsed =
|
|
675
|
+
this.parsed = Ft(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
676
676
|
}
|
|
677
677
|
return e.prototype.isValid = function() {
|
|
678
678
|
return this.parsed !== null;
|
|
679
679
|
}, e.prototype.brightness = function() {
|
|
680
|
-
return
|
|
680
|
+
return x(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 ?
|
|
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;
|
|
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 jt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, B = 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
|
|
694
|
+
return he(F(this.rgba));
|
|
695
695
|
}, e.prototype.toHslString = function() {
|
|
696
|
-
return t =
|
|
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 + "%)";
|
|
697
697
|
var t, n, o, r, i;
|
|
698
698
|
}, e.prototype.toHsv = function() {
|
|
699
|
-
return t =
|
|
699
|
+
return t = Me(this.rgba), { h: x(t.h), s: x(t.s), v: x(t.v), a: x(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 });
|
|
@@ -708,27 +708,27 @@ var jt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, B = function(e) {
|
|
|
708
708
|
}, e.prototype.grayscale = function() {
|
|
709
709
|
return E(U(this.rgba, -1));
|
|
710
710
|
}, e.prototype.lighten = function(t) {
|
|
711
|
-
return t === void 0 && (t = 0.1), E(
|
|
711
|
+
return t === void 0 && (t = 0.1), E(pe(this.rgba, t));
|
|
712
712
|
}, e.prototype.darken = function(t) {
|
|
713
|
-
return t === void 0 && (t = 0.1), E(
|
|
713
|
+
return t === void 0 && (t = 0.1), E(pe(this.rgba, -t));
|
|
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 }) :
|
|
717
|
+
return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : x(this.rgba.a, 3);
|
|
718
718
|
var n;
|
|
719
719
|
}, e.prototype.hue = function(t) {
|
|
720
|
-
var n =
|
|
721
|
-
return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) :
|
|
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);
|
|
722
722
|
}, e.prototype.isEqual = function(t) {
|
|
723
723
|
return this.toHex() === E(t).toHex();
|
|
724
724
|
}, e;
|
|
725
725
|
})(), E = function(e) {
|
|
726
|
-
return e instanceof
|
|
726
|
+
return e instanceof ge ? e : new ge(e);
|
|
727
727
|
};
|
|
728
|
-
const { cssr:
|
|
729
|
-
function
|
|
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
730
|
return g([
|
|
731
|
-
|
|
731
|
+
W("chrome-tabs", {
|
|
732
732
|
display: "flex",
|
|
733
733
|
width: "100%",
|
|
734
734
|
height: "40px",
|
|
@@ -747,8 +747,8 @@ function Wt() {
|
|
|
747
747
|
opacity: 0
|
|
748
748
|
}),
|
|
749
749
|
g(".group-leave-active", {}),
|
|
750
|
-
|
|
751
|
-
|
|
750
|
+
y("prefix", {}),
|
|
751
|
+
y("icon", {
|
|
752
752
|
width: "28px",
|
|
753
753
|
height: "28px",
|
|
754
754
|
display: "flex",
|
|
@@ -768,7 +768,7 @@ function Wt() {
|
|
|
768
768
|
backgroundColor: "var(--primary-color)"
|
|
769
769
|
})
|
|
770
770
|
]),
|
|
771
|
-
|
|
771
|
+
y("content", {
|
|
772
772
|
flex: "1",
|
|
773
773
|
height: "100%",
|
|
774
774
|
minWidth: 0,
|
|
@@ -776,13 +776,13 @@ function Wt() {
|
|
|
776
776
|
marginLeft: "-6px",
|
|
777
777
|
padding: "0 10px"
|
|
778
778
|
}),
|
|
779
|
-
|
|
779
|
+
y("scroll", {
|
|
780
780
|
position: "relative",
|
|
781
781
|
display: "flex",
|
|
782
782
|
alignItems: "center",
|
|
783
783
|
height: "100%"
|
|
784
784
|
}, [
|
|
785
|
-
|
|
785
|
+
y("icon", {
|
|
786
786
|
marginLeft: "5px",
|
|
787
787
|
borderRadius: "50%",
|
|
788
788
|
backgroundColor: "transparent",
|
|
@@ -793,16 +793,16 @@ function Wt() {
|
|
|
793
793
|
})
|
|
794
794
|
])
|
|
795
795
|
]),
|
|
796
|
-
|
|
796
|
+
y("suffix", {})
|
|
797
797
|
]),
|
|
798
|
-
|
|
798
|
+
W("chrome-tabs-item", {
|
|
799
799
|
position: "relative",
|
|
800
800
|
margin: "0 -5px",
|
|
801
801
|
height: "100%",
|
|
802
802
|
flexShrink: 0,
|
|
803
803
|
cursor: "default",
|
|
804
804
|
userSelect: "none",
|
|
805
|
-
padding: "6px
|
|
805
|
+
padding: "6px 15px 0px 15px"
|
|
806
806
|
}, [
|
|
807
807
|
J("disabled", {
|
|
808
808
|
cursor: "not-allowed",
|
|
@@ -811,13 +811,13 @@ function Wt() {
|
|
|
811
811
|
filter: "grayscale(0.5)"
|
|
812
812
|
}),
|
|
813
813
|
J("active", [
|
|
814
|
-
|
|
814
|
+
y("background", {
|
|
815
815
|
opacity: 1
|
|
816
816
|
})
|
|
817
817
|
]),
|
|
818
818
|
ye("active", [
|
|
819
819
|
g("&:hover", {}, [
|
|
820
|
-
|
|
820
|
+
y("content", {
|
|
821
821
|
backgroundColor: "var(--primary-color)"
|
|
822
822
|
})
|
|
823
823
|
])
|
|
@@ -828,7 +828,7 @@ function Wt() {
|
|
|
828
828
|
g("&::last-child", {
|
|
829
829
|
marginRight: "0 !important"
|
|
830
830
|
}),
|
|
831
|
-
|
|
831
|
+
y("content", {
|
|
832
832
|
position: "relative",
|
|
833
833
|
zIndex: 1,
|
|
834
834
|
height: "28px",
|
|
@@ -839,8 +839,8 @@ function Wt() {
|
|
|
839
839
|
padding: "0 10px",
|
|
840
840
|
transition: T
|
|
841
841
|
}),
|
|
842
|
-
|
|
843
|
-
|
|
842
|
+
y("slot", {}),
|
|
843
|
+
y("icon", {
|
|
844
844
|
lineHeight: 1
|
|
845
845
|
}, [
|
|
846
846
|
g("svg", {
|
|
@@ -849,7 +849,7 @@ function Wt() {
|
|
|
849
849
|
fill: "currentColor"
|
|
850
850
|
})
|
|
851
851
|
]),
|
|
852
|
-
|
|
852
|
+
y("close", {
|
|
853
853
|
width: "16px",
|
|
854
854
|
height: "16px",
|
|
855
855
|
padding: "2px",
|
|
@@ -868,7 +868,7 @@ function Wt() {
|
|
|
868
868
|
fill: "currentColor"
|
|
869
869
|
})
|
|
870
870
|
]),
|
|
871
|
-
|
|
871
|
+
y("background", {
|
|
872
872
|
position: "absolute",
|
|
873
873
|
opacity: 0,
|
|
874
874
|
left: 0,
|
|
@@ -880,7 +880,7 @@ function Wt() {
|
|
|
880
880
|
alignItems: "flex-end",
|
|
881
881
|
transition: T
|
|
882
882
|
}, [
|
|
883
|
-
|
|
883
|
+
y("block", {
|
|
884
884
|
height: "100%",
|
|
885
885
|
flex: 1,
|
|
886
886
|
minWidth: 0,
|
|
@@ -891,7 +891,7 @@ function Wt() {
|
|
|
891
891
|
fill: "var(--active-background-color)"
|
|
892
892
|
})
|
|
893
893
|
]),
|
|
894
|
-
|
|
894
|
+
y("line", {
|
|
895
895
|
position: "absolute",
|
|
896
896
|
bottom: "12px",
|
|
897
897
|
right: "4px",
|
|
@@ -908,11 +908,11 @@ function Wt() {
|
|
|
908
908
|
])
|
|
909
909
|
]),
|
|
910
910
|
g(".dark", [
|
|
911
|
-
|
|
911
|
+
W("chrome-tabs", {
|
|
912
912
|
backgroundColor: "var(--background-color-dark)",
|
|
913
913
|
color: "var(--background-color)"
|
|
914
914
|
}, [
|
|
915
|
-
|
|
915
|
+
y("icon", {
|
|
916
916
|
backgroundColor: "var(--active-background-color-dark)"
|
|
917
917
|
}, [
|
|
918
918
|
g("&:hover", {
|
|
@@ -920,16 +920,16 @@ function Wt() {
|
|
|
920
920
|
})
|
|
921
921
|
])
|
|
922
922
|
]),
|
|
923
|
-
|
|
923
|
+
W("chrome-tabs-item", {}, [
|
|
924
924
|
ye("active", [
|
|
925
925
|
g("&:hover", {}, [
|
|
926
|
-
|
|
926
|
+
y("content", {
|
|
927
927
|
backgroundColor: "var(--primary-color-dark)"
|
|
928
928
|
})
|
|
929
929
|
])
|
|
930
930
|
]),
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
y("background", {}, [
|
|
932
|
+
y("block", {
|
|
933
933
|
backgroundColor: "var(--active-background-color-dark)"
|
|
934
934
|
}),
|
|
935
935
|
g("svg", {
|
|
@@ -945,234 +945,245 @@ const G = (e, t) => {
|
|
|
945
945
|
for (const [o, r] of t)
|
|
946
946
|
n[o] = r;
|
|
947
947
|
return n;
|
|
948
|
-
},
|
|
948
|
+
}, Ht = {
|
|
949
949
|
name: "RiAddLine"
|
|
950
|
-
},
|
|
950
|
+
}, Wt = {
|
|
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
|
-
function
|
|
957
|
-
return I(), A("svg",
|
|
958
|
-
|
|
956
|
+
function Kt(e, t, n, o, r, i) {
|
|
957
|
+
return I(), A("svg", Wt, t[0] || (t[0] = [
|
|
958
|
+
$("path", {
|
|
959
959
|
fill: "#757575",
|
|
960
960
|
d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
|
|
961
961
|
}, null, -1)
|
|
962
962
|
]));
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const qt = /* @__PURE__ */ G(Ht, [["render", Kt]]), Gt = {
|
|
965
965
|
name: "RiArrowDropDownLine"
|
|
966
|
-
},
|
|
966
|
+
}, Zt = {
|
|
967
967
|
xmlns: "http://www.w3.org/2000/svg",
|
|
968
968
|
width: "1em",
|
|
969
969
|
height: "1em",
|
|
970
970
|
viewBox: "0 0 24 24"
|
|
971
971
|
};
|
|
972
|
-
function
|
|
973
|
-
return I(), A("svg",
|
|
974
|
-
|
|
972
|
+
function Ut(e, t, n, o, r, i) {
|
|
973
|
+
return I(), A("svg", Zt, t[0] || (t[0] = [
|
|
974
|
+
$("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
|
|
980
|
+
const Yt = /* @__PURE__ */ G(Gt, [["render", Ut]]), Jt = {
|
|
981
981
|
name: "LineMdLoadingTwotoneLoop"
|
|
982
|
-
},
|
|
982
|
+
}, Qt = {
|
|
983
983
|
xmlns: "http://www.w3.org/2000/svg",
|
|
984
984
|
width: "1em",
|
|
985
985
|
height: "1em",
|
|
986
986
|
viewBox: "0 0 24 24"
|
|
987
987
|
};
|
|
988
|
-
function
|
|
989
|
-
return I(), A("svg",
|
|
990
|
-
|
|
988
|
+
function Xt(e, t, n, o, r, i) {
|
|
989
|
+
return I(), A("svg", Qt, t[0] || (t[0] = [
|
|
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
|
|
993
|
+
const _t = /* @__PURE__ */ G(Jt, [["render", Xt]]), en = {
|
|
994
994
|
name: "RiCloseLine"
|
|
995
|
-
},
|
|
995
|
+
}, tn = {
|
|
996
996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
997
997
|
width: "1em",
|
|
998
998
|
height: "1em",
|
|
999
999
|
viewBox: "0 0 24 24"
|
|
1000
1000
|
};
|
|
1001
|
-
function
|
|
1002
|
-
return I(), A("svg",
|
|
1003
|
-
|
|
1001
|
+
function nn(e, t, n, o, r, i) {
|
|
1002
|
+
return I(), A("svg", tn, t[0] || (t[0] = [
|
|
1003
|
+
$("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
|
|
1009
|
+
const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
|
|
1010
1010
|
__name: "TabItem",
|
|
1011
1011
|
props: {
|
|
1012
1012
|
label: { type: [String, Function] },
|
|
1013
1013
|
icon: { type: Function },
|
|
1014
|
-
closable: { type: Boolean },
|
|
1015
|
-
disabled: { type: Boolean },
|
|
1016
|
-
loading: { type: Boolean },
|
|
1014
|
+
closable: { type: [Boolean, Function] },
|
|
1015
|
+
disabled: { type: [Boolean, Function] },
|
|
1016
|
+
loading: { type: [Boolean, Function] },
|
|
1017
1017
|
loadingIcon: { type: Function },
|
|
1018
1018
|
onClick: { type: Function },
|
|
1019
1019
|
onContextMenu: { type: Function },
|
|
1020
1020
|
onClose: { type: Function },
|
|
1021
|
+
class: {},
|
|
1022
|
+
style: {},
|
|
1021
1023
|
activeIndex: { default: 0 },
|
|
1022
1024
|
itemIndex: {},
|
|
1023
|
-
itemKey: {}
|
|
1025
|
+
itemKey: {},
|
|
1026
|
+
iconSize: { default: 20 }
|
|
1024
1027
|
},
|
|
1025
1028
|
emits: ["itemClick", "itemContextmenu", "itemClose"],
|
|
1026
1029
|
setup(e, { emit: t }) {
|
|
1027
|
-
const n = t, o =
|
|
1028
|
-
function u(
|
|
1029
|
-
|
|
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
1033
|
}
|
|
1031
|
-
function
|
|
1032
|
-
n("itemContextmenu",
|
|
1034
|
+
function f(a) {
|
|
1035
|
+
n("itemContextmenu", a), e.onContextMenu?.(e.itemKey, e.itemIndex, a);
|
|
1033
1036
|
}
|
|
1034
|
-
function
|
|
1035
|
-
n("itemClose"), e.onClose?.(e.itemKey, e.itemIndex,
|
|
1037
|
+
function d(a) {
|
|
1038
|
+
n("itemClose"), e.onClose?.(e.itemKey, e.itemIndex, a);
|
|
1036
1039
|
}
|
|
1037
|
-
return (
|
|
1040
|
+
return (a, c) => (I(), A("div", {
|
|
1038
1041
|
class: C([
|
|
1039
1042
|
p(w),
|
|
1040
1043
|
{
|
|
1041
1044
|
[`${p(w)}--active`]: r.value,
|
|
1042
|
-
[`${p(w)}--disabled`]:
|
|
1045
|
+
[`${p(w)}--disabled`]: typeof a.disabled == "function" ? a.disabled(a.itemKey, a.itemIndex) : a.disabled
|
|
1043
1046
|
}
|
|
1044
1047
|
]),
|
|
1045
1048
|
onClick: u,
|
|
1046
|
-
onContextmenu:
|
|
1049
|
+
onContextmenu: f
|
|
1047
1050
|
}, [
|
|
1048
|
-
|
|
1051
|
+
$("div", {
|
|
1049
1052
|
class: C([`${p(w)}__content`])
|
|
1050
1053
|
}, [
|
|
1051
|
-
|
|
1052
|
-
class: C([`${p(w)}__icon`])
|
|
1054
|
+
$("div", {
|
|
1055
|
+
class: C([`${p(w)}__icon`]),
|
|
1056
|
+
style: _({ fontSize: `${a.iconSize}px` })
|
|
1053
1057
|
}, [
|
|
1054
|
-
(I(), ee(ie(
|
|
1055
|
-
],
|
|
1056
|
-
|
|
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)))
|
|
1059
|
+
], 6),
|
|
1060
|
+
$("div", {
|
|
1057
1061
|
class: C([`${p(w)}__slot`])
|
|
1058
1062
|
}, [
|
|
1059
1063
|
(I(), ee(ie(i.value)))
|
|
1060
1064
|
], 2),
|
|
1061
|
-
|
|
1065
|
+
(typeof a.closable == "function" ? a.closable(a.itemKey, a.itemIndex) : a.closable) ? (I(), A("div", {
|
|
1062
1066
|
key: 0,
|
|
1063
1067
|
class: C([`${p(w)}__close`]),
|
|
1064
|
-
onClick:
|
|
1068
|
+
onClick: Oe(d, ["stop"])
|
|
1065
1069
|
}, [
|
|
1066
|
-
K(
|
|
1070
|
+
K(on)
|
|
1067
1071
|
], 2)) : X("", !0)
|
|
1068
1072
|
], 2),
|
|
1069
|
-
|
|
1073
|
+
$("div", {
|
|
1070
1074
|
class: C([`${p(w)}__background`])
|
|
1071
1075
|
}, [
|
|
1072
|
-
|
|
1076
|
+
c[0] || (c[0] = $("svg", {
|
|
1073
1077
|
width: "10",
|
|
1074
1078
|
height: "10"
|
|
1075
1079
|
}, [
|
|
1076
|
-
|
|
1080
|
+
$("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
|
|
1077
1081
|
], -1)),
|
|
1078
|
-
|
|
1082
|
+
$("div", {
|
|
1079
1083
|
class: C([`${p(w)}__block`])
|
|
1080
1084
|
}, null, 2),
|
|
1081
|
-
|
|
1085
|
+
c[1] || (c[1] = $("svg", {
|
|
1082
1086
|
width: "10",
|
|
1083
1087
|
height: "10"
|
|
1084
1088
|
}, [
|
|
1085
|
-
|
|
1089
|
+
$("path", { d: "M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z" })
|
|
1086
1090
|
], -1))
|
|
1087
1091
|
], 2),
|
|
1088
|
-
|
|
1092
|
+
$("div", {
|
|
1089
1093
|
class: C([`${p(w)}__line`, o.value ? `${p(w)}__line--show` : ""])
|
|
1090
1094
|
}, null, 2)
|
|
1091
1095
|
], 34));
|
|
1092
1096
|
}
|
|
1093
|
-
}),
|
|
1097
|
+
}), un = /* @__PURE__ */ we({
|
|
1094
1098
|
__name: "Tabs",
|
|
1095
|
-
props:
|
|
1099
|
+
props: {
|
|
1100
|
+
value: {},
|
|
1096
1101
|
colors: {},
|
|
1097
1102
|
dropdown: { type: Boolean },
|
|
1098
1103
|
addable: { type: Boolean },
|
|
1099
|
-
options: {}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1104
|
+
options: {},
|
|
1105
|
+
loadingValue: {},
|
|
1106
|
+
iconSize: {},
|
|
1107
|
+
contentClass: {},
|
|
1108
|
+
contentStyle: {}
|
|
1109
|
+
},
|
|
1110
|
+
emits: ["update:value", "click", "contextmenu", "close", "add"],
|
|
1105
1111
|
setup(e, { emit: t }) {
|
|
1106
1112
|
const n = t;
|
|
1107
|
-
|
|
1108
|
-
const { background: o = "#
|
|
1109
|
-
|
|
1110
|
-
|
|
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();
|
|
1111
1117
|
}, {
|
|
1112
1118
|
immediate: !0
|
|
1113
1119
|
});
|
|
1114
|
-
const
|
|
1115
|
-
function
|
|
1116
|
-
n("click", h,
|
|
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);
|
|
1117
1123
|
}
|
|
1118
|
-
function
|
|
1119
|
-
n("contextmenu", h,
|
|
1124
|
+
function M(h, v) {
|
|
1125
|
+
n("contextmenu", h, v);
|
|
1120
1126
|
}
|
|
1121
|
-
function
|
|
1122
|
-
n("close", h,
|
|
1127
|
+
function l(h, v) {
|
|
1128
|
+
n("close", h, v);
|
|
1123
1129
|
}
|
|
1124
|
-
return (h,
|
|
1125
|
-
class: C([p(
|
|
1126
|
-
style:
|
|
1130
|
+
return (h, v) => (I(), A("div", {
|
|
1131
|
+
class: C([p(P)]),
|
|
1132
|
+
style: _({
|
|
1127
1133
|
"--background-color": `${p(o)}`,
|
|
1128
|
-
"--background-color-dark": `${
|
|
1134
|
+
"--background-color-dark": `${d.value}`,
|
|
1129
1135
|
"--active-background-color": `${p(r)}`,
|
|
1130
1136
|
"--active-background-color-dark": `${a.value}`,
|
|
1131
1137
|
"--primary-color": `${p(i)}`,
|
|
1132
|
-
"--primary-color-dark": `${
|
|
1138
|
+
"--primary-color-dark": `${c.value}`
|
|
1133
1139
|
})
|
|
1134
1140
|
}, [
|
|
1135
1141
|
h.dropdown ? (I(), A("div", {
|
|
1136
1142
|
key: 0,
|
|
1137
|
-
class: C([`${p(
|
|
1143
|
+
class: C([`${p(P)}__icon`])
|
|
1138
1144
|
}, [
|
|
1139
|
-
K(
|
|
1145
|
+
K(Yt)
|
|
1140
1146
|
], 2)) : X("", !0),
|
|
1141
|
-
|
|
1142
|
-
|
|
1147
|
+
se(h.$slots, "prefix"),
|
|
1148
|
+
$("div", {
|
|
1143
1149
|
ref_key: "scrollRef",
|
|
1144
|
-
ref:
|
|
1145
|
-
class: C([`${p(
|
|
1150
|
+
ref: u,
|
|
1151
|
+
class: C([`${p(P)}__content`, h.contentClass]),
|
|
1152
|
+
style: _(h.contentStyle)
|
|
1146
1153
|
}, [
|
|
1147
|
-
K(
|
|
1154
|
+
K(Ve, {
|
|
1148
1155
|
name: "group",
|
|
1149
1156
|
tag: "div",
|
|
1150
|
-
class: C([`${p(
|
|
1157
|
+
class: C([`${p(P)}__scroll`])
|
|
1151
1158
|
}, {
|
|
1152
|
-
default:
|
|
1153
|
-
(I(!0), A(
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
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)
|
|
1171
|
+
}), null, 16, ["loading", "item-key", "item-index", "active-index", "icon-size", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
|
|
1161
1172
|
]),
|
|
1162
1173
|
_: 1
|
|
1163
1174
|
}, 8, ["class"])
|
|
1164
|
-
],
|
|
1165
|
-
|
|
1175
|
+
], 6),
|
|
1176
|
+
se(h.$slots, "suffix"),
|
|
1166
1177
|
h.addable ? (I(), A("div", {
|
|
1167
1178
|
key: 1,
|
|
1168
|
-
class: C([`${p(
|
|
1169
|
-
onClick:
|
|
1179
|
+
class: C([`${p(P)}__icon`]),
|
|
1180
|
+
onClick: v[0] || (v[0] = (m) => n("add"))
|
|
1170
1181
|
}, [
|
|
1171
|
-
K(
|
|
1182
|
+
K(qt)
|
|
1172
1183
|
], 2)) : X("", !0)
|
|
1173
1184
|
], 6));
|
|
1174
1185
|
}
|
|
1175
1186
|
});
|
|
1176
1187
|
export {
|
|
1177
|
-
|
|
1188
|
+
un as CTabs
|
|
1178
1189
|
};
|