@cregis/ui 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +1256 -1257
- package/dist/types/index.d.ts +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { createI18n as Kn } from "vue-i18n";
|
|
2
|
-
import { defineComponent as oe, useSlots as Sn, ref as
|
|
3
|
-
import { EdsLoad as
|
|
2
|
+
import { defineComponent as oe, useSlots as Sn, ref as B, computed as p, openBlock as u, createElementBlock as m, normalizeClass as q, createElementVNode as C, mergeProps as Be, createBlock as de, resolveDynamicComponent as it, normalizeStyle as Z, renderSlot as ae, toDisplayString as _, createCommentVNode as j, unref as U, watch as le, nextTick as ge, onMounted as Ne, onBeforeUnmount as It, withDirectives as _e, vModelDynamic as Gn, withModifiers as Fe, vModelText as Zn, createVNode as ne, withCtx as ve, createTextVNode as ye, reactive as je, provide as Nt, toRef as ht, Fragment as ze, renderList as We, inject as jt, onUnmounted as Le, Transition as st, render as Ue, h as Ht, getCurrentScope as Qn, onScopeDispose as Jn, readonly as Ot, toHandlers as Tt, Teleport as _t, vShow as St, createSlots as on } from "vue";
|
|
3
|
+
import { EdsLoad as Vt, EdsCloseCircleFill as ea, EdsTickFill as Cn, EdsWarningFill as ta, EdsSearch as On, EdsArrowDownMiniIos as Ft, EdsArrowRightMiniIos as na, EdsAdd as sn, EdsClose as Ut, EdsWarningLonely as aa, EdsTimeWait as ia, EdsArrowRefuses as ra, EdsTick as la, EdsNoData as oa } from "@cregis/icon";
|
|
4
4
|
const sa = {
|
|
5
5
|
input: {
|
|
6
6
|
placeholder: "請輸入"
|
|
7
7
|
},
|
|
8
8
|
select: {
|
|
9
|
-
noData: "暂无数据",
|
|
10
9
|
noMatch: "无匹配数据",
|
|
11
10
|
search: "搜索"
|
|
12
11
|
},
|
|
13
12
|
cascader: {
|
|
14
|
-
noData: "暂无数据",
|
|
15
13
|
noMatch: "无匹配数据"
|
|
16
14
|
},
|
|
17
15
|
dialog: {
|
|
18
16
|
confirm: "确认",
|
|
19
17
|
cancel: "取消"
|
|
20
18
|
},
|
|
21
|
-
table: {
|
|
22
|
-
noData: "暂无数据"
|
|
23
|
-
},
|
|
24
19
|
upload: {
|
|
25
20
|
formatError: "文件格式不符合要求。",
|
|
26
21
|
sizeError: "文件大小不能超过 {size} MB。"
|
|
@@ -29,30 +24,27 @@ const sa = {
|
|
|
29
24
|
asc: "升序",
|
|
30
25
|
desc: "降序",
|
|
31
26
|
loading: "稍作等待",
|
|
32
|
-
noData: "暫無數據",
|
|
33
27
|
selected: "已選擇",
|
|
34
28
|
refreshed: "已刷新"
|
|
29
|
+
},
|
|
30
|
+
common: {
|
|
31
|
+
noData: "暫無數據"
|
|
35
32
|
}
|
|
36
33
|
}, ca = {
|
|
37
34
|
input: {
|
|
38
35
|
placeholder: "请输入"
|
|
39
36
|
},
|
|
40
37
|
select: {
|
|
41
|
-
noData: "暂无数据",
|
|
42
38
|
noMatch: "无匹配数据",
|
|
43
39
|
search: "搜索"
|
|
44
40
|
},
|
|
45
41
|
cascader: {
|
|
46
|
-
noData: "暂无数据",
|
|
47
42
|
noMatch: "无匹配数据"
|
|
48
43
|
},
|
|
49
44
|
dialog: {
|
|
50
45
|
confirm: "确认",
|
|
51
46
|
cancel: "取消"
|
|
52
47
|
},
|
|
53
|
-
table: {
|
|
54
|
-
noData: "暂无数据"
|
|
55
|
-
},
|
|
56
48
|
upload: {
|
|
57
49
|
formatError: "文件格式不符合要求。",
|
|
58
50
|
sizeError: "文件大小不能超过 {size} MB。"
|
|
@@ -61,30 +53,27 @@ const sa = {
|
|
|
61
53
|
asc: "升序",
|
|
62
54
|
desc: "降序",
|
|
63
55
|
loading: "稍作等待",
|
|
64
|
-
noData: "暂无数据",
|
|
65
56
|
selected: "已选择",
|
|
66
57
|
refreshed: "已刷新"
|
|
58
|
+
},
|
|
59
|
+
common: {
|
|
60
|
+
noData: "暂无数据"
|
|
67
61
|
}
|
|
68
62
|
}, ua = {
|
|
69
63
|
input: {
|
|
70
64
|
placeholder: "Please enter"
|
|
71
65
|
},
|
|
72
66
|
select: {
|
|
73
|
-
noData: "No data",
|
|
74
67
|
noMatch: "No matching data",
|
|
75
68
|
search: "Search"
|
|
76
69
|
},
|
|
77
70
|
cascader: {
|
|
78
|
-
noData: "No data",
|
|
79
71
|
noMatch: "No matching data"
|
|
80
72
|
},
|
|
81
73
|
dialog: {
|
|
82
74
|
confirm: "Confirm",
|
|
83
75
|
cancel: "Cancel"
|
|
84
76
|
},
|
|
85
|
-
table: {
|
|
86
|
-
noData: "No data"
|
|
87
|
-
},
|
|
88
77
|
upload: {
|
|
89
78
|
formatError: "The file format does not meet the requirements.",
|
|
90
79
|
sizeError: "The file size cannot exceed {size} MB."
|
|
@@ -93,9 +82,11 @@ const sa = {
|
|
|
93
82
|
asc: "Ascending",
|
|
94
83
|
desc: "Descending",
|
|
95
84
|
loading: "loading",
|
|
96
|
-
noData: "No data",
|
|
97
85
|
selected: "Selected",
|
|
98
86
|
refreshed: "Refreshed"
|
|
87
|
+
},
|
|
88
|
+
common: {
|
|
89
|
+
noData: "No Data"
|
|
99
90
|
}
|
|
100
91
|
};
|
|
101
92
|
let zt;
|
|
@@ -131,14 +122,14 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
131
122
|
isActive: { type: Boolean }
|
|
132
123
|
},
|
|
133
124
|
setup(e) {
|
|
134
|
-
const t = e, n = Sn(),
|
|
135
|
-
function
|
|
136
|
-
t.disabled || t.loading ||
|
|
125
|
+
const t = e, n = Sn(), a = B(null);
|
|
126
|
+
function i() {
|
|
127
|
+
t.disabled || t.loading || a.value?.click();
|
|
137
128
|
}
|
|
138
129
|
const r = p(() => {
|
|
139
130
|
const c = t, d = n.icon;
|
|
140
131
|
return !c.icon && typeof d == "function";
|
|
141
|
-
}),
|
|
132
|
+
}), o = p(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), l = p(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), s = p(() => t.width ? { width: t.width } : void 0), v = p(() => {
|
|
142
133
|
if (t.plain || t.text)
|
|
143
134
|
switch (t.type) {
|
|
144
135
|
case "primary":
|
|
@@ -155,13 +146,13 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
155
146
|
else
|
|
156
147
|
return t.type === "secondary" ? "var(--material-base-secondary)" : t.type === "foreground" ? "var(--text-face-primary)" : t.type === "sameWhite" ? "var(--text-same-black-primary)" : "var(--material-same-white-primary)";
|
|
157
148
|
});
|
|
158
|
-
return (c, d) => e.icon || c.$slots.icon ? (u(),
|
|
149
|
+
return (c, d) => e.icon || c.$slots.icon ? (u(), m("div", {
|
|
159
150
|
key: 0,
|
|
160
151
|
class: q(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
|
|
161
152
|
}, [
|
|
162
|
-
|
|
153
|
+
C("button", Be({
|
|
163
154
|
ref_key: "iconButtonRef",
|
|
164
|
-
ref:
|
|
155
|
+
ref: a
|
|
165
156
|
}, c.$attrs, {
|
|
166
157
|
class: ["cregis-button__icon", {
|
|
167
158
|
[`cregis-button__icon--${e.iconType}`]: e.iconType,
|
|
@@ -174,21 +165,21 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
174
165
|
}), [
|
|
175
166
|
e.icon ? (u(), de(it(e.icon), {
|
|
176
167
|
key: 0,
|
|
177
|
-
size:
|
|
178
|
-
}, null, 8, ["size"])) : (u(),
|
|
168
|
+
size: o.value
|
|
169
|
+
}, null, 8, ["size"])) : (u(), m("span", {
|
|
179
170
|
key: 1,
|
|
180
171
|
class: "cregis-button__icon-slot-inner",
|
|
181
|
-
style: Z({ "--cregis-btn-icon-slot-size":
|
|
172
|
+
style: Z({ "--cregis-btn-icon-slot-size": o.value })
|
|
182
173
|
}, [
|
|
183
174
|
ae(c.$slots, "icon")
|
|
184
175
|
], 4))
|
|
185
176
|
], 16, da),
|
|
186
|
-
e.iconText ? (u(),
|
|
177
|
+
e.iconText ? (u(), m("span", {
|
|
187
178
|
key: 0,
|
|
188
179
|
class: q(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
|
|
189
|
-
onClick:
|
|
190
|
-
},
|
|
191
|
-
], 2)) : e.link ? (u(),
|
|
180
|
+
onClick: i
|
|
181
|
+
}, _(e.iconText), 3)) : j("", !0)
|
|
182
|
+
], 2)) : e.link ? (u(), m("button", Be({ key: 1 }, c.$attrs, {
|
|
192
183
|
class: ["cregis-button__link", {
|
|
193
184
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
194
185
|
[`cregis-button__link--${e.size}`]: e.size,
|
|
@@ -198,11 +189,11 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
198
189
|
disabled: e.disabled || e.loading
|
|
199
190
|
}), [
|
|
200
191
|
ae(c.$slots, "default")
|
|
201
|
-
], 16, fa)) : (u(),
|
|
192
|
+
], 16, fa)) : (u(), m("button", Be({
|
|
202
193
|
key: 2,
|
|
203
194
|
ref: "buttonRef"
|
|
204
195
|
}, c.$attrs, {
|
|
205
|
-
style:
|
|
196
|
+
style: s.value,
|
|
206
197
|
class: ["cregis-button", {
|
|
207
198
|
[`cregis-button--${e.type}`]: e.type,
|
|
208
199
|
[`cregis-button--${e.size}`]: e.size,
|
|
@@ -216,7 +207,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
216
207
|
}],
|
|
217
208
|
disabled: e.disabled || e.loading
|
|
218
209
|
}), [
|
|
219
|
-
e.loading ? (u(), de(U(
|
|
210
|
+
e.loading ? (u(), de(U(Vt), {
|
|
220
211
|
key: 0,
|
|
221
212
|
class: "loading",
|
|
222
213
|
size: l.value,
|
|
@@ -252,148 +243,148 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
252
243
|
},
|
|
253
244
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
|
|
254
245
|
setup(e, { expose: t, emit: n }) {
|
|
255
|
-
const
|
|
246
|
+
const a = e, i = n, r = (f) => {
|
|
256
247
|
if (f === "" || f === null || f === void 0) return "";
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
259
|
-
const
|
|
260
|
-
if (!Number.isNaN(
|
|
261
|
-
if (/^-/.test(
|
|
262
|
-
const ee =
|
|
248
|
+
const S = String(f).trim();
|
|
249
|
+
if (S === "") return "";
|
|
250
|
+
const M = Number(S.replace(/,/g, ""));
|
|
251
|
+
if (!Number.isNaN(M) && M < 0) return Math.abs(M);
|
|
252
|
+
if (/^-/.test(S)) {
|
|
253
|
+
const ee = S.replace(/^-+/, "");
|
|
263
254
|
return ee === "" ? "" : ee;
|
|
264
255
|
}
|
|
265
256
|
return f;
|
|
266
|
-
},
|
|
267
|
-
const f =
|
|
257
|
+
}, o = p(() => {
|
|
258
|
+
const f = a.decimals;
|
|
268
259
|
return f === void 0 || !Number.isFinite(f) ? null : Math.max(0, Math.floor(f));
|
|
269
|
-
}), l = p(() =>
|
|
260
|
+
}), l = p(() => a.type === "number" && o.value !== null), s = p(() => l.value ? "text" : a.type), v = p(() => l.value ? "decimal" : void 0), c = (f) => f.replace(/[,,。.]/g, "."), d = (f) => {
|
|
270
261
|
if (f === "" || f === null || f === void 0) return "";
|
|
271
|
-
let
|
|
272
|
-
if (
|
|
273
|
-
let
|
|
274
|
-
!
|
|
275
|
-
const ee =
|
|
276
|
-
return ee !== -1 && (
|
|
262
|
+
let S = c(String(f).trim());
|
|
263
|
+
if (S === "") return "";
|
|
264
|
+
let M = !1;
|
|
265
|
+
!a.nonNegative && S.startsWith("-") && (M = !0, S = S.slice(1)), S = S.replace(/[^\d.]/g, "");
|
|
266
|
+
const ee = S.indexOf(".");
|
|
267
|
+
return ee !== -1 && (S = S.slice(0, ee + 1) + S.slice(ee + 1).replace(/\./g, "")), (M ? "-" : "") + S;
|
|
277
268
|
}, g = (f) => {
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
269
|
+
const S = o.value;
|
|
270
|
+
if (S === null) return f;
|
|
280
271
|
if (f === "" || f === null || f === void 0) return "";
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
283
|
-
const ee =
|
|
284
|
-
let ce = ee ?
|
|
272
|
+
const M = String(f).trim();
|
|
273
|
+
if (M === "") return "";
|
|
274
|
+
const ee = M.startsWith("-");
|
|
275
|
+
let ce = ee ? M.slice(1) : M;
|
|
285
276
|
const b = ce.indexOf(".");
|
|
286
277
|
if (b === -1) return f;
|
|
287
278
|
const ie = ce.slice(0, b), re = ce.slice(b + 1);
|
|
288
|
-
return
|
|
289
|
-
},
|
|
290
|
-
let
|
|
291
|
-
return l.value && (
|
|
292
|
-
}, y =
|
|
293
|
-
|
|
279
|
+
return S === 0 ? (ee ? "-" : "") + ie : re.length <= S ? f : (ee ? "-" : "") + ie + "." + re.slice(0, S);
|
|
280
|
+
}, h = (f) => {
|
|
281
|
+
let S = f;
|
|
282
|
+
return l.value && (S = d(S)), a.nonNegative && (S = r(S)), o.value !== null && (S = g(S)), S;
|
|
283
|
+
}, y = B(
|
|
284
|
+
a.type === "number" ? h(a.modelValue) : a.modelValue
|
|
294
285
|
);
|
|
295
286
|
le(
|
|
296
|
-
() =>
|
|
287
|
+
() => a.modelValue,
|
|
297
288
|
(f) => {
|
|
298
|
-
y.value =
|
|
289
|
+
y.value = a.type === "number" ? h(f) : f, ge(() => te());
|
|
299
290
|
}
|
|
300
291
|
);
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
const
|
|
304
|
-
await ge(),
|
|
305
|
-
},
|
|
306
|
-
if (
|
|
307
|
-
const f =
|
|
292
|
+
const $ = B(), z = B(), V = B(0), N = B(!1), A = B(!1);
|
|
293
|
+
let O = null, k = null, x = null;
|
|
294
|
+
const E = async () => {
|
|
295
|
+
await ge(), $.value?.focus();
|
|
296
|
+
}, L = async () => {
|
|
297
|
+
if (a.type === "number") {
|
|
298
|
+
const f = h(y.value);
|
|
308
299
|
f !== y.value && (y.value = f);
|
|
309
300
|
}
|
|
310
|
-
|
|
301
|
+
i("update:modelValue", y.value), i("input", y.value), await ge(), G(), te();
|
|
311
302
|
}, Y = () => {
|
|
312
|
-
|
|
303
|
+
i("change", y.value);
|
|
313
304
|
}, X = (f) => {
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
}, se = p(() =>
|
|
318
|
-
y.value = "",
|
|
305
|
+
N.value = !0, i("focus", f);
|
|
306
|
+
}, D = (f) => {
|
|
307
|
+
N.value = !1, i("blur", f);
|
|
308
|
+
}, se = p(() => a.clearable && !a.disabled && !!y.value && N.value), Q = () => {
|
|
309
|
+
y.value = "", i("update:modelValue", ""), i("clear"), i("input", ""), i("change", ""), ge(() => te());
|
|
319
310
|
}, te = () => {
|
|
320
|
-
if (
|
|
321
|
-
|
|
311
|
+
if (a.type !== "textarea" || a.disabled) {
|
|
312
|
+
A.value = !1;
|
|
322
313
|
return;
|
|
323
314
|
}
|
|
324
|
-
|
|
325
|
-
const f =
|
|
326
|
-
if (!f || f.tagName !== "TEXTAREA" ||
|
|
327
|
-
|
|
315
|
+
k && cancelAnimationFrame(k), k = requestAnimationFrame(() => {
|
|
316
|
+
const f = $.value, S = z.value;
|
|
317
|
+
if (!f || f.tagName !== "TEXTAREA" || !S) {
|
|
318
|
+
A.value = !1;
|
|
328
319
|
return;
|
|
329
320
|
}
|
|
330
|
-
const
|
|
321
|
+
const M = f;
|
|
331
322
|
if (!String(y.value)) {
|
|
332
|
-
|
|
323
|
+
A.value = !1;
|
|
333
324
|
return;
|
|
334
325
|
}
|
|
335
|
-
const ee = window.getComputedStyle(
|
|
336
|
-
|
|
326
|
+
const ee = window.getComputedStyle(M), ce = parseFloat(ee.paddingBottom) || 0, b = S.getBoundingClientRect().top - M.getBoundingClientRect().top;
|
|
327
|
+
A.value = M.scrollHeight - ce > M.scrollTop + b + 0.5;
|
|
337
328
|
});
|
|
338
329
|
}, pe = () => {
|
|
339
330
|
te();
|
|
340
331
|
}, G = () => {
|
|
341
|
-
|
|
342
|
-
if (
|
|
343
|
-
const f =
|
|
344
|
-
|
|
332
|
+
O && cancelAnimationFrame(O), O = requestAnimationFrame(() => {
|
|
333
|
+
if (!$.value || $.value.tagName !== "INPUT") return;
|
|
334
|
+
const f = $.value, S = f.value, M = document.createElement("span");
|
|
335
|
+
M.style.position = "absolute", M.style.visibility = "hidden", M.style.whiteSpace = "pre", M.style.font = window.getComputedStyle(f).font, M.style.letterSpacing = window.getComputedStyle(f).letterSpacing, M.textContent = S || " ", document.body.appendChild(M), V.value = M.getBoundingClientRect().width, document.body.removeChild(M);
|
|
345
336
|
});
|
|
346
|
-
},
|
|
337
|
+
}, W = p(() => {
|
|
347
338
|
const f = {};
|
|
348
|
-
return
|
|
349
|
-
}),
|
|
339
|
+
return V.value > 0 && (f.position = "absolute", f.left = `${V.value + 16}px`), f;
|
|
340
|
+
}), I = async () => {
|
|
350
341
|
try {
|
|
351
|
-
y.value = await navigator.clipboard.readText(),
|
|
342
|
+
y.value = await navigator.clipboard.readText(), i("update:modelValue", y.value), await ge(), te();
|
|
352
343
|
} catch (f) {
|
|
353
344
|
console.error("paste error:", f);
|
|
354
345
|
}
|
|
355
346
|
};
|
|
356
347
|
le(
|
|
357
|
-
() => [
|
|
348
|
+
() => [a.rows, a.disabled],
|
|
358
349
|
() => ge(() => te())
|
|
359
|
-
),
|
|
360
|
-
|
|
361
|
-
te(), !(
|
|
350
|
+
), Ne(() => {
|
|
351
|
+
a.type === "textarea" && ge(() => {
|
|
352
|
+
te(), !(!$.value || typeof ResizeObserver > "u") && (x = new ResizeObserver(() => te()), x.observe($.value));
|
|
362
353
|
});
|
|
363
|
-
}),
|
|
364
|
-
|
|
354
|
+
}), It(() => {
|
|
355
|
+
k && cancelAnimationFrame(k), x?.disconnect();
|
|
365
356
|
});
|
|
366
|
-
const
|
|
367
|
-
if (
|
|
368
|
-
const
|
|
369
|
-
if ((
|
|
357
|
+
const R = p(() => a.type === "number" && a.nonNegative ? 0 : void 0), F = (f) => f === "." || f === "," || f === "," || f === "。" || f === "." || f === "Decimal", J = (f) => {
|
|
358
|
+
if (a.type !== "number" || f.isComposing) return;
|
|
359
|
+
const S = o.value;
|
|
360
|
+
if ((a.nonNegative || S !== null) && (f.key === "e" || f.key === "E")) {
|
|
370
361
|
f.preventDefault();
|
|
371
362
|
return;
|
|
372
363
|
}
|
|
373
|
-
if (
|
|
364
|
+
if (a.nonNegative && (f.key === "-" || f.key === "+")) {
|
|
374
365
|
f.preventDefault();
|
|
375
366
|
return;
|
|
376
367
|
}
|
|
377
|
-
if (
|
|
368
|
+
if (S === 0 && F(f.key)) {
|
|
378
369
|
f.preventDefault();
|
|
379
370
|
return;
|
|
380
371
|
}
|
|
381
|
-
if (
|
|
382
|
-
const
|
|
383
|
-
c(
|
|
372
|
+
if (S !== null && S > 0 && F(f.key)) {
|
|
373
|
+
const M = f.target;
|
|
374
|
+
c(M.value).includes(".") && f.preventDefault();
|
|
384
375
|
return;
|
|
385
376
|
}
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
377
|
+
if (S !== null && S > 0 && f.key !== "." && /^\d$/.test(f.key)) {
|
|
378
|
+
const M = f.target, ee = c(M.value), ce = M.selectionStart, b = M.selectionEnd;
|
|
388
379
|
if (ce === null || b === null) return;
|
|
389
380
|
const ie = ee.slice(0, ce) + f.key + ee.slice(b), re = ie.indexOf(".");
|
|
390
|
-
re !== -1 && ie.slice(re + 1).replace(/\D/g, "").length >
|
|
381
|
+
re !== -1 && ie.slice(re + 1).replace(/\D/g, "").length > S && f.preventDefault();
|
|
391
382
|
}
|
|
392
383
|
};
|
|
393
384
|
return t({
|
|
394
|
-
focus:
|
|
385
|
+
focus: E,
|
|
395
386
|
updateTextWidth: G
|
|
396
|
-
}), (f,
|
|
387
|
+
}), (f, S) => e.type !== "textarea" ? (u(), m("div", {
|
|
397
388
|
key: 0,
|
|
398
389
|
class: q(["cregis-input", {
|
|
399
390
|
[`cregis-input--${e.size}`]: e.size,
|
|
@@ -403,84 +394,84 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
403
394
|
}]),
|
|
404
395
|
style: Z([{ width: e.width }, e.inputStyle])
|
|
405
396
|
}, [
|
|
406
|
-
|
|
407
|
-
class: q(["cregis-input__wrapper", { "is-focus":
|
|
397
|
+
C("div", {
|
|
398
|
+
class: q(["cregis-input__wrapper", { "is-focus": N.value }])
|
|
408
399
|
}, [
|
|
409
|
-
f.$slots.prefix ? (u(),
|
|
400
|
+
f.$slots.prefix ? (u(), m("span", pa, [
|
|
410
401
|
ae(f.$slots, "prefix")
|
|
411
|
-
])) :
|
|
412
|
-
_e(
|
|
402
|
+
])) : j("", !0),
|
|
403
|
+
_e(C("input", Be({
|
|
413
404
|
class: "cregis-input__inner",
|
|
414
|
-
"onUpdate:modelValue":
|
|
405
|
+
"onUpdate:modelValue": S[0] || (S[0] = (M) => y.value = M),
|
|
415
406
|
ref_key: "inputRef",
|
|
416
|
-
ref:
|
|
417
|
-
type:
|
|
407
|
+
ref: $,
|
|
408
|
+
type: s.value,
|
|
418
409
|
inputmode: v.value,
|
|
419
410
|
placeholder: e.placeholder || U(he)("input.placeholder")
|
|
420
411
|
}, f.$attrs, {
|
|
421
|
-
min:
|
|
412
|
+
min: R.value,
|
|
422
413
|
spellcheck: "false",
|
|
423
414
|
disabled: e.disabled,
|
|
424
|
-
onInput:
|
|
415
|
+
onInput: L,
|
|
425
416
|
onChange: Y,
|
|
426
417
|
onFocus: X,
|
|
427
|
-
onBlur:
|
|
418
|
+
onBlur: D,
|
|
428
419
|
onKeydown: J
|
|
429
420
|
}), null, 16, ma), [
|
|
430
421
|
[Gn, y.value]
|
|
431
422
|
]),
|
|
432
|
-
e.unit && y.value ? (u(),
|
|
423
|
+
e.unit && y.value ? (u(), m("span", {
|
|
433
424
|
key: 1,
|
|
434
|
-
style: Z(
|
|
425
|
+
style: Z(W.value),
|
|
435
426
|
class: "cregis-input__unit"
|
|
436
|
-
},
|
|
437
|
-
f.$slots.suffix || se.value ? (u(),
|
|
427
|
+
}, _(e.unit), 5)) : j("", !0),
|
|
428
|
+
f.$slots.suffix || se.value ? (u(), m("span", ha, [
|
|
438
429
|
ae(f.$slots, "suffix"),
|
|
439
430
|
se.value ? (u(), de(He, {
|
|
440
431
|
key: 0,
|
|
441
432
|
icon: U(ea),
|
|
442
433
|
"icon-type": "square",
|
|
443
434
|
onClick: Q,
|
|
444
|
-
onMousedown:
|
|
435
|
+
onMousedown: S[1] || (S[1] = Fe(() => {
|
|
445
436
|
}, ["prevent"]))
|
|
446
|
-
}, null, 8, ["icon"])) :
|
|
447
|
-
])) :
|
|
437
|
+
}, null, 8, ["icon"])) : j("", !0)
|
|
438
|
+
])) : j("", !0)
|
|
448
439
|
], 2)
|
|
449
|
-
], 6)) : (u(),
|
|
440
|
+
], 6)) : (u(), m("div", {
|
|
450
441
|
key: 1,
|
|
451
442
|
class: q(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
452
443
|
style: Z([{ width: e.width }, e.inputStyle])
|
|
453
444
|
}, [
|
|
454
|
-
_e(
|
|
445
|
+
_e(C("textarea", Be({ class: "cregis-textarea__wrapper" }, f.$attrs, {
|
|
455
446
|
spellcheck: "false",
|
|
456
447
|
ref_key: "inputRef",
|
|
457
|
-
ref:
|
|
448
|
+
ref: $,
|
|
458
449
|
disabled: e.disabled,
|
|
459
450
|
placeholder: e.placeholder || U(he)("input.placeholder"),
|
|
460
451
|
rows: e.rows,
|
|
461
|
-
"onUpdate:modelValue":
|
|
462
|
-
onInput:
|
|
452
|
+
"onUpdate:modelValue": S[2] || (S[2] = (M) => y.value = M),
|
|
453
|
+
onInput: L,
|
|
463
454
|
onChange: Y,
|
|
464
455
|
onFocus: X,
|
|
465
|
-
onBlur:
|
|
456
|
+
onBlur: D,
|
|
466
457
|
onScroll: pe
|
|
467
458
|
}), null, 16, ga), [
|
|
468
459
|
[Zn, y.value]
|
|
469
460
|
]),
|
|
470
|
-
e.disabled ?
|
|
461
|
+
e.disabled ? j("", !0) : (u(), m("div", {
|
|
471
462
|
key: 0,
|
|
472
463
|
ref_key: "textareaButtonsRef",
|
|
473
|
-
ref:
|
|
474
|
-
class: q(["cregis-textarea__buttons", { "has-bg":
|
|
464
|
+
ref: z,
|
|
465
|
+
class: q(["cregis-textarea__buttons", { "has-bg": A.value }])
|
|
475
466
|
}, [
|
|
476
467
|
ne(He, {
|
|
477
468
|
class: "cregis-textarea__button",
|
|
478
469
|
link: "",
|
|
479
470
|
size: "small",
|
|
480
|
-
onClick:
|
|
471
|
+
onClick: I
|
|
481
472
|
}, {
|
|
482
473
|
default: ve(() => [
|
|
483
|
-
ye(
|
|
474
|
+
ye(_(e.pasteText), 1)
|
|
484
475
|
]),
|
|
485
476
|
_: 1
|
|
486
477
|
}),
|
|
@@ -492,7 +483,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
492
483
|
onClick: Q
|
|
493
484
|
}, {
|
|
494
485
|
default: ve(() => [
|
|
495
|
-
ye(
|
|
486
|
+
ye(_(e.clearText), 1)
|
|
496
487
|
]),
|
|
497
488
|
_: 1
|
|
498
489
|
}, 8, ["disabled"])
|
|
@@ -510,7 +501,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
510
501
|
size: { default: "16px" }
|
|
511
502
|
},
|
|
512
503
|
setup(e) {
|
|
513
|
-
return (t, n) => (u(),
|
|
504
|
+
return (t, n) => (u(), m("svg", {
|
|
514
505
|
width: e.size,
|
|
515
506
|
height: e.size,
|
|
516
507
|
viewBox: "0 0 16 16",
|
|
@@ -518,16 +509,16 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
518
509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
519
510
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
520
511
|
}, [
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
512
|
+
C("g", ya, [
|
|
513
|
+
C("g", wa, [
|
|
514
|
+
C("g", xa, [
|
|
515
|
+
C("rect", {
|
|
525
516
|
x: "0",
|
|
526
517
|
y: "0",
|
|
527
518
|
width: e.size,
|
|
528
519
|
height: e.size
|
|
529
520
|
}, null, 8, ka),
|
|
530
|
-
n[0] || (n[0] =
|
|
521
|
+
n[0] || (n[0] = C("path", {
|
|
531
522
|
d: "M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",
|
|
532
523
|
fill: "currentColor",
|
|
533
524
|
"fill-rule": "nonzero"
|
|
@@ -552,39 +543,39 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
552
543
|
},
|
|
553
544
|
emits: ["update:modelValue", "change"],
|
|
554
545
|
setup(e, { emit: t }) {
|
|
555
|
-
const n = e,
|
|
556
|
-
n.disabled ||
|
|
546
|
+
const n = e, a = t, i = p(() => n.modelValue), r = () => {
|
|
547
|
+
n.disabled || a("update:modelValue", !i.value);
|
|
557
548
|
};
|
|
558
549
|
return le(
|
|
559
|
-
() =>
|
|
550
|
+
() => i.value,
|
|
560
551
|
() => {
|
|
561
|
-
|
|
552
|
+
a("change", i.value);
|
|
562
553
|
}
|
|
563
|
-
), (
|
|
554
|
+
), (o, l) => (u(), m("div", {
|
|
564
555
|
class: "cregis-checkbox__wrapper",
|
|
565
556
|
onClick: r
|
|
566
557
|
}, [
|
|
567
|
-
|
|
558
|
+
C("div", {
|
|
568
559
|
class: q(["cregis-checkbox", {
|
|
569
560
|
"is-disabled": e.disabled,
|
|
570
|
-
"is-checked":
|
|
561
|
+
"is-checked": i.value,
|
|
571
562
|
"is-circle": e.circle,
|
|
572
563
|
"is-indeterminate": e.indeterminate
|
|
573
564
|
}])
|
|
574
565
|
}, [
|
|
575
|
-
e.indeterminate ? (u(),
|
|
566
|
+
e.indeterminate ? (u(), m("div", $a)) : (u(), de(En, {
|
|
576
567
|
key: 1,
|
|
577
568
|
size: "10px"
|
|
578
569
|
}))
|
|
579
570
|
], 2),
|
|
580
|
-
|
|
571
|
+
o.$slots.default || e.label ? (u(), m("span", {
|
|
581
572
|
key: 0,
|
|
582
573
|
class: q(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
583
574
|
}, [
|
|
584
|
-
ae(
|
|
585
|
-
ye(
|
|
575
|
+
ae(o.$slots, "default", {}, () => [
|
|
576
|
+
ye(_(e.label), 1)
|
|
586
577
|
])
|
|
587
|
-
], 2)) :
|
|
578
|
+
], 2)) : j("", !0)
|
|
588
579
|
]));
|
|
589
580
|
}
|
|
590
581
|
}), Ml = /* @__PURE__ */ oe({
|
|
@@ -598,32 +589,32 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
598
589
|
},
|
|
599
590
|
emits: ["update:modelValue", "change"],
|
|
600
591
|
setup(e, { emit: t }) {
|
|
601
|
-
const n = e,
|
|
602
|
-
n.disabled || (
|
|
592
|
+
const n = e, a = t, i = p(() => n.modelValue === n.value), r = () => {
|
|
593
|
+
n.disabled || (a("update:modelValue", n.value), a("change", n.value));
|
|
603
594
|
};
|
|
604
|
-
return (
|
|
595
|
+
return (o, l) => (u(), m("div", {
|
|
605
596
|
class: "cregis-radio__wrapper",
|
|
606
597
|
onClick: r
|
|
607
598
|
}, [
|
|
608
|
-
|
|
599
|
+
C("div", {
|
|
609
600
|
class: q(["cregis-radio", {
|
|
610
601
|
"is-disabled": e.disabled,
|
|
611
|
-
"is-checked":
|
|
602
|
+
"is-checked": i.value
|
|
612
603
|
}])
|
|
613
604
|
}, [...l[0] || (l[0] = [
|
|
614
|
-
|
|
605
|
+
C("div", { class: "cregis-radio__inner" }, null, -1)
|
|
615
606
|
])], 2),
|
|
616
|
-
|
|
607
|
+
o.$slots.default || e.label ? (u(), m("span", {
|
|
617
608
|
key: 0,
|
|
618
609
|
class: q(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
619
610
|
}, [
|
|
620
|
-
ae(
|
|
621
|
-
ye(
|
|
611
|
+
ae(o.$slots, "default", {}, () => [
|
|
612
|
+
ye(_(e.label), 1)
|
|
622
613
|
])
|
|
623
|
-
], 2)) :
|
|
614
|
+
], 2)) : j("", !0)
|
|
624
615
|
]));
|
|
625
616
|
}
|
|
626
|
-
}),
|
|
617
|
+
}), Il = /* @__PURE__ */ oe({
|
|
627
618
|
name: "Divider",
|
|
628
619
|
__name: "Divider",
|
|
629
620
|
props: {
|
|
@@ -637,11 +628,11 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
637
628
|
setup(e) {
|
|
638
629
|
const t = e, n = p(() => {
|
|
639
630
|
if (Array.isArray(t.margin)) {
|
|
640
|
-
const [
|
|
641
|
-
return t.direction === "horizontal" ? `${
|
|
631
|
+
const [i, r] = t.margin;
|
|
632
|
+
return t.direction === "horizontal" ? `${i} 0 ${r} 0` : `0 ${r} 0 ${i}`;
|
|
642
633
|
} else
|
|
643
634
|
return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
|
|
644
|
-
}),
|
|
635
|
+
}), a = p(() => t.direction === "horizontal" ? {
|
|
645
636
|
width: t.length || "100%",
|
|
646
637
|
borderTopWidth: t.lineThickness,
|
|
647
638
|
borderTopStyle: t.borderStyle,
|
|
@@ -654,14 +645,14 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
654
645
|
borderLeftColor: t.color,
|
|
655
646
|
margin: n.value
|
|
656
647
|
});
|
|
657
|
-
return (
|
|
648
|
+
return (i, r) => (u(), m("div", {
|
|
658
649
|
class: q(["cregis-divider", {
|
|
659
650
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
660
651
|
}]),
|
|
661
|
-
style: Z(
|
|
652
|
+
style: Z(a.value)
|
|
662
653
|
}, null, 6));
|
|
663
654
|
}
|
|
664
|
-
}), Rn = Symbol("TABS_KEY"), Sa = ["onClick"], Ca = { style: { display: "none" } },
|
|
655
|
+
}), Rn = Symbol("TABS_KEY"), Sa = ["onClick"], Ca = { style: { display: "none" } }, Nl = /* @__PURE__ */ oe({
|
|
665
656
|
name: "Tabs",
|
|
666
657
|
__name: "Tabs",
|
|
667
658
|
props: {
|
|
@@ -671,10 +662,10 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
671
662
|
},
|
|
672
663
|
emits: ["update:modelValue"],
|
|
673
664
|
setup(e) {
|
|
674
|
-
const t = e, n = je([]),
|
|
675
|
-
n.some((l) => l.name ===
|
|
676
|
-
},
|
|
677
|
-
const l = n.findIndex((
|
|
665
|
+
const t = e, n = je([]), a = (o) => {
|
|
666
|
+
n.some((l) => l.name === o.name) || n.push(o);
|
|
667
|
+
}, i = (o) => {
|
|
668
|
+
const l = n.findIndex((s) => s.name === o);
|
|
678
669
|
l !== -1 && n.splice(l, 1);
|
|
679
670
|
}, r = p(() => t.type === "card" ? t.size === "large" ? {
|
|
680
671
|
borderRadius: "13px"
|
|
@@ -685,26 +676,26 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
685
676
|
} : {
|
|
686
677
|
borderRadius: 0
|
|
687
678
|
});
|
|
688
|
-
return
|
|
679
|
+
return Nt(Rn, {
|
|
689
680
|
activeName: ht(t, "modelValue"),
|
|
690
|
-
registerTab:
|
|
691
|
-
unregisterTab:
|
|
692
|
-
}), (
|
|
681
|
+
registerTab: a,
|
|
682
|
+
unregisterTab: i
|
|
683
|
+
}), (o, l) => (u(), m("div", {
|
|
693
684
|
class: q(["cregis-tabs", {
|
|
694
685
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
695
686
|
[`cregis-tabs--${e.size}`]: e.size
|
|
696
687
|
}])
|
|
697
688
|
}, [
|
|
698
|
-
(u(!0),
|
|
699
|
-
key:
|
|
700
|
-
class: q(["cregis-tabs__item", { "is-active": e.modelValue ===
|
|
689
|
+
(u(!0), m(ze, null, We(n, (s) => (u(), m("div", {
|
|
690
|
+
key: s.name,
|
|
691
|
+
class: q(["cregis-tabs__item", { "is-active": e.modelValue === s.name }]),
|
|
701
692
|
style: Z(r.value),
|
|
702
|
-
onClick: (v) =>
|
|
693
|
+
onClick: (v) => o.$emit("update:modelValue", s.name)
|
|
703
694
|
}, [
|
|
704
|
-
|
|
695
|
+
C("span", null, _(s.label), 1)
|
|
705
696
|
], 14, Sa))), 128)),
|
|
706
|
-
|
|
707
|
-
ae(
|
|
697
|
+
C("div", Ca, [
|
|
698
|
+
ae(o.$slots, "default")
|
|
708
699
|
])
|
|
709
700
|
], 2));
|
|
710
701
|
}
|
|
@@ -718,16 +709,16 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
718
709
|
setup(e) {
|
|
719
710
|
const t = e, n = jt(Rn);
|
|
720
711
|
if (!n) throw new Error("TabPane must be used within Tabs");
|
|
721
|
-
return
|
|
712
|
+
return Ne(() => {
|
|
722
713
|
n.registerTab({ label: t.label, name: t.name });
|
|
723
714
|
}), le(
|
|
724
715
|
() => t.label,
|
|
725
|
-
(
|
|
726
|
-
n.unregisterTab(t.name), n.registerTab({ label:
|
|
716
|
+
(a) => {
|
|
717
|
+
n.unregisterTab(t.name), n.registerTab({ label: a, name: t.name });
|
|
727
718
|
}
|
|
728
719
|
), Le(() => {
|
|
729
720
|
n.unregisterTab(t.name);
|
|
730
|
-
}), (
|
|
721
|
+
}), (a, i) => null;
|
|
731
722
|
}
|
|
732
723
|
});
|
|
733
724
|
let gt = 1e5;
|
|
@@ -748,45 +739,45 @@ const Yt = () => (gt = gt + 1, gt), Hl = (e) => {
|
|
|
748
739
|
onVanish: {}
|
|
749
740
|
},
|
|
750
741
|
setup(e) {
|
|
751
|
-
const t = e, n =
|
|
752
|
-
let
|
|
753
|
-
const
|
|
742
|
+
const t = e, n = B(!1);
|
|
743
|
+
let a;
|
|
744
|
+
const i = p(() => ({
|
|
754
745
|
zIndex: Yt()
|
|
755
746
|
})), r = () => {
|
|
756
|
-
|
|
747
|
+
a = window.setTimeout(() => {
|
|
757
748
|
n.value = !1;
|
|
758
749
|
}, t.duration);
|
|
759
|
-
},
|
|
750
|
+
}, o = () => {
|
|
760
751
|
t.onVanish?.();
|
|
761
752
|
};
|
|
762
|
-
return
|
|
763
|
-
|
|
753
|
+
return It(() => {
|
|
754
|
+
a !== void 0 && clearTimeout(a);
|
|
764
755
|
}), ge(() => {
|
|
765
756
|
n.value = !0;
|
|
766
|
-
}), (l,
|
|
757
|
+
}), (l, s) => (u(), m("div", {
|
|
767
758
|
class: q(["cregis-message__wrapper", { "cregis-message__wrapper--success": e.type === "success" }]),
|
|
768
|
-
style: Z(
|
|
759
|
+
style: Z(i.value)
|
|
769
760
|
}, [
|
|
770
761
|
ne(st, {
|
|
771
762
|
name: "cregis-message",
|
|
772
763
|
onAfterEnter: r,
|
|
773
|
-
onAfterLeave:
|
|
764
|
+
onAfterLeave: o
|
|
774
765
|
}, {
|
|
775
766
|
default: ve(() => [
|
|
776
|
-
n.value && e.type !== "success" ? (u(),
|
|
767
|
+
n.value && e.type !== "success" ? (u(), m("div", {
|
|
777
768
|
key: 0,
|
|
778
769
|
class: q(["cregis-message", { "cregis-message--danger": e.type === "danger" }]),
|
|
779
770
|
role: "status",
|
|
780
771
|
"aria-live": "polite"
|
|
781
|
-
},
|
|
782
|
-
|
|
772
|
+
}, _(e.message), 3)) : n.value && e.type === "success" ? (u(), m("div", Oa, [
|
|
773
|
+
C("div", Ta, [
|
|
783
774
|
ne(U(Cn), {
|
|
784
775
|
size: "16px",
|
|
785
776
|
color: "var(--material-same-white-primary)"
|
|
786
777
|
})
|
|
787
778
|
]),
|
|
788
|
-
|
|
789
|
-
])) :
|
|
779
|
+
C("p", null, _(e.message), 1)
|
|
780
|
+
])) : j("", !0)
|
|
790
781
|
]),
|
|
791
782
|
_: 1
|
|
792
783
|
})
|
|
@@ -803,19 +794,19 @@ function Ea(e) {
|
|
|
803
794
|
}
|
|
804
795
|
function cn(e) {
|
|
805
796
|
if (Et) return;
|
|
806
|
-
const { message: t, duration: n, type:
|
|
797
|
+
const { message: t, duration: n, type: a } = Ea(e);
|
|
807
798
|
Et = !0;
|
|
808
|
-
const
|
|
809
|
-
document.body.appendChild(
|
|
799
|
+
const i = document.createElement("div");
|
|
800
|
+
document.body.appendChild(i), Ue(
|
|
810
801
|
Ht(za, {
|
|
811
802
|
message: t,
|
|
812
803
|
duration: n,
|
|
813
|
-
type:
|
|
804
|
+
type: a,
|
|
814
805
|
onVanish: () => {
|
|
815
|
-
Et = !1, Ue(null,
|
|
806
|
+
Et = !1, Ue(null, i), i.remove();
|
|
816
807
|
}
|
|
817
808
|
}),
|
|
818
|
-
|
|
809
|
+
i
|
|
819
810
|
);
|
|
820
811
|
}
|
|
821
812
|
const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
@@ -823,7 +814,7 @@ const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
|
823
814
|
class: "cregis-notification",
|
|
824
815
|
role: "status",
|
|
825
816
|
"aria-live": "polite"
|
|
826
|
-
}, Ba = { class: "cregis-notification__content" },
|
|
817
|
+
}, Ba = { class: "cregis-notification__content" }, Va = { class: "cregis-notification__title" }, Pa = { class: "cregis-notification__message" }, Wa = /* @__PURE__ */ oe({
|
|
827
818
|
name: "Notification",
|
|
828
819
|
__name: "Notification",
|
|
829
820
|
props: {
|
|
@@ -834,39 +825,39 @@ const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
|
834
825
|
onVanish: {}
|
|
835
826
|
},
|
|
836
827
|
setup(e) {
|
|
837
|
-
const t = e, n =
|
|
828
|
+
const t = e, n = B(!1), a = () => {
|
|
838
829
|
n.value = !1;
|
|
839
|
-
},
|
|
830
|
+
}, i = () => {
|
|
840
831
|
t.onVanish?.();
|
|
841
832
|
};
|
|
842
|
-
return
|
|
833
|
+
return It(() => {
|
|
843
834
|
}), ge(() => {
|
|
844
835
|
n.value = !0;
|
|
845
|
-
}), (r,
|
|
836
|
+
}), (r, o) => (u(), m("div", Ra, [
|
|
846
837
|
ne(st, {
|
|
847
838
|
name: "cregis-notification",
|
|
848
|
-
onAfterLeave:
|
|
839
|
+
onAfterLeave: i
|
|
849
840
|
}, {
|
|
850
841
|
default: ve(() => [
|
|
851
|
-
n.value ? (u(),
|
|
842
|
+
n.value ? (u(), m("div", La, [
|
|
852
843
|
(u(), de(it(U(ta)), {
|
|
853
844
|
size: "18px",
|
|
854
845
|
color: "var(--material-danger-primary)"
|
|
855
846
|
})),
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
847
|
+
C("div", Ba, [
|
|
848
|
+
C("div", Va, _(e.title), 1),
|
|
849
|
+
C("div", Pa, _(e.message), 1)
|
|
859
850
|
]),
|
|
860
851
|
ne(He, {
|
|
861
852
|
type: "sameWhite",
|
|
862
|
-
onClick:
|
|
853
|
+
onClick: a
|
|
863
854
|
}, {
|
|
864
855
|
default: ve(() => [
|
|
865
|
-
ye(
|
|
856
|
+
ye(_(e.btnText), 1)
|
|
866
857
|
]),
|
|
867
858
|
_: 1
|
|
868
859
|
})
|
|
869
|
-
])) :
|
|
860
|
+
])) : j("", !0)
|
|
870
861
|
]),
|
|
871
862
|
_: 1
|
|
872
863
|
})
|
|
@@ -876,15 +867,15 @@ const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
|
876
867
|
let Rt = !1;
|
|
877
868
|
function _l(e) {
|
|
878
869
|
if (Rt) return;
|
|
879
|
-
const { title: t, message: n, type:
|
|
870
|
+
const { title: t, message: n, type: a, btnText: i } = e;
|
|
880
871
|
Rt = !0;
|
|
881
872
|
const r = document.createElement("div");
|
|
882
873
|
document.body.appendChild(r), Ue(
|
|
883
874
|
Ht(Wa, {
|
|
884
875
|
title: t,
|
|
885
876
|
message: n,
|
|
886
|
-
type:
|
|
887
|
-
btnText:
|
|
877
|
+
type: a,
|
|
878
|
+
btnText: i,
|
|
888
879
|
onVanish: () => {
|
|
889
880
|
Rt = !1, Ue(null, r), r.remove();
|
|
890
881
|
}
|
|
@@ -892,7 +883,7 @@ function _l(e) {
|
|
|
892
883
|
r
|
|
893
884
|
);
|
|
894
885
|
}
|
|
895
|
-
const Aa = { class: "cregis-progress__wrapper" }, Da = { class: "cregis-progress__track-wrap" }, Ma = { class: "cregis-progress cregis-progress--striped active" },
|
|
886
|
+
const Aa = { class: "cregis-progress__wrapper" }, Da = { class: "cregis-progress__track-wrap" }, Ma = { class: "cregis-progress cregis-progress--striped active" }, Ia = {
|
|
896
887
|
key: 0,
|
|
897
888
|
class: "cregis-progress__sliding-block"
|
|
898
889
|
}, Fl = /* @__PURE__ */ oe({
|
|
@@ -905,32 +896,32 @@ const Aa = { class: "cregis-progress__wrapper" }, Da = { class: "cregis-progress
|
|
|
905
896
|
loading: { type: Boolean, default: !1 }
|
|
906
897
|
},
|
|
907
898
|
setup(e) {
|
|
908
|
-
const t = e, n = p(() => Math.min(100, Math.max(0, t.percentage - 1))),
|
|
899
|
+
const t = e, n = p(() => Math.min(100, Math.max(0, t.percentage - 1))), a = p(() => ({
|
|
909
900
|
width: `${t.percentage}%`,
|
|
910
901
|
height: `${t.strokeWidth}px`
|
|
911
|
-
})),
|
|
902
|
+
})), i = p(() => ({
|
|
912
903
|
"--cregis-progress-tip-left": `${n.value}%`
|
|
913
904
|
})), r = p(() => `${Math.round(t.percentage)}%`);
|
|
914
|
-
return (
|
|
915
|
-
|
|
916
|
-
e.showPercentage && !t.loading ? (u(),
|
|
905
|
+
return (o, l) => (u(), m("div", Aa, [
|
|
906
|
+
C("div", Da, [
|
|
907
|
+
e.showPercentage && !t.loading ? (u(), m("div", {
|
|
917
908
|
key: 0,
|
|
918
909
|
class: "cregis-progress__tip",
|
|
919
|
-
style: Z(
|
|
910
|
+
style: Z(i.value),
|
|
920
911
|
"aria-live": "polite"
|
|
921
|
-
},
|
|
922
|
-
|
|
923
|
-
|
|
912
|
+
}, _(r.value), 5)) : j("", !0),
|
|
913
|
+
C("div", Ma, [
|
|
914
|
+
C("div", {
|
|
924
915
|
class: "cregis-progress__bar",
|
|
925
|
-
style: Z(
|
|
916
|
+
style: Z(a.value)
|
|
926
917
|
}, null, 4),
|
|
927
|
-
t.loading ? (u(),
|
|
918
|
+
t.loading ? (u(), m("div", Ia)) : j("", !0)
|
|
928
919
|
])
|
|
929
920
|
])
|
|
930
921
|
]));
|
|
931
922
|
}
|
|
932
923
|
});
|
|
933
|
-
var we = "top", Oe = "bottom", Te = "right", xe = "left", Xt = "auto", ct = [we, Oe, Te, xe], qe = "start", rt = "end",
|
|
924
|
+
var we = "top", Oe = "bottom", Te = "right", xe = "left", Xt = "auto", ct = [we, Oe, Te, xe], qe = "start", rt = "end", Na = "clippingParents", Ln = "viewport", Ge = "popper", ja = "reference", un = /* @__PURE__ */ ct.reduce(function(e, t) {
|
|
934
925
|
return e.concat([t + "-" + qe, t + "-" + rt]);
|
|
935
926
|
}, []), Bn = /* @__PURE__ */ [].concat(ct, [Xt]).reduce(function(e, t) {
|
|
936
927
|
return e.concat([t, t + "-" + qe, t + "-" + rt]);
|
|
@@ -947,7 +938,7 @@ function $e(e) {
|
|
|
947
938
|
}
|
|
948
939
|
return e;
|
|
949
940
|
}
|
|
950
|
-
function
|
|
941
|
+
function Ie(e) {
|
|
951
942
|
var t = $e(e).Element;
|
|
952
943
|
return e instanceof t || e instanceof Element;
|
|
953
944
|
}
|
|
@@ -964,10 +955,10 @@ function Kt(e) {
|
|
|
964
955
|
function Qa(e) {
|
|
965
956
|
var t = e.state;
|
|
966
957
|
Object.keys(t.elements).forEach(function(n) {
|
|
967
|
-
var
|
|
968
|
-
!Ce(r) || !Re(r) || (Object.assign(r.style,
|
|
969
|
-
var l =
|
|
970
|
-
l === !1 ? r.removeAttribute(
|
|
958
|
+
var a = t.styles[n] || {}, i = t.attributes[n] || {}, r = t.elements[n];
|
|
959
|
+
!Ce(r) || !Re(r) || (Object.assign(r.style, a), Object.keys(i).forEach(function(o) {
|
|
960
|
+
var l = i[o];
|
|
961
|
+
l === !1 ? r.removeAttribute(o) : r.setAttribute(o, l === !0 ? "" : l);
|
|
971
962
|
}));
|
|
972
963
|
});
|
|
973
964
|
}
|
|
@@ -985,12 +976,12 @@ function Ja(e) {
|
|
|
985
976
|
reference: {}
|
|
986
977
|
};
|
|
987
978
|
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
|
|
988
|
-
Object.keys(t.elements).forEach(function(
|
|
989
|
-
var
|
|
990
|
-
return
|
|
979
|
+
Object.keys(t.elements).forEach(function(a) {
|
|
980
|
+
var i = t.elements[a], r = t.attributes[a] || {}, o = Object.keys(t.styles.hasOwnProperty(a) ? t.styles[a] : n[a]), l = o.reduce(function(s, v) {
|
|
981
|
+
return s[v] = "", s;
|
|
991
982
|
}, {});
|
|
992
|
-
!Ce(
|
|
993
|
-
|
|
983
|
+
!Ce(i) || !Re(i) || (Object.assign(i.style, l), Object.keys(r).forEach(function(s) {
|
|
984
|
+
i.removeAttribute(s);
|
|
994
985
|
}));
|
|
995
986
|
});
|
|
996
987
|
};
|
|
@@ -1007,20 +998,20 @@ function Ee(e) {
|
|
|
1007
998
|
return e.split("-")[0];
|
|
1008
999
|
}
|
|
1009
1000
|
var Me = Math.max, yt = Math.min, Ye = Math.round;
|
|
1010
|
-
function
|
|
1001
|
+
function Pt() {
|
|
1011
1002
|
var e = navigator.userAgentData;
|
|
1012
1003
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1013
1004
|
return t.brand + "/" + t.version;
|
|
1014
1005
|
}).join(" ") : navigator.userAgent;
|
|
1015
1006
|
}
|
|
1016
|
-
function
|
|
1017
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1007
|
+
function Vn() {
|
|
1008
|
+
return !/^((?!chrome|android).)*safari/i.test(Pt());
|
|
1018
1009
|
}
|
|
1019
1010
|
function Xe(e, t, n) {
|
|
1020
1011
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1021
|
-
var
|
|
1022
|
-
t && Ce(e) && (
|
|
1023
|
-
var
|
|
1012
|
+
var a = e.getBoundingClientRect(), i = 1, r = 1;
|
|
1013
|
+
t && Ce(e) && (i = e.offsetWidth > 0 && Ye(a.width) / e.offsetWidth || 1, r = e.offsetHeight > 0 && Ye(a.height) / e.offsetHeight || 1);
|
|
1014
|
+
var o = Ie(e) ? $e(e) : window, l = o.visualViewport, s = !Vn() && n, v = (a.left + (s && l ? l.offsetLeft : 0)) / i, c = (a.top + (s && l ? l.offsetTop : 0)) / r, d = a.width / i, g = a.height / r;
|
|
1024
1015
|
return {
|
|
1025
1016
|
width: d,
|
|
1026
1017
|
height: g,
|
|
@@ -1033,36 +1024,36 @@ function Xe(e, t, n) {
|
|
|
1033
1024
|
};
|
|
1034
1025
|
}
|
|
1035
1026
|
function Gt(e) {
|
|
1036
|
-
var t = Xe(e), n = e.offsetWidth,
|
|
1037
|
-
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height -
|
|
1027
|
+
var t = Xe(e), n = e.offsetWidth, a = e.offsetHeight;
|
|
1028
|
+
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - a) <= 1 && (a = t.height), {
|
|
1038
1029
|
x: e.offsetLeft,
|
|
1039
1030
|
y: e.offsetTop,
|
|
1040
1031
|
width: n,
|
|
1041
|
-
height:
|
|
1032
|
+
height: a
|
|
1042
1033
|
};
|
|
1043
1034
|
}
|
|
1044
|
-
function
|
|
1035
|
+
function Pn(e, t) {
|
|
1045
1036
|
var n = t.getRootNode && t.getRootNode();
|
|
1046
1037
|
if (e.contains(t))
|
|
1047
1038
|
return !0;
|
|
1048
1039
|
if (n && Kt(n)) {
|
|
1049
|
-
var
|
|
1040
|
+
var a = t;
|
|
1050
1041
|
do {
|
|
1051
|
-
if (
|
|
1042
|
+
if (a && e.isSameNode(a))
|
|
1052
1043
|
return !0;
|
|
1053
|
-
|
|
1054
|
-
} while (
|
|
1044
|
+
a = a.parentNode || a.host;
|
|
1045
|
+
} while (a);
|
|
1055
1046
|
}
|
|
1056
1047
|
return !1;
|
|
1057
1048
|
}
|
|
1058
|
-
function
|
|
1049
|
+
function Ve(e) {
|
|
1059
1050
|
return $e(e).getComputedStyle(e);
|
|
1060
1051
|
}
|
|
1061
1052
|
function ti(e) {
|
|
1062
1053
|
return ["table", "td", "th"].indexOf(Re(e)) >= 0;
|
|
1063
1054
|
}
|
|
1064
1055
|
function Ae(e) {
|
|
1065
|
-
return ((
|
|
1056
|
+
return ((Ie(e) ? e.ownerDocument : (
|
|
1066
1057
|
// $FlowFixMe[prop-missing]
|
|
1067
1058
|
e.document
|
|
1068
1059
|
)) || window.document).documentElement;
|
|
@@ -1081,28 +1072,28 @@ function Ct(e) {
|
|
|
1081
1072
|
}
|
|
1082
1073
|
function dn(e) {
|
|
1083
1074
|
return !Ce(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1084
|
-
|
|
1075
|
+
Ve(e).position === "fixed" ? null : e.offsetParent;
|
|
1085
1076
|
}
|
|
1086
1077
|
function ni(e) {
|
|
1087
|
-
var t = /firefox/i.test(
|
|
1078
|
+
var t = /firefox/i.test(Pt()), n = /Trident/i.test(Pt());
|
|
1088
1079
|
if (n && Ce(e)) {
|
|
1089
|
-
var
|
|
1090
|
-
if (
|
|
1080
|
+
var a = Ve(e);
|
|
1081
|
+
if (a.position === "fixed")
|
|
1091
1082
|
return null;
|
|
1092
1083
|
}
|
|
1093
|
-
var
|
|
1094
|
-
for (Kt(
|
|
1095
|
-
var r =
|
|
1084
|
+
var i = Ct(e);
|
|
1085
|
+
for (Kt(i) && (i = i.host); Ce(i) && ["html", "body"].indexOf(Re(i)) < 0; ) {
|
|
1086
|
+
var r = Ve(i);
|
|
1096
1087
|
if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || t && r.willChange === "filter" || t && r.filter && r.filter !== "none")
|
|
1097
|
-
return
|
|
1098
|
-
|
|
1088
|
+
return i;
|
|
1089
|
+
i = i.parentNode;
|
|
1099
1090
|
}
|
|
1100
1091
|
return null;
|
|
1101
1092
|
}
|
|
1102
1093
|
function ut(e) {
|
|
1103
|
-
for (var t = $e(e), n = dn(e); n && ti(n) &&
|
|
1094
|
+
for (var t = $e(e), n = dn(e); n && ti(n) && Ve(n).position === "static"; )
|
|
1104
1095
|
n = dn(n);
|
|
1105
|
-
return n && (Re(n) === "html" || Re(n) === "body" &&
|
|
1096
|
+
return n && (Re(n) === "html" || Re(n) === "body" && Ve(n).position === "static") ? t : n || ni(e) || t;
|
|
1106
1097
|
}
|
|
1107
1098
|
function Zt(e) {
|
|
1108
1099
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
@@ -1111,8 +1102,8 @@ function et(e, t, n) {
|
|
|
1111
1102
|
return Me(e, yt(t, n));
|
|
1112
1103
|
}
|
|
1113
1104
|
function ai(e, t, n) {
|
|
1114
|
-
var
|
|
1115
|
-
return
|
|
1105
|
+
var a = et(e, t, n);
|
|
1106
|
+
return a > n ? n : a;
|
|
1116
1107
|
}
|
|
1117
1108
|
function Wn() {
|
|
1118
1109
|
return {
|
|
@@ -1126,8 +1117,8 @@ function An(e) {
|
|
|
1126
1117
|
return Object.assign({}, Wn(), e);
|
|
1127
1118
|
}
|
|
1128
1119
|
function Dn(e, t) {
|
|
1129
|
-
return t.reduce(function(n,
|
|
1130
|
-
return n[
|
|
1120
|
+
return t.reduce(function(n, a) {
|
|
1121
|
+
return n[a] = e, n;
|
|
1131
1122
|
}, {});
|
|
1132
1123
|
}
|
|
1133
1124
|
var ii = function(t, n) {
|
|
@@ -1136,15 +1127,15 @@ var ii = function(t, n) {
|
|
|
1136
1127
|
})) : t, An(typeof t != "number" ? t : Dn(t, ct));
|
|
1137
1128
|
};
|
|
1138
1129
|
function ri(e) {
|
|
1139
|
-
var t, n = e.state,
|
|
1140
|
-
if (!(!r || !
|
|
1141
|
-
var d = ii(
|
|
1142
|
-
n.modifiersData[
|
|
1130
|
+
var t, n = e.state, a = e.name, i = e.options, r = n.elements.arrow, o = n.modifiersData.popperOffsets, l = Ee(n.placement), s = Zt(l), v = [xe, Te].indexOf(l) >= 0, c = v ? "height" : "width";
|
|
1131
|
+
if (!(!r || !o)) {
|
|
1132
|
+
var d = ii(i.padding, n), g = Gt(r), h = s === "y" ? we : xe, y = s === "y" ? Oe : Te, $ = n.rects.reference[c] + n.rects.reference[s] - o[s] - n.rects.popper[c], z = o[s] - n.rects.reference[s], V = ut(r), N = V ? s === "y" ? V.clientHeight || 0 : V.clientWidth || 0 : 0, A = $ / 2 - z / 2, O = d[h], k = N - g[c] - d[y], x = N / 2 - g[c] / 2 + A, E = et(O, x, k), L = s;
|
|
1133
|
+
n.modifiersData[a] = (t = {}, t[L] = E, t.centerOffset = E - x, t);
|
|
1143
1134
|
}
|
|
1144
1135
|
}
|
|
1145
1136
|
function li(e) {
|
|
1146
|
-
var t = e.state, n = e.options,
|
|
1147
|
-
|
|
1137
|
+
var t = e.state, n = e.options, a = n.element, i = a === void 0 ? "[data-popper-arrow]" : a;
|
|
1138
|
+
i != null && (typeof i == "string" && (i = t.elements.popper.querySelector(i), !i) || Pn(t.elements.popper, i) && (t.elements.arrow = i));
|
|
1148
1139
|
}
|
|
1149
1140
|
const oi = {
|
|
1150
1141
|
name: "arrow",
|
|
@@ -1165,75 +1156,75 @@ var si = {
|
|
|
1165
1156
|
left: "auto"
|
|
1166
1157
|
};
|
|
1167
1158
|
function ci(e, t) {
|
|
1168
|
-
var n = e.x,
|
|
1159
|
+
var n = e.x, a = e.y, i = t.devicePixelRatio || 1;
|
|
1169
1160
|
return {
|
|
1170
|
-
x: Ye(n *
|
|
1171
|
-
y: Ye(
|
|
1161
|
+
x: Ye(n * i) / i || 0,
|
|
1162
|
+
y: Ye(a * i) / i || 0
|
|
1172
1163
|
};
|
|
1173
1164
|
}
|
|
1174
1165
|
function fn(e) {
|
|
1175
|
-
var t, n = e.popper,
|
|
1176
|
-
x:
|
|
1177
|
-
y:
|
|
1166
|
+
var t, n = e.popper, a = e.popperRect, i = e.placement, r = e.variation, o = e.offsets, l = e.position, s = e.gpuAcceleration, v = e.adaptive, c = e.roundOffsets, d = e.isFixed, g = o.x, h = g === void 0 ? 0 : g, y = o.y, $ = y === void 0 ? 0 : y, z = typeof c == "function" ? c({
|
|
1167
|
+
x: h,
|
|
1168
|
+
y: $
|
|
1178
1169
|
}) : {
|
|
1179
|
-
x:
|
|
1180
|
-
y:
|
|
1170
|
+
x: h,
|
|
1171
|
+
y: $
|
|
1181
1172
|
};
|
|
1182
|
-
|
|
1183
|
-
var
|
|
1173
|
+
h = z.x, $ = z.y;
|
|
1174
|
+
var V = o.hasOwnProperty("x"), N = o.hasOwnProperty("y"), A = xe, O = we, k = window;
|
|
1184
1175
|
if (v) {
|
|
1185
|
-
var
|
|
1186
|
-
if (
|
|
1187
|
-
|
|
1188
|
-
var Y = d &&
|
|
1176
|
+
var x = ut(n), E = "clientHeight", L = "clientWidth";
|
|
1177
|
+
if (x === $e(n) && (x = Ae(n), Ve(x).position !== "static" && l === "absolute" && (E = "scrollHeight", L = "scrollWidth")), x = x, i === we || (i === xe || i === Te) && r === rt) {
|
|
1178
|
+
O = Oe;
|
|
1179
|
+
var Y = d && x === k && k.visualViewport ? k.visualViewport.height : (
|
|
1189
1180
|
// $FlowFixMe[prop-missing]
|
|
1190
|
-
|
|
1181
|
+
x[E]
|
|
1191
1182
|
);
|
|
1192
|
-
|
|
1183
|
+
$ -= Y - a.height, $ *= s ? 1 : -1;
|
|
1193
1184
|
}
|
|
1194
|
-
if (
|
|
1195
|
-
|
|
1196
|
-
var X = d &&
|
|
1185
|
+
if (i === xe || (i === we || i === Oe) && r === rt) {
|
|
1186
|
+
A = Te;
|
|
1187
|
+
var X = d && x === k && k.visualViewport ? k.visualViewport.width : (
|
|
1197
1188
|
// $FlowFixMe[prop-missing]
|
|
1198
|
-
|
|
1189
|
+
x[L]
|
|
1199
1190
|
);
|
|
1200
|
-
|
|
1191
|
+
h -= X - a.width, h *= s ? 1 : -1;
|
|
1201
1192
|
}
|
|
1202
1193
|
}
|
|
1203
|
-
var
|
|
1194
|
+
var D = Object.assign({
|
|
1204
1195
|
position: l
|
|
1205
1196
|
}, v && si), se = c === !0 ? ci({
|
|
1206
|
-
x:
|
|
1207
|
-
y:
|
|
1197
|
+
x: h,
|
|
1198
|
+
y: $
|
|
1208
1199
|
}, $e(n)) : {
|
|
1209
|
-
x:
|
|
1210
|
-
y:
|
|
1200
|
+
x: h,
|
|
1201
|
+
y: $
|
|
1211
1202
|
};
|
|
1212
|
-
if (
|
|
1203
|
+
if (h = se.x, $ = se.y, s) {
|
|
1213
1204
|
var Q;
|
|
1214
|
-
return Object.assign({},
|
|
1205
|
+
return Object.assign({}, D, (Q = {}, Q[O] = N ? "0" : "", Q[A] = V ? "0" : "", Q.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + $ + "px)" : "translate3d(" + h + "px, " + $ + "px, 0)", Q));
|
|
1215
1206
|
}
|
|
1216
|
-
return Object.assign({},
|
|
1207
|
+
return Object.assign({}, D, (t = {}, t[O] = N ? $ + "px" : "", t[A] = V ? h + "px" : "", t.transform = "", t));
|
|
1217
1208
|
}
|
|
1218
1209
|
function ui(e) {
|
|
1219
|
-
var t = e.state, n = e.options,
|
|
1210
|
+
var t = e.state, n = e.options, a = n.gpuAcceleration, i = a === void 0 ? !0 : a, r = n.adaptive, o = r === void 0 ? !0 : r, l = n.roundOffsets, s = l === void 0 ? !0 : l, v = {
|
|
1220
1211
|
placement: Ee(t.placement),
|
|
1221
1212
|
variation: Ke(t.placement),
|
|
1222
1213
|
popper: t.elements.popper,
|
|
1223
1214
|
popperRect: t.rects.popper,
|
|
1224
|
-
gpuAcceleration:
|
|
1215
|
+
gpuAcceleration: i,
|
|
1225
1216
|
isFixed: t.options.strategy === "fixed"
|
|
1226
1217
|
};
|
|
1227
1218
|
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, fn(Object.assign({}, v, {
|
|
1228
1219
|
offsets: t.modifiersData.popperOffsets,
|
|
1229
1220
|
position: t.options.strategy,
|
|
1230
|
-
adaptive:
|
|
1231
|
-
roundOffsets:
|
|
1221
|
+
adaptive: o,
|
|
1222
|
+
roundOffsets: s
|
|
1232
1223
|
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, fn(Object.assign({}, v, {
|
|
1233
1224
|
offsets: t.modifiersData.arrow,
|
|
1234
1225
|
position: "absolute",
|
|
1235
1226
|
adaptive: !1,
|
|
1236
|
-
roundOffsets:
|
|
1227
|
+
roundOffsets: s
|
|
1237
1228
|
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1238
1229
|
"data-popper-placement": t.placement
|
|
1239
1230
|
});
|
|
@@ -1249,13 +1240,13 @@ var pt = {
|
|
|
1249
1240
|
passive: !0
|
|
1250
1241
|
};
|
|
1251
1242
|
function fi(e) {
|
|
1252
|
-
var t = e.state, n = e.instance,
|
|
1243
|
+
var t = e.state, n = e.instance, a = e.options, i = a.scroll, r = i === void 0 ? !0 : i, o = a.resize, l = o === void 0 ? !0 : o, s = $e(t.elements.popper), v = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1253
1244
|
return r && v.forEach(function(c) {
|
|
1254
1245
|
c.addEventListener("scroll", n.update, pt);
|
|
1255
|
-
}), l &&
|
|
1246
|
+
}), l && s.addEventListener("resize", n.update, pt), function() {
|
|
1256
1247
|
r && v.forEach(function(c) {
|
|
1257
1248
|
c.removeEventListener("scroll", n.update, pt);
|
|
1258
|
-
}), l &&
|
|
1249
|
+
}), l && s.removeEventListener("resize", n.update, pt);
|
|
1259
1250
|
};
|
|
1260
1251
|
}
|
|
1261
1252
|
const vi = {
|
|
@@ -1288,41 +1279,41 @@ function vn(e) {
|
|
|
1288
1279
|
});
|
|
1289
1280
|
}
|
|
1290
1281
|
function Qt(e) {
|
|
1291
|
-
var t = $e(e), n = t.pageXOffset,
|
|
1282
|
+
var t = $e(e), n = t.pageXOffset, a = t.pageYOffset;
|
|
1292
1283
|
return {
|
|
1293
1284
|
scrollLeft: n,
|
|
1294
|
-
scrollTop:
|
|
1285
|
+
scrollTop: a
|
|
1295
1286
|
};
|
|
1296
1287
|
}
|
|
1297
1288
|
function Jt(e) {
|
|
1298
1289
|
return Xe(Ae(e)).left + Qt(e).scrollLeft;
|
|
1299
1290
|
}
|
|
1300
1291
|
function hi(e, t) {
|
|
1301
|
-
var n = $e(e),
|
|
1302
|
-
if (
|
|
1303
|
-
r =
|
|
1304
|
-
var v =
|
|
1305
|
-
(v || !v && t === "fixed") && (l =
|
|
1292
|
+
var n = $e(e), a = Ae(e), i = n.visualViewport, r = a.clientWidth, o = a.clientHeight, l = 0, s = 0;
|
|
1293
|
+
if (i) {
|
|
1294
|
+
r = i.width, o = i.height;
|
|
1295
|
+
var v = Vn();
|
|
1296
|
+
(v || !v && t === "fixed") && (l = i.offsetLeft, s = i.offsetTop);
|
|
1306
1297
|
}
|
|
1307
1298
|
return {
|
|
1308
1299
|
width: r,
|
|
1309
|
-
height:
|
|
1300
|
+
height: o,
|
|
1310
1301
|
x: l + Jt(e),
|
|
1311
|
-
y:
|
|
1302
|
+
y: s
|
|
1312
1303
|
};
|
|
1313
1304
|
}
|
|
1314
1305
|
function gi(e) {
|
|
1315
|
-
var t, n = Ae(e),
|
|
1316
|
-
return
|
|
1306
|
+
var t, n = Ae(e), a = Qt(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, r = Me(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Me(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), l = -a.scrollLeft + Jt(e), s = -a.scrollTop;
|
|
1307
|
+
return Ve(i || n).direction === "rtl" && (l += Me(n.clientWidth, i ? i.clientWidth : 0) - r), {
|
|
1317
1308
|
width: r,
|
|
1318
|
-
height:
|
|
1309
|
+
height: o,
|
|
1319
1310
|
x: l,
|
|
1320
|
-
y:
|
|
1311
|
+
y: s
|
|
1321
1312
|
};
|
|
1322
1313
|
}
|
|
1323
1314
|
function en(e) {
|
|
1324
|
-
var t =
|
|
1325
|
-
return /auto|scroll|overlay|hidden/.test(n +
|
|
1315
|
+
var t = Ve(e), n = t.overflow, a = t.overflowX, i = t.overflowY;
|
|
1316
|
+
return /auto|scroll|overlay|hidden/.test(n + i + a);
|
|
1326
1317
|
}
|
|
1327
1318
|
function Mn(e) {
|
|
1328
1319
|
return ["html", "body", "#document"].indexOf(Re(e)) >= 0 ? e.ownerDocument.body : Ce(e) && en(e) ? e : Mn(Ct(e));
|
|
@@ -1330,10 +1321,10 @@ function Mn(e) {
|
|
|
1330
1321
|
function tt(e, t) {
|
|
1331
1322
|
var n;
|
|
1332
1323
|
t === void 0 && (t = []);
|
|
1333
|
-
var
|
|
1334
|
-
return
|
|
1324
|
+
var a = Mn(e), i = a === ((n = e.ownerDocument) == null ? void 0 : n.body), r = $e(a), o = i ? [r].concat(r.visualViewport || [], en(a) ? a : []) : a, l = t.concat(o);
|
|
1325
|
+
return i ? l : (
|
|
1335
1326
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1336
|
-
l.concat(tt(Ct(
|
|
1327
|
+
l.concat(tt(Ct(o)))
|
|
1337
1328
|
);
|
|
1338
1329
|
}
|
|
1339
1330
|
function Wt(e) {
|
|
@@ -1349,82 +1340,82 @@ function bi(e, t) {
|
|
|
1349
1340
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1350
1341
|
}
|
|
1351
1342
|
function pn(e, t, n) {
|
|
1352
|
-
return t === Ln ? Wt(hi(e, n)) :
|
|
1343
|
+
return t === Ln ? Wt(hi(e, n)) : Ie(t) ? bi(t, n) : Wt(gi(Ae(e)));
|
|
1353
1344
|
}
|
|
1354
1345
|
function yi(e) {
|
|
1355
|
-
var t = tt(Ct(e)), n = ["absolute", "fixed"].indexOf(
|
|
1356
|
-
return
|
|
1357
|
-
return
|
|
1346
|
+
var t = tt(Ct(e)), n = ["absolute", "fixed"].indexOf(Ve(e).position) >= 0, a = n && Ce(e) ? ut(e) : e;
|
|
1347
|
+
return Ie(a) ? t.filter(function(i) {
|
|
1348
|
+
return Ie(i) && Pn(i, a) && Re(i) !== "body";
|
|
1358
1349
|
}) : [];
|
|
1359
1350
|
}
|
|
1360
|
-
function wi(e, t, n,
|
|
1361
|
-
var
|
|
1362
|
-
var c = pn(e, v,
|
|
1363
|
-
return
|
|
1364
|
-
}, pn(e,
|
|
1351
|
+
function wi(e, t, n, a) {
|
|
1352
|
+
var i = t === "clippingParents" ? yi(e) : [].concat(t), r = [].concat(i, [n]), o = r[0], l = r.reduce(function(s, v) {
|
|
1353
|
+
var c = pn(e, v, a);
|
|
1354
|
+
return s.top = Me(c.top, s.top), s.right = yt(c.right, s.right), s.bottom = yt(c.bottom, s.bottom), s.left = Me(c.left, s.left), s;
|
|
1355
|
+
}, pn(e, o, a));
|
|
1365
1356
|
return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
|
|
1366
1357
|
}
|
|
1367
|
-
function
|
|
1368
|
-
var t = e.reference, n = e.element,
|
|
1369
|
-
switch (
|
|
1358
|
+
function In(e) {
|
|
1359
|
+
var t = e.reference, n = e.element, a = e.placement, i = a ? Ee(a) : null, r = a ? Ke(a) : null, o = t.x + t.width / 2 - n.width / 2, l = t.y + t.height / 2 - n.height / 2, s;
|
|
1360
|
+
switch (i) {
|
|
1370
1361
|
case we:
|
|
1371
|
-
|
|
1372
|
-
x:
|
|
1362
|
+
s = {
|
|
1363
|
+
x: o,
|
|
1373
1364
|
y: t.y - n.height
|
|
1374
1365
|
};
|
|
1375
1366
|
break;
|
|
1376
1367
|
case Oe:
|
|
1377
|
-
|
|
1378
|
-
x:
|
|
1368
|
+
s = {
|
|
1369
|
+
x: o,
|
|
1379
1370
|
y: t.y + t.height
|
|
1380
1371
|
};
|
|
1381
1372
|
break;
|
|
1382
1373
|
case Te:
|
|
1383
|
-
|
|
1374
|
+
s = {
|
|
1384
1375
|
x: t.x + t.width,
|
|
1385
1376
|
y: l
|
|
1386
1377
|
};
|
|
1387
1378
|
break;
|
|
1388
1379
|
case xe:
|
|
1389
|
-
|
|
1380
|
+
s = {
|
|
1390
1381
|
x: t.x - n.width,
|
|
1391
1382
|
y: l
|
|
1392
1383
|
};
|
|
1393
1384
|
break;
|
|
1394
1385
|
default:
|
|
1395
|
-
|
|
1386
|
+
s = {
|
|
1396
1387
|
x: t.x,
|
|
1397
1388
|
y: t.y
|
|
1398
1389
|
};
|
|
1399
1390
|
}
|
|
1400
|
-
var v =
|
|
1391
|
+
var v = i ? Zt(i) : null;
|
|
1401
1392
|
if (v != null) {
|
|
1402
1393
|
var c = v === "y" ? "height" : "width";
|
|
1403
1394
|
switch (r) {
|
|
1404
1395
|
case qe:
|
|
1405
|
-
|
|
1396
|
+
s[v] = s[v] - (t[c] / 2 - n[c] / 2);
|
|
1406
1397
|
break;
|
|
1407
1398
|
case rt:
|
|
1408
|
-
|
|
1399
|
+
s[v] = s[v] + (t[c] / 2 - n[c] / 2);
|
|
1409
1400
|
break;
|
|
1410
1401
|
}
|
|
1411
1402
|
}
|
|
1412
|
-
return
|
|
1403
|
+
return s;
|
|
1413
1404
|
}
|
|
1414
1405
|
function lt(e, t) {
|
|
1415
1406
|
t === void 0 && (t = {});
|
|
1416
|
-
var n = t,
|
|
1417
|
-
reference:
|
|
1418
|
-
element:
|
|
1419
|
-
placement:
|
|
1420
|
-
}),
|
|
1421
|
-
top:
|
|
1422
|
-
bottom: Y.bottom -
|
|
1423
|
-
left:
|
|
1424
|
-
right: Y.right -
|
|
1425
|
-
},
|
|
1426
|
-
if (g === Ge &&
|
|
1427
|
-
var se =
|
|
1407
|
+
var n = t, a = n.placement, i = a === void 0 ? e.placement : a, r = n.strategy, o = r === void 0 ? e.strategy : r, l = n.boundary, s = l === void 0 ? Na : l, v = n.rootBoundary, c = v === void 0 ? Ln : v, d = n.elementContext, g = d === void 0 ? Ge : d, h = n.altBoundary, y = h === void 0 ? !1 : h, $ = n.padding, z = $ === void 0 ? 0 : $, V = An(typeof z != "number" ? z : Dn(z, ct)), N = g === Ge ? ja : Ge, A = e.rects.popper, O = e.elements[y ? N : g], k = wi(Ie(O) ? O : O.contextElement || Ae(e.elements.popper), s, c, o), x = Xe(e.elements.reference), E = In({
|
|
1408
|
+
reference: x,
|
|
1409
|
+
element: A,
|
|
1410
|
+
placement: i
|
|
1411
|
+
}), L = Wt(Object.assign({}, A, E)), Y = g === Ge ? L : x, X = {
|
|
1412
|
+
top: k.top - Y.top + V.top,
|
|
1413
|
+
bottom: Y.bottom - k.bottom + V.bottom,
|
|
1414
|
+
left: k.left - Y.left + V.left,
|
|
1415
|
+
right: Y.right - k.right + V.right
|
|
1416
|
+
}, D = e.modifiersData.offset;
|
|
1417
|
+
if (g === Ge && D) {
|
|
1418
|
+
var se = D[i];
|
|
1428
1419
|
Object.keys(X).forEach(function(Q) {
|
|
1429
1420
|
var te = [Te, Oe].indexOf(Q) >= 0 ? 1 : -1, pe = [we, Oe].indexOf(Q) >= 0 ? "y" : "x";
|
|
1430
1421
|
X[Q] += se[pe] * te;
|
|
@@ -1434,22 +1425,22 @@ function lt(e, t) {
|
|
|
1434
1425
|
}
|
|
1435
1426
|
function xi(e, t) {
|
|
1436
1427
|
t === void 0 && (t = {});
|
|
1437
|
-
var n = t,
|
|
1428
|
+
var n = t, a = n.placement, i = n.boundary, r = n.rootBoundary, o = n.padding, l = n.flipVariations, s = n.allowedAutoPlacements, v = s === void 0 ? Bn : s, c = Ke(a), d = c ? l ? un : un.filter(function(y) {
|
|
1438
1429
|
return Ke(y) === c;
|
|
1439
1430
|
}) : ct, g = d.filter(function(y) {
|
|
1440
1431
|
return v.indexOf(y) >= 0;
|
|
1441
1432
|
});
|
|
1442
1433
|
g.length === 0 && (g = d);
|
|
1443
|
-
var
|
|
1444
|
-
return y[
|
|
1445
|
-
placement:
|
|
1446
|
-
boundary:
|
|
1434
|
+
var h = g.reduce(function(y, $) {
|
|
1435
|
+
return y[$] = lt(e, {
|
|
1436
|
+
placement: $,
|
|
1437
|
+
boundary: i,
|
|
1447
1438
|
rootBoundary: r,
|
|
1448
|
-
padding:
|
|
1449
|
-
})[Ee(
|
|
1439
|
+
padding: o
|
|
1440
|
+
})[Ee($)], y;
|
|
1450
1441
|
}, {});
|
|
1451
|
-
return Object.keys(
|
|
1452
|
-
return
|
|
1442
|
+
return Object.keys(h).sort(function(y, $) {
|
|
1443
|
+
return h[y] - h[$];
|
|
1453
1444
|
});
|
|
1454
1445
|
}
|
|
1455
1446
|
function ki(e) {
|
|
@@ -1459,39 +1450,39 @@ function ki(e) {
|
|
|
1459
1450
|
return [vn(e), t, vn(t)];
|
|
1460
1451
|
}
|
|
1461
1452
|
function $i(e) {
|
|
1462
|
-
var t = e.state, n = e.options,
|
|
1463
|
-
if (!t.modifiersData[
|
|
1464
|
-
for (var
|
|
1465
|
-
return
|
|
1453
|
+
var t = e.state, n = e.options, a = e.name;
|
|
1454
|
+
if (!t.modifiersData[a]._skip) {
|
|
1455
|
+
for (var i = n.mainAxis, r = i === void 0 ? !0 : i, o = n.altAxis, l = o === void 0 ? !0 : o, s = n.fallbackPlacements, v = n.padding, c = n.boundary, d = n.rootBoundary, g = n.altBoundary, h = n.flipVariations, y = h === void 0 ? !0 : h, $ = n.allowedAutoPlacements, z = t.options.placement, V = Ee(z), N = V === z, A = s || (N || !y ? [bt(z)] : ki(z)), O = [z].concat(A).reduce(function(M, ee) {
|
|
1456
|
+
return M.concat(Ee(ee) === Xt ? xi(t, {
|
|
1466
1457
|
placement: ee,
|
|
1467
1458
|
boundary: c,
|
|
1468
1459
|
rootBoundary: d,
|
|
1469
1460
|
padding: v,
|
|
1470
1461
|
flipVariations: y,
|
|
1471
|
-
allowedAutoPlacements:
|
|
1462
|
+
allowedAutoPlacements: $
|
|
1472
1463
|
}) : ee);
|
|
1473
|
-
}, []),
|
|
1474
|
-
var
|
|
1475
|
-
placement:
|
|
1464
|
+
}, []), k = t.rects.reference, x = t.rects.popper, E = /* @__PURE__ */ new Map(), L = !0, Y = O[0], X = 0; X < O.length; X++) {
|
|
1465
|
+
var D = O[X], se = Ee(D), Q = Ke(D) === qe, te = [we, Oe].indexOf(se) >= 0, pe = te ? "width" : "height", G = lt(t, {
|
|
1466
|
+
placement: D,
|
|
1476
1467
|
boundary: c,
|
|
1477
1468
|
rootBoundary: d,
|
|
1478
1469
|
altBoundary: g,
|
|
1479
1470
|
padding: v
|
|
1480
|
-
}),
|
|
1481
|
-
|
|
1482
|
-
var
|
|
1483
|
-
if (r &&
|
|
1484
|
-
return
|
|
1471
|
+
}), W = te ? Q ? Te : xe : Q ? Oe : we;
|
|
1472
|
+
k[pe] > x[pe] && (W = bt(W));
|
|
1473
|
+
var I = bt(W), R = [];
|
|
1474
|
+
if (r && R.push(G[se] <= 0), l && R.push(G[W] <= 0, G[I] <= 0), R.every(function(M) {
|
|
1475
|
+
return M;
|
|
1485
1476
|
})) {
|
|
1486
|
-
Y =
|
|
1477
|
+
Y = D, L = !1;
|
|
1487
1478
|
break;
|
|
1488
1479
|
}
|
|
1489
|
-
|
|
1480
|
+
E.set(D, R);
|
|
1490
1481
|
}
|
|
1491
|
-
if (
|
|
1482
|
+
if (L)
|
|
1492
1483
|
for (var F = y ? 3 : 1, J = function(ee) {
|
|
1493
|
-
var ce =
|
|
1494
|
-
var ie =
|
|
1484
|
+
var ce = O.find(function(b) {
|
|
1485
|
+
var ie = E.get(b);
|
|
1495
1486
|
if (ie)
|
|
1496
1487
|
return ie.slice(0, ee).every(function(re) {
|
|
1497
1488
|
return re;
|
|
@@ -1500,10 +1491,10 @@ function $i(e) {
|
|
|
1500
1491
|
if (ce)
|
|
1501
1492
|
return Y = ce, "break";
|
|
1502
1493
|
}, f = F; f > 0; f--) {
|
|
1503
|
-
var
|
|
1504
|
-
if (
|
|
1494
|
+
var S = J(f);
|
|
1495
|
+
if (S === "break") break;
|
|
1505
1496
|
}
|
|
1506
|
-
t.placement !== Y && (t.modifiersData[
|
|
1497
|
+
t.placement !== Y && (t.modifiersData[a]._skip = !0, t.placement = Y, t.reset = !0);
|
|
1507
1498
|
}
|
|
1508
1499
|
}
|
|
1509
1500
|
const Si = {
|
|
@@ -1533,13 +1524,13 @@ function hn(e) {
|
|
|
1533
1524
|
});
|
|
1534
1525
|
}
|
|
1535
1526
|
function Ci(e) {
|
|
1536
|
-
var t = e.state, n = e.name,
|
|
1527
|
+
var t = e.state, n = e.name, a = t.rects.reference, i = t.rects.popper, r = t.modifiersData.preventOverflow, o = lt(t, {
|
|
1537
1528
|
elementContext: "reference"
|
|
1538
1529
|
}), l = lt(t, {
|
|
1539
1530
|
altBoundary: !0
|
|
1540
|
-
}),
|
|
1531
|
+
}), s = mn(o, a), v = mn(l, i, r), c = hn(s), d = hn(v);
|
|
1541
1532
|
t.modifiersData[n] = {
|
|
1542
|
-
referenceClippingOffsets:
|
|
1533
|
+
referenceClippingOffsets: s,
|
|
1543
1534
|
popperEscapeOffsets: v,
|
|
1544
1535
|
isReferenceHidden: c,
|
|
1545
1536
|
hasPopperEscaped: d
|
|
@@ -1556,22 +1547,22 @@ const Oi = {
|
|
|
1556
1547
|
fn: Ci
|
|
1557
1548
|
};
|
|
1558
1549
|
function Ti(e, t, n) {
|
|
1559
|
-
var
|
|
1550
|
+
var a = Ee(e), i = [xe, we].indexOf(a) >= 0 ? -1 : 1, r = typeof n == "function" ? n(Object.assign({}, t, {
|
|
1560
1551
|
placement: e
|
|
1561
|
-
})) : n,
|
|
1562
|
-
return
|
|
1552
|
+
})) : n, o = r[0], l = r[1];
|
|
1553
|
+
return o = o || 0, l = (l || 0) * i, [xe, Te].indexOf(a) >= 0 ? {
|
|
1563
1554
|
x: l,
|
|
1564
|
-
y:
|
|
1555
|
+
y: o
|
|
1565
1556
|
} : {
|
|
1566
|
-
x:
|
|
1557
|
+
x: o,
|
|
1567
1558
|
y: l
|
|
1568
1559
|
};
|
|
1569
1560
|
}
|
|
1570
1561
|
function zi(e) {
|
|
1571
|
-
var t = e.state, n = e.options,
|
|
1562
|
+
var t = e.state, n = e.options, a = e.name, i = n.offset, r = i === void 0 ? [0, 0] : i, o = Bn.reduce(function(c, d) {
|
|
1572
1563
|
return c[d] = Ti(d, t.rects, r), c;
|
|
1573
|
-
}, {}), l =
|
|
1574
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x +=
|
|
1564
|
+
}, {}), l = o[t.placement], s = l.x, v = l.y;
|
|
1565
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += v), t.modifiersData[a] = o;
|
|
1575
1566
|
}
|
|
1576
1567
|
const Ei = {
|
|
1577
1568
|
name: "offset",
|
|
@@ -1582,7 +1573,7 @@ const Ei = {
|
|
|
1582
1573
|
};
|
|
1583
1574
|
function Ri(e) {
|
|
1584
1575
|
var t = e.state, n = e.name;
|
|
1585
|
-
t.modifiersData[n] =
|
|
1576
|
+
t.modifiersData[n] = In({
|
|
1586
1577
|
reference: t.rects.reference,
|
|
1587
1578
|
element: t.rects.popper,
|
|
1588
1579
|
placement: t.placement
|
|
@@ -1598,44 +1589,44 @@ const Li = {
|
|
|
1598
1589
|
function Bi(e) {
|
|
1599
1590
|
return e === "x" ? "y" : "x";
|
|
1600
1591
|
}
|
|
1601
|
-
function
|
|
1602
|
-
var t = e.state, n = e.options,
|
|
1603
|
-
boundary:
|
|
1592
|
+
function Vi(e) {
|
|
1593
|
+
var t = e.state, n = e.options, a = e.name, i = n.mainAxis, r = i === void 0 ? !0 : i, o = n.altAxis, l = o === void 0 ? !1 : o, s = n.boundary, v = n.rootBoundary, c = n.altBoundary, d = n.padding, g = n.tether, h = g === void 0 ? !0 : g, y = n.tetherOffset, $ = y === void 0 ? 0 : y, z = lt(t, {
|
|
1594
|
+
boundary: s,
|
|
1604
1595
|
rootBoundary: v,
|
|
1605
1596
|
padding: d,
|
|
1606
1597
|
altBoundary: c
|
|
1607
|
-
}),
|
|
1598
|
+
}), V = Ee(t.placement), N = Ke(t.placement), A = !N, O = Zt(V), k = Bi(O), x = t.modifiersData.popperOffsets, E = t.rects.reference, L = t.rects.popper, Y = typeof $ == "function" ? $(Object.assign({}, t.rects, {
|
|
1608
1599
|
placement: t.placement
|
|
1609
|
-
})) :
|
|
1600
|
+
})) : $, X = typeof Y == "number" ? {
|
|
1610
1601
|
mainAxis: Y,
|
|
1611
1602
|
altAxis: Y
|
|
1612
1603
|
} : Object.assign({
|
|
1613
1604
|
mainAxis: 0,
|
|
1614
1605
|
altAxis: 0
|
|
1615
|
-
}, Y),
|
|
1606
|
+
}, Y), D = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, se = {
|
|
1616
1607
|
x: 0,
|
|
1617
1608
|
y: 0
|
|
1618
1609
|
};
|
|
1619
|
-
if (
|
|
1610
|
+
if (x) {
|
|
1620
1611
|
if (r) {
|
|
1621
|
-
var Q, te =
|
|
1612
|
+
var Q, te = O === "y" ? we : xe, pe = O === "y" ? Oe : Te, G = O === "y" ? "height" : "width", W = x[O], I = W + z[te], R = W - z[pe], F = h ? -L[G] / 2 : 0, J = N === qe ? E[G] : L[G], f = N === qe ? -L[G] : -E[G], S = t.elements.arrow, M = h && S ? Gt(S) : {
|
|
1622
1613
|
width: 0,
|
|
1623
1614
|
height: 0
|
|
1624
|
-
}, ee = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Wn(), ce = ee[te], b = ee[pe], ie = et(0,
|
|
1625
|
-
|
|
1615
|
+
}, ee = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Wn(), ce = ee[te], b = ee[pe], ie = et(0, E[G], M[G]), re = A ? E[G] / 2 - F - ie - ce - X.mainAxis : J - ie - ce - X.mainAxis, ke = A ? -E[G] / 2 + F + ie + b + X.mainAxis : f + ie + b + X.mainAxis, De = t.elements.arrow && ut(t.elements.arrow), T = De ? O === "y" ? De.clientTop || 0 : De.clientLeft || 0 : 0, P = (Q = D?.[O]) != null ? Q : 0, fe = W + re - P - T, ue = W + ke - P, Pe = et(h ? yt(I, fe) : I, W, h ? Me(R, ue) : R);
|
|
1616
|
+
x[O] = Pe, se[O] = Pe - W;
|
|
1626
1617
|
}
|
|
1627
1618
|
if (l) {
|
|
1628
|
-
var dt, w =
|
|
1629
|
-
|
|
1619
|
+
var dt, w = O === "x" ? we : xe, K = O === "x" ? Oe : Te, H = x[k], be = k === "y" ? "height" : "width", me = H + z[w], ft = H - z[K], vt = [we, xe].indexOf(V) !== -1, nn = (dt = D?.[k]) != null ? dt : 0, an = vt ? me : H - E[be] - L[be] - nn + X.altAxis, rn = vt ? H + E[be] + L[be] - nn - X.altAxis : ft, ln = h && vt ? ai(an, H, rn) : et(h ? an : me, H, h ? rn : ft);
|
|
1620
|
+
x[k] = ln, se[k] = ln - H;
|
|
1630
1621
|
}
|
|
1631
|
-
t.modifiersData[
|
|
1622
|
+
t.modifiersData[a] = se;
|
|
1632
1623
|
}
|
|
1633
1624
|
}
|
|
1634
|
-
const
|
|
1625
|
+
const Pi = {
|
|
1635
1626
|
name: "preventOverflow",
|
|
1636
1627
|
enabled: !0,
|
|
1637
1628
|
phase: "main",
|
|
1638
|
-
fn:
|
|
1629
|
+
fn: Vi,
|
|
1639
1630
|
requiresIfExists: ["offset"]
|
|
1640
1631
|
};
|
|
1641
1632
|
function Wi(e) {
|
|
@@ -1648,50 +1639,50 @@ function Ai(e) {
|
|
|
1648
1639
|
return e === $e(e) || !Ce(e) ? Qt(e) : Wi(e);
|
|
1649
1640
|
}
|
|
1650
1641
|
function Di(e) {
|
|
1651
|
-
var t = e.getBoundingClientRect(), n = Ye(t.width) / e.offsetWidth || 1,
|
|
1652
|
-
return n !== 1 ||
|
|
1642
|
+
var t = e.getBoundingClientRect(), n = Ye(t.width) / e.offsetWidth || 1, a = Ye(t.height) / e.offsetHeight || 1;
|
|
1643
|
+
return n !== 1 || a !== 1;
|
|
1653
1644
|
}
|
|
1654
1645
|
function Mi(e, t, n) {
|
|
1655
1646
|
n === void 0 && (n = !1);
|
|
1656
|
-
var
|
|
1647
|
+
var a = Ce(t), i = Ce(t) && Di(t), r = Ae(t), o = Xe(e, i, n), l = {
|
|
1657
1648
|
scrollLeft: 0,
|
|
1658
1649
|
scrollTop: 0
|
|
1659
|
-
},
|
|
1650
|
+
}, s = {
|
|
1660
1651
|
x: 0,
|
|
1661
1652
|
y: 0
|
|
1662
1653
|
};
|
|
1663
|
-
return (
|
|
1664
|
-
en(r)) && (l = Ai(t)), Ce(t) ? (
|
|
1665
|
-
x:
|
|
1666
|
-
y:
|
|
1667
|
-
width:
|
|
1668
|
-
height:
|
|
1654
|
+
return (a || !a && !n) && ((Re(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1655
|
+
en(r)) && (l = Ai(t)), Ce(t) ? (s = Xe(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : r && (s.x = Jt(r))), {
|
|
1656
|
+
x: o.left + l.scrollLeft - s.x,
|
|
1657
|
+
y: o.top + l.scrollTop - s.y,
|
|
1658
|
+
width: o.width,
|
|
1659
|
+
height: o.height
|
|
1669
1660
|
};
|
|
1670
1661
|
}
|
|
1671
|
-
function
|
|
1672
|
-
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(),
|
|
1662
|
+
function Ii(e) {
|
|
1663
|
+
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), a = [];
|
|
1673
1664
|
e.forEach(function(r) {
|
|
1674
1665
|
t.set(r.name, r);
|
|
1675
1666
|
});
|
|
1676
|
-
function
|
|
1667
|
+
function i(r) {
|
|
1677
1668
|
n.add(r.name);
|
|
1678
|
-
var
|
|
1679
|
-
|
|
1669
|
+
var o = [].concat(r.requires || [], r.requiresIfExists || []);
|
|
1670
|
+
o.forEach(function(l) {
|
|
1680
1671
|
if (!n.has(l)) {
|
|
1681
|
-
var
|
|
1682
|
-
|
|
1672
|
+
var s = t.get(l);
|
|
1673
|
+
s && i(s);
|
|
1683
1674
|
}
|
|
1684
|
-
}),
|
|
1675
|
+
}), a.push(r);
|
|
1685
1676
|
}
|
|
1686
1677
|
return e.forEach(function(r) {
|
|
1687
|
-
n.has(r.name) ||
|
|
1688
|
-
}),
|
|
1678
|
+
n.has(r.name) || i(r);
|
|
1679
|
+
}), a;
|
|
1689
1680
|
}
|
|
1690
|
-
function
|
|
1691
|
-
var t =
|
|
1692
|
-
return Za.reduce(function(n,
|
|
1693
|
-
return n.concat(t.filter(function(
|
|
1694
|
-
return
|
|
1681
|
+
function Ni(e) {
|
|
1682
|
+
var t = Ii(e);
|
|
1683
|
+
return Za.reduce(function(n, a) {
|
|
1684
|
+
return n.concat(t.filter(function(i) {
|
|
1685
|
+
return i.phase === a;
|
|
1695
1686
|
}));
|
|
1696
1687
|
}, []);
|
|
1697
1688
|
}
|
|
@@ -1706,12 +1697,12 @@ function ji(e) {
|
|
|
1706
1697
|
};
|
|
1707
1698
|
}
|
|
1708
1699
|
function Hi(e) {
|
|
1709
|
-
var t = e.reduce(function(n,
|
|
1710
|
-
var
|
|
1711
|
-
return n[
|
|
1712
|
-
options: Object.assign({},
|
|
1713
|
-
data: Object.assign({},
|
|
1714
|
-
}) :
|
|
1700
|
+
var t = e.reduce(function(n, a) {
|
|
1701
|
+
var i = n[a.name];
|
|
1702
|
+
return n[a.name] = i ? Object.assign({}, i, a, {
|
|
1703
|
+
options: Object.assign({}, i.options, a.options),
|
|
1704
|
+
data: Object.assign({}, i.data, a.data)
|
|
1705
|
+
}) : a, n;
|
|
1715
1706
|
}, {});
|
|
1716
1707
|
return Object.keys(t).map(function(n) {
|
|
1717
1708
|
return t[n];
|
|
@@ -1725,14 +1716,14 @@ var gn = {
|
|
|
1725
1716
|
function bn() {
|
|
1726
1717
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1727
1718
|
t[n] = arguments[n];
|
|
1728
|
-
return !t.some(function(
|
|
1729
|
-
return !(
|
|
1719
|
+
return !t.some(function(a) {
|
|
1720
|
+
return !(a && typeof a.getBoundingClientRect == "function");
|
|
1730
1721
|
});
|
|
1731
1722
|
}
|
|
1732
1723
|
function _i(e) {
|
|
1733
1724
|
e === void 0 && (e = {});
|
|
1734
|
-
var t = e, n = t.defaultModifiers,
|
|
1735
|
-
return function(l,
|
|
1725
|
+
var t = e, n = t.defaultModifiers, a = n === void 0 ? [] : n, i = t.defaultOptions, r = i === void 0 ? gn : i;
|
|
1726
|
+
return function(l, s, v) {
|
|
1736
1727
|
v === void 0 && (v = r);
|
|
1737
1728
|
var c = {
|
|
1738
1729
|
placement: "bottom",
|
|
@@ -1741,22 +1732,22 @@ function _i(e) {
|
|
|
1741
1732
|
modifiersData: {},
|
|
1742
1733
|
elements: {
|
|
1743
1734
|
reference: l,
|
|
1744
|
-
popper:
|
|
1735
|
+
popper: s
|
|
1745
1736
|
},
|
|
1746
1737
|
attributes: {},
|
|
1747
1738
|
styles: {}
|
|
1748
|
-
}, d = [], g = !1,
|
|
1739
|
+
}, d = [], g = !1, h = {
|
|
1749
1740
|
state: c,
|
|
1750
|
-
setOptions: function(
|
|
1751
|
-
var
|
|
1752
|
-
|
|
1753
|
-
reference:
|
|
1754
|
-
popper: tt(
|
|
1741
|
+
setOptions: function(V) {
|
|
1742
|
+
var N = typeof V == "function" ? V(c.options) : V;
|
|
1743
|
+
$(), c.options = Object.assign({}, r, c.options, N), c.scrollParents = {
|
|
1744
|
+
reference: Ie(l) ? tt(l) : l.contextElement ? tt(l.contextElement) : [],
|
|
1745
|
+
popper: tt(s)
|
|
1755
1746
|
};
|
|
1756
|
-
var
|
|
1757
|
-
return c.orderedModifiers =
|
|
1758
|
-
return
|
|
1759
|
-
}), y(),
|
|
1747
|
+
var A = Ni(Hi([].concat(a, c.options.modifiers)));
|
|
1748
|
+
return c.orderedModifiers = A.filter(function(O) {
|
|
1749
|
+
return O.enabled;
|
|
1750
|
+
}), y(), h.update();
|
|
1760
1751
|
},
|
|
1761
1752
|
// Sync update – it will always be executed, even if not necessary. This
|
|
1762
1753
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -1765,25 +1756,25 @@ function _i(e) {
|
|
|
1765
1756
|
// prefer the async Popper#update method
|
|
1766
1757
|
forceUpdate: function() {
|
|
1767
1758
|
if (!g) {
|
|
1768
|
-
var
|
|
1769
|
-
if (bn(
|
|
1759
|
+
var V = c.elements, N = V.reference, A = V.popper;
|
|
1760
|
+
if (bn(N, A)) {
|
|
1770
1761
|
c.rects = {
|
|
1771
|
-
reference: Mi(
|
|
1772
|
-
popper: Gt(
|
|
1762
|
+
reference: Mi(N, ut(A), c.options.strategy === "fixed"),
|
|
1763
|
+
popper: Gt(A)
|
|
1773
1764
|
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(X) {
|
|
1774
1765
|
return c.modifiersData[X.name] = Object.assign({}, X.data);
|
|
1775
1766
|
});
|
|
1776
|
-
for (var
|
|
1767
|
+
for (var O = 0; O < c.orderedModifiers.length; O++) {
|
|
1777
1768
|
if (c.reset === !0) {
|
|
1778
|
-
c.reset = !1,
|
|
1769
|
+
c.reset = !1, O = -1;
|
|
1779
1770
|
continue;
|
|
1780
1771
|
}
|
|
1781
|
-
var
|
|
1782
|
-
typeof
|
|
1772
|
+
var k = c.orderedModifiers[O], x = k.fn, E = k.options, L = E === void 0 ? {} : E, Y = k.name;
|
|
1773
|
+
typeof x == "function" && (c = x({
|
|
1783
1774
|
state: c,
|
|
1784
|
-
options:
|
|
1775
|
+
options: L,
|
|
1785
1776
|
name: Y,
|
|
1786
|
-
instance:
|
|
1777
|
+
instance: h
|
|
1787
1778
|
}) || c);
|
|
1788
1779
|
}
|
|
1789
1780
|
}
|
|
@@ -1792,54 +1783,54 @@ function _i(e) {
|
|
|
1792
1783
|
// Async and optimistically optimized update – it will not be executed if
|
|
1793
1784
|
// not necessary (debounced to run at most once-per-tick)
|
|
1794
1785
|
update: ji(function() {
|
|
1795
|
-
return new Promise(function(
|
|
1796
|
-
|
|
1786
|
+
return new Promise(function(z) {
|
|
1787
|
+
h.forceUpdate(), z(c);
|
|
1797
1788
|
});
|
|
1798
1789
|
}),
|
|
1799
1790
|
destroy: function() {
|
|
1800
|
-
|
|
1791
|
+
$(), g = !0;
|
|
1801
1792
|
}
|
|
1802
1793
|
};
|
|
1803
|
-
if (!bn(l,
|
|
1804
|
-
return
|
|
1805
|
-
|
|
1806
|
-
!g && v.onFirstUpdate && v.onFirstUpdate(
|
|
1794
|
+
if (!bn(l, s))
|
|
1795
|
+
return h;
|
|
1796
|
+
h.setOptions(v).then(function(z) {
|
|
1797
|
+
!g && v.onFirstUpdate && v.onFirstUpdate(z);
|
|
1807
1798
|
});
|
|
1808
1799
|
function y() {
|
|
1809
|
-
c.orderedModifiers.forEach(function(
|
|
1810
|
-
var
|
|
1811
|
-
if (typeof
|
|
1812
|
-
var
|
|
1800
|
+
c.orderedModifiers.forEach(function(z) {
|
|
1801
|
+
var V = z.name, N = z.options, A = N === void 0 ? {} : N, O = z.effect;
|
|
1802
|
+
if (typeof O == "function") {
|
|
1803
|
+
var k = O({
|
|
1813
1804
|
state: c,
|
|
1814
|
-
name:
|
|
1815
|
-
instance:
|
|
1816
|
-
options:
|
|
1817
|
-
}),
|
|
1805
|
+
name: V,
|
|
1806
|
+
instance: h,
|
|
1807
|
+
options: A
|
|
1808
|
+
}), x = function() {
|
|
1818
1809
|
};
|
|
1819
|
-
d.push(
|
|
1810
|
+
d.push(k || x);
|
|
1820
1811
|
}
|
|
1821
1812
|
});
|
|
1822
1813
|
}
|
|
1823
|
-
function
|
|
1824
|
-
d.forEach(function(
|
|
1825
|
-
return
|
|
1814
|
+
function $() {
|
|
1815
|
+
d.forEach(function(z) {
|
|
1816
|
+
return z();
|
|
1826
1817
|
}), d = [];
|
|
1827
1818
|
}
|
|
1828
|
-
return
|
|
1819
|
+
return h;
|
|
1829
1820
|
};
|
|
1830
1821
|
}
|
|
1831
|
-
var Fi = [vi, Li, di, ei, Ei, Si,
|
|
1822
|
+
var Fi = [vi, Li, di, ei, Ei, Si, Pi, oi, Oi], Nn = /* @__PURE__ */ _i({
|
|
1832
1823
|
defaultModifiers: Fi
|
|
1833
1824
|
}), Ui = typeof global == "object" && global && global.Object === Object && global, qi = typeof self == "object" && self && self.Object === Object && self, jn = Ui || qi || Function("return this")(), wt = jn.Symbol, Hn = Object.prototype, Yi = Hn.hasOwnProperty, Xi = Hn.toString, Ze = wt ? wt.toStringTag : void 0;
|
|
1834
1825
|
function Ki(e) {
|
|
1835
1826
|
var t = Yi.call(e, Ze), n = e[Ze];
|
|
1836
1827
|
try {
|
|
1837
1828
|
e[Ze] = void 0;
|
|
1838
|
-
var
|
|
1829
|
+
var a = !0;
|
|
1839
1830
|
} catch {
|
|
1840
1831
|
}
|
|
1841
|
-
var
|
|
1842
|
-
return
|
|
1832
|
+
var i = Xi.call(e);
|
|
1833
|
+
return a && (t ? e[Ze] = n : delete e[Ze]), i;
|
|
1843
1834
|
}
|
|
1844
1835
|
var Gi = Object.prototype, Zi = Gi.toString;
|
|
1845
1836
|
function Qi(e) {
|
|
@@ -1890,78 +1881,78 @@ var Lt = function() {
|
|
|
1890
1881
|
return jn.Date.now();
|
|
1891
1882
|
}, vr = "Expected a function", pr = Math.max, mr = Math.min;
|
|
1892
1883
|
function At(e, t, n) {
|
|
1893
|
-
var
|
|
1884
|
+
var a, i, r, o, l, s, v = 0, c = !1, d = !1, g = !0;
|
|
1894
1885
|
if (typeof e != "function")
|
|
1895
1886
|
throw new TypeError(vr);
|
|
1896
1887
|
t = xn(t) || 0, xt(n) && (c = !!n.leading, d = "maxWait" in n, r = d ? pr(xn(n.maxWait) || 0, t) : r, g = "trailing" in n ? !!n.trailing : g);
|
|
1897
|
-
function
|
|
1898
|
-
var
|
|
1899
|
-
return
|
|
1888
|
+
function h(x) {
|
|
1889
|
+
var E = a, L = i;
|
|
1890
|
+
return a = i = void 0, v = x, o = e.apply(L, E), o;
|
|
1900
1891
|
}
|
|
1901
|
-
function y(
|
|
1902
|
-
return v =
|
|
1892
|
+
function y(x) {
|
|
1893
|
+
return v = x, l = setTimeout(V, t), c ? h(x) : o;
|
|
1903
1894
|
}
|
|
1904
|
-
function
|
|
1905
|
-
var
|
|
1906
|
-
return d ? mr(Y, r -
|
|
1895
|
+
function $(x) {
|
|
1896
|
+
var E = x - s, L = x - v, Y = t - E;
|
|
1897
|
+
return d ? mr(Y, r - L) : Y;
|
|
1907
1898
|
}
|
|
1908
|
-
function
|
|
1909
|
-
var
|
|
1910
|
-
return
|
|
1899
|
+
function z(x) {
|
|
1900
|
+
var E = x - s, L = x - v;
|
|
1901
|
+
return s === void 0 || E >= t || E < 0 || d && L >= r;
|
|
1911
1902
|
}
|
|
1912
|
-
function
|
|
1913
|
-
var
|
|
1914
|
-
if (
|
|
1915
|
-
return
|
|
1916
|
-
l = setTimeout(
|
|
1903
|
+
function V() {
|
|
1904
|
+
var x = Lt();
|
|
1905
|
+
if (z(x))
|
|
1906
|
+
return N(x);
|
|
1907
|
+
l = setTimeout(V, $(x));
|
|
1917
1908
|
}
|
|
1918
|
-
function
|
|
1919
|
-
return l = void 0, g &&
|
|
1909
|
+
function N(x) {
|
|
1910
|
+
return l = void 0, g && a ? h(x) : (a = i = void 0, o);
|
|
1920
1911
|
}
|
|
1921
|
-
function
|
|
1922
|
-
l !== void 0 && clearTimeout(l), v = 0,
|
|
1912
|
+
function A() {
|
|
1913
|
+
l !== void 0 && clearTimeout(l), v = 0, a = s = i = l = void 0;
|
|
1923
1914
|
}
|
|
1924
|
-
function
|
|
1925
|
-
return l === void 0 ?
|
|
1915
|
+
function O() {
|
|
1916
|
+
return l === void 0 ? o : N(Lt());
|
|
1926
1917
|
}
|
|
1927
|
-
function
|
|
1928
|
-
var
|
|
1929
|
-
if (
|
|
1918
|
+
function k() {
|
|
1919
|
+
var x = Lt(), E = z(x);
|
|
1920
|
+
if (a = arguments, i = this, s = x, E) {
|
|
1930
1921
|
if (l === void 0)
|
|
1931
|
-
return y(
|
|
1922
|
+
return y(s);
|
|
1932
1923
|
if (d)
|
|
1933
|
-
return clearTimeout(l), l = setTimeout(
|
|
1924
|
+
return clearTimeout(l), l = setTimeout(V, t), h(s);
|
|
1934
1925
|
}
|
|
1935
|
-
return l === void 0 && (l = setTimeout(
|
|
1926
|
+
return l === void 0 && (l = setTimeout(V, t)), o;
|
|
1936
1927
|
}
|
|
1937
|
-
return
|
|
1928
|
+
return k.cancel = A, k.flush = O, k;
|
|
1938
1929
|
}
|
|
1939
1930
|
var hr = "Expected a function";
|
|
1940
1931
|
function gr(e, t, n) {
|
|
1941
|
-
var
|
|
1932
|
+
var a = !0, i = !0;
|
|
1942
1933
|
if (typeof e != "function")
|
|
1943
1934
|
throw new TypeError(hr);
|
|
1944
|
-
return xt(n) && (
|
|
1945
|
-
leading:
|
|
1935
|
+
return xt(n) && (a = "leading" in n ? !!n.leading : a, i = "trailing" in n ? !!n.trailing : i), At(e, t, {
|
|
1936
|
+
leading: a,
|
|
1946
1937
|
maxWait: t,
|
|
1947
|
-
trailing:
|
|
1938
|
+
trailing: i
|
|
1948
1939
|
});
|
|
1949
1940
|
}
|
|
1950
1941
|
function _n(e, t, n = {}) {
|
|
1951
|
-
const { ignore:
|
|
1942
|
+
const { ignore: a = [], capture: i = !0 } = n;
|
|
1952
1943
|
let r = !1;
|
|
1953
|
-
function
|
|
1944
|
+
function o(d, g) {
|
|
1954
1945
|
return d ? d === g || d.contains(g) : !1;
|
|
1955
1946
|
}
|
|
1956
1947
|
function l(d, g) {
|
|
1957
|
-
return d.some((
|
|
1948
|
+
return d.some((h) => o(U(h), g));
|
|
1958
1949
|
}
|
|
1959
|
-
function
|
|
1950
|
+
function s() {
|
|
1960
1951
|
return Array.isArray(e) ? e : [e];
|
|
1961
1952
|
}
|
|
1962
1953
|
function v(d) {
|
|
1963
1954
|
const g = d.target;
|
|
1964
|
-
g instanceof Node && (r = l(
|
|
1955
|
+
g instanceof Node && (r = l(s(), g) || l(a, g));
|
|
1965
1956
|
}
|
|
1966
1957
|
function c(d) {
|
|
1967
1958
|
if (r) {
|
|
@@ -1969,12 +1960,12 @@ function _n(e, t, n = {}) {
|
|
|
1969
1960
|
return;
|
|
1970
1961
|
}
|
|
1971
1962
|
const g = d.target;
|
|
1972
|
-
g instanceof Node && !l(
|
|
1963
|
+
g instanceof Node && !l(s(), g) && !l(a, g) && t(d);
|
|
1973
1964
|
}
|
|
1974
|
-
|
|
1975
|
-
document.addEventListener("pointerdown", v,
|
|
1965
|
+
Ne(() => {
|
|
1966
|
+
document.addEventListener("pointerdown", v, i), document.addEventListener("click", c, i);
|
|
1976
1967
|
}), Le(() => {
|
|
1977
|
-
document.removeEventListener("pointerdown", v,
|
|
1968
|
+
document.removeEventListener("pointerdown", v, i), document.removeEventListener("click", c, i);
|
|
1978
1969
|
});
|
|
1979
1970
|
}
|
|
1980
1971
|
const Fn = 1, ot = typeof window < "u" && typeof document < "u", Se = (e) => {
|
|
@@ -1989,10 +1980,10 @@ const br = () => !ot || typeof ResizeObserver > "u" ? null : (Bt || (Bt = new Re
|
|
|
1989
1980
|
const n = br();
|
|
1990
1981
|
if (!n) return () => {
|
|
1991
1982
|
};
|
|
1992
|
-
let
|
|
1993
|
-
return
|
|
1994
|
-
const
|
|
1995
|
-
|
|
1983
|
+
let a = Je.get(e);
|
|
1984
|
+
return a || (a = /* @__PURE__ */ new Set(), Je.set(e, a), n.observe(e)), a.add(t), () => {
|
|
1985
|
+
const i = Je.get(e);
|
|
1986
|
+
i && (i.delete(t), !(i.size > 0) && (Je.delete(e), n.unobserve(e)));
|
|
1996
1987
|
};
|
|
1997
1988
|
}, kt = /* @__PURE__ */ new Set();
|
|
1998
1989
|
let nt = !1;
|
|
@@ -2007,33 +1998,33 @@ const Dt = () => {
|
|
|
2007
1998
|
}, kr = (e) => (kt.add(e), wr(), () => {
|
|
2008
1999
|
kt.delete(e), xr();
|
|
2009
2000
|
}), $r = (e) => e.isConnected ? !(e.offsetWidth === 0 && e.offsetHeight === 0 && e.clientWidth === 0 && e.clientHeight === 0) : !1, Sr = (e, t = "horizontal", n = Fn) => {
|
|
2010
|
-
const
|
|
2011
|
-
return { overflowX:
|
|
2001
|
+
const a = e.scrollWidth - e.clientWidth > n, i = e.scrollHeight - e.clientHeight > n;
|
|
2002
|
+
return { overflowX: a, overflowY: i, overflow: t === "vertical" ? i : t === "both" ? a || i : a };
|
|
2012
2003
|
};
|
|
2013
2004
|
function Ul(e, t = {}) {
|
|
2014
|
-
const n =
|
|
2015
|
-
let r = 0,
|
|
2016
|
-
const v = (
|
|
2017
|
-
n.value =
|
|
2005
|
+
const n = B(!1), a = B(!1), i = B(!1);
|
|
2006
|
+
let r = 0, o = !1, l, s;
|
|
2007
|
+
const v = (L) => {
|
|
2008
|
+
n.value = L.overflowX, a.value = L.overflowY, i.value = L.overflow;
|
|
2018
2009
|
}, c = () => {
|
|
2019
2010
|
v({ overflowX: !1, overflowY: !1, overflow: !1 });
|
|
2020
2011
|
}, d = () => {
|
|
2021
|
-
if (
|
|
2012
|
+
if (o || Se(t.enabled) === !1)
|
|
2022
2013
|
return c(), !1;
|
|
2023
|
-
const
|
|
2024
|
-
if (!
|
|
2014
|
+
const L = Se(e);
|
|
2015
|
+
if (!L)
|
|
2025
2016
|
return c(), !1;
|
|
2026
|
-
if (!$r(
|
|
2017
|
+
if (!$r(L)) return i.value;
|
|
2027
2018
|
const Y = Sr(
|
|
2028
|
-
|
|
2019
|
+
L,
|
|
2029
2020
|
Se(t.axis) ?? "horizontal",
|
|
2030
2021
|
Se(t.threshold) ?? Fn
|
|
2031
2022
|
);
|
|
2032
2023
|
return v(Y), Y.overflow;
|
|
2033
2024
|
}, g = () => {
|
|
2034
2025
|
r && (ot && cancelAnimationFrame(r), r = 0);
|
|
2035
|
-
},
|
|
2036
|
-
if (!
|
|
2026
|
+
}, h = () => (g(), d()), y = () => {
|
|
2027
|
+
if (!o) {
|
|
2037
2028
|
if (!ot || Se(t.raf) === !1) {
|
|
2038
2029
|
d();
|
|
2039
2030
|
return;
|
|
@@ -2042,47 +2033,47 @@ function Ul(e, t = {}) {
|
|
|
2042
2033
|
r = 0, d();
|
|
2043
2034
|
}));
|
|
2044
2035
|
}
|
|
2045
|
-
},
|
|
2036
|
+
}, $ = () => {
|
|
2046
2037
|
l?.(), l = void 0;
|
|
2047
|
-
},
|
|
2048
|
-
|
|
2049
|
-
},
|
|
2050
|
-
|
|
2051
|
-
},
|
|
2052
|
-
|
|
2053
|
-
},
|
|
2038
|
+
}, z = (L) => {
|
|
2039
|
+
$(), l = yr(L, y);
|
|
2040
|
+
}, V = () => {
|
|
2041
|
+
s?.(), s = void 0;
|
|
2042
|
+
}, N = () => {
|
|
2043
|
+
V(), s = kr(y);
|
|
2044
|
+
}, A = le(
|
|
2054
2045
|
() => [
|
|
2055
2046
|
Se(e),
|
|
2056
2047
|
Se(t.enabled) !== !1,
|
|
2057
2048
|
Se(t.observeResize) !== !1
|
|
2058
2049
|
],
|
|
2059
|
-
([
|
|
2060
|
-
if (
|
|
2050
|
+
([L, Y, X]) => {
|
|
2051
|
+
if ($(), !Y || !L) {
|
|
2061
2052
|
c();
|
|
2062
2053
|
return;
|
|
2063
2054
|
}
|
|
2064
|
-
X &&
|
|
2055
|
+
X && z(L), y();
|
|
2065
2056
|
},
|
|
2066
2057
|
{ flush: "post", immediate: !0 }
|
|
2067
|
-
),
|
|
2058
|
+
), O = le(
|
|
2068
2059
|
() => [Se(t.axis), Se(t.threshold)],
|
|
2069
2060
|
() => y(),
|
|
2070
2061
|
{ flush: "post" }
|
|
2071
|
-
),
|
|
2062
|
+
), k = t.deps ? le(t.deps, () => y(), { flush: "post" }) : void 0, x = le(
|
|
2072
2063
|
() => Se(t.observeFonts) !== !1 && Se(t.enabled) !== !1,
|
|
2073
|
-
(
|
|
2074
|
-
|
|
2064
|
+
(L) => {
|
|
2065
|
+
L ? N() : V();
|
|
2075
2066
|
},
|
|
2076
2067
|
{ flush: "post", immediate: !0 }
|
|
2077
|
-
),
|
|
2078
|
-
|
|
2068
|
+
), E = () => {
|
|
2069
|
+
o || (o = !0, g(), $(), V(), A(), O(), k?.(), x());
|
|
2079
2070
|
};
|
|
2080
|
-
return Qn() && Jn(
|
|
2081
|
-
isOverflow: Ot(
|
|
2071
|
+
return Qn() && Jn(E), {
|
|
2072
|
+
isOverflow: Ot(i),
|
|
2082
2073
|
isOverflowX: Ot(n),
|
|
2083
|
-
isOverflowY: Ot(
|
|
2084
|
-
checkOverflow:
|
|
2085
|
-
stop:
|
|
2074
|
+
isOverflowY: Ot(a),
|
|
2075
|
+
checkOverflow: h,
|
|
2076
|
+
stop: E
|
|
2086
2077
|
};
|
|
2087
2078
|
}
|
|
2088
2079
|
const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
@@ -2105,52 +2096,52 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2105
2096
|
},
|
|
2106
2097
|
emits: ["visible-change", "click-outside", "scroll"],
|
|
2107
2098
|
setup(e, { expose: t, emit: n }) {
|
|
2108
|
-
const
|
|
2109
|
-
let d = null, g = je({}),
|
|
2110
|
-
const
|
|
2111
|
-
const
|
|
2112
|
-
return
|
|
2113
|
-
}),
|
|
2114
|
-
const
|
|
2115
|
-
if (
|
|
2116
|
-
const fe =
|
|
2117
|
-
|
|
2099
|
+
const a = B(!1), i = e, r = p(() => i.preserveContentMount || a.value), o = p(() => !i.preserveContentMount || a.value), l = n, s = B(null), v = B(), c = B();
|
|
2100
|
+
let d = null, g = je({}), h = je({}), y = je({});
|
|
2101
|
+
const $ = (T) => typeof T == "number" ? `${T}px` : T, z = p(() => {
|
|
2102
|
+
const T = i.maxPopperHeight;
|
|
2103
|
+
return T != null && T !== "";
|
|
2104
|
+
}), V = p(() => {
|
|
2105
|
+
const T = {}, P = i.popperWidth;
|
|
2106
|
+
if (P != null && P !== "" && (T.width = $(P)), z.value) {
|
|
2107
|
+
const fe = i.maxPopperHeight;
|
|
2108
|
+
T.maxHeight = $(fe), T.overflowY = "auto", T.scrollbarWidth = "none", T.msOverflowStyle = "none";
|
|
2118
2109
|
}
|
|
2119
|
-
return
|
|
2120
|
-
}),
|
|
2121
|
-
const
|
|
2122
|
-
if (!
|
|
2123
|
-
const
|
|
2124
|
-
return
|
|
2125
|
-
},
|
|
2126
|
-
if (!
|
|
2110
|
+
return T.padding = $(i.padding), T;
|
|
2111
|
+
}), N = () => {
|
|
2112
|
+
const T = v.value;
|
|
2113
|
+
if (!T) return null;
|
|
2114
|
+
const P = T.firstElementChild;
|
|
2115
|
+
return P instanceof HTMLElement ? P : T;
|
|
2116
|
+
}, A = (T, P) => {
|
|
2117
|
+
if (!P?.length) return T;
|
|
2127
2118
|
const fe = /* @__PURE__ */ new Map();
|
|
2128
|
-
for (const ue of
|
|
2119
|
+
for (const ue of T)
|
|
2129
2120
|
ue && "name" in ue && ue.name && fe.set(ue.name, { ...ue });
|
|
2130
|
-
for (const ue of
|
|
2121
|
+
for (const ue of P) {
|
|
2131
2122
|
if (!ue || !("name" in ue) || !ue.name) continue;
|
|
2132
|
-
const
|
|
2123
|
+
const Pe = fe.get(ue.name);
|
|
2133
2124
|
fe.set(
|
|
2134
2125
|
ue.name,
|
|
2135
|
-
|
|
2136
|
-
...
|
|
2126
|
+
Pe ? {
|
|
2127
|
+
...Pe,
|
|
2137
2128
|
...ue,
|
|
2138
2129
|
options: {
|
|
2139
|
-
...
|
|
2130
|
+
...Pe.options,
|
|
2140
2131
|
...ue.options
|
|
2141
2132
|
}
|
|
2142
2133
|
} : ue
|
|
2143
2134
|
);
|
|
2144
2135
|
}
|
|
2145
2136
|
return Array.from(fe.values());
|
|
2146
|
-
},
|
|
2147
|
-
const
|
|
2148
|
-
placement:
|
|
2137
|
+
}, O = p(() => {
|
|
2138
|
+
const T = {
|
|
2139
|
+
placement: i.placement,
|
|
2149
2140
|
strategy: "fixed",
|
|
2150
2141
|
modifiers: [
|
|
2151
2142
|
{
|
|
2152
2143
|
name: "offset",
|
|
2153
|
-
options: { offset:
|
|
2144
|
+
options: { offset: i.offset }
|
|
2154
2145
|
},
|
|
2155
2146
|
{
|
|
2156
2147
|
name: "flip",
|
|
@@ -2161,13 +2152,13 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2161
2152
|
options: { boundary: "viewport", padding: 8 }
|
|
2162
2153
|
}
|
|
2163
2154
|
]
|
|
2164
|
-
},
|
|
2165
|
-
return
|
|
2166
|
-
...
|
|
2167
|
-
...
|
|
2168
|
-
modifiers:
|
|
2169
|
-
} :
|
|
2170
|
-
}),
|
|
2155
|
+
}, P = i.popoverOptions;
|
|
2156
|
+
return P ? {
|
|
2157
|
+
...T,
|
|
2158
|
+
...P,
|
|
2159
|
+
modifiers: A(T.modifiers ?? [], P.modifiers)
|
|
2160
|
+
} : T;
|
|
2161
|
+
}), k = [
|
|
2171
2162
|
"position",
|
|
2172
2163
|
"top",
|
|
2173
2164
|
"left",
|
|
@@ -2177,160 +2168,160 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2177
2168
|
"transform",
|
|
2178
2169
|
"will-change",
|
|
2179
2170
|
"margin"
|
|
2180
|
-
],
|
|
2181
|
-
const
|
|
2182
|
-
for (const fe of
|
|
2183
|
-
const ue =
|
|
2184
|
-
ue && (
|
|
2171
|
+
], x = (T) => {
|
|
2172
|
+
const P = {};
|
|
2173
|
+
for (const fe of k) {
|
|
2174
|
+
const ue = T.style.getPropertyValue(fe);
|
|
2175
|
+
ue && (P[fe] = ue);
|
|
2185
2176
|
}
|
|
2186
|
-
return
|
|
2187
|
-
},
|
|
2188
|
-
for (const [fe, ue] of Object.entries(
|
|
2189
|
-
|
|
2190
|
-
},
|
|
2191
|
-
if (
|
|
2192
|
-
for (const
|
|
2193
|
-
|
|
2194
|
-
for (const
|
|
2195
|
-
|
|
2177
|
+
return P;
|
|
2178
|
+
}, E = (T, P) => {
|
|
2179
|
+
for (const [fe, ue] of Object.entries(P))
|
|
2180
|
+
T.style.setProperty(fe, ue);
|
|
2181
|
+
}, L = (T) => {
|
|
2182
|
+
if (T) {
|
|
2183
|
+
for (const P of k)
|
|
2184
|
+
T.style.removeProperty(P);
|
|
2185
|
+
for (const P of [...T.attributes])
|
|
2186
|
+
P.name.startsWith("data-popper-") && T.removeAttribute(P.name);
|
|
2196
2187
|
}
|
|
2197
2188
|
}, Y = () => {
|
|
2198
|
-
|
|
2189
|
+
i.disabled || (a.value = !0, l("visible-change", !0));
|
|
2199
2190
|
}, X = () => {
|
|
2200
|
-
|
|
2201
|
-
},
|
|
2202
|
-
|
|
2191
|
+
a.value = !1, l("visible-change", !1);
|
|
2192
|
+
}, D = At(Y, i.openDelay), se = At(X, i.closeDelay), Q = () => {
|
|
2193
|
+
i.disabled || (se.cancel(), D());
|
|
2203
2194
|
}, te = () => {
|
|
2204
|
-
|
|
2195
|
+
D.cancel(), se();
|
|
2205
2196
|
};
|
|
2206
|
-
_n(
|
|
2207
|
-
const
|
|
2208
|
-
|
|
2197
|
+
_n(s, (T) => {
|
|
2198
|
+
const P = T.target;
|
|
2199
|
+
P instanceof Node && c.value?.contains(P) || (i.trigger === "click" && a.value && !i.manual && te(), a.value && l("click-outside", !0));
|
|
2209
2200
|
});
|
|
2210
2201
|
const pe = () => {
|
|
2211
|
-
|
|
2202
|
+
i.disabled || (a.value ? te() : Q());
|
|
2212
2203
|
}, G = () => {
|
|
2213
|
-
y = {},
|
|
2204
|
+
y = {}, i.trigger === "hover" ? (h.mouseenter = Q, g.mouseleave = te, y.mouseenter = Q, y.mouseleave = te) : i.trigger === "click" && (h.click = pe);
|
|
2214
2205
|
};
|
|
2215
|
-
let
|
|
2216
|
-
const
|
|
2217
|
-
let
|
|
2206
|
+
let W = 0;
|
|
2207
|
+
const I = [];
|
|
2208
|
+
let R = null, F = null;
|
|
2218
2209
|
const J = () => {
|
|
2219
|
-
for (
|
|
2220
|
-
const
|
|
2221
|
-
|
|
2210
|
+
for (W++; I.length; ) {
|
|
2211
|
+
const T = I.pop();
|
|
2212
|
+
T !== void 0 && cancelAnimationFrame(T);
|
|
2222
2213
|
}
|
|
2223
2214
|
}, f = () => {
|
|
2224
|
-
|
|
2225
|
-
},
|
|
2226
|
-
!
|
|
2227
|
-
},
|
|
2215
|
+
R?.disconnect(), F?.disconnect(), R = null, F = null;
|
|
2216
|
+
}, S = () => {
|
|
2217
|
+
!a.value || !d || d.update();
|
|
2218
|
+
}, M = () => {
|
|
2228
2219
|
J();
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2231
|
-
if (
|
|
2232
|
-
|
|
2233
|
-
const
|
|
2234
|
-
if (
|
|
2220
|
+
const T = W;
|
|
2221
|
+
a.value && (S(), ge(() => {
|
|
2222
|
+
if (T !== W || !a.value) return;
|
|
2223
|
+
S();
|
|
2224
|
+
const P = requestAnimationFrame(() => {
|
|
2225
|
+
if (T !== W || !a.value) return;
|
|
2235
2226
|
const fe = requestAnimationFrame(() => {
|
|
2236
|
-
|
|
2227
|
+
T !== W || !a.value || S();
|
|
2237
2228
|
});
|
|
2238
|
-
|
|
2229
|
+
I.push(fe);
|
|
2239
2230
|
});
|
|
2240
|
-
|
|
2231
|
+
I.push(P);
|
|
2241
2232
|
}));
|
|
2242
2233
|
}, ee = () => {
|
|
2243
2234
|
if (f(), typeof ResizeObserver > "u") return;
|
|
2244
|
-
const
|
|
2245
|
-
|
|
2235
|
+
const T = () => {
|
|
2236
|
+
a.value && S();
|
|
2246
2237
|
};
|
|
2247
|
-
c.value && (
|
|
2248
|
-
const
|
|
2249
|
-
|
|
2238
|
+
c.value && (R = new ResizeObserver(T), R.observe(c.value));
|
|
2239
|
+
const P = N();
|
|
2240
|
+
P && (F = new ResizeObserver(T), F.observe(P));
|
|
2250
2241
|
}, ce = () => {
|
|
2251
|
-
const
|
|
2252
|
-
return !
|
|
2253
|
-
}, b = (
|
|
2242
|
+
const T = N(), P = c.value;
|
|
2243
|
+
return !T || !P ? !1 : d ? (d.setOptions(O.value), !0) : (L(P), d = Nn(T, P, O.value), !0);
|
|
2244
|
+
}, b = (T = !1) => {
|
|
2254
2245
|
J(), f();
|
|
2255
|
-
const
|
|
2256
|
-
d?.destroy(), d = null,
|
|
2246
|
+
const P = c.value, fe = T && P ? x(P) : null;
|
|
2247
|
+
d?.destroy(), d = null, P && fe && Object.keys(fe).length && E(P, fe);
|
|
2257
2248
|
}, ie = () => {
|
|
2258
|
-
|
|
2249
|
+
a.value && (d || ce(), M());
|
|
2259
2250
|
};
|
|
2260
2251
|
le(
|
|
2261
|
-
() =>
|
|
2262
|
-
async (
|
|
2263
|
-
if (
|
|
2252
|
+
() => a.value,
|
|
2253
|
+
async (T) => {
|
|
2254
|
+
if (T) {
|
|
2264
2255
|
if (!ce()) {
|
|
2265
|
-
if (await ge(), !
|
|
2256
|
+
if (await ge(), !a.value) return;
|
|
2266
2257
|
ce();
|
|
2267
2258
|
}
|
|
2268
|
-
|
|
2259
|
+
M(), ee();
|
|
2269
2260
|
return;
|
|
2270
2261
|
}
|
|
2271
2262
|
b(!0);
|
|
2272
2263
|
},
|
|
2273
2264
|
{ flush: "post" }
|
|
2274
2265
|
), le(
|
|
2275
|
-
() => [
|
|
2266
|
+
() => [i.popperWidth, i.maxPopperHeight],
|
|
2276
2267
|
() => {
|
|
2277
|
-
|
|
2268
|
+
a.value && M();
|
|
2278
2269
|
},
|
|
2279
2270
|
{ flush: "post" }
|
|
2280
2271
|
), le(
|
|
2281
|
-
|
|
2272
|
+
O,
|
|
2282
2273
|
() => {
|
|
2283
|
-
!
|
|
2274
|
+
!a.value || !d || (d.setOptions(O.value), M());
|
|
2284
2275
|
}
|
|
2285
2276
|
), le(
|
|
2286
|
-
() =>
|
|
2287
|
-
(
|
|
2288
|
-
|
|
2277
|
+
() => i.manual,
|
|
2278
|
+
(T) => {
|
|
2279
|
+
T ? (h = {}, g = {}, y = {}) : G();
|
|
2289
2280
|
}
|
|
2290
2281
|
), le(
|
|
2291
|
-
() =>
|
|
2292
|
-
(
|
|
2293
|
-
|
|
2282
|
+
() => i.trigger,
|
|
2283
|
+
(T, P) => {
|
|
2284
|
+
T !== P && (h = {}, g = {}, y = {}, G());
|
|
2294
2285
|
}
|
|
2295
2286
|
), le(
|
|
2296
|
-
() =>
|
|
2287
|
+
() => i.teleported,
|
|
2297
2288
|
() => {
|
|
2298
|
-
|
|
2289
|
+
i.manual || G();
|
|
2299
2290
|
}
|
|
2300
2291
|
), le(
|
|
2301
|
-
() =>
|
|
2302
|
-
(
|
|
2303
|
-
|
|
2292
|
+
() => i.disabled,
|
|
2293
|
+
(T) => {
|
|
2294
|
+
T && te();
|
|
2304
2295
|
}
|
|
2305
|
-
),
|
|
2306
|
-
|
|
2296
|
+
), Ne(() => {
|
|
2297
|
+
i.manual || G();
|
|
2307
2298
|
});
|
|
2308
|
-
const re = gr((
|
|
2309
|
-
const
|
|
2310
|
-
l("scroll", { scrollTop:
|
|
2299
|
+
const re = gr((T) => {
|
|
2300
|
+
const P = T.target;
|
|
2301
|
+
l("scroll", { scrollTop: P.scrollTop, scrollLeft: P.scrollLeft });
|
|
2311
2302
|
}, Cr), ke = () => {
|
|
2312
|
-
|
|
2303
|
+
S();
|
|
2313
2304
|
}, De = () => {
|
|
2314
|
-
|
|
2305
|
+
a.value || (b(!1), L(c.value));
|
|
2315
2306
|
};
|
|
2316
2307
|
return Le(() => {
|
|
2317
2308
|
re.cancel(), b(!1);
|
|
2318
2309
|
}), t({
|
|
2319
|
-
isOpen:
|
|
2310
|
+
isOpen: a,
|
|
2320
2311
|
open: Q,
|
|
2321
2312
|
close: te,
|
|
2322
2313
|
update: ie
|
|
2323
|
-
}), (
|
|
2314
|
+
}), (T, P) => (u(), m("div", Be({
|
|
2324
2315
|
class: "cregis-popover",
|
|
2325
2316
|
ref_key: "popoverRef",
|
|
2326
|
-
ref:
|
|
2317
|
+
ref: s
|
|
2327
2318
|
}, Tt(U(g), !0)), [
|
|
2328
|
-
|
|
2319
|
+
C("div", Be({
|
|
2329
2320
|
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
2330
2321
|
ref_key: "popoverTriggerRef",
|
|
2331
2322
|
ref: v
|
|
2332
|
-
}, Tt(U(
|
|
2333
|
-
ae(
|
|
2323
|
+
}, Tt(U(h), !0)), [
|
|
2324
|
+
ae(T.$slots, "reference")
|
|
2334
2325
|
], 16),
|
|
2335
2326
|
(u(), de(_t, {
|
|
2336
2327
|
to: "body",
|
|
@@ -2342,20 +2333,20 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2342
2333
|
onAfterLeave: De
|
|
2343
2334
|
}, {
|
|
2344
2335
|
default: ve(() => [
|
|
2345
|
-
r.value ? _e((u(),
|
|
2336
|
+
r.value ? _e((u(), m("div", Be({
|
|
2346
2337
|
key: 0,
|
|
2347
|
-
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar":
|
|
2338
|
+
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": z.value }],
|
|
2348
2339
|
ref_key: "popoverContentRef",
|
|
2349
2340
|
ref: c,
|
|
2350
|
-
style:
|
|
2341
|
+
style: V.value
|
|
2351
2342
|
}, Tt(U(y), !0), {
|
|
2352
|
-
onScroll:
|
|
2343
|
+
onScroll: P[0] || (P[0] = //@ts-ignore
|
|
2353
2344
|
(...fe) => U(re) && U(re)(...fe))
|
|
2354
2345
|
}), [
|
|
2355
|
-
ae(
|
|
2346
|
+
ae(T.$slots, "default")
|
|
2356
2347
|
], 16)), [
|
|
2357
|
-
[St,
|
|
2358
|
-
]) :
|
|
2348
|
+
[St, o.value]
|
|
2349
|
+
]) : j("", !0)
|
|
2359
2350
|
]),
|
|
2360
2351
|
_: 3
|
|
2361
2352
|
})
|
|
@@ -2396,62 +2387,62 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2396
2387
|
},
|
|
2397
2388
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2398
2389
|
setup(e, { emit: t }) {
|
|
2399
|
-
const n = e,
|
|
2400
|
-
let
|
|
2390
|
+
const n = e, a = t, i = B(null), r = B(null), o = B(!1), l = B();
|
|
2391
|
+
let s = null, v = null;
|
|
2401
2392
|
const c = () => {
|
|
2402
2393
|
v !== null && (clearTimeout(v), v = null);
|
|
2403
2394
|
}, d = (b) => typeof b == "string" && b.trim().endsWith("%"), g = () => {
|
|
2404
2395
|
if (!d(n.triggerWidth) || n.popperWidth) return;
|
|
2405
2396
|
const b = r.value;
|
|
2406
2397
|
b && (l.value = b.offsetWidth + 8);
|
|
2407
|
-
},
|
|
2408
|
-
|
|
2409
|
-
}, y = (b) => typeof b == "number" ? `n:${b}` : `s:${b}`,
|
|
2398
|
+
}, h = async (b) => {
|
|
2399
|
+
o.value = b, a("visible-change", b), b && d(n.triggerWidth) && (await ge(), g(), i.value?.update()), !b && n.filterable && (X.value = "", D.value = "", c());
|
|
2400
|
+
}, y = (b) => typeof b == "number" ? `n:${b}` : `s:${b}`, $ = je({}), z = je({}), V = B(0), N = B(null), A = (b, ie, re) => {
|
|
2410
2401
|
const ke = y(b);
|
|
2411
|
-
return
|
|
2412
|
-
|
|
2402
|
+
return V.value++, $[ke] = ie, z[ke] = re ?? ie, () => {
|
|
2403
|
+
V.value--, delete $[ke], delete z[ke];
|
|
2413
2404
|
};
|
|
2414
|
-
},
|
|
2405
|
+
}, O = p(() => V.value === 0);
|
|
2415
2406
|
le(
|
|
2416
2407
|
() => n.modelValue,
|
|
2417
2408
|
(b) => {
|
|
2418
2409
|
if (!n.multiple) {
|
|
2419
2410
|
if (b == null || b === "") {
|
|
2420
|
-
|
|
2411
|
+
N.value = null;
|
|
2421
2412
|
return;
|
|
2422
2413
|
}
|
|
2423
|
-
|
|
2414
|
+
N.value && N.value.value !== b && (N.value = null);
|
|
2424
2415
|
}
|
|
2425
2416
|
}
|
|
2426
2417
|
);
|
|
2427
|
-
const
|
|
2418
|
+
const k = p(() => {
|
|
2428
2419
|
if (n.multiple)
|
|
2429
2420
|
return Array.isArray(n.modelValue) && n.modelValue.length > 0;
|
|
2430
2421
|
const b = n.modelValue;
|
|
2431
2422
|
return b != null && b !== "";
|
|
2432
|
-
}),
|
|
2433
|
-
if (!
|
|
2423
|
+
}), x = p(() => !n.multiple || !Array.isArray(n.modelValue) ? 0 : n.modelValue.length), E = p(() => {
|
|
2424
|
+
if (!k.value) return "";
|
|
2434
2425
|
if (n.multiple)
|
|
2435
|
-
return n.modelValue.map((re) =>
|
|
2426
|
+
return n.modelValue.map((re) => $[y(re)] ?? String(re)).join("、");
|
|
2436
2427
|
const b = n.modelValue;
|
|
2437
|
-
return
|
|
2438
|
-
}),
|
|
2428
|
+
return N.value?.value === b ? N.value.label : $[y(b)] ?? String(b);
|
|
2429
|
+
}), L = (b) => n.multiple ? Array.isArray(n.modelValue) && n.modelValue.includes(b) : n.modelValue === b, Y = (b, ie) => {
|
|
2439
2430
|
if (!n.disabled) {
|
|
2440
2431
|
if (n.multiple) {
|
|
2441
2432
|
const re = Array.isArray(n.modelValue) ? [...n.modelValue] : [], ke = re.indexOf(b);
|
|
2442
|
-
ke >= 0 ? re.splice(ke, 1) : re.push(b),
|
|
2433
|
+
ke >= 0 ? re.splice(ke, 1) : re.push(b), a("update:modelValue", re), a("change", re);
|
|
2443
2434
|
return;
|
|
2444
2435
|
}
|
|
2445
|
-
|
|
2436
|
+
N.value = { value: b, label: ie }, a("update:modelValue", b), a("change", b), i.value?.close();
|
|
2446
2437
|
}
|
|
2447
|
-
}, X =
|
|
2438
|
+
}, X = B(""), D = B(""), se = p(() => D.value.trim().toLowerCase()), Q = p(() => {
|
|
2448
2439
|
const b = se.value;
|
|
2449
|
-
return !n.filterable || !b ? !0 : Object.keys(
|
|
2440
|
+
return !n.filterable || !b ? !0 : Object.keys($).some((ie) => (z[ie] ?? $[ie] ?? "").toLowerCase().includes(b));
|
|
2450
2441
|
}), te = p(
|
|
2451
|
-
() => n.filterable && !!se.value && !Q.value && !
|
|
2442
|
+
() => n.filterable && !!se.value && !Q.value && !O.value
|
|
2452
2443
|
), pe = () => {
|
|
2453
2444
|
n.filterable && (c(), v = setTimeout(() => {
|
|
2454
|
-
|
|
2445
|
+
D.value = X.value.trim(), v = null;
|
|
2455
2446
|
}, n.filterDebounceMs));
|
|
2456
2447
|
};
|
|
2457
2448
|
le(X, () => {
|
|
@@ -2459,108 +2450,108 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2459
2450
|
}), le(
|
|
2460
2451
|
() => n.filterable,
|
|
2461
2452
|
(b) => {
|
|
2462
|
-
b || (X.value = "",
|
|
2453
|
+
b || (X.value = "", D.value = "", c());
|
|
2463
2454
|
}
|
|
2464
2455
|
);
|
|
2465
2456
|
const G = () => {
|
|
2466
|
-
|
|
2457
|
+
s?.disconnect(), s = null, !(!d(n.triggerWidth) || !r.value) && (s = new ResizeObserver(() => {
|
|
2467
2458
|
g();
|
|
2468
|
-
}),
|
|
2459
|
+
}), s.observe(r.value));
|
|
2469
2460
|
};
|
|
2470
2461
|
le(
|
|
2471
2462
|
() => n.triggerWidth,
|
|
2472
2463
|
() => {
|
|
2473
2464
|
d(n.triggerWidth) ? ge(() => {
|
|
2474
2465
|
g(), G();
|
|
2475
|
-
}) : (l.value = void 0,
|
|
2466
|
+
}) : (l.value = void 0, s?.disconnect(), s = null);
|
|
2476
2467
|
}
|
|
2477
|
-
),
|
|
2468
|
+
), Ne(() => {
|
|
2478
2469
|
d(n.triggerWidth) && ge(() => {
|
|
2479
2470
|
g(), G();
|
|
2480
2471
|
});
|
|
2481
2472
|
}), Le(() => {
|
|
2482
|
-
c(),
|
|
2473
|
+
c(), s?.disconnect();
|
|
2483
2474
|
});
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2486
|
-
},
|
|
2487
|
-
|
|
2475
|
+
const W = (b) => {
|
|
2476
|
+
a("filter-input", String(b ?? ""));
|
|
2477
|
+
}, I = () => {
|
|
2478
|
+
D.value = "", c(), a("filter-clear");
|
|
2488
2479
|
};
|
|
2489
|
-
|
|
2480
|
+
Nt(Un, {
|
|
2490
2481
|
modelValue: p(() => n.modelValue),
|
|
2491
2482
|
multiple: p(() => !!n.multiple),
|
|
2492
2483
|
disabled: p(() => !!n.disabled),
|
|
2493
2484
|
selectOption: Y,
|
|
2494
|
-
isOptionSelected:
|
|
2495
|
-
registerOption:
|
|
2485
|
+
isOptionSelected: L,
|
|
2486
|
+
registerOption: A,
|
|
2496
2487
|
filterQuery: se
|
|
2497
2488
|
});
|
|
2498
|
-
const
|
|
2499
|
-
if (n.popperWidth) return
|
|
2489
|
+
const R = (b) => typeof b == "number" ? `${b}px` : b, F = p(() => {
|
|
2490
|
+
if (n.popperWidth) return R(n.popperWidth);
|
|
2500
2491
|
const b = n.triggerWidth;
|
|
2501
2492
|
return d(b) ? l.value : typeof b == "number" ? b + 8 : `calc(${b} + 8px)`;
|
|
2502
2493
|
}), J = p(() => {
|
|
2503
2494
|
const b = F.value;
|
|
2504
2495
|
if (!(b == null || b === ""))
|
|
2505
2496
|
return typeof b == "number" ? `${b - 12}px` : `calc(${b} - 12px)`;
|
|
2506
|
-
}), f = p(() => n.align === "center" ? "bottom" : n.align === "left" ? "bottom-start" : "bottom-end"),
|
|
2507
|
-
width:
|
|
2508
|
-
})),
|
|
2497
|
+
}), f = p(() => n.align === "center" ? "bottom" : n.align === "left" ? "bottom-start" : "bottom-end"), S = p(() => ({
|
|
2498
|
+
width: R(n.triggerWidth)
|
|
2499
|
+
})), M = p(() => n.size === "large" ? "20px" : n.size === "medium" ? "14px" : "12px"), ee = B(0), ce = (b) => {
|
|
2509
2500
|
ee.value = b.scrollTop;
|
|
2510
2501
|
};
|
|
2511
|
-
return (b, ie) => (u(),
|
|
2502
|
+
return (b, ie) => (u(), m("div", {
|
|
2512
2503
|
class: q(["cregis-select", { "is-disabled": e.disabled, "is-percent-width": d(e.triggerWidth) }])
|
|
2513
2504
|
}, [
|
|
2514
2505
|
ne(Mt, {
|
|
2515
2506
|
ref_key: "popoverRef",
|
|
2516
|
-
ref:
|
|
2507
|
+
ref: i,
|
|
2517
2508
|
"preserve-content-mount": "",
|
|
2518
2509
|
"popper-width": F.value,
|
|
2519
2510
|
placement: f.value,
|
|
2520
2511
|
disabled: !!e.disabled,
|
|
2521
2512
|
padding: 0,
|
|
2522
2513
|
"max-popper-height": e.maxPopperHeight,
|
|
2523
|
-
onVisibleChange:
|
|
2514
|
+
onVisibleChange: h,
|
|
2524
2515
|
onScroll: ce
|
|
2525
2516
|
}, {
|
|
2526
2517
|
reference: ve(() => [
|
|
2527
|
-
|
|
2518
|
+
C("div", {
|
|
2528
2519
|
ref_key: "triggerRef",
|
|
2529
2520
|
ref: r,
|
|
2530
2521
|
class: q(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
2531
|
-
style: Z(
|
|
2522
|
+
style: Z(S.value)
|
|
2532
2523
|
}, [
|
|
2533
|
-
|
|
2524
|
+
C("div", {
|
|
2534
2525
|
class: q(["cregis-select__trigger-label", { "is-multiple": e.multiple }])
|
|
2535
2526
|
}, [
|
|
2536
|
-
|
|
2527
|
+
k.value ? ae(b.$slots, "label", {
|
|
2537
2528
|
key: 0,
|
|
2538
2529
|
modelValue: e.modelValue,
|
|
2539
|
-
displayText:
|
|
2540
|
-
selectedCount:
|
|
2530
|
+
displayText: E.value,
|
|
2531
|
+
selectedCount: x.value,
|
|
2541
2532
|
placeholder: e.placeholder,
|
|
2542
|
-
hasSelection:
|
|
2533
|
+
hasSelection: k.value
|
|
2543
2534
|
}, () => [
|
|
2544
|
-
|
|
2545
|
-
e.multiple ? (u(),
|
|
2546
|
-
]) : (u(),
|
|
2535
|
+
C("p", Or, _(E.value), 1),
|
|
2536
|
+
e.multiple ? (u(), m("span", Tr, _(x.value), 1)) : j("", !0)
|
|
2537
|
+
]) : (u(), m("p", zr, _(e.placeholder), 1))
|
|
2547
2538
|
], 2),
|
|
2548
|
-
|
|
2549
|
-
class: q(["cregis-select__icon", { "is-open":
|
|
2539
|
+
C("span", {
|
|
2540
|
+
class: q(["cregis-select__icon", { "is-open": o.value }])
|
|
2550
2541
|
}, [
|
|
2551
2542
|
ne(U(Ft), {
|
|
2552
|
-
size:
|
|
2543
|
+
size: M.value,
|
|
2553
2544
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2554
2545
|
}, null, 8, ["size", "color"])
|
|
2555
2546
|
], 2)
|
|
2556
2547
|
], 6)
|
|
2557
2548
|
]),
|
|
2558
2549
|
default: ve(() => [
|
|
2559
|
-
|
|
2560
|
-
class: q(["cregis-select__dropdown", { "is-empty":
|
|
2550
|
+
C("div", {
|
|
2551
|
+
class: q(["cregis-select__dropdown", { "is-empty": O.value }])
|
|
2561
2552
|
}, [
|
|
2562
|
-
|
|
2563
|
-
e.filterable && !
|
|
2553
|
+
O.value ? (u(), m("p", Er, _(e.noDataText || U(he)("common.noData")), 1)) : j("", !0),
|
|
2554
|
+
e.filterable && !O.value ? (u(), m("div", {
|
|
2564
2555
|
key: 1,
|
|
2565
2556
|
class: q(["cregis-select__dropdown-filter", { "backdrop-fixed-header": ee.value > 10 }])
|
|
2566
2557
|
}, [
|
|
@@ -2571,17 +2562,17 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2571
2562
|
width: J.value,
|
|
2572
2563
|
size: "small",
|
|
2573
2564
|
clearable: "",
|
|
2574
|
-
onInput:
|
|
2575
|
-
onClear:
|
|
2565
|
+
onInput: W,
|
|
2566
|
+
onClear: I
|
|
2576
2567
|
}, {
|
|
2577
2568
|
prefix: ve(() => [
|
|
2578
2569
|
ne(U(On), { size: "14px" })
|
|
2579
2570
|
]),
|
|
2580
2571
|
_: 1
|
|
2581
2572
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2582
|
-
], 2)) :
|
|
2583
|
-
te.value ? (u(),
|
|
2584
|
-
|
|
2573
|
+
], 2)) : j("", !0),
|
|
2574
|
+
te.value ? (u(), m("p", Rr, _(e.noMatchText || U(he)("select.noMatch")), 1)) : j("", !0),
|
|
2575
|
+
C("div", Lr, [
|
|
2585
2576
|
ae(b.$slots, "default")
|
|
2586
2577
|
])
|
|
2587
2578
|
], 2)
|
|
@@ -2590,7 +2581,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2590
2581
|
}, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
|
|
2591
2582
|
], 2));
|
|
2592
2583
|
}
|
|
2593
|
-
}), Br = ["aria-selected"],
|
|
2584
|
+
}), Br = ["aria-selected"], Vr = {
|
|
2594
2585
|
key: 1,
|
|
2595
2586
|
class: "cregis-select__option-content"
|
|
2596
2587
|
}, Yl = /* @__PURE__ */ oe({
|
|
@@ -2604,45 +2595,45 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2604
2595
|
},
|
|
2605
2596
|
setup(e) {
|
|
2606
2597
|
const t = e, n = jt(Un, null);
|
|
2607
|
-
let
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2598
|
+
let a;
|
|
2599
|
+
const i = () => t.filterText ?? t.label, r = () => {
|
|
2600
|
+
a?.(), n && (a = n.registerOption(t.value, t.label, i()));
|
|
2610
2601
|
};
|
|
2611
|
-
|
|
2612
|
-
const
|
|
2602
|
+
Ne(r), Le(() => a?.()), le(() => [t.value, t.label, t.filterText], r);
|
|
2603
|
+
const o = p(() => n?.multiple.value ?? !1), l = p(() => n?.isOptionSelected(t.value) ?? !1), s = () => {
|
|
2613
2604
|
t.disabled || n?.disabled.value || n?.selectOption(t.value, t.label);
|
|
2614
2605
|
}, v = () => {
|
|
2615
|
-
|
|
2606
|
+
s();
|
|
2616
2607
|
}, c = p(() => n?.filterQuery?.value ?? ""), d = p(() => {
|
|
2617
2608
|
const g = c.value;
|
|
2618
|
-
return g ?
|
|
2609
|
+
return g ? i().toLowerCase().includes(g) : !0;
|
|
2619
2610
|
});
|
|
2620
|
-
return (g,
|
|
2611
|
+
return (g, h) => _e((u(), m("div", {
|
|
2621
2612
|
class: q(["cregis-select__option", {
|
|
2622
|
-
"is-selected": l.value && !
|
|
2613
|
+
"is-selected": l.value && !o.value,
|
|
2623
2614
|
"is-disabled": e.disabled,
|
|
2624
|
-
"cregis-select__option--multiple":
|
|
2615
|
+
"cregis-select__option--multiple": o.value
|
|
2625
2616
|
}]),
|
|
2626
2617
|
role: "option",
|
|
2627
2618
|
"aria-selected": l.value,
|
|
2628
|
-
onClick:
|
|
2619
|
+
onClick: s
|
|
2629
2620
|
}, [
|
|
2630
|
-
|
|
2621
|
+
o.value ? (u(), de(qt, {
|
|
2631
2622
|
key: 0,
|
|
2632
2623
|
"model-value": l.value,
|
|
2633
2624
|
disabled: e.disabled || !!U(n)?.disabled.value,
|
|
2634
|
-
onClick:
|
|
2625
|
+
onClick: h[0] || (h[0] = Fe(() => {
|
|
2635
2626
|
}, ["stop"])),
|
|
2636
2627
|
"onUpdate:modelValue": v
|
|
2637
|
-
}, null, 8, ["model-value", "disabled"])) :
|
|
2638
|
-
|
|
2628
|
+
}, null, 8, ["model-value", "disabled"])) : j("", !0),
|
|
2629
|
+
o.value ? (u(), m("div", Vr, [
|
|
2639
2630
|
ae(g.$slots, "default", {
|
|
2640
2631
|
label: e.label,
|
|
2641
2632
|
value: e.value,
|
|
2642
2633
|
disabled: !!e.disabled,
|
|
2643
2634
|
selected: l.value
|
|
2644
2635
|
}, () => [
|
|
2645
|
-
ye(
|
|
2636
|
+
ye(_(e.label), 1)
|
|
2646
2637
|
])
|
|
2647
2638
|
])) : ae(g.$slots, "default", {
|
|
2648
2639
|
key: 2,
|
|
@@ -2651,13 +2642,13 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2651
2642
|
disabled: !!e.disabled,
|
|
2652
2643
|
selected: l.value
|
|
2653
2644
|
}, () => [
|
|
2654
|
-
ye(
|
|
2645
|
+
ye(_(e.label), 1)
|
|
2655
2646
|
])
|
|
2656
2647
|
], 10, Br)), [
|
|
2657
2648
|
[St, d.value]
|
|
2658
2649
|
]);
|
|
2659
2650
|
}
|
|
2660
|
-
}),
|
|
2651
|
+
}), Pr = { class: "cregis-cascader__trigger-label" }, Wr = { class: "cregis-cascader__selected" }, Ar = {
|
|
2661
2652
|
key: 1,
|
|
2662
2653
|
class: "cregis-cascader__placeholder"
|
|
2663
2654
|
}, Dr = {
|
|
@@ -2666,7 +2657,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2666
2657
|
}, Mr = {
|
|
2667
2658
|
key: 2,
|
|
2668
2659
|
class: "cregis-cascader__dropdown-filter-empty"
|
|
2669
|
-
},
|
|
2660
|
+
}, Ir = { class: "cregis-cascader__dropdown-content" }, Nr = {
|
|
2670
2661
|
key: 0,
|
|
2671
2662
|
class: "cregis-cascader__dropdown-item-popover"
|
|
2672
2663
|
}, jr = { class: "cregis-cascader__suboption-amount-container" }, Hr = {
|
|
@@ -2697,49 +2688,49 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2697
2688
|
},
|
|
2698
2689
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2699
2690
|
setup(e, { emit: t }) {
|
|
2700
|
-
const n = e,
|
|
2691
|
+
const n = e, a = t, i = B(null), r = B(!1), o = B(null), l = /* @__PURE__ */ new Map(), s = (w, K) => {
|
|
2701
2692
|
K && typeof K == "object" && "close" in K && typeof K.close == "function" ? l.set(w, K) : l.delete(w);
|
|
2702
2693
|
}, v = () => {
|
|
2703
|
-
l.forEach((w) => w.close()),
|
|
2694
|
+
l.forEach((w) => w.close()), o.value = null;
|
|
2704
2695
|
}, c = (w, K) => {
|
|
2705
2696
|
if (K) {
|
|
2706
|
-
|
|
2697
|
+
o.value = w;
|
|
2707
2698
|
return;
|
|
2708
2699
|
}
|
|
2709
|
-
|
|
2700
|
+
o.value === w && (o.value = null);
|
|
2710
2701
|
};
|
|
2711
2702
|
let d = null;
|
|
2712
2703
|
const g = () => {
|
|
2713
2704
|
d !== null && (clearTimeout(d), d = null);
|
|
2714
|
-
},
|
|
2705
|
+
}, h = B(""), y = B(""), $ = p(() => y.value.trim().toLowerCase()), z = () => {
|
|
2715
2706
|
n.filterable && (g(), d = setTimeout(() => {
|
|
2716
|
-
y.value =
|
|
2707
|
+
y.value = h.value.trim(), d = null;
|
|
2717
2708
|
}, n.filterDebounceMs));
|
|
2718
2709
|
};
|
|
2719
|
-
le(
|
|
2720
|
-
n.filterable &&
|
|
2710
|
+
le(h, () => {
|
|
2711
|
+
n.filterable && z();
|
|
2721
2712
|
}), le(
|
|
2722
2713
|
() => n.filterable,
|
|
2723
2714
|
(w) => {
|
|
2724
|
-
w || (
|
|
2715
|
+
w || (h.value = "", y.value = "", g());
|
|
2725
2716
|
}
|
|
2726
2717
|
), Le(() => g());
|
|
2727
|
-
const
|
|
2728
|
-
|
|
2729
|
-
},
|
|
2730
|
-
y.value = "", g(),
|
|
2731
|
-
},
|
|
2732
|
-
const K =
|
|
2733
|
-
return !K ||
|
|
2734
|
-
},
|
|
2735
|
-
const
|
|
2736
|
-
return !
|
|
2737
|
-
},
|
|
2738
|
-
() => n.filterable && !!y.value.trim() && !
|
|
2718
|
+
const V = (w) => {
|
|
2719
|
+
a("filter-input", String(w ?? ""));
|
|
2720
|
+
}, N = () => {
|
|
2721
|
+
y.value = "", g(), a("filter-clear");
|
|
2722
|
+
}, A = (w) => (w.filterText ?? w.label).toLowerCase(), O = (w) => {
|
|
2723
|
+
const K = $.value;
|
|
2724
|
+
return !K || A(w).includes(K) ? !0 : (w.children ?? []).some((be) => A(be).includes(K));
|
|
2725
|
+
}, k = (w, K) => {
|
|
2726
|
+
const H = $.value;
|
|
2727
|
+
return !H || A(w).includes(H) ? !0 : A(K).includes(H);
|
|
2728
|
+
}, x = p(() => n.options.filter((w) => O(w))), E = p(() => n.options.length === 0), L = p(() => ($.value, n.options.some((w) => O(w)))), Y = p(
|
|
2729
|
+
() => n.filterable && !!y.value.trim() && !L.value && !E.value
|
|
2739
2730
|
), X = (w) => {
|
|
2740
|
-
r.value = w,
|
|
2741
|
-
},
|
|
2742
|
-
const K = n.options.find((
|
|
2731
|
+
r.value = w, a("visible-change", w), w || v(), !w && n.filterable && (h.value = "", y.value = "", g());
|
|
2732
|
+
}, D = B(null), se = (w) => {
|
|
2733
|
+
const K = n.options.find((H) => H.value === w);
|
|
2743
2734
|
if (K)
|
|
2744
2735
|
return {
|
|
2745
2736
|
level: 1,
|
|
@@ -2747,13 +2738,13 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2747
2738
|
primary: K,
|
|
2748
2739
|
sub: void 0
|
|
2749
2740
|
};
|
|
2750
|
-
for (const
|
|
2751
|
-
const be =
|
|
2741
|
+
for (const H of n.options) {
|
|
2742
|
+
const be = H.children?.find((me) => me.value === w);
|
|
2752
2743
|
if (be)
|
|
2753
2744
|
return {
|
|
2754
2745
|
level: 2,
|
|
2755
2746
|
label: be.label,
|
|
2756
|
-
primary:
|
|
2747
|
+
primary: H,
|
|
2757
2748
|
sub: be
|
|
2758
2749
|
};
|
|
2759
2750
|
}
|
|
@@ -2770,30 +2761,30 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2770
2761
|
label: "",
|
|
2771
2762
|
primary: void 0,
|
|
2772
2763
|
sub: void 0
|
|
2773
|
-
} :
|
|
2774
|
-
level:
|
|
2775
|
-
label:
|
|
2776
|
-
primary:
|
|
2777
|
-
sub:
|
|
2764
|
+
} : D.value !== null && D.value.value === w ? {
|
|
2765
|
+
level: D.value.level,
|
|
2766
|
+
label: D.value.label,
|
|
2767
|
+
primary: D.value.primary,
|
|
2768
|
+
sub: D.value.sub
|
|
2778
2769
|
} : se(w);
|
|
2779
2770
|
});
|
|
2780
2771
|
le(
|
|
2781
2772
|
() => n.modelValue,
|
|
2782
2773
|
(w) => {
|
|
2783
2774
|
if (w == null || w === "") {
|
|
2784
|
-
|
|
2775
|
+
D.value = null;
|
|
2785
2776
|
return;
|
|
2786
2777
|
}
|
|
2787
|
-
|
|
2778
|
+
D.value !== null && D.value.value !== w && (D.value = null);
|
|
2788
2779
|
}
|
|
2789
2780
|
);
|
|
2790
|
-
const te = p(() => Q.value.level > 0), pe = p(() => Q.value.label), G = p(() => n.modelValue),
|
|
2781
|
+
const te = p(() => Q.value.level > 0), pe = p(() => Q.value.label), G = p(() => n.modelValue), W = p(() => pe.value), I = p(() => Q.value.level), R = p(() => Q.value.primary), F = p(() => Q.value.sub), J = (w) => (w.children?.length ?? 0) > 0, f = (w) => n.modelValue === w, S = (w) => {
|
|
2791
2782
|
const K = n.modelValue;
|
|
2792
|
-
return K == null || K === "" ? !1 : (w.children ?? []).some((
|
|
2793
|
-
},
|
|
2794
|
-
n.disabled || w.disabled || K.disabled || (
|
|
2783
|
+
return K == null || K === "" ? !1 : (w.children ?? []).some((H) => H.value === K);
|
|
2784
|
+
}, M = (w, K) => {
|
|
2785
|
+
n.disabled || w.disabled || K.disabled || (D.value = { value: K.value, label: K.label, level: 2, primary: w, sub: K }, a("update:modelValue", K.value), a("change", K.value), v(), i.value?.close());
|
|
2795
2786
|
}, ee = (w) => {
|
|
2796
|
-
n.disabled || w.disabled || J(w) || (
|
|
2787
|
+
n.disabled || w.disabled || J(w) || (D.value = { value: w.value, label: w.label, level: 1, primary: w }, a("update:modelValue", w.value), a("change", w.value), v(), i.value?.close());
|
|
2797
2788
|
}, ce = (w) => typeof w == "number" ? `${w}px` : w, b = p(() => {
|
|
2798
2789
|
if (n.popperWidth !== void 0 && n.popperWidth !== null && n.popperWidth !== "")
|
|
2799
2790
|
return ce(n.popperWidth);
|
|
@@ -2802,21 +2793,21 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2802
2793
|
}), ie = p(() => ce(n.subPopperWidth)), re = p(() => typeof b.value == "number" ? `${b.value - 12}px` : `calc(${b.value} - 12px)`), ke = p(() => ({
|
|
2803
2794
|
maxHeight: ce(n.maxPopperHeight),
|
|
2804
2795
|
overflowY: "auto"
|
|
2805
|
-
})), De = { strategy: "fixed" },
|
|
2796
|
+
})), De = { strategy: "fixed" }, T = p(() => n.align === "center" ? "bottom" : n.align === "left" ? "bottom-start" : "bottom-end"), P = p(() => ({
|
|
2806
2797
|
width: ce(n.triggerWidth)
|
|
2807
|
-
})), fe = p(() => n.size === "large" ? "20px" : n.size === "medium" ? "14px" : "12px"), ue =
|
|
2798
|
+
})), fe = p(() => n.size === "large" ? "20px" : n.size === "medium" ? "14px" : "12px"), ue = B(0), Pe = (w) => {
|
|
2808
2799
|
const K = w.target;
|
|
2809
2800
|
ue.value = K.scrollTop;
|
|
2810
2801
|
}, dt = [-16, -8];
|
|
2811
|
-
return (w, K) => (u(),
|
|
2802
|
+
return (w, K) => (u(), m("div", {
|
|
2812
2803
|
class: q(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2813
2804
|
}, [
|
|
2814
2805
|
ne(Mt, {
|
|
2815
2806
|
ref_key: "popoverRef",
|
|
2816
|
-
ref:
|
|
2807
|
+
ref: i,
|
|
2817
2808
|
"preserve-content-mount": "",
|
|
2818
2809
|
"popper-width": b.value,
|
|
2819
|
-
placement:
|
|
2810
|
+
placement: T.value,
|
|
2820
2811
|
offset: e.offset,
|
|
2821
2812
|
disabled: !!e.disabled,
|
|
2822
2813
|
padding: 0,
|
|
@@ -2826,34 +2817,34 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2826
2817
|
w.$slots.trigger ? ae(w.$slots, "trigger", {
|
|
2827
2818
|
key: 0,
|
|
2828
2819
|
modelValue: G.value,
|
|
2829
|
-
selectedLabel:
|
|
2830
|
-
level:
|
|
2831
|
-
primaryOption:
|
|
2820
|
+
selectedLabel: W.value,
|
|
2821
|
+
level: I.value,
|
|
2822
|
+
primaryOption: R.value,
|
|
2832
2823
|
subOption: F.value,
|
|
2833
2824
|
placeholder: e.placeholder,
|
|
2834
2825
|
hasSelection: te.value,
|
|
2835
2826
|
open: r.value,
|
|
2836
2827
|
disabled: !!e.disabled
|
|
2837
|
-
}) : (u(),
|
|
2828
|
+
}) : (u(), m("div", {
|
|
2838
2829
|
key: 1,
|
|
2839
2830
|
class: q(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2840
|
-
style: Z(
|
|
2831
|
+
style: Z(P.value)
|
|
2841
2832
|
}, [
|
|
2842
|
-
|
|
2833
|
+
C("div", Pr, [
|
|
2843
2834
|
te.value ? ae(w.$slots, "label", {
|
|
2844
2835
|
key: 0,
|
|
2845
2836
|
modelValue: G.value,
|
|
2846
|
-
selectedLabel:
|
|
2847
|
-
level:
|
|
2848
|
-
primaryOption:
|
|
2837
|
+
selectedLabel: W.value,
|
|
2838
|
+
level: I.value,
|
|
2839
|
+
primaryOption: R.value,
|
|
2849
2840
|
subOption: F.value,
|
|
2850
2841
|
placeholder: e.placeholder,
|
|
2851
2842
|
hasSelection: te.value
|
|
2852
2843
|
}, () => [
|
|
2853
|
-
|
|
2854
|
-
]) : (u(),
|
|
2844
|
+
C("p", Wr, _(pe.value), 1)
|
|
2845
|
+
]) : (u(), m("p", Ar, _(e.placeholder), 1))
|
|
2855
2846
|
]),
|
|
2856
|
-
|
|
2847
|
+
C("span", {
|
|
2857
2848
|
class: q(["cregis-cascader__icon", { "is-open": r.value }])
|
|
2858
2849
|
}, [
|
|
2859
2850
|
ne(U(Ft), {
|
|
@@ -2864,74 +2855,74 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2864
2855
|
], 6))
|
|
2865
2856
|
]),
|
|
2866
2857
|
default: ve(() => [
|
|
2867
|
-
|
|
2868
|
-
class: q(["cregis-cascader__dropdown", { "is-empty":
|
|
2858
|
+
C("div", {
|
|
2859
|
+
class: q(["cregis-cascader__dropdown", { "is-empty": E.value }]),
|
|
2869
2860
|
style: Z(ke.value),
|
|
2870
|
-
onScroll:
|
|
2861
|
+
onScroll: Pe
|
|
2871
2862
|
}, [
|
|
2872
|
-
|
|
2873
|
-
e.filterable && !
|
|
2863
|
+
E.value ? (u(), m("p", Dr, _(e.noDataText || U(he)("common.noData")), 1)) : j("", !0),
|
|
2864
|
+
e.filterable && !E.value ? (u(), m("div", {
|
|
2874
2865
|
key: 1,
|
|
2875
2866
|
class: q(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": ue.value > 10 }])
|
|
2876
2867
|
}, [
|
|
2877
2868
|
ne(zn, {
|
|
2878
|
-
modelValue:
|
|
2879
|
-
"onUpdate:modelValue": K[0] || (K[0] = (
|
|
2869
|
+
modelValue: h.value,
|
|
2870
|
+
"onUpdate:modelValue": K[0] || (K[0] = (H) => h.value = H),
|
|
2880
2871
|
placeholder: e.searchText || U(he)("select.search"),
|
|
2881
2872
|
width: re.value,
|
|
2882
2873
|
size: "small",
|
|
2883
2874
|
clearable: "",
|
|
2884
|
-
onInput:
|
|
2885
|
-
onClear:
|
|
2875
|
+
onInput: V,
|
|
2876
|
+
onClear: N
|
|
2886
2877
|
}, {
|
|
2887
2878
|
prefix: ve(() => [
|
|
2888
2879
|
ne(U(On), { size: "14px" })
|
|
2889
2880
|
]),
|
|
2890
2881
|
_: 1
|
|
2891
2882
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2892
|
-
], 2)) :
|
|
2893
|
-
Y.value ? (u(),
|
|
2894
|
-
|
|
2895
|
-
(u(!0),
|
|
2896
|
-
key:
|
|
2897
|
-
class: q(["cregis-cascader__dropdown-item", { "is-disabled":
|
|
2883
|
+
], 2)) : j("", !0),
|
|
2884
|
+
Y.value ? (u(), m("p", Mr, _(e.noMatchText || U(he)("cascader.noMatch")), 1)) : j("", !0),
|
|
2885
|
+
C("ul", Ir, [
|
|
2886
|
+
(u(!0), m(ze, null, We(x.value, (H, be) => (u(), m("li", {
|
|
2887
|
+
key: H.value,
|
|
2888
|
+
class: q(["cregis-cascader__dropdown-item", { "is-disabled": H.disabled, "is-sub-open": o.value === H.value }])
|
|
2898
2889
|
}, [
|
|
2899
|
-
J(
|
|
2890
|
+
J(H) ? (u(), m("div", Nr, [
|
|
2900
2891
|
ne(Mt, {
|
|
2901
2892
|
ref_for: !0,
|
|
2902
|
-
ref: (me) =>
|
|
2893
|
+
ref: (me) => s(H.value, me),
|
|
2903
2894
|
trigger: "hover",
|
|
2904
2895
|
placement: "right-start",
|
|
2905
2896
|
offset: dt,
|
|
2906
2897
|
"popover-options": De,
|
|
2907
2898
|
"popper-width": ie.value,
|
|
2908
2899
|
padding: 4,
|
|
2909
|
-
disabled: !!
|
|
2910
|
-
onVisibleChange: (me) => c(
|
|
2900
|
+
disabled: !!H.disabled || !!e.disabled,
|
|
2901
|
+
onVisibleChange: (me) => c(H.value, me)
|
|
2911
2902
|
}, {
|
|
2912
2903
|
reference: ve(() => [
|
|
2913
|
-
|
|
2904
|
+
C("div", {
|
|
2914
2905
|
class: q(["cregis-cascader__suboption-trigger", {
|
|
2915
|
-
"is-disabled":
|
|
2916
|
-
"is-parent-active":
|
|
2906
|
+
"is-disabled": H.disabled,
|
|
2907
|
+
"is-parent-active": S(H)
|
|
2917
2908
|
}])
|
|
2918
2909
|
}, [
|
|
2919
2910
|
ae(w.$slots, "option", {
|
|
2920
2911
|
modelValue: G.value,
|
|
2921
|
-
selectedLabel:
|
|
2922
|
-
level:
|
|
2923
|
-
primaryOption:
|
|
2912
|
+
selectedLabel: W.value,
|
|
2913
|
+
level: I.value,
|
|
2914
|
+
primaryOption: R.value,
|
|
2924
2915
|
subOption: F.value,
|
|
2925
|
-
option:
|
|
2916
|
+
option: H,
|
|
2926
2917
|
index: be,
|
|
2927
|
-
disabled: !!
|
|
2928
|
-
selected: f(
|
|
2929
|
-
isParentOfSelected:
|
|
2918
|
+
disabled: !!H.disabled,
|
|
2919
|
+
selected: f(H.value),
|
|
2920
|
+
isParentOfSelected: S(H)
|
|
2930
2921
|
}, () => [
|
|
2931
|
-
|
|
2922
|
+
C("p", null, _(H.label), 1)
|
|
2932
2923
|
]),
|
|
2933
|
-
|
|
2934
|
-
e.showSubOptionAmount ? (u(),
|
|
2924
|
+
C("div", jr, [
|
|
2925
|
+
e.showSubOptionAmount ? (u(), m("div", Hr, _(H.children?.length ?? 0), 1)) : j("", !0),
|
|
2935
2926
|
ne(U(na), {
|
|
2936
2927
|
size: "14px",
|
|
2937
2928
|
color: "currentColor"
|
|
@@ -2940,56 +2931,56 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2940
2931
|
], 2)
|
|
2941
2932
|
]),
|
|
2942
2933
|
default: ve(() => [
|
|
2943
|
-
|
|
2944
|
-
(u(!0),
|
|
2934
|
+
C("div", _r, [
|
|
2935
|
+
(u(!0), m(ze, null, We(H.children, (me, ft) => _e((u(), m("div", {
|
|
2945
2936
|
key: me.value,
|
|
2946
2937
|
class: q(["cregis-cascader__suboption-row", {
|
|
2947
2938
|
"is-active": f(me.value),
|
|
2948
2939
|
"is-disabled": me.disabled
|
|
2949
2940
|
}]),
|
|
2950
2941
|
role: "menuitem",
|
|
2951
|
-
onClick: (vt) =>
|
|
2942
|
+
onClick: (vt) => M(H, me)
|
|
2952
2943
|
}, [
|
|
2953
2944
|
ae(w.$slots, "subOption", {
|
|
2954
2945
|
modelValue: G.value,
|
|
2955
|
-
selectedLabel:
|
|
2956
|
-
level:
|
|
2957
|
-
primaryOption:
|
|
2946
|
+
selectedLabel: W.value,
|
|
2947
|
+
level: I.value,
|
|
2948
|
+
primaryOption: R.value,
|
|
2958
2949
|
subOption: F.value,
|
|
2959
2950
|
option: me,
|
|
2960
2951
|
index: ft,
|
|
2961
|
-
parent:
|
|
2952
|
+
parent: H,
|
|
2962
2953
|
parentIndex: be,
|
|
2963
2954
|
selected: f(me.value),
|
|
2964
2955
|
disabled: !!me.disabled
|
|
2965
2956
|
}, () => [
|
|
2966
|
-
ye(
|
|
2957
|
+
ye(_(me.label), 1)
|
|
2967
2958
|
])
|
|
2968
2959
|
], 10, Fr)), [
|
|
2969
|
-
[St,
|
|
2960
|
+
[St, k(H, me)]
|
|
2970
2961
|
])), 128))
|
|
2971
2962
|
])
|
|
2972
2963
|
]),
|
|
2973
2964
|
_: 2
|
|
2974
2965
|
}, 1032, ["popper-width", "disabled", "onVisibleChange"])
|
|
2975
|
-
])) : (u(),
|
|
2966
|
+
])) : (u(), m("div", {
|
|
2976
2967
|
key: 1,
|
|
2977
2968
|
class: "cregis-cascader__leaf-only",
|
|
2978
|
-
onClick: (me) => ee(
|
|
2969
|
+
onClick: (me) => ee(H)
|
|
2979
2970
|
}, [
|
|
2980
2971
|
ae(w.$slots, "option", {
|
|
2981
2972
|
modelValue: G.value,
|
|
2982
|
-
selectedLabel:
|
|
2983
|
-
level:
|
|
2984
|
-
primaryOption:
|
|
2973
|
+
selectedLabel: W.value,
|
|
2974
|
+
level: I.value,
|
|
2975
|
+
primaryOption: R.value,
|
|
2985
2976
|
subOption: F.value,
|
|
2986
|
-
option:
|
|
2977
|
+
option: H,
|
|
2987
2978
|
index: be,
|
|
2988
|
-
disabled: !!
|
|
2989
|
-
selected: f(
|
|
2979
|
+
disabled: !!H.disabled,
|
|
2980
|
+
selected: f(H.value),
|
|
2990
2981
|
isParentOfSelected: !1
|
|
2991
2982
|
}, () => [
|
|
2992
|
-
|
|
2983
|
+
C("p", null, _(H.label), 1)
|
|
2993
2984
|
])
|
|
2994
2985
|
], 8, Ur))
|
|
2995
2986
|
], 2))), 128))
|
|
@@ -3023,29 +3014,29 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3023
3014
|
maxWidth: typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth
|
|
3024
3015
|
};
|
|
3025
3016
|
});
|
|
3026
|
-
return (
|
|
3017
|
+
return (a, i) => e.palette ? (u(), m("div", {
|
|
3027
3018
|
key: 0,
|
|
3028
3019
|
class: q(["cregis-tag cregis-tag--palette", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`, { "cregis-tag--ellipsis": e.maxWidth != null }]]),
|
|
3029
3020
|
style: Z(n.value)
|
|
3030
3021
|
}, [
|
|
3031
|
-
e.maxWidth != null ? (u(),
|
|
3032
|
-
ae(
|
|
3033
|
-
ye(
|
|
3022
|
+
e.maxWidth != null ? (u(), m("span", qr, [
|
|
3023
|
+
ae(a.$slots, "default", {}, () => [
|
|
3024
|
+
ye(_(e.text), 1)
|
|
3034
3025
|
])
|
|
3035
|
-
])) : ae(
|
|
3036
|
-
ye(
|
|
3026
|
+
])) : ae(a.$slots, "default", { key: 1 }, () => [
|
|
3027
|
+
ye(_(e.text), 1)
|
|
3037
3028
|
])
|
|
3038
|
-
], 6)) : (u(),
|
|
3029
|
+
], 6)) : (u(), m("div", {
|
|
3039
3030
|
key: 1,
|
|
3040
3031
|
class: q(["cregis-tag", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`, { "cregis-tag--ellipsis": e.maxWidth != null }]]),
|
|
3041
3032
|
style: Z(n.value)
|
|
3042
3033
|
}, [
|
|
3043
|
-
e.maxWidth != null ? (u(),
|
|
3044
|
-
ae(
|
|
3045
|
-
ye(
|
|
3034
|
+
e.maxWidth != null ? (u(), m("span", Yr, [
|
|
3035
|
+
ae(a.$slots, "default", {}, () => [
|
|
3036
|
+
ye(_(e.text), 1)
|
|
3046
3037
|
])
|
|
3047
|
-
])) : ae(
|
|
3048
|
-
ye(
|
|
3038
|
+
])) : ae(a.$slots, "default", { key: 1 }, () => [
|
|
3039
|
+
ye(_(e.text), 1)
|
|
3049
3040
|
])
|
|
3050
3041
|
], 6));
|
|
3051
3042
|
}
|
|
@@ -3062,34 +3053,34 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3062
3053
|
},
|
|
3063
3054
|
emits: ["update:modelValue", "change"],
|
|
3064
3055
|
setup(e, { emit: t }) {
|
|
3065
|
-
const n = e,
|
|
3066
|
-
if (n.disabled ||
|
|
3056
|
+
const n = e, a = t, i = B(!1), r = p(() => n.modelValue === n.activeValue), o = async () => {
|
|
3057
|
+
if (n.disabled || i.value) return;
|
|
3067
3058
|
const l = r.value ? n.inactiveValue : n.activeValue;
|
|
3068
3059
|
if (n.beforeChange) {
|
|
3069
|
-
|
|
3060
|
+
i.value = !0;
|
|
3070
3061
|
try {
|
|
3071
3062
|
if (!await n.beforeChange()) return;
|
|
3072
3063
|
} catch {
|
|
3073
3064
|
return;
|
|
3074
3065
|
} finally {
|
|
3075
|
-
|
|
3066
|
+
i.value = !1;
|
|
3076
3067
|
}
|
|
3077
3068
|
}
|
|
3078
|
-
|
|
3069
|
+
a("update:modelValue", l);
|
|
3079
3070
|
};
|
|
3080
3071
|
return le(
|
|
3081
3072
|
() => n.modelValue,
|
|
3082
3073
|
(l) => {
|
|
3083
|
-
|
|
3074
|
+
a("change", l);
|
|
3084
3075
|
}
|
|
3085
|
-
), (l,
|
|
3076
|
+
), (l, s) => (u(), m("div", {
|
|
3086
3077
|
class: q(["cregis-switch", [
|
|
3087
3078
|
`cregis-switch--${e.size}`,
|
|
3088
|
-
{ "is-checked": r.value, "is-disabled": e.disabled ||
|
|
3079
|
+
{ "is-checked": r.value, "is-disabled": e.disabled || i.value }
|
|
3089
3080
|
]]),
|
|
3090
|
-
onClick:
|
|
3091
|
-
}, [...
|
|
3092
|
-
|
|
3081
|
+
onClick: o
|
|
3082
|
+
}, [...s[0] || (s[0] = [
|
|
3083
|
+
C("div", { class: "cregis-switch__circle" }, null, -1)
|
|
3093
3084
|
])], 2));
|
|
3094
3085
|
}
|
|
3095
3086
|
}), Xr = { class: "cregis-badge__wrapper" }, Zl = /* @__PURE__ */ oe({
|
|
@@ -3107,16 +3098,16 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3107
3098
|
const t = {
|
|
3108
3099
|
normal: [-8, -10],
|
|
3109
3100
|
dot: [-2, -2]
|
|
3110
|
-
}, n = e,
|
|
3111
|
-
top: `${
|
|
3112
|
-
right: `${
|
|
3101
|
+
}, n = e, a = p(() => n.offset ?? (n.isDot ? t.dot : t.normal)), i = p(() => ({
|
|
3102
|
+
top: `${a.value[0]}px`,
|
|
3103
|
+
right: `${a.value[1]}px`
|
|
3113
3104
|
}));
|
|
3114
|
-
return (r,
|
|
3115
|
-
e.hidden ?
|
|
3105
|
+
return (r, o) => (u(), m("div", Xr, [
|
|
3106
|
+
e.hidden ? j("", !0) : (u(), m("div", {
|
|
3116
3107
|
key: 0,
|
|
3117
3108
|
class: q(["cregis-badge", [`cregis-badge--${e.type}`, { "cregis-badge--dot": e.isDot }]]),
|
|
3118
|
-
style: Z(
|
|
3119
|
-
},
|
|
3109
|
+
style: Z(i.value)
|
|
3110
|
+
}, _(e.isDot ? "" : Number(e.value) > e.max ? `${e.max}+` : e.value), 7)),
|
|
3120
3111
|
ae(r.$slots, "default")
|
|
3121
3112
|
]));
|
|
3122
3113
|
}
|
|
@@ -3137,98 +3128,106 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3137
3128
|
onChange: {}
|
|
3138
3129
|
},
|
|
3139
3130
|
emits: ["update:modelValue"],
|
|
3140
|
-
setup(e, {
|
|
3141
|
-
const
|
|
3142
|
-
if (!
|
|
3143
|
-
if (
|
|
3131
|
+
setup(e, { expose: t, emit: n }) {
|
|
3132
|
+
const a = e, i = n, r = B(0), o = B(""), l = B(null), s = ["http:", "https:", "blob:"], v = (k) => {
|
|
3133
|
+
if (!k) return !1;
|
|
3134
|
+
if (k.toLowerCase().startsWith("data:image/")) return !0;
|
|
3144
3135
|
try {
|
|
3145
|
-
const { protocol:
|
|
3146
|
-
return s.includes(
|
|
3136
|
+
const { protocol: x } = new URL(k, window.location.origin);
|
|
3137
|
+
return s.includes(x);
|
|
3147
3138
|
} catch {
|
|
3148
|
-
return
|
|
3139
|
+
return k.startsWith("/") && !k.startsWith("//");
|
|
3149
3140
|
}
|
|
3150
|
-
},
|
|
3151
|
-
width: typeof
|
|
3152
|
-
height: typeof
|
|
3153
|
-
})),
|
|
3154
|
-
const
|
|
3155
|
-
return
|
|
3156
|
-
},
|
|
3157
|
-
const
|
|
3158
|
-
if (!
|
|
3159
|
-
const
|
|
3160
|
-
return
|
|
3161
|
-
const
|
|
3162
|
-
return
|
|
3141
|
+
}, c = p(() => v(o.value) ? o.value : ""), d = p(() => ({
|
|
3142
|
+
width: typeof a.width == "number" ? `${a.width}px` : a.width,
|
|
3143
|
+
height: typeof a.width == "number" ? `${a.width}px` : a.width
|
|
3144
|
+
})), g = (k) => {
|
|
3145
|
+
const x = k.lastIndexOf(".");
|
|
3146
|
+
return x === -1 ? "" : k.slice(x + 1).toLowerCase();
|
|
3147
|
+
}, h = (k, x) => {
|
|
3148
|
+
const E = x.split(",").map((X) => X.trim()).filter(Boolean);
|
|
3149
|
+
if (!E.length) return !0;
|
|
3150
|
+
const L = g(k.name), Y = k.type.toLowerCase();
|
|
3151
|
+
return E.some((X) => {
|
|
3152
|
+
const D = X.toLowerCase();
|
|
3153
|
+
return D.startsWith(".") ? L === D.slice(1) : D.includes("/") ? D.endsWith("/*") ? Y.startsWith(D.slice(0, -1)) : Y === D : L === D;
|
|
3163
3154
|
});
|
|
3164
|
-
}, g = (x) => {
|
|
3165
|
-
x.value = "";
|
|
3166
3155
|
};
|
|
3167
|
-
let
|
|
3168
|
-
const
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3156
|
+
let y;
|
|
3157
|
+
const $ = (k) => {
|
|
3158
|
+
k.value = "";
|
|
3159
|
+
}, z = () => {
|
|
3160
|
+
y && (clearInterval(y), y = void 0);
|
|
3161
|
+
}, V = () => {
|
|
3162
|
+
z(), r.value = 0, o.value = "", l.value && $(l.value), a.modelValue && i("update:modelValue", "");
|
|
3163
|
+
}, N = (k) => {
|
|
3164
|
+
const x = k.target, E = x.files?.[0];
|
|
3165
|
+
if (!E) return;
|
|
3166
|
+
if (a.accept && !h(E, a.accept)) {
|
|
3167
|
+
cn(a.exceedAcceptTip ?? he("upload.formatError")), $(x);
|
|
3173
3168
|
return;
|
|
3174
3169
|
}
|
|
3175
|
-
if (
|
|
3176
|
-
cn(
|
|
3170
|
+
if (a.size !== void 0 && E.size > a.size * 1024 * 1024) {
|
|
3171
|
+
cn(a.exceedSizeTip ?? he("upload.sizeError", { size: a.size })), $(x);
|
|
3177
3172
|
return;
|
|
3178
3173
|
}
|
|
3179
3174
|
i("update:modelValue", "");
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3182
|
-
|
|
3175
|
+
const L = new FormData();
|
|
3176
|
+
L.append("file", E, E.name), a.onChange?.(L), $(x), z(), r.value = 0, y = setInterval(() => {
|
|
3177
|
+
r.value += 30, r.value >= 90 && z();
|
|
3183
3178
|
}, 200);
|
|
3184
3179
|
};
|
|
3185
3180
|
le(
|
|
3186
|
-
() =>
|
|
3187
|
-
(
|
|
3188
|
-
|
|
3181
|
+
() => a.modelValue,
|
|
3182
|
+
(k) => {
|
|
3183
|
+
k ? (r.value = 100, o.value = k) : (r.value = 0, o.value = "");
|
|
3189
3184
|
},
|
|
3190
3185
|
{
|
|
3191
3186
|
immediate: !0
|
|
3192
3187
|
}
|
|
3193
3188
|
);
|
|
3194
|
-
const
|
|
3195
|
-
width: `${
|
|
3196
|
-
borderRadius:
|
|
3197
|
-
})),
|
|
3189
|
+
const A = p(() => ({
|
|
3190
|
+
width: `${r.value}%`,
|
|
3191
|
+
borderRadius: r.value === 100 ? "0 0 6px 6px" : "0 0 0 6px"
|
|
3192
|
+
})), O = p(() => a.disabled || r.value > 0 && r.value < 100);
|
|
3198
3193
|
return Le(() => {
|
|
3199
|
-
|
|
3200
|
-
}), (
|
|
3201
|
-
|
|
3202
|
-
|
|
3194
|
+
z();
|
|
3195
|
+
}), t({
|
|
3196
|
+
reset: V
|
|
3197
|
+
}), (k, x) => (u(), m("div", {
|
|
3198
|
+
class: q(["cregis-upload", { "cregis-upload--disabled": O.value }]),
|
|
3199
|
+
style: Z(d.value)
|
|
3203
3200
|
}, [
|
|
3204
|
-
|
|
3201
|
+
c.value ? j("", !0) : (u(), de(U(sn), {
|
|
3205
3202
|
key: 0,
|
|
3206
3203
|
size: "16px",
|
|
3207
3204
|
color: "var(--stroke-base-secondary)"
|
|
3208
3205
|
})),
|
|
3209
|
-
|
|
3206
|
+
C("input", {
|
|
3207
|
+
ref_key: "inputRef",
|
|
3208
|
+
ref: l,
|
|
3210
3209
|
type: "file",
|
|
3211
3210
|
title: "",
|
|
3212
3211
|
accept: e.accept,
|
|
3213
|
-
disabled:
|
|
3214
|
-
onChange:
|
|
3212
|
+
disabled: O.value,
|
|
3213
|
+
onChange: N
|
|
3215
3214
|
}, null, 40, Kr),
|
|
3216
|
-
|
|
3215
|
+
r.value > 0 && r.value < 100 ? (u(), m("div", {
|
|
3217
3216
|
key: 1,
|
|
3218
3217
|
class: "cregis-upload__progress",
|
|
3219
|
-
style: Z(
|
|
3220
|
-
}, null, 4)) :
|
|
3221
|
-
|
|
3218
|
+
style: Z(A.value)
|
|
3219
|
+
}, null, 4)) : j("", !0),
|
|
3220
|
+
c.value ? (u(), m("img", {
|
|
3222
3221
|
key: 2,
|
|
3223
|
-
src:
|
|
3222
|
+
src: c.value,
|
|
3224
3223
|
alt: ""
|
|
3225
|
-
}, null, 8, Gr)) :
|
|
3226
|
-
|
|
3224
|
+
}, null, 8, Gr)) : j("", !0),
|
|
3225
|
+
c.value ? (u(), m("div", Zr, [
|
|
3227
3226
|
ne(U(sn), {
|
|
3228
3227
|
size: "16px",
|
|
3229
3228
|
color: "var(--text-same-white-primary)"
|
|
3230
3229
|
})
|
|
3231
|
-
])) :
|
|
3230
|
+
])) : j("", !0)
|
|
3232
3231
|
], 6));
|
|
3233
3232
|
}
|
|
3234
3233
|
});
|
|
@@ -3252,25 +3251,25 @@ const Qr = () => {
|
|
|
3252
3251
|
},
|
|
3253
3252
|
emits: ["update:modelValue", "after-leave"],
|
|
3254
3253
|
setup(e, { emit: t }) {
|
|
3255
|
-
const n = e,
|
|
3256
|
-
let
|
|
3254
|
+
const n = e, a = t;
|
|
3255
|
+
let i = !1;
|
|
3257
3256
|
le(() => [n.modelValue, n.lockScroll], () => {
|
|
3258
3257
|
const d = n.modelValue && n.lockScroll;
|
|
3259
|
-
d && !
|
|
3258
|
+
d && !i ? (Qr(), i = !0) : !d && i && (kn(), i = !1);
|
|
3260
3259
|
}, { immediate: !0 }), Le(() => {
|
|
3261
|
-
|
|
3260
|
+
i && (kn(), i = !1);
|
|
3262
3261
|
});
|
|
3263
|
-
const
|
|
3262
|
+
const o = p(() => ({
|
|
3264
3263
|
width: typeof n.width == "number" ? `${n.width}px` : n.width
|
|
3265
3264
|
})), l = p(() => ({
|
|
3266
3265
|
zIndex: Yt(),
|
|
3267
3266
|
...n.alignCenter ? {} : { paddingTop: n.top }
|
|
3268
|
-
})),
|
|
3269
|
-
|
|
3267
|
+
})), s = () => {
|
|
3268
|
+
a("update:modelValue", !1);
|
|
3270
3269
|
}, v = () => {
|
|
3271
|
-
n.closeOnClickModal &&
|
|
3270
|
+
n.closeOnClickModal && s();
|
|
3272
3271
|
}, c = () => {
|
|
3273
|
-
|
|
3272
|
+
a("after-leave");
|
|
3274
3273
|
};
|
|
3275
3274
|
return (d, g) => (u(), de(_t, { to: "body" }, [
|
|
3276
3275
|
ne(st, {
|
|
@@ -3278,37 +3277,37 @@ const Qr = () => {
|
|
|
3278
3277
|
onAfterLeave: c
|
|
3279
3278
|
}, {
|
|
3280
3279
|
default: ve(() => [
|
|
3281
|
-
e.modelValue ? (u(),
|
|
3280
|
+
e.modelValue ? (u(), m("div", Be({ key: 0 }, d.$attrs, {
|
|
3282
3281
|
class: ["cregis-dialog__wrapper", {
|
|
3283
3282
|
"cregis-dialog__wrapper--center": e.alignCenter,
|
|
3284
3283
|
"cregis-dialog__wrapper--no-modal": !e.modal
|
|
3285
3284
|
}],
|
|
3286
3285
|
style: l.value
|
|
3287
3286
|
}), [
|
|
3288
|
-
e.modal ? (u(),
|
|
3287
|
+
e.modal ? (u(), m("div", {
|
|
3289
3288
|
key: 0,
|
|
3290
3289
|
class: "cregis-dialog__mask",
|
|
3291
3290
|
onClick: v
|
|
3292
|
-
})) :
|
|
3293
|
-
|
|
3291
|
+
})) : j("", !0),
|
|
3292
|
+
C("div", {
|
|
3294
3293
|
class: "cregis-dialog",
|
|
3295
|
-
style: Z(
|
|
3294
|
+
style: Z(o.value),
|
|
3296
3295
|
onClick: g[0] || (g[0] = Fe(() => {
|
|
3297
3296
|
}, ["stop"]))
|
|
3298
3297
|
}, [
|
|
3299
|
-
e.showClose ? (u(),
|
|
3298
|
+
e.showClose ? (u(), m("div", {
|
|
3300
3299
|
key: 0,
|
|
3301
3300
|
class: "cregis-dialog__close",
|
|
3302
|
-
onClick:
|
|
3301
|
+
onClick: s
|
|
3303
3302
|
}, [
|
|
3304
3303
|
ne(U(Ut), {
|
|
3305
3304
|
size: "10px",
|
|
3306
3305
|
color: "var(--material-same-white-primary)"
|
|
3307
3306
|
})
|
|
3308
|
-
])) :
|
|
3307
|
+
])) : j("", !0),
|
|
3309
3308
|
ae(d.$slots, "default")
|
|
3310
3309
|
], 4)
|
|
3311
|
-
], 16)) :
|
|
3310
|
+
], 16)) : j("", !0)
|
|
3312
3311
|
]),
|
|
3313
3312
|
_: 3
|
|
3314
3313
|
})
|
|
@@ -3339,29 +3338,29 @@ const Qr = () => {
|
|
|
3339
3338
|
},
|
|
3340
3339
|
emits: ["after-leave"],
|
|
3341
3340
|
setup(e, { emit: t }) {
|
|
3342
|
-
const n = e,
|
|
3341
|
+
const n = e, a = t, i = B(!1), r = B(null), o = B(null), l = p(() => n.type === "success" ? {
|
|
3343
3342
|
component: Cn,
|
|
3344
3343
|
color: "var(--text-same-white-primary)"
|
|
3345
3344
|
} : {
|
|
3346
3345
|
component: aa,
|
|
3347
3346
|
color: "var(--text-base-primary)"
|
|
3348
|
-
}),
|
|
3347
|
+
}), s = async (g) => {
|
|
3349
3348
|
if (!r.value) {
|
|
3350
3349
|
r.value = g;
|
|
3351
3350
|
try {
|
|
3352
|
-
await (g === "confirm" ? n.onConfirm : n.onCancel)?.(),
|
|
3351
|
+
await (g === "confirm" ? n.onConfirm : n.onCancel)?.(), o.value = g, i.value = !1;
|
|
3353
3352
|
} catch {
|
|
3354
3353
|
r.value = null;
|
|
3355
3354
|
}
|
|
3356
3355
|
}
|
|
3357
|
-
}, v = () =>
|
|
3358
|
-
|
|
3356
|
+
}, v = () => s("confirm"), c = () => s("cancel"), d = () => {
|
|
3357
|
+
o.value || n.onCancel?.(), r.value = null, o.value = null, a("after-leave");
|
|
3359
3358
|
};
|
|
3360
3359
|
return ge(() => {
|
|
3361
|
-
|
|
3362
|
-
}), (g,
|
|
3363
|
-
modelValue:
|
|
3364
|
-
"onUpdate:modelValue":
|
|
3360
|
+
i.value = !0;
|
|
3361
|
+
}), (g, h) => (u(), de($t, {
|
|
3362
|
+
modelValue: i.value,
|
|
3363
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => i.value = y),
|
|
3365
3364
|
width: e.width,
|
|
3366
3365
|
"show-close": !1,
|
|
3367
3366
|
"close-on-click-modal": e.closeOnClickModal,
|
|
@@ -3369,9 +3368,9 @@ const Qr = () => {
|
|
|
3369
3368
|
onAfterLeave: d
|
|
3370
3369
|
}, {
|
|
3371
3370
|
default: ve(() => [
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3371
|
+
C("div", Jr, [
|
|
3372
|
+
C("div", el, [
|
|
3373
|
+
C("div", {
|
|
3375
3374
|
class: q(`cregis-dialog-confirm__icon cregis-dialog-confirm__icon--${e.type}`)
|
|
3376
3375
|
}, [
|
|
3377
3376
|
(u(), de(it(l.value.component), {
|
|
@@ -3381,9 +3380,9 @@ const Qr = () => {
|
|
|
3381
3380
|
}, null, 8, ["color"]))
|
|
3382
3381
|
], 2)
|
|
3383
3382
|
]),
|
|
3384
|
-
e.title ? (u(),
|
|
3385
|
-
e.message ? (u(),
|
|
3386
|
-
|
|
3383
|
+
e.title ? (u(), m("div", tl, _(e.title), 1)) : j("", !0),
|
|
3384
|
+
e.message ? (u(), m("div", nl, _(e.message), 1)) : j("", !0),
|
|
3385
|
+
C("div", al, [
|
|
3387
3386
|
e.showConfirmButton ? (u(), de(He, {
|
|
3388
3387
|
key: 0,
|
|
3389
3388
|
type: "foreground",
|
|
@@ -3392,10 +3391,10 @@ const Qr = () => {
|
|
|
3392
3391
|
onClick: v
|
|
3393
3392
|
}, {
|
|
3394
3393
|
default: ve(() => [
|
|
3395
|
-
ye(
|
|
3394
|
+
ye(_(e.confirmButtonText || U(he)("dialog.confirm")), 1)
|
|
3396
3395
|
]),
|
|
3397
3396
|
_: 1
|
|
3398
|
-
}, 8, ["loading"])) :
|
|
3397
|
+
}, 8, ["loading"])) : j("", !0),
|
|
3399
3398
|
e.showCancelButton ? (u(), de(He, {
|
|
3400
3399
|
key: 1,
|
|
3401
3400
|
type: "secondary",
|
|
@@ -3405,10 +3404,10 @@ const Qr = () => {
|
|
|
3405
3404
|
onClick: c
|
|
3406
3405
|
}, {
|
|
3407
3406
|
default: ve(() => [
|
|
3408
|
-
ye(
|
|
3407
|
+
ye(_(e.cancelButtonText || U(he)("dialog.cancel")), 1)
|
|
3409
3408
|
]),
|
|
3410
3409
|
_: 1
|
|
3411
|
-
}, 8, ["loading"])) :
|
|
3410
|
+
}, 8, ["loading"])) : j("", !0)
|
|
3412
3411
|
])
|
|
3413
3412
|
])
|
|
3414
3413
|
]),
|
|
@@ -3421,31 +3420,31 @@ function rl(e) {
|
|
|
3421
3420
|
}
|
|
3422
3421
|
function ll(e) {
|
|
3423
3422
|
return new Promise((t, n) => {
|
|
3424
|
-
const
|
|
3425
|
-
document.body.appendChild(
|
|
3423
|
+
const a = rl(e), i = document.createElement("div");
|
|
3424
|
+
document.body.appendChild(i);
|
|
3426
3425
|
const r = () => {
|
|
3427
|
-
Ue(null,
|
|
3426
|
+
Ue(null, i), i.remove();
|
|
3428
3427
|
};
|
|
3429
|
-
let
|
|
3428
|
+
let o = !1;
|
|
3430
3429
|
const l = () => {
|
|
3431
|
-
|
|
3432
|
-
},
|
|
3433
|
-
|
|
3430
|
+
o || (o = !0, t());
|
|
3431
|
+
}, s = (v) => {
|
|
3432
|
+
o || (o = !0, n(v));
|
|
3434
3433
|
};
|
|
3435
3434
|
Ue(
|
|
3436
3435
|
Ht(il, {
|
|
3437
|
-
...
|
|
3436
|
+
...a,
|
|
3438
3437
|
onConfirm: async () => {
|
|
3439
|
-
await
|
|
3438
|
+
await a.onConfirm?.(), l();
|
|
3440
3439
|
},
|
|
3441
3440
|
onCancel: async () => {
|
|
3442
|
-
await
|
|
3441
|
+
await a.onCancel?.(), s("cancel");
|
|
3443
3442
|
},
|
|
3444
3443
|
onAfterLeave: () => {
|
|
3445
|
-
r(),
|
|
3444
|
+
r(), o || s("cancel");
|
|
3446
3445
|
}
|
|
3447
3446
|
}),
|
|
3448
|
-
|
|
3447
|
+
i
|
|
3449
3448
|
);
|
|
3450
3449
|
});
|
|
3451
3450
|
}
|
|
@@ -3464,11 +3463,11 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3464
3463
|
},
|
|
3465
3464
|
setup(e) {
|
|
3466
3465
|
const t = e;
|
|
3467
|
-
return
|
|
3466
|
+
return Nt(Xn, {
|
|
3468
3467
|
dotSize: ht(t, "dotSize"),
|
|
3469
3468
|
lineWidth: ht(t, "lineWidth"),
|
|
3470
3469
|
iconSize: ht(t, "iconSize")
|
|
3471
|
-
}), (n,
|
|
3470
|
+
}), (n, a) => (u(), m("div", fl, [
|
|
3472
3471
|
ae(n.$slots, "default")
|
|
3473
3472
|
]));
|
|
3474
3473
|
}
|
|
@@ -3488,71 +3487,71 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3488
3487
|
setup(e) {
|
|
3489
3488
|
const t = e, n = jt(Xn);
|
|
3490
3489
|
if (!n) throw new Error("TimelineItem must be used within Timeline");
|
|
3491
|
-
const
|
|
3490
|
+
const a = (d) => typeof d == "number" ? `${d}px` : /^\d+(\.\d+)?$/.test(d.trim()) ? `${d.trim()}px` : d, i = p(() => a(t.dotSize ?? n.dotSize.value)), r = p(() => a(t.lineWidth ?? n.lineWidth.value)), o = p(() => a(t.iconSize ?? n.iconSize.value)), l = p(() => {
|
|
3492
3491
|
const d = {
|
|
3493
|
-
width:
|
|
3494
|
-
height:
|
|
3492
|
+
width: i.value,
|
|
3493
|
+
height: i.value
|
|
3495
3494
|
};
|
|
3496
3495
|
return t.status === "finished" ? { ...d, backgroundColor: sl } : t.status === "pending" ? { ...d, backgroundColor: cl } : t.status === "rejected" || t.status === "withdrawn" ? { ...d, backgroundColor: dl } : {
|
|
3497
3496
|
...d,
|
|
3498
3497
|
backgroundColor: "transparent",
|
|
3499
3498
|
border: `1px solid ${ul}`
|
|
3500
3499
|
};
|
|
3501
|
-
}),
|
|
3502
|
-
"--cregis-timeline-dot-size":
|
|
3500
|
+
}), s = p(() => ({
|
|
3501
|
+
"--cregis-timeline-dot-size": i.value
|
|
3503
3502
|
})), v = p(() => ({
|
|
3504
|
-
width:
|
|
3503
|
+
width: i.value
|
|
3505
3504
|
})), c = p(() => ({
|
|
3506
3505
|
backgroundColor: ol,
|
|
3507
3506
|
width: r.value,
|
|
3508
|
-
left: `calc(${
|
|
3507
|
+
left: `calc(${i.value} / 2 - ${r.value} / 2)`,
|
|
3509
3508
|
top: "calc((var(--cregis-timeline-title-line-height) + var(--cregis-timeline-dot-size, 16px)) / 2 + var(--cregis-timeline-line-gap))",
|
|
3510
3509
|
bottom: "calc(-1 * (var(--cregis-timeline-dot-top-offset) - var(--cregis-timeline-line-gap)))"
|
|
3511
3510
|
}));
|
|
3512
|
-
return (d, g) => (u(),
|
|
3511
|
+
return (d, g) => (u(), m("div", {
|
|
3513
3512
|
class: "cregis-timeline-item",
|
|
3514
|
-
style: Z(
|
|
3513
|
+
style: Z(s.value)
|
|
3515
3514
|
}, [
|
|
3516
|
-
|
|
3515
|
+
C("div", {
|
|
3517
3516
|
class: "cregis-timeline-item__node",
|
|
3518
3517
|
style: Z(v.value)
|
|
3519
3518
|
}, [
|
|
3520
|
-
|
|
3519
|
+
C("span", {
|
|
3521
3520
|
class: "cregis-timeline-item__dot",
|
|
3522
3521
|
style: Z(l.value)
|
|
3523
3522
|
}, [
|
|
3524
3523
|
e.status === "finished" ? (u(), de(En, {
|
|
3525
3524
|
key: 0,
|
|
3526
|
-
size:
|
|
3525
|
+
size: o.value,
|
|
3527
3526
|
class: "cregis-timeline-item__dot-icon"
|
|
3528
3527
|
}, null, 8, ["size"])) : e.status === "pending" ? (u(), de(U(ia), {
|
|
3529
3528
|
key: 1,
|
|
3530
|
-
size:
|
|
3529
|
+
size: o.value,
|
|
3531
3530
|
color: "var(--text-same-white-primary)"
|
|
3532
3531
|
}, null, 8, ["size"])) : e.status === "rejected" ? (u(), de(U(Ut), {
|
|
3533
3532
|
key: 2,
|
|
3534
|
-
size:
|
|
3533
|
+
size: o.value,
|
|
3535
3534
|
color: "var(--text-same-white-primary)"
|
|
3536
3535
|
}, null, 8, ["size"])) : e.status === "withdrawn" ? (u(), de(U(ra), {
|
|
3537
3536
|
key: 3,
|
|
3538
|
-
size:
|
|
3537
|
+
size: o.value,
|
|
3539
3538
|
color: "var(--text-same-white-primary)"
|
|
3540
|
-
}, null, 8, ["size"])) :
|
|
3539
|
+
}, null, 8, ["size"])) : j("", !0)
|
|
3541
3540
|
], 4)
|
|
3542
3541
|
], 4),
|
|
3543
|
-
d.$slots.title ? (u(),
|
|
3542
|
+
d.$slots.title ? (u(), m("div", vl, [
|
|
3544
3543
|
ae(d.$slots, "title")
|
|
3545
|
-
])) :
|
|
3546
|
-
|
|
3544
|
+
])) : j("", !0),
|
|
3545
|
+
C("span", {
|
|
3547
3546
|
class: "cregis-timeline-item__tail",
|
|
3548
3547
|
style: Z(c.value)
|
|
3549
3548
|
}, null, 4),
|
|
3550
|
-
d.$slots.default ? (u(),
|
|
3549
|
+
d.$slots.default ? (u(), m("div", {
|
|
3551
3550
|
key: 1,
|
|
3552
3551
|
class: q(["cregis-timeline-item__content", { "is-hoverable": e.contentHoverable }])
|
|
3553
3552
|
}, [
|
|
3554
3553
|
ae(d.$slots, "default")
|
|
3555
|
-
], 2)) :
|
|
3554
|
+
], 2)) : j("", !0)
|
|
3556
3555
|
], 4));
|
|
3557
3556
|
}
|
|
3558
3557
|
}), pl = {
|
|
@@ -3574,26 +3573,26 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3574
3573
|
},
|
|
3575
3574
|
emits: ["select-all-mode", "sort-change"],
|
|
3576
3575
|
setup(e, { expose: t, emit: n }) {
|
|
3577
|
-
const
|
|
3576
|
+
const a = n, i = e, r = B(!1), o = B(!1), l = B(""), s = B(), v = B();
|
|
3578
3577
|
let c = null;
|
|
3579
3578
|
const d = p(() => ({
|
|
3580
3579
|
maxHeight: "180px",
|
|
3581
3580
|
zIndex: Yt()
|
|
3582
|
-
})), g = p(() =>
|
|
3583
|
-
height:
|
|
3584
|
-
...
|
|
3585
|
-
})),
|
|
3586
|
-
justifyContent:
|
|
3587
|
-
...
|
|
3581
|
+
})), g = p(() => i.selectMode ? "disabled" : ""), h = p(() => o.value ? "focus" : ""), y = p(() => ({
|
|
3582
|
+
height: i.height,
|
|
3583
|
+
...i.width ? { width: "1%" } : {}
|
|
3584
|
+
})), $ = p(() => ({
|
|
3585
|
+
justifyContent: i.align === "left" ? "flex-start" : i.align === "center" ? "center" : "flex-end",
|
|
3586
|
+
...i.width ? { width: i.width } : {}
|
|
3588
3587
|
}));
|
|
3589
|
-
_n(
|
|
3588
|
+
_n(s, () => {
|
|
3590
3589
|
r.value && setTimeout(() => {
|
|
3591
|
-
r.value = !1,
|
|
3590
|
+
r.value = !1, o.value = !1;
|
|
3592
3591
|
}, 0);
|
|
3593
3592
|
});
|
|
3594
|
-
const
|
|
3595
|
-
|
|
3596
|
-
|
|
3593
|
+
const z = () => {
|
|
3594
|
+
i.selectMode || r.value || (r.value = !0, o.value = !0, ge(() => {
|
|
3595
|
+
s.value && v.value && (c?.destroy(), c = Nn(v.value, s.value, {
|
|
3597
3596
|
placement: "bottom-start",
|
|
3598
3597
|
modifiers: [
|
|
3599
3598
|
{
|
|
@@ -3605,8 +3604,8 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3605
3604
|
]
|
|
3606
3605
|
}));
|
|
3607
3606
|
}));
|
|
3608
|
-
},
|
|
3609
|
-
|
|
3607
|
+
}, V = (A) => {
|
|
3608
|
+
A !== l.value && a("sort-change", A), l.value = A, r.value = !1, o.value = !1;
|
|
3610
3609
|
};
|
|
3611
3610
|
return t({
|
|
3612
3611
|
resetSort: () => {
|
|
@@ -3614,36 +3613,36 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3614
3613
|
}
|
|
3615
3614
|
}), Le(() => {
|
|
3616
3615
|
c?.destroy();
|
|
3617
|
-
}), (
|
|
3616
|
+
}), (A, O) => (u(), m("th", {
|
|
3618
3617
|
class: q(["header-cell-wrapper", {
|
|
3619
3618
|
"select-cell": e.type === "select",
|
|
3620
3619
|
"select-cell--visible": e.type === "select" && e.selectVisible
|
|
3621
3620
|
}]),
|
|
3622
3621
|
style: Z(y.value)
|
|
3623
3622
|
}, [
|
|
3624
|
-
e.type === "select" ? (u(),
|
|
3623
|
+
e.type === "select" ? (u(), m("div", pl, [
|
|
3625
3624
|
ne(qt, {
|
|
3626
3625
|
"model-value": e.selectAllMode === "all",
|
|
3627
3626
|
indeterminate: e.selectAllMode === "some",
|
|
3628
|
-
onClick:
|
|
3627
|
+
onClick: O[0] || (O[0] = Fe((k) => A.$emit("select-all-mode", e.selectAllMode), ["stop"]))
|
|
3629
3628
|
}, null, 8, ["model-value", "indeterminate"])
|
|
3630
|
-
])) :
|
|
3631
|
-
e.type === "default" ? (u(),
|
|
3629
|
+
])) : j("", !0),
|
|
3630
|
+
e.type === "default" ? (u(), m("div", {
|
|
3632
3631
|
key: 1,
|
|
3633
3632
|
class: "cell-content",
|
|
3634
|
-
style: Z(
|
|
3633
|
+
style: Z($.value)
|
|
3635
3634
|
}, [
|
|
3636
|
-
ae(
|
|
3637
|
-
|
|
3635
|
+
ae(A.$slots, "default", {}, () => [
|
|
3636
|
+
C("div", null, _(e.label), 1)
|
|
3638
3637
|
], !0),
|
|
3639
|
-
e.sortable ? (u(),
|
|
3638
|
+
e.sortable ? (u(), m("div", {
|
|
3640
3639
|
key: 0,
|
|
3641
3640
|
ref_key: "containerRef",
|
|
3642
3641
|
ref: v,
|
|
3643
|
-
class: q(["sort-container", [
|
|
3644
|
-
onClick: Fe(
|
|
3642
|
+
class: q(["sort-container", [h.value, g.value]]),
|
|
3643
|
+
onClick: Fe(z, ["stop"])
|
|
3645
3644
|
}, [
|
|
3646
|
-
|
|
3645
|
+
C("span", {
|
|
3647
3646
|
class: q(["sort-icon", { "is-open": r.value }])
|
|
3648
3647
|
}, [
|
|
3649
3648
|
ne(U(Ft), {
|
|
@@ -3651,23 +3650,23 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3651
3650
|
color: "currentColor"
|
|
3652
3651
|
})
|
|
3653
3652
|
], 2)
|
|
3654
|
-
], 2)) :
|
|
3655
|
-
], 4)) :
|
|
3653
|
+
], 2)) : j("", !0)
|
|
3654
|
+
], 4)) : j("", !0),
|
|
3656
3655
|
(u(), de(_t, { to: "body" }, [
|
|
3657
|
-
_e(
|
|
3656
|
+
_e(C("div", {
|
|
3658
3657
|
ref_key: "popRef",
|
|
3659
|
-
ref:
|
|
3658
|
+
ref: s,
|
|
3660
3659
|
class: "sort-popover no-scroll-bar popover-shadow",
|
|
3661
3660
|
style: Z(d.value)
|
|
3662
3661
|
}, [
|
|
3663
|
-
|
|
3662
|
+
C("div", {
|
|
3664
3663
|
class: q(["sort-item font-15", { active: l.value === 1 }]),
|
|
3665
|
-
onClick:
|
|
3666
|
-
},
|
|
3667
|
-
|
|
3664
|
+
onClick: O[1] || (O[1] = (k) => V(1))
|
|
3665
|
+
}, _(U(he)("tableList.asc")), 3),
|
|
3666
|
+
C("div", {
|
|
3668
3667
|
class: q(["sort-item font-15", { active: l.value === 2 }]),
|
|
3669
|
-
onClick:
|
|
3670
|
-
},
|
|
3668
|
+
onClick: O[2] || (O[2] = (k) => V(2))
|
|
3669
|
+
}, _(U(he)("tableList.desc")), 3)
|
|
3671
3670
|
], 4), [
|
|
3672
3671
|
[St, r.value]
|
|
3673
3672
|
])
|
|
@@ -3676,8 +3675,8 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3676
3675
|
}
|
|
3677
3676
|
}), tn = (e, t) => {
|
|
3678
3677
|
const n = e.__vccOpts || e;
|
|
3679
|
-
for (const [
|
|
3680
|
-
n[
|
|
3678
|
+
for (const [a, i] of t)
|
|
3679
|
+
n[a] = i;
|
|
3681
3680
|
return n;
|
|
3682
3681
|
}, $n = /* @__PURE__ */ tn(ml, [["__scopeId", "data-v-fadfd4e7"]]), hl = {
|
|
3683
3682
|
key: 1,
|
|
@@ -3704,49 +3703,49 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3704
3703
|
},
|
|
3705
3704
|
emits: ["selectChange"],
|
|
3706
3705
|
setup(e) {
|
|
3707
|
-
const t = e, n = p(() => Object.assign(t.data || {}, {})),
|
|
3706
|
+
const t = e, n = p(() => Object.assign(t.data || {}, {})), a = p(() => ({
|
|
3708
3707
|
...t.widthPercent ? { width: `${t.widthPercent}%` } : {},
|
|
3709
3708
|
...t.minWidth ? { minWidth: t.minWidth } : {},
|
|
3710
3709
|
...t.width ? { width: "1%" } : {}
|
|
3711
|
-
})),
|
|
3710
|
+
})), i = p(() => ({
|
|
3712
3711
|
height: t.columnHeight + "px"
|
|
3713
|
-
})), r = p(() => t.index % 2 === 1),
|
|
3714
|
-
...
|
|
3712
|
+
})), r = p(() => t.index % 2 === 1), o = p(() => ({
|
|
3713
|
+
...i.value,
|
|
3715
3714
|
justifyContent: t.align === "left" ? "flex-start" : t.align === "center" ? "center" : "flex-end",
|
|
3716
3715
|
...t.width ? { width: t.width } : {}
|
|
3717
3716
|
}));
|
|
3718
|
-
return (l,
|
|
3717
|
+
return (l, s) => (u(), m("td", {
|
|
3719
3718
|
class: q(["column-wrapper", {
|
|
3720
3719
|
"is-striped": r.value,
|
|
3721
3720
|
"select-cell": e.type === "select",
|
|
3722
3721
|
"select-cell--visible": e.type === "select" && e.selectVisible
|
|
3723
3722
|
}]),
|
|
3724
|
-
style: Z(
|
|
3723
|
+
style: Z(a.value)
|
|
3725
3724
|
}, [
|
|
3726
|
-
e.blank ? (u(),
|
|
3725
|
+
e.blank ? (u(), m("div", {
|
|
3727
3726
|
key: 0,
|
|
3728
|
-
style: Z(
|
|
3729
|
-
}, null, 4)) : (u(),
|
|
3730
|
-
e.type === "select" ? (u(),
|
|
3727
|
+
style: Z(o.value)
|
|
3728
|
+
}, null, 4)) : (u(), m(ze, { key: 1 }, [
|
|
3729
|
+
e.type === "select" ? (u(), m("div", {
|
|
3731
3730
|
key: 0,
|
|
3732
3731
|
class: "select-content",
|
|
3733
|
-
style: Z(
|
|
3732
|
+
style: Z(i.value)
|
|
3734
3733
|
}, [
|
|
3735
3734
|
ne(qt, {
|
|
3736
3735
|
"model-value": e.selected,
|
|
3737
|
-
onClick:
|
|
3736
|
+
onClick: s[0] || (s[0] = Fe((v) => l.$emit("selectChange", e.index), ["stop"]))
|
|
3738
3737
|
}, null, 8, ["model-value"])
|
|
3739
|
-
], 4)) :
|
|
3740
|
-
e.type === "default" ? (u(),
|
|
3738
|
+
], 4)) : j("", !0),
|
|
3739
|
+
e.type === "default" ? (u(), m("div", {
|
|
3741
3740
|
key: 1,
|
|
3742
3741
|
class: "cell-content",
|
|
3743
|
-
style: Z(
|
|
3742
|
+
style: Z(o.value)
|
|
3744
3743
|
}, [
|
|
3745
3744
|
l.$slots.default ? ae(l.$slots, "default", {
|
|
3746
3745
|
key: 0,
|
|
3747
3746
|
data: n.value
|
|
3748
|
-
}, void 0, !0) : (u(),
|
|
3749
|
-
], 4)) :
|
|
3747
|
+
}, void 0, !0) : (u(), m("div", hl, _(t.data?.[t.prop || ""]), 1))
|
|
3748
|
+
], 4)) : j("", !0)
|
|
3750
3749
|
], 64))
|
|
3751
3750
|
], 6));
|
|
3752
3751
|
}
|
|
@@ -3754,8 +3753,8 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3754
3753
|
if (!e) return n;
|
|
3755
3754
|
if (Object.prototype.hasOwnProperty.call(e, t))
|
|
3756
3755
|
return e[t];
|
|
3757
|
-
const
|
|
3758
|
-
return Object.prototype.hasOwnProperty.call(e,
|
|
3756
|
+
const a = t.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
3757
|
+
return Object.prototype.hasOwnProperty.call(e, a) ? e[a] : n;
|
|
3759
3758
|
}, bl = { class: "initing-content" }, yl = { class: "initing-text" }, wl = { class: "selected-count-wrapper" }, xl = { class: "font-medium text-[var(--text-base-primary)]" }, kl = { class: "ml-[2px] text-[var(--text-base-secondary)]" }, $l = {
|
|
3760
3759
|
key: 0,
|
|
3761
3760
|
class: "operation-divider"
|
|
@@ -3765,7 +3764,7 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3765
3764
|
}, Rl = { class: "flex flex-col gap-[8px] items-center -translate-x-[30px]" }, Ll = { class: "no-data-text font-13" }, Bl = {
|
|
3766
3765
|
key: 1,
|
|
3767
3766
|
class: "flex-1"
|
|
3768
|
-
},
|
|
3767
|
+
}, Vl = /* @__PURE__ */ oe({
|
|
3769
3768
|
__name: "index",
|
|
3770
3769
|
props: {
|
|
3771
3770
|
maxHeight: {},
|
|
@@ -3778,93 +3777,93 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3778
3777
|
},
|
|
3779
3778
|
emits: ["row-click", "update:selected-list", "selected-change", "select-close"],
|
|
3780
3779
|
setup(e, { expose: t, emit: n }) {
|
|
3781
|
-
const
|
|
3780
|
+
const a = n, i = e, r = Sn(), o = B(null), l = B(null), s = B([]), v = B({ width: 0, height: 0 }), c = B(0), d = p(() => `${i.headerHeight}px`), g = B(!1), h = B([]);
|
|
3782
3781
|
le(
|
|
3783
|
-
() =>
|
|
3782
|
+
() => i.dataList,
|
|
3784
3783
|
() => {
|
|
3785
|
-
|
|
3784
|
+
h.value = [];
|
|
3786
3785
|
},
|
|
3787
3786
|
{
|
|
3788
3787
|
immediate: !0
|
|
3789
3788
|
}
|
|
3790
3789
|
);
|
|
3791
|
-
const y =
|
|
3790
|
+
const y = B(!1), $ = B();
|
|
3792
3791
|
le(
|
|
3793
|
-
() =>
|
|
3794
|
-
(
|
|
3795
|
-
|
|
3792
|
+
() => i.initing,
|
|
3793
|
+
(W) => {
|
|
3794
|
+
W ? $.value = window.setTimeout(() => {
|
|
3796
3795
|
y.value = !0;
|
|
3797
|
-
}, 500) : (clearTimeout(
|
|
3796
|
+
}, 500) : (clearTimeout($.value), y.value = !1);
|
|
3798
3797
|
},
|
|
3799
3798
|
{
|
|
3800
3799
|
immediate: !0
|
|
3801
3800
|
}
|
|
3802
3801
|
);
|
|
3803
|
-
const
|
|
3802
|
+
const z = B(!1), V = B(!1), N = B();
|
|
3804
3803
|
le(
|
|
3805
|
-
() =>
|
|
3806
|
-
(
|
|
3807
|
-
|
|
3808
|
-
|
|
3804
|
+
() => i.loading,
|
|
3805
|
+
(W) => {
|
|
3806
|
+
W ? (clearTimeout(N.value), l.value?.scrollTo({ top: 0, behavior: "instant" }), V.value = !1, z.value = !0) : (l.value?.scrollTo({ top: 0, behavior: "instant" }), V.value = !0, N.value = window.setTimeout(() => {
|
|
3807
|
+
z.value = !1;
|
|
3809
3808
|
}, 500));
|
|
3810
3809
|
},
|
|
3811
3810
|
{
|
|
3812
3811
|
immediate: !0
|
|
3813
3812
|
}
|
|
3814
3813
|
);
|
|
3815
|
-
const
|
|
3816
|
-
const
|
|
3817
|
-
return Array.from({ length:
|
|
3818
|
-
}),
|
|
3814
|
+
const A = p(() => {
|
|
3815
|
+
const W = v.value.height - i.headerHeight - 8, I = Math.floor(W / i.columnHeight), R = I - i.dataList.length > 0 ? I - i.dataList.length : 0;
|
|
3816
|
+
return Array.from({ length: R }).fill({});
|
|
3817
|
+
}), O = p(() => ({
|
|
3819
3818
|
width: `${v.value.width}px`,
|
|
3820
|
-
height:
|
|
3821
|
-
opacity:
|
|
3822
|
-
})),
|
|
3823
|
-
const
|
|
3824
|
-
return !
|
|
3825
|
-
}),
|
|
3826
|
-
const { align:
|
|
3819
|
+
height: z.value ? "28px" : "0px",
|
|
3820
|
+
opacity: z.value ? 1 : 0
|
|
3821
|
+
})), k = () => (r.default?.()?.filter((R) => R.type?.name === "TableListColumn") || []).filter((R) => R.props?.hidden !== !0), x = () => k().filter((I) => {
|
|
3822
|
+
const R = Qe(I.props, "minTableWidth");
|
|
3823
|
+
return !R || v.value.width >= R;
|
|
3824
|
+
}), E = p(() => x().map((I) => {
|
|
3825
|
+
const { align: R = "left", label: F, width: J, sortable: f } = I.props || {}, S = Qe(I.props, "minTableWidth");
|
|
3827
3826
|
return {
|
|
3828
3827
|
label: F || "",
|
|
3829
|
-
align:
|
|
3828
|
+
align: R,
|
|
3830
3829
|
sortable: f,
|
|
3831
3830
|
width: J,
|
|
3832
|
-
minTableWidth:
|
|
3833
|
-
headerSlot:
|
|
3834
|
-
originalSortChangeHandler:
|
|
3831
|
+
minTableWidth: S,
|
|
3832
|
+
headerSlot: I.children?.header,
|
|
3833
|
+
originalSortChangeHandler: I.props?.onSortChange
|
|
3835
3834
|
};
|
|
3836
|
-
})),
|
|
3837
|
-
const { align:
|
|
3835
|
+
})), L = p(() => E.value.length + 1), Y = p(() => x().map((I) => {
|
|
3836
|
+
const { align: R = "left", width: F } = I.props || {}, J = Qe(I.props, "widthPercent"), f = Qe(I.props, "minWidth"), S = Qe(I.props, "minTableWidth");
|
|
3838
3837
|
return {
|
|
3839
|
-
prop:
|
|
3840
|
-
align:
|
|
3838
|
+
prop: I.props?.prop || "",
|
|
3839
|
+
align: R,
|
|
3841
3840
|
width: F,
|
|
3842
3841
|
widthPercent: J,
|
|
3843
3842
|
minWidth: f,
|
|
3844
|
-
minTableWidth:
|
|
3845
|
-
children:
|
|
3846
|
-
slotDefault:
|
|
3843
|
+
minTableWidth: S,
|
|
3844
|
+
children: I.children || {},
|
|
3845
|
+
slotDefault: I.children?.default
|
|
3847
3846
|
};
|
|
3848
|
-
})), X = (
|
|
3849
|
-
|
|
3850
|
-
J !==
|
|
3847
|
+
})), X = (W, I) => {
|
|
3848
|
+
s.value?.forEach((F, J) => {
|
|
3849
|
+
J !== W && F.resetSort();
|
|
3851
3850
|
});
|
|
3852
|
-
const
|
|
3853
|
-
|
|
3854
|
-
},
|
|
3855
|
-
|
|
3856
|
-
}, se = (
|
|
3857
|
-
|
|
3858
|
-
}, Q = (
|
|
3851
|
+
const R = E.value[W];
|
|
3852
|
+
R.originalSortChangeHandler && R.originalSortChangeHandler(I);
|
|
3853
|
+
}, D = (W) => {
|
|
3854
|
+
h.value.find((R) => R._index === W) ? (h.value = h.value.filter((R) => R._index !== W), a("update:selected-list", h.value), a("selected-change", h.value)) : (h.value.push({ ...i.dataList[W], _index: W }), a("update:selected-list", h.value), a("selected-change", h.value));
|
|
3855
|
+
}, se = (W) => {
|
|
3856
|
+
W === "all" ? (h.value = [], a("update:selected-list", []), a("selected-change", [])) : (h.value = i.dataList.map((I, R) => ({ ...I, _index: R })), a("update:selected-list", h.value), a("selected-change", h.value));
|
|
3857
|
+
}, Q = (W, I) => {
|
|
3859
3858
|
if (g.value) {
|
|
3860
|
-
|
|
3859
|
+
D(I);
|
|
3861
3860
|
return;
|
|
3862
3861
|
}
|
|
3863
|
-
|
|
3862
|
+
a("row-click", W);
|
|
3864
3863
|
}, te = () => {
|
|
3865
3864
|
g.value = !0;
|
|
3866
3865
|
}, pe = () => {
|
|
3867
|
-
g.value = !1,
|
|
3866
|
+
g.value = !1, h.value = [], a("select-close"), a("update:selected-list", []), a("selected-change", []);
|
|
3868
3867
|
};
|
|
3869
3868
|
t({
|
|
3870
3869
|
selectMode: g,
|
|
@@ -3872,118 +3871,118 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3872
3871
|
closeSelect: pe
|
|
3873
3872
|
});
|
|
3874
3873
|
let G = null;
|
|
3875
|
-
return
|
|
3876
|
-
|
|
3877
|
-
const
|
|
3878
|
-
v.value = { width:
|
|
3879
|
-
}), G.observe(
|
|
3874
|
+
return Ne(() => {
|
|
3875
|
+
o.value && (G = new ResizeObserver((W) => {
|
|
3876
|
+
const I = W[0], R = I.contentRect.width, F = I.contentRect.height;
|
|
3877
|
+
v.value = { width: R, height: F };
|
|
3878
|
+
}), G.observe(o.value));
|
|
3880
3879
|
}), Le(() => {
|
|
3881
3880
|
G && G.disconnect();
|
|
3882
|
-
}), (
|
|
3881
|
+
}), (W, I) => (u(), m("div", {
|
|
3883
3882
|
ref_key: "tableWrapperRef",
|
|
3884
|
-
ref:
|
|
3883
|
+
ref: o,
|
|
3885
3884
|
class: "table-wrapper"
|
|
3886
3885
|
}, [
|
|
3887
|
-
|
|
3886
|
+
C("div", {
|
|
3888
3887
|
class: "header-bg",
|
|
3889
3888
|
style: Z({ height: d.value })
|
|
3890
3889
|
}, null, 4),
|
|
3891
|
-
y.value ? (u(),
|
|
3890
|
+
y.value ? (u(), m("div", {
|
|
3892
3891
|
key: 0,
|
|
3893
3892
|
class: "initing-wrapper",
|
|
3894
3893
|
style: Z({ top: d.value, height: `calc(100% - ${d.value})` })
|
|
3895
3894
|
}, [
|
|
3896
|
-
|
|
3897
|
-
ne(U(
|
|
3895
|
+
C("div", bl, [
|
|
3896
|
+
ne(U(Vt), {
|
|
3898
3897
|
class: "loading-icon",
|
|
3899
3898
|
size: "20px",
|
|
3900
3899
|
color: "var(--stroke-base-secondary)"
|
|
3901
3900
|
}),
|
|
3902
|
-
|
|
3901
|
+
C("div", yl, _(U(he)("tableList.loading")), 1)
|
|
3903
3902
|
])
|
|
3904
|
-
], 4)) :
|
|
3903
|
+
], 4)) : j("", !0),
|
|
3905
3904
|
ne(st, { name: "table-list-operation" }, {
|
|
3906
3905
|
default: ve(() => [
|
|
3907
|
-
g.value ? (u(),
|
|
3906
|
+
g.value ? (u(), m("div", {
|
|
3908
3907
|
key: 0,
|
|
3909
3908
|
class: "opration-wrapper",
|
|
3910
3909
|
style: Z({ bottom: `calc(var(--spacing-8) + ${e.bottomPadding}px)` })
|
|
3911
3910
|
}, [
|
|
3912
|
-
|
|
3911
|
+
C("div", {
|
|
3913
3912
|
class: "operation-item",
|
|
3914
3913
|
hover: "bg-[--event-focus-secondary]",
|
|
3915
3914
|
onClick: pe
|
|
3916
3915
|
}, [
|
|
3917
3916
|
ne(U(Ut), { size: "16px" })
|
|
3918
3917
|
]),
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3918
|
+
I[0] || (I[0] = C("div", { class: "operation-divider" }, null, -1)),
|
|
3919
|
+
C("div", wl, [
|
|
3920
|
+
C("div", xl, _(h.value.length), 1),
|
|
3921
|
+
C("div", kl, _(U(he)("tableList.selected")), 1)
|
|
3923
3922
|
]),
|
|
3924
|
-
r.operation ? (u(),
|
|
3925
|
-
ae(
|
|
3926
|
-
], 4)) :
|
|
3923
|
+
r.operation ? (u(), m("div", $l)) : j("", !0),
|
|
3924
|
+
ae(W.$slots, "operation", {}, void 0, !0)
|
|
3925
|
+
], 4)) : j("", !0)
|
|
3927
3926
|
]),
|
|
3928
3927
|
_: 3
|
|
3929
3928
|
}),
|
|
3930
|
-
|
|
3929
|
+
C("div", {
|
|
3931
3930
|
ref_key: "tableContentRef",
|
|
3932
3931
|
ref: l,
|
|
3933
3932
|
class: "table-content-wrapper no-scroll-bar"
|
|
3934
3933
|
}, [
|
|
3935
|
-
(u(),
|
|
3934
|
+
(u(), m("table", {
|
|
3936
3935
|
key: c.value,
|
|
3937
3936
|
class: "cg-table w-full border-separate"
|
|
3938
3937
|
}, [
|
|
3939
|
-
|
|
3938
|
+
C("thead", {
|
|
3940
3939
|
style: Z({ height: d.value })
|
|
3941
3940
|
}, [
|
|
3942
|
-
|
|
3941
|
+
C("tr", null, [
|
|
3943
3942
|
ne($n, {
|
|
3944
3943
|
type: "select",
|
|
3945
3944
|
height: d.value,
|
|
3946
3945
|
"select-visible": g.value,
|
|
3947
|
-
"select-all-mode":
|
|
3946
|
+
"select-all-mode": h.value.length === 0 ? "none" : h.value.length === e.dataList.length ? "all" : "some",
|
|
3948
3947
|
onSelectAllMode: se
|
|
3949
3948
|
}, null, 8, ["height", "select-visible", "select-all-mode"]),
|
|
3950
|
-
(u(!0),
|
|
3949
|
+
(u(!0), m(ze, null, We(E.value, (R, F) => (u(), de($n, {
|
|
3951
3950
|
ref_for: !0,
|
|
3952
3951
|
ref_key: "headerCellRefs",
|
|
3953
|
-
ref:
|
|
3952
|
+
ref: s,
|
|
3954
3953
|
key: F,
|
|
3955
|
-
label:
|
|
3956
|
-
align:
|
|
3954
|
+
label: R.label,
|
|
3955
|
+
align: R.align,
|
|
3957
3956
|
height: d.value,
|
|
3958
|
-
width:
|
|
3959
|
-
sortable:
|
|
3957
|
+
width: R.width,
|
|
3958
|
+
sortable: R.sortable,
|
|
3960
3959
|
"select-mode": g.value,
|
|
3961
3960
|
onSortChange: (J) => X(Number(F), J)
|
|
3962
3961
|
}, on({ _: 2 }, [
|
|
3963
|
-
|
|
3962
|
+
R.headerSlot ? {
|
|
3964
3963
|
name: "default",
|
|
3965
3964
|
fn: ve(() => [
|
|
3966
|
-
(u(), de(it(() =>
|
|
3965
|
+
(u(), de(it(() => R.headerSlot({}))))
|
|
3967
3966
|
]),
|
|
3968
3967
|
key: "0"
|
|
3969
3968
|
} : void 0
|
|
3970
3969
|
]), 1032, ["label", "align", "height", "width", "sortable", "select-mode", "onSortChange"]))), 128))
|
|
3971
3970
|
])
|
|
3972
3971
|
], 4),
|
|
3973
|
-
e.dataList.length > 0 ? (u(),
|
|
3974
|
-
|
|
3972
|
+
e.dataList.length > 0 ? (u(), m("tbody", Sl, [
|
|
3973
|
+
C("tr", {
|
|
3975
3974
|
class: "loading-wrapper",
|
|
3976
|
-
style: Z(
|
|
3975
|
+
style: Z(O.value)
|
|
3977
3976
|
}, [
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3977
|
+
C("td", { colspan: L.value }, [
|
|
3978
|
+
C("div", Ol, [
|
|
3979
|
+
V.value ? (u(), m(ze, { key: 0 }, [
|
|
3981
3980
|
ne(U(la), {
|
|
3982
3981
|
size: "16px",
|
|
3983
3982
|
color: "var(--stroke-color-success)"
|
|
3984
3983
|
}),
|
|
3985
|
-
|
|
3986
|
-
], 64)) : (u(), de(U(
|
|
3984
|
+
C("span", Tl, _(U(he)("tableList.refreshed")), 1)
|
|
3985
|
+
], 64)) : (u(), de(U(Vt), {
|
|
3987
3986
|
key: 1,
|
|
3988
3987
|
class: "loading-icon",
|
|
3989
3988
|
size: "16px",
|
|
@@ -3992,21 +3991,21 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3992
3991
|
])
|
|
3993
3992
|
], 8, Cl)
|
|
3994
3993
|
], 4),
|
|
3995
|
-
(u(!0),
|
|
3994
|
+
(u(!0), m(ze, null, We(e.dataList, (R, F) => (u(), m("tr", {
|
|
3996
3995
|
key: F,
|
|
3997
3996
|
class: "table-row",
|
|
3998
|
-
onClick: (J) => Q(
|
|
3997
|
+
onClick: (J) => Q(R, F)
|
|
3999
3998
|
}, [
|
|
4000
3999
|
ne(mt, {
|
|
4001
4000
|
type: "select",
|
|
4002
4001
|
"select-visible": g.value,
|
|
4003
4002
|
index: F,
|
|
4004
4003
|
"column-height": e.columnHeight,
|
|
4005
|
-
data:
|
|
4006
|
-
selected:
|
|
4007
|
-
onSelectChange:
|
|
4004
|
+
data: R,
|
|
4005
|
+
selected: h.value.findIndex((J) => J._index === F) !== -1,
|
|
4006
|
+
onSelectChange: D
|
|
4008
4007
|
}, null, 8, ["select-visible", "index", "column-height", "data", "selected"]),
|
|
4009
|
-
(u(!0),
|
|
4008
|
+
(u(!0), m(ze, null, We(Y.value, (J, f) => (u(), de(mt, {
|
|
4010
4009
|
key: `${F}-${f}`,
|
|
4011
4010
|
index: F,
|
|
4012
4011
|
"column-height": e.columnHeight,
|
|
@@ -4015,18 +4014,18 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
4015
4014
|
width: J.width,
|
|
4016
4015
|
"width-percent": J.widthPercent,
|
|
4017
4016
|
"min-width": J.minWidth,
|
|
4018
|
-
data:
|
|
4017
|
+
data: R
|
|
4019
4018
|
}, on({ _: 2 }, [
|
|
4020
4019
|
J.slotDefault ? {
|
|
4021
4020
|
name: "default",
|
|
4022
|
-
fn: ve((
|
|
4023
|
-
(u(), de(it(() => J.slotDefault(
|
|
4021
|
+
fn: ve((S) => [
|
|
4022
|
+
(u(), de(it(() => J.slotDefault(S))))
|
|
4024
4023
|
]),
|
|
4025
4024
|
key: "0"
|
|
4026
4025
|
} : void 0
|
|
4027
4026
|
]), 1032, ["index", "column-height", "prop", "align", "width", "width-percent", "min-width", "data"]))), 128))
|
|
4028
4027
|
], 8, zl))), 128)),
|
|
4029
|
-
(u(!0),
|
|
4028
|
+
(u(!0), m(ze, null, We(A.value, (R, F) => (u(), m("tr", {
|
|
4030
4029
|
key: F + e.dataList.length
|
|
4031
4030
|
}, [
|
|
4032
4031
|
ne(mt, {
|
|
@@ -4036,40 +4035,40 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
4036
4035
|
"column-height": e.columnHeight,
|
|
4037
4036
|
blank: ""
|
|
4038
4037
|
}, null, 8, ["select-visible", "index", "column-height"]),
|
|
4039
|
-
(u(!0),
|
|
4038
|
+
(u(!0), m(ze, null, We(Y.value, (J, f) => (u(), de(mt, {
|
|
4040
4039
|
key: `${F + e.dataList.length}-${f}`,
|
|
4041
4040
|
index: F + e.dataList.length,
|
|
4042
4041
|
"column-height": e.columnHeight,
|
|
4043
4042
|
blank: ""
|
|
4044
4043
|
}, null, 8, ["index", "column-height"]))), 128))
|
|
4045
4044
|
]))), 128)),
|
|
4046
|
-
|
|
4045
|
+
A.value.length ? j("", !0) : (u(), m("div", {
|
|
4047
4046
|
key: 0,
|
|
4048
4047
|
class: "shrink-0",
|
|
4049
4048
|
style: Z({ height: `${e.bottomPadding}px` })
|
|
4050
4049
|
}, null, 4))
|
|
4051
|
-
])) :
|
|
4050
|
+
])) : j("", !0)
|
|
4052
4051
|
])),
|
|
4053
|
-
!e.loading && e.dataList.length === 0 ? (u(),
|
|
4054
|
-
|
|
4052
|
+
!e.loading && e.dataList.length === 0 ? (u(), m("div", El, [
|
|
4053
|
+
C("div", Rl, [
|
|
4055
4054
|
ne(U(oa), {
|
|
4056
4055
|
size: "40px",
|
|
4057
4056
|
color: "var(--text-base-quaternary)"
|
|
4058
4057
|
}),
|
|
4059
|
-
|
|
4058
|
+
C("div", Ll, _(U(he)("common.noData")), 1)
|
|
4060
4059
|
])
|
|
4061
|
-
])) : (u(),
|
|
4060
|
+
])) : (u(), m("div", Bl))
|
|
4062
4061
|
], 512)
|
|
4063
4062
|
], 512));
|
|
4064
4063
|
}
|
|
4065
|
-
}), to = /* @__PURE__ */ tn(
|
|
4064
|
+
}), to = /* @__PURE__ */ tn(Vl, [["__scopeId", "data-v-605185e2"]]);
|
|
4066
4065
|
export {
|
|
4067
4066
|
Zl as Badge,
|
|
4068
4067
|
He as Button,
|
|
4069
4068
|
Xl as Cascader,
|
|
4070
4069
|
qt as Checkbox,
|
|
4071
4070
|
Yn as Dialog,
|
|
4072
|
-
|
|
4071
|
+
Il as Divider,
|
|
4073
4072
|
zn as Input,
|
|
4074
4073
|
cn as Message,
|
|
4075
4074
|
_l as Notification,
|
|
@@ -4089,7 +4088,7 @@ export {
|
|
|
4089
4088
|
jl as TabPane,
|
|
4090
4089
|
to as TableList,
|
|
4091
4090
|
mt as TableListColumn,
|
|
4092
|
-
|
|
4091
|
+
Nl as Tabs,
|
|
4093
4092
|
Kl as Tag,
|
|
4094
4093
|
Jl as Timeline,
|
|
4095
4094
|
eo as TimelineItem,
|