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