@dazhicheng/ui 1.1.0 → 1.1.1

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.
Files changed (34) hide show
  1. package/dist/components/tt-form-adapter/component/index.d.ts +1 -1
  2. package/dist/components/tt-form-adapter/component/index.d.ts.map +1 -1
  3. package/dist/components/tt-form-adapter/index.d.ts +2 -2
  4. package/dist/components/tt-form-adapter/index.d.ts.map +1 -1
  5. package/dist/{css-CoEz66oB.js → css-CKklk3nV.js} +1 -0
  6. package/dist/{event-DSSsWzVU.js → event-uB4aPtFy.js} +1 -1
  7. package/dist/{icon-DbdhHmva.js → icon-vcRgBOnR.js} +2 -2
  8. package/dist/{index-BhRFBLHz.js → index-3UkObRxv.js} +5 -5
  9. package/dist/{index-BgzdMRW8.js → index-BTf1_B_5.js} +2 -2
  10. package/dist/{index-DVbQtqoV.js → index-BtqEcZqo.js} +9 -9
  11. package/dist/{index-hlMlaPX2.js → index-CMMUpVFZ.js} +6 -6
  12. package/dist/{index-BKMpeJMS.js → index-CRljSNoY.js} +20 -20
  13. package/dist/{index-p03nbfgB.js → index-Czf6JBRl.js} +8 -8
  14. package/dist/index-D8ISpbRW.js +2700 -0
  15. package/dist/{index-C8UKPPHD.js → index-DE2yohHu.js} +2 -2
  16. package/dist/{index-DfMIblcg.js → index-DM7o1Y9_.js} +1 -1
  17. package/dist/{index-DHdDQVpg.js → index-DT5rBqSy.js} +5 -5
  18. package/dist/{index-DiNnJQ4b.js → index-D_IdZK7s.js} +7 -7
  19. package/dist/{index-DIqpkfiH.js → index-Dn38FMIM.js} +2 -2
  20. package/dist/{index-COVG9Wvh.js → index-DqLyz5eN.js} +5 -5
  21. package/dist/{index-DdEvRX8w.js → index-DxTPuBYV.js} +8959 -8970
  22. package/dist/{index-my6Z5v2z.js → index-Dz2-tV0Q.js} +6 -6
  23. package/dist/{index-qZ-AAxXa.js → index-Mg3lmVPp.js} +1 -1
  24. package/dist/{index-BXkpTX1Y.js → index-vljoqWNo.js} +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/panel-time-pick.vue2-ChVAZVCn.js +2026 -0
  27. package/dist/style.css +1 -1
  28. package/dist/{use-form-common-props-DkpXv1AY.js → use-form-common-props-CiRVSa0R.js} +1 -1
  29. package/dist/{use-form-item-bliFpQLk.js → use-form-item-DuAhca9z.js} +2 -2
  30. package/dist/util-B7hHTw8E.js +2259 -0
  31. package/package.json +7 -9
  32. package/dist/index-1F8harWZ.js +0 -1982
  33. package/dist/index-D8_UEqsc.js +0 -2683
  34. package/dist/panel-time-pick.vue2-D4HGRRie.js +0 -1602
