@cregis/ui 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/cregis-ui.js +1280 -1221
- package/dist/index.css +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/dist/umd/index.css +1 -1
- package/package.json +1 -1
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { EdsLoad as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as G, useSlots as wa, ref as F, computed as m, createElementBlock as x, openBlock as p, normalizeClass as N, createElementVNode as z, createCommentVNode as H, mergeProps as Ce, createBlock as ve, resolveDynamicComponent as xt, normalizeStyle as ie, renderSlot as Y, toDisplayString as I, unref as ne, watch as ee, withDirectives as Fe, vModelDynamic as xa, withModifiers as kt, vModelText as ka, createVNode as K, withCtx as re, createTextVNode as ye, nextTick as Oe, reactive as Pe, provide as Qt, toRef as $a, Fragment as mt, renderList as gt, inject as Zt, onMounted as qe, onUnmounted as Se, onBeforeUnmount as Jt, Transition as lt, render as ze, h as $t, toHandlers as dt, Teleport as ea, vShow as Ct } from "vue";
|
|
2
|
+
import { EdsLoad as Ca, EdsCloseCircleFill as Oa, EdsTickFill as ta, EdsWarningFill as Sa, EdsSearch as aa, EdsArrowDownMiniIos as na, EdsArrowRightMiniIos as Ta, EdsAdd as Wt, EdsClose as Va, EdsWarningLonely as Ba } from "@cregis/icon";
|
|
3
|
+
const Pa = ["disabled"], Ea = ["disabled"], za = ["disabled"], Ee = /* @__PURE__ */ G({
|
|
4
4
|
name: "Button",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "Button",
|
|
@@ -21,14 +21,14 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
21
21
|
isActive: { type: Boolean }
|
|
22
22
|
},
|
|
23
23
|
setup(e) {
|
|
24
|
-
const a = e, t =
|
|
24
|
+
const a = e, t = wa(), r = F(null);
|
|
25
25
|
function n() {
|
|
26
26
|
a.disabled || a.loading || r.value?.click();
|
|
27
27
|
}
|
|
28
|
-
const i =
|
|
29
|
-
const c = a,
|
|
30
|
-
return !c.icon && typeof
|
|
31
|
-
}),
|
|
28
|
+
const i = m(() => {
|
|
29
|
+
const c = a, h = t.icon;
|
|
30
|
+
return !c.icon && typeof h == "function";
|
|
31
|
+
}), s = m(() => a.size === "large" ? "20px" : a.size === "medium" ? "16px" : "12px"), o = m(() => a.size === "large" || a.size === "medium" ? "16px" : "12px"), l = m(() => a.width ? { width: a.width } : void 0), d = m(() => {
|
|
32
32
|
if (a.plain || a.text)
|
|
33
33
|
switch (a.type) {
|
|
34
34
|
case "primary":
|
|
@@ -45,11 +45,11 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
45
45
|
else
|
|
46
46
|
return a.type === "secondary" ? "var(--material-base-secondary)" : a.type === "foreground" ? "var(--text-face-primary)" : a.type === "sameWhite" ? "var(--text-same-black-primary)" : "var(--material-same-white-primary)";
|
|
47
47
|
});
|
|
48
|
-
return (c,
|
|
48
|
+
return (c, h) => e.icon || c.$slots.icon ? (p(), x("div", {
|
|
49
49
|
key: 0,
|
|
50
|
-
class:
|
|
50
|
+
class: N(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
|
|
51
51
|
}, [
|
|
52
|
-
|
|
52
|
+
z("button", Ce({
|
|
53
53
|
ref_key: "iconButtonRef",
|
|
54
54
|
ref: r
|
|
55
55
|
}, c.$attrs, {
|
|
@@ -62,23 +62,23 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
62
62
|
}],
|
|
63
63
|
disabled: e.disabled || e.loading
|
|
64
64
|
}), [
|
|
65
|
-
e.icon ? (p(),
|
|
65
|
+
e.icon ? (p(), ve(xt(e.icon), {
|
|
66
66
|
key: 0,
|
|
67
|
-
size:
|
|
68
|
-
}, null, 8, ["size"])) : (p(),
|
|
67
|
+
size: s.value
|
|
68
|
+
}, null, 8, ["size"])) : (p(), x("span", {
|
|
69
69
|
key: 1,
|
|
70
70
|
class: "cregis-button__icon-slot-inner",
|
|
71
|
-
style:
|
|
71
|
+
style: ie({ "--cregis-btn-icon-slot-size": s.value })
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
Y(c.$slots, "icon")
|
|
74
74
|
], 4))
|
|
75
|
-
], 16,
|
|
76
|
-
e.iconText ? (p(),
|
|
75
|
+
], 16, Pa),
|
|
76
|
+
e.iconText ? (p(), x("span", {
|
|
77
77
|
key: 0,
|
|
78
|
-
class:
|
|
78
|
+
class: N(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
|
|
79
79
|
onClick: n
|
|
80
|
-
},
|
|
81
|
-
], 2)) : e.link ? (p(),
|
|
80
|
+
}, I(e.iconText), 3)) : H("", !0)
|
|
81
|
+
], 2)) : e.link ? (p(), x("button", Ce({ 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 Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
87
87
|
}],
|
|
88
88
|
disabled: e.disabled || e.loading
|
|
89
89
|
}), [
|
|
90
|
-
|
|
91
|
-
], 16,
|
|
90
|
+
Y(c.$slots, "default")
|
|
91
|
+
], 16, Ea)) : (p(), x("button", Ce({
|
|
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 Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
106
106
|
}],
|
|
107
107
|
disabled: e.disabled || e.loading
|
|
108
108
|
}), [
|
|
109
|
-
e.loading ? (p(),
|
|
109
|
+
e.loading ? (p(), ve(ne(Ca), {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: "loading",
|
|
112
112
|
size: o.value,
|
|
113
113
|
color: d.value
|
|
114
|
-
}, null, 8, ["size", "color"])) :
|
|
115
|
-
], 16,
|
|
114
|
+
}, null, 8, ["size", "color"])) : Y(c.$slots, "default", { key: 1 })
|
|
115
|
+
], 16, za));
|
|
116
116
|
}
|
|
117
|
-
}),
|
|
117
|
+
}), Aa = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "cregis-input__prefix"
|
|
120
|
-
},
|
|
120
|
+
}, Da = ["type", "inputmode", "placeholder", "min", "disabled"], Ra = {
|
|
121
121
|
key: 2,
|
|
122
122
|
class: "cregis-input__suffix"
|
|
123
|
-
},
|
|
123
|
+
}, Wa = ["disabled", "placeholder", "rows"], La = {
|
|
124
124
|
key: 0,
|
|
125
125
|
class: "cregis-textarea__buttons"
|
|
126
|
-
},
|
|
126
|
+
}, ra = /* @__PURE__ */ G({
|
|
127
127
|
name: "Input",
|
|
128
128
|
inheritAttrs: !1,
|
|
129
129
|
__name: "Input",
|
|
@@ -147,93 +147,93 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
147
147
|
setup(e, { expose: a, emit: t }) {
|
|
148
148
|
const r = e, n = t, i = (u) => {
|
|
149
149
|
if (u === "" || u === null || u === void 0) return "";
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
if (!Number.isNaN(
|
|
154
|
-
if (/^-/.test(
|
|
155
|
-
const
|
|
156
|
-
return
|
|
150
|
+
const y = String(u).trim();
|
|
151
|
+
if (y === "") return "";
|
|
152
|
+
const A = Number(y.replace(/,/g, ""));
|
|
153
|
+
if (!Number.isNaN(A) && A < 0) return Math.abs(A);
|
|
154
|
+
if (/^-/.test(y)) {
|
|
155
|
+
const U = y.replace(/^-+/, "");
|
|
156
|
+
return U === "" ? "" : U;
|
|
157
157
|
}
|
|
158
158
|
return u;
|
|
159
|
-
},
|
|
159
|
+
}, s = m(() => {
|
|
160
160
|
const u = r.decimals;
|
|
161
161
|
return u === void 0 || !Number.isFinite(u) ? null : Math.max(0, Math.floor(u));
|
|
162
|
-
}), o =
|
|
163
|
-
() => r.type === "number" &&
|
|
164
|
-
),
|
|
162
|
+
}), o = m(
|
|
163
|
+
() => r.type === "number" && s.value !== null
|
|
164
|
+
), l = m(
|
|
165
165
|
() => o.value ? "text" : r.type
|
|
166
|
-
), d =
|
|
166
|
+
), d = m(() => o.value ? "decimal" : void 0), c = (u) => u.replace(/[,,。.]/g, "."), h = (u) => {
|
|
167
167
|
if (u === "" || u === null || u === void 0) return "";
|
|
168
|
-
let
|
|
169
|
-
if (
|
|
170
|
-
let
|
|
171
|
-
!r.nonNegative &&
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
},
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
168
|
+
let y = c(String(u).trim());
|
|
169
|
+
if (y === "") return "";
|
|
170
|
+
let A = !1;
|
|
171
|
+
!r.nonNegative && y.startsWith("-") && (A = !0, y = y.slice(1)), y = y.replace(/[^\d.]/g, "");
|
|
172
|
+
const U = y.indexOf(".");
|
|
173
|
+
return U !== -1 && (y = y.slice(0, U + 1) + y.slice(U + 1).replace(/\./g, "")), (A ? "-" : "") + y;
|
|
174
|
+
}, w = (u) => {
|
|
175
|
+
const y = s.value;
|
|
176
|
+
if (y === null) return u;
|
|
177
177
|
if (u === "" || u === null || u === void 0) return "";
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
let
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
return
|
|
186
|
-
},
|
|
187
|
-
let
|
|
188
|
-
return o.value && (
|
|
189
|
-
},
|
|
190
|
-
r.type === "number" ?
|
|
178
|
+
const A = String(u).trim();
|
|
179
|
+
if (A === "") return "";
|
|
180
|
+
const U = A.startsWith("-");
|
|
181
|
+
let Q = U ? A.slice(1) : A;
|
|
182
|
+
const oe = Q.indexOf(".");
|
|
183
|
+
if (oe === -1) return u;
|
|
184
|
+
const ae = Q.slice(0, oe), le = Q.slice(oe + 1);
|
|
185
|
+
return y === 0 ? (U ? "-" : "") + ae : le.length <= y ? u : (U ? "-" : "") + ae + "." + le.slice(0, y);
|
|
186
|
+
}, g = (u) => {
|
|
187
|
+
let y = u;
|
|
188
|
+
return o.value && (y = h(y)), r.nonNegative && (y = i(y)), s.value !== null && (y = w(y)), y;
|
|
189
|
+
}, b = F(
|
|
190
|
+
r.type === "number" ? g(r.modelValue) : r.modelValue
|
|
191
191
|
);
|
|
192
|
-
|
|
192
|
+
ee(
|
|
193
193
|
() => r.modelValue,
|
|
194
194
|
(u) => {
|
|
195
|
-
|
|
195
|
+
b.value = r.type === "number" ? g(u) : u;
|
|
196
196
|
}
|
|
197
197
|
);
|
|
198
|
-
const O = F(),
|
|
199
|
-
let
|
|
200
|
-
const
|
|
201
|
-
await
|
|
202
|
-
},
|
|
198
|
+
const O = F(), B = F(0), k = F(!1);
|
|
199
|
+
let V = null;
|
|
200
|
+
const D = async () => {
|
|
201
|
+
await Oe(), O.value?.focus();
|
|
202
|
+
}, S = async () => {
|
|
203
203
|
if (r.type === "number") {
|
|
204
|
-
const u =
|
|
205
|
-
u !==
|
|
204
|
+
const u = g(b.value);
|
|
205
|
+
u !== b.value && (b.value = u);
|
|
206
206
|
}
|
|
207
|
-
n("update:modelValue",
|
|
208
|
-
},
|
|
209
|
-
n("change",
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
|
|
207
|
+
n("update:modelValue", b.value), n("input", b.value), await Oe(), _();
|
|
208
|
+
}, P = () => {
|
|
209
|
+
n("change", b.value);
|
|
210
|
+
}, $ = (u) => {
|
|
211
|
+
k.value = !0, n("focus", u);
|
|
212
|
+
}, T = (u) => {
|
|
213
|
+
k.value = !1, n("blur", u);
|
|
214
|
+
}, M = m(() => r.clearable && !r.disabled && !!b.value && k.value), j = () => {
|
|
215
|
+
b.value = "", n("update:modelValue", ""), n("clear"), n("input", ""), n("change", "");
|
|
216
|
+
}, _ = () => {
|
|
217
|
+
V && cancelAnimationFrame(V), V = requestAnimationFrame(() => {
|
|
218
218
|
if (!O.value || O.value.tagName !== "INPUT") return;
|
|
219
|
-
const u = O.value,
|
|
220
|
-
|
|
219
|
+
const u = O.value, y = u.value, A = document.createElement("span");
|
|
220
|
+
A.style.position = "absolute", A.style.visibility = "hidden", A.style.whiteSpace = "pre", A.style.font = window.getComputedStyle(u).font, A.style.letterSpacing = window.getComputedStyle(u).letterSpacing, A.textContent = y || " ", document.body.appendChild(A), B.value = A.getBoundingClientRect().width, document.body.removeChild(A);
|
|
221
221
|
});
|
|
222
|
-
},
|
|
222
|
+
}, R = m(() => {
|
|
223
223
|
const u = {};
|
|
224
|
-
return
|
|
225
|
-
}),
|
|
224
|
+
return B.value > 0 && (u.position = "absolute", u.left = `${B.value + 16}px`), u;
|
|
225
|
+
}), q = async () => {
|
|
226
226
|
try {
|
|
227
|
-
|
|
227
|
+
b.value = await navigator.clipboard.readText(), n("update:modelValue", b.value);
|
|
228
228
|
} catch (u) {
|
|
229
229
|
console.error("paste error:", u);
|
|
230
230
|
}
|
|
231
|
-
},
|
|
231
|
+
}, C = m(
|
|
232
232
|
() => r.type === "number" && r.nonNegative ? 0 : void 0
|
|
233
|
-
),
|
|
233
|
+
), W = (u) => u === "." || u === "," || u === "," || u === "。" || u === "." || u === "Decimal", te = (u) => {
|
|
234
234
|
if (r.type !== "number" || u.isComposing) return;
|
|
235
|
-
const
|
|
236
|
-
if ((r.nonNegative ||
|
|
235
|
+
const y = s.value;
|
|
236
|
+
if ((r.nonNegative || y !== null) && (u.key === "e" || u.key === "E")) {
|
|
237
237
|
u.preventDefault();
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
@@ -241,119 +241,119 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
241
241
|
u.preventDefault();
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
if (
|
|
244
|
+
if (y === 0 && W(u.key)) {
|
|
245
245
|
u.preventDefault();
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
if (
|
|
249
|
-
const
|
|
250
|
-
c(
|
|
248
|
+
if (y !== null && y > 0 && W(u.key)) {
|
|
249
|
+
const A = u.target;
|
|
250
|
+
c(A.value).includes(".") && u.preventDefault();
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
|
-
if (
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
const
|
|
257
|
-
|
|
253
|
+
if (y !== null && y > 0 && u.key !== "." && /^\d$/.test(u.key)) {
|
|
254
|
+
const A = u.target, U = c(A.value), Q = A.selectionStart, oe = A.selectionEnd;
|
|
255
|
+
if (Q === null || oe === null) return;
|
|
256
|
+
const ae = U.slice(0, Q) + u.key + U.slice(oe), le = ae.indexOf(".");
|
|
257
|
+
le !== -1 && ae.slice(le + 1).replace(/\D/g, "").length > y && u.preventDefault();
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
return a({
|
|
261
|
-
focus:
|
|
262
|
-
updateTextWidth:
|
|
263
|
-
}), (u,
|
|
261
|
+
focus: D,
|
|
262
|
+
updateTextWidth: _
|
|
263
|
+
}), (u, y) => e.type !== "textarea" ? (p(), x("div", {
|
|
264
264
|
key: 0,
|
|
265
|
-
class:
|
|
265
|
+
class: N(["cregis-input", {
|
|
266
266
|
[`cregis-input--${e.size}`]: e.size,
|
|
267
267
|
"is-disabled": e.disabled,
|
|
268
268
|
"is-prefix": u.$slots.prefix,
|
|
269
269
|
"is-suffix": u.$slots.suffix
|
|
270
270
|
}]),
|
|
271
|
-
style:
|
|
271
|
+
style: ie([{ width: e.width }, e.inputStyle])
|
|
272
272
|
}, [
|
|
273
|
-
|
|
274
|
-
class:
|
|
273
|
+
z("div", {
|
|
274
|
+
class: N(["cregis-input__wrapper", { "is-focus": k.value }])
|
|
275
275
|
}, [
|
|
276
|
-
u.$slots.prefix ? (p(),
|
|
277
|
-
|
|
278
|
-
])) :
|
|
279
|
-
|
|
276
|
+
u.$slots.prefix ? (p(), x("span", Aa, [
|
|
277
|
+
Y(u.$slots, "prefix")
|
|
278
|
+
])) : H("", !0),
|
|
279
|
+
Fe(z("input", Ce({
|
|
280
280
|
class: "cregis-input__inner",
|
|
281
|
-
"onUpdate:modelValue":
|
|
281
|
+
"onUpdate:modelValue": y[0] || (y[0] = (A) => b.value = A),
|
|
282
282
|
ref_key: "inputRef",
|
|
283
283
|
ref: O,
|
|
284
|
-
type:
|
|
284
|
+
type: l.value,
|
|
285
285
|
inputmode: d.value,
|
|
286
286
|
placeholder: e.placeholder
|
|
287
287
|
}, u.$attrs, {
|
|
288
|
-
min:
|
|
288
|
+
min: C.value,
|
|
289
289
|
spellcheck: "false",
|
|
290
290
|
disabled: e.disabled,
|
|
291
|
-
onInput:
|
|
292
|
-
onChange:
|
|
293
|
-
onFocus:
|
|
294
|
-
onBlur:
|
|
291
|
+
onInput: S,
|
|
292
|
+
onChange: P,
|
|
293
|
+
onFocus: $,
|
|
294
|
+
onBlur: T,
|
|
295
295
|
onKeydown: te
|
|
296
|
-
}), null, 16,
|
|
297
|
-
[
|
|
296
|
+
}), null, 16, Da), [
|
|
297
|
+
[xa, b.value]
|
|
298
298
|
]),
|
|
299
|
-
e.unit &&
|
|
299
|
+
e.unit && b.value ? (p(), x("span", {
|
|
300
300
|
key: 1,
|
|
301
|
-
style:
|
|
301
|
+
style: ie(R.value),
|
|
302
302
|
class: "cregis-input__unit"
|
|
303
|
-
},
|
|
304
|
-
u.$slots.suffix ||
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
}, I(e.unit), 5)) : H("", !0),
|
|
304
|
+
u.$slots.suffix || M.value ? (p(), x("span", Ra, [
|
|
305
|
+
Y(u.$slots, "suffix"),
|
|
306
|
+
M.value ? (p(), ve(Ee, {
|
|
307
307
|
key: 0,
|
|
308
|
-
icon:
|
|
308
|
+
icon: ne(Oa),
|
|
309
309
|
"icon-type": "square",
|
|
310
|
-
onClick:
|
|
311
|
-
onMousedown:
|
|
310
|
+
onClick: j,
|
|
311
|
+
onMousedown: y[1] || (y[1] = kt(() => {
|
|
312
312
|
}, ["prevent"]))
|
|
313
|
-
}, null, 8, ["icon"])) :
|
|
314
|
-
])) :
|
|
313
|
+
}, null, 8, ["icon"])) : H("", !0)
|
|
314
|
+
])) : H("", !0)
|
|
315
315
|
], 2)
|
|
316
|
-
], 6)) : (p(),
|
|
316
|
+
], 6)) : (p(), x("div", {
|
|
317
317
|
key: 1,
|
|
318
|
-
class:
|
|
319
|
-
style:
|
|
318
|
+
class: N(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
319
|
+
style: ie([{ width: e.width }, e.inputStyle])
|
|
320
320
|
}, [
|
|
321
|
-
|
|
321
|
+
Fe(z("textarea", Ce({ class: "cregis-textarea__wrapper" }, u.$attrs, {
|
|
322
322
|
spellcheck: "false",
|
|
323
323
|
ref_key: "inputRef",
|
|
324
324
|
ref: O,
|
|
325
325
|
disabled: e.disabled,
|
|
326
326
|
placeholder: e.placeholder,
|
|
327
327
|
rows: e.rows,
|
|
328
|
-
"onUpdate:modelValue":
|
|
329
|
-
onInput:
|
|
330
|
-
onChange:
|
|
331
|
-
onFocus:
|
|
332
|
-
onBlur:
|
|
333
|
-
}), null, 16,
|
|
334
|
-
[
|
|
328
|
+
"onUpdate:modelValue": y[2] || (y[2] = (A) => b.value = A),
|
|
329
|
+
onInput: S,
|
|
330
|
+
onChange: P,
|
|
331
|
+
onFocus: $,
|
|
332
|
+
onBlur: T
|
|
333
|
+
}), null, 16, Wa), [
|
|
334
|
+
[ka, b.value]
|
|
335
335
|
]),
|
|
336
|
-
e.disabled ?
|
|
337
|
-
K(
|
|
336
|
+
e.disabled ? H("", !0) : (p(), x("div", La, [
|
|
337
|
+
K(Ee, {
|
|
338
338
|
class: "cregis-textarea__button",
|
|
339
339
|
link: "",
|
|
340
340
|
size: "small",
|
|
341
|
-
onClick:
|
|
341
|
+
onClick: q
|
|
342
342
|
}, {
|
|
343
|
-
default:
|
|
344
|
-
|
|
343
|
+
default: re(() => [
|
|
344
|
+
ye(I(e.pasteText), 1)
|
|
345
345
|
]),
|
|
346
346
|
_: 1
|
|
347
347
|
}),
|
|
348
|
-
K(
|
|
348
|
+
K(Ee, {
|
|
349
349
|
class: "cregis-textarea__button",
|
|
350
350
|
link: "",
|
|
351
351
|
size: "small",
|
|
352
|
-
disabled: !
|
|
353
|
-
onClick:
|
|
352
|
+
disabled: !b.value,
|
|
353
|
+
onClick: j
|
|
354
354
|
}, {
|
|
355
|
-
default:
|
|
356
|
-
|
|
355
|
+
default: re(() => [
|
|
356
|
+
ye(I(e.clearText), 1)
|
|
357
357
|
]),
|
|
358
358
|
_: 1
|
|
359
359
|
}, 8, ["disabled"])
|
|
@@ -365,13 +365,13 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
365
365
|
"stroke-width": "1",
|
|
366
366
|
fill: "none",
|
|
367
367
|
"fill-rule": "evenodd"
|
|
368
|
-
}, Na = { transform: "translate(-394.000000, -457.000000)" }, Ia = { transform: "translate(394.000000, 457.000000)" }, _a = ["width", "height"], Fa = /* @__PURE__ */
|
|
368
|
+
}, Na = { transform: "translate(-394.000000, -457.000000)" }, Ia = { transform: "translate(394.000000, 457.000000)" }, _a = ["width", "height"], Fa = /* @__PURE__ */ G({
|
|
369
369
|
__name: "checked-basis",
|
|
370
370
|
props: {
|
|
371
371
|
size: { default: "16px" }
|
|
372
372
|
},
|
|
373
373
|
setup(e) {
|
|
374
|
-
return (a, t) => (p(),
|
|
374
|
+
return (a, t) => (p(), x("svg", {
|
|
375
375
|
width: e.size,
|
|
376
376
|
height: e.size,
|
|
377
377
|
viewBox: "0 0 16 16",
|
|
@@ -379,16 +379,16 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
379
379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
380
380
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
381
381
|
}, [
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
382
|
+
z("g", ja, [
|
|
383
|
+
z("g", Na, [
|
|
384
|
+
z("g", Ia, [
|
|
385
|
+
z("rect", {
|
|
386
386
|
x: "0",
|
|
387
387
|
y: "0",
|
|
388
388
|
width: e.size,
|
|
389
389
|
height: e.size
|
|
390
390
|
}, null, 8, _a),
|
|
391
|
-
t[0] || (t[0] =
|
|
391
|
+
t[0] || (t[0] = z("path", {
|
|
392
392
|
d: "M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",
|
|
393
393
|
fill: "currentColor",
|
|
394
394
|
"fill-rule": "nonzero"
|
|
@@ -401,7 +401,7 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
401
401
|
}), Ha = {
|
|
402
402
|
key: 0,
|
|
403
403
|
class: "cregis-checkbox--indeterminate"
|
|
404
|
-
}, Ua = /* @__PURE__ */
|
|
404
|
+
}, Ua = /* @__PURE__ */ G({
|
|
405
405
|
name: "Checkbox",
|
|
406
406
|
__name: "Checkbox",
|
|
407
407
|
props: {
|
|
@@ -413,42 +413,42 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
413
413
|
},
|
|
414
414
|
emits: ["update:modelValue", "change"],
|
|
415
415
|
setup(e, { emit: a }) {
|
|
416
|
-
const t = e, r = a, n =
|
|
416
|
+
const t = e, r = a, n = m(() => t.modelValue), i = () => {
|
|
417
417
|
t.disabled || r("update:modelValue", !n.value);
|
|
418
418
|
};
|
|
419
|
-
return
|
|
419
|
+
return ee(
|
|
420
420
|
() => n.value,
|
|
421
421
|
() => {
|
|
422
422
|
r("change", n.value);
|
|
423
423
|
}
|
|
424
|
-
), (
|
|
424
|
+
), (s, o) => (p(), x("div", {
|
|
425
425
|
class: "cregis-checkbox__wrapper",
|
|
426
426
|
onClick: i
|
|
427
427
|
}, [
|
|
428
|
-
|
|
429
|
-
class:
|
|
428
|
+
z("div", {
|
|
429
|
+
class: N(["cregis-checkbox", {
|
|
430
430
|
"is-disabled": e.disabled,
|
|
431
431
|
"is-checked": n.value,
|
|
432
432
|
"is-circle": e.circle,
|
|
433
433
|
"is-indeterminate": e.indeterminate
|
|
434
434
|
}])
|
|
435
435
|
}, [
|
|
436
|
-
e.indeterminate ? (p(),
|
|
436
|
+
e.indeterminate ? (p(), x("div", Ha)) : (p(), ve(Fa, {
|
|
437
437
|
key: 1,
|
|
438
438
|
size: "10px"
|
|
439
439
|
}))
|
|
440
440
|
], 2),
|
|
441
|
-
|
|
441
|
+
s.$slots.default || e.label ? (p(), x("span", {
|
|
442
442
|
key: 0,
|
|
443
|
-
class:
|
|
443
|
+
class: N(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
444
444
|
}, [
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
Y(s.$slots, "default", {}, () => [
|
|
446
|
+
ye(I(e.label), 1)
|
|
447
447
|
])
|
|
448
|
-
], 2)) :
|
|
448
|
+
], 2)) : H("", !0)
|
|
449
449
|
]));
|
|
450
450
|
}
|
|
451
|
-
}),
|
|
451
|
+
}), Oi = /* @__PURE__ */ G({
|
|
452
452
|
name: "Radio",
|
|
453
453
|
__name: "Radio",
|
|
454
454
|
props: {
|
|
@@ -459,32 +459,32 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
459
459
|
},
|
|
460
460
|
emits: ["update:modelValue", "change"],
|
|
461
461
|
setup(e, { emit: a }) {
|
|
462
|
-
const t = e, r = a, n =
|
|
462
|
+
const t = e, r = a, n = m(() => t.modelValue === t.value), i = () => {
|
|
463
463
|
t.disabled || (r("update:modelValue", t.value), r("change", t.value));
|
|
464
464
|
};
|
|
465
|
-
return (
|
|
465
|
+
return (s, o) => (p(), x("div", {
|
|
466
466
|
class: "cregis-radio__wrapper",
|
|
467
467
|
onClick: i
|
|
468
468
|
}, [
|
|
469
|
-
|
|
470
|
-
class:
|
|
469
|
+
z("div", {
|
|
470
|
+
class: N(["cregis-radio", {
|
|
471
471
|
"is-disabled": e.disabled,
|
|
472
472
|
"is-checked": n.value
|
|
473
473
|
}])
|
|
474
474
|
}, [...o[0] || (o[0] = [
|
|
475
|
-
|
|
475
|
+
z("div", { class: "cregis-radio__inner" }, null, -1)
|
|
476
476
|
])], 2),
|
|
477
|
-
|
|
477
|
+
s.$slots.default || e.label ? (p(), x("span", {
|
|
478
478
|
key: 0,
|
|
479
|
-
class:
|
|
479
|
+
class: N(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
480
480
|
}, [
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
Y(s.$slots, "default", {}, () => [
|
|
482
|
+
ye(I(e.label), 1)
|
|
483
483
|
])
|
|
484
|
-
], 2)) :
|
|
484
|
+
], 2)) : H("", !0)
|
|
485
485
|
]));
|
|
486
486
|
}
|
|
487
|
-
}),
|
|
487
|
+
}), Si = /* @__PURE__ */ G({
|
|
488
488
|
name: "Divider",
|
|
489
489
|
__name: "Divider",
|
|
490
490
|
props: {
|
|
@@ -496,13 +496,13 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
496
496
|
length: {}
|
|
497
497
|
},
|
|
498
498
|
setup(e) {
|
|
499
|
-
const a = e, t =
|
|
499
|
+
const a = e, t = m(() => {
|
|
500
500
|
if (Array.isArray(a.margin)) {
|
|
501
501
|
const [n, i] = a.margin;
|
|
502
502
|
return a.direction === "horizontal" ? `${n} 0 ${i} 0` : `0 ${i} 0 ${n}`;
|
|
503
503
|
} else
|
|
504
504
|
return a.direction === "horizontal" ? `${a.margin} 0` : `0 ${a.margin}`;
|
|
505
|
-
}), r =
|
|
505
|
+
}), r = m(() => a.direction === "horizontal" ? {
|
|
506
506
|
width: a.length || "100%",
|
|
507
507
|
borderTopWidth: a.lineThickness,
|
|
508
508
|
borderTopStyle: a.borderStyle,
|
|
@@ -515,14 +515,14 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
515
515
|
borderLeftColor: a.color,
|
|
516
516
|
margin: t.value
|
|
517
517
|
});
|
|
518
|
-
return (n, i) => (p(),
|
|
519
|
-
class:
|
|
518
|
+
return (n, i) => (p(), x("div", {
|
|
519
|
+
class: N(["cregis-divider", {
|
|
520
520
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
521
521
|
}]),
|
|
522
|
-
style:
|
|
522
|
+
style: ie(r.value)
|
|
523
523
|
}, null, 6));
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
525
|
+
}), ia = Symbol("TABS_KEY"), qa = ["onClick"], Ya = { style: { display: "none" } }, Ti = /* @__PURE__ */ G({
|
|
526
526
|
name: "Tabs",
|
|
527
527
|
__name: "Tabs",
|
|
528
528
|
props: {
|
|
@@ -532,12 +532,12 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
532
532
|
},
|
|
533
533
|
emits: ["update:modelValue"],
|
|
534
534
|
setup(e) {
|
|
535
|
-
const a = e, t =
|
|
536
|
-
t.some((o) => o.name ===
|
|
537
|
-
}, n = (
|
|
538
|
-
const o = t.findIndex((
|
|
535
|
+
const a = e, t = Pe([]), r = (s) => {
|
|
536
|
+
t.some((o) => o.name === s.name) || t.push(s);
|
|
537
|
+
}, n = (s) => {
|
|
538
|
+
const o = t.findIndex((l) => l.name === s);
|
|
539
539
|
o !== -1 && t.splice(o, 1);
|
|
540
|
-
}, i =
|
|
540
|
+
}, i = m(() => a.type === "card" ? a.size === "large" ? {
|
|
541
541
|
borderRadius: "13px"
|
|
542
542
|
} : a.size === "medium" ? {
|
|
543
543
|
borderRadius: "11px"
|
|
@@ -546,30 +546,30 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
546
546
|
} : {
|
|
547
547
|
borderRadius: 0
|
|
548
548
|
});
|
|
549
|
-
return Qt(
|
|
550
|
-
activeName:
|
|
549
|
+
return Qt(ia, {
|
|
550
|
+
activeName: $a(a, "modelValue"),
|
|
551
551
|
registerTab: r,
|
|
552
552
|
unregisterTab: n
|
|
553
|
-
}), (
|
|
554
|
-
class:
|
|
553
|
+
}), (s, o) => (p(), x("div", {
|
|
554
|
+
class: N(["cregis-tabs", {
|
|
555
555
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
556
556
|
[`cregis-tabs--${e.size}`]: e.size
|
|
557
557
|
}])
|
|
558
558
|
}, [
|
|
559
|
-
(p(!0),
|
|
560
|
-
key:
|
|
561
|
-
class:
|
|
562
|
-
style:
|
|
563
|
-
onClick: (d) =>
|
|
559
|
+
(p(!0), x(mt, null, gt(t, (l) => (p(), x("div", {
|
|
560
|
+
key: l.name,
|
|
561
|
+
class: N(["cregis-tabs__item", { "is-active": e.modelValue === l.name }]),
|
|
562
|
+
style: ie(i.value),
|
|
563
|
+
onClick: (d) => s.$emit("update:modelValue", l.name)
|
|
564
564
|
}, [
|
|
565
|
-
|
|
565
|
+
z("span", null, I(l.label), 1)
|
|
566
566
|
], 14, qa))), 128)),
|
|
567
|
-
|
|
568
|
-
|
|
567
|
+
z("div", Ya, [
|
|
568
|
+
Y(s.$slots, "default")
|
|
569
569
|
])
|
|
570
570
|
], 2));
|
|
571
571
|
}
|
|
572
|
-
}),
|
|
572
|
+
}), Vi = /* @__PURE__ */ G({
|
|
573
573
|
name: "TabPane",
|
|
574
574
|
__name: "TabPane",
|
|
575
575
|
props: {
|
|
@@ -577,16 +577,16 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
577
577
|
name: {}
|
|
578
578
|
},
|
|
579
579
|
setup(e) {
|
|
580
|
-
const a = e, t = Zt(
|
|
580
|
+
const a = e, t = Zt(ia);
|
|
581
581
|
if (!t) throw new Error("TabPane must be used within Tabs");
|
|
582
|
-
return
|
|
582
|
+
return qe(() => {
|
|
583
583
|
t.registerTab({ label: a.label, name: a.name });
|
|
584
|
-
}),
|
|
584
|
+
}), ee(
|
|
585
585
|
() => a.label,
|
|
586
586
|
(r) => {
|
|
587
587
|
t.unregisterTab(a.name), t.registerTab({ label: r, name: a.name });
|
|
588
588
|
}
|
|
589
|
-
),
|
|
589
|
+
), Se(() => {
|
|
590
590
|
t.unregisterTab(a.name);
|
|
591
591
|
}), (r, n) => null;
|
|
592
592
|
}
|
|
@@ -595,7 +595,7 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
595
595
|
class: "cregis-message--success",
|
|
596
596
|
role: "status",
|
|
597
597
|
"aria-live": "polite"
|
|
598
|
-
}, Ka = { class: "cregis-message__icon" }, Ga = /* @__PURE__ */
|
|
598
|
+
}, Ka = { class: "cregis-message__icon" }, Ga = /* @__PURE__ */ G({
|
|
599
599
|
name: "Message",
|
|
600
600
|
__name: "Message",
|
|
601
601
|
props: {
|
|
@@ -616,38 +616,38 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
616
616
|
};
|
|
617
617
|
return Jt(() => {
|
|
618
618
|
r !== void 0 && clearTimeout(r);
|
|
619
|
-
}),
|
|
619
|
+
}), Oe(() => {
|
|
620
620
|
t.value = !0;
|
|
621
|
-
}), (
|
|
622
|
-
class:
|
|
621
|
+
}), (s, o) => (p(), x("div", {
|
|
622
|
+
class: N(["cregis-message__wrapper", { "cregis-message__wrapper--success": e.type === "success" }])
|
|
623
623
|
}, [
|
|
624
|
-
K(
|
|
624
|
+
K(lt, {
|
|
625
625
|
name: "cregis-message",
|
|
626
626
|
onAfterEnter: n,
|
|
627
627
|
onAfterLeave: i
|
|
628
628
|
}, {
|
|
629
|
-
default:
|
|
630
|
-
t.value && e.type !== "success" ? (p(),
|
|
629
|
+
default: re(() => [
|
|
630
|
+
t.value && e.type !== "success" ? (p(), x("div", {
|
|
631
631
|
key: 0,
|
|
632
|
-
class:
|
|
632
|
+
class: N(["cregis-message", { "cregis-message--danger": e.type === "danger" }]),
|
|
633
633
|
role: "status",
|
|
634
634
|
"aria-live": "polite"
|
|
635
|
-
},
|
|
636
|
-
|
|
637
|
-
K(
|
|
635
|
+
}, I(e.message), 3)) : t.value && e.type === "success" ? (p(), x("div", Xa, [
|
|
636
|
+
z("div", Ka, [
|
|
637
|
+
K(ne(ta), {
|
|
638
638
|
size: "16px",
|
|
639
639
|
color: "var(--material-same-white-primary)"
|
|
640
640
|
})
|
|
641
641
|
]),
|
|
642
|
-
|
|
643
|
-
])) :
|
|
642
|
+
z("p", null, I(e.message), 1)
|
|
643
|
+
])) : H("", !0)
|
|
644
644
|
]),
|
|
645
645
|
_: 1
|
|
646
646
|
})
|
|
647
647
|
], 2));
|
|
648
648
|
}
|
|
649
649
|
});
|
|
650
|
-
let
|
|
650
|
+
let ft = !1;
|
|
651
651
|
function Qa(e) {
|
|
652
652
|
return typeof e == "string" ? { message: e, duration: 1e3, type: "default" } : {
|
|
653
653
|
message: e.message,
|
|
@@ -656,17 +656,17 @@ function Qa(e) {
|
|
|
656
656
|
};
|
|
657
657
|
}
|
|
658
658
|
function Lt(e) {
|
|
659
|
-
if (
|
|
659
|
+
if (ft) return;
|
|
660
660
|
const { message: a, duration: t, type: r } = Qa(e);
|
|
661
|
-
|
|
661
|
+
ft = !0;
|
|
662
662
|
const n = document.createElement("div");
|
|
663
|
-
document.body.appendChild(n),
|
|
664
|
-
|
|
663
|
+
document.body.appendChild(n), ze(
|
|
664
|
+
$t(Ga, {
|
|
665
665
|
message: a,
|
|
666
666
|
duration: t,
|
|
667
667
|
type: r,
|
|
668
668
|
onVanish: () => {
|
|
669
|
-
|
|
669
|
+
ft = !1, ze(null, n), n.remove();
|
|
670
670
|
}
|
|
671
671
|
}),
|
|
672
672
|
n
|
|
@@ -677,7 +677,7 @@ const Za = { class: "cregis-notification__wrapper" }, Ja = {
|
|
|
677
677
|
class: "cregis-notification",
|
|
678
678
|
role: "status",
|
|
679
679
|
"aria-live": "polite"
|
|
680
|
-
}, en = { class: "cregis-notification__content" }, tn = { class: "cregis-notification__title" }, an = { class: "cregis-notification__message" }, nn = /* @__PURE__ */
|
|
680
|
+
}, en = { class: "cregis-notification__content" }, tn = { class: "cregis-notification__title" }, an = { class: "cregis-notification__message" }, nn = /* @__PURE__ */ G({
|
|
681
681
|
name: "Notification",
|
|
682
682
|
__name: "Notification",
|
|
683
683
|
props: {
|
|
@@ -694,53 +694,53 @@ const Za = { class: "cregis-notification__wrapper" }, Ja = {
|
|
|
694
694
|
a.onVanish?.();
|
|
695
695
|
};
|
|
696
696
|
return Jt(() => {
|
|
697
|
-
}),
|
|
697
|
+
}), Oe(() => {
|
|
698
698
|
t.value = !0;
|
|
699
|
-
}), (i,
|
|
700
|
-
K(
|
|
699
|
+
}), (i, s) => (p(), x("div", Za, [
|
|
700
|
+
K(lt, {
|
|
701
701
|
name: "cregis-notification",
|
|
702
702
|
onAfterLeave: n
|
|
703
703
|
}, {
|
|
704
|
-
default:
|
|
705
|
-
t.value ? (p(),
|
|
706
|
-
(p(),
|
|
704
|
+
default: re(() => [
|
|
705
|
+
t.value ? (p(), x("div", Ja, [
|
|
706
|
+
(p(), ve(xt(ne(Sa)), {
|
|
707
707
|
size: "18px",
|
|
708
708
|
color: "var(--material-danger-primary)"
|
|
709
709
|
})),
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
z("div", en, [
|
|
711
|
+
z("div", tn, I(e.title), 1),
|
|
712
|
+
z("div", an, I(e.message), 1)
|
|
713
713
|
]),
|
|
714
|
-
K(
|
|
714
|
+
K(Ee, {
|
|
715
715
|
type: "sameWhite",
|
|
716
716
|
onClick: r
|
|
717
717
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
|
|
718
|
+
default: re(() => [
|
|
719
|
+
ye(I(e.btnText), 1)
|
|
720
720
|
]),
|
|
721
721
|
_: 1
|
|
722
722
|
})
|
|
723
|
-
])) :
|
|
723
|
+
])) : H("", !0)
|
|
724
724
|
]),
|
|
725
725
|
_: 1
|
|
726
726
|
})
|
|
727
727
|
]));
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
|
-
let
|
|
731
|
-
function
|
|
732
|
-
if (
|
|
730
|
+
let pt = !1;
|
|
731
|
+
function Bi(e) {
|
|
732
|
+
if (pt) return;
|
|
733
733
|
const { title: a, message: t, type: r, btnText: n } = e;
|
|
734
|
-
|
|
734
|
+
pt = !0;
|
|
735
735
|
const i = document.createElement("div");
|
|
736
|
-
document.body.appendChild(i),
|
|
737
|
-
|
|
736
|
+
document.body.appendChild(i), ze(
|
|
737
|
+
$t(nn, {
|
|
738
738
|
title: a,
|
|
739
739
|
message: t,
|
|
740
740
|
type: r,
|
|
741
741
|
btnText: n,
|
|
742
742
|
onVanish: () => {
|
|
743
|
-
|
|
743
|
+
pt = !1, ze(null, i), i.remove();
|
|
744
744
|
}
|
|
745
745
|
}),
|
|
746
746
|
i
|
|
@@ -749,7 +749,7 @@ function Ei(e) {
|
|
|
749
749
|
const rn = { class: "cregis-progress__wrapper" }, on = { class: "cregis-progress__track-wrap" }, ln = { class: "cregis-progress cregis-progress--striped active" }, sn = {
|
|
750
750
|
key: 0,
|
|
751
751
|
class: "cregis-progress__sliding-block"
|
|
752
|
-
},
|
|
752
|
+
}, Pi = /* @__PURE__ */ G({
|
|
753
753
|
name: "Progress",
|
|
754
754
|
__name: "Progress",
|
|
755
755
|
props: {
|
|
@@ -759,40 +759,40 @@ const rn = { class: "cregis-progress__wrapper" }, on = { class: "cregis-progress
|
|
|
759
759
|
loading: { type: Boolean, default: !1 }
|
|
760
760
|
},
|
|
761
761
|
setup(e) {
|
|
762
|
-
const a = e, t =
|
|
762
|
+
const a = e, t = m(() => Math.min(100, Math.max(0, a.percentage - 1))), r = m(() => ({
|
|
763
763
|
width: `${a.percentage}%`,
|
|
764
764
|
height: `${a.strokeWidth}px`
|
|
765
|
-
})), n =
|
|
765
|
+
})), n = m(() => ({
|
|
766
766
|
"--cregis-progress-tip-left": `${t.value}%`
|
|
767
|
-
})), i =
|
|
768
|
-
return (
|
|
769
|
-
|
|
770
|
-
e.showPercentage && !a.loading ? (p(),
|
|
767
|
+
})), i = m(() => `${Math.round(a.percentage)}%`);
|
|
768
|
+
return (s, o) => (p(), x("div", rn, [
|
|
769
|
+
z("div", on, [
|
|
770
|
+
e.showPercentage && !a.loading ? (p(), x("div", {
|
|
771
771
|
key: 0,
|
|
772
772
|
class: "cregis-progress__tip",
|
|
773
|
-
style:
|
|
773
|
+
style: ie(n.value),
|
|
774
774
|
"aria-live": "polite"
|
|
775
|
-
},
|
|
776
|
-
|
|
777
|
-
|
|
775
|
+
}, I(i.value), 5)) : H("", !0),
|
|
776
|
+
z("div", ln, [
|
|
777
|
+
z("div", {
|
|
778
778
|
class: "cregis-progress__bar",
|
|
779
|
-
style:
|
|
779
|
+
style: ie(r.value)
|
|
780
780
|
}, null, 4),
|
|
781
|
-
a.loading ? (p(),
|
|
781
|
+
a.loading ? (p(), x("div", sn)) : H("", !0)
|
|
782
782
|
])
|
|
783
783
|
])
|
|
784
784
|
]));
|
|
785
785
|
}
|
|
786
786
|
});
|
|
787
|
-
var
|
|
787
|
+
var ce = "top", ge = "bottom", he = "right", ue = "left", Ot = "auto", Ye = [ce, ge, he, ue], Ae = "start", He = "end", cn = "clippingParents", oa = "viewport", Me = "popper", un = "reference", Mt = /* @__PURE__ */ Ye.reduce(function(e, a) {
|
|
788
788
|
return e.concat([a + "-" + Ae, a + "-" + He]);
|
|
789
|
-
}, []),
|
|
789
|
+
}, []), la = /* @__PURE__ */ [].concat(Ye, [Ot]).reduce(function(e, a) {
|
|
790
790
|
return e.concat([a, a + "-" + Ae, a + "-" + He]);
|
|
791
791
|
}, []), dn = "beforeRead", fn = "read", pn = "afterRead", vn = "beforeMain", mn = "main", gn = "afterMain", hn = "beforeWrite", bn = "write", yn = "afterWrite", wn = [dn, fn, pn, vn, mn, gn, hn, bn, yn];
|
|
792
|
-
function
|
|
792
|
+
function ke(e) {
|
|
793
793
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function fe(e) {
|
|
796
796
|
if (e == null)
|
|
797
797
|
return window;
|
|
798
798
|
if (e.toString() !== "[object Window]") {
|
|
@@ -801,27 +801,27 @@ function se(e) {
|
|
|
801
801
|
}
|
|
802
802
|
return e;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
var a =
|
|
804
|
+
function Be(e) {
|
|
805
|
+
var a = fe(e).Element;
|
|
806
806
|
return e instanceof a || e instanceof Element;
|
|
807
807
|
}
|
|
808
|
-
function
|
|
809
|
-
var a =
|
|
808
|
+
function me(e) {
|
|
809
|
+
var a = fe(e).HTMLElement;
|
|
810
810
|
return e instanceof a || e instanceof HTMLElement;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function St(e) {
|
|
813
813
|
if (typeof ShadowRoot > "u")
|
|
814
814
|
return !1;
|
|
815
|
-
var a =
|
|
815
|
+
var a = fe(e).ShadowRoot;
|
|
816
816
|
return e instanceof a || e instanceof ShadowRoot;
|
|
817
817
|
}
|
|
818
818
|
function xn(e) {
|
|
819
819
|
var a = e.state;
|
|
820
820
|
Object.keys(a.elements).forEach(function(t) {
|
|
821
821
|
var r = a.styles[t] || {}, n = a.attributes[t] || {}, i = a.elements[t];
|
|
822
|
-
!
|
|
823
|
-
var o = n[
|
|
824
|
-
o === !1 ? i.removeAttribute(
|
|
822
|
+
!me(i) || !ke(i) || (Object.assign(i.style, r), Object.keys(n).forEach(function(s) {
|
|
823
|
+
var o = n[s];
|
|
824
|
+
o === !1 ? i.removeAttribute(s) : i.setAttribute(s, o === !0 ? "" : o);
|
|
825
825
|
}));
|
|
826
826
|
});
|
|
827
827
|
}
|
|
@@ -840,11 +840,11 @@ function kn(e) {
|
|
|
840
840
|
};
|
|
841
841
|
return Object.assign(a.elements.popper.style, t.popper), a.styles = t, a.elements.arrow && Object.assign(a.elements.arrow.style, t.arrow), function() {
|
|
842
842
|
Object.keys(a.elements).forEach(function(r) {
|
|
843
|
-
var n = a.elements[r], i = a.attributes[r] || {},
|
|
844
|
-
return
|
|
843
|
+
var n = a.elements[r], i = a.attributes[r] || {}, s = Object.keys(a.styles.hasOwnProperty(r) ? a.styles[r] : t[r]), o = s.reduce(function(l, d) {
|
|
844
|
+
return l[d] = "", l;
|
|
845
845
|
}, {});
|
|
846
|
-
!
|
|
847
|
-
n.removeAttribute(
|
|
846
|
+
!me(n) || !ke(n) || (Object.assign(n.style, o), Object.keys(i).forEach(function(l) {
|
|
847
|
+
n.removeAttribute(l);
|
|
848
848
|
}));
|
|
849
849
|
});
|
|
850
850
|
};
|
|
@@ -857,37 +857,37 @@ const $n = {
|
|
|
857
857
|
effect: kn,
|
|
858
858
|
requires: ["computeStyles"]
|
|
859
859
|
};
|
|
860
|
-
function
|
|
860
|
+
function xe(e) {
|
|
861
861
|
return e.split("-")[0];
|
|
862
862
|
}
|
|
863
|
-
var
|
|
864
|
-
function
|
|
863
|
+
var Ve = Math.max, nt = Math.min, De = Math.round;
|
|
864
|
+
function ht() {
|
|
865
865
|
var e = navigator.userAgentData;
|
|
866
866
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(a) {
|
|
867
867
|
return a.brand + "/" + a.version;
|
|
868
868
|
}).join(" ") : navigator.userAgent;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
870
|
+
function sa() {
|
|
871
|
+
return !/^((?!chrome|android).)*safari/i.test(ht());
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Re(e, a, t) {
|
|
874
874
|
a === void 0 && (a = !1), t === void 0 && (t = !1);
|
|
875
875
|
var r = e.getBoundingClientRect(), n = 1, i = 1;
|
|
876
|
-
a &&
|
|
877
|
-
var
|
|
876
|
+
a && me(e) && (n = e.offsetWidth > 0 && De(r.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && De(r.height) / e.offsetHeight || 1);
|
|
877
|
+
var s = Be(e) ? fe(e) : window, o = s.visualViewport, l = !sa() && t, d = (r.left + (l && o ? o.offsetLeft : 0)) / n, c = (r.top + (l && o ? o.offsetTop : 0)) / i, h = r.width / n, w = r.height / i;
|
|
878
878
|
return {
|
|
879
|
-
width:
|
|
880
|
-
height:
|
|
879
|
+
width: h,
|
|
880
|
+
height: w,
|
|
881
881
|
top: c,
|
|
882
|
-
right: d +
|
|
883
|
-
bottom: c +
|
|
882
|
+
right: d + h,
|
|
883
|
+
bottom: c + w,
|
|
884
884
|
left: d,
|
|
885
885
|
x: d,
|
|
886
886
|
y: c
|
|
887
887
|
};
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
var a =
|
|
889
|
+
function Tt(e) {
|
|
890
|
+
var a = Re(e), t = e.offsetWidth, r = e.offsetHeight;
|
|
891
891
|
return Math.abs(a.width - t) <= 1 && (t = a.width), Math.abs(a.height - r) <= 1 && (r = a.height), {
|
|
892
892
|
x: e.offsetLeft,
|
|
893
893
|
y: e.offsetTop,
|
|
@@ -895,11 +895,11 @@ function $t(e) {
|
|
|
895
895
|
height: r
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function ca(e, a) {
|
|
899
899
|
var t = a.getRootNode && a.getRootNode();
|
|
900
900
|
if (e.contains(a))
|
|
901
901
|
return !0;
|
|
902
|
-
if (t &&
|
|
902
|
+
if (t && St(t)) {
|
|
903
903
|
var r = a;
|
|
904
904
|
do {
|
|
905
905
|
if (r && e.isSameNode(r))
|
|
@@ -909,66 +909,66 @@ function sa(e, a) {
|
|
|
909
909
|
}
|
|
910
910
|
return !1;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return
|
|
912
|
+
function $e(e) {
|
|
913
|
+
return fe(e).getComputedStyle(e);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
return ["table", "td", "th"].indexOf(
|
|
915
|
+
function Cn(e) {
|
|
916
|
+
return ["table", "td", "th"].indexOf(ke(e)) >= 0;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return ((
|
|
918
|
+
function Te(e) {
|
|
919
|
+
return ((Be(e) ? e.ownerDocument : (
|
|
920
920
|
// $FlowFixMe[prop-missing]
|
|
921
921
|
e.document
|
|
922
922
|
)) || window.document).documentElement;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
924
|
+
function st(e) {
|
|
925
|
+
return ke(e) === "html" ? e : (
|
|
926
926
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
927
927
|
// $FlowFixMe[incompatible-return]
|
|
928
928
|
// $FlowFixMe[prop-missing]
|
|
929
929
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
930
930
|
e.parentNode || // DOM Element detected
|
|
931
|
-
(
|
|
931
|
+
(St(e) ? e.host : null) || // ShadowRoot detected
|
|
932
932
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
933
|
-
|
|
933
|
+
Te(e)
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return !
|
|
938
|
-
|
|
936
|
+
function jt(e) {
|
|
937
|
+
return !me(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
938
|
+
$e(e).position === "fixed" ? null : e.offsetParent;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
var a = /firefox/i.test(
|
|
942
|
-
if (t &&
|
|
943
|
-
var r =
|
|
940
|
+
function On(e) {
|
|
941
|
+
var a = /firefox/i.test(ht()), t = /Trident/i.test(ht());
|
|
942
|
+
if (t && me(e)) {
|
|
943
|
+
var r = $e(e);
|
|
944
944
|
if (r.position === "fixed")
|
|
945
945
|
return null;
|
|
946
946
|
}
|
|
947
|
-
var n =
|
|
948
|
-
for (
|
|
949
|
-
var i =
|
|
947
|
+
var n = st(e);
|
|
948
|
+
for (St(n) && (n = n.host); me(n) && ["html", "body"].indexOf(ke(n)) < 0; ) {
|
|
949
|
+
var i = $e(n);
|
|
950
950
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || a && i.willChange === "filter" || a && i.filter && i.filter !== "none")
|
|
951
951
|
return n;
|
|
952
952
|
n = n.parentNode;
|
|
953
953
|
}
|
|
954
954
|
return null;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
for (var a =
|
|
958
|
-
t =
|
|
959
|
-
return t && (
|
|
956
|
+
function Xe(e) {
|
|
957
|
+
for (var a = fe(e), t = jt(e); t && Cn(t) && $e(t).position === "static"; )
|
|
958
|
+
t = jt(t);
|
|
959
|
+
return t && (ke(t) === "html" || ke(t) === "body" && $e(t).position === "static") ? a : t || On(e) || a;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Vt(e) {
|
|
962
962
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return
|
|
964
|
+
function Ne(e, a, t) {
|
|
965
|
+
return Ve(e, nt(a, t));
|
|
966
966
|
}
|
|
967
967
|
function Sn(e, a, t) {
|
|
968
|
-
var r =
|
|
968
|
+
var r = Ne(e, a, t);
|
|
969
969
|
return r > t ? t : r;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function ua() {
|
|
972
972
|
return {
|
|
973
973
|
top: 0,
|
|
974
974
|
right: 0,
|
|
@@ -976,10 +976,10 @@ function ca() {
|
|
|
976
976
|
left: 0
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
return Object.assign({},
|
|
979
|
+
function da(e) {
|
|
980
|
+
return Object.assign({}, ua(), e);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function fa(e, a) {
|
|
983
983
|
return a.reduce(function(t, r) {
|
|
984
984
|
return t[r] = e, t;
|
|
985
985
|
}, {});
|
|
@@ -987,20 +987,20 @@ function da(e, a) {
|
|
|
987
987
|
var Tn = function(a, t) {
|
|
988
988
|
return a = typeof a == "function" ? a(Object.assign({}, t.rects, {
|
|
989
989
|
placement: t.placement
|
|
990
|
-
})) : a,
|
|
990
|
+
})) : a, da(typeof a != "number" ? a : fa(a, Ye));
|
|
991
991
|
};
|
|
992
992
|
function Vn(e) {
|
|
993
|
-
var a, t = e.state, r = e.name, n = e.options, i = t.elements.arrow,
|
|
994
|
-
if (!(!i || !
|
|
995
|
-
var
|
|
996
|
-
t.modifiersData[r] = (a = {}, a[
|
|
993
|
+
var a, t = e.state, r = e.name, n = e.options, i = t.elements.arrow, s = t.modifiersData.popperOffsets, o = xe(t.placement), l = Vt(o), d = [ue, he].indexOf(o) >= 0, c = d ? "height" : "width";
|
|
994
|
+
if (!(!i || !s)) {
|
|
995
|
+
var h = Tn(n.padding, t), w = Tt(i), g = l === "y" ? ce : ue, b = l === "y" ? ge : he, O = t.rects.reference[c] + t.rects.reference[l] - s[l] - t.rects.popper[c], B = s[l] - t.rects.reference[l], k = Xe(i), V = k ? l === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, D = O / 2 - B / 2, S = h[g], P = V - w[c] - h[b], $ = V / 2 - w[c] / 2 + D, T = Ne(S, $, P), M = l;
|
|
996
|
+
t.modifiersData[r] = (a = {}, a[M] = T, a.centerOffset = T - $, a);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
function Bn(e) {
|
|
1000
1000
|
var a = e.state, t = e.options, r = t.element, n = r === void 0 ? "[data-popper-arrow]" : r;
|
|
1001
|
-
n != null && (typeof n == "string" && (n = a.elements.popper.querySelector(n), !n) ||
|
|
1001
|
+
n != null && (typeof n == "string" && (n = a.elements.popper.querySelector(n), !n) || ca(a.elements.popper, n) && (a.elements.arrow = n));
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1003
|
+
const Pn = {
|
|
1004
1004
|
name: "arrow",
|
|
1005
1005
|
enabled: !0,
|
|
1006
1006
|
phase: "main",
|
|
@@ -1009,110 +1009,110 @@ const En = {
|
|
|
1009
1009
|
requires: ["popperOffsets"],
|
|
1010
1010
|
requiresIfExists: ["preventOverflow"]
|
|
1011
1011
|
};
|
|
1012
|
-
function
|
|
1012
|
+
function We(e) {
|
|
1013
1013
|
return e.split("-")[1];
|
|
1014
1014
|
}
|
|
1015
|
-
var
|
|
1015
|
+
var En = {
|
|
1016
1016
|
top: "auto",
|
|
1017
1017
|
right: "auto",
|
|
1018
1018
|
bottom: "auto",
|
|
1019
1019
|
left: "auto"
|
|
1020
1020
|
};
|
|
1021
|
-
function
|
|
1021
|
+
function zn(e, a) {
|
|
1022
1022
|
var t = e.x, r = e.y, n = a.devicePixelRatio || 1;
|
|
1023
1023
|
return {
|
|
1024
1024
|
x: De(t * n) / n || 0,
|
|
1025
1025
|
y: De(r * n) / n || 0
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1029
|
-
var a, t = e.popper, r = e.popperRect, n = e.placement, i = e.variation,
|
|
1030
|
-
x:
|
|
1028
|
+
function Nt(e) {
|
|
1029
|
+
var a, t = e.popper, r = e.popperRect, n = e.placement, i = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, h = e.isFixed, w = s.x, g = w === void 0 ? 0 : w, b = s.y, O = b === void 0 ? 0 : b, B = typeof c == "function" ? c({
|
|
1030
|
+
x: g,
|
|
1031
1031
|
y: O
|
|
1032
1032
|
}) : {
|
|
1033
|
-
x:
|
|
1033
|
+
x: g,
|
|
1034
1034
|
y: O
|
|
1035
1035
|
};
|
|
1036
|
-
|
|
1037
|
-
var
|
|
1036
|
+
g = B.x, O = B.y;
|
|
1037
|
+
var k = s.hasOwnProperty("x"), V = s.hasOwnProperty("y"), D = ue, S = ce, P = window;
|
|
1038
1038
|
if (d) {
|
|
1039
|
-
var
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1042
|
-
var
|
|
1039
|
+
var $ = Xe(t), T = "clientHeight", M = "clientWidth";
|
|
1040
|
+
if ($ === fe(t) && ($ = Te(t), $e($).position !== "static" && o === "absolute" && (T = "scrollHeight", M = "scrollWidth")), $ = $, n === ce || (n === ue || n === he) && i === He) {
|
|
1041
|
+
S = ge;
|
|
1042
|
+
var j = h && $ === P && P.visualViewport ? P.visualViewport.height : (
|
|
1043
1043
|
// $FlowFixMe[prop-missing]
|
|
1044
|
-
|
|
1044
|
+
$[T]
|
|
1045
1045
|
);
|
|
1046
|
-
O -=
|
|
1046
|
+
O -= j - r.height, O *= l ? 1 : -1;
|
|
1047
1047
|
}
|
|
1048
|
-
if (n ===
|
|
1049
|
-
|
|
1050
|
-
var
|
|
1048
|
+
if (n === ue || (n === ce || n === ge) && i === He) {
|
|
1049
|
+
D = he;
|
|
1050
|
+
var _ = h && $ === P && P.visualViewport ? P.visualViewport.width : (
|
|
1051
1051
|
// $FlowFixMe[prop-missing]
|
|
1052
|
-
|
|
1052
|
+
$[M]
|
|
1053
1053
|
);
|
|
1054
|
-
|
|
1054
|
+
g -= _ - r.width, g *= l ? 1 : -1;
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
var
|
|
1057
|
+
var R = Object.assign({
|
|
1058
1058
|
position: o
|
|
1059
|
-
}, d &&
|
|
1060
|
-
x:
|
|
1059
|
+
}, d && En), q = c === !0 ? zn({
|
|
1060
|
+
x: g,
|
|
1061
1061
|
y: O
|
|
1062
|
-
},
|
|
1063
|
-
x:
|
|
1062
|
+
}, fe(t)) : {
|
|
1063
|
+
x: g,
|
|
1064
1064
|
y: O
|
|
1065
1065
|
};
|
|
1066
|
-
if (
|
|
1067
|
-
var
|
|
1068
|
-
return Object.assign({},
|
|
1066
|
+
if (g = q.x, O = q.y, l) {
|
|
1067
|
+
var C;
|
|
1068
|
+
return Object.assign({}, R, (C = {}, C[S] = V ? "0" : "", C[D] = k ? "0" : "", C.transform = (P.devicePixelRatio || 1) <= 1 ? "translate(" + g + "px, " + O + "px)" : "translate3d(" + g + "px, " + O + "px, 0)", C));
|
|
1069
1069
|
}
|
|
1070
|
-
return Object.assign({},
|
|
1070
|
+
return Object.assign({}, R, (a = {}, a[S] = V ? O + "px" : "", a[D] = k ? g + "px" : "", a.transform = "", a));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
var a = e.state, t = e.options, r = t.gpuAcceleration, n = r === void 0 ? !0 : r, i = t.adaptive,
|
|
1074
|
-
placement:
|
|
1075
|
-
variation:
|
|
1072
|
+
function An(e) {
|
|
1073
|
+
var a = e.state, t = e.options, r = t.gpuAcceleration, n = r === void 0 ? !0 : r, i = t.adaptive, s = i === void 0 ? !0 : i, o = t.roundOffsets, l = o === void 0 ? !0 : o, d = {
|
|
1074
|
+
placement: xe(a.placement),
|
|
1075
|
+
variation: We(a.placement),
|
|
1076
1076
|
popper: a.elements.popper,
|
|
1077
1077
|
popperRect: a.rects.popper,
|
|
1078
1078
|
gpuAcceleration: n,
|
|
1079
1079
|
isFixed: a.options.strategy === "fixed"
|
|
1080
1080
|
};
|
|
1081
|
-
a.modifiersData.popperOffsets != null && (a.styles.popper = Object.assign({}, a.styles.popper,
|
|
1081
|
+
a.modifiersData.popperOffsets != null && (a.styles.popper = Object.assign({}, a.styles.popper, Nt(Object.assign({}, d, {
|
|
1082
1082
|
offsets: a.modifiersData.popperOffsets,
|
|
1083
1083
|
position: a.options.strategy,
|
|
1084
|
-
adaptive:
|
|
1085
|
-
roundOffsets:
|
|
1086
|
-
})))), a.modifiersData.arrow != null && (a.styles.arrow = Object.assign({}, a.styles.arrow,
|
|
1084
|
+
adaptive: s,
|
|
1085
|
+
roundOffsets: l
|
|
1086
|
+
})))), a.modifiersData.arrow != null && (a.styles.arrow = Object.assign({}, a.styles.arrow, Nt(Object.assign({}, d, {
|
|
1087
1087
|
offsets: a.modifiersData.arrow,
|
|
1088
1088
|
position: "absolute",
|
|
1089
1089
|
adaptive: !1,
|
|
1090
|
-
roundOffsets:
|
|
1090
|
+
roundOffsets: l
|
|
1091
1091
|
})))), a.attributes.popper = Object.assign({}, a.attributes.popper, {
|
|
1092
1092
|
"data-popper-placement": a.placement
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
|
-
const
|
|
1095
|
+
const Dn = {
|
|
1096
1096
|
name: "computeStyles",
|
|
1097
1097
|
enabled: !0,
|
|
1098
1098
|
phase: "beforeWrite",
|
|
1099
|
-
fn:
|
|
1099
|
+
fn: An,
|
|
1100
1100
|
data: {}
|
|
1101
1101
|
};
|
|
1102
|
-
var
|
|
1102
|
+
var tt = {
|
|
1103
1103
|
passive: !0
|
|
1104
1104
|
};
|
|
1105
1105
|
function Rn(e) {
|
|
1106
|
-
var a = e.state, t = e.instance, r = e.options, n = r.scroll, i = n === void 0 ? !0 : n,
|
|
1106
|
+
var a = e.state, t = e.instance, r = e.options, n = r.scroll, i = n === void 0 ? !0 : n, s = r.resize, o = s === void 0 ? !0 : s, l = fe(a.elements.popper), d = [].concat(a.scrollParents.reference, a.scrollParents.popper);
|
|
1107
1107
|
return i && d.forEach(function(c) {
|
|
1108
|
-
c.addEventListener("scroll", t.update,
|
|
1109
|
-
}), o &&
|
|
1108
|
+
c.addEventListener("scroll", t.update, tt);
|
|
1109
|
+
}), o && l.addEventListener("resize", t.update, tt), function() {
|
|
1110
1110
|
i && d.forEach(function(c) {
|
|
1111
|
-
c.removeEventListener("scroll", t.update,
|
|
1112
|
-
}), o &&
|
|
1111
|
+
c.removeEventListener("scroll", t.update, tt);
|
|
1112
|
+
}), o && l.removeEventListener("resize", t.update, tt);
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1115
|
+
const Wn = {
|
|
1116
1116
|
name: "eventListeners",
|
|
1117
1117
|
enabled: !0,
|
|
1118
1118
|
phase: "write",
|
|
@@ -1121,76 +1121,76 @@ const Ln = {
|
|
|
1121
1121
|
effect: Rn,
|
|
1122
1122
|
data: {}
|
|
1123
1123
|
};
|
|
1124
|
-
var
|
|
1124
|
+
var Ln = {
|
|
1125
1125
|
left: "right",
|
|
1126
1126
|
right: "left",
|
|
1127
1127
|
bottom: "top",
|
|
1128
1128
|
top: "bottom"
|
|
1129
1129
|
};
|
|
1130
|
-
function
|
|
1130
|
+
function at(e) {
|
|
1131
1131
|
return e.replace(/left|right|bottom|top/g, function(a) {
|
|
1132
|
-
return
|
|
1132
|
+
return Ln[a];
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
1135
|
var Mn = {
|
|
1136
1136
|
start: "end",
|
|
1137
1137
|
end: "start"
|
|
1138
1138
|
};
|
|
1139
|
-
function
|
|
1139
|
+
function It(e) {
|
|
1140
1140
|
return e.replace(/start|end/g, function(a) {
|
|
1141
1141
|
return Mn[a];
|
|
1142
1142
|
});
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
var a =
|
|
1144
|
+
function Bt(e) {
|
|
1145
|
+
var a = fe(e), t = a.pageXOffset, r = a.pageYOffset;
|
|
1146
1146
|
return {
|
|
1147
1147
|
scrollLeft: t,
|
|
1148
1148
|
scrollTop: r
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1151
|
+
function Pt(e) {
|
|
1152
|
+
return Re(Te(e)).left + Bt(e).scrollLeft;
|
|
1153
1153
|
}
|
|
1154
1154
|
function jn(e, a) {
|
|
1155
|
-
var t =
|
|
1155
|
+
var t = fe(e), r = Te(e), n = t.visualViewport, i = r.clientWidth, s = r.clientHeight, o = 0, l = 0;
|
|
1156
1156
|
if (n) {
|
|
1157
|
-
i = n.width,
|
|
1158
|
-
var d =
|
|
1159
|
-
(d || !d && a === "fixed") && (o = n.offsetLeft,
|
|
1157
|
+
i = n.width, s = n.height;
|
|
1158
|
+
var d = sa();
|
|
1159
|
+
(d || !d && a === "fixed") && (o = n.offsetLeft, l = n.offsetTop);
|
|
1160
1160
|
}
|
|
1161
1161
|
return {
|
|
1162
1162
|
width: i,
|
|
1163
|
-
height:
|
|
1164
|
-
x: o +
|
|
1165
|
-
y:
|
|
1163
|
+
height: s,
|
|
1164
|
+
x: o + Pt(e),
|
|
1165
|
+
y: l
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
1168
|
function Nn(e) {
|
|
1169
|
-
var a, t =
|
|
1170
|
-
return
|
|
1169
|
+
var a, t = Te(e), r = Bt(e), n = (a = e.ownerDocument) == null ? void 0 : a.body, i = Ve(t.scrollWidth, t.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), s = Ve(t.scrollHeight, t.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), o = -r.scrollLeft + Pt(e), l = -r.scrollTop;
|
|
1170
|
+
return $e(n || t).direction === "rtl" && (o += Ve(t.clientWidth, n ? n.clientWidth : 0) - i), {
|
|
1171
1171
|
width: i,
|
|
1172
|
-
height:
|
|
1172
|
+
height: s,
|
|
1173
1173
|
x: o,
|
|
1174
|
-
y:
|
|
1174
|
+
y: l
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1178
|
-
var a =
|
|
1177
|
+
function Et(e) {
|
|
1178
|
+
var a = $e(e), t = a.overflow, r = a.overflowX, n = a.overflowY;
|
|
1179
1179
|
return /auto|scroll|overlay|hidden/.test(t + n + r);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return ["html", "body", "#document"].indexOf(
|
|
1181
|
+
function pa(e) {
|
|
1182
|
+
return ["html", "body", "#document"].indexOf(ke(e)) >= 0 ? e.ownerDocument.body : me(e) && Et(e) ? e : pa(st(e));
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function Ie(e, a) {
|
|
1185
1185
|
var t;
|
|
1186
1186
|
a === void 0 && (a = []);
|
|
1187
|
-
var r =
|
|
1187
|
+
var r = pa(e), n = r === ((t = e.ownerDocument) == null ? void 0 : t.body), i = fe(r), s = n ? [i].concat(i.visualViewport || [], Et(r) ? r : []) : r, o = a.concat(s);
|
|
1188
1188
|
return n ? o : (
|
|
1189
1189
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1190
|
-
o.concat(
|
|
1190
|
+
o.concat(Ie(st(s)))
|
|
1191
1191
|
);
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function bt(e) {
|
|
1194
1194
|
return Object.assign({}, e, {
|
|
1195
1195
|
left: e.x,
|
|
1196
1196
|
top: e.y,
|
|
@@ -1199,165 +1199,165 @@ function mt(e) {
|
|
|
1199
1199
|
});
|
|
1200
1200
|
}
|
|
1201
1201
|
function In(e, a) {
|
|
1202
|
-
var t =
|
|
1202
|
+
var t = Re(e, !1, a === "fixed");
|
|
1203
1203
|
return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return a ===
|
|
1205
|
+
function _t(e, a, t) {
|
|
1206
|
+
return a === oa ? bt(jn(e, t)) : Be(a) ? In(a, t) : bt(Nn(Te(e)));
|
|
1207
1207
|
}
|
|
1208
1208
|
function _n(e) {
|
|
1209
|
-
var a =
|
|
1210
|
-
return
|
|
1211
|
-
return
|
|
1209
|
+
var a = Ie(st(e)), t = ["absolute", "fixed"].indexOf($e(e).position) >= 0, r = t && me(e) ? Xe(e) : e;
|
|
1210
|
+
return Be(r) ? a.filter(function(n) {
|
|
1211
|
+
return Be(n) && ca(n, r) && ke(n) !== "body";
|
|
1212
1212
|
}) : [];
|
|
1213
1213
|
}
|
|
1214
1214
|
function Fn(e, a, t, r) {
|
|
1215
|
-
var n = a === "clippingParents" ? _n(e) : [].concat(a), i = [].concat(n, [t]),
|
|
1216
|
-
var c =
|
|
1217
|
-
return
|
|
1218
|
-
},
|
|
1215
|
+
var n = a === "clippingParents" ? _n(e) : [].concat(a), i = [].concat(n, [t]), s = i[0], o = i.reduce(function(l, d) {
|
|
1216
|
+
var c = _t(e, d, r);
|
|
1217
|
+
return l.top = Ve(c.top, l.top), l.right = nt(c.right, l.right), l.bottom = nt(c.bottom, l.bottom), l.left = Ve(c.left, l.left), l;
|
|
1218
|
+
}, _t(e, s, r));
|
|
1219
1219
|
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
var a = e.reference, t = e.element, r = e.placement, n = r ?
|
|
1221
|
+
function va(e) {
|
|
1222
|
+
var a = e.reference, t = e.element, r = e.placement, n = r ? xe(r) : null, i = r ? We(r) : null, s = a.x + a.width / 2 - t.width / 2, o = a.y + a.height / 2 - t.height / 2, l;
|
|
1223
1223
|
switch (n) {
|
|
1224
|
-
case
|
|
1225
|
-
|
|
1226
|
-
x:
|
|
1224
|
+
case ce:
|
|
1225
|
+
l = {
|
|
1226
|
+
x: s,
|
|
1227
1227
|
y: a.y - t.height
|
|
1228
1228
|
};
|
|
1229
1229
|
break;
|
|
1230
|
-
case
|
|
1231
|
-
|
|
1232
|
-
x:
|
|
1230
|
+
case ge:
|
|
1231
|
+
l = {
|
|
1232
|
+
x: s,
|
|
1233
1233
|
y: a.y + a.height
|
|
1234
1234
|
};
|
|
1235
1235
|
break;
|
|
1236
|
-
case
|
|
1237
|
-
|
|
1236
|
+
case he:
|
|
1237
|
+
l = {
|
|
1238
1238
|
x: a.x + a.width,
|
|
1239
1239
|
y: o
|
|
1240
1240
|
};
|
|
1241
1241
|
break;
|
|
1242
|
-
case
|
|
1243
|
-
|
|
1242
|
+
case ue:
|
|
1243
|
+
l = {
|
|
1244
1244
|
x: a.x - t.width,
|
|
1245
1245
|
y: o
|
|
1246
1246
|
};
|
|
1247
1247
|
break;
|
|
1248
1248
|
default:
|
|
1249
|
-
|
|
1249
|
+
l = {
|
|
1250
1250
|
x: a.x,
|
|
1251
1251
|
y: a.y
|
|
1252
1252
|
};
|
|
1253
1253
|
}
|
|
1254
|
-
var d = n ?
|
|
1254
|
+
var d = n ? Vt(n) : null;
|
|
1255
1255
|
if (d != null) {
|
|
1256
1256
|
var c = d === "y" ? "height" : "width";
|
|
1257
1257
|
switch (i) {
|
|
1258
1258
|
case Ae:
|
|
1259
|
-
|
|
1259
|
+
l[d] = l[d] - (a[c] / 2 - t[c] / 2);
|
|
1260
1260
|
break;
|
|
1261
1261
|
case He:
|
|
1262
|
-
|
|
1262
|
+
l[d] = l[d] + (a[c] / 2 - t[c] / 2);
|
|
1263
1263
|
break;
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
return
|
|
1266
|
+
return l;
|
|
1267
1267
|
}
|
|
1268
1268
|
function Ue(e, a) {
|
|
1269
1269
|
a === void 0 && (a = {});
|
|
1270
|
-
var t = a, r = t.placement, n = r === void 0 ? e.placement : r, i = t.strategy,
|
|
1271
|
-
reference:
|
|
1272
|
-
element:
|
|
1270
|
+
var t = a, r = t.placement, n = r === void 0 ? e.placement : r, i = t.strategy, s = i === void 0 ? e.strategy : i, o = t.boundary, l = o === void 0 ? cn : o, d = t.rootBoundary, c = d === void 0 ? oa : d, h = t.elementContext, w = h === void 0 ? Me : h, g = t.altBoundary, b = g === void 0 ? !1 : g, O = t.padding, B = O === void 0 ? 0 : O, k = da(typeof B != "number" ? B : fa(B, Ye)), V = w === Me ? un : Me, D = e.rects.popper, S = e.elements[b ? V : w], P = Fn(Be(S) ? S : S.contextElement || Te(e.elements.popper), l, c, s), $ = Re(e.elements.reference), T = va({
|
|
1271
|
+
reference: $,
|
|
1272
|
+
element: D,
|
|
1273
1273
|
placement: n
|
|
1274
|
-
}),
|
|
1275
|
-
top:
|
|
1276
|
-
bottom:
|
|
1277
|
-
left:
|
|
1278
|
-
right:
|
|
1279
|
-
},
|
|
1280
|
-
if (
|
|
1281
|
-
var
|
|
1282
|
-
Object.keys(
|
|
1283
|
-
var
|
|
1284
|
-
|
|
1274
|
+
}), M = bt(Object.assign({}, D, T)), j = w === Me ? M : $, _ = {
|
|
1275
|
+
top: P.top - j.top + k.top,
|
|
1276
|
+
bottom: j.bottom - P.bottom + k.bottom,
|
|
1277
|
+
left: P.left - j.left + k.left,
|
|
1278
|
+
right: j.right - P.right + k.right
|
|
1279
|
+
}, R = e.modifiersData.offset;
|
|
1280
|
+
if (w === Me && R) {
|
|
1281
|
+
var q = R[n];
|
|
1282
|
+
Object.keys(_).forEach(function(C) {
|
|
1283
|
+
var W = [he, ge].indexOf(C) >= 0 ? 1 : -1, te = [ce, ge].indexOf(C) >= 0 ? "y" : "x";
|
|
1284
|
+
_[C] += q[te] * W;
|
|
1285
1285
|
});
|
|
1286
1286
|
}
|
|
1287
|
-
return
|
|
1287
|
+
return _;
|
|
1288
1288
|
}
|
|
1289
1289
|
function Hn(e, a) {
|
|
1290
1290
|
a === void 0 && (a = {});
|
|
1291
|
-
var t = a, r = t.placement, n = t.boundary, i = t.rootBoundary,
|
|
1292
|
-
return
|
|
1293
|
-
}) :
|
|
1294
|
-
return d.indexOf(
|
|
1291
|
+
var t = a, r = t.placement, n = t.boundary, i = t.rootBoundary, s = t.padding, o = t.flipVariations, l = t.allowedAutoPlacements, d = l === void 0 ? la : l, c = We(r), h = c ? o ? Mt : Mt.filter(function(b) {
|
|
1292
|
+
return We(b) === c;
|
|
1293
|
+
}) : Ye, w = h.filter(function(b) {
|
|
1294
|
+
return d.indexOf(b) >= 0;
|
|
1295
1295
|
});
|
|
1296
|
-
|
|
1297
|
-
var
|
|
1298
|
-
return
|
|
1296
|
+
w.length === 0 && (w = h);
|
|
1297
|
+
var g = w.reduce(function(b, O) {
|
|
1298
|
+
return b[O] = Ue(e, {
|
|
1299
1299
|
placement: O,
|
|
1300
1300
|
boundary: n,
|
|
1301
1301
|
rootBoundary: i,
|
|
1302
|
-
padding:
|
|
1303
|
-
})[
|
|
1302
|
+
padding: s
|
|
1303
|
+
})[xe(O)], b;
|
|
1304
1304
|
}, {});
|
|
1305
|
-
return Object.keys(
|
|
1306
|
-
return
|
|
1305
|
+
return Object.keys(g).sort(function(b, O) {
|
|
1306
|
+
return g[b] - g[O];
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
1309
|
function Un(e) {
|
|
1310
|
-
if (
|
|
1310
|
+
if (xe(e) === Ot)
|
|
1311
1311
|
return [];
|
|
1312
|
-
var a =
|
|
1313
|
-
return [
|
|
1312
|
+
var a = at(e);
|
|
1313
|
+
return [It(e), a, It(a)];
|
|
1314
1314
|
}
|
|
1315
1315
|
function qn(e) {
|
|
1316
1316
|
var a = e.state, t = e.options, r = e.name;
|
|
1317
1317
|
if (!a.modifiersData[r]._skip) {
|
|
1318
|
-
for (var n = t.mainAxis, i = n === void 0 ? !0 : n,
|
|
1319
|
-
return
|
|
1320
|
-
placement:
|
|
1318
|
+
for (var n = t.mainAxis, i = n === void 0 ? !0 : n, s = t.altAxis, o = s === void 0 ? !0 : s, l = t.fallbackPlacements, d = t.padding, c = t.boundary, h = t.rootBoundary, w = t.altBoundary, g = t.flipVariations, b = g === void 0 ? !0 : g, O = t.allowedAutoPlacements, B = a.options.placement, k = xe(B), V = k === B, D = l || (V || !b ? [at(B)] : Un(B)), S = [B].concat(D).reduce(function(we, de) {
|
|
1319
|
+
return we.concat(xe(de) === Ot ? Hn(a, {
|
|
1320
|
+
placement: de,
|
|
1321
1321
|
boundary: c,
|
|
1322
|
-
rootBoundary:
|
|
1322
|
+
rootBoundary: h,
|
|
1323
1323
|
padding: d,
|
|
1324
|
-
flipVariations:
|
|
1324
|
+
flipVariations: b,
|
|
1325
1325
|
allowedAutoPlacements: O
|
|
1326
|
-
}) :
|
|
1327
|
-
}, []),
|
|
1328
|
-
var
|
|
1329
|
-
placement:
|
|
1326
|
+
}) : de);
|
|
1327
|
+
}, []), P = a.rects.reference, $ = a.rects.popper, T = /* @__PURE__ */ new Map(), M = !0, j = S[0], _ = 0; _ < S.length; _++) {
|
|
1328
|
+
var R = S[_], q = xe(R), C = We(R) === Ae, W = [ce, ge].indexOf(q) >= 0, te = W ? "width" : "height", u = Ue(a, {
|
|
1329
|
+
placement: R,
|
|
1330
1330
|
boundary: c,
|
|
1331
|
-
rootBoundary:
|
|
1332
|
-
altBoundary:
|
|
1331
|
+
rootBoundary: h,
|
|
1332
|
+
altBoundary: w,
|
|
1333
1333
|
padding: d
|
|
1334
|
-
}),
|
|
1335
|
-
|
|
1336
|
-
var
|
|
1337
|
-
if (i &&
|
|
1338
|
-
return
|
|
1334
|
+
}), y = W ? C ? he : ue : C ? ge : ce;
|
|
1335
|
+
P[te] > $[te] && (y = at(y));
|
|
1336
|
+
var A = at(y), U = [];
|
|
1337
|
+
if (i && U.push(u[q] <= 0), o && U.push(u[y] <= 0, u[A] <= 0), U.every(function(we) {
|
|
1338
|
+
return we;
|
|
1339
1339
|
})) {
|
|
1340
|
-
|
|
1340
|
+
j = R, M = !1;
|
|
1341
1341
|
break;
|
|
1342
1342
|
}
|
|
1343
|
-
|
|
1343
|
+
T.set(R, U);
|
|
1344
1344
|
}
|
|
1345
|
-
if (
|
|
1346
|
-
for (var
|
|
1347
|
-
var
|
|
1348
|
-
var
|
|
1349
|
-
if (
|
|
1350
|
-
return
|
|
1351
|
-
return
|
|
1345
|
+
if (M)
|
|
1346
|
+
for (var Q = b ? 3 : 1, oe = function(de) {
|
|
1347
|
+
var pe = S.find(function(v) {
|
|
1348
|
+
var X = T.get(v);
|
|
1349
|
+
if (X)
|
|
1350
|
+
return X.slice(0, de).every(function(Z) {
|
|
1351
|
+
return Z;
|
|
1352
1352
|
});
|
|
1353
1353
|
});
|
|
1354
|
-
if (
|
|
1355
|
-
return
|
|
1356
|
-
},
|
|
1357
|
-
var
|
|
1358
|
-
if (
|
|
1354
|
+
if (pe)
|
|
1355
|
+
return j = pe, "break";
|
|
1356
|
+
}, ae = Q; ae > 0; ae--) {
|
|
1357
|
+
var le = oe(ae);
|
|
1358
|
+
if (le === "break") break;
|
|
1359
1359
|
}
|
|
1360
|
-
a.placement !==
|
|
1360
|
+
a.placement !== j && (a.modifiersData[r]._skip = !0, a.placement = j, a.reset = !0);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
const Yn = {
|
|
@@ -1370,7 +1370,7 @@ const Yn = {
|
|
|
1370
1370
|
_skip: !1
|
|
1371
1371
|
}
|
|
1372
1372
|
};
|
|
1373
|
-
function
|
|
1373
|
+
function Ft(e, a, t) {
|
|
1374
1374
|
return t === void 0 && (t = {
|
|
1375
1375
|
x: 0,
|
|
1376
1376
|
y: 0
|
|
@@ -1381,25 +1381,25 @@ function _t(e, a, t) {
|
|
|
1381
1381
|
left: e.left - a.width - t.x
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return [
|
|
1384
|
+
function Ht(e) {
|
|
1385
|
+
return [ce, he, ge, ue].some(function(a) {
|
|
1386
1386
|
return e[a] >= 0;
|
|
1387
1387
|
});
|
|
1388
1388
|
}
|
|
1389
1389
|
function Xn(e) {
|
|
1390
|
-
var a = e.state, t = e.name, r = a.rects.reference, n = a.rects.popper, i = a.modifiersData.preventOverflow,
|
|
1390
|
+
var a = e.state, t = e.name, r = a.rects.reference, n = a.rects.popper, i = a.modifiersData.preventOverflow, s = Ue(a, {
|
|
1391
1391
|
elementContext: "reference"
|
|
1392
1392
|
}), o = Ue(a, {
|
|
1393
1393
|
altBoundary: !0
|
|
1394
|
-
}),
|
|
1394
|
+
}), l = Ft(s, r), d = Ft(o, n, i), c = Ht(l), h = Ht(d);
|
|
1395
1395
|
a.modifiersData[t] = {
|
|
1396
|
-
referenceClippingOffsets:
|
|
1396
|
+
referenceClippingOffsets: l,
|
|
1397
1397
|
popperEscapeOffsets: d,
|
|
1398
1398
|
isReferenceHidden: c,
|
|
1399
|
-
hasPopperEscaped:
|
|
1399
|
+
hasPopperEscaped: h
|
|
1400
1400
|
}, a.attributes.popper = Object.assign({}, a.attributes.popper, {
|
|
1401
1401
|
"data-popper-reference-hidden": c,
|
|
1402
|
-
"data-popper-escaped":
|
|
1402
|
+
"data-popper-escaped": h
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
1405
|
const Kn = {
|
|
@@ -1410,22 +1410,22 @@ const Kn = {
|
|
|
1410
1410
|
fn: Xn
|
|
1411
1411
|
};
|
|
1412
1412
|
function Gn(e, a, t) {
|
|
1413
|
-
var r =
|
|
1413
|
+
var r = xe(e), n = [ue, ce].indexOf(r) >= 0 ? -1 : 1, i = typeof t == "function" ? t(Object.assign({}, a, {
|
|
1414
1414
|
placement: e
|
|
1415
|
-
})) : t,
|
|
1416
|
-
return
|
|
1415
|
+
})) : t, s = i[0], o = i[1];
|
|
1416
|
+
return s = s || 0, o = (o || 0) * n, [ue, he].indexOf(r) >= 0 ? {
|
|
1417
1417
|
x: o,
|
|
1418
|
-
y:
|
|
1418
|
+
y: s
|
|
1419
1419
|
} : {
|
|
1420
|
-
x:
|
|
1420
|
+
x: s,
|
|
1421
1421
|
y: o
|
|
1422
1422
|
};
|
|
1423
1423
|
}
|
|
1424
1424
|
function Qn(e) {
|
|
1425
|
-
var a = e.state, t = e.options, r = e.name, n = t.offset, i = n === void 0 ? [0, 0] : n,
|
|
1426
|
-
return c[
|
|
1427
|
-
}, {}), o =
|
|
1428
|
-
a.modifiersData.popperOffsets != null && (a.modifiersData.popperOffsets.x +=
|
|
1425
|
+
var a = e.state, t = e.options, r = e.name, n = t.offset, i = n === void 0 ? [0, 0] : n, s = la.reduce(function(c, h) {
|
|
1426
|
+
return c[h] = Gn(h, a.rects, i), c;
|
|
1427
|
+
}, {}), o = s[a.placement], l = o.x, d = o.y;
|
|
1428
|
+
a.modifiersData.popperOffsets != null && (a.modifiersData.popperOffsets.x += l, a.modifiersData.popperOffsets.y += d), a.modifiersData[r] = s;
|
|
1429
1429
|
}
|
|
1430
1430
|
const Zn = {
|
|
1431
1431
|
name: "offset",
|
|
@@ -1436,7 +1436,7 @@ const Zn = {
|
|
|
1436
1436
|
};
|
|
1437
1437
|
function Jn(e) {
|
|
1438
1438
|
var a = e.state, t = e.name;
|
|
1439
|
-
a.modifiersData[t] =
|
|
1439
|
+
a.modifiersData[t] = va({
|
|
1440
1440
|
reference: a.rects.reference,
|
|
1441
1441
|
element: a.rects.popper,
|
|
1442
1442
|
placement: a.placement
|
|
@@ -1453,36 +1453,36 @@ function tr(e) {
|
|
|
1453
1453
|
return e === "x" ? "y" : "x";
|
|
1454
1454
|
}
|
|
1455
1455
|
function ar(e) {
|
|
1456
|
-
var a = e.state, t = e.options, r = e.name, n = t.mainAxis, i = n === void 0 ? !0 : n,
|
|
1457
|
-
boundary:
|
|
1456
|
+
var a = e.state, t = e.options, r = e.name, n = t.mainAxis, i = n === void 0 ? !0 : n, s = t.altAxis, o = s === void 0 ? !1 : s, l = t.boundary, d = t.rootBoundary, c = t.altBoundary, h = t.padding, w = t.tether, g = w === void 0 ? !0 : w, b = t.tetherOffset, O = b === void 0 ? 0 : b, B = Ue(a, {
|
|
1457
|
+
boundary: l,
|
|
1458
1458
|
rootBoundary: d,
|
|
1459
|
-
padding:
|
|
1459
|
+
padding: h,
|
|
1460
1460
|
altBoundary: c
|
|
1461
|
-
}),
|
|
1461
|
+
}), k = xe(a.placement), V = We(a.placement), D = !V, S = Vt(k), P = tr(S), $ = a.modifiersData.popperOffsets, T = a.rects.reference, M = a.rects.popper, j = typeof O == "function" ? O(Object.assign({}, a.rects, {
|
|
1462
1462
|
placement: a.placement
|
|
1463
|
-
})) : O,
|
|
1464
|
-
mainAxis:
|
|
1465
|
-
altAxis:
|
|
1463
|
+
})) : O, _ = typeof j == "number" ? {
|
|
1464
|
+
mainAxis: j,
|
|
1465
|
+
altAxis: j
|
|
1466
1466
|
} : Object.assign({
|
|
1467
1467
|
mainAxis: 0,
|
|
1468
1468
|
altAxis: 0
|
|
1469
|
-
},
|
|
1469
|
+
}, j), R = a.modifiersData.offset ? a.modifiersData.offset[a.placement] : null, q = {
|
|
1470
1470
|
x: 0,
|
|
1471
1471
|
y: 0
|
|
1472
1472
|
};
|
|
1473
|
-
if (
|
|
1473
|
+
if ($) {
|
|
1474
1474
|
if (i) {
|
|
1475
|
-
var
|
|
1475
|
+
var C, W = S === "y" ? ce : ue, te = S === "y" ? ge : he, u = S === "y" ? "height" : "width", y = $[S], A = y + B[W], U = y - B[te], Q = g ? -M[u] / 2 : 0, oe = V === Ae ? T[u] : M[u], ae = V === Ae ? -M[u] : -T[u], le = a.elements.arrow, we = g && le ? Tt(le) : {
|
|
1476
1476
|
width: 0,
|
|
1477
1477
|
height: 0
|
|
1478
|
-
},
|
|
1479
|
-
|
|
1478
|
+
}, de = a.modifiersData["arrow#persistent"] ? a.modifiersData["arrow#persistent"].padding : ua(), pe = de[W], v = de[te], X = Ne(0, T[u], we[u]), Z = D ? T[u] / 2 - Q - X - pe - _.mainAxis : oe - X - pe - _.mainAxis, be = D ? -T[u] / 2 + Q + X + v + _.mainAxis : ae + X + v + _.mainAxis, Le = a.elements.arrow && Xe(a.elements.arrow), ct = Le ? S === "y" ? Le.clientTop || 0 : Le.clientLeft || 0 : 0, Ke = (C = R?.[S]) != null ? C : 0, ut = y + Z - Ke - ct, Ge = y + be - Ke, Qe = Ne(g ? nt(A, ut) : A, y, g ? Ve(U, Ge) : U);
|
|
1479
|
+
$[S] = Qe, q[S] = Qe - y;
|
|
1480
1480
|
}
|
|
1481
1481
|
if (o) {
|
|
1482
|
-
var
|
|
1483
|
-
|
|
1482
|
+
var Ze, f = S === "x" ? ce : ue, L = S === "x" ? ge : he, E = $[P], se = P === "y" ? "height" : "width", J = E + B[f], Je = E - B[L], et = [ce, ue].indexOf(k) !== -1, zt = (Ze = R?.[P]) != null ? Ze : 0, At = et ? J : E - T[se] - M[se] - zt + _.altAxis, Dt = et ? E + T[se] + M[se] - zt - _.altAxis : Je, Rt = g && et ? Sn(At, E, Dt) : Ne(g ? At : J, E, g ? Dt : Je);
|
|
1483
|
+
$[P] = Rt, q[P] = Rt - E;
|
|
1484
1484
|
}
|
|
1485
|
-
a.modifiersData[r] =
|
|
1485
|
+
a.modifiersData[r] = q;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
const nr = {
|
|
@@ -1499,7 +1499,7 @@ function rr(e) {
|
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
1501
|
function ir(e) {
|
|
1502
|
-
return e ===
|
|
1502
|
+
return e === fe(e) || !me(e) ? Bt(e) : rr(e);
|
|
1503
1503
|
}
|
|
1504
1504
|
function or(e) {
|
|
1505
1505
|
var a = e.getBoundingClientRect(), t = De(a.width) / e.offsetWidth || 1, r = De(a.height) / e.offsetHeight || 1;
|
|
@@ -1507,19 +1507,19 @@ function or(e) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
function lr(e, a, t) {
|
|
1509
1509
|
t === void 0 && (t = !1);
|
|
1510
|
-
var r =
|
|
1510
|
+
var r = me(a), n = me(a) && or(a), i = Te(a), s = Re(e, n, t), o = {
|
|
1511
1511
|
scrollLeft: 0,
|
|
1512
1512
|
scrollTop: 0
|
|
1513
|
-
},
|
|
1513
|
+
}, l = {
|
|
1514
1514
|
x: 0,
|
|
1515
1515
|
y: 0
|
|
1516
1516
|
};
|
|
1517
|
-
return (r || !r && !t) && ((
|
|
1518
|
-
|
|
1519
|
-
x:
|
|
1520
|
-
y:
|
|
1521
|
-
width:
|
|
1522
|
-
height:
|
|
1517
|
+
return (r || !r && !t) && ((ke(a) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1518
|
+
Et(i)) && (o = ir(a)), me(a) ? (l = Re(a, !0), l.x += a.clientLeft, l.y += a.clientTop) : i && (l.x = Pt(i))), {
|
|
1519
|
+
x: s.left + o.scrollLeft - l.x,
|
|
1520
|
+
y: s.top + o.scrollTop - l.y,
|
|
1521
|
+
width: s.width,
|
|
1522
|
+
height: s.height
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
1525
|
function sr(e) {
|
|
@@ -1529,11 +1529,11 @@ function sr(e) {
|
|
|
1529
1529
|
});
|
|
1530
1530
|
function n(i) {
|
|
1531
1531
|
t.add(i.name);
|
|
1532
|
-
var
|
|
1533
|
-
|
|
1532
|
+
var s = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1533
|
+
s.forEach(function(o) {
|
|
1534
1534
|
if (!t.has(o)) {
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1535
|
+
var l = a.get(o);
|
|
1536
|
+
l && n(l);
|
|
1537
1537
|
}
|
|
1538
1538
|
}), r.push(i);
|
|
1539
1539
|
}
|
|
@@ -1571,12 +1571,12 @@ function dr(e) {
|
|
|
1571
1571
|
return a[t];
|
|
1572
1572
|
});
|
|
1573
1573
|
}
|
|
1574
|
-
var
|
|
1574
|
+
var Ut = {
|
|
1575
1575
|
placement: "bottom",
|
|
1576
1576
|
modifiers: [],
|
|
1577
1577
|
strategy: "absolute"
|
|
1578
1578
|
};
|
|
1579
|
-
function
|
|
1579
|
+
function qt() {
|
|
1580
1580
|
for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
|
|
1581
1581
|
a[t] = arguments[t];
|
|
1582
1582
|
return !a.some(function(r) {
|
|
@@ -1585,32 +1585,32 @@ function Ut() {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
function fr(e) {
|
|
1587
1587
|
e === void 0 && (e = {});
|
|
1588
|
-
var a = e, t = a.defaultModifiers, r = t === void 0 ? [] : t, n = a.defaultOptions, i = n === void 0 ?
|
|
1589
|
-
return function(o,
|
|
1588
|
+
var a = e, t = a.defaultModifiers, r = t === void 0 ? [] : t, n = a.defaultOptions, i = n === void 0 ? Ut : n;
|
|
1589
|
+
return function(o, l, d) {
|
|
1590
1590
|
d === void 0 && (d = i);
|
|
1591
1591
|
var c = {
|
|
1592
1592
|
placement: "bottom",
|
|
1593
1593
|
orderedModifiers: [],
|
|
1594
|
-
options: Object.assign({},
|
|
1594
|
+
options: Object.assign({}, Ut, i),
|
|
1595
1595
|
modifiersData: {},
|
|
1596
1596
|
elements: {
|
|
1597
1597
|
reference: o,
|
|
1598
|
-
popper:
|
|
1598
|
+
popper: l
|
|
1599
1599
|
},
|
|
1600
1600
|
attributes: {},
|
|
1601
1601
|
styles: {}
|
|
1602
|
-
},
|
|
1602
|
+
}, h = [], w = !1, g = {
|
|
1603
1603
|
state: c,
|
|
1604
|
-
setOptions: function(
|
|
1605
|
-
var
|
|
1606
|
-
O(), c.options = Object.assign({}, i, c.options,
|
|
1607
|
-
reference:
|
|
1608
|
-
popper:
|
|
1604
|
+
setOptions: function(k) {
|
|
1605
|
+
var V = typeof k == "function" ? k(c.options) : k;
|
|
1606
|
+
O(), c.options = Object.assign({}, i, c.options, V), c.scrollParents = {
|
|
1607
|
+
reference: Be(o) ? Ie(o) : o.contextElement ? Ie(o.contextElement) : [],
|
|
1608
|
+
popper: Ie(l)
|
|
1609
1609
|
};
|
|
1610
|
-
var
|
|
1611
|
-
return c.orderedModifiers =
|
|
1612
|
-
return
|
|
1613
|
-
}),
|
|
1610
|
+
var D = cr(dr([].concat(r, c.options.modifiers)));
|
|
1611
|
+
return c.orderedModifiers = D.filter(function(S) {
|
|
1612
|
+
return S.enabled;
|
|
1613
|
+
}), b(), g.update();
|
|
1614
1614
|
},
|
|
1615
1615
|
// Sync update – it will always be executed, even if not necessary. This
|
|
1616
1616
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -1618,26 +1618,26 @@ function fr(e) {
|
|
|
1618
1618
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1619
1619
|
// prefer the async Popper#update method
|
|
1620
1620
|
forceUpdate: function() {
|
|
1621
|
-
if (
|
|
1622
|
-
var
|
|
1623
|
-
if (
|
|
1621
|
+
if (!w) {
|
|
1622
|
+
var k = c.elements, V = k.reference, D = k.popper;
|
|
1623
|
+
if (qt(V, D)) {
|
|
1624
1624
|
c.rects = {
|
|
1625
|
-
reference: lr(
|
|
1626
|
-
popper:
|
|
1627
|
-
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(
|
|
1628
|
-
return c.modifiersData[
|
|
1625
|
+
reference: lr(V, Xe(D), c.options.strategy === "fixed"),
|
|
1626
|
+
popper: Tt(D)
|
|
1627
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(_) {
|
|
1628
|
+
return c.modifiersData[_.name] = Object.assign({}, _.data);
|
|
1629
1629
|
});
|
|
1630
|
-
for (var
|
|
1630
|
+
for (var S = 0; S < c.orderedModifiers.length; S++) {
|
|
1631
1631
|
if (c.reset === !0) {
|
|
1632
|
-
c.reset = !1,
|
|
1632
|
+
c.reset = !1, S = -1;
|
|
1633
1633
|
continue;
|
|
1634
1634
|
}
|
|
1635
|
-
var
|
|
1636
|
-
typeof
|
|
1635
|
+
var P = c.orderedModifiers[S], $ = P.fn, T = P.options, M = T === void 0 ? {} : T, j = P.name;
|
|
1636
|
+
typeof $ == "function" && (c = $({
|
|
1637
1637
|
state: c,
|
|
1638
|
-
options:
|
|
1639
|
-
name:
|
|
1640
|
-
instance:
|
|
1638
|
+
options: M,
|
|
1639
|
+
name: j,
|
|
1640
|
+
instance: g
|
|
1641
1641
|
}) || c);
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
@@ -1646,156 +1646,156 @@ function fr(e) {
|
|
|
1646
1646
|
// Async and optimistically optimized update – it will not be executed if
|
|
1647
1647
|
// not necessary (debounced to run at most once-per-tick)
|
|
1648
1648
|
update: ur(function() {
|
|
1649
|
-
return new Promise(function(
|
|
1650
|
-
|
|
1649
|
+
return new Promise(function(B) {
|
|
1650
|
+
g.forceUpdate(), B(c);
|
|
1651
1651
|
});
|
|
1652
1652
|
}),
|
|
1653
1653
|
destroy: function() {
|
|
1654
|
-
O(),
|
|
1654
|
+
O(), w = !0;
|
|
1655
1655
|
}
|
|
1656
1656
|
};
|
|
1657
|
-
if (!
|
|
1658
|
-
return
|
|
1659
|
-
|
|
1660
|
-
|
|
1657
|
+
if (!qt(o, l))
|
|
1658
|
+
return g;
|
|
1659
|
+
g.setOptions(d).then(function(B) {
|
|
1660
|
+
!w && d.onFirstUpdate && d.onFirstUpdate(B);
|
|
1661
1661
|
});
|
|
1662
|
-
function
|
|
1663
|
-
c.orderedModifiers.forEach(function(
|
|
1664
|
-
var
|
|
1665
|
-
if (typeof
|
|
1666
|
-
var
|
|
1662
|
+
function b() {
|
|
1663
|
+
c.orderedModifiers.forEach(function(B) {
|
|
1664
|
+
var k = B.name, V = B.options, D = V === void 0 ? {} : V, S = B.effect;
|
|
1665
|
+
if (typeof S == "function") {
|
|
1666
|
+
var P = S({
|
|
1667
1667
|
state: c,
|
|
1668
|
-
name:
|
|
1669
|
-
instance:
|
|
1670
|
-
options:
|
|
1671
|
-
}),
|
|
1668
|
+
name: k,
|
|
1669
|
+
instance: g,
|
|
1670
|
+
options: D
|
|
1671
|
+
}), $ = function() {
|
|
1672
1672
|
};
|
|
1673
|
-
|
|
1673
|
+
h.push(P || $);
|
|
1674
1674
|
}
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
1677
|
function O() {
|
|
1678
|
-
|
|
1679
|
-
return
|
|
1680
|
-
}),
|
|
1678
|
+
h.forEach(function(B) {
|
|
1679
|
+
return B();
|
|
1680
|
+
}), h = [];
|
|
1681
1681
|
}
|
|
1682
|
-
return
|
|
1682
|
+
return g;
|
|
1683
1683
|
};
|
|
1684
1684
|
}
|
|
1685
|
-
var pr = [
|
|
1685
|
+
var pr = [Wn, er, Dn, $n, Zn, Yn, nr, Pn, Kn], vr = /* @__PURE__ */ fr({
|
|
1686
1686
|
defaultModifiers: pr
|
|
1687
|
-
}), mr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self,
|
|
1687
|
+
}), mr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self, ma = mr || gr || Function("return this")(), rt = ma.Symbol, ga = Object.prototype, hr = ga.hasOwnProperty, br = ga.toString, je = rt ? rt.toStringTag : void 0;
|
|
1688
1688
|
function yr(e) {
|
|
1689
|
-
var a = hr.call(e,
|
|
1689
|
+
var a = hr.call(e, je), t = e[je];
|
|
1690
1690
|
try {
|
|
1691
|
-
e[
|
|
1691
|
+
e[je] = void 0;
|
|
1692
1692
|
var r = !0;
|
|
1693
1693
|
} catch {
|
|
1694
1694
|
}
|
|
1695
1695
|
var n = br.call(e);
|
|
1696
|
-
return r && (a ? e[
|
|
1696
|
+
return r && (a ? e[je] = t : delete e[je]), n;
|
|
1697
1697
|
}
|
|
1698
1698
|
var wr = Object.prototype, xr = wr.toString;
|
|
1699
1699
|
function kr(e) {
|
|
1700
1700
|
return xr.call(e);
|
|
1701
1701
|
}
|
|
1702
|
-
var $r = "[object Null]",
|
|
1703
|
-
function
|
|
1704
|
-
return e == null ? e === void 0 ?
|
|
1702
|
+
var $r = "[object Null]", Cr = "[object Undefined]", Yt = rt ? rt.toStringTag : void 0;
|
|
1703
|
+
function Or(e) {
|
|
1704
|
+
return e == null ? e === void 0 ? Cr : $r : Yt && Yt in Object(e) ? yr(e) : kr(e);
|
|
1705
1705
|
}
|
|
1706
1706
|
function Sr(e) {
|
|
1707
1707
|
return e != null && typeof e == "object";
|
|
1708
1708
|
}
|
|
1709
1709
|
var Tr = "[object Symbol]";
|
|
1710
1710
|
function Vr(e) {
|
|
1711
|
-
return typeof e == "symbol" || Sr(e) &&
|
|
1711
|
+
return typeof e == "symbol" || Sr(e) && Or(e) == Tr;
|
|
1712
1712
|
}
|
|
1713
1713
|
var Br = /\s/;
|
|
1714
|
-
function
|
|
1714
|
+
function Pr(e) {
|
|
1715
1715
|
for (var a = e.length; a-- && Br.test(e.charAt(a)); )
|
|
1716
1716
|
;
|
|
1717
1717
|
return a;
|
|
1718
1718
|
}
|
|
1719
|
-
var
|
|
1720
|
-
function
|
|
1721
|
-
return e && e.slice(0,
|
|
1719
|
+
var Er = /^\s+/;
|
|
1720
|
+
function zr(e) {
|
|
1721
|
+
return e && e.slice(0, Pr(e) + 1).replace(Er, "");
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function it(e) {
|
|
1724
1724
|
var a = typeof e;
|
|
1725
1725
|
return e != null && (a == "object" || a == "function");
|
|
1726
1726
|
}
|
|
1727
|
-
var
|
|
1728
|
-
function
|
|
1727
|
+
var Xt = NaN, Ar = /^[-+]0x[0-9a-f]+$/i, Dr = /^0b[01]+$/i, Rr = /^0o[0-7]+$/i, Wr = parseInt;
|
|
1728
|
+
function Kt(e) {
|
|
1729
1729
|
if (typeof e == "number")
|
|
1730
1730
|
return e;
|
|
1731
1731
|
if (Vr(e))
|
|
1732
|
-
return
|
|
1733
|
-
if (
|
|
1732
|
+
return Xt;
|
|
1733
|
+
if (it(e)) {
|
|
1734
1734
|
var a = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
1735
|
-
e =
|
|
1735
|
+
e = it(a) ? a + "" : a;
|
|
1736
1736
|
}
|
|
1737
1737
|
if (typeof e != "string")
|
|
1738
1738
|
return e === 0 ? e : +e;
|
|
1739
|
-
e =
|
|
1740
|
-
var t =
|
|
1741
|
-
return t || Rr.test(e) ?
|
|
1742
|
-
}
|
|
1743
|
-
var
|
|
1744
|
-
return
|
|
1745
|
-
},
|
|
1746
|
-
function
|
|
1747
|
-
var r, n, i,
|
|
1739
|
+
e = zr(e);
|
|
1740
|
+
var t = Dr.test(e);
|
|
1741
|
+
return t || Rr.test(e) ? Wr(e.slice(2), t ? 2 : 8) : Ar.test(e) ? Xt : +e;
|
|
1742
|
+
}
|
|
1743
|
+
var vt = function() {
|
|
1744
|
+
return ma.Date.now();
|
|
1745
|
+
}, Lr = "Expected a function", Mr = Math.max, jr = Math.min;
|
|
1746
|
+
function yt(e, a, t) {
|
|
1747
|
+
var r, n, i, s, o, l, d = 0, c = !1, h = !1, w = !0;
|
|
1748
1748
|
if (typeof e != "function")
|
|
1749
|
-
throw new TypeError(
|
|
1750
|
-
a =
|
|
1751
|
-
function
|
|
1752
|
-
var
|
|
1753
|
-
return r = n = void 0, d =
|
|
1749
|
+
throw new TypeError(Lr);
|
|
1750
|
+
a = Kt(a) || 0, it(t) && (c = !!t.leading, h = "maxWait" in t, i = h ? Mr(Kt(t.maxWait) || 0, a) : i, w = "trailing" in t ? !!t.trailing : w);
|
|
1751
|
+
function g($) {
|
|
1752
|
+
var T = r, M = n;
|
|
1753
|
+
return r = n = void 0, d = $, s = e.apply(M, T), s;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1756
|
-
return d =
|
|
1755
|
+
function b($) {
|
|
1756
|
+
return d = $, o = setTimeout(k, a), c ? g($) : s;
|
|
1757
1757
|
}
|
|
1758
|
-
function O(
|
|
1759
|
-
var
|
|
1760
|
-
return
|
|
1758
|
+
function O($) {
|
|
1759
|
+
var T = $ - l, M = $ - d, j = a - T;
|
|
1760
|
+
return h ? jr(j, i - M) : j;
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1763
|
-
var
|
|
1764
|
-
return
|
|
1762
|
+
function B($) {
|
|
1763
|
+
var T = $ - l, M = $ - d;
|
|
1764
|
+
return l === void 0 || T >= a || T < 0 || h && M >= i;
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1767
|
-
var
|
|
1768
|
-
if (
|
|
1769
|
-
return
|
|
1770
|
-
o = setTimeout(
|
|
1766
|
+
function k() {
|
|
1767
|
+
var $ = vt();
|
|
1768
|
+
if (B($))
|
|
1769
|
+
return V($);
|
|
1770
|
+
o = setTimeout(k, O($));
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
return o = void 0,
|
|
1772
|
+
function V($) {
|
|
1773
|
+
return o = void 0, w && r ? g($) : (r = n = void 0, s);
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1776
|
-
o !== void 0 && clearTimeout(o), d = 0, r =
|
|
1775
|
+
function D() {
|
|
1776
|
+
o !== void 0 && clearTimeout(o), d = 0, r = l = n = o = void 0;
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1779
|
-
return o === void 0 ?
|
|
1778
|
+
function S() {
|
|
1779
|
+
return o === void 0 ? s : V(vt());
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1782
|
-
var
|
|
1783
|
-
if (r = arguments, n = this,
|
|
1781
|
+
function P() {
|
|
1782
|
+
var $ = vt(), T = B($);
|
|
1783
|
+
if (r = arguments, n = this, l = $, T) {
|
|
1784
1784
|
if (o === void 0)
|
|
1785
|
-
return
|
|
1786
|
-
if (
|
|
1787
|
-
return clearTimeout(o), o = setTimeout(
|
|
1785
|
+
return b(l);
|
|
1786
|
+
if (h)
|
|
1787
|
+
return clearTimeout(o), o = setTimeout(k, a), g(l);
|
|
1788
1788
|
}
|
|
1789
|
-
return o === void 0 && (o = setTimeout(
|
|
1789
|
+
return o === void 0 && (o = setTimeout(k, a)), s;
|
|
1790
1790
|
}
|
|
1791
|
-
return
|
|
1791
|
+
return P.cancel = D, P.flush = S, P;
|
|
1792
1792
|
}
|
|
1793
1793
|
var Nr = "Expected a function";
|
|
1794
1794
|
function Ir(e, a, t) {
|
|
1795
1795
|
var r = !0, n = !0;
|
|
1796
1796
|
if (typeof e != "function")
|
|
1797
1797
|
throw new TypeError(Nr);
|
|
1798
|
-
return
|
|
1798
|
+
return it(t) && (r = "leading" in t ? !!t.leading : r, n = "trailing" in t ? !!t.trailing : n), yt(e, a, {
|
|
1799
1799
|
leading: r,
|
|
1800
1800
|
maxWait: a,
|
|
1801
1801
|
trailing: n
|
|
@@ -1806,16 +1806,16 @@ const _r = (e, a) => {
|
|
|
1806
1806
|
const n = e.value, i = r.target;
|
|
1807
1807
|
!n || !i || !(i instanceof Node) || n.contains(i) || a(r);
|
|
1808
1808
|
};
|
|
1809
|
-
|
|
1809
|
+
qe(() => {
|
|
1810
1810
|
document.addEventListener("click", t, !0);
|
|
1811
|
-
}),
|
|
1811
|
+
}), Se(() => {
|
|
1812
1812
|
document.removeEventListener("click", t, !0);
|
|
1813
1813
|
});
|
|
1814
|
-
}, Fr = 80,
|
|
1814
|
+
}, Fr = 80, wt = /* @__PURE__ */ G({
|
|
1815
1815
|
name: "Popover",
|
|
1816
1816
|
__name: "Popover",
|
|
1817
1817
|
props: {
|
|
1818
|
-
|
|
1818
|
+
teleported: { type: Boolean, default: !0 },
|
|
1819
1819
|
preserveContentMount: { type: Boolean, default: !1 },
|
|
1820
1820
|
trigger: { default: "click" },
|
|
1821
1821
|
placement: { default: "bottom-start" },
|
|
@@ -1831,19 +1831,24 @@ const _r = (e, a) => {
|
|
|
1831
1831
|
},
|
|
1832
1832
|
emits: ["visible-change", "click-outside", "scroll"],
|
|
1833
1833
|
setup(e, { expose: a, emit: t }) {
|
|
1834
|
-
const r = F(!1), n = e, i =
|
|
1835
|
-
let
|
|
1836
|
-
const O = (
|
|
1837
|
-
const
|
|
1838
|
-
return
|
|
1839
|
-
}),
|
|
1840
|
-
const
|
|
1841
|
-
if (
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1834
|
+
const r = F(!1), n = e, i = m(() => n.preserveContentMount || r.value), s = m(() => !n.preserveContentMount || r.value), o = t, l = F(null), d = F(), c = F();
|
|
1835
|
+
let h = null, w = Pe({}), g = Pe({}), b = Pe({});
|
|
1836
|
+
const O = (C) => typeof C == "number" ? `${C}px` : C, B = m(() => {
|
|
1837
|
+
const C = n.maxPopperHeight;
|
|
1838
|
+
return C != null && C !== "";
|
|
1839
|
+
}), k = m(() => {
|
|
1840
|
+
const C = {}, W = n.popperWidth;
|
|
1841
|
+
if (W != null && W !== "" && (C.width = O(W)), B.value) {
|
|
1842
|
+
const te = n.maxPopperHeight;
|
|
1843
|
+
C.maxHeight = O(te), C.overflowY = "auto", C.scrollbarWidth = "none", C.msOverflowStyle = "none";
|
|
1844
1844
|
}
|
|
1845
|
-
return
|
|
1846
|
-
}),
|
|
1845
|
+
return C.padding = O(n.padding), C;
|
|
1846
|
+
}), V = () => {
|
|
1847
|
+
const C = d.value;
|
|
1848
|
+
if (!C) return null;
|
|
1849
|
+
const W = C.firstElementChild;
|
|
1850
|
+
return W instanceof HTMLElement ? W : C;
|
|
1851
|
+
}, D = m(() => ({
|
|
1847
1852
|
placement: n.placement,
|
|
1848
1853
|
modifiers: [
|
|
1849
1854
|
{
|
|
@@ -1854,102 +1859,105 @@ const _r = (e, a) => {
|
|
|
1854
1859
|
}
|
|
1855
1860
|
],
|
|
1856
1861
|
...n.popoverOptions
|
|
1857
|
-
})),
|
|
1862
|
+
})), S = () => {
|
|
1858
1863
|
n.disabled || (r.value = !0, o("visible-change", !0));
|
|
1859
|
-
}, C = () => {
|
|
1860
|
-
r.value = !1, o("visible-change", !1);
|
|
1861
|
-
}, E = gt(R, n.openDelay), f = gt(C, n.closeDelay), S = () => {
|
|
1862
|
-
n.disabled || (f.cancel(), E());
|
|
1863
1864
|
}, P = () => {
|
|
1864
|
-
|
|
1865
|
+
r.value = !1, o("visible-change", !1);
|
|
1866
|
+
}, $ = yt(S, n.openDelay), T = yt(P, n.closeDelay), M = () => {
|
|
1867
|
+
n.disabled || (T.cancel(), $());
|
|
1868
|
+
}, j = () => {
|
|
1869
|
+
$.cancel(), T();
|
|
1865
1870
|
};
|
|
1866
|
-
_r(
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1871
|
+
_r(l, (C) => {
|
|
1872
|
+
const W = C.target;
|
|
1873
|
+
W instanceof Node && c.value?.contains(W) || (n.trigger === "click" && r.value && !n.manual && j(), r.value && o("click-outside", !0));
|
|
1869
1874
|
});
|
|
1870
|
-
const
|
|
1871
|
-
n.disabled || (r.value ?
|
|
1872
|
-
},
|
|
1873
|
-
|
|
1875
|
+
const _ = () => {
|
|
1876
|
+
n.disabled || (r.value ? j() : M());
|
|
1877
|
+
}, R = () => {
|
|
1878
|
+
b = {}, n.trigger === "hover" ? (g.mouseenter = M, w.mouseleave = j, b.mouseenter = M, b.mouseleave = j) : n.trigger === "click" && (g.click = _);
|
|
1874
1879
|
};
|
|
1875
|
-
|
|
1880
|
+
ee(
|
|
1876
1881
|
() => r.value,
|
|
1877
|
-
(
|
|
1878
|
-
|
|
1882
|
+
(C) => {
|
|
1883
|
+
if (C) {
|
|
1884
|
+
const W = V();
|
|
1885
|
+
W && c.value ? h = vr(W, c.value, D.value) : h?.destroy();
|
|
1886
|
+
}
|
|
1879
1887
|
},
|
|
1880
1888
|
{ flush: "post" }
|
|
1881
|
-
),
|
|
1889
|
+
), ee(
|
|
1882
1890
|
() => n.manual,
|
|
1883
|
-
(
|
|
1884
|
-
|
|
1891
|
+
(C) => {
|
|
1892
|
+
C ? (g = {}, w = {}, b = {}) : R();
|
|
1885
1893
|
}
|
|
1886
|
-
),
|
|
1894
|
+
), ee(
|
|
1887
1895
|
() => n.trigger,
|
|
1888
|
-
(
|
|
1889
|
-
|
|
1896
|
+
(C, W) => {
|
|
1897
|
+
C !== W && (g = {}, w = {}, b = {}, R());
|
|
1890
1898
|
}
|
|
1891
|
-
),
|
|
1892
|
-
() => n.
|
|
1899
|
+
), ee(
|
|
1900
|
+
() => n.teleported,
|
|
1893
1901
|
() => {
|
|
1894
|
-
n.manual ||
|
|
1902
|
+
n.manual || R();
|
|
1895
1903
|
}
|
|
1896
|
-
),
|
|
1904
|
+
), ee(
|
|
1897
1905
|
() => n.disabled,
|
|
1898
|
-
(
|
|
1899
|
-
|
|
1906
|
+
(C) => {
|
|
1907
|
+
C && j();
|
|
1900
1908
|
}
|
|
1901
|
-
),
|
|
1902
|
-
n.manual ||
|
|
1909
|
+
), qe(() => {
|
|
1910
|
+
n.manual || R();
|
|
1903
1911
|
});
|
|
1904
|
-
const
|
|
1905
|
-
const
|
|
1906
|
-
o("scroll", { scrollTop:
|
|
1912
|
+
const q = Ir((C) => {
|
|
1913
|
+
const W = C.target;
|
|
1914
|
+
o("scroll", { scrollTop: W.scrollTop, scrollLeft: W.scrollLeft });
|
|
1907
1915
|
}, Fr);
|
|
1908
|
-
return
|
|
1909
|
-
|
|
1916
|
+
return Se(() => {
|
|
1917
|
+
q.cancel(), h?.destroy();
|
|
1910
1918
|
}), a({
|
|
1911
1919
|
isOpen: r,
|
|
1912
|
-
open:
|
|
1913
|
-
close:
|
|
1914
|
-
}), (
|
|
1920
|
+
open: M,
|
|
1921
|
+
close: j
|
|
1922
|
+
}), (C, W) => (p(), x("div", Ce({
|
|
1915
1923
|
class: "cregis-popover",
|
|
1916
1924
|
ref_key: "popoverRef",
|
|
1917
|
-
ref:
|
|
1918
|
-
},
|
|
1919
|
-
|
|
1925
|
+
ref: l
|
|
1926
|
+
}, dt(ne(w), !0)), [
|
|
1927
|
+
z("div", Ce({
|
|
1920
1928
|
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
1921
1929
|
ref_key: "popoverTriggerRef",
|
|
1922
1930
|
ref: d
|
|
1923
|
-
},
|
|
1924
|
-
|
|
1931
|
+
}, dt(ne(g), !0)), [
|
|
1932
|
+
Y(C.$slots, "reference")
|
|
1925
1933
|
], 16),
|
|
1926
|
-
(p(),
|
|
1934
|
+
(p(), ve(ea, {
|
|
1927
1935
|
to: "body",
|
|
1928
|
-
disabled: !e.
|
|
1936
|
+
disabled: !e.teleported
|
|
1929
1937
|
}, [
|
|
1930
|
-
K(
|
|
1931
|
-
default:
|
|
1932
|
-
i.value ?
|
|
1938
|
+
K(lt, { name: "fade" }, {
|
|
1939
|
+
default: re(() => [
|
|
1940
|
+
i.value ? Fe((p(), x("div", Ce({
|
|
1933
1941
|
key: 0,
|
|
1934
|
-
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar":
|
|
1942
|
+
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": B.value }],
|
|
1935
1943
|
ref_key: "popoverContentRef",
|
|
1936
1944
|
ref: c,
|
|
1937
|
-
style:
|
|
1938
|
-
},
|
|
1939
|
-
onScroll:
|
|
1940
|
-
(...
|
|
1945
|
+
style: k.value
|
|
1946
|
+
}, dt(ne(b), !0), {
|
|
1947
|
+
onScroll: W[0] || (W[0] = //@ts-ignore
|
|
1948
|
+
(...te) => ne(q) && ne(q)(...te))
|
|
1941
1949
|
}), [
|
|
1942
|
-
|
|
1950
|
+
Y(C.$slots, "default")
|
|
1943
1951
|
], 16)), [
|
|
1944
|
-
[
|
|
1945
|
-
]) :
|
|
1952
|
+
[Ct, s.value]
|
|
1953
|
+
]) : H("", !0)
|
|
1946
1954
|
]),
|
|
1947
1955
|
_: 3
|
|
1948
1956
|
})
|
|
1949
1957
|
], 8, ["disabled"]))
|
|
1950
1958
|
], 16));
|
|
1951
1959
|
}
|
|
1952
|
-
}),
|
|
1960
|
+
}), ha = Symbol("CregisSelect"), Hr = { class: "cregis-select__selected" }, Ur = {
|
|
1953
1961
|
key: 0,
|
|
1954
1962
|
class: "cregis-select__count"
|
|
1955
1963
|
}, qr = {
|
|
@@ -1961,7 +1969,7 @@ const _r = (e, a) => {
|
|
|
1961
1969
|
}, Xr = {
|
|
1962
1970
|
key: 2,
|
|
1963
1971
|
class: "cregis-select__dropdown-filter-empty"
|
|
1964
|
-
}, Kr = { class: "cregis-select__dropdown-content" },
|
|
1972
|
+
}, Kr = { class: "cregis-select__dropdown-content" }, Ei = /* @__PURE__ */ G({
|
|
1965
1973
|
name: "Select",
|
|
1966
1974
|
__name: "Select",
|
|
1967
1975
|
props: {
|
|
@@ -1983,164 +1991,193 @@ const _r = (e, a) => {
|
|
|
1983
1991
|
},
|
|
1984
1992
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
1985
1993
|
setup(e, { emit: a }) {
|
|
1986
|
-
const t = e, r = a, n = F(null), i = F(!1);
|
|
1987
|
-
let l = null;
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
},
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1994
|
+
const t = e, r = a, n = F(null), i = F(null), s = F(!1), o = F();
|
|
1995
|
+
let l = null, d = null;
|
|
1996
|
+
const c = () => {
|
|
1997
|
+
d !== null && (clearTimeout(d), d = null);
|
|
1998
|
+
}, h = (v) => typeof v == "string" && v.trim().endsWith("%"), w = () => {
|
|
1999
|
+
if (!h(t.triggerWidth) || t.popperWidth) return;
|
|
2000
|
+
const v = i.value;
|
|
2001
|
+
v && (o.value = v.offsetWidth + 8);
|
|
2002
|
+
}, g = async (v) => {
|
|
2003
|
+
s.value = v, r("visible-change", v), v && h(t.triggerWidth) && (await Oe(), w()), !v && t.filterable && (_.value = "", R.value = "", c());
|
|
2004
|
+
}, b = (v) => typeof v == "number" ? `n:${v}` : `s:${v}`, O = Pe({}), B = Pe({}), k = F(0), V = F(null), D = (v, X, Z) => {
|
|
2005
|
+
const be = b(v);
|
|
2006
|
+
return k.value++, O[be] = X, B[be] = Z ?? X, () => {
|
|
2007
|
+
k.value--, delete O[be], delete B[be];
|
|
1996
2008
|
};
|
|
1997
|
-
},
|
|
1998
|
-
|
|
2009
|
+
}, S = m(() => k.value === 0);
|
|
2010
|
+
ee(
|
|
1999
2011
|
() => t.modelValue,
|
|
2000
|
-
(
|
|
2012
|
+
(v) => {
|
|
2001
2013
|
if (!t.multiple) {
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
2014
|
+
if (v == null || v === "") {
|
|
2015
|
+
V.value = null;
|
|
2004
2016
|
return;
|
|
2005
2017
|
}
|
|
2006
|
-
|
|
2018
|
+
V.value && V.value.value !== v && (V.value = null);
|
|
2007
2019
|
}
|
|
2008
2020
|
}
|
|
2009
2021
|
);
|
|
2010
|
-
const
|
|
2022
|
+
const P = m(() => {
|
|
2011
2023
|
if (t.multiple)
|
|
2012
2024
|
return Array.isArray(t.modelValue) && t.modelValue.length > 0;
|
|
2013
|
-
const
|
|
2014
|
-
return
|
|
2015
|
-
}),
|
|
2016
|
-
if (!
|
|
2025
|
+
const v = t.modelValue;
|
|
2026
|
+
return v != null && v !== "";
|
|
2027
|
+
}), $ = m(() => !t.multiple || !Array.isArray(t.modelValue) ? 0 : t.modelValue.length), T = m(() => {
|
|
2028
|
+
if (!P.value) return "";
|
|
2017
2029
|
if (t.multiple)
|
|
2018
|
-
return t.modelValue.map((
|
|
2019
|
-
const
|
|
2020
|
-
return
|
|
2021
|
-
}),
|
|
2030
|
+
return t.modelValue.map((Z) => O[b(Z)] ?? String(Z)).join("、");
|
|
2031
|
+
const v = t.modelValue;
|
|
2032
|
+
return V.value?.value === v ? V.value.label : O[b(v)] ?? String(v);
|
|
2033
|
+
}), M = (v) => t.multiple ? Array.isArray(t.modelValue) && t.modelValue.includes(v) : t.modelValue === v, j = (v, X) => {
|
|
2022
2034
|
if (!t.disabled) {
|
|
2023
2035
|
if (t.multiple) {
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2036
|
+
const Z = Array.isArray(t.modelValue) ? [...t.modelValue] : [], be = Z.indexOf(v);
|
|
2037
|
+
be >= 0 ? Z.splice(be, 1) : Z.push(v), r("update:modelValue", Z), r("change", Z);
|
|
2026
2038
|
return;
|
|
2027
2039
|
}
|
|
2028
|
-
|
|
2040
|
+
V.value = { value: v, label: X }, r("update:modelValue", v), r("change", v), n.value?.close();
|
|
2029
2041
|
}
|
|
2030
|
-
},
|
|
2031
|
-
const
|
|
2032
|
-
return !t.filterable || !
|
|
2033
|
-
}),
|
|
2034
|
-
() => t.filterable && !!
|
|
2035
|
-
),
|
|
2036
|
-
t.filterable && (
|
|
2037
|
-
|
|
2042
|
+
}, _ = F(""), R = F(""), q = m(() => R.value.trim().toLowerCase()), C = m(() => {
|
|
2043
|
+
const v = q.value;
|
|
2044
|
+
return !t.filterable || !v ? !0 : Object.keys(O).some((X) => (B[X] ?? O[X] ?? "").toLowerCase().includes(v));
|
|
2045
|
+
}), W = m(
|
|
2046
|
+
() => t.filterable && !!q.value && !C.value && !S.value
|
|
2047
|
+
), te = () => {
|
|
2048
|
+
t.filterable && (c(), d = setTimeout(() => {
|
|
2049
|
+
R.value = _.value.trim(), d = null;
|
|
2038
2050
|
}, t.filterDebounceMs));
|
|
2039
2051
|
};
|
|
2040
|
-
|
|
2041
|
-
t.filterable &&
|
|
2042
|
-
}),
|
|
2052
|
+
ee(_, () => {
|
|
2053
|
+
t.filterable && te();
|
|
2054
|
+
}), ee(
|
|
2043
2055
|
() => t.filterable,
|
|
2044
|
-
(
|
|
2045
|
-
|
|
2056
|
+
(v) => {
|
|
2057
|
+
v || (_.value = "", R.value = "", c());
|
|
2058
|
+
}
|
|
2059
|
+
);
|
|
2060
|
+
const u = () => {
|
|
2061
|
+
l?.disconnect(), l = null, !(!h(t.triggerWidth) || !i.value) && (l = new ResizeObserver(() => {
|
|
2062
|
+
w();
|
|
2063
|
+
}), l.observe(i.value));
|
|
2064
|
+
};
|
|
2065
|
+
ee(
|
|
2066
|
+
() => t.triggerWidth,
|
|
2067
|
+
() => {
|
|
2068
|
+
h(t.triggerWidth) ? Oe(() => {
|
|
2069
|
+
w(), u();
|
|
2070
|
+
}) : (o.value = void 0, l?.disconnect(), l = null);
|
|
2046
2071
|
}
|
|
2047
|
-
),
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2072
|
+
), qe(() => {
|
|
2073
|
+
h(t.triggerWidth) && Oe(() => {
|
|
2074
|
+
w(), u();
|
|
2075
|
+
});
|
|
2076
|
+
}), Se(() => {
|
|
2077
|
+
c(), l?.disconnect();
|
|
2078
|
+
});
|
|
2079
|
+
const y = (v) => {
|
|
2080
|
+
r("filter-input", String(v ?? ""));
|
|
2081
|
+
}, A = () => {
|
|
2082
|
+
R.value = "", c(), r("filter-clear");
|
|
2052
2083
|
};
|
|
2053
|
-
Qt(
|
|
2054
|
-
modelValue:
|
|
2055
|
-
multiple:
|
|
2056
|
-
disabled:
|
|
2057
|
-
selectOption:
|
|
2058
|
-
isOptionSelected:
|
|
2059
|
-
registerOption:
|
|
2060
|
-
filterQuery:
|
|
2084
|
+
Qt(ha, {
|
|
2085
|
+
modelValue: m(() => t.modelValue),
|
|
2086
|
+
multiple: m(() => !!t.multiple),
|
|
2087
|
+
disabled: m(() => !!t.disabled),
|
|
2088
|
+
selectOption: j,
|
|
2089
|
+
isOptionSelected: M,
|
|
2090
|
+
registerOption: D,
|
|
2091
|
+
filterQuery: q
|
|
2061
2092
|
});
|
|
2062
|
-
const
|
|
2063
|
-
if (t.popperWidth) return
|
|
2064
|
-
const
|
|
2065
|
-
return typeof
|
|
2066
|
-
}),
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2093
|
+
const U = (v) => typeof v == "number" ? `${v}px` : v, Q = m(() => {
|
|
2094
|
+
if (t.popperWidth) return U(t.popperWidth);
|
|
2095
|
+
const v = t.triggerWidth;
|
|
2096
|
+
return h(v) ? o.value : typeof v == "number" ? v + 8 : `calc(${v} + 8px)`;
|
|
2097
|
+
}), oe = m(() => {
|
|
2098
|
+
const v = Q.value;
|
|
2099
|
+
if (!(v == null || v === ""))
|
|
2100
|
+
return typeof v == "number" ? `${v - 12}px` : `calc(${v} - 12px)`;
|
|
2101
|
+
}), ae = m(() => t.align === "center" ? "bottom" : t.align === "left" ? "bottom-start" : "bottom-end"), le = m(() => ({
|
|
2102
|
+
width: U(t.triggerWidth)
|
|
2103
|
+
})), we = m(() => t.size === "large" ? "20px" : t.size === "medium" ? "14px" : "12px"), de = F(0), pe = (v) => {
|
|
2104
|
+
de.value = v.scrollTop;
|
|
2070
2105
|
};
|
|
2071
|
-
return (
|
|
2072
|
-
class:
|
|
2106
|
+
return (v, X) => (p(), x("div", {
|
|
2107
|
+
class: N(["cregis-select", { "is-disabled": e.disabled, "is-percent-width": h(e.triggerWidth) }])
|
|
2073
2108
|
}, [
|
|
2074
|
-
K(
|
|
2109
|
+
K(wt, {
|
|
2075
2110
|
ref_key: "popoverRef",
|
|
2076
2111
|
ref: n,
|
|
2077
2112
|
"preserve-content-mount": "",
|
|
2078
|
-
"popper-width":
|
|
2079
|
-
placement:
|
|
2113
|
+
"popper-width": Q.value,
|
|
2114
|
+
placement: ae.value,
|
|
2080
2115
|
disabled: !!e.disabled,
|
|
2081
2116
|
padding: 0,
|
|
2082
2117
|
"max-popper-height": e.maxPopperHeight,
|
|
2083
|
-
onVisibleChange:
|
|
2084
|
-
onScroll:
|
|
2118
|
+
onVisibleChange: g,
|
|
2119
|
+
onScroll: pe
|
|
2085
2120
|
}, {
|
|
2086
|
-
reference:
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2121
|
+
reference: re(() => [
|
|
2122
|
+
z("div", {
|
|
2123
|
+
ref_key: "triggerRef",
|
|
2124
|
+
ref: i,
|
|
2125
|
+
class: N(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
2126
|
+
style: ie(le.value)
|
|
2090
2127
|
}, [
|
|
2091
|
-
|
|
2092
|
-
class:
|
|
2128
|
+
z("div", {
|
|
2129
|
+
class: N(["cregis-select__trigger-label", { "is-multiple": e.multiple }])
|
|
2093
2130
|
}, [
|
|
2094
|
-
|
|
2131
|
+
P.value ? Y(v.$slots, "label", {
|
|
2095
2132
|
key: 0,
|
|
2096
2133
|
modelValue: e.modelValue,
|
|
2097
|
-
displayText:
|
|
2098
|
-
selectedCount:
|
|
2134
|
+
displayText: T.value,
|
|
2135
|
+
selectedCount: $.value,
|
|
2099
2136
|
placeholder: e.placeholder,
|
|
2100
|
-
hasSelection:
|
|
2137
|
+
hasSelection: P.value
|
|
2101
2138
|
}, () => [
|
|
2102
|
-
|
|
2103
|
-
e.multiple ? (p(),
|
|
2104
|
-
]) : (p(),
|
|
2139
|
+
z("p", Hr, I(T.value), 1),
|
|
2140
|
+
e.multiple ? (p(), x("span", Ur, I($.value), 1)) : H("", !0)
|
|
2141
|
+
]) : (p(), x("p", qr, I(e.placeholder), 1))
|
|
2105
2142
|
], 2),
|
|
2106
|
-
|
|
2107
|
-
class:
|
|
2143
|
+
z("span", {
|
|
2144
|
+
class: N(["cregis-select__icon", { "is-open": s.value }])
|
|
2108
2145
|
}, [
|
|
2109
|
-
K(
|
|
2110
|
-
size:
|
|
2146
|
+
K(ne(na), {
|
|
2147
|
+
size: we.value,
|
|
2111
2148
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2112
2149
|
}, null, 8, ["size", "color"])
|
|
2113
2150
|
], 2)
|
|
2114
2151
|
], 6)
|
|
2115
2152
|
]),
|
|
2116
|
-
default:
|
|
2117
|
-
|
|
2118
|
-
class:
|
|
2153
|
+
default: re(() => [
|
|
2154
|
+
z("div", {
|
|
2155
|
+
class: N(["cregis-select__dropdown", { "is-empty": S.value }])
|
|
2119
2156
|
}, [
|
|
2120
|
-
|
|
2121
|
-
e.filterable && !
|
|
2157
|
+
S.value ? (p(), x("p", Yr, I(e.noDataText), 1)) : H("", !0),
|
|
2158
|
+
e.filterable && !S.value ? (p(), x("div", {
|
|
2122
2159
|
key: 1,
|
|
2123
|
-
class:
|
|
2160
|
+
class: N(["cregis-select__dropdown-filter", { "backdrop-fixed-header": de.value > 10 }])
|
|
2124
2161
|
}, [
|
|
2125
|
-
K(
|
|
2126
|
-
modelValue:
|
|
2127
|
-
"onUpdate:modelValue":
|
|
2162
|
+
K(ra, {
|
|
2163
|
+
modelValue: _.value,
|
|
2164
|
+
"onUpdate:modelValue": X[0] || (X[0] = (Z) => _.value = Z),
|
|
2128
2165
|
placeholder: e.searchText,
|
|
2129
|
-
width:
|
|
2166
|
+
width: oe.value,
|
|
2130
2167
|
size: "small",
|
|
2131
2168
|
clearable: "",
|
|
2132
|
-
onInput:
|
|
2133
|
-
onClear:
|
|
2169
|
+
onInput: y,
|
|
2170
|
+
onClear: A
|
|
2134
2171
|
}, {
|
|
2135
|
-
prefix:
|
|
2136
|
-
K(
|
|
2172
|
+
prefix: re(() => [
|
|
2173
|
+
K(ne(aa), { size: "14px" })
|
|
2137
2174
|
]),
|
|
2138
2175
|
_: 1
|
|
2139
2176
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2140
|
-
], 2)) :
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2177
|
+
], 2)) : H("", !0),
|
|
2178
|
+
W.value ? (p(), x("p", Xr, I(e.noMatchText), 1)) : H("", !0),
|
|
2179
|
+
z("div", Kr, [
|
|
2180
|
+
Y(v.$slots, "default")
|
|
2144
2181
|
])
|
|
2145
2182
|
], 2)
|
|
2146
2183
|
]),
|
|
@@ -2151,7 +2188,7 @@ const _r = (e, a) => {
|
|
|
2151
2188
|
}), Gr = ["aria-selected"], Qr = {
|
|
2152
2189
|
key: 1,
|
|
2153
2190
|
class: "cregis-select__option-content"
|
|
2154
|
-
},
|
|
2191
|
+
}, zi = /* @__PURE__ */ G({
|
|
2155
2192
|
name: "Option",
|
|
2156
2193
|
__name: "Option",
|
|
2157
2194
|
props: {
|
|
@@ -2161,58 +2198,58 @@ const _r = (e, a) => {
|
|
|
2161
2198
|
filterText: {}
|
|
2162
2199
|
},
|
|
2163
2200
|
setup(e) {
|
|
2164
|
-
const a = e, t = Zt(
|
|
2201
|
+
const a = e, t = Zt(ha, null);
|
|
2165
2202
|
let r;
|
|
2166
2203
|
const n = () => a.filterText ?? a.label, i = () => {
|
|
2167
2204
|
r?.(), t && (r = t.registerOption(a.value, a.label, n()));
|
|
2168
2205
|
};
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2206
|
+
qe(i), Se(() => r?.()), ee(() => [a.value, a.label, a.filterText], i);
|
|
2207
|
+
const s = m(() => t?.multiple.value ?? !1), o = m(() => t?.isOptionSelected(a.value) ?? !1), l = () => {
|
|
2171
2208
|
a.disabled || t?.disabled.value || t?.selectOption(a.value, a.label);
|
|
2172
2209
|
}, d = () => {
|
|
2173
|
-
|
|
2174
|
-
}, c =
|
|
2175
|
-
const
|
|
2176
|
-
return
|
|
2210
|
+
l();
|
|
2211
|
+
}, c = m(() => t?.filterQuery?.value ?? ""), h = m(() => {
|
|
2212
|
+
const w = c.value;
|
|
2213
|
+
return w ? n().toLowerCase().includes(w) : !0;
|
|
2177
2214
|
});
|
|
2178
|
-
return (
|
|
2179
|
-
class:
|
|
2180
|
-
"is-selected": o.value && !
|
|
2215
|
+
return (w, g) => Fe((p(), x("div", {
|
|
2216
|
+
class: N(["cregis-select__option", {
|
|
2217
|
+
"is-selected": o.value && !s.value,
|
|
2181
2218
|
"is-disabled": e.disabled,
|
|
2182
|
-
"cregis-select__option--multiple":
|
|
2219
|
+
"cregis-select__option--multiple": s.value
|
|
2183
2220
|
}]),
|
|
2184
2221
|
role: "option",
|
|
2185
2222
|
"aria-selected": o.value,
|
|
2186
|
-
onClick:
|
|
2223
|
+
onClick: l
|
|
2187
2224
|
}, [
|
|
2188
|
-
|
|
2225
|
+
s.value ? (p(), ve(Ua, {
|
|
2189
2226
|
key: 0,
|
|
2190
2227
|
"model-value": o.value,
|
|
2191
|
-
disabled: e.disabled || !!
|
|
2192
|
-
onClick:
|
|
2228
|
+
disabled: e.disabled || !!ne(t)?.disabled.value,
|
|
2229
|
+
onClick: g[0] || (g[0] = kt(() => {
|
|
2193
2230
|
}, ["stop"])),
|
|
2194
2231
|
"onUpdate:modelValue": d
|
|
2195
|
-
}, null, 8, ["model-value", "disabled"])) :
|
|
2196
|
-
|
|
2197
|
-
|
|
2232
|
+
}, null, 8, ["model-value", "disabled"])) : H("", !0),
|
|
2233
|
+
s.value ? (p(), x("div", Qr, [
|
|
2234
|
+
Y(w.$slots, "default", {
|
|
2198
2235
|
label: e.label,
|
|
2199
2236
|
value: e.value,
|
|
2200
2237
|
disabled: !!e.disabled,
|
|
2201
2238
|
selected: o.value
|
|
2202
2239
|
}, () => [
|
|
2203
|
-
|
|
2240
|
+
ye(I(e.label), 1)
|
|
2204
2241
|
])
|
|
2205
|
-
])) :
|
|
2242
|
+
])) : Y(w.$slots, "default", {
|
|
2206
2243
|
key: 2,
|
|
2207
2244
|
label: e.label,
|
|
2208
2245
|
value: e.value,
|
|
2209
2246
|
disabled: !!e.disabled,
|
|
2210
2247
|
selected: o.value
|
|
2211
2248
|
}, () => [
|
|
2212
|
-
|
|
2249
|
+
ye(I(e.label), 1)
|
|
2213
2250
|
])
|
|
2214
2251
|
], 10, Gr)), [
|
|
2215
|
-
[
|
|
2252
|
+
[Ct, h.value]
|
|
2216
2253
|
]);
|
|
2217
2254
|
}
|
|
2218
2255
|
}), Zr = { class: "cregis-cascader__trigger-label" }, Jr = { class: "cregis-cascader__selected" }, ei = {
|
|
@@ -2230,7 +2267,7 @@ const _r = (e, a) => {
|
|
|
2230
2267
|
}, ii = { class: "cregis-cascader__suboption-amount-container" }, oi = {
|
|
2231
2268
|
key: 0,
|
|
2232
2269
|
class: "cregis-cascader__suboption-amount"
|
|
2233
|
-
}, li = { class: "cregis-cascader__suboption-panel" }, si = ["onClick"], ci = ["onClick"],
|
|
2270
|
+
}, li = { class: "cregis-cascader__suboption-panel" }, si = ["onClick"], ci = ["onClick"], Ai = /* @__PURE__ */ G({
|
|
2234
2271
|
name: "Cascader",
|
|
2235
2272
|
__name: "Cascader",
|
|
2236
2273
|
props: {
|
|
@@ -2255,286 +2292,299 @@ const _r = (e, a) => {
|
|
|
2255
2292
|
},
|
|
2256
2293
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2257
2294
|
setup(e, { emit: a }) {
|
|
2258
|
-
const t = e, r = a, n = F(null), i = F(!1)
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
},
|
|
2263
|
-
|
|
2264
|
-
|
|
2295
|
+
const t = e, r = a, n = F(null), i = F(!1), s = F(null), o = /* @__PURE__ */ new Map(), l = (f, L) => {
|
|
2296
|
+
L && typeof L == "object" && "close" in L && typeof L.close == "function" ? o.set(f, L) : o.delete(f);
|
|
2297
|
+
}, d = () => {
|
|
2298
|
+
o.forEach((f) => f.close()), s.value = null;
|
|
2299
|
+
}, c = (f, L) => {
|
|
2300
|
+
if (L) {
|
|
2301
|
+
s.value = f;
|
|
2302
|
+
return;
|
|
2303
|
+
}
|
|
2304
|
+
s.value === f && (s.value = null);
|
|
2305
|
+
};
|
|
2306
|
+
let h = null;
|
|
2307
|
+
const w = () => {
|
|
2308
|
+
h !== null && (clearTimeout(h), h = null);
|
|
2309
|
+
}, g = F(""), b = F(""), O = m(() => b.value.trim().toLowerCase()), B = () => {
|
|
2310
|
+
t.filterable && (w(), h = setTimeout(() => {
|
|
2311
|
+
b.value = g.value.trim(), h = null;
|
|
2265
2312
|
}, t.filterDebounceMs));
|
|
2266
2313
|
};
|
|
2267
|
-
|
|
2268
|
-
t.filterable &&
|
|
2269
|
-
}),
|
|
2314
|
+
ee(g, () => {
|
|
2315
|
+
t.filterable && B();
|
|
2316
|
+
}), ee(
|
|
2270
2317
|
() => t.filterable,
|
|
2271
|
-
(
|
|
2272
|
-
|
|
2318
|
+
(f) => {
|
|
2319
|
+
f || (g.value = "", b.value = "", w());
|
|
2273
2320
|
}
|
|
2274
|
-
),
|
|
2275
|
-
const
|
|
2276
|
-
r("filter-input", String(
|
|
2277
|
-
},
|
|
2278
|
-
|
|
2279
|
-
},
|
|
2280
|
-
const
|
|
2281
|
-
return !
|
|
2282
|
-
},
|
|
2283
|
-
const
|
|
2284
|
-
return !
|
|
2285
|
-
},
|
|
2286
|
-
() => t.filterable && !!
|
|
2287
|
-
),
|
|
2288
|
-
i.value =
|
|
2289
|
-
},
|
|
2290
|
-
const
|
|
2291
|
-
if (
|
|
2321
|
+
), Se(() => w());
|
|
2322
|
+
const k = (f) => {
|
|
2323
|
+
r("filter-input", String(f ?? ""));
|
|
2324
|
+
}, V = () => {
|
|
2325
|
+
b.value = "", w(), r("filter-clear");
|
|
2326
|
+
}, D = (f) => (f.filterText ?? f.label).toLowerCase(), S = (f) => {
|
|
2327
|
+
const L = O.value;
|
|
2328
|
+
return !L || D(f).includes(L) ? !0 : (f.children ?? []).some((se) => D(se).includes(L));
|
|
2329
|
+
}, P = (f, L) => {
|
|
2330
|
+
const E = O.value;
|
|
2331
|
+
return !E || D(f).includes(E) ? !0 : D(L).includes(E);
|
|
2332
|
+
}, $ = m(() => t.options.filter((f) => S(f))), T = m(() => t.options.length === 0), M = m(() => (O.value, t.options.some((f) => S(f)))), j = m(
|
|
2333
|
+
() => t.filterable && !!b.value.trim() && !M.value && !T.value
|
|
2334
|
+
), _ = (f) => {
|
|
2335
|
+
i.value = f, r("visible-change", f), f || d(), !f && t.filterable && (g.value = "", b.value = "", w());
|
|
2336
|
+
}, R = F(null), q = (f) => {
|
|
2337
|
+
const L = t.options.find((E) => E.value === f);
|
|
2338
|
+
if (L)
|
|
2292
2339
|
return {
|
|
2293
2340
|
level: 1,
|
|
2294
|
-
label:
|
|
2295
|
-
primary:
|
|
2341
|
+
label: L.label,
|
|
2342
|
+
primary: L,
|
|
2296
2343
|
sub: void 0
|
|
2297
2344
|
};
|
|
2298
|
-
for (const
|
|
2299
|
-
const
|
|
2300
|
-
if (
|
|
2345
|
+
for (const E of t.options) {
|
|
2346
|
+
const se = E.children?.find((J) => J.value === f);
|
|
2347
|
+
if (se)
|
|
2301
2348
|
return {
|
|
2302
2349
|
level: 2,
|
|
2303
|
-
label:
|
|
2304
|
-
primary:
|
|
2305
|
-
sub:
|
|
2350
|
+
label: se.label,
|
|
2351
|
+
primary: E,
|
|
2352
|
+
sub: se
|
|
2306
2353
|
};
|
|
2307
2354
|
}
|
|
2308
2355
|
return {
|
|
2309
2356
|
level: 0,
|
|
2310
|
-
label: String(
|
|
2357
|
+
label: String(f),
|
|
2311
2358
|
primary: void 0,
|
|
2312
2359
|
sub: void 0
|
|
2313
2360
|
};
|
|
2314
|
-
},
|
|
2315
|
-
const
|
|
2316
|
-
return
|
|
2361
|
+
}, C = m(() => {
|
|
2362
|
+
const f = t.modelValue;
|
|
2363
|
+
return f == null || f === "" ? {
|
|
2317
2364
|
level: 0,
|
|
2318
2365
|
label: "",
|
|
2319
2366
|
primary: void 0,
|
|
2320
2367
|
sub: void 0
|
|
2321
|
-
} :
|
|
2322
|
-
level:
|
|
2323
|
-
label:
|
|
2324
|
-
primary:
|
|
2325
|
-
sub:
|
|
2326
|
-
} :
|
|
2368
|
+
} : R.value !== null && R.value.value === f ? {
|
|
2369
|
+
level: R.value.level,
|
|
2370
|
+
label: R.value.label,
|
|
2371
|
+
primary: R.value.primary,
|
|
2372
|
+
sub: R.value.sub
|
|
2373
|
+
} : q(f);
|
|
2327
2374
|
});
|
|
2328
|
-
|
|
2375
|
+
ee(
|
|
2329
2376
|
() => t.modelValue,
|
|
2330
|
-
(
|
|
2331
|
-
if (
|
|
2332
|
-
|
|
2377
|
+
(f) => {
|
|
2378
|
+
if (f == null || f === "") {
|
|
2379
|
+
R.value = null;
|
|
2333
2380
|
return;
|
|
2334
2381
|
}
|
|
2335
|
-
|
|
2382
|
+
R.value !== null && R.value.value !== f && (R.value = null);
|
|
2336
2383
|
}
|
|
2337
2384
|
);
|
|
2338
|
-
const
|
|
2339
|
-
const
|
|
2340
|
-
return
|
|
2341
|
-
},
|
|
2342
|
-
t.disabled ||
|
|
2343
|
-
},
|
|
2344
|
-
t.disabled ||
|
|
2345
|
-
},
|
|
2385
|
+
const W = m(() => C.value.level > 0), te = m(() => C.value.label), u = m(() => t.modelValue), y = m(() => te.value), A = m(() => C.value.level), U = m(() => C.value.primary), Q = m(() => C.value.sub), oe = (f) => (f.children?.length ?? 0) > 0, ae = (f) => t.modelValue === f, le = (f) => {
|
|
2386
|
+
const L = t.modelValue;
|
|
2387
|
+
return L == null || L === "" ? !1 : (f.children ?? []).some((E) => E.value === L);
|
|
2388
|
+
}, we = (f, L) => {
|
|
2389
|
+
t.disabled || f.disabled || L.disabled || (R.value = { value: L.value, label: L.label, level: 2, primary: f, sub: L }, r("update:modelValue", L.value), r("change", L.value), d(), n.value?.close());
|
|
2390
|
+
}, de = (f) => {
|
|
2391
|
+
t.disabled || f.disabled || oe(f) || (R.value = { value: f.value, label: f.label, level: 1, primary: f }, r("update:modelValue", f.value), r("change", f.value), d(), n.value?.close());
|
|
2392
|
+
}, pe = (f) => typeof f == "number" ? `${f}px` : f, v = m(() => {
|
|
2346
2393
|
if (t.popperWidth !== void 0 && t.popperWidth !== null && t.popperWidth !== "")
|
|
2347
|
-
return
|
|
2348
|
-
const
|
|
2349
|
-
return typeof
|
|
2350
|
-
}),
|
|
2351
|
-
maxHeight:
|
|
2394
|
+
return pe(t.popperWidth);
|
|
2395
|
+
const f = t.triggerWidth;
|
|
2396
|
+
return typeof f == "number" ? `${f + 8}px` : `calc(${f} + 8px)`;
|
|
2397
|
+
}), X = m(() => pe(t.subPopperWidth)), Z = m(() => typeof v.value == "number" ? `${v.value - 12}px` : `calc(${v.value} - 12px)`), be = m(() => ({
|
|
2398
|
+
maxHeight: pe(t.maxPopperHeight),
|
|
2352
2399
|
overflowY: "auto"
|
|
2353
|
-
})),
|
|
2354
|
-
width:
|
|
2355
|
-
})),
|
|
2356
|
-
const
|
|
2357
|
-
|
|
2358
|
-
},
|
|
2359
|
-
return (
|
|
2360
|
-
class:
|
|
2400
|
+
})), Le = { strategy: "fixed" }, ct = m(() => t.align === "center" ? "bottom" : t.align === "left" ? "bottom-start" : "bottom-end"), Ke = m(() => ({
|
|
2401
|
+
width: pe(t.triggerWidth)
|
|
2402
|
+
})), ut = m(() => t.size === "large" ? "20px" : t.size === "medium" ? "14px" : "12px"), Ge = F(0), Qe = (f) => {
|
|
2403
|
+
const L = f.target;
|
|
2404
|
+
Ge.value = L.scrollTop;
|
|
2405
|
+
}, Ze = [-16, -8];
|
|
2406
|
+
return (f, L) => (p(), x("div", {
|
|
2407
|
+
class: N(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2361
2408
|
}, [
|
|
2362
|
-
K(
|
|
2409
|
+
K(wt, {
|
|
2363
2410
|
ref_key: "popoverRef",
|
|
2364
2411
|
ref: n,
|
|
2365
2412
|
"preserve-content-mount": "",
|
|
2366
|
-
"popper-width":
|
|
2367
|
-
placement:
|
|
2413
|
+
"popper-width": v.value,
|
|
2414
|
+
placement: ct.value,
|
|
2368
2415
|
offset: e.offset,
|
|
2369
2416
|
disabled: !!e.disabled,
|
|
2370
2417
|
padding: 0,
|
|
2371
|
-
onVisibleChange:
|
|
2418
|
+
onVisibleChange: _
|
|
2372
2419
|
}, {
|
|
2373
|
-
reference:
|
|
2374
|
-
|
|
2420
|
+
reference: re(() => [
|
|
2421
|
+
f.$slots.trigger ? Y(f.$slots, "trigger", {
|
|
2375
2422
|
key: 0,
|
|
2376
|
-
modelValue:
|
|
2377
|
-
selectedLabel:
|
|
2378
|
-
level:
|
|
2379
|
-
primaryOption:
|
|
2380
|
-
subOption:
|
|
2423
|
+
modelValue: u.value,
|
|
2424
|
+
selectedLabel: y.value,
|
|
2425
|
+
level: A.value,
|
|
2426
|
+
primaryOption: U.value,
|
|
2427
|
+
subOption: Q.value,
|
|
2381
2428
|
placeholder: e.placeholder,
|
|
2382
|
-
hasSelection:
|
|
2429
|
+
hasSelection: W.value,
|
|
2383
2430
|
open: i.value,
|
|
2384
2431
|
disabled: !!e.disabled
|
|
2385
|
-
}) : (p(),
|
|
2432
|
+
}) : (p(), x("div", {
|
|
2386
2433
|
key: 1,
|
|
2387
|
-
class:
|
|
2388
|
-
style:
|
|
2434
|
+
class: N(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2435
|
+
style: ie(Ke.value)
|
|
2389
2436
|
}, [
|
|
2390
|
-
|
|
2391
|
-
|
|
2437
|
+
z("div", Zr, [
|
|
2438
|
+
W.value ? Y(f.$slots, "label", {
|
|
2392
2439
|
key: 0,
|
|
2393
|
-
modelValue:
|
|
2394
|
-
selectedLabel:
|
|
2395
|
-
level:
|
|
2396
|
-
primaryOption:
|
|
2397
|
-
subOption:
|
|
2440
|
+
modelValue: u.value,
|
|
2441
|
+
selectedLabel: y.value,
|
|
2442
|
+
level: A.value,
|
|
2443
|
+
primaryOption: U.value,
|
|
2444
|
+
subOption: Q.value,
|
|
2398
2445
|
placeholder: e.placeholder,
|
|
2399
|
-
hasSelection:
|
|
2446
|
+
hasSelection: W.value
|
|
2400
2447
|
}, () => [
|
|
2401
|
-
|
|
2402
|
-
]) : (p(),
|
|
2448
|
+
z("p", Jr, I(te.value), 1)
|
|
2449
|
+
]) : (p(), x("p", ei, I(e.placeholder), 1))
|
|
2403
2450
|
]),
|
|
2404
|
-
|
|
2405
|
-
class:
|
|
2451
|
+
z("span", {
|
|
2452
|
+
class: N(["cregis-cascader__icon", { "is-open": i.value }])
|
|
2406
2453
|
}, [
|
|
2407
|
-
K(
|
|
2408
|
-
size:
|
|
2454
|
+
K(ne(na), {
|
|
2455
|
+
size: ut.value,
|
|
2409
2456
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2410
2457
|
}, null, 8, ["size", "color"])
|
|
2411
2458
|
], 2)
|
|
2412
2459
|
], 6))
|
|
2413
2460
|
]),
|
|
2414
|
-
default:
|
|
2415
|
-
|
|
2416
|
-
class:
|
|
2417
|
-
style:
|
|
2418
|
-
onScroll:
|
|
2461
|
+
default: re(() => [
|
|
2462
|
+
z("div", {
|
|
2463
|
+
class: N(["cregis-cascader__dropdown", { "is-empty": T.value }]),
|
|
2464
|
+
style: ie(be.value),
|
|
2465
|
+
onScroll: Qe
|
|
2419
2466
|
}, [
|
|
2420
|
-
|
|
2421
|
-
e.filterable && !
|
|
2467
|
+
T.value ? (p(), x("p", ti, I(e.noDataText), 1)) : H("", !0),
|
|
2468
|
+
e.filterable && !T.value ? (p(), x("div", {
|
|
2422
2469
|
key: 1,
|
|
2423
|
-
class:
|
|
2470
|
+
class: N(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": Ge.value > 10 }])
|
|
2424
2471
|
}, [
|
|
2425
|
-
K(
|
|
2426
|
-
modelValue:
|
|
2427
|
-
"onUpdate:modelValue":
|
|
2472
|
+
K(ra, {
|
|
2473
|
+
modelValue: g.value,
|
|
2474
|
+
"onUpdate:modelValue": L[0] || (L[0] = (E) => g.value = E),
|
|
2428
2475
|
placeholder: e.searchText,
|
|
2429
|
-
width:
|
|
2476
|
+
width: Z.value,
|
|
2430
2477
|
size: "small",
|
|
2431
2478
|
clearable: "",
|
|
2432
|
-
onInput:
|
|
2433
|
-
onClear:
|
|
2479
|
+
onInput: k,
|
|
2480
|
+
onClear: V
|
|
2434
2481
|
}, {
|
|
2435
|
-
prefix:
|
|
2436
|
-
K(
|
|
2482
|
+
prefix: re(() => [
|
|
2483
|
+
K(ne(aa), { size: "14px" })
|
|
2437
2484
|
]),
|
|
2438
2485
|
_: 1
|
|
2439
2486
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2440
|
-
], 2)) :
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
(p(!0),
|
|
2444
|
-
key:
|
|
2445
|
-
class:
|
|
2487
|
+
], 2)) : H("", !0),
|
|
2488
|
+
j.value ? (p(), x("p", ai, I(e.noMatchText), 1)) : H("", !0),
|
|
2489
|
+
z("ul", ni, [
|
|
2490
|
+
(p(!0), x(mt, null, gt($.value, (E, se) => (p(), x("li", {
|
|
2491
|
+
key: E.value,
|
|
2492
|
+
class: N(["cregis-cascader__dropdown-item", { "is-disabled": E.disabled, "is-sub-open": s.value === E.value }])
|
|
2446
2493
|
}, [
|
|
2447
|
-
|
|
2448
|
-
K(
|
|
2494
|
+
oe(E) ? (p(), x("div", ri, [
|
|
2495
|
+
K(wt, {
|
|
2496
|
+
ref_for: !0,
|
|
2497
|
+
ref: (J) => l(E.value, J),
|
|
2449
2498
|
trigger: "hover",
|
|
2450
2499
|
placement: "right-start",
|
|
2451
|
-
offset:
|
|
2452
|
-
"popover-options":
|
|
2453
|
-
"popper-width":
|
|
2500
|
+
offset: Ze,
|
|
2501
|
+
"popover-options": Le,
|
|
2502
|
+
"popper-width": X.value,
|
|
2454
2503
|
padding: 4,
|
|
2455
|
-
disabled: !!
|
|
2504
|
+
disabled: !!E.disabled || !!e.disabled,
|
|
2505
|
+
onVisibleChange: (J) => c(E.value, J)
|
|
2456
2506
|
}, {
|
|
2457
|
-
reference:
|
|
2458
|
-
|
|
2459
|
-
class:
|
|
2460
|
-
"is-disabled":
|
|
2461
|
-
"is-parent-active":
|
|
2507
|
+
reference: re(() => [
|
|
2508
|
+
z("div", {
|
|
2509
|
+
class: N(["cregis-cascader__suboption-trigger", {
|
|
2510
|
+
"is-disabled": E.disabled,
|
|
2511
|
+
"is-parent-active": le(E)
|
|
2462
2512
|
}])
|
|
2463
2513
|
}, [
|
|
2464
|
-
|
|
2465
|
-
modelValue:
|
|
2466
|
-
selectedLabel:
|
|
2467
|
-
level:
|
|
2468
|
-
primaryOption:
|
|
2469
|
-
subOption:
|
|
2470
|
-
option:
|
|
2471
|
-
index:
|
|
2472
|
-
disabled: !!
|
|
2473
|
-
selected:
|
|
2474
|
-
isParentOfSelected:
|
|
2514
|
+
Y(f.$slots, "option", {
|
|
2515
|
+
modelValue: u.value,
|
|
2516
|
+
selectedLabel: y.value,
|
|
2517
|
+
level: A.value,
|
|
2518
|
+
primaryOption: U.value,
|
|
2519
|
+
subOption: Q.value,
|
|
2520
|
+
option: E,
|
|
2521
|
+
index: se,
|
|
2522
|
+
disabled: !!E.disabled,
|
|
2523
|
+
selected: ae(E.value),
|
|
2524
|
+
isParentOfSelected: le(E)
|
|
2475
2525
|
}, () => [
|
|
2476
|
-
|
|
2526
|
+
z("p", null, I(E.label), 1)
|
|
2477
2527
|
]),
|
|
2478
|
-
|
|
2479
|
-
e.showSubOptionAmount ? (p(),
|
|
2480
|
-
K(
|
|
2528
|
+
z("div", ii, [
|
|
2529
|
+
e.showSubOptionAmount ? (p(), x("div", oi, I(E.children.length), 1)) : H("", !0),
|
|
2530
|
+
K(ne(Ta), {
|
|
2481
2531
|
size: "14px",
|
|
2482
2532
|
color: "currentColor"
|
|
2483
2533
|
})
|
|
2484
2534
|
])
|
|
2485
2535
|
], 2)
|
|
2486
2536
|
]),
|
|
2487
|
-
default:
|
|
2488
|
-
|
|
2489
|
-
(p(!0),
|
|
2490
|
-
key:
|
|
2491
|
-
class:
|
|
2492
|
-
"is-active":
|
|
2493
|
-
"is-disabled":
|
|
2537
|
+
default: re(() => [
|
|
2538
|
+
z("div", li, [
|
|
2539
|
+
(p(!0), x(mt, null, gt(E.children, (J, Je) => Fe((p(), x("div", {
|
|
2540
|
+
key: J.value,
|
|
2541
|
+
class: N(["cregis-cascader__suboption-row", {
|
|
2542
|
+
"is-active": ae(J.value),
|
|
2543
|
+
"is-disabled": J.disabled
|
|
2494
2544
|
}]),
|
|
2495
2545
|
role: "menuitem",
|
|
2496
|
-
onClick: (
|
|
2546
|
+
onClick: (et) => we(E, J)
|
|
2497
2547
|
}, [
|
|
2498
|
-
|
|
2499
|
-
modelValue:
|
|
2500
|
-
selectedLabel:
|
|
2501
|
-
level:
|
|
2502
|
-
primaryOption:
|
|
2503
|
-
subOption:
|
|
2504
|
-
option:
|
|
2505
|
-
index:
|
|
2506
|
-
parent:
|
|
2507
|
-
parentIndex:
|
|
2508
|
-
selected:
|
|
2509
|
-
disabled: !!
|
|
2548
|
+
Y(f.$slots, "subOption", {
|
|
2549
|
+
modelValue: u.value,
|
|
2550
|
+
selectedLabel: y.value,
|
|
2551
|
+
level: A.value,
|
|
2552
|
+
primaryOption: U.value,
|
|
2553
|
+
subOption: Q.value,
|
|
2554
|
+
option: J,
|
|
2555
|
+
index: Je,
|
|
2556
|
+
parent: E,
|
|
2557
|
+
parentIndex: se,
|
|
2558
|
+
selected: ae(J.value),
|
|
2559
|
+
disabled: !!J.disabled
|
|
2510
2560
|
}, () => [
|
|
2511
|
-
|
|
2561
|
+
ye(I(J.label), 1)
|
|
2512
2562
|
])
|
|
2513
2563
|
], 10, si)), [
|
|
2514
|
-
[
|
|
2564
|
+
[Ct, P(E, J)]
|
|
2515
2565
|
])), 128))
|
|
2516
2566
|
])
|
|
2517
2567
|
]),
|
|
2518
2568
|
_: 2
|
|
2519
|
-
}, 1032, ["popper-width", "disabled"])
|
|
2520
|
-
])) : (p(),
|
|
2569
|
+
}, 1032, ["popper-width", "disabled", "onVisibleChange"])
|
|
2570
|
+
])) : (p(), x("div", {
|
|
2521
2571
|
key: 1,
|
|
2522
2572
|
class: "cregis-cascader__leaf-only",
|
|
2523
|
-
onClick: (
|
|
2573
|
+
onClick: (J) => de(E)
|
|
2524
2574
|
}, [
|
|
2525
|
-
|
|
2526
|
-
modelValue:
|
|
2527
|
-
selectedLabel:
|
|
2528
|
-
level:
|
|
2529
|
-
primaryOption:
|
|
2530
|
-
subOption:
|
|
2531
|
-
option:
|
|
2532
|
-
index:
|
|
2533
|
-
disabled: !!
|
|
2534
|
-
selected:
|
|
2575
|
+
Y(f.$slots, "option", {
|
|
2576
|
+
modelValue: u.value,
|
|
2577
|
+
selectedLabel: y.value,
|
|
2578
|
+
level: A.value,
|
|
2579
|
+
primaryOption: U.value,
|
|
2580
|
+
subOption: Q.value,
|
|
2581
|
+
option: E,
|
|
2582
|
+
index: se,
|
|
2583
|
+
disabled: !!E.disabled,
|
|
2584
|
+
selected: ae(E.value),
|
|
2535
2585
|
isParentOfSelected: !1
|
|
2536
2586
|
}, () => [
|
|
2537
|
-
|
|
2587
|
+
z("p", null, I(E.label), 1)
|
|
2538
2588
|
])
|
|
2539
2589
|
], 8, ci))
|
|
2540
2590
|
], 2))), 128))
|
|
@@ -2545,7 +2595,7 @@ const _r = (e, a) => {
|
|
|
2545
2595
|
}, 8, ["popper-width", "placement", "offset", "disabled"])
|
|
2546
2596
|
], 2));
|
|
2547
2597
|
}
|
|
2548
|
-
}),
|
|
2598
|
+
}), Di = /* @__PURE__ */ G({
|
|
2549
2599
|
name: "Tag",
|
|
2550
2600
|
__name: "Tag",
|
|
2551
2601
|
props: {
|
|
@@ -2554,15 +2604,15 @@ const _r = (e, a) => {
|
|
|
2554
2604
|
text: {}
|
|
2555
2605
|
},
|
|
2556
2606
|
setup(e) {
|
|
2557
|
-
return (a, t) => (p(),
|
|
2558
|
-
class:
|
|
2607
|
+
return (a, t) => (p(), x("div", {
|
|
2608
|
+
class: N(["cregis-tag", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`]])
|
|
2559
2609
|
}, [
|
|
2560
|
-
|
|
2561
|
-
|
|
2610
|
+
Y(a.$slots, "default", {}, () => [
|
|
2611
|
+
ye(I(e.text), 1)
|
|
2562
2612
|
])
|
|
2563
2613
|
], 2));
|
|
2564
2614
|
}
|
|
2565
|
-
}),
|
|
2615
|
+
}), Ri = /* @__PURE__ */ G({
|
|
2566
2616
|
name: "Switch",
|
|
2567
2617
|
__name: "Switch",
|
|
2568
2618
|
props: {
|
|
@@ -2575,7 +2625,7 @@ const _r = (e, a) => {
|
|
|
2575
2625
|
},
|
|
2576
2626
|
emits: ["update:modelValue", "change"],
|
|
2577
2627
|
setup(e, { emit: a }) {
|
|
2578
|
-
const t = e, r = a, n = F(!1), i =
|
|
2628
|
+
const t = e, r = a, n = F(!1), i = m(() => t.modelValue === t.activeValue), s = async () => {
|
|
2579
2629
|
if (t.disabled || n.value) return;
|
|
2580
2630
|
const o = i.value ? t.inactiveValue : t.activeValue;
|
|
2581
2631
|
if (t.beforeChange) {
|
|
@@ -2590,22 +2640,22 @@ const _r = (e, a) => {
|
|
|
2590
2640
|
}
|
|
2591
2641
|
r("update:modelValue", o);
|
|
2592
2642
|
};
|
|
2593
|
-
return
|
|
2643
|
+
return ee(
|
|
2594
2644
|
() => t.modelValue,
|
|
2595
2645
|
(o) => {
|
|
2596
2646
|
r("change", o);
|
|
2597
2647
|
}
|
|
2598
|
-
), (o,
|
|
2599
|
-
class:
|
|
2648
|
+
), (o, l) => (p(), x("div", {
|
|
2649
|
+
class: N(["cregis-switch", [
|
|
2600
2650
|
`cregis-switch--${e.size}`,
|
|
2601
2651
|
{ "is-checked": i.value, "is-disabled": e.disabled || n.value }
|
|
2602
2652
|
]]),
|
|
2603
|
-
onClick:
|
|
2604
|
-
}, [...
|
|
2605
|
-
|
|
2653
|
+
onClick: s
|
|
2654
|
+
}, [...l[0] || (l[0] = [
|
|
2655
|
+
z("div", { class: "cregis-switch__circle" }, null, -1)
|
|
2606
2656
|
])], 2));
|
|
2607
2657
|
}
|
|
2608
|
-
}), ui = { class: "cregis-badge__wrapper" }, Wi = /* @__PURE__ */
|
|
2658
|
+
}), ui = { class: "cregis-badge__wrapper" }, Wi = /* @__PURE__ */ G({
|
|
2609
2659
|
name: "Badge",
|
|
2610
2660
|
__name: "Badge",
|
|
2611
2661
|
props: {
|
|
@@ -2620,23 +2670,23 @@ const _r = (e, a) => {
|
|
|
2620
2670
|
const a = {
|
|
2621
2671
|
normal: [-8, -10],
|
|
2622
2672
|
dot: [-2, -2]
|
|
2623
|
-
}, t = e, r =
|
|
2673
|
+
}, t = e, r = m(() => t.offset ?? (t.isDot ? a.dot : a.normal)), n = m(() => ({
|
|
2624
2674
|
top: `${r.value[0]}px`,
|
|
2625
2675
|
right: `${r.value[1]}px`
|
|
2626
2676
|
}));
|
|
2627
|
-
return (i,
|
|
2628
|
-
e.hidden ?
|
|
2677
|
+
return (i, s) => (p(), x("div", ui, [
|
|
2678
|
+
e.hidden ? H("", !0) : (p(), x("div", {
|
|
2629
2679
|
key: 0,
|
|
2630
|
-
class:
|
|
2631
|
-
style:
|
|
2632
|
-
},
|
|
2633
|
-
|
|
2680
|
+
class: N(["cregis-badge", [`cregis-badge--${e.type}`, { "cregis-badge--dot": e.isDot }]]),
|
|
2681
|
+
style: ie(n.value)
|
|
2682
|
+
}, I(e.isDot ? "" : Number(e.value) > e.max ? `${e.max}+` : e.value), 7)),
|
|
2683
|
+
Y(i.$slots, "default")
|
|
2634
2684
|
]));
|
|
2635
2685
|
}
|
|
2636
2686
|
}), di = ["accept", "disabled"], fi = ["src"], pi = {
|
|
2637
2687
|
key: 2,
|
|
2638
2688
|
class: "cregis-upload__mask"
|
|
2639
|
-
},
|
|
2689
|
+
}, Li = /* @__PURE__ */ G({
|
|
2640
2690
|
name: "Upload",
|
|
2641
2691
|
__name: "Upload",
|
|
2642
2692
|
props: {
|
|
@@ -2651,105 +2701,105 @@ const _r = (e, a) => {
|
|
|
2651
2701
|
},
|
|
2652
2702
|
emits: ["update:modelValue"],
|
|
2653
2703
|
setup(e, { emit: a }) {
|
|
2654
|
-
const t = e, r = a, n = F(0), i = F(""),
|
|
2655
|
-
if (!
|
|
2656
|
-
if (
|
|
2704
|
+
const t = e, r = a, n = F(0), i = F(""), s = ["http:", "https:", "blob:"], o = (k) => {
|
|
2705
|
+
if (!k) return !1;
|
|
2706
|
+
if (k.toLowerCase().startsWith("data:image/")) return !0;
|
|
2657
2707
|
try {
|
|
2658
|
-
const { protocol:
|
|
2659
|
-
return
|
|
2708
|
+
const { protocol: V } = new URL(k, window.location.origin);
|
|
2709
|
+
return s.includes(V);
|
|
2660
2710
|
} catch {
|
|
2661
|
-
return
|
|
2711
|
+
return k.startsWith("/") && !k.startsWith("//");
|
|
2662
2712
|
}
|
|
2663
|
-
},
|
|
2713
|
+
}, l = m(() => o(i.value) ? i.value : ""), d = m(() => ({
|
|
2664
2714
|
width: typeof t.width == "number" ? `${t.width}px` : t.width,
|
|
2665
2715
|
height: typeof t.width == "number" ? `${t.width}px` : t.width
|
|
2666
|
-
})), c = (
|
|
2667
|
-
const
|
|
2668
|
-
return
|
|
2669
|
-
},
|
|
2670
|
-
const
|
|
2671
|
-
if (!
|
|
2672
|
-
const
|
|
2673
|
-
return
|
|
2674
|
-
const
|
|
2675
|
-
return
|
|
2716
|
+
})), c = (k) => {
|
|
2717
|
+
const V = k.lastIndexOf(".");
|
|
2718
|
+
return V === -1 ? "" : k.slice(V + 1).toLowerCase();
|
|
2719
|
+
}, h = (k, V) => {
|
|
2720
|
+
const D = V.split(",").map(($) => $.trim()).filter(Boolean);
|
|
2721
|
+
if (!D.length) return !0;
|
|
2722
|
+
const S = c(k.name), P = k.type.toLowerCase();
|
|
2723
|
+
return D.some(($) => {
|
|
2724
|
+
const T = $.toLowerCase();
|
|
2725
|
+
return T.startsWith(".") ? S === T.slice(1) : T.includes("/") ? T.endsWith("/*") ? P.startsWith(T.slice(0, -1)) : P === T : S === T;
|
|
2676
2726
|
});
|
|
2677
|
-
},
|
|
2678
|
-
|
|
2727
|
+
}, w = (k) => {
|
|
2728
|
+
k.value = "";
|
|
2679
2729
|
};
|
|
2680
|
-
let
|
|
2681
|
-
const
|
|
2682
|
-
const
|
|
2683
|
-
if (!
|
|
2684
|
-
if (t.accept && !
|
|
2685
|
-
Lt(t.exceedAcceptTip ?? "The file format does not meet the requirements."),
|
|
2730
|
+
let g;
|
|
2731
|
+
const b = (k) => {
|
|
2732
|
+
const V = k.target, D = V.files?.[0];
|
|
2733
|
+
if (!D) return;
|
|
2734
|
+
if (t.accept && !h(D, t.accept)) {
|
|
2735
|
+
Lt(t.exceedAcceptTip ?? "The file format does not meet the requirements."), w(V);
|
|
2686
2736
|
return;
|
|
2687
2737
|
}
|
|
2688
|
-
if (t.size !== void 0 &&
|
|
2689
|
-
Lt(t.exceedSizeTip ?? `The file size cannot exceed ${t.size} MB.`),
|
|
2738
|
+
if (t.size !== void 0 && D.size > t.size * 1024 * 1024) {
|
|
2739
|
+
Lt(t.exceedSizeTip ?? `The file size cannot exceed ${t.size} MB.`), w(V);
|
|
2690
2740
|
return;
|
|
2691
2741
|
}
|
|
2692
2742
|
r("update:modelValue", "");
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
n.value += 30, n.value >= 90 && clearInterval(
|
|
2743
|
+
const S = new FormData();
|
|
2744
|
+
S.append("file", D, D.name), t.onChange?.(S), g = setInterval(() => {
|
|
2745
|
+
n.value += 30, n.value >= 90 && clearInterval(g);
|
|
2696
2746
|
}, 200);
|
|
2697
2747
|
};
|
|
2698
|
-
|
|
2748
|
+
ee(
|
|
2699
2749
|
() => t.modelValue,
|
|
2700
|
-
(
|
|
2701
|
-
|
|
2750
|
+
(k) => {
|
|
2751
|
+
k ? (n.value = 100, i.value = k) : (n.value = 0, i.value = "");
|
|
2702
2752
|
},
|
|
2703
2753
|
{
|
|
2704
2754
|
immediate: !0
|
|
2705
2755
|
}
|
|
2706
2756
|
);
|
|
2707
|
-
const O =
|
|
2757
|
+
const O = m(() => ({
|
|
2708
2758
|
width: `${n.value}%`,
|
|
2709
2759
|
borderRadius: n.value === 100 ? "0 0 6px 6px" : "0 0 0 6px"
|
|
2710
|
-
})),
|
|
2711
|
-
return
|
|
2712
|
-
|
|
2713
|
-
}), (
|
|
2714
|
-
class:
|
|
2715
|
-
style:
|
|
2760
|
+
})), B = m(() => t.disabled || n.value > 0 && n.value < 100);
|
|
2761
|
+
return Se(() => {
|
|
2762
|
+
g && clearInterval(g);
|
|
2763
|
+
}), (k, V) => (p(), x("div", {
|
|
2764
|
+
class: N(["cregis-upload", { "cregis-upload--disabled": B.value }]),
|
|
2765
|
+
style: ie(d.value)
|
|
2716
2766
|
}, [
|
|
2717
|
-
K(
|
|
2767
|
+
K(ne(Wt), {
|
|
2718
2768
|
size: "16px",
|
|
2719
2769
|
color: "var(--stroke-base-secondary)"
|
|
2720
2770
|
}),
|
|
2721
|
-
|
|
2771
|
+
z("input", {
|
|
2722
2772
|
type: "file",
|
|
2723
2773
|
title: "",
|
|
2724
2774
|
accept: e.accept,
|
|
2725
|
-
disabled:
|
|
2726
|
-
onChange:
|
|
2775
|
+
disabled: B.value,
|
|
2776
|
+
onChange: b
|
|
2727
2777
|
}, null, 40, di),
|
|
2728
|
-
n.value > 0 && n.value < 100 ? (p(),
|
|
2778
|
+
n.value > 0 && n.value < 100 ? (p(), x("div", {
|
|
2729
2779
|
key: 0,
|
|
2730
2780
|
class: "cregis-upload__progress",
|
|
2731
|
-
style:
|
|
2732
|
-
}, null, 4)) :
|
|
2733
|
-
|
|
2781
|
+
style: ie(O.value)
|
|
2782
|
+
}, null, 4)) : H("", !0),
|
|
2783
|
+
l.value ? (p(), x("img", {
|
|
2734
2784
|
key: 1,
|
|
2735
|
-
src:
|
|
2785
|
+
src: l.value,
|
|
2736
2786
|
alt: ""
|
|
2737
|
-
}, null, 8, fi)) :
|
|
2738
|
-
|
|
2739
|
-
K(
|
|
2787
|
+
}, null, 8, fi)) : H("", !0),
|
|
2788
|
+
l.value ? (p(), x("div", pi, [
|
|
2789
|
+
K(ne(Wt), {
|
|
2740
2790
|
size: "16px",
|
|
2741
2791
|
color: "var(--text-same-white-primary)"
|
|
2742
2792
|
})
|
|
2743
|
-
])) :
|
|
2793
|
+
])) : H("", !0)
|
|
2744
2794
|
], 6));
|
|
2745
2795
|
}
|
|
2746
2796
|
});
|
|
2747
|
-
let
|
|
2797
|
+
let _e = 0, ba = "";
|
|
2748
2798
|
const vi = () => {
|
|
2749
|
-
|
|
2750
|
-
},
|
|
2751
|
-
|
|
2752
|
-
},
|
|
2799
|
+
_e === 0 && (ba = document.body.style.overflow, document.body.style.overflow = "hidden"), _e++;
|
|
2800
|
+
}, Gt = () => {
|
|
2801
|
+
_e <= 0 || (_e--, _e === 0 && (document.body.style.overflow = ba));
|
|
2802
|
+
}, ot = /* @__PURE__ */ G({
|
|
2753
2803
|
name: "Dialog",
|
|
2754
2804
|
__name: "Dialog",
|
|
2755
2805
|
props: {
|
|
@@ -2766,76 +2816,76 @@ const vi = () => {
|
|
|
2766
2816
|
setup(e, { emit: a }) {
|
|
2767
2817
|
const t = e, r = a;
|
|
2768
2818
|
let n = !1;
|
|
2769
|
-
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2772
|
-
}, { immediate: !0 }),
|
|
2773
|
-
n && (
|
|
2819
|
+
ee(() => [t.modelValue, t.lockScroll], () => {
|
|
2820
|
+
const h = t.modelValue && t.lockScroll;
|
|
2821
|
+
h && !n ? (vi(), n = !0) : !h && n && (Gt(), n = !1);
|
|
2822
|
+
}, { immediate: !0 }), Se(() => {
|
|
2823
|
+
n && (Gt(), n = !1);
|
|
2774
2824
|
});
|
|
2775
|
-
const
|
|
2825
|
+
const s = m(() => ({
|
|
2776
2826
|
width: typeof t.width == "number" ? `${t.width}px` : t.width
|
|
2777
|
-
})), o =
|
|
2827
|
+
})), o = m(() => {
|
|
2778
2828
|
if (!t.alignCenter)
|
|
2779
2829
|
return {
|
|
2780
2830
|
paddingTop: t.top
|
|
2781
2831
|
};
|
|
2782
|
-
}),
|
|
2832
|
+
}), l = () => {
|
|
2783
2833
|
r("update:modelValue", !1);
|
|
2784
2834
|
}, d = () => {
|
|
2785
|
-
t.closeOnClickModal &&
|
|
2835
|
+
t.closeOnClickModal && l();
|
|
2786
2836
|
}, c = () => {
|
|
2787
2837
|
r("after-leave");
|
|
2788
2838
|
};
|
|
2789
|
-
return (
|
|
2790
|
-
K(
|
|
2839
|
+
return (h, w) => (p(), ve(ea, { to: "body" }, [
|
|
2840
|
+
K(lt, {
|
|
2791
2841
|
name: "cregis-dialog-fade",
|
|
2792
2842
|
onAfterLeave: c
|
|
2793
2843
|
}, {
|
|
2794
|
-
default:
|
|
2795
|
-
e.modelValue ? (p(),
|
|
2844
|
+
default: re(() => [
|
|
2845
|
+
e.modelValue ? (p(), x("div", {
|
|
2796
2846
|
key: 0,
|
|
2797
|
-
class:
|
|
2847
|
+
class: N(["cregis-dialog__wrapper", {
|
|
2798
2848
|
"cregis-dialog__wrapper--center": e.alignCenter,
|
|
2799
2849
|
"cregis-dialog__wrapper--no-modal": !e.modal
|
|
2800
2850
|
}]),
|
|
2801
|
-
style:
|
|
2851
|
+
style: ie(o.value)
|
|
2802
2852
|
}, [
|
|
2803
|
-
e.modal ? (p(),
|
|
2853
|
+
e.modal ? (p(), x("div", {
|
|
2804
2854
|
key: 0,
|
|
2805
2855
|
class: "cregis-dialog__mask",
|
|
2806
2856
|
onClick: d
|
|
2807
|
-
})) :
|
|
2808
|
-
|
|
2857
|
+
})) : H("", !0),
|
|
2858
|
+
z("div", {
|
|
2809
2859
|
class: "cregis-dialog",
|
|
2810
|
-
style:
|
|
2811
|
-
onClick:
|
|
2860
|
+
style: ie(s.value),
|
|
2861
|
+
onClick: w[0] || (w[0] = kt(() => {
|
|
2812
2862
|
}, ["stop"]))
|
|
2813
2863
|
}, [
|
|
2814
|
-
e.showClose ? (p(),
|
|
2864
|
+
e.showClose ? (p(), x("div", {
|
|
2815
2865
|
key: 0,
|
|
2816
2866
|
class: "cregis-dialog__close",
|
|
2817
|
-
onClick:
|
|
2867
|
+
onClick: l
|
|
2818
2868
|
}, [
|
|
2819
|
-
K(
|
|
2869
|
+
K(ne(Va), {
|
|
2820
2870
|
size: "10px",
|
|
2821
2871
|
color: "var(--material-same-white-primary)"
|
|
2822
2872
|
})
|
|
2823
|
-
])) :
|
|
2824
|
-
|
|
2873
|
+
])) : H("", !0),
|
|
2874
|
+
Y(h.$slots, "default")
|
|
2825
2875
|
], 4)
|
|
2826
|
-
], 6)) :
|
|
2876
|
+
], 6)) : H("", !0)
|
|
2827
2877
|
]),
|
|
2828
2878
|
_: 3
|
|
2829
2879
|
})
|
|
2830
2880
|
]));
|
|
2831
2881
|
}
|
|
2832
|
-
}), mi = { class: "cregis-dialog-confirm" }, gi = { class: "cregis-dialog-confirm__icon-wrapper" }, hi = {
|
|
2882
|
+
}), mi = { class: "cregis-dialog-confirm" }, gi = { class: "cregis-dialog-confirm__icon-wrapper" }, hi = {
|
|
2833
2883
|
key: 0,
|
|
2834
2884
|
class: "cregis-dialog-confirm__title"
|
|
2835
|
-
},
|
|
2885
|
+
}, bi = {
|
|
2836
2886
|
key: 1,
|
|
2837
2887
|
class: "cregis-dialog-confirm__message"
|
|
2838
|
-
},
|
|
2888
|
+
}, yi = { class: "cregis-dialog-confirm__footer" }, wi = /* @__PURE__ */ G({
|
|
2839
2889
|
name: "ConfirmDialog",
|
|
2840
2890
|
__name: "ConfirmDialog",
|
|
2841
2891
|
props: {
|
|
@@ -2848,73 +2898,82 @@ const vi = () => {
|
|
|
2848
2898
|
closeOnClickModal: { type: Boolean, default: !0 },
|
|
2849
2899
|
lockScroll: { type: Boolean, default: !0 },
|
|
2850
2900
|
width: { default: "280px" },
|
|
2901
|
+
type: { default: "info" },
|
|
2851
2902
|
onConfirm: {},
|
|
2852
2903
|
onCancel: {}
|
|
2853
2904
|
},
|
|
2854
2905
|
emits: ["after-leave"],
|
|
2855
2906
|
setup(e, { emit: a }) {
|
|
2856
|
-
const t = e, r = a, n = F(!1), i = F(null),
|
|
2907
|
+
const t = e, r = a, n = F(!1), i = F(null), s = F(null), o = m(() => t.type === "success" ? {
|
|
2908
|
+
component: ta,
|
|
2909
|
+
color: "var(--text-same-white-primary)"
|
|
2910
|
+
} : {
|
|
2911
|
+
component: Ba,
|
|
2912
|
+
color: "var(--text-base-primary)"
|
|
2913
|
+
}), l = async (w) => {
|
|
2857
2914
|
if (!i.value) {
|
|
2858
2915
|
i.value = w;
|
|
2859
2916
|
try {
|
|
2860
|
-
await (w === "confirm" ? t.onConfirm : t.onCancel)?.(),
|
|
2917
|
+
await (w === "confirm" ? t.onConfirm : t.onCancel)?.(), s.value = w, n.value = !1;
|
|
2861
2918
|
} catch {
|
|
2862
2919
|
i.value = null;
|
|
2863
2920
|
}
|
|
2864
2921
|
}
|
|
2865
|
-
},
|
|
2866
|
-
|
|
2922
|
+
}, d = () => l("confirm"), c = () => l("cancel"), h = () => {
|
|
2923
|
+
s.value || t.onCancel?.(), i.value = null, s.value = null, r("after-leave");
|
|
2867
2924
|
};
|
|
2868
|
-
return
|
|
2925
|
+
return Oe(() => {
|
|
2869
2926
|
n.value = !0;
|
|
2870
|
-
}), (w,
|
|
2927
|
+
}), (w, g) => (p(), ve(ot, {
|
|
2871
2928
|
modelValue: n.value,
|
|
2872
|
-
"onUpdate:modelValue":
|
|
2929
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => n.value = b),
|
|
2873
2930
|
width: e.width,
|
|
2874
2931
|
"show-close": !1,
|
|
2875
2932
|
"close-on-click-modal": e.closeOnClickModal,
|
|
2876
2933
|
"lock-scroll": e.lockScroll,
|
|
2877
|
-
onAfterLeave:
|
|
2934
|
+
onAfterLeave: h
|
|
2878
2935
|
}, {
|
|
2879
|
-
default:
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2936
|
+
default: re(() => [
|
|
2937
|
+
z("div", mi, [
|
|
2938
|
+
z("div", gi, [
|
|
2939
|
+
z("div", {
|
|
2940
|
+
class: N(`cregis-dialog-confirm__icon cregis-dialog-confirm__icon--${e.type}`)
|
|
2941
|
+
}, [
|
|
2942
|
+
(p(), ve(xt(o.value.component), {
|
|
2884
2943
|
"stroke-width": 3.4,
|
|
2885
2944
|
size: "24px",
|
|
2886
|
-
color:
|
|
2887
|
-
})
|
|
2888
|
-
])
|
|
2945
|
+
color: o.value.color
|
|
2946
|
+
}, null, 8, ["color"]))
|
|
2947
|
+
], 2)
|
|
2889
2948
|
]),
|
|
2890
|
-
e.title ? (p(),
|
|
2891
|
-
e.message ? (p(),
|
|
2892
|
-
|
|
2893
|
-
e.showConfirmButton ? (p(),
|
|
2949
|
+
e.title ? (p(), x("div", hi, I(e.title), 1)) : H("", !0),
|
|
2950
|
+
e.message ? (p(), x("div", bi, I(e.message), 1)) : H("", !0),
|
|
2951
|
+
z("div", yi, [
|
|
2952
|
+
e.showConfirmButton ? (p(), ve(Ee, {
|
|
2894
2953
|
key: 0,
|
|
2895
2954
|
type: "foreground",
|
|
2896
2955
|
block: "",
|
|
2897
2956
|
loading: i.value === "confirm",
|
|
2898
|
-
onClick:
|
|
2957
|
+
onClick: d
|
|
2899
2958
|
}, {
|
|
2900
|
-
default:
|
|
2901
|
-
|
|
2959
|
+
default: re(() => [
|
|
2960
|
+
ye(I(e.confirmButtonText), 1)
|
|
2902
2961
|
]),
|
|
2903
2962
|
_: 1
|
|
2904
|
-
}, 8, ["loading"])) :
|
|
2905
|
-
e.showCancelButton ? (p(),
|
|
2963
|
+
}, 8, ["loading"])) : H("", !0),
|
|
2964
|
+
e.showCancelButton ? (p(), ve(Ee, {
|
|
2906
2965
|
key: 1,
|
|
2907
2966
|
type: "secondary",
|
|
2908
2967
|
text: "",
|
|
2909
2968
|
block: "",
|
|
2910
2969
|
loading: i.value === "cancel",
|
|
2911
|
-
onClick:
|
|
2970
|
+
onClick: c
|
|
2912
2971
|
}, {
|
|
2913
|
-
default:
|
|
2914
|
-
|
|
2972
|
+
default: re(() => [
|
|
2973
|
+
ye(I(e.cancelButtonText), 1)
|
|
2915
2974
|
]),
|
|
2916
2975
|
_: 1
|
|
2917
|
-
}, 8, ["loading"])) :
|
|
2976
|
+
}, 8, ["loading"])) : H("", !0)
|
|
2918
2977
|
])
|
|
2919
2978
|
])
|
|
2920
2979
|
]),
|
|
@@ -2922,65 +2981,65 @@ const vi = () => {
|
|
|
2922
2981
|
}, 8, ["modelValue", "width", "close-on-click-modal", "lock-scroll"]));
|
|
2923
2982
|
}
|
|
2924
2983
|
});
|
|
2925
|
-
function
|
|
2984
|
+
function xi(e) {
|
|
2926
2985
|
return typeof e == "string" ? { message: e } : e;
|
|
2927
2986
|
}
|
|
2928
|
-
function
|
|
2987
|
+
function ki(e) {
|
|
2929
2988
|
return new Promise((a, t) => {
|
|
2930
|
-
const r =
|
|
2989
|
+
const r = xi(e), n = document.createElement("div");
|
|
2931
2990
|
document.body.appendChild(n);
|
|
2932
2991
|
const i = () => {
|
|
2933
|
-
|
|
2992
|
+
ze(null, n), n.remove();
|
|
2934
2993
|
};
|
|
2935
|
-
let
|
|
2994
|
+
let s = !1;
|
|
2936
2995
|
const o = () => {
|
|
2937
|
-
|
|
2938
|
-
},
|
|
2939
|
-
|
|
2996
|
+
s || (s = !0, a());
|
|
2997
|
+
}, l = (d) => {
|
|
2998
|
+
s || (s = !0, t(d));
|
|
2940
2999
|
};
|
|
2941
|
-
|
|
2942
|
-
|
|
3000
|
+
ze(
|
|
3001
|
+
$t(wi, {
|
|
2943
3002
|
...r,
|
|
2944
3003
|
onConfirm: async () => {
|
|
2945
3004
|
await r.onConfirm?.(), o();
|
|
2946
3005
|
},
|
|
2947
3006
|
onCancel: async () => {
|
|
2948
|
-
await r.onCancel?.(),
|
|
3007
|
+
await r.onCancel?.(), l("cancel");
|
|
2949
3008
|
},
|
|
2950
3009
|
onAfterLeave: () => {
|
|
2951
|
-
i(),
|
|
3010
|
+
i(), s || l("cancel");
|
|
2952
3011
|
}
|
|
2953
3012
|
}),
|
|
2954
3013
|
n
|
|
2955
3014
|
);
|
|
2956
3015
|
});
|
|
2957
3016
|
}
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2960
|
-
e.component(
|
|
3017
|
+
const ya = ot;
|
|
3018
|
+
ya.install = (e) => {
|
|
3019
|
+
e.component(ot.name, ot);
|
|
2961
3020
|
};
|
|
2962
|
-
|
|
3021
|
+
ya.confirm = ki;
|
|
2963
3022
|
export {
|
|
2964
3023
|
Wi as Badge,
|
|
2965
|
-
|
|
2966
|
-
|
|
3024
|
+
Ee as Button,
|
|
3025
|
+
Ai as Cascader,
|
|
2967
3026
|
Ua as Checkbox,
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
3027
|
+
ya as Dialog,
|
|
3028
|
+
Si as Divider,
|
|
3029
|
+
ra as Input,
|
|
2971
3030
|
Lt as Message,
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
3031
|
+
Bi as Notification,
|
|
3032
|
+
zi as Option,
|
|
3033
|
+
wt as Popover,
|
|
3034
|
+
Pi as Progress,
|
|
3035
|
+
Oi as Radio,
|
|
3036
|
+
Ei as Select,
|
|
3037
|
+
Ri as Switch,
|
|
3038
|
+
ia as TABS_KEY,
|
|
3039
|
+
Vi as TabPane,
|
|
3040
|
+
Ti as Tabs,
|
|
3041
|
+
Di as Tag,
|
|
3042
|
+
Li as Upload,
|
|
3043
|
+
ki as confirm,
|
|
3044
|
+
ha as selectInjectKey
|
|
2986
3045
|
};
|