@imfusion/web-ui 0.5.0
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/README.md +60 -0
- package/bin/install-skill.js +180 -0
- package/dist/assets/vendors/base-ui.d.ts +8 -0
- package/dist/breakpoints/index.d.ts +3 -0
- package/dist/breakpoints/min-width.d.ts +9 -0
- package/dist/breakpoints/registry.d.ts +19 -0
- package/dist/code-qBbqAHK-.js +190 -0
- package/dist/codegen/gen-breakpoints-css.d.ts +6 -0
- package/dist/codegen/gen-css-types.d.ts +1 -0
- package/dist/codegen/gen-token-css.d.ts +6 -0
- package/dist/codegen/run.d.ts +1 -0
- package/dist/components/app-shell/app-shell.d.ts +66 -0
- package/dist/components/app-shell/app-shell.meta.d.ts +2 -0
- package/dist/components/app-shell/index.d.ts +2 -0
- package/dist/components/button/button.d.ts +30 -0
- package/dist/components/button/button.meta.d.ts +2 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/callout/callout.d.ts +42 -0
- package/dist/components/callout/callout.meta.d.ts +2 -0
- package/dist/components/callout/index.d.ts +2 -0
- package/dist/components/card/card.d.ts +64 -0
- package/dist/components/card/card.meta.d.ts +2 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/checkbox/checkbox.d.ts +56 -0
- package/dist/components/checkbox/checkbox.meta.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/chip/chip.cva.d.ts +12 -0
- package/dist/components/chip/chip.d.ts +11 -0
- package/dist/components/chip/chip.meta.d.ts +2 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip-link/chip-link.d.ts +17 -0
- package/dist/components/chip-link/chip-link.meta.d.ts +2 -0
- package/dist/components/chip-link/index.d.ts +2 -0
- package/dist/components/code/code.d.ts +60 -0
- package/dist/components/code/code.meta.d.ts +2 -0
- package/dist/components/code/index.d.ts +2 -0
- package/dist/components/collapsible/collapsible.d.ts +57 -0
- package/dist/components/collapsible/collapsible.meta.d.ts +2 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/copy-button/copy-button.d.ts +21 -0
- package/dist/components/copy-button/copy-button.meta.d.ts +2 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/drawer/drawer.d.ts +191 -0
- package/dist/components/drawer/drawer.meta.d.ts +2 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/input.d.ts +25 -0
- package/dist/components/input/input.meta.d.ts +2 -0
- package/dist/components/logo/imfusion/imfusion.d.ts +16 -0
- package/dist/components/logo/imfusion/index.d.ts +1 -0
- package/dist/components/logo/index.d.ts +3 -0
- package/dist/components/logo/logo.d.ts +15 -0
- package/dist/components/logo/logo.meta.d.ts +2 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +20 -0
- package/dist/components/navigation-menu/navigation-menu.meta.d.ts +2 -0
- package/dist/components/navigation-menu/subs/flyout-link.d.ts +24 -0
- package/dist/components/navigation-menu/subs/inline-submenu.d.ts +41 -0
- package/dist/components/navigation-menu/subs/link.d.ts +64 -0
- package/dist/components/navigation-menu/subs/overlay.d.ts +75 -0
- package/dist/components/navigation-menu/subs/shared.d.ts +20 -0
- package/dist/components/navigation-menu/subs/structure.d.ts +64 -0
- package/dist/components/navigation-menu/subs/trigger.d.ts +47 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +181 -0
- package/dist/components/popover/popover.meta.d.ts +2 -0
- package/dist/components/row/index.d.ts +2 -0
- package/dist/components/row/row.d.ts +28 -0
- package/dist/components/row/row.meta.d.ts +2 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.d.ts +278 -0
- package/dist/components/select/select.meta.d.ts +2 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/separator.d.ts +15 -0
- package/dist/components/separator/separator.meta.d.ts +2 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/slider.d.ts +111 -0
- package/dist/components/slider/slider.meta.d.ts +2 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/spinner.d.ts +19 -0
- package/dist/components/spinner/spinner.geometry.d.ts +37 -0
- package/dist/components/spinner/spinner.meta.d.ts +2 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/stack.d.ts +18 -0
- package/dist/components/stack/stack.meta.d.ts +2 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/switch.d.ts +45 -0
- package/dist/components/switch/switch.meta.d.ts +2 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/table.d.ts +66 -0
- package/dist/components/table/table.meta.d.ts +2 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +91 -0
- package/dist/components/tabs/tabs.meta.d.ts +2 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/toggle.d.ts +31 -0
- package/dist/components/toggle/toggle.meta.d.ts +2 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/toggle-group.d.ts +30 -0
- package/dist/components/toggle-group/toggle-group.meta.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +164 -0
- package/dist/components/tooltip/tooltip.meta.d.ts +2 -0
- package/dist/components/typo/index.d.ts +2 -0
- package/dist/components/typo/typo.d.ts +100 -0
- package/dist/components/typo/typo.meta.d.ts +2 -0
- package/dist/config.d.ts +8 -0
- package/dist/docgen/gen-docgen.d.ts +1 -0
- package/dist/docgen/gen-docgen.utils.d.ts +13 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/use-clipboard.d.ts +12 -0
- package/dist/hooks/use-color-scheme.d.ts +31 -0
- package/dist/hooks/use-media-query.d.ts +13 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +13103 -0
- package/dist/integrations/code-highlight/code-highlight.d.ts +21 -0
- package/dist/integrations/code-highlight/code-highlight.meta.d.ts +2 -0
- package/dist/integrations/code-highlight/highlighter.d.ts +6 -0
- package/dist/integrations/code-highlight/index.d.ts +3 -0
- package/dist/integrations/code-highlight.js +97 -0
- package/dist/integrations/image-display-options/image-display-options-view.d.ts +22 -0
- package/dist/integrations/image-display-options/image-display-options-view.utils.d.ts +40 -0
- package/dist/integrations/image-display-options/image-display-options.d.ts +29 -0
- package/dist/integrations/image-display-options/image-display-options.meta.d.ts +2 -0
- package/dist/integrations/image-display-options/index.d.ts +2 -0
- package/dist/integrations/image-display-options.js +319 -0
- package/dist/llms/gen-llms.d.ts +1 -0
- package/dist/meta-B8C51eyL.js +74 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/web-ui-provider.d.ts +6 -0
- package/dist/style.css +2 -0
- package/dist/tabs-DqBFSqq6.js +3789 -0
- package/dist/tokens/apply.d.ts +55 -0
- package/dist/tokens/control-registry.d.ts +10 -0
- package/dist/tokens/token-registry.d.ts +13 -0
- package/dist/tokens/types.d.ts +71 -0
- package/dist/tokens/use-token-controls.d.ts +36 -0
- package/dist/types/docgen.d.ts +17 -0
- package/dist/types/meta.d.ts +108 -0
- package/dist/types/theme.d.ts +3 -0
- package/package.json +139 -0
- package/src/docgen/doc.gen.json +4695 -0
- package/src/llms/llms.gen.txt +176 -0
- package/src/llms/skills/imf-web-ui/SKILL.md +46 -0
- package/src/llms/skills/imf-web-ui-components/SKILL.md +100 -0
- package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +67 -0
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +94 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +30 -0
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +103 -0
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +48 -0
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +29 -0
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +38 -0
|
@@ -0,0 +1,3789 @@
|
|
|
1
|
+
import { a as e, i as t, n } from "./meta-B8C51eyL.js";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { Children as i, createElement as a } from "react";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import * as c from "react-dom";
|
|
6
|
+
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
7
|
+
function l() {
|
|
8
|
+
return typeof window < "u";
|
|
9
|
+
}
|
|
10
|
+
function u(e) {
|
|
11
|
+
return p(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
12
|
+
}
|
|
13
|
+
function d(e) {
|
|
14
|
+
var t;
|
|
15
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
16
|
+
}
|
|
17
|
+
function f(e) {
|
|
18
|
+
return ((p(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
19
|
+
}
|
|
20
|
+
function p(e) {
|
|
21
|
+
return l() ? e instanceof Node || e instanceof d(e).Node : !1;
|
|
22
|
+
}
|
|
23
|
+
function m(e) {
|
|
24
|
+
return l() ? e instanceof Element || e instanceof d(e).Element : !1;
|
|
25
|
+
}
|
|
26
|
+
function h(e) {
|
|
27
|
+
return l() ? e instanceof HTMLElement || e instanceof d(e).HTMLElement : !1;
|
|
28
|
+
}
|
|
29
|
+
function g(e) {
|
|
30
|
+
return !l() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof d(e).ShadowRoot;
|
|
31
|
+
}
|
|
32
|
+
function _(e) {
|
|
33
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = O(e);
|
|
34
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
35
|
+
}
|
|
36
|
+
function v(e) {
|
|
37
|
+
return /^(table|td|th)$/.test(u(e));
|
|
38
|
+
}
|
|
39
|
+
function y(e) {
|
|
40
|
+
try {
|
|
41
|
+
if (e.matches(":popover-open")) return !0;
|
|
42
|
+
} catch {}
|
|
43
|
+
try {
|
|
44
|
+
return e.matches(":modal");
|
|
45
|
+
} catch {
|
|
46
|
+
return !1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
var b = /transform|translate|scale|rotate|perspective|filter/, x = /paint|layout|strict|content/, S = (e) => !!e && e !== "none", C;
|
|
50
|
+
function w(e) {
|
|
51
|
+
let t = m(e) ? O(e) : e;
|
|
52
|
+
return S(t.transform) || S(t.translate) || S(t.scale) || S(t.rotate) || S(t.perspective) || !E() && (S(t.backdropFilter) || S(t.filter)) || b.test(t.willChange || "") || x.test(t.contain || "");
|
|
53
|
+
}
|
|
54
|
+
function T(e) {
|
|
55
|
+
let t = A(e);
|
|
56
|
+
for (; h(t) && !D(t);) {
|
|
57
|
+
if (w(t)) return t;
|
|
58
|
+
if (y(t)) return null;
|
|
59
|
+
t = A(t);
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function E() {
|
|
64
|
+
return C ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), C;
|
|
65
|
+
}
|
|
66
|
+
function D(e) {
|
|
67
|
+
return /^(html|body|#document)$/.test(u(e));
|
|
68
|
+
}
|
|
69
|
+
function O(e) {
|
|
70
|
+
return d(e).getComputedStyle(e);
|
|
71
|
+
}
|
|
72
|
+
function k(e) {
|
|
73
|
+
return m(e) ? {
|
|
74
|
+
scrollLeft: e.scrollLeft,
|
|
75
|
+
scrollTop: e.scrollTop
|
|
76
|
+
} : {
|
|
77
|
+
scrollLeft: e.scrollX,
|
|
78
|
+
scrollTop: e.scrollY
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function A(e) {
|
|
82
|
+
if (u(e) === "html") return e;
|
|
83
|
+
let t = e.assignedSlot || e.parentNode || g(e) && e.host || f(e);
|
|
84
|
+
return g(t) ? t.host : t;
|
|
85
|
+
}
|
|
86
|
+
function j(e) {
|
|
87
|
+
let t = A(e);
|
|
88
|
+
return D(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : h(t) && _(t) ? t : j(t);
|
|
89
|
+
}
|
|
90
|
+
function M(e, t, n) {
|
|
91
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
92
|
+
let r = j(e), i = r === e.ownerDocument?.body, a = d(r);
|
|
93
|
+
if (i) {
|
|
94
|
+
let e = ee(a);
|
|
95
|
+
return t.concat(a, a.visualViewport || [], _(r) ? r : [], e && n ? M(e) : []);
|
|
96
|
+
} else return t.concat(r, M(r, [], n));
|
|
97
|
+
}
|
|
98
|
+
function ee(e) {
|
|
99
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region node_modules/@base-ui/utils/safeReact.mjs
|
|
103
|
+
var N = { ...r }, P = {};
|
|
104
|
+
function F(e, t) {
|
|
105
|
+
let n = r.useRef(P);
|
|
106
|
+
return n.current === P && (n.current = e(t)), n;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region node_modules/@base-ui/utils/useStableCallback.mjs
|
|
110
|
+
var te = N.useInsertionEffect, I = te && te !== N.useLayoutEffect ? te : (e) => e();
|
|
111
|
+
function L(e) {
|
|
112
|
+
let t = F(R).current;
|
|
113
|
+
return t.next = e, I(t.effect), t.trampoline;
|
|
114
|
+
}
|
|
115
|
+
function R() {
|
|
116
|
+
let e = {
|
|
117
|
+
next: void 0,
|
|
118
|
+
callback: ne,
|
|
119
|
+
trampoline: (...t) => e.callback?.(...t),
|
|
120
|
+
effect: () => {
|
|
121
|
+
e.callback = e.next;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
return e;
|
|
125
|
+
}
|
|
126
|
+
function ne() {
|
|
127
|
+
if (process.env.NODE_ENV !== "production") throw Error("Base UI: Cannot call an event handler while rendering.");
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region node_modules/@base-ui/utils/error.mjs
|
|
131
|
+
var z;
|
|
132
|
+
process.env.NODE_ENV !== "production" && (z = /* @__PURE__ */ new Set());
|
|
133
|
+
function B(...e) {
|
|
134
|
+
if (process.env.NODE_ENV !== "production") {
|
|
135
|
+
let t = e.join(" ");
|
|
136
|
+
z.has(t) || (z.add(t), console.error(`Base UI: ${t}`));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
var V = typeof document < "u" ? r.useLayoutEffect : () => {};
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region node_modules/@base-ui/utils/mergeObjects.mjs
|
|
142
|
+
function H(e, t) {
|
|
143
|
+
if (e && !t) return e;
|
|
144
|
+
if (!e && t) return t;
|
|
145
|
+
if (e || t) return {
|
|
146
|
+
...e,
|
|
147
|
+
...t
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region node_modules/@base-ui/react/merge-props/mergeProps.mjs
|
|
152
|
+
var re = {};
|
|
153
|
+
function U(e, t, n, r, i) {
|
|
154
|
+
if (!n && !r && !i && !e) return ae(t);
|
|
155
|
+
let a = ae(e);
|
|
156
|
+
return t && (a = W(a, t)), n && (a = W(a, n)), r && (a = W(a, r)), i && (a = W(a, i)), a;
|
|
157
|
+
}
|
|
158
|
+
function ie(e) {
|
|
159
|
+
if (e.length === 0) return re;
|
|
160
|
+
if (e.length === 1) return ae(e[0]);
|
|
161
|
+
let t = ae(e[0]);
|
|
162
|
+
for (let n = 1; n < e.length; n += 1) t = W(t, e[n]);
|
|
163
|
+
return t;
|
|
164
|
+
}
|
|
165
|
+
function ae(e) {
|
|
166
|
+
return G(e) ? { ...K(e, re) } : oe(e);
|
|
167
|
+
}
|
|
168
|
+
function W(e, t) {
|
|
169
|
+
return G(t) ? K(t, e) : se(e, t);
|
|
170
|
+
}
|
|
171
|
+
function oe(e) {
|
|
172
|
+
let t = { ...e };
|
|
173
|
+
for (let e in t) {
|
|
174
|
+
let n = t[e];
|
|
175
|
+
ce(e, n) && (t[e] = ue(n));
|
|
176
|
+
}
|
|
177
|
+
return t;
|
|
178
|
+
}
|
|
179
|
+
function se(e, t) {
|
|
180
|
+
if (!t) return e;
|
|
181
|
+
for (let n in t) {
|
|
182
|
+
let r = t[n];
|
|
183
|
+
switch (n) {
|
|
184
|
+
case "style":
|
|
185
|
+
e[n] = H(e.style, r);
|
|
186
|
+
break;
|
|
187
|
+
case "className":
|
|
188
|
+
e[n] = de(e.className, r);
|
|
189
|
+
break;
|
|
190
|
+
default: ce(n, r) ? e[n] = le(e[n], r) : e[n] = r;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return e;
|
|
194
|
+
}
|
|
195
|
+
function ce(e, t) {
|
|
196
|
+
let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
|
|
197
|
+
return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
|
|
198
|
+
}
|
|
199
|
+
function G(e) {
|
|
200
|
+
return typeof e == "function";
|
|
201
|
+
}
|
|
202
|
+
function K(e, t) {
|
|
203
|
+
return G(e) ? e(t) : e ?? re;
|
|
204
|
+
}
|
|
205
|
+
function le(e, t) {
|
|
206
|
+
return t ? e ? (...n) => {
|
|
207
|
+
let r = n[0];
|
|
208
|
+
if (fe(r)) {
|
|
209
|
+
let i = r;
|
|
210
|
+
q(i);
|
|
211
|
+
let a = t(...n);
|
|
212
|
+
return i.baseUIHandlerPrevented || e?.(...n), a;
|
|
213
|
+
}
|
|
214
|
+
let i = t(...n);
|
|
215
|
+
return e?.(...n), i;
|
|
216
|
+
} : ue(t) : e;
|
|
217
|
+
}
|
|
218
|
+
function ue(e) {
|
|
219
|
+
return e && ((...t) => {
|
|
220
|
+
let n = t[0];
|
|
221
|
+
return fe(n) && q(n), e(...t);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
function q(e) {
|
|
225
|
+
return e.preventBaseUIHandler = () => {
|
|
226
|
+
e.baseUIHandlerPrevented = !0;
|
|
227
|
+
}, e;
|
|
228
|
+
}
|
|
229
|
+
function de(e, t) {
|
|
230
|
+
return t ? e ? t + " " + e : t : e;
|
|
231
|
+
}
|
|
232
|
+
function fe(e) {
|
|
233
|
+
return typeof e == "object" && !!e && "nativeEvent" in e;
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region node_modules/@base-ui/utils/formatErrorMessage.mjs
|
|
237
|
+
function pe(e, t) {
|
|
238
|
+
return function(n, ...r) {
|
|
239
|
+
let i = new URL(e);
|
|
240
|
+
return i.searchParams.set("code", n.toString()), r.forEach((e) => i.searchParams.append("args[]", e)), `${t} error #${n}; visit ${i} for the full message.`;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
var J = pe("https://base-ui.com/production-error", "Base UI"), me = /* @__PURE__ */ r.createContext(void 0);
|
|
244
|
+
process.env.NODE_ENV !== "production" && (me.displayName = "CompositeRootContext");
|
|
245
|
+
function he(e = !1) {
|
|
246
|
+
let t = r.useContext(me);
|
|
247
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(16) : "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");
|
|
248
|
+
return t;
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
|
|
252
|
+
function ge(e) {
|
|
253
|
+
let { focusableWhenDisabled: t, disabled: n, composite: i = !1, tabIndex: a = 0, isNativeButton: o } = e, s = i && t !== !1, c = i && t === !1;
|
|
254
|
+
return { props: r.useMemo(() => {
|
|
255
|
+
let e = { onKeyDown(e) {
|
|
256
|
+
n && t && e.key !== "Tab" && e.preventDefault();
|
|
257
|
+
} };
|
|
258
|
+
return i || (e.tabIndex = a, !o && n && (e.tabIndex = t ? a : -1)), (o && (t || s) || !o && n) && (e["aria-disabled"] = n), o && (!t || c) && (e.disabled = n), e;
|
|
259
|
+
}, [
|
|
260
|
+
i,
|
|
261
|
+
n,
|
|
262
|
+
t,
|
|
263
|
+
s,
|
|
264
|
+
c,
|
|
265
|
+
o,
|
|
266
|
+
a
|
|
267
|
+
]) };
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region node_modules/@base-ui/react/internals/use-button/useButton.mjs
|
|
271
|
+
function _e(e = {}) {
|
|
272
|
+
let { disabled: t = !1, focusableWhenDisabled: n, tabIndex: i = 0, native: a = !0, composite: o } = e, s = r.useRef(null), c = he(!0), l = o ?? c !== void 0, { props: u } = ge({
|
|
273
|
+
focusableWhenDisabled: n,
|
|
274
|
+
disabled: t,
|
|
275
|
+
composite: l,
|
|
276
|
+
tabIndex: i,
|
|
277
|
+
isNativeButton: a
|
|
278
|
+
});
|
|
279
|
+
process.env.NODE_ENV !== "production" && r.useEffect(() => {
|
|
280
|
+
if (!s.current) return;
|
|
281
|
+
let e = ve(s.current);
|
|
282
|
+
a ? e || B(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${N.captureOwnerStack?.() || ""}`) : e && B(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${N.captureOwnerStack?.() || ""}`);
|
|
283
|
+
}, [a]);
|
|
284
|
+
let d = r.useCallback(() => {
|
|
285
|
+
let e = s.current;
|
|
286
|
+
ve(e) && l && t && u.disabled === void 0 && e.disabled && (e.disabled = !1);
|
|
287
|
+
}, [
|
|
288
|
+
t,
|
|
289
|
+
u.disabled,
|
|
290
|
+
l
|
|
291
|
+
]);
|
|
292
|
+
return V(d, [d]), {
|
|
293
|
+
getButtonProps: r.useCallback((e = {}) => {
|
|
294
|
+
let { onClick: n, onMouseDown: r, onKeyUp: i, onKeyDown: o, onPointerDown: s, ...c } = e;
|
|
295
|
+
return U({
|
|
296
|
+
onClick(e) {
|
|
297
|
+
if (t) {
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
n?.(e);
|
|
302
|
+
},
|
|
303
|
+
onMouseDown(e) {
|
|
304
|
+
t || r?.(e);
|
|
305
|
+
},
|
|
306
|
+
onKeyDown(e) {
|
|
307
|
+
if (t || (q(e), o?.(e), e.baseUIHandlerPrevented)) return;
|
|
308
|
+
let r = e.target === e.currentTarget, i = e.currentTarget, s = ve(i), c = !a && ye(i), u = r && (a ? s : !c), d = e.key === "Enter", f = e.key === " ", p = i.getAttribute("role"), m = p?.startsWith("menuitem") || p === "option" || p === "gridcell";
|
|
309
|
+
if (r && l && f) {
|
|
310
|
+
if (e.defaultPrevented && m) return;
|
|
311
|
+
e.preventDefault(), c || a && s ? (i.click(), e.preventBaseUIHandler()) : u && (n?.(e), e.preventBaseUIHandler());
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
u && (!a && (f || d) && e.preventDefault(), !a && d && n?.(e));
|
|
315
|
+
},
|
|
316
|
+
onKeyUp(e) {
|
|
317
|
+
if (!t) {
|
|
318
|
+
if (q(e), i?.(e), e.target === e.currentTarget && a && l && ve(e.currentTarget) && e.key === " ") {
|
|
319
|
+
e.preventDefault();
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
e.baseUIHandlerPrevented || e.target === e.currentTarget && !a && !l && e.key === " " && n?.(e);
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
onPointerDown(e) {
|
|
326
|
+
if (t) {
|
|
327
|
+
e.preventDefault();
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
s?.(e);
|
|
331
|
+
}
|
|
332
|
+
}, a ? { type: "button" } : { role: "button" }, u, c);
|
|
333
|
+
}, [
|
|
334
|
+
t,
|
|
335
|
+
u,
|
|
336
|
+
l,
|
|
337
|
+
a
|
|
338
|
+
]),
|
|
339
|
+
buttonRef: L((e) => {
|
|
340
|
+
s.current = e, d();
|
|
341
|
+
})
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function ve(e) {
|
|
345
|
+
return h(e) && e.tagName === "BUTTON";
|
|
346
|
+
}
|
|
347
|
+
function ye(e) {
|
|
348
|
+
return !!(e?.tagName === "A" && e?.href);
|
|
349
|
+
}
|
|
350
|
+
//#endregion
|
|
351
|
+
//#region node_modules/@base-ui/utils/useMergedRefs.mjs
|
|
352
|
+
function be(e, t, n, r) {
|
|
353
|
+
let i = F(Se).current;
|
|
354
|
+
return Ce(i, e, t, n, r) && we(i, [
|
|
355
|
+
e,
|
|
356
|
+
t,
|
|
357
|
+
n,
|
|
358
|
+
r
|
|
359
|
+
]), i.callback;
|
|
360
|
+
}
|
|
361
|
+
function xe(e) {
|
|
362
|
+
let t = F(Se).current;
|
|
363
|
+
return Y(t, e) && we(t, e), t.callback;
|
|
364
|
+
}
|
|
365
|
+
function Se() {
|
|
366
|
+
return {
|
|
367
|
+
callback: null,
|
|
368
|
+
cleanup: null,
|
|
369
|
+
refs: []
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
function Ce(e, t, n, r, i) {
|
|
373
|
+
return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
|
|
374
|
+
}
|
|
375
|
+
function Y(e, t) {
|
|
376
|
+
return e.refs.length !== t.length || e.refs.some((e, n) => e !== t[n]);
|
|
377
|
+
}
|
|
378
|
+
function we(e, t) {
|
|
379
|
+
if (e.refs = t, t.every((e) => e == null)) {
|
|
380
|
+
e.callback = null;
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
e.callback = (n) => {
|
|
384
|
+
if (e.cleanup &&= (e.cleanup(), null), n != null) {
|
|
385
|
+
let r = Array(t.length).fill(null);
|
|
386
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
387
|
+
let i = t[e];
|
|
388
|
+
if (i != null) switch (typeof i) {
|
|
389
|
+
case "function": {
|
|
390
|
+
let t = i(n);
|
|
391
|
+
typeof t == "function" && (r[e] = t);
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
case "object":
|
|
395
|
+
i.current = n;
|
|
396
|
+
break;
|
|
397
|
+
default:
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
e.cleanup = () => {
|
|
401
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
402
|
+
let n = t[e];
|
|
403
|
+
if (n != null) switch (typeof n) {
|
|
404
|
+
case "function": {
|
|
405
|
+
let t = r[e];
|
|
406
|
+
typeof t == "function" ? t() : n(null);
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
case "object":
|
|
410
|
+
n.current = null;
|
|
411
|
+
break;
|
|
412
|
+
default:
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region node_modules/@base-ui/utils/reactVersion.mjs
|
|
421
|
+
var Te = parseInt(r.version, 10);
|
|
422
|
+
function Ee(e) {
|
|
423
|
+
return Te >= e;
|
|
424
|
+
}
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region node_modules/@base-ui/utils/getReactElementRef.mjs
|
|
427
|
+
function De(e) {
|
|
428
|
+
if (!/* @__PURE__ */ r.isValidElement(e)) return null;
|
|
429
|
+
let t = e, n = t.props;
|
|
430
|
+
return (Ee(19) ? n?.ref : t.ref) ?? null;
|
|
431
|
+
}
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region node_modules/@base-ui/utils/warn.mjs
|
|
434
|
+
var Oe;
|
|
435
|
+
process.env.NODE_ENV !== "production" && (Oe = /* @__PURE__ */ new Set());
|
|
436
|
+
function ke(...e) {
|
|
437
|
+
if (process.env.NODE_ENV !== "production") {
|
|
438
|
+
let t = e.join(" ");
|
|
439
|
+
Oe.has(t) || (Oe.add(t), console.warn(`Base UI: ${t}`));
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region node_modules/@base-ui/utils/empty.mjs
|
|
444
|
+
function X() {}
|
|
445
|
+
var Ae = Object.freeze([]), je = Object.freeze({});
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
|
|
448
|
+
function Me(e, t) {
|
|
449
|
+
let n = {};
|
|
450
|
+
for (let r in e) {
|
|
451
|
+
let i = e[r];
|
|
452
|
+
if (t?.hasOwnProperty(r)) {
|
|
453
|
+
let e = t[r](i);
|
|
454
|
+
e != null && Object.assign(n, e);
|
|
455
|
+
continue;
|
|
456
|
+
}
|
|
457
|
+
i === !0 ? n[`data-${r.toLowerCase()}`] = "" : i && (n[`data-${r.toLowerCase()}`] = i.toString());
|
|
458
|
+
}
|
|
459
|
+
return n;
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region node_modules/@base-ui/react/utils/resolveClassName.mjs
|
|
463
|
+
function Ne(e, t) {
|
|
464
|
+
return typeof e == "function" ? e(t) : e;
|
|
465
|
+
}
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region node_modules/@base-ui/react/utils/resolveStyle.mjs
|
|
468
|
+
function Pe(e, t) {
|
|
469
|
+
return typeof e == "function" ? e(t) : e;
|
|
470
|
+
}
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region node_modules/@base-ui/react/internals/useRenderElement.mjs
|
|
473
|
+
function Z(e, t, n = {}) {
|
|
474
|
+
let r = t.render, i = Fe(t, n);
|
|
475
|
+
return n.enabled === !1 ? null : Be(e, r, i, n.state ?? je);
|
|
476
|
+
}
|
|
477
|
+
function Fe(e, t = {}) {
|
|
478
|
+
let { className: n, style: r, render: i } = e, { state: a = je, ref: o, props: s, stateAttributesMapping: c, enabled: l = !0 } = t, u = l ? Ne(n, a) : void 0, d = l ? Pe(r, a) : void 0, f = l ? Me(a, c) : je, p = l && s ? Ie(s) : void 0, m = l ? H(f, p) ?? {} : je;
|
|
479
|
+
return typeof document < "u" && (l ? Array.isArray(o) ? m.ref = xe([
|
|
480
|
+
m.ref,
|
|
481
|
+
De(i),
|
|
482
|
+
...o
|
|
483
|
+
]) : m.ref = be(m.ref, De(i), o) : be(null, null)), l ? (u !== void 0 && (m.className = de(m.className, u)), d !== void 0 && (m.style = H(m.style, d)), m) : je;
|
|
484
|
+
}
|
|
485
|
+
function Ie(e) {
|
|
486
|
+
return Array.isArray(e) ? ie(e) : U(void 0, e);
|
|
487
|
+
}
|
|
488
|
+
var Le = Symbol.for("react.lazy"), Re = /^[A-Z][A-Za-z0-9$]*$/, ze = /[a-z]/;
|
|
489
|
+
function Be(e, t, n, i) {
|
|
490
|
+
if (t) {
|
|
491
|
+
if (typeof t == "function") return process.env.NODE_ENV !== "production" && Ve(t), t(n, i);
|
|
492
|
+
let e = U(n, t.props);
|
|
493
|
+
e.ref = n.ref;
|
|
494
|
+
let a = t;
|
|
495
|
+
if (a?.$$typeof === Le && (a = r.Children.toArray(t)[0]), process.env.NODE_ENV !== "production" && !/* @__PURE__ */ r.isValidElement(a)) throw Error([
|
|
496
|
+
"Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
|
|
497
|
+
"A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
|
|
498
|
+
"https://base-ui.com/r/invalid-render-prop"
|
|
499
|
+
].join("\n"));
|
|
500
|
+
return /* @__PURE__ */ r.cloneElement(a, e);
|
|
501
|
+
}
|
|
502
|
+
if (e && typeof e == "string") return He(e, n);
|
|
503
|
+
throw Error(process.env.NODE_ENV === "production" ? J(8) : "Base UI: Render element or function are not defined.");
|
|
504
|
+
}
|
|
505
|
+
function Ve(e) {
|
|
506
|
+
let t = e.name;
|
|
507
|
+
t.length !== 0 && Re.test(t) && ze.test(t) && ke(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
|
|
508
|
+
}
|
|
509
|
+
function He(e, t) {
|
|
510
|
+
return e === "button" ? /* @__PURE__ */ a("button", {
|
|
511
|
+
type: "button",
|
|
512
|
+
...t,
|
|
513
|
+
key: t.key
|
|
514
|
+
}) : e === "img" ? /* @__PURE__ */ a("img", {
|
|
515
|
+
alt: "",
|
|
516
|
+
...t,
|
|
517
|
+
key: t.key
|
|
518
|
+
}) : /* @__PURE__ */ r.createElement(e, t);
|
|
519
|
+
}
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region node_modules/@base-ui/utils/useControlled.mjs
|
|
522
|
+
function Ue({ controlled: e, default: t, name: n, state: i = "value" }) {
|
|
523
|
+
let { current: a } = r.useRef(e !== void 0), [o, s] = r.useState(t), c = a ? e : o;
|
|
524
|
+
if (process.env.NODE_ENV !== "production") {
|
|
525
|
+
r.useEffect(() => {
|
|
526
|
+
a !== (e !== void 0) && B([
|
|
527
|
+
`A component is changing the ${a ? "" : "un"}controlled ${i} state of ${n} to be ${a ? "un" : ""}controlled.`,
|
|
528
|
+
"Elements should not switch from uncontrolled to controlled (or vice versa).",
|
|
529
|
+
`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,
|
|
530
|
+
"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",
|
|
531
|
+
"More info: https://fb.me/react-controlled-components"
|
|
532
|
+
].join("\n"));
|
|
533
|
+
}, [
|
|
534
|
+
i,
|
|
535
|
+
n,
|
|
536
|
+
e
|
|
537
|
+
]);
|
|
538
|
+
let { current: o } = r.useRef(t);
|
|
539
|
+
r.useEffect(() => {
|
|
540
|
+
!a && We(o) !== We(t) && B([`A component is changing the default ${i} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join("\n"));
|
|
541
|
+
}, [t]);
|
|
542
|
+
}
|
|
543
|
+
return [c, r.useCallback((e) => {
|
|
544
|
+
a || s(e);
|
|
545
|
+
}, [])];
|
|
546
|
+
}
|
|
547
|
+
function We(e) {
|
|
548
|
+
let t = 0, n = /* @__PURE__ */ new WeakMap();
|
|
549
|
+
try {
|
|
550
|
+
return JSON.stringify(e, function(e, r) {
|
|
551
|
+
if (!(e === "_owner" && this != null && typeof this == "object" && "$$typeof" in this)) {
|
|
552
|
+
if (typeof r == "bigint") return `__bigint__:${r}`;
|
|
553
|
+
if (typeof r == "object" && r) {
|
|
554
|
+
let e = n.get(r);
|
|
555
|
+
if (e !== void 0) return `__object__:${e}`;
|
|
556
|
+
n.set(r, t), t += 1;
|
|
557
|
+
}
|
|
558
|
+
return r;
|
|
559
|
+
}
|
|
560
|
+
}) ?? `__top__:${typeof e}`;
|
|
561
|
+
} catch {
|
|
562
|
+
return "__unserializable__";
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region node_modules/@base-ui/utils/visuallyHidden.mjs
|
|
567
|
+
var Ge = {
|
|
568
|
+
clipPath: "inset(50%)",
|
|
569
|
+
overflow: "hidden",
|
|
570
|
+
whiteSpace: "nowrap",
|
|
571
|
+
border: 0,
|
|
572
|
+
padding: 0,
|
|
573
|
+
width: 1,
|
|
574
|
+
height: 1,
|
|
575
|
+
margin: -1
|
|
576
|
+
}, Ke = {
|
|
577
|
+
...Ge,
|
|
578
|
+
position: "fixed",
|
|
579
|
+
top: 0,
|
|
580
|
+
left: 0
|
|
581
|
+
}, qe = {
|
|
582
|
+
...Ge,
|
|
583
|
+
position: "absolute"
|
|
584
|
+
};
|
|
585
|
+
//#endregion
|
|
586
|
+
//#region node_modules/@base-ui/utils/owner.mjs
|
|
587
|
+
function Je(e) {
|
|
588
|
+
return e?.ownerDocument || document;
|
|
589
|
+
}
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
|
|
592
|
+
var Ye = /* @__PURE__ */ function(e) {
|
|
593
|
+
return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
594
|
+
}({}), Xe = {
|
|
595
|
+
badInput: !1,
|
|
596
|
+
customError: !1,
|
|
597
|
+
patternMismatch: !1,
|
|
598
|
+
rangeOverflow: !1,
|
|
599
|
+
rangeUnderflow: !1,
|
|
600
|
+
stepMismatch: !1,
|
|
601
|
+
tooLong: !1,
|
|
602
|
+
tooShort: !1,
|
|
603
|
+
typeMismatch: !1,
|
|
604
|
+
valid: null,
|
|
605
|
+
valueMissing: !1
|
|
606
|
+
}, Ze = {
|
|
607
|
+
valid: null,
|
|
608
|
+
touched: !1,
|
|
609
|
+
dirty: !1,
|
|
610
|
+
filled: !1,
|
|
611
|
+
focused: !1
|
|
612
|
+
}, Qe = {
|
|
613
|
+
disabled: !1,
|
|
614
|
+
...Ze
|
|
615
|
+
}, $e = { valid(e) {
|
|
616
|
+
return e === null ? null : e ? { [Ye.valid]: "" } : { [Ye.invalid]: "" };
|
|
617
|
+
} }, et = 0;
|
|
618
|
+
function tt(e, t = "mui") {
|
|
619
|
+
let [n, i] = r.useState(e), a = e || n;
|
|
620
|
+
return r.useEffect(() => {
|
|
621
|
+
n ?? (et += 1, i(`${t}-${et}`));
|
|
622
|
+
}, [n, t]), a;
|
|
623
|
+
}
|
|
624
|
+
var nt = N.useId;
|
|
625
|
+
function rt(e, t) {
|
|
626
|
+
if (nt !== void 0) {
|
|
627
|
+
let n = nt();
|
|
628
|
+
return e ?? (t ? `${t}-${n}` : n);
|
|
629
|
+
}
|
|
630
|
+
return tt(e, t);
|
|
631
|
+
}
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region node_modules/@base-ui/react/internals/useBaseUiId.mjs
|
|
634
|
+
function it(e) {
|
|
635
|
+
return rt(e, "base-ui");
|
|
636
|
+
}
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
|
|
639
|
+
var at = {
|
|
640
|
+
invalid: void 0,
|
|
641
|
+
name: void 0,
|
|
642
|
+
validityData: {
|
|
643
|
+
state: Xe,
|
|
644
|
+
errors: [],
|
|
645
|
+
error: "",
|
|
646
|
+
value: "",
|
|
647
|
+
initialValue: null
|
|
648
|
+
},
|
|
649
|
+
setValidityData: X,
|
|
650
|
+
disabled: void 0,
|
|
651
|
+
touched: Ze.touched,
|
|
652
|
+
setTouched: X,
|
|
653
|
+
dirty: Ze.dirty,
|
|
654
|
+
setDirty: X,
|
|
655
|
+
filled: Ze.filled,
|
|
656
|
+
setFilled: X,
|
|
657
|
+
focused: Ze.focused,
|
|
658
|
+
setFocused: X,
|
|
659
|
+
validate: () => null,
|
|
660
|
+
validationMode: "onSubmit",
|
|
661
|
+
validationDebounceTime: 0,
|
|
662
|
+
shouldValidateOnChange: () => !1,
|
|
663
|
+
state: Qe,
|
|
664
|
+
markedDirtyRef: { current: !1 },
|
|
665
|
+
registerFieldControl: X,
|
|
666
|
+
validation: {
|
|
667
|
+
getValidationProps: (e, t = je) => t,
|
|
668
|
+
inputRef: { current: null },
|
|
669
|
+
registerInput: X,
|
|
670
|
+
commit: async () => {},
|
|
671
|
+
change: X
|
|
672
|
+
}
|
|
673
|
+
}, ot = /* @__PURE__ */ r.createContext(at);
|
|
674
|
+
process.env.NODE_ENV !== "production" && (ot.displayName = "FieldRootContext");
|
|
675
|
+
function st(e = !0) {
|
|
676
|
+
let t = r.useContext(ot);
|
|
677
|
+
if (t.setValidityData === X && !e) throw Error(process.env.NODE_ENV === "production" ? J(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
678
|
+
return t;
|
|
679
|
+
}
|
|
680
|
+
//#endregion
|
|
681
|
+
//#region node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
|
|
682
|
+
function ct(e, t, n, i, a = !0, o) {
|
|
683
|
+
let { registerFieldControl: s } = st(), c = r.useRef(null);
|
|
684
|
+
c.current ||= Symbol(), V(() => {
|
|
685
|
+
let r = c.current;
|
|
686
|
+
if (!(!r || !a)) return s(r, {
|
|
687
|
+
controlRef: e,
|
|
688
|
+
getValue: i,
|
|
689
|
+
id: t,
|
|
690
|
+
name: o,
|
|
691
|
+
value: n
|
|
692
|
+
}), () => {
|
|
693
|
+
s(r, void 0);
|
|
694
|
+
};
|
|
695
|
+
}, [
|
|
696
|
+
e,
|
|
697
|
+
a,
|
|
698
|
+
i,
|
|
699
|
+
t,
|
|
700
|
+
o,
|
|
701
|
+
s,
|
|
702
|
+
n
|
|
703
|
+
]);
|
|
704
|
+
}
|
|
705
|
+
//#endregion
|
|
706
|
+
//#region node_modules/@base-ui/react/internals/form-context/FormContext.mjs
|
|
707
|
+
var lt = /* @__PURE__ */ r.createContext({
|
|
708
|
+
formRef: { current: { fields: /* @__PURE__ */ new Map() } },
|
|
709
|
+
errors: {},
|
|
710
|
+
clearErrors: X,
|
|
711
|
+
validationMode: "onSubmit",
|
|
712
|
+
submitAttemptedRef: { current: !1 }
|
|
713
|
+
});
|
|
714
|
+
process.env.NODE_ENV !== "production" && (lt.displayName = "FormContext");
|
|
715
|
+
function ut() {
|
|
716
|
+
return r.useContext(lt);
|
|
717
|
+
}
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
|
|
720
|
+
var dt = /* @__PURE__ */ r.createContext({
|
|
721
|
+
controlId: void 0,
|
|
722
|
+
registerControlId: X,
|
|
723
|
+
labelId: void 0,
|
|
724
|
+
setLabelId: X,
|
|
725
|
+
messageIds: [],
|
|
726
|
+
setMessageIds: X,
|
|
727
|
+
getDescriptionProps: (e) => e
|
|
728
|
+
});
|
|
729
|
+
process.env.NODE_ENV !== "production" && (dt.displayName = "LabelableContext");
|
|
730
|
+
function ft() {
|
|
731
|
+
return r.useContext(dt);
|
|
732
|
+
}
|
|
733
|
+
//#endregion
|
|
734
|
+
//#region node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs
|
|
735
|
+
function pt(e, t, n, i = !0, a) {
|
|
736
|
+
let [o, s] = r.useState(), c = it(a ? `${a}-label` : void 0), l = e ?? t ?? o;
|
|
737
|
+
return V(() => {
|
|
738
|
+
let r = e || t || !i ? void 0 : mt(n.current, c);
|
|
739
|
+
o !== r && s(r);
|
|
740
|
+
}), l;
|
|
741
|
+
}
|
|
742
|
+
function mt(e, t) {
|
|
743
|
+
let n = ht(e);
|
|
744
|
+
if (n) return !n.id && t && (n.id = t), n.id || void 0;
|
|
745
|
+
}
|
|
746
|
+
function ht(e) {
|
|
747
|
+
if (!e) return;
|
|
748
|
+
let t = e.parentElement;
|
|
749
|
+
if (t && t.tagName === "LABEL") return t;
|
|
750
|
+
let n = e.id;
|
|
751
|
+
if (n) {
|
|
752
|
+
let t = e.nextElementSibling;
|
|
753
|
+
if (t && t.htmlFor === n) return t;
|
|
754
|
+
}
|
|
755
|
+
let r = e.labels;
|
|
756
|
+
return r && r[0];
|
|
757
|
+
}
|
|
758
|
+
//#endregion
|
|
759
|
+
//#region node_modules/@base-ui/react/internals/reason-parts.mjs
|
|
760
|
+
var gt = "none", _t = "trigger-press", vt = "trigger-hover", yt = "trigger-focus", bt = "outside-press", xt = "item-press", St = "close-press", Ct = "link-press", wt = "input-change", Tt = "focus-out", Et = "escape-key", Dt = "close-watcher", Ot = "list-navigation", kt = "keyboard", At = "cancel-open", jt = "disabled", Mt = "missing", Nt = "initial", Pt = "imperative-action", Ft = "swipe", It = "window-resize";
|
|
761
|
+
//#endregion
|
|
762
|
+
//#region node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
|
|
763
|
+
function Lt(e, t, n, r) {
|
|
764
|
+
let i = !1, a = !1, o = r ?? je;
|
|
765
|
+
return {
|
|
766
|
+
reason: e,
|
|
767
|
+
event: t ?? new Event("base-ui"),
|
|
768
|
+
cancel() {
|
|
769
|
+
i = !0;
|
|
770
|
+
},
|
|
771
|
+
allowPropagation() {
|
|
772
|
+
a = !0;
|
|
773
|
+
},
|
|
774
|
+
get isCanceled() {
|
|
775
|
+
return i;
|
|
776
|
+
},
|
|
777
|
+
get isPropagationAllowed() {
|
|
778
|
+
return a;
|
|
779
|
+
},
|
|
780
|
+
trigger: n,
|
|
781
|
+
...o
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
function Rt(e, t, n) {
|
|
785
|
+
let r = n ?? je;
|
|
786
|
+
return {
|
|
787
|
+
reason: e,
|
|
788
|
+
event: t ?? new Event("base-ui"),
|
|
789
|
+
...r
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region node_modules/@base-ui/react/internals/useValueChanged.mjs
|
|
794
|
+
function zt(e, t) {
|
|
795
|
+
let n = r.useRef(e), i = L(t);
|
|
796
|
+
V(() => {
|
|
797
|
+
n.current !== e && i(n.current);
|
|
798
|
+
}, [e, i]), V(() => {
|
|
799
|
+
n.current = e;
|
|
800
|
+
}, [e]);
|
|
801
|
+
}
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region node_modules/@base-ui/utils/useOnMount.mjs
|
|
804
|
+
var Bt = [];
|
|
805
|
+
function Vt(e) {
|
|
806
|
+
r.useEffect(e, Bt);
|
|
807
|
+
}
|
|
808
|
+
//#endregion
|
|
809
|
+
//#region node_modules/@base-ui/utils/useAnimationFrame.mjs
|
|
810
|
+
var Ht = null, Ut = globalThis.requestAnimationFrame, Wt = new class {
|
|
811
|
+
callbacks = [];
|
|
812
|
+
callbacksCount = 0;
|
|
813
|
+
nextId = 1;
|
|
814
|
+
startId = 1;
|
|
815
|
+
isScheduled = !1;
|
|
816
|
+
tick = (e) => {
|
|
817
|
+
this.isScheduled = !1;
|
|
818
|
+
let t = this.callbacks, n = this.callbacksCount;
|
|
819
|
+
if (this.callbacks = [], this.callbacksCount = 0, this.startId = this.nextId, n > 0) for (let n = 0; n < t.length; n += 1) t[n]?.(e);
|
|
820
|
+
};
|
|
821
|
+
request(e) {
|
|
822
|
+
let t = this.nextId;
|
|
823
|
+
this.nextId += 1, this.callbacks.push(e), this.callbacksCount += 1;
|
|
824
|
+
let n = process.env.NODE_ENV !== "production" && Ut !== requestAnimationFrame && (Ut = requestAnimationFrame, !0);
|
|
825
|
+
return (!this.isScheduled || n) && (requestAnimationFrame(this.tick), this.isScheduled = !0), t;
|
|
826
|
+
}
|
|
827
|
+
cancel(e) {
|
|
828
|
+
let t = e - this.startId;
|
|
829
|
+
t < 0 || t >= this.callbacks.length || (this.callbacks[t] = null, --this.callbacksCount);
|
|
830
|
+
}
|
|
831
|
+
}(), Gt = class e {
|
|
832
|
+
static create() {
|
|
833
|
+
return new e();
|
|
834
|
+
}
|
|
835
|
+
static request(e) {
|
|
836
|
+
return Wt.request(e);
|
|
837
|
+
}
|
|
838
|
+
static cancel(e) {
|
|
839
|
+
return Wt.cancel(e);
|
|
840
|
+
}
|
|
841
|
+
currentId = Ht;
|
|
842
|
+
request(e) {
|
|
843
|
+
this.cancel(), this.currentId = Wt.request(() => {
|
|
844
|
+
this.currentId = Ht, e();
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
cancel = () => {
|
|
848
|
+
this.currentId !== Ht && (Wt.cancel(this.currentId), this.currentId = Ht);
|
|
849
|
+
};
|
|
850
|
+
disposeEffect = () => this.cancel;
|
|
851
|
+
};
|
|
852
|
+
function Kt() {
|
|
853
|
+
let e = F(Gt.create).current;
|
|
854
|
+
return Vt(e.disposeEffect), e;
|
|
855
|
+
}
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region node_modules/@base-ui/react/utils/resolveRef.mjs
|
|
858
|
+
function qt(e) {
|
|
859
|
+
return e == null ? e : "current" in e ? e.current : e;
|
|
860
|
+
}
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
|
|
863
|
+
var Jt = /* @__PURE__ */ function(e) {
|
|
864
|
+
return e.startingStyle = "data-starting-style", e.endingStyle = "data-ending-style", e;
|
|
865
|
+
}({}), Yt = { [Jt.startingStyle]: "" }, Xt = { [Jt.endingStyle]: "" }, Zt = { transitionStatus(e) {
|
|
866
|
+
return e === "starting" ? Yt : e === "ending" ? Xt : null;
|
|
867
|
+
} };
|
|
868
|
+
//#endregion
|
|
869
|
+
//#region node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
870
|
+
function Qt(e, t = !1, n = !0) {
|
|
871
|
+
let r = Kt();
|
|
872
|
+
return L((i, a = null) => {
|
|
873
|
+
r.cancel();
|
|
874
|
+
let o = qt(e);
|
|
875
|
+
if (o == null) return;
|
|
876
|
+
let s = o, l = () => {
|
|
877
|
+
c.flushSync(i);
|
|
878
|
+
};
|
|
879
|
+
if (typeof s.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
880
|
+
i();
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
function u() {
|
|
884
|
+
Promise.all(s.getAnimations().map((e) => e.finished)).then(() => {
|
|
885
|
+
a?.aborted || l();
|
|
886
|
+
}).catch(() => {
|
|
887
|
+
if (n) {
|
|
888
|
+
a?.aborted || l();
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
let e = s.getAnimations();
|
|
892
|
+
!a?.aborted && e.length > 0 && e.some((e) => e.pending || e.playState !== "finished") && u();
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
if (t) {
|
|
896
|
+
let e = Jt.startingStyle;
|
|
897
|
+
if (!s.hasAttribute(e)) {
|
|
898
|
+
r.request(u);
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
let t = new MutationObserver(() => {
|
|
902
|
+
s.hasAttribute(e) || (t.disconnect(), u());
|
|
903
|
+
});
|
|
904
|
+
t.observe(s, {
|
|
905
|
+
attributes: !0,
|
|
906
|
+
attributeFilter: [e]
|
|
907
|
+
}), a?.addEventListener("abort", () => t.disconnect(), { once: !0 });
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
r.request(u);
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
|
|
915
|
+
function $t(e) {
|
|
916
|
+
let { enabled: t = !0, open: n, ref: i, onComplete: a } = e, o = L(a), s = Qt(i, n, !1);
|
|
917
|
+
r.useEffect(() => {
|
|
918
|
+
if (!t) return;
|
|
919
|
+
let e = new AbortController();
|
|
920
|
+
return s(o, e.signal), () => {
|
|
921
|
+
e.abort();
|
|
922
|
+
};
|
|
923
|
+
}, [
|
|
924
|
+
t,
|
|
925
|
+
n,
|
|
926
|
+
o,
|
|
927
|
+
s
|
|
928
|
+
]);
|
|
929
|
+
}
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
932
|
+
function en(e, t = !1, n = !1) {
|
|
933
|
+
let [i, a] = r.useState(e && t ? "idle" : void 0), [o, s] = r.useState(e);
|
|
934
|
+
return e && !o && (s(!0), a("starting")), !e && o && i !== "ending" && !n && a("ending"), !e && !o && i === "ending" && a(void 0), V(() => {
|
|
935
|
+
if (!e && o && i !== "ending" && n) {
|
|
936
|
+
let e = Gt.request(() => {
|
|
937
|
+
a("ending");
|
|
938
|
+
});
|
|
939
|
+
return () => {
|
|
940
|
+
Gt.cancel(e);
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
}, [
|
|
944
|
+
e,
|
|
945
|
+
o,
|
|
946
|
+
i,
|
|
947
|
+
n
|
|
948
|
+
]), V(() => {
|
|
949
|
+
if (!e || t) return;
|
|
950
|
+
let n = Gt.request(() => {
|
|
951
|
+
a(void 0);
|
|
952
|
+
});
|
|
953
|
+
return () => {
|
|
954
|
+
Gt.cancel(n);
|
|
955
|
+
};
|
|
956
|
+
}, [t, e]), V(() => {
|
|
957
|
+
if (!e || !t) return;
|
|
958
|
+
e && o && i !== "idle" && a("starting");
|
|
959
|
+
let n = Gt.request(() => {
|
|
960
|
+
a("idle");
|
|
961
|
+
});
|
|
962
|
+
return () => {
|
|
963
|
+
Gt.cancel(n);
|
|
964
|
+
};
|
|
965
|
+
}, [
|
|
966
|
+
t,
|
|
967
|
+
e,
|
|
968
|
+
o,
|
|
969
|
+
i
|
|
970
|
+
]), {
|
|
971
|
+
mounted: o,
|
|
972
|
+
setMounted: s,
|
|
973
|
+
transitionStatus: i
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
//#endregion
|
|
977
|
+
//#region node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
|
|
978
|
+
function tn(e = {}) {
|
|
979
|
+
let { id: t, implicit: n = !1, controlRef: i } = e, { controlId: a, registerControlId: o } = ft(), s = it(t), c = n ? a : void 0, l = F(() => Symbol("labelable-control")), u = r.useRef(!1), d = r.useRef(t != null), f = L(() => {
|
|
980
|
+
!u.current || o === X || (u.current = !1, o(l.current, void 0));
|
|
981
|
+
});
|
|
982
|
+
return V(() => {
|
|
983
|
+
if (o === X) return;
|
|
984
|
+
let e;
|
|
985
|
+
if (n) {
|
|
986
|
+
let n = i?.current;
|
|
987
|
+
e = m(n) && n.closest("label") != null ? t ?? null : c ?? s;
|
|
988
|
+
} else if (t != null) d.current = !0, e = t;
|
|
989
|
+
else if (d.current) e = s;
|
|
990
|
+
else {
|
|
991
|
+
f();
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
if (e === void 0) {
|
|
995
|
+
f();
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
u.current = !0, o(l.current, e);
|
|
999
|
+
}, [
|
|
1000
|
+
t,
|
|
1001
|
+
i,
|
|
1002
|
+
c,
|
|
1003
|
+
o,
|
|
1004
|
+
n,
|
|
1005
|
+
s,
|
|
1006
|
+
l,
|
|
1007
|
+
f
|
|
1008
|
+
]), r.useEffect(() => f, [f]), a ?? s;
|
|
1009
|
+
}
|
|
1010
|
+
//#endregion
|
|
1011
|
+
//#region node_modules/@base-ui/utils/platform/shared.mjs
|
|
1012
|
+
function nn() {
|
|
1013
|
+
if (typeof navigator > "u") return {
|
|
1014
|
+
userAgent: "",
|
|
1015
|
+
platform: "",
|
|
1016
|
+
maxTouchPoints: 0
|
|
1017
|
+
};
|
|
1018
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1019
|
+
let e = navigator.userAgentData;
|
|
1020
|
+
if (e && Array.isArray(e.brands)) return {
|
|
1021
|
+
userAgent: e.brands.map(({ brand: e, version: t }) => `${e}/${t}`).join(" "),
|
|
1022
|
+
platform: e.platform ?? navigator.platform ?? "",
|
|
1023
|
+
maxTouchPoints: navigator.maxTouchPoints ?? 0
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
return {
|
|
1027
|
+
userAgent: navigator.userAgent,
|
|
1028
|
+
platform: navigator.platform ?? "",
|
|
1029
|
+
maxTouchPoints: navigator.maxTouchPoints ?? 0
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
var { userAgent: rn, platform: an, maxTouchPoints: on } = nn(), sn = rn.toLowerCase(), cn = an.toLowerCase(), ln = /^i(os$|p)/.test(cn) || cn === "macintel" && on > 1, un = "android", dn = cn === un || sn.includes(un), fn = !ln && cn.startsWith("mac");
|
|
1033
|
+
cn.startsWith("win"), !dn && /^(linux|chrome os)/.test(cn);
|
|
1034
|
+
var pn = fn || ln, mn = /jsdom|happydom/.test(sn), hn = "data-base-ui-focusable", gn = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _n = "ArrowLeft", vn = "ArrowRight", yn = "ArrowUp", bn = "ArrowDown";
|
|
1035
|
+
//#endregion
|
|
1036
|
+
//#region node_modules/@base-ui/react/internals/shadowDom.mjs
|
|
1037
|
+
function xn(e) {
|
|
1038
|
+
let t = e.activeElement;
|
|
1039
|
+
for (; t?.shadowRoot?.activeElement != null;) t = t.shadowRoot.activeElement;
|
|
1040
|
+
return t;
|
|
1041
|
+
}
|
|
1042
|
+
function Sn(e, t) {
|
|
1043
|
+
if (!e || !t) return !1;
|
|
1044
|
+
let n = t.getRootNode?.();
|
|
1045
|
+
if (e.contains(t)) return !0;
|
|
1046
|
+
if (n && g(n)) {
|
|
1047
|
+
let n = t;
|
|
1048
|
+
for (; n;) {
|
|
1049
|
+
if (e === n) return !0;
|
|
1050
|
+
n = n.parentNode || n.host;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
return !1;
|
|
1054
|
+
}
|
|
1055
|
+
function Cn(e) {
|
|
1056
|
+
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
1057
|
+
}
|
|
1058
|
+
//#endregion
|
|
1059
|
+
//#region node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
|
|
1060
|
+
function wn(e, t) {
|
|
1061
|
+
if (!m(e)) return !1;
|
|
1062
|
+
let n = e;
|
|
1063
|
+
if (t.hasElement(n)) return !n.hasAttribute("data-trigger-disabled");
|
|
1064
|
+
for (let [, e] of t.entries()) if (Sn(e, n)) return !e.hasAttribute("data-trigger-disabled");
|
|
1065
|
+
return !1;
|
|
1066
|
+
}
|
|
1067
|
+
function Tn(e, t) {
|
|
1068
|
+
if (t == null) return !1;
|
|
1069
|
+
if ("composedPath" in e) return e.composedPath().includes(t);
|
|
1070
|
+
let n = e;
|
|
1071
|
+
return n.target != null && t.contains(n.target);
|
|
1072
|
+
}
|
|
1073
|
+
function En(e) {
|
|
1074
|
+
return e.matches("html,body");
|
|
1075
|
+
}
|
|
1076
|
+
function Dn(e) {
|
|
1077
|
+
return h(e) && e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
1078
|
+
}
|
|
1079
|
+
function On(e) {
|
|
1080
|
+
return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${gn}`) != null;
|
|
1081
|
+
}
|
|
1082
|
+
function kn(e) {
|
|
1083
|
+
return e ? e.getAttribute("role") === "combobox" && Dn(e) : !1;
|
|
1084
|
+
}
|
|
1085
|
+
function An(e) {
|
|
1086
|
+
if (!e || mn) return !0;
|
|
1087
|
+
try {
|
|
1088
|
+
return e.matches(":focus-visible");
|
|
1089
|
+
} catch {
|
|
1090
|
+
return !0;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
function jn(e) {
|
|
1094
|
+
return e ? e.hasAttribute("data-base-ui-focusable") ? e : e.querySelector("[data-base-ui-focusable]") || e : null;
|
|
1095
|
+
}
|
|
1096
|
+
//#endregion
|
|
1097
|
+
//#region node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
|
|
1098
|
+
function Mn(e) {
|
|
1099
|
+
e.preventDefault(), e.stopPropagation();
|
|
1100
|
+
}
|
|
1101
|
+
function Nn(e) {
|
|
1102
|
+
return "nativeEvent" in e;
|
|
1103
|
+
}
|
|
1104
|
+
function Pn(e) {
|
|
1105
|
+
return e.pointerType === "" && e.isTrusted ? !0 : dn && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
1106
|
+
}
|
|
1107
|
+
function Fn(e) {
|
|
1108
|
+
return mn ? !1 : !dn && e.width === 0 && e.height === 0 || dn && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
|
|
1109
|
+
}
|
|
1110
|
+
function In(e, t) {
|
|
1111
|
+
let n = ["mouse", "pen"];
|
|
1112
|
+
return t || n.push("", void 0), n.includes(e);
|
|
1113
|
+
}
|
|
1114
|
+
function Ln(e) {
|
|
1115
|
+
let t = e.type;
|
|
1116
|
+
return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
|
|
1117
|
+
}
|
|
1118
|
+
//#endregion
|
|
1119
|
+
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
1120
|
+
var Rn = [
|
|
1121
|
+
"top",
|
|
1122
|
+
"right",
|
|
1123
|
+
"bottom",
|
|
1124
|
+
"left"
|
|
1125
|
+
], zn = Math.min, Bn = Math.max, Vn = Math.round, Hn = Math.floor, Un = (e) => ({
|
|
1126
|
+
x: e,
|
|
1127
|
+
y: e
|
|
1128
|
+
}), Wn = {
|
|
1129
|
+
left: "right",
|
|
1130
|
+
right: "left",
|
|
1131
|
+
bottom: "top",
|
|
1132
|
+
top: "bottom"
|
|
1133
|
+
};
|
|
1134
|
+
function Gn(e, t, n) {
|
|
1135
|
+
return Bn(e, zn(t, n));
|
|
1136
|
+
}
|
|
1137
|
+
function Kn(e, t) {
|
|
1138
|
+
return typeof e == "function" ? e(t) : e;
|
|
1139
|
+
}
|
|
1140
|
+
function qn(e) {
|
|
1141
|
+
return e.split("-")[0];
|
|
1142
|
+
}
|
|
1143
|
+
function Jn(e) {
|
|
1144
|
+
return e.split("-")[1];
|
|
1145
|
+
}
|
|
1146
|
+
function Yn(e) {
|
|
1147
|
+
return e === "x" ? "y" : "x";
|
|
1148
|
+
}
|
|
1149
|
+
function Xn(e) {
|
|
1150
|
+
return e === "y" ? "height" : "width";
|
|
1151
|
+
}
|
|
1152
|
+
function Zn(e) {
|
|
1153
|
+
let t = e[0];
|
|
1154
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
1155
|
+
}
|
|
1156
|
+
function Qn(e) {
|
|
1157
|
+
return Yn(Zn(e));
|
|
1158
|
+
}
|
|
1159
|
+
function $n(e, t, n) {
|
|
1160
|
+
n === void 0 && (n = !1);
|
|
1161
|
+
let r = Jn(e), i = Qn(e), a = Xn(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1162
|
+
return t.reference[a] > t.floating[a] && (o = cr(o)), [o, cr(o)];
|
|
1163
|
+
}
|
|
1164
|
+
function er(e) {
|
|
1165
|
+
let t = cr(e);
|
|
1166
|
+
return [
|
|
1167
|
+
tr(e),
|
|
1168
|
+
t,
|
|
1169
|
+
tr(t)
|
|
1170
|
+
];
|
|
1171
|
+
}
|
|
1172
|
+
function tr(e) {
|
|
1173
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
1174
|
+
}
|
|
1175
|
+
var nr = ["left", "right"], rr = ["right", "left"], ir = ["top", "bottom"], ar = ["bottom", "top"];
|
|
1176
|
+
function or(e, t, n) {
|
|
1177
|
+
switch (e) {
|
|
1178
|
+
case "top":
|
|
1179
|
+
case "bottom": return n ? t ? rr : nr : t ? nr : rr;
|
|
1180
|
+
case "left":
|
|
1181
|
+
case "right": return t ? ir : ar;
|
|
1182
|
+
default: return [];
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
function sr(e, t, n, r) {
|
|
1186
|
+
let i = Jn(e), a = or(qn(e), n === "start", r);
|
|
1187
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(tr)))), a;
|
|
1188
|
+
}
|
|
1189
|
+
function cr(e) {
|
|
1190
|
+
let t = qn(e);
|
|
1191
|
+
return Wn[t] + e.slice(t.length);
|
|
1192
|
+
}
|
|
1193
|
+
function lr(e) {
|
|
1194
|
+
return {
|
|
1195
|
+
top: 0,
|
|
1196
|
+
right: 0,
|
|
1197
|
+
bottom: 0,
|
|
1198
|
+
left: 0,
|
|
1199
|
+
...e
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
function ur(e) {
|
|
1203
|
+
return typeof e == "number" ? {
|
|
1204
|
+
top: e,
|
|
1205
|
+
right: e,
|
|
1206
|
+
bottom: e,
|
|
1207
|
+
left: e
|
|
1208
|
+
} : lr(e);
|
|
1209
|
+
}
|
|
1210
|
+
function dr(e) {
|
|
1211
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
1212
|
+
return {
|
|
1213
|
+
width: r,
|
|
1214
|
+
height: i,
|
|
1215
|
+
top: n,
|
|
1216
|
+
left: t,
|
|
1217
|
+
right: t + r,
|
|
1218
|
+
bottom: n + i,
|
|
1219
|
+
x: t,
|
|
1220
|
+
y: n
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
//#endregion
|
|
1224
|
+
//#region node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
|
|
1225
|
+
function fr(e, t) {
|
|
1226
|
+
return t < 0 || t >= e.length;
|
|
1227
|
+
}
|
|
1228
|
+
function pr(e, t) {
|
|
1229
|
+
return hr(e.current, { disabledIndices: t });
|
|
1230
|
+
}
|
|
1231
|
+
function mr(e, t) {
|
|
1232
|
+
return hr(e.current, {
|
|
1233
|
+
decrement: !0,
|
|
1234
|
+
startingIndex: e.current.length,
|
|
1235
|
+
disabledIndices: t
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
function hr(e, { startingIndex: t = -1, decrement: n = !1, disabledIndices: r, amount: i = 1 } = {}) {
|
|
1239
|
+
let a = t;
|
|
1240
|
+
do
|
|
1241
|
+
a += n ? -i : i;
|
|
1242
|
+
while (a >= 0 && a <= e.length - 1 && gr(e, a, r));
|
|
1243
|
+
return a;
|
|
1244
|
+
}
|
|
1245
|
+
function gr(e, t, n) {
|
|
1246
|
+
if (typeof n == "function" ? n(t) : n?.includes(t) ?? !1) return !0;
|
|
1247
|
+
let r = e[t];
|
|
1248
|
+
return r ? vr(r) ? !n && (r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true") : !0 : !1;
|
|
1249
|
+
}
|
|
1250
|
+
function _r(e) {
|
|
1251
|
+
return e.visibility === "hidden" || e.visibility === "collapse";
|
|
1252
|
+
}
|
|
1253
|
+
function vr(e, t = e ? O(e) : null) {
|
|
1254
|
+
return !e || !e.isConnected || !t || _r(t) ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : t.display !== "none" && t.display !== "contents";
|
|
1255
|
+
}
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
|
|
1258
|
+
function yr(e, t) {
|
|
1259
|
+
let n = it(e);
|
|
1260
|
+
return V(() => (t(n), () => {
|
|
1261
|
+
t(void 0);
|
|
1262
|
+
}), [n, t]), n;
|
|
1263
|
+
}
|
|
1264
|
+
//#endregion
|
|
1265
|
+
//#region node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
|
|
1266
|
+
function br(e = {}) {
|
|
1267
|
+
let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = ft(), c = yr(t, L((e) => {
|
|
1268
|
+
s(e), i?.(e);
|
|
1269
|
+
})), l = o ?? n;
|
|
1270
|
+
function u(e) {
|
|
1271
|
+
if (a) {
|
|
1272
|
+
a(e, l);
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
if (!l) return;
|
|
1276
|
+
let t = Je(e.currentTarget).getElementById(l);
|
|
1277
|
+
h(t) && xr(t);
|
|
1278
|
+
}
|
|
1279
|
+
function d(e) {
|
|
1280
|
+
Cn(e.nativeEvent)?.closest("button,input,select,textarea") || (!e.defaultPrevented && e.detail > 1 && e.preventDefault(), !r && u(e));
|
|
1281
|
+
}
|
|
1282
|
+
return r ? {
|
|
1283
|
+
id: c,
|
|
1284
|
+
htmlFor: l ?? void 0,
|
|
1285
|
+
onMouseDown: d
|
|
1286
|
+
} : {
|
|
1287
|
+
id: c,
|
|
1288
|
+
onClick: d,
|
|
1289
|
+
onPointerDown(e) {
|
|
1290
|
+
e.preventDefault();
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
function xr(e) {
|
|
1295
|
+
e.focus({ focusVisible: !0 });
|
|
1296
|
+
}
|
|
1297
|
+
//#endregion
|
|
1298
|
+
//#region node_modules/@base-ui/utils/isElementDisabled.mjs
|
|
1299
|
+
function Sr(e) {
|
|
1300
|
+
return e == null || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true";
|
|
1301
|
+
}
|
|
1302
|
+
//#endregion
|
|
1303
|
+
//#region node_modules/@base-ui/utils/useValueAsRef.mjs
|
|
1304
|
+
function Cr(e) {
|
|
1305
|
+
let t = F(wr, e).current;
|
|
1306
|
+
return t.next = e, V(t.effect), t;
|
|
1307
|
+
}
|
|
1308
|
+
function wr(e) {
|
|
1309
|
+
let t = {
|
|
1310
|
+
current: e,
|
|
1311
|
+
next: e,
|
|
1312
|
+
effect: () => {
|
|
1313
|
+
t.current = t.next;
|
|
1314
|
+
}
|
|
1315
|
+
};
|
|
1316
|
+
return t;
|
|
1317
|
+
}
|
|
1318
|
+
//#endregion
|
|
1319
|
+
//#region builtin:esm-external-require-react
|
|
1320
|
+
var Tr = /* @__PURE__ */ t(((e, t) => {
|
|
1321
|
+
t.exports = { ...r };
|
|
1322
|
+
})), Er = /* @__PURE__ */ t(((e) => {
|
|
1323
|
+
var t = Tr();
|
|
1324
|
+
function n(e, t) {
|
|
1325
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1326
|
+
}
|
|
1327
|
+
var r = typeof Object.is == "function" ? Object.is : n, i = t.useState, a = t.useEffect, o = t.useLayoutEffect, s = t.useDebugValue;
|
|
1328
|
+
function c(e, t) {
|
|
1329
|
+
var n = t(), r = i({ inst: {
|
|
1330
|
+
value: n,
|
|
1331
|
+
getSnapshot: t
|
|
1332
|
+
} }), c = r[0].inst, u = r[1];
|
|
1333
|
+
return o(function() {
|
|
1334
|
+
c.value = n, c.getSnapshot = t, l(c) && u({ inst: c });
|
|
1335
|
+
}, [
|
|
1336
|
+
e,
|
|
1337
|
+
n,
|
|
1338
|
+
t
|
|
1339
|
+
]), a(function() {
|
|
1340
|
+
return l(c) && u({ inst: c }), e(function() {
|
|
1341
|
+
l(c) && u({ inst: c });
|
|
1342
|
+
});
|
|
1343
|
+
}, [e]), s(n), n;
|
|
1344
|
+
}
|
|
1345
|
+
function l(e) {
|
|
1346
|
+
var t = e.getSnapshot;
|
|
1347
|
+
e = e.value;
|
|
1348
|
+
try {
|
|
1349
|
+
var n = t();
|
|
1350
|
+
return !r(e, n);
|
|
1351
|
+
} catch {
|
|
1352
|
+
return !0;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
function u(e, t) {
|
|
1356
|
+
return t();
|
|
1357
|
+
}
|
|
1358
|
+
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
1359
|
+
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
1360
|
+
})), Dr = /* @__PURE__ */ t(((e) => {
|
|
1361
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
1362
|
+
function t(e, t) {
|
|
1363
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1364
|
+
}
|
|
1365
|
+
function n(e, t) {
|
|
1366
|
+
d || a.startTransition === void 0 || (d = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
1367
|
+
var n = t();
|
|
1368
|
+
if (!f) {
|
|
1369
|
+
var i = t();
|
|
1370
|
+
o(n, i) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), f = !0);
|
|
1371
|
+
}
|
|
1372
|
+
i = s({ inst: {
|
|
1373
|
+
value: n,
|
|
1374
|
+
getSnapshot: t
|
|
1375
|
+
} });
|
|
1376
|
+
var p = i[0].inst, m = i[1];
|
|
1377
|
+
return l(function() {
|
|
1378
|
+
p.value = n, p.getSnapshot = t, r(p) && m({ inst: p });
|
|
1379
|
+
}, [
|
|
1380
|
+
e,
|
|
1381
|
+
n,
|
|
1382
|
+
t
|
|
1383
|
+
]), c(function() {
|
|
1384
|
+
return r(p) && m({ inst: p }), e(function() {
|
|
1385
|
+
r(p) && m({ inst: p });
|
|
1386
|
+
});
|
|
1387
|
+
}, [e]), u(n), n;
|
|
1388
|
+
}
|
|
1389
|
+
function r(e) {
|
|
1390
|
+
var t = e.getSnapshot;
|
|
1391
|
+
e = e.value;
|
|
1392
|
+
try {
|
|
1393
|
+
var n = t();
|
|
1394
|
+
return !o(e, n);
|
|
1395
|
+
} catch {
|
|
1396
|
+
return !0;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
function i(e, t) {
|
|
1400
|
+
return t();
|
|
1401
|
+
}
|
|
1402
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1403
|
+
var a = Tr(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
1404
|
+
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1405
|
+
})();
|
|
1406
|
+
})), Or = /* @__PURE__ */ t(((e, t) => {
|
|
1407
|
+
process.env.NODE_ENV === "production" ? t.exports = Er() : t.exports = Dr();
|
|
1408
|
+
}));
|
|
1409
|
+
//#endregion
|
|
1410
|
+
//#region node_modules/@base-ui/utils/addEventListener.mjs
|
|
1411
|
+
function kr(e, t, n, r) {
|
|
1412
|
+
return e.addEventListener(t, n, r), () => {
|
|
1413
|
+
e.removeEventListener(t, n, r);
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
//#endregion
|
|
1417
|
+
//#region node_modules/@base-ui/utils/useForcedRerendering.mjs
|
|
1418
|
+
var Ar = Or();
|
|
1419
|
+
function jr() {
|
|
1420
|
+
let [, e] = r.useState({});
|
|
1421
|
+
return r.useCallback(() => {
|
|
1422
|
+
e({});
|
|
1423
|
+
}, []);
|
|
1424
|
+
}
|
|
1425
|
+
//#endregion
|
|
1426
|
+
//#region node_modules/@base-ui/react/internals/areArraysEqual.mjs
|
|
1427
|
+
function Mr(e, t, n = (e, t) => e === t) {
|
|
1428
|
+
return e.length === t.length && e.every((e, r) => n(e, t[r]));
|
|
1429
|
+
}
|
|
1430
|
+
//#endregion
|
|
1431
|
+
//#region node_modules/@base-ui/react/internals/clamp.mjs
|
|
1432
|
+
function Nr(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
|
|
1433
|
+
return Math.max(t, Math.min(e, n));
|
|
1434
|
+
}
|
|
1435
|
+
//#endregion
|
|
1436
|
+
//#region node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs
|
|
1437
|
+
function Pr(e) {
|
|
1438
|
+
return e == null ? void 0 : `${e}-label`;
|
|
1439
|
+
}
|
|
1440
|
+
function Fr(e, t) {
|
|
1441
|
+
return e ?? t;
|
|
1442
|
+
}
|
|
1443
|
+
//#endregion
|
|
1444
|
+
//#region node_modules/@base-ui/utils/inertValue.mjs
|
|
1445
|
+
function Ir(e) {
|
|
1446
|
+
return Ee(19) ? e : e ? "true" : void 0;
|
|
1447
|
+
}
|
|
1448
|
+
//#endregion
|
|
1449
|
+
//#region node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
|
|
1450
|
+
var Lr = /* @__PURE__ */ r.createContext({
|
|
1451
|
+
register: () => {},
|
|
1452
|
+
unregister: () => {},
|
|
1453
|
+
subscribeMapChange: () => () => {},
|
|
1454
|
+
elementsRef: { current: [] },
|
|
1455
|
+
nextIndexRef: { current: 0 }
|
|
1456
|
+
});
|
|
1457
|
+
process.env.NODE_ENV !== "production" && (Lr.displayName = "CompositeListContext");
|
|
1458
|
+
function Rr() {
|
|
1459
|
+
return r.useContext(Lr);
|
|
1460
|
+
}
|
|
1461
|
+
//#endregion
|
|
1462
|
+
//#region node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
|
|
1463
|
+
function zr(e) {
|
|
1464
|
+
let { children: t, elementsRef: n, labelsRef: i, onMapChange: a } = e, s = L(a), c = r.useRef(0), l = F(Vr).current, u = F(Br).current, [d, f] = r.useState(0), p = r.useRef(d), m = L((e, t) => {
|
|
1465
|
+
u.set(e, t ?? null), p.current += 1, f(p.current);
|
|
1466
|
+
}), h = L((e) => {
|
|
1467
|
+
u.delete(e), p.current += 1, f(p.current);
|
|
1468
|
+
}), g = r.useMemo(() => {
|
|
1469
|
+
let e = /* @__PURE__ */ new Map();
|
|
1470
|
+
return Array.from(u.keys()).filter((e) => e.isConnected).sort(Hr).forEach((t, n) => {
|
|
1471
|
+
let r = u.get(t) ?? {};
|
|
1472
|
+
e.set(t, {
|
|
1473
|
+
...r,
|
|
1474
|
+
index: n
|
|
1475
|
+
});
|
|
1476
|
+
}), e;
|
|
1477
|
+
}, [u, d]);
|
|
1478
|
+
V(() => {
|
|
1479
|
+
if (typeof MutationObserver != "function" || g.size === 0) return;
|
|
1480
|
+
let e = new MutationObserver((e) => {
|
|
1481
|
+
let t = /* @__PURE__ */ new Set(), n = (e) => t.has(e) ? t.delete(e) : t.add(e);
|
|
1482
|
+
e.forEach((e) => {
|
|
1483
|
+
e.removedNodes.forEach(n), e.addedNodes.forEach(n);
|
|
1484
|
+
}), t.size === 0 && (p.current += 1, f(p.current));
|
|
1485
|
+
});
|
|
1486
|
+
return g.forEach((t, n) => {
|
|
1487
|
+
n.parentElement && e.observe(n.parentElement, { childList: !0 });
|
|
1488
|
+
}), () => {
|
|
1489
|
+
e.disconnect();
|
|
1490
|
+
};
|
|
1491
|
+
}, [g]), V(() => {
|
|
1492
|
+
p.current === d && (n.current.length !== g.size && (n.current.length = g.size), i && i.current.length !== g.size && (i.current.length = g.size), c.current = g.size), s(g);
|
|
1493
|
+
}, [
|
|
1494
|
+
s,
|
|
1495
|
+
g,
|
|
1496
|
+
n,
|
|
1497
|
+
i,
|
|
1498
|
+
d
|
|
1499
|
+
]), V(() => () => {
|
|
1500
|
+
n.current = [];
|
|
1501
|
+
}, [n]), V(() => () => {
|
|
1502
|
+
i && (i.current = []);
|
|
1503
|
+
}, [i]);
|
|
1504
|
+
let _ = L((e) => (l.add(e), () => {
|
|
1505
|
+
l.delete(e);
|
|
1506
|
+
}));
|
|
1507
|
+
V(() => {
|
|
1508
|
+
l.forEach((e) => e(g));
|
|
1509
|
+
}, [l, g]);
|
|
1510
|
+
let v = r.useMemo(() => ({
|
|
1511
|
+
register: m,
|
|
1512
|
+
unregister: h,
|
|
1513
|
+
subscribeMapChange: _,
|
|
1514
|
+
elementsRef: n,
|
|
1515
|
+
labelsRef: i,
|
|
1516
|
+
nextIndexRef: c
|
|
1517
|
+
}), [
|
|
1518
|
+
m,
|
|
1519
|
+
h,
|
|
1520
|
+
_,
|
|
1521
|
+
n,
|
|
1522
|
+
i,
|
|
1523
|
+
c
|
|
1524
|
+
]);
|
|
1525
|
+
return /* @__PURE__ */ o(Lr.Provider, {
|
|
1526
|
+
value: v,
|
|
1527
|
+
children: t
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
function Br() {
|
|
1531
|
+
return /* @__PURE__ */ new Map();
|
|
1532
|
+
}
|
|
1533
|
+
function Vr() {
|
|
1534
|
+
return /* @__PURE__ */ new Set();
|
|
1535
|
+
}
|
|
1536
|
+
function Hr(e, t) {
|
|
1537
|
+
let n = e.compareDocumentPosition(t);
|
|
1538
|
+
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
1539
|
+
}
|
|
1540
|
+
//#endregion
|
|
1541
|
+
//#region node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
|
|
1542
|
+
var Ur = /* @__PURE__ */ r.createContext(void 0);
|
|
1543
|
+
process.env.NODE_ENV !== "production" && (Ur.displayName = "DirectionContext");
|
|
1544
|
+
function Wr() {
|
|
1545
|
+
return r.useContext(Ur)?.direction ?? "ltr";
|
|
1546
|
+
}
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs
|
|
1549
|
+
var Gr = /* @__PURE__ */ r.createContext(void 0);
|
|
1550
|
+
process.env.NODE_ENV !== "production" && (Gr.displayName = "ToolbarRootContext");
|
|
1551
|
+
function Kr(e) {
|
|
1552
|
+
let t = r.useContext(Gr);
|
|
1553
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
|
|
1554
|
+
return t;
|
|
1555
|
+
}
|
|
1556
|
+
//#endregion
|
|
1557
|
+
//#region node_modules/@base-ui/react/internals/composite/composite.mjs
|
|
1558
|
+
var qr = "ArrowUp", Jr = "ArrowDown", Yr = "ArrowLeft", Xr = "ArrowRight", Zr = "Home", Qr = "PageUp", $r = "PageDown", ei = new Set([Yr, Xr]), ti = new Set([
|
|
1559
|
+
Yr,
|
|
1560
|
+
Xr,
|
|
1561
|
+
Zr,
|
|
1562
|
+
"End"
|
|
1563
|
+
]), ni = new Set([qr, Jr]), ri = new Set([
|
|
1564
|
+
qr,
|
|
1565
|
+
Jr,
|
|
1566
|
+
Zr,
|
|
1567
|
+
"End"
|
|
1568
|
+
]), ii = new Set([...ei, ...ni]), ai = new Set([
|
|
1569
|
+
...ii,
|
|
1570
|
+
Zr,
|
|
1571
|
+
"End"
|
|
1572
|
+
]), oi = new Set([
|
|
1573
|
+
"Shift",
|
|
1574
|
+
"Control",
|
|
1575
|
+
"Alt",
|
|
1576
|
+
"Meta"
|
|
1577
|
+
]);
|
|
1578
|
+
function si(e) {
|
|
1579
|
+
return h(e) && e.tagName === "INPUT";
|
|
1580
|
+
}
|
|
1581
|
+
function ci(e) {
|
|
1582
|
+
return !!(si(e) && e.selectionStart != null || h(e) && e.tagName === "TEXTAREA");
|
|
1583
|
+
}
|
|
1584
|
+
function li(e, t, n, r) {
|
|
1585
|
+
if (!e || !t || !t.scrollTo) return;
|
|
1586
|
+
let i = e.scrollLeft, a = e.scrollTop, o = e.clientWidth < e.scrollWidth, s = e.clientHeight < e.scrollHeight;
|
|
1587
|
+
if (o && r !== "vertical") {
|
|
1588
|
+
let r = ui(e, t, "left"), a = di(e), o = di(t);
|
|
1589
|
+
n === "ltr" && (r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight ? i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight : r - o.scrollMarginLeft < e.scrollLeft + a.scrollPaddingLeft && (i = r - o.scrollMarginLeft - a.scrollPaddingLeft)), n === "rtl" && (r - o.scrollMarginRight < e.scrollLeft + a.scrollPaddingLeft ? i = r - o.scrollMarginLeft - a.scrollPaddingLeft : r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight && (i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight));
|
|
1590
|
+
}
|
|
1591
|
+
if (s && r !== "horizontal") {
|
|
1592
|
+
let n = ui(e, t, "top"), r = di(e), i = di(t);
|
|
1593
|
+
n - i.scrollMarginTop < e.scrollTop + r.scrollPaddingTop ? a = n - i.scrollMarginTop - r.scrollPaddingTop : n + t.offsetHeight + i.scrollMarginBottom > e.scrollTop + e.clientHeight - r.scrollPaddingBottom && (a = n + t.offsetHeight + i.scrollMarginBottom - e.clientHeight + r.scrollPaddingBottom);
|
|
1594
|
+
}
|
|
1595
|
+
e.scrollTo({
|
|
1596
|
+
left: i,
|
|
1597
|
+
top: a,
|
|
1598
|
+
behavior: "auto"
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
function ui(e, t, n) {
|
|
1602
|
+
let r = n === "left" ? "offsetLeft" : "offsetTop", i = 0;
|
|
1603
|
+
for (; t.offsetParent && (i += t[r], t.offsetParent !== e);) t = t.offsetParent;
|
|
1604
|
+
return i;
|
|
1605
|
+
}
|
|
1606
|
+
function di(e) {
|
|
1607
|
+
let t = getComputedStyle(e);
|
|
1608
|
+
return {
|
|
1609
|
+
scrollMarginTop: parseFloat(t.scrollMarginTop) || 0,
|
|
1610
|
+
scrollMarginRight: parseFloat(t.scrollMarginRight) || 0,
|
|
1611
|
+
scrollMarginBottom: parseFloat(t.scrollMarginBottom) || 0,
|
|
1612
|
+
scrollMarginLeft: parseFloat(t.scrollMarginLeft) || 0,
|
|
1613
|
+
scrollPaddingTop: parseFloat(t.scrollPaddingTop) || 0,
|
|
1614
|
+
scrollPaddingRight: parseFloat(t.scrollPaddingRight) || 0,
|
|
1615
|
+
scrollPaddingBottom: parseFloat(t.scrollPaddingBottom) || 0,
|
|
1616
|
+
scrollPaddingLeft: parseFloat(t.scrollPaddingLeft) || 0
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
//#endregion
|
|
1620
|
+
//#region node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
|
|
1621
|
+
var fi = /* @__PURE__ */ r.createContext(void 0);
|
|
1622
|
+
process.env.NODE_ENV !== "production" && (fi.displayName = "CSPContext");
|
|
1623
|
+
var pi = { disableStyleElements: !1 };
|
|
1624
|
+
function mi() {
|
|
1625
|
+
return r.useContext(fi) ?? pi;
|
|
1626
|
+
}
|
|
1627
|
+
//#endregion
|
|
1628
|
+
//#region node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs
|
|
1629
|
+
var hi = /* @__PURE__ */ function(e) {
|
|
1630
|
+
return e[e.None = 0] = "None", e[e.GuessFromOrder = 1] = "GuessFromOrder", e;
|
|
1631
|
+
}({});
|
|
1632
|
+
function gi(e = {}) {
|
|
1633
|
+
let { label: t, metadata: n, textRef: i, indexGuessBehavior: a, index: o } = e, { register: s, unregister: c, subscribeMapChange: l, elementsRef: u, labelsRef: d, nextIndexRef: f } = Rr(), p = r.useRef(-1), [m, h] = r.useState(o ?? (a === hi.GuessFromOrder ? () => {
|
|
1634
|
+
if (p.current === -1) {
|
|
1635
|
+
let e = f.current;
|
|
1636
|
+
f.current += 1, p.current = e;
|
|
1637
|
+
}
|
|
1638
|
+
return p.current;
|
|
1639
|
+
} : -1)), g = r.useRef(null), _ = r.useCallback((e) => {
|
|
1640
|
+
if (g.current = e, m !== -1 && e !== null && (u.current[m] = e, d)) {
|
|
1641
|
+
let n = t !== void 0;
|
|
1642
|
+
d.current[m] = n ? t : i?.current?.textContent ?? e.textContent;
|
|
1643
|
+
}
|
|
1644
|
+
}, [
|
|
1645
|
+
m,
|
|
1646
|
+
u,
|
|
1647
|
+
d,
|
|
1648
|
+
t,
|
|
1649
|
+
i
|
|
1650
|
+
]);
|
|
1651
|
+
return V(() => {
|
|
1652
|
+
if (o != null) return;
|
|
1653
|
+
let e = g.current;
|
|
1654
|
+
if (e) return s(e, n), () => {
|
|
1655
|
+
c(e);
|
|
1656
|
+
};
|
|
1657
|
+
}, [
|
|
1658
|
+
o,
|
|
1659
|
+
s,
|
|
1660
|
+
c,
|
|
1661
|
+
n
|
|
1662
|
+
]), V(() => {
|
|
1663
|
+
if (o == null) return l((e) => {
|
|
1664
|
+
let t = g.current ? e.get(g.current)?.index : null;
|
|
1665
|
+
t != null && h(t);
|
|
1666
|
+
});
|
|
1667
|
+
}, [
|
|
1668
|
+
o,
|
|
1669
|
+
l,
|
|
1670
|
+
h
|
|
1671
|
+
]), {
|
|
1672
|
+
ref: _,
|
|
1673
|
+
index: m
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1676
|
+
//#endregion
|
|
1677
|
+
//#region node_modules/@base-ui/react/slider/utils/asc.mjs
|
|
1678
|
+
function _i(e, t) {
|
|
1679
|
+
return e - t;
|
|
1680
|
+
}
|
|
1681
|
+
//#endregion
|
|
1682
|
+
//#region node_modules/@base-ui/react/slider/utils/replaceArrayItemAtIndex.mjs
|
|
1683
|
+
function vi(e, t, n) {
|
|
1684
|
+
let r = e.slice();
|
|
1685
|
+
return r[t] = n, r.sort(_i);
|
|
1686
|
+
}
|
|
1687
|
+
//#endregion
|
|
1688
|
+
//#region node_modules/@base-ui/react/slider/utils/getSliderValue.mjs
|
|
1689
|
+
function yi(e, t, n, r, i, a) {
|
|
1690
|
+
let o = e;
|
|
1691
|
+
return o = Nr(o, n, r), i && (o = vi(a, t, Nr(o, a[t - 1] ?? -Infinity, a[t + 1] ?? Infinity))), o;
|
|
1692
|
+
}
|
|
1693
|
+
//#endregion
|
|
1694
|
+
//#region node_modules/@base-ui/react/slider/utils/validateMinimumDistance.mjs
|
|
1695
|
+
function bi(e, t, n) {
|
|
1696
|
+
if (!Array.isArray(e)) return !0;
|
|
1697
|
+
let r = e.reduce((e, t, n, r) => (n === r.length - 1 || e.push(Math.abs(t - r[n + 1])), e), []);
|
|
1698
|
+
return Math.min(...r) >= t * n;
|
|
1699
|
+
}
|
|
1700
|
+
//#endregion
|
|
1701
|
+
//#region node_modules/@base-ui/react/slider/root/stateAttributesMapping.mjs
|
|
1702
|
+
var xi = {
|
|
1703
|
+
activeThumbIndex: () => null,
|
|
1704
|
+
max: () => null,
|
|
1705
|
+
min: () => null,
|
|
1706
|
+
minStepsBetweenValues: () => null,
|
|
1707
|
+
step: () => null,
|
|
1708
|
+
values: () => null,
|
|
1709
|
+
...$e
|
|
1710
|
+
}, Si = /* @__PURE__ */ r.createContext(void 0);
|
|
1711
|
+
process.env.NODE_ENV !== "production" && (Si.displayName = "SliderRootContext");
|
|
1712
|
+
function Ci() {
|
|
1713
|
+
let e = r.useContext(Si);
|
|
1714
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(62) : "Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.");
|
|
1715
|
+
return e;
|
|
1716
|
+
}
|
|
1717
|
+
//#endregion
|
|
1718
|
+
//#region node_modules/@base-ui/react/slider/root/SliderRoot.mjs
|
|
1719
|
+
function wi(e) {
|
|
1720
|
+
return "key" in e ? kt : wt;
|
|
1721
|
+
}
|
|
1722
|
+
function Ti(e, t) {
|
|
1723
|
+
return typeof e == "number" && typeof t == "number" ? e === t : Array.isArray(e) && Array.isArray(t) ? Mr(e, t) : !1;
|
|
1724
|
+
}
|
|
1725
|
+
var Ei = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
1726
|
+
let { "aria-labelledby": n, className: i, defaultValue: a, disabled: s = !1, id: c, format: l, largeStep: u = 10, locale: d, render: f, max: p = 100, min: m = 0, minStepsBetweenValues: h = 0, form: g, name: _, onValueChange: v, onValueCommitted: y, orientation: b = "horizontal", step: x = 1, thumbCollisionBehavior: S = "push", thumbAlignment: C = "center", value: w, style: T, ...E } = e, D = it(c), O = Pr(D), k = L(v), A = L(y), { clearErrors: j } = ut(), { state: M, disabled: ee, name: N, setTouched: P, setDirty: F, validityData: te, validation: I } = st(), { labelId: R } = ft(), [ne, z] = r.useState(), B = n ?? Fr(R, ne), H = ee || s, re = N ?? _, [U, ie] = Ue({
|
|
1727
|
+
controlled: w,
|
|
1728
|
+
default: a ?? m,
|
|
1729
|
+
name: "Slider"
|
|
1730
|
+
}), ae = r.useRef(null), W = r.useRef(null), oe = r.useRef([]), se = r.useRef(null), ce = r.useRef(null), G = r.useRef(-1), K = r.useRef(null), le = r.useRef("none"), ue = Cr(l), [q, de] = r.useState(-1), [fe, pe] = r.useState(-1), [J, me] = r.useState(!1), [he, ge] = r.useState(() => /* @__PURE__ */ new Map()), [_e, ve] = r.useState([void 0, void 0]), ye = L((e) => {
|
|
1731
|
+
de(e), e !== -1 && pe(e);
|
|
1732
|
+
});
|
|
1733
|
+
ct(I.inputRef, D, U, void 0, !H, _), zt(U, () => {
|
|
1734
|
+
j(re), I.change(U);
|
|
1735
|
+
let e = te.initialValue, t;
|
|
1736
|
+
t = Array.isArray(U) && Array.isArray(e) ? !Mr(U, e) : U !== e, F(t);
|
|
1737
|
+
});
|
|
1738
|
+
let be = L((e) => {
|
|
1739
|
+
e && (W.current = e);
|
|
1740
|
+
}), xe = Array.isArray(U), Se = r.useMemo(() => xe ? U.slice().sort(_i) : [Nr(U, m, p)], [
|
|
1741
|
+
p,
|
|
1742
|
+
m,
|
|
1743
|
+
xe,
|
|
1744
|
+
U
|
|
1745
|
+
]), Ce = L((e, t) => {
|
|
1746
|
+
if (Number.isNaN(e) || Ti(e, U)) return !1;
|
|
1747
|
+
let n = t ?? Lt("none", void 0, void 0, { activeThumbIndex: -1 }), r = n.event, i = new (r.constructor ?? Event)(r.type, r);
|
|
1748
|
+
return Object.defineProperty(i, "target", {
|
|
1749
|
+
writable: !0,
|
|
1750
|
+
value: {
|
|
1751
|
+
value: e,
|
|
1752
|
+
name: re
|
|
1753
|
+
}
|
|
1754
|
+
}), n.event = i, k(e, n), n.isCanceled ? !1 : (le.current = n.reason, ie(e), !0);
|
|
1755
|
+
}), Y = L((e, t, n) => {
|
|
1756
|
+
let r = yi(e, t, m, p, xe, Se);
|
|
1757
|
+
if (bi(r, x, h)) {
|
|
1758
|
+
let e = wi(n), i = Ce(r, Lt(e, n.nativeEvent, void 0, { activeThumbIndex: t }));
|
|
1759
|
+
P(!0), i && A(r, Rt(e, n.nativeEvent));
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
process.env.NODE_ENV !== "production" && m >= p && ke("Slider `max` must be greater than `min`."), V(() => {
|
|
1763
|
+
let e = xn(Je(ae.current));
|
|
1764
|
+
H && Sn(ae.current, e) && e.blur();
|
|
1765
|
+
}, [H]), H && q !== -1 && ye(-1);
|
|
1766
|
+
let we = r.useMemo(() => ({
|
|
1767
|
+
...M,
|
|
1768
|
+
activeThumbIndex: q,
|
|
1769
|
+
disabled: H,
|
|
1770
|
+
dragging: J,
|
|
1771
|
+
orientation: b,
|
|
1772
|
+
max: p,
|
|
1773
|
+
min: m,
|
|
1774
|
+
minStepsBetweenValues: h,
|
|
1775
|
+
step: x,
|
|
1776
|
+
values: Se
|
|
1777
|
+
}), [
|
|
1778
|
+
M,
|
|
1779
|
+
q,
|
|
1780
|
+
H,
|
|
1781
|
+
J,
|
|
1782
|
+
p,
|
|
1783
|
+
m,
|
|
1784
|
+
h,
|
|
1785
|
+
b,
|
|
1786
|
+
x,
|
|
1787
|
+
Se
|
|
1788
|
+
]), Te = r.useMemo(() => ({
|
|
1789
|
+
active: q,
|
|
1790
|
+
controlRef: W,
|
|
1791
|
+
disabled: H,
|
|
1792
|
+
dragging: J,
|
|
1793
|
+
validation: I,
|
|
1794
|
+
formatOptionsRef: ue,
|
|
1795
|
+
handleInputChange: Y,
|
|
1796
|
+
indicatorPosition: _e,
|
|
1797
|
+
inset: C !== "center",
|
|
1798
|
+
labelId: B,
|
|
1799
|
+
rootLabelId: O,
|
|
1800
|
+
largeStep: u,
|
|
1801
|
+
lastUsedThumbIndex: fe,
|
|
1802
|
+
lastChangeReasonRef: le,
|
|
1803
|
+
form: g,
|
|
1804
|
+
locale: d,
|
|
1805
|
+
max: p,
|
|
1806
|
+
min: m,
|
|
1807
|
+
minStepsBetweenValues: h,
|
|
1808
|
+
name: re,
|
|
1809
|
+
onValueCommitted: A,
|
|
1810
|
+
orientation: b,
|
|
1811
|
+
pressedInputRef: se,
|
|
1812
|
+
pressedThumbCenterOffsetRef: ce,
|
|
1813
|
+
pressedThumbIndexRef: G,
|
|
1814
|
+
pressedValuesRef: K,
|
|
1815
|
+
registerFieldControlRef: be,
|
|
1816
|
+
renderBeforeHydration: C === "edge",
|
|
1817
|
+
setActive: ye,
|
|
1818
|
+
setDragging: me,
|
|
1819
|
+
setIndicatorPosition: ve,
|
|
1820
|
+
setLabelId: z,
|
|
1821
|
+
setValue: Ce,
|
|
1822
|
+
state: we,
|
|
1823
|
+
step: x,
|
|
1824
|
+
thumbCollisionBehavior: S,
|
|
1825
|
+
thumbMap: he,
|
|
1826
|
+
thumbRefs: oe,
|
|
1827
|
+
values: Se
|
|
1828
|
+
}), [
|
|
1829
|
+
q,
|
|
1830
|
+
W,
|
|
1831
|
+
B,
|
|
1832
|
+
O,
|
|
1833
|
+
H,
|
|
1834
|
+
J,
|
|
1835
|
+
I,
|
|
1836
|
+
ue,
|
|
1837
|
+
Y,
|
|
1838
|
+
_e,
|
|
1839
|
+
u,
|
|
1840
|
+
fe,
|
|
1841
|
+
le,
|
|
1842
|
+
g,
|
|
1843
|
+
d,
|
|
1844
|
+
p,
|
|
1845
|
+
m,
|
|
1846
|
+
h,
|
|
1847
|
+
re,
|
|
1848
|
+
A,
|
|
1849
|
+
b,
|
|
1850
|
+
se,
|
|
1851
|
+
ce,
|
|
1852
|
+
G,
|
|
1853
|
+
K,
|
|
1854
|
+
be,
|
|
1855
|
+
ye,
|
|
1856
|
+
me,
|
|
1857
|
+
ve,
|
|
1858
|
+
z,
|
|
1859
|
+
Ce,
|
|
1860
|
+
we,
|
|
1861
|
+
x,
|
|
1862
|
+
S,
|
|
1863
|
+
C,
|
|
1864
|
+
he,
|
|
1865
|
+
oe,
|
|
1866
|
+
Se
|
|
1867
|
+
]), Ee = Z("div", e, {
|
|
1868
|
+
state: we,
|
|
1869
|
+
ref: [t, ae],
|
|
1870
|
+
props: [
|
|
1871
|
+
{
|
|
1872
|
+
"aria-labelledby": B,
|
|
1873
|
+
id: D,
|
|
1874
|
+
role: "group"
|
|
1875
|
+
},
|
|
1876
|
+
E,
|
|
1877
|
+
(e) => I.getValidationProps(H, e)
|
|
1878
|
+
],
|
|
1879
|
+
stateAttributesMapping: xi
|
|
1880
|
+
});
|
|
1881
|
+
return /* @__PURE__ */ o(Si.Provider, {
|
|
1882
|
+
value: Te,
|
|
1883
|
+
children: /* @__PURE__ */ o(zr, {
|
|
1884
|
+
elementsRef: oe,
|
|
1885
|
+
onMapChange: ge,
|
|
1886
|
+
children: Ee
|
|
1887
|
+
})
|
|
1888
|
+
});
|
|
1889
|
+
});
|
|
1890
|
+
process.env.NODE_ENV !== "production" && (Ei.displayName = "SliderRoot");
|
|
1891
|
+
//#endregion
|
|
1892
|
+
//#region node_modules/@base-ui/react/slider/label/SliderLabel.mjs
|
|
1893
|
+
var Di = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
1894
|
+
let { render: n, className: r, style: i, ...a } = e, o = a;
|
|
1895
|
+
delete o.id;
|
|
1896
|
+
let { state: s, setLabelId: c, controlRef: l, rootLabelId: u } = Ci();
|
|
1897
|
+
function d(e, t) {
|
|
1898
|
+
if (t) {
|
|
1899
|
+
let n = Je(e.currentTarget).getElementById(t);
|
|
1900
|
+
if (h(n)) {
|
|
1901
|
+
xr(n);
|
|
1902
|
+
return;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
let n = l.current?.querySelectorAll("input[type=\"range\"]"), r = n?.length === 1 ? n[0] : null;
|
|
1906
|
+
h(r) && xr(r);
|
|
1907
|
+
}
|
|
1908
|
+
return Z("div", e, {
|
|
1909
|
+
ref: t,
|
|
1910
|
+
state: s,
|
|
1911
|
+
props: [br({
|
|
1912
|
+
id: u,
|
|
1913
|
+
setLabelId: c,
|
|
1914
|
+
focusControl: d
|
|
1915
|
+
}), a],
|
|
1916
|
+
stateAttributesMapping: xi
|
|
1917
|
+
});
|
|
1918
|
+
});
|
|
1919
|
+
process.env.NODE_ENV !== "production" && (Di.displayName = "SliderLabel");
|
|
1920
|
+
//#endregion
|
|
1921
|
+
//#region node_modules/@base-ui/react/utils/stringifyLocale.mjs
|
|
1922
|
+
function Oi(e) {
|
|
1923
|
+
return Array.isArray(e) ? e.map((e) => Oi(e)).join(",") : e == null ? "" : String(e);
|
|
1924
|
+
}
|
|
1925
|
+
//#endregion
|
|
1926
|
+
//#region node_modules/@base-ui/react/utils/formatNumber.mjs
|
|
1927
|
+
var ki = /* @__PURE__ */ new Map();
|
|
1928
|
+
function Ai(e, t) {
|
|
1929
|
+
let n = JSON.stringify({
|
|
1930
|
+
locale: Oi(e),
|
|
1931
|
+
options: t
|
|
1932
|
+
}), r = ki.get(n);
|
|
1933
|
+
if (r) return r;
|
|
1934
|
+
let i = new Intl.NumberFormat(e, t);
|
|
1935
|
+
return ki.set(n, i), i;
|
|
1936
|
+
}
|
|
1937
|
+
function ji(e, t, n) {
|
|
1938
|
+
return e == null ? "" : Ai(t, n).format(e);
|
|
1939
|
+
}
|
|
1940
|
+
//#endregion
|
|
1941
|
+
//#region node_modules/@base-ui/react/slider/value/SliderValue.mjs
|
|
1942
|
+
var Mi = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
1943
|
+
let { "aria-live": n = "off", render: i, className: a, children: o, style: s, ...c } = e, { thumbMap: l, state: u, values: d, formatOptionsRef: f, locale: p } = Ci(), m = "";
|
|
1944
|
+
for (let e of l.values()) e?.inputId && (m += `${e.inputId} `);
|
|
1945
|
+
let h = m.trim() === "" ? void 0 : m.trim(), g = r.useMemo(() => {
|
|
1946
|
+
let e = [];
|
|
1947
|
+
for (let t = 0; t < d.length; t += 1) e.push(ji(d[t], p, f.current ?? void 0));
|
|
1948
|
+
return e;
|
|
1949
|
+
}, [
|
|
1950
|
+
f,
|
|
1951
|
+
p,
|
|
1952
|
+
d
|
|
1953
|
+
]), _ = d.map((e, t) => g[t] || e).join(" – ");
|
|
1954
|
+
return Z("output", e, {
|
|
1955
|
+
state: u,
|
|
1956
|
+
ref: t,
|
|
1957
|
+
props: [{
|
|
1958
|
+
"aria-live": n,
|
|
1959
|
+
children: typeof o == "function" ? o(g, d) : _,
|
|
1960
|
+
htmlFor: h
|
|
1961
|
+
}, c],
|
|
1962
|
+
stateAttributesMapping: xi
|
|
1963
|
+
});
|
|
1964
|
+
});
|
|
1965
|
+
process.env.NODE_ENV !== "production" && (Mi.displayName = "SliderValue");
|
|
1966
|
+
//#endregion
|
|
1967
|
+
//#region node_modules/@base-ui/react/slider/utils/getMidpoint.mjs
|
|
1968
|
+
function Ni(e) {
|
|
1969
|
+
let t = e.getBoundingClientRect();
|
|
1970
|
+
return {
|
|
1971
|
+
x: (t.left + t.right) / 2,
|
|
1972
|
+
y: (t.top + t.bottom) / 2
|
|
1973
|
+
};
|
|
1974
|
+
}
|
|
1975
|
+
//#endregion
|
|
1976
|
+
//#region node_modules/@base-ui/react/slider/utils/roundValueToStep.mjs
|
|
1977
|
+
function Pi(e) {
|
|
1978
|
+
if (e === 0) return 0;
|
|
1979
|
+
if (Math.abs(e) < 1) {
|
|
1980
|
+
let t = e.toExponential().split("e-"), n = t[0].split(".")[1];
|
|
1981
|
+
return (n ? n.length : 0) + parseInt(t[1], 10);
|
|
1982
|
+
}
|
|
1983
|
+
let t = e.toString().split(".")[1];
|
|
1984
|
+
return t ? t.length : 0;
|
|
1985
|
+
}
|
|
1986
|
+
function Fi(e, t, n) {
|
|
1987
|
+
let r = Math.round((e - n) / t) * t + n;
|
|
1988
|
+
return Number(r.toFixed(Math.max(Pi(t), Pi(n))));
|
|
1989
|
+
}
|
|
1990
|
+
//#endregion
|
|
1991
|
+
//#region node_modules/@base-ui/react/slider/utils/getPushedThumbValues.mjs
|
|
1992
|
+
function Ii({ values: e, index: t, nextValue: n, min: r, max: i, step: a, minStepsBetweenValues: o, initialValues: s }) {
|
|
1993
|
+
if (e.length === 0) return [];
|
|
1994
|
+
let c = e.slice(), l = a * o, u = c.length - 1, d = s ?? e;
|
|
1995
|
+
c[t] = Nr(n, r + t * l, i - (u - t) * l);
|
|
1996
|
+
for (let e = t + 1; e <= u; e += 1) {
|
|
1997
|
+
let t = c[e - 1] + l, n = i - (u - e) * l, r = d[e] ?? c[e], a = Math.max(c[e], t);
|
|
1998
|
+
r < a && (a = Math.max(r, t)), c[e] = Nr(a, t, n);
|
|
1999
|
+
}
|
|
2000
|
+
for (let e = t - 1; e >= 0; --e) {
|
|
2001
|
+
let t = c[e + 1] - l, n = r + e * l, i = d[e] ?? c[e], a = Math.min(c[e], t);
|
|
2002
|
+
i > a && (a = Math.min(i, t)), c[e] = Nr(a, n, t);
|
|
2003
|
+
}
|
|
2004
|
+
for (let e = 0; e <= u; e += 1) c[e] = Number(c[e].toFixed(12));
|
|
2005
|
+
return c;
|
|
2006
|
+
}
|
|
2007
|
+
//#endregion
|
|
2008
|
+
//#region node_modules/@base-ui/react/slider/utils/resolveThumbCollision.mjs
|
|
2009
|
+
function Li({ behavior: e, values: t, currentValues: n, initialValues: r, pressedIndex: i, nextValue: a, min: o, max: s, step: c, minStepsBetweenValues: l }) {
|
|
2010
|
+
let u = n ?? t, d = r ?? t;
|
|
2011
|
+
if (!(u.length > 1)) return {
|
|
2012
|
+
value: a,
|
|
2013
|
+
thumbIndex: 0,
|
|
2014
|
+
didSwap: !1
|
|
2015
|
+
};
|
|
2016
|
+
let f = c * l;
|
|
2017
|
+
switch (e) {
|
|
2018
|
+
case "swap": {
|
|
2019
|
+
let e = u[i], t = 1e-7, n = u.slice(), r = n[i - 1], p = n[i + 1], m = Nr(a, r == null ? o : r + f, p == null ? s : p - f), h = Number(m.toFixed(12));
|
|
2020
|
+
n[i] = h;
|
|
2021
|
+
let g = a > e, _ = a < e, v = g && p != null && a >= p - t, y = _ && r != null && a <= r + t;
|
|
2022
|
+
if (!v && !y) return {
|
|
2023
|
+
value: n,
|
|
2024
|
+
thumbIndex: i,
|
|
2025
|
+
didSwap: !1
|
|
2026
|
+
};
|
|
2027
|
+
let b = v ? i + 1 : i - 1, x = n.map((e, t) => t === i ? h : d[t] ?? u[t]), S = a;
|
|
2028
|
+
S = v ? Math.max(a, n[b]) : Math.min(a, n[b]);
|
|
2029
|
+
let C = Ii({
|
|
2030
|
+
values: n,
|
|
2031
|
+
index: b,
|
|
2032
|
+
nextValue: S,
|
|
2033
|
+
min: o,
|
|
2034
|
+
max: s,
|
|
2035
|
+
step: c,
|
|
2036
|
+
minStepsBetweenValues: l,
|
|
2037
|
+
initialValues: x
|
|
2038
|
+
}), w = v ? b - 1 : b + 1;
|
|
2039
|
+
if (w >= 0 && w < C.length) {
|
|
2040
|
+
let e = C[w - 1], t = C[w + 1], n = e == null ? o : e + f;
|
|
2041
|
+
n = Math.max(n, o + w * f);
|
|
2042
|
+
let r = t == null ? s : t - f;
|
|
2043
|
+
r = Math.min(r, s - (C.length - 1 - w) * f);
|
|
2044
|
+
let i = Nr(h, n, r);
|
|
2045
|
+
C[w] = Number(i.toFixed(12));
|
|
2046
|
+
}
|
|
2047
|
+
return {
|
|
2048
|
+
value: C,
|
|
2049
|
+
thumbIndex: b,
|
|
2050
|
+
didSwap: !0
|
|
2051
|
+
};
|
|
2052
|
+
}
|
|
2053
|
+
case "push": return {
|
|
2054
|
+
value: Ii({
|
|
2055
|
+
values: u,
|
|
2056
|
+
index: i,
|
|
2057
|
+
nextValue: a,
|
|
2058
|
+
min: o,
|
|
2059
|
+
max: s,
|
|
2060
|
+
step: c,
|
|
2061
|
+
minStepsBetweenValues: l
|
|
2062
|
+
}),
|
|
2063
|
+
thumbIndex: i,
|
|
2064
|
+
didSwap: !1
|
|
2065
|
+
};
|
|
2066
|
+
default: {
|
|
2067
|
+
let e = u.slice(), t = e[i - 1], n = e[i + 1], r = Nr(a, t == null ? o : t + f, n == null ? s : n - f);
|
|
2068
|
+
return e[i] = Number(r.toFixed(12)), {
|
|
2069
|
+
value: e,
|
|
2070
|
+
thumbIndex: i,
|
|
2071
|
+
didSwap: !1
|
|
2072
|
+
};
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region node_modules/@base-ui/react/slider/control/SliderControl.mjs
|
|
2078
|
+
var Ri = 2;
|
|
2079
|
+
function zi(e, t) {
|
|
2080
|
+
if (!e) return {
|
|
2081
|
+
start: 0,
|
|
2082
|
+
end: 0
|
|
2083
|
+
};
|
|
2084
|
+
function n(e) {
|
|
2085
|
+
let t = e == null ? 0 : parseFloat(e);
|
|
2086
|
+
return Number.isNaN(t) ? 0 : t;
|
|
2087
|
+
}
|
|
2088
|
+
let r = t ? "Top" : "InlineStart", i = t ? "Bottom" : "InlineEnd";
|
|
2089
|
+
return {
|
|
2090
|
+
start: n(e[`border${r}Width`]) + n(e[`padding${r}`]),
|
|
2091
|
+
end: n(e[`border${i}Width`]) + n(e[`padding${i}`])
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2094
|
+
function Bi(e, t) {
|
|
2095
|
+
if (t.current != null && e.changedTouches) {
|
|
2096
|
+
let n = e;
|
|
2097
|
+
for (let e = 0; e < n.changedTouches.length; e += 1) {
|
|
2098
|
+
let r = n.changedTouches[e];
|
|
2099
|
+
if (r.identifier === t.current) return {
|
|
2100
|
+
x: r.clientX,
|
|
2101
|
+
y: r.clientY
|
|
2102
|
+
};
|
|
2103
|
+
}
|
|
2104
|
+
return null;
|
|
2105
|
+
}
|
|
2106
|
+
return {
|
|
2107
|
+
x: e.clientX,
|
|
2108
|
+
y: e.clientY
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
2111
|
+
var Vi = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2112
|
+
let { render: n, className: i, style: a, ...o } = e, { disabled: s, dragging: c, inset: l, lastChangeReasonRef: u, max: f, min: p, minStepsBetweenValues: h, onValueCommitted: g, orientation: _, pressedInputRef: v, pressedThumbCenterOffsetRef: y, pressedThumbIndexRef: b, pressedValuesRef: x, registerFieldControlRef: S, renderBeforeHydration: C, setActive: w, setDragging: T, setValue: E, state: D, step: O, thumbCollisionBehavior: k, thumbRefs: A, values: j } = Ci(), M = Wr(), ee = j.length > 1, N = _ === "vertical", P = r.useRef(null), F = r.useRef(null), te = L((e) => {
|
|
2113
|
+
e && F.current == null && (F.current = d(e).getComputedStyle(e));
|
|
2114
|
+
}), I = r.useRef(null), R = r.useRef(0), ne = r.useRef(0), z = r.useRef(null), B = Cr(j);
|
|
2115
|
+
function V(e) {
|
|
2116
|
+
b.current !== e && (b.current = e);
|
|
2117
|
+
let t = A.current[e];
|
|
2118
|
+
if (!t) {
|
|
2119
|
+
y.current = null, v.current = null;
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
v.current = t.querySelector("input[type=\"range\"]");
|
|
2123
|
+
}
|
|
2124
|
+
function H() {
|
|
2125
|
+
b.current = -1, y.current = null, v.current = null;
|
|
2126
|
+
}
|
|
2127
|
+
function re(e) {
|
|
2128
|
+
return m(e) ? A.current.some((t) => !m(t) || !Sn(t, e) ? !1 : t.querySelector("input[type=\"range\"]")?.disabled === !0) : !1;
|
|
2129
|
+
}
|
|
2130
|
+
function U(e) {
|
|
2131
|
+
let t = P.current, n = b.current;
|
|
2132
|
+
if (!t || !ee && (n < 0 || n >= j.length)) return null;
|
|
2133
|
+
let { width: r, height: i, bottom: a, left: o, right: s } = t.getBoundingClientRect(), c = zi(F.current, N), l = ne.current, u = (N ? i : r) - c.start - c.end - l * 2, d = y.current ?? 0, m = e.x - d, g = e.y - d, _ = Nr(((N ? a - g - c.end : (M === "rtl" ? s - m : m - o) - c.start) - l) / u, 0, 1), v = (f - p) * _ + p;
|
|
2134
|
+
return v = Fi(v, O, p), v = Nr(v, p, f), ee ? n < 0 ? null : Li({
|
|
2135
|
+
behavior: k,
|
|
2136
|
+
values: j,
|
|
2137
|
+
currentValues: B.current ?? j,
|
|
2138
|
+
initialValues: x.current,
|
|
2139
|
+
pressedIndex: n,
|
|
2140
|
+
nextValue: v,
|
|
2141
|
+
min: p,
|
|
2142
|
+
max: f,
|
|
2143
|
+
step: O,
|
|
2144
|
+
minStepsBetweenValues: h
|
|
2145
|
+
}) : {
|
|
2146
|
+
value: v,
|
|
2147
|
+
thumbIndex: n,
|
|
2148
|
+
didSwap: !1
|
|
2149
|
+
};
|
|
2150
|
+
}
|
|
2151
|
+
function ie(e) {
|
|
2152
|
+
x.current = ee ? j.slice() : null, z.current = null, B.current = j;
|
|
2153
|
+
let t = b.current, n = t;
|
|
2154
|
+
if (t > -1 && t < j.length) {
|
|
2155
|
+
if (j[t] === f) {
|
|
2156
|
+
let e = t;
|
|
2157
|
+
for (; e > 0 && j[e - 1] === f;) --e;
|
|
2158
|
+
n = e;
|
|
2159
|
+
}
|
|
2160
|
+
} else {
|
|
2161
|
+
let t = N ? "y" : "x", r;
|
|
2162
|
+
n = -1;
|
|
2163
|
+
for (let i = 0; i < A.current.length; i += 1) {
|
|
2164
|
+
let a = A.current[i];
|
|
2165
|
+
if (m(a) && !a.querySelector("input[type=\"range\"]")?.disabled) {
|
|
2166
|
+
let o = Ni(a), s = Math.abs(e[t] - o[t]);
|
|
2167
|
+
(r === void 0 || s <= r) && (n = i, r = s);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
if (n > -1 && n !== t && V(n), l) {
|
|
2172
|
+
let e = A.current[n];
|
|
2173
|
+
m(e) && (ne.current = e.getBoundingClientRect()[N ? "height" : "width"] / 2);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
function ae(e) {
|
|
2177
|
+
let t = A.current?.[e]?.querySelector("input[type=\"range\"]");
|
|
2178
|
+
t && t.focus({
|
|
2179
|
+
preventScroll: !0,
|
|
2180
|
+
focusVisible: !1
|
|
2181
|
+
});
|
|
2182
|
+
}
|
|
2183
|
+
function W(e, t, n) {
|
|
2184
|
+
let r = E(e.value, Lt(t, n, void 0, { activeThumbIndex: e.thumbIndex }));
|
|
2185
|
+
return r && (z.current = e.value, B.current = Array.isArray(e.value) ? e.value : [e.value], e.didSwap && V(e.thumbIndex)), r;
|
|
2186
|
+
}
|
|
2187
|
+
let oe = L((e) => {
|
|
2188
|
+
let t = Bi(e, I);
|
|
2189
|
+
if (t == null) return;
|
|
2190
|
+
if (R.current += 1, e.type === "pointermove" && e.buttons === 0) {
|
|
2191
|
+
se(e);
|
|
2192
|
+
return;
|
|
2193
|
+
}
|
|
2194
|
+
let n = U(t);
|
|
2195
|
+
n != null && bi(n.value, O, h) && (!c && R.current > Ri && T(!0), W(n, "drag", e) && n.didSwap && ae(n.thumbIndex));
|
|
2196
|
+
}), se = L((e) => {
|
|
2197
|
+
if (w(-1), T(!1), v.current = null, y.current = null, z.current != null) {
|
|
2198
|
+
let t = u.current;
|
|
2199
|
+
g(z.current, Rt(t, e));
|
|
2200
|
+
}
|
|
2201
|
+
"pointerType" in e && P.current?.hasPointerCapture(e.pointerId) && P.current?.releasePointerCapture(e.pointerId), b.current = -1, I.current = null, x.current = null, z.current = null, G();
|
|
2202
|
+
}), ce = L((e) => {
|
|
2203
|
+
if (s) return;
|
|
2204
|
+
if (re(Cn(e))) {
|
|
2205
|
+
H();
|
|
2206
|
+
return;
|
|
2207
|
+
}
|
|
2208
|
+
let t = e.changedTouches[0];
|
|
2209
|
+
t != null && (I.current = t.identifier);
|
|
2210
|
+
let n = Bi(e, I);
|
|
2211
|
+
if (n != null) {
|
|
2212
|
+
ie(n);
|
|
2213
|
+
let t = U(n);
|
|
2214
|
+
if (t == null) return;
|
|
2215
|
+
ae(t.thumbIndex), W(t, "track-press", e) && t.didSwap && ae(t.thumbIndex);
|
|
2216
|
+
}
|
|
2217
|
+
R.current = 0;
|
|
2218
|
+
let r = Je(P.current);
|
|
2219
|
+
r.addEventListener("touchmove", oe, { passive: !0 }), r.addEventListener("touchend", se, { passive: !0 });
|
|
2220
|
+
}), G = L(() => {
|
|
2221
|
+
let e = Je(P.current);
|
|
2222
|
+
e.removeEventListener("pointermove", oe), e.removeEventListener("pointerup", se), e.removeEventListener("touchmove", oe), e.removeEventListener("touchend", se), x.current = null, z.current = null;
|
|
2223
|
+
}), K = Kt();
|
|
2224
|
+
return r.useEffect(() => {
|
|
2225
|
+
let e = P.current;
|
|
2226
|
+
if (!e) return () => G();
|
|
2227
|
+
let t = kr(e, "touchstart", ce, { passive: !0 });
|
|
2228
|
+
return () => {
|
|
2229
|
+
t(), K.cancel(), G();
|
|
2230
|
+
};
|
|
2231
|
+
}, [
|
|
2232
|
+
G,
|
|
2233
|
+
ce,
|
|
2234
|
+
P,
|
|
2235
|
+
K
|
|
2236
|
+
]), r.useEffect(() => {
|
|
2237
|
+
s && G();
|
|
2238
|
+
}, [s, G]), Z("div", e, {
|
|
2239
|
+
state: D,
|
|
2240
|
+
ref: [
|
|
2241
|
+
t,
|
|
2242
|
+
S,
|
|
2243
|
+
P,
|
|
2244
|
+
te
|
|
2245
|
+
],
|
|
2246
|
+
props: [{
|
|
2247
|
+
"data-base-ui-slider-control": C ? "" : void 0,
|
|
2248
|
+
onPointerDown(e) {
|
|
2249
|
+
let t = P.current, n = Cn(e.nativeEvent);
|
|
2250
|
+
if (!t || s || e.defaultPrevented || !m(n) || e.button !== 0) return;
|
|
2251
|
+
if (re(n)) {
|
|
2252
|
+
H();
|
|
2253
|
+
return;
|
|
2254
|
+
}
|
|
2255
|
+
let r = Bi(e, I);
|
|
2256
|
+
if (r != null) {
|
|
2257
|
+
ie(r);
|
|
2258
|
+
let n = U(r);
|
|
2259
|
+
if (n == null) return;
|
|
2260
|
+
Sn(A.current[n.thumbIndex], xn(Je(t))) ? e.preventDefault() : K.request(() => {
|
|
2261
|
+
ae(n.thumbIndex);
|
|
2262
|
+
}), T(!0), y.current == null && W(n, "track-press", e.nativeEvent) && n.didSwap && ae(n.thumbIndex);
|
|
2263
|
+
}
|
|
2264
|
+
e.nativeEvent.pointerId && t.setPointerCapture(e.nativeEvent.pointerId), R.current = 0;
|
|
2265
|
+
let i = Je(P.current);
|
|
2266
|
+
i.addEventListener("pointermove", oe, { passive: !0 }), i.addEventListener("pointerup", se, { once: !0 });
|
|
2267
|
+
}
|
|
2268
|
+
}, o],
|
|
2269
|
+
stateAttributesMapping: xi
|
|
2270
|
+
});
|
|
2271
|
+
});
|
|
2272
|
+
process.env.NODE_ENV !== "production" && (Vi.displayName = "SliderControl");
|
|
2273
|
+
//#endregion
|
|
2274
|
+
//#region node_modules/@base-ui/react/slider/track/SliderTrack.mjs
|
|
2275
|
+
var Hi = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2276
|
+
let { render: n, className: r, style: i, ...a } = e, { state: o } = Ci();
|
|
2277
|
+
return Z("div", e, {
|
|
2278
|
+
state: o,
|
|
2279
|
+
ref: t,
|
|
2280
|
+
props: [{ style: { position: "relative" } }, a],
|
|
2281
|
+
stateAttributesMapping: xi
|
|
2282
|
+
});
|
|
2283
|
+
});
|
|
2284
|
+
process.env.NODE_ENV !== "production" && (Hi.displayName = "SliderTrack");
|
|
2285
|
+
//#endregion
|
|
2286
|
+
//#region node_modules/@base-ui/react/utils/useIsHydrating.mjs
|
|
2287
|
+
function Ui() {
|
|
2288
|
+
return X;
|
|
2289
|
+
}
|
|
2290
|
+
function Wi() {
|
|
2291
|
+
return !1;
|
|
2292
|
+
}
|
|
2293
|
+
function Gi() {
|
|
2294
|
+
return !0;
|
|
2295
|
+
}
|
|
2296
|
+
function Ki() {
|
|
2297
|
+
return (0, Ar.useSyncExternalStore)(Ui, Wi, Gi);
|
|
2298
|
+
}
|
|
2299
|
+
//#endregion
|
|
2300
|
+
//#region node_modules/@base-ui/react/utils/valueToPercent.mjs
|
|
2301
|
+
function qi(e, t, n) {
|
|
2302
|
+
return (e - t) * 100 / (n - t);
|
|
2303
|
+
}
|
|
2304
|
+
//#endregion
|
|
2305
|
+
//#region node_modules/@base-ui/react/slider/thumb/SliderThumbDataAttributes.mjs
|
|
2306
|
+
var Ji = /* @__PURE__ */ function(e) {
|
|
2307
|
+
return e.index = "data-index", e.dragging = "data-dragging", e.orientation = "data-orientation", e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.focused = "data-focused", e;
|
|
2308
|
+
}({}), Yi = new Set([
|
|
2309
|
+
...ai,
|
|
2310
|
+
Qr,
|
|
2311
|
+
$r
|
|
2312
|
+
]);
|
|
2313
|
+
function Xi(e, t, n, r) {
|
|
2314
|
+
if (!(t < 0)) return e.length === 2 ? t === 0 ? `${ji(e[t], r, n)} start range` : `${ji(e[t], r, n)} end range` : n ? ji(e[t], r, n) : void 0;
|
|
2315
|
+
}
|
|
2316
|
+
function Zi(e, t, n, r, i) {
|
|
2317
|
+
let a = n === 1 ? e + t : e - t;
|
|
2318
|
+
return Nr(Number(a.toFixed(Math.max(Pi(e), Pi(t), Pi(r)))), r, i);
|
|
2319
|
+
}
|
|
2320
|
+
var Qi = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2321
|
+
let { render: n, children: i, className: a, "aria-describedby": c, "aria-label": l, "aria-labelledby": u, "aria-valuetext": f, disabled: p = !1, getAriaLabel: m, getAriaValueText: h, id: g, index: _, inputRef: v, onBlur: y, onFocus: b, onKeyDown: x, tabIndex: S, style: C, ...w } = e, { nonce: T } = mi(), E = it(g), { active: D, lastUsedThumbIndex: O, controlRef: k, disabled: A, validation: j, formatOptionsRef: M, handleInputChange: ee, inset: N, labelId: P, largeStep: F, locale: te, max: I, min: R, minStepsBetweenValues: ne, form: z, name: B, orientation: H, pressedInputRef: re, pressedThumbCenterOffsetRef: ie, pressedThumbIndexRef: ae, renderBeforeHydration: W, setActive: oe, setIndicatorPosition: se, state: ce, step: G, values: K } = Ci(), le = Wr(), ue = p || A, q = K.length > 1, de = H === "vertical", fe = le === "rtl", { setTouched: pe, setFocused: J, validationMode: me } = st(), he = r.useRef(null), ge = r.useRef(null), _e = r.useRef(!1), ve = it(), ye = tn(), xe = q ? ve : ye, { ref: Se, index: Ce } = gi({ metadata: r.useMemo(() => ({ inputId: xe }), [xe]) }), Y = q ? _ ?? Ce : 0, we = Y === K.length - 1, Te = K[Y], Ee = qi(Te, R, I), [De, Oe] = r.useState(), ke = Ki(), X = O >= 0 && O < K.length ? O : -1, Ae = L(() => {
|
|
2322
|
+
let e = k.current, t = he.current;
|
|
2323
|
+
if (!e || !t) return;
|
|
2324
|
+
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = de ? "height" : "width", a = r[i] - n[i], o = (n[i] / 2 + a * Ee / 100) / r[i] * 100, s = Number.isFinite(o) ? o : void 0;
|
|
2325
|
+
Oe(s), Y === 0 ? se((e) => [s, e[1]]) : we && se((e) => [e[0], s]);
|
|
2326
|
+
});
|
|
2327
|
+
V(() => {
|
|
2328
|
+
N && queueMicrotask(Ae);
|
|
2329
|
+
}, [Ae, N]), V(() => {
|
|
2330
|
+
N && Ae();
|
|
2331
|
+
}, [
|
|
2332
|
+
Ae,
|
|
2333
|
+
N,
|
|
2334
|
+
Ee
|
|
2335
|
+
]), V(() => {
|
|
2336
|
+
if (!N) return;
|
|
2337
|
+
let e = k.current, t = he.current;
|
|
2338
|
+
if (!e || !t) return;
|
|
2339
|
+
let n = d(e).ResizeObserver;
|
|
2340
|
+
if (typeof n != "function") return;
|
|
2341
|
+
let r = new n(Ae);
|
|
2342
|
+
return r.observe(e), r.observe(t), () => {
|
|
2343
|
+
r.disconnect();
|
|
2344
|
+
};
|
|
2345
|
+
}, [
|
|
2346
|
+
k,
|
|
2347
|
+
Ae,
|
|
2348
|
+
N
|
|
2349
|
+
]);
|
|
2350
|
+
let je = de ? "bottom" : "insetInlineStart", Me = de ? "left" : "top", Ne;
|
|
2351
|
+
q ? D === Y ? Ne = 2 : X === Y && (Ne = 1) : D === Y && (Ne = 1);
|
|
2352
|
+
let Pe;
|
|
2353
|
+
Pe = N ? {
|
|
2354
|
+
"--position": `${De ?? 0}%`,
|
|
2355
|
+
visibility: W && ke || De === void 0 ? "hidden" : void 0,
|
|
2356
|
+
position: "absolute",
|
|
2357
|
+
[je]: "var(--position)",
|
|
2358
|
+
[Me]: "50%",
|
|
2359
|
+
translate: `${(de || !fe ? -1 : 1) * 50}% ${(de ? 1 : -1) * 50}%`,
|
|
2360
|
+
zIndex: Ne
|
|
2361
|
+
} : Number.isFinite(Ee) ? {
|
|
2362
|
+
position: "absolute",
|
|
2363
|
+
[je]: `${Ee}%`,
|
|
2364
|
+
[Me]: "50%",
|
|
2365
|
+
translate: `${(de || !fe ? -1 : 1) * 50}% ${(de ? 1 : -1) * 50}%`,
|
|
2366
|
+
zIndex: Ne
|
|
2367
|
+
} : Ke;
|
|
2368
|
+
let Fe;
|
|
2369
|
+
H === "vertical" && (Fe = fe ? "vertical-rl" : "vertical-lr");
|
|
2370
|
+
let Ie = typeof m == "function" ? m(Y) : l, Le = U({
|
|
2371
|
+
"aria-label": Ie,
|
|
2372
|
+
"aria-labelledby": u ?? (Ie == null ? P : void 0),
|
|
2373
|
+
"aria-describedby": c,
|
|
2374
|
+
"aria-orientation": H,
|
|
2375
|
+
"aria-valuenow": Te,
|
|
2376
|
+
"aria-valuetext": typeof h == "function" ? h(ji(Te, te, M.current ?? void 0), Te, Y) : f ?? Xi(K, Y, M.current ?? void 0, te),
|
|
2377
|
+
disabled: ue,
|
|
2378
|
+
form: z,
|
|
2379
|
+
id: xe,
|
|
2380
|
+
max: I,
|
|
2381
|
+
min: R,
|
|
2382
|
+
name: B,
|
|
2383
|
+
onChange(e) {
|
|
2384
|
+
ee(e.currentTarget.valueAsNumber, Y, e);
|
|
2385
|
+
},
|
|
2386
|
+
onFocus(e) {
|
|
2387
|
+
let t = _e.current;
|
|
2388
|
+
_e.current = !1, oe(Y), J(!0), t && e.stopPropagation();
|
|
2389
|
+
},
|
|
2390
|
+
onBlur(e) {
|
|
2391
|
+
if (_e.current) {
|
|
2392
|
+
e.stopPropagation();
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2395
|
+
he.current && (oe(-1), pe(!0), J(!1), me === "onBlur" && j.commit(yi(Te, Y, R, I, q, K)));
|
|
2396
|
+
},
|
|
2397
|
+
onKeyDown(e) {
|
|
2398
|
+
if (e.defaultPrevented || !Yi.has(e.key)) return;
|
|
2399
|
+
ai.has(e.key) && e.stopPropagation();
|
|
2400
|
+
let t = null, n = Fi(Te, G, R);
|
|
2401
|
+
switch (e.key) {
|
|
2402
|
+
case qr:
|
|
2403
|
+
t = Zi(n, e.shiftKey ? F : G, 1, R, I);
|
|
2404
|
+
break;
|
|
2405
|
+
case Xr:
|
|
2406
|
+
t = Zi(n, e.shiftKey ? F : G, fe ? -1 : 1, R, I);
|
|
2407
|
+
break;
|
|
2408
|
+
case Jr:
|
|
2409
|
+
t = Zi(n, e.shiftKey ? F : G, -1, R, I);
|
|
2410
|
+
break;
|
|
2411
|
+
case Yr:
|
|
2412
|
+
t = Zi(n, e.shiftKey ? F : G, fe ? 1 : -1, R, I);
|
|
2413
|
+
break;
|
|
2414
|
+
case Qr:
|
|
2415
|
+
t = Zi(n, F, 1, R, I);
|
|
2416
|
+
break;
|
|
2417
|
+
case $r:
|
|
2418
|
+
t = Zi(n, F, -1, R, I);
|
|
2419
|
+
break;
|
|
2420
|
+
case "End":
|
|
2421
|
+
t = I, q && (t = Number.isFinite(K[Y + 1]) ? K[Y + 1] - G * ne : I);
|
|
2422
|
+
break;
|
|
2423
|
+
case Zr:
|
|
2424
|
+
t = R, q && (t = Number.isFinite(K[Y - 1]) ? K[Y - 1] + G * ne : R);
|
|
2425
|
+
break;
|
|
2426
|
+
default: break;
|
|
2427
|
+
}
|
|
2428
|
+
if (t !== null) {
|
|
2429
|
+
let n = e.currentTarget;
|
|
2430
|
+
An(n) || (_e.current = !0, n.blur(), n.focus({
|
|
2431
|
+
preventScroll: !0,
|
|
2432
|
+
focusVisible: !0
|
|
2433
|
+
})), ee(t, Y, e), e.preventDefault();
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
step: G,
|
|
2437
|
+
style: {
|
|
2438
|
+
...Ke,
|
|
2439
|
+
width: "100%",
|
|
2440
|
+
height: "100%",
|
|
2441
|
+
writingMode: Fe
|
|
2442
|
+
},
|
|
2443
|
+
tabIndex: S ?? void 0,
|
|
2444
|
+
type: "range",
|
|
2445
|
+
value: Te ?? ""
|
|
2446
|
+
}, (e) => j.getValidationProps(ue, e), { onKeyDown: x }), Re = be(ge, j.inputRef, v);
|
|
2447
|
+
return Z("div", e, {
|
|
2448
|
+
state: ce,
|
|
2449
|
+
ref: [
|
|
2450
|
+
t,
|
|
2451
|
+
Se,
|
|
2452
|
+
he
|
|
2453
|
+
],
|
|
2454
|
+
props: [{
|
|
2455
|
+
[Ji.index]: Y,
|
|
2456
|
+
children: /* @__PURE__ */ s(r.Fragment, { children: [
|
|
2457
|
+
i,
|
|
2458
|
+
/* @__PURE__ */ o("input", {
|
|
2459
|
+
ref: Re,
|
|
2460
|
+
...Le,
|
|
2461
|
+
suppressHydrationWarning: !0
|
|
2462
|
+
}),
|
|
2463
|
+
N && ke && W && we && /* @__PURE__ */ o("script", {
|
|
2464
|
+
nonce: T,
|
|
2465
|
+
dangerouslySetInnerHTML: { __html: "!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest(\"[data-base-ui-slider-control]\");if(!e)return;const r=e.querySelector(\"[data-base-ui-slider-indicator]\"),i=e.getBoundingClientRect(),n=\"vertical\"===e.getAttribute(\"data-orientation\")?\"height\":\"width\",o=e.querySelectorAll('input[type=\"range\"]'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute(\"value\")??\"\");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute(\"max\")??\"100\"),g=parseFloat(e.getAttribute(\"min\")??\"0\"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty(\"--position\",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty(\"visibility\"),r&&(0===t?(a=v,r.style.setProperty(\"--start-position\",`${v}%`),l||r.style.removeProperty(\"visibility\")):t===s&&(u=v-(a??0),r.style.setProperty(\"--end-position\",`${v}%`),r.style.setProperty(\"--relative-size\",`${u}%`),r.style.removeProperty(\"visibility\"))))}}();" },
|
|
2466
|
+
suppressHydrationWarning: !0
|
|
2467
|
+
})
|
|
2468
|
+
] }),
|
|
2469
|
+
id: E,
|
|
2470
|
+
onBlur: y,
|
|
2471
|
+
onFocus: b,
|
|
2472
|
+
onPointerDown(e) {
|
|
2473
|
+
if (!ue) {
|
|
2474
|
+
if (ae.current = Y, he.current != null) {
|
|
2475
|
+
let t = H === "horizontal" ? "x" : "y", n = Ni(he.current);
|
|
2476
|
+
ie.current = (H === "horizontal" ? e.clientX : e.clientY) - n[t];
|
|
2477
|
+
}
|
|
2478
|
+
ge.current != null && re.current !== ge.current && (re.current = ge.current);
|
|
2479
|
+
}
|
|
2480
|
+
},
|
|
2481
|
+
style: Pe,
|
|
2482
|
+
suppressHydrationWarning: W || void 0
|
|
2483
|
+
}, w],
|
|
2484
|
+
stateAttributesMapping: xi
|
|
2485
|
+
});
|
|
2486
|
+
});
|
|
2487
|
+
process.env.NODE_ENV !== "production" && (Qi.displayName = "SliderThumb");
|
|
2488
|
+
//#endregion
|
|
2489
|
+
//#region node_modules/@base-ui/react/slider/indicator/SliderIndicator.mjs
|
|
2490
|
+
function $i(e, t, n, r, i, a) {
|
|
2491
|
+
let o = n === void 0 || t && r === void 0 ? "hidden" : void 0, s = e ? "bottom" : "insetInlineStart", c = e ? "height" : "width", l = {
|
|
2492
|
+
visibility: i && a ? "hidden" : o,
|
|
2493
|
+
position: e ? "absolute" : "relative",
|
|
2494
|
+
[e ? "width" : "height"]: "inherit"
|
|
2495
|
+
};
|
|
2496
|
+
return l["--start-position"] = `${n ?? 0}%`, t ? (l["--relative-size"] = `${(r ?? 0) - (n ?? 0)}%`, l[s] = "var(--start-position)", l[c] = "var(--relative-size)", l) : (l[s] = 0, l[c] = "var(--start-position)", l);
|
|
2497
|
+
}
|
|
2498
|
+
function ea(e, t, n, r) {
|
|
2499
|
+
let i = e ? "bottom" : "insetInlineStart", a = e ? "height" : "width", o = {
|
|
2500
|
+
position: e ? "absolute" : "relative",
|
|
2501
|
+
[e ? "width" : "height"]: "inherit"
|
|
2502
|
+
};
|
|
2503
|
+
if (!t) return o[i] = 0, o[a] = `${n}%`, o;
|
|
2504
|
+
let s = r - n;
|
|
2505
|
+
return o[i] = `${n}%`, o[a] = `${s}%`, o;
|
|
2506
|
+
}
|
|
2507
|
+
var ta = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2508
|
+
let { render: n, className: r, style: i, ...a } = e, { indicatorPosition: o, inset: s, max: c, min: l, orientation: u, renderBeforeHydration: d, state: f, values: p } = Ci(), m = Ki(), h = u === "vertical", g = p.length > 1, _ = s ? $i(h, g, o[0], o[1], d, m) : ea(h, g, qi(p[0], l, c), qi(p[p.length - 1], l, c));
|
|
2509
|
+
return Z("div", e, {
|
|
2510
|
+
state: f,
|
|
2511
|
+
ref: t,
|
|
2512
|
+
props: [{
|
|
2513
|
+
"data-base-ui-slider-indicator": d ? "" : void 0,
|
|
2514
|
+
style: _,
|
|
2515
|
+
suppressHydrationWarning: d || void 0
|
|
2516
|
+
}, a],
|
|
2517
|
+
stateAttributesMapping: xi
|
|
2518
|
+
});
|
|
2519
|
+
});
|
|
2520
|
+
process.env.NODE_ENV !== "production" && (ta.displayName = "SliderIndicator");
|
|
2521
|
+
var na = {
|
|
2522
|
+
control: "imf-ui-slider-module-control",
|
|
2523
|
+
indicator: "imf-ui-slider-module-indicator",
|
|
2524
|
+
label: "imf-ui-slider-module-label",
|
|
2525
|
+
root: "imf-ui-slider-module-root",
|
|
2526
|
+
thumb: "imf-ui-slider-module-thumb",
|
|
2527
|
+
track: "imf-ui-slider-module-track",
|
|
2528
|
+
value: "imf-ui-slider-module-value"
|
|
2529
|
+
}, ra = /* @__PURE__ */ e({
|
|
2530
|
+
Control: () => ma,
|
|
2531
|
+
Indicator: () => ga,
|
|
2532
|
+
Label: () => fa,
|
|
2533
|
+
Root: () => da,
|
|
2534
|
+
Thumb: () => _a,
|
|
2535
|
+
Track: () => ha,
|
|
2536
|
+
Value: () => pa
|
|
2537
|
+
}), ia = n(na.root), aa = n(na.label), oa = n(na.value), sa = n(na.control), ca = n(na.track), la = n(na.indicator), ua = n(na.thumb);
|
|
2538
|
+
function da({ value: e, defaultValue: t, onValueChange: n, onValueCommitted: r, min: i = 0, max: a = 100, step: s = 1, largeStep: c = 10, minStepsBetweenValues: l = 0, disabled: u = !1, orientation: d = "horizontal", name: f, form: p, locale: m, thumbAlignment: h = "edge", thumbCollisionBehavior: g = "push", format: _, className: v, ...y }) {
|
|
2539
|
+
return /* @__PURE__ */ o(Ei, {
|
|
2540
|
+
...y,
|
|
2541
|
+
"data-imf-ui-component": "Slider.Root",
|
|
2542
|
+
"data-orientation": d,
|
|
2543
|
+
className: (e) => ia({ className: typeof v == "function" ? v(e) : v }),
|
|
2544
|
+
value: e,
|
|
2545
|
+
defaultValue: t,
|
|
2546
|
+
onValueChange: n,
|
|
2547
|
+
onValueCommitted: r,
|
|
2548
|
+
min: i,
|
|
2549
|
+
max: a,
|
|
2550
|
+
step: s,
|
|
2551
|
+
largeStep: c,
|
|
2552
|
+
minStepsBetweenValues: l,
|
|
2553
|
+
disabled: u,
|
|
2554
|
+
orientation: d,
|
|
2555
|
+
name: f,
|
|
2556
|
+
form: p,
|
|
2557
|
+
locale: m,
|
|
2558
|
+
thumbAlignment: h,
|
|
2559
|
+
thumbCollisionBehavior: g,
|
|
2560
|
+
format: _,
|
|
2561
|
+
children: y.children
|
|
2562
|
+
});
|
|
2563
|
+
}
|
|
2564
|
+
da.displayName = "Slider.Root";
|
|
2565
|
+
function fa({ className: e, ...t }) {
|
|
2566
|
+
return /* @__PURE__ */ o(Di, {
|
|
2567
|
+
...t,
|
|
2568
|
+
"data-imf-ui-component": "Slider.Label",
|
|
2569
|
+
className: (t) => aa({ className: typeof e == "function" ? e(t) : e }),
|
|
2570
|
+
children: t.children
|
|
2571
|
+
});
|
|
2572
|
+
}
|
|
2573
|
+
fa.displayName = "Slider.Label";
|
|
2574
|
+
function pa({ className: e, children: t, ...n }) {
|
|
2575
|
+
return /* @__PURE__ */ o(Mi, {
|
|
2576
|
+
...n,
|
|
2577
|
+
"data-imf-ui-component": "Slider.Value",
|
|
2578
|
+
className: (t) => oa({ className: typeof e == "function" ? e(t) : e }),
|
|
2579
|
+
children: t
|
|
2580
|
+
});
|
|
2581
|
+
}
|
|
2582
|
+
pa.displayName = "Slider.Value";
|
|
2583
|
+
function ma({ className: e, ...t }) {
|
|
2584
|
+
return /* @__PURE__ */ o(Vi, {
|
|
2585
|
+
...t,
|
|
2586
|
+
"data-imf-ui-component": "Slider.Control",
|
|
2587
|
+
className: (t) => sa({ className: typeof e == "function" ? e(t) : e }),
|
|
2588
|
+
children: t.children
|
|
2589
|
+
});
|
|
2590
|
+
}
|
|
2591
|
+
ma.displayName = "Slider.Control";
|
|
2592
|
+
function ha({ className: e, ...t }) {
|
|
2593
|
+
return /* @__PURE__ */ o(Hi, {
|
|
2594
|
+
...t,
|
|
2595
|
+
"data-imf-ui-component": "Slider.Track",
|
|
2596
|
+
className: (t) => ca({ className: typeof e == "function" ? e(t) : e }),
|
|
2597
|
+
children: t.children
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
ha.displayName = "Slider.Track";
|
|
2601
|
+
function ga({ className: e, ...t }) {
|
|
2602
|
+
return /* @__PURE__ */ o(ta, {
|
|
2603
|
+
...t,
|
|
2604
|
+
"data-imf-ui-component": "Slider.Indicator",
|
|
2605
|
+
className: (t) => la({ className: typeof e == "function" ? e(t) : e })
|
|
2606
|
+
});
|
|
2607
|
+
}
|
|
2608
|
+
ga.displayName = "Slider.Indicator";
|
|
2609
|
+
function _a({ index: e, className: t, ...n }) {
|
|
2610
|
+
return /* @__PURE__ */ o(Qi, {
|
|
2611
|
+
...n,
|
|
2612
|
+
"data-imf-ui-component": "Slider.Thumb",
|
|
2613
|
+
className: (e) => ua({ className: typeof t == "function" ? t(e) : t }),
|
|
2614
|
+
index: e
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
_a.displayName = "Slider.Thumb";
|
|
2618
|
+
//#endregion
|
|
2619
|
+
//#region node_modules/@base-ui/react/switch/root/SwitchRootContext.mjs
|
|
2620
|
+
var va = /* @__PURE__ */ r.createContext(void 0);
|
|
2621
|
+
process.env.NODE_ENV !== "production" && (va.displayName = "SwitchRootContext");
|
|
2622
|
+
function ya() {
|
|
2623
|
+
let e = r.useContext(va);
|
|
2624
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(63) : "Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.");
|
|
2625
|
+
return e;
|
|
2626
|
+
}
|
|
2627
|
+
//#endregion
|
|
2628
|
+
//#region node_modules/@base-ui/react/switch/root/SwitchRootDataAttributes.mjs
|
|
2629
|
+
var ba = /* @__PURE__ */ function(e) {
|
|
2630
|
+
return e.checked = "data-checked", e.unchecked = "data-unchecked", e.disabled = "data-disabled", e.readonly = "data-readonly", e.required = "data-required", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
2631
|
+
}({}), xa = {
|
|
2632
|
+
...$e,
|
|
2633
|
+
checked(e) {
|
|
2634
|
+
return e ? { [ba.checked]: "" } : { [ba.unchecked]: "" };
|
|
2635
|
+
}
|
|
2636
|
+
}, Sa = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2637
|
+
let { checked: n, className: i, defaultChecked: a, "aria-labelledby": c, form: l, id: u, inputRef: f, name: p, nativeButton: m = !1, onCheckedChange: h, readOnly: g = !1, required: _ = !1, disabled: v = !1, render: y, uncheckedValue: b, value: x, style: S, ...C } = e, { clearErrors: w } = ut(), { state: T, setTouched: E, setDirty: D, validityData: O, setFilled: k, setFocused: A, validationMode: j, disabled: M, name: ee, validation: N } = st(), { labelId: P } = ft(), F = M || v, te = ee ?? p, I = r.useRef(null), L = be(I, f, N.inputRef), R = r.useRef(null), ne = it(), z = tn({
|
|
2638
|
+
id: u,
|
|
2639
|
+
implicit: !1,
|
|
2640
|
+
controlRef: R
|
|
2641
|
+
}), B = m ? void 0 : z, [H, re] = Ue({
|
|
2642
|
+
controlled: n,
|
|
2643
|
+
default: !!a,
|
|
2644
|
+
name: "Switch",
|
|
2645
|
+
state: "checked"
|
|
2646
|
+
});
|
|
2647
|
+
ct(R, ne, H, void 0, !F, p), V(() => {
|
|
2648
|
+
I.current && k(I.current.checked);
|
|
2649
|
+
}, [I, k]), zt(H, () => {
|
|
2650
|
+
w(te), D(H !== O.initialValue), k(H), N.change(H);
|
|
2651
|
+
});
|
|
2652
|
+
let { getButtonProps: ie, buttonRef: ae } = _e({
|
|
2653
|
+
disabled: F,
|
|
2654
|
+
native: m
|
|
2655
|
+
}), W = pt(c, P, I, !m, B), oe = {
|
|
2656
|
+
id: m ? z : ne,
|
|
2657
|
+
role: "switch",
|
|
2658
|
+
"aria-checked": H,
|
|
2659
|
+
"aria-readonly": g || void 0,
|
|
2660
|
+
"aria-required": _ || void 0,
|
|
2661
|
+
"aria-labelledby": W,
|
|
2662
|
+
onFocus() {
|
|
2663
|
+
F || A(!0);
|
|
2664
|
+
},
|
|
2665
|
+
onBlur() {
|
|
2666
|
+
let e = I.current;
|
|
2667
|
+
!e || F || (E(!0), A(!1), j === "onBlur" && N.commit(e.checked));
|
|
2668
|
+
},
|
|
2669
|
+
onClick(e) {
|
|
2670
|
+
if (g || F) return;
|
|
2671
|
+
e.preventDefault();
|
|
2672
|
+
let t = I.current;
|
|
2673
|
+
t && t.dispatchEvent(new (d(t)).PointerEvent("click", {
|
|
2674
|
+
bubbles: !0,
|
|
2675
|
+
shiftKey: e.shiftKey,
|
|
2676
|
+
ctrlKey: e.ctrlKey,
|
|
2677
|
+
altKey: e.altKey,
|
|
2678
|
+
metaKey: e.metaKey
|
|
2679
|
+
}));
|
|
2680
|
+
}
|
|
2681
|
+
}, se = U({
|
|
2682
|
+
checked: H,
|
|
2683
|
+
disabled: F,
|
|
2684
|
+
form: l,
|
|
2685
|
+
id: B,
|
|
2686
|
+
name: te,
|
|
2687
|
+
required: _,
|
|
2688
|
+
style: te ? qe : Ke,
|
|
2689
|
+
tabIndex: -1,
|
|
2690
|
+
type: "checkbox",
|
|
2691
|
+
"aria-hidden": !0,
|
|
2692
|
+
ref: L,
|
|
2693
|
+
onChange(e) {
|
|
2694
|
+
if (e.nativeEvent.defaultPrevented) return;
|
|
2695
|
+
if (g) {
|
|
2696
|
+
e.preventDefault();
|
|
2697
|
+
return;
|
|
2698
|
+
}
|
|
2699
|
+
let t = e.currentTarget.checked, n = Lt(gt, e.nativeEvent);
|
|
2700
|
+
h?.(t, n), !n.isCanceled && re(t);
|
|
2701
|
+
},
|
|
2702
|
+
onFocus() {
|
|
2703
|
+
R.current?.focus();
|
|
2704
|
+
}
|
|
2705
|
+
}, (e) => N.getValidationProps(F, e), x === void 0 ? je : { value: x }), ce = r.useMemo(() => ({
|
|
2706
|
+
...T,
|
|
2707
|
+
checked: H,
|
|
2708
|
+
disabled: F,
|
|
2709
|
+
readOnly: g,
|
|
2710
|
+
required: _
|
|
2711
|
+
}), [
|
|
2712
|
+
T,
|
|
2713
|
+
H,
|
|
2714
|
+
F,
|
|
2715
|
+
g,
|
|
2716
|
+
_
|
|
2717
|
+
]), G = Z("span", e, {
|
|
2718
|
+
state: ce,
|
|
2719
|
+
ref: [
|
|
2720
|
+
t,
|
|
2721
|
+
R,
|
|
2722
|
+
ae
|
|
2723
|
+
],
|
|
2724
|
+
props: [
|
|
2725
|
+
oe,
|
|
2726
|
+
C,
|
|
2727
|
+
ie,
|
|
2728
|
+
(e) => N.getValidationProps(F, e)
|
|
2729
|
+
],
|
|
2730
|
+
stateAttributesMapping: xa
|
|
2731
|
+
});
|
|
2732
|
+
return /* @__PURE__ */ s(va.Provider, {
|
|
2733
|
+
value: ce,
|
|
2734
|
+
children: [
|
|
2735
|
+
G,
|
|
2736
|
+
!H && te && b !== void 0 && /* @__PURE__ */ o("input", {
|
|
2737
|
+
type: "hidden",
|
|
2738
|
+
form: l,
|
|
2739
|
+
name: te,
|
|
2740
|
+
value: b,
|
|
2741
|
+
disabled: F
|
|
2742
|
+
}),
|
|
2743
|
+
/* @__PURE__ */ o("input", {
|
|
2744
|
+
...se,
|
|
2745
|
+
suppressHydrationWarning: !0
|
|
2746
|
+
})
|
|
2747
|
+
]
|
|
2748
|
+
});
|
|
2749
|
+
});
|
|
2750
|
+
process.env.NODE_ENV !== "production" && (Sa.displayName = "SwitchRoot");
|
|
2751
|
+
//#endregion
|
|
2752
|
+
//#region node_modules/@base-ui/react/switch/thumb/SwitchThumb.mjs
|
|
2753
|
+
var Ca = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2754
|
+
let { render: n, className: r, style: i, ...a } = e;
|
|
2755
|
+
return Z("span", e, {
|
|
2756
|
+
state: ya(),
|
|
2757
|
+
ref: t,
|
|
2758
|
+
stateAttributesMapping: xa,
|
|
2759
|
+
props: a
|
|
2760
|
+
});
|
|
2761
|
+
});
|
|
2762
|
+
process.env.NODE_ENV !== "production" && (Ca.displayName = "SwitchThumb");
|
|
2763
|
+
var wa = {
|
|
2764
|
+
root: "imf-ui-switch-module-root",
|
|
2765
|
+
thumb: "imf-ui-switch-module-thumb"
|
|
2766
|
+
}, Ta = /* @__PURE__ */ e({
|
|
2767
|
+
Root: () => Oa,
|
|
2768
|
+
Thumb: () => ka
|
|
2769
|
+
}), Ea = n(wa.root), Da = n(wa.thumb);
|
|
2770
|
+
function Oa({ className: e, ...t }) {
|
|
2771
|
+
return /* @__PURE__ */ o(Sa, {
|
|
2772
|
+
...t,
|
|
2773
|
+
"data-imf-ui-component": "Switch.Root",
|
|
2774
|
+
className: (t) => Ea({ className: typeof e == "function" ? e(t) : e }),
|
|
2775
|
+
children: t.children
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
Oa.displayName = "Switch.Root";
|
|
2779
|
+
function ka({ className: e, ...t }) {
|
|
2780
|
+
return /* @__PURE__ */ o(Ca, {
|
|
2781
|
+
...t,
|
|
2782
|
+
"data-imf-ui-component": "Switch.Thumb",
|
|
2783
|
+
className: (t) => Da({ className: typeof e == "function" ? e(t) : e })
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2786
|
+
ka.displayName = "Switch.Thumb";
|
|
2787
|
+
//#endregion
|
|
2788
|
+
//#region node_modules/@base-ui/react/toggle-group/ToggleGroupContext.mjs
|
|
2789
|
+
var Aa = /* @__PURE__ */ r.createContext(void 0);
|
|
2790
|
+
process.env.NODE_ENV !== "production" && (Aa.displayName = "ToggleGroupContext");
|
|
2791
|
+
function ja(e = !0) {
|
|
2792
|
+
let t = r.useContext(Aa);
|
|
2793
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(7) : "Base UI: ToggleGroupContext is missing. ToggleGroup parts must be placed within <ToggleGroup>.");
|
|
2794
|
+
return t;
|
|
2795
|
+
}
|
|
2796
|
+
//#endregion
|
|
2797
|
+
//#region node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
|
|
2798
|
+
function Ma(e = {}) {
|
|
2799
|
+
let { highlightItemOnHover: t, highlightedIndex: n, onHighlightedIndexChange: i } = he(), { ref: a, index: o } = gi(e), s = n === o, c = r.useRef(null), l = be(a, c);
|
|
2800
|
+
return {
|
|
2801
|
+
compositeProps: {
|
|
2802
|
+
tabIndex: s ? 0 : -1,
|
|
2803
|
+
onFocus() {
|
|
2804
|
+
i(o);
|
|
2805
|
+
},
|
|
2806
|
+
onMouseMove() {
|
|
2807
|
+
let e = c.current;
|
|
2808
|
+
if (!t || !e) return;
|
|
2809
|
+
let n = e.hasAttribute("disabled") || e.ariaDisabled === "true";
|
|
2810
|
+
!s && !n && e.focus();
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
compositeRef: l,
|
|
2814
|
+
index: o
|
|
2815
|
+
};
|
|
2816
|
+
}
|
|
2817
|
+
//#endregion
|
|
2818
|
+
//#region node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs
|
|
2819
|
+
function Na(e) {
|
|
2820
|
+
let { render: t, className: n, style: r, state: i = je, props: a = Ae, refs: o = Ae, metadata: s, stateAttributesMapping: c, tag: l = "div", ...u } = e, { compositeProps: d, compositeRef: f } = Ma({ metadata: s });
|
|
2821
|
+
return Z(l, e, {
|
|
2822
|
+
state: i,
|
|
2823
|
+
ref: [...o, f],
|
|
2824
|
+
props: [
|
|
2825
|
+
d,
|
|
2826
|
+
...a,
|
|
2827
|
+
u
|
|
2828
|
+
],
|
|
2829
|
+
stateAttributesMapping: c
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
//#endregion
|
|
2833
|
+
//#region node_modules/@base-ui/react/toggle/Toggle.mjs
|
|
2834
|
+
var Pa = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
2835
|
+
let { className: n, defaultPressed: i = !1, disabled: a = !1, form: s, onPressedChange: c, pressed: l, render: u, type: d, value: f, nativeButton: p = !0, style: m, ...h } = e, g = it(f || void 0), _ = ja(), v = _?.value ?? [], y = _ ? void 0 : i, b = (a || _?.disabled) ?? !1;
|
|
2836
|
+
process.env.NODE_ENV !== "production" && V(() => {
|
|
2837
|
+
_ && f === void 0 && _.isValueInitialized && B("A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.", "This will cause issues between the Toggle Group and Toggle values.", "Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.");
|
|
2838
|
+
}, [
|
|
2839
|
+
_,
|
|
2840
|
+
f,
|
|
2841
|
+
_?.isValueInitialized
|
|
2842
|
+
]);
|
|
2843
|
+
let [x, S] = Ue({
|
|
2844
|
+
controlled: _ ? g !== void 0 && v.indexOf(g) > -1 : l,
|
|
2845
|
+
default: y,
|
|
2846
|
+
name: "Toggle",
|
|
2847
|
+
state: "pressed"
|
|
2848
|
+
}), { getButtonProps: C, buttonRef: w } = _e({
|
|
2849
|
+
disabled: b,
|
|
2850
|
+
native: p
|
|
2851
|
+
}), T = {
|
|
2852
|
+
disabled: b,
|
|
2853
|
+
pressed: x
|
|
2854
|
+
}, E = [w, t], D = [
|
|
2855
|
+
{
|
|
2856
|
+
"aria-pressed": x,
|
|
2857
|
+
onClick(e) {
|
|
2858
|
+
let t = !x, n = Lt(gt, e.nativeEvent);
|
|
2859
|
+
c?.(t, n), !n.isCanceled && (g && _?.setGroupValue?.(g, t, n), !n.isCanceled && S(t));
|
|
2860
|
+
}
|
|
2861
|
+
},
|
|
2862
|
+
h,
|
|
2863
|
+
C
|
|
2864
|
+
], O = Z("button", e, {
|
|
2865
|
+
enabled: !_,
|
|
2866
|
+
state: T,
|
|
2867
|
+
ref: E,
|
|
2868
|
+
props: D
|
|
2869
|
+
}), k = r.useMemo(() => ({
|
|
2870
|
+
disabled: b,
|
|
2871
|
+
focusableWhenDisabled: !1
|
|
2872
|
+
}), [b]);
|
|
2873
|
+
return _ ? /* @__PURE__ */ o(Na, {
|
|
2874
|
+
tag: "button",
|
|
2875
|
+
render: u,
|
|
2876
|
+
className: n,
|
|
2877
|
+
style: m,
|
|
2878
|
+
metadata: k,
|
|
2879
|
+
state: T,
|
|
2880
|
+
refs: E,
|
|
2881
|
+
props: D
|
|
2882
|
+
}) : O;
|
|
2883
|
+
});
|
|
2884
|
+
process.env.NODE_ENV !== "production" && (Pa.displayName = "Toggle");
|
|
2885
|
+
//#endregion
|
|
2886
|
+
//#region src/components/toggle/toggle.tsx
|
|
2887
|
+
var Fa = n({ root: "imf-ui-toggle-module-root" }.root), Ia = 2;
|
|
2888
|
+
function La(e) {
|
|
2889
|
+
let t = 0;
|
|
2890
|
+
return i.forEach(e, (e) => {
|
|
2891
|
+
typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += Ia);
|
|
2892
|
+
}), t;
|
|
2893
|
+
}
|
|
2894
|
+
function Ra({ className: e, style: t, children: n, ...r }) {
|
|
2895
|
+
let i = {
|
|
2896
|
+
"--glyph-count": La(n),
|
|
2897
|
+
"--max-glyphs": Ia
|
|
2898
|
+
};
|
|
2899
|
+
return /* @__PURE__ */ o(Pa, {
|
|
2900
|
+
...r,
|
|
2901
|
+
"data-imf-ui-component": "Toggle",
|
|
2902
|
+
style: (e) => ({
|
|
2903
|
+
...i,
|
|
2904
|
+
...typeof t == "function" ? t(e) : t
|
|
2905
|
+
}),
|
|
2906
|
+
className: (t) => Fa({ className: typeof e == "function" ? e(t) : e }),
|
|
2907
|
+
children: n
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2910
|
+
//#endregion
|
|
2911
|
+
//#region node_modules/@base-ui/react/internals/composite/constants.mjs
|
|
2912
|
+
var za = "data-composite-item-active", Ba = [];
|
|
2913
|
+
function Va(e) {
|
|
2914
|
+
let { loopFocus: t = !0, orientation: n = "both", grid: i, onLoop: a, direction: o, highlightedIndex: s, onHighlightedIndexChange: c, rootRef: l, enableHomeAndEndKeys: u = !1, stopEventPropagation: d = !1, disabledIndices: f, modifierKeys: p = Ba } = e, [m, h] = r.useState(0), g = i != null, _ = r.useRef(null), v = be(_, l), y = r.useRef([]), b = r.useRef(!1), x = s ?? m, S = L((e, t = !1) => {
|
|
2915
|
+
if ((c ?? h)(e), t) {
|
|
2916
|
+
let t = y.current[e];
|
|
2917
|
+
li(_.current, t, o, n);
|
|
2918
|
+
}
|
|
2919
|
+
}), C = L((e) => {
|
|
2920
|
+
if (e.size === 0 || b.current) return;
|
|
2921
|
+
b.current = !0;
|
|
2922
|
+
let t = Array.from(e.keys()), r = t.find((e) => e?.hasAttribute("data-composite-item-active")) ?? null, i = r ? t.indexOf(r) : -1;
|
|
2923
|
+
if (i !== -1) S(i);
|
|
2924
|
+
else if (gr(t, x, f)) {
|
|
2925
|
+
let e = hr(t, { disabledIndices: f });
|
|
2926
|
+
fr(t, e) || S(e);
|
|
2927
|
+
}
|
|
2928
|
+
li(_.current, r, o, n);
|
|
2929
|
+
});
|
|
2930
|
+
V(() => {
|
|
2931
|
+
if (f == null || s != null || !b.current) return;
|
|
2932
|
+
let e = y.current;
|
|
2933
|
+
if (gr(e, x, f)) {
|
|
2934
|
+
let t = hr(e, { disabledIndices: f });
|
|
2935
|
+
fr(e, t) || S(t);
|
|
2936
|
+
}
|
|
2937
|
+
}, [
|
|
2938
|
+
f,
|
|
2939
|
+
s,
|
|
2940
|
+
x,
|
|
2941
|
+
y,
|
|
2942
|
+
S
|
|
2943
|
+
]);
|
|
2944
|
+
let w = L((e, t, n) => a ? a(e, t, n, y) : n), T = L((e) => {
|
|
2945
|
+
let r = u ? ai : ii;
|
|
2946
|
+
if (!r.has(e.key) || Ha(e, p) || !_.current) return;
|
|
2947
|
+
let s = o === "rtl", c = s ? Yr : Xr, l = {
|
|
2948
|
+
horizontal: c,
|
|
2949
|
+
vertical: Jr,
|
|
2950
|
+
both: c
|
|
2951
|
+
}[n], m = s ? Xr : Yr, h = {
|
|
2952
|
+
horizontal: m,
|
|
2953
|
+
vertical: qr,
|
|
2954
|
+
both: m
|
|
2955
|
+
}[n], v = Cn(e.nativeEvent);
|
|
2956
|
+
if (v != null && ci(v) && !Sr(v)) {
|
|
2957
|
+
let t = v.selectionStart, n = v.selectionEnd, r = v.value ?? "";
|
|
2958
|
+
if (t == null || e.shiftKey || t !== n || e.key !== h && t < r.length || e.key !== l && t > 0) return;
|
|
2959
|
+
}
|
|
2960
|
+
let b = x, C = pr(y, f), T = mr(y, f);
|
|
2961
|
+
i != null && (b = i({
|
|
2962
|
+
disabledIndices: f,
|
|
2963
|
+
elementsRef: y,
|
|
2964
|
+
event: e,
|
|
2965
|
+
highlightedIndex: x,
|
|
2966
|
+
loopFocus: t,
|
|
2967
|
+
maxIndex: T,
|
|
2968
|
+
minIndex: C,
|
|
2969
|
+
onLoop: w,
|
|
2970
|
+
orientation: n,
|
|
2971
|
+
rtl: s
|
|
2972
|
+
}));
|
|
2973
|
+
let E = {
|
|
2974
|
+
horizontal: [c],
|
|
2975
|
+
vertical: [Jr],
|
|
2976
|
+
both: [c, Jr]
|
|
2977
|
+
}[n], D = {
|
|
2978
|
+
horizontal: [m],
|
|
2979
|
+
vertical: [qr],
|
|
2980
|
+
both: [m, qr]
|
|
2981
|
+
}[n], O = g ? r : {
|
|
2982
|
+
horizontal: u ? ti : ei,
|
|
2983
|
+
vertical: u ? ri : ni,
|
|
2984
|
+
both: r
|
|
2985
|
+
}[n];
|
|
2986
|
+
u && (e.key === "Home" ? b = C : e.key === "End" && (b = T)), b === x && (E.includes(e.key) || D.includes(e.key)) && (t && b === T && E.includes(e.key) ? (b = C, a && (b = a(e, x, b, y))) : t && b === C && D.includes(e.key) ? (b = T, a && (b = a(e, x, b, y))) : b = hr(y.current, {
|
|
2987
|
+
startingIndex: b,
|
|
2988
|
+
decrement: D.includes(e.key),
|
|
2989
|
+
disabledIndices: f
|
|
2990
|
+
})), b !== x && !fr(y.current, b) && (d && e.stopPropagation(), O.has(e.key) && e.preventDefault(), S(b, !0), queueMicrotask(() => {
|
|
2991
|
+
y.current[b]?.focus();
|
|
2992
|
+
}));
|
|
2993
|
+
});
|
|
2994
|
+
return {
|
|
2995
|
+
props: {
|
|
2996
|
+
ref: v,
|
|
2997
|
+
onFocus(e) {
|
|
2998
|
+
let t = _.current, n = Cn(e.nativeEvent);
|
|
2999
|
+
!t || n == null || !ci(n) || n.setSelectionRange(0, n.value.length ?? 0);
|
|
3000
|
+
},
|
|
3001
|
+
onKeyDown: T
|
|
3002
|
+
},
|
|
3003
|
+
highlightedIndex: x,
|
|
3004
|
+
onHighlightedIndexChange: S,
|
|
3005
|
+
elementsRef: y,
|
|
3006
|
+
disabledIndices: f,
|
|
3007
|
+
onMapChange: C,
|
|
3008
|
+
relayKeyboardEvent: T
|
|
3009
|
+
};
|
|
3010
|
+
}
|
|
3011
|
+
function Ha(e, t) {
|
|
3012
|
+
for (let n of oi.values()) if (!t.includes(n) && e.getModifierState(n)) return !0;
|
|
3013
|
+
return !1;
|
|
3014
|
+
}
|
|
3015
|
+
//#endregion
|
|
3016
|
+
//#region node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
|
|
3017
|
+
function Ua(e) {
|
|
3018
|
+
let { render: t, className: n, style: i, refs: a = Ae, props: s = Ae, state: c = je, stateAttributesMapping: l, highlightedIndex: u, onHighlightedIndexChange: d, orientation: f, grid: p, loopFocus: m, onLoop: h, enableHomeAndEndKeys: g, onMapChange: _, stopEventPropagation: v = !0, rootRef: y, disabledIndices: b, modifierKeys: x, highlightItemOnHover: S = !1, tag: C = "div", ...w } = e, { props: T, highlightedIndex: E, onHighlightedIndexChange: D, elementsRef: O, onMapChange: k, relayKeyboardEvent: A } = Va({
|
|
3019
|
+
grid: p,
|
|
3020
|
+
loopFocus: m,
|
|
3021
|
+
onLoop: h,
|
|
3022
|
+
orientation: f,
|
|
3023
|
+
highlightedIndex: u,
|
|
3024
|
+
onHighlightedIndexChange: d,
|
|
3025
|
+
rootRef: y,
|
|
3026
|
+
stopEventPropagation: v,
|
|
3027
|
+
enableHomeAndEndKeys: g,
|
|
3028
|
+
direction: Wr(),
|
|
3029
|
+
disabledIndices: b,
|
|
3030
|
+
modifierKeys: x
|
|
3031
|
+
}), j = Z(C, e, {
|
|
3032
|
+
state: c,
|
|
3033
|
+
ref: a,
|
|
3034
|
+
props: [
|
|
3035
|
+
T,
|
|
3036
|
+
...s,
|
|
3037
|
+
w
|
|
3038
|
+
],
|
|
3039
|
+
stateAttributesMapping: l
|
|
3040
|
+
}), M = r.useMemo(() => ({
|
|
3041
|
+
highlightedIndex: E,
|
|
3042
|
+
onHighlightedIndexChange: D,
|
|
3043
|
+
highlightItemOnHover: S,
|
|
3044
|
+
relayKeyboardEvent: A
|
|
3045
|
+
}), [
|
|
3046
|
+
E,
|
|
3047
|
+
D,
|
|
3048
|
+
S,
|
|
3049
|
+
A
|
|
3050
|
+
]);
|
|
3051
|
+
return /* @__PURE__ */ o(me.Provider, {
|
|
3052
|
+
value: M,
|
|
3053
|
+
children: /* @__PURE__ */ o(zr, {
|
|
3054
|
+
elementsRef: O,
|
|
3055
|
+
onMapChange: (e) => {
|
|
3056
|
+
_?.(e), k(e);
|
|
3057
|
+
},
|
|
3058
|
+
children: j
|
|
3059
|
+
})
|
|
3060
|
+
});
|
|
3061
|
+
}
|
|
3062
|
+
//#endregion
|
|
3063
|
+
//#region node_modules/@base-ui/react/toolbar/group/ToolbarGroupContext.mjs
|
|
3064
|
+
var Wa = /* @__PURE__ */ r.createContext(void 0);
|
|
3065
|
+
process.env.NODE_ENV !== "production" && (Wa.displayName = "ToolbarGroupContext");
|
|
3066
|
+
function Ga(e) {
|
|
3067
|
+
let t = r.useContext(Wa);
|
|
3068
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(68) : "Base UI: ToolbarGroupContext is missing. ToolbarGroup parts must be placed within <Toolbar.Group>.");
|
|
3069
|
+
return t;
|
|
3070
|
+
}
|
|
3071
|
+
//#endregion
|
|
3072
|
+
//#region node_modules/@base-ui/react/toggle-group/ToggleGroupDataAttributes.mjs
|
|
3073
|
+
var Ka = /* @__PURE__ */ function(e) {
|
|
3074
|
+
return e.disabled = "data-disabled", e.orientation = "data-orientation", e.multiple = "data-multiple", e;
|
|
3075
|
+
}({}), qa = { multiple(e) {
|
|
3076
|
+
return e ? { [Ka.multiple]: "" } : null;
|
|
3077
|
+
} }, Ja = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3078
|
+
let { defaultValue: n, disabled: i = !1, loopFocus: a = !0, onValueChange: s, orientation: c = "horizontal", multiple: l = !1, value: u, className: d, render: f, style: p, ...m } = e, h = Kr(!0), g = Ga(!0), _ = r.useMemo(() => u !== void 0 || n !== void 0, [u, n]), v = (h?.disabled ?? !1) || (g?.disabled ?? !1) || i, [y, b] = Ue({
|
|
3079
|
+
controlled: u,
|
|
3080
|
+
default: u === void 0 ? n ?? Ae : void 0,
|
|
3081
|
+
name: "ToggleGroup",
|
|
3082
|
+
state: "value"
|
|
3083
|
+
}), x = L((e, t, n) => {
|
|
3084
|
+
let r;
|
|
3085
|
+
l ? (r = y.slice(), t ? r.push(e) : r.splice(y.indexOf(e), 1)) : r = t ? [e] : [], s?.(r, n), !n.isCanceled && b(r);
|
|
3086
|
+
}), S = {
|
|
3087
|
+
disabled: v,
|
|
3088
|
+
multiple: l,
|
|
3089
|
+
orientation: c
|
|
3090
|
+
}, C = r.useMemo(() => ({
|
|
3091
|
+
disabled: v,
|
|
3092
|
+
orientation: c,
|
|
3093
|
+
setGroupValue: x,
|
|
3094
|
+
value: y,
|
|
3095
|
+
isValueInitialized: _
|
|
3096
|
+
}), [
|
|
3097
|
+
v,
|
|
3098
|
+
c,
|
|
3099
|
+
x,
|
|
3100
|
+
y,
|
|
3101
|
+
_
|
|
3102
|
+
]), w = { role: "group" }, T = Z("div", e, {
|
|
3103
|
+
enabled: !!h,
|
|
3104
|
+
state: S,
|
|
3105
|
+
ref: t,
|
|
3106
|
+
props: [w, m],
|
|
3107
|
+
stateAttributesMapping: qa
|
|
3108
|
+
});
|
|
3109
|
+
return /* @__PURE__ */ o(Aa.Provider, {
|
|
3110
|
+
value: C,
|
|
3111
|
+
children: h ? T : /* @__PURE__ */ o(Ua, {
|
|
3112
|
+
render: f,
|
|
3113
|
+
className: d,
|
|
3114
|
+
style: p,
|
|
3115
|
+
state: S,
|
|
3116
|
+
refs: [t],
|
|
3117
|
+
props: [w, m],
|
|
3118
|
+
stateAttributesMapping: qa,
|
|
3119
|
+
loopFocus: a,
|
|
3120
|
+
enableHomeAndEndKeys: !0,
|
|
3121
|
+
orientation: c
|
|
3122
|
+
})
|
|
3123
|
+
});
|
|
3124
|
+
});
|
|
3125
|
+
process.env.NODE_ENV !== "production" && (Ja.displayName = "ToggleGroup");
|
|
3126
|
+
//#endregion
|
|
3127
|
+
//#region src/components/toggle-group/toggle-group.tsx
|
|
3128
|
+
var Ya = n({ root: "imf-ui-toggle-group-module-root" }.root);
|
|
3129
|
+
function Xa({ className: e, ...t }) {
|
|
3130
|
+
return /* @__PURE__ */ o(Ja, {
|
|
3131
|
+
...t,
|
|
3132
|
+
"data-imf-ui-component": "ToggleGroup",
|
|
3133
|
+
className: (t) => Ya({ className: typeof e == "function" ? e(t) : e })
|
|
3134
|
+
});
|
|
3135
|
+
}
|
|
3136
|
+
//#endregion
|
|
3137
|
+
//#region node_modules/@base-ui/react/utils/getCssDimensions.mjs
|
|
3138
|
+
function Za(e) {
|
|
3139
|
+
let t = O(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = h(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r;
|
|
3140
|
+
return (Vn(n) !== a || Vn(r) !== o) && (n = a, r = o), {
|
|
3141
|
+
width: n,
|
|
3142
|
+
height: r
|
|
3143
|
+
};
|
|
3144
|
+
}
|
|
3145
|
+
var Q = {
|
|
3146
|
+
alignCenter: "imf-ui-row-module-alignCenter",
|
|
3147
|
+
alignEnd: "imf-ui-row-module-alignEnd",
|
|
3148
|
+
alignStart: "imf-ui-row-module-alignStart",
|
|
3149
|
+
alignStretch: "imf-ui-row-module-alignStretch",
|
|
3150
|
+
gap1: "imf-ui-row-module-gap1",
|
|
3151
|
+
gap10: "imf-ui-row-module-gap10",
|
|
3152
|
+
gap2: "imf-ui-row-module-gap2",
|
|
3153
|
+
gap3: "imf-ui-row-module-gap3",
|
|
3154
|
+
gap4: "imf-ui-row-module-gap4",
|
|
3155
|
+
gap5: "imf-ui-row-module-gap5",
|
|
3156
|
+
gap6: "imf-ui-row-module-gap6",
|
|
3157
|
+
gap7: "imf-ui-row-module-gap7",
|
|
3158
|
+
gap8: "imf-ui-row-module-gap8",
|
|
3159
|
+
gap9: "imf-ui-row-module-gap9",
|
|
3160
|
+
justifyAround: "imf-ui-row-module-justifyAround",
|
|
3161
|
+
justifyBetween: "imf-ui-row-module-justifyBetween",
|
|
3162
|
+
justifyCenter: "imf-ui-row-module-justifyCenter",
|
|
3163
|
+
justifyEnd: "imf-ui-row-module-justifyEnd",
|
|
3164
|
+
justifyEvenly: "imf-ui-row-module-justifyEvenly",
|
|
3165
|
+
justifyStart: "imf-ui-row-module-justifyStart",
|
|
3166
|
+
root: "imf-ui-row-module-root",
|
|
3167
|
+
wrap: "imf-ui-row-module-wrap"
|
|
3168
|
+
}, Qa = n(Q.root, { variants: {
|
|
3169
|
+
gap: {
|
|
3170
|
+
1: Q.gap1,
|
|
3171
|
+
2: Q.gap2,
|
|
3172
|
+
3: Q.gap3,
|
|
3173
|
+
4: Q.gap4,
|
|
3174
|
+
5: Q.gap5,
|
|
3175
|
+
6: Q.gap6,
|
|
3176
|
+
7: Q.gap7,
|
|
3177
|
+
8: Q.gap8,
|
|
3178
|
+
9: Q.gap9,
|
|
3179
|
+
10: Q.gap10
|
|
3180
|
+
},
|
|
3181
|
+
align: {
|
|
3182
|
+
start: Q.alignStart,
|
|
3183
|
+
center: Q.alignCenter,
|
|
3184
|
+
end: Q.alignEnd,
|
|
3185
|
+
stretch: Q.alignStretch
|
|
3186
|
+
},
|
|
3187
|
+
justify: {
|
|
3188
|
+
start: Q.justifyStart,
|
|
3189
|
+
center: Q.justifyCenter,
|
|
3190
|
+
end: Q.justifyEnd,
|
|
3191
|
+
between: Q.justifyBetween,
|
|
3192
|
+
around: Q.justifyAround,
|
|
3193
|
+
evenly: Q.justifyEvenly
|
|
3194
|
+
},
|
|
3195
|
+
wrap: {
|
|
3196
|
+
true: Q.wrap,
|
|
3197
|
+
false: null
|
|
3198
|
+
}
|
|
3199
|
+
} });
|
|
3200
|
+
function $a({ gap: e = "2", align: t = "stretch", justify: n = "start", wrap: r = !1, className: i, ...a }) {
|
|
3201
|
+
return /* @__PURE__ */ o("div", {
|
|
3202
|
+
...a,
|
|
3203
|
+
"data-imf-ui-component": "Row",
|
|
3204
|
+
className: Qa({
|
|
3205
|
+
gap: e,
|
|
3206
|
+
align: t,
|
|
3207
|
+
justify: n,
|
|
3208
|
+
wrap: r,
|
|
3209
|
+
className: i
|
|
3210
|
+
}),
|
|
3211
|
+
children: a.children
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
var $ = {
|
|
3215
|
+
alignCenter: "imf-ui-stack-module-alignCenter",
|
|
3216
|
+
alignEnd: "imf-ui-stack-module-alignEnd",
|
|
3217
|
+
alignStart: "imf-ui-stack-module-alignStart",
|
|
3218
|
+
alignStretch: "imf-ui-stack-module-alignStretch",
|
|
3219
|
+
gap1: "imf-ui-stack-module-gap1",
|
|
3220
|
+
gap10: "imf-ui-stack-module-gap10",
|
|
3221
|
+
gap2: "imf-ui-stack-module-gap2",
|
|
3222
|
+
gap3: "imf-ui-stack-module-gap3",
|
|
3223
|
+
gap4: "imf-ui-stack-module-gap4",
|
|
3224
|
+
gap5: "imf-ui-stack-module-gap5",
|
|
3225
|
+
gap6: "imf-ui-stack-module-gap6",
|
|
3226
|
+
gap7: "imf-ui-stack-module-gap7",
|
|
3227
|
+
gap8: "imf-ui-stack-module-gap8",
|
|
3228
|
+
gap9: "imf-ui-stack-module-gap9",
|
|
3229
|
+
justifyAround: "imf-ui-stack-module-justifyAround",
|
|
3230
|
+
justifyBetween: "imf-ui-stack-module-justifyBetween",
|
|
3231
|
+
justifyCenter: "imf-ui-stack-module-justifyCenter",
|
|
3232
|
+
justifyEnd: "imf-ui-stack-module-justifyEnd",
|
|
3233
|
+
justifyEvenly: "imf-ui-stack-module-justifyEvenly",
|
|
3234
|
+
justifyStart: "imf-ui-stack-module-justifyStart",
|
|
3235
|
+
root: "imf-ui-stack-module-root"
|
|
3236
|
+
}, eo = n($.root, { variants: {
|
|
3237
|
+
gap: {
|
|
3238
|
+
1: $.gap1,
|
|
3239
|
+
2: $.gap2,
|
|
3240
|
+
3: $.gap3,
|
|
3241
|
+
4: $.gap4,
|
|
3242
|
+
5: $.gap5,
|
|
3243
|
+
6: $.gap6,
|
|
3244
|
+
7: $.gap7,
|
|
3245
|
+
8: $.gap8,
|
|
3246
|
+
9: $.gap9,
|
|
3247
|
+
10: $.gap10
|
|
3248
|
+
},
|
|
3249
|
+
align: {
|
|
3250
|
+
start: $.alignStart,
|
|
3251
|
+
center: $.alignCenter,
|
|
3252
|
+
end: $.alignEnd,
|
|
3253
|
+
stretch: $.alignStretch
|
|
3254
|
+
},
|
|
3255
|
+
justify: {
|
|
3256
|
+
start: $.justifyStart,
|
|
3257
|
+
center: $.justifyCenter,
|
|
3258
|
+
end: $.justifyEnd,
|
|
3259
|
+
between: $.justifyBetween,
|
|
3260
|
+
around: $.justifyAround,
|
|
3261
|
+
evenly: $.justifyEvenly
|
|
3262
|
+
}
|
|
3263
|
+
} });
|
|
3264
|
+
function to({ gap: e = "4", align: t = "stretch", justify: n = "start", className: r, ...i }) {
|
|
3265
|
+
return /* @__PURE__ */ o("div", {
|
|
3266
|
+
...i,
|
|
3267
|
+
"data-imf-ui-component": "Stack",
|
|
3268
|
+
className: eo({
|
|
3269
|
+
gap: e,
|
|
3270
|
+
align: t,
|
|
3271
|
+
justify: n,
|
|
3272
|
+
className: r
|
|
3273
|
+
}),
|
|
3274
|
+
children: i.children
|
|
3275
|
+
});
|
|
3276
|
+
}
|
|
3277
|
+
//#endregion
|
|
3278
|
+
//#region node_modules/@base-ui/react/tabs/root/TabsRootContext.mjs
|
|
3279
|
+
var no = /* @__PURE__ */ r.createContext(void 0);
|
|
3280
|
+
process.env.NODE_ENV !== "production" && (no.displayName = "TabsRootContext");
|
|
3281
|
+
function ro() {
|
|
3282
|
+
let e = r.useContext(no);
|
|
3283
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(64) : "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");
|
|
3284
|
+
return e;
|
|
3285
|
+
}
|
|
3286
|
+
//#endregion
|
|
3287
|
+
//#region node_modules/@base-ui/react/tabs/root/TabsRootDataAttributes.mjs
|
|
3288
|
+
var io = /* @__PURE__ */ function(e) {
|
|
3289
|
+
return e.activationDirection = "data-activation-direction", e.orientation = "data-orientation", e;
|
|
3290
|
+
}({}), ao = { tabActivationDirection: (e) => ({ [io.activationDirection]: e }) }, oo = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3291
|
+
let { className: n, defaultValue: i = 0, onValueChange: a, orientation: s = "horizontal", render: c, value: l, style: u, ...d } = e, f = e.defaultValue !== void 0, p = r.useRef([]), [m, h] = r.useState(() => /* @__PURE__ */ new Map()), [g, _] = Ue({
|
|
3292
|
+
controlled: l,
|
|
3293
|
+
default: i,
|
|
3294
|
+
name: "Tabs",
|
|
3295
|
+
state: "value"
|
|
3296
|
+
}), v = l !== void 0, [y, b] = r.useState(() => /* @__PURE__ */ new Map()), x = r.useRef(void 0), S = r.useCallback((e) => {
|
|
3297
|
+
if (e === void 0) return null;
|
|
3298
|
+
for (let [t, n] of y.entries()) if (n != null && e === (n.value ?? n.index)) return t;
|
|
3299
|
+
return null;
|
|
3300
|
+
}, [y]), [C, w] = r.useState(() => ({
|
|
3301
|
+
previousValue: g,
|
|
3302
|
+
tabActivationDirection: "none"
|
|
3303
|
+
})), { previousValue: T, tabActivationDirection: E } = C, D = E, O = !1;
|
|
3304
|
+
T !== g && (D = so(T, g, s, y), O = T != null && g != null && S(g) == null);
|
|
3305
|
+
let k = O ? T : g, A = T !== k || E !== D;
|
|
3306
|
+
V(() => {
|
|
3307
|
+
A && w({
|
|
3308
|
+
previousValue: k,
|
|
3309
|
+
tabActivationDirection: D
|
|
3310
|
+
});
|
|
3311
|
+
}, [
|
|
3312
|
+
k,
|
|
3313
|
+
A,
|
|
3314
|
+
D
|
|
3315
|
+
]);
|
|
3316
|
+
let j = L((e, t) => {
|
|
3317
|
+
t.activationDirection = so(g, e, s, y), a?.(e, t), !t.isCanceled && _(e);
|
|
3318
|
+
}), M = L((e, t) => {
|
|
3319
|
+
a?.(e, Lt(t, void 0, void 0, { activationDirection: "none" }));
|
|
3320
|
+
}), ee = L((e, t) => {
|
|
3321
|
+
h((n) => {
|
|
3322
|
+
if (n.get(e) === t) return n;
|
|
3323
|
+
let r = new Map(n);
|
|
3324
|
+
return r.set(e, t), r;
|
|
3325
|
+
});
|
|
3326
|
+
}), N = L((e, t) => {
|
|
3327
|
+
h((n) => {
|
|
3328
|
+
if (!n.has(e) || n.get(e) !== t) return n;
|
|
3329
|
+
let r = new Map(n);
|
|
3330
|
+
return r.delete(e), r;
|
|
3331
|
+
});
|
|
3332
|
+
}), P = r.useCallback((e) => m.get(e), [m]), F = r.useCallback((e) => {
|
|
3333
|
+
for (let t of y.values()) if (e === t?.value) return t?.id;
|
|
3334
|
+
}, [y]), te = r.useMemo(() => ({
|
|
3335
|
+
getTabElementBySelectedValue: S,
|
|
3336
|
+
getTabIdByPanelValue: F,
|
|
3337
|
+
getTabPanelIdByValue: P,
|
|
3338
|
+
onValueChange: j,
|
|
3339
|
+
orientation: s,
|
|
3340
|
+
registerMountedTabPanel: ee,
|
|
3341
|
+
setTabMap: b,
|
|
3342
|
+
unregisterMountedTabPanel: N,
|
|
3343
|
+
tabActivationDirection: D,
|
|
3344
|
+
value: g
|
|
3345
|
+
}), [
|
|
3346
|
+
S,
|
|
3347
|
+
F,
|
|
3348
|
+
P,
|
|
3349
|
+
j,
|
|
3350
|
+
s,
|
|
3351
|
+
ee,
|
|
3352
|
+
b,
|
|
3353
|
+
N,
|
|
3354
|
+
D,
|
|
3355
|
+
g
|
|
3356
|
+
]), I = r.useMemo(() => {
|
|
3357
|
+
for (let e of y.values()) if (e != null && e.value === g) return e;
|
|
3358
|
+
}, [y, g]), R = r.useMemo(() => {
|
|
3359
|
+
for (let e of y.values()) if (e != null && !e.disabled) return e.value;
|
|
3360
|
+
}, [y]), ne = r.useRef(!f), z = r.useRef(i), B = r.useRef(f), H = r.useRef(!1);
|
|
3361
|
+
V(() => {
|
|
3362
|
+
if (v) return;
|
|
3363
|
+
function e(e, t) {
|
|
3364
|
+
_(e), w((t) => t.previousValue === e && t.tabActivationDirection === "none" ? t : {
|
|
3365
|
+
previousValue: e,
|
|
3366
|
+
tabActivationDirection: "none"
|
|
3367
|
+
}), M(e, t), ne.current = !1;
|
|
3368
|
+
}
|
|
3369
|
+
if (y.size === 0) {
|
|
3370
|
+
H.current && g !== null && !x.current?.isConnected && e(null, Mt);
|
|
3371
|
+
return;
|
|
3372
|
+
}
|
|
3373
|
+
H.current = !0, x.current = y.keys().next().value;
|
|
3374
|
+
let t = I?.disabled, n = I == null && g !== null;
|
|
3375
|
+
if (!t && g === z.current && (B.current = !1), B.current && t && g === z.current) return;
|
|
3376
|
+
let r = ne.current;
|
|
3377
|
+
if (t || n) {
|
|
3378
|
+
let n = R ?? null;
|
|
3379
|
+
if (g === n) {
|
|
3380
|
+
ne.current = !1;
|
|
3381
|
+
return;
|
|
3382
|
+
}
|
|
3383
|
+
let i = Mt;
|
|
3384
|
+
r ? i = Nt : t && (i = jt), e(n, i);
|
|
3385
|
+
return;
|
|
3386
|
+
}
|
|
3387
|
+
r && I != null && (M(g, Nt), ne.current = !1);
|
|
3388
|
+
}, [
|
|
3389
|
+
R,
|
|
3390
|
+
v,
|
|
3391
|
+
M,
|
|
3392
|
+
I,
|
|
3393
|
+
_,
|
|
3394
|
+
y,
|
|
3395
|
+
g
|
|
3396
|
+
]);
|
|
3397
|
+
let re = Z("div", e, {
|
|
3398
|
+
state: {
|
|
3399
|
+
orientation: s,
|
|
3400
|
+
tabActivationDirection: D
|
|
3401
|
+
},
|
|
3402
|
+
ref: t,
|
|
3403
|
+
props: d,
|
|
3404
|
+
stateAttributesMapping: ao
|
|
3405
|
+
});
|
|
3406
|
+
return /* @__PURE__ */ o(no.Provider, {
|
|
3407
|
+
value: te,
|
|
3408
|
+
children: /* @__PURE__ */ o(zr, {
|
|
3409
|
+
elementsRef: p,
|
|
3410
|
+
children: re
|
|
3411
|
+
})
|
|
3412
|
+
});
|
|
3413
|
+
});
|
|
3414
|
+
process.env.NODE_ENV !== "production" && (oo.displayName = "TabsRoot");
|
|
3415
|
+
function so(e, t, n, r) {
|
|
3416
|
+
if (e == null || t == null) return "none";
|
|
3417
|
+
let i = null, a = null;
|
|
3418
|
+
for (let [n, o] of r.entries()) {
|
|
3419
|
+
if (o == null) continue;
|
|
3420
|
+
let r = o.value ?? o.index;
|
|
3421
|
+
if (e === r && (i = n), t === r && (a = n), i != null && a != null) break;
|
|
3422
|
+
}
|
|
3423
|
+
if (i == null || a == null) return i !== a && (typeof e == "number" || typeof e == "string") && typeof e == typeof t ? n === "horizontal" ? t > e ? "right" : "left" : t > e ? "down" : "up" : "none";
|
|
3424
|
+
let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
|
|
3425
|
+
if (n === "horizontal") {
|
|
3426
|
+
if (s.left < o.left) return "left";
|
|
3427
|
+
if (s.left > o.left) return "right";
|
|
3428
|
+
} else {
|
|
3429
|
+
if (s.top < o.top) return "up";
|
|
3430
|
+
if (s.top > o.top) return "down";
|
|
3431
|
+
}
|
|
3432
|
+
return "none";
|
|
3433
|
+
}
|
|
3434
|
+
//#endregion
|
|
3435
|
+
//#region node_modules/@base-ui/react/tabs/list/TabsListContext.mjs
|
|
3436
|
+
var co = /* @__PURE__ */ r.createContext(void 0);
|
|
3437
|
+
process.env.NODE_ENV !== "production" && (co.displayName = "TabsListContext");
|
|
3438
|
+
function lo() {
|
|
3439
|
+
let e = r.useContext(co);
|
|
3440
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(65) : "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");
|
|
3441
|
+
return e;
|
|
3442
|
+
}
|
|
3443
|
+
//#endregion
|
|
3444
|
+
//#region node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
|
|
3445
|
+
var uo = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3446
|
+
let { className: n, disabled: i = !1, render: a, value: o, id: s, nativeButton: c = !0, style: l, ...u } = e, { value: d, getTabPanelIdByValue: f, orientation: p, tabActivationDirection: m } = ro(), { activateOnFocus: h, highlightedTabIndex: g, onTabActivation: _, registerTabResizeObserverElement: v, setHighlightedTabIndex: y, tabsListElement: b } = lo(), x = it(s), { compositeProps: S, compositeRef: C, index: w } = Ma({ metadata: r.useMemo(() => ({
|
|
3447
|
+
disabled: i,
|
|
3448
|
+
id: x,
|
|
3449
|
+
value: o
|
|
3450
|
+
}), [
|
|
3451
|
+
i,
|
|
3452
|
+
x,
|
|
3453
|
+
o
|
|
3454
|
+
]) }), T = o === d, E = r.useRef(!1), D = r.useRef(null);
|
|
3455
|
+
V(() => {
|
|
3456
|
+
let e = D.current;
|
|
3457
|
+
if (e) return v(e);
|
|
3458
|
+
}, [v]), V(() => {
|
|
3459
|
+
if (E.current) {
|
|
3460
|
+
E.current = !1;
|
|
3461
|
+
return;
|
|
3462
|
+
}
|
|
3463
|
+
if (!(T && w > -1 && g !== w)) return;
|
|
3464
|
+
let e = b;
|
|
3465
|
+
if (e != null) {
|
|
3466
|
+
let t = xn(Je(e));
|
|
3467
|
+
if (t && Sn(e, t)) return;
|
|
3468
|
+
}
|
|
3469
|
+
i || y(w);
|
|
3470
|
+
}, [
|
|
3471
|
+
T,
|
|
3472
|
+
w,
|
|
3473
|
+
g,
|
|
3474
|
+
y,
|
|
3475
|
+
i,
|
|
3476
|
+
b
|
|
3477
|
+
]);
|
|
3478
|
+
let { getButtonProps: O, buttonRef: k } = _e({
|
|
3479
|
+
disabled: i,
|
|
3480
|
+
native: c,
|
|
3481
|
+
focusableWhenDisabled: !0
|
|
3482
|
+
}), A = f(o), j = r.useRef(!1), M = r.useRef(!1);
|
|
3483
|
+
function ee(e) {
|
|
3484
|
+
T || i || _(o, Lt(gt, e.nativeEvent, void 0, { activationDirection: "none" }));
|
|
3485
|
+
}
|
|
3486
|
+
function N(e) {
|
|
3487
|
+
T || (w > -1 && !i && y(w), !i && h && (!j.current || j.current && M.current) && _(o, Lt(gt, e.nativeEvent, void 0, { activationDirection: "none" })));
|
|
3488
|
+
}
|
|
3489
|
+
function P(e) {
|
|
3490
|
+
if (T || i) return;
|
|
3491
|
+
j.current = !0;
|
|
3492
|
+
function t() {
|
|
3493
|
+
j.current = !1, M.current = !1;
|
|
3494
|
+
}
|
|
3495
|
+
(!e.button || e.button === 0) && (M.current = !0, Je(e.currentTarget).addEventListener("pointerup", t, { once: !0 }));
|
|
3496
|
+
}
|
|
3497
|
+
return Z("button", e, {
|
|
3498
|
+
state: {
|
|
3499
|
+
disabled: i,
|
|
3500
|
+
active: T,
|
|
3501
|
+
orientation: p,
|
|
3502
|
+
tabActivationDirection: m
|
|
3503
|
+
},
|
|
3504
|
+
ref: [
|
|
3505
|
+
t,
|
|
3506
|
+
k,
|
|
3507
|
+
C,
|
|
3508
|
+
D
|
|
3509
|
+
],
|
|
3510
|
+
props: [
|
|
3511
|
+
S,
|
|
3512
|
+
{
|
|
3513
|
+
role: "tab",
|
|
3514
|
+
"aria-controls": A,
|
|
3515
|
+
"aria-selected": T,
|
|
3516
|
+
id: x,
|
|
3517
|
+
onClick: ee,
|
|
3518
|
+
onFocus: N,
|
|
3519
|
+
onPointerDown: P,
|
|
3520
|
+
[za]: T ? "" : void 0,
|
|
3521
|
+
onKeyDownCapture() {
|
|
3522
|
+
E.current = !0;
|
|
3523
|
+
}
|
|
3524
|
+
},
|
|
3525
|
+
u,
|
|
3526
|
+
O
|
|
3527
|
+
],
|
|
3528
|
+
stateAttributesMapping: ao
|
|
3529
|
+
});
|
|
3530
|
+
});
|
|
3531
|
+
process.env.NODE_ENV !== "production" && (uo.displayName = "TabsTab");
|
|
3532
|
+
//#endregion
|
|
3533
|
+
//#region node_modules/@base-ui/react/tabs/indicator/TabsIndicatorCssVars.mjs
|
|
3534
|
+
var fo = /* @__PURE__ */ function(e) {
|
|
3535
|
+
return e.activeTabLeft = "--active-tab-left", e.activeTabRight = "--active-tab-right", e.activeTabTop = "--active-tab-top", e.activeTabBottom = "--active-tab-bottom", e.activeTabWidth = "--active-tab-width", e.activeTabHeight = "--active-tab-height", e;
|
|
3536
|
+
}({}), po = {
|
|
3537
|
+
...ao,
|
|
3538
|
+
activeTabPosition: () => null,
|
|
3539
|
+
activeTabSize: () => null
|
|
3540
|
+
}, mo = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3541
|
+
let { className: n, render: i, renderBeforeHydration: a = !1, style: c, ...l } = e, { nonce: u } = mi(), { getTabElementBySelectedValue: d, orientation: f, tabActivationDirection: p, value: m } = ro(), { tabsListElement: h, registerIndicatorUpdateListener: g } = lo(), _ = Ki(), v = jr();
|
|
3542
|
+
r.useEffect(() => g(v), [g, v]);
|
|
3543
|
+
let y = 0, b = 0, x = 0, S = 0, C = 0, w = 0, T = !1;
|
|
3544
|
+
if (m != null && h != null) {
|
|
3545
|
+
let e = d(m);
|
|
3546
|
+
if (e != null) {
|
|
3547
|
+
T = !0;
|
|
3548
|
+
let { width: t, height: n } = Za(e), { width: r, height: i } = Za(h), a = e.getBoundingClientRect(), o = h.getBoundingClientRect(), s = r > 0 ? o.width / r : 1, c = i > 0 ? o.height / i : 1;
|
|
3549
|
+
if (Math.abs(s) > 2 ** -52 && Math.abs(c) > 2 ** -52) {
|
|
3550
|
+
let e = a.left - o.left, t = a.top - o.top;
|
|
3551
|
+
y = e / s + h.scrollLeft - h.clientLeft, x = t / c + h.scrollTop - h.clientTop;
|
|
3552
|
+
} else y = e.offsetLeft, x = e.offsetTop;
|
|
3553
|
+
C = t, w = n, b = h.scrollWidth - y - C, S = h.scrollHeight - x - w;
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
let E = T ? {
|
|
3557
|
+
left: y,
|
|
3558
|
+
right: b,
|
|
3559
|
+
top: x,
|
|
3560
|
+
bottom: S
|
|
3561
|
+
} : null, D = T ? {
|
|
3562
|
+
width: C,
|
|
3563
|
+
height: w
|
|
3564
|
+
} : null, O = T ? {
|
|
3565
|
+
[fo.activeTabLeft]: `${y}px`,
|
|
3566
|
+
[fo.activeTabRight]: `${b}px`,
|
|
3567
|
+
[fo.activeTabTop]: `${x}px`,
|
|
3568
|
+
[fo.activeTabBottom]: `${S}px`,
|
|
3569
|
+
[fo.activeTabWidth]: `${C}px`,
|
|
3570
|
+
[fo.activeTabHeight]: `${w}px`
|
|
3571
|
+
} : void 0, k = Z("span", e, {
|
|
3572
|
+
state: {
|
|
3573
|
+
orientation: f,
|
|
3574
|
+
activeTabPosition: E,
|
|
3575
|
+
activeTabSize: D,
|
|
3576
|
+
tabActivationDirection: p
|
|
3577
|
+
},
|
|
3578
|
+
ref: t,
|
|
3579
|
+
props: [
|
|
3580
|
+
{
|
|
3581
|
+
role: "presentation",
|
|
3582
|
+
style: O,
|
|
3583
|
+
hidden: !(T && C > 0 && w > 0)
|
|
3584
|
+
},
|
|
3585
|
+
l,
|
|
3586
|
+
{ suppressHydrationWarning: !0 }
|
|
3587
|
+
],
|
|
3588
|
+
stateAttributesMapping: po
|
|
3589
|
+
});
|
|
3590
|
+
return m == null ? null : /* @__PURE__ */ s(r.Fragment, { children: [k, _ && a && /* @__PURE__ */ o("script", {
|
|
3591
|
+
nonce: u,
|
|
3592
|
+
dangerouslySetInnerHTML: { __html: "!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest('[role=\"tablist\"]');if(!e)return;const i=e.querySelector(\"[data-active]\");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c(\"left\",o),c(\"right\",n),c(\"top\",h),c(\"bottom\",l),c(\"width\",r),c(\"height\",f),r>0&&f>0&&t.removeAttribute(\"hidden\")}();" },
|
|
3593
|
+
suppressHydrationWarning: !0
|
|
3594
|
+
})] });
|
|
3595
|
+
});
|
|
3596
|
+
process.env.NODE_ENV !== "production" && (mo.displayName = "TabsIndicator");
|
|
3597
|
+
//#endregion
|
|
3598
|
+
//#region node_modules/@base-ui/react/tabs/panel/TabsPanelDataAttributes.mjs
|
|
3599
|
+
var ho = function(e) {
|
|
3600
|
+
return e.index = "data-index", e.activationDirection = "data-activation-direction", e.orientation = "data-orientation", e.hidden = "data-hidden", e[e.startingStyle = Jt.startingStyle] = "startingStyle", e[e.endingStyle = Jt.endingStyle] = "endingStyle", e;
|
|
3601
|
+
}({}), go = {
|
|
3602
|
+
...ao,
|
|
3603
|
+
...Zt
|
|
3604
|
+
}, _o = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3605
|
+
let { className: n, value: i, render: a, keepMounted: o = !1, style: s, ...c } = e, { value: l, getTabIdByPanelValue: u, orientation: d, tabActivationDirection: f, registerMountedTabPanel: p, unregisterMountedTabPanel: m } = ro(), h = it(), { ref: g, index: _ } = gi({ metadata: r.useMemo(() => ({
|
|
3606
|
+
id: h,
|
|
3607
|
+
value: i
|
|
3608
|
+
}), [h, i]) }), v = i === l, { mounted: y, transitionStatus: b, setMounted: x } = en(v), S = !y, C = u(i), w = {
|
|
3609
|
+
hidden: S,
|
|
3610
|
+
orientation: d,
|
|
3611
|
+
tabActivationDirection: f,
|
|
3612
|
+
transitionStatus: b
|
|
3613
|
+
}, T = r.useRef(null), E = Z("div", e, {
|
|
3614
|
+
state: w,
|
|
3615
|
+
ref: [
|
|
3616
|
+
t,
|
|
3617
|
+
g,
|
|
3618
|
+
T
|
|
3619
|
+
],
|
|
3620
|
+
props: [{
|
|
3621
|
+
"aria-labelledby": C,
|
|
3622
|
+
hidden: S,
|
|
3623
|
+
id: h,
|
|
3624
|
+
role: "tabpanel",
|
|
3625
|
+
tabIndex: v ? 0 : -1,
|
|
3626
|
+
inert: Ir(!v),
|
|
3627
|
+
[ho.index]: _
|
|
3628
|
+
}, c],
|
|
3629
|
+
stateAttributesMapping: go
|
|
3630
|
+
});
|
|
3631
|
+
return $t({
|
|
3632
|
+
open: v,
|
|
3633
|
+
ref: T,
|
|
3634
|
+
onComplete() {
|
|
3635
|
+
v || x(!1);
|
|
3636
|
+
}
|
|
3637
|
+
}), V(() => {
|
|
3638
|
+
if (!(S && !o) && h != null) return p(i, h), () => {
|
|
3639
|
+
m(i, h);
|
|
3640
|
+
};
|
|
3641
|
+
}, [
|
|
3642
|
+
S,
|
|
3643
|
+
o,
|
|
3644
|
+
i,
|
|
3645
|
+
h,
|
|
3646
|
+
p,
|
|
3647
|
+
m
|
|
3648
|
+
]), o || y ? E : null;
|
|
3649
|
+
});
|
|
3650
|
+
process.env.NODE_ENV !== "production" && (_o.displayName = "TabsPanel");
|
|
3651
|
+
//#endregion
|
|
3652
|
+
//#region node_modules/@base-ui/react/tabs/list/TabsList.mjs
|
|
3653
|
+
var vo = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3654
|
+
let { activateOnFocus: n = !1, className: i, loopFocus: a = !0, render: s, style: c, ...l } = e, { onValueChange: u, orientation: d, value: f, setTabMap: p, tabActivationDirection: m } = ro(), [h, g] = r.useState(0), [_, v] = r.useState(null), y = r.useRef(/* @__PURE__ */ new Set()), b = r.useRef(/* @__PURE__ */ new Set()), x = r.useRef(null);
|
|
3655
|
+
V(() => {
|
|
3656
|
+
if (typeof ResizeObserver > "u") return;
|
|
3657
|
+
let e = new ResizeObserver(() => {
|
|
3658
|
+
y.current.forEach((e) => {
|
|
3659
|
+
e();
|
|
3660
|
+
});
|
|
3661
|
+
});
|
|
3662
|
+
return x.current = e, _ && e.observe(_), b.current.forEach((t) => {
|
|
3663
|
+
e.observe(t);
|
|
3664
|
+
}), () => {
|
|
3665
|
+
e.disconnect(), x.current = null;
|
|
3666
|
+
};
|
|
3667
|
+
}, [_]);
|
|
3668
|
+
let S = L((e) => (y.current.add(e), () => {
|
|
3669
|
+
y.current.delete(e);
|
|
3670
|
+
})), C = L((e) => (b.current.add(e), x.current?.observe(e), () => {
|
|
3671
|
+
b.current.delete(e), x.current?.unobserve(e);
|
|
3672
|
+
})), w = L((e, t) => {
|
|
3673
|
+
e !== f && u(e, t);
|
|
3674
|
+
}), T = {
|
|
3675
|
+
orientation: d,
|
|
3676
|
+
tabActivationDirection: m
|
|
3677
|
+
}, E = {
|
|
3678
|
+
"aria-orientation": d === "vertical" ? "vertical" : void 0,
|
|
3679
|
+
role: "tablist"
|
|
3680
|
+
}, D = r.useMemo(() => ({
|
|
3681
|
+
activateOnFocus: n,
|
|
3682
|
+
highlightedTabIndex: h,
|
|
3683
|
+
registerIndicatorUpdateListener: S,
|
|
3684
|
+
registerTabResizeObserverElement: C,
|
|
3685
|
+
onTabActivation: w,
|
|
3686
|
+
setHighlightedTabIndex: g,
|
|
3687
|
+
tabsListElement: _
|
|
3688
|
+
}), [
|
|
3689
|
+
n,
|
|
3690
|
+
h,
|
|
3691
|
+
S,
|
|
3692
|
+
C,
|
|
3693
|
+
w,
|
|
3694
|
+
g,
|
|
3695
|
+
_
|
|
3696
|
+
]);
|
|
3697
|
+
return /* @__PURE__ */ o(co.Provider, {
|
|
3698
|
+
value: D,
|
|
3699
|
+
children: /* @__PURE__ */ o(Ua, {
|
|
3700
|
+
render: s,
|
|
3701
|
+
className: i,
|
|
3702
|
+
style: c,
|
|
3703
|
+
state: T,
|
|
3704
|
+
refs: [t, v],
|
|
3705
|
+
props: [E, l],
|
|
3706
|
+
stateAttributesMapping: ao,
|
|
3707
|
+
highlightedIndex: h,
|
|
3708
|
+
enableHomeAndEndKeys: !0,
|
|
3709
|
+
loopFocus: a,
|
|
3710
|
+
orientation: d,
|
|
3711
|
+
onHighlightedIndexChange: g,
|
|
3712
|
+
onMapChange: p,
|
|
3713
|
+
disabledIndices: Ae
|
|
3714
|
+
})
|
|
3715
|
+
});
|
|
3716
|
+
});
|
|
3717
|
+
process.env.NODE_ENV !== "production" && (vo.displayName = "TabsList");
|
|
3718
|
+
var yo = {
|
|
3719
|
+
indicator: "imf-ui-tabs-module-indicator",
|
|
3720
|
+
list: "imf-ui-tabs-module-list",
|
|
3721
|
+
listFill: "imf-ui-tabs-module-listFill",
|
|
3722
|
+
panel: "imf-ui-tabs-module-panel",
|
|
3723
|
+
panelViewport: "imf-ui-tabs-module-panelViewport",
|
|
3724
|
+
root: "imf-ui-tabs-module-root",
|
|
3725
|
+
tab: "imf-ui-tabs-module-tab"
|
|
3726
|
+
}, bo = /* @__PURE__ */ e({
|
|
3727
|
+
Indicator: () => Ao,
|
|
3728
|
+
List: () => Oo,
|
|
3729
|
+
Panel: () => Mo,
|
|
3730
|
+
PanelViewport: () => jo,
|
|
3731
|
+
Root: () => Do,
|
|
3732
|
+
Tab: () => ko
|
|
3733
|
+
}), xo = n(yo.list, { variants: { fill: {
|
|
3734
|
+
true: yo.listFill,
|
|
3735
|
+
false: null
|
|
3736
|
+
} } }), So = n(yo.root), Co = n(yo.tab), wo = n(yo.indicator), To = n(yo.panelViewport), Eo = n(yo.panel);
|
|
3737
|
+
function Do({ className: e, ...t }) {
|
|
3738
|
+
return /* @__PURE__ */ o(oo, {
|
|
3739
|
+
...t,
|
|
3740
|
+
"data-imf-ui-component": "Tabs.Root",
|
|
3741
|
+
className: (t) => So({ className: typeof e == "function" ? e(t) : e })
|
|
3742
|
+
});
|
|
3743
|
+
}
|
|
3744
|
+
Do.displayName = "Tabs.Root";
|
|
3745
|
+
function Oo({ fill: e = !1, className: t, ...n }) {
|
|
3746
|
+
return /* @__PURE__ */ o(vo, {
|
|
3747
|
+
...n,
|
|
3748
|
+
"data-imf-ui-component": "Tabs.List",
|
|
3749
|
+
className: (n) => xo({
|
|
3750
|
+
fill: e,
|
|
3751
|
+
className: typeof t == "function" ? t(n) : t
|
|
3752
|
+
})
|
|
3753
|
+
});
|
|
3754
|
+
}
|
|
3755
|
+
Oo.displayName = "Tabs.List";
|
|
3756
|
+
function ko({ className: e, ...t }) {
|
|
3757
|
+
return /* @__PURE__ */ o(uo, {
|
|
3758
|
+
...t,
|
|
3759
|
+
"data-imf-ui-component": "Tabs.Tab",
|
|
3760
|
+
className: (t) => Co({ className: typeof e == "function" ? e(t) : e })
|
|
3761
|
+
});
|
|
3762
|
+
}
|
|
3763
|
+
ko.displayName = "Tabs.Tab";
|
|
3764
|
+
function Ao({ className: e, ...t }) {
|
|
3765
|
+
return /* @__PURE__ */ o(mo, {
|
|
3766
|
+
...t,
|
|
3767
|
+
"data-imf-ui-component": "Tabs.Indicator",
|
|
3768
|
+
className: (t) => wo({ className: typeof e == "function" ? e(t) : e })
|
|
3769
|
+
});
|
|
3770
|
+
}
|
|
3771
|
+
Ao.displayName = "Tabs.Indicator";
|
|
3772
|
+
function jo({ className: e, ...t }) {
|
|
3773
|
+
return /* @__PURE__ */ o("div", {
|
|
3774
|
+
...t,
|
|
3775
|
+
"data-imf-ui-component": "Tabs.PanelViewport",
|
|
3776
|
+
className: To({ className: e })
|
|
3777
|
+
});
|
|
3778
|
+
}
|
|
3779
|
+
jo.displayName = "Tabs.PanelViewport";
|
|
3780
|
+
function Mo({ className: e, ...t }) {
|
|
3781
|
+
return /* @__PURE__ */ o(_o, {
|
|
3782
|
+
...t,
|
|
3783
|
+
"data-imf-ui-component": "Tabs.Panel",
|
|
3784
|
+
className: (t) => Eo({ className: typeof e == "function" ? e(t) : e })
|
|
3785
|
+
});
|
|
3786
|
+
}
|
|
3787
|
+
Mo.displayName = "Tabs.Panel";
|
|
3788
|
+
//#endregion
|
|
3789
|
+
export { Hn as $, M as $n, Vt as $t, Kr as A, Ue as An, xn as At, Tr as B, J as Bn, pn as Bt, ha as C, st as Cn, Tn as Ct, gi as D, Je as Dn, kn as Dt, hi as E, $e as En, wn as Et, Fr as F, X as Fn, vn as Ft, mr as G, F as Gn, en as Gt, Sr as H, V as Hn, fn as Ht, Nr as I, ke as In, yn as It, fr as J, T as Jn, Jt, pr as K, N as Kn, $t as Kt, Mr as L, Ee as Ln, hn as Lt, zr as M, Pe as Mn, Cn as Mt, Ir as N, Ae as Nn, bn as Nt, mi as O, Ke as On, Dn as Ot, Pr as P, je as Pn, _n as Pt, Kn as Q, k as Qn, Kt as Qt, kr as R, be as Rn, mn as Rt, _a as S, ct as Sn, jn as St, ra as T, rt as Tn, En as Tt, br as U, B as Un, sn as Ut, Cr as V, U as Vn, ln as Vt, hr as W, L as Wn, tn as Wt, Gn as X, ee as Xn, qt as Xt, gr as Y, f as Yn, Zt as Yt, Un as Z, u as Zn, Gt as Zt, Ta as _, _t as _n, In as _t, Do as a, jt as an, D as ar, Yn as at, fa as b, ft as bn, Fn as bt, to as c, Pt as cn, g as cr, ur as ct, Xa as d, Ot as dn, E as dr, Bn as dt, zt as en, A as er, Jn as et, Ua as f, gt as fn, zn as ft, ka as g, vt as gn, Ln as gt, Oa as h, yt as hn, Rn as ht, jo as i, Dt as in, h as ir, er as it, Wr as j, Z as jn, Sn as jt, ai as k, qe as kn, An as kt, $a as l, xt as ln, v as lr, qn as lt, Na as m, Ft as mn, Vn as mt, Oo as n, At as nn, w as nr, $n as nt, ko as o, Et as on, p as or, sr as ot, Ra as p, bt as pn, dr as pt, vr as q, O as qn, Qt as qt, Mo as r, St as rn, m as rr, Xn as rt, bo as s, Tt as sn, _ as sr, cr as st, Ao as t, Lt as tn, d as tr, Qn as tt, Za as u, Ct as un, y as ur, Zn as ut, ma as v, It as vn, Nn as vt, pa as w, it as wn, On as wt, da as x, ut as xn, Mn as xt, ga as y, pt as yn, Pn as yt, Or as z, _e as zn, dn as zt };
|