@@ -1,2683 +0,0 @@
1
- import { getCurrentInstance as tt, computed as R, watch as H, onMounted as ce, unref as g, shallowRef as lo, ref as I, onBeforeUnmount as G, onBeforeMount as uo, provide as be, inject as U, defineComponent as _, renderSlot as X, createElementBlock as Re, openBlock as W, normalizeStyle as nt, normalizeClass as he, withDirectives as bt, cloneVNode as co, Comment as Yt, Fragment as On, Text as fo, createVNode as Ee, createBlock as ne, createCommentVNode as ze, mergeProps as Et, withCtx as Q, nextTick as We, toRef as me, Teleport as po, Transition as Cn, vShow as Sn, readonly as vo, onDeactivated as mo, toDisplayString as go, createElementVNode as pt, withModifiers as ho, reactive as yo, onActivated as bo, onUpdated as Eo, resolveDynamicComponent as wo } from "vue";
2
- import { fromPairs as Zt, isEqual as To, isNil as wt, isUndefined as xo } from "lodash-es";
3
- import { q as Rn, a as B, l as Pn, b as V, e as se, d as Pe, i as Se, c as Jt, w as rt, t as Oo } from "./use-form-common-props-DkpXv1AY.js";
4
- import { i as ge, u as Co, a as Ve, d as fe, N as vt, o as An, g as So } from "./index-DdEvRX8w.js";
5
- import { u as Tt } from "./index-BXkpTX1Y.js";
6
- import { isClient as ie, tryOnScopeDispose as Ro, unrefElement as Fn, computedEager as Po, onClickOutside as Ao, useEventListener as mt, useResizeObserver as Gt } from "@vueuse/core";
7
- import { g as xt, E as De, c as ae } from "./event-DSSsWzVU.js";
8
- import { c as Qt, f as Ot } from "./index-BgzdMRW8.js";
9
- import { c as Fo, b as Io } from "./use-form-item-bliFpQLk.js";
10
- import { a as Xt } from "./index-C8UKPPHD.js";
11
- const Lo = Rn({
12
- type: B(Boolean),
13
- default: null
14
- }), ko = Rn({
15
- type: B(Function)
16
- }), No = (e) => {
17
- const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], r = {
18
- [e]: Lo,
19
- [n]: ko
20
- };
21
- return {
22
- useModelToggle: ({
23
- indicator: c,
24
- toggleReason: i,
25
- shouldHideWhenRouteChanges: s,
26
- shouldProceed: l,
27
- onShow: d,
28
- onHide: v
29
- }) => {
30
- const m = tt(), { emit: f } = m, u = m.props, p = R(
31
- () => ge(u[n])
32
- ), b = R(() => u[e] === null), y = (x) => {
33
- c.value !== !0 && (c.value = !0, i && (i.value = x), ge(d) && d(x));
34
- }, E = (x) => {
35
- c.value !== !1 && (c.value = !1, i && (i.value = x), ge(v) && v(x));
36
- }, S = (x) => {
37
- if (u.disabled === !0 || ge(l) && !l())
38
- return;
39
- const T = p.value && ie;
40
- T && f(t, !0), (b.value || !T) && y(x);
41
- }, h = (x) => {
42
- if (u.disabled === !0 || !ie) return;
43
- const T = p.value && ie;
44
- T && f(t, !1), (b.value || !T) && E(x);
45
- }, O = (x) => {
46
- Pn(x) && (u.disabled && x ? p.value && f(t, !1) : c.value !== x && (x ? y() : E()));
47
- }, F = () => {
48
- c.value ? h() : S();
49
- };
50
- return H(() => u[e], O), s && m.appContext.config.globalProperties.$route !== void 0 && H(
51
- () => ({
52
- ...m.proxy.$route
53
- }),
54
- () => {
55
- s.value && c.value && h();
56
- }
57
- ), ce(() => {
58
- O(u[e]);
59
- }), {
60
- hide: h,
61
- show: S,
62
- toggle: F,
63
- hasUpdateHandler: p
64
- };
65
- },
66
- useModelToggleProps: r,
67
- useModelToggleEmits: o
68
- };
69
- };
70
- var $ = "top", Z = "bottom", J = "right", K = "left", Ct = "auto", Ue = [$, Z, J, K], Ae = "start", $e = "end", Bo = "clippingParents", In = "viewport", Me = "popper", Mo = "reference", en = Ue.reduce(function(e, t) {
71
- return e.concat([t + "-" + Ae, t + "-" + $e]);
72
- }, []), St = [].concat(Ue, [Ct]).reduce(function(e, t) {
73
- return e.concat([t, t + "-" + Ae, t + "-" + $e]);
74
- }, []), Do = "beforeRead", Ho = "read", jo = "afterRead", zo = "beforeMain", Wo = "main", $o = "afterMain", Ko = "beforeWrite", Vo = "write", Uo = "afterWrite", qo = [Do, Ho, jo, zo, Wo, $o, Ko, Vo, Uo];
75
- function oe(e) {
76
- return e ? (e.nodeName || "").toLowerCase() : null;
77
- }
78
- function q(e) {
79
- if (e == null) return window;
80
- if (e.toString() !== "[object Window]") {
81
- var t = e.ownerDocument;
82
- return t && t.defaultView || window;
83
- }
84
- return e;
85
- }
86
- function we(e) {
87
- var t = q(e).Element;
88
- return e instanceof t || e instanceof Element;
89
- }
90
- function Y(e) {
91
- var t = q(e).HTMLElement;
92
- return e instanceof t || e instanceof HTMLElement;
93
- }
94
- function Rt(e) {
95
- if (typeof ShadowRoot > "u") return !1;
96
- var t = q(e).ShadowRoot;
97
- return e instanceof t || e instanceof ShadowRoot;
98
- }
99
- function _o(e) {
100
- var t = e.state;
101
- Object.keys(t.elements).forEach(function(n) {
102
- var o = t.styles[n] || {}, r = t.attributes[n] || {}, a = t.elements[n];
103
- !Y(a) || !oe(a) || (Object.assign(a.style, o), Object.keys(r).forEach(function(c) {
104
- var i = r[c];
105
- i === !1 ? a.removeAttribute(c) : a.setAttribute(c, i === !0 ? "" : i);
106
- }));
107
- });
108
- }
109
- function Yo(e) {
110
- var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
111
- return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
112
- Object.keys(t.elements).forEach(function(o) {
113
- var r = t.elements[o], a = t.attributes[o] || {}, c = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), i = c.reduce(function(s, l) {
114
- return s[l] = "", s;
115
- }, {});
116
- !Y(r) || !oe(r) || (Object.assign(r.style, i), Object.keys(a).forEach(function(s) {
117
- r.removeAttribute(s);
118
- }));
119
- });
120
- };
121
- }
122
- var Ln = { name: "applyStyles", enabled: !0, phase: "write", fn: _o, effect: Yo, requires: ["computeStyles"] };
123
- function te(e) {
124
- return e.split("-")[0];
125
- }
126
- var ye = Math.max, ot = Math.min, Fe = Math.round;
127
- function gt() {
128
- var e = navigator.userAgentData;
129
- return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
130
- return t.brand + "/" + t.version;
131
- }).join(" ") : navigator.userAgent;
132
- }
133
- function kn() {
134
- return !/^((?!chrome|android).)*safari/i.test(gt());
135
- }
136
- function Ie(e, t, n) {
137
- t === void 0 && (t = !1), n === void 0 && (n = !1);
138
- var o = e.getBoundingClientRect(), r = 1, a = 1;
139
- t && Y(e) && (r = e.offsetWidth > 0 && Fe(o.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && Fe(o.height) / e.offsetHeight || 1);
140
- var c = we(e) ? q(e) : window, i = c.visualViewport, s = !kn() && n, l = (o.left + (s && i ? i.offsetLeft : 0)) / r, d = (o.top + (s && i ? i.offsetTop : 0)) / a, v = o.width / r, m = o.height / a;
141
- return { width: v, height: m, top: d, right: l + v, bottom: d + m, left: l, x: l, y: d };
142
- }
143
- function Pt(e) {
144
- var t = Ie(e), n = e.offsetWidth, o = e.offsetHeight;
145
- return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o };
146
- }
147
- function Nn(e, t) {
148
- var n = t.getRootNode && t.getRootNode();
149
- if (e.contains(t)) return !0;
150
- if (n && Rt(n)) {
151
- var o = t;
152
- do {
153
- if (o && e.isSameNode(o)) return !0;
154
- o = o.parentNode || o.host;
155
- } while (o);
156
- }
157
- return !1;
158
- }
159
- function le(e) {
160
- return q(e).getComputedStyle(e);
161
- }
162
- function Zo(e) {
163
- return ["table", "td", "th"].indexOf(oe(e)) >= 0;
164
- }
165
- function de(e) {
166
- return ((we(e) ? e.ownerDocument : e.document) || window.document).documentElement;
167
- }
168
- function at(e) {
169
- return oe(e) === "html" ? e : e.assignedSlot || e.parentNode || (Rt(e) ? e.host : null) || de(e);
170
- }
171
- function tn(e) {
172
- return !Y(e) || le(e).position === "fixed" ? null : e.offsetParent;
173
- }
174
- function Jo(e) {
175
- var t = /firefox/i.test(gt()), n = /Trident/i.test(gt());
176
- if (n && Y(e)) {
177
- var o = le(e);
178
- if (o.position === "fixed") return null;
179
- }
180
- var r = at(e);
181
- for (Rt(r) && (r = r.host); Y(r) && ["html", "body"].indexOf(oe(r)) < 0; ) {
182
- var a = le(r);
183
- if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return r;
184
- r = r.parentNode;
185
- }
186
- return null;
187
- }
188
- function qe(e) {
189
- for (var t = q(e), n = tn(e); n && Zo(n) && le(n).position === "static"; ) n = tn(n);
190
- return n && (oe(n) === "html" || oe(n) === "body" && le(n).position === "static") ? t : n || Jo(e) || t;
191
- }
192
- function At(e) {
193
- return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
194
- }
195
- function He(e, t, n) {
196
- return ye(e, ot(t, n));
197
- }
198
- function Go(e, t, n) {
199
- var o = He(e, t, n);
200
- return o > n ? n : o;
201
- }
202
- function Bn() {
203
- return { top: 0, right: 0, bottom: 0, left: 0 };
204
- }
205
- function Mn(e) {
206
- return Object.assign({}, Bn(), e);
207
- }
208
- function Dn(e, t) {
209
- return t.reduce(function(n, o) {
210
- return n[o] = e, n;
211
- }, {});
212
- }
213
- var Qo = function(e, t) {
214
- return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, Mn(typeof e != "number" ? e : Dn(e, Ue));
215
- };
216
- function Xo(e) {
217
- var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, c = n.modifiersData.popperOffsets, i = te(n.placement), s = At(i), l = [K, J].indexOf(i) >= 0, d = l ? "height" : "width";
218
- if (!(!a || !c)) {
219
- var v = Qo(r.padding, n), m = Pt(a), f = s === "y" ? $ : K, u = s === "y" ? Z : J, p = n.rects.reference[d] + n.rects.reference[s] - c[s] - n.rects.popper[d], b = c[s] - n.rects.reference[s], y = qe(a), E = y ? s === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, S = p / 2 - b / 2, h = v[f], O = E - m[d] - v[u], F = E / 2 - m[d] / 2 + S, x = He(h, F, O), T = s;
220
- n.modifiersData[o] = (t = {}, t[T] = x, t.centerOffset = x - F, t);
221
- }
222
- }
223
- function er(e) {
224
- var t = e.state, n = e.options, o = n.element, r = o === void 0 ? "[data-popper-arrow]" : o;
225
- r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || Nn(t.elements.popper, r) && (t.elements.arrow = r));
226
- }
227
- var tr = { name: "arrow", enabled: !0, phase: "main", fn: Xo, effect: er, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
228
- function Le(e) {
229
- return e.split("-")[1];
230
- }
231
- var nr = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
232
- function or(e, t) {
233
- var n = e.x, o = e.y, r = t.devicePixelRatio || 1;
234
- return { x: Fe(n * r) / r || 0, y: Fe(o * r) / r || 0 };
235
- }
236
- function nn(e) {
237
- var t, n = e.popper, o = e.popperRect, r = e.placement, a = e.variation, c = e.offsets, i = e.position, s = e.gpuAcceleration, l = e.adaptive, d = e.roundOffsets, v = e.isFixed, m = c.x, f = m === void 0 ? 0 : m, u = c.y, p = u === void 0 ? 0 : u, b = typeof d == "function" ? d({ x: f, y: p }) : { x: f, y: p };
238
- f = b.x, p = b.y;
239
- var y = c.hasOwnProperty("x"), E = c.hasOwnProperty("y"), S = K, h = $, O = window;
240
- if (l) {
241
- var F = qe(n), x = "clientHeight", T = "clientWidth";
242
- if (F === q(n) && (F = de(n), le(F).position !== "static" && i === "absolute" && (x = "scrollHeight", T = "scrollWidth")), F = F, r === $ || (r === K || r === J) && a === $e) {
243
- h = Z;
244
- var A = v && F === O && O.visualViewport ? O.visualViewport.height : F[x];
245
- p -= A - o.height, p *= s ? 1 : -1;
246
- }
247
- if (r === K || (r === $ || r === Z) && a === $e) {
248
- S = J;
249
- var P = v && F === O && O.visualViewport ? O.visualViewport.width : F[T];
250
- f -= P - o.width, f *= s ? 1 : -1;
251
- }
252
- }
253
- var L = Object.assign({ position: i }, l && nr), w = d === !0 ? or({ x: f, y: p }, q(n)) : { x: f, y: p };
254
- if (f = w.x, p = w.y, s) {
255
- var C;
256
- return Object.assign({}, L, (C = {}, C[h] = E ? "0" : "", C[S] = y ? "0" : "", C.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + p + "px)" : "translate3d(" + f + "px, " + p + "px, 0)", C));
257
- }
258
- return Object.assign({}, L, (t = {}, t[h] = E ? p + "px" : "", t[S] = y ? f + "px" : "", t.transform = "", t));
259
- }
260
- function rr(e) {
261
- var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, a = n.adaptive, c = a === void 0 ? !0 : a, i = n.roundOffsets, s = i === void 0 ? !0 : i, l = { placement: te(t.placement), variation: Le(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: r, isFixed: t.options.strategy === "fixed" };
262
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, nn(Object.assign({}, l, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: c, roundOffsets: s })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, nn(Object.assign({}, l, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: s })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
263
- }
264
- var Hn = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: rr, data: {} }, Je = { passive: !0 };
265
- function ar(e) {
266
- var t = e.state, n = e.instance, o = e.options, r = o.scroll, a = r === void 0 ? !0 : r, c = o.resize, i = c === void 0 ? !0 : c, s = q(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
267
- return a && l.forEach(function(d) {
268
- d.addEventListener("scroll", n.update, Je);
269
- }), i && s.addEventListener("resize", n.update, Je), function() {
270
- a && l.forEach(function(d) {
271
- d.removeEventListener("scroll", n.update, Je);
272
- }), i && s.removeEventListener("resize", n.update, Je);
273
- };
274
- }
275
- var jn = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
276
- }, effect: ar, data: {} }, sr = { left: "right", right: "left", bottom: "top", top: "bottom" };
277
- function et(e) {
278
- return e.replace(/left|right|bottom|top/g, function(t) {
279
- return sr[t];
280
- });
281
- }
282
- var ir = { start: "end", end: "start" };
283
- function on(e) {
284
- return e.replace(/start|end/g, function(t) {
285
- return ir[t];
286
- });
287
- }
288
- function Ft(e) {
289
- var t = q(e), n = t.pageXOffset, o = t.pageYOffset;
290
- return { scrollLeft: n, scrollTop: o };
291
- }
292
- function It(e) {
293
- return Ie(de(e)).left + Ft(e).scrollLeft;
294
- }
295
- function lr(e, t) {
296
- var n = q(e), o = de(e), r = n.visualViewport, a = o.clientWidth, c = o.clientHeight, i = 0, s = 0;
297
- if (r) {
298
- a = r.width, c = r.height;
299
- var l = kn();
300
- (l || !l && t === "fixed") && (i = r.offsetLeft, s = r.offsetTop);
301
- }
302
- return { width: a, height: c, x: i + It(e), y: s };
303
- }
304
- function ur(e) {
305
- var t, n = de(e), o = Ft(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, a = ye(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), c = ye(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), i = -o.scrollLeft + It(e), s = -o.scrollTop;
306
- return le(r || n).direction === "rtl" && (i += ye(n.clientWidth, r ? r.clientWidth : 0) - a), { width: a, height: c, x: i, y: s };
307
- }
308
- function Lt(e) {
309
- var t = le(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
310
- return /auto|scroll|overlay|hidden/.test(n + r + o);
311
- }
312
- function zn(e) {
313
- return ["html", "body", "#document"].indexOf(oe(e)) >= 0 ? e.ownerDocument.body : Y(e) && Lt(e) ? e : zn(at(e));
314
- }
315
- function je(e, t) {
316
- var n;
317
- t === void 0 && (t = []);
318
- var o = zn(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = q(o), c = r ? [a].concat(a.visualViewport || [], Lt(o) ? o : []) : o, i = t.concat(c);
319
- return r ? i : i.concat(je(at(c)));
320
- }
321
- function ht(e) {
322
- return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
323
- }
324
- function cr(e, t) {
325
- var n = Ie(e, !1, t === "fixed");
326
- return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
327
- }
328
- function rn(e, t, n) {
329
- return t === In ? ht(lr(e, n)) : we(t) ? cr(t, n) : ht(ur(de(e)));
330
- }
331
- function fr(e) {
332
- var t = je(at(e)), n = ["absolute", "fixed"].indexOf(le(e).position) >= 0, o = n && Y(e) ? qe(e) : e;
333
- return we(o) ? t.filter(function(r) {
334
- return we(r) && Nn(r, o) && oe(r) !== "body";
335
- }) : [];
336
- }
337
- function dr(e, t, n, o) {
338
- var r = t === "clippingParents" ? fr(e) : [].concat(t), a = [].concat(r, [n]), c = a[0], i = a.reduce(function(s, l) {
339
- var d = rn(e, l, o);
340
- return s.top = ye(d.top, s.top), s.right = ot(d.right, s.right), s.bottom = ot(d.bottom, s.bottom), s.left = ye(d.left, s.left), s;
341
- }, rn(e, c, o));
342
- return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
343
- }
344
- function Wn(e) {
345
- var t = e.reference, n = e.element, o = e.placement, r = o ? te(o) : null, a = o ? Le(o) : null, c = t.x + t.width / 2 - n.width / 2, i = t.y + t.height / 2 - n.height / 2, s;
346
- switch (r) {
347
- case $:
348
- s = { x: c, y: t.y - n.height };
349
- break;
350
- case Z:
351
- s = { x: c, y: t.y + t.height };
352
- break;
353
- case J:
354
- s = { x: t.x + t.width, y: i };
355
- break;
356
- case K:
357
- s = { x: t.x - n.width, y: i };
358
- break;
359
- default:
360
- s = { x: t.x, y: t.y };
361
- }
362
- var l = r ? At(r) : null;
363
- if (l != null) {
364
- var d = l === "y" ? "height" : "width";
365
- switch (a) {
366
- case Ae:
367
- s[l] = s[l] - (t[d] / 2 - n[d] / 2);
368
- break;
369
- case $e:
370
- s[l] = s[l] + (t[d] / 2 - n[d] / 2);
371
- break;
372
- }
373
- }
374
- return s;
375
- }
376
- function Ke(e, t) {
377
- t === void 0 && (t = {});
378
- var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, c = a === void 0 ? e.strategy : a, i = n.boundary, s = i === void 0 ? Bo : i, l = n.rootBoundary, d = l === void 0 ? In : l, v = n.elementContext, m = v === void 0 ? Me : v, f = n.altBoundary, u = f === void 0 ? !1 : f, p = n.padding, b = p === void 0 ? 0 : p, y = Mn(typeof b != "number" ? b : Dn(b, Ue)), E = m === Me ? Mo : Me, S = e.rects.popper, h = e.elements[u ? E : m], O = dr(we(h) ? h : h.contextElement || de(e.elements.popper), s, d, c), F = Ie(e.elements.reference), x = Wn({ reference: F, element: S, placement: r }), T = ht(Object.assign({}, S, x)), A = m === Me ? T : F, P = { top: O.top - A.top + y.top, bottom: A.bottom - O.bottom + y.bottom, left: O.left - A.left + y.left, right: A.right - O.right + y.right }, L = e.modifiersData.offset;
379
- if (m === Me && L) {
380
- var w = L[r];
381
- Object.keys(P).forEach(function(C) {
382
- var N = [J, Z].indexOf(C) >= 0 ? 1 : -1, M = [$, Z].indexOf(C) >= 0 ? "y" : "x";
383
- P[C] += w[M] * N;
384
- });
385
- }
386
- return P;
387
- }
388
- function pr(e, t) {
389
- t === void 0 && (t = {});
390
- var n = t, o = n.placement, r = n.boundary, a = n.rootBoundary, c = n.padding, i = n.flipVariations, s = n.allowedAutoPlacements, l = s === void 0 ? St : s, d = Le(o), v = d ? i ? en : en.filter(function(u) {
391
- return Le(u) === d;
392
- }) : Ue, m = v.filter(function(u) {
393
- return l.indexOf(u) >= 0;
394
- });
395
- m.length === 0 && (m = v);
396
- var f = m.reduce(function(u, p) {
397
- return u[p] = Ke(e, { placement: p, boundary: r, rootBoundary: a, padding: c })[te(p)], u;
398
- }, {});
399
- return Object.keys(f).sort(function(u, p) {
400
- return f[u] - f[p];
401
- });
402
- }
403
- function vr(e) {
404
- if (te(e) === Ct) return [];
405
- var t = et(e);
406
- return [on(e), t, on(t)];
407
- }
408
- function mr(e) {
409
- var t = e.state, n = e.options, o = e.name;
410
- if (!t.modifiersData[o]._skip) {
411
- for (var r = n.mainAxis, a = r === void 0 ? !0 : r, c = n.altAxis, i = c === void 0 ? !0 : c, s = n.fallbackPlacements, l = n.padding, d = n.boundary, v = n.rootBoundary, m = n.altBoundary, f = n.flipVariations, u = f === void 0 ? !0 : f, p = n.allowedAutoPlacements, b = t.options.placement, y = te(b), E = y === b, S = s || (E || !u ? [et(b)] : vr(b)), h = [b].concat(S).reduce(function(pe, re) {
412
- return pe.concat(te(re) === Ct ? pr(t, { placement: re, boundary: d, rootBoundary: v, padding: l, flipVariations: u, allowedAutoPlacements: p }) : re);
413
- }, []), O = t.rects.reference, F = t.rects.popper, x = /* @__PURE__ */ new Map(), T = !0, A = h[0], P = 0; P < h.length; P++) {
414
- var L = h[P], w = te(L), C = Le(L) === Ae, N = [$, Z].indexOf(w) >= 0, M = N ? "width" : "height", j = Ke(t, { placement: L, boundary: d, rootBoundary: v, altBoundary: m, padding: l }), z = N ? C ? J : K : C ? Z : $;
415
- O[M] > F[M] && (z = et(z));
416
- var k = et(z), D = [];
417
- if (a && D.push(j[w] <= 0), i && D.push(j[z] <= 0, j[k] <= 0), D.every(function(pe) {
418
- return pe;
419
- })) {
420
- A = L, T = !1;
421
- break;
422
- }
423
- x.set(L, D);
424
- }
425
- if (T) for (var ee = u ? 3 : 1, ke = function(pe) {
426
- var re = h.find(function(Ye) {
427
- var Be = x.get(Ye);
428
- if (Be) return Be.slice(0, pe).every(function(Te) {
429
- return Te;
430
- });
431
- });
432
- if (re) return A = re, "break";
433
- }, Ne = ee; Ne > 0; Ne--) {
434
- var _e = ke(Ne);
435
- if (_e === "break") break;
436
- }
437
- t.placement !== A && (t.modifiersData[o]._skip = !0, t.placement = A, t.reset = !0);
438
- }
439
- }
440
- var gr = { name: "flip", enabled: !0, phase: "main", fn: mr, requiresIfExists: ["offset"], data: { _skip: !1 } };
441
- function an(e, t, n) {
442
- return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x };
443
- }
444
- function sn(e) {
445
- return [$, J, Z, K].some(function(t) {
446
- return e[t] >= 0;
447
- });
448
- }
449
- function hr(e) {
450
- var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, a = t.modifiersData.preventOverflow, c = Ke(t, { elementContext: "reference" }), i = Ke(t, { altBoundary: !0 }), s = an(c, o), l = an(i, r, a), d = sn(s), v = sn(l);
451
- t.modifiersData[n] = { referenceClippingOffsets: s, popperEscapeOffsets: l, isReferenceHidden: d, hasPopperEscaped: v }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": d, "data-popper-escaped": v });
452
- }
453
- var yr = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: hr };
454
- function br(e, t, n) {
455
- var o = te(e), r = [K, $].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, c = a[0], i = a[1];
456
- return c = c || 0, i = (i || 0) * r, [K, J].indexOf(o) >= 0 ? { x: i, y: c } : { x: c, y: i };
457
- }
458
- function Er(e) {
459
- var t = e.state, n = e.options, o = e.name, r = n.offset, a = r === void 0 ? [0, 0] : r, c = St.reduce(function(d, v) {
460
- return d[v] = br(v, t.rects, a), d;
461
- }, {}), i = c[t.placement], s = i.x, l = i.y;
462
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += l), t.modifiersData[o] = c;
463
- }
464
- var wr = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Er };
465
- function Tr(e) {
466
- var t = e.state, n = e.name;
467
- t.modifiersData[n] = Wn({ reference: t.rects.reference, element: t.rects.popper, placement: t.placement });
468
- }
469
- var $n = { name: "popperOffsets", enabled: !0, phase: "read", fn: Tr, data: {} };
470
- function xr(e) {
471
- return e === "x" ? "y" : "x";
472
- }
473
- function Or(e) {
474
- var t = e.state, n = e.options, o = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, c = n.altAxis, i = c === void 0 ? !1 : c, s = n.boundary, l = n.rootBoundary, d = n.altBoundary, v = n.padding, m = n.tether, f = m === void 0 ? !0 : m, u = n.tetherOffset, p = u === void 0 ? 0 : u, b = Ke(t, { boundary: s, rootBoundary: l, padding: v, altBoundary: d }), y = te(t.placement), E = Le(t.placement), S = !E, h = At(y), O = xr(h), F = t.modifiersData.popperOffsets, x = t.rects.reference, T = t.rects.popper, A = typeof p == "function" ? p(Object.assign({}, t.rects, { placement: t.placement })) : p, P = typeof A == "number" ? { mainAxis: A, altAxis: A } : Object.assign({ mainAxis: 0, altAxis: 0 }, A), L = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, w = { x: 0, y: 0 };
475
- if (F) {
476
- if (a) {
477
- var C, N = h === "y" ? $ : K, M = h === "y" ? Z : J, j = h === "y" ? "height" : "width", z = F[h], k = z + b[N], D = z - b[M], ee = f ? -T[j] / 2 : 0, ke = E === Ae ? x[j] : T[j], Ne = E === Ae ? -T[j] : -x[j], _e = t.elements.arrow, pe = f && _e ? Pt(_e) : { width: 0, height: 0 }, re = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Bn(), Ye = re[N], Be = re[M], Te = He(0, x[j], pe[j]), to = S ? x[j] / 2 - ee - Te - Ye - P.mainAxis : ke - Te - Ye - P.mainAxis, no = S ? -x[j] / 2 + ee + Te + Be + P.mainAxis : Ne + Te + Be + P.mainAxis, it = t.elements.arrow && qe(t.elements.arrow), oo = it ? h === "y" ? it.clientTop || 0 : it.clientLeft || 0 : 0, jt = (C = L == null ? void 0 : L[h]) != null ? C : 0, ro = z + to - jt - oo, ao = z + no - jt, zt = He(f ? ot(k, ro) : k, z, f ? ye(D, ao) : D);
478
- F[h] = zt, w[h] = zt - z;
479
- }
480
- if (i) {
481
- var Wt, so = h === "x" ? $ : K, io = h === "x" ? Z : J, ve = F[O], Ze = O === "y" ? "height" : "width", $t = ve + b[so], Kt = ve - b[io], lt = [$, K].indexOf(y) !== -1, Vt = (Wt = L == null ? void 0 : L[O]) != null ? Wt : 0, Ut = lt ? $t : ve - x[Ze] - T[Ze] - Vt + P.altAxis, qt = lt ? ve + x[Ze] + T[Ze] - Vt - P.altAxis : Kt, _t = f && lt ? Go(Ut, ve, qt) : He(f ? Ut : $t, ve, f ? qt : Kt);
482
- F[O] = _t, w[O] = _t - ve;
483
- }
484
- t.modifiersData[o] = w;
485
- }
486
- }
487
- var Cr = { name: "preventOverflow", enabled: !0, phase: "main", fn: Or, requiresIfExists: ["offset"] };
488
- function Sr(e) {
489
- return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
490
- }
491
- function Rr(e) {
492
- return e === q(e) || !Y(e) ? Ft(e) : Sr(e);
493
- }
494
- function Pr(e) {
495
- var t = e.getBoundingClientRect(), n = Fe(t.width) / e.offsetWidth || 1, o = Fe(t.height) / e.offsetHeight || 1;
496
- return n !== 1 || o !== 1;
497
- }
498
- function Ar(e, t, n) {
499
- n === void 0 && (n = !1);
500
- var o = Y(t), r = Y(t) && Pr(t), a = de(t), c = Ie(e, r, n), i = { scrollLeft: 0, scrollTop: 0 }, s = { x: 0, y: 0 };
501
- return (o || !o && !n) && ((oe(t) !== "body" || Lt(a)) && (i = Rr(t)), Y(t) ? (s = Ie(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : a && (s.x = It(a))), { x: c.left + i.scrollLeft - s.x, y: c.top + i.scrollTop - s.y, width: c.width, height: c.height };
502
- }
503
- function Fr(e) {
504
- var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
505
- e.forEach(function(a) {
506
- t.set(a.name, a);
507
- });
508
- function r(a) {
509
- n.add(a.name);
510
- var c = [].concat(a.requires || [], a.requiresIfExists || []);
511
- c.forEach(function(i) {
512
- if (!n.has(i)) {
513
- var s = t.get(i);
514
- s && r(s);
515
- }
516
- }), o.push(a);
517
- }
518
- return e.forEach(function(a) {
519
- n.has(a.name) || r(a);
520
- }), o;
521
- }
522
- function Ir(e) {
523
- var t = Fr(e);
524
- return qo.reduce(function(n, o) {
525
- return n.concat(t.filter(function(r) {
526
- return r.phase === o;
527
- }));
528
- }, []);
529
- }
530
- function Lr(e) {
531
- var t;
532
- return function() {
533
- return t || (t = new Promise(function(n) {
534
- Promise.resolve().then(function() {
535
- t = void 0, n(e());
536
- });
537
- })), t;
538
- };
539
- }
540
- function kr(e) {
541
- var t = e.reduce(function(n, o) {
542
- var r = n[o.name];
543
- return n[o.name] = r ? Object.assign({}, r, o, { options: Object.assign({}, r.options, o.options), data: Object.assign({}, r.data, o.data) }) : o, n;
544
- }, {});
545
- return Object.keys(t).map(function(n) {
546
- return t[n];
547
- });
548
- }
549
- var ln = { placement: "bottom", modifiers: [], strategy: "absolute" };
550
- function un() {
551
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
552
- return !t.some(function(o) {
553
- return !(o && typeof o.getBoundingClientRect == "function");
554
- });
555
- }
556
- function kt(e) {
557
- e === void 0 && (e = {});
558
- var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, r = t.defaultOptions, a = r === void 0 ? ln : r;
559
- return function(c, i, s) {
560
- s === void 0 && (s = a);
561
- var l = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, ln, a), modifiersData: {}, elements: { reference: c, popper: i }, attributes: {}, styles: {} }, d = [], v = !1, m = { state: l, setOptions: function(p) {
562
- var b = typeof p == "function" ? p(l.options) : p;
563
- u(), l.options = Object.assign({}, a, l.options, b), l.scrollParents = { reference: we(c) ? je(c) : c.contextElement ? je(c.contextElement) : [], popper: je(i) };
564
- var y = Ir(kr([].concat(o, l.options.modifiers)));
565
- return l.orderedModifiers = y.filter(function(E) {
566
- return E.enabled;
567
- }), f(), m.update();
568
- }, forceUpdate: function() {
569
- if (!v) {
570
- var p = l.elements, b = p.reference, y = p.popper;
571
- if (un(b, y)) {
572
- l.rects = { reference: Ar(b, qe(y), l.options.strategy === "fixed"), popper: Pt(y) }, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(T) {
573
- return l.modifiersData[T.name] = Object.assign({}, T.data);
574
- });
575
- for (var E = 0; E < l.orderedModifiers.length; E++) {
576
- if (l.reset === !0) {
577
- l.reset = !1, E = -1;
578
- continue;
579
- }
580
- var S = l.orderedModifiers[E], h = S.fn, O = S.options, F = O === void 0 ? {} : O, x = S.name;
581
- typeof h == "function" && (l = h({ state: l, options: F, name: x, instance: m }) || l);
582
- }
583
- }
584
- }
585
- }, update: Lr(function() {
586
- return new Promise(function(p) {
587
- m.forceUpdate(), p(l);
588
- });
589
- }), destroy: function() {
590
- u(), v = !0;
591
- } };
592
- if (!un(c, i)) return m;
593
- m.setOptions(s).then(function(p) {
594
- !v && s.onFirstUpdate && s.onFirstUpdate(p);
595
- });
596
- function f() {
597
- l.orderedModifiers.forEach(function(p) {
598
- var b = p.name, y = p.options, E = y === void 0 ? {} : y, S = p.effect;
599
- if (typeof S == "function") {
600
- var h = S({ state: l, name: b, instance: m, options: E }), O = function() {
601
- };
602
- d.push(h || O);
603
- }
604
- });
605
- }
606
- function u() {
607
- d.forEach(function(p) {
608
- return p();
609
- }), d = [];
610
- }
611
- return m;
612
- };
613
- }
614
- kt();
615
- var Nr = [jn, $n, Hn, Ln];
616
- kt({ defaultModifiers: Nr });
617
- var Br = [jn, $n, Hn, Ln, wr, gr, Cr, tr, yr], Mr = kt({ defaultModifiers: Br });
618
- const Dr = (e, t, n = {}) => {
619
- const o = {
620
- name: "updateState",
621
- enabled: !0,
622
- phase: "write",
623
- fn: ({ state: s }) => {
624
- const l = Hr(s);
625
- Object.assign(c.value, l);
626
- },
627
- requires: ["computeStyles"]
628
- }, r = R(() => {
629
- const { onFirstUpdate: s, placement: l, strategy: d, modifiers: v } = g(n);
630
- return {
631
- onFirstUpdate: s,
632
- placement: l || "bottom",
633
- strategy: d || "absolute",
634
- modifiers: [
635
- ...v || [],
636
- o,
637
- { name: "applyStyles", enabled: !1 }
638
- ]
639
- };
640
- }), a = lo(), c = I({
641
- styles: {
642
- popper: {
643
- position: g(r).strategy,
644
- left: "0",
645
- top: "0"
646
- },
647
- arrow: {
648
- position: "absolute"
649
- }
650
- },
651
- attributes: {}
652
- }), i = () => {
653
- a.value && (a.value.destroy(), a.value = void 0);
654
- };
655
- return H(
656
- r,
657
- (s) => {
658
- const l = g(a);
659
- l && l.setOptions(s);
660
- },
661
- {
662
- deep: !0
663
- }
664
- ), H(
665
- [e, t],
666
- ([s, l]) => {
667
- i(), !(!s || !l) && (a.value = Mr(
668
- s,
669
- l,
670
- g(r)
671
- ));
672
- }
673
- ), G(() => {
674
- i();
675
- }), {
676
- state: R(() => {
677
- var s;
678
- return { ...((s = g(a)) == null ? void 0 : s.state) || {} };
679
- }),
680
- styles: R(() => g(c).styles),
681
- attributes: R(() => g(c).attributes),
682
- update: () => {
683
- var s;
684
- return (s = g(a)) == null ? void 0 : s.update();
685
- },
686
- forceUpdate: () => {
687
- var s;
688
- return (s = g(a)) == null ? void 0 : s.forceUpdate();
689
- },
690
- // Preventing end users from modifying the instance.
691
- instanceRef: R(() => g(a))
692
- };
693
- };
694
- function Hr(e) {
695
- const t = Object.keys(e.elements), n = Zt(
696
- t.map(
697
- (r) => [r, e.styles[r] || {}]
698
- )
699
- ), o = Zt(
700
- t.map(
701
- (r) => [r, e.attributes[r]]
702
- )
703
- );
704
- return {
705
- styles: n,
706
- attributes: o
707
- };
708
- }
709
- function cn() {
710
- let e;
711
- const t = (o, r) => {
712
- n(), e = window.setTimeout(o, r);
713
- }, n = () => window.clearTimeout(e);
714
- return Ro(() => n()), {
715
- registerTimeout: t,
716
- cancelTimeout: n
717
- };
718
- }
719
- let Ce = [];
720
- const fn = (e) => {
721
- xt(e) === De.esc && Ce.forEach(
722
- (n) => n(e)
723
- );
724
- }, jr = (e) => {
725
- ce(() => {
726
- Ce.length === 0 && document.addEventListener("keydown", fn), ie && Ce.push(e);
727
- }), G(() => {
728
- Ce = Ce.filter(
729
- (t) => t !== e
730
- ), Ce.length === 0 && ie && document.removeEventListener("keydown", fn);
731
- });
732
- }, Kn = () => {
733
- const e = Co(), t = Fo(), n = R(() => `${e.value}-popper-container-${t.prefix}`), o = R(() => `#${n.value}`);
734
- return {
735
- id: n,
736
- selector: o
737
- };
738
- }, zr = (e) => {
739
- const t = document.createElement("div");
740
- return t.id = e, document.body.appendChild(t), t;
741
- }, Wr = () => {
742
- const { id: e, selector: t } = Kn();
743
- return uo(() => {
744
- ie && (process.env.NODE_ENV === "test" || !document.body.querySelector(t.value)) && zr(e.value);
745
- }), {
746
- id: e,
747
- selector: t
748
- };
749
- }, $r = V({
750
- /**
751
- * @description delay of appearance, in millisecond, not valid in controlled mode
752
- */
753
- showAfter: {
754
- type: Number,
755
- default: 0
756
- },
757
- /**
758
- * @description delay of disappear, in millisecond, not valid in controlled mode
759
- */
760
- hideAfter: {
761
- type: Number,
762
- default: 200
763
- },
764
- /**
765
- * @description disappear automatically, in millisecond, not valid in controlled mode
766
- */
767
- autoClose: {
768
- type: Number,
769
- default: 0
770
- }
771
- }), Kr = ({
772
- showAfter: e,
773
- hideAfter: t,
774
- autoClose: n,
775
- open: o,
776
- close: r
777
- }) => {
778
- const { registerTimeout: a } = cn(), {
779
- registerTimeout: c,
780
- cancelTimeout: i
781
- } = cn();
782
- return {
783
- onOpen: (d, v = g(e)) => {
784
- a(() => {
785
- o(d);
786
- const m = g(n);
787
- se(m) && m > 0 && c(() => {
788
- r(d);
789
- }, m);
790
- }, v);
791
- },
792
- onClose: (d, v = g(t)) => {
793
- i(), a(() => {
794
- r(d);
795
- }, v);
796
- }
797
- };
798
- }, Vn = /* @__PURE__ */ Symbol("elForwardRef"), Vr = (e) => {
799
- be(Vn, {
800
- setForwardRef: (n) => {
801
- e.value = n;
802
- }
803
- });
804
- }, Ur = (e) => ({
805
- mounted(t) {
806
- e(t);
807
- },
808
- updated(t) {
809
- e(t);
810
- },
811
- unmounted() {
812
- e(null);
813
- }
814
- }), dn = {
815
- current: 0
816
- }, pn = I(0), qr = 2e3, vn = /* @__PURE__ */ Symbol("elZIndexContextKey"), _r = /* @__PURE__ */ Symbol("zIndexContextKey"), Yr = (e) => {
817
- const t = tt() ? U(vn, dn) : dn, n = tt() ? U(_r, void 0) : void 0, o = R(() => {
818
- const c = g(n);
819
- return se(c) ? c : qr;
820
- }), r = R(() => o.value + pn.value), a = () => (t.current++, pn.value = t.current, r.value);
821
- return !ie && !U(vn) && Pe(
822
- "ZIndexInjection",
823
- `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
824
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`
825
- ), {
826
- initialZIndex: o,
827
- currentZIndex: r,
828
- nextZIndex: a
829
- };
830
- }, Zr = /* @__PURE__ */ Symbol("emptyValuesContextKey"), Jr = "use-empty-values", Gr = ["", void 0, null], Qr = void 0, cs = V({
831
- /**
832
- * @description empty values supported by the component
833
- */
834
- emptyValues: Array,
835
- /**
836
- * @description return value when cleared, if you want to set `undefined`, use `() => undefined`
837
- */
838
- valueOnClear: {
839
- /* eslint-disable-next-line @typescript-eslint/no-unsafe-function-type */
840
- type: B([
841
- String,
842
- Number,
843
- Boolean,
844
- Function
845
- ]),
846
- default: void 0,
847
- validator: (e) => (e = ge(e) ? e() : e, Ve(e) ? e.every((t) => !t) : !e)
848
- }
849
- }), fs = (e, t) => {
850
- const n = tt() ? U(Zr, I({})) : I({}), o = R(
851
- () => e.emptyValues || n.value.emptyValues || Gr
852
- ), r = R(() => ge(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : ge(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : t !== void 0 ? t : Qr), a = (c) => {
853
- let i = !0;
854
- return Ve(c) ? i = o.value.some((s) => To(c, s)) : i = o.value.includes(c), i;
855
- };
856
- return a(r.value) || Pe(Jr, "value-on-clear should be a value of empty-values"), {
857
- emptyValues: o,
858
- valueOnClear: r,
859
- isEmptyValue: a
860
- };
861
- }, ds = (e) => Ve(e) ? e[0] : e, Xr = (e) => !e && e !== 0 ? [] : Ve(e) ? e : [e], Un = V({
862
- arrowOffset: {
863
- type: Number,
864
- default: 5
865
- }
866
- }), ea = ["fixed", "absolute"], ta = V({
867
- boundariesPadding: {
868
- type: Number,
869
- default: 0
870
- },
871
- fallbackPlacements: {
872
- type: B(Array),
873
- default: void 0
874
- },
875
- gpuAcceleration: {
876
- type: Boolean,
877
- default: !0
878
- },
879
- /**
880
- * @description offset of the Tooltip
881
- */
882
- offset: {
883
- type: Number,
884
- default: 12
885
- },
886
- /**
887
- * @description position of Tooltip
888
- */
889
- placement: {
890
- type: String,
891
- values: St,
892
- default: "bottom"
893
- },
894
- /**
895
- * @description [popper.js](https://popper.js.org/docs/v2/) parameters
896
- */
897
- popperOptions: {
898
- type: B(Object),
899
- default: () => ({})
900
- },
901
- strategy: {
902
- type: String,
903
- values: ea,
904
- default: "absolute"
905
- }
906
- }), qn = V({
907
- ...ta,
908
- ...Un,
909
- id: String,
910
- style: {
911
- type: B([String, Array, Object])
912
- },
913
- className: {
914
- type: B([String, Array, Object])
915
- },
916
- effect: {
917
- type: B(String),
918
- default: "dark"
919
- },
920
- visible: Boolean,
921
- enterable: {
922
- type: Boolean,
923
- default: !0
924
- },
925
- pure: Boolean,
926
- focusOnShow: Boolean,
927
- trapping: Boolean,
928
- popperClass: {
929
- type: B([String, Array, Object])
930
- },
931
- popperStyle: {
932
- type: B([String, Array, Object])
933
- },
934
- referenceEl: {
935
- type: B(Object)
936
- },
937
- triggerTargetEl: {
938
- type: B(Object)
939
- },
940
- stopPopperMouseEvent: {
941
- type: Boolean,
942
- default: !0
943
- },
944
- virtualTriggering: Boolean,
945
- zIndex: Number,
946
- ...Tt(["ariaLabel"]),
947
- loop: Boolean
948
- }), na = {
949
- mouseenter: (e) => e instanceof MouseEvent,
950
- mouseleave: (e) => e instanceof MouseEvent,
951
- focus: () => !0,
952
- blur: () => !0,
953
- close: () => !0
954
- }, _n = V({
955
- to: {
956
- type: B([String, Object]),
957
- required: !0
958
- },
959
- disabled: Boolean
960
- }), Yn = V({
961
- ...$r,
962
- ...qn,
963
- /**
964
- * @description which element the tooltip CONTENT appends to
965
- */
966
- appendTo: {
967
- type: _n.to.type
968
- },
969
- /**
970
- * @description display content, can be overridden by `slot#content`
971
- */
972
- content: {
973
- type: String,
974
- default: ""
975
- },
976
- /**
977
- * @description whether `content` is treated as HTML string
978
- */
979
- rawContent: Boolean,
980
- /**
981
- * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed
982
- */
983
- persistent: Boolean,
984
- // because model toggle prop is generated dynamically
985
- // so the typing cannot be evaluated by typescript as type:
986
- // [name]: { type: Boolean, default: null }
987
- // so we need to declare that again for type checking.
988
- /**
989
- * @description visibility of Tooltip
990
- */
991
- visible: {
992
- type: B(Boolean),
993
- default: null
994
- },
995
- /**
996
- * @description animation name
997
- */
998
- transition: String,
999
- /**
1000
- * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets
1001
- */
1002
- teleported: {
1003
- type: Boolean,
1004
- default: !0
1005
- },
1006
- /**
1007
- * @description whether Tooltip is disabled
1008
- */
1009
- disabled: Boolean,
1010
- ...Tt(["ariaLabel"])
1011
- }), Zn = V({
1012
- /** @description Indicates the reference element to which the popper is attached */
1013
- virtualRef: {
1014
- type: B(Object)
1015
- },
1016
- /** @description Indicates whether virtual triggering is enabled */
1017
- virtualTriggering: Boolean,
1018
- onMouseenter: {
1019
- type: B(Function)
1020
- },
1021
- onMouseleave: {
1022
- type: B(Function)
1023
- },
1024
- onClick: {
1025
- type: B(Function)
1026
- },
1027
- onKeydown: {
1028
- type: B(Function)
1029
- },
1030
- onFocus: {
1031
- type: B(Function)
1032
- },
1033
- onBlur: {
1034
- type: B(Function)
1035
- },
1036
- onContextmenu: {
1037
- type: B(Function)
1038
- },
1039
- id: String,
1040
- open: Boolean
1041
- }), Jn = V({
1042
- ...Zn,
1043
- /**
1044
- * @description whether Tooltip is disabled
1045
- */
1046
- disabled: Boolean,
1047
- /**
1048
- * @description How should the tooltip be triggered (to show), not valid in controlled mode
1049
- */
1050
- trigger: {
1051
- type: B([String, Array]),
1052
- default: "hover"
1053
- },
1054
- /**
1055
- * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard, not valid in controlled mode
1056
- */
1057
- triggerKeys: {
1058
- type: B(Array),
1059
- default: () => [De.enter, De.numpadEnter, De.space]
1060
- },
1061
- /**
1062
- * @description when triggering tooltips through hover, whether to focus the trigger element, which improves accessibility
1063
- */
1064
- focusOnTarget: Boolean
1065
- }), oa = [
1066
- "dialog",
1067
- "grid",
1068
- "group",
1069
- "listbox",
1070
- "menu",
1071
- "navigation",
1072
- "tooltip",
1073
- "tree"
1074
- ], Gn = V({
1075
- role: {
1076
- type: String,
1077
- values: oa,
1078
- default: "tooltip"
1079
- }
1080
- }), {
1081
- useModelToggleProps: ra,
1082
- useModelToggleEmits: aa,
1083
- useModelToggle: sa
1084
- } = No("visible"), ia = V({
1085
- ...Gn,
1086
- ...ra,
1087
- ...Yn,
1088
- ...Jn,
1089
- ...Un,
1090
- /**
1091
- * @description whether the tooltip content has an arrow
1092
- */
1093
- showArrow: {
1094
- type: Boolean,
1095
- default: !0
1096
- }
1097
- }), la = [
1098
- ...aa,
1099
- "before-show",
1100
- "before-hide",
1101
- "show",
1102
- "hide",
1103
- "open",
1104
- "close"
1105
- ], Nt = /* @__PURE__ */ Symbol("popper"), Qn = /* @__PURE__ */ Symbol("popperContent");
1106
- var ua = /* @__PURE__ */ _({
1107
- name: "ElPopper",
1108
- inheritAttrs: !1,
1109
- __name: "popper",
1110
- props: Gn,
1111
- setup(e, { expose: t }) {
1112
- const n = e, o = I(), r = I(), a = I(), c = I(), i = R(() => n.role), s = {
1113
- /**
1114
- * @description trigger element
1115
- */
1116
- triggerRef: o,
1117
- /**
1118
- * @description popperjs instance
1119
- */
1120
- popperInstanceRef: r,
1121
- /**
1122
- * @description popper content element
1123
- */
1124
- contentRef: a,
1125
- /**
1126
- * @description popper reference element
1127
- */
1128
- referenceRef: c,
1129
- /**
1130
- * @description role determines how aria attributes are distributed
1131
- */
1132
- role: i
1133
- };
1134
- return t(s), be(Nt, s), (l, d) => X(l.$slots, "default");
1135
- }
1136
- }), ca = /* @__PURE__ */ _({
1137
- name: "ElPopperArrow",
1138
- inheritAttrs: !1,
1139
- __name: "arrow",
1140
- setup(e, { expose: t }) {
1141
- const n = fe("popper"), { arrowRef: o, arrowStyle: r } = U(
1142
- Qn,
1143
- void 0
1144
- );
1145
- return G(() => {
1146
- o.value = void 0;
1147
- }), t({
1148
- /**
1149
- * @description Arrow element
1150
- */
1151
- arrowRef: o
1152
- }), (a, c) => (W(), Re(
1153
- "span",
1154
- {
1155
- ref_key: "arrowRef",
1156
- ref: o,
1157
- class: he(g(n).e("arrow")),
1158
- style: nt(g(r)),
1159
- "data-popper-arrow": ""
1160
- },
1161
- null,
1162
- 6
1163
- /* CLASS, STYLE */
1164
- ));
1165
- }
1166
- });
1167
- const ut = "ElOnlyChild", fa = /* @__PURE__ */ _({
1168
- name: ut,
1169
- setup(e, {
1170
- slots: t,
1171
- attrs: n
1172
- }) {
1173
- var o;
1174
- const r = U(Vn), a = Ur((o = r == null ? void 0 : r.setForwardRef) != null ? o : vt);
1175
- return () => {
1176
- var c;
1177
- const i = (c = t.default) == null ? void 0 : c.call(t, n);
1178
- if (!i) return null;
1179
- const [s, l] = Xn(i);
1180
- return s ? (l > 1 && Pe(ut, "requires exact only one valid child."), bt(co(s, n), [[a]])) : (Pe(ut, "no valid child node found"), null);
1181
- };
1182
- }
1183
- });
1184
- function Xn(e) {
1185
- if (!e) return [null, 0];
1186
- const t = e, n = t.filter((o) => o.type !== Yt).length;
1187
- for (const o of t) {
1188
- if (An(o))
1189
- switch (o.type) {
1190
- case Yt:
1191
- continue;
1192
- case fo:
1193
- case "svg":
1194
- return [mn(o), n];
1195
- case On:
1196
- return Xn(o.children);
1197
- default:
1198
- return [o, n];
1199
- }
1200
- return [mn(o), n];
1201
- }
1202
- return [null, 0];
1203
- }
1204
- function mn(e) {
1205
- const t = fe("only-child");
1206
- return Ee("span", {
1207
- class: t.e("content")
1208
- }, [e]);
1209
- }
1210
- var da = /* @__PURE__ */ _({
1211
- name: "ElPopperTrigger",
1212
- inheritAttrs: !1,
1213
- __name: "trigger",
1214
- props: Zn,
1215
- setup(e, { expose: t }) {
1216
- const n = e, { role: o, triggerRef: r } = U(Nt, void 0);
1217
- Vr(r);
1218
- const a = R(() => i.value ? n.id : void 0), c = R(() => {
1219
- if (o && o.value === "tooltip")
1220
- return n.open && n.id ? n.id : void 0;
1221
- }), i = R(() => {
1222
- if (o && o.value !== "tooltip")
1223
- return o.value;
1224
- }), s = R(() => i.value ? `${n.open}` : void 0);
1225
- let l;
1226
- const d = [
1227
- "onMouseenter",
1228
- "onMouseleave",
1229
- "onClick",
1230
- "onKeydown",
1231
- "onFocus",
1232
- "onBlur",
1233
- "onContextmenu"
1234
- ];
1235
- return ce(() => {
1236
- H(
1237
- () => n.virtualRef,
1238
- (v) => {
1239
- v && (r.value = Fn(v));
1240
- },
1241
- {
1242
- immediate: !0
1243
- }
1244
- ), H(
1245
- r,
1246
- (v, m) => {
1247
- l == null || l(), l = void 0, Se(m) && d.forEach((f) => {
1248
- const u = n[f];
1249
- u && m.removeEventListener(
1250
- f.slice(2).toLowerCase(),
1251
- u,
1252
- ["onFocus", "onBlur"].includes(f)
1253
- );
1254
- }), Se(v) && (d.forEach((f) => {
1255
- const u = n[f];
1256
- u && v.addEventListener(
1257
- f.slice(2).toLowerCase(),
1258
- u,
1259
- ["onFocus", "onBlur"].includes(f)
1260
- );
1261
- }), Qt(v) && (l = H(
1262
- [a, c, i, s],
1263
- (f) => {
1264
- [
1265
- "aria-controls",
1266
- "aria-describedby",
1267
- "aria-haspopup",
1268
- "aria-expanded"
1269
- ].forEach((u, p) => {
1270
- wt(f[p]) ? v.removeAttribute(u) : v.setAttribute(u, f[p]);
1271
- });
1272
- },
1273
- { immediate: !0 }
1274
- ))), Se(m) && Qt(m) && [
1275
- "aria-controls",
1276
- "aria-describedby",
1277
- "aria-haspopup",
1278
- "aria-expanded"
1279
- ].forEach((f) => m.removeAttribute(f));
1280
- },
1281
- {
1282
- immediate: !0
1283
- }
1284
- );
1285
- }), G(() => {
1286
- if (l == null || l(), l = void 0, r.value && Se(r.value)) {
1287
- const v = r.value;
1288
- d.forEach((m) => {
1289
- const f = n[m];
1290
- f && v.removeEventListener(
1291
- m.slice(2).toLowerCase(),
1292
- f,
1293
- ["onFocus", "onBlur"].includes(m)
1294
- );
1295
- }), r.value = void 0;
1296
- }
1297
- }), t({
1298
- /**
1299
- * @description trigger element
1300
- */
1301
- triggerRef: r
1302
- }), (v, m) => e.virtualTriggering ? ze("v-if", !0) : (W(), ne(g(fa), Et({ key: 0 }, v.$attrs, {
1303
- "aria-controls": a.value,
1304
- "aria-describedby": c.value,
1305
- "aria-expanded": s.value,
1306
- "aria-haspopup": i.value
1307
- }), {
1308
- default: Q(() => [
1309
- X(v.$slots, "default")
1310
- ]),
1311
- _: 3
1312
- /* FORWARDED */
1313
- }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
1314
- }
1315
- });
1316
- const ct = "focus-trap.focus-after-trapped", ft = "focus-trap.focus-after-released", pa = "focus-trap.focusout-prevented", gn = {
1317
- cancelable: !0,
1318
- bubbles: !1
1319
- }, va = {
1320
- cancelable: !0,
1321
- bubbles: !1
1322
- }, hn = "focusAfterTrapped", yn = "focusAfterReleased", ma = /* @__PURE__ */ Symbol("elFocusTrap"), Bt = I(), st = I(0), Mt = I(0);
1323
- let Ge = 0;
1324
- const eo = (e) => {
1325
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1326
- acceptNode: (o) => {
1327
- const r = o.tagName === "INPUT" && o.type === "hidden";
1328
- return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1329
- }
1330
- });
1331
- for (; n.nextNode(); ) t.push(n.currentNode);
1332
- return t;
1333
- }, bn = (e, t) => {
1334
- for (const n of e)
1335
- if (!ga(n, t)) return n;
1336
- }, ga = (e, t) => {
1337
- if (process.env.NODE_ENV === "test") return !1;
1338
- if (getComputedStyle(e).visibility === "hidden") return !0;
1339
- for (; e; ) {
1340
- if (t && e === t) return !1;
1341
- if (getComputedStyle(e).display === "none") return !0;
1342
- e = e.parentElement;
1343
- }
1344
- return !1;
1345
- }, ha = (e) => {
1346
- const t = eo(e), n = bn(t, e), o = bn(t.reverse(), e);
1347
- return [n, o];
1348
- }, ya = (e) => e instanceof HTMLInputElement && "select" in e, ue = (e, t) => {
1349
- if (e) {
1350
- const n = document.activeElement;
1351
- Ot(e, { preventScroll: !0 }), Mt.value = window.performance.now(), e !== n && ya(e) && t && e.select();
1352
- }
1353
- };
1354
- function En(e, t) {
1355
- const n = [...e], o = e.indexOf(t);
1356
- return o !== -1 && n.splice(o, 1), n;
1357
- }
1358
- const ba = () => {
1359
- let e = [];
1360
- return {
1361
- push: (o) => {
1362
- const r = e[0];
1363
- r && o !== r && r.pause(), e = En(e, o), e.unshift(o);
1364
- },
1365
- remove: (o) => {
1366
- var r, a;
1367
- e = En(e, o), (a = (r = e[0]) == null ? void 0 : r.resume) == null || a.call(r);
1368
- }
1369
- };
1370
- }, Ea = (e, t = !1) => {
1371
- const n = document.activeElement;
1372
- for (const o of e)
1373
- if (ue(o, t), document.activeElement !== n) return;
1374
- }, wn = ba(), wa = () => st.value > Mt.value, Qe = () => {
1375
- Bt.value = "pointer", st.value = window.performance.now();
1376
- }, Tn = () => {
1377
- Bt.value = "keyboard", st.value = window.performance.now();
1378
- }, Ta = () => (ce(() => {
1379
- Ge === 0 && (document.addEventListener("mousedown", Qe), document.addEventListener("touchstart", Qe), document.addEventListener("keydown", Tn)), Ge++;
1380
- }), G(() => {
1381
- Ge--, Ge <= 0 && (document.removeEventListener("mousedown", Qe), document.removeEventListener("touchstart", Qe), document.removeEventListener("keydown", Tn));
1382
- }), {
1383
- focusReason: Bt,
1384
- lastUserFocusTimestamp: st,
1385
- lastAutomatedFocusTimestamp: Mt
1386
- }), Xe = (e) => new CustomEvent(pa, {
1387
- ...va,
1388
- detail: e
1389
- });
1390
- var xa = _({
1391
- name: "ElFocusTrap",
1392
- inheritAttrs: !1,
1393
- props: {
1394
- loop: Boolean,
1395
- trapped: Boolean,
1396
- focusTrapEl: Object,
1397
- focusStartEl: {
1398
- type: [Object, String],
1399
- default: "first"
1400
- }
1401
- },
1402
- emits: [
1403
- hn,
1404
- yn,
1405
- "focusin",
1406
- "focusout",
1407
- "focusout-prevented",
1408
- "release-requested"
1409
- ],
1410
- setup(e, { emit: t }) {
1411
- const n = I();
1412
- let o, r;
1413
- const { focusReason: a } = Ta();
1414
- jr((u) => {
1415
- e.trapped && !c.paused && t("release-requested", u);
1416
- });
1417
- const c = {
1418
- paused: !1,
1419
- pause() {
1420
- this.paused = !0;
1421
- },
1422
- resume() {
1423
- this.paused = !1;
1424
- }
1425
- }, i = (u) => {
1426
- if (!e.loop && !e.trapped || c.paused) return;
1427
- const { altKey: p, ctrlKey: b, metaKey: y, currentTarget: E, shiftKey: S } = u, { loop: h } = e, F = xt(u) === De.tab && !p && !b && !y, x = document.activeElement;
1428
- if (F && x) {
1429
- const T = E, [A, P] = ha(T);
1430
- if (A && P) {
1431
- if (!S && x === P) {
1432
- const w = Xe({
1433
- focusReason: a.value
1434
- });
1435
- t("focusout-prevented", w), w.defaultPrevented || (u.preventDefault(), h && ue(A, !0));
1436
- } else if (S && [A, T].includes(x)) {
1437
- const w = Xe({
1438
- focusReason: a.value
1439
- });
1440
- t("focusout-prevented", w), w.defaultPrevented || (u.preventDefault(), h && ue(P, !0));
1441
- }
1442
- } else if (x === T) {
1443
- const w = Xe({
1444
- focusReason: a.value
1445
- });
1446
- t("focusout-prevented", w), w.defaultPrevented || u.preventDefault();
1447
- }
1448
- }
1449
- };
1450
- be(ma, {
1451
- focusTrapRef: n,
1452
- onKeydown: i
1453
- }), H(
1454
- () => e.focusTrapEl,
1455
- (u) => {
1456
- u && (n.value = u);
1457
- },
1458
- { immediate: !0 }
1459
- ), H([n], ([u], [p]) => {
1460
- u && (u.addEventListener("keydown", i), u.addEventListener("focusin", d), u.addEventListener("focusout", v)), p && (p.removeEventListener("keydown", i), p.removeEventListener("focusin", d), p.removeEventListener("focusout", v));
1461
- });
1462
- const s = (u) => {
1463
- t(hn, u);
1464
- }, l = (u) => t(yn, u), d = (u) => {
1465
- const p = g(n);
1466
- if (!p) return;
1467
- const b = u.target, y = u.relatedTarget, E = b && p.contains(b);
1468
- e.trapped || y && p.contains(y) || (o = y), E && t("focusin", u), !c.paused && e.trapped && (E ? r = b : ue(r, !0));
1469
- }, v = (u) => {
1470
- const p = g(n);
1471
- if (!(c.paused || !p))
1472
- if (e.trapped) {
1473
- const b = u.relatedTarget;
1474
- !wt(b) && !p.contains(b) && setTimeout(() => {
1475
- if (!c.paused && e.trapped) {
1476
- const y = Xe({
1477
- focusReason: a.value
1478
- });
1479
- t("focusout-prevented", y), y.defaultPrevented || ue(r, !0);
1480
- }
1481
- }, 0);
1482
- } else {
1483
- const b = u.target;
1484
- b && p.contains(b) || t("focusout", u);
1485
- }
1486
- };
1487
- async function m() {
1488
- await We();
1489
- const u = g(n);
1490
- if (u) {
1491
- wn.push(c);
1492
- const p = u.contains(
1493
- document.activeElement
1494
- ) ? o : document.activeElement;
1495
- if (o = p, !u.contains(p)) {
1496
- const y = new Event(
1497
- ct,
1498
- gn
1499
- );
1500
- u.addEventListener(ct, s), u.dispatchEvent(y), y.defaultPrevented || We(() => {
1501
- let E = e.focusStartEl;
1502
- So(E) || (ue(E), document.activeElement !== E && (E = "first")), E === "first" && Ea(
1503
- eo(u),
1504
- !0
1505
- ), (document.activeElement === p || E === "container") && ue(u);
1506
- });
1507
- }
1508
- }
1509
- }
1510
- function f() {
1511
- const u = g(n);
1512
- if (u) {
1513
- u.removeEventListener(ct, s);
1514
- const p = new CustomEvent(ft, {
1515
- ...gn,
1516
- detail: {
1517
- focusReason: a.value
1518
- }
1519
- });
1520
- u.addEventListener(ft, l), u.dispatchEvent(p), !p.defaultPrevented && (a.value == "keyboard" || !wa() || u.contains(document.activeElement)) && ue(o ?? document.body), u.removeEventListener(ft, l), wn.remove(c), o = null, r = null;
1521
- }
1522
- }
1523
- return ce(() => {
1524
- e.trapped && m(), H(
1525
- () => e.trapped,
1526
- (u) => {
1527
- u ? m() : f();
1528
- }
1529
- );
1530
- }), G(() => {
1531
- e.trapped && f(), n.value && (n.value.removeEventListener("keydown", i), n.value.removeEventListener("focusin", d), n.value.removeEventListener("focusout", v), n.value = void 0), o = null, r = null;
1532
- }), {
1533
- onKeydown: i
1534
- };
1535
- }
1536
- }), Oa = (e, t) => {
1537
- const n = e.__vccOpts || e;
1538
- for (const [o, r] of t)
1539
- n[o] = r;
1540
- return n;
1541
- };
1542
- function Ca(e, t, n, o, r, a) {
1543
- return X(e.$slots, "default", { handleKeydown: e.onKeydown });
1544
- }
1545
- var Sa = /* @__PURE__ */ Oa(xa, [["render", Ca]]);
1546
- const Ra = (e, t) => {
1547
- const n = I(!1), o = I(), r = () => {
1548
- t("focus");
1549
- }, a = (l) => {
1550
- var d;
1551
- ((d = l.detail) == null ? void 0 : d.focusReason) !== "pointer" && (o.value = "first", t("blur"));
1552
- }, c = (l) => {
1553
- e.visible && !n.value && (l.target && (o.value = l.target), n.value = !0);
1554
- }, i = (l) => {
1555
- e.trapping || (l.detail.focusReason === "pointer" && l.preventDefault(), n.value = !1);
1556
- }, s = () => {
1557
- n.value = !1, t("close");
1558
- };
1559
- return G(() => {
1560
- o.value = void 0;
1561
- }), {
1562
- focusStartRef: o,
1563
- trapped: n,
1564
- onFocusAfterReleased: a,
1565
- onFocusAfterTrapped: r,
1566
- onFocusInTrap: c,
1567
- onFocusoutPrevented: i,
1568
- onReleaseRequested: s
1569
- };
1570
- }, Pa = (e, t = []) => {
1571
- const { placement: n, strategy: o, popperOptions: r } = e, a = {
1572
- placement: n,
1573
- strategy: o,
1574
- ...r,
1575
- modifiers: [...Fa(e), ...t]
1576
- };
1577
- return Ia(a, r == null ? void 0 : r.modifiers), a;
1578
- }, Aa = (e) => {
1579
- if (ie)
1580
- return Fn(e);
1581
- };
1582
- function Fa(e) {
1583
- const { offset: t, gpuAcceleration: n, fallbackPlacements: o } = e;
1584
- return [
1585
- {
1586
- name: "offset",
1587
- options: {
1588
- offset: [0, t ?? 12]
1589
- }
1590
- },
1591
- {
1592
- name: "preventOverflow",
1593
- options: {
1594
- padding: {
1595
- top: 0,
1596
- bottom: 0,
1597
- left: 0,
1598
- right: 0
1599
- }
1600
- }
1601
- },
1602
- {
1603
- name: "flip",
1604
- options: {
1605
- padding: 5,
1606
- fallbackPlacements: o
1607
- }
1608
- },
1609
- {
1610
- name: "computeStyles",
1611
- options: {
1612
- gpuAcceleration: n
1613
- }
1614
- }
1615
- ];
1616
- }
1617
- function Ia(e, t) {
1618
- t && (e.modifiers = [...e.modifiers, ...t ?? []]);
1619
- }
1620
- const La = 0, ka = (e) => {
1621
- const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: r } = U(
1622
- Nt,
1623
- void 0
1624
- ), a = I(), c = R(() => e.arrowOffset), i = R(() => ({
1625
- name: "eventListeners",
1626
- enabled: !!e.visible
1627
- })), s = R(() => {
1628
- var y;
1629
- const E = g(a), S = (y = g(c)) != null ? y : La;
1630
- return {
1631
- name: "arrow",
1632
- enabled: !xo(E),
1633
- options: {
1634
- element: E,
1635
- padding: S
1636
- }
1637
- };
1638
- }), l = R(() => ({
1639
- onFirstUpdate: () => {
1640
- u();
1641
- },
1642
- ...Pa(e, [
1643
- g(s),
1644
- g(i)
1645
- ])
1646
- })), d = R(
1647
- () => Aa(e.referenceEl) || g(o)
1648
- ), { attributes: v, state: m, styles: f, update: u, forceUpdate: p, instanceRef: b } = Dr(d, n, l);
1649
- return H(b, (y) => t.value = y, {
1650
- flush: "sync"
1651
- }), ce(() => {
1652
- H(
1653
- () => {
1654
- var y, E;
1655
- return (E = (y = g(d)) == null ? void 0 : y.getBoundingClientRect) == null ? void 0 : E.call(y);
1656
- },
1657
- () => {
1658
- u();
1659
- }
1660
- );
1661
- }), G(() => {
1662
- t.value = void 0;
1663
- }), {
1664
- attributes: v,
1665
- arrowRef: a,
1666
- contentRef: n,
1667
- instanceRef: b,
1668
- state: m,
1669
- styles: f,
1670
- role: r,
1671
- forceUpdate: p,
1672
- update: u
1673
- };
1674
- }, Na = (e, {
1675
- attributes: t,
1676
- styles: n,
1677
- role: o
1678
- }) => {
1679
- const { nextZIndex: r } = Yr(), a = fe("popper"), c = R(() => g(t).popper), i = I(
1680
- se(e.zIndex) ? e.zIndex : r()
1681
- ), s = R(() => [
1682
- a.b(),
1683
- a.is("pure", e.pure),
1684
- a.is(e.effect),
1685
- e.popperClass
1686
- ]), l = R(() => [
1687
- { zIndex: g(i) },
1688
- g(n).popper,
1689
- e.popperStyle || {}
1690
- ]), d = R(
1691
- () => o.value === "dialog" ? "false" : void 0
1692
- ), v = R(
1693
- () => g(n).arrow || {}
1694
- );
1695
- return {
1696
- ariaModal: d,
1697
- arrowStyle: v,
1698
- contentAttrs: c,
1699
- contentClass: s,
1700
- contentStyle: l,
1701
- contentZIndex: i,
1702
- updateZIndex: () => {
1703
- i.value = se(e.zIndex) ? e.zIndex : r();
1704
- }
1705
- };
1706
- };
1707
- var Ba = /* @__PURE__ */ _({
1708
- name: "ElPopperContent",
1709
- __name: "content",
1710
- props: qn,
1711
- emits: na,
1712
- setup(e, { expose: t, emit: n }) {
1713
- const o = n, r = e, {
1714
- focusStartRef: a,
1715
- trapped: c,
1716
- onFocusAfterReleased: i,
1717
- onFocusAfterTrapped: s,
1718
- onFocusInTrap: l,
1719
- onFocusoutPrevented: d,
1720
- onReleaseRequested: v
1721
- } = Ra(r, o), { attributes: m, arrowRef: f, contentRef: u, styles: p, instanceRef: b, role: y, update: E } = ka(r), {
1722
- ariaModal: S,
1723
- arrowStyle: h,
1724
- contentAttrs: O,
1725
- contentClass: F,
1726
- contentStyle: x,
1727
- updateZIndex: T
1728
- } = Na(r, {
1729
- styles: p,
1730
- attributes: m,
1731
- role: y
1732
- }), A = U(Jt, void 0);
1733
- be(Qn, {
1734
- arrowStyle: h,
1735
- arrowRef: f
1736
- }), A && be(Jt, {
1737
- ...A,
1738
- addInputId: vt,
1739
- removeInputId: vt
1740
- });
1741
- let P;
1742
- const L = (C = !0) => {
1743
- E(), C && T();
1744
- }, w = () => {
1745
- L(!1), r.visible && r.focusOnShow ? c.value = !0 : r.visible === !1 && (c.value = !1);
1746
- };
1747
- return ce(() => {
1748
- H(
1749
- () => r.triggerTargetEl,
1750
- (C, N) => {
1751
- P == null || P(), P = void 0;
1752
- const M = g(C || u.value), j = g(N || u.value);
1753
- Se(M) && (P = H(
1754
- [y, () => r.ariaLabel, S, () => r.id],
1755
- (z) => {
1756
- ["role", "aria-label", "aria-modal", "id"].forEach((k, D) => {
1757
- wt(z[D]) ? M.removeAttribute(k) : M.setAttribute(k, z[D]);
1758
- });
1759
- },
1760
- { immediate: !0 }
1761
- )), j !== M && Se(j) && ["role", "aria-label", "aria-modal", "id"].forEach((z) => {
1762
- j.removeAttribute(z);
1763
- });
1764
- },
1765
- { immediate: !0 }
1766
- ), H(() => r.visible, w, { immediate: !0 });
1767
- }), G(() => {
1768
- P == null || P(), P = void 0, u.value = void 0;
1769
- }), t({
1770
- /**
1771
- * @description popper content element
1772
- */
1773
- popperContentRef: u,
1774
- /**
1775
- * @description popperjs instance
1776
- */
1777
- popperInstanceRef: b,
1778
- /**
1779
- * @description method for updating popper
1780
- */
1781
- updatePopper: L,
1782
- /**
1783
- * @description content style
1784
- */
1785
- contentStyle: x
1786
- }), (C, N) => (W(), Re(
1787
- "div",
1788
- Et({
1789
- ref_key: "contentRef",
1790
- ref: u
1791
- }, g(O), {
1792
- style: g(x),
1793
- class: g(F),
1794
- tabindex: "-1",
1795
- onMouseenter: N[0] || (N[0] = (M) => C.$emit("mouseenter", M)),
1796
- onMouseleave: N[1] || (N[1] = (M) => C.$emit("mouseleave", M))
1797
- }),
1798
- [
1799
- Ee(g(Sa), {
1800
- loop: e.loop,
1801
- trapped: g(c),
1802
- "trap-on-focus-in": !0,
1803
- "focus-trap-el": g(u),
1804
- "focus-start-el": g(a),
1805
- onFocusAfterTrapped: g(s),
1806
- onFocusAfterReleased: g(i),
1807
- onFocusin: g(l),
1808
- onFocusoutPrevented: g(d),
1809
- onReleaseRequested: g(v)
1810
- }, {
1811
- default: Q(() => [
1812
- X(C.$slots, "default")
1813
- ]),
1814
- _: 3
1815
- /* FORWARDED */
1816
- }, 8, ["loop", "trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
1817
- ],
1818
- 16
1819
- /* FULL_PROPS */
1820
- ));
1821
- }
1822
- });
1823
- const Ma = rt(ua), Dt = /* @__PURE__ */ Symbol("elTooltip"), yt = (e, t) => Ve(e) ? e.includes(t) : e === t, xe = (e, t, n) => (o) => {
1824
- yt(g(e), t) && n(o);
1825
- };
1826
- var Da = /* @__PURE__ */ _({
1827
- name: "ElTooltipTrigger",
1828
- __name: "trigger",
1829
- props: Jn,
1830
- setup(e, { expose: t }) {
1831
- const n = e, o = fe("tooltip"), { controlled: r, id: a, open: c, onOpen: i, onClose: s, onToggle: l } = U(
1832
- Dt,
1833
- void 0
1834
- ), d = I(null), v = () => {
1835
- if (g(r) || n.disabled)
1836
- return !0;
1837
- }, m = me(n, "trigger"), f = ae(
1838
- v,
1839
- xe(m, "hover", (h) => {
1840
- i(h), n.focusOnTarget && h.target && We(() => {
1841
- Ot(h.target, { preventScroll: !0 });
1842
- });
1843
- })
1844
- ), u = ae(
1845
- v,
1846
- xe(m, "hover", s)
1847
- ), p = ae(
1848
- v,
1849
- xe(m, "click", (h) => {
1850
- h.button === 0 && l(h);
1851
- })
1852
- ), b = ae(
1853
- v,
1854
- xe(m, "focus", i)
1855
- ), y = ae(
1856
- v,
1857
- xe(m, "focus", s)
1858
- ), E = ae(
1859
- v,
1860
- xe(m, "contextmenu", (h) => {
1861
- h.preventDefault(), l(h);
1862
- })
1863
- ), S = ae(
1864
- v,
1865
- (h) => {
1866
- const O = xt(h);
1867
- n.triggerKeys.includes(O) && (h.preventDefault(), l(h));
1868
- }
1869
- );
1870
- return t({
1871
- /**
1872
- * @description trigger element
1873
- */
1874
- triggerRef: d
1875
- }), (h, O) => (W(), ne(g(da), {
1876
- id: g(a),
1877
- "virtual-ref": e.virtualRef,
1878
- open: g(c),
1879
- "virtual-triggering": e.virtualTriggering,
1880
- class: he(g(o).e("trigger")),
1881
- onBlur: g(y),
1882
- onClick: g(p),
1883
- onContextmenu: g(E),
1884
- onFocus: g(b),
1885
- onMouseenter: g(f),
1886
- onMouseleave: g(u),
1887
- onKeydown: g(S)
1888
- }, {
1889
- default: Q(() => [
1890
- X(h.$slots, "default")
1891
- ]),
1892
- _: 3
1893
- /* FORWARDED */
1894
- }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
1895
- }
1896
- }), Ha = /* @__PURE__ */ _({
1897
- __name: "teleport",
1898
- props: _n,
1899
- setup(e) {
1900
- return (t, n) => t.disabled ? X(t.$slots, "default", { key: 0 }) : (W(), ne(po, {
1901
- key: 1,
1902
- to: t.to
1903
- }, [
1904
- X(t.$slots, "default")
1905
- ], 8, ["to"]));
1906
- }
1907
- });
1908
- const ja = rt(Ha);
1909
- var za = /* @__PURE__ */ _({
1910
- name: "ElTooltipContent",
1911
- inheritAttrs: !1,
1912
- __name: "content",
1913
- props: Yn,
1914
- setup(e, { expose: t }) {
1915
- const n = e, { selector: o } = Kn(), r = fe("tooltip"), a = I(), c = Po(() => {
1916
- var k;
1917
- return (k = a.value) == null ? void 0 : k.popperContentRef;
1918
- });
1919
- let i;
1920
- const {
1921
- controlled: s,
1922
- id: l,
1923
- open: d,
1924
- trigger: v,
1925
- onClose: m,
1926
- onOpen: f,
1927
- onShow: u,
1928
- onHide: p,
1929
- onBeforeShow: b,
1930
- onBeforeHide: y
1931
- } = U(Dt, void 0), E = R(() => n.transition || `${r.namespace.value}-fade-in-linear`), S = R(() => process.env.NODE_ENV === "test" && !process.env.RUN_TEST_WITH_PERSISTENT ? !0 : n.persistent);
1932
- G(() => {
1933
- i == null || i();
1934
- });
1935
- const h = R(() => g(S) ? !0 : g(d)), O = R(() => n.disabled ? !1 : g(d)), F = R(() => n.appendTo || o.value), x = R(() => {
1936
- var k;
1937
- return (k = n.style) != null ? k : {};
1938
- }), T = I(!0), A = () => {
1939
- p(), z() && Ot(document.body, { preventScroll: !0 }), T.value = !0;
1940
- }, P = () => {
1941
- if (g(s)) return !0;
1942
- }, L = ae(P, () => {
1943
- n.enterable && yt(g(v), "hover") && f();
1944
- }), w = ae(P, () => {
1945
- yt(g(v), "hover") && m();
1946
- }), C = () => {
1947
- var k, D;
1948
- (D = (k = a.value) == null ? void 0 : k.updatePopper) == null || D.call(k), b == null || b();
1949
- }, N = () => {
1950
- y == null || y();
1951
- }, M = () => {
1952
- u();
1953
- }, j = () => {
1954
- n.virtualTriggering || m();
1955
- }, z = (k) => {
1956
- var D;
1957
- const ee = (D = a.value) == null ? void 0 : D.popperContentRef, ke = (k == null ? void 0 : k.relatedTarget) || document.activeElement;
1958
- return ee == null ? void 0 : ee.contains(ke);
1959
- };
1960
- return H(
1961
- () => g(d),
1962
- (k) => {
1963
- k ? (T.value = !1, i = Ao(
1964
- c,
1965
- () => {
1966
- if (g(s)) return;
1967
- Xr(g(v)).every((ee) => ee !== "hover" && ee !== "focus") && m();
1968
- },
1969
- { detectIframe: !0 }
1970
- )) : i == null || i();
1971
- },
1972
- {
1973
- flush: "post"
1974
- }
1975
- ), H(
1976
- () => n.content,
1977
- () => {
1978
- var k, D;
1979
- (D = (k = a.value) == null ? void 0 : k.updatePopper) == null || D.call(k);
1980
- }
1981
- ), t({
1982
- /**
1983
- * @description el-popper-content component instance
1984
- */
1985
- contentRef: a,
1986
- /**
1987
- * @description validate current focus event is trigger inside el-popper-content
1988
- */
1989
- isFocusInsideContent: z
1990
- }), (k, D) => (W(), ne(g(ja), {
1991
- disabled: !e.teleported,
1992
- to: F.value
1993
- }, {
1994
- default: Q(() => [
1995
- h.value || !T.value ? (W(), ne(Cn, {
1996
- key: 0,
1997
- name: E.value,
1998
- appear: !S.value,
1999
- onAfterLeave: A,
2000
- onBeforeEnter: C,
2001
- onAfterEnter: M,
2002
- onBeforeLeave: N,
2003
- persisted: ""
2004
- }, {
2005
- default: Q(() => [
2006
- bt(Ee(g(Ba), Et({
2007
- id: g(l),
2008
- ref_key: "contentRef",
2009
- ref: a
2010
- }, k.$attrs, {
2011
- "aria-label": e.ariaLabel,
2012
- "aria-hidden": T.value,
2013
- "boundaries-padding": e.boundariesPadding,
2014
- "fallback-placements": e.fallbackPlacements,
2015
- "gpu-acceleration": e.gpuAcceleration,
2016
- offset: e.offset,
2017
- placement: e.placement,
2018
- "popper-options": e.popperOptions,
2019
- "arrow-offset": e.arrowOffset,
2020
- strategy: e.strategy,
2021
- effect: e.effect,
2022
- enterable: e.enterable,
2023
- pure: e.pure,
2024
- "popper-class": e.popperClass,
2025
- "popper-style": [e.popperStyle, x.value],
2026
- "reference-el": e.referenceEl,
2027
- "trigger-target-el": e.triggerTargetEl,
2028
- visible: O.value,
2029
- "z-index": e.zIndex,
2030
- loop: e.loop,
2031
- onMouseenter: g(L),
2032
- onMouseleave: g(w),
2033
- onBlur: j,
2034
- onClose: g(m)
2035
- }), {
2036
- default: Q(() => [
2037
- X(k.$slots, "default")
2038
- ]),
2039
- _: 3
2040
- /* FORWARDED */
2041
- }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "arrow-offset", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "loop", "onMouseenter", "onMouseleave", "onClose"]), [
2042
- [Sn, O.value]
2043
- ])
2044
- ]),
2045
- _: 3
2046
- /* FORWARDED */
2047
- }, 8, ["name", "appear"])) : ze("v-if", !0)
2048
- ]),
2049
- _: 3
2050
- /* FORWARDED */
2051
- }, 8, ["disabled", "to"]));
2052
- }
2053
- });
2054
- const Wa = ["innerHTML"], $a = { key: 1 };
2055
- var Ka = /* @__PURE__ */ _({
2056
- name: "ElTooltip",
2057
- __name: "tooltip",
2058
- props: ia,
2059
- emits: la,
2060
- setup(e, { expose: t, emit: n }) {
2061
- const o = e, r = n;
2062
- Wr();
2063
- const a = fe("tooltip"), c = Io(), i = I(), s = I(), l = () => {
2064
- var h;
2065
- const O = g(i);
2066
- O && ((h = O.popperInstanceRef) == null || h.update());
2067
- }, d = I(!1), v = I(), { show: m, hide: f, hasUpdateHandler: u } = sa({
2068
- indicator: d,
2069
- toggleReason: v
2070
- }), { onOpen: p, onClose: b } = Kr({
2071
- showAfter: me(o, "showAfter"),
2072
- hideAfter: me(o, "hideAfter"),
2073
- autoClose: me(o, "autoClose"),
2074
- open: m,
2075
- close: f
2076
- }), y = R(
2077
- () => Pn(o.visible) && !u.value
2078
- ), E = R(() => [a.b(), o.popperClass]);
2079
- be(Dt, {
2080
- controlled: y,
2081
- id: c,
2082
- open: vo(d),
2083
- trigger: me(o, "trigger"),
2084
- onOpen: p,
2085
- onClose: b,
2086
- onToggle: (h) => {
2087
- g(d) ? b(h) : p(h);
2088
- },
2089
- onShow: () => {
2090
- r("show", v.value);
2091
- },
2092
- onHide: () => {
2093
- r("hide", v.value);
2094
- },
2095
- onBeforeShow: () => {
2096
- r("before-show", v.value);
2097
- },
2098
- onBeforeHide: () => {
2099
- r("before-hide", v.value);
2100
- },
2101
- updatePopper: l
2102
- }), H(
2103
- () => o.disabled,
2104
- (h) => {
2105
- h && d.value && (d.value = !1);
2106
- }
2107
- );
2108
- const S = (h) => {
2109
- var O;
2110
- return (O = s.value) == null ? void 0 : O.isFocusInsideContent(h);
2111
- };
2112
- return mo(() => d.value && f()), G(() => {
2113
- v.value = void 0;
2114
- }), t({
2115
- /**
2116
- * @description el-popper component instance
2117
- */
2118
- popperRef: i,
2119
- /**
2120
- * @description el-tooltip-content component instance
2121
- */
2122
- contentRef: s,
2123
- /**
2124
- * @description validate current focus event is trigger inside el-tooltip-content
2125
- */
2126
- isFocusInsideContent: S,
2127
- /**
2128
- * @description update el-popper component instance
2129
- */
2130
- updatePopper: l,
2131
- /**
2132
- * @description expose onOpen function to mange el-tooltip open state
2133
- */
2134
- onOpen: p,
2135
- /**
2136
- * @description expose onClose function to manage el-tooltip close state
2137
- */
2138
- onClose: b,
2139
- /**
2140
- * @description expose hide function
2141
- */
2142
- hide: f
2143
- }), (h, O) => (W(), ne(g(Ma), {
2144
- ref_key: "popperRef",
2145
- ref: i,
2146
- role: e.role
2147
- }, {
2148
- default: Q(() => [
2149
- Ee(Da, {
2150
- disabled: e.disabled,
2151
- trigger: e.trigger,
2152
- "trigger-keys": e.triggerKeys,
2153
- "virtual-ref": e.virtualRef,
2154
- "virtual-triggering": e.virtualTriggering,
2155
- "focus-on-target": e.focusOnTarget
2156
- }, {
2157
- default: Q(() => [
2158
- h.$slots.default ? X(h.$slots, "default", { key: 0 }) : ze("v-if", !0)
2159
- ]),
2160
- _: 3
2161
- /* FORWARDED */
2162
- }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering", "focus-on-target"]),
2163
- Ee(za, {
2164
- ref_key: "contentRef",
2165
- ref: s,
2166
- "aria-label": e.ariaLabel,
2167
- "boundaries-padding": e.boundariesPadding,
2168
- content: e.content,
2169
- disabled: e.disabled,
2170
- effect: e.effect,
2171
- enterable: e.enterable,
2172
- "fallback-placements": e.fallbackPlacements,
2173
- "hide-after": e.hideAfter,
2174
- "gpu-acceleration": e.gpuAcceleration,
2175
- offset: e.offset,
2176
- persistent: e.persistent,
2177
- "popper-class": E.value,
2178
- "popper-style": e.popperStyle,
2179
- placement: e.placement,
2180
- "popper-options": e.popperOptions,
2181
- "arrow-offset": e.arrowOffset,
2182
- pure: e.pure,
2183
- "raw-content": e.rawContent,
2184
- "reference-el": e.referenceEl,
2185
- "trigger-target-el": e.triggerTargetEl,
2186
- "show-after": e.showAfter,
2187
- strategy: e.strategy,
2188
- teleported: e.teleported,
2189
- transition: e.transition,
2190
- "virtual-triggering": e.virtualTriggering,
2191
- "z-index": e.zIndex,
2192
- "append-to": e.appendTo,
2193
- loop: e.loop
2194
- }, {
2195
- default: Q(() => [
2196
- X(h.$slots, "content", {}, () => [
2197
- e.rawContent ? (W(), Re("span", {
2198
- key: 0,
2199
- innerHTML: e.content
2200
- }, null, 8, Wa)) : (W(), Re(
2201
- "span",
2202
- $a,
2203
- go(e.content),
2204
- 1
2205
- /* TEXT */
2206
- ))
2207
- ]),
2208
- e.showArrow ? (W(), ne(g(ca), { key: 0 })) : ze("v-if", !0)
2209
- ]),
2210
- _: 3
2211
- /* FORWARDED */
2212
- }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "arrow-offset", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to", "loop"])
2213
- ]),
2214
- _: 3
2215
- /* FORWARDED */
2216
- }, 8, ["role"]));
2217
- }
2218
- });
2219
- const ps = rt(Ka), Va = V({
2220
- /**
2221
- * @description trigger distance(px)
2222
- */
2223
- distance: {
2224
- type: Number,
2225
- default: 0
2226
- },
2227
- /**
2228
- * @description height of scrollbar
2229
- */
2230
- height: {
2231
- type: [String, Number],
2232
- default: ""
2233
- },
2234
- /**
2235
- * @description max height of scrollbar
2236
- */
2237
- maxHeight: {
2238
- type: [String, Number],
2239
- default: ""
2240
- },
2241
- /**
2242
- * @description whether to use the native scrollbar
2243
- */
2244
- native: Boolean,
2245
- /**
2246
- * @description style of wrap
2247
- */
2248
- wrapStyle: {
2249
- type: B([String, Object, Array]),
2250
- default: ""
2251
- },
2252
- /**
2253
- * @description class of wrap
2254
- */
2255
- wrapClass: {
2256
- type: [String, Array],
2257
- default: ""
2258
- },
2259
- /**
2260
- * @description class of view
2261
- */
2262
- viewClass: {
2263
- type: [String, Array],
2264
- default: ""
2265
- },
2266
- /**
2267
- * @description style of view
2268
- */
2269
- viewStyle: {
2270
- type: [String, Array, Object],
2271
- default: ""
2272
- },
2273
- /**
2274
- * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance
2275
- */
2276
- noresize: Boolean,
2277
- // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
2278
- /**
2279
- * @description element tag of the view
2280
- */
2281
- tag: {
2282
- type: String,
2283
- default: "div"
2284
- },
2285
- /**
2286
- * @description always show
2287
- */
2288
- always: Boolean,
2289
- /**
2290
- * @description minimum size of scrollbar
2291
- */
2292
- minSize: {
2293
- type: Number,
2294
- default: 20
2295
- },
2296
- /**
2297
- * @description Wrap tabindex
2298
- */
2299
- tabindex: {
2300
- type: [String, Number],
2301
- default: void 0
2302
- },
2303
- /**
2304
- * @description id of view
2305
- */
2306
- id: String,
2307
- /**
2308
- * @description role of view
2309
- */
2310
- role: String,
2311
- ...Tt(["ariaLabel", "ariaOrientation"])
2312
- }), Ua = {
2313
- "end-reached": (e) => ["left", "right", "top", "bottom"].includes(e),
2314
- scroll: ({
2315
- scrollTop: e,
2316
- scrollLeft: t
2317
- }) => [e, t].every(se)
2318
- }, qa = V({
2319
- always: {
2320
- type: Boolean,
2321
- default: !0
2322
- },
2323
- minSize: {
2324
- type: Number,
2325
- required: !0
2326
- }
2327
- }), Oe = 4, _a = {
2328
- vertical: {
2329
- offset: "offsetHeight",
2330
- scroll: "scrollTop",
2331
- scrollSize: "scrollHeight",
2332
- size: "height",
2333
- key: "vertical",
2334
- axis: "Y",
2335
- client: "clientY",
2336
- direction: "top"
2337
- },
2338
- horizontal: {
2339
- offset: "offsetWidth",
2340
- scroll: "scrollLeft",
2341
- scrollSize: "scrollWidth",
2342
- size: "width",
2343
- key: "horizontal",
2344
- axis: "X",
2345
- client: "clientX",
2346
- direction: "left"
2347
- }
2348
- }, Ya = ({
2349
- move: e,
2350
- size: t,
2351
- bar: n
2352
- }) => ({
2353
- [n.size]: t,
2354
- transform: `translate${n.axis}(${e}%)`
2355
- }), Za = V({
2356
- vertical: Boolean,
2357
- size: String,
2358
- move: Number,
2359
- ratio: {
2360
- type: Number,
2361
- required: !0
2362
- },
2363
- always: Boolean
2364
- }), Ht = /* @__PURE__ */ Symbol(
2365
- "scrollbarContextKey"
2366
- ), Ja = "Thumb";
2367
- var xn = /* @__PURE__ */ _({
2368
- __name: "thumb",
2369
- props: Za,
2370
- setup(e) {
2371
- const t = e, n = U(Ht), o = fe("scrollbar");
2372
- n || Oo(Ja, "can not inject scrollbar context");
2373
- const r = I(), a = I(), c = I({}), i = I(!1);
2374
- let s = !1, l = !1, d = 0, v = 0, m = ie ? document.onselectstart : null;
2375
- const f = R(() => _a[t.vertical ? "vertical" : "horizontal"]), u = R(
2376
- () => Ya({
2377
- size: t.size,
2378
- move: t.move,
2379
- bar: f.value
2380
- })
2381
- ), p = R(
2382
- () => (
2383
- // offsetRatioX = original width of thumb / current width of thumb / ratioX
2384
- // offsetRatioY = original height of thumb / current height of thumb / ratioY
2385
- // instance height = wrap height - GAP
2386
- r.value[f.value.offset] ** 2 / n.wrapElement[f.value.scrollSize] / t.ratio / a.value[f.value.offset]
2387
- )
2388
- ), b = (T) => {
2389
- var A;
2390
- if (T.stopPropagation(), T.ctrlKey || [1, 2].includes(T.button)) return;
2391
- (A = window.getSelection()) == null || A.removeAllRanges(), E(T);
2392
- const P = T.currentTarget;
2393
- P && (c.value[f.value.axis] = P[f.value.offset] - (T[f.value.client] - P.getBoundingClientRect()[f.value.direction]));
2394
- }, y = (T) => {
2395
- if (!a.value || !r.value || !n.wrapElement) return;
2396
- const A = Math.abs(
2397
- T.target.getBoundingClientRect()[f.value.direction] - T[f.value.client]
2398
- ), P = a.value[f.value.offset] / 2, L = (A - P) * 100 * p.value / r.value[f.value.offset];
2399
- n.wrapElement[f.value.scroll] = L * n.wrapElement[f.value.scrollSize] / 100;
2400
- }, E = (T) => {
2401
- T.stopImmediatePropagation(), s = !0, d = n.wrapElement.scrollHeight, v = n.wrapElement.scrollWidth, document.addEventListener("mousemove", S), document.addEventListener("mouseup", h), m = document.onselectstart, document.onselectstart = () => !1;
2402
- }, S = (T) => {
2403
- if (!r.value || !a.value || s === !1) return;
2404
- const A = c.value[f.value.axis];
2405
- if (!A) return;
2406
- const P = (r.value.getBoundingClientRect()[f.value.direction] - T[f.value.client]) * -1, L = a.value[f.value.offset] - A, w = (P - L) * 100 * p.value / r.value[f.value.offset];
2407
- f.value.scroll === "scrollLeft" ? n.wrapElement[f.value.scroll] = w * v / 100 : n.wrapElement[f.value.scroll] = w * d / 100;
2408
- }, h = () => {
2409
- s = !1, c.value[f.value.axis] = 0, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", h), x(), l && (i.value = !1);
2410
- }, O = () => {
2411
- l = !1, i.value = !!t.size;
2412
- }, F = () => {
2413
- l = !0, i.value = s;
2414
- };
2415
- G(() => {
2416
- x(), document.removeEventListener("mouseup", h);
2417
- });
2418
- const x = () => {
2419
- document.onselectstart !== m && (document.onselectstart = m);
2420
- };
2421
- return mt(
2422
- me(n, "scrollbarElement"),
2423
- "mousemove",
2424
- O
2425
- ), mt(
2426
- me(n, "scrollbarElement"),
2427
- "mouseleave",
2428
- F
2429
- ), (T, A) => (W(), ne(Cn, {
2430
- name: g(o).b("fade"),
2431
- persisted: ""
2432
- }, {
2433
- default: Q(() => [
2434
- bt(pt(
2435
- "div",
2436
- {
2437
- ref_key: "instance",
2438
- ref: r,
2439
- class: he([g(o).e("bar"), g(o).is(f.value.key)]),
2440
- onMousedown: y,
2441
- onClick: A[0] || (A[0] = ho(() => {
2442
- }, ["stop"]))
2443
- },
2444
- [
2445
- pt(
2446
- "div",
2447
- {
2448
- ref_key: "thumb",
2449
- ref: a,
2450
- class: he(g(o).e("thumb")),
2451
- style: nt(u.value),
2452
- onMousedown: b
2453
- },
2454
- null,
2455
- 38
2456
- /* CLASS, STYLE, NEED_HYDRATION */
2457
- )
2458
- ],
2459
- 34
2460
- /* CLASS, NEED_HYDRATION */
2461
- ), [
2462
- [Sn, e.always || i.value]
2463
- ])
2464
- ]),
2465
- _: 1
2466
- /* STABLE */
2467
- }, 8, ["name"]));
2468
- }
2469
- }), Ga = /* @__PURE__ */ _({
2470
- __name: "bar",
2471
- props: qa,
2472
- setup(e, { expose: t }) {
2473
- const n = e, o = U(Ht), r = I(0), a = I(0), c = I(""), i = I(""), s = I(1), l = I(1);
2474
- return t({
2475
- handleScroll: (m) => {
2476
- if (m) {
2477
- const f = m.offsetHeight - Oe, u = m.offsetWidth - Oe;
2478
- a.value = m.scrollTop * 100 / f * s.value, r.value = m.scrollLeft * 100 / u * l.value;
2479
- }
2480
- },
2481
- update: () => {
2482
- const m = o == null ? void 0 : o.wrapElement;
2483
- if (!m) return;
2484
- const f = m.offsetHeight - Oe, u = m.offsetWidth - Oe, p = f ** 2 / m.scrollHeight, b = u ** 2 / m.scrollWidth, y = Math.max(p, n.minSize), E = Math.max(b, n.minSize);
2485
- s.value = p / (f - p) / (y / (f - y)), l.value = b / (u - b) / (E / (u - E)), i.value = y + Oe < f ? `${y}px` : "", c.value = E + Oe < u ? `${E}px` : "";
2486
- }
2487
- }), (m, f) => (W(), Re(
2488
- On,
2489
- null,
2490
- [
2491
- Ee(xn, {
2492
- move: r.value,
2493
- ratio: l.value,
2494
- size: c.value,
2495
- always: e.always
2496
- }, null, 8, ["move", "ratio", "size", "always"]),
2497
- Ee(xn, {
2498
- move: a.value,
2499
- ratio: s.value,
2500
- size: i.value,
2501
- vertical: "",
2502
- always: e.always
2503
- }, null, 8, ["move", "ratio", "size", "always"])
2504
- ],
2505
- 64
2506
- /* STABLE_FRAGMENT */
2507
- ));
2508
- }
2509
- });
2510
- const Qa = ["tabindex"], dt = "ElScrollbar";
2511
- var Xa = /* @__PURE__ */ _({
2512
- name: dt,
2513
- __name: "scrollbar",
2514
- props: Va,
2515
- emits: Ua,
2516
- setup(e, { expose: t, emit: n }) {
2517
- const o = e, r = n, a = fe("scrollbar");
2518
- let c, i, s, l = 0, d = 0, v = "";
2519
- const m = {
2520
- bottom: !1,
2521
- top: !1,
2522
- right: !1,
2523
- left: !1
2524
- }, f = I(), u = I(), p = I(), b = I(), y = R(() => {
2525
- const w = {}, C = Xt(o.height), N = Xt(o.maxHeight);
2526
- return C && (w.height = C), N && (w.maxHeight = N), [o.wrapStyle, w];
2527
- }), E = R(() => [
2528
- o.wrapClass,
2529
- a.e("wrap"),
2530
- { [a.em("wrap", "hidden-default")]: !o.native }
2531
- ]), S = R(() => [a.e("view"), o.viewClass]), h = (w) => {
2532
- var C;
2533
- return (C = m[w]) != null ? C : !1;
2534
- }, O = {
2535
- top: "bottom",
2536
- bottom: "top",
2537
- left: "right",
2538
- right: "left"
2539
- }, F = (w) => {
2540
- const C = O[v];
2541
- if (!C) return;
2542
- const N = w[v], M = w[C];
2543
- N && !m[v] && (m[v] = !0), !M && m[C] && (m[C] = !1);
2544
- }, x = () => {
2545
- var w;
2546
- if (u.value) {
2547
- (w = b.value) == null || w.handleScroll(u.value);
2548
- const C = l, N = d;
2549
- l = u.value.scrollTop, d = u.value.scrollLeft;
2550
- const M = {
2551
- bottom: l + u.value.clientHeight >= u.value.scrollHeight - o.distance,
2552
- top: l <= o.distance && C !== 0,
2553
- right: d + u.value.clientWidth >= u.value.scrollWidth - o.distance && N !== d,
2554
- left: d <= o.distance && N !== 0
2555
- };
2556
- if (r("scroll", {
2557
- scrollTop: l,
2558
- scrollLeft: d
2559
- }), C !== l && (v = l > C ? "bottom" : "top"), N !== d && (v = d > N ? "right" : "left"), o.distance > 0) {
2560
- if (h(v))
2561
- return;
2562
- F(M);
2563
- }
2564
- M[v] && r("end-reached", v);
2565
- }
2566
- };
2567
- function T(w, C) {
2568
- An(w) ? u.value.scrollTo(w) : se(w) && se(C) && u.value.scrollTo(w, C);
2569
- }
2570
- const A = (w) => {
2571
- if (!se(w)) {
2572
- Pe(dt, "value must be a number");
2573
- return;
2574
- }
2575
- u.value.scrollTop = w;
2576
- }, P = (w) => {
2577
- if (!se(w)) {
2578
- Pe(dt, "value must be a number");
2579
- return;
2580
- }
2581
- u.value.scrollLeft = w;
2582
- }, L = () => {
2583
- var w;
2584
- (w = b.value) == null || w.update(), m[v] = !1;
2585
- };
2586
- return H(
2587
- () => o.noresize,
2588
- (w) => {
2589
- w ? (c == null || c(), i == null || i(), s == null || s()) : ({ stop: c } = Gt(p, L), { stop: i } = Gt(u, L), s = mt("resize", L));
2590
- },
2591
- { immediate: !0 }
2592
- ), H(
2593
- () => [o.maxHeight, o.height],
2594
- () => {
2595
- o.native || We(() => {
2596
- var w;
2597
- L(), u.value && ((w = b.value) == null || w.handleScroll(u.value));
2598
- });
2599
- }
2600
- ), be(
2601
- Ht,
2602
- yo({
2603
- scrollbarElement: f,
2604
- wrapElement: u
2605
- })
2606
- ), bo(() => {
2607
- u.value && (u.value.scrollTop = l, u.value.scrollLeft = d);
2608
- }), ce(() => {
2609
- o.native || We(() => {
2610
- L();
2611
- });
2612
- }), Eo(() => L()), t({
2613
- /** @description scrollbar wrap ref */
2614
- wrapRef: u,
2615
- /** @description update scrollbar state manually */
2616
- update: L,
2617
- /** @description scrolls to a particular set of coordinates */
2618
- scrollTo: T,
2619
- /** @description set distance to scroll top */
2620
- setScrollTop: A,
2621
- /** @description set distance to scroll left */
2622
- setScrollLeft: P,
2623
- /** @description handle scroll event */
2624
- handleScroll: x
2625
- }), (w, C) => (W(), Re(
2626
- "div",
2627
- {
2628
- ref_key: "scrollbarRef",
2629
- ref: f,
2630
- class: he(g(a).b())
2631
- },
2632
- [
2633
- pt("div", {
2634
- ref_key: "wrapRef",
2635
- ref: u,
2636
- class: he(E.value),
2637
- style: nt(y.value),
2638
- tabindex: e.tabindex,
2639
- onScroll: x
2640
- }, [
2641
- (W(), ne(wo(e.tag), {
2642
- id: e.id,
2643
- ref_key: "resizeRef",
2644
- ref: p,
2645
- class: he(S.value),
2646
- style: nt(e.viewStyle),
2647
- role: e.role,
2648
- "aria-label": e.ariaLabel,
2649
- "aria-orientation": e.ariaOrientation
2650
- }, {
2651
- default: Q(() => [
2652
- X(w.$slots, "default")
2653
- ]),
2654
- _: 3
2655
- /* FORWARDED */
2656
- }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
2657
- ], 46, Qa),
2658
- e.native ? ze("v-if", !0) : (W(), ne(Ga, {
2659
- key: 0,
2660
- ref_key: "barRef",
2661
- ref: b,
2662
- always: e.always,
2663
- "min-size": e.minSize
2664
- }, null, 8, ["always", "min-size"]))
2665
- ],
2666
- 2
2667
- /* CLASS */
2668
- ));
2669
- }
2670
- });
2671
- const vs = rt(Xa);
2672
- export {
2673
- St as E,
2674
- Oa as _,
2675
- Yn as a,
2676
- fs as b,
2677
- ps as c,
2678
- vs as d,
2679
- Xr as e,
2680
- ds as f,
2681
- Ua as s,
2682
- cs as u
2683
- };