@ogcio/design-system-react 1.15.2 → 1.15.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/autocomplete/autocomplete.js +55 -53
- package/dist/popover/popover.js +560 -524
- package/dist/select/select-menu.js +61 -63
- package/dist/select/select-next.js +74 -72
- package/dist/select/types.d.ts +0 -3
- package/dist/styles.css +1 -1
- package/dist/toast/toast.js +6 -9
- package/package.json +2 -2
package/dist/popover/popover.js
CHANGED
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (t == null)
|
|
2
|
+
import { jsx as dt } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as Ee, useEffect as Ae } from "react";
|
|
4
|
+
import { cn as mt } from "../cn.js";
|
|
5
|
+
import { createDynamicHeightModifier as Xe } from "./utilities.js";
|
|
6
|
+
var $ = "top", T = "bottom", S = "right", k = "left", Be = "auto", fe = [$, T, S, k], Q = "start", ie = "end", ht = "clippingParents", _e = "viewport", ne = "popper", yt = "reference", ze = /* @__PURE__ */ fe.reduce(function(e, t) {
|
|
7
|
+
return e.concat([t + "-" + Q, t + "-" + ie]);
|
|
8
|
+
}, []), et = /* @__PURE__ */ [].concat(fe, [Be]).reduce(function(e, t) {
|
|
9
|
+
return e.concat([t, t + "-" + Q, t + "-" + ie]);
|
|
10
|
+
}, []), gt = "beforeRead", bt = "read", wt = "afterRead", xt = "beforeMain", Ot = "main", Et = "afterMain", At = "beforeWrite", Pt = "write", Dt = "afterWrite", Bt = [gt, bt, wt, xt, Ot, Et, At, Pt, Dt];
|
|
11
|
+
function V(e) {
|
|
12
|
+
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
13
|
+
}
|
|
14
|
+
function L(e) {
|
|
15
|
+
if (e == null)
|
|
17
16
|
return window;
|
|
18
|
-
if (
|
|
19
|
-
var
|
|
20
|
-
return
|
|
17
|
+
if (e.toString() !== "[object Window]") {
|
|
18
|
+
var t = e.ownerDocument;
|
|
19
|
+
return t && t.defaultView || window;
|
|
21
20
|
}
|
|
22
|
-
return
|
|
21
|
+
return e;
|
|
23
22
|
}
|
|
24
|
-
function K(
|
|
25
|
-
var
|
|
26
|
-
return
|
|
23
|
+
function K(e) {
|
|
24
|
+
var t = L(e).Element;
|
|
25
|
+
return e instanceof t || e instanceof Element;
|
|
27
26
|
}
|
|
28
|
-
function
|
|
29
|
-
var
|
|
30
|
-
return
|
|
27
|
+
function R(e) {
|
|
28
|
+
var t = L(e).HTMLElement;
|
|
29
|
+
return e instanceof t || e instanceof HTMLElement;
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function je(e) {
|
|
33
32
|
if (typeof ShadowRoot > "u")
|
|
34
33
|
return !1;
|
|
35
|
-
var
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
function
|
|
39
|
-
var
|
|
40
|
-
Object.keys(
|
|
41
|
-
var n =
|
|
42
|
-
!
|
|
34
|
+
var t = L(e).ShadowRoot;
|
|
35
|
+
return e instanceof t || e instanceof ShadowRoot;
|
|
36
|
+
}
|
|
37
|
+
function jt(e) {
|
|
38
|
+
var t = e.state;
|
|
39
|
+
Object.keys(t.elements).forEach(function(r) {
|
|
40
|
+
var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
|
|
41
|
+
!R(o) || !V(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(c) {
|
|
43
42
|
var s = a[c];
|
|
44
|
-
s === !1 ?
|
|
43
|
+
s === !1 ? o.removeAttribute(c) : o.setAttribute(c, s === !0 ? "" : s);
|
|
45
44
|
}));
|
|
46
45
|
});
|
|
47
46
|
}
|
|
48
|
-
function
|
|
49
|
-
var
|
|
47
|
+
function $t(e) {
|
|
48
|
+
var t = e.state, r = {
|
|
50
49
|
popper: {
|
|
51
|
-
position:
|
|
50
|
+
position: t.options.strategy,
|
|
52
51
|
left: "0",
|
|
53
52
|
top: "0",
|
|
54
53
|
margin: "0"
|
|
@@ -58,137 +57,137 @@ function Ce(t) {
|
|
|
58
57
|
},
|
|
59
58
|
reference: {}
|
|
60
59
|
};
|
|
61
|
-
return Object.assign(
|
|
62
|
-
Object.keys(
|
|
63
|
-
var a =
|
|
64
|
-
return
|
|
60
|
+
return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
|
|
61
|
+
Object.keys(t.elements).forEach(function(n) {
|
|
62
|
+
var a = t.elements[n], o = t.attributes[n] || {}, c = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), s = c.reduce(function(i, u) {
|
|
63
|
+
return i[u] = "", i;
|
|
65
64
|
}, {});
|
|
66
|
-
!
|
|
67
|
-
a.removeAttribute(
|
|
65
|
+
!R(a) || !V(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(i) {
|
|
66
|
+
a.removeAttribute(i);
|
|
68
67
|
}));
|
|
69
68
|
});
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
|
-
const
|
|
71
|
+
const kt = {
|
|
73
72
|
name: "applyStyles",
|
|
74
73
|
enabled: !0,
|
|
75
74
|
phase: "write",
|
|
76
|
-
fn:
|
|
77
|
-
effect:
|
|
75
|
+
fn: jt,
|
|
76
|
+
effect: $t,
|
|
78
77
|
requires: ["computeStyles"]
|
|
79
78
|
};
|
|
80
|
-
function H(
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
var G = Math.max,
|
|
84
|
-
function
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
return
|
|
79
|
+
function H(e) {
|
|
80
|
+
return e.split("-")[0];
|
|
81
|
+
}
|
|
82
|
+
var G = Math.max, ye = Math.min, Z = Math.round;
|
|
83
|
+
function Pe() {
|
|
84
|
+
var e = navigator.userAgentData;
|
|
85
|
+
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
86
|
+
return t.brand + "/" + t.version;
|
|
88
87
|
}).join(" ") : navigator.userAgent;
|
|
89
88
|
}
|
|
90
|
-
function
|
|
91
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
89
|
+
function tt() {
|
|
90
|
+
return !/^((?!chrome|android).)*safari/i.test(Pe());
|
|
92
91
|
}
|
|
93
|
-
function _(
|
|
94
|
-
|
|
95
|
-
var n =
|
|
96
|
-
|
|
97
|
-
var c = K(
|
|
92
|
+
function _(e, t, r) {
|
|
93
|
+
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
94
|
+
var n = e.getBoundingClientRect(), a = 1, o = 1;
|
|
95
|
+
t && R(e) && (a = e.offsetWidth > 0 && Z(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Z(n.height) / e.offsetHeight || 1);
|
|
96
|
+
var c = K(e) ? L(e) : window, s = c.visualViewport, i = !tt() && r, u = (n.left + (i && s ? s.offsetLeft : 0)) / a, f = (n.top + (i && s ? s.offsetTop : 0)) / o, d = n.width / a, h = n.height / o;
|
|
98
97
|
return {
|
|
99
|
-
width:
|
|
100
|
-
height:
|
|
98
|
+
width: d,
|
|
99
|
+
height: h,
|
|
101
100
|
top: f,
|
|
102
|
-
right:
|
|
103
|
-
bottom: f +
|
|
104
|
-
left:
|
|
105
|
-
x:
|
|
101
|
+
right: u + d,
|
|
102
|
+
bottom: f + h,
|
|
103
|
+
left: u,
|
|
104
|
+
x: u,
|
|
106
105
|
y: f
|
|
107
106
|
};
|
|
108
107
|
}
|
|
109
|
-
function
|
|
110
|
-
var
|
|
111
|
-
return Math.abs(
|
|
112
|
-
x:
|
|
113
|
-
y:
|
|
108
|
+
function $e(e) {
|
|
109
|
+
var t = _(e), r = e.offsetWidth, n = e.offsetHeight;
|
|
110
|
+
return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
|
|
111
|
+
x: e.offsetLeft,
|
|
112
|
+
y: e.offsetTop,
|
|
114
113
|
width: r,
|
|
115
114
|
height: n
|
|
116
115
|
};
|
|
117
116
|
}
|
|
118
|
-
function
|
|
119
|
-
var r =
|
|
120
|
-
if (
|
|
117
|
+
function rt(e, t) {
|
|
118
|
+
var r = t.getRootNode && t.getRootNode();
|
|
119
|
+
if (e.contains(t))
|
|
121
120
|
return !0;
|
|
122
|
-
if (r &&
|
|
123
|
-
var n =
|
|
121
|
+
if (r && je(r)) {
|
|
122
|
+
var n = t;
|
|
124
123
|
do {
|
|
125
|
-
if (n &&
|
|
124
|
+
if (n && e.isSameNode(n))
|
|
126
125
|
return !0;
|
|
127
126
|
n = n.parentNode || n.host;
|
|
128
127
|
} while (n);
|
|
129
128
|
}
|
|
130
129
|
return !1;
|
|
131
130
|
}
|
|
132
|
-
function N(
|
|
133
|
-
return
|
|
131
|
+
function N(e) {
|
|
132
|
+
return L(e).getComputedStyle(e);
|
|
134
133
|
}
|
|
135
|
-
function
|
|
136
|
-
return ["table", "td", "th"].indexOf(V(
|
|
134
|
+
function Ct(e) {
|
|
135
|
+
return ["table", "td", "th"].indexOf(V(e)) >= 0;
|
|
137
136
|
}
|
|
138
|
-
function q(
|
|
139
|
-
return ((K(
|
|
137
|
+
function q(e) {
|
|
138
|
+
return ((K(e) ? e.ownerDocument : (
|
|
140
139
|
// $FlowFixMe[prop-missing]
|
|
141
|
-
|
|
140
|
+
e.document
|
|
142
141
|
)) || window.document).documentElement;
|
|
143
142
|
}
|
|
144
|
-
function
|
|
145
|
-
return V(
|
|
143
|
+
function ge(e) {
|
|
144
|
+
return V(e) === "html" ? e : (
|
|
146
145
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
147
146
|
// $FlowFixMe[incompatible-return]
|
|
148
147
|
// $FlowFixMe[prop-missing]
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
(
|
|
148
|
+
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
149
|
+
e.parentNode || // DOM Element detected
|
|
150
|
+
(je(e) ? e.host : null) || // ShadowRoot detected
|
|
152
151
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
153
|
-
q(
|
|
152
|
+
q(e)
|
|
154
153
|
);
|
|
155
154
|
}
|
|
156
|
-
function
|
|
157
|
-
return !
|
|
158
|
-
N(
|
|
155
|
+
function Ie(e) {
|
|
156
|
+
return !R(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
157
|
+
N(e).position === "fixed" ? null : e.offsetParent;
|
|
159
158
|
}
|
|
160
|
-
function
|
|
161
|
-
var
|
|
162
|
-
if (r &&
|
|
163
|
-
var n = N(
|
|
159
|
+
function Lt(e) {
|
|
160
|
+
var t = /firefox/i.test(Pe()), r = /Trident/i.test(Pe());
|
|
161
|
+
if (r && R(e)) {
|
|
162
|
+
var n = N(e);
|
|
164
163
|
if (n.position === "fixed")
|
|
165
164
|
return null;
|
|
166
165
|
}
|
|
167
|
-
var a =
|
|
168
|
-
for (
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
166
|
+
var a = ge(e);
|
|
167
|
+
for (je(a) && (a = a.host); R(a) && ["html", "body"].indexOf(V(a)) < 0; ) {
|
|
168
|
+
var o = N(a);
|
|
169
|
+
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
|
|
171
170
|
return a;
|
|
172
171
|
a = a.parentNode;
|
|
173
172
|
}
|
|
174
173
|
return null;
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
for (var
|
|
178
|
-
r =
|
|
179
|
-
return r && (V(r) === "html" || V(r) === "body" && N(r).position === "static") ?
|
|
175
|
+
function ce(e) {
|
|
176
|
+
for (var t = L(e), r = Ie(e); r && Ct(r) && N(r).position === "static"; )
|
|
177
|
+
r = Ie(r);
|
|
178
|
+
return r && (V(r) === "html" || V(r) === "body" && N(r).position === "static") ? t : r || Lt(e) || t;
|
|
180
179
|
}
|
|
181
|
-
function
|
|
182
|
-
return ["top", "bottom"].indexOf(
|
|
180
|
+
function ke(e) {
|
|
181
|
+
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
183
182
|
}
|
|
184
|
-
function
|
|
185
|
-
return G(
|
|
183
|
+
function ae(e, t, r) {
|
|
184
|
+
return G(e, ye(t, r));
|
|
186
185
|
}
|
|
187
|
-
function
|
|
188
|
-
var n =
|
|
186
|
+
function Rt(e, t, r) {
|
|
187
|
+
var n = ae(e, t, r);
|
|
189
188
|
return n > r ? r : n;
|
|
190
189
|
}
|
|
191
|
-
function
|
|
190
|
+
function nt() {
|
|
192
191
|
return {
|
|
193
192
|
top: 0,
|
|
194
193
|
right: 0,
|
|
@@ -196,444 +195,444 @@ function re() {
|
|
|
196
195
|
left: 0
|
|
197
196
|
};
|
|
198
197
|
}
|
|
199
|
-
function
|
|
200
|
-
return Object.assign({},
|
|
198
|
+
function at(e) {
|
|
199
|
+
return Object.assign({}, nt(), e);
|
|
201
200
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
204
|
-
return r[n] =
|
|
201
|
+
function ot(e, t) {
|
|
202
|
+
return t.reduce(function(r, n) {
|
|
203
|
+
return r[n] = e, r;
|
|
205
204
|
}, {});
|
|
206
205
|
}
|
|
207
|
-
var
|
|
208
|
-
return
|
|
206
|
+
var Tt = function(t, r) {
|
|
207
|
+
return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
|
|
209
208
|
placement: r.placement
|
|
210
|
-
})) :
|
|
209
|
+
})) : t, at(typeof t != "number" ? t : ot(t, fe));
|
|
211
210
|
};
|
|
212
|
-
function
|
|
213
|
-
var
|
|
214
|
-
if (!(!
|
|
215
|
-
var
|
|
216
|
-
r.modifiersData[n] = (
|
|
211
|
+
function St(e) {
|
|
212
|
+
var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, c = r.modifiersData.popperOffsets, s = H(r.placement), i = ke(s), u = [k, S].indexOf(s) >= 0, f = u ? "height" : "width";
|
|
213
|
+
if (!(!o || !c)) {
|
|
214
|
+
var d = Tt(a.padding, r), h = $e(o), p = i === "y" ? $ : k, y = i === "y" ? T : S, m = r.rects.reference[f] + r.rects.reference[i] - c[i] - r.rects.popper[f], l = c[i] - r.rects.reference[i], w = ce(o), x = w ? i === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, O = m / 2 - l / 2, v = d[p], g = x - h[f] - d[y], b = x / 2 - h[f] / 2 + O, E = ae(v, b, g), D = i;
|
|
215
|
+
r.modifiersData[n] = (t = {}, t[D] = E, t.centerOffset = E - b, t);
|
|
217
216
|
}
|
|
218
217
|
}
|
|
219
|
-
function
|
|
220
|
-
var
|
|
221
|
-
a != null && (typeof a == "string" && (a =
|
|
218
|
+
function Mt(e) {
|
|
219
|
+
var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
|
|
220
|
+
a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || rt(t.elements.popper, a) && (t.elements.arrow = a));
|
|
222
221
|
}
|
|
223
|
-
const
|
|
222
|
+
const Wt = {
|
|
224
223
|
name: "arrow",
|
|
225
224
|
enabled: !0,
|
|
226
225
|
phase: "main",
|
|
227
|
-
fn:
|
|
228
|
-
effect:
|
|
226
|
+
fn: St,
|
|
227
|
+
effect: Mt,
|
|
229
228
|
requires: ["popperOffsets"],
|
|
230
229
|
requiresIfExists: ["preventOverflow"]
|
|
231
230
|
};
|
|
232
|
-
function
|
|
233
|
-
return
|
|
231
|
+
function ee(e) {
|
|
232
|
+
return e.split("-")[1];
|
|
234
233
|
}
|
|
235
|
-
var
|
|
234
|
+
var Ht = {
|
|
236
235
|
top: "auto",
|
|
237
236
|
right: "auto",
|
|
238
237
|
bottom: "auto",
|
|
239
238
|
left: "auto"
|
|
240
239
|
};
|
|
241
|
-
function
|
|
242
|
-
var r =
|
|
240
|
+
function Vt(e, t) {
|
|
241
|
+
var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
|
|
243
242
|
return {
|
|
244
243
|
x: Z(r * a) / a || 0,
|
|
245
244
|
y: Z(n * a) / a || 0
|
|
246
245
|
};
|
|
247
246
|
}
|
|
248
|
-
function
|
|
249
|
-
var
|
|
250
|
-
x:
|
|
251
|
-
y:
|
|
247
|
+
function Ye(e) {
|
|
248
|
+
var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, u = e.adaptive, f = e.roundOffsets, d = e.isFixed, h = c.x, p = h === void 0 ? 0 : h, y = c.y, m = y === void 0 ? 0 : y, l = typeof f == "function" ? f({
|
|
249
|
+
x: p,
|
|
250
|
+
y: m
|
|
252
251
|
}) : {
|
|
253
|
-
x:
|
|
254
|
-
y:
|
|
252
|
+
x: p,
|
|
253
|
+
y: m
|
|
255
254
|
};
|
|
256
|
-
|
|
257
|
-
var
|
|
258
|
-
if (
|
|
259
|
-
var
|
|
260
|
-
if (
|
|
255
|
+
p = l.x, m = l.y;
|
|
256
|
+
var w = c.hasOwnProperty("x"), x = c.hasOwnProperty("y"), O = k, v = $, g = window;
|
|
257
|
+
if (u) {
|
|
258
|
+
var b = ce(r), E = "clientHeight", D = "clientWidth";
|
|
259
|
+
if (b === L(r) && (b = q(r), N(b).position !== "static" && s === "absolute" && (E = "scrollHeight", D = "scrollWidth")), b = b, a === $ || (a === k || a === S) && o === ie) {
|
|
261
260
|
v = T;
|
|
262
|
-
var P =
|
|
261
|
+
var P = d && b === g && g.visualViewport ? g.visualViewport.height : (
|
|
263
262
|
// $FlowFixMe[prop-missing]
|
|
264
|
-
|
|
263
|
+
b[E]
|
|
265
264
|
);
|
|
266
|
-
|
|
265
|
+
m -= P - n.height, m *= i ? 1 : -1;
|
|
267
266
|
}
|
|
268
|
-
if (a ===
|
|
269
|
-
|
|
270
|
-
var A =
|
|
267
|
+
if (a === k || (a === $ || a === T) && o === ie) {
|
|
268
|
+
O = S;
|
|
269
|
+
var A = d && b === g && g.visualViewport ? g.visualViewport.width : (
|
|
271
270
|
// $FlowFixMe[prop-missing]
|
|
272
|
-
|
|
271
|
+
b[D]
|
|
273
272
|
);
|
|
274
|
-
|
|
273
|
+
p -= A - n.width, p *= i ? 1 : -1;
|
|
275
274
|
}
|
|
276
275
|
}
|
|
277
|
-
var
|
|
276
|
+
var B = Object.assign({
|
|
278
277
|
position: s
|
|
279
|
-
},
|
|
280
|
-
x:
|
|
281
|
-
y:
|
|
282
|
-
},
|
|
283
|
-
x:
|
|
284
|
-
y:
|
|
278
|
+
}, u && Ht), M = f === !0 ? Vt({
|
|
279
|
+
x: p,
|
|
280
|
+
y: m
|
|
281
|
+
}, L(r)) : {
|
|
282
|
+
x: p,
|
|
283
|
+
y: m
|
|
285
284
|
};
|
|
286
|
-
if (
|
|
287
|
-
var
|
|
288
|
-
return Object.assign({},
|
|
285
|
+
if (p = M.x, m = M.y, i) {
|
|
286
|
+
var j;
|
|
287
|
+
return Object.assign({}, B, (j = {}, j[v] = x ? "0" : "", j[O] = w ? "0" : "", j.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + m + "px)" : "translate3d(" + p + "px, " + m + "px, 0)", j));
|
|
289
288
|
}
|
|
290
|
-
return Object.assign({},
|
|
291
|
-
}
|
|
292
|
-
function
|
|
293
|
-
var
|
|
294
|
-
placement: H(
|
|
295
|
-
variation:
|
|
296
|
-
popper:
|
|
297
|
-
popperRect:
|
|
289
|
+
return Object.assign({}, B, (t = {}, t[v] = x ? m + "px" : "", t[O] = w ? p + "px" : "", t.transform = "", t));
|
|
290
|
+
}
|
|
291
|
+
function Nt(e) {
|
|
292
|
+
var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, c = o === void 0 ? !0 : o, s = r.roundOffsets, i = s === void 0 ? !0 : s, u = {
|
|
293
|
+
placement: H(t.placement),
|
|
294
|
+
variation: ee(t.placement),
|
|
295
|
+
popper: t.elements.popper,
|
|
296
|
+
popperRect: t.rects.popper,
|
|
298
297
|
gpuAcceleration: a,
|
|
299
|
-
isFixed:
|
|
298
|
+
isFixed: t.options.strategy === "fixed"
|
|
300
299
|
};
|
|
301
|
-
|
|
302
|
-
offsets:
|
|
303
|
-
position:
|
|
300
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ye(Object.assign({}, u, {
|
|
301
|
+
offsets: t.modifiersData.popperOffsets,
|
|
302
|
+
position: t.options.strategy,
|
|
304
303
|
adaptive: c,
|
|
305
|
-
roundOffsets:
|
|
306
|
-
})))),
|
|
307
|
-
offsets:
|
|
304
|
+
roundOffsets: i
|
|
305
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ye(Object.assign({}, u, {
|
|
306
|
+
offsets: t.modifiersData.arrow,
|
|
308
307
|
position: "absolute",
|
|
309
308
|
adaptive: !1,
|
|
310
|
-
roundOffsets:
|
|
311
|
-
})))),
|
|
312
|
-
"data-popper-placement":
|
|
309
|
+
roundOffsets: i
|
|
310
|
+
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
311
|
+
"data-popper-placement": t.placement
|
|
313
312
|
});
|
|
314
313
|
}
|
|
315
|
-
const
|
|
314
|
+
const Ft = {
|
|
316
315
|
name: "computeStyles",
|
|
317
316
|
enabled: !0,
|
|
318
317
|
phase: "beforeWrite",
|
|
319
|
-
fn:
|
|
318
|
+
fn: Nt,
|
|
320
319
|
data: {}
|
|
321
320
|
};
|
|
322
|
-
var
|
|
321
|
+
var me = {
|
|
323
322
|
passive: !0
|
|
324
323
|
};
|
|
325
|
-
function
|
|
326
|
-
var
|
|
327
|
-
return
|
|
328
|
-
f.addEventListener("scroll", r.update,
|
|
329
|
-
}), s &&
|
|
330
|
-
|
|
331
|
-
f.removeEventListener("scroll", r.update,
|
|
332
|
-
}), s &&
|
|
324
|
+
function qt(e) {
|
|
325
|
+
var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, c = n.resize, s = c === void 0 ? !0 : c, i = L(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
326
|
+
return o && u.forEach(function(f) {
|
|
327
|
+
f.addEventListener("scroll", r.update, me);
|
|
328
|
+
}), s && i.addEventListener("resize", r.update, me), function() {
|
|
329
|
+
o && u.forEach(function(f) {
|
|
330
|
+
f.removeEventListener("scroll", r.update, me);
|
|
331
|
+
}), s && i.removeEventListener("resize", r.update, me);
|
|
333
332
|
};
|
|
334
333
|
}
|
|
335
|
-
const
|
|
334
|
+
const Xt = {
|
|
336
335
|
name: "eventListeners",
|
|
337
336
|
enabled: !0,
|
|
338
337
|
phase: "write",
|
|
339
338
|
fn: function() {
|
|
340
339
|
},
|
|
341
|
-
effect:
|
|
340
|
+
effect: qt,
|
|
342
341
|
data: {}
|
|
343
342
|
};
|
|
344
|
-
var
|
|
343
|
+
var zt = {
|
|
345
344
|
left: "right",
|
|
346
345
|
right: "left",
|
|
347
346
|
bottom: "top",
|
|
348
347
|
top: "bottom"
|
|
349
348
|
};
|
|
350
|
-
function
|
|
351
|
-
return
|
|
352
|
-
return
|
|
349
|
+
function he(e) {
|
|
350
|
+
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
351
|
+
return zt[t];
|
|
353
352
|
});
|
|
354
353
|
}
|
|
355
|
-
var
|
|
354
|
+
var It = {
|
|
356
355
|
start: "end",
|
|
357
356
|
end: "start"
|
|
358
357
|
};
|
|
359
|
-
function
|
|
360
|
-
return
|
|
361
|
-
return
|
|
358
|
+
function Ue(e) {
|
|
359
|
+
return e.replace(/start|end/g, function(t) {
|
|
360
|
+
return It[t];
|
|
362
361
|
});
|
|
363
362
|
}
|
|
364
|
-
function
|
|
365
|
-
var
|
|
363
|
+
function Ce(e) {
|
|
364
|
+
var t = L(e), r = t.pageXOffset, n = t.pageYOffset;
|
|
366
365
|
return {
|
|
367
366
|
scrollLeft: r,
|
|
368
367
|
scrollTop: n
|
|
369
368
|
};
|
|
370
369
|
}
|
|
371
|
-
function
|
|
372
|
-
return _(q(
|
|
370
|
+
function Le(e) {
|
|
371
|
+
return _(q(e)).left + Ce(e).scrollLeft;
|
|
373
372
|
}
|
|
374
|
-
function
|
|
375
|
-
var r =
|
|
373
|
+
function Yt(e, t) {
|
|
374
|
+
var r = L(e), n = q(e), a = r.visualViewport, o = n.clientWidth, c = n.clientHeight, s = 0, i = 0;
|
|
376
375
|
if (a) {
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
(
|
|
376
|
+
o = a.width, c = a.height;
|
|
377
|
+
var u = tt();
|
|
378
|
+
(u || !u && t === "fixed") && (s = a.offsetLeft, i = a.offsetTop);
|
|
380
379
|
}
|
|
381
380
|
return {
|
|
382
|
-
width:
|
|
381
|
+
width: o,
|
|
383
382
|
height: c,
|
|
384
|
-
x: s +
|
|
385
|
-
y:
|
|
383
|
+
x: s + Le(e),
|
|
384
|
+
y: i
|
|
386
385
|
};
|
|
387
386
|
}
|
|
388
|
-
function
|
|
389
|
-
var
|
|
390
|
-
return N(a || r).direction === "rtl" && (s += G(r.clientWidth, a ? a.clientWidth : 0) -
|
|
391
|
-
width:
|
|
387
|
+
function Ut(e) {
|
|
388
|
+
var t, r = q(e), n = Ce(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = G(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), c = G(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -n.scrollLeft + Le(e), i = -n.scrollTop;
|
|
389
|
+
return N(a || r).direction === "rtl" && (s += G(r.clientWidth, a ? a.clientWidth : 0) - o), {
|
|
390
|
+
width: o,
|
|
392
391
|
height: c,
|
|
393
392
|
x: s,
|
|
394
|
-
y:
|
|
393
|
+
y: i
|
|
395
394
|
};
|
|
396
395
|
}
|
|
397
|
-
function
|
|
398
|
-
var
|
|
396
|
+
function Re(e) {
|
|
397
|
+
var t = N(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
|
|
399
398
|
return /auto|scroll|overlay|hidden/.test(r + a + n);
|
|
400
399
|
}
|
|
401
|
-
function
|
|
402
|
-
return ["html", "body", "#document"].indexOf(V(
|
|
400
|
+
function it(e) {
|
|
401
|
+
return ["html", "body", "#document"].indexOf(V(e)) >= 0 ? e.ownerDocument.body : R(e) && Re(e) ? e : it(ge(e));
|
|
403
402
|
}
|
|
404
|
-
function
|
|
403
|
+
function oe(e, t) {
|
|
405
404
|
var r;
|
|
406
|
-
|
|
407
|
-
var n =
|
|
405
|
+
t === void 0 && (t = []);
|
|
406
|
+
var n = it(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = L(n), c = a ? [o].concat(o.visualViewport || [], Re(n) ? n : []) : n, s = t.concat(c);
|
|
408
407
|
return a ? s : (
|
|
409
408
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
410
|
-
s.concat(
|
|
409
|
+
s.concat(oe(ge(c)))
|
|
411
410
|
);
|
|
412
411
|
}
|
|
413
|
-
function
|
|
414
|
-
return Object.assign({},
|
|
415
|
-
left:
|
|
416
|
-
top:
|
|
417
|
-
right:
|
|
418
|
-
bottom:
|
|
412
|
+
function De(e) {
|
|
413
|
+
return Object.assign({}, e, {
|
|
414
|
+
left: e.x,
|
|
415
|
+
top: e.y,
|
|
416
|
+
right: e.x + e.width,
|
|
417
|
+
bottom: e.y + e.height
|
|
419
418
|
});
|
|
420
419
|
}
|
|
421
|
-
function
|
|
422
|
-
var r = _(
|
|
423
|
-
return r.top = r.top +
|
|
420
|
+
function Gt(e, t) {
|
|
421
|
+
var r = _(e, !1, t === "fixed");
|
|
422
|
+
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
424
423
|
}
|
|
425
|
-
function
|
|
426
|
-
return
|
|
424
|
+
function Ge(e, t, r) {
|
|
425
|
+
return t === _e ? De(Yt(e, r)) : K(t) ? Gt(t, r) : De(Ut(q(e)));
|
|
427
426
|
}
|
|
428
|
-
function
|
|
429
|
-
var
|
|
430
|
-
return K(n) ?
|
|
431
|
-
return K(a) &&
|
|
427
|
+
function Kt(e) {
|
|
428
|
+
var t = oe(ge(e)), r = ["absolute", "fixed"].indexOf(N(e).position) >= 0, n = r && R(e) ? ce(e) : e;
|
|
429
|
+
return K(n) ? t.filter(function(a) {
|
|
430
|
+
return K(a) && rt(a, n) && V(a) !== "body";
|
|
432
431
|
}) : [];
|
|
433
432
|
}
|
|
434
|
-
function
|
|
435
|
-
var a =
|
|
436
|
-
var f =
|
|
437
|
-
return
|
|
438
|
-
},
|
|
433
|
+
function Jt(e, t, r, n) {
|
|
434
|
+
var a = t === "clippingParents" ? Kt(e) : [].concat(t), o = [].concat(a, [r]), c = o[0], s = o.reduce(function(i, u) {
|
|
435
|
+
var f = Ge(e, u, n);
|
|
436
|
+
return i.top = G(f.top, i.top), i.right = ye(f.right, i.right), i.bottom = ye(f.bottom, i.bottom), i.left = G(f.left, i.left), i;
|
|
437
|
+
}, Ge(e, c, n));
|
|
439
438
|
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
440
439
|
}
|
|
441
|
-
function
|
|
442
|
-
var
|
|
440
|
+
function st(e) {
|
|
441
|
+
var t = e.reference, r = e.element, n = e.placement, a = n ? H(n) : null, o = n ? ee(n) : null, c = t.x + t.width / 2 - r.width / 2, s = t.y + t.height / 2 - r.height / 2, i;
|
|
443
442
|
switch (a) {
|
|
444
443
|
case $:
|
|
445
|
-
|
|
444
|
+
i = {
|
|
446
445
|
x: c,
|
|
447
|
-
y:
|
|
446
|
+
y: t.y - r.height
|
|
448
447
|
};
|
|
449
448
|
break;
|
|
450
449
|
case T:
|
|
451
|
-
|
|
450
|
+
i = {
|
|
452
451
|
x: c,
|
|
453
|
-
y:
|
|
452
|
+
y: t.y + t.height
|
|
454
453
|
};
|
|
455
454
|
break;
|
|
456
455
|
case S:
|
|
457
|
-
|
|
458
|
-
x:
|
|
456
|
+
i = {
|
|
457
|
+
x: t.x + t.width,
|
|
459
458
|
y: s
|
|
460
459
|
};
|
|
461
460
|
break;
|
|
462
|
-
case
|
|
463
|
-
|
|
464
|
-
x:
|
|
461
|
+
case k:
|
|
462
|
+
i = {
|
|
463
|
+
x: t.x - r.width,
|
|
465
464
|
y: s
|
|
466
465
|
};
|
|
467
466
|
break;
|
|
468
467
|
default:
|
|
469
|
-
|
|
470
|
-
x:
|
|
471
|
-
y:
|
|
468
|
+
i = {
|
|
469
|
+
x: t.x,
|
|
470
|
+
y: t.y
|
|
472
471
|
};
|
|
473
472
|
}
|
|
474
|
-
var
|
|
475
|
-
if (
|
|
476
|
-
var f =
|
|
477
|
-
switch (
|
|
473
|
+
var u = a ? ke(a) : null;
|
|
474
|
+
if (u != null) {
|
|
475
|
+
var f = u === "y" ? "height" : "width";
|
|
476
|
+
switch (o) {
|
|
478
477
|
case Q:
|
|
479
|
-
|
|
478
|
+
i[u] = i[u] - (t[f] / 2 - r[f] / 2);
|
|
480
479
|
break;
|
|
481
|
-
case
|
|
482
|
-
|
|
480
|
+
case ie:
|
|
481
|
+
i[u] = i[u] + (t[f] / 2 - r[f] / 2);
|
|
483
482
|
break;
|
|
484
483
|
}
|
|
485
484
|
}
|
|
486
|
-
return
|
|
485
|
+
return i;
|
|
487
486
|
}
|
|
488
|
-
function
|
|
489
|
-
|
|
490
|
-
var r =
|
|
491
|
-
reference:
|
|
492
|
-
element:
|
|
487
|
+
function se(e, t) {
|
|
488
|
+
t === void 0 && (t = {});
|
|
489
|
+
var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, c = o === void 0 ? e.strategy : o, s = r.boundary, i = s === void 0 ? ht : s, u = r.rootBoundary, f = u === void 0 ? _e : u, d = r.elementContext, h = d === void 0 ? ne : d, p = r.altBoundary, y = p === void 0 ? !1 : p, m = r.padding, l = m === void 0 ? 0 : m, w = at(typeof l != "number" ? l : ot(l, fe)), x = h === ne ? yt : ne, O = e.rects.popper, v = e.elements[y ? x : h], g = Jt(K(v) ? v : v.contextElement || q(e.elements.popper), i, f, c), b = _(e.elements.reference), E = st({
|
|
490
|
+
reference: b,
|
|
491
|
+
element: O,
|
|
493
492
|
placement: a
|
|
494
|
-
}), D =
|
|
495
|
-
top: g.top - P.top +
|
|
496
|
-
bottom: P.bottom - g.bottom +
|
|
497
|
-
left: g.left - P.left +
|
|
498
|
-
right: P.right - g.right +
|
|
499
|
-
},
|
|
500
|
-
if (
|
|
501
|
-
var M =
|
|
502
|
-
Object.keys(A).forEach(function(
|
|
503
|
-
var X = [S, T].indexOf(
|
|
504
|
-
A[
|
|
493
|
+
}), D = De(Object.assign({}, O, E)), P = h === ne ? D : b, A = {
|
|
494
|
+
top: g.top - P.top + w.top,
|
|
495
|
+
bottom: P.bottom - g.bottom + w.bottom,
|
|
496
|
+
left: g.left - P.left + w.left,
|
|
497
|
+
right: P.right - g.right + w.right
|
|
498
|
+
}, B = e.modifiersData.offset;
|
|
499
|
+
if (h === ne && B) {
|
|
500
|
+
var M = B[a];
|
|
501
|
+
Object.keys(A).forEach(function(j) {
|
|
502
|
+
var X = [S, T].indexOf(j) >= 0 ? 1 : -1, z = [$, T].indexOf(j) >= 0 ? "y" : "x";
|
|
503
|
+
A[j] += M[z] * X;
|
|
505
504
|
});
|
|
506
505
|
}
|
|
507
506
|
return A;
|
|
508
507
|
}
|
|
509
|
-
function
|
|
510
|
-
|
|
511
|
-
var r =
|
|
512
|
-
return
|
|
513
|
-
}) :
|
|
514
|
-
return
|
|
508
|
+
function Qt(e, t) {
|
|
509
|
+
t === void 0 && (t = {});
|
|
510
|
+
var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, c = r.padding, s = r.flipVariations, i = r.allowedAutoPlacements, u = i === void 0 ? et : i, f = ee(n), d = f ? s ? ze : ze.filter(function(y) {
|
|
511
|
+
return ee(y) === f;
|
|
512
|
+
}) : fe, h = d.filter(function(y) {
|
|
513
|
+
return u.indexOf(y) >= 0;
|
|
515
514
|
});
|
|
516
|
-
|
|
517
|
-
var
|
|
518
|
-
return
|
|
519
|
-
placement:
|
|
515
|
+
h.length === 0 && (h = d);
|
|
516
|
+
var p = h.reduce(function(y, m) {
|
|
517
|
+
return y[m] = se(e, {
|
|
518
|
+
placement: m,
|
|
520
519
|
boundary: a,
|
|
521
|
-
rootBoundary:
|
|
520
|
+
rootBoundary: o,
|
|
522
521
|
padding: c
|
|
523
|
-
})[H(
|
|
522
|
+
})[H(m)], y;
|
|
524
523
|
}, {});
|
|
525
|
-
return Object.keys(
|
|
526
|
-
return
|
|
524
|
+
return Object.keys(p).sort(function(y, m) {
|
|
525
|
+
return p[y] - p[m];
|
|
527
526
|
});
|
|
528
527
|
}
|
|
529
|
-
function
|
|
530
|
-
if (H(
|
|
528
|
+
function Zt(e) {
|
|
529
|
+
if (H(e) === Be)
|
|
531
530
|
return [];
|
|
532
|
-
var
|
|
533
|
-
return [
|
|
534
|
-
}
|
|
535
|
-
function
|
|
536
|
-
var
|
|
537
|
-
if (!
|
|
538
|
-
for (var a = r.mainAxis,
|
|
539
|
-
return J.concat(H(F) ===
|
|
531
|
+
var t = he(e);
|
|
532
|
+
return [Ue(e), t, Ue(t)];
|
|
533
|
+
}
|
|
534
|
+
function _t(e) {
|
|
535
|
+
var t = e.state, r = e.options, n = e.name;
|
|
536
|
+
if (!t.modifiersData[n]._skip) {
|
|
537
|
+
for (var a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !0 : c, i = r.fallbackPlacements, u = r.padding, f = r.boundary, d = r.rootBoundary, h = r.altBoundary, p = r.flipVariations, y = p === void 0 ? !0 : p, m = r.allowedAutoPlacements, l = t.options.placement, w = H(l), x = w === l, O = i || (x || !y ? [he(l)] : Zt(l)), v = [l].concat(O).reduce(function(J, F) {
|
|
538
|
+
return J.concat(H(F) === Be ? Qt(t, {
|
|
540
539
|
placement: F,
|
|
541
540
|
boundary: f,
|
|
542
|
-
rootBoundary:
|
|
543
|
-
padding:
|
|
544
|
-
flipVariations:
|
|
545
|
-
allowedAutoPlacements:
|
|
541
|
+
rootBoundary: d,
|
|
542
|
+
padding: u,
|
|
543
|
+
flipVariations: y,
|
|
544
|
+
allowedAutoPlacements: m
|
|
546
545
|
}) : F);
|
|
547
|
-
}, []), g =
|
|
548
|
-
var
|
|
549
|
-
placement:
|
|
546
|
+
}, []), g = t.rects.reference, b = t.rects.popper, E = /* @__PURE__ */ new Map(), D = !0, P = v[0], A = 0; A < v.length; A++) {
|
|
547
|
+
var B = v[A], M = H(B), j = ee(B) === Q, X = [$, T].indexOf(M) >= 0, z = X ? "width" : "height", C = se(t, {
|
|
548
|
+
placement: B,
|
|
550
549
|
boundary: f,
|
|
551
|
-
rootBoundary:
|
|
552
|
-
altBoundary:
|
|
553
|
-
padding:
|
|
554
|
-
}), W = X ?
|
|
555
|
-
g[
|
|
556
|
-
var
|
|
557
|
-
if (
|
|
550
|
+
rootBoundary: d,
|
|
551
|
+
altBoundary: h,
|
|
552
|
+
padding: u
|
|
553
|
+
}), W = X ? j ? S : k : j ? T : $;
|
|
554
|
+
g[z] > b[z] && (W = he(W));
|
|
555
|
+
var ue = he(W), I = [];
|
|
556
|
+
if (o && I.push(C[M] <= 0), s && I.push(C[W] <= 0, C[ue] <= 0), I.every(function(J) {
|
|
558
557
|
return J;
|
|
559
558
|
})) {
|
|
560
|
-
P =
|
|
559
|
+
P = B, D = !1;
|
|
561
560
|
break;
|
|
562
561
|
}
|
|
563
|
-
|
|
562
|
+
E.set(B, I);
|
|
564
563
|
}
|
|
565
564
|
if (D)
|
|
566
|
-
for (var
|
|
567
|
-
var
|
|
568
|
-
var
|
|
569
|
-
if (
|
|
570
|
-
return
|
|
571
|
-
return
|
|
565
|
+
for (var pe = y ? 3 : 1, be = function(F) {
|
|
566
|
+
var re = v.find(function(ve) {
|
|
567
|
+
var Y = E.get(ve);
|
|
568
|
+
if (Y)
|
|
569
|
+
return Y.slice(0, F).every(function(we) {
|
|
570
|
+
return we;
|
|
572
571
|
});
|
|
573
572
|
});
|
|
574
|
-
if (
|
|
575
|
-
return P =
|
|
576
|
-
},
|
|
577
|
-
var
|
|
578
|
-
if (
|
|
573
|
+
if (re)
|
|
574
|
+
return P = re, "break";
|
|
575
|
+
}, te = pe; te > 0; te--) {
|
|
576
|
+
var le = be(te);
|
|
577
|
+
if (le === "break") break;
|
|
579
578
|
}
|
|
580
|
-
|
|
579
|
+
t.placement !== P && (t.modifiersData[n]._skip = !0, t.placement = P, t.reset = !0);
|
|
581
580
|
}
|
|
582
581
|
}
|
|
583
582
|
const er = {
|
|
584
583
|
name: "flip",
|
|
585
584
|
enabled: !0,
|
|
586
585
|
phase: "main",
|
|
587
|
-
fn:
|
|
586
|
+
fn: _t,
|
|
588
587
|
requiresIfExists: ["offset"],
|
|
589
588
|
data: {
|
|
590
589
|
_skip: !1
|
|
591
590
|
}
|
|
592
591
|
};
|
|
593
|
-
function
|
|
592
|
+
function Ke(e, t, r) {
|
|
594
593
|
return r === void 0 && (r = {
|
|
595
594
|
x: 0,
|
|
596
595
|
y: 0
|
|
597
596
|
}), {
|
|
598
|
-
top:
|
|
599
|
-
right:
|
|
600
|
-
bottom:
|
|
601
|
-
left:
|
|
597
|
+
top: e.top - t.height - r.y,
|
|
598
|
+
right: e.right - t.width + r.x,
|
|
599
|
+
bottom: e.bottom - t.height + r.y,
|
|
600
|
+
left: e.left - t.width - r.x
|
|
602
601
|
};
|
|
603
602
|
}
|
|
604
|
-
function
|
|
605
|
-
return [$, S, T,
|
|
606
|
-
return t
|
|
603
|
+
function Je(e) {
|
|
604
|
+
return [$, S, T, k].some(function(t) {
|
|
605
|
+
return e[t] >= 0;
|
|
607
606
|
});
|
|
608
607
|
}
|
|
609
|
-
function
|
|
610
|
-
var
|
|
608
|
+
function tr(e) {
|
|
609
|
+
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, c = se(t, {
|
|
611
610
|
elementContext: "reference"
|
|
612
|
-
}), s =
|
|
611
|
+
}), s = se(t, {
|
|
613
612
|
altBoundary: !0
|
|
614
|
-
}),
|
|
615
|
-
|
|
616
|
-
referenceClippingOffsets:
|
|
617
|
-
popperEscapeOffsets:
|
|
613
|
+
}), i = Ke(c, n), u = Ke(s, a, o), f = Je(i), d = Je(u);
|
|
614
|
+
t.modifiersData[r] = {
|
|
615
|
+
referenceClippingOffsets: i,
|
|
616
|
+
popperEscapeOffsets: u,
|
|
618
617
|
isReferenceHidden: f,
|
|
619
|
-
hasPopperEscaped:
|
|
620
|
-
},
|
|
618
|
+
hasPopperEscaped: d
|
|
619
|
+
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
621
620
|
"data-popper-reference-hidden": f,
|
|
622
|
-
"data-popper-escaped":
|
|
621
|
+
"data-popper-escaped": d
|
|
623
622
|
});
|
|
624
623
|
}
|
|
625
|
-
const
|
|
624
|
+
const rr = {
|
|
626
625
|
name: "hide",
|
|
627
626
|
enabled: !0,
|
|
628
627
|
phase: "main",
|
|
629
628
|
requiresIfExists: ["preventOverflow"],
|
|
630
|
-
fn:
|
|
629
|
+
fn: tr
|
|
631
630
|
};
|
|
632
|
-
function
|
|
633
|
-
var n = H(
|
|
634
|
-
placement:
|
|
635
|
-
})) : r, c =
|
|
636
|
-
return c = c || 0, s = (s || 0) * a, [
|
|
631
|
+
function nr(e, t, r) {
|
|
632
|
+
var n = H(e), a = [k, $].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
|
|
633
|
+
placement: e
|
|
634
|
+
})) : r, c = o[0], s = o[1];
|
|
635
|
+
return c = c || 0, s = (s || 0) * a, [k, S].indexOf(n) >= 0 ? {
|
|
637
636
|
x: s,
|
|
638
637
|
y: c
|
|
639
638
|
} : {
|
|
@@ -641,196 +640,196 @@ function ar(t, e, r) {
|
|
|
641
640
|
y: s
|
|
642
641
|
};
|
|
643
642
|
}
|
|
644
|
-
function
|
|
645
|
-
var
|
|
646
|
-
return f[
|
|
647
|
-
}, {}), s = c[
|
|
648
|
-
|
|
643
|
+
function ar(e) {
|
|
644
|
+
var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, c = et.reduce(function(f, d) {
|
|
645
|
+
return f[d] = nr(d, t.rects, o), f;
|
|
646
|
+
}, {}), s = c[t.placement], i = s.x, u = s.y;
|
|
647
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += u), t.modifiersData[n] = c;
|
|
649
648
|
}
|
|
650
|
-
const
|
|
649
|
+
const or = {
|
|
651
650
|
name: "offset",
|
|
652
651
|
enabled: !0,
|
|
653
652
|
phase: "main",
|
|
654
653
|
requires: ["popperOffsets"],
|
|
655
|
-
fn:
|
|
654
|
+
fn: ar
|
|
656
655
|
};
|
|
657
|
-
function
|
|
658
|
-
var
|
|
659
|
-
|
|
660
|
-
reference:
|
|
661
|
-
element:
|
|
662
|
-
placement:
|
|
656
|
+
function ir(e) {
|
|
657
|
+
var t = e.state, r = e.name;
|
|
658
|
+
t.modifiersData[r] = st({
|
|
659
|
+
reference: t.rects.reference,
|
|
660
|
+
element: t.rects.popper,
|
|
661
|
+
placement: t.placement
|
|
663
662
|
});
|
|
664
663
|
}
|
|
665
|
-
const
|
|
664
|
+
const sr = {
|
|
666
665
|
name: "popperOffsets",
|
|
667
666
|
enabled: !0,
|
|
668
667
|
phase: "read",
|
|
669
|
-
fn:
|
|
668
|
+
fn: ir,
|
|
670
669
|
data: {}
|
|
671
670
|
};
|
|
672
|
-
function
|
|
673
|
-
return
|
|
674
|
-
}
|
|
675
|
-
function
|
|
676
|
-
var
|
|
677
|
-
boundary:
|
|
678
|
-
rootBoundary:
|
|
679
|
-
padding:
|
|
671
|
+
function fr(e) {
|
|
672
|
+
return e === "x" ? "y" : "x";
|
|
673
|
+
}
|
|
674
|
+
function cr(e) {
|
|
675
|
+
var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !1 : c, i = r.boundary, u = r.rootBoundary, f = r.altBoundary, d = r.padding, h = r.tether, p = h === void 0 ? !0 : h, y = r.tetherOffset, m = y === void 0 ? 0 : y, l = se(t, {
|
|
676
|
+
boundary: i,
|
|
677
|
+
rootBoundary: u,
|
|
678
|
+
padding: d,
|
|
680
679
|
altBoundary: f
|
|
681
|
-
}),
|
|
682
|
-
placement:
|
|
683
|
-
})) :
|
|
680
|
+
}), w = H(t.placement), x = ee(t.placement), O = !x, v = ke(w), g = fr(v), b = t.modifiersData.popperOffsets, E = t.rects.reference, D = t.rects.popper, P = typeof m == "function" ? m(Object.assign({}, t.rects, {
|
|
681
|
+
placement: t.placement
|
|
682
|
+
})) : m, A = typeof P == "number" ? {
|
|
684
683
|
mainAxis: P,
|
|
685
684
|
altAxis: P
|
|
686
685
|
} : Object.assign({
|
|
687
686
|
mainAxis: 0,
|
|
688
687
|
altAxis: 0
|
|
689
|
-
}, P),
|
|
688
|
+
}, P), B = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = {
|
|
690
689
|
x: 0,
|
|
691
690
|
y: 0
|
|
692
691
|
};
|
|
693
|
-
if (
|
|
694
|
-
if (
|
|
695
|
-
var
|
|
692
|
+
if (b) {
|
|
693
|
+
if (o) {
|
|
694
|
+
var j, X = v === "y" ? $ : k, z = v === "y" ? T : S, C = v === "y" ? "height" : "width", W = b[v], ue = W + l[X], I = W - l[z], pe = p ? -D[C] / 2 : 0, be = x === Q ? E[C] : D[C], te = x === Q ? -D[C] : -E[C], le = t.elements.arrow, J = p && le ? $e(le) : {
|
|
696
695
|
width: 0,
|
|
697
696
|
height: 0
|
|
698
|
-
}, F =
|
|
699
|
-
|
|
697
|
+
}, F = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : nt(), re = F[X], ve = F[z], Y = ae(0, E[C], J[C]), we = O ? E[C] / 2 - pe - Y - re - A.mainAxis : be - Y - re - A.mainAxis, ft = O ? -E[C] / 2 + pe + Y + ve + A.mainAxis : te + Y + ve + A.mainAxis, xe = t.elements.arrow && ce(t.elements.arrow), ct = xe ? v === "y" ? xe.clientTop || 0 : xe.clientLeft || 0 : 0, Te = (j = B == null ? void 0 : B[v]) != null ? j : 0, ut = W + we - Te - ct, pt = W + ft - Te, Se = ae(p ? ye(ue, ut) : ue, W, p ? G(I, pt) : I);
|
|
698
|
+
b[v] = Se, M[v] = Se - W;
|
|
700
699
|
}
|
|
701
700
|
if (s) {
|
|
702
|
-
var
|
|
703
|
-
|
|
701
|
+
var Me, lt = v === "x" ? $ : k, vt = v === "x" ? T : S, U = b[g], de = g === "y" ? "height" : "width", We = U + l[lt], He = U - l[vt], Oe = [$, k].indexOf(w) !== -1, Ve = (Me = B == null ? void 0 : B[g]) != null ? Me : 0, Ne = Oe ? We : U - E[de] - D[de] - Ve + A.altAxis, Fe = Oe ? U + E[de] + D[de] - Ve - A.altAxis : He, qe = p && Oe ? Rt(Ne, U, Fe) : ae(p ? Ne : We, U, p ? Fe : He);
|
|
702
|
+
b[g] = qe, M[g] = qe - U;
|
|
704
703
|
}
|
|
705
|
-
|
|
704
|
+
t.modifiersData[n] = M;
|
|
706
705
|
}
|
|
707
706
|
}
|
|
708
707
|
const ur = {
|
|
709
708
|
name: "preventOverflow",
|
|
710
709
|
enabled: !0,
|
|
711
710
|
phase: "main",
|
|
712
|
-
fn:
|
|
711
|
+
fn: cr,
|
|
713
712
|
requiresIfExists: ["offset"]
|
|
714
713
|
};
|
|
715
|
-
function
|
|
714
|
+
function pr(e) {
|
|
716
715
|
return {
|
|
717
|
-
scrollLeft:
|
|
718
|
-
scrollTop:
|
|
716
|
+
scrollLeft: e.scrollLeft,
|
|
717
|
+
scrollTop: e.scrollTop
|
|
719
718
|
};
|
|
720
719
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
720
|
+
function lr(e) {
|
|
721
|
+
return e === L(e) || !R(e) ? Ce(e) : pr(e);
|
|
723
722
|
}
|
|
724
|
-
function
|
|
725
|
-
var
|
|
723
|
+
function vr(e) {
|
|
724
|
+
var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, n = Z(t.height) / e.offsetHeight || 1;
|
|
726
725
|
return r !== 1 || n !== 1;
|
|
727
726
|
}
|
|
728
|
-
function
|
|
727
|
+
function dr(e, t, r) {
|
|
729
728
|
r === void 0 && (r = !1);
|
|
730
|
-
var n =
|
|
729
|
+
var n = R(t), a = R(t) && vr(t), o = q(t), c = _(e, a, r), s = {
|
|
731
730
|
scrollLeft: 0,
|
|
732
731
|
scrollTop: 0
|
|
733
|
-
},
|
|
732
|
+
}, i = {
|
|
734
733
|
x: 0,
|
|
735
734
|
y: 0
|
|
736
735
|
};
|
|
737
|
-
return (n || !n && !r) && ((V(
|
|
738
|
-
|
|
739
|
-
x: c.left + s.scrollLeft -
|
|
740
|
-
y: c.top + s.scrollTop -
|
|
736
|
+
return (n || !n && !r) && ((V(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
737
|
+
Re(o)) && (s = lr(t)), R(t) ? (i = _(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = Le(o))), {
|
|
738
|
+
x: c.left + s.scrollLeft - i.x,
|
|
739
|
+
y: c.top + s.scrollTop - i.y,
|
|
741
740
|
width: c.width,
|
|
742
741
|
height: c.height
|
|
743
742
|
};
|
|
744
743
|
}
|
|
745
|
-
function
|
|
746
|
-
var
|
|
747
|
-
|
|
748
|
-
|
|
744
|
+
function mr(e) {
|
|
745
|
+
var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
|
|
746
|
+
e.forEach(function(o) {
|
|
747
|
+
t.set(o.name, o);
|
|
749
748
|
});
|
|
750
|
-
function a(
|
|
751
|
-
r.add(
|
|
752
|
-
var c = [].concat(
|
|
749
|
+
function a(o) {
|
|
750
|
+
r.add(o.name);
|
|
751
|
+
var c = [].concat(o.requires || [], o.requiresIfExists || []);
|
|
753
752
|
c.forEach(function(s) {
|
|
754
753
|
if (!r.has(s)) {
|
|
755
|
-
var
|
|
756
|
-
|
|
754
|
+
var i = t.get(s);
|
|
755
|
+
i && a(i);
|
|
757
756
|
}
|
|
758
|
-
}), n.push(
|
|
757
|
+
}), n.push(o);
|
|
759
758
|
}
|
|
760
|
-
return
|
|
761
|
-
r.has(
|
|
759
|
+
return e.forEach(function(o) {
|
|
760
|
+
r.has(o.name) || a(o);
|
|
762
761
|
}), n;
|
|
763
762
|
}
|
|
764
|
-
function
|
|
765
|
-
var
|
|
766
|
-
return
|
|
767
|
-
return r.concat(
|
|
763
|
+
function hr(e) {
|
|
764
|
+
var t = mr(e);
|
|
765
|
+
return Bt.reduce(function(r, n) {
|
|
766
|
+
return r.concat(t.filter(function(a) {
|
|
768
767
|
return a.phase === n;
|
|
769
768
|
}));
|
|
770
769
|
}, []);
|
|
771
770
|
}
|
|
772
|
-
function yr(
|
|
773
|
-
var
|
|
771
|
+
function yr(e) {
|
|
772
|
+
var t;
|
|
774
773
|
return function() {
|
|
775
|
-
return
|
|
774
|
+
return t || (t = new Promise(function(r) {
|
|
776
775
|
Promise.resolve().then(function() {
|
|
777
|
-
|
|
776
|
+
t = void 0, r(e());
|
|
778
777
|
});
|
|
779
|
-
})),
|
|
778
|
+
})), t;
|
|
780
779
|
};
|
|
781
780
|
}
|
|
782
|
-
function
|
|
783
|
-
var
|
|
781
|
+
function gr(e) {
|
|
782
|
+
var t = e.reduce(function(r, n) {
|
|
784
783
|
var a = r[n.name];
|
|
785
784
|
return r[n.name] = a ? Object.assign({}, a, n, {
|
|
786
785
|
options: Object.assign({}, a.options, n.options),
|
|
787
786
|
data: Object.assign({}, a.data, n.data)
|
|
788
787
|
}) : n, r;
|
|
789
788
|
}, {});
|
|
790
|
-
return Object.keys(
|
|
791
|
-
return
|
|
789
|
+
return Object.keys(t).map(function(r) {
|
|
790
|
+
return t[r];
|
|
792
791
|
});
|
|
793
792
|
}
|
|
794
|
-
var
|
|
793
|
+
var Qe = {
|
|
795
794
|
placement: "bottom",
|
|
796
795
|
modifiers: [],
|
|
797
796
|
strategy: "absolute"
|
|
798
797
|
};
|
|
799
|
-
function
|
|
800
|
-
for (var
|
|
801
|
-
|
|
802
|
-
return !
|
|
798
|
+
function Ze() {
|
|
799
|
+
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
800
|
+
t[r] = arguments[r];
|
|
801
|
+
return !t.some(function(n) {
|
|
803
802
|
return !(n && typeof n.getBoundingClientRect == "function");
|
|
804
803
|
});
|
|
805
804
|
}
|
|
806
|
-
function
|
|
807
|
-
|
|
808
|
-
var
|
|
809
|
-
return function(s,
|
|
810
|
-
|
|
805
|
+
function br(e) {
|
|
806
|
+
e === void 0 && (e = {});
|
|
807
|
+
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? Qe : a;
|
|
808
|
+
return function(s, i, u) {
|
|
809
|
+
u === void 0 && (u = o);
|
|
811
810
|
var f = {
|
|
812
811
|
placement: "bottom",
|
|
813
812
|
orderedModifiers: [],
|
|
814
|
-
options: Object.assign({},
|
|
813
|
+
options: Object.assign({}, Qe, o),
|
|
815
814
|
modifiersData: {},
|
|
816
815
|
elements: {
|
|
817
816
|
reference: s,
|
|
818
|
-
popper:
|
|
817
|
+
popper: i
|
|
819
818
|
},
|
|
820
819
|
attributes: {},
|
|
821
820
|
styles: {}
|
|
822
|
-
},
|
|
821
|
+
}, d = [], h = !1, p = {
|
|
823
822
|
state: f,
|
|
824
|
-
setOptions: function(
|
|
825
|
-
var
|
|
826
|
-
|
|
827
|
-
reference: K(s) ?
|
|
828
|
-
popper:
|
|
823
|
+
setOptions: function(w) {
|
|
824
|
+
var x = typeof w == "function" ? w(f.options) : w;
|
|
825
|
+
m(), f.options = Object.assign({}, o, f.options, x), f.scrollParents = {
|
|
826
|
+
reference: K(s) ? oe(s) : s.contextElement ? oe(s.contextElement) : [],
|
|
827
|
+
popper: oe(i)
|
|
829
828
|
};
|
|
830
|
-
var
|
|
831
|
-
return f.orderedModifiers =
|
|
829
|
+
var O = hr(gr([].concat(n, f.options.modifiers)));
|
|
830
|
+
return f.orderedModifiers = O.filter(function(v) {
|
|
832
831
|
return v.enabled;
|
|
833
|
-
}),
|
|
832
|
+
}), y(), p.update();
|
|
834
833
|
},
|
|
835
834
|
// Sync update – it will always be executed, even if not necessary. This
|
|
836
835
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -838,12 +837,12 @@ function wr(t) {
|
|
|
838
837
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
839
838
|
// prefer the async Popper#update method
|
|
840
839
|
forceUpdate: function() {
|
|
841
|
-
if (!
|
|
842
|
-
var
|
|
843
|
-
if (
|
|
840
|
+
if (!h) {
|
|
841
|
+
var w = f.elements, x = w.reference, O = w.popper;
|
|
842
|
+
if (Ze(x, O)) {
|
|
844
843
|
f.rects = {
|
|
845
|
-
reference:
|
|
846
|
-
popper:
|
|
844
|
+
reference: dr(x, ce(O), f.options.strategy === "fixed"),
|
|
845
|
+
popper: $e(O)
|
|
847
846
|
}, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(A) {
|
|
848
847
|
return f.modifiersData[A.name] = Object.assign({}, A.data);
|
|
849
848
|
});
|
|
@@ -852,12 +851,12 @@ function wr(t) {
|
|
|
852
851
|
f.reset = !1, v = -1;
|
|
853
852
|
continue;
|
|
854
853
|
}
|
|
855
|
-
var g = f.orderedModifiers[v],
|
|
856
|
-
typeof
|
|
854
|
+
var g = f.orderedModifiers[v], b = g.fn, E = g.options, D = E === void 0 ? {} : E, P = g.name;
|
|
855
|
+
typeof b == "function" && (f = b({
|
|
857
856
|
state: f,
|
|
858
857
|
options: D,
|
|
859
858
|
name: P,
|
|
860
|
-
instance:
|
|
859
|
+
instance: p
|
|
861
860
|
}) || f);
|
|
862
861
|
}
|
|
863
862
|
}
|
|
@@ -866,95 +865,132 @@ function wr(t) {
|
|
|
866
865
|
// Async and optimistically optimized update – it will not be executed if
|
|
867
866
|
// not necessary (debounced to run at most once-per-tick)
|
|
868
867
|
update: yr(function() {
|
|
869
|
-
return new Promise(function(
|
|
870
|
-
|
|
868
|
+
return new Promise(function(l) {
|
|
869
|
+
p.forceUpdate(), l(f);
|
|
871
870
|
});
|
|
872
871
|
}),
|
|
873
872
|
destroy: function() {
|
|
874
|
-
|
|
873
|
+
m(), h = !0;
|
|
875
874
|
}
|
|
876
875
|
};
|
|
877
|
-
if (!
|
|
878
|
-
return
|
|
879
|
-
|
|
880
|
-
!
|
|
876
|
+
if (!Ze(s, i))
|
|
877
|
+
return p;
|
|
878
|
+
p.setOptions(u).then(function(l) {
|
|
879
|
+
!h && u.onFirstUpdate && u.onFirstUpdate(l);
|
|
881
880
|
});
|
|
882
|
-
function
|
|
883
|
-
f.orderedModifiers.forEach(function(
|
|
884
|
-
var
|
|
881
|
+
function y() {
|
|
882
|
+
f.orderedModifiers.forEach(function(l) {
|
|
883
|
+
var w = l.name, x = l.options, O = x === void 0 ? {} : x, v = l.effect;
|
|
885
884
|
if (typeof v == "function") {
|
|
886
885
|
var g = v({
|
|
887
886
|
state: f,
|
|
888
|
-
name:
|
|
889
|
-
instance:
|
|
890
|
-
options:
|
|
891
|
-
}),
|
|
887
|
+
name: w,
|
|
888
|
+
instance: p,
|
|
889
|
+
options: O
|
|
890
|
+
}), b = function() {
|
|
892
891
|
};
|
|
893
|
-
|
|
892
|
+
d.push(g || b);
|
|
894
893
|
}
|
|
895
894
|
});
|
|
896
895
|
}
|
|
897
|
-
function
|
|
898
|
-
|
|
899
|
-
return
|
|
900
|
-
}),
|
|
896
|
+
function m() {
|
|
897
|
+
d.forEach(function(l) {
|
|
898
|
+
return l();
|
|
899
|
+
}), d = [];
|
|
901
900
|
}
|
|
902
|
-
return
|
|
901
|
+
return p;
|
|
903
902
|
};
|
|
904
903
|
}
|
|
905
|
-
var
|
|
906
|
-
defaultModifiers:
|
|
904
|
+
var wr = [Xt, sr, Ft, kt, or, er, ur, Wt, rr], xr = /* @__PURE__ */ br({
|
|
905
|
+
defaultModifiers: wr
|
|
907
906
|
});
|
|
908
|
-
const
|
|
909
|
-
triggerRef:
|
|
910
|
-
children:
|
|
907
|
+
const Dr = ({
|
|
908
|
+
triggerRef: e,
|
|
909
|
+
children: t,
|
|
911
910
|
className: r,
|
|
912
911
|
open: n,
|
|
913
912
|
onOpenChange: a,
|
|
914
|
-
maxHeight:
|
|
913
|
+
maxHeight: o,
|
|
915
914
|
options: c = {
|
|
916
915
|
strategy: "absolute",
|
|
917
916
|
placement: "bottom-start",
|
|
918
917
|
modifiers: [
|
|
919
|
-
{ name: "preventOverflow", options: { padding: 8 } },
|
|
920
918
|
{
|
|
921
|
-
name: "
|
|
919
|
+
name: "preventOverflow",
|
|
922
920
|
options: {
|
|
923
|
-
|
|
921
|
+
padding: 8,
|
|
922
|
+
boundary: "clippingParents",
|
|
923
|
+
rootBoundary: "viewport",
|
|
924
|
+
tether: !0
|
|
924
925
|
}
|
|
925
|
-
}
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
name: "flip",
|
|
929
|
+
options: { fallbackPlacements: ["right", "top"], altBoundary: !0 }
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
name: "computeStyles",
|
|
933
|
+
options: { adaptive: !1, gpuAcceleration: !1 }
|
|
934
|
+
},
|
|
935
|
+
{ name: "eventListeners", enabled: !0 }
|
|
926
936
|
]
|
|
927
937
|
},
|
|
928
938
|
extraRefs: s = []
|
|
929
939
|
}) => {
|
|
930
|
-
const
|
|
931
|
-
return
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
940
|
+
const i = Ee(null), u = Ee(null), f = Ee(null);
|
|
941
|
+
return Ae(() => {
|
|
942
|
+
if (!n)
|
|
943
|
+
return;
|
|
944
|
+
const d = (e == null ? void 0 : e.current) ?? null, h = i.current ?? null;
|
|
945
|
+
if (!(!d || !h))
|
|
946
|
+
return u.current = xr(d, h, {
|
|
947
|
+
...c,
|
|
948
|
+
modifiers: [
|
|
949
|
+
...(c == null ? void 0 : c.modifiers) ?? [],
|
|
950
|
+
Xe(o),
|
|
951
|
+
{ name: "eventListeners", enabled: !0 }
|
|
952
|
+
]
|
|
953
|
+
}), f.current = new ResizeObserver(() => {
|
|
954
|
+
u.current && u.current.update();
|
|
955
|
+
}), f.current.observe(h), f.current.observe(d), requestAnimationFrame(() => {
|
|
956
|
+
u.current && u.current.update();
|
|
957
|
+
}), () => {
|
|
958
|
+
var p, y;
|
|
959
|
+
f.current && f.current.disconnect(), f.current = null, u.current && ((y = (p = u.current).destroy) == null || y.call(p)), u.current = null;
|
|
960
|
+
};
|
|
961
|
+
}, [n, e, o, c]), Ae(() => {
|
|
962
|
+
n && u.current && (u.current.setOptions((d) => ({
|
|
963
|
+
...d,
|
|
935
964
|
...c,
|
|
936
965
|
modifiers: [
|
|
937
|
-
...c.modifiers
|
|
938
|
-
|
|
966
|
+
...(c == null ? void 0 : c.modifiers) ?? [],
|
|
967
|
+
Xe(o),
|
|
968
|
+
{ name: "eventListeners", enabled: !0 }
|
|
939
969
|
]
|
|
940
|
-
}
|
|
941
|
-
),
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
970
|
+
})), u.current.update());
|
|
971
|
+
}, [n, t, o, c]), Ae(() => {
|
|
972
|
+
if (!n)
|
|
973
|
+
return;
|
|
974
|
+
const d = () => {
|
|
975
|
+
const y = (e == null ? void 0 : e.current) ?? null, m = s.map((l) => (l == null ? void 0 : l.current) ?? null).filter(Boolean);
|
|
976
|
+
return { base: y, extras: m };
|
|
977
|
+
}, h = (y) => {
|
|
978
|
+
const m = y.target, l = i.current, { base: w, extras: x } = d(), O = !!(l && l.contains(m)), v = !!(w && w.contains(m));
|
|
979
|
+
let g = !1;
|
|
980
|
+
for (const b of x)
|
|
981
|
+
if (b.contains(m)) {
|
|
982
|
+
g = !0;
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
!O && !v && !g && a(!1);
|
|
986
|
+
}, p = (y) => {
|
|
987
|
+
y.key === "Escape" && a(!1);
|
|
952
988
|
};
|
|
953
|
-
return
|
|
954
|
-
document.removeEventListener("mousedown",
|
|
989
|
+
return document.addEventListener("mousedown", h), document.addEventListener("keydown", p), () => {
|
|
990
|
+
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", p);
|
|
955
991
|
};
|
|
956
|
-
}, [n, a,
|
|
992
|
+
}, [n, a, e, s]), n ? /* @__PURE__ */ dt("div", { ref: i, role: "dialog", className: mt("gi-popover", r), children: t }) : null;
|
|
957
993
|
};
|
|
958
994
|
export {
|
|
959
|
-
|
|
995
|
+
Dr as Popover
|
|
960
996
|
};
|