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