highsoft-ui 1.0.5 → 1.0.6
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/components/PrefPanel/index.js +352 -352
- package/package.json +2 -2
|
@@ -118,22 +118,22 @@ function q(...e) {
|
|
|
118
118
|
// @__NO_SIDE_EFFECTS__
|
|
119
119
|
function Xt(e) {
|
|
120
120
|
const t = /* @__PURE__ */ dr(e), n = a.forwardRef((r, o) => {
|
|
121
|
-
const { children: i, ...
|
|
121
|
+
const { children: i, ...s } = r, c = a.Children.toArray(i), u = c.find(pr);
|
|
122
122
|
if (u) {
|
|
123
|
-
const l = u.props.children, f =
|
|
124
|
-
return /* @__PURE__ */ C(t, { ...
|
|
123
|
+
const l = u.props.children, f = c.map((d) => d === u ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : d);
|
|
124
|
+
return /* @__PURE__ */ C(t, { ...s, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, f) : null });
|
|
125
125
|
}
|
|
126
|
-
return /* @__PURE__ */ C(t, { ...
|
|
126
|
+
return /* @__PURE__ */ C(t, { ...s, ref: o, children: i });
|
|
127
127
|
});
|
|
128
128
|
return n.displayName = `${e}.Slot`, n;
|
|
129
129
|
}
|
|
130
130
|
// @__NO_SIDE_EFFECTS__
|
|
131
131
|
function dr(e) {
|
|
132
132
|
const t = a.forwardRef((n, r) => {
|
|
133
|
-
const { children: o, ...i } = n,
|
|
133
|
+
const { children: o, ...i } = n, s = a.isValidElement(o) ? vr(o) : void 0, c = q(s, r);
|
|
134
134
|
if (a.isValidElement(o)) {
|
|
135
135
|
const u = mr(i, o.props);
|
|
136
|
-
return o.type !== a.Fragment && (u.ref =
|
|
136
|
+
return o.type !== a.Fragment && (u.ref = c), a.cloneElement(o, u);
|
|
137
137
|
}
|
|
138
138
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
139
139
|
});
|
|
@@ -147,9 +147,9 @@ function mr(e, t) {
|
|
|
147
147
|
const n = { ...t };
|
|
148
148
|
for (const r in t) {
|
|
149
149
|
const o = e[r], i = t[r];
|
|
150
|
-
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...
|
|
151
|
-
const u = i(...
|
|
152
|
-
return o(...
|
|
150
|
+
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
|
|
151
|
+
const u = i(...c);
|
|
152
|
+
return o(...c), u;
|
|
153
153
|
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
|
|
154
154
|
}
|
|
155
155
|
return { ...e, ...n };
|
|
@@ -179,8 +179,8 @@ var gr = [
|
|
|
179
179
|
"ul"
|
|
180
180
|
], G = gr.reduce((e, t) => {
|
|
181
181
|
const n = /* @__PURE__ */ Xt(`Primitive.${t}`), r = a.forwardRef((o, i) => {
|
|
182
|
-
const { asChild:
|
|
183
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ C(u, { ...
|
|
182
|
+
const { asChild: s, ...c } = o, u = s ? n : t;
|
|
183
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ C(u, { ...c, ref: i });
|
|
184
184
|
});
|
|
185
185
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
186
186
|
}, {});
|
|
@@ -189,31 +189,31 @@ function yr(e, t) {
|
|
|
189
189
|
}
|
|
190
190
|
function Kt(e, t = []) {
|
|
191
191
|
let n = [];
|
|
192
|
-
function r(i,
|
|
193
|
-
const
|
|
194
|
-
n = [...n,
|
|
192
|
+
function r(i, s) {
|
|
193
|
+
const c = a.createContext(s), u = n.length;
|
|
194
|
+
n = [...n, s];
|
|
195
195
|
const l = (d) => {
|
|
196
196
|
var y;
|
|
197
|
-
const { scope: p, children: m, ...g } = d, h = ((y = p == null ? void 0 : p[e]) == null ? void 0 : y[u]) ||
|
|
197
|
+
const { scope: p, children: m, ...g } = d, h = ((y = p == null ? void 0 : p[e]) == null ? void 0 : y[u]) || c, v = a.useMemo(() => g, Object.values(g));
|
|
198
198
|
return /* @__PURE__ */ C(h.Provider, { value: v, children: m });
|
|
199
199
|
};
|
|
200
200
|
l.displayName = i + "Provider";
|
|
201
201
|
function f(d, p) {
|
|
202
202
|
var h;
|
|
203
|
-
const m = ((h = p == null ? void 0 : p[e]) == null ? void 0 : h[u]) ||
|
|
203
|
+
const m = ((h = p == null ? void 0 : p[e]) == null ? void 0 : h[u]) || c, g = a.useContext(m);
|
|
204
204
|
if (g) return g;
|
|
205
|
-
if (
|
|
205
|
+
if (s !== void 0) return s;
|
|
206
206
|
throw new Error(`\`${d}\` must be used within \`${i}\``);
|
|
207
207
|
}
|
|
208
208
|
return [l, f];
|
|
209
209
|
}
|
|
210
210
|
const o = () => {
|
|
211
|
-
const i = n.map((
|
|
212
|
-
return function(
|
|
213
|
-
const u = (
|
|
211
|
+
const i = n.map((s) => a.createContext(s));
|
|
212
|
+
return function(c) {
|
|
213
|
+
const u = (c == null ? void 0 : c[e]) || i;
|
|
214
214
|
return a.useMemo(
|
|
215
|
-
() => ({ [`__scope${e}`]: { ...
|
|
216
|
-
[
|
|
215
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: u } }),
|
|
216
|
+
[c, u]
|
|
217
217
|
);
|
|
218
218
|
};
|
|
219
219
|
};
|
|
@@ -228,11 +228,11 @@ function wr(...e) {
|
|
|
228
228
|
scopeName: o.scopeName
|
|
229
229
|
}));
|
|
230
230
|
return function(i) {
|
|
231
|
-
const
|
|
231
|
+
const s = r.reduce((c, { useScope: u, scopeName: l }) => {
|
|
232
232
|
const d = u(i)[`__scope${l}`];
|
|
233
|
-
return { ...
|
|
233
|
+
return { ...c, ...d };
|
|
234
234
|
}, {});
|
|
235
|
-
return a.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
235
|
+
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
236
236
|
};
|
|
237
237
|
};
|
|
238
238
|
return n.scopeName = t.scopeName, n;
|
|
@@ -252,29 +252,29 @@ function xr({
|
|
|
252
252
|
},
|
|
253
253
|
caller: r
|
|
254
254
|
}) {
|
|
255
|
-
const [o, i,
|
|
255
|
+
const [o, i, s] = Er({
|
|
256
256
|
defaultProp: t,
|
|
257
257
|
onChange: n
|
|
258
|
-
}),
|
|
258
|
+
}), c = e !== void 0, u = c ? e : o;
|
|
259
259
|
{
|
|
260
260
|
const f = a.useRef(e !== void 0);
|
|
261
261
|
a.useEffect(() => {
|
|
262
262
|
const d = f.current;
|
|
263
|
-
d !==
|
|
264
|
-
`${r} is changing from ${d ? "controlled" : "uncontrolled"} to ${
|
|
265
|
-
), f.current =
|
|
266
|
-
}, [
|
|
263
|
+
d !== c && console.warn(
|
|
264
|
+
`${r} is changing from ${d ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
265
|
+
), f.current = c;
|
|
266
|
+
}, [c, r]);
|
|
267
267
|
}
|
|
268
268
|
const l = a.useCallback(
|
|
269
269
|
(f) => {
|
|
270
270
|
var d;
|
|
271
|
-
if (
|
|
271
|
+
if (c) {
|
|
272
272
|
const p = Cr(f) ? f(e) : f;
|
|
273
|
-
p !== e && ((d =
|
|
273
|
+
p !== e && ((d = s.current) == null || d.call(s, p));
|
|
274
274
|
} else
|
|
275
275
|
i(f);
|
|
276
276
|
},
|
|
277
|
-
[
|
|
277
|
+
[c, e, i, s]
|
|
278
278
|
);
|
|
279
279
|
return [u, l];
|
|
280
280
|
}
|
|
@@ -286,8 +286,8 @@ function Er({
|
|
|
286
286
|
return br(() => {
|
|
287
287
|
i.current = t;
|
|
288
288
|
}, [t]), a.useEffect(() => {
|
|
289
|
-
var
|
|
290
|
-
o.current !== n && ((
|
|
289
|
+
var s;
|
|
290
|
+
o.current !== n && ((s = i.current) == null || s.call(i, n), o.current = n);
|
|
291
291
|
}, [n, o]), [n, r, i];
|
|
292
292
|
}
|
|
293
293
|
function Cr(e) {
|
|
@@ -297,12 +297,12 @@ function Pr(e, t) {
|
|
|
297
297
|
return a.useReducer((n, r) => t[n][r] ?? n, e);
|
|
298
298
|
}
|
|
299
299
|
var it = (e) => {
|
|
300
|
-
const { present: t, children: n } = e, r =
|
|
300
|
+
const { present: t, children: n } = e, r = Ar(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = q(r.ref, Sr(o));
|
|
301
301
|
return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
|
|
302
302
|
};
|
|
303
303
|
it.displayName = "Presence";
|
|
304
|
-
function
|
|
305
|
-
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"),
|
|
304
|
+
function Ar(e) {
|
|
305
|
+
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, u] = Pr(s, {
|
|
306
306
|
mounted: {
|
|
307
307
|
UNMOUNT: "unmounted",
|
|
308
308
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -316,19 +316,19 @@ function Sr(e) {
|
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
318
|
return a.useEffect(() => {
|
|
319
|
-
const l =
|
|
320
|
-
i.current =
|
|
321
|
-
}, [
|
|
319
|
+
const l = Ae(r.current);
|
|
320
|
+
i.current = c === "mounted" ? l : "none";
|
|
321
|
+
}, [c]), te(() => {
|
|
322
322
|
const l = r.current, f = o.current;
|
|
323
323
|
if (f !== e) {
|
|
324
|
-
const p = i.current, m =
|
|
324
|
+
const p = i.current, m = Ae(l);
|
|
325
325
|
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(f && p !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
326
326
|
}
|
|
327
327
|
}, [e, u]), te(() => {
|
|
328
328
|
if (t) {
|
|
329
329
|
let l;
|
|
330
330
|
const f = t.ownerDocument.defaultView ?? window, d = (m) => {
|
|
331
|
-
const h =
|
|
331
|
+
const h = Ae(r.current).includes(m.animationName);
|
|
332
332
|
if (m.target === t && h && (u("ANIMATION_END"), !o.current)) {
|
|
333
333
|
const v = t.style.animationFillMode;
|
|
334
334
|
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
@@ -336,7 +336,7 @@ function Sr(e) {
|
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
338
|
}, p = (m) => {
|
|
339
|
-
m.target === t && (i.current =
|
|
339
|
+
m.target === t && (i.current = Ae(r.current));
|
|
340
340
|
};
|
|
341
341
|
return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
|
|
342
342
|
f.clearTimeout(l), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
|
|
@@ -344,16 +344,16 @@ function Sr(e) {
|
|
|
344
344
|
} else
|
|
345
345
|
u("ANIMATION_END");
|
|
346
346
|
}, [t, u]), {
|
|
347
|
-
isPresent: ["mounted", "unmountSuspended"].includes(
|
|
347
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
348
348
|
ref: a.useCallback((l) => {
|
|
349
349
|
r.current = l ? getComputedStyle(l) : null, n(l);
|
|
350
350
|
}, [])
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Ae(e) {
|
|
354
354
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function Sr(e) {
|
|
357
357
|
var r, o;
|
|
358
358
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
359
359
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
@@ -395,25 +395,25 @@ var Tr = "DismissableLayer", Je = "dismissableLayer.update", kr = "dismissableLa
|
|
|
395
395
|
onEscapeKeyDown: r,
|
|
396
396
|
onPointerDownOutside: o,
|
|
397
397
|
onFocusOutside: i,
|
|
398
|
-
onInteractOutside:
|
|
399
|
-
onDismiss:
|
|
398
|
+
onInteractOutside: s,
|
|
399
|
+
onDismiss: c,
|
|
400
400
|
...u
|
|
401
401
|
} = e, l = a.useContext(Zt), [f, d] = a.useState(null), p = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = a.useState({}), g = q(t, (P) => d(P)), h = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(v), x = f ? h.indexOf(f) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, w = x >= y, E = Fr((P) => {
|
|
402
402
|
const R = P.target, N = [...l.branches].some((O) => O.contains(R));
|
|
403
|
-
!w || N || (o == null || o(P),
|
|
404
|
-
}, p),
|
|
403
|
+
!w || N || (o == null || o(P), s == null || s(P), P.defaultPrevented || c == null || c());
|
|
404
|
+
}, p), A = Ir((P) => {
|
|
405
405
|
const R = P.target;
|
|
406
|
-
[...l.branches].some((O) => O.contains(R)) || (i == null || i(P),
|
|
406
|
+
[...l.branches].some((O) => O.contains(R)) || (i == null || i(P), s == null || s(P), P.defaultPrevented || c == null || c());
|
|
407
407
|
}, p);
|
|
408
408
|
return Mr((P) => {
|
|
409
|
-
x === l.layers.size - 1 && (r == null || r(P), !P.defaultPrevented &&
|
|
409
|
+
x === l.layers.size - 1 && (r == null || r(P), !P.defaultPrevented && c && (P.preventDefault(), c()));
|
|
410
410
|
}, p), a.useEffect(() => {
|
|
411
411
|
if (f)
|
|
412
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Pt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f),
|
|
412
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Pt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), At(), () => {
|
|
413
413
|
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Pt);
|
|
414
414
|
};
|
|
415
415
|
}, [f, p, n, l]), a.useEffect(() => () => {
|
|
416
|
-
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f),
|
|
416
|
+
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), At());
|
|
417
417
|
}, [f, l]), a.useEffect(() => {
|
|
418
418
|
const P = () => m({});
|
|
419
419
|
return document.addEventListener(Je, P), () => document.removeEventListener(Je, P);
|
|
@@ -426,8 +426,8 @@ var Tr = "DismissableLayer", Je = "dismissableLayer.update", kr = "dismissableLa
|
|
|
426
426
|
pointerEvents: b ? w ? "auto" : "none" : void 0,
|
|
427
427
|
...e.style
|
|
428
428
|
},
|
|
429
|
-
onFocusCapture: ee(e.onFocusCapture,
|
|
430
|
-
onBlurCapture: ee(e.onBlurCapture,
|
|
429
|
+
onFocusCapture: ee(e.onFocusCapture, A.onFocusCapture),
|
|
430
|
+
onBlurCapture: ee(e.onBlurCapture, A.onBlurCapture),
|
|
431
431
|
onPointerDownCapture: ee(
|
|
432
432
|
e.onPointerDownCapture,
|
|
433
433
|
E.onPointerDownCapture
|
|
@@ -452,8 +452,8 @@ function Fr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
452
452
|
const n = de(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
453
453
|
});
|
|
454
454
|
return a.useEffect(() => {
|
|
455
|
-
const i = (
|
|
456
|
-
if (
|
|
455
|
+
const i = (c) => {
|
|
456
|
+
if (c.target && !r.current) {
|
|
457
457
|
let u = function() {
|
|
458
458
|
Gt(
|
|
459
459
|
kr,
|
|
@@ -462,16 +462,16 @@ function Fr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
462
462
|
{ discrete: !0 }
|
|
463
463
|
);
|
|
464
464
|
};
|
|
465
|
-
const l = { originalEvent:
|
|
466
|
-
|
|
465
|
+
const l = { originalEvent: c };
|
|
466
|
+
c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = u, t.addEventListener("click", o.current, { once: !0 })) : u();
|
|
467
467
|
} else
|
|
468
468
|
t.removeEventListener("click", o.current);
|
|
469
469
|
r.current = !1;
|
|
470
|
-
},
|
|
470
|
+
}, s = window.setTimeout(() => {
|
|
471
471
|
t.addEventListener("pointerdown", i);
|
|
472
472
|
}, 0);
|
|
473
473
|
return () => {
|
|
474
|
-
window.clearTimeout(
|
|
474
|
+
window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
|
|
475
475
|
};
|
|
476
476
|
}, [t, n]), {
|
|
477
477
|
// ensures we check React component tree (not just DOM tree)
|
|
@@ -492,7 +492,7 @@ function Ir(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
492
492
|
onBlurCapture: () => r.current = !1
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function At() {
|
|
496
496
|
const e = new CustomEvent(Je);
|
|
497
497
|
document.dispatchEvent(e);
|
|
498
498
|
}
|
|
@@ -500,14 +500,14 @@ function Gt(e, t, n, { discrete: r }) {
|
|
|
500
500
|
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
501
501
|
t && o.addEventListener(e, t, { once: !0 }), r ? yr(o, i) : o.dispatchEvent(i);
|
|
502
502
|
}
|
|
503
|
-
var Ve = "focusScope.autoFocusOnMount", je = "focusScope.autoFocusOnUnmount",
|
|
503
|
+
var Ve = "focusScope.autoFocusOnMount", je = "focusScope.autoFocusOnUnmount", St = { bubbles: !1, cancelable: !0 }, Wr = "FocusScope", Qt = a.forwardRef((e, t) => {
|
|
504
504
|
const {
|
|
505
505
|
loop: n = !1,
|
|
506
506
|
trapped: r = !1,
|
|
507
507
|
onMountAutoFocus: o,
|
|
508
508
|
onUnmountAutoFocus: i,
|
|
509
|
-
...
|
|
510
|
-
} = e, [
|
|
509
|
+
...s
|
|
510
|
+
} = e, [c, u] = a.useState(null), l = de(o), f = de(i), d = a.useRef(null), p = q(t, (h) => u(h)), m = a.useRef({
|
|
511
511
|
paused: !1,
|
|
512
512
|
pause() {
|
|
513
513
|
this.paused = !0;
|
|
@@ -519,40 +519,40 @@ var Ve = "focusScope.autoFocusOnMount", je = "focusScope.autoFocusOnUnmount", At
|
|
|
519
519
|
a.useEffect(() => {
|
|
520
520
|
if (r) {
|
|
521
521
|
let h = function(b) {
|
|
522
|
-
if (m.paused || !
|
|
522
|
+
if (m.paused || !c) return;
|
|
523
523
|
const w = b.target;
|
|
524
|
-
|
|
524
|
+
c.contains(w) ? d.current = w : Q(d.current, { select: !0 });
|
|
525
525
|
}, v = function(b) {
|
|
526
|
-
if (m.paused || !
|
|
526
|
+
if (m.paused || !c) return;
|
|
527
527
|
const w = b.relatedTarget;
|
|
528
|
-
w !== null && (
|
|
528
|
+
w !== null && (c.contains(w) || Q(d.current, { select: !0 }));
|
|
529
529
|
}, y = function(b) {
|
|
530
530
|
if (document.activeElement === document.body)
|
|
531
531
|
for (const E of b)
|
|
532
|
-
E.removedNodes.length > 0 && Q(
|
|
532
|
+
E.removedNodes.length > 0 && Q(c);
|
|
533
533
|
};
|
|
534
534
|
document.addEventListener("focusin", h), document.addEventListener("focusout", v);
|
|
535
535
|
const x = new MutationObserver(y);
|
|
536
|
-
return
|
|
536
|
+
return c && x.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
537
537
|
document.removeEventListener("focusin", h), document.removeEventListener("focusout", v), x.disconnect();
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
|
-
}, [r,
|
|
541
|
-
if (
|
|
540
|
+
}, [r, c, m.paused]), a.useEffect(() => {
|
|
541
|
+
if (c) {
|
|
542
542
|
Ot.add(m);
|
|
543
543
|
const h = document.activeElement;
|
|
544
|
-
if (!
|
|
545
|
-
const y = new CustomEvent(Ve,
|
|
546
|
-
|
|
544
|
+
if (!c.contains(h)) {
|
|
545
|
+
const y = new CustomEvent(Ve, St);
|
|
546
|
+
c.addEventListener(Ve, l), c.dispatchEvent(y), y.defaultPrevented || (Br(jr(Jt(c)), { select: !0 }), document.activeElement === h && Q(c));
|
|
547
547
|
}
|
|
548
548
|
return () => {
|
|
549
|
-
|
|
550
|
-
const y = new CustomEvent(je,
|
|
551
|
-
|
|
549
|
+
c.removeEventListener(Ve, l), setTimeout(() => {
|
|
550
|
+
const y = new CustomEvent(je, St);
|
|
551
|
+
c.addEventListener(je, f), c.dispatchEvent(y), y.defaultPrevented || Q(h ?? document.body, { select: !0 }), c.removeEventListener(je, f), Ot.remove(m);
|
|
552
552
|
}, 0);
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
}, [
|
|
555
|
+
}, [c, l, f, m]);
|
|
556
556
|
const g = a.useCallback(
|
|
557
557
|
(h) => {
|
|
558
558
|
if (!n && !r || m.paused) return;
|
|
@@ -564,7 +564,7 @@ var Ve = "focusScope.autoFocusOnMount", je = "focusScope.autoFocusOnUnmount", At
|
|
|
564
564
|
},
|
|
565
565
|
[n, r, m.paused]
|
|
566
566
|
);
|
|
567
|
-
return /* @__PURE__ */ C(G.div, { tabIndex: -1, ...
|
|
567
|
+
return /* @__PURE__ */ C(G.div, { tabIndex: -1, ...s, ref: p, onKeyDown: g });
|
|
568
568
|
});
|
|
569
569
|
Qt.displayName = Wr;
|
|
570
570
|
function Br(e, { select: t = !1 } = {}) {
|
|
@@ -630,11 +630,11 @@ function jr(e) {
|
|
|
630
630
|
return e.filter((t) => t.tagName !== "A");
|
|
631
631
|
}
|
|
632
632
|
var Ur = "Portal", en = a.forwardRef((e, t) => {
|
|
633
|
-
var
|
|
633
|
+
var c;
|
|
634
634
|
const { container: n, ...r } = e, [o, i] = a.useState(!1);
|
|
635
635
|
te(() => i(!0), []);
|
|
636
|
-
const
|
|
637
|
-
return
|
|
636
|
+
const s = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
|
|
637
|
+
return s ? ur.createPortal(/* @__PURE__ */ C(G.div, { ...r, ref: t }), s) : null;
|
|
638
638
|
});
|
|
639
639
|
en.displayName = Ur;
|
|
640
640
|
var Ue = 0;
|
|
@@ -707,11 +707,11 @@ function Qr(e, t) {
|
|
|
707
707
|
return Gr(function() {
|
|
708
708
|
var r = Tt.get(n);
|
|
709
709
|
if (r) {
|
|
710
|
-
var o = new Set(r), i = new Set(e),
|
|
711
|
-
o.forEach(function(
|
|
712
|
-
i.has(
|
|
713
|
-
}), i.forEach(function(
|
|
714
|
-
o.has(
|
|
710
|
+
var o = new Set(r), i = new Set(e), s = n.current;
|
|
711
|
+
o.forEach(function(c) {
|
|
712
|
+
i.has(c) || Ye(c, null);
|
|
713
|
+
}), i.forEach(function(c) {
|
|
714
|
+
o.has(c) || Ye(c, s);
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
Tt.set(n, e);
|
|
@@ -729,21 +729,21 @@ function eo(e, t) {
|
|
|
729
729
|
return n.length ? n[n.length - 1] : e;
|
|
730
730
|
},
|
|
731
731
|
useMedium: function(i) {
|
|
732
|
-
var
|
|
733
|
-
return n.push(
|
|
734
|
-
n = n.filter(function(
|
|
735
|
-
return
|
|
732
|
+
var s = t(i, r);
|
|
733
|
+
return n.push(s), function() {
|
|
734
|
+
n = n.filter(function(c) {
|
|
735
|
+
return c !== s;
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
738
|
},
|
|
739
739
|
assignSyncMedium: function(i) {
|
|
740
740
|
for (r = !0; n.length; ) {
|
|
741
|
-
var
|
|
742
|
-
n = [],
|
|
741
|
+
var s = n;
|
|
742
|
+
n = [], s.forEach(i);
|
|
743
743
|
}
|
|
744
744
|
n = {
|
|
745
|
-
push: function(
|
|
746
|
-
return i(
|
|
745
|
+
push: function(c) {
|
|
746
|
+
return i(c);
|
|
747
747
|
},
|
|
748
748
|
filter: function() {
|
|
749
749
|
return n;
|
|
@@ -752,23 +752,23 @@ function eo(e, t) {
|
|
|
752
752
|
},
|
|
753
753
|
assignMedium: function(i) {
|
|
754
754
|
r = !0;
|
|
755
|
-
var
|
|
755
|
+
var s = [];
|
|
756
756
|
if (n.length) {
|
|
757
|
-
var
|
|
758
|
-
n = [],
|
|
757
|
+
var c = n;
|
|
758
|
+
n = [], c.forEach(i), s = n;
|
|
759
759
|
}
|
|
760
760
|
var u = function() {
|
|
761
|
-
var f =
|
|
762
|
-
|
|
761
|
+
var f = s;
|
|
762
|
+
s = [], f.forEach(i);
|
|
763
763
|
}, l = function() {
|
|
764
764
|
return Promise.resolve().then(u);
|
|
765
765
|
};
|
|
766
766
|
l(), n = {
|
|
767
767
|
push: function(f) {
|
|
768
|
-
|
|
768
|
+
s.push(f), l();
|
|
769
769
|
},
|
|
770
770
|
filter: function(f) {
|
|
771
|
-
return
|
|
771
|
+
return s = s.filter(f), n;
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
774
|
}
|
|
@@ -799,12 +799,12 @@ var rn = to(), Xe = function() {
|
|
|
799
799
|
onScrollCapture: Xe,
|
|
800
800
|
onWheelCapture: Xe,
|
|
801
801
|
onTouchMoveCapture: Xe
|
|
802
|
-
}), o = r[0], i = r[1],
|
|
802
|
+
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, u = e.className, l = e.removeScrollBar, f = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, g = e.noIsolation, h = e.inert, v = e.allowPinchZoom, y = e.as, x = y === void 0 ? "div" : y, b = e.gapMode, w = tn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = p, A = Qr([n, t]), P = V(V({}, w), o);
|
|
803
803
|
return a.createElement(
|
|
804
804
|
a.Fragment,
|
|
805
805
|
null,
|
|
806
|
-
f && a.createElement(
|
|
807
|
-
|
|
806
|
+
f && a.createElement(E, { sideCar: rn, removeScrollBar: l, shards: d, noRelative: m, noIsolation: g, inert: h, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: b }),
|
|
807
|
+
s ? a.cloneElement(a.Children.only(c), V(V({}, P), { ref: A })) : a.createElement(x, V({}, P, { className: u, ref: A }), c)
|
|
808
808
|
);
|
|
809
809
|
});
|
|
810
810
|
We.defaultProps = {
|
|
@@ -881,11 +881,11 @@ var co = function() {
|
|
|
881
881
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
882
882
|
};
|
|
883
883
|
}, ho = on(), ue = "data-scroll-locked", po = function(e, t, n, r) {
|
|
884
|
-
var o = e.left, i = e.top,
|
|
884
|
+
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
885
885
|
return n === void 0 && (n = "margin"), `
|
|
886
886
|
.`.concat(Kr, ` {
|
|
887
887
|
overflow: hidden `).concat(r, `;
|
|
888
|
-
padding-right: `).concat(
|
|
888
|
+
padding-right: `).concat(c, "px ").concat(r, `;
|
|
889
889
|
}
|
|
890
890
|
body[`).concat(ue, `] {
|
|
891
891
|
overflow: hidden `).concat(r, `;
|
|
@@ -895,21 +895,21 @@ var co = function() {
|
|
|
895
895
|
n === "margin" && `
|
|
896
896
|
padding-left: `.concat(o, `px;
|
|
897
897
|
padding-top: `).concat(i, `px;
|
|
898
|
-
padding-right: `).concat(
|
|
898
|
+
padding-right: `).concat(s, `px;
|
|
899
899
|
margin-left:0;
|
|
900
900
|
margin-top:0;
|
|
901
|
-
margin-right: `).concat(
|
|
901
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
902
902
|
`),
|
|
903
|
-
n === "padding" && "padding-right: ".concat(
|
|
903
|
+
n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
|
|
904
904
|
].filter(Boolean).join(""), `
|
|
905
905
|
}
|
|
906
906
|
|
|
907
907
|
.`).concat(Te, ` {
|
|
908
|
-
right: `).concat(
|
|
908
|
+
right: `).concat(c, "px ").concat(r, `;
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
.`).concat(ke, ` {
|
|
912
|
-
margin-right: `).concat(
|
|
912
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
915
|
.`).concat(Te, " .").concat(Te, ` {
|
|
@@ -921,7 +921,7 @@ var co = function() {
|
|
|
921
921
|
}
|
|
922
922
|
|
|
923
923
|
body[`).concat(ue, `] {
|
|
924
|
-
`).concat(Zr, ": ").concat(
|
|
924
|
+
`).concat(Zr, ": ").concat(c, `px;
|
|
925
925
|
}
|
|
926
926
|
`);
|
|
927
927
|
}, kt = function() {
|
|
@@ -944,12 +944,12 @@ var co = function() {
|
|
|
944
944
|
}, et = !1;
|
|
945
945
|
if (typeof window < "u")
|
|
946
946
|
try {
|
|
947
|
-
var
|
|
947
|
+
var Se = Object.defineProperty({}, "passive", {
|
|
948
948
|
get: function() {
|
|
949
949
|
return et = !0, !0;
|
|
950
950
|
}
|
|
951
951
|
});
|
|
952
|
-
window.addEventListener("test",
|
|
952
|
+
window.addEventListener("test", Se, Se), window.removeEventListener("test", Se, Se);
|
|
953
953
|
} catch {
|
|
954
954
|
et = !1;
|
|
955
955
|
}
|
|
@@ -974,8 +974,8 @@ var ce = et ? { passive: !1 } : !1, go = function(e) {
|
|
|
974
974
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
975
975
|
var o = cn(e, r);
|
|
976
976
|
if (o) {
|
|
977
|
-
var i = an(e, r),
|
|
978
|
-
if (
|
|
977
|
+
var i = an(e, r), s = i[1], c = i[2];
|
|
978
|
+
if (s > c)
|
|
979
979
|
return !0;
|
|
980
980
|
}
|
|
981
981
|
r = r.parentNode;
|
|
@@ -1002,14 +1002,14 @@ var ce = et ? { passive: !1 } : !1, go = function(e) {
|
|
|
1002
1002
|
}, Eo = function(e, t) {
|
|
1003
1003
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1004
1004
|
}, Co = function(e, t, n, r, o) {
|
|
1005
|
-
var i = Eo(e, window.getComputedStyle(t).direction),
|
|
1005
|
+
var i = Eo(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, u = t.contains(c), l = !1, f = s > 0, d = 0, p = 0;
|
|
1006
1006
|
do {
|
|
1007
|
-
var m = an(e,
|
|
1008
|
-
(g || y) && cn(e,
|
|
1007
|
+
var m = an(e, c), g = m[0], h = m[1], v = m[2], y = h - v - i * g;
|
|
1008
|
+
(g || y) && cn(e, c) && (d += y, p += g), c = c.parentNode.host || c.parentNode;
|
|
1009
1009
|
} while (
|
|
1010
1010
|
// portaled content
|
|
1011
|
-
!u &&
|
|
1012
|
-
u && (t.contains(
|
|
1011
|
+
!u && c !== document.body || // self content
|
|
1012
|
+
u && (t.contains(c) || t === c)
|
|
1013
1013
|
);
|
|
1014
1014
|
return (f && Math.abs(d) < 1 || !f && Math.abs(p) < 1) && (l = !0), l;
|
|
1015
1015
|
}, Re = function(e) {
|
|
@@ -1020,16 +1020,16 @@ var ce = et ? { passive: !1 } : !1, go = function(e) {
|
|
|
1020
1020
|
return e && "current" in e ? e.current : e;
|
|
1021
1021
|
}, Po = function(e, t) {
|
|
1022
1022
|
return e[0] === t[0] && e[1] === t[1];
|
|
1023
|
-
},
|
|
1023
|
+
}, Ao = function(e) {
|
|
1024
1024
|
return `
|
|
1025
1025
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1026
1026
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1027
1027
|
`);
|
|
1028
|
-
},
|
|
1028
|
+
}, So = 0, ae = [];
|
|
1029
1029
|
function Ro(e) {
|
|
1030
|
-
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(
|
|
1030
|
+
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(So++)[0], i = a.useState(on)[0], s = a.useRef(e);
|
|
1031
1031
|
a.useEffect(function() {
|
|
1032
|
-
|
|
1032
|
+
s.current = e;
|
|
1033
1033
|
}, [e]), a.useEffect(function() {
|
|
1034
1034
|
if (e.inert) {
|
|
1035
1035
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
@@ -1043,16 +1043,16 @@ function Ro(e) {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
1045
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1046
|
-
var
|
|
1046
|
+
var c = a.useCallback(function(h, v) {
|
|
1047
1047
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
1048
|
-
return !
|
|
1049
|
-
var y = Re(h), x = n.current, b = "deltaX" in h ? h.deltaX : x[0] - y[0], w = "deltaY" in h ? h.deltaY : x[1] - y[1], E,
|
|
1050
|
-
if ("touches" in h && P === "h" &&
|
|
1048
|
+
return !s.current.allowPinchZoom;
|
|
1049
|
+
var y = Re(h), x = n.current, b = "deltaX" in h ? h.deltaX : x[0] - y[0], w = "deltaY" in h ? h.deltaY : x[1] - y[1], E, A = h.target, P = Math.abs(b) > Math.abs(w) ? "h" : "v";
|
|
1050
|
+
if ("touches" in h && P === "h" && A.type === "range")
|
|
1051
1051
|
return !1;
|
|
1052
|
-
var R = Lt(P,
|
|
1052
|
+
var R = Lt(P, A);
|
|
1053
1053
|
if (!R)
|
|
1054
1054
|
return !0;
|
|
1055
|
-
if (R ? E = P : (E = P === "v" ? "h" : "v", R = Lt(P,
|
|
1055
|
+
if (R ? E = P : (E = P === "v" ? "h" : "v", R = Lt(P, A)), !R)
|
|
1056
1056
|
return !1;
|
|
1057
1057
|
if (!r.current && "changedTouches" in h && (b || w) && (r.current = E), !E)
|
|
1058
1058
|
return !0;
|
|
@@ -1069,9 +1069,9 @@ function Ro(e) {
|
|
|
1069
1069
|
return;
|
|
1070
1070
|
}
|
|
1071
1071
|
if (!x) {
|
|
1072
|
-
var b = (
|
|
1072
|
+
var b = (s.current.shards || []).map(_t).filter(Boolean).filter(function(E) {
|
|
1073
1073
|
return E.contains(v.target);
|
|
1074
|
-
}), w = b.length > 0 ?
|
|
1074
|
+
}), w = b.length > 0 ? c(v, b[0]) : !s.current.noIsolation;
|
|
1075
1075
|
w && v.cancelable && v.preventDefault();
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
@@ -1085,9 +1085,9 @@ function Ro(e) {
|
|
|
1085
1085
|
}, []), f = a.useCallback(function(h) {
|
|
1086
1086
|
n.current = Re(h), r.current = void 0;
|
|
1087
1087
|
}, []), d = a.useCallback(function(h) {
|
|
1088
|
-
l(h.type, Dt(h), h.target,
|
|
1088
|
+
l(h.type, Dt(h), h.target, c(h, e.lockRef.current));
|
|
1089
1089
|
}, []), p = a.useCallback(function(h) {
|
|
1090
|
-
l(h.type, Re(h), h.target,
|
|
1090
|
+
l(h.type, Re(h), h.target, c(h, e.lockRef.current));
|
|
1091
1091
|
}, []);
|
|
1092
1092
|
a.useEffect(function() {
|
|
1093
1093
|
return ae.push(i), e.setCallbacks({
|
|
@@ -1104,8 +1104,8 @@ function Ro(e) {
|
|
|
1104
1104
|
return a.createElement(
|
|
1105
1105
|
a.Fragment,
|
|
1106
1106
|
null,
|
|
1107
|
-
g ? a.createElement(i, { styles:
|
|
1108
|
-
m ? a.createElement(vo, { gapMode: e.gapMode }) : null
|
|
1107
|
+
g ? a.createElement(i, { styles: Ao(o) }) : null,
|
|
1108
|
+
m ? a.createElement(vo, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
1111
|
function Oo(e) {
|
|
@@ -1137,25 +1137,25 @@ var Mo = function(e) {
|
|
|
1137
1137
|
}, ko = function(e, t, n, r) {
|
|
1138
1138
|
var o = To(t, Array.isArray(e) ? e : [e]);
|
|
1139
1139
|
Ne[n] || (Ne[n] = /* @__PURE__ */ new WeakMap());
|
|
1140
|
-
var i = Ne[n],
|
|
1141
|
-
!d ||
|
|
1140
|
+
var i = Ne[n], s = [], c = /* @__PURE__ */ new Set(), u = new Set(o), l = function(d) {
|
|
1141
|
+
!d || c.has(d) || (c.add(d), l(d.parentNode));
|
|
1142
1142
|
};
|
|
1143
1143
|
o.forEach(l);
|
|
1144
1144
|
var f = function(d) {
|
|
1145
1145
|
!d || u.has(d) || Array.prototype.forEach.call(d.children, function(p) {
|
|
1146
|
-
if (
|
|
1146
|
+
if (c.has(p))
|
|
1147
1147
|
f(p);
|
|
1148
1148
|
else
|
|
1149
1149
|
try {
|
|
1150
1150
|
var m = p.getAttribute(r), g = m !== null && m !== "false", h = (le.get(p) || 0) + 1, v = (i.get(p) || 0) + 1;
|
|
1151
|
-
le.set(p, h), i.set(p, v),
|
|
1151
|
+
le.set(p, h), i.set(p, v), s.push(p), h === 1 && g && Oe.set(p, !0), v === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
|
|
1152
1152
|
} catch (y) {
|
|
1153
1153
|
console.error("aria-hidden: cannot operate on ", p, y);
|
|
1154
1154
|
}
|
|
1155
1155
|
});
|
|
1156
1156
|
};
|
|
1157
|
-
return f(t),
|
|
1158
|
-
|
|
1157
|
+
return f(t), c.clear(), Ze++, function() {
|
|
1158
|
+
s.forEach(function(d) {
|
|
1159
1159
|
var p = le.get(d) - 1, m = i.get(d) - 1;
|
|
1160
1160
|
le.set(d, p), i.set(d, m), p || (Oe.has(d) || d.removeAttribute(r), Oe.delete(d)), m || d.removeAttribute(n);
|
|
1161
1161
|
}), Ze--, Ze || (le = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Ne = {});
|
|
@@ -1163,7 +1163,7 @@ var Mo = function(e) {
|
|
|
1163
1163
|
}, Lo = function(e, t, n) {
|
|
1164
1164
|
n === void 0 && (n = "data-aria-hidden");
|
|
1165
1165
|
var r = Array.from(Array.isArray(e) ? e : [e]), o = Mo(e);
|
|
1166
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), ko(r, o, n, "aria-hidden")) : function() {
|
|
1166
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ko(r, o, n, "aria-hidden")) : function() {
|
|
1167
1167
|
return null;
|
|
1168
1168
|
};
|
|
1169
1169
|
};
|
|
@@ -1176,13 +1176,13 @@ function Do(e) {
|
|
|
1176
1176
|
if (!Array.isArray(o) || !o.length)
|
|
1177
1177
|
return;
|
|
1178
1178
|
const i = o[0];
|
|
1179
|
-
let
|
|
1179
|
+
let s, c;
|
|
1180
1180
|
if ("borderBoxSize" in i) {
|
|
1181
1181
|
const u = i.borderBoxSize, l = Array.isArray(u) ? u[0] : u;
|
|
1182
|
-
|
|
1182
|
+
s = l.inlineSize, c = l.blockSize;
|
|
1183
1183
|
} else
|
|
1184
|
-
|
|
1185
|
-
n({ width:
|
|
1184
|
+
s = e.offsetWidth, c = e.offsetHeight;
|
|
1185
|
+
n({ width: s, height: c });
|
|
1186
1186
|
});
|
|
1187
1187
|
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
1188
1188
|
} else
|
|
@@ -1228,8 +1228,8 @@ function at(e) {
|
|
|
1228
1228
|
function Wo(e, t, n) {
|
|
1229
1229
|
n === void 0 && (n = !1);
|
|
1230
1230
|
const r = me(e), o = at(e), i = ct(o);
|
|
1231
|
-
let
|
|
1232
|
-
return t.reference[i] > t.floating[i] && (
|
|
1231
|
+
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1232
|
+
return t.reference[i] > t.floating[i] && (s = _e(s)), [s, _e(s)];
|
|
1233
1233
|
}
|
|
1234
1234
|
function Bo(e) {
|
|
1235
1235
|
const t = _e(e);
|
|
@@ -1239,14 +1239,14 @@ function nt(e) {
|
|
|
1239
1239
|
return e.replace(/start|end/g, (t) => Io[t]);
|
|
1240
1240
|
}
|
|
1241
1241
|
function $o(e, t, n) {
|
|
1242
|
-
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"],
|
|
1242
|
+
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
1243
1243
|
switch (e) {
|
|
1244
1244
|
case "top":
|
|
1245
1245
|
case "bottom":
|
|
1246
1246
|
return n ? t ? o : r : t ? r : o;
|
|
1247
1247
|
case "left":
|
|
1248
1248
|
case "right":
|
|
1249
|
-
return t ? i :
|
|
1249
|
+
return t ? i : s;
|
|
1250
1250
|
default:
|
|
1251
1251
|
return [];
|
|
1252
1252
|
}
|
|
@@ -1254,7 +1254,7 @@ function $o(e, t, n) {
|
|
|
1254
1254
|
function Ho(e, t, n, r) {
|
|
1255
1255
|
const o = me(e);
|
|
1256
1256
|
let i = $o(Z(e), n === "start", r);
|
|
1257
|
-
return o && (i = i.map((
|
|
1257
|
+
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(nt)))), i;
|
|
1258
1258
|
}
|
|
1259
1259
|
function _e(e) {
|
|
1260
1260
|
return e.replace(/left|right|bottom|top/g, (t) => Fo[t]);
|
|
@@ -1299,7 +1299,7 @@ function Ft(e, t, n) {
|
|
|
1299
1299
|
reference: r,
|
|
1300
1300
|
floating: o
|
|
1301
1301
|
} = e;
|
|
1302
|
-
const i = X(t),
|
|
1302
|
+
const i = X(t), s = at(t), c = ct(s), u = Z(t), l = i === "y", f = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
|
|
1303
1303
|
let m;
|
|
1304
1304
|
switch (u) {
|
|
1305
1305
|
case "top":
|
|
@@ -1334,10 +1334,10 @@ function Ft(e, t, n) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
switch (me(t)) {
|
|
1336
1336
|
case "start":
|
|
1337
|
-
m[
|
|
1337
|
+
m[s] -= p * (n && l ? -1 : 1);
|
|
1338
1338
|
break;
|
|
1339
1339
|
case "end":
|
|
1340
|
-
m[
|
|
1340
|
+
m[s] += p * (n && l ? -1 : 1);
|
|
1341
1341
|
break;
|
|
1342
1342
|
}
|
|
1343
1343
|
return m;
|
|
@@ -1347,9 +1347,9 @@ const Vo = async (e, t, n) => {
|
|
|
1347
1347
|
placement: r = "bottom",
|
|
1348
1348
|
strategy: o = "absolute",
|
|
1349
1349
|
middleware: i = [],
|
|
1350
|
-
platform:
|
|
1351
|
-
} = n,
|
|
1352
|
-
let l = await
|
|
1350
|
+
platform: s
|
|
1351
|
+
} = n, c = i.filter(Boolean), u = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
1352
|
+
let l = await s.getElementRects({
|
|
1353
1353
|
reference: e,
|
|
1354
1354
|
floating: t,
|
|
1355
1355
|
strategy: o
|
|
@@ -1357,11 +1357,11 @@ const Vo = async (e, t, n) => {
|
|
|
1357
1357
|
x: f,
|
|
1358
1358
|
y: d
|
|
1359
1359
|
} = Ft(l, r, u), p = r, m = {}, g = 0;
|
|
1360
|
-
for (let h = 0; h <
|
|
1360
|
+
for (let h = 0; h < c.length; h++) {
|
|
1361
1361
|
const {
|
|
1362
1362
|
name: v,
|
|
1363
1363
|
fn: y
|
|
1364
|
-
} =
|
|
1364
|
+
} = c[h], {
|
|
1365
1365
|
x,
|
|
1366
1366
|
y: b,
|
|
1367
1367
|
data: w,
|
|
@@ -1374,7 +1374,7 @@ const Vo = async (e, t, n) => {
|
|
|
1374
1374
|
strategy: o,
|
|
1375
1375
|
middlewareData: m,
|
|
1376
1376
|
rects: l,
|
|
1377
|
-
platform:
|
|
1377
|
+
platform: s,
|
|
1378
1378
|
elements: {
|
|
1379
1379
|
reference: e,
|
|
1380
1380
|
floating: t
|
|
@@ -1386,7 +1386,7 @@ const Vo = async (e, t, n) => {
|
|
|
1386
1386
|
...m[v],
|
|
1387
1387
|
...w
|
|
1388
1388
|
}
|
|
1389
|
-
}, E && g <= 50 && (g++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (l = E.rects === !0 ? await
|
|
1389
|
+
}, E && g <= 50 && (g++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (l = E.rects === !0 ? await s.getElementRects({
|
|
1390
1390
|
reference: e,
|
|
1391
1391
|
floating: t,
|
|
1392
1392
|
strategy: o
|
|
@@ -1410,8 +1410,8 @@ async function we(e, t) {
|
|
|
1410
1410
|
x: r,
|
|
1411
1411
|
y: o,
|
|
1412
1412
|
platform: i,
|
|
1413
|
-
rects:
|
|
1414
|
-
elements:
|
|
1413
|
+
rects: s,
|
|
1414
|
+
elements: c,
|
|
1415
1415
|
strategy: u
|
|
1416
1416
|
} = e, {
|
|
1417
1417
|
boundary: l = "clippingAncestors",
|
|
@@ -1419,24 +1419,24 @@ async function we(e, t) {
|
|
|
1419
1419
|
elementContext: d = "floating",
|
|
1420
1420
|
altBoundary: p = !1,
|
|
1421
1421
|
padding: m = 0
|
|
1422
|
-
} = K(t, e), g = fn(m), v =
|
|
1423
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(
|
|
1422
|
+
} = K(t, e), g = fn(m), v = c[p ? d === "floating" ? "reference" : "floating" : d], y = Fe(await i.getClippingRect({
|
|
1423
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
1424
1424
|
boundary: l,
|
|
1425
1425
|
rootBoundary: f,
|
|
1426
1426
|
strategy: u
|
|
1427
1427
|
})), x = d === "floating" ? {
|
|
1428
1428
|
x: r,
|
|
1429
1429
|
y: o,
|
|
1430
|
-
width:
|
|
1431
|
-
height:
|
|
1432
|
-
} :
|
|
1430
|
+
width: s.floating.width,
|
|
1431
|
+
height: s.floating.height
|
|
1432
|
+
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), w = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
1433
1433
|
x: 1,
|
|
1434
1434
|
y: 1
|
|
1435
1435
|
} : {
|
|
1436
1436
|
x: 1,
|
|
1437
1437
|
y: 1
|
|
1438
1438
|
}, E = Fe(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1439
|
-
elements:
|
|
1439
|
+
elements: c,
|
|
1440
1440
|
rect: x,
|
|
1441
1441
|
offsetParent: b,
|
|
1442
1442
|
strategy: u
|
|
@@ -1457,8 +1457,8 @@ const jo = (e) => ({
|
|
|
1457
1457
|
y: r,
|
|
1458
1458
|
placement: o,
|
|
1459
1459
|
rects: i,
|
|
1460
|
-
platform:
|
|
1461
|
-
elements:
|
|
1460
|
+
platform: s,
|
|
1461
|
+
elements: c,
|
|
1462
1462
|
middlewareData: u
|
|
1463
1463
|
} = t, {
|
|
1464
1464
|
element: l,
|
|
@@ -1469,9 +1469,9 @@ const jo = (e) => ({
|
|
|
1469
1469
|
const d = fn(f), p = {
|
|
1470
1470
|
x: n,
|
|
1471
1471
|
y: r
|
|
1472
|
-
}, m = at(o), g = ct(m), h = await
|
|
1473
|
-
let P =
|
|
1474
|
-
(!P || !await (
|
|
1472
|
+
}, m = at(o), g = ct(m), h = await s.getDimensions(l), v = m === "y", y = v ? "top" : "left", x = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", w = i.reference[g] + i.reference[m] - p[m] - i.floating[g], E = p[m] - i.reference[m], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1473
|
+
let P = A ? A[b] : 0;
|
|
1474
|
+
(!P || !await (s.isElement == null ? void 0 : s.isElement(A))) && (P = c.floating[b] || i.floating[g]);
|
|
1475
1475
|
const R = w / 2 - E / 2, N = P / 2 - h[g] / 2 - 1, O = ne(d[y], N), I = ne(d[x], N), W = O, M = P - h[g] - I, F = P / 2 - h[g] / 2 + R, k = tt(W, F, M), L = !u.arrow && me(o) != null && F !== k && i.reference[g] / 2 - (F < W ? O : I) - h[g] / 2 < 0, D = L ? F < W ? F - W : F - M : 0;
|
|
1476
1476
|
return {
|
|
1477
1477
|
[m]: p[m] + D,
|
|
@@ -1494,8 +1494,8 @@ const jo = (e) => ({
|
|
|
1494
1494
|
const {
|
|
1495
1495
|
placement: o,
|
|
1496
1496
|
middlewareData: i,
|
|
1497
|
-
rects:
|
|
1498
|
-
initialPlacement:
|
|
1497
|
+
rects: s,
|
|
1498
|
+
initialPlacement: c,
|
|
1499
1499
|
platform: u,
|
|
1500
1500
|
elements: l
|
|
1501
1501
|
} = t, {
|
|
@@ -1509,12 +1509,12 @@ const jo = (e) => ({
|
|
|
1509
1509
|
} = K(e, t);
|
|
1510
1510
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
1511
1511
|
return {};
|
|
1512
|
-
const y = Z(o), x = X(
|
|
1513
|
-
!p &&
|
|
1514
|
-
const P = [
|
|
1512
|
+
const y = Z(o), x = X(c), b = Z(c) === c, w = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), E = p || (b || !h ? [_e(c)] : Bo(c)), A = g !== "none";
|
|
1513
|
+
!p && A && E.push(...Ho(c, h, g, w));
|
|
1514
|
+
const P = [c, ...E], R = await we(t, v), N = [];
|
|
1515
1515
|
let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
1516
1516
|
if (f && N.push(R[y]), d) {
|
|
1517
|
-
const k = Wo(o,
|
|
1517
|
+
const k = Wo(o, s, w);
|
|
1518
1518
|
N.push(R[k[0]], R[k[1]]);
|
|
1519
1519
|
}
|
|
1520
1520
|
if (O = [...O, {
|
|
@@ -1525,8 +1525,8 @@ const jo = (e) => ({
|
|
|
1525
1525
|
const k = (((I = i.flip) == null ? void 0 : I.index) || 0) + 1, L = P[k];
|
|
1526
1526
|
if (L) {
|
|
1527
1527
|
var M;
|
|
1528
|
-
const
|
|
1529
|
-
if (!
|
|
1528
|
+
const S = d === "alignment" ? x !== X(L) : !1, T = ((M = O[0]) == null ? void 0 : M.overflows[0]) > 0;
|
|
1529
|
+
if (!S || T)
|
|
1530
1530
|
return {
|
|
1531
1531
|
data: {
|
|
1532
1532
|
index: k,
|
|
@@ -1537,13 +1537,13 @@ const jo = (e) => ({
|
|
|
1537
1537
|
}
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
|
-
let D = (W = O.filter((
|
|
1540
|
+
let D = (W = O.filter((S) => S.overflows[0] <= 0).sort((S, T) => S.overflows[1] - T.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
1541
1541
|
if (!D)
|
|
1542
1542
|
switch (m) {
|
|
1543
1543
|
case "bestFit": {
|
|
1544
1544
|
var F;
|
|
1545
|
-
const
|
|
1546
|
-
if (
|
|
1545
|
+
const S = (F = O.filter((T) => {
|
|
1546
|
+
if (A) {
|
|
1547
1547
|
const _ = X(T.placement);
|
|
1548
1548
|
return _ === x || // Create a bias to the `y` side axis due to horizontal
|
|
1549
1549
|
// reading directions favoring greater width.
|
|
@@ -1551,11 +1551,11 @@ const jo = (e) => ({
|
|
|
1551
1551
|
}
|
|
1552
1552
|
return !0;
|
|
1553
1553
|
}).map((T) => [T.placement, T.overflows.filter((_) => _ > 0).reduce((_, se) => _ + se, 0)]).sort((T, _) => T[1] - _[1])[0]) == null ? void 0 : F[0];
|
|
1554
|
-
|
|
1554
|
+
S && (D = S);
|
|
1555
1555
|
break;
|
|
1556
1556
|
}
|
|
1557
1557
|
case "initialPlacement":
|
|
1558
|
-
D =
|
|
1558
|
+
D = c;
|
|
1559
1559
|
break;
|
|
1560
1560
|
}
|
|
1561
1561
|
if (o !== D)
|
|
@@ -1596,11 +1596,11 @@ const Yo = function(e) {
|
|
|
1596
1596
|
const i = await we(t, {
|
|
1597
1597
|
...o,
|
|
1598
1598
|
elementContext: "reference"
|
|
1599
|
-
}),
|
|
1599
|
+
}), s = It(i, n.reference);
|
|
1600
1600
|
return {
|
|
1601
1601
|
data: {
|
|
1602
|
-
referenceHiddenOffsets:
|
|
1603
|
-
referenceHidden: Wt(
|
|
1602
|
+
referenceHiddenOffsets: s,
|
|
1603
|
+
referenceHidden: Wt(s)
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
@@ -1608,11 +1608,11 @@ const Yo = function(e) {
|
|
|
1608
1608
|
const i = await we(t, {
|
|
1609
1609
|
...o,
|
|
1610
1610
|
altBoundary: !0
|
|
1611
|
-
}),
|
|
1611
|
+
}), s = It(i, n.floating);
|
|
1612
1612
|
return {
|
|
1613
1613
|
data: {
|
|
1614
|
-
escapedOffsets:
|
|
1615
|
-
escaped: Wt(
|
|
1614
|
+
escapedOffsets: s,
|
|
1615
|
+
escaped: Wt(s)
|
|
1616
1616
|
}
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
@@ -1627,7 +1627,7 @@ async function Xo(e, t) {
|
|
|
1627
1627
|
placement: n,
|
|
1628
1628
|
platform: r,
|
|
1629
1629
|
elements: o
|
|
1630
|
-
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)),
|
|
1630
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Z(n), c = me(n), u = X(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = i && u ? -1 : 1, d = K(t, e);
|
|
1631
1631
|
let {
|
|
1632
1632
|
mainAxis: p,
|
|
1633
1633
|
crossAxis: m,
|
|
@@ -1641,7 +1641,7 @@ async function Xo(e, t) {
|
|
|
1641
1641
|
crossAxis: d.crossAxis || 0,
|
|
1642
1642
|
alignmentAxis: d.alignmentAxis
|
|
1643
1643
|
};
|
|
1644
|
-
return
|
|
1644
|
+
return c && typeof g == "number" && (m = c === "end" ? g * -1 : g), u ? {
|
|
1645
1645
|
x: m * f,
|
|
1646
1646
|
y: p * l
|
|
1647
1647
|
} : {
|
|
@@ -1658,15 +1658,15 @@ const Ko = function(e) {
|
|
|
1658
1658
|
const {
|
|
1659
1659
|
x: o,
|
|
1660
1660
|
y: i,
|
|
1661
|
-
placement:
|
|
1662
|
-
middlewareData:
|
|
1661
|
+
placement: s,
|
|
1662
|
+
middlewareData: c
|
|
1663
1663
|
} = t, u = await Xo(t, e);
|
|
1664
|
-
return
|
|
1664
|
+
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
1665
1665
|
x: o + u.x,
|
|
1666
1666
|
y: i + u.y,
|
|
1667
1667
|
data: {
|
|
1668
1668
|
...u,
|
|
1669
|
-
placement:
|
|
1669
|
+
placement: s
|
|
1670
1670
|
}
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
@@ -1682,8 +1682,8 @@ const Ko = function(e) {
|
|
|
1682
1682
|
placement: o
|
|
1683
1683
|
} = t, {
|
|
1684
1684
|
mainAxis: i = !0,
|
|
1685
|
-
crossAxis:
|
|
1686
|
-
limiter:
|
|
1685
|
+
crossAxis: s = !1,
|
|
1686
|
+
limiter: c = {
|
|
1687
1687
|
fn: (v) => {
|
|
1688
1688
|
let {
|
|
1689
1689
|
x: y,
|
|
@@ -1705,11 +1705,11 @@ const Ko = function(e) {
|
|
|
1705
1705
|
const v = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", x = m + f[v], b = m - f[y];
|
|
1706
1706
|
m = tt(x, m, b);
|
|
1707
1707
|
}
|
|
1708
|
-
if (
|
|
1708
|
+
if (s) {
|
|
1709
1709
|
const v = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", x = g + f[v], b = g - f[y];
|
|
1710
1710
|
g = tt(x, g, b);
|
|
1711
1711
|
}
|
|
1712
|
-
const h =
|
|
1712
|
+
const h = c.fn({
|
|
1713
1713
|
...t,
|
|
1714
1714
|
[p]: m,
|
|
1715
1715
|
[d]: g
|
|
@@ -1721,7 +1721,7 @@ const Ko = function(e) {
|
|
|
1721
1721
|
y: h.y - r,
|
|
1722
1722
|
enabled: {
|
|
1723
1723
|
[p]: i,
|
|
1724
|
-
[d]:
|
|
1724
|
+
[d]: s
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
1727
|
};
|
|
@@ -1736,9 +1736,9 @@ const Ko = function(e) {
|
|
|
1736
1736
|
y: r,
|
|
1737
1737
|
placement: o,
|
|
1738
1738
|
rects: i,
|
|
1739
|
-
middlewareData:
|
|
1739
|
+
middlewareData: s
|
|
1740
1740
|
} = t, {
|
|
1741
|
-
offset:
|
|
1741
|
+
offset: c = 0,
|
|
1742
1742
|
mainAxis: u = !0,
|
|
1743
1743
|
crossAxis: l = !0
|
|
1744
1744
|
} = K(e, t), f = {
|
|
@@ -1746,7 +1746,7 @@ const Ko = function(e) {
|
|
|
1746
1746
|
y: r
|
|
1747
1747
|
}, d = X(o), p = st(d);
|
|
1748
1748
|
let m = f[p], g = f[d];
|
|
1749
|
-
const h = K(
|
|
1749
|
+
const h = K(c, t), v = typeof h == "number" ? {
|
|
1750
1750
|
mainAxis: h,
|
|
1751
1751
|
crossAxis: 0
|
|
1752
1752
|
} : {
|
|
@@ -1760,8 +1760,8 @@ const Ko = function(e) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
if (l) {
|
|
1762
1762
|
var y, x;
|
|
1763
|
-
const b = p === "y" ? "width" : "height", w = ["top", "left"].includes(Z(o)), E = i.reference[d] - i.floating[b] + (w && ((y =
|
|
1764
|
-
g < E ? g = E : g >
|
|
1763
|
+
const b = p === "y" ? "width" : "height", w = ["top", "left"].includes(Z(o)), E = i.reference[d] - i.floating[b] + (w && ((y = s.offset) == null ? void 0 : y[d]) || 0) + (w ? 0 : v.crossAxis), A = i.reference[d] + i.reference[b] + (w ? 0 : ((x = s.offset) == null ? void 0 : x[d]) || 0) - (w ? v.crossAxis : 0);
|
|
1764
|
+
g < E ? g = E : g > A && (g = A);
|
|
1765
1765
|
}
|
|
1766
1766
|
return {
|
|
1767
1767
|
[p]: m,
|
|
@@ -1778,8 +1778,8 @@ const Ko = function(e) {
|
|
|
1778
1778
|
const {
|
|
1779
1779
|
placement: o,
|
|
1780
1780
|
rects: i,
|
|
1781
|
-
platform:
|
|
1782
|
-
elements:
|
|
1781
|
+
platform: s,
|
|
1782
|
+
elements: c
|
|
1783
1783
|
} = t, {
|
|
1784
1784
|
apply: u = () => {
|
|
1785
1785
|
},
|
|
@@ -1789,10 +1789,10 @@ const Ko = function(e) {
|
|
|
1789
1789
|
height: h
|
|
1790
1790
|
} = i.floating;
|
|
1791
1791
|
let v, y;
|
|
1792
|
-
d === "top" || d === "bottom" ? (v = d, y = p === (await (
|
|
1793
|
-
const x = h - f.top - f.bottom, b = g - f.left - f.right, w = ne(h - f[v], x), E = ne(g - f[y], b),
|
|
1792
|
+
d === "top" || d === "bottom" ? (v = d, y = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (y = d, v = p === "end" ? "top" : "bottom");
|
|
1793
|
+
const x = h - f.top - f.bottom, b = g - f.left - f.right, w = ne(h - f[v], x), E = ne(g - f[y], b), A = !t.middlewareData.shift;
|
|
1794
1794
|
let P = w, R = E;
|
|
1795
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = b), (r = t.middlewareData.shift) != null && r.enabled.y && (P = x),
|
|
1795
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = b), (r = t.middlewareData.shift) != null && r.enabled.y && (P = x), A && !p) {
|
|
1796
1796
|
const O = B(f.left, 0), I = B(f.right, 0), W = B(f.top, 0), M = B(f.bottom, 0);
|
|
1797
1797
|
m ? R = g - 2 * (O !== 0 || I !== 0 ? O + I : B(f.left, f.right)) : P = h - 2 * (W !== 0 || M !== 0 ? W + M : B(f.top, f.bottom));
|
|
1798
1798
|
}
|
|
@@ -1801,7 +1801,7 @@ const Ko = function(e) {
|
|
|
1801
1801
|
availableWidth: R,
|
|
1802
1802
|
availableHeight: P
|
|
1803
1803
|
});
|
|
1804
|
-
const N = await
|
|
1804
|
+
const N = await s.getDimensions(c.floating);
|
|
1805
1805
|
return g !== N.width || h !== N.height ? {
|
|
1806
1806
|
reset: {
|
|
1807
1807
|
rects: !0
|
|
@@ -1909,10 +1909,10 @@ function hn(e) {
|
|
|
1909
1909
|
function be(e, t, n) {
|
|
1910
1910
|
var r;
|
|
1911
1911
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1912
|
-
const o = hn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body),
|
|
1912
|
+
const o = hn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = $(o);
|
|
1913
1913
|
if (i) {
|
|
1914
|
-
const
|
|
1915
|
-
return t.concat(
|
|
1914
|
+
const c = rt(s);
|
|
1915
|
+
return t.concat(s, s.visualViewport || [], Ee(o) ? o : [], c && n ? be(c) : []);
|
|
1916
1916
|
}
|
|
1917
1917
|
return t.concat(o, be(o, [], n));
|
|
1918
1918
|
}
|
|
@@ -1922,11 +1922,11 @@ function rt(e) {
|
|
|
1922
1922
|
function pn(e) {
|
|
1923
1923
|
const t = z(e);
|
|
1924
1924
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1925
|
-
const o = U(e), i = o ? e.offsetWidth : n,
|
|
1926
|
-
return
|
|
1925
|
+
const o = U(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = De(n) !== i || De(r) !== s;
|
|
1926
|
+
return c && (n = i, r = s), {
|
|
1927
1927
|
width: n,
|
|
1928
1928
|
height: r,
|
|
1929
|
-
$:
|
|
1929
|
+
$: c
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
1932
|
function ft(e) {
|
|
@@ -1941,10 +1941,10 @@ function fe(e) {
|
|
|
1941
1941
|
height: o,
|
|
1942
1942
|
$: i
|
|
1943
1943
|
} = pn(t);
|
|
1944
|
-
let
|
|
1945
|
-
return (!
|
|
1946
|
-
x:
|
|
1947
|
-
y:
|
|
1944
|
+
let s = (i ? De(n.width) : n.width) / r, c = (i ? De(n.height) : n.height) / o;
|
|
1945
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1946
|
+
x: s,
|
|
1947
|
+
y: c
|
|
1948
1948
|
};
|
|
1949
1949
|
}
|
|
1950
1950
|
const ei = /* @__PURE__ */ j(0);
|
|
@@ -1961,10 +1961,10 @@ function ti(e, t, n) {
|
|
|
1961
1961
|
function ie(e, t, n, r) {
|
|
1962
1962
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1963
1963
|
const o = e.getBoundingClientRect(), i = ft(e);
|
|
1964
|
-
let
|
|
1965
|
-
t && (r ? H(r) && (
|
|
1966
|
-
const
|
|
1967
|
-
let u = (o.left +
|
|
1964
|
+
let s = j(1);
|
|
1965
|
+
t && (r ? H(r) && (s = fe(r)) : s = fe(e));
|
|
1966
|
+
const c = ti(i, n, r) ? mn(i) : j(0);
|
|
1967
|
+
let u = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, f = o.width / s.x, d = o.height / s.y;
|
|
1968
1968
|
if (i) {
|
|
1969
1969
|
const p = $(i), m = r && H(r) ? $(r) : r;
|
|
1970
1970
|
let g = p, h = rt(g);
|
|
@@ -2002,19 +2002,19 @@ function ni(e) {
|
|
|
2002
2002
|
offsetParent: r,
|
|
2003
2003
|
strategy: o
|
|
2004
2004
|
} = e;
|
|
2005
|
-
const i = o === "fixed",
|
|
2006
|
-
if (r ===
|
|
2005
|
+
const i = o === "fixed", s = Y(r), c = t ? $e(t.floating) : !1;
|
|
2006
|
+
if (r === s || c && i)
|
|
2007
2007
|
return n;
|
|
2008
2008
|
let u = {
|
|
2009
2009
|
scrollLeft: 0,
|
|
2010
2010
|
scrollTop: 0
|
|
2011
2011
|
}, l = j(1);
|
|
2012
2012
|
const f = j(0), d = U(r);
|
|
2013
|
-
if ((d || !d && !i) && ((ve(r) !== "body" || Ee(
|
|
2013
|
+
if ((d || !d && !i) && ((ve(r) !== "body" || Ee(s)) && (u = He(r)), U(r))) {
|
|
2014
2014
|
const m = ie(r);
|
|
2015
2015
|
l = fe(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop;
|
|
2016
2016
|
}
|
|
2017
|
-
const p =
|
|
2017
|
+
const p = s && !d && !i ? vn(s, u, !0) : j(0);
|
|
2018
2018
|
return {
|
|
2019
2019
|
width: n.width * l.x,
|
|
2020
2020
|
height: n.height * l.y,
|
|
@@ -2027,35 +2027,35 @@ function ri(e) {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
function oi(e) {
|
|
2029
2029
|
const t = Y(e), n = He(e), r = e.ownerDocument.body, o = B(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = B(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
2030
|
-
let
|
|
2031
|
-
const
|
|
2032
|
-
return z(r).direction === "rtl" && (
|
|
2030
|
+
let s = -n.scrollLeft + dt(e);
|
|
2031
|
+
const c = -n.scrollTop;
|
|
2032
|
+
return z(r).direction === "rtl" && (s += B(t.clientWidth, r.clientWidth) - o), {
|
|
2033
2033
|
width: o,
|
|
2034
2034
|
height: i,
|
|
2035
|
-
x:
|
|
2036
|
-
y:
|
|
2035
|
+
x: s,
|
|
2036
|
+
y: c
|
|
2037
2037
|
};
|
|
2038
2038
|
}
|
|
2039
2039
|
function ii(e, t) {
|
|
2040
2040
|
const n = $(e), r = Y(e), o = n.visualViewport;
|
|
2041
|
-
let i = r.clientWidth,
|
|
2041
|
+
let i = r.clientWidth, s = r.clientHeight, c = 0, u = 0;
|
|
2042
2042
|
if (o) {
|
|
2043
|
-
i = o.width,
|
|
2043
|
+
i = o.width, s = o.height;
|
|
2044
2044
|
const l = ut();
|
|
2045
|
-
(!l || l && t === "fixed") && (
|
|
2045
|
+
(!l || l && t === "fixed") && (c = o.offsetLeft, u = o.offsetTop);
|
|
2046
2046
|
}
|
|
2047
2047
|
return {
|
|
2048
2048
|
width: i,
|
|
2049
|
-
height:
|
|
2050
|
-
x:
|
|
2049
|
+
height: s,
|
|
2050
|
+
x: c,
|
|
2051
2051
|
y: u
|
|
2052
2052
|
};
|
|
2053
2053
|
}
|
|
2054
2054
|
function si(e, t) {
|
|
2055
|
-
const n = ie(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? fe(e) : j(1),
|
|
2055
|
+
const n = ie(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? fe(e) : j(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, u = o * i.x, l = r * i.y;
|
|
2056
2056
|
return {
|
|
2057
|
-
width:
|
|
2058
|
-
height:
|
|
2057
|
+
width: s,
|
|
2058
|
+
height: c,
|
|
2059
2059
|
x: u,
|
|
2060
2060
|
y: l
|
|
2061
2061
|
};
|
|
@@ -2087,12 +2087,12 @@ function ci(e, t) {
|
|
|
2087
2087
|
const n = t.get(e);
|
|
2088
2088
|
if (n)
|
|
2089
2089
|
return n;
|
|
2090
|
-
let r = be(e, [], !1).filter((
|
|
2090
|
+
let r = be(e, [], !1).filter((c) => H(c) && ve(c) !== "body"), o = null;
|
|
2091
2091
|
const i = z(e).position === "fixed";
|
|
2092
|
-
let
|
|
2093
|
-
for (; H(
|
|
2094
|
-
const
|
|
2095
|
-
!u &&
|
|
2092
|
+
let s = i ? re(e) : e;
|
|
2093
|
+
for (; H(s) && !he(s); ) {
|
|
2094
|
+
const c = z(s), u = lt(s);
|
|
2095
|
+
!u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Ee(s) && !u && gn(e, s)) ? r = r.filter((f) => f !== s) : o = c, s = re(s);
|
|
2096
2096
|
}
|
|
2097
2097
|
return t.set(e, r), r;
|
|
2098
2098
|
}
|
|
@@ -2103,10 +2103,10 @@ function ai(e) {
|
|
|
2103
2103
|
rootBoundary: r,
|
|
2104
2104
|
strategy: o
|
|
2105
2105
|
} = e;
|
|
2106
|
-
const
|
|
2106
|
+
const s = [...n === "clippingAncestors" ? $e(t) ? [] : ci(t, this._c) : [].concat(n), r], c = s[0], u = s.reduce((l, f) => {
|
|
2107
2107
|
const d = $t(t, f, o);
|
|
2108
2108
|
return l.top = B(d.top, l.top), l.right = ne(d.right, l.right), l.bottom = ne(d.bottom, l.bottom), l.left = B(d.left, l.left), l;
|
|
2109
|
-
}, $t(t,
|
|
2109
|
+
}, $t(t, c, o));
|
|
2110
2110
|
return {
|
|
2111
2111
|
width: u.right - u.left,
|
|
2112
2112
|
height: u.bottom - u.top,
|
|
@@ -2125,8 +2125,8 @@ function li(e) {
|
|
|
2125
2125
|
};
|
|
2126
2126
|
}
|
|
2127
2127
|
function ui(e, t, n) {
|
|
2128
|
-
const r = U(t), o = Y(t), i = n === "fixed",
|
|
2129
|
-
let
|
|
2128
|
+
const r = U(t), o = Y(t), i = n === "fixed", s = ie(e, !0, i, t);
|
|
2129
|
+
let c = {
|
|
2130
2130
|
scrollLeft: 0,
|
|
2131
2131
|
scrollTop: 0
|
|
2132
2132
|
};
|
|
@@ -2135,17 +2135,17 @@ function ui(e, t, n) {
|
|
|
2135
2135
|
u.x = dt(o);
|
|
2136
2136
|
}
|
|
2137
2137
|
if (r || !r && !i)
|
|
2138
|
-
if ((ve(t) !== "body" || Ee(o)) && (
|
|
2138
|
+
if ((ve(t) !== "body" || Ee(o)) && (c = He(t)), r) {
|
|
2139
2139
|
const m = ie(t, !0, i, t);
|
|
2140
2140
|
u.x = m.x + t.clientLeft, u.y = m.y + t.clientTop;
|
|
2141
2141
|
} else o && l();
|
|
2142
2142
|
i && !r && o && l();
|
|
2143
|
-
const f = o && !r && !i ? vn(o,
|
|
2143
|
+
const f = o && !r && !i ? vn(o, c) : j(0), d = s.left + c.scrollLeft - u.x - f.x, p = s.top + c.scrollTop - u.y - f.y;
|
|
2144
2144
|
return {
|
|
2145
2145
|
x: d,
|
|
2146
2146
|
y: p,
|
|
2147
|
-
width:
|
|
2148
|
-
height:
|
|
2147
|
+
width: s.width,
|
|
2148
|
+
height: s.height
|
|
2149
2149
|
};
|
|
2150
2150
|
}
|
|
2151
2151
|
function qe(e) {
|
|
@@ -2211,34 +2211,34 @@ function pi(e, t) {
|
|
|
2211
2211
|
let n = null, r;
|
|
2212
2212
|
const o = Y(e);
|
|
2213
2213
|
function i() {
|
|
2214
|
-
var
|
|
2215
|
-
clearTimeout(r), (
|
|
2214
|
+
var c;
|
|
2215
|
+
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
2216
2216
|
}
|
|
2217
|
-
function c
|
|
2218
|
-
|
|
2217
|
+
function s(c, u) {
|
|
2218
|
+
c === void 0 && (c = !1), u === void 0 && (u = 1), i();
|
|
2219
2219
|
const l = e.getBoundingClientRect(), {
|
|
2220
2220
|
left: f,
|
|
2221
2221
|
top: d,
|
|
2222
2222
|
width: p,
|
|
2223
2223
|
height: m
|
|
2224
2224
|
} = l;
|
|
2225
|
-
if (
|
|
2225
|
+
if (c || t(), !p || !m)
|
|
2226
2226
|
return;
|
|
2227
2227
|
const g = Me(d), h = Me(o.clientWidth - (f + p)), v = Me(o.clientHeight - (d + m)), y = Me(f), b = {
|
|
2228
2228
|
rootMargin: -g + "px " + -h + "px " + -v + "px " + -y + "px",
|
|
2229
2229
|
threshold: B(0, ne(1, u)) || 1
|
|
2230
2230
|
};
|
|
2231
2231
|
let w = !0;
|
|
2232
|
-
function E(
|
|
2233
|
-
const P =
|
|
2232
|
+
function E(A) {
|
|
2233
|
+
const P = A[0].intersectionRatio;
|
|
2234
2234
|
if (P !== u) {
|
|
2235
2235
|
if (!w)
|
|
2236
|
-
return
|
|
2237
|
-
P ?
|
|
2238
|
-
|
|
2236
|
+
return s();
|
|
2237
|
+
P ? s(!1, P) : r = setTimeout(() => {
|
|
2238
|
+
s(!1, 1e-7);
|
|
2239
2239
|
}, 1e3);
|
|
2240
2240
|
}
|
|
2241
|
-
P === 1 && !wn(l, e.getBoundingClientRect()) &&
|
|
2241
|
+
P === 1 && !wn(l, e.getBoundingClientRect()) && s(), w = !1;
|
|
2242
2242
|
}
|
|
2243
2243
|
try {
|
|
2244
2244
|
n = new IntersectionObserver(E, {
|
|
@@ -2251,15 +2251,15 @@ function pi(e, t) {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
n.observe(e);
|
|
2253
2253
|
}
|
|
2254
|
-
return
|
|
2254
|
+
return s(!0), i;
|
|
2255
2255
|
}
|
|
2256
2256
|
function mi(e, t, n, r) {
|
|
2257
2257
|
r === void 0 && (r = {});
|
|
2258
2258
|
const {
|
|
2259
2259
|
ancestorScroll: o = !0,
|
|
2260
2260
|
ancestorResize: i = !0,
|
|
2261
|
-
elementResize:
|
|
2262
|
-
layoutShift:
|
|
2261
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
2262
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
2263
2263
|
animationFrame: u = !1
|
|
2264
2264
|
} = r, l = ft(e), f = o || i ? [...l ? be(l) : [], ...be(t)] : [];
|
|
2265
2265
|
f.forEach((y) => {
|
|
@@ -2267,9 +2267,9 @@ function mi(e, t, n, r) {
|
|
|
2267
2267
|
passive: !0
|
|
2268
2268
|
}), i && y.addEventListener("resize", n);
|
|
2269
2269
|
});
|
|
2270
|
-
const d = l &&
|
|
2270
|
+
const d = l && c ? pi(l, n) : null;
|
|
2271
2271
|
let p = -1, m = null;
|
|
2272
|
-
|
|
2272
|
+
s && (m = new ResizeObserver((y) => {
|
|
2273
2273
|
let [x] = y;
|
|
2274
2274
|
x && x.target === l && m && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
2275
2275
|
var b;
|
|
@@ -2355,9 +2355,9 @@ function Ci(e) {
|
|
|
2355
2355
|
platform: o,
|
|
2356
2356
|
elements: {
|
|
2357
2357
|
reference: i,
|
|
2358
|
-
floating:
|
|
2358
|
+
floating: s
|
|
2359
2359
|
} = {},
|
|
2360
|
-
transform:
|
|
2360
|
+
transform: c = !0,
|
|
2361
2361
|
whileElementsMounted: u,
|
|
2362
2362
|
open: l
|
|
2363
2363
|
} = e, [f, d] = a.useState({
|
|
@@ -2369,19 +2369,19 @@ function Ci(e) {
|
|
|
2369
2369
|
isPositioned: !1
|
|
2370
2370
|
}), [p, m] = a.useState(r);
|
|
2371
2371
|
Ie(p, r) || m(r);
|
|
2372
|
-
const [g, h] = a.useState(null), [v, y] = a.useState(null), x = a.useCallback((
|
|
2373
|
-
|
|
2374
|
-
}, []), b = a.useCallback((
|
|
2375
|
-
|
|
2376
|
-
}, []), w = i || g, E =
|
|
2377
|
-
if (!
|
|
2372
|
+
const [g, h] = a.useState(null), [v, y] = a.useState(null), x = a.useCallback((S) => {
|
|
2373
|
+
S !== A.current && (A.current = S, h(S));
|
|
2374
|
+
}, []), b = a.useCallback((S) => {
|
|
2375
|
+
S !== P.current && (P.current = S, y(S));
|
|
2376
|
+
}, []), w = i || g, E = s || v, A = a.useRef(null), P = a.useRef(null), R = a.useRef(f), N = u != null, O = Ge(u), I = Ge(o), W = Ge(l), M = a.useCallback(() => {
|
|
2377
|
+
if (!A.current || !P.current)
|
|
2378
2378
|
return;
|
|
2379
|
-
const
|
|
2379
|
+
const S = {
|
|
2380
2380
|
placement: t,
|
|
2381
2381
|
strategy: n,
|
|
2382
2382
|
middleware: p
|
|
2383
2383
|
};
|
|
2384
|
-
I.current && (
|
|
2384
|
+
I.current && (S.platform = I.current), Ei(A.current, P.current, S).then((T) => {
|
|
2385
2385
|
const _ = {
|
|
2386
2386
|
...T,
|
|
2387
2387
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -2396,8 +2396,8 @@ function Ci(e) {
|
|
|
2396
2396
|
});
|
|
2397
2397
|
}, [p, t, n, I, W]);
|
|
2398
2398
|
Le(() => {
|
|
2399
|
-
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, d((
|
|
2400
|
-
...
|
|
2399
|
+
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, d((S) => ({
|
|
2400
|
+
...S,
|
|
2401
2401
|
isPositioned: !1
|
|
2402
2402
|
})));
|
|
2403
2403
|
}, [l]);
|
|
@@ -2405,14 +2405,14 @@ function Ci(e) {
|
|
|
2405
2405
|
Le(() => (F.current = !0, () => {
|
|
2406
2406
|
F.current = !1;
|
|
2407
2407
|
}), []), Le(() => {
|
|
2408
|
-
if (w && (
|
|
2408
|
+
if (w && (A.current = w), E && (P.current = E), w && E) {
|
|
2409
2409
|
if (O.current)
|
|
2410
2410
|
return O.current(w, E, M);
|
|
2411
2411
|
M();
|
|
2412
2412
|
}
|
|
2413
2413
|
}, [w, E, M, O, N]);
|
|
2414
2414
|
const k = a.useMemo(() => ({
|
|
2415
|
-
reference:
|
|
2415
|
+
reference: A,
|
|
2416
2416
|
floating: P,
|
|
2417
2417
|
setReference: x,
|
|
2418
2418
|
setFloating: b
|
|
@@ -2420,16 +2420,16 @@ function Ci(e) {
|
|
|
2420
2420
|
reference: w,
|
|
2421
2421
|
floating: E
|
|
2422
2422
|
}), [w, E]), D = a.useMemo(() => {
|
|
2423
|
-
const
|
|
2423
|
+
const S = {
|
|
2424
2424
|
position: n,
|
|
2425
2425
|
left: 0,
|
|
2426
2426
|
top: 0
|
|
2427
2427
|
};
|
|
2428
2428
|
if (!L.floating)
|
|
2429
|
-
return
|
|
2429
|
+
return S;
|
|
2430
2430
|
const T = Vt(L.floating, f.x), _ = Vt(L.floating, f.y);
|
|
2431
|
-
return
|
|
2432
|
-
...
|
|
2431
|
+
return c ? {
|
|
2432
|
+
...S,
|
|
2433
2433
|
transform: "translate(" + T + "px, " + _ + "px)",
|
|
2434
2434
|
...bn(L.floating) >= 1.5 && {
|
|
2435
2435
|
willChange: "transform"
|
|
@@ -2439,7 +2439,7 @@ function Ci(e) {
|
|
|
2439
2439
|
left: T,
|
|
2440
2440
|
top: _
|
|
2441
2441
|
};
|
|
2442
|
-
}, [n,
|
|
2442
|
+
}, [n, c, L.floating, f.x, f.y]);
|
|
2443
2443
|
return a.useMemo(() => ({
|
|
2444
2444
|
...f,
|
|
2445
2445
|
update: M,
|
|
@@ -2469,10 +2469,10 @@ const Pi = (e) => {
|
|
|
2469
2469
|
}).fn(n) : {};
|
|
2470
2470
|
}
|
|
2471
2471
|
};
|
|
2472
|
-
},
|
|
2472
|
+
}, Ai = (e, t) => ({
|
|
2473
2473
|
...vi(e),
|
|
2474
2474
|
options: [e, t]
|
|
2475
|
-
}),
|
|
2475
|
+
}), Si = (e, t) => ({
|
|
2476
2476
|
...gi(e),
|
|
2477
2477
|
options: [e, t]
|
|
2478
2478
|
}), Ri = (e, t) => ({
|
|
@@ -2507,20 +2507,20 @@ var ki = "Arrow", xn = a.forwardRef((e, t) => {
|
|
|
2507
2507
|
);
|
|
2508
2508
|
});
|
|
2509
2509
|
xn.displayName = ki;
|
|
2510
|
-
var Li = xn, ht = "Popper", [En, Cn] = Kt(ht), [Di, Pn] = En(ht),
|
|
2510
|
+
var Li = xn, ht = "Popper", [En, Cn] = Kt(ht), [Di, Pn] = En(ht), An = (e) => {
|
|
2511
2511
|
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
2512
2512
|
return /* @__PURE__ */ C(Di, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
2513
2513
|
};
|
|
2514
|
-
|
|
2515
|
-
var
|
|
2514
|
+
An.displayName = ht;
|
|
2515
|
+
var Sn = "PopperAnchor", Rn = a.forwardRef(
|
|
2516
2516
|
(e, t) => {
|
|
2517
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Pn(
|
|
2517
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Pn(Sn, n), s = a.useRef(null), c = q(t, s);
|
|
2518
2518
|
return a.useEffect(() => {
|
|
2519
|
-
i.onAnchorChange((r == null ? void 0 : r.current) ||
|
|
2520
|
-
}), r ? null : /* @__PURE__ */ C(G.div, { ...o, ref:
|
|
2519
|
+
i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
|
|
2520
|
+
}), r ? null : /* @__PURE__ */ C(G.div, { ...o, ref: c });
|
|
2521
2521
|
}
|
|
2522
2522
|
);
|
|
2523
|
-
Rn.displayName =
|
|
2523
|
+
Rn.displayName = Sn;
|
|
2524
2524
|
var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
2525
2525
|
(e, t) => {
|
|
2526
2526
|
var vt, gt, yt, wt, bt, xt;
|
|
@@ -2529,8 +2529,8 @@ var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
|
2529
2529
|
side: r = "bottom",
|
|
2530
2530
|
sideOffset: o = 0,
|
|
2531
2531
|
align: i = "center",
|
|
2532
|
-
alignOffset:
|
|
2533
|
-
arrowPadding:
|
|
2532
|
+
alignOffset: s = 0,
|
|
2533
|
+
arrowPadding: c = 0,
|
|
2534
2534
|
avoidCollisions: u = !0,
|
|
2535
2535
|
collisionBoundary: l = [],
|
|
2536
2536
|
collisionPadding: f = 0,
|
|
@@ -2539,12 +2539,12 @@ var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
|
2539
2539
|
updatePositionStrategy: m = "optimized",
|
|
2540
2540
|
onPlaced: g,
|
|
2541
2541
|
...h
|
|
2542
|
-
} = e, v = Pn(pt, n), [y, x] = a.useState(null), b = q(t, (ge) => x(ge)), [w, E] = a.useState(null),
|
|
2542
|
+
} = e, v = Pn(pt, n), [y, x] = a.useState(null), b = q(t, (ge) => x(ge)), [w, E] = a.useState(null), A = Do(w), P = (A == null ? void 0 : A.width) ?? 0, R = (A == null ? void 0 : A.height) ?? 0, N = r + (i !== "center" ? "-" + i : ""), O = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, I = Array.isArray(l) ? l : [l], W = I.length > 0, M = {
|
|
2543
2543
|
padding: O,
|
|
2544
2544
|
boundary: I.filter(Wi),
|
|
2545
2545
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2546
2546
|
altBoundary: W
|
|
2547
|
-
}, { refs: F, floatingStyles: k, placement: L, isPositioned: D, middlewareData:
|
|
2547
|
+
}, { refs: F, floatingStyles: k, placement: L, isPositioned: D, middlewareData: S } = Ci({
|
|
2548
2548
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2549
2549
|
strategy: "fixed",
|
|
2550
2550
|
placement: N,
|
|
@@ -2555,8 +2555,8 @@ var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
|
2555
2555
|
reference: v.anchor
|
|
2556
2556
|
},
|
|
2557
2557
|
middleware: [
|
|
2558
|
-
|
|
2559
|
-
u &&
|
|
2558
|
+
Ai({ mainAxis: o + R, alignmentAxis: s }),
|
|
2559
|
+
u && Si({
|
|
2560
2560
|
mainAxis: !0,
|
|
2561
2561
|
crossAxis: !1,
|
|
2562
2562
|
limiter: d === "partial" ? Ri() : void 0,
|
|
@@ -2570,7 +2570,7 @@ var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
|
2570
2570
|
Pe.setProperty("--radix-popper-available-width", `${Zn}px`), Pe.setProperty("--radix-popper-available-height", `${qn}px`), Pe.setProperty("--radix-popper-anchor-width", `${Gn}px`), Pe.setProperty("--radix-popper-anchor-height", `${Qn}px`);
|
|
2571
2571
|
}
|
|
2572
2572
|
}),
|
|
2573
|
-
w && Ti({ element: w, padding:
|
|
2573
|
+
w && Ti({ element: w, padding: c }),
|
|
2574
2574
|
Bi({ arrowWidth: P, arrowHeight: R }),
|
|
2575
2575
|
p && Mi({ strategy: "referenceHidden", ...M })
|
|
2576
2576
|
]
|
|
@@ -2578,7 +2578,7 @@ var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
|
2578
2578
|
te(() => {
|
|
2579
2579
|
D && (se == null || se());
|
|
2580
2580
|
}, [D, se]);
|
|
2581
|
-
const jn = (vt =
|
|
2581
|
+
const jn = (vt = S.arrow) == null ? void 0 : vt.x, Un = (gt = S.arrow) == null ? void 0 : gt.y, Yn = ((yt = S.arrow) == null ? void 0 : yt.centerOffset) !== 0, [Xn, Kn] = a.useState();
|
|
2582
2582
|
return te(() => {
|
|
2583
2583
|
y && Kn(window.getComputedStyle(y).zIndex);
|
|
2584
2584
|
}, [y]), /* @__PURE__ */ C(
|
|
@@ -2593,13 +2593,13 @@ var pt = "PopperContent", [_i, Fi] = En(pt), On = a.forwardRef(
|
|
|
2593
2593
|
minWidth: "max-content",
|
|
2594
2594
|
zIndex: Xn,
|
|
2595
2595
|
"--radix-popper-transform-origin": [
|
|
2596
|
-
(wt =
|
|
2597
|
-
(bt =
|
|
2596
|
+
(wt = S.transformOrigin) == null ? void 0 : wt.x,
|
|
2597
|
+
(bt = S.transformOrigin) == null ? void 0 : bt.y
|
|
2598
2598
|
].join(" "),
|
|
2599
2599
|
// hide the content if using the hide middleware and should be hidden
|
|
2600
2600
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2601
2601
|
// as if the PopperContent isn't there at all
|
|
2602
|
-
...((xt =
|
|
2602
|
+
...((xt = S.hide) == null ? void 0 : xt.referenceHidden) && {
|
|
2603
2603
|
visibility: "hidden",
|
|
2604
2604
|
pointerEvents: "none"
|
|
2605
2605
|
}
|
|
@@ -2642,7 +2642,7 @@ var Nn = "PopperArrow", Ii = {
|
|
|
2642
2642
|
bottom: "top",
|
|
2643
2643
|
left: "right"
|
|
2644
2644
|
}, Mn = a.forwardRef(function(t, n) {
|
|
2645
|
-
const { __scopePopper: r, ...o } = t, i = Fi(Nn, r),
|
|
2645
|
+
const { __scopePopper: r, ...o } = t, i = Fi(Nn, r), s = Ii[i.placedSide];
|
|
2646
2646
|
return (
|
|
2647
2647
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2648
2648
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2655,7 +2655,7 @@ var Nn = "PopperArrow", Ii = {
|
|
|
2655
2655
|
position: "absolute",
|
|
2656
2656
|
left: i.arrowX,
|
|
2657
2657
|
top: i.arrowY,
|
|
2658
|
-
[
|
|
2658
|
+
[s]: 0,
|
|
2659
2659
|
transformOrigin: {
|
|
2660
2660
|
top: "",
|
|
2661
2661
|
right: "0 0",
|
|
@@ -2695,16 +2695,16 @@ var Bi = (e) => ({
|
|
|
2695
2695
|
options: e,
|
|
2696
2696
|
fn(t) {
|
|
2697
2697
|
var v, y, x;
|
|
2698
|
-
const { placement: n, rects: r, middlewareData: o } = t,
|
|
2698
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, u = s ? 0 : e.arrowHeight, [l, f] = Tn(n), d = { start: "0%", center: "50%", end: "100%" }[f], p = (((y = o.arrow) == null ? void 0 : y.x) ?? 0) + c / 2, m = (((x = o.arrow) == null ? void 0 : x.y) ?? 0) + u / 2;
|
|
2699
2699
|
let g = "", h = "";
|
|
2700
|
-
return l === "bottom" ? (g =
|
|
2700
|
+
return l === "bottom" ? (g = s ? d : `${p}px`, h = `${-u}px`) : l === "top" ? (g = s ? d : `${p}px`, h = `${r.floating.height + u}px`) : l === "right" ? (g = `${-u}px`, h = s ? d : `${m}px`) : l === "left" && (g = `${r.floating.width + u}px`, h = s ? d : `${m}px`), { data: { x: g, y: h } };
|
|
2701
2701
|
}
|
|
2702
2702
|
});
|
|
2703
2703
|
function Tn(e) {
|
|
2704
2704
|
const [t, n = "center"] = e.split("-");
|
|
2705
2705
|
return [t, n];
|
|
2706
2706
|
}
|
|
2707
|
-
var $i =
|
|
2707
|
+
var $i = An, kn = Rn, Hi = On, zi = Mn, ze = "Popover", [Ln, ms] = Kt(ze, [
|
|
2708
2708
|
Cn
|
|
2709
2709
|
]), Ce = Cn(), [Vi, oe] = Ln(ze), Dn = (e) => {
|
|
2710
2710
|
const {
|
|
@@ -2713,14 +2713,14 @@ var $i = Sn, kn = Rn, Hi = On, zi = Mn, ze = "Popover", [Ln, ms] = Kt(ze, [
|
|
|
2713
2713
|
open: r,
|
|
2714
2714
|
defaultOpen: o,
|
|
2715
2715
|
onOpenChange: i,
|
|
2716
|
-
modal:
|
|
2717
|
-
} = e,
|
|
2716
|
+
modal: s = !1
|
|
2717
|
+
} = e, c = Ce(t), u = a.useRef(null), [l, f] = a.useState(!1), [d, p] = xr({
|
|
2718
2718
|
prop: r,
|
|
2719
2719
|
defaultProp: o ?? !1,
|
|
2720
2720
|
onChange: i,
|
|
2721
2721
|
caller: ze
|
|
2722
2722
|
});
|
|
2723
|
-
return /* @__PURE__ */ C($i, { ...
|
|
2723
|
+
return /* @__PURE__ */ C($i, { ...c, children: /* @__PURE__ */ C(
|
|
2724
2724
|
Vi,
|
|
2725
2725
|
{
|
|
2726
2726
|
scope: t,
|
|
@@ -2732,7 +2732,7 @@ var $i = Sn, kn = Rn, Hi = On, zi = Mn, ze = "Popover", [Ln, ms] = Kt(ze, [
|
|
|
2732
2732
|
hasCustomAnchor: l,
|
|
2733
2733
|
onCustomAnchorAdd: a.useCallback(() => f(!0), []),
|
|
2734
2734
|
onCustomAnchorRemove: a.useCallback(() => f(!1), []),
|
|
2735
|
-
modal:
|
|
2735
|
+
modal: s,
|
|
2736
2736
|
children: n
|
|
2737
2737
|
}
|
|
2738
2738
|
) });
|
|
@@ -2740,14 +2740,14 @@ var $i = Sn, kn = Rn, Hi = On, zi = Mn, ze = "Popover", [Ln, ms] = Kt(ze, [
|
|
|
2740
2740
|
Dn.displayName = ze;
|
|
2741
2741
|
var _n = "PopoverAnchor", Fn = a.forwardRef(
|
|
2742
2742
|
(e, t) => {
|
|
2743
|
-
const { __scopePopover: n, ...r } = e, o = oe(_n, n), i = Ce(n), { onCustomAnchorAdd:
|
|
2744
|
-
return a.useEffect(() => (
|
|
2743
|
+
const { __scopePopover: n, ...r } = e, o = oe(_n, n), i = Ce(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = o;
|
|
2744
|
+
return a.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ C(kn, { ...i, ...r, ref: t });
|
|
2745
2745
|
}
|
|
2746
2746
|
);
|
|
2747
2747
|
Fn.displayName = _n;
|
|
2748
2748
|
var In = "PopoverTrigger", Wn = a.forwardRef(
|
|
2749
2749
|
(e, t) => {
|
|
2750
|
-
const { __scopePopover: n, ...r } = e, o = oe(In, n), i = Ce(n),
|
|
2750
|
+
const { __scopePopover: n, ...r } = e, o = oe(In, n), i = Ce(n), s = q(t, o.triggerRef), c = /* @__PURE__ */ C(
|
|
2751
2751
|
G.button,
|
|
2752
2752
|
{
|
|
2753
2753
|
type: "button",
|
|
@@ -2756,11 +2756,11 @@ var In = "PopoverTrigger", Wn = a.forwardRef(
|
|
|
2756
2756
|
"aria-controls": o.contentId,
|
|
2757
2757
|
"data-state": Vn(o.open),
|
|
2758
2758
|
...r,
|
|
2759
|
-
ref:
|
|
2759
|
+
ref: s,
|
|
2760
2760
|
onClick: ee(e.onClick, o.onOpenToggle)
|
|
2761
2761
|
}
|
|
2762
2762
|
);
|
|
2763
|
-
return o.hasCustomAnchor ?
|
|
2763
|
+
return o.hasCustomAnchor ? c : /* @__PURE__ */ C(kn, { asChild: !0, ...i, children: c });
|
|
2764
2764
|
}
|
|
2765
2765
|
);
|
|
2766
2766
|
Wn.displayName = In;
|
|
@@ -2782,8 +2782,8 @@ var Yi = /* @__PURE__ */ Xt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2782
2782
|
(e, t) => {
|
|
2783
2783
|
const n = oe(pe, e.__scopePopover), r = a.useRef(null), o = q(t, r), i = a.useRef(!1);
|
|
2784
2784
|
return a.useEffect(() => {
|
|
2785
|
-
const
|
|
2786
|
-
if (
|
|
2785
|
+
const s = r.current;
|
|
2786
|
+
if (s) return Lo(s);
|
|
2787
2787
|
}, []), /* @__PURE__ */ C(ln, { as: Yi, allowPinchZoom: !0, children: /* @__PURE__ */ C(
|
|
2788
2788
|
Hn,
|
|
2789
2789
|
{
|
|
@@ -2791,21 +2791,21 @@ var Yi = /* @__PURE__ */ Xt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2791
2791
|
ref: o,
|
|
2792
2792
|
trapFocus: n.open,
|
|
2793
2793
|
disableOutsidePointerEvents: !0,
|
|
2794
|
-
onCloseAutoFocus: ee(e.onCloseAutoFocus, (
|
|
2795
|
-
var
|
|
2796
|
-
|
|
2794
|
+
onCloseAutoFocus: ee(e.onCloseAutoFocus, (s) => {
|
|
2795
|
+
var c;
|
|
2796
|
+
s.preventDefault(), i.current || (c = n.triggerRef.current) == null || c.focus();
|
|
2797
2797
|
}),
|
|
2798
2798
|
onPointerDownOutside: ee(
|
|
2799
2799
|
e.onPointerDownOutside,
|
|
2800
|
-
(
|
|
2801
|
-
const
|
|
2800
|
+
(s) => {
|
|
2801
|
+
const c = s.detail.originalEvent, u = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || u;
|
|
2802
2802
|
i.current = l;
|
|
2803
2803
|
},
|
|
2804
2804
|
{ checkForDefaultPrevented: !1 }
|
|
2805
2805
|
),
|
|
2806
2806
|
onFocusOutside: ee(
|
|
2807
2807
|
e.onFocusOutside,
|
|
2808
|
-
(
|
|
2808
|
+
(s) => s.preventDefault(),
|
|
2809
2809
|
{ checkForDefaultPrevented: !1 }
|
|
2810
2810
|
)
|
|
2811
2811
|
}
|
|
@@ -2822,14 +2822,14 @@ var Yi = /* @__PURE__ */ Xt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2822
2822
|
trapFocus: !1,
|
|
2823
2823
|
disableOutsidePointerEvents: !1,
|
|
2824
2824
|
onCloseAutoFocus: (i) => {
|
|
2825
|
-
var
|
|
2826
|
-
(
|
|
2825
|
+
var s, c;
|
|
2826
|
+
(s = e.onCloseAutoFocus) == null || s.call(e, i), i.defaultPrevented || (r.current || (c = n.triggerRef.current) == null || c.focus(), i.preventDefault()), r.current = !1, o.current = !1;
|
|
2827
2827
|
},
|
|
2828
2828
|
onInteractOutside: (i) => {
|
|
2829
2829
|
var u, l;
|
|
2830
2830
|
(u = e.onInteractOutside) == null || u.call(e, i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
2831
|
-
const
|
|
2832
|
-
((l = n.triggerRef.current) == null ? void 0 : l.contains(
|
|
2831
|
+
const s = i.target;
|
|
2832
|
+
((l = n.triggerRef.current) == null ? void 0 : l.contains(s)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
|
|
2833
2833
|
}
|
|
2834
2834
|
}
|
|
2835
2835
|
);
|
|
@@ -2841,8 +2841,8 @@ var Yi = /* @__PURE__ */ Xt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2841
2841
|
trapFocus: r,
|
|
2842
2842
|
onOpenAutoFocus: o,
|
|
2843
2843
|
onCloseAutoFocus: i,
|
|
2844
|
-
disableOutsidePointerEvents:
|
|
2845
|
-
onEscapeKeyDown:
|
|
2844
|
+
disableOutsidePointerEvents: s,
|
|
2845
|
+
onEscapeKeyDown: c,
|
|
2846
2846
|
onPointerDownOutside: u,
|
|
2847
2847
|
onFocusOutside: l,
|
|
2848
2848
|
onInteractOutside: f,
|
|
@@ -2860,9 +2860,9 @@ var Yi = /* @__PURE__ */ Xt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2860
2860
|
qt,
|
|
2861
2861
|
{
|
|
2862
2862
|
asChild: !0,
|
|
2863
|
-
disableOutsidePointerEvents:
|
|
2863
|
+
disableOutsidePointerEvents: s,
|
|
2864
2864
|
onInteractOutside: f,
|
|
2865
|
-
onEscapeKeyDown:
|
|
2865
|
+
onEscapeKeyDown: c,
|
|
2866
2866
|
onPointerDownOutside: u,
|
|
2867
2867
|
onFocusOutside: l,
|
|
2868
2868
|
onDismiss: () => p.onOpenChange(!1),
|