@elevenlabs/convai-widget-core 0.5.1 → 0.5.2
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/contexts/widget-config.d.ts +1 -1
- package/dist/index.js +300 -297
- package/dist/mocks/browser.d.ts +2 -2
- package/dist/types/config.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import De, { useContext as ia, createContext as de, useMemo as Ae, useRef as ee,
|
|
|
8
8
|
import { signal as he, computed as Ce, useSignal as J, useComputed as Y, useSignalEffect as Ee } from "@preact/signals";
|
|
9
9
|
import { Conversation as ca, postOverallFeedback as Vn } from "@elevenlabs/client";
|
|
10
10
|
import { clsx as V } from "clsx";
|
|
11
|
-
import { jsx as T, jsxs as Nt, Fragment as
|
|
11
|
+
import { jsx as T, jsxs as Nt, Fragment as mn } from "preact/compat/jsx-runtime";
|
|
12
12
|
import { useMemo as ua, useCallback as Be } from "preact/hooks";
|
|
13
13
|
function Re(e) {
|
|
14
14
|
return e ? e === "true" ? !0 : e === "false" ? !1 : null : null;
|
|
@@ -56,7 +56,7 @@ const pa = [
|
|
|
56
56
|
function ha(e) {
|
|
57
57
|
return pa.includes(e) ? e : "bottom-right";
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const gr = {
|
|
60
60
|
main_label: "Need help?",
|
|
61
61
|
start_call: "Start a call",
|
|
62
62
|
start_chat: "Start a chat",
|
|
@@ -91,8 +91,8 @@ const mr = {
|
|
|
91
91
|
submit: "Submit",
|
|
92
92
|
go_back: "Go back"
|
|
93
93
|
}, va = Object.keys(
|
|
94
|
-
|
|
95
|
-
),
|
|
94
|
+
gr
|
|
95
|
+
), mr = {
|
|
96
96
|
base: "#ffffff",
|
|
97
97
|
base_hover: "#f9fafb",
|
|
98
98
|
base_active: "#f3f4f6",
|
|
@@ -113,10 +113,10 @@ const mr = {
|
|
|
113
113
|
sheet_radius: "calc(var(--el-button-radius) + 6px)",
|
|
114
114
|
compact_sheet_radius: "calc(var(--el-button-radius) + 12px)",
|
|
115
115
|
dropdown_sheet_radius: "calc(var(--el-input-radius) + 6px)"
|
|
116
|
-
},
|
|
117
|
-
|
|
116
|
+
}, ga = Object.keys(
|
|
117
|
+
mr
|
|
118
118
|
);
|
|
119
|
-
function
|
|
119
|
+
function ma(e = "us") {
|
|
120
120
|
switch (e) {
|
|
121
121
|
case "eu-residency":
|
|
122
122
|
case "in-residency":
|
|
@@ -163,7 +163,7 @@ function xa({
|
|
|
163
163
|
children: e
|
|
164
164
|
}) {
|
|
165
165
|
const t = B("server-location"), n = Ae(() => {
|
|
166
|
-
const r = Ce(() =>
|
|
166
|
+
const r = Ce(() => ma(t.value)), o = {
|
|
167
167
|
us: "https://api.us.elevenlabs.io",
|
|
168
168
|
"eu-residency": "https://api.eu.residency.elevenlabs.io",
|
|
169
169
|
"in-residency": "https://api.in.residency.elevenlabs.io",
|
|
@@ -257,7 +257,7 @@ function ya({
|
|
|
257
257
|
function at() {
|
|
258
258
|
return fe(xr);
|
|
259
259
|
}
|
|
260
|
-
const Ca = "0.5.
|
|
260
|
+
const Ca = "0.5.2", yr = de(null);
|
|
261
261
|
function Sa({ children: e }) {
|
|
262
262
|
const t = q(), n = Y(
|
|
263
263
|
() => t.value.mic_muting_enabled ?? !1
|
|
@@ -304,20 +304,20 @@ function ka({
|
|
|
304
304
|
if (l.value)
|
|
305
305
|
try {
|
|
306
306
|
return JSON.parse(l.value);
|
|
307
|
-
} catch (
|
|
307
|
+
} catch (g) {
|
|
308
308
|
console.error(
|
|
309
|
-
`[ConversationalAI] Cannot parse dynamic-variables: ${
|
|
309
|
+
`[ConversationalAI] Cannot parse dynamic-variables: ${g == null ? void 0 : g.message}`
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
|
-
}), { webSocketUrl: d } = wn(), p = B("agent-id"), v = B("signed-url"),
|
|
313
|
-
const
|
|
312
|
+
}), { webSocketUrl: d } = wn(), p = B("agent-id"), v = B("signed-url"), m = bn(), x = Ia(), f = Y(() => {
|
|
313
|
+
const g = x.value, w = {
|
|
314
314
|
dynamicVariables: c.value,
|
|
315
315
|
overrides: s.value,
|
|
316
316
|
connectionDelay: { default: 300 },
|
|
317
|
-
textOnly:
|
|
317
|
+
textOnly: m.value,
|
|
318
318
|
userId: i.value || void 0
|
|
319
319
|
};
|
|
320
|
-
return p.value ?
|
|
320
|
+
return p.value ? g ? {
|
|
321
321
|
agentId: p.value,
|
|
322
322
|
origin: d.value,
|
|
323
323
|
connectionType: "webrtc",
|
|
@@ -408,15 +408,15 @@ function _a() {
|
|
|
408
408
|
var d;
|
|
409
409
|
(d = e.current) == null || d.endSession();
|
|
410
410
|
}, []), Ae(() => {
|
|
411
|
-
const d = he("disconnected"), p = Ce(() => d.value === "disconnected"), v = he("listening"),
|
|
411
|
+
const d = he("disconnected"), p = Ce(() => d.value === "disconnected"), v = he("listening"), m = Ce(() => v.value === "speaking"), x = he(null), f = he(null), g = he(!1), w = he([]), b = he(0), y = he(null);
|
|
412
412
|
return {
|
|
413
413
|
status: d,
|
|
414
|
-
isSpeaking:
|
|
414
|
+
isSpeaking: m,
|
|
415
415
|
mode: v,
|
|
416
416
|
isDisconnected: p,
|
|
417
417
|
lastId: f,
|
|
418
418
|
error: x,
|
|
419
|
-
canSendFeedback:
|
|
419
|
+
canSendFeedback: g,
|
|
420
420
|
conversationIndex: b,
|
|
421
421
|
conversationTextOnly: y,
|
|
422
422
|
transcript: w,
|
|
@@ -463,7 +463,7 @@ function _a() {
|
|
|
463
463
|
d.value = _.status;
|
|
464
464
|
},
|
|
465
465
|
onCanSendFeedbackChange: (_) => {
|
|
466
|
-
|
|
466
|
+
g.value = _.canSendFeedback;
|
|
467
467
|
},
|
|
468
468
|
onMessage: ({ source: _, message: O }) => {
|
|
469
469
|
if (i.peek() && y.peek() === !0 && _ === "ai" && !n.current) {
|
|
@@ -639,10 +639,10 @@ function Ra({ children: e }) {
|
|
|
639
639
|
y.abort();
|
|
640
640
|
};
|
|
641
641
|
});
|
|
642
|
-
const i = B("variant"), s = B("placement"), l = B("terms-key"), c = B("mic-muting"), d = B("transcript"), p = B("text-input"), v = B("default-expanded"),
|
|
642
|
+
const i = B("variant"), s = B("placement"), l = B("terms-key"), c = B("mic-muting"), d = B("transcript"), p = B("text-input"), v = B("default-expanded"), m = B("always-expanded"), x = B("override-text-only"), f = B("use-rtc"), g = Y(() => {
|
|
643
643
|
if (!a.value)
|
|
644
644
|
return null;
|
|
645
|
-
const w = i.value ?? a.value.variant, b = s.value ?? a.value.placement, y = l.value ?? a.value.terms_key, C = Re(x.value) ?? a.value.text_only ?? !1, S = Re(c.value) ?? a.value.mic_muting_enabled, E = Re(d.value) ?? a.value.transcript_enabled, k = Re(p.value) ?? a.value.text_input_enabled, I = Re(
|
|
645
|
+
const w = i.value ?? a.value.variant, b = s.value ?? a.value.placement, y = l.value ?? a.value.terms_key, C = Re(x.value) ?? a.value.text_only ?? !1, S = Re(c.value) ?? a.value.mic_muting_enabled, E = Re(d.value) ?? a.value.transcript_enabled, k = Re(p.value) ?? a.value.text_input_enabled, I = Re(m.value) ?? a.value.always_expanded ?? !1, D = Re(v.value) ?? a.value.default_expanded ?? !1, L = Re(f.value) ?? a.value.use_rtc ?? !1;
|
|
646
646
|
return {
|
|
647
647
|
...a.value,
|
|
648
648
|
variant: fa(w),
|
|
@@ -656,7 +656,7 @@ function Ra({ children: e }) {
|
|
|
656
656
|
use_rtc: L
|
|
657
657
|
};
|
|
658
658
|
});
|
|
659
|
-
return
|
|
659
|
+
return g.value ? /* @__PURE__ */ u(Tr.Provider, { value: g, children: e }) : null;
|
|
660
660
|
}
|
|
661
661
|
function q() {
|
|
662
662
|
return fe(Tr);
|
|
@@ -686,7 +686,10 @@ function Ia() {
|
|
|
686
686
|
}
|
|
687
687
|
function Na() {
|
|
688
688
|
const e = q();
|
|
689
|
-
return Y(() =>
|
|
689
|
+
return Y(() => {
|
|
690
|
+
var t;
|
|
691
|
+
return ((t = e.value.end_feedback) == null ? void 0 : t.type) ?? null;
|
|
692
|
+
});
|
|
690
693
|
}
|
|
691
694
|
async function Oa(e, t, n, r) {
|
|
692
695
|
const a = await (await fetch(
|
|
@@ -703,8 +706,8 @@ const La = vr(function() {
|
|
|
703
706
|
const t = q(), n = Y(() => {
|
|
704
707
|
const r = t.value.styles;
|
|
705
708
|
return `:host, :root {
|
|
706
|
-
${
|
|
707
|
-
(o) => `${Ma(o)}: ${Da((r == null ? void 0 : r[o]) ??
|
|
709
|
+
${ga.map(
|
|
710
|
+
(o) => `${Ma(o)}: ${Da((r == null ? void 0 : r[o]) ?? mr[o])};`
|
|
708
711
|
).join(`
|
|
709
712
|
`)}
|
|
710
713
|
}`;
|
|
@@ -739,7 +742,7 @@ function Fa({ children: e }) {
|
|
|
739
742
|
Ce(
|
|
740
743
|
() => {
|
|
741
744
|
var s, l, c, d;
|
|
742
|
-
return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((d = t.value.text_contents) == null ? void 0 : d[i]) ??
|
|
745
|
+
return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((d = t.value.text_contents) == null ? void 0 : d[i]) ?? gr[i];
|
|
743
746
|
}
|
|
744
747
|
)
|
|
745
748
|
])
|
|
@@ -819,7 +822,7 @@ function ne(...e) {
|
|
|
819
822
|
return h.useCallback(Nr(...e), e);
|
|
820
823
|
}
|
|
821
824
|
// @__NO_SIDE_EFFECTS__
|
|
822
|
-
function
|
|
825
|
+
function mt(e) {
|
|
823
826
|
const t = /* @__PURE__ */ Wa(e), n = h.forwardRef((r, o) => {
|
|
824
827
|
const { children: a, ...i } = r, s = h.Children.toArray(a), l = s.find(Ua);
|
|
825
828
|
if (l) {
|
|
@@ -830,7 +833,7 @@ function gt(e) {
|
|
|
830
833
|
});
|
|
831
834
|
return n.displayName = `${e}.Slot`, n;
|
|
832
835
|
}
|
|
833
|
-
var Or = /* @__PURE__ */
|
|
836
|
+
var Or = /* @__PURE__ */ mt("Slot");
|
|
834
837
|
// @__NO_SIDE_EFFECTS__
|
|
835
838
|
function Wa(e) {
|
|
836
839
|
const t = h.forwardRef((n, r) => {
|
|
@@ -1236,7 +1239,7 @@ function it({ size: e = "sm", className: t }) {
|
|
|
1236
1239
|
}
|
|
1237
1240
|
let d;
|
|
1238
1241
|
function p() {
|
|
1239
|
-
const v = n(),
|
|
1242
|
+
const v = n(), m = r(), x = o.peek() ? 1 : 1 - v * 0.4, f = o.peek() ? 1 + m * 0.4 : 1;
|
|
1240
1243
|
s.current.style.transform = `scale(${f})`, l.current.style.transform = `scale(${x})`, d = requestAnimationFrame(p);
|
|
1241
1244
|
}
|
|
1242
1245
|
return p(), () => {
|
|
@@ -1651,8 +1654,8 @@ function vi({
|
|
|
1651
1654
|
}) {
|
|
1652
1655
|
const [i, s] = Ie(e), [l, c] = Ie(null), [d, p] = Ie(null), v = ee(t);
|
|
1653
1656
|
e && (v.current = t);
|
|
1654
|
-
const
|
|
1655
|
-
c(
|
|
1657
|
+
const m = te((g) => {
|
|
1658
|
+
c(g), g && !e && (g.style.width = "0px", g.style.height = "0px");
|
|
1656
1659
|
}, []);
|
|
1657
1660
|
Ue(() => {
|
|
1658
1661
|
d && (d.style.transition = "none", d.style.opacity = "0", d.offsetWidth, d.style.transition = "", d.style.opacity = "");
|
|
@@ -1667,8 +1670,8 @@ function vi({
|
|
|
1667
1670
|
]), Ue(() => {
|
|
1668
1671
|
if (!l || !d) return;
|
|
1669
1672
|
e && s(!0);
|
|
1670
|
-
const
|
|
1671
|
-
l.style.width = !e || l.offsetWidth !==
|
|
1673
|
+
const g = e ? d.offsetWidth : 0, w = e ? d.offsetHeight : 0;
|
|
1674
|
+
l.style.width = !e || l.offsetWidth !== g ? `${g}px` : "", l.style.height = !e || l.offsetHeight !== w ? `${w}px` : "";
|
|
1672
1675
|
}, [
|
|
1673
1676
|
l,
|
|
1674
1677
|
d,
|
|
@@ -1685,7 +1688,7 @@ function vi({
|
|
|
1685
1688
|
return /* @__PURE__ */ u(
|
|
1686
1689
|
"div",
|
|
1687
1690
|
{
|
|
1688
|
-
ref:
|
|
1691
|
+
ref: m,
|
|
1689
1692
|
className: V(
|
|
1690
1693
|
"relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0",
|
|
1691
1694
|
!e && "opacity-0 scale-75",
|
|
@@ -1709,7 +1712,7 @@ function vi({
|
|
|
1709
1712
|
}
|
|
1710
1713
|
);
|
|
1711
1714
|
}
|
|
1712
|
-
const
|
|
1715
|
+
const gi = {
|
|
1713
1716
|
primary: "text-accent-primary border border-accent bg-accent hover:border-accent-hover hover:bg-accent-hover active:border-accent-active active:bg-accent-active",
|
|
1714
1717
|
secondary: "text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active",
|
|
1715
1718
|
ghost: "text-base-primary border border-base bg-base hover:bg-base-hover hover:border-base-hover active:bg-base-active active:border-base-active"
|
|
@@ -1730,7 +1733,7 @@ const mi = {
|
|
|
1730
1733
|
ref: l,
|
|
1731
1734
|
className: V(
|
|
1732
1735
|
"h-9 flex px-2.5 text-sm items-center transition-colors justify-center rounded-button duration-200 focus-ring overflow-hidden select-none",
|
|
1733
|
-
|
|
1736
|
+
gi[t],
|
|
1734
1737
|
c && "min-w-9",
|
|
1735
1738
|
o
|
|
1736
1739
|
),
|
|
@@ -1784,12 +1787,12 @@ function Cn({
|
|
|
1784
1787
|
);
|
|
1785
1788
|
}
|
|
1786
1789
|
const Dr = de(null);
|
|
1787
|
-
function
|
|
1790
|
+
function mi({
|
|
1788
1791
|
children: e
|
|
1789
1792
|
}) {
|
|
1790
1793
|
const t = J(null), n = J(""), r = J("initial"), { lastId: o } = oe(), a = B("agent-id"), { serverUrl: i } = wn(), s = te(async (p) => {
|
|
1791
|
-
const v = o.value,
|
|
1792
|
-
if (!v || !
|
|
1794
|
+
const v = o.value, m = a.value;
|
|
1795
|
+
if (!v || !m) {
|
|
1793
1796
|
console.warn(
|
|
1794
1797
|
"[ConversationalAI] Cannot submit rating: missing agent_id or conversation_id"
|
|
1795
1798
|
);
|
|
@@ -1828,8 +1831,8 @@ function gi({
|
|
|
1828
1831
|
},
|
|
1829
1832
|
i.value
|
|
1830
1833
|
);
|
|
1831
|
-
} catch (
|
|
1832
|
-
console.error("[ConversationalAI] Failed to submit feedback:",
|
|
1834
|
+
} catch (m) {
|
|
1835
|
+
console.error("[ConversationalAI] Failed to submit feedback:", m);
|
|
1833
1836
|
}
|
|
1834
1837
|
}, []), c = te(() => {
|
|
1835
1838
|
t.value = null, n.value = "", r.value = "initial";
|
|
@@ -1946,17 +1949,17 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
|
|
|
1946
1949
|
},
|
|
1947
1950
|
[a, e]
|
|
1948
1951
|
), p = Be(
|
|
1949
|
-
(v,
|
|
1952
|
+
(v, m) => {
|
|
1950
1953
|
if (v.key === "Enter" || v.key === " ")
|
|
1951
|
-
v.preventDefault(), a.value =
|
|
1954
|
+
v.preventDefault(), a.value = m, e(m);
|
|
1952
1955
|
else if (v.key === "ArrowLeft" || v.key === "ArrowDown") {
|
|
1953
|
-
if (v.preventDefault(),
|
|
1954
|
-
const f = v.currentTarget,
|
|
1955
|
-
|
|
1956
|
+
if (v.preventDefault(), m - 1 >= t) {
|
|
1957
|
+
const f = v.currentTarget, g = f == null ? void 0 : f.previousElementSibling;
|
|
1958
|
+
g == null || g.focus();
|
|
1956
1959
|
}
|
|
1957
|
-
} else if ((v.key === "ArrowRight" || v.key === "ArrowUp") && (v.preventDefault(),
|
|
1958
|
-
const f = v.currentTarget,
|
|
1959
|
-
|
|
1960
|
+
} else if ((v.key === "ArrowRight" || v.key === "ArrowUp") && (v.preventDefault(), m + 1 <= n)) {
|
|
1961
|
+
const f = v.currentTarget, g = f == null ? void 0 : f.nextElementSibling;
|
|
1962
|
+
g == null || g.focus();
|
|
1960
1963
|
}
|
|
1961
1964
|
},
|
|
1962
1965
|
[a, e, t, n]
|
|
@@ -2086,7 +2089,7 @@ function Ei({ entry: e }) {
|
|
|
2086
2089
|
function Ti({ entry: e }) {
|
|
2087
2090
|
const t = G(), { lastId: n } = oe(), r = Na();
|
|
2088
2091
|
return /* @__PURE__ */ A("div", { className: "mt-3 px-8 flex flex-col", children: [
|
|
2089
|
-
r && /* @__PURE__ */ u(ki, {}),
|
|
2092
|
+
r.value === "rating" && /* @__PURE__ */ u(ki, {}),
|
|
2090
2093
|
/* @__PURE__ */ A("div", { className: "text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
|
|
2091
2094
|
e.role === "user" ? t.user_ended_conversation : t.agent_ended_conversation,
|
|
2092
2095
|
/* @__PURE__ */ u("br", {}),
|
|
@@ -2131,13 +2134,13 @@ function Ri({ scrollPinned: e, transcript: t }) {
|
|
|
2131
2134
|
}, l = () => {
|
|
2132
2135
|
const p = n.current;
|
|
2133
2136
|
if (!p || !a.current || i.current) return;
|
|
2134
|
-
const v = p.scrollTop,
|
|
2137
|
+
const v = p.scrollTop, m = p.scrollHeight - p.clientHeight, x = m - v;
|
|
2135
2138
|
if (Math.abs(x) < 1) {
|
|
2136
|
-
p.scrollTop =
|
|
2139
|
+
p.scrollTop = m, o.current = requestAnimationFrame(l);
|
|
2137
2140
|
return;
|
|
2138
2141
|
}
|
|
2139
|
-
const f = x * 0.2,
|
|
2140
|
-
p.scrollTop = v + Math.max(f,
|
|
2142
|
+
const f = x * 0.2, g = 2;
|
|
2143
|
+
p.scrollTop = v + Math.max(f, g), o.current = requestAnimationFrame(l);
|
|
2141
2144
|
}, c = () => {
|
|
2142
2145
|
!n.current || i.current || a.current || (a.current = !0, o.current = requestAnimationFrame(l));
|
|
2143
2146
|
}, d = ee(!0);
|
|
@@ -2241,20 +2244,20 @@ function Ii({
|
|
|
2241
2244
|
sendUserActivity: d,
|
|
2242
2245
|
conversationIndex: p
|
|
2243
2246
|
} = oe(), v = te(
|
|
2244
|
-
async (
|
|
2245
|
-
|
|
2247
|
+
async (g) => {
|
|
2248
|
+
g.preventDefault();
|
|
2246
2249
|
const w = n.value.trim();
|
|
2247
|
-
w && (t.value = !0, n.value = "", i.value ? await l(
|
|
2250
|
+
w && (t.value = !0, n.value = "", i.value ? await l(g.currentTarget, w) : c(w));
|
|
2248
2251
|
},
|
|
2249
2252
|
[n, t, i, l, c]
|
|
2250
|
-
),
|
|
2251
|
-
async (
|
|
2252
|
-
|
|
2253
|
+
), m = te(
|
|
2254
|
+
async (g) => {
|
|
2255
|
+
g.key === "Enter" && !g.shiftKey && await v(g);
|
|
2253
2256
|
},
|
|
2254
2257
|
[v]
|
|
2255
2258
|
), x = te(
|
|
2256
|
-
(
|
|
2257
|
-
n.value =
|
|
2259
|
+
(g) => {
|
|
2260
|
+
n.value = g.currentTarget.value;
|
|
2258
2261
|
},
|
|
2259
2262
|
[n]
|
|
2260
2263
|
), f = Y(() => !!n.value.trim());
|
|
@@ -2268,7 +2271,7 @@ function Ii({
|
|
|
2268
2271
|
value: n,
|
|
2269
2272
|
onInput: d,
|
|
2270
2273
|
onChange: x,
|
|
2271
|
-
onKeyDown:
|
|
2274
|
+
onKeyDown: m,
|
|
2272
2275
|
className: "min-w-0 w-full max-h-[8lh] pr-9",
|
|
2273
2276
|
placeholder: r.value ? i.value && p.value > 0 ? a.input_placeholder_new_conversation : a.input_placeholder_text_only : a.input_placeholder
|
|
2274
2277
|
}
|
|
@@ -2362,13 +2365,13 @@ function An(e, t = []) {
|
|
|
2362
2365
|
n = [...n, i];
|
|
2363
2366
|
const c = (p) => {
|
|
2364
2367
|
var w;
|
|
2365
|
-
const { scope: v, children:
|
|
2366
|
-
return /* @__PURE__ */ T(f.Provider, { value:
|
|
2368
|
+
const { scope: v, children: m, ...x } = p, f = ((w = v == null ? void 0 : v[e]) == null ? void 0 : w[l]) || s, g = h.useMemo(() => x, Object.values(x));
|
|
2369
|
+
return /* @__PURE__ */ T(f.Provider, { value: g, children: m });
|
|
2367
2370
|
};
|
|
2368
2371
|
c.displayName = a + "Provider";
|
|
2369
2372
|
function d(p, v) {
|
|
2370
2373
|
var f;
|
|
2371
|
-
const
|
|
2374
|
+
const m = ((f = v == null ? void 0 : v[e]) == null ? void 0 : f[l]) || s, x = h.useContext(m);
|
|
2372
2375
|
if (x) return x;
|
|
2373
2376
|
if (i !== void 0) return i;
|
|
2374
2377
|
throw new Error(`\`${p}\` must be used within \`${a}\``);
|
|
@@ -2410,37 +2413,37 @@ function Mi(e) {
|
|
|
2410
2413
|
t,
|
|
2411
2414
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
2412
2415
|
), i = (f) => {
|
|
2413
|
-
const { scope:
|
|
2414
|
-
return /* @__PURE__ */ T(o, { scope:
|
|
2416
|
+
const { scope: g, children: w } = f, b = De.useRef(null), y = De.useRef(/* @__PURE__ */ new Map()).current;
|
|
2417
|
+
return /* @__PURE__ */ T(o, { scope: g, itemMap: y, collectionRef: b, children: w });
|
|
2415
2418
|
};
|
|
2416
2419
|
i.displayName = t;
|
|
2417
|
-
const s = e + "CollectionSlot", l = /* @__PURE__ */
|
|
2418
|
-
(f,
|
|
2419
|
-
const { scope: w, children: b } = f, y = a(s, w), C = ne(
|
|
2420
|
+
const s = e + "CollectionSlot", l = /* @__PURE__ */ mt(s), c = De.forwardRef(
|
|
2421
|
+
(f, g) => {
|
|
2422
|
+
const { scope: w, children: b } = f, y = a(s, w), C = ne(g, y.collectionRef);
|
|
2420
2423
|
return /* @__PURE__ */ T(l, { ref: C, children: b });
|
|
2421
2424
|
}
|
|
2422
2425
|
);
|
|
2423
2426
|
c.displayName = s;
|
|
2424
|
-
const d = e + "CollectionItemSlot", p = "data-radix-collection-item", v = /* @__PURE__ */
|
|
2425
|
-
(f,
|
|
2426
|
-
const { scope: w, children: b, ...y } = f, C = De.useRef(null), S = ne(
|
|
2427
|
+
const d = e + "CollectionItemSlot", p = "data-radix-collection-item", v = /* @__PURE__ */ mt(d), m = De.forwardRef(
|
|
2428
|
+
(f, g) => {
|
|
2429
|
+
const { scope: w, children: b, ...y } = f, C = De.useRef(null), S = ne(g, C), E = a(d, w);
|
|
2427
2430
|
return De.useEffect(() => (E.itemMap.set(C, { ref: C, ...y }), () => void E.itemMap.delete(C))), /* @__PURE__ */ T(v, { [p]: "", ref: S, children: b });
|
|
2428
2431
|
}
|
|
2429
2432
|
);
|
|
2430
|
-
|
|
2433
|
+
m.displayName = d;
|
|
2431
2434
|
function x(f) {
|
|
2432
|
-
const
|
|
2435
|
+
const g = a(e + "CollectionConsumer", f);
|
|
2433
2436
|
return De.useCallback(() => {
|
|
2434
|
-
const b =
|
|
2437
|
+
const b = g.collectionRef.current;
|
|
2435
2438
|
if (!b) return [];
|
|
2436
2439
|
const y = Array.from(b.querySelectorAll(`[${p}]`));
|
|
2437
|
-
return Array.from(
|
|
2440
|
+
return Array.from(g.itemMap.values()).sort(
|
|
2438
2441
|
(E, k) => y.indexOf(E.ref.current) - y.indexOf(k.ref.current)
|
|
2439
2442
|
);
|
|
2440
|
-
}, [
|
|
2443
|
+
}, [g.collectionRef, g.itemMap]);
|
|
2441
2444
|
}
|
|
2442
2445
|
return [
|
|
2443
|
-
{ Provider: i, Slot: c, ItemSlot:
|
|
2446
|
+
{ Provider: i, Slot: c, ItemSlot: m },
|
|
2444
2447
|
x,
|
|
2445
2448
|
r
|
|
2446
2449
|
];
|
|
@@ -2469,7 +2472,7 @@ var Bi = [
|
|
|
2469
2472
|
"svg",
|
|
2470
2473
|
"ul"
|
|
2471
2474
|
], X = Bi.reduce((e, t) => {
|
|
2472
|
-
const n = /* @__PURE__ */
|
|
2475
|
+
const n = /* @__PURE__ */ mt(`Primitive.${t}`), r = h.forwardRef((o, a) => {
|
|
2473
2476
|
const { asChild: i, ...s } = o, l = i ? n : t;
|
|
2474
2477
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ T(l, { ...s, ref: a });
|
|
2475
2478
|
});
|
|
@@ -2510,7 +2513,7 @@ var $i = "DismissableLayer", sn = "dismissableLayer.update", Wi = "dismissableLa
|
|
|
2510
2513
|
onInteractOutside: i,
|
|
2511
2514
|
onDismiss: s,
|
|
2512
2515
|
...l
|
|
2513
|
-
} = e, c = h.useContext($r), [d, p] = h.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [,
|
|
2516
|
+
} = e, c = h.useContext($r), [d, p] = h.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = h.useState({}), x = ne(t, (k) => p(k)), f = Array.from(c.layers), [g] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = f.indexOf(g), b = d ? f.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = b >= w, S = Yi((k) => {
|
|
2514
2517
|
const I = k.target, D = [...c.branches].some((L) => L.contains(I));
|
|
2515
2518
|
!C || D || (o == null || o(k), i == null || i(k), k.defaultPrevented || s == null || s());
|
|
2516
2519
|
}, v), E = Ki((k) => {
|
|
@@ -2527,7 +2530,7 @@ var $i = "DismissableLayer", sn = "dismissableLayer.update", Wi = "dismissableLa
|
|
|
2527
2530
|
}, [d, v, n, c]), h.useEffect(() => () => {
|
|
2528
2531
|
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Yn());
|
|
2529
2532
|
}, [d, c]), h.useEffect(() => {
|
|
2530
|
-
const k = () =>
|
|
2533
|
+
const k = () => m({});
|
|
2531
2534
|
return document.addEventListener(sn, k), () => document.removeEventListener(sn, k);
|
|
2532
2535
|
}, []), /* @__PURE__ */ T(
|
|
2533
2536
|
X.div,
|
|
@@ -2632,7 +2635,7 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
2632
2635
|
onMountAutoFocus: o,
|
|
2633
2636
|
onUnmountAutoFocus: a,
|
|
2634
2637
|
...i
|
|
2635
|
-
} = e, [s, l] = h.useState(null), c = je(o), d = je(a), p = h.useRef(null), v = ne(t, (f) => l(f)),
|
|
2638
|
+
} = e, [s, l] = h.useState(null), c = je(o), d = je(a), p = h.useRef(null), v = ne(t, (f) => l(f)), m = h.useRef({
|
|
2636
2639
|
paused: !1,
|
|
2637
2640
|
pause() {
|
|
2638
2641
|
this.paused = !0;
|
|
@@ -2644,11 +2647,11 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
2644
2647
|
h.useEffect(() => {
|
|
2645
2648
|
if (r) {
|
|
2646
2649
|
let f = function(y) {
|
|
2647
|
-
if (
|
|
2650
|
+
if (m.paused || !s) return;
|
|
2648
2651
|
const C = y.target;
|
|
2649
2652
|
s.contains(C) ? p.current = C : Fe(p.current, { select: !0 });
|
|
2650
|
-
},
|
|
2651
|
-
if (
|
|
2653
|
+
}, g = function(y) {
|
|
2654
|
+
if (m.paused || !s) return;
|
|
2652
2655
|
const C = y.relatedTarget;
|
|
2653
2656
|
C !== null && (s.contains(C) || Fe(p.current, { select: !0 }));
|
|
2654
2657
|
}, w = function(y) {
|
|
@@ -2656,15 +2659,15 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
2656
2659
|
for (const S of y)
|
|
2657
2660
|
S.removedNodes.length > 0 && Fe(s);
|
|
2658
2661
|
};
|
|
2659
|
-
document.addEventListener("focusin", f), document.addEventListener("focusout",
|
|
2662
|
+
document.addEventListener("focusin", f), document.addEventListener("focusout", g);
|
|
2660
2663
|
const b = new MutationObserver(w);
|
|
2661
2664
|
return s && b.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
2662
|
-
document.removeEventListener("focusin", f), document.removeEventListener("focusout",
|
|
2665
|
+
document.removeEventListener("focusin", f), document.removeEventListener("focusout", g), b.disconnect();
|
|
2663
2666
|
};
|
|
2664
2667
|
}
|
|
2665
|
-
}, [r, s,
|
|
2668
|
+
}, [r, s, m.paused]), h.useEffect(() => {
|
|
2666
2669
|
if (s) {
|
|
2667
|
-
Gn.add(
|
|
2670
|
+
Gn.add(m);
|
|
2668
2671
|
const f = document.activeElement;
|
|
2669
2672
|
if (!s.contains(f)) {
|
|
2670
2673
|
const w = new CustomEvent(Gt, Xn);
|
|
@@ -2673,21 +2676,21 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
2673
2676
|
return () => {
|
|
2674
2677
|
s.removeEventListener(Gt, c), setTimeout(() => {
|
|
2675
2678
|
const w = new CustomEvent(qt, Xn);
|
|
2676
|
-
s.addEventListener(qt, d), s.dispatchEvent(w), w.defaultPrevented || Fe(f ?? document.body, { select: !0 }), s.removeEventListener(qt, d), Gn.remove(
|
|
2679
|
+
s.addEventListener(qt, d), s.dispatchEvent(w), w.defaultPrevented || Fe(f ?? document.body, { select: !0 }), s.removeEventListener(qt, d), Gn.remove(m);
|
|
2677
2680
|
}, 0);
|
|
2678
2681
|
};
|
|
2679
2682
|
}
|
|
2680
|
-
}, [s, c, d,
|
|
2683
|
+
}, [s, c, d, m]);
|
|
2681
2684
|
const x = h.useCallback(
|
|
2682
2685
|
(f) => {
|
|
2683
|
-
if (!n && !r ||
|
|
2684
|
-
const
|
|
2685
|
-
if (
|
|
2686
|
+
if (!n && !r || m.paused) return;
|
|
2687
|
+
const g = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, w = document.activeElement;
|
|
2688
|
+
if (g && w) {
|
|
2686
2689
|
const b = f.currentTarget, [y, C] = qi(b);
|
|
2687
2690
|
y && C ? !f.shiftKey && w === C ? (f.preventDefault(), n && Fe(y, { select: !0 })) : f.shiftKey && w === y && (f.preventDefault(), n && Fe(C, { select: !0 })) : w === b && f.preventDefault();
|
|
2688
2691
|
}
|
|
2689
2692
|
},
|
|
2690
|
-
[n, r,
|
|
2693
|
+
[n, r, m.paused]
|
|
2691
2694
|
);
|
|
2692
2695
|
return /* @__PURE__ */ T(X.div, { tabIndex: -1, ...i, ref: v, onKeyDown: x });
|
|
2693
2696
|
});
|
|
@@ -2875,47 +2878,47 @@ function er(e, t, n) {
|
|
|
2875
2878
|
floating: o
|
|
2876
2879
|
} = e;
|
|
2877
2880
|
const a = ye(t), i = In(t), s = Rn(i), l = Le(t), c = a === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, v = r[s] / 2 - o[s] / 2;
|
|
2878
|
-
let
|
|
2881
|
+
let m;
|
|
2879
2882
|
switch (l) {
|
|
2880
2883
|
case "top":
|
|
2881
|
-
|
|
2884
|
+
m = {
|
|
2882
2885
|
x: d,
|
|
2883
2886
|
y: r.y - o.height
|
|
2884
2887
|
};
|
|
2885
2888
|
break;
|
|
2886
2889
|
case "bottom":
|
|
2887
|
-
|
|
2890
|
+
m = {
|
|
2888
2891
|
x: d,
|
|
2889
2892
|
y: r.y + r.height
|
|
2890
2893
|
};
|
|
2891
2894
|
break;
|
|
2892
2895
|
case "right":
|
|
2893
|
-
|
|
2896
|
+
m = {
|
|
2894
2897
|
x: r.x + r.width,
|
|
2895
2898
|
y: p
|
|
2896
2899
|
};
|
|
2897
2900
|
break;
|
|
2898
2901
|
case "left":
|
|
2899
|
-
|
|
2902
|
+
m = {
|
|
2900
2903
|
x: r.x - o.width,
|
|
2901
2904
|
y: p
|
|
2902
2905
|
};
|
|
2903
2906
|
break;
|
|
2904
2907
|
default:
|
|
2905
|
-
|
|
2908
|
+
m = {
|
|
2906
2909
|
x: r.x,
|
|
2907
2910
|
y: r.y
|
|
2908
2911
|
};
|
|
2909
2912
|
}
|
|
2910
2913
|
switch (st(t)) {
|
|
2911
2914
|
case "start":
|
|
2912
|
-
|
|
2915
|
+
m[i] -= v * (n && c ? -1 : 1);
|
|
2913
2916
|
break;
|
|
2914
2917
|
case "end":
|
|
2915
|
-
|
|
2918
|
+
m[i] += v * (n && c ? -1 : 1);
|
|
2916
2919
|
break;
|
|
2917
2920
|
}
|
|
2918
|
-
return
|
|
2921
|
+
return m;
|
|
2919
2922
|
}
|
|
2920
2923
|
const vs = async (e, t, n) => {
|
|
2921
2924
|
const {
|
|
@@ -2931,10 +2934,10 @@ const vs = async (e, t, n) => {
|
|
|
2931
2934
|
}), {
|
|
2932
2935
|
x: d,
|
|
2933
2936
|
y: p
|
|
2934
|
-
} = er(c, r, l), v = r,
|
|
2937
|
+
} = er(c, r, l), v = r, m = {}, x = 0;
|
|
2935
2938
|
for (let f = 0; f < s.length; f++) {
|
|
2936
2939
|
const {
|
|
2937
|
-
name:
|
|
2940
|
+
name: g,
|
|
2938
2941
|
fn: w
|
|
2939
2942
|
} = s[f], {
|
|
2940
2943
|
x: b,
|
|
@@ -2947,7 +2950,7 @@ const vs = async (e, t, n) => {
|
|
|
2947
2950
|
initialPlacement: r,
|
|
2948
2951
|
placement: v,
|
|
2949
2952
|
strategy: o,
|
|
2950
|
-
middlewareData:
|
|
2953
|
+
middlewareData: m,
|
|
2951
2954
|
rects: c,
|
|
2952
2955
|
platform: i,
|
|
2953
2956
|
elements: {
|
|
@@ -2955,10 +2958,10 @@ const vs = async (e, t, n) => {
|
|
|
2955
2958
|
floating: t
|
|
2956
2959
|
}
|
|
2957
2960
|
});
|
|
2958
|
-
d = b ?? d, p = y ?? p,
|
|
2959
|
-
...
|
|
2960
|
-
[
|
|
2961
|
-
...g
|
|
2961
|
+
d = b ?? d, p = y ?? p, m = {
|
|
2962
|
+
...m,
|
|
2963
|
+
[g]: {
|
|
2964
|
+
...m[g],
|
|
2962
2965
|
...C
|
|
2963
2966
|
}
|
|
2964
2967
|
}, S && x <= 50 && (x++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (c = S.rects === !0 ? await i.getElementRects({
|
|
@@ -2975,7 +2978,7 @@ const vs = async (e, t, n) => {
|
|
|
2975
2978
|
y: p,
|
|
2976
2979
|
placement: v,
|
|
2977
2980
|
strategy: o,
|
|
2978
|
-
middlewareData:
|
|
2981
|
+
middlewareData: m
|
|
2979
2982
|
};
|
|
2980
2983
|
};
|
|
2981
2984
|
async function wt(e, t) {
|
|
@@ -2993,9 +2996,9 @@ async function wt(e, t) {
|
|
|
2993
2996
|
rootBoundary: d = "viewport",
|
|
2994
2997
|
elementContext: p = "floating",
|
|
2995
2998
|
altBoundary: v = !1,
|
|
2996
|
-
padding:
|
|
2997
|
-
} = Oe(t, e), x = Yr(
|
|
2998
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
2999
|
+
padding: m = 0
|
|
3000
|
+
} = Oe(t, e), x = Yr(m), g = s[v ? p === "floating" ? "reference" : "floating" : p], w = Mt(await a.getClippingRect({
|
|
3001
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) == null || n ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
|
|
2999
3002
|
boundary: c,
|
|
3000
3003
|
rootBoundary: d,
|
|
3001
3004
|
strategy: l
|
|
@@ -3023,7 +3026,7 @@ async function wt(e, t) {
|
|
|
3023
3026
|
right: (S.right - w.right + x.right) / C.x
|
|
3024
3027
|
};
|
|
3025
3028
|
}
|
|
3026
|
-
const
|
|
3029
|
+
const gs = (e) => ({
|
|
3027
3030
|
name: "arrow",
|
|
3028
3031
|
options: e,
|
|
3029
3032
|
async fn(t) {
|
|
@@ -3044,14 +3047,14 @@ const ms = (e) => ({
|
|
|
3044
3047
|
const p = Yr(d), v = {
|
|
3045
3048
|
x: n,
|
|
3046
3049
|
y: r
|
|
3047
|
-
},
|
|
3050
|
+
}, m = In(o), x = Rn(m), f = await i.getDimensions(c), g = m === "y", w = g ? "top" : "left", b = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", C = a.reference[x] + a.reference[m] - v[m] - a.floating[x], S = v[m] - a.reference[m], E = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
3048
3051
|
let k = E ? E[y] : 0;
|
|
3049
3052
|
(!k || !await (i.isElement == null ? void 0 : i.isElement(E))) && (k = s.floating[y] || a.floating[x]);
|
|
3050
3053
|
const I = C / 2 - S / 2, D = k / 2 - f[x] / 2 - 1, L = ze(p[w], D), $ = ze(p[b], D), W = L, F = k - f[x] - $, N = k / 2 - f[x] / 2 + I, _ = ln(W, N, F), O = !l.arrow && st(o) != null && N !== _ && a.reference[x] / 2 - (N < W ? L : $) - f[x] / 2 < 0, M = O ? N < W ? N - W : N - F : 0;
|
|
3051
3054
|
return {
|
|
3052
|
-
[
|
|
3055
|
+
[m]: v[m] + M,
|
|
3053
3056
|
data: {
|
|
3054
|
-
[
|
|
3057
|
+
[m]: _,
|
|
3055
3058
|
centerOffset: N - _ - M,
|
|
3056
3059
|
...O && {
|
|
3057
3060
|
alignmentOffset: M
|
|
@@ -3060,7 +3063,7 @@ const ms = (e) => ({
|
|
|
3060
3063
|
reset: O
|
|
3061
3064
|
};
|
|
3062
3065
|
}
|
|
3063
|
-
}),
|
|
3066
|
+
}), ms = function(e) {
|
|
3064
3067
|
return e === void 0 && (e = {}), {
|
|
3065
3068
|
name: "flip",
|
|
3066
3069
|
options: e,
|
|
@@ -3077,16 +3080,16 @@ const ms = (e) => ({
|
|
|
3077
3080
|
mainAxis: d = !0,
|
|
3078
3081
|
crossAxis: p = !0,
|
|
3079
3082
|
fallbackPlacements: v,
|
|
3080
|
-
fallbackStrategy:
|
|
3083
|
+
fallbackStrategy: m = "bestFit",
|
|
3081
3084
|
fallbackAxisSideDirection: x = "none",
|
|
3082
3085
|
flipAlignment: f = !0,
|
|
3083
|
-
...
|
|
3086
|
+
...g
|
|
3084
3087
|
} = Oe(e, t);
|
|
3085
3088
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
3086
3089
|
return {};
|
|
3087
3090
|
const w = Le(o), b = ye(s), y = Le(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = v || (y || !f ? [Lt(s)] : cs(s)), E = x !== "none";
|
|
3088
3091
|
!v && E && S.push(...ps(s, f, x, C));
|
|
3089
|
-
const k = [s, ...S], I = await wt(t,
|
|
3092
|
+
const k = [s, ...S], I = await wt(t, g), D = [];
|
|
3090
3093
|
let L = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
3091
3094
|
if (d && D.push(I[w]), p) {
|
|
3092
3095
|
const N = ls(o, i, C);
|
|
@@ -3112,7 +3115,7 @@ const ms = (e) => ({
|
|
|
3112
3115
|
};
|
|
3113
3116
|
let O = (W = L.filter((M) => M.overflows[0] <= 0).sort((M, P) => M.overflows[1] - P.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
3114
3117
|
if (!O)
|
|
3115
|
-
switch (
|
|
3118
|
+
switch (m) {
|
|
3116
3119
|
case "bestFit": {
|
|
3117
3120
|
var F;
|
|
3118
3121
|
const M = (F = L.filter((P) => {
|
|
@@ -3203,7 +3206,7 @@ async function bs(e, t) {
|
|
|
3203
3206
|
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Le(n), s = st(n), l = ye(n) === "y", c = Kr.has(i) ? -1 : 1, d = a && l ? -1 : 1, p = Oe(t, e);
|
|
3204
3207
|
let {
|
|
3205
3208
|
mainAxis: v,
|
|
3206
|
-
crossAxis:
|
|
3209
|
+
crossAxis: m,
|
|
3207
3210
|
alignmentAxis: x
|
|
3208
3211
|
} = typeof p == "number" ? {
|
|
3209
3212
|
mainAxis: p,
|
|
@@ -3214,12 +3217,12 @@ async function bs(e, t) {
|
|
|
3214
3217
|
crossAxis: p.crossAxis || 0,
|
|
3215
3218
|
alignmentAxis: p.alignmentAxis
|
|
3216
3219
|
};
|
|
3217
|
-
return s && typeof x == "number" && (
|
|
3218
|
-
x:
|
|
3220
|
+
return s && typeof x == "number" && (m = s === "end" ? x * -1 : x), l ? {
|
|
3221
|
+
x: m * d,
|
|
3219
3222
|
y: v * c
|
|
3220
3223
|
} : {
|
|
3221
3224
|
x: v * c,
|
|
3222
|
-
y:
|
|
3225
|
+
y: m * d
|
|
3223
3226
|
};
|
|
3224
3227
|
}
|
|
3225
3228
|
const xs = function(e) {
|
|
@@ -3257,11 +3260,11 @@ const xs = function(e) {
|
|
|
3257
3260
|
mainAxis: a = !0,
|
|
3258
3261
|
crossAxis: i = !1,
|
|
3259
3262
|
limiter: s = {
|
|
3260
|
-
fn: (
|
|
3263
|
+
fn: (g) => {
|
|
3261
3264
|
let {
|
|
3262
3265
|
x: w,
|
|
3263
3266
|
y: b
|
|
3264
|
-
} =
|
|
3267
|
+
} = g;
|
|
3265
3268
|
return {
|
|
3266
3269
|
x: w,
|
|
3267
3270
|
y: b
|
|
@@ -3273,18 +3276,18 @@ const xs = function(e) {
|
|
|
3273
3276
|
x: n,
|
|
3274
3277
|
y: r
|
|
3275
3278
|
}, d = await wt(t, l), p = ye(Le(o)), v = Pn(p);
|
|
3276
|
-
let
|
|
3279
|
+
let m = c[v], x = c[p];
|
|
3277
3280
|
if (a) {
|
|
3278
|
-
const
|
|
3279
|
-
|
|
3281
|
+
const g = v === "y" ? "top" : "left", w = v === "y" ? "bottom" : "right", b = m + d[g], y = m - d[w];
|
|
3282
|
+
m = ln(b, m, y);
|
|
3280
3283
|
}
|
|
3281
3284
|
if (i) {
|
|
3282
|
-
const
|
|
3285
|
+
const g = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", b = x + d[g], y = x - d[w];
|
|
3283
3286
|
x = ln(b, x, y);
|
|
3284
3287
|
}
|
|
3285
3288
|
const f = s.fn({
|
|
3286
3289
|
...t,
|
|
3287
|
-
[v]:
|
|
3290
|
+
[v]: m,
|
|
3288
3291
|
[p]: x
|
|
3289
3292
|
});
|
|
3290
3293
|
return {
|
|
@@ -3318,8 +3321,8 @@ const xs = function(e) {
|
|
|
3318
3321
|
x: n,
|
|
3319
3322
|
y: r
|
|
3320
3323
|
}, p = ye(o), v = Pn(p);
|
|
3321
|
-
let
|
|
3322
|
-
const f = Oe(s, t),
|
|
3324
|
+
let m = d[v], x = d[p];
|
|
3325
|
+
const f = Oe(s, t), g = typeof f == "number" ? {
|
|
3323
3326
|
mainAxis: f,
|
|
3324
3327
|
crossAxis: 0
|
|
3325
3328
|
} : {
|
|
@@ -3328,16 +3331,16 @@ const xs = function(e) {
|
|
|
3328
3331
|
...f
|
|
3329
3332
|
};
|
|
3330
3333
|
if (l) {
|
|
3331
|
-
const y = v === "y" ? "height" : "width", C = a.reference[v] - a.floating[y] +
|
|
3332
|
-
|
|
3334
|
+
const y = v === "y" ? "height" : "width", C = a.reference[v] - a.floating[y] + g.mainAxis, S = a.reference[v] + a.reference[y] - g.mainAxis;
|
|
3335
|
+
m < C ? m = C : m > S && (m = S);
|
|
3333
3336
|
}
|
|
3334
3337
|
if (c) {
|
|
3335
3338
|
var w, b;
|
|
3336
|
-
const y = v === "y" ? "width" : "height", C = Kr.has(Le(o)), S = a.reference[p] - a.floating[y] + (C && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (C ? 0 :
|
|
3339
|
+
const y = v === "y" ? "width" : "height", C = Kr.has(Le(o)), S = a.reference[p] - a.floating[y] + (C && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (C ? 0 : g.crossAxis), E = a.reference[p] + a.reference[y] + (C ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (C ? g.crossAxis : 0);
|
|
3337
3340
|
x < S ? x = S : x > E && (x = E);
|
|
3338
3341
|
}
|
|
3339
3342
|
return {
|
|
3340
|
-
[v]:
|
|
3343
|
+
[v]: m,
|
|
3341
3344
|
[p]: x
|
|
3342
3345
|
};
|
|
3343
3346
|
}
|
|
@@ -3357,17 +3360,17 @@ const xs = function(e) {
|
|
|
3357
3360
|
apply: l = () => {
|
|
3358
3361
|
},
|
|
3359
3362
|
...c
|
|
3360
|
-
} = Oe(e, t), d = await wt(t, c), p = Le(o), v = st(o),
|
|
3363
|
+
} = Oe(e, t), d = await wt(t, c), p = Le(o), v = st(o), m = ye(o) === "y", {
|
|
3361
3364
|
width: x,
|
|
3362
3365
|
height: f
|
|
3363
3366
|
} = a.floating;
|
|
3364
|
-
let
|
|
3365
|
-
p === "top" || p === "bottom" ? (
|
|
3366
|
-
const b = f - d.top - d.bottom, y = x - d.left - d.right, C = ze(f - d[
|
|
3367
|
+
let g, w;
|
|
3368
|
+
p === "top" || p === "bottom" ? (g = p, w = v === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (w = p, g = v === "end" ? "top" : "bottom");
|
|
3369
|
+
const b = f - d.top - d.bottom, y = x - d.left - d.right, C = ze(f - d[g], b), S = ze(x - d[w], y), E = !t.middlewareData.shift;
|
|
3367
3370
|
let k = C, I = S;
|
|
3368
3371
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (k = b), E && !v) {
|
|
3369
3372
|
const L = ce(d.left, 0), $ = ce(d.right, 0), W = ce(d.top, 0), F = ce(d.bottom, 0);
|
|
3370
|
-
|
|
3373
|
+
m ? I = x - 2 * (L !== 0 || $ !== 0 ? L + $ : ce(d.left, d.right)) : k = f - 2 * (W !== 0 || F !== 0 ? W + F : ce(d.top, d.bottom));
|
|
3371
3374
|
}
|
|
3372
3375
|
await l({
|
|
3373
3376
|
...t,
|
|
@@ -3400,7 +3403,7 @@ function _e(e) {
|
|
|
3400
3403
|
function Xr(e) {
|
|
3401
3404
|
return Vt() ? e instanceof Node || e instanceof ue(e).Node : !1;
|
|
3402
3405
|
}
|
|
3403
|
-
function
|
|
3406
|
+
function ge(e) {
|
|
3404
3407
|
return Vt() ? e instanceof Element || e instanceof ue(e).Element : !1;
|
|
3405
3408
|
}
|
|
3406
3409
|
function Te(e) {
|
|
@@ -3416,7 +3419,7 @@ function xt(e) {
|
|
|
3416
3419
|
overflowX: n,
|
|
3417
3420
|
overflowY: r,
|
|
3418
3421
|
display: o
|
|
3419
|
-
} =
|
|
3422
|
+
} = me(e);
|
|
3420
3423
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ks.has(o);
|
|
3421
3424
|
}
|
|
3422
3425
|
const Es = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
@@ -3435,7 +3438,7 @@ function $t(e) {
|
|
|
3435
3438
|
}
|
|
3436
3439
|
const _s = ["transform", "translate", "scale", "rotate", "perspective"], Ps = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Rs = ["paint", "layout", "strict", "content"];
|
|
3437
3440
|
function Nn(e) {
|
|
3438
|
-
const t = On(), n =
|
|
3441
|
+
const t = On(), n = ge(e) ? me(e) : e;
|
|
3439
3442
|
return _s.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Ps.some((r) => (n.willChange || "").includes(r)) || Rs.some((r) => (n.contain || "").includes(r));
|
|
3440
3443
|
}
|
|
3441
3444
|
function Is(e) {
|
|
@@ -3456,11 +3459,11 @@ const Ns = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
|
3456
3459
|
function ot(e) {
|
|
3457
3460
|
return Ns.has(lt(e));
|
|
3458
3461
|
}
|
|
3459
|
-
function
|
|
3462
|
+
function me(e) {
|
|
3460
3463
|
return ue(e).getComputedStyle(e);
|
|
3461
3464
|
}
|
|
3462
3465
|
function Wt(e) {
|
|
3463
|
-
return
|
|
3466
|
+
return ge(e) ? {
|
|
3464
3467
|
scrollLeft: e.scrollLeft,
|
|
3465
3468
|
scrollTop: e.scrollTop
|
|
3466
3469
|
} : {
|
|
@@ -3498,7 +3501,7 @@ function un(e) {
|
|
|
3498
3501
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
3499
3502
|
}
|
|
3500
3503
|
function Gr(e) {
|
|
3501
|
-
const t =
|
|
3504
|
+
const t = me(e);
|
|
3502
3505
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
3503
3506
|
const o = Te(e), a = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, s = Ot(n) !== a || Ot(r) !== i;
|
|
3504
3507
|
return s && (n = a, r = i), {
|
|
@@ -3508,7 +3511,7 @@ function Gr(e) {
|
|
|
3508
3511
|
};
|
|
3509
3512
|
}
|
|
3510
3513
|
function Ln(e) {
|
|
3511
|
-
return
|
|
3514
|
+
return ge(e) ? e : e.contextElement;
|
|
3512
3515
|
}
|
|
3513
3516
|
function tt(e) {
|
|
3514
3517
|
const t = Ln(e);
|
|
@@ -3540,15 +3543,15 @@ function Ye(e, t, n, r) {
|
|
|
3540
3543
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
3541
3544
|
const o = e.getBoundingClientRect(), a = Ln(e);
|
|
3542
3545
|
let i = ke(1);
|
|
3543
|
-
t && (r ?
|
|
3546
|
+
t && (r ? ge(r) && (i = tt(r)) : i = tt(e));
|
|
3544
3547
|
const s = Ls(a, n, r) ? qr(a) : ke(0);
|
|
3545
3548
|
let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, d = o.width / i.x, p = o.height / i.y;
|
|
3546
3549
|
if (a) {
|
|
3547
|
-
const v = ue(a),
|
|
3550
|
+
const v = ue(a), m = r && ge(r) ? ue(r) : r;
|
|
3548
3551
|
let x = v, f = un(x);
|
|
3549
|
-
for (; f && r &&
|
|
3550
|
-
const
|
|
3551
|
-
l *=
|
|
3552
|
+
for (; f && r && m !== x; ) {
|
|
3553
|
+
const g = tt(f), w = f.getBoundingClientRect(), b = me(f), y = w.left + (f.clientLeft + parseFloat(b.paddingLeft)) * g.x, C = w.top + (f.clientTop + parseFloat(b.paddingTop)) * g.y;
|
|
3554
|
+
l *= g.x, c *= g.y, d *= g.x, p *= g.y, l += y, c += C, x = ue(f), f = un(x);
|
|
3552
3555
|
}
|
|
3553
3556
|
}
|
|
3554
3557
|
return Mt({
|
|
@@ -3589,8 +3592,8 @@ function Ms(e) {
|
|
|
3589
3592
|
}, c = ke(1);
|
|
3590
3593
|
const d = ke(0), p = Te(r);
|
|
3591
3594
|
if ((p || !p && !a) && ((lt(r) !== "body" || xt(i)) && (l = Wt(r)), Te(r))) {
|
|
3592
|
-
const
|
|
3593
|
-
c = tt(r), d.x =
|
|
3595
|
+
const m = Ye(r);
|
|
3596
|
+
c = tt(r), d.x = m.x + r.clientLeft, d.y = m.y + r.clientTop;
|
|
3594
3597
|
}
|
|
3595
3598
|
const v = i && !p && !a ? Qr(i, l, !0) : ke(0);
|
|
3596
3599
|
return {
|
|
@@ -3607,7 +3610,7 @@ function Fs(e) {
|
|
|
3607
3610
|
const t = _e(e), n = Wt(e), r = e.ownerDocument.body, o = ce(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = ce(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
3608
3611
|
let i = -n.scrollLeft + Mn(e);
|
|
3609
3612
|
const s = -n.scrollTop;
|
|
3610
|
-
return
|
|
3613
|
+
return me(r).direction === "rtl" && (i += ce(t.clientWidth, r.clientWidth) - o), {
|
|
3611
3614
|
width: o,
|
|
3612
3615
|
height: a,
|
|
3613
3616
|
x: i,
|
|
@@ -3645,7 +3648,7 @@ function or(e, t, n) {
|
|
|
3645
3648
|
r = Bs(e, n);
|
|
3646
3649
|
else if (t === "document")
|
|
3647
3650
|
r = Fs(_e(e));
|
|
3648
|
-
else if (
|
|
3651
|
+
else if (ge(t))
|
|
3649
3652
|
r = Vs(t, n);
|
|
3650
3653
|
else {
|
|
3651
3654
|
const o = qr(e);
|
|
@@ -3660,17 +3663,17 @@ function or(e, t, n) {
|
|
|
3660
3663
|
}
|
|
3661
3664
|
function Jr(e, t) {
|
|
3662
3665
|
const n = Ve(e);
|
|
3663
|
-
return n === t || !
|
|
3666
|
+
return n === t || !ge(n) || ot(n) ? !1 : me(n).position === "fixed" || Jr(n, t);
|
|
3664
3667
|
}
|
|
3665
3668
|
function $s(e, t) {
|
|
3666
3669
|
const n = t.get(e);
|
|
3667
3670
|
if (n)
|
|
3668
3671
|
return n;
|
|
3669
|
-
let r = bt(e, [], !1).filter((s) =>
|
|
3670
|
-
const a =
|
|
3672
|
+
let r = bt(e, [], !1).filter((s) => ge(s) && lt(s) !== "body"), o = null;
|
|
3673
|
+
const a = me(e).position === "fixed";
|
|
3671
3674
|
let i = a ? Ve(e) : e;
|
|
3672
|
-
for (;
|
|
3673
|
-
const s =
|
|
3675
|
+
for (; ge(i) && !ot(i); ) {
|
|
3676
|
+
const s = me(i), l = Nn(i);
|
|
3674
3677
|
!l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && zs.has(o.position) || xt(i) && !l && Jr(e, i)) ? r = r.filter((d) => d !== i) : o = s, i = Ve(i);
|
|
3675
3678
|
}
|
|
3676
3679
|
return t.set(e, r), r;
|
|
@@ -3715,8 +3718,8 @@ function Us(e, t, n) {
|
|
|
3715
3718
|
}
|
|
3716
3719
|
if (r || !r && !a)
|
|
3717
3720
|
if ((lt(t) !== "body" || xt(o)) && (s = Wt(t)), r) {
|
|
3718
|
-
const
|
|
3719
|
-
l.x =
|
|
3721
|
+
const m = Ye(t, !0, a, t);
|
|
3722
|
+
l.x = m.x + t.clientLeft, l.y = m.y + t.clientTop;
|
|
3720
3723
|
} else o && c();
|
|
3721
3724
|
a && !r && o && c();
|
|
3722
3725
|
const d = o && !r && !a ? Qr(o, s) : ke(0), p = i.left + s.scrollLeft - l.x - d.x, v = i.top + s.scrollTop - l.y - d.y;
|
|
@@ -3728,10 +3731,10 @@ function Us(e, t, n) {
|
|
|
3728
3731
|
};
|
|
3729
3732
|
}
|
|
3730
3733
|
function Qt(e) {
|
|
3731
|
-
return
|
|
3734
|
+
return me(e).position === "static";
|
|
3732
3735
|
}
|
|
3733
3736
|
function ar(e, t) {
|
|
3734
|
-
if (!Te(e) ||
|
|
3737
|
+
if (!Te(e) || me(e).position === "fixed")
|
|
3735
3738
|
return null;
|
|
3736
3739
|
if (t)
|
|
3737
3740
|
return t(e);
|
|
@@ -3745,7 +3748,7 @@ function eo(e, t) {
|
|
|
3745
3748
|
if (!Te(e)) {
|
|
3746
3749
|
let o = Ve(e);
|
|
3747
3750
|
for (; o && !ot(o); ) {
|
|
3748
|
-
if (
|
|
3751
|
+
if (ge(o) && !Qt(o))
|
|
3749
3752
|
return o;
|
|
3750
3753
|
o = Ve(o);
|
|
3751
3754
|
}
|
|
@@ -3769,7 +3772,7 @@ const js = async function(e) {
|
|
|
3769
3772
|
};
|
|
3770
3773
|
};
|
|
3771
3774
|
function Ys(e) {
|
|
3772
|
-
return
|
|
3775
|
+
return me(e).direction === "rtl";
|
|
3773
3776
|
}
|
|
3774
3777
|
const Ks = {
|
|
3775
3778
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ms,
|
|
@@ -3780,7 +3783,7 @@ const Ks = {
|
|
|
3780
3783
|
getClientRects: Ds,
|
|
3781
3784
|
getDimensions: Hs,
|
|
3782
3785
|
getScale: tt,
|
|
3783
|
-
isElement:
|
|
3786
|
+
isElement: ge,
|
|
3784
3787
|
isRTL: Ys
|
|
3785
3788
|
};
|
|
3786
3789
|
function to(e, t) {
|
|
@@ -3799,12 +3802,12 @@ function Xs(e, t) {
|
|
|
3799
3802
|
left: d,
|
|
3800
3803
|
top: p,
|
|
3801
3804
|
width: v,
|
|
3802
|
-
height:
|
|
3805
|
+
height: m
|
|
3803
3806
|
} = c;
|
|
3804
|
-
if (s || t(), !v || !
|
|
3807
|
+
if (s || t(), !v || !m)
|
|
3805
3808
|
return;
|
|
3806
|
-
const x = St(p), f = St(o.clientWidth - (d + v)),
|
|
3807
|
-
rootMargin: -x + "px " + -f + "px " + -
|
|
3809
|
+
const x = St(p), f = St(o.clientWidth - (d + v)), g = St(o.clientHeight - (p + m)), w = St(d), y = {
|
|
3810
|
+
rootMargin: -x + "px " + -f + "px " + -g + "px " + -w + "px",
|
|
3808
3811
|
threshold: ce(0, ze(1, l)) || 1
|
|
3809
3812
|
};
|
|
3810
3813
|
let C = !0;
|
|
@@ -3847,28 +3850,28 @@ function Zs(e, t, n, r) {
|
|
|
3847
3850
|
}), a && w.addEventListener("resize", n);
|
|
3848
3851
|
});
|
|
3849
3852
|
const p = c && s ? Xs(c, n) : null;
|
|
3850
|
-
let v = -1,
|
|
3851
|
-
i && (
|
|
3853
|
+
let v = -1, m = null;
|
|
3854
|
+
i && (m = new ResizeObserver((w) => {
|
|
3852
3855
|
let [b] = w;
|
|
3853
|
-
b && b.target === c &&
|
|
3856
|
+
b && b.target === c && m && (m.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
3854
3857
|
var y;
|
|
3855
|
-
(y =
|
|
3858
|
+
(y = m) == null || y.observe(t);
|
|
3856
3859
|
})), n();
|
|
3857
|
-
}), c && !l &&
|
|
3860
|
+
}), c && !l && m.observe(c), m.observe(t));
|
|
3858
3861
|
let x, f = l ? Ye(e) : null;
|
|
3859
|
-
l &&
|
|
3860
|
-
function
|
|
3862
|
+
l && g();
|
|
3863
|
+
function g() {
|
|
3861
3864
|
const w = Ye(e);
|
|
3862
|
-
f && !to(f, w) && n(), f = w, x = requestAnimationFrame(
|
|
3865
|
+
f && !to(f, w) && n(), f = w, x = requestAnimationFrame(g);
|
|
3863
3866
|
}
|
|
3864
3867
|
return n(), () => {
|
|
3865
3868
|
var w;
|
|
3866
3869
|
d.forEach((b) => {
|
|
3867
3870
|
o && b.removeEventListener("scroll", n), a && b.removeEventListener("resize", n);
|
|
3868
|
-
}), p == null || p(), (w =
|
|
3871
|
+
}), p == null || p(), (w = m) == null || w.disconnect(), m = null, l && cancelAnimationFrame(x);
|
|
3869
3872
|
};
|
|
3870
3873
|
}
|
|
3871
|
-
const Gs = xs, qs = ys, Qs =
|
|
3874
|
+
const Gs = xs, qs = ys, Qs = ms, Js = Ss, el = ws, ir = gs, tl = Cs, nl = (e, t, n) => {
|
|
3872
3875
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
3873
3876
|
platform: Ks,
|
|
3874
3877
|
...n
|
|
@@ -3947,13 +3950,13 @@ function al(e) {
|
|
|
3947
3950
|
placement: t,
|
|
3948
3951
|
middlewareData: {},
|
|
3949
3952
|
isPositioned: !1
|
|
3950
|
-
}), [v,
|
|
3951
|
-
Dt(v, r) ||
|
|
3952
|
-
const [x, f] = h.useState(null), [
|
|
3953
|
+
}), [v, m] = h.useState(r);
|
|
3954
|
+
Dt(v, r) || m(r);
|
|
3955
|
+
const [x, f] = h.useState(null), [g, w] = h.useState(null), b = h.useCallback((P) => {
|
|
3953
3956
|
P !== E.current && (E.current = P, f(P));
|
|
3954
3957
|
}, []), y = h.useCallback((P) => {
|
|
3955
3958
|
P !== k.current && (k.current = P, w(P));
|
|
3956
|
-
}, []), C = a || x, S = i ||
|
|
3959
|
+
}, []), C = a || x, S = i || g, E = h.useRef(null), k = h.useRef(null), I = h.useRef(d), D = l != null, L = Jt(l), $ = Jt(o), W = Jt(c), F = h.useCallback(() => {
|
|
3957
3960
|
if (!E.current || !k.current)
|
|
3958
3961
|
return;
|
|
3959
3962
|
const P = {
|
|
@@ -4088,7 +4091,7 @@ var hl = "Arrow", ro = h.forwardRef((e, t) => {
|
|
|
4088
4091
|
});
|
|
4089
4092
|
ro.displayName = hl;
|
|
4090
4093
|
var vl = ro;
|
|
4091
|
-
function
|
|
4094
|
+
function gl(e) {
|
|
4092
4095
|
const [t, n] = h.useState(void 0);
|
|
4093
4096
|
return se(() => {
|
|
4094
4097
|
if (e) {
|
|
@@ -4110,9 +4113,9 @@ function ml(e) {
|
|
|
4110
4113
|
n(void 0);
|
|
4111
4114
|
}, [e]), t;
|
|
4112
4115
|
}
|
|
4113
|
-
var Dn = "Popper", [oo, ao] = An(Dn), [
|
|
4116
|
+
var Dn = "Popper", [oo, ao] = An(Dn), [ml, io] = oo(Dn), so = (e) => {
|
|
4114
4117
|
const { __scopePopper: t, children: n } = e, [r, o] = h.useState(null);
|
|
4115
|
-
return /* @__PURE__ */ T(
|
|
4118
|
+
return /* @__PURE__ */ T(ml, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
4116
4119
|
};
|
|
4117
4120
|
so.displayName = Dn;
|
|
4118
4121
|
var lo = "PopperAnchor", co = h.forwardRef(
|
|
@@ -4140,10 +4143,10 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
|
|
|
4140
4143
|
collisionPadding: d = 0,
|
|
4141
4144
|
sticky: p = "partial",
|
|
4142
4145
|
hideWhenDetached: v = !1,
|
|
4143
|
-
updatePositionStrategy:
|
|
4146
|
+
updatePositionStrategy: m = "optimized",
|
|
4144
4147
|
onPlaced: x,
|
|
4145
4148
|
...f
|
|
4146
|
-
} = e,
|
|
4149
|
+
} = e, g = io(Fn, n), [w, b] = h.useState(null), y = ne(t, (le) => b(le)), [C, S] = h.useState(null), E = gl(C), k = (E == null ? void 0 : E.width) ?? 0, I = (E == null ? void 0 : E.height) ?? 0, D = r + (a !== "center" ? "-" + a : ""), L = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], W = $.length > 0, F = {
|
|
4147
4150
|
padding: L,
|
|
4148
4151
|
boundary: $.filter(yl),
|
|
4149
4152
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -4153,10 +4156,10 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
|
|
|
4153
4156
|
strategy: "fixed",
|
|
4154
4157
|
placement: D,
|
|
4155
4158
|
whileElementsMounted: (...le) => Zs(...le, {
|
|
4156
|
-
animationFrame:
|
|
4159
|
+
animationFrame: m === "always"
|
|
4157
4160
|
}),
|
|
4158
4161
|
elements: {
|
|
4159
|
-
reference:
|
|
4162
|
+
reference: g.anchor
|
|
4160
4163
|
},
|
|
4161
4164
|
middleware: [
|
|
4162
4165
|
sl({ mainAxis: o + I, alignmentAxis: i }),
|
|
@@ -4298,10 +4301,10 @@ var Cl = (e) => ({
|
|
|
4298
4301
|
name: "transformOrigin",
|
|
4299
4302
|
options: e,
|
|
4300
4303
|
fn(t) {
|
|
4301
|
-
var
|
|
4302
|
-
const { placement: n, rects: r, middlewareData: o } = t, i = ((
|
|
4304
|
+
var g, w, b;
|
|
4305
|
+
const { placement: n, rects: r, middlewareData: o } = t, i = ((g = o.arrow) == null ? void 0 : g.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, d] = ho(n), p = { start: "0%", center: "50%", end: "100%" }[d], v = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + s / 2, m = (((b = o.arrow) == null ? void 0 : b.y) ?? 0) + l / 2;
|
|
4303
4306
|
let x = "", f = "";
|
|
4304
|
-
return c === "bottom" ? (x = i ? p : `${v}px`, f = `${-l}px`) : c === "top" ? (x = i ? p : `${v}px`, f = `${r.floating.height + l}px`) : c === "right" ? (x = `${-l}px`, f = i ? p : `${
|
|
4307
|
+
return c === "bottom" ? (x = i ? p : `${v}px`, f = `${-l}px`) : c === "top" ? (x = i ? p : `${v}px`, f = `${r.floating.height + l}px`) : c === "right" ? (x = `${-l}px`, f = i ? p : `${m}px`) : c === "left" && (x = `${r.floating.width + l}px`, f = i ? p : `${m}px`), { data: { x, y: f } };
|
|
4305
4308
|
}
|
|
4306
4309
|
});
|
|
4307
4310
|
function ho(e) {
|
|
@@ -4369,7 +4372,7 @@ function Il(e) {
|
|
|
4369
4372
|
const t = h.useRef({ value: e, previous: e });
|
|
4370
4373
|
return h.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
4371
4374
|
}
|
|
4372
|
-
var
|
|
4375
|
+
var go = Object.freeze({
|
|
4373
4376
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
4374
4377
|
position: "absolute",
|
|
4375
4378
|
border: 0,
|
|
@@ -4387,7 +4390,7 @@ var mo = Object.freeze({
|
|
|
4387
4390
|
{
|
|
4388
4391
|
...e,
|
|
4389
4392
|
ref: t,
|
|
4390
|
-
style: { ...
|
|
4393
|
+
style: { ...go, ...e.style }
|
|
4391
4394
|
}
|
|
4392
4395
|
)
|
|
4393
4396
|
);
|
|
@@ -4397,13 +4400,13 @@ var Ll = function(e) {
|
|
|
4397
4400
|
return null;
|
|
4398
4401
|
var t = Array.isArray(e) ? e[0] : e;
|
|
4399
4402
|
return t.ownerDocument.body;
|
|
4400
|
-
}, Ge = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Et = {}, en = 0,
|
|
4401
|
-
return e && (e.host ||
|
|
4403
|
+
}, Ge = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Et = {}, en = 0, mo = function(e) {
|
|
4404
|
+
return e && (e.host || mo(e.parentNode));
|
|
4402
4405
|
}, Ml = function(e, t) {
|
|
4403
4406
|
return t.map(function(n) {
|
|
4404
4407
|
if (e.contains(n))
|
|
4405
4408
|
return n;
|
|
4406
|
-
var r =
|
|
4409
|
+
var r = mo(n);
|
|
4407
4410
|
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
4408
4411
|
}).filter(function(n) {
|
|
4409
4412
|
return !!n;
|
|
@@ -4421,8 +4424,8 @@ var Ll = function(e) {
|
|
|
4421
4424
|
d(v);
|
|
4422
4425
|
else
|
|
4423
4426
|
try {
|
|
4424
|
-
var
|
|
4425
|
-
Ge.set(v, f), a.set(v,
|
|
4427
|
+
var m = v.getAttribute(r), x = m !== null && m !== "false", f = (Ge.get(v) || 0) + 1, g = (a.get(v) || 0) + 1;
|
|
4428
|
+
Ge.set(v, f), a.set(v, g), i.push(v), f === 1 && x && kt.set(v, !0), g === 1 && v.setAttribute(n, "true"), x || v.setAttribute(r, "true");
|
|
4426
4429
|
} catch (w) {
|
|
4427
4430
|
console.error("aria-hidden: cannot operate on ", v, w);
|
|
4428
4431
|
}
|
|
@@ -4430,8 +4433,8 @@ var Ll = function(e) {
|
|
|
4430
4433
|
};
|
|
4431
4434
|
return d(t), s.clear(), en++, function() {
|
|
4432
4435
|
i.forEach(function(p) {
|
|
4433
|
-
var v = Ge.get(p) - 1,
|
|
4434
|
-
Ge.set(p, v), a.set(p,
|
|
4436
|
+
var v = Ge.get(p) - 1, m = a.get(p) - 1;
|
|
4437
|
+
Ge.set(p, v), a.set(p, m), v || (kt.has(p) || p.removeAttribute(r), kt.delete(p)), m || p.removeAttribute(n);
|
|
4435
4438
|
}), en--, en || (Ge = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Et = {});
|
|
4436
4439
|
};
|
|
4437
4440
|
}, Fl = function(e, t, n) {
|
|
@@ -4589,11 +4592,11 @@ var xo = Yl(), nn = function() {
|
|
|
4589
4592
|
onScrollCapture: nn,
|
|
4590
4593
|
onWheelCapture: nn,
|
|
4591
4594
|
onTouchMoveCapture: nn
|
|
4592
|
-
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar,
|
|
4595
|
+
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, m = e.noRelative, x = e.noIsolation, f = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, C = wo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, E = Hl([n, t]), k = xe(xe({}, C), o);
|
|
4593
4596
|
return h.createElement(
|
|
4594
4597
|
h.Fragment,
|
|
4595
4598
|
null,
|
|
4596
|
-
d && h.createElement(S, { sideCar: xo, removeScrollBar: c, shards: p, noRelative:
|
|
4599
|
+
d && h.createElement(S, { sideCar: xo, removeScrollBar: c, shards: p, noRelative: m, noIsolation: x, inert: f, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
|
|
4597
4600
|
i ? h.cloneElement(h.Children.only(s), xe(xe({}, k), { ref: E })) : h.createElement(b, xe({}, k, { className: l, ref: E }), s)
|
|
4598
4601
|
);
|
|
4599
4602
|
});
|
|
@@ -4796,7 +4799,7 @@ var qe = dn ? { passive: !1 } : !1, sc = function(e) {
|
|
|
4796
4799
|
do {
|
|
4797
4800
|
if (!s)
|
|
4798
4801
|
break;
|
|
4799
|
-
var
|
|
4802
|
+
var m = ko(e, s), x = m[0], f = m[1], g = m[2], w = f - g - a * x;
|
|
4800
4803
|
(x || w) && So(e, s) && (p += w, v += x);
|
|
4801
4804
|
var b = s.parentNode;
|
|
4802
4805
|
s = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
|
|
@@ -4819,25 +4822,25 @@ var qe = dn ? { passive: !1 } : !1, sc = function(e) {
|
|
|
4819
4822
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
4820
4823
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
4821
4824
|
`);
|
|
4822
|
-
},
|
|
4823
|
-
function
|
|
4824
|
-
var t = h.useRef([]), n = h.useRef([0, 0]), r = h.useRef(), o = h.useState(
|
|
4825
|
+
}, gc = 0, Qe = [];
|
|
4826
|
+
function mc(e) {
|
|
4827
|
+
var t = h.useRef([]), n = h.useRef([0, 0]), r = h.useRef(), o = h.useState(gc++)[0], a = h.useState(yo)[0], i = h.useRef(e);
|
|
4825
4828
|
h.useEffect(function() {
|
|
4826
4829
|
i.current = e;
|
|
4827
4830
|
}, [e]), h.useEffect(function() {
|
|
4828
4831
|
if (e.inert) {
|
|
4829
4832
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
4830
4833
|
var f = Bl([e.lockRef.current], (e.shards || []).map(pr), !0).filter(Boolean);
|
|
4831
|
-
return f.forEach(function(
|
|
4832
|
-
return
|
|
4834
|
+
return f.forEach(function(g) {
|
|
4835
|
+
return g.classList.add("allow-interactivity-".concat(o));
|
|
4833
4836
|
}), function() {
|
|
4834
|
-
document.body.classList.remove("block-interactivity-".concat(o)), f.forEach(function(
|
|
4835
|
-
return
|
|
4837
|
+
document.body.classList.remove("block-interactivity-".concat(o)), f.forEach(function(g) {
|
|
4838
|
+
return g.classList.remove("allow-interactivity-".concat(o));
|
|
4836
4839
|
});
|
|
4837
4840
|
};
|
|
4838
4841
|
}
|
|
4839
4842
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
4840
|
-
var s = h.useCallback(function(f,
|
|
4843
|
+
var s = h.useCallback(function(f, g) {
|
|
4841
4844
|
if ("touches" in f && f.touches.length === 2 || f.type === "wheel" && f.ctrlKey)
|
|
4842
4845
|
return !i.current.allowPinchZoom;
|
|
4843
4846
|
var w = At(f), b = n.current, y = "deltaX" in f ? f.deltaX : b[0] - w[0], C = "deltaY" in f ? f.deltaY : b[1] - w[1], S, E = f.target, k = Math.abs(y) > Math.abs(C) ? "h" : "v";
|
|
@@ -4851,26 +4854,26 @@ function gc(e) {
|
|
|
4851
4854
|
if (!r.current && "changedTouches" in f && (y || C) && (r.current = S), !S)
|
|
4852
4855
|
return !0;
|
|
4853
4856
|
var D = r.current || S;
|
|
4854
|
-
return pc(D,
|
|
4857
|
+
return pc(D, g, f, D === "h" ? y : C);
|
|
4855
4858
|
}, []), l = h.useCallback(function(f) {
|
|
4856
|
-
var
|
|
4859
|
+
var g = f;
|
|
4857
4860
|
if (!(!Qe.length || Qe[Qe.length - 1] !== a)) {
|
|
4858
|
-
var w = "deltaY" in
|
|
4859
|
-
return S.name ===
|
|
4861
|
+
var w = "deltaY" in g ? fr(g) : At(g), b = t.current.filter(function(S) {
|
|
4862
|
+
return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && hc(S.delta, w);
|
|
4860
4863
|
})[0];
|
|
4861
4864
|
if (b && b.should) {
|
|
4862
|
-
|
|
4865
|
+
g.cancelable && g.preventDefault();
|
|
4863
4866
|
return;
|
|
4864
4867
|
}
|
|
4865
4868
|
if (!b) {
|
|
4866
4869
|
var y = (i.current.shards || []).map(pr).filter(Boolean).filter(function(S) {
|
|
4867
|
-
return S.contains(
|
|
4868
|
-
}), C = y.length > 0 ? s(
|
|
4869
|
-
C &&
|
|
4870
|
+
return S.contains(g.target);
|
|
4871
|
+
}), C = y.length > 0 ? s(g, y[0]) : !i.current.noIsolation;
|
|
4872
|
+
C && g.cancelable && g.preventDefault();
|
|
4870
4873
|
}
|
|
4871
4874
|
}
|
|
4872
|
-
}, []), c = h.useCallback(function(f,
|
|
4873
|
-
var y = { name: f, delta:
|
|
4875
|
+
}, []), c = h.useCallback(function(f, g, w, b) {
|
|
4876
|
+
var y = { name: f, delta: g, target: w, should: b, shadowParent: wc(w) };
|
|
4874
4877
|
t.current.push(y), setTimeout(function() {
|
|
4875
4878
|
t.current = t.current.filter(function(C) {
|
|
4876
4879
|
return C !== y;
|
|
@@ -4894,12 +4897,12 @@ function gc(e) {
|
|
|
4894
4897
|
}), document.removeEventListener("wheel", l, qe), document.removeEventListener("touchmove", l, qe), document.removeEventListener("touchstart", d, qe);
|
|
4895
4898
|
};
|
|
4896
4899
|
}, []);
|
|
4897
|
-
var
|
|
4900
|
+
var m = e.removeScrollBar, x = e.inert;
|
|
4898
4901
|
return h.createElement(
|
|
4899
4902
|
h.Fragment,
|
|
4900
4903
|
null,
|
|
4901
4904
|
x ? h.createElement(a, { styles: vc(o) }) : null,
|
|
4902
|
-
|
|
4905
|
+
m ? h.createElement(ic, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
4903
4906
|
);
|
|
4904
4907
|
}
|
|
4905
4908
|
function wc(e) {
|
|
@@ -4907,7 +4910,7 @@ function wc(e) {
|
|
|
4907
4910
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
4908
4911
|
return t;
|
|
4909
4912
|
}
|
|
4910
|
-
const bc = Kl(xo,
|
|
4913
|
+
const bc = Kl(xo, mc);
|
|
4911
4914
|
var Eo = h.forwardRef(function(e, t) {
|
|
4912
4915
|
return h.createElement(Ht, xe({}, e, { ref: t, sideCar: bc }));
|
|
4913
4916
|
});
|
|
@@ -4929,9 +4932,9 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
|
|
|
4929
4932
|
name: d,
|
|
4930
4933
|
autoComplete: p,
|
|
4931
4934
|
disabled: v,
|
|
4932
|
-
required:
|
|
4935
|
+
required: m,
|
|
4933
4936
|
form: x
|
|
4934
|
-
} = e, f = Yt(t), [
|
|
4937
|
+
} = e, f = Yt(t), [g, w] = h.useState(null), [b, y] = h.useState(null), [C, S] = h.useState(!1), E = Fi(c), [k, I] = lr({
|
|
4935
4938
|
prop: r,
|
|
4936
4939
|
defaultProp: o ?? !1,
|
|
4937
4940
|
onChange: a,
|
|
@@ -4941,13 +4944,13 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
|
|
|
4941
4944
|
defaultProp: s,
|
|
4942
4945
|
onChange: l,
|
|
4943
4946
|
caller: Ke
|
|
4944
|
-
}), $ = h.useRef(null), W =
|
|
4947
|
+
}), $ = h.useRef(null), W = g ? x || !!g.closest("form") : !0, [F, N] = h.useState(/* @__PURE__ */ new Set()), _ = Array.from(F).map((O) => O.props.value).join(";");
|
|
4945
4948
|
return /* @__PURE__ */ T(Sl, { ...f, children: /* @__PURE__ */ Nt(
|
|
4946
4949
|
Sc,
|
|
4947
4950
|
{
|
|
4948
|
-
required:
|
|
4951
|
+
required: m,
|
|
4949
4952
|
scope: t,
|
|
4950
|
-
trigger:
|
|
4953
|
+
trigger: g,
|
|
4951
4954
|
onTriggerChange: w,
|
|
4952
4955
|
valueNode: b,
|
|
4953
4956
|
onValueNodeChange: y,
|
|
@@ -4982,7 +4985,7 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
|
|
|
4982
4985
|
Ko,
|
|
4983
4986
|
{
|
|
4984
4987
|
"aria-hidden": !0,
|
|
4985
|
-
required:
|
|
4988
|
+
required: m,
|
|
4986
4989
|
tabIndex: -1,
|
|
4987
4990
|
name: d,
|
|
4988
4991
|
autoComplete: p,
|
|
@@ -5004,11 +5007,11 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
|
|
|
5004
5007
|
To.displayName = Ke;
|
|
5005
5008
|
var Ao = "SelectTrigger", _o = h.forwardRef(
|
|
5006
5009
|
(e, t) => {
|
|
5007
|
-
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Yt(n), i = $e(Ao, n), s = i.disabled || r, l = ne(t, i.onTriggerChange), c = jt(n), d = h.useRef("touch"), [p, v,
|
|
5008
|
-
const
|
|
5010
|
+
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Yt(n), i = $e(Ao, n), s = i.disabled || r, l = ne(t, i.onTriggerChange), c = jt(n), d = h.useRef("touch"), [p, v, m] = Zo((f) => {
|
|
5011
|
+
const g = c().filter((y) => !y.disabled), w = g.find((y) => y.value === i.value), b = Go(g, f, w);
|
|
5009
5012
|
b !== void 0 && i.onValueChange(b.value);
|
|
5010
5013
|
}), x = (f) => {
|
|
5011
|
-
s || (i.onOpenChange(!0),
|
|
5014
|
+
s || (i.onOpenChange(!0), m()), f && (i.triggerPointerDownPosRef.current = {
|
|
5012
5015
|
x: Math.round(f.pageX),
|
|
5013
5016
|
y: Math.round(f.pageY)
|
|
5014
5017
|
});
|
|
@@ -5034,12 +5037,12 @@ var Ao = "SelectTrigger", _o = h.forwardRef(
|
|
|
5034
5037
|
}),
|
|
5035
5038
|
onPointerDown: Z(o.onPointerDown, (f) => {
|
|
5036
5039
|
d.current = f.pointerType;
|
|
5037
|
-
const
|
|
5038
|
-
|
|
5040
|
+
const g = f.target;
|
|
5041
|
+
g.hasPointerCapture(f.pointerId) && g.releasePointerCapture(f.pointerId), f.button === 0 && f.ctrlKey === !1 && f.pointerType === "mouse" && (x(f), f.preventDefault());
|
|
5039
5042
|
}),
|
|
5040
5043
|
onKeyDown: Z(o.onKeyDown, (f) => {
|
|
5041
|
-
const
|
|
5042
|
-
!(f.ctrlKey || f.altKey || f.metaKey) && f.key.length === 1 && v(f.key), !(
|
|
5044
|
+
const g = p.current !== "";
|
|
5045
|
+
!(f.ctrlKey || f.altKey || f.metaKey) && f.key.length === 1 && v(f.key), !(g && f.key === " ") && xc.includes(f.key) && (x(), f.preventDefault());
|
|
5043
5046
|
})
|
|
5044
5047
|
}
|
|
5045
5048
|
) });
|
|
@@ -5057,7 +5060,7 @@ var Po = "SelectValue", Tc = h.forwardRef(
|
|
|
5057
5060
|
...s,
|
|
5058
5061
|
ref: p,
|
|
5059
5062
|
style: { pointerEvents: "none" },
|
|
5060
|
-
children: Xo(l.value) ? /* @__PURE__ */ T(
|
|
5063
|
+
children: Xo(l.value) ? /* @__PURE__ */ T(mn, { children: i }) : a
|
|
5061
5064
|
}
|
|
5062
5065
|
);
|
|
5063
5066
|
}
|
|
@@ -5088,7 +5091,7 @@ var Xe = "SelectContent", No = h.forwardRef(
|
|
|
5088
5091
|
}
|
|
5089
5092
|
);
|
|
5090
5093
|
No.displayName = Xe;
|
|
5091
|
-
var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */
|
|
5094
|
+
var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ mt("SelectContent.RemoveScroll"), Lo = h.forwardRef(
|
|
5092
5095
|
(e, t) => {
|
|
5093
5096
|
const {
|
|
5094
5097
|
__scopeSelect: n,
|
|
@@ -5104,10 +5107,10 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
|
|
|
5104
5107
|
alignOffset: d,
|
|
5105
5108
|
arrowPadding: p,
|
|
5106
5109
|
collisionBoundary: v,
|
|
5107
|
-
collisionPadding:
|
|
5110
|
+
collisionPadding: m,
|
|
5108
5111
|
sticky: x,
|
|
5109
5112
|
hideWhenDetached: f,
|
|
5110
|
-
avoidCollisions:
|
|
5113
|
+
avoidCollisions: g,
|
|
5111
5114
|
//
|
|
5112
5115
|
...w
|
|
5113
5116
|
} = e, b = $e(Xe, n), [y, C] = h.useState(null), [S, E] = h.useState(null), k = ne(t, (R) => C(R)), [I, D] = h.useState(null), [L, $] = h.useState(
|
|
@@ -5175,10 +5178,10 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
|
|
|
5175
5178
|
alignOffset: d,
|
|
5176
5179
|
arrowPadding: p,
|
|
5177
5180
|
collisionBoundary: v,
|
|
5178
|
-
collisionPadding:
|
|
5181
|
+
collisionPadding: m,
|
|
5179
5182
|
sticky: x,
|
|
5180
5183
|
hideWhenDetached: f,
|
|
5181
|
-
avoidCollisions:
|
|
5184
|
+
avoidCollisions: g
|
|
5182
5185
|
} : {};
|
|
5183
5186
|
return /* @__PURE__ */ T(
|
|
5184
5187
|
Oo,
|
|
@@ -5260,8 +5263,8 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
|
|
|
5260
5263
|
);
|
|
5261
5264
|
Lo.displayName = Pc;
|
|
5262
5265
|
var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
|
|
5263
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = $e(Xe, n), i = We(Xe, n), [s, l] = h.useState(null), [c, d] = h.useState(null), p = ne(t, (k) => d(k)), v = jt(n),
|
|
5264
|
-
if (a.trigger && a.valueNode && s && c && f &&
|
|
5266
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = $e(Xe, n), i = We(Xe, n), [s, l] = h.useState(null), [c, d] = h.useState(null), p = ne(t, (k) => d(k)), v = jt(n), m = h.useRef(!1), x = h.useRef(!0), { viewport: f, selectedItem: g, selectedItemText: w, focusSelectedItem: b } = i, y = h.useCallback(() => {
|
|
5267
|
+
if (a.trigger && a.valueNode && s && c && f && g && w) {
|
|
5265
5268
|
const k = a.trigger.getBoundingClientRect(), I = c.getBoundingClientRect(), D = a.valueNode.getBoundingClientRect(), L = w.getBoundingClientRect();
|
|
5266
5269
|
if (a.dir !== "rtl") {
|
|
5267
5270
|
const H = L.left - I.left, U = D.left - H, le = k.left - U, we = k.width + le, ft = Math.max(we, I.width), pt = window.innerWidth - pe, ht = Un(U, [
|
|
@@ -5281,9 +5284,9 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
|
|
|
5281
5284
|
]);
|
|
5282
5285
|
s.style.minWidth = we + "px", s.style.right = ht + "px";
|
|
5283
5286
|
}
|
|
5284
|
-
const $ = v(), W = window.innerHeight - pe * 2, F = f.scrollHeight, N = window.getComputedStyle(c), _ = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), M = parseInt(N.borderBottomWidth, 10), P = parseInt(N.paddingBottom, 10), z = _ + O + F + P + M, Q = Math.min(
|
|
5287
|
+
const $ = v(), W = window.innerHeight - pe * 2, F = f.scrollHeight, N = window.getComputedStyle(c), _ = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), M = parseInt(N.borderBottomWidth, 10), P = parseInt(N.paddingBottom, 10), z = _ + O + F + P + M, Q = Math.min(g.offsetHeight * 5, z), Pe = window.getComputedStyle(f), ut = parseInt(Pe.paddingTop, 10), dt = parseInt(Pe.paddingBottom, 10), Me = k.top + k.height / 2 - pe, Ze = W - Me, He = g.offsetHeight / 2, R = g.offsetTop + He, K = _ + O + R, re = z - K;
|
|
5285
5288
|
if (K <= Me) {
|
|
5286
|
-
const H = $.length > 0 &&
|
|
5289
|
+
const H = $.length > 0 && g === $[$.length - 1].ref.current;
|
|
5287
5290
|
s.style.bottom = "0px";
|
|
5288
5291
|
const U = c.clientHeight - f.offsetTop - f.offsetHeight, le = Math.max(
|
|
5289
5292
|
Ze,
|
|
@@ -5292,7 +5295,7 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
|
|
|
5292
5295
|
), we = K + le;
|
|
5293
5296
|
s.style.height = we + "px";
|
|
5294
5297
|
} else {
|
|
5295
|
-
const H = $.length > 0 &&
|
|
5298
|
+
const H = $.length > 0 && g === $[0].ref.current;
|
|
5296
5299
|
s.style.top = "0px";
|
|
5297
5300
|
const le = Math.max(
|
|
5298
5301
|
Me,
|
|
@@ -5301,7 +5304,7 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
|
|
|
5301
5304
|
) + re;
|
|
5302
5305
|
s.style.height = le + "px", f.scrollTop = K - Me + f.offsetTop;
|
|
5303
5306
|
}
|
|
5304
|
-
s.style.margin = `${pe}px 0`, s.style.minHeight = Q + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() =>
|
|
5307
|
+
s.style.margin = `${pe}px 0`, s.style.minHeight = Q + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => m.current = !0);
|
|
5305
5308
|
}
|
|
5306
5309
|
}, [
|
|
5307
5310
|
v,
|
|
@@ -5310,7 +5313,7 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
|
|
|
5310
5313
|
s,
|
|
5311
5314
|
c,
|
|
5312
5315
|
f,
|
|
5313
|
-
|
|
5316
|
+
g,
|
|
5314
5317
|
w,
|
|
5315
5318
|
a.dir,
|
|
5316
5319
|
r
|
|
@@ -5331,7 +5334,7 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
|
|
|
5331
5334
|
{
|
|
5332
5335
|
scope: n,
|
|
5333
5336
|
contentWrapper: s,
|
|
5334
|
-
shouldExpandOnScrollRef:
|
|
5337
|
+
shouldExpandOnScrollRef: m,
|
|
5335
5338
|
onScrollButtonChange: E,
|
|
5336
5339
|
children: /* @__PURE__ */ T(
|
|
5337
5340
|
"div",
|
|
@@ -5396,7 +5399,7 @@ fn.displayName = Nc;
|
|
|
5396
5399
|
var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
|
|
5397
5400
|
(e, t) => {
|
|
5398
5401
|
const { __scopeSelect: n, nonce: r, ...o } = e, a = We(pn, n), i = Bn(pn, n), s = ne(t, a.onViewportChange), l = h.useRef(0);
|
|
5399
|
-
return /* @__PURE__ */ Nt(
|
|
5402
|
+
return /* @__PURE__ */ Nt(mn, { children: [
|
|
5400
5403
|
/* @__PURE__ */ T(
|
|
5401
5404
|
"style",
|
|
5402
5405
|
{
|
|
@@ -5429,11 +5432,11 @@ var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
|
|
|
5429
5432
|
onScroll: Z(o.onScroll, (c) => {
|
|
5430
5433
|
const d = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = i;
|
|
5431
5434
|
if (v != null && v.current && p) {
|
|
5432
|
-
const
|
|
5433
|
-
if (
|
|
5434
|
-
const x = window.innerHeight - pe * 2, f = parseFloat(p.style.minHeight),
|
|
5435
|
+
const m = Math.abs(l.current - d.scrollTop);
|
|
5436
|
+
if (m > 0) {
|
|
5437
|
+
const x = window.innerHeight - pe * 2, f = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(f, g);
|
|
5435
5438
|
if (w < x) {
|
|
5436
|
-
const b = w +
|
|
5439
|
+
const b = w + m, y = Math.min(x, b), C = b - y;
|
|
5437
5440
|
p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
|
|
5438
5441
|
}
|
|
5439
5442
|
}
|
|
@@ -5468,13 +5471,13 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
|
|
|
5468
5471
|
disabled: o = !1,
|
|
5469
5472
|
textValue: a,
|
|
5470
5473
|
...i
|
|
5471
|
-
} = e, s = $e(Ft, n), l = We(Ft, n), c = s.value === r, [d, p] = h.useState(a ?? ""), [v,
|
|
5474
|
+
} = e, s = $e(Ft, n), l = We(Ft, n), c = s.value === r, [d, p] = h.useState(a ?? ""), [v, m] = h.useState(!1), x = ne(
|
|
5472
5475
|
t,
|
|
5473
5476
|
(b) => {
|
|
5474
5477
|
var y;
|
|
5475
5478
|
return (y = l.itemRefCallback) == null ? void 0 : y.call(l, b, r, o);
|
|
5476
5479
|
}
|
|
5477
|
-
), f = _n(),
|
|
5480
|
+
), f = _n(), g = h.useRef("touch"), w = () => {
|
|
5478
5481
|
o || (s.onValueChange(r), s.onOpenChange(!1));
|
|
5479
5482
|
};
|
|
5480
5483
|
if (r === "")
|
|
@@ -5512,20 +5515,20 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
|
|
|
5512
5515
|
tabIndex: o ? void 0 : -1,
|
|
5513
5516
|
...i,
|
|
5514
5517
|
ref: x,
|
|
5515
|
-
onFocus: Z(i.onFocus, () =>
|
|
5516
|
-
onBlur: Z(i.onBlur, () =>
|
|
5518
|
+
onFocus: Z(i.onFocus, () => m(!0)),
|
|
5519
|
+
onBlur: Z(i.onBlur, () => m(!1)),
|
|
5517
5520
|
onClick: Z(i.onClick, () => {
|
|
5518
|
-
|
|
5521
|
+
g.current !== "mouse" && w();
|
|
5519
5522
|
}),
|
|
5520
5523
|
onPointerUp: Z(i.onPointerUp, () => {
|
|
5521
|
-
|
|
5524
|
+
g.current === "mouse" && w();
|
|
5522
5525
|
}),
|
|
5523
5526
|
onPointerDown: Z(i.onPointerDown, (b) => {
|
|
5524
|
-
|
|
5527
|
+
g.current = b.pointerType;
|
|
5525
5528
|
}),
|
|
5526
5529
|
onPointerMove: Z(i.onPointerMove, (b) => {
|
|
5527
5530
|
var y;
|
|
5528
|
-
|
|
5531
|
+
g.current = b.pointerType, o ? (y = l.onItemLeave) == null || y.call(l) : g.current === "mouse" && b.currentTarget.focus({ preventScroll: !0 });
|
|
5529
5532
|
}),
|
|
5530
5533
|
onPointerLeave: Z(i.onPointerLeave, (b) => {
|
|
5531
5534
|
var y;
|
|
@@ -5544,9 +5547,9 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
|
|
|
5544
5547
|
}
|
|
5545
5548
|
);
|
|
5546
5549
|
Vo.displayName = Ft;
|
|
5547
|
-
var
|
|
5550
|
+
var gt = "SelectItemText", $o = h.forwardRef(
|
|
5548
5551
|
(e, t) => {
|
|
5549
|
-
const { __scopeSelect: n, className: r, style: o, ...a } = e, i = $e(
|
|
5552
|
+
const { __scopeSelect: n, className: r, style: o, ...a } = e, i = $e(gt, n), s = We(gt, n), l = zo(gt, n), c = Ec(gt, n), [d, p] = h.useState(null), v = ne(
|
|
5550
5553
|
t,
|
|
5551
5554
|
(w) => p(w),
|
|
5552
5555
|
l.onItemTextChange,
|
|
@@ -5554,17 +5557,17 @@ var mt = "SelectItemText", $o = h.forwardRef(
|
|
|
5554
5557
|
var b;
|
|
5555
5558
|
return (b = s.itemTextRefCallback) == null ? void 0 : b.call(s, w, l.value, l.disabled);
|
|
5556
5559
|
}
|
|
5557
|
-
),
|
|
5558
|
-
() => /* @__PURE__ */ T("option", { value: l.value, disabled: l.disabled, children:
|
|
5559
|
-
[l.disabled, l.value,
|
|
5560
|
-
), { onNativeOptionAdd: f, onNativeOptionRemove:
|
|
5561
|
-
return se(() => (f(x), () =>
|
|
5560
|
+
), m = d == null ? void 0 : d.textContent, x = h.useMemo(
|
|
5561
|
+
() => /* @__PURE__ */ T("option", { value: l.value, disabled: l.disabled, children: m }, l.value),
|
|
5562
|
+
[l.disabled, l.value, m]
|
|
5563
|
+
), { onNativeOptionAdd: f, onNativeOptionRemove: g } = c;
|
|
5564
|
+
return se(() => (f(x), () => g(x)), [f, g, x]), /* @__PURE__ */ Nt(mn, { children: [
|
|
5562
5565
|
/* @__PURE__ */ T(X.span, { id: l.textId, ...a, ref: v }),
|
|
5563
5566
|
l.isSelected && i.valueNode && !i.valueNodeHasChildren ? h.createPortal(a.children, i.valueNode) : null
|
|
5564
5567
|
] });
|
|
5565
5568
|
}
|
|
5566
5569
|
);
|
|
5567
|
-
$o.displayName =
|
|
5570
|
+
$o.displayName = gt;
|
|
5568
5571
|
var Wo = "SelectItemIndicator", Ho = h.forwardRef(
|
|
5569
5572
|
(e, t) => {
|
|
5570
5573
|
const { __scopeSelect: n, ...r } = e;
|
|
@@ -5654,13 +5657,13 @@ var Yo = h.forwardRef((e, t) => {
|
|
|
5654
5657
|
}
|
|
5655
5658
|
);
|
|
5656
5659
|
Vc.displayName = zc;
|
|
5657
|
-
var
|
|
5660
|
+
var gn = "SelectArrow", $c = h.forwardRef(
|
|
5658
5661
|
(e, t) => {
|
|
5659
|
-
const { __scopeSelect: n, ...r } = e, o = Yt(n), a = $e(
|
|
5662
|
+
const { __scopeSelect: n, ...r } = e, o = Yt(n), a = $e(gn, n), i = We(gn, n);
|
|
5660
5663
|
return a.open && i.position === "popper" ? /* @__PURE__ */ T(Tl, { ...o, ...r, ref: t }) : null;
|
|
5661
5664
|
}
|
|
5662
5665
|
);
|
|
5663
|
-
$c.displayName =
|
|
5666
|
+
$c.displayName = gn;
|
|
5664
5667
|
var Wc = "SelectBubbleInput", Ko = h.forwardRef(
|
|
5665
5668
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
5666
5669
|
const o = h.useRef(null), a = ne(r, o), i = Il(t);
|
|
@@ -5679,7 +5682,7 @@ var Wc = "SelectBubbleInput", Ko = h.forwardRef(
|
|
|
5679
5682
|
X.select,
|
|
5680
5683
|
{
|
|
5681
5684
|
...n,
|
|
5682
|
-
style: { ...
|
|
5685
|
+
style: { ...go, ...n.style },
|
|
5683
5686
|
ref: a,
|
|
5684
5687
|
defaultValue: t
|
|
5685
5688
|
}
|
|
@@ -5856,7 +5859,7 @@ const nu = {
|
|
|
5856
5859
|
bottom: "origin-bottom"
|
|
5857
5860
|
};
|
|
5858
5861
|
function hr({ open: e }) {
|
|
5859
|
-
const t = G(), n = bn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = oe(), d = Ar(), { currentContent: p, currentConfig: v } = kn(),
|
|
5862
|
+
const t = G(), n = bn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = oe(), d = Ar(), { currentContent: p, currentConfig: v } = kn(), m = Y(() => {
|
|
5860
5863
|
var w;
|
|
5861
5864
|
return n.value || r.value ? !d.value || !n.value ? l.value : [
|
|
5862
5865
|
{
|
|
@@ -5870,7 +5873,7 @@ function hr({ open: e }) {
|
|
|
5870
5873
|
] : o.value.transcript_enabled ? l.value : l.value.filter(
|
|
5871
5874
|
(b) => b.type !== "message" || b.isText
|
|
5872
5875
|
);
|
|
5873
|
-
}), x =
|
|
5876
|
+
}), x = m.value.length > 0 || !i.value && o.value.transcript_enabled, f = J(!0), g = p.value !== "feedback";
|
|
5874
5877
|
return /* @__PURE__ */ u(ie, { initial: !1, active: e, children: /* @__PURE__ */ A(
|
|
5875
5878
|
"div",
|
|
5876
5879
|
{
|
|
@@ -5895,7 +5898,7 @@ function hr({ open: e }) {
|
|
|
5895
5898
|
/* @__PURE__ */ u(
|
|
5896
5899
|
Ri,
|
|
5897
5900
|
{
|
|
5898
|
-
transcript:
|
|
5901
|
+
transcript: m,
|
|
5899
5902
|
scrollPinned: f
|
|
5900
5903
|
}
|
|
5901
5904
|
),
|
|
@@ -5911,7 +5914,7 @@ function hr({ open: e }) {
|
|
|
5911
5914
|
/* @__PURE__ */ u(Ni, {}),
|
|
5912
5915
|
/* @__PURE__ */ u(Oi, {})
|
|
5913
5916
|
] }) }),
|
|
5914
|
-
/* @__PURE__ */ u(ie, { active:
|
|
5917
|
+
/* @__PURE__ */ u(ie, { active: g, children: /* @__PURE__ */ A(
|
|
5915
5918
|
"div",
|
|
5916
5919
|
{
|
|
5917
5920
|
className: V(
|
|
@@ -6239,9 +6242,9 @@ const Je = {
|
|
|
6239
6242
|
Ee(() => {
|
|
6240
6243
|
o.value && (i.value ? (r.value = !0, n.value = !0) : r.value = !1);
|
|
6241
6244
|
}), Ee(() => {
|
|
6242
|
-
const v = (
|
|
6243
|
-
var x, f,
|
|
6244
|
-
((x =
|
|
6245
|
+
const v = (m) => {
|
|
6246
|
+
var x, f, g;
|
|
6247
|
+
((x = m.detail) == null ? void 0 : x.action) === "expand" ? n.value = !0 : ((f = m.detail) == null ? void 0 : f.action) === "collapse" ? n.value = !1 : ((g = m.detail) == null ? void 0 : g.action) === "toggle" && (n.value = !n.value);
|
|
6245
6248
|
};
|
|
6246
6249
|
return document.addEventListener("elevenlabs-agent:expand", v), () => {
|
|
6247
6250
|
document.removeEventListener("elevenlabs-agent:expand", v);
|
|
@@ -6259,7 +6262,7 @@ const Je = {
|
|
|
6259
6262
|
] });
|
|
6260
6263
|
});
|
|
6261
6264
|
function vu(e) {
|
|
6262
|
-
return /* @__PURE__ */ u(wa, { value: e, children: /* @__PURE__ */ u(xa, { children: /* @__PURE__ */ u(Ra, { children: /* @__PURE__ */ u(Ta, { children: /* @__PURE__ */ u(ya, { children: /* @__PURE__ */ u(Sa, { children: /* @__PURE__ */ u(ka, { children: /* @__PURE__ */ u(Aa, { children: /* @__PURE__ */ u(Fa, { children: /* @__PURE__ */ u(Ba, { children: /* @__PURE__ */ u(wi, { children: /* @__PURE__ */ A(
|
|
6265
|
+
return /* @__PURE__ */ u(wa, { value: e, children: /* @__PURE__ */ u(xa, { children: /* @__PURE__ */ u(Ra, { children: /* @__PURE__ */ u(Ta, { children: /* @__PURE__ */ u(ya, { children: /* @__PURE__ */ u(Sa, { children: /* @__PURE__ */ u(ka, { children: /* @__PURE__ */ u(Aa, { children: /* @__PURE__ */ u(Fa, { children: /* @__PURE__ */ u(Ba, { children: /* @__PURE__ */ u(wi, { children: /* @__PURE__ */ A(mi, { children: [
|
|
6263
6266
|
/* @__PURE__ */ u(La, {}),
|
|
6264
6267
|
/* @__PURE__ */ u(hu, {})
|
|
6265
6268
|
] }) }) }) }) }) }) }) }) }) }) }) });
|