@cregis/ui 0.2.1 → 0.2.3
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/es/cregis-ui.js +499 -490
- package/dist/index.css +1 -1
- package/dist/types/index.d.ts +10 -2
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/dist/umd/index.css +1 -1
- package/package.json +1 -1
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { EdsLoad as mr, EdsCloseCircleFill as gr, EdsWarningFill as hr, EdsSearch as
|
|
1
|
+
import { defineComponent as G, useSlots as ur, computed as m, createElementBlock as x, openBlock as h, createElementVNode as V, createCommentVNode as I, mergeProps as xe, createBlock as Le, resolveDynamicComponent as Ft, normalizeStyle as ie, renderSlot as q, normalizeClass as j, toDisplayString as M, unref as ne, ref as _, watch as J, withDirectives as je, vModelDynamic as dr, withModifiers as fr, vModelText as pr, createVNode as U, withCtx as Z, createTextVNode as $e, nextTick as Ke, reactive as Me, provide as Ht, toRef as vr, Fragment as lt, renderList as ct, inject as qt, onMounted as et, onUnmounted as Ee, onBeforeUnmount as Ut, Transition as vt, render as Qe, h as Yt, toHandlers as Et, vShow as mt } from "vue";
|
|
2
|
+
import { EdsLoad as mr, EdsCloseCircleFill as gr, EdsWarningFill as hr, EdsSearch as Xt, EdsArrowDownMiniIos as Kt, EdsArrowRightMiniIos as br } from "@cregis/icon";
|
|
3
3
|
const yr = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "cregis-button__icon-wrapper"
|
|
6
|
-
}, wr = ["disabled"], xr = ["disabled"], Or = ["disabled"],
|
|
6
|
+
}, wr = ["disabled"], xr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__ */ G({
|
|
7
7
|
name: "Button",
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "Button",
|
|
@@ -24,10 +24,10 @@ const yr = {
|
|
|
24
24
|
isActive: { type: Boolean }
|
|
25
25
|
},
|
|
26
26
|
setup(e) {
|
|
27
|
-
const t = e, r = ur(), n =
|
|
27
|
+
const t = e, r = ur(), n = m(() => {
|
|
28
28
|
const s = t, d = r.icon;
|
|
29
29
|
return !s.icon && typeof d == "function";
|
|
30
|
-
}), a =
|
|
30
|
+
}), a = m(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), i = m(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = m(() => t.width ? { width: t.width } : void 0), o = m(() => {
|
|
31
31
|
if (t.plain || t.text)
|
|
32
32
|
switch (t.type) {
|
|
33
33
|
case "primary":
|
|
@@ -44,7 +44,7 @@ const yr = {
|
|
|
44
44
|
else
|
|
45
45
|
return t.type === "secondary" ? "var(--material-foreground-base-secondary)" : t.type === "foreground" ? "var(--text-face-primary)" : t.type === "sameWhite" ? "var(--text-same-black)" : "var(--material-same-white)";
|
|
46
46
|
});
|
|
47
|
-
return (s, d) => e.icon || s.$slots.icon ? (
|
|
47
|
+
return (s, d) => e.icon || s.$slots.icon ? (h(), x("div", yr, [
|
|
48
48
|
V("button", xe(s.$attrs, {
|
|
49
49
|
class: ["cregis-button__icon", {
|
|
50
50
|
[`cregis-button__icon--${e.iconType}`]: e.iconType,
|
|
@@ -55,22 +55,22 @@ const yr = {
|
|
|
55
55
|
}],
|
|
56
56
|
disabled: e.disabled || e.loading
|
|
57
57
|
}), [
|
|
58
|
-
e.icon ? (
|
|
58
|
+
e.icon ? (h(), Le(Ft(e.icon), {
|
|
59
59
|
key: 0,
|
|
60
60
|
size: a.value
|
|
61
|
-
}, null, 8, ["size"])) : (
|
|
61
|
+
}, null, 8, ["size"])) : (h(), x("span", {
|
|
62
62
|
key: 1,
|
|
63
63
|
class: "cregis-button__icon-slot-inner",
|
|
64
|
-
style:
|
|
64
|
+
style: ie({ "--cregis-btn-icon-slot-size": a.value })
|
|
65
65
|
}, [
|
|
66
66
|
q(s.$slots, "icon")
|
|
67
67
|
], 4))
|
|
68
68
|
], 16, wr),
|
|
69
|
-
e.iconText ? (
|
|
69
|
+
e.iconText ? (h(), x("span", {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: j(["cregis-button__icon-text", { "is-disabled": e.disabled }])
|
|
72
72
|
}, M(e.iconText), 3)) : I("", !0)
|
|
73
|
-
])) : e.link ? (
|
|
73
|
+
])) : e.link ? (h(), x("button", xe({ key: 1 }, s.$attrs, {
|
|
74
74
|
class: ["cregis-button__link", {
|
|
75
75
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
76
76
|
[`cregis-button__link--${e.size}`]: e.size,
|
|
@@ -80,7 +80,7 @@ const yr = {
|
|
|
80
80
|
disabled: e.disabled || e.loading
|
|
81
81
|
}), [
|
|
82
82
|
q(s.$slots, "default")
|
|
83
|
-
], 16, xr)) : (
|
|
83
|
+
], 16, xr)) : (h(), x("button", xe({
|
|
84
84
|
key: 2,
|
|
85
85
|
ref: "buttonRef"
|
|
86
86
|
}, s.$attrs, {
|
|
@@ -98,7 +98,7 @@ const yr = {
|
|
|
98
98
|
}],
|
|
99
99
|
disabled: e.disabled || e.loading
|
|
100
100
|
}), [
|
|
101
|
-
e.loading ? (
|
|
101
|
+
e.loading ? (h(), Le(ne(mr), {
|
|
102
102
|
key: 0,
|
|
103
103
|
class: "loading",
|
|
104
104
|
size: i.value,
|
|
@@ -115,7 +115,7 @@ const yr = {
|
|
|
115
115
|
}, Sr = ["disabled", "placeholder", "rows"], Cr = {
|
|
116
116
|
key: 0,
|
|
117
117
|
class: "cregis-textarea__buttons"
|
|
118
|
-
},
|
|
118
|
+
}, Qt = /* @__PURE__ */ G({
|
|
119
119
|
name: "Input",
|
|
120
120
|
inheritAttrs: !1,
|
|
121
121
|
__name: "Input",
|
|
@@ -124,12 +124,14 @@ const yr = {
|
|
|
124
124
|
modelValue: {},
|
|
125
125
|
size: { default: "medium" },
|
|
126
126
|
width: { default: "300px" },
|
|
127
|
-
placeholder: { default: "
|
|
127
|
+
placeholder: { default: "" },
|
|
128
128
|
disabled: { type: Boolean },
|
|
129
129
|
clearable: { type: Boolean },
|
|
130
130
|
inputStyle: {},
|
|
131
131
|
unit: {},
|
|
132
|
-
rows: { default: 3 }
|
|
132
|
+
rows: { default: 3 },
|
|
133
|
+
pasteText: { default: "Paste" },
|
|
134
|
+
clearText: { default: "Clear" }
|
|
133
135
|
},
|
|
134
136
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
|
|
135
137
|
setup(e, { expose: t, emit: r }) {
|
|
@@ -143,24 +145,24 @@ const yr = {
|
|
|
143
145
|
const l = _(), o = _(0), s = _(!1);
|
|
144
146
|
let d = null;
|
|
145
147
|
const c = async () => {
|
|
146
|
-
await
|
|
148
|
+
await Ke(), l.value?.focus();
|
|
147
149
|
}, w = async () => {
|
|
148
|
-
a("update:modelValue", i.value), a("input", i.value), await
|
|
150
|
+
a("update:modelValue", i.value), a("input", i.value), await Ke(), C();
|
|
149
151
|
}, k = () => {
|
|
150
152
|
a("change", i.value);
|
|
151
153
|
}, v = (f) => {
|
|
152
154
|
s.value = !0, a("focus", f);
|
|
153
155
|
}, S = (f) => {
|
|
154
156
|
s.value = !1, a("blur", f);
|
|
155
|
-
}, O =
|
|
157
|
+
}, O = m(() => n.clearable && !n.disabled && !!i.value && s.value), $ = () => {
|
|
156
158
|
i.value = "", a("update:modelValue", ""), a("clear"), a("input", ""), a("change", "");
|
|
157
159
|
}, C = () => {
|
|
158
160
|
d && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
159
161
|
if (!l.value || l.value.tagName !== "INPUT") return;
|
|
160
|
-
const f = l.value,
|
|
161
|
-
u.style.position = "absolute", u.style.visibility = "hidden", u.style.whiteSpace = "pre", u.style.font = window.getComputedStyle(f).font, u.style.letterSpacing = window.getComputedStyle(f).letterSpacing, u.textContent =
|
|
162
|
+
const f = l.value, y = f.value, u = document.createElement("span");
|
|
163
|
+
u.style.position = "absolute", u.style.visibility = "hidden", u.style.whiteSpace = "pre", u.style.font = window.getComputedStyle(f).font, u.style.letterSpacing = window.getComputedStyle(f).letterSpacing, u.textContent = y || " ", document.body.appendChild(u), o.value = u.getBoundingClientRect().width, document.body.removeChild(u);
|
|
162
164
|
});
|
|
163
|
-
}, E =
|
|
165
|
+
}, E = m(() => {
|
|
164
166
|
const f = {};
|
|
165
167
|
return o.value > 0 && (f.position = "absolute", f.left = `${o.value + 16}px`), f;
|
|
166
168
|
}), R = async () => {
|
|
@@ -173,7 +175,7 @@ const yr = {
|
|
|
173
175
|
return t({
|
|
174
176
|
focus: c,
|
|
175
177
|
updateTextWidth: C
|
|
176
|
-
}), (f,
|
|
178
|
+
}), (f, y) => e.type !== "textarea" ? (h(), x("div", {
|
|
177
179
|
key: 0,
|
|
178
180
|
class: j(["cregis-input", {
|
|
179
181
|
[`cregis-input--${e.size}`]: e.size,
|
|
@@ -181,22 +183,23 @@ const yr = {
|
|
|
181
183
|
"is-prefix": f.$slots.prefix,
|
|
182
184
|
"is-suffix": f.$slots.suffix
|
|
183
185
|
}]),
|
|
184
|
-
style:
|
|
186
|
+
style: ie([{ width: e.width }, e.inputStyle])
|
|
185
187
|
}, [
|
|
186
188
|
V("div", {
|
|
187
189
|
class: j(["cregis-input__wrapper", { "is-focus": s.value }])
|
|
188
190
|
}, [
|
|
189
|
-
f.$slots.prefix ? (
|
|
191
|
+
f.$slots.prefix ? (h(), x("span", $r, [
|
|
190
192
|
q(f.$slots, "prefix")
|
|
191
193
|
])) : I("", !0),
|
|
192
|
-
|
|
194
|
+
je(V("input", xe({
|
|
193
195
|
class: "cregis-input__inner",
|
|
194
|
-
"onUpdate:modelValue":
|
|
196
|
+
"onUpdate:modelValue": y[0] || (y[0] = (u) => i.value = u),
|
|
195
197
|
ref_key: "inputRef",
|
|
196
198
|
ref: l,
|
|
197
199
|
type: e.type,
|
|
198
200
|
placeholder: e.placeholder
|
|
199
201
|
}, f.$attrs, {
|
|
202
|
+
spellcheck: "false",
|
|
200
203
|
disabled: e.disabled,
|
|
201
204
|
onInput: w,
|
|
202
205
|
onChange: k,
|
|
@@ -205,35 +208,36 @@ const yr = {
|
|
|
205
208
|
}), null, 16, kr), [
|
|
206
209
|
[dr, i.value]
|
|
207
210
|
]),
|
|
208
|
-
e.unit && i.value ? (
|
|
211
|
+
e.unit && i.value ? (h(), x("span", {
|
|
209
212
|
key: 1,
|
|
210
|
-
style:
|
|
213
|
+
style: ie(E.value),
|
|
211
214
|
class: "cregis-input__unit"
|
|
212
215
|
}, M(e.unit), 5)) : I("", !0),
|
|
213
|
-
f.$slots.suffix || O.value ? (
|
|
216
|
+
f.$slots.suffix || O.value ? (h(), x("span", Tr, [
|
|
214
217
|
q(f.$slots, "suffix"),
|
|
215
|
-
O.value ? (
|
|
218
|
+
O.value ? (h(), Le(Ye, {
|
|
216
219
|
key: 0,
|
|
217
|
-
icon:
|
|
220
|
+
icon: ne(gr),
|
|
218
221
|
"icon-type": "square",
|
|
219
222
|
onClick: $,
|
|
220
|
-
onMousedown:
|
|
223
|
+
onMousedown: y[1] || (y[1] = fr(() => {
|
|
221
224
|
}, ["prevent"]))
|
|
222
225
|
}, null, 8, ["icon"])) : I("", !0)
|
|
223
226
|
])) : I("", !0)
|
|
224
227
|
], 2)
|
|
225
|
-
], 6)) : (
|
|
228
|
+
], 6)) : (h(), x("div", {
|
|
226
229
|
key: 1,
|
|
227
230
|
class: j(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
228
|
-
style:
|
|
231
|
+
style: ie([{ width: e.width }, e.inputStyle])
|
|
229
232
|
}, [
|
|
230
|
-
|
|
233
|
+
je(V("textarea", xe({ class: "cregis-textarea__wrapper" }, f.$attrs, {
|
|
234
|
+
spellcheck: "false",
|
|
231
235
|
ref_key: "inputRef",
|
|
232
236
|
ref: l,
|
|
233
237
|
disabled: e.disabled,
|
|
234
238
|
placeholder: e.placeholder,
|
|
235
239
|
rows: e.rows,
|
|
236
|
-
"onUpdate:modelValue":
|
|
240
|
+
"onUpdate:modelValue": y[2] || (y[2] = (u) => i.value = u),
|
|
237
241
|
onInput: w,
|
|
238
242
|
onChange: k,
|
|
239
243
|
onFocus: v,
|
|
@@ -241,28 +245,28 @@ const yr = {
|
|
|
241
245
|
}), null, 16, Sr), [
|
|
242
246
|
[pr, i.value]
|
|
243
247
|
]),
|
|
244
|
-
e.disabled ? I("", !0) : (
|
|
245
|
-
U(
|
|
248
|
+
e.disabled ? I("", !0) : (h(), x("div", Cr, [
|
|
249
|
+
U(Ye, {
|
|
246
250
|
class: "cregis-textarea__button",
|
|
247
251
|
link: "",
|
|
248
252
|
size: "small",
|
|
249
253
|
onClick: R
|
|
250
254
|
}, {
|
|
251
|
-
default: Z(() => [
|
|
252
|
-
$e(
|
|
253
|
-
])
|
|
255
|
+
default: Z(() => [
|
|
256
|
+
$e(M(e.pasteText), 1)
|
|
257
|
+
]),
|
|
254
258
|
_: 1
|
|
255
259
|
}),
|
|
256
|
-
U(
|
|
260
|
+
U(Ye, {
|
|
257
261
|
class: "cregis-textarea__button",
|
|
258
262
|
link: "",
|
|
259
263
|
size: "small",
|
|
260
264
|
disabled: !i.value,
|
|
261
265
|
onClick: $
|
|
262
266
|
}, {
|
|
263
|
-
default: Z(() => [
|
|
264
|
-
$e(
|
|
265
|
-
])
|
|
267
|
+
default: Z(() => [
|
|
268
|
+
$e(M(e.clearText), 1)
|
|
269
|
+
]),
|
|
266
270
|
_: 1
|
|
267
271
|
}, 8, ["disabled"])
|
|
268
272
|
]))
|
|
@@ -273,13 +277,13 @@ const yr = {
|
|
|
273
277
|
"stroke-width": "1",
|
|
274
278
|
fill: "none",
|
|
275
279
|
"fill-rule": "evenodd"
|
|
276
|
-
}, Er = { transform: "translate(-394.000000, -457.000000)" }, Br = { transform: "translate(394.000000, 457.000000)" }, Ar = ["width", "height"], Rr = /* @__PURE__ */
|
|
280
|
+
}, Er = { transform: "translate(-394.000000, -457.000000)" }, Br = { transform: "translate(394.000000, 457.000000)" }, Ar = ["width", "height"], Rr = /* @__PURE__ */ G({
|
|
277
281
|
__name: "checked-basis",
|
|
278
282
|
props: {
|
|
279
283
|
size: { default: "16px" }
|
|
280
284
|
},
|
|
281
285
|
setup(e) {
|
|
282
|
-
return (t, r) => (
|
|
286
|
+
return (t, r) => (h(), x("svg", {
|
|
283
287
|
width: e.size,
|
|
284
288
|
height: e.size,
|
|
285
289
|
viewBox: "0 0 16 16",
|
|
@@ -309,7 +313,7 @@ const yr = {
|
|
|
309
313
|
}), Dr = {
|
|
310
314
|
key: 0,
|
|
311
315
|
class: "cregis-checkbox--indeterminate"
|
|
312
|
-
}, ei = /* @__PURE__ */
|
|
316
|
+
}, ei = /* @__PURE__ */ G({
|
|
313
317
|
name: "Checkbox",
|
|
314
318
|
__name: "Checkbox",
|
|
315
319
|
props: {
|
|
@@ -321,7 +325,7 @@ const yr = {
|
|
|
321
325
|
},
|
|
322
326
|
emits: ["update:modelValue", "change"],
|
|
323
327
|
setup(e, { emit: t }) {
|
|
324
|
-
const r = e, n = t, a =
|
|
328
|
+
const r = e, n = t, a = m(() => r.modelValue), i = () => {
|
|
325
329
|
r.disabled || n("update:modelValue", !a.value);
|
|
326
330
|
};
|
|
327
331
|
return J(
|
|
@@ -329,7 +333,7 @@ const yr = {
|
|
|
329
333
|
() => {
|
|
330
334
|
n("change", a.value);
|
|
331
335
|
}
|
|
332
|
-
), (l, o) => (
|
|
336
|
+
), (l, o) => (h(), x("div", {
|
|
333
337
|
class: "cregis-checkbox__wrapper",
|
|
334
338
|
onClick: i
|
|
335
339
|
}, [
|
|
@@ -341,12 +345,12 @@ const yr = {
|
|
|
341
345
|
"is-indeterminate": e.indeterminate
|
|
342
346
|
}])
|
|
343
347
|
}, [
|
|
344
|
-
e.indeterminate ? (
|
|
348
|
+
e.indeterminate ? (h(), x("div", Dr)) : (h(), Le(Rr, {
|
|
345
349
|
key: 1,
|
|
346
350
|
size: "10px"
|
|
347
351
|
}))
|
|
348
352
|
], 2),
|
|
349
|
-
l.$slots.default || e.label ? (
|
|
353
|
+
l.$slots.default || e.label ? (h(), x("span", {
|
|
350
354
|
key: 0,
|
|
351
355
|
class: j(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
352
356
|
}, [
|
|
@@ -356,7 +360,7 @@ const yr = {
|
|
|
356
360
|
], 2)) : I("", !0)
|
|
357
361
|
]));
|
|
358
362
|
}
|
|
359
|
-
}), ti = /* @__PURE__ */
|
|
363
|
+
}), ti = /* @__PURE__ */ G({
|
|
360
364
|
name: "Radio",
|
|
361
365
|
__name: "Radio",
|
|
362
366
|
props: {
|
|
@@ -367,10 +371,10 @@ const yr = {
|
|
|
367
371
|
},
|
|
368
372
|
emits: ["update:modelValue", "change"],
|
|
369
373
|
setup(e, { emit: t }) {
|
|
370
|
-
const r = e, n = t, a =
|
|
374
|
+
const r = e, n = t, a = m(() => r.modelValue === r.value), i = () => {
|
|
371
375
|
r.disabled || (n("update:modelValue", r.value), n("change", r.value));
|
|
372
376
|
};
|
|
373
|
-
return (l, o) => (
|
|
377
|
+
return (l, o) => (h(), x("div", {
|
|
374
378
|
class: "cregis-radio__wrapper",
|
|
375
379
|
onClick: i
|
|
376
380
|
}, [
|
|
@@ -382,7 +386,7 @@ const yr = {
|
|
|
382
386
|
}, [...o[0] || (o[0] = [
|
|
383
387
|
V("div", { class: "cregis-radio__inner" }, null, -1)
|
|
384
388
|
])], 2),
|
|
385
|
-
l.$slots.default || e.label ? (
|
|
389
|
+
l.$slots.default || e.label ? (h(), x("span", {
|
|
386
390
|
key: 0,
|
|
387
391
|
class: j(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
388
392
|
}, [
|
|
@@ -392,7 +396,7 @@ const yr = {
|
|
|
392
396
|
], 2)) : I("", !0)
|
|
393
397
|
]));
|
|
394
398
|
}
|
|
395
|
-
}), ri = /* @__PURE__ */
|
|
399
|
+
}), ri = /* @__PURE__ */ G({
|
|
396
400
|
name: "Divider",
|
|
397
401
|
__name: "Divider",
|
|
398
402
|
props: {
|
|
@@ -404,13 +408,13 @@ const yr = {
|
|
|
404
408
|
length: {}
|
|
405
409
|
},
|
|
406
410
|
setup(e) {
|
|
407
|
-
const t = e, r =
|
|
411
|
+
const t = e, r = m(() => {
|
|
408
412
|
if (Array.isArray(t.margin)) {
|
|
409
413
|
const [a, i] = t.margin;
|
|
410
414
|
return t.direction === "horizontal" ? `${a} 0 ${i} 0` : `0 ${i} 0 ${a}`;
|
|
411
415
|
} else
|
|
412
416
|
return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
|
|
413
|
-
}), n =
|
|
417
|
+
}), n = m(() => t.direction === "horizontal" ? {
|
|
414
418
|
width: t.length || "100%",
|
|
415
419
|
borderTopWidth: t.lineThickness,
|
|
416
420
|
borderTopStyle: t.borderStyle,
|
|
@@ -423,14 +427,14 @@ const yr = {
|
|
|
423
427
|
borderLeftColor: t.color,
|
|
424
428
|
margin: r.value
|
|
425
429
|
});
|
|
426
|
-
return (a, i) => (
|
|
430
|
+
return (a, i) => (h(), x("div", {
|
|
427
431
|
class: j(["cregis-divider", {
|
|
428
432
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
429
433
|
}]),
|
|
430
|
-
style:
|
|
434
|
+
style: ie(n.value)
|
|
431
435
|
}, null, 6));
|
|
432
436
|
}
|
|
433
|
-
}),
|
|
437
|
+
}), Gt = Symbol("TABS_KEY"), zr = ["onClick"], Wr = { style: { display: "none" } }, ai = /* @__PURE__ */ G({
|
|
434
438
|
name: "Tabs",
|
|
435
439
|
__name: "Tabs",
|
|
436
440
|
props: {
|
|
@@ -440,12 +444,12 @@ const yr = {
|
|
|
440
444
|
},
|
|
441
445
|
emits: ["update:modelValue"],
|
|
442
446
|
setup(e) {
|
|
443
|
-
const t = e, r =
|
|
447
|
+
const t = e, r = Me([]), n = (l) => {
|
|
444
448
|
r.some((o) => o.name === l.name) || r.push(l);
|
|
445
449
|
}, a = (l) => {
|
|
446
450
|
const o = r.findIndex((s) => s.name === l);
|
|
447
451
|
o !== -1 && r.splice(o, 1);
|
|
448
|
-
}, i =
|
|
452
|
+
}, i = m(() => t.type === "card" ? t.size === "large" ? {
|
|
449
453
|
borderRadius: "13px"
|
|
450
454
|
} : t.size === "medium" ? {
|
|
451
455
|
borderRadius: "11px"
|
|
@@ -454,20 +458,20 @@ const yr = {
|
|
|
454
458
|
} : {
|
|
455
459
|
borderRadius: 0
|
|
456
460
|
});
|
|
457
|
-
return
|
|
461
|
+
return Ht(Gt, {
|
|
458
462
|
activeName: vr(t, "modelValue"),
|
|
459
463
|
registerTab: n,
|
|
460
464
|
unregisterTab: a
|
|
461
|
-
}), (l, o) => (
|
|
465
|
+
}), (l, o) => (h(), x("div", {
|
|
462
466
|
class: j(["cregis-tabs", {
|
|
463
467
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
464
468
|
[`cregis-tabs--${e.size}`]: e.size
|
|
465
469
|
}])
|
|
466
470
|
}, [
|
|
467
|
-
(
|
|
471
|
+
(h(!0), x(lt, null, ct(r, (s) => (h(), x("div", {
|
|
468
472
|
key: s.name,
|
|
469
473
|
class: j(["cregis-tabs__item", { "is-active": e.modelValue === s.name }]),
|
|
470
|
-
style:
|
|
474
|
+
style: ie(i.value),
|
|
471
475
|
onClick: (d) => l.$emit("update:modelValue", s.name)
|
|
472
476
|
}, [
|
|
473
477
|
V("span", null, M(s.label), 1)
|
|
@@ -477,7 +481,7 @@ const yr = {
|
|
|
477
481
|
])
|
|
478
482
|
], 2));
|
|
479
483
|
}
|
|
480
|
-
}), ni = /* @__PURE__ */
|
|
484
|
+
}), ni = /* @__PURE__ */ G({
|
|
481
485
|
name: "TabPane",
|
|
482
486
|
__name: "TabPane",
|
|
483
487
|
props: {
|
|
@@ -485,9 +489,9 @@ const yr = {
|
|
|
485
489
|
name: {}
|
|
486
490
|
},
|
|
487
491
|
setup(e) {
|
|
488
|
-
const t = e, r =
|
|
492
|
+
const t = e, r = qt(Gt);
|
|
489
493
|
if (!r) throw new Error("TabPane must be used within Tabs");
|
|
490
|
-
return
|
|
494
|
+
return et(() => {
|
|
491
495
|
r.registerTab({ label: t.label, name: t.name });
|
|
492
496
|
}), J(
|
|
493
497
|
() => t.label,
|
|
@@ -503,7 +507,7 @@ const yr = {
|
|
|
503
507
|
class: "cregis-message",
|
|
504
508
|
role: "status",
|
|
505
509
|
"aria-live": "polite"
|
|
506
|
-
}, Mr = /* @__PURE__ */
|
|
510
|
+
}, Mr = /* @__PURE__ */ G({
|
|
507
511
|
name: "Message",
|
|
508
512
|
__name: "Message",
|
|
509
513
|
props: {
|
|
@@ -521,25 +525,25 @@ const yr = {
|
|
|
521
525
|
}, i = () => {
|
|
522
526
|
t.onVanish?.();
|
|
523
527
|
};
|
|
524
|
-
return
|
|
528
|
+
return Ut(() => {
|
|
525
529
|
n !== void 0 && clearTimeout(n);
|
|
526
|
-
}),
|
|
530
|
+
}), Ke(() => {
|
|
527
531
|
r.value = !0;
|
|
528
|
-
}), (l, o) => (
|
|
529
|
-
U(
|
|
532
|
+
}), (l, o) => (h(), x("div", Lr, [
|
|
533
|
+
U(vt, {
|
|
530
534
|
name: "cregis-message",
|
|
531
535
|
onAfterEnter: a,
|
|
532
536
|
onAfterLeave: i
|
|
533
537
|
}, {
|
|
534
538
|
default: Z(() => [
|
|
535
|
-
r.value ? (
|
|
539
|
+
r.value ? (h(), x("div", jr, M(e.message), 1)) : I("", !0)
|
|
536
540
|
]),
|
|
537
541
|
_: 1
|
|
538
542
|
})
|
|
539
543
|
]));
|
|
540
544
|
}
|
|
541
545
|
});
|
|
542
|
-
let
|
|
546
|
+
let it = !1;
|
|
543
547
|
function _r(e) {
|
|
544
548
|
return typeof e == "string" ? { message: e, duration: 1e3 } : {
|
|
545
549
|
message: e.message,
|
|
@@ -547,16 +551,16 @@ function _r(e) {
|
|
|
547
551
|
};
|
|
548
552
|
}
|
|
549
553
|
function ii(e) {
|
|
550
|
-
if (
|
|
554
|
+
if (it) return;
|
|
551
555
|
const { message: t, duration: r } = _r(e);
|
|
552
|
-
|
|
556
|
+
it = !0;
|
|
553
557
|
const n = document.createElement("div");
|
|
554
|
-
document.body.appendChild(n),
|
|
555
|
-
|
|
558
|
+
document.body.appendChild(n), Qe(
|
|
559
|
+
Yt(Mr, {
|
|
556
560
|
message: t,
|
|
557
561
|
duration: r,
|
|
558
562
|
onVanish: () => {
|
|
559
|
-
|
|
563
|
+
it = !1, Qe(null, n), n.remove();
|
|
560
564
|
}
|
|
561
565
|
}),
|
|
562
566
|
n
|
|
@@ -567,7 +571,7 @@ const Ir = { class: "cregis-notification__wrapper" }, Nr = {
|
|
|
567
571
|
class: "cregis-notification",
|
|
568
572
|
role: "status",
|
|
569
573
|
"aria-live": "polite"
|
|
570
|
-
}, Fr = { class: "cregis-notification__content" }, Hr = { class: "cregis-notification__title" }, qr = { class: "cregis-notification__message" }, Ur = /* @__PURE__ */
|
|
574
|
+
}, Fr = { class: "cregis-notification__content" }, Hr = { class: "cregis-notification__title" }, qr = { class: "cregis-notification__message" }, Ur = /* @__PURE__ */ G({
|
|
571
575
|
name: "Notification",
|
|
572
576
|
__name: "Notification",
|
|
573
577
|
props: {
|
|
@@ -583,17 +587,17 @@ const Ir = { class: "cregis-notification__wrapper" }, Nr = {
|
|
|
583
587
|
}, a = () => {
|
|
584
588
|
t.onVanish?.();
|
|
585
589
|
};
|
|
586
|
-
return
|
|
587
|
-
}),
|
|
590
|
+
return Ut(() => {
|
|
591
|
+
}), Ke(() => {
|
|
588
592
|
r.value = !0;
|
|
589
|
-
}), (i, l) => (
|
|
590
|
-
U(
|
|
593
|
+
}), (i, l) => (h(), x("div", Ir, [
|
|
594
|
+
U(vt, {
|
|
591
595
|
name: "cregis-notification",
|
|
592
596
|
onAfterLeave: a
|
|
593
597
|
}, {
|
|
594
598
|
default: Z(() => [
|
|
595
|
-
r.value ? (
|
|
596
|
-
(
|
|
599
|
+
r.value ? (h(), x("div", Nr, [
|
|
600
|
+
(h(), Le(Ft(ne(hr)), {
|
|
597
601
|
size: "18px",
|
|
598
602
|
color: "var(--material-vibrant-error-primary)"
|
|
599
603
|
})),
|
|
@@ -601,7 +605,7 @@ const Ir = { class: "cregis-notification__wrapper" }, Nr = {
|
|
|
601
605
|
V("div", Hr, M(e.title), 1),
|
|
602
606
|
V("div", qr, M(e.message), 1)
|
|
603
607
|
]),
|
|
604
|
-
U(
|
|
608
|
+
U(Ye, {
|
|
605
609
|
type: "sameWhite",
|
|
606
610
|
onClick: n
|
|
607
611
|
}, {
|
|
@@ -617,29 +621,29 @@ const Ir = { class: "cregis-notification__wrapper" }, Nr = {
|
|
|
617
621
|
]));
|
|
618
622
|
}
|
|
619
623
|
});
|
|
620
|
-
let
|
|
624
|
+
let ot = !1;
|
|
621
625
|
function oi(e) {
|
|
622
|
-
if (
|
|
626
|
+
if (ot) return;
|
|
623
627
|
const { title: t, message: r, type: n, btnText: a } = e;
|
|
624
|
-
|
|
628
|
+
ot = !0;
|
|
625
629
|
const i = document.createElement("div");
|
|
626
|
-
document.body.appendChild(i),
|
|
627
|
-
|
|
630
|
+
document.body.appendChild(i), Qe(
|
|
631
|
+
Yt(Ur, {
|
|
628
632
|
title: t,
|
|
629
633
|
message: r,
|
|
630
634
|
type: n,
|
|
631
635
|
btnText: a,
|
|
632
636
|
onVanish: () => {
|
|
633
|
-
|
|
637
|
+
ot = !1, Qe(null, i), i.remove();
|
|
634
638
|
}
|
|
635
639
|
}),
|
|
636
640
|
i
|
|
637
641
|
);
|
|
638
642
|
}
|
|
639
|
-
const
|
|
643
|
+
const Yr = { class: "cregis-progress__wrapper" }, Xr = { class: "cregis-progress__track-wrap" }, Kr = { class: "cregis-progress cregis-progress--striped active" }, Qr = {
|
|
640
644
|
key: 0,
|
|
641
645
|
class: "cregis-progress__sliding-block"
|
|
642
|
-
}, si = /* @__PURE__ */
|
|
646
|
+
}, si = /* @__PURE__ */ G({
|
|
643
647
|
name: "Progress",
|
|
644
648
|
__name: "Progress",
|
|
645
649
|
props: {
|
|
@@ -648,37 +652,37 @@ const Xr = { class: "cregis-progress__wrapper" }, Yr = { class: "cregis-progress
|
|
|
648
652
|
showPercentage: { type: Boolean, default: !0 }
|
|
649
653
|
},
|
|
650
654
|
setup(e) {
|
|
651
|
-
const t = e, r =
|
|
655
|
+
const t = e, r = m(() => Math.min(100, Math.max(0, t.percentage - 1))), n = m(() => ({
|
|
652
656
|
width: `${t.percentage}%`,
|
|
653
657
|
height: `${t.strokeWidth}px`
|
|
654
|
-
})), a =
|
|
658
|
+
})), a = m(() => ({
|
|
655
659
|
"--cregis-progress-tip-left": `${r.value}%`
|
|
656
|
-
})), i =
|
|
657
|
-
return (l, o) => (
|
|
658
|
-
V("div",
|
|
659
|
-
e.showPercentage && t.percentage > 0 ? (
|
|
660
|
+
})), i = m(() => `${Math.round(t.percentage)}%`);
|
|
661
|
+
return (l, o) => (h(), x("div", Yr, [
|
|
662
|
+
V("div", Xr, [
|
|
663
|
+
e.showPercentage && t.percentage > 0 ? (h(), x("div", {
|
|
660
664
|
key: 0,
|
|
661
665
|
class: "cregis-progress__tip",
|
|
662
|
-
style:
|
|
666
|
+
style: ie(a.value),
|
|
663
667
|
"aria-live": "polite"
|
|
664
668
|
}, M(i.value), 5)) : I("", !0),
|
|
665
669
|
V("div", Kr, [
|
|
666
670
|
V("div", {
|
|
667
671
|
class: "cregis-progress__bar",
|
|
668
|
-
style:
|
|
672
|
+
style: ie(n.value)
|
|
669
673
|
}, null, 4),
|
|
670
|
-
t.percentage === 0 ? (
|
|
674
|
+
t.percentage === 0 ? (h(), x("div", Qr)) : I("", !0)
|
|
671
675
|
])
|
|
672
676
|
])
|
|
673
677
|
]));
|
|
674
678
|
}
|
|
675
679
|
});
|
|
676
|
-
var ee = "top",
|
|
677
|
-
return e.concat([t + "-" + Se, t + "-" +
|
|
678
|
-
}, []),
|
|
679
|
-
return e.concat([t, t + "-" + Se, t + "-" +
|
|
680
|
+
var ee = "top", se = "bottom", le = "right", te = "left", gt = "auto", Ne = [ee, se, le, te], Se = "start", _e = "end", Gr = "clippingParents", Zt = "viewport", Re = "popper", Zr = "reference", Bt = /* @__PURE__ */ Ne.reduce(function(e, t) {
|
|
681
|
+
return e.concat([t + "-" + Se, t + "-" + _e]);
|
|
682
|
+
}, []), Jt = /* @__PURE__ */ [].concat(Ne, [gt]).reduce(function(e, t) {
|
|
683
|
+
return e.concat([t, t + "-" + Se, t + "-" + _e]);
|
|
680
684
|
}, []), Jr = "beforeRead", ea = "read", ta = "afterRead", ra = "beforeMain", aa = "main", na = "afterMain", ia = "beforeWrite", oa = "write", sa = "afterWrite", la = [Jr, ea, ta, ra, aa, na, ia, oa, sa];
|
|
681
|
-
function
|
|
685
|
+
function ve(e) {
|
|
682
686
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
683
687
|
}
|
|
684
688
|
function re(e) {
|
|
@@ -694,11 +698,11 @@ function ke(e) {
|
|
|
694
698
|
var t = re(e).Element;
|
|
695
699
|
return e instanceof t || e instanceof Element;
|
|
696
700
|
}
|
|
697
|
-
function
|
|
701
|
+
function oe(e) {
|
|
698
702
|
var t = re(e).HTMLElement;
|
|
699
703
|
return e instanceof t || e instanceof HTMLElement;
|
|
700
704
|
}
|
|
701
|
-
function
|
|
705
|
+
function ht(e) {
|
|
702
706
|
if (typeof ShadowRoot > "u")
|
|
703
707
|
return !1;
|
|
704
708
|
var t = re(e).ShadowRoot;
|
|
@@ -708,7 +712,7 @@ function ca(e) {
|
|
|
708
712
|
var t = e.state;
|
|
709
713
|
Object.keys(t.elements).forEach(function(r) {
|
|
710
714
|
var n = t.styles[r] || {}, a = t.attributes[r] || {}, i = t.elements[r];
|
|
711
|
-
!
|
|
715
|
+
!oe(i) || !ve(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(l) {
|
|
712
716
|
var o = a[l];
|
|
713
717
|
o === !1 ? i.removeAttribute(l) : i.setAttribute(l, o === !0 ? "" : o);
|
|
714
718
|
}));
|
|
@@ -732,7 +736,7 @@ function ua(e) {
|
|
|
732
736
|
var a = t.elements[n], i = t.attributes[n] || {}, l = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), o = l.reduce(function(s, d) {
|
|
733
737
|
return s[d] = "", s;
|
|
734
738
|
}, {});
|
|
735
|
-
!
|
|
739
|
+
!oe(a) || !ve(a) || (Object.assign(a.style, o), Object.keys(i).forEach(function(s) {
|
|
736
740
|
a.removeAttribute(s);
|
|
737
741
|
}));
|
|
738
742
|
});
|
|
@@ -746,24 +750,24 @@ const da = {
|
|
|
746
750
|
effect: ua,
|
|
747
751
|
requires: ["computeStyles"]
|
|
748
752
|
};
|
|
749
|
-
function
|
|
753
|
+
function pe(e) {
|
|
750
754
|
return e.split("-")[0];
|
|
751
755
|
}
|
|
752
|
-
var Oe = Math.max,
|
|
753
|
-
function
|
|
756
|
+
var Oe = Math.max, Ge = Math.min, Ce = Math.round;
|
|
757
|
+
function ut() {
|
|
754
758
|
var e = navigator.userAgentData;
|
|
755
759
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
756
760
|
return t.brand + "/" + t.version;
|
|
757
761
|
}).join(" ") : navigator.userAgent;
|
|
758
762
|
}
|
|
759
|
-
function
|
|
760
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
763
|
+
function er() {
|
|
764
|
+
return !/^((?!chrome|android).)*safari/i.test(ut());
|
|
761
765
|
}
|
|
762
766
|
function Pe(e, t, r) {
|
|
763
767
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
764
768
|
var n = e.getBoundingClientRect(), a = 1, i = 1;
|
|
765
|
-
t &&
|
|
766
|
-
var l = ke(e) ? re(e) : window, o = l.visualViewport, s = !
|
|
769
|
+
t && oe(e) && (a = e.offsetWidth > 0 && Ce(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && Ce(n.height) / e.offsetHeight || 1);
|
|
770
|
+
var l = ke(e) ? re(e) : window, o = l.visualViewport, s = !er() && r, d = (n.left + (s && o ? o.offsetLeft : 0)) / a, c = (n.top + (s && o ? o.offsetTop : 0)) / i, w = n.width / a, k = n.height / i;
|
|
767
771
|
return {
|
|
768
772
|
width: w,
|
|
769
773
|
height: k,
|
|
@@ -775,7 +779,7 @@ function Pe(e, t, r) {
|
|
|
775
779
|
y: c
|
|
776
780
|
};
|
|
777
781
|
}
|
|
778
|
-
function
|
|
782
|
+
function bt(e) {
|
|
779
783
|
var t = Pe(e), r = e.offsetWidth, n = e.offsetHeight;
|
|
780
784
|
return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
|
|
781
785
|
x: e.offsetLeft,
|
|
@@ -784,11 +788,11 @@ function ht(e) {
|
|
|
784
788
|
height: n
|
|
785
789
|
};
|
|
786
790
|
}
|
|
787
|
-
function
|
|
791
|
+
function tr(e, t) {
|
|
788
792
|
var r = t.getRootNode && t.getRootNode();
|
|
789
793
|
if (e.contains(t))
|
|
790
794
|
return !0;
|
|
791
|
-
if (r &&
|
|
795
|
+
if (r && ht(r)) {
|
|
792
796
|
var n = t;
|
|
793
797
|
do {
|
|
794
798
|
if (n && e.isSameNode(n))
|
|
@@ -802,7 +806,7 @@ function ge(e) {
|
|
|
802
806
|
return re(e).getComputedStyle(e);
|
|
803
807
|
}
|
|
804
808
|
function fa(e) {
|
|
805
|
-
return ["table", "td", "th"].indexOf(
|
|
809
|
+
return ["table", "td", "th"].indexOf(ve(e)) >= 0;
|
|
806
810
|
}
|
|
807
811
|
function be(e) {
|
|
808
812
|
return ((ke(e) ? e.ownerDocument : (
|
|
@@ -810,31 +814,31 @@ function be(e) {
|
|
|
810
814
|
e.document
|
|
811
815
|
)) || window.document).documentElement;
|
|
812
816
|
}
|
|
813
|
-
function
|
|
814
|
-
return
|
|
817
|
+
function tt(e) {
|
|
818
|
+
return ve(e) === "html" ? e : (
|
|
815
819
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
816
820
|
// $FlowFixMe[incompatible-return]
|
|
817
821
|
// $FlowFixMe[prop-missing]
|
|
818
822
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
819
823
|
e.parentNode || // DOM Element detected
|
|
820
|
-
(
|
|
824
|
+
(ht(e) ? e.host : null) || // ShadowRoot detected
|
|
821
825
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
822
826
|
be(e)
|
|
823
827
|
);
|
|
824
828
|
}
|
|
825
|
-
function
|
|
826
|
-
return !
|
|
829
|
+
function At(e) {
|
|
830
|
+
return !oe(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
827
831
|
ge(e).position === "fixed" ? null : e.offsetParent;
|
|
828
832
|
}
|
|
829
833
|
function pa(e) {
|
|
830
|
-
var t = /firefox/i.test(
|
|
831
|
-
if (r &&
|
|
834
|
+
var t = /firefox/i.test(ut()), r = /Trident/i.test(ut());
|
|
835
|
+
if (r && oe(e)) {
|
|
832
836
|
var n = ge(e);
|
|
833
837
|
if (n.position === "fixed")
|
|
834
838
|
return null;
|
|
835
839
|
}
|
|
836
|
-
var a =
|
|
837
|
-
for (
|
|
840
|
+
var a = tt(e);
|
|
841
|
+
for (ht(a) && (a = a.host); oe(a) && ["html", "body"].indexOf(ve(a)) < 0; ) {
|
|
838
842
|
var i = ge(a);
|
|
839
843
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
|
|
840
844
|
return a;
|
|
@@ -842,22 +846,22 @@ function pa(e) {
|
|
|
842
846
|
}
|
|
843
847
|
return null;
|
|
844
848
|
}
|
|
845
|
-
function
|
|
846
|
-
for (var t = re(e), r =
|
|
847
|
-
r =
|
|
848
|
-
return r && (
|
|
849
|
+
function Fe(e) {
|
|
850
|
+
for (var t = re(e), r = At(e); r && fa(r) && ge(r).position === "static"; )
|
|
851
|
+
r = At(r);
|
|
852
|
+
return r && (ve(r) === "html" || ve(r) === "body" && ge(r).position === "static") ? t : r || pa(e) || t;
|
|
849
853
|
}
|
|
850
|
-
function
|
|
854
|
+
function yt(e) {
|
|
851
855
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
852
856
|
}
|
|
853
|
-
function
|
|
854
|
-
return Oe(e,
|
|
857
|
+
function ze(e, t, r) {
|
|
858
|
+
return Oe(e, Ge(t, r));
|
|
855
859
|
}
|
|
856
860
|
function va(e, t, r) {
|
|
857
|
-
var n =
|
|
861
|
+
var n = ze(e, t, r);
|
|
858
862
|
return n > r ? r : n;
|
|
859
863
|
}
|
|
860
|
-
function
|
|
864
|
+
function rr() {
|
|
861
865
|
return {
|
|
862
866
|
top: 0,
|
|
863
867
|
right: 0,
|
|
@@ -865,10 +869,10 @@ function er() {
|
|
|
865
869
|
left: 0
|
|
866
870
|
};
|
|
867
871
|
}
|
|
868
|
-
function
|
|
869
|
-
return Object.assign({},
|
|
872
|
+
function ar(e) {
|
|
873
|
+
return Object.assign({}, rr(), e);
|
|
870
874
|
}
|
|
871
|
-
function
|
|
875
|
+
function nr(e, t) {
|
|
872
876
|
return t.reduce(function(r, n) {
|
|
873
877
|
return r[n] = e, r;
|
|
874
878
|
}, {});
|
|
@@ -876,18 +880,18 @@ function rr(e, t) {
|
|
|
876
880
|
var ma = function(t, r) {
|
|
877
881
|
return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
|
|
878
882
|
placement: r.placement
|
|
879
|
-
})) : t,
|
|
883
|
+
})) : t, ar(typeof t != "number" ? t : nr(t, Ne));
|
|
880
884
|
};
|
|
881
885
|
function ga(e) {
|
|
882
|
-
var t, r = e.state, n = e.name, a = e.options, i = r.elements.arrow, l = r.modifiersData.popperOffsets, o =
|
|
886
|
+
var t, r = e.state, n = e.name, a = e.options, i = r.elements.arrow, l = r.modifiersData.popperOffsets, o = pe(r.placement), s = yt(o), d = [te, le].indexOf(o) >= 0, c = d ? "height" : "width";
|
|
883
887
|
if (!(!i || !l)) {
|
|
884
|
-
var w = ma(a.padding, r), k =
|
|
888
|
+
var w = ma(a.padding, r), k = bt(i), v = s === "y" ? ee : te, S = s === "y" ? se : le, O = r.rects.reference[c] + r.rects.reference[s] - l[s] - r.rects.popper[c], $ = l[s] - r.rects.reference[s], C = Fe(i), E = C ? s === "y" ? C.clientHeight || 0 : C.clientWidth || 0 : 0, R = O / 2 - $ / 2, f = w[v], y = E - k[c] - w[S], u = E / 2 - k[c] / 2 + R, T = ze(f, u, y), B = s;
|
|
885
889
|
r.modifiersData[n] = (t = {}, t[B] = T, t.centerOffset = T - u, t);
|
|
886
890
|
}
|
|
887
891
|
}
|
|
888
892
|
function ha(e) {
|
|
889
893
|
var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
|
|
890
|
-
a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) ||
|
|
894
|
+
a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || tr(t.elements.popper, a) && (t.elements.arrow = a));
|
|
891
895
|
}
|
|
892
896
|
const ba = {
|
|
893
897
|
name: "arrow",
|
|
@@ -914,7 +918,7 @@ function wa(e, t) {
|
|
|
914
918
|
y: Ce(n * a) / a || 0
|
|
915
919
|
};
|
|
916
920
|
}
|
|
917
|
-
function
|
|
921
|
+
function Rt(e) {
|
|
918
922
|
var t, r = e.popper, n = e.popperRect, a = e.placement, i = e.variation, l = e.offsets, o = e.position, s = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, w = e.isFixed, k = l.x, v = k === void 0 ? 0 : k, S = l.y, O = S === void 0 ? 0 : S, $ = typeof c == "function" ? c({
|
|
919
923
|
x: v,
|
|
920
924
|
y: O
|
|
@@ -923,27 +927,27 @@ function Bt(e) {
|
|
|
923
927
|
y: O
|
|
924
928
|
};
|
|
925
929
|
v = $.x, O = $.y;
|
|
926
|
-
var C = l.hasOwnProperty("x"), E = l.hasOwnProperty("y"), R = te, f = ee,
|
|
930
|
+
var C = l.hasOwnProperty("x"), E = l.hasOwnProperty("y"), R = te, f = ee, y = window;
|
|
927
931
|
if (d) {
|
|
928
|
-
var u =
|
|
929
|
-
if (u === re(r) && (u = be(r), ge(u).position !== "static" && o === "absolute" && (T = "scrollHeight", B = "scrollWidth")), u = u, a === ee || (a === te || a ===
|
|
930
|
-
f =
|
|
931
|
-
var D = w && u ===
|
|
932
|
+
var u = Fe(r), T = "clientHeight", B = "clientWidth";
|
|
933
|
+
if (u === re(r) && (u = be(r), ge(u).position !== "static" && o === "absolute" && (T = "scrollHeight", B = "scrollWidth")), u = u, a === ee || (a === te || a === le) && i === _e) {
|
|
934
|
+
f = se;
|
|
935
|
+
var D = w && u === y && y.visualViewport ? y.visualViewport.height : (
|
|
932
936
|
// $FlowFixMe[prop-missing]
|
|
933
937
|
u[T]
|
|
934
938
|
);
|
|
935
939
|
O -= D - n.height, O *= s ? 1 : -1;
|
|
936
940
|
}
|
|
937
|
-
if (a === te || (a === ee || a ===
|
|
938
|
-
R =
|
|
939
|
-
var W = w && u ===
|
|
941
|
+
if (a === te || (a === ee || a === se) && i === _e) {
|
|
942
|
+
R = le;
|
|
943
|
+
var W = w && u === y && y.visualViewport ? y.visualViewport.width : (
|
|
940
944
|
// $FlowFixMe[prop-missing]
|
|
941
945
|
u[B]
|
|
942
946
|
);
|
|
943
947
|
v -= W - n.width, v *= s ? 1 : -1;
|
|
944
948
|
}
|
|
945
949
|
}
|
|
946
|
-
var
|
|
950
|
+
var b = Object.assign({
|
|
947
951
|
position: o
|
|
948
952
|
}, d && ya), A = c === !0 ? wa({
|
|
949
953
|
x: v,
|
|
@@ -954,25 +958,25 @@ function Bt(e) {
|
|
|
954
958
|
};
|
|
955
959
|
if (v = A.x, O = A.y, s) {
|
|
956
960
|
var z;
|
|
957
|
-
return Object.assign({},
|
|
961
|
+
return Object.assign({}, b, (z = {}, z[f] = E ? "0" : "", z[R] = C ? "0" : "", z.transform = (y.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + O + "px)" : "translate3d(" + v + "px, " + O + "px, 0)", z));
|
|
958
962
|
}
|
|
959
|
-
return Object.assign({},
|
|
963
|
+
return Object.assign({}, b, (t = {}, t[f] = E ? O + "px" : "", t[R] = C ? v + "px" : "", t.transform = "", t));
|
|
960
964
|
}
|
|
961
965
|
function xa(e) {
|
|
962
966
|
var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, i = r.adaptive, l = i === void 0 ? !0 : i, o = r.roundOffsets, s = o === void 0 ? !0 : o, d = {
|
|
963
|
-
placement:
|
|
967
|
+
placement: pe(t.placement),
|
|
964
968
|
variation: Ve(t.placement),
|
|
965
969
|
popper: t.elements.popper,
|
|
966
970
|
popperRect: t.rects.popper,
|
|
967
971
|
gpuAcceleration: a,
|
|
968
972
|
isFixed: t.options.strategy === "fixed"
|
|
969
973
|
};
|
|
970
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
974
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Rt(Object.assign({}, d, {
|
|
971
975
|
offsets: t.modifiersData.popperOffsets,
|
|
972
976
|
position: t.options.strategy,
|
|
973
977
|
adaptive: l,
|
|
974
978
|
roundOffsets: s
|
|
975
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
979
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Rt(Object.assign({}, d, {
|
|
976
980
|
offsets: t.modifiersData.arrow,
|
|
977
981
|
position: "absolute",
|
|
978
982
|
adaptive: !1,
|
|
@@ -988,17 +992,17 @@ const Oa = {
|
|
|
988
992
|
fn: xa,
|
|
989
993
|
data: {}
|
|
990
994
|
};
|
|
991
|
-
var
|
|
995
|
+
var Ue = {
|
|
992
996
|
passive: !0
|
|
993
997
|
};
|
|
994
998
|
function $a(e) {
|
|
995
999
|
var t = e.state, r = e.instance, n = e.options, a = n.scroll, i = a === void 0 ? !0 : a, l = n.resize, o = l === void 0 ? !0 : l, s = re(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
996
1000
|
return i && d.forEach(function(c) {
|
|
997
|
-
c.addEventListener("scroll", r.update,
|
|
998
|
-
}), o && s.addEventListener("resize", r.update,
|
|
1001
|
+
c.addEventListener("scroll", r.update, Ue);
|
|
1002
|
+
}), o && s.addEventListener("resize", r.update, Ue), function() {
|
|
999
1003
|
i && d.forEach(function(c) {
|
|
1000
|
-
c.removeEventListener("scroll", r.update,
|
|
1001
|
-
}), o && s.removeEventListener("resize", r.update,
|
|
1004
|
+
c.removeEventListener("scroll", r.update, Ue);
|
|
1005
|
+
}), o && s.removeEventListener("resize", r.update, Ue);
|
|
1002
1006
|
};
|
|
1003
1007
|
}
|
|
1004
1008
|
const ka = {
|
|
@@ -1025,37 +1029,37 @@ var Sa = {
|
|
|
1025
1029
|
start: "end",
|
|
1026
1030
|
end: "start"
|
|
1027
1031
|
};
|
|
1028
|
-
function
|
|
1032
|
+
function Dt(e) {
|
|
1029
1033
|
return e.replace(/start|end/g, function(t) {
|
|
1030
1034
|
return Sa[t];
|
|
1031
1035
|
});
|
|
1032
1036
|
}
|
|
1033
|
-
function
|
|
1037
|
+
function wt(e) {
|
|
1034
1038
|
var t = re(e), r = t.pageXOffset, n = t.pageYOffset;
|
|
1035
1039
|
return {
|
|
1036
1040
|
scrollLeft: r,
|
|
1037
1041
|
scrollTop: n
|
|
1038
1042
|
};
|
|
1039
1043
|
}
|
|
1040
|
-
function
|
|
1041
|
-
return Pe(be(e)).left +
|
|
1044
|
+
function xt(e) {
|
|
1045
|
+
return Pe(be(e)).left + wt(e).scrollLeft;
|
|
1042
1046
|
}
|
|
1043
1047
|
function Ca(e, t) {
|
|
1044
1048
|
var r = re(e), n = be(e), a = r.visualViewport, i = n.clientWidth, l = n.clientHeight, o = 0, s = 0;
|
|
1045
1049
|
if (a) {
|
|
1046
1050
|
i = a.width, l = a.height;
|
|
1047
|
-
var d =
|
|
1051
|
+
var d = er();
|
|
1048
1052
|
(d || !d && t === "fixed") && (o = a.offsetLeft, s = a.offsetTop);
|
|
1049
1053
|
}
|
|
1050
1054
|
return {
|
|
1051
1055
|
width: i,
|
|
1052
1056
|
height: l,
|
|
1053
|
-
x: o +
|
|
1057
|
+
x: o + xt(e),
|
|
1054
1058
|
y: s
|
|
1055
1059
|
};
|
|
1056
1060
|
}
|
|
1057
1061
|
function Pa(e) {
|
|
1058
|
-
var t, r = be(e), n =
|
|
1062
|
+
var t, r = be(e), n = wt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, i = Oe(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), l = Oe(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), o = -n.scrollLeft + xt(e), s = -n.scrollTop;
|
|
1059
1063
|
return ge(a || r).direction === "rtl" && (o += Oe(r.clientWidth, a ? a.clientWidth : 0) - i), {
|
|
1060
1064
|
width: i,
|
|
1061
1065
|
height: l,
|
|
@@ -1063,23 +1067,23 @@ function Pa(e) {
|
|
|
1063
1067
|
y: s
|
|
1064
1068
|
};
|
|
1065
1069
|
}
|
|
1066
|
-
function
|
|
1070
|
+
function Ot(e) {
|
|
1067
1071
|
var t = ge(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
|
|
1068
1072
|
return /auto|scroll|overlay|hidden/.test(r + a + n);
|
|
1069
1073
|
}
|
|
1070
|
-
function
|
|
1071
|
-
return ["html", "body", "#document"].indexOf(
|
|
1074
|
+
function ir(e) {
|
|
1075
|
+
return ["html", "body", "#document"].indexOf(ve(e)) >= 0 ? e.ownerDocument.body : oe(e) && Ot(e) ? e : ir(tt(e));
|
|
1072
1076
|
}
|
|
1073
|
-
function
|
|
1077
|
+
function We(e, t) {
|
|
1074
1078
|
var r;
|
|
1075
1079
|
t === void 0 && (t = []);
|
|
1076
|
-
var n =
|
|
1080
|
+
var n = ir(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = re(n), l = a ? [i].concat(i.visualViewport || [], Ot(n) ? n : []) : n, o = t.concat(l);
|
|
1077
1081
|
return a ? o : (
|
|
1078
1082
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1079
|
-
o.concat(
|
|
1083
|
+
o.concat(We(tt(l)))
|
|
1080
1084
|
);
|
|
1081
1085
|
}
|
|
1082
|
-
function
|
|
1086
|
+
function dt(e) {
|
|
1083
1087
|
return Object.assign({}, e, {
|
|
1084
1088
|
left: e.x,
|
|
1085
1089
|
top: e.y,
|
|
@@ -1091,24 +1095,24 @@ function Va(e, t) {
|
|
|
1091
1095
|
var r = Pe(e, !1, t === "fixed");
|
|
1092
1096
|
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
1093
1097
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return t ===
|
|
1098
|
+
function zt(e, t, r) {
|
|
1099
|
+
return t === Zt ? dt(Ca(e, r)) : ke(t) ? Va(t, r) : dt(Pa(be(e)));
|
|
1096
1100
|
}
|
|
1097
1101
|
function Ea(e) {
|
|
1098
|
-
var t =
|
|
1102
|
+
var t = We(tt(e)), r = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, n = r && oe(e) ? Fe(e) : e;
|
|
1099
1103
|
return ke(n) ? t.filter(function(a) {
|
|
1100
|
-
return ke(a) &&
|
|
1104
|
+
return ke(a) && tr(a, n) && ve(a) !== "body";
|
|
1101
1105
|
}) : [];
|
|
1102
1106
|
}
|
|
1103
1107
|
function Ba(e, t, r, n) {
|
|
1104
1108
|
var a = t === "clippingParents" ? Ea(e) : [].concat(t), i = [].concat(a, [r]), l = i[0], o = i.reduce(function(s, d) {
|
|
1105
|
-
var c =
|
|
1106
|
-
return s.top = Oe(c.top, s.top), s.right =
|
|
1107
|
-
},
|
|
1109
|
+
var c = zt(e, d, n);
|
|
1110
|
+
return s.top = Oe(c.top, s.top), s.right = Ge(c.right, s.right), s.bottom = Ge(c.bottom, s.bottom), s.left = Oe(c.left, s.left), s;
|
|
1111
|
+
}, zt(e, l, n));
|
|
1108
1112
|
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
1109
1113
|
}
|
|
1110
|
-
function
|
|
1111
|
-
var t = e.reference, r = e.element, n = e.placement, a = n ?
|
|
1114
|
+
function or(e) {
|
|
1115
|
+
var t = e.reference, r = e.element, n = e.placement, a = n ? pe(n) : null, i = n ? Ve(n) : null, l = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, s;
|
|
1112
1116
|
switch (a) {
|
|
1113
1117
|
case ee:
|
|
1114
1118
|
s = {
|
|
@@ -1116,13 +1120,13 @@ function nr(e) {
|
|
|
1116
1120
|
y: t.y - r.height
|
|
1117
1121
|
};
|
|
1118
1122
|
break;
|
|
1119
|
-
case
|
|
1123
|
+
case se:
|
|
1120
1124
|
s = {
|
|
1121
1125
|
x: l,
|
|
1122
1126
|
y: t.y + t.height
|
|
1123
1127
|
};
|
|
1124
1128
|
break;
|
|
1125
|
-
case
|
|
1129
|
+
case le:
|
|
1126
1130
|
s = {
|
|
1127
1131
|
x: t.x + t.width,
|
|
1128
1132
|
y: o
|
|
@@ -1140,72 +1144,72 @@ function nr(e) {
|
|
|
1140
1144
|
y: t.y
|
|
1141
1145
|
};
|
|
1142
1146
|
}
|
|
1143
|
-
var d = a ?
|
|
1147
|
+
var d = a ? yt(a) : null;
|
|
1144
1148
|
if (d != null) {
|
|
1145
1149
|
var c = d === "y" ? "height" : "width";
|
|
1146
1150
|
switch (i) {
|
|
1147
1151
|
case Se:
|
|
1148
1152
|
s[d] = s[d] - (t[c] / 2 - r[c] / 2);
|
|
1149
1153
|
break;
|
|
1150
|
-
case
|
|
1154
|
+
case _e:
|
|
1151
1155
|
s[d] = s[d] + (t[c] / 2 - r[c] / 2);
|
|
1152
1156
|
break;
|
|
1153
1157
|
}
|
|
1154
1158
|
}
|
|
1155
1159
|
return s;
|
|
1156
1160
|
}
|
|
1157
|
-
function
|
|
1161
|
+
function Ie(e, t) {
|
|
1158
1162
|
t === void 0 && (t = {});
|
|
1159
|
-
var r = t, n = r.placement, a = n === void 0 ? e.placement : n, i = r.strategy, l = i === void 0 ? e.strategy : i, o = r.boundary, s = o === void 0 ? Gr : o, d = r.rootBoundary, c = d === void 0 ?
|
|
1163
|
+
var r = t, n = r.placement, a = n === void 0 ? e.placement : n, i = r.strategy, l = i === void 0 ? e.strategy : i, o = r.boundary, s = o === void 0 ? Gr : o, d = r.rootBoundary, c = d === void 0 ? Zt : d, w = r.elementContext, k = w === void 0 ? Re : w, v = r.altBoundary, S = v === void 0 ? !1 : v, O = r.padding, $ = O === void 0 ? 0 : O, C = ar(typeof $ != "number" ? $ : nr($, Ne)), E = k === Re ? Zr : Re, R = e.rects.popper, f = e.elements[S ? E : k], y = Ba(ke(f) ? f : f.contextElement || be(e.elements.popper), s, c, l), u = Pe(e.elements.reference), T = or({
|
|
1160
1164
|
reference: u,
|
|
1161
1165
|
element: R,
|
|
1162
1166
|
placement: a
|
|
1163
|
-
}), B =
|
|
1164
|
-
top:
|
|
1165
|
-
bottom: D.bottom -
|
|
1166
|
-
left:
|
|
1167
|
-
right: D.right -
|
|
1168
|
-
},
|
|
1169
|
-
if (k ===
|
|
1170
|
-
var A =
|
|
1167
|
+
}), B = dt(Object.assign({}, R, T)), D = k === Re ? B : u, W = {
|
|
1168
|
+
top: y.top - D.top + C.top,
|
|
1169
|
+
bottom: D.bottom - y.bottom + C.bottom,
|
|
1170
|
+
left: y.left - D.left + C.left,
|
|
1171
|
+
right: D.right - y.right + C.right
|
|
1172
|
+
}, b = e.modifiersData.offset;
|
|
1173
|
+
if (k === Re && b) {
|
|
1174
|
+
var A = b[a];
|
|
1171
1175
|
Object.keys(W).forEach(function(z) {
|
|
1172
|
-
var
|
|
1173
|
-
W[z] += A[
|
|
1176
|
+
var Y = [le, se].indexOf(z) >= 0 ? 1 : -1, X = [ee, se].indexOf(z) >= 0 ? "y" : "x";
|
|
1177
|
+
W[z] += A[X] * Y;
|
|
1174
1178
|
});
|
|
1175
1179
|
}
|
|
1176
1180
|
return W;
|
|
1177
1181
|
}
|
|
1178
1182
|
function Aa(e, t) {
|
|
1179
1183
|
t === void 0 && (t = {});
|
|
1180
|
-
var r = t, n = r.placement, a = r.boundary, i = r.rootBoundary, l = r.padding, o = r.flipVariations, s = r.allowedAutoPlacements, d = s === void 0 ?
|
|
1184
|
+
var r = t, n = r.placement, a = r.boundary, i = r.rootBoundary, l = r.padding, o = r.flipVariations, s = r.allowedAutoPlacements, d = s === void 0 ? Jt : s, c = Ve(n), w = c ? o ? Bt : Bt.filter(function(S) {
|
|
1181
1185
|
return Ve(S) === c;
|
|
1182
|
-
}) :
|
|
1186
|
+
}) : Ne, k = w.filter(function(S) {
|
|
1183
1187
|
return d.indexOf(S) >= 0;
|
|
1184
1188
|
});
|
|
1185
1189
|
k.length === 0 && (k = w);
|
|
1186
1190
|
var v = k.reduce(function(S, O) {
|
|
1187
|
-
return S[O] =
|
|
1191
|
+
return S[O] = Ie(e, {
|
|
1188
1192
|
placement: O,
|
|
1189
1193
|
boundary: a,
|
|
1190
1194
|
rootBoundary: i,
|
|
1191
1195
|
padding: l
|
|
1192
|
-
})[
|
|
1196
|
+
})[pe(O)], S;
|
|
1193
1197
|
}, {});
|
|
1194
1198
|
return Object.keys(v).sort(function(S, O) {
|
|
1195
1199
|
return v[S] - v[O];
|
|
1196
1200
|
});
|
|
1197
1201
|
}
|
|
1198
1202
|
function Ra(e) {
|
|
1199
|
-
if (
|
|
1203
|
+
if (pe(e) === gt)
|
|
1200
1204
|
return [];
|
|
1201
1205
|
var t = Xe(e);
|
|
1202
|
-
return [
|
|
1206
|
+
return [Dt(e), t, Dt(t)];
|
|
1203
1207
|
}
|
|
1204
1208
|
function Da(e) {
|
|
1205
1209
|
var t = e.state, r = e.options, n = e.name;
|
|
1206
1210
|
if (!t.modifiersData[n]._skip) {
|
|
1207
|
-
for (var a = r.mainAxis, i = a === void 0 ? !0 : a, l = r.altAxis, o = l === void 0 ? !0 : l, s = r.fallbackPlacements, d = r.padding, c = r.boundary, w = r.rootBoundary, k = r.altBoundary, v = r.flipVariations, S = v === void 0 ? !0 : v, O = r.allowedAutoPlacements, $ = t.options.placement, C =
|
|
1208
|
-
return he.concat(
|
|
1211
|
+
for (var a = r.mainAxis, i = a === void 0 ? !0 : a, l = r.altAxis, o = l === void 0 ? !0 : l, s = r.fallbackPlacements, d = r.padding, c = r.boundary, w = r.rootBoundary, k = r.altBoundary, v = r.flipVariations, S = v === void 0 ? !0 : v, O = r.allowedAutoPlacements, $ = t.options.placement, C = pe($), E = C === $, R = s || (E || !S ? [Xe($)] : Ra($)), f = [$].concat(R).reduce(function(he, fe) {
|
|
1212
|
+
return he.concat(pe(fe) === gt ? Aa(t, {
|
|
1209
1213
|
placement: fe,
|
|
1210
1214
|
boundary: c,
|
|
1211
1215
|
rootBoundary: w,
|
|
@@ -1213,38 +1217,38 @@ function Da(e) {
|
|
|
1213
1217
|
flipVariations: S,
|
|
1214
1218
|
allowedAutoPlacements: O
|
|
1215
1219
|
}) : fe);
|
|
1216
|
-
}, []),
|
|
1217
|
-
var
|
|
1218
|
-
placement:
|
|
1220
|
+
}, []), y = t.rects.reference, u = t.rects.popper, T = /* @__PURE__ */ new Map(), B = !0, D = f[0], W = 0; W < f.length; W++) {
|
|
1221
|
+
var b = f[W], A = pe(b), z = Ve(b) === Se, Y = [ee, se].indexOf(A) >= 0, X = Y ? "width" : "height", F = Ie(t, {
|
|
1222
|
+
placement: b,
|
|
1219
1223
|
boundary: c,
|
|
1220
1224
|
rootBoundary: w,
|
|
1221
1225
|
altBoundary: k,
|
|
1222
1226
|
padding: d
|
|
1223
|
-
}),
|
|
1224
|
-
|
|
1225
|
-
var de = Xe(
|
|
1226
|
-
if (i &&
|
|
1227
|
+
}), H = Y ? z ? le : te : z ? se : ee;
|
|
1228
|
+
y[X] > u[X] && (H = Xe(H));
|
|
1229
|
+
var de = Xe(H), ce = [];
|
|
1230
|
+
if (i && ce.push(F[A] <= 0), o && ce.push(F[H] <= 0, F[de] <= 0), ce.every(function(he) {
|
|
1227
1231
|
return he;
|
|
1228
1232
|
})) {
|
|
1229
|
-
D =
|
|
1233
|
+
D = b, B = !1;
|
|
1230
1234
|
break;
|
|
1231
1235
|
}
|
|
1232
|
-
T.set(
|
|
1236
|
+
T.set(b, ce);
|
|
1233
1237
|
}
|
|
1234
1238
|
if (B)
|
|
1235
|
-
for (var
|
|
1239
|
+
for (var g = S ? 3 : 1, N = function(fe) {
|
|
1236
1240
|
var ye = f.find(function(Te) {
|
|
1237
|
-
var
|
|
1238
|
-
if (
|
|
1239
|
-
return
|
|
1241
|
+
var me = T.get(Te);
|
|
1242
|
+
if (me)
|
|
1243
|
+
return me.slice(0, fe).every(function(Be) {
|
|
1240
1244
|
return Be;
|
|
1241
1245
|
});
|
|
1242
1246
|
});
|
|
1243
1247
|
if (ye)
|
|
1244
1248
|
return D = ye, "break";
|
|
1245
|
-
}, K =
|
|
1246
|
-
var
|
|
1247
|
-
if (
|
|
1249
|
+
}, K = g; K > 0; K--) {
|
|
1250
|
+
var ue = N(K);
|
|
1251
|
+
if (ue === "break") break;
|
|
1248
1252
|
}
|
|
1249
1253
|
t.placement !== D && (t.modifiersData[n]._skip = !0, t.placement = D, t.reset = !0);
|
|
1250
1254
|
}
|
|
@@ -1259,7 +1263,7 @@ const za = {
|
|
|
1259
1263
|
_skip: !1
|
|
1260
1264
|
}
|
|
1261
1265
|
};
|
|
1262
|
-
function
|
|
1266
|
+
function Wt(e, t, r) {
|
|
1263
1267
|
return r === void 0 && (r = {
|
|
1264
1268
|
x: 0,
|
|
1265
1269
|
y: 0
|
|
@@ -1270,17 +1274,17 @@ function Dt(e, t, r) {
|
|
|
1270
1274
|
left: e.left - t.width - r.x
|
|
1271
1275
|
};
|
|
1272
1276
|
}
|
|
1273
|
-
function
|
|
1274
|
-
return [ee,
|
|
1277
|
+
function Lt(e) {
|
|
1278
|
+
return [ee, le, se, te].some(function(t) {
|
|
1275
1279
|
return e[t] >= 0;
|
|
1276
1280
|
});
|
|
1277
1281
|
}
|
|
1278
1282
|
function Wa(e) {
|
|
1279
|
-
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, i = t.modifiersData.preventOverflow, l =
|
|
1283
|
+
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, i = t.modifiersData.preventOverflow, l = Ie(t, {
|
|
1280
1284
|
elementContext: "reference"
|
|
1281
|
-
}), o =
|
|
1285
|
+
}), o = Ie(t, {
|
|
1282
1286
|
altBoundary: !0
|
|
1283
|
-
}), s =
|
|
1287
|
+
}), s = Wt(l, n), d = Wt(o, a, i), c = Lt(s), w = Lt(d);
|
|
1284
1288
|
t.modifiersData[r] = {
|
|
1285
1289
|
referenceClippingOffsets: s,
|
|
1286
1290
|
popperEscapeOffsets: d,
|
|
@@ -1299,10 +1303,10 @@ const La = {
|
|
|
1299
1303
|
fn: Wa
|
|
1300
1304
|
};
|
|
1301
1305
|
function ja(e, t, r) {
|
|
1302
|
-
var n =
|
|
1306
|
+
var n = pe(e), a = [te, ee].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
|
|
1303
1307
|
placement: e
|
|
1304
1308
|
})) : r, l = i[0], o = i[1];
|
|
1305
|
-
return l = l || 0, o = (o || 0) * a, [te,
|
|
1309
|
+
return l = l || 0, o = (o || 0) * a, [te, le].indexOf(n) >= 0 ? {
|
|
1306
1310
|
x: o,
|
|
1307
1311
|
y: l
|
|
1308
1312
|
} : {
|
|
@@ -1311,7 +1315,7 @@ function ja(e, t, r) {
|
|
|
1311
1315
|
};
|
|
1312
1316
|
}
|
|
1313
1317
|
function Ma(e) {
|
|
1314
|
-
var t = e.state, r = e.options, n = e.name, a = r.offset, i = a === void 0 ? [0, 0] : a, l =
|
|
1318
|
+
var t = e.state, r = e.options, n = e.name, a = r.offset, i = a === void 0 ? [0, 0] : a, l = Jt.reduce(function(c, w) {
|
|
1315
1319
|
return c[w] = ja(w, t.rects, i), c;
|
|
1316
1320
|
}, {}), o = l[t.placement], s = o.x, d = o.y;
|
|
1317
1321
|
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += d), t.modifiersData[n] = l;
|
|
@@ -1325,7 +1329,7 @@ const _a = {
|
|
|
1325
1329
|
};
|
|
1326
1330
|
function Ia(e) {
|
|
1327
1331
|
var t = e.state, r = e.name;
|
|
1328
|
-
t.modifiersData[r] =
|
|
1332
|
+
t.modifiersData[r] = or({
|
|
1329
1333
|
reference: t.rects.reference,
|
|
1330
1334
|
element: t.rects.popper,
|
|
1331
1335
|
placement: t.placement
|
|
@@ -1342,12 +1346,12 @@ function Fa(e) {
|
|
|
1342
1346
|
return e === "x" ? "y" : "x";
|
|
1343
1347
|
}
|
|
1344
1348
|
function Ha(e) {
|
|
1345
|
-
var t = e.state, r = e.options, n = e.name, a = r.mainAxis, i = a === void 0 ? !0 : a, l = r.altAxis, o = l === void 0 ? !1 : l, s = r.boundary, d = r.rootBoundary, c = r.altBoundary, w = r.padding, k = r.tether, v = k === void 0 ? !0 : k, S = r.tetherOffset, O = S === void 0 ? 0 : S, $ =
|
|
1349
|
+
var t = e.state, r = e.options, n = e.name, a = r.mainAxis, i = a === void 0 ? !0 : a, l = r.altAxis, o = l === void 0 ? !1 : l, s = r.boundary, d = r.rootBoundary, c = r.altBoundary, w = r.padding, k = r.tether, v = k === void 0 ? !0 : k, S = r.tetherOffset, O = S === void 0 ? 0 : S, $ = Ie(t, {
|
|
1346
1350
|
boundary: s,
|
|
1347
1351
|
rootBoundary: d,
|
|
1348
1352
|
padding: w,
|
|
1349
1353
|
altBoundary: c
|
|
1350
|
-
}), C =
|
|
1354
|
+
}), C = pe(t.placement), E = Ve(t.placement), R = !E, f = yt(C), y = Fa(f), u = t.modifiersData.popperOffsets, T = t.rects.reference, B = t.rects.popper, D = typeof O == "function" ? O(Object.assign({}, t.rects, {
|
|
1351
1355
|
placement: t.placement
|
|
1352
1356
|
})) : O, W = typeof D == "number" ? {
|
|
1353
1357
|
mainAxis: D,
|
|
@@ -1355,21 +1359,21 @@ function Ha(e) {
|
|
|
1355
1359
|
} : Object.assign({
|
|
1356
1360
|
mainAxis: 0,
|
|
1357
1361
|
altAxis: 0
|
|
1358
|
-
}, D),
|
|
1362
|
+
}, D), b = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = {
|
|
1359
1363
|
x: 0,
|
|
1360
1364
|
y: 0
|
|
1361
1365
|
};
|
|
1362
1366
|
if (u) {
|
|
1363
1367
|
if (i) {
|
|
1364
|
-
var z,
|
|
1368
|
+
var z, Y = f === "y" ? ee : te, X = f === "y" ? se : le, F = f === "y" ? "height" : "width", H = u[f], de = H + $[Y], ce = H - $[X], g = v ? -B[F] / 2 : 0, N = E === Se ? T[F] : B[F], K = E === Se ? -B[F] : -T[F], ue = t.elements.arrow, he = v && ue ? bt(ue) : {
|
|
1365
1369
|
width: 0,
|
|
1366
1370
|
height: 0
|
|
1367
|
-
}, fe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
1368
|
-
u[f] =
|
|
1371
|
+
}, fe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : rr(), ye = fe[Y], Te = fe[X], me = ze(0, T[F], he[F]), Be = R ? T[F] / 2 - g - me - ye - W.mainAxis : N - me - ye - W.mainAxis, He = R ? -T[F] / 2 + g + me + Te + W.mainAxis : K + me + Te + W.mainAxis, Ae = t.elements.arrow && Fe(t.elements.arrow), rt = Ae ? f === "y" ? Ae.clientTop || 0 : Ae.clientLeft || 0 : 0, p = (z = b?.[f]) != null ? z : 0, L = H + Be - p - rt, P = H + He - p, ae = ze(v ? Ge(de, L) : de, H, v ? Oe(ce, P) : ce);
|
|
1372
|
+
u[f] = ae, A[f] = ae - H;
|
|
1369
1373
|
}
|
|
1370
1374
|
if (o) {
|
|
1371
|
-
var
|
|
1372
|
-
u[
|
|
1375
|
+
var Q, at = f === "x" ? ee : te, $t = f === "x" ? se : le, we = u[y], qe = y === "y" ? "height" : "width", kt = we + $[at], Tt = we - $[$t], nt = [ee, te].indexOf(C) !== -1, St = (Q = b?.[y]) != null ? Q : 0, Ct = nt ? kt : we - T[qe] - B[qe] - St + W.altAxis, Pt = nt ? we + T[qe] + B[qe] - St - W.altAxis : Tt, Vt = v && nt ? va(Ct, we, Pt) : ze(v ? Ct : kt, we, v ? Pt : Tt);
|
|
1376
|
+
u[y] = Vt, A[y] = Vt - we;
|
|
1373
1377
|
}
|
|
1374
1378
|
t.modifiersData[n] = A;
|
|
1375
1379
|
}
|
|
@@ -1387,24 +1391,24 @@ function Ua(e) {
|
|
|
1387
1391
|
scrollTop: e.scrollTop
|
|
1388
1392
|
};
|
|
1389
1393
|
}
|
|
1390
|
-
function Xa(e) {
|
|
1391
|
-
return e === re(e) || !ne(e) ? yt(e) : Ua(e);
|
|
1392
|
-
}
|
|
1393
1394
|
function Ya(e) {
|
|
1395
|
+
return e === re(e) || !oe(e) ? wt(e) : Ua(e);
|
|
1396
|
+
}
|
|
1397
|
+
function Xa(e) {
|
|
1394
1398
|
var t = e.getBoundingClientRect(), r = Ce(t.width) / e.offsetWidth || 1, n = Ce(t.height) / e.offsetHeight || 1;
|
|
1395
1399
|
return r !== 1 || n !== 1;
|
|
1396
1400
|
}
|
|
1397
1401
|
function Ka(e, t, r) {
|
|
1398
1402
|
r === void 0 && (r = !1);
|
|
1399
|
-
var n =
|
|
1403
|
+
var n = oe(t), a = oe(t) && Xa(t), i = be(t), l = Pe(e, a, r), o = {
|
|
1400
1404
|
scrollLeft: 0,
|
|
1401
1405
|
scrollTop: 0
|
|
1402
1406
|
}, s = {
|
|
1403
1407
|
x: 0,
|
|
1404
1408
|
y: 0
|
|
1405
1409
|
};
|
|
1406
|
-
return (n || !n && !r) && ((
|
|
1407
|
-
|
|
1410
|
+
return (n || !n && !r) && ((ve(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1411
|
+
Ot(i)) && (o = Ya(t)), oe(t) ? (s = Pe(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = xt(i))), {
|
|
1408
1412
|
x: l.left + o.scrollLeft - s.x,
|
|
1409
1413
|
y: l.top + o.scrollTop - s.y,
|
|
1410
1414
|
width: l.width,
|
|
@@ -1460,12 +1464,12 @@ function Ja(e) {
|
|
|
1460
1464
|
return t[r];
|
|
1461
1465
|
});
|
|
1462
1466
|
}
|
|
1463
|
-
var
|
|
1467
|
+
var jt = {
|
|
1464
1468
|
placement: "bottom",
|
|
1465
1469
|
modifiers: [],
|
|
1466
1470
|
strategy: "absolute"
|
|
1467
1471
|
};
|
|
1468
|
-
function
|
|
1472
|
+
function Mt() {
|
|
1469
1473
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
1470
1474
|
t[r] = arguments[r];
|
|
1471
1475
|
return !t.some(function(n) {
|
|
@@ -1474,13 +1478,13 @@ function Lt() {
|
|
|
1474
1478
|
}
|
|
1475
1479
|
function en(e) {
|
|
1476
1480
|
e === void 0 && (e = {});
|
|
1477
|
-
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, i = a === void 0 ?
|
|
1481
|
+
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, i = a === void 0 ? jt : a;
|
|
1478
1482
|
return function(o, s, d) {
|
|
1479
1483
|
d === void 0 && (d = i);
|
|
1480
1484
|
var c = {
|
|
1481
1485
|
placement: "bottom",
|
|
1482
1486
|
orderedModifiers: [],
|
|
1483
|
-
options: Object.assign({},
|
|
1487
|
+
options: Object.assign({}, jt, i),
|
|
1484
1488
|
modifiersData: {},
|
|
1485
1489
|
elements: {
|
|
1486
1490
|
reference: o,
|
|
@@ -1493,8 +1497,8 @@ function en(e) {
|
|
|
1493
1497
|
setOptions: function(C) {
|
|
1494
1498
|
var E = typeof C == "function" ? C(c.options) : C;
|
|
1495
1499
|
O(), c.options = Object.assign({}, i, c.options, E), c.scrollParents = {
|
|
1496
|
-
reference: ke(o) ?
|
|
1497
|
-
popper:
|
|
1500
|
+
reference: ke(o) ? We(o) : o.contextElement ? We(o.contextElement) : [],
|
|
1501
|
+
popper: We(s)
|
|
1498
1502
|
};
|
|
1499
1503
|
var R = Ga(Ja([].concat(n, c.options.modifiers)));
|
|
1500
1504
|
return c.orderedModifiers = R.filter(function(f) {
|
|
@@ -1509,10 +1513,10 @@ function en(e) {
|
|
|
1509
1513
|
forceUpdate: function() {
|
|
1510
1514
|
if (!k) {
|
|
1511
1515
|
var C = c.elements, E = C.reference, R = C.popper;
|
|
1512
|
-
if (
|
|
1516
|
+
if (Mt(E, R)) {
|
|
1513
1517
|
c.rects = {
|
|
1514
|
-
reference: Ka(E,
|
|
1515
|
-
popper:
|
|
1518
|
+
reference: Ka(E, Fe(R), c.options.strategy === "fixed"),
|
|
1519
|
+
popper: bt(R)
|
|
1516
1520
|
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(W) {
|
|
1517
1521
|
return c.modifiersData[W.name] = Object.assign({}, W.data);
|
|
1518
1522
|
});
|
|
@@ -1521,7 +1525,7 @@ function en(e) {
|
|
|
1521
1525
|
c.reset = !1, f = -1;
|
|
1522
1526
|
continue;
|
|
1523
1527
|
}
|
|
1524
|
-
var
|
|
1528
|
+
var y = c.orderedModifiers[f], u = y.fn, T = y.options, B = T === void 0 ? {} : T, D = y.name;
|
|
1525
1529
|
typeof u == "function" && (c = u({
|
|
1526
1530
|
state: c,
|
|
1527
1531
|
options: B,
|
|
@@ -1543,7 +1547,7 @@ function en(e) {
|
|
|
1543
1547
|
O(), k = !0;
|
|
1544
1548
|
}
|
|
1545
1549
|
};
|
|
1546
|
-
if (!
|
|
1550
|
+
if (!Mt(o, s))
|
|
1547
1551
|
return v;
|
|
1548
1552
|
v.setOptions(d).then(function($) {
|
|
1549
1553
|
!k && d.onFirstUpdate && d.onFirstUpdate($);
|
|
@@ -1552,14 +1556,14 @@ function en(e) {
|
|
|
1552
1556
|
c.orderedModifiers.forEach(function($) {
|
|
1553
1557
|
var C = $.name, E = $.options, R = E === void 0 ? {} : E, f = $.effect;
|
|
1554
1558
|
if (typeof f == "function") {
|
|
1555
|
-
var
|
|
1559
|
+
var y = f({
|
|
1556
1560
|
state: c,
|
|
1557
1561
|
name: C,
|
|
1558
1562
|
instance: v,
|
|
1559
1563
|
options: R
|
|
1560
1564
|
}), u = function() {
|
|
1561
1565
|
};
|
|
1562
|
-
w.push(
|
|
1566
|
+
w.push(y || u);
|
|
1563
1567
|
}
|
|
1564
1568
|
});
|
|
1565
1569
|
}
|
|
@@ -1573,24 +1577,24 @@ function en(e) {
|
|
|
1573
1577
|
}
|
|
1574
1578
|
var tn = [ka, Na, Oa, da, _a, za, qa, ba, La], rn = /* @__PURE__ */ en({
|
|
1575
1579
|
defaultModifiers: tn
|
|
1576
|
-
}), an = typeof global == "object" && global && global.Object === Object && global, nn = typeof self == "object" && self && self.Object === Object && self,
|
|
1580
|
+
}), an = typeof global == "object" && global && global.Object === Object && global, nn = typeof self == "object" && self && self.Object === Object && self, sr = an || nn || Function("return this")(), Ze = sr.Symbol, lr = Object.prototype, on = lr.hasOwnProperty, sn = lr.toString, De = Ze ? Ze.toStringTag : void 0;
|
|
1577
1581
|
function ln(e) {
|
|
1578
|
-
var t = on.call(e,
|
|
1582
|
+
var t = on.call(e, De), r = e[De];
|
|
1579
1583
|
try {
|
|
1580
|
-
e[
|
|
1584
|
+
e[De] = void 0;
|
|
1581
1585
|
var n = !0;
|
|
1582
1586
|
} catch {
|
|
1583
1587
|
}
|
|
1584
1588
|
var a = sn.call(e);
|
|
1585
|
-
return n && (t ? e[
|
|
1589
|
+
return n && (t ? e[De] = r : delete e[De]), a;
|
|
1586
1590
|
}
|
|
1587
1591
|
var cn = Object.prototype, un = cn.toString;
|
|
1588
1592
|
function dn(e) {
|
|
1589
1593
|
return un.call(e);
|
|
1590
1594
|
}
|
|
1591
|
-
var fn = "[object Null]", pn = "[object Undefined]",
|
|
1595
|
+
var fn = "[object Null]", pn = "[object Undefined]", _t = Ze ? Ze.toStringTag : void 0;
|
|
1592
1596
|
function vn(e) {
|
|
1593
|
-
return e == null ? e === void 0 ? pn : fn :
|
|
1597
|
+
return e == null ? e === void 0 ? pn : fn : _t && _t in Object(e) ? ln(e) : dn(e);
|
|
1594
1598
|
}
|
|
1595
1599
|
function mn(e) {
|
|
1596
1600
|
return e != null && typeof e == "object";
|
|
@@ -1609,34 +1613,34 @@ var wn = /^\s+/;
|
|
|
1609
1613
|
function xn(e) {
|
|
1610
1614
|
return e && e.slice(0, yn(e) + 1).replace(wn, "");
|
|
1611
1615
|
}
|
|
1612
|
-
function
|
|
1616
|
+
function Je(e) {
|
|
1613
1617
|
var t = typeof e;
|
|
1614
1618
|
return e != null && (t == "object" || t == "function");
|
|
1615
1619
|
}
|
|
1616
|
-
var
|
|
1617
|
-
function
|
|
1620
|
+
var It = NaN, On = /^[-+]0x[0-9a-f]+$/i, $n = /^0b[01]+$/i, kn = /^0o[0-7]+$/i, Tn = parseInt;
|
|
1621
|
+
function Nt(e) {
|
|
1618
1622
|
if (typeof e == "number")
|
|
1619
1623
|
return e;
|
|
1620
1624
|
if (hn(e))
|
|
1621
|
-
return
|
|
1622
|
-
if (
|
|
1625
|
+
return It;
|
|
1626
|
+
if (Je(e)) {
|
|
1623
1627
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
1624
|
-
e =
|
|
1628
|
+
e = Je(t) ? t + "" : t;
|
|
1625
1629
|
}
|
|
1626
1630
|
if (typeof e != "string")
|
|
1627
1631
|
return e === 0 ? e : +e;
|
|
1628
1632
|
e = xn(e);
|
|
1629
1633
|
var r = $n.test(e);
|
|
1630
|
-
return r || kn.test(e) ? Tn(e.slice(2), r ? 2 : 8) : On.test(e) ?
|
|
1634
|
+
return r || kn.test(e) ? Tn(e.slice(2), r ? 2 : 8) : On.test(e) ? It : +e;
|
|
1631
1635
|
}
|
|
1632
|
-
var
|
|
1633
|
-
return
|
|
1636
|
+
var st = function() {
|
|
1637
|
+
return sr.Date.now();
|
|
1634
1638
|
}, Sn = "Expected a function", Cn = Math.max, Pn = Math.min;
|
|
1635
|
-
function
|
|
1639
|
+
function ft(e, t, r) {
|
|
1636
1640
|
var n, a, i, l, o, s, d = 0, c = !1, w = !1, k = !0;
|
|
1637
1641
|
if (typeof e != "function")
|
|
1638
1642
|
throw new TypeError(Sn);
|
|
1639
|
-
t =
|
|
1643
|
+
t = Nt(t) || 0, Je(r) && (c = !!r.leading, w = "maxWait" in r, i = w ? Cn(Nt(r.maxWait) || 0, t) : i, k = "trailing" in r ? !!r.trailing : k);
|
|
1640
1644
|
function v(u) {
|
|
1641
1645
|
var T = n, B = a;
|
|
1642
1646
|
return n = a = void 0, d = u, l = e.apply(B, T), l;
|
|
@@ -1653,7 +1657,7 @@ function dt(e, t, r) {
|
|
|
1653
1657
|
return s === void 0 || T >= t || T < 0 || w && B >= i;
|
|
1654
1658
|
}
|
|
1655
1659
|
function C() {
|
|
1656
|
-
var u =
|
|
1660
|
+
var u = st();
|
|
1657
1661
|
if ($(u))
|
|
1658
1662
|
return E(u);
|
|
1659
1663
|
o = setTimeout(C, O(u));
|
|
@@ -1665,10 +1669,10 @@ function dt(e, t, r) {
|
|
|
1665
1669
|
o !== void 0 && clearTimeout(o), d = 0, n = s = a = o = void 0;
|
|
1666
1670
|
}
|
|
1667
1671
|
function f() {
|
|
1668
|
-
return o === void 0 ? l : E(
|
|
1672
|
+
return o === void 0 ? l : E(st());
|
|
1669
1673
|
}
|
|
1670
|
-
function
|
|
1671
|
-
var u =
|
|
1674
|
+
function y() {
|
|
1675
|
+
var u = st(), T = $(u);
|
|
1672
1676
|
if (n = arguments, a = this, s = u, T) {
|
|
1673
1677
|
if (o === void 0)
|
|
1674
1678
|
return S(s);
|
|
@@ -1677,14 +1681,14 @@ function dt(e, t, r) {
|
|
|
1677
1681
|
}
|
|
1678
1682
|
return o === void 0 && (o = setTimeout(C, t)), l;
|
|
1679
1683
|
}
|
|
1680
|
-
return
|
|
1684
|
+
return y.cancel = R, y.flush = f, y;
|
|
1681
1685
|
}
|
|
1682
1686
|
var Vn = "Expected a function";
|
|
1683
1687
|
function En(e, t, r) {
|
|
1684
1688
|
var n = !0, a = !0;
|
|
1685
1689
|
if (typeof e != "function")
|
|
1686
1690
|
throw new TypeError(Vn);
|
|
1687
|
-
return
|
|
1691
|
+
return Je(r) && (n = "leading" in r ? !!r.leading : n, a = "trailing" in r ? !!r.trailing : a), ft(e, t, {
|
|
1688
1692
|
leading: n,
|
|
1689
1693
|
maxWait: t,
|
|
1690
1694
|
trailing: a
|
|
@@ -1695,12 +1699,12 @@ const Bn = (e, t) => {
|
|
|
1695
1699
|
const a = e.value, i = n.target;
|
|
1696
1700
|
!a || !i || !(i instanceof Node) || a.contains(i) || t(n);
|
|
1697
1701
|
};
|
|
1698
|
-
|
|
1702
|
+
et(() => {
|
|
1699
1703
|
document.addEventListener("click", r, !0);
|
|
1700
1704
|
}), Ee(() => {
|
|
1701
1705
|
document.removeEventListener("click", r, !0);
|
|
1702
1706
|
});
|
|
1703
|
-
}, An = 80,
|
|
1707
|
+
}, An = 80, pt = /* @__PURE__ */ G({
|
|
1704
1708
|
name: "Popover",
|
|
1705
1709
|
__name: "Popover",
|
|
1706
1710
|
props: {
|
|
@@ -1719,19 +1723,19 @@ const Bn = (e, t) => {
|
|
|
1719
1723
|
},
|
|
1720
1724
|
emits: ["visible-change", "click-outside", "scroll"],
|
|
1721
1725
|
setup(e, { expose: t, emit: r }) {
|
|
1722
|
-
const n = _(!1), a = e, i =
|
|
1723
|
-
let w = null, k =
|
|
1724
|
-
const S = (
|
|
1725
|
-
const
|
|
1726
|
-
return
|
|
1727
|
-
}), $ =
|
|
1728
|
-
const
|
|
1729
|
-
if (A != null && A !== "" && (
|
|
1726
|
+
const n = _(!1), a = e, i = m(() => a.preserveContentMount || n.value), l = m(() => !a.preserveContentMount || n.value), o = r, s = _(), d = _(), c = _();
|
|
1727
|
+
let w = null, k = Me({}), v = Me({});
|
|
1728
|
+
const S = (b) => typeof b == "number" ? `${b}px` : b, O = m(() => {
|
|
1729
|
+
const b = a.maxPopperHeight;
|
|
1730
|
+
return b != null && b !== "";
|
|
1731
|
+
}), $ = m(() => {
|
|
1732
|
+
const b = {}, A = a.popperWidth;
|
|
1733
|
+
if (A != null && A !== "" && (b.width = S(A)), O.value) {
|
|
1730
1734
|
const z = a.maxPopperHeight;
|
|
1731
|
-
|
|
1735
|
+
b.maxHeight = S(z), b.overflowY = "auto", b.scrollbarWidth = "none", b.msOverflowStyle = "none";
|
|
1732
1736
|
}
|
|
1733
|
-
return
|
|
1734
|
-
}), C =
|
|
1737
|
+
return b.padding = S(a.padding), b;
|
|
1738
|
+
}), C = m(() => ({
|
|
1735
1739
|
placement: a.placement,
|
|
1736
1740
|
modifiers: [
|
|
1737
1741
|
{
|
|
@@ -1746,10 +1750,10 @@ const Bn = (e, t) => {
|
|
|
1746
1750
|
a.disabled || (n.value = !0, o("visible-change", !0));
|
|
1747
1751
|
}, R = () => {
|
|
1748
1752
|
n.value = !1, o("visible-change", !1);
|
|
1749
|
-
}, f =
|
|
1750
|
-
a.disabled || (
|
|
1753
|
+
}, f = ft(E, a.openDelay), y = ft(R, a.closeDelay), u = () => {
|
|
1754
|
+
a.disabled || (y.cancel(), f());
|
|
1751
1755
|
}, T = () => {
|
|
1752
|
-
f.cancel(),
|
|
1756
|
+
f.cancel(), y();
|
|
1753
1757
|
};
|
|
1754
1758
|
Bn(s, () => {
|
|
1755
1759
|
a.trigger === "click" && n.value && !a.manual && T(), n.value && o("click-outside", !0);
|
|
@@ -1761,30 +1765,30 @@ const Bn = (e, t) => {
|
|
|
1761
1765
|
};
|
|
1762
1766
|
J(
|
|
1763
1767
|
() => n.value,
|
|
1764
|
-
(
|
|
1765
|
-
|
|
1768
|
+
(b) => {
|
|
1769
|
+
b && (d.value && c.value ? w = rn(d.value, c.value, C.value) : w?.destroy());
|
|
1766
1770
|
},
|
|
1767
1771
|
{ flush: "post" }
|
|
1768
1772
|
), J(
|
|
1769
1773
|
() => a.manual,
|
|
1770
|
-
(
|
|
1771
|
-
|
|
1774
|
+
(b) => {
|
|
1775
|
+
b ? (v = {}, k = {}) : D();
|
|
1772
1776
|
}
|
|
1773
1777
|
), J(
|
|
1774
1778
|
() => a.trigger,
|
|
1775
|
-
(
|
|
1776
|
-
|
|
1779
|
+
(b, A) => {
|
|
1780
|
+
b !== A && (v = {}, k = {}, D());
|
|
1777
1781
|
}
|
|
1778
1782
|
), J(
|
|
1779
1783
|
() => a.disabled,
|
|
1780
|
-
(
|
|
1781
|
-
|
|
1784
|
+
(b) => {
|
|
1785
|
+
b && T();
|
|
1782
1786
|
}
|
|
1783
|
-
),
|
|
1787
|
+
), et(() => {
|
|
1784
1788
|
a.manual || D();
|
|
1785
1789
|
});
|
|
1786
|
-
const W = En((
|
|
1787
|
-
const A =
|
|
1790
|
+
const W = En((b) => {
|
|
1791
|
+
const A = b.target;
|
|
1788
1792
|
o("scroll", { scrollTop: A.scrollTop, scrollLeft: A.scrollLeft });
|
|
1789
1793
|
}, An);
|
|
1790
1794
|
return Ee(() => {
|
|
@@ -1793,39 +1797,39 @@ const Bn = (e, t) => {
|
|
|
1793
1797
|
isOpen: n,
|
|
1794
1798
|
open: u,
|
|
1795
1799
|
close: T
|
|
1796
|
-
}), (
|
|
1800
|
+
}), (b, A) => (h(), x("div", xe({
|
|
1797
1801
|
class: "cregis-popover",
|
|
1798
1802
|
ref_key: "popoverRef",
|
|
1799
1803
|
ref: s
|
|
1800
|
-
},
|
|
1804
|
+
}, Et(ne(k), !0)), [
|
|
1801
1805
|
V("div", xe({
|
|
1802
1806
|
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
1803
1807
|
ref_key: "popoverTriggerRef",
|
|
1804
1808
|
ref: d
|
|
1805
|
-
},
|
|
1806
|
-
q(
|
|
1809
|
+
}, Et(ne(v), !0)), [
|
|
1810
|
+
q(b.$slots, "reference")
|
|
1807
1811
|
], 16),
|
|
1808
|
-
U(
|
|
1812
|
+
U(vt, { name: "fade" }, {
|
|
1809
1813
|
default: Z(() => [
|
|
1810
|
-
i.value ?
|
|
1814
|
+
i.value ? je((h(), x("div", {
|
|
1811
1815
|
key: 0,
|
|
1812
1816
|
class: j(["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": O.value }]),
|
|
1813
1817
|
ref_key: "popoverContentRef",
|
|
1814
1818
|
ref: c,
|
|
1815
|
-
style:
|
|
1819
|
+
style: ie($.value),
|
|
1816
1820
|
onScroll: A[0] || (A[0] = //@ts-ignore
|
|
1817
|
-
(...z) =>
|
|
1821
|
+
(...z) => ne(W) && ne(W)(...z))
|
|
1818
1822
|
}, [
|
|
1819
|
-
q(
|
|
1823
|
+
q(b.$slots, "default")
|
|
1820
1824
|
], 38)), [
|
|
1821
|
-
[
|
|
1825
|
+
[mt, l.value]
|
|
1822
1826
|
]) : I("", !0)
|
|
1823
1827
|
]),
|
|
1824
1828
|
_: 3
|
|
1825
1829
|
})
|
|
1826
1830
|
], 16));
|
|
1827
1831
|
}
|
|
1828
|
-
}),
|
|
1832
|
+
}), cr = Symbol("CregisSelect"), Rn = { class: "cregis-select__trigger-label" }, Dn = { class: "cregis-select__selected" }, zn = {
|
|
1829
1833
|
key: 1,
|
|
1830
1834
|
class: "cregis-select__placeholder"
|
|
1831
1835
|
}, Wn = {
|
|
@@ -1834,7 +1838,7 @@ const Bn = (e, t) => {
|
|
|
1834
1838
|
}, Ln = {
|
|
1835
1839
|
key: 2,
|
|
1836
1840
|
class: "cregis-select__dropdown-filter-empty"
|
|
1837
|
-
}, jn = { class: "cregis-select__dropdown-content" }, li = /* @__PURE__ */
|
|
1841
|
+
}, jn = { class: "cregis-select__dropdown-content" }, li = /* @__PURE__ */ G({
|
|
1838
1842
|
name: "Select",
|
|
1839
1843
|
__name: "Select",
|
|
1840
1844
|
props: {
|
|
@@ -1842,7 +1846,7 @@ const Bn = (e, t) => {
|
|
|
1842
1846
|
type: { default: "default" },
|
|
1843
1847
|
size: { default: "large" },
|
|
1844
1848
|
align: { default: "center" },
|
|
1845
|
-
placeholder: { default: "
|
|
1849
|
+
placeholder: { default: "" },
|
|
1846
1850
|
disabled: { type: Boolean },
|
|
1847
1851
|
filterable: { type: Boolean },
|
|
1848
1852
|
filterDebounceMs: { default: 200 },
|
|
@@ -1858,95 +1862,95 @@ const Bn = (e, t) => {
|
|
|
1858
1862
|
let l = null;
|
|
1859
1863
|
const o = () => {
|
|
1860
1864
|
l !== null && (clearTimeout(l), l = null);
|
|
1861
|
-
}, s = (
|
|
1862
|
-
i.value =
|
|
1863
|
-
}, d = (
|
|
1864
|
-
const
|
|
1865
|
-
return k.value++, c[
|
|
1866
|
-
k.value--, delete c[
|
|
1865
|
+
}, s = (g) => {
|
|
1866
|
+
i.value = g, n("visible-change", g), !g && r.filterable && (f.value = "", y.value = "", o());
|
|
1867
|
+
}, d = (g) => typeof g == "number" ? `n:${g}` : `s:${g}`, c = Me({}), w = Me({}), k = _(0), v = _(null), S = (g, N, K) => {
|
|
1868
|
+
const ue = d(g);
|
|
1869
|
+
return k.value++, c[ue] = N, w[ue] = K ?? N, () => {
|
|
1870
|
+
k.value--, delete c[ue], delete w[ue];
|
|
1867
1871
|
};
|
|
1868
|
-
}, O =
|
|
1872
|
+
}, O = m(() => k.value === 0);
|
|
1869
1873
|
J(
|
|
1870
1874
|
() => r.modelValue,
|
|
1871
|
-
(
|
|
1872
|
-
if (
|
|
1875
|
+
(g) => {
|
|
1876
|
+
if (g == null || g === "") {
|
|
1873
1877
|
v.value = null;
|
|
1874
1878
|
return;
|
|
1875
1879
|
}
|
|
1876
|
-
v.value && v.value.value !==
|
|
1880
|
+
v.value && v.value.value !== g && (v.value = null);
|
|
1877
1881
|
}
|
|
1878
1882
|
);
|
|
1879
|
-
const $ =
|
|
1880
|
-
const
|
|
1881
|
-
return
|
|
1882
|
-
}), C =
|
|
1883
|
+
const $ = m(() => {
|
|
1884
|
+
const g = r.modelValue;
|
|
1885
|
+
return g != null && g !== "";
|
|
1886
|
+
}), C = m(() => {
|
|
1883
1887
|
if (!$.value) return "";
|
|
1884
|
-
const
|
|
1885
|
-
return v.value?.value ===
|
|
1886
|
-
}), E = (
|
|
1887
|
-
r.disabled || (v.value = { value:
|
|
1888
|
-
}, f = _(""),
|
|
1889
|
-
const
|
|
1890
|
-
return !r.filterable || !
|
|
1891
|
-
}), B =
|
|
1888
|
+
const g = r.modelValue;
|
|
1889
|
+
return v.value?.value === g ? v.value.label : c[d(g)] ?? String(g);
|
|
1890
|
+
}), E = (g) => r.modelValue === g, R = (g, N) => {
|
|
1891
|
+
r.disabled || (v.value = { value: g, label: N }, n("update:modelValue", g), n("change", g), a.value?.close());
|
|
1892
|
+
}, f = _(""), y = _(""), u = m(() => y.value.trim().toLowerCase()), T = m(() => {
|
|
1893
|
+
const g = u.value;
|
|
1894
|
+
return !r.filterable || !g ? !0 : Object.keys(c).some((N) => (w[N] ?? c[N]).toLowerCase().includes(g));
|
|
1895
|
+
}), B = m(
|
|
1892
1896
|
() => r.filterable && !!u.value && !T.value && !O.value
|
|
1893
1897
|
), D = () => {
|
|
1894
1898
|
r.filterable && (o(), l = setTimeout(() => {
|
|
1895
|
-
|
|
1899
|
+
y.value = f.value.trim(), l = null;
|
|
1896
1900
|
}, r.filterDebounceMs));
|
|
1897
1901
|
};
|
|
1898
1902
|
J(f, () => {
|
|
1899
1903
|
r.filterable && D();
|
|
1900
1904
|
}), J(
|
|
1901
1905
|
() => r.filterable,
|
|
1902
|
-
(
|
|
1903
|
-
|
|
1906
|
+
(g) => {
|
|
1907
|
+
g || (f.value = "", y.value = "", o());
|
|
1904
1908
|
}
|
|
1905
1909
|
), Ee(() => o());
|
|
1906
|
-
const W = (
|
|
1907
|
-
n("filter-input", String(
|
|
1908
|
-
},
|
|
1909
|
-
|
|
1910
|
+
const W = (g) => {
|
|
1911
|
+
n("filter-input", String(g ?? ""));
|
|
1912
|
+
}, b = () => {
|
|
1913
|
+
y.value = "", o(), n("filter-clear");
|
|
1910
1914
|
};
|
|
1911
|
-
|
|
1912
|
-
modelValue:
|
|
1913
|
-
disabled:
|
|
1915
|
+
Ht(cr, {
|
|
1916
|
+
modelValue: m(() => r.modelValue),
|
|
1917
|
+
disabled: m(() => !!r.disabled),
|
|
1914
1918
|
selectOption: R,
|
|
1915
1919
|
isOptionSelected: E,
|
|
1916
1920
|
registerOption: S,
|
|
1917
1921
|
filterQuery: u
|
|
1918
1922
|
});
|
|
1919
|
-
const A = (
|
|
1923
|
+
const A = (g) => typeof g == "number" ? `${g}px` : g, z = m(() => {
|
|
1920
1924
|
if (r.popperWidth) return A(r.popperWidth);
|
|
1921
|
-
const
|
|
1922
|
-
return typeof
|
|
1923
|
-
}),
|
|
1925
|
+
const g = r.triggerWidth;
|
|
1926
|
+
return typeof g == "number" ? g + 8 : `calc(${g} + 8px)`;
|
|
1927
|
+
}), Y = m(() => typeof z.value == "number" ? `${z.value - 12}px` : `calc(${z.value} - 12px)`), X = m(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), F = m(() => ({
|
|
1924
1928
|
width: A(r.triggerWidth)
|
|
1925
|
-
})),
|
|
1926
|
-
de.value =
|
|
1929
|
+
})), H = m(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), de = _(0), ce = (g) => {
|
|
1930
|
+
de.value = g.scrollTop;
|
|
1927
1931
|
};
|
|
1928
|
-
return (
|
|
1932
|
+
return (g, N) => (h(), x("div", {
|
|
1929
1933
|
class: j(["cregis-select", { "is-disabled": e.disabled }])
|
|
1930
1934
|
}, [
|
|
1931
|
-
U(
|
|
1935
|
+
U(pt, {
|
|
1932
1936
|
ref_key: "popoverRef",
|
|
1933
1937
|
ref: a,
|
|
1934
1938
|
"preserve-content-mount": "",
|
|
1935
1939
|
"popper-width": z.value,
|
|
1936
|
-
placement:
|
|
1940
|
+
placement: X.value,
|
|
1937
1941
|
disabled: !!e.disabled,
|
|
1938
1942
|
padding: 0,
|
|
1939
1943
|
"max-popper-height": e.maxPopperHeight,
|
|
1940
1944
|
onVisibleChange: s,
|
|
1941
|
-
onScroll:
|
|
1945
|
+
onScroll: ce
|
|
1942
1946
|
}, {
|
|
1943
1947
|
reference: Z(() => [
|
|
1944
1948
|
V("div", {
|
|
1945
1949
|
class: j(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
1946
|
-
style:
|
|
1950
|
+
style: ie(F.value)
|
|
1947
1951
|
}, [
|
|
1948
1952
|
V("div", Rn, [
|
|
1949
|
-
$.value ? q(
|
|
1953
|
+
$.value ? q(g.$slots, "label", {
|
|
1950
1954
|
key: 0,
|
|
1951
1955
|
modelValue: e.modelValue,
|
|
1952
1956
|
displayText: C.value,
|
|
@@ -1954,13 +1958,13 @@ const Bn = (e, t) => {
|
|
|
1954
1958
|
hasSelection: $.value
|
|
1955
1959
|
}, () => [
|
|
1956
1960
|
V("p", Dn, M(C.value), 1)
|
|
1957
|
-
]) : (
|
|
1961
|
+
]) : (h(), x("p", zn, M(e.placeholder), 1))
|
|
1958
1962
|
]),
|
|
1959
1963
|
V("span", {
|
|
1960
1964
|
class: j(["cregis-select__icon", { "is-open": i.value }])
|
|
1961
1965
|
}, [
|
|
1962
|
-
U(
|
|
1963
|
-
size:
|
|
1966
|
+
U(ne(Kt), {
|
|
1967
|
+
size: H.value,
|
|
1964
1968
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
|
|
1965
1969
|
}, null, 8, ["size", "color"])
|
|
1966
1970
|
], 2)
|
|
@@ -1970,30 +1974,30 @@ const Bn = (e, t) => {
|
|
|
1970
1974
|
V("div", {
|
|
1971
1975
|
class: j(["cregis-select__dropdown", { "is-empty": O.value }])
|
|
1972
1976
|
}, [
|
|
1973
|
-
O.value ? (
|
|
1974
|
-
e.filterable ? (
|
|
1977
|
+
O.value ? (h(), x("p", Wn, M(e.noDataText), 1)) : I("", !0),
|
|
1978
|
+
e.filterable ? (h(), x("div", {
|
|
1975
1979
|
key: 1,
|
|
1976
1980
|
class: j(["cregis-select__dropdown-filter", { "backdrop-fixed-header": de.value > 10 }])
|
|
1977
1981
|
}, [
|
|
1978
|
-
U(
|
|
1982
|
+
U(Qt, {
|
|
1979
1983
|
modelValue: f.value,
|
|
1980
|
-
"onUpdate:modelValue":
|
|
1984
|
+
"onUpdate:modelValue": N[0] || (N[0] = (K) => f.value = K),
|
|
1981
1985
|
placeholder: "search",
|
|
1982
|
-
width:
|
|
1986
|
+
width: Y.value,
|
|
1983
1987
|
size: "small",
|
|
1984
1988
|
clearable: "",
|
|
1985
1989
|
onInput: W,
|
|
1986
|
-
onClear:
|
|
1990
|
+
onClear: b
|
|
1987
1991
|
}, {
|
|
1988
1992
|
prefix: Z(() => [
|
|
1989
|
-
U(
|
|
1993
|
+
U(ne(Xt), { size: "14px" })
|
|
1990
1994
|
]),
|
|
1991
1995
|
_: 1
|
|
1992
1996
|
}, 8, ["modelValue", "width"])
|
|
1993
1997
|
], 2)) : I("", !0),
|
|
1994
|
-
B.value ? (
|
|
1998
|
+
B.value ? (h(), x("p", Ln, M(e.noMatchText), 1)) : I("", !0),
|
|
1995
1999
|
V("div", jn, [
|
|
1996
|
-
q(
|
|
2000
|
+
q(g.$slots, "default")
|
|
1997
2001
|
])
|
|
1998
2002
|
], 2)
|
|
1999
2003
|
]),
|
|
@@ -2001,7 +2005,7 @@ const Bn = (e, t) => {
|
|
|
2001
2005
|
}, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
|
|
2002
2006
|
], 2));
|
|
2003
2007
|
}
|
|
2004
|
-
}), Mn = ["aria-selected"], ci = /* @__PURE__ */
|
|
2008
|
+
}), Mn = ["aria-selected"], ci = /* @__PURE__ */ G({
|
|
2005
2009
|
name: "Option",
|
|
2006
2010
|
__name: "Option",
|
|
2007
2011
|
props: {
|
|
@@ -2011,19 +2015,19 @@ const Bn = (e, t) => {
|
|
|
2011
2015
|
filterText: {}
|
|
2012
2016
|
},
|
|
2013
2017
|
setup(e) {
|
|
2014
|
-
const t = e, r =
|
|
2018
|
+
const t = e, r = qt(cr, null);
|
|
2015
2019
|
let n;
|
|
2016
2020
|
const a = () => t.filterText ?? t.label, i = () => {
|
|
2017
2021
|
n?.(), r && (n = r.registerOption(t.value, t.label, a()));
|
|
2018
2022
|
};
|
|
2019
|
-
|
|
2020
|
-
const l =
|
|
2023
|
+
et(i), Ee(() => n?.()), J(() => [t.value, t.label, t.filterText], i);
|
|
2024
|
+
const l = m(() => r?.isOptionSelected(t.value) ?? !1), o = () => {
|
|
2021
2025
|
t.disabled || r?.disabled.value || r?.selectOption(t.value, t.label);
|
|
2022
|
-
}, s =
|
|
2026
|
+
}, s = m(() => r?.filterQuery?.value ?? ""), d = m(() => {
|
|
2023
2027
|
const c = s.value;
|
|
2024
2028
|
return c ? a().toLowerCase().includes(c) : !0;
|
|
2025
2029
|
});
|
|
2026
|
-
return (c, w) =>
|
|
2030
|
+
return (c, w) => je((h(), x("div", {
|
|
2027
2031
|
class: j(["cregis-select__option", { "is-selected": l.value, "is-disabled": e.disabled }]),
|
|
2028
2032
|
role: "option",
|
|
2029
2033
|
"aria-selected": l.value,
|
|
@@ -2038,7 +2042,7 @@ const Bn = (e, t) => {
|
|
|
2038
2042
|
$e(M(e.label), 1)
|
|
2039
2043
|
])
|
|
2040
2044
|
], 10, Mn)), [
|
|
2041
|
-
[
|
|
2045
|
+
[mt, d.value]
|
|
2042
2046
|
]);
|
|
2043
2047
|
}
|
|
2044
2048
|
}), _n = { class: "cregis-cascader__trigger-label" }, In = { class: "cregis-cascader__selected" }, Nn = {
|
|
@@ -2053,10 +2057,10 @@ const Bn = (e, t) => {
|
|
|
2053
2057
|
}, qn = { class: "cregis-cascader__dropdown-content" }, Un = {
|
|
2054
2058
|
key: 0,
|
|
2055
2059
|
class: "cregis-cascader__dropdown-item-popover"
|
|
2056
|
-
},
|
|
2060
|
+
}, Yn = { class: "cregis-cascader__suboption-amount-container" }, Xn = {
|
|
2057
2061
|
key: 0,
|
|
2058
2062
|
class: "cregis-cascader__suboption-amount"
|
|
2059
|
-
}, Kn = { class: "cregis-cascader__suboption-panel" }, Qn = ["onClick"], Gn = ["onClick"], ui = /* @__PURE__ */
|
|
2063
|
+
}, Kn = { class: "cregis-cascader__suboption-panel" }, Qn = ["onClick"], Gn = ["onClick"], ui = /* @__PURE__ */ G({
|
|
2060
2064
|
name: "Cascader",
|
|
2061
2065
|
__name: "Cascader",
|
|
2062
2066
|
props: {
|
|
@@ -2065,7 +2069,7 @@ const Bn = (e, t) => {
|
|
|
2065
2069
|
type: { default: "default" },
|
|
2066
2070
|
size: { default: "large" },
|
|
2067
2071
|
align: { default: "center" },
|
|
2068
|
-
placeholder: {
|
|
2072
|
+
placeholder: {},
|
|
2069
2073
|
disabled: { type: Boolean },
|
|
2070
2074
|
filterable: { type: Boolean },
|
|
2071
2075
|
filterDebounceMs: { default: 200 },
|
|
@@ -2074,7 +2078,7 @@ const Bn = (e, t) => {
|
|
|
2074
2078
|
triggerWidth: { default: "296px" },
|
|
2075
2079
|
popperWidth: {},
|
|
2076
2080
|
subPopperWidth: { default: "200px" },
|
|
2077
|
-
maxPopperHeight: {},
|
|
2081
|
+
maxPopperHeight: { default: 300 },
|
|
2078
2082
|
offset: { default: () => [0, 0] },
|
|
2079
2083
|
showSubOptionAmount: { type: Boolean, default: !0 }
|
|
2080
2084
|
},
|
|
@@ -2084,7 +2088,7 @@ const Bn = (e, t) => {
|
|
|
2084
2088
|
let l = null;
|
|
2085
2089
|
const o = () => {
|
|
2086
2090
|
l !== null && (clearTimeout(l), l = null);
|
|
2087
|
-
}, s = _(""), d = _(""), c =
|
|
2091
|
+
}, s = _(""), d = _(""), c = m(() => d.value.trim().toLowerCase()), w = () => {
|
|
2088
2092
|
r.filterable && (o(), l = setTimeout(() => {
|
|
2089
2093
|
d.value = s.value.trim(), l = null;
|
|
2090
2094
|
}, r.filterDebounceMs));
|
|
@@ -2103,13 +2107,13 @@ const Bn = (e, t) => {
|
|
|
2103
2107
|
d.value = "", o(), n("filter-clear");
|
|
2104
2108
|
}, S = (p) => (p.filterText ?? p.label).toLowerCase(), O = (p) => {
|
|
2105
2109
|
const L = c.value;
|
|
2106
|
-
return !L || S(p).includes(L) ? !0 : (p.children ?? []).some((
|
|
2110
|
+
return !L || S(p).includes(L) ? !0 : (p.children ?? []).some((ae) => S(ae).includes(L));
|
|
2107
2111
|
}, $ = (p, L) => {
|
|
2108
2112
|
const P = c.value;
|
|
2109
2113
|
return !P || S(p).includes(P) ? !0 : S(L).includes(P);
|
|
2110
|
-
}, C =
|
|
2114
|
+
}, C = m(() => r.options.filter((p) => O(p))), E = m(() => r.options.length === 0), R = m(() => (c.value, r.options.some((p) => O(p)))), f = m(
|
|
2111
2115
|
() => r.filterable && !!d.value.trim() && !R.value && !E.value
|
|
2112
|
-
),
|
|
2116
|
+
), y = (p) => {
|
|
2113
2117
|
i.value = p, n("visible-change", p), !p && r.filterable && (s.value = "", d.value = "", o());
|
|
2114
2118
|
}, u = _(null), T = (p) => {
|
|
2115
2119
|
const L = r.options.find((P) => P.value === p);
|
|
@@ -2121,13 +2125,13 @@ const Bn = (e, t) => {
|
|
|
2121
2125
|
sub: void 0
|
|
2122
2126
|
};
|
|
2123
2127
|
for (const P of r.options) {
|
|
2124
|
-
const
|
|
2125
|
-
if (
|
|
2128
|
+
const ae = P.children?.find((Q) => Q.value === p);
|
|
2129
|
+
if (ae)
|
|
2126
2130
|
return {
|
|
2127
2131
|
level: 2,
|
|
2128
|
-
label:
|
|
2132
|
+
label: ae.label,
|
|
2129
2133
|
primary: P,
|
|
2130
|
-
sub:
|
|
2134
|
+
sub: ae
|
|
2131
2135
|
};
|
|
2132
2136
|
}
|
|
2133
2137
|
return {
|
|
@@ -2136,7 +2140,7 @@ const Bn = (e, t) => {
|
|
|
2136
2140
|
primary: void 0,
|
|
2137
2141
|
sub: void 0
|
|
2138
2142
|
};
|
|
2139
|
-
}, B =
|
|
2143
|
+
}, B = m(() => {
|
|
2140
2144
|
const p = r.modelValue;
|
|
2141
2145
|
return p == null || p === "" ? {
|
|
2142
2146
|
level: 0,
|
|
@@ -2160,75 +2164,77 @@ const Bn = (e, t) => {
|
|
|
2160
2164
|
u.value !== null && u.value.value !== p && (u.value = null);
|
|
2161
2165
|
}
|
|
2162
2166
|
);
|
|
2163
|
-
const D =
|
|
2167
|
+
const D = m(() => B.value.level > 0), W = m(() => B.value.label), b = m(() => r.modelValue), A = m(() => W.value), z = m(() => B.value.level), Y = m(() => B.value.primary), X = m(() => B.value.sub), F = (p) => (p.children?.length ?? 0) > 0, H = (p) => r.modelValue === p, de = (p) => {
|
|
2164
2168
|
const L = r.modelValue;
|
|
2165
2169
|
return L == null || L === "" ? !1 : (p.children ?? []).some((P) => P.value === L);
|
|
2166
|
-
},
|
|
2170
|
+
}, ce = (p, L) => {
|
|
2167
2171
|
r.disabled || p.disabled || L.disabled || (u.value = { value: L.value, label: L.label, level: 2, primary: p, sub: L }, n("update:modelValue", L.value), n("change", L.value), a.value?.close());
|
|
2168
|
-
},
|
|
2169
|
-
r.disabled || p.disabled ||
|
|
2170
|
-
},
|
|
2172
|
+
}, g = (p) => {
|
|
2173
|
+
r.disabled || p.disabled || F(p) || (u.value = { value: p.value, label: p.label, level: 1, primary: p }, n("update:modelValue", p.value), n("change", p.value), a.value?.close());
|
|
2174
|
+
}, N = (p) => typeof p == "number" ? `${p}px` : p, K = m(() => {
|
|
2171
2175
|
if (r.popperWidth !== void 0 && r.popperWidth !== null && r.popperWidth !== "")
|
|
2172
|
-
return
|
|
2176
|
+
return N(r.popperWidth);
|
|
2173
2177
|
const p = r.triggerWidth;
|
|
2174
2178
|
return typeof p == "number" ? `${p + 8}px` : `calc(${p} + 8px)`;
|
|
2175
|
-
}),
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2179
|
+
}), ue = m(() => N(r.subPopperWidth)), he = m(() => typeof K.value == "number" ? `${K.value - 12}px` : `calc(${K.value} - 12px)`), fe = m(() => ({
|
|
2180
|
+
maxHeight: N(r.maxPopperHeight),
|
|
2181
|
+
overflowY: "auto"
|
|
2182
|
+
})), ye = { strategy: "fixed" }, Te = m(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), me = m(() => ({
|
|
2183
|
+
width: N(r.triggerWidth)
|
|
2184
|
+
})), Be = m(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), He = _(0), Ae = (p) => {
|
|
2185
|
+
const L = p.target;
|
|
2186
|
+
He.value = L.scrollTop;
|
|
2187
|
+
}, rt = [-16, -8];
|
|
2188
|
+
return (p, L) => (h(), x("div", {
|
|
2181
2189
|
class: j(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2182
2190
|
}, [
|
|
2183
|
-
U(
|
|
2191
|
+
U(pt, {
|
|
2184
2192
|
ref_key: "popoverRef",
|
|
2185
2193
|
ref: a,
|
|
2186
2194
|
"preserve-content-mount": "",
|
|
2187
2195
|
"popper-width": K.value,
|
|
2188
|
-
placement:
|
|
2196
|
+
placement: Te.value,
|
|
2189
2197
|
offset: e.offset,
|
|
2190
2198
|
disabled: !!e.disabled,
|
|
2191
2199
|
padding: 0,
|
|
2192
|
-
|
|
2193
|
-
onVisibleChange: m,
|
|
2194
|
-
onScroll: Be
|
|
2200
|
+
onVisibleChange: y
|
|
2195
2201
|
}, {
|
|
2196
2202
|
reference: Z(() => [
|
|
2197
2203
|
p.$slots.trigger ? q(p.$slots, "trigger", {
|
|
2198
2204
|
key: 0,
|
|
2199
|
-
modelValue:
|
|
2205
|
+
modelValue: b.value,
|
|
2200
2206
|
selectedLabel: A.value,
|
|
2201
2207
|
level: z.value,
|
|
2202
|
-
primaryOption:
|
|
2203
|
-
subOption:
|
|
2208
|
+
primaryOption: Y.value,
|
|
2209
|
+
subOption: X.value,
|
|
2204
2210
|
placeholder: e.placeholder,
|
|
2205
2211
|
hasSelection: D.value,
|
|
2206
2212
|
open: i.value,
|
|
2207
2213
|
disabled: !!e.disabled
|
|
2208
|
-
}) : (
|
|
2214
|
+
}) : (h(), x("div", {
|
|
2209
2215
|
key: 1,
|
|
2210
2216
|
class: j(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2211
|
-
style:
|
|
2217
|
+
style: ie(me.value)
|
|
2212
2218
|
}, [
|
|
2213
2219
|
V("div", _n, [
|
|
2214
2220
|
D.value ? q(p.$slots, "label", {
|
|
2215
2221
|
key: 0,
|
|
2216
|
-
modelValue:
|
|
2222
|
+
modelValue: b.value,
|
|
2217
2223
|
selectedLabel: A.value,
|
|
2218
2224
|
level: z.value,
|
|
2219
|
-
primaryOption:
|
|
2220
|
-
subOption:
|
|
2225
|
+
primaryOption: Y.value,
|
|
2226
|
+
subOption: X.value,
|
|
2221
2227
|
placeholder: e.placeholder,
|
|
2222
2228
|
hasSelection: D.value
|
|
2223
2229
|
}, () => [
|
|
2224
2230
|
V("p", In, M(W.value), 1)
|
|
2225
|
-
]) : (
|
|
2231
|
+
]) : (h(), x("p", Nn, M(e.placeholder), 1))
|
|
2226
2232
|
]),
|
|
2227
2233
|
V("span", {
|
|
2228
2234
|
class: j(["cregis-cascader__icon", { "is-open": i.value }])
|
|
2229
2235
|
}, [
|
|
2230
|
-
U(
|
|
2231
|
-
size:
|
|
2236
|
+
U(ne(Kt), {
|
|
2237
|
+
size: Be.value,
|
|
2232
2238
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
|
|
2233
2239
|
}, null, 8, ["size", "color"])
|
|
2234
2240
|
], 2)
|
|
@@ -2236,14 +2242,16 @@ const Bn = (e, t) => {
|
|
|
2236
2242
|
]),
|
|
2237
2243
|
default: Z(() => [
|
|
2238
2244
|
V("div", {
|
|
2239
|
-
class: j(["cregis-cascader__dropdown", { "is-empty": E.value }])
|
|
2245
|
+
class: j(["cregis-cascader__dropdown", { "is-empty": E.value }]),
|
|
2246
|
+
style: ie(fe.value),
|
|
2247
|
+
onScroll: Ae
|
|
2240
2248
|
}, [
|
|
2241
|
-
E.value ? (
|
|
2242
|
-
e.filterable ? (
|
|
2249
|
+
E.value ? (h(), x("p", Fn, M(e.noDataText), 1)) : I("", !0),
|
|
2250
|
+
e.filterable ? (h(), x("div", {
|
|
2243
2251
|
key: 1,
|
|
2244
|
-
class: j(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header":
|
|
2252
|
+
class: j(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": He.value > 10 }])
|
|
2245
2253
|
}, [
|
|
2246
|
-
U(
|
|
2254
|
+
U(Qt, {
|
|
2247
2255
|
modelValue: s.value,
|
|
2248
2256
|
"onUpdate:modelValue": L[0] || (L[0] = (P) => s.value = P),
|
|
2249
2257
|
placeholder: "search",
|
|
@@ -2254,23 +2262,24 @@ const Bn = (e, t) => {
|
|
|
2254
2262
|
onClear: v
|
|
2255
2263
|
}, {
|
|
2256
2264
|
prefix: Z(() => [
|
|
2257
|
-
U(
|
|
2265
|
+
U(ne(Xt), { size: "14px" })
|
|
2258
2266
|
]),
|
|
2259
2267
|
_: 1
|
|
2260
2268
|
}, 8, ["modelValue", "width"])
|
|
2261
2269
|
], 2)) : I("", !0),
|
|
2262
|
-
f.value ? (
|
|
2270
|
+
f.value ? (h(), x("p", Hn, M(e.noMatchText), 1)) : I("", !0),
|
|
2263
2271
|
V("ul", qn, [
|
|
2264
|
-
(
|
|
2272
|
+
(h(!0), x(lt, null, ct(C.value, (P, ae) => (h(), x("li", {
|
|
2265
2273
|
key: P.value,
|
|
2266
2274
|
class: j(["cregis-cascader__dropdown-item", { "is-disabled": P.disabled }])
|
|
2267
2275
|
}, [
|
|
2268
|
-
|
|
2269
|
-
U(
|
|
2276
|
+
F(P) ? (h(), x("div", Un, [
|
|
2277
|
+
U(pt, {
|
|
2270
2278
|
trigger: "hover",
|
|
2271
2279
|
placement: "right-start",
|
|
2272
|
-
offset:
|
|
2273
|
-
"
|
|
2280
|
+
offset: rt,
|
|
2281
|
+
"popover-options": ye,
|
|
2282
|
+
"popper-width": ue.value,
|
|
2274
2283
|
padding: 4,
|
|
2275
2284
|
disabled: !!P.disabled || !!e.disabled
|
|
2276
2285
|
}, {
|
|
@@ -2282,22 +2291,22 @@ const Bn = (e, t) => {
|
|
|
2282
2291
|
}])
|
|
2283
2292
|
}, [
|
|
2284
2293
|
q(p.$slots, "option", {
|
|
2285
|
-
modelValue:
|
|
2294
|
+
modelValue: b.value,
|
|
2286
2295
|
selectedLabel: A.value,
|
|
2287
2296
|
level: z.value,
|
|
2288
|
-
primaryOption:
|
|
2289
|
-
subOption:
|
|
2297
|
+
primaryOption: Y.value,
|
|
2298
|
+
subOption: X.value,
|
|
2290
2299
|
option: P,
|
|
2291
|
-
index:
|
|
2300
|
+
index: ae,
|
|
2292
2301
|
disabled: !!P.disabled,
|
|
2293
|
-
selected:
|
|
2302
|
+
selected: H(P.value),
|
|
2294
2303
|
isParentOfSelected: de(P)
|
|
2295
2304
|
}, () => [
|
|
2296
2305
|
V("p", null, M(P.label), 1)
|
|
2297
2306
|
]),
|
|
2298
|
-
V("div",
|
|
2299
|
-
e.showSubOptionAmount ? (
|
|
2300
|
-
U(
|
|
2307
|
+
V("div", Yn, [
|
|
2308
|
+
e.showSubOptionAmount ? (h(), x("div", Xn, M(P.children.length), 1)) : I("", !0),
|
|
2309
|
+
U(ne(br), {
|
|
2301
2310
|
size: "14px",
|
|
2302
2311
|
color: "currentColor"
|
|
2303
2312
|
})
|
|
@@ -2306,52 +2315,52 @@ const Bn = (e, t) => {
|
|
|
2306
2315
|
]),
|
|
2307
2316
|
default: Z(() => [
|
|
2308
2317
|
V("div", Kn, [
|
|
2309
|
-
(
|
|
2310
|
-
key:
|
|
2318
|
+
(h(!0), x(lt, null, ct(P.children, (Q, at) => je((h(), x("div", {
|
|
2319
|
+
key: Q.value,
|
|
2311
2320
|
class: j(["cregis-cascader__suboption-row", {
|
|
2312
|
-
"is-active":
|
|
2313
|
-
"is-disabled":
|
|
2321
|
+
"is-active": H(Q.value),
|
|
2322
|
+
"is-disabled": Q.disabled
|
|
2314
2323
|
}]),
|
|
2315
2324
|
role: "menuitem",
|
|
2316
|
-
onClick: (
|
|
2325
|
+
onClick: ($t) => ce(P, Q)
|
|
2317
2326
|
}, [
|
|
2318
2327
|
q(p.$slots, "subOption", {
|
|
2319
|
-
modelValue:
|
|
2328
|
+
modelValue: b.value,
|
|
2320
2329
|
selectedLabel: A.value,
|
|
2321
2330
|
level: z.value,
|
|
2322
|
-
primaryOption:
|
|
2323
|
-
subOption:
|
|
2324
|
-
option:
|
|
2325
|
-
index:
|
|
2331
|
+
primaryOption: Y.value,
|
|
2332
|
+
subOption: X.value,
|
|
2333
|
+
option: Q,
|
|
2334
|
+
index: at,
|
|
2326
2335
|
parent: P,
|
|
2327
|
-
parentIndex:
|
|
2328
|
-
selected:
|
|
2329
|
-
disabled: !!
|
|
2336
|
+
parentIndex: ae,
|
|
2337
|
+
selected: H(Q.value),
|
|
2338
|
+
disabled: !!Q.disabled
|
|
2330
2339
|
}, () => [
|
|
2331
|
-
$e(M(
|
|
2340
|
+
$e(M(Q.label), 1)
|
|
2332
2341
|
])
|
|
2333
2342
|
], 10, Qn)), [
|
|
2334
|
-
[
|
|
2343
|
+
[mt, $(P, Q)]
|
|
2335
2344
|
])), 128))
|
|
2336
2345
|
])
|
|
2337
2346
|
]),
|
|
2338
2347
|
_: 2
|
|
2339
2348
|
}, 1032, ["popper-width", "disabled"])
|
|
2340
|
-
])) : (
|
|
2349
|
+
])) : (h(), x("div", {
|
|
2341
2350
|
key: 1,
|
|
2342
2351
|
class: "cregis-cascader__leaf-only",
|
|
2343
|
-
onClick: (
|
|
2352
|
+
onClick: (Q) => g(P)
|
|
2344
2353
|
}, [
|
|
2345
2354
|
q(p.$slots, "option", {
|
|
2346
|
-
modelValue:
|
|
2355
|
+
modelValue: b.value,
|
|
2347
2356
|
selectedLabel: A.value,
|
|
2348
2357
|
level: z.value,
|
|
2349
|
-
primaryOption:
|
|
2350
|
-
subOption:
|
|
2358
|
+
primaryOption: Y.value,
|
|
2359
|
+
subOption: X.value,
|
|
2351
2360
|
option: P,
|
|
2352
|
-
index:
|
|
2361
|
+
index: ae,
|
|
2353
2362
|
disabled: !!P.disabled,
|
|
2354
|
-
selected:
|
|
2363
|
+
selected: H(P.value),
|
|
2355
2364
|
isParentOfSelected: !1
|
|
2356
2365
|
}, () => [
|
|
2357
2366
|
V("p", null, M(P.label), 1)
|
|
@@ -2359,28 +2368,28 @@ const Bn = (e, t) => {
|
|
|
2359
2368
|
], 8, Gn))
|
|
2360
2369
|
], 2))), 128))
|
|
2361
2370
|
])
|
|
2362
|
-
],
|
|
2371
|
+
], 38)
|
|
2363
2372
|
]),
|
|
2364
2373
|
_: 3
|
|
2365
|
-
}, 8, ["popper-width", "placement", "offset", "disabled"
|
|
2374
|
+
}, 8, ["popper-width", "placement", "offset", "disabled"])
|
|
2366
2375
|
], 2));
|
|
2367
2376
|
}
|
|
2368
2377
|
});
|
|
2369
2378
|
export {
|
|
2370
|
-
|
|
2379
|
+
Ye as Button,
|
|
2371
2380
|
ui as Cascader,
|
|
2372
2381
|
ei as Checkbox,
|
|
2373
2382
|
ri as Divider,
|
|
2374
|
-
|
|
2383
|
+
Qt as Input,
|
|
2375
2384
|
ii as Message,
|
|
2376
2385
|
oi as Notification,
|
|
2377
2386
|
ci as Option,
|
|
2378
|
-
|
|
2387
|
+
pt as Popover,
|
|
2379
2388
|
si as Progress,
|
|
2380
2389
|
ti as Radio,
|
|
2381
2390
|
li as Select,
|
|
2382
|
-
|
|
2391
|
+
Gt as TABS_KEY,
|
|
2383
2392
|
ni as TabPane,
|
|
2384
2393
|
ai as Tabs,
|
|
2385
|
-
|
|
2394
|
+
cr as selectInjectKey
|
|
2386
2395
|
};
|