@overmap-ai/blocks 0.0.9-alpha.3 → 0.0.9-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Buttons/typings.d.ts +6 -0
- package/dist/Checkbox/Checkbox.d.ts +3 -0
- package/dist/Checkbox/SelectAllCheckbox.d.ts +3 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/typings.d.ts +13 -0
- package/dist/MultiPagePopover/MultiPagePopover.d.ts +3 -0
- package/dist/MultiPagePopover/index.d.ts +1 -0
- package/dist/MultiPagePopover/typings.d.ts +21 -0
- package/dist/Tooltip/Tooltip.d.ts +6 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/blocks.js +1454 -806
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/utils.d.ts +7 -0
- package/package.json +1 -1
package/dist/blocks.js
CHANGED
|
@@ -1,539 +1,578 @@
|
|
|
1
1
|
import "@radix-ui/themes/styles.css";
|
|
2
2
|
export * from "@radix-ui/colors";
|
|
3
|
-
import { Cross1Icon as
|
|
3
|
+
import { Cross1Icon as Ct, DragHandleDots2Icon as be, Cross2Icon as _t, DividerHorizontalIcon as bt, CheckIcon as xt } from "@radix-ui/react-icons";
|
|
4
4
|
export * from "@radix-ui/react-icons";
|
|
5
|
-
import { useThemeContext as
|
|
6
|
-
import { AccessibleIcon as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import
|
|
9
|
-
import { useMediaQuery as
|
|
10
|
-
import * as
|
|
11
|
-
import { Resizable as
|
|
12
|
-
import { DismissableLayer as
|
|
13
|
-
import { CSSTransition as
|
|
14
|
-
import { Root as
|
|
15
|
-
import { Root as
|
|
16
|
-
import * as
|
|
17
|
-
import { ToastProvider as
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
import { useThemeContext as $t, Badge as yt, Button as wt, IconButton as Ge, Flex as T, Box as ne, Card as St, Inset as fe, Dialog as J, AlertDialog as K, DropdownMenu as M, Select as j, Checkbox as kt, Switch as Pt, Portal as Tt, TextField as pe, Text as we, Popover as me, TextArea as Nt, Callout as ge, Tooltip as At, Theme as Rt, Separator as Be } from "@radix-ui/themes";
|
|
6
|
+
import { AccessibleIcon as oi, AspectRatio as ri, Avatar as ii, Blockquote as si, Box as ci, Callout as ai, Card as li, Checkbox as ui, Code as di, Container as hi, ContextMenu as fi, Em as pi, Grid as mi, Heading as gi, HoverCard as vi, Inset as Ci, Kbd as _i, Link as bi, Portal as xi, Quote as $i, RadioGroup as yi, ScrollArea as wi, Section as Si, Slider as ki, Slot as Pi, Strong as Ti, Table as Ni, Tabs as Ai, TextField as Ri, Theme as Oi, VisuallyHidden as zi, updateThemeAppearanceClass as Di, useThemeContext as Ii } from "@radix-ui/themes";
|
|
7
|
+
import { jsx as a, jsxs as _, Fragment as F } from "react/jsx-runtime";
|
|
8
|
+
import V, { useMemo as D, useState as S, useLayoutEffect as Re, useCallback as x, useEffect as N, forwardRef as b, memo as C, createContext as ce, useContext as Se, createElement as z, useRef as O, Children as ee, cloneElement as Oe, useReducer as Ot, isValidElement as xe, Fragment as zt } from "react";
|
|
9
|
+
import { useMediaQuery as re } from "react-responsive";
|
|
10
|
+
import * as ve from "@radix-ui/react-dialog";
|
|
11
|
+
import { Resizable as $e } from "re-resizable";
|
|
12
|
+
import { DismissableLayer as Dt } from "@radix-ui/react-dismissable-layer";
|
|
13
|
+
import { CSSTransition as It, Transition as We } from "react-transition-group";
|
|
14
|
+
import { Root as Et, Item as Mt } from "@radix-ui/react-toggle-group";
|
|
15
|
+
import { Root as Lt } from "@radix-ui/react-toolbar";
|
|
16
|
+
import * as ie from "@radix-ui/react-toast";
|
|
17
|
+
import { ToastProvider as Bt, ToastViewport as Wt } from "@radix-ui/react-toast";
|
|
18
|
+
import { flushSync as Ht } from "react-dom";
|
|
19
|
+
function jt(e) {
|
|
20
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
20
21
|
}
|
|
21
|
-
var
|
|
22
|
+
var Ke = { exports: {} };
|
|
22
23
|
/*!
|
|
23
24
|
Copyright (c) 2018 Jed Watson.
|
|
24
25
|
Licensed under the MIT License (MIT), see
|
|
25
26
|
http://jedwatson.github.io/classnames
|
|
26
27
|
*/
|
|
27
|
-
(function(
|
|
28
|
+
(function(e) {
|
|
28
29
|
(function() {
|
|
29
|
-
var
|
|
30
|
-
function
|
|
30
|
+
var o = {}.hasOwnProperty;
|
|
31
|
+
function n() {
|
|
31
32
|
for (var t = [], i = 0; i < arguments.length; i++) {
|
|
32
|
-
var
|
|
33
|
-
if (
|
|
34
|
-
var c = typeof
|
|
33
|
+
var r = arguments[i];
|
|
34
|
+
if (r) {
|
|
35
|
+
var c = typeof r;
|
|
35
36
|
if (c === "string" || c === "number")
|
|
36
|
-
t.push(
|
|
37
|
-
else if (Array.isArray(
|
|
38
|
-
if (
|
|
39
|
-
var
|
|
40
|
-
|
|
37
|
+
t.push(r);
|
|
38
|
+
else if (Array.isArray(r)) {
|
|
39
|
+
if (r.length) {
|
|
40
|
+
var s = n.apply(null, r);
|
|
41
|
+
s && t.push(s);
|
|
41
42
|
}
|
|
42
43
|
} else if (c === "object") {
|
|
43
|
-
if (
|
|
44
|
-
t.push(
|
|
44
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]")) {
|
|
45
|
+
t.push(r.toString());
|
|
45
46
|
continue;
|
|
46
47
|
}
|
|
47
|
-
for (var u in
|
|
48
|
-
|
|
48
|
+
for (var u in r)
|
|
49
|
+
o.call(r, u) && r[u] && t.push(u);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
return t.join(" ");
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
+
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
55
56
|
})();
|
|
56
|
-
})(
|
|
57
|
-
var
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
return
|
|
61
|
-
if (
|
|
62
|
-
if (typeof
|
|
63
|
-
if (!("initial" in
|
|
57
|
+
})(Ke);
|
|
58
|
+
var Ft = Ke.exports;
|
|
59
|
+
const $ = /* @__PURE__ */ jt(Ft);
|
|
60
|
+
function G(e, o) {
|
|
61
|
+
return D(() => {
|
|
62
|
+
if (e !== void 0)
|
|
63
|
+
if (typeof e == "object") {
|
|
64
|
+
if (!("initial" in e))
|
|
64
65
|
throw new Error("Expected initial property to be set in Responsive object");
|
|
65
|
-
return Object.fromEntries(Object.entries(
|
|
66
|
+
return Object.fromEntries(Object.entries(e).map(([n, t]) => [n, o[t]]));
|
|
66
67
|
} else
|
|
67
|
-
return
|
|
68
|
-
}, [
|
|
68
|
+
return o[e];
|
|
69
|
+
}, [o, e]);
|
|
69
70
|
}
|
|
70
|
-
const
|
|
71
|
+
const Vt = {
|
|
71
72
|
success: "green",
|
|
72
73
|
danger: "red",
|
|
73
74
|
info: "gray"
|
|
74
|
-
},
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
},
|
|
79
|
-
const [
|
|
80
|
-
return
|
|
81
|
-
t((l) => (
|
|
82
|
-
}, [
|
|
83
|
-
},
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
75
|
+
}, A = (e) => {
|
|
76
|
+
const o = $t();
|
|
77
|
+
if (e)
|
|
78
|
+
return e === "primary" ? o.accentColor : Vt[e];
|
|
79
|
+
}, kr = () => {
|
|
80
|
+
const [e, o] = S("initial"), [n, t] = S("initial"), i = re({ minWidth: "520px" }), r = re({ minWidth: "768px" }), c = re({ minWidth: "1024px" }), s = re({ minWidth: "1280px" }), u = re({ minWidth: "1640px" });
|
|
81
|
+
return Re(() => {
|
|
82
|
+
t((l) => (o(l), u ? "xl" : s ? "lg" : c ? "md" : r ? "sm" : i ? "xs" : "initial"));
|
|
83
|
+
}, [s, c, r, u, i]), { size: n, prevSize: e, xs: i, sm: r, md: c, lg: s, xl: u };
|
|
84
|
+
}, qe = (e, o, n) => {
|
|
85
|
+
const [t, i] = S([]), [r, c] = S(!0), s = x(
|
|
86
|
+
(h) => {
|
|
87
|
+
const { repeat: d, key: p } = h;
|
|
88
|
+
c(!0), !(d || t.includes(p)) && i((m) => [...m, p]);
|
|
89
|
+
},
|
|
90
|
+
[t]
|
|
91
|
+
), u = x(
|
|
92
|
+
(h) => {
|
|
93
|
+
const { key: d } = h;
|
|
94
|
+
c(!1), t.includes(d) && i((p) => {
|
|
95
|
+
const m = [...p];
|
|
96
|
+
return m.splice(p.indexOf(d), 1), m;
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
[t]
|
|
100
|
+
);
|
|
101
|
+
N(() => (o || document.addEventListener("keydown", s, !0), () => {
|
|
102
|
+
document.removeEventListener("keydown", s, !0);
|
|
103
|
+
}), [o, s]), N(() => (o || document.addEventListener("keyup", u, !0), () => {
|
|
104
|
+
document.removeEventListener("keyup", u, !0);
|
|
105
|
+
}), [o, u]);
|
|
106
|
+
const l = D(() => !o && r && t.length === e.length && t.every((h) => e.includes(h)), [o, r, t, e]);
|
|
107
|
+
return N(() => {
|
|
108
|
+
l && n();
|
|
109
|
+
}, [l, n]), l;
|
|
110
|
+
}, Ut = b(function({ className: o, severity: n = "primary", color: t, children: i, ...r }, c) {
|
|
111
|
+
const s = A(n);
|
|
112
|
+
return /* @__PURE__ */ a(
|
|
113
|
+
yt,
|
|
87
114
|
{
|
|
88
|
-
className:
|
|
115
|
+
className: $("overmap-badge", o),
|
|
89
116
|
ref: c,
|
|
90
|
-
color: t ||
|
|
91
|
-
...
|
|
117
|
+
color: t || s,
|
|
118
|
+
...r,
|
|
92
119
|
children: i
|
|
93
120
|
}
|
|
94
121
|
);
|
|
95
|
-
}),
|
|
96
|
-
fluid:
|
|
97
|
-
hoverSpin90Clockwise:
|
|
98
|
-
hoverSpin180Clockwise:
|
|
99
|
-
hoverSpin360Clockwise:
|
|
100
|
-
},
|
|
101
|
-
spin90Clockwise:
|
|
102
|
-
spin180Clockwise:
|
|
103
|
-
spin360Clockwise:
|
|
104
|
-
},
|
|
105
|
-
(
|
|
106
|
-
},
|
|
122
|
+
}), Pr = C(Ut), Gt = "_fluid_r73gr_1", Kt = "_hoverSpin90Clockwise_r73gr_15", qt = "_hoverSpin180Clockwise_r73gr_25", Xt = "_hoverSpin360Clockwise_r73gr_35", se = {
|
|
123
|
+
fluid: Gt,
|
|
124
|
+
hoverSpin90Clockwise: Kt,
|
|
125
|
+
hoverSpin180Clockwise: qt,
|
|
126
|
+
hoverSpin360Clockwise: Xt
|
|
127
|
+
}, Xe = {
|
|
128
|
+
spin90Clockwise: se.hoverSpin90Clockwise,
|
|
129
|
+
spin180Clockwise: se.hoverSpin180Clockwise,
|
|
130
|
+
spin360Clockwise: se.hoverSpin360Clockwise
|
|
131
|
+
}, Qt = (e) => {
|
|
132
|
+
(e.key === "Enter" || e.key === " ") && e.currentTarget.click();
|
|
133
|
+
}, Tr = {
|
|
107
134
|
role: "button",
|
|
108
135
|
tabIndex: 0,
|
|
109
|
-
onKeyDown:
|
|
110
|
-
},
|
|
136
|
+
onKeyDown: Qt
|
|
137
|
+
}, oe = {
|
|
111
138
|
small: "1",
|
|
112
139
|
medium: "2",
|
|
113
140
|
large: "3"
|
|
114
|
-
},
|
|
115
|
-
const t =
|
|
141
|
+
}, Qe = ce({}), ze = () => Se(Qe), Yt = b(function(o, n) {
|
|
142
|
+
const t = ze(), {
|
|
116
143
|
className: i,
|
|
117
|
-
type:
|
|
144
|
+
type: r = "button",
|
|
118
145
|
fluid: c = t.fluid ?? !1,
|
|
119
|
-
size:
|
|
146
|
+
size: s = t.size ?? "medium",
|
|
120
147
|
severity: u = t.severity ?? "primary",
|
|
121
148
|
hoverEffects: l = t.hoverEffects ?? [],
|
|
122
149
|
variant: h = t.variant,
|
|
150
|
+
shortcut: d = {
|
|
151
|
+
keys: [],
|
|
152
|
+
action: () => {
|
|
153
|
+
},
|
|
154
|
+
disabled: !1
|
|
155
|
+
},
|
|
123
156
|
...p
|
|
124
|
-
} =
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
|
|
157
|
+
} = o, m = A(u), f = l.map((v) => Xe[v]);
|
|
158
|
+
return qe(d.keys, d.disabled || d.keys.length === 0, d.action), /* @__PURE__ */ a(
|
|
159
|
+
wt,
|
|
127
160
|
{
|
|
128
|
-
ref:
|
|
129
|
-
type:
|
|
130
|
-
className:
|
|
131
|
-
[
|
|
161
|
+
ref: n,
|
|
162
|
+
type: r,
|
|
163
|
+
className: $(i, f, {
|
|
164
|
+
[se.fluid]: c
|
|
132
165
|
}),
|
|
133
166
|
color: m,
|
|
134
|
-
size:
|
|
167
|
+
size: G(s, oe),
|
|
135
168
|
variant: h,
|
|
136
169
|
...p
|
|
137
170
|
}
|
|
138
171
|
);
|
|
139
|
-
}),
|
|
140
|
-
const t =
|
|
172
|
+
}), ye = V.memo(Yt), Zt = b(function(o, n) {
|
|
173
|
+
const t = ze(), {
|
|
141
174
|
className: i,
|
|
142
|
-
children:
|
|
175
|
+
children: r,
|
|
143
176
|
type: c = "button",
|
|
144
|
-
fluid:
|
|
177
|
+
fluid: s = t.fluid ?? !1,
|
|
145
178
|
size: u = t.size ?? "medium",
|
|
146
179
|
severity: l = t.severity ?? "primary",
|
|
147
180
|
hoverEffects: h = t.hoverEffects ?? [],
|
|
148
|
-
variant:
|
|
181
|
+
variant: d = t.variant,
|
|
182
|
+
shortcut: p = {
|
|
183
|
+
keys: [],
|
|
184
|
+
action: () => {
|
|
185
|
+
},
|
|
186
|
+
disabled: !1
|
|
187
|
+
},
|
|
149
188
|
...m
|
|
150
|
-
} =
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
|
|
189
|
+
} = o, f = A(l), v = (h == null ? void 0 : h.map((g) => Xe[g])) || [];
|
|
190
|
+
return qe(p.keys, p.disabled || p.keys.length === 0, p.action), /* @__PURE__ */ a(
|
|
191
|
+
Ge,
|
|
153
192
|
{
|
|
154
|
-
className:
|
|
155
|
-
[
|
|
193
|
+
className: $(i, v, {
|
|
194
|
+
[se.fluid]: s
|
|
156
195
|
}),
|
|
157
|
-
ref:
|
|
196
|
+
ref: n,
|
|
158
197
|
color: f,
|
|
159
|
-
size:
|
|
160
|
-
variant:
|
|
198
|
+
size: G(u, oe),
|
|
199
|
+
variant: d,
|
|
161
200
|
type: c,
|
|
162
201
|
...m,
|
|
163
|
-
children:
|
|
202
|
+
children: r
|
|
164
203
|
}
|
|
165
204
|
);
|
|
166
|
-
}),
|
|
167
|
-
merged:
|
|
168
|
-
},
|
|
205
|
+
}), Ye = V.memo(Zt), Jt = "_merged_wdgxo_1", en = {
|
|
206
|
+
merged: Jt
|
|
207
|
+
}, tn = {
|
|
169
208
|
row: { small: "4", medium: "4", large: "5" },
|
|
170
209
|
column: { small: "2", medium: "3", large: "4" }
|
|
171
|
-
},
|
|
172
|
-
className:
|
|
173
|
-
merged:
|
|
210
|
+
}, nn = b(function({
|
|
211
|
+
className: o,
|
|
212
|
+
merged: n = !1,
|
|
174
213
|
children: t,
|
|
175
214
|
gap: i,
|
|
176
|
-
direction:
|
|
215
|
+
direction: r = "row",
|
|
177
216
|
severity: c,
|
|
178
|
-
size:
|
|
217
|
+
size: s = "medium",
|
|
179
218
|
variant: u,
|
|
180
219
|
hoverEffects: l,
|
|
181
220
|
fluid: h,
|
|
182
|
-
...
|
|
183
|
-
},
|
|
184
|
-
const
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
|
|
221
|
+
...d
|
|
222
|
+
}, p) {
|
|
223
|
+
const m = G(s, tn[r]), f = u === "ghost" ? m : "0";
|
|
224
|
+
return /* @__PURE__ */ a(
|
|
225
|
+
T,
|
|
187
226
|
{
|
|
188
|
-
className:
|
|
189
|
-
[
|
|
227
|
+
className: $("overmap-button-group", o, {
|
|
228
|
+
[en.merged]: n
|
|
190
229
|
}),
|
|
191
|
-
ref:
|
|
192
|
-
gap:
|
|
193
|
-
direction:
|
|
194
|
-
"data-direction":
|
|
195
|
-
...
|
|
196
|
-
children: /* @__PURE__ */
|
|
230
|
+
ref: p,
|
|
231
|
+
gap: n ? i ?? f : i ?? "2",
|
|
232
|
+
direction: r,
|
|
233
|
+
"data-direction": r,
|
|
234
|
+
...d,
|
|
235
|
+
children: /* @__PURE__ */ a(Qe.Provider, { value: { size: s, severity: c, variant: u, hoverEffects: l, fluid: h }, children: t })
|
|
197
236
|
}
|
|
198
237
|
);
|
|
199
|
-
}),
|
|
200
|
-
separators:
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
const { children:
|
|
238
|
+
}), Ze = C(nn), on = "_separators_1f7v1_1", rn = {
|
|
239
|
+
separators: on
|
|
240
|
+
}, sn = C(
|
|
241
|
+
b((e, o) => {
|
|
242
|
+
const { children: n, border: t, before: i, after: r, size: c } = e, s = t ? "surface" : "ghost", u = G(c, oe), h = /* @__PURE__ */ _(St, { ref: o, size: u, variant: s, children: [
|
|
204
243
|
i,
|
|
205
|
-
i &&
|
|
206
|
-
|
|
244
|
+
i && r ? /* @__PURE__ */ a(fe, { side: "x", pt: "current", pb: "current", children: n }) : i ? /* @__PURE__ */ a(fe, { side: "bottom", pt: "current", children: n }) : r ? /* @__PURE__ */ a(fe, { side: "top", pb: "current", children: n }) : /* @__PURE__ */ a(fe, { children: n }),
|
|
245
|
+
r
|
|
207
246
|
] });
|
|
208
|
-
return
|
|
247
|
+
return s === "ghost" ? /* @__PURE__ */ a(ne, { p: "3", children: h }) : h;
|
|
209
248
|
})
|
|
210
|
-
),
|
|
211
|
-
|
|
212
|
-
const { children:
|
|
213
|
-
return /* @__PURE__ */
|
|
214
|
-
|
|
249
|
+
), cn = C(
|
|
250
|
+
b((e, o) => {
|
|
251
|
+
const { children: n, variant: t = "outline", size: i, className: r, ...c } = e;
|
|
252
|
+
return /* @__PURE__ */ a(sn, { ...c, border: t === "outline" || t === "surface", size: i, children: /* @__PURE__ */ a(
|
|
253
|
+
Ze,
|
|
215
254
|
{
|
|
216
255
|
size: i,
|
|
217
256
|
severity: "info",
|
|
218
257
|
variant: t === "outline" ? "ghost" : t === "surface" ? "soft" : t,
|
|
219
|
-
className:
|
|
258
|
+
className: $(r, rn.separators),
|
|
220
259
|
merged: !0,
|
|
221
260
|
gap: "0",
|
|
222
261
|
direction: "column",
|
|
223
|
-
ref:
|
|
224
|
-
children:
|
|
262
|
+
ref: o,
|
|
263
|
+
children: n
|
|
225
264
|
}
|
|
226
265
|
) });
|
|
227
266
|
})
|
|
228
|
-
),
|
|
229
|
-
|
|
230
|
-
const { variant:
|
|
231
|
-
return
|
|
267
|
+
), an = C(
|
|
268
|
+
b((e, o) => {
|
|
269
|
+
const { variant: n } = ze(), t = /* @__PURE__ */ a(ye, { ref: o, ...e, radius: "large", variant: n });
|
|
270
|
+
return n === "ghost" ? /* @__PURE__ */ a(ne, { asChild: !0, my: "1", mx: "2", children: t }) : t;
|
|
232
271
|
})
|
|
233
|
-
),
|
|
234
|
-
Root:
|
|
235
|
-
Item:
|
|
236
|
-
},
|
|
237
|
-
const { title:
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
272
|
+
), Nr = {
|
|
273
|
+
Root: cn,
|
|
274
|
+
Item: an
|
|
275
|
+
}, ln = C(function(o) {
|
|
276
|
+
const { title: n, description: t, content: i, closeDialog: r } = o;
|
|
277
|
+
return /* @__PURE__ */ _(T, { direction: "column", gap: "2", children: [
|
|
278
|
+
/* @__PURE__ */ _(T, { direction: "column", gap: "1", children: [
|
|
279
|
+
/* @__PURE__ */ _(T, { justify: "between", children: [
|
|
280
|
+
/* @__PURE__ */ a(J.Title, { mb: "0", children: n }),
|
|
281
|
+
/* @__PURE__ */ a(J.Close, { children: /* @__PURE__ */ a(Ge, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ a(Ct, {}) }) })
|
|
243
282
|
] }),
|
|
244
|
-
t && /* @__PURE__ */
|
|
283
|
+
t && /* @__PURE__ */ a(J.Description, { children: t })
|
|
245
284
|
] }),
|
|
246
|
-
i(
|
|
285
|
+
i(r)
|
|
247
286
|
] });
|
|
248
|
-
}),
|
|
249
|
-
|
|
250
|
-
const { children:
|
|
251
|
-
(
|
|
252
|
-
if (
|
|
287
|
+
}), Ar = C(
|
|
288
|
+
b((e, o) => {
|
|
289
|
+
const { children: n, content: t, title: i, description: r, onOpen: c, defaultOpen: s, onCloseInterrupt: u, ...l } = e, [h, d] = S(s ?? !1), p = x(
|
|
290
|
+
(f) => {
|
|
291
|
+
if (f && c)
|
|
253
292
|
c();
|
|
254
|
-
else if (!
|
|
255
|
-
return u(() =>
|
|
256
|
-
|
|
293
|
+
else if (!f && u)
|
|
294
|
+
return u(() => d(!1));
|
|
295
|
+
d(f);
|
|
257
296
|
},
|
|
258
297
|
[c, u]
|
|
259
|
-
),
|
|
260
|
-
(
|
|
261
|
-
if (
|
|
262
|
-
return
|
|
263
|
-
|
|
298
|
+
), m = x(
|
|
299
|
+
(f) => {
|
|
300
|
+
if (f != null && f.force)
|
|
301
|
+
return d(!1);
|
|
302
|
+
p(!1);
|
|
264
303
|
},
|
|
265
|
-
[
|
|
304
|
+
[p]
|
|
266
305
|
);
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
|
|
306
|
+
return /* @__PURE__ */ _(J.Root, { open: h, onOpenChange: p, children: [
|
|
307
|
+
/* @__PURE__ */ a(J.Trigger, { children: n }),
|
|
308
|
+
/* @__PURE__ */ a(J.Content, { ref: o, ...l, children: /* @__PURE__ */ a(
|
|
309
|
+
ln,
|
|
271
310
|
{
|
|
272
|
-
closeDialog:
|
|
311
|
+
closeDialog: m,
|
|
273
312
|
content: t,
|
|
274
313
|
title: i,
|
|
275
|
-
description:
|
|
314
|
+
description: r
|
|
276
315
|
}
|
|
277
316
|
) })
|
|
278
317
|
] });
|
|
279
318
|
})
|
|
280
|
-
),
|
|
281
|
-
const { title:
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
319
|
+
), Je = (e) => /* @__PURE__ */ a(K.Title, { mb: "0", ...e }), un = (e) => {
|
|
320
|
+
const { title: o, description: n, actionText: t = "Confirm", cancelText: i = "Cancel", onAction: r, onCancel: c, severity: s } = e;
|
|
321
|
+
return /* @__PURE__ */ _(T, { direction: "column", gap: "2", children: [
|
|
322
|
+
/* @__PURE__ */ _(T, { direction: "column", gap: "1", children: [
|
|
323
|
+
/* @__PURE__ */ a(Je, { children: o }),
|
|
324
|
+
/* @__PURE__ */ a(K.Description, { children: n })
|
|
286
325
|
] }),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ _(T, { gap: "3", mt: "4", justify: "end", children: [
|
|
327
|
+
/* @__PURE__ */ a(K.Cancel, { children: /* @__PURE__ */ a(ye, { variant: "soft", severity: "info", onClick: c, children: i }) }),
|
|
328
|
+
/* @__PURE__ */ a(K.Action, { children: /* @__PURE__ */ a(ye, { variant: "solid", severity: s, onClick: r, children: t }) })
|
|
290
329
|
] })
|
|
291
330
|
] });
|
|
292
|
-
},
|
|
293
|
-
const { open:
|
|
331
|
+
}, dn = C(function(o) {
|
|
332
|
+
const { open: n, setOpen: t, children: i, ...r } = o, c = D(() => ({
|
|
294
333
|
close: () => t(!1),
|
|
295
|
-
Title:
|
|
296
|
-
Description:
|
|
334
|
+
Title: Je,
|
|
335
|
+
Description: K.Description
|
|
297
336
|
}), [t]);
|
|
298
|
-
return /* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */
|
|
337
|
+
return /* @__PURE__ */ _(K.Root, { open: n, onOpenChange: t, children: [
|
|
338
|
+
/* @__PURE__ */ a(K.Content, { children: "content" in r ? r.content(c) : /* @__PURE__ */ a(un, { ...r }) }),
|
|
300
339
|
i
|
|
301
340
|
] });
|
|
302
|
-
}),
|
|
341
|
+
}), et = ce(() => {
|
|
303
342
|
throw new Error("No AlertDialogProvider found");
|
|
304
|
-
}),
|
|
343
|
+
}), hn = {
|
|
305
344
|
content: () => null
|
|
306
|
-
},
|
|
307
|
-
const [
|
|
308
|
-
(
|
|
309
|
-
if (
|
|
345
|
+
}, Rr = C(function({ children: o }) {
|
|
346
|
+
const [n, t] = S(!1), [i, r] = S(hn), c = x(
|
|
347
|
+
(s) => {
|
|
348
|
+
if (n)
|
|
310
349
|
throw new Error("AlertDialog is already open");
|
|
311
|
-
|
|
350
|
+
r(s), t(!0);
|
|
312
351
|
},
|
|
313
|
-
[
|
|
352
|
+
[n]
|
|
314
353
|
);
|
|
315
|
-
return /* @__PURE__ */
|
|
316
|
-
}),
|
|
317
|
-
const
|
|
318
|
-
return
|
|
319
|
-
(
|
|
354
|
+
return /* @__PURE__ */ a(dn, { open: n, setOpen: t, ...i, children: /* @__PURE__ */ a(et.Provider, { value: c, children: o }) });
|
|
355
|
+
}), fn = () => Se(et), Or = () => {
|
|
356
|
+
const e = fn();
|
|
357
|
+
return x(
|
|
358
|
+
(o) => e({
|
|
320
359
|
title: "Discard changes?",
|
|
321
360
|
description: "You have unsaved changes. Are you sure you want to discard them?",
|
|
322
361
|
actionText: "Discard",
|
|
323
362
|
severity: "danger",
|
|
324
|
-
onAction:
|
|
325
|
-
onCancel:
|
|
363
|
+
onAction: o.onDiscard,
|
|
364
|
+
onCancel: o.onCancel
|
|
326
365
|
}),
|
|
327
|
-
[
|
|
366
|
+
[e]
|
|
328
367
|
);
|
|
329
|
-
},
|
|
330
|
-
zeroMinWidth:
|
|
331
|
-
zeroMinHeight:
|
|
332
|
-
radius:
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
({ className:
|
|
336
|
-
|
|
368
|
+
}, pn = "_zeroMinWidth_curjh_1", mn = "_zeroMinHeight_curjh_5", gn = "_radius_curjh_9", Pe = {
|
|
369
|
+
zeroMinWidth: pn,
|
|
370
|
+
zeroMinHeight: mn,
|
|
371
|
+
radius: gn
|
|
372
|
+
}, De = C(
|
|
373
|
+
b(
|
|
374
|
+
({ className: e, radius: o = !1, children: n, zeroMinWidth: t = !1, zeroMinHeight: i = !1, ...r }, c) => /* @__PURE__ */ a(
|
|
375
|
+
T,
|
|
337
376
|
{
|
|
338
|
-
className:
|
|
339
|
-
[
|
|
340
|
-
[
|
|
341
|
-
[
|
|
377
|
+
className: $(e, {
|
|
378
|
+
[Pe.radius]: o,
|
|
379
|
+
[Pe.zeroMinWidth]: t,
|
|
380
|
+
[Pe.zeroMinHeight]: i
|
|
342
381
|
}),
|
|
343
382
|
ref: c,
|
|
344
|
-
...
|
|
345
|
-
children:
|
|
383
|
+
...r,
|
|
384
|
+
children: n
|
|
346
385
|
}
|
|
347
386
|
)
|
|
348
387
|
)
|
|
349
|
-
),
|
|
350
|
-
severity:
|
|
351
|
-
itemContent:
|
|
388
|
+
), vn = C(function({
|
|
389
|
+
severity: o,
|
|
390
|
+
itemContent: n,
|
|
352
391
|
closeOnSelect: t = !0,
|
|
353
392
|
onSelect: i,
|
|
354
|
-
...
|
|
393
|
+
...r
|
|
355
394
|
}) {
|
|
356
|
-
const c =
|
|
395
|
+
const c = A(o), s = x(
|
|
357
396
|
(u) => {
|
|
358
397
|
t || u.preventDefault(), i && i(u);
|
|
359
398
|
},
|
|
360
399
|
[t, i]
|
|
361
400
|
);
|
|
362
|
-
return /* @__PURE__ */
|
|
363
|
-
}),
|
|
364
|
-
defaultOpen:
|
|
365
|
-
open:
|
|
401
|
+
return /* @__PURE__ */ a(M.Item, { onSelect: s, color: c, ...r, children: n });
|
|
402
|
+
}), Cn = C(function({
|
|
403
|
+
defaultOpen: o,
|
|
404
|
+
open: n,
|
|
366
405
|
onOpenChange: t,
|
|
367
406
|
modal: i,
|
|
368
|
-
trigger:
|
|
407
|
+
trigger: r,
|
|
369
408
|
label: c,
|
|
370
|
-
severity:
|
|
409
|
+
severity: s = "info",
|
|
371
410
|
children: u,
|
|
372
411
|
...l
|
|
373
412
|
}) {
|
|
374
|
-
const h =
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
c && /* @__PURE__ */
|
|
413
|
+
const h = A(s);
|
|
414
|
+
return /* @__PURE__ */ _(M.Root, { defaultOpen: o, open: n, onOpenChange: t, modal: i, children: [
|
|
415
|
+
/* @__PURE__ */ a(M.Trigger, { children: r }),
|
|
416
|
+
/* @__PURE__ */ _(M.Content, { color: h, ...l, children: [
|
|
417
|
+
c && /* @__PURE__ */ a(M.Label, { children: c }),
|
|
379
418
|
u
|
|
380
419
|
] })
|
|
381
420
|
] });
|
|
382
|
-
}),
|
|
383
|
-
separatorBelow:
|
|
384
|
-
separatorAbove:
|
|
421
|
+
}), _n = C(function({
|
|
422
|
+
separatorBelow: o = !1,
|
|
423
|
+
separatorAbove: n = !1,
|
|
385
424
|
children: t,
|
|
386
425
|
...i
|
|
387
426
|
}) {
|
|
388
|
-
return /* @__PURE__ */
|
|
389
|
-
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
|
|
427
|
+
return /* @__PURE__ */ _(F, { children: [
|
|
428
|
+
n && /* @__PURE__ */ a(M.Separator, {}),
|
|
429
|
+
/* @__PURE__ */ a(M.Group, { ...i, children: t }),
|
|
430
|
+
o && /* @__PURE__ */ a(M.Separator, {})
|
|
392
431
|
] });
|
|
393
|
-
}),
|
|
394
|
-
defaultOpen:
|
|
395
|
-
open:
|
|
432
|
+
}), bn = C(function({
|
|
433
|
+
defaultOpen: o,
|
|
434
|
+
open: n,
|
|
396
435
|
onOpenChange: t,
|
|
397
436
|
trigger: i,
|
|
398
|
-
children:
|
|
437
|
+
children: r,
|
|
399
438
|
...c
|
|
400
439
|
}) {
|
|
401
|
-
return /* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ _(M.Sub, { defaultOpen: o, open: n, onOpenChange: t, children: [
|
|
441
|
+
/* @__PURE__ */ a(M.SubTrigger, { children: i }),
|
|
442
|
+
/* @__PURE__ */ a(M.SubContent, { ...c, children: r })
|
|
404
443
|
] });
|
|
405
|
-
}),
|
|
406
|
-
Root:
|
|
407
|
-
ItemGroup:
|
|
408
|
-
Item:
|
|
409
|
-
SubMenu:
|
|
410
|
-
},
|
|
411
|
-
const [
|
|
444
|
+
}), zr = {
|
|
445
|
+
Root: Cn,
|
|
446
|
+
ItemGroup: _n,
|
|
447
|
+
Item: vn,
|
|
448
|
+
SubMenu: bn
|
|
449
|
+
}, xn = C(function({ children: o }) {
|
|
450
|
+
const [n, t] = S(!1), i = x(() => {
|
|
412
451
|
t(!0);
|
|
413
|
-
}, []),
|
|
452
|
+
}, []), r = x(() => {
|
|
414
453
|
t(!1);
|
|
415
454
|
}, []);
|
|
416
|
-
return
|
|
417
|
-
isHovered:
|
|
455
|
+
return o({
|
|
456
|
+
isHovered: n,
|
|
418
457
|
onPointerEnter: i,
|
|
419
|
-
onPointerLeave:
|
|
458
|
+
onPointerLeave: r
|
|
420
459
|
});
|
|
421
|
-
}),
|
|
422
|
-
fluid:
|
|
423
|
-
},
|
|
424
|
-
className:
|
|
425
|
-
fluid:
|
|
460
|
+
}), $n = "_fluid_7n1wr_1", He = {
|
|
461
|
+
fluid: $n
|
|
462
|
+
}, yn = b(function({
|
|
463
|
+
className: o,
|
|
464
|
+
fluid: n,
|
|
426
465
|
size: t = "medium",
|
|
427
466
|
variant: i = "surface",
|
|
428
|
-
severity:
|
|
467
|
+
severity: r = "primary",
|
|
429
468
|
itemSeverity: c = "info",
|
|
430
|
-
placeholder:
|
|
469
|
+
placeholder: s = "Select",
|
|
431
470
|
side: u,
|
|
432
471
|
items: l = [],
|
|
433
472
|
value: h,
|
|
434
|
-
id:
|
|
435
|
-
...
|
|
436
|
-
},
|
|
437
|
-
const
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
|
|
473
|
+
id: d,
|
|
474
|
+
...p
|
|
475
|
+
}, m) {
|
|
476
|
+
const f = G(t, oe), v = A(r), g = A(c);
|
|
477
|
+
return /* @__PURE__ */ z(j.Root, { size: f, ...p, key: h === void 0 ? 1 : 0, value: h }, /* @__PURE__ */ a(
|
|
478
|
+
j.Trigger,
|
|
440
479
|
{
|
|
441
|
-
className:
|
|
442
|
-
[
|
|
480
|
+
className: $(o, {
|
|
481
|
+
[He.fluid]: n
|
|
443
482
|
}),
|
|
444
|
-
id:
|
|
445
|
-
ref:
|
|
483
|
+
id: d,
|
|
484
|
+
ref: m,
|
|
446
485
|
variant: i,
|
|
447
|
-
placeholder:
|
|
448
|
-
color:
|
|
486
|
+
placeholder: s,
|
|
487
|
+
color: v
|
|
449
488
|
}
|
|
450
|
-
), /* @__PURE__ */
|
|
451
|
-
|
|
489
|
+
), /* @__PURE__ */ a(
|
|
490
|
+
j.Content,
|
|
452
491
|
{
|
|
453
492
|
side: u,
|
|
454
|
-
className:
|
|
493
|
+
className: He.contentDefault,
|
|
455
494
|
position: "popper",
|
|
456
495
|
variant: i !== "surface" ? "soft" : "solid",
|
|
457
|
-
color:
|
|
458
|
-
children: l.map(({ itemContent:
|
|
496
|
+
color: g,
|
|
497
|
+
children: l.map(({ itemContent: k, value: y, ...w }) => /* @__PURE__ */ a(j.Item, { className: "overmap-select-item", value: y, ...w, children: k }, y))
|
|
459
498
|
}
|
|
460
499
|
));
|
|
461
|
-
}),
|
|
462
|
-
|
|
463
|
-
const { checked:
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
500
|
+
}), Dr = V.memo(yn), je = C(
|
|
501
|
+
b((e, o) => {
|
|
502
|
+
const { checked: n, label: t, value: i, size: r = "2" } = e;
|
|
503
|
+
return /* @__PURE__ */ a(ne, { asChild: !0, px: r, children: /* @__PURE__ */ a(j.Item, { value: i, ref: o, children: /* @__PURE__ */ _(T, { gap: r, align: "center", children: [
|
|
504
|
+
/* @__PURE__ */ a(kt, { checked: n }),
|
|
466
505
|
t
|
|
467
506
|
] }) }) });
|
|
468
507
|
})
|
|
469
|
-
),
|
|
470
|
-
|
|
471
|
-
const [
|
|
508
|
+
), Ce = "__select_all__", Ir = C(
|
|
509
|
+
b((e, o) => {
|
|
510
|
+
const [n, t] = S(!1), { placeholder: i, value: r, onValueChange: c, options: s, disabled: u, name: l, ...h } = e, d = G(e.size, oe), p = A(e.severity), m = D(() => new Map(s.map((y) => [y.value, y.label])), [s]), f = r.length > 4 ? (
|
|
472
511
|
// to ensure the width of the select doesn't get too big
|
|
473
|
-
`${
|
|
512
|
+
`${r.length} options selected`
|
|
474
513
|
) : (
|
|
475
514
|
// convert the values to labels
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
),
|
|
478
|
-
|
|
479
|
-
}, []),
|
|
480
|
-
(
|
|
481
|
-
let
|
|
482
|
-
|
|
515
|
+
/* @__PURE__ */ a("span", { children: r.flatMap((y) => [m.get(y), ", "]).slice(0, -1) })
|
|
516
|
+
), v = x(() => t(!1), []), g = x((y) => {
|
|
517
|
+
y && t(!0);
|
|
518
|
+
}, []), k = x(
|
|
519
|
+
(y) => {
|
|
520
|
+
let w;
|
|
521
|
+
y === Ce ? w = r.length === s.length ? [] : s.map((X) => X.value) : w = r.includes(y) ? r.filter((R) => R !== y) : [...r, y], c(w);
|
|
483
522
|
},
|
|
484
|
-
[c,
|
|
523
|
+
[c, s, r]
|
|
485
524
|
);
|
|
486
|
-
return
|
|
487
|
-
if (
|
|
488
|
-
throw new Error(`Cannot have an option with the value "${
|
|
489
|
-
}, [
|
|
490
|
-
|
|
525
|
+
return N(() => {
|
|
526
|
+
if (s.some(({ value: y }) => y === Ce))
|
|
527
|
+
throw new Error(`Cannot have an option with the value "${Ce}"`);
|
|
528
|
+
}, [s]), /* @__PURE__ */ _(
|
|
529
|
+
j.Root,
|
|
491
530
|
{
|
|
492
|
-
open:
|
|
531
|
+
open: n,
|
|
493
532
|
value: "",
|
|
494
|
-
onOpenChange:
|
|
495
|
-
onValueChange:
|
|
533
|
+
onOpenChange: g,
|
|
534
|
+
onValueChange: k,
|
|
496
535
|
disabled: u,
|
|
497
|
-
size:
|
|
536
|
+
size: d,
|
|
498
537
|
name: l,
|
|
499
538
|
autoComplete: "off",
|
|
500
539
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
|
|
540
|
+
/* @__PURE__ */ a(
|
|
541
|
+
j.Trigger,
|
|
503
542
|
{
|
|
504
|
-
ref:
|
|
505
|
-
color:
|
|
506
|
-
placeholder:
|
|
507
|
-
"data-placeholder":
|
|
543
|
+
ref: o,
|
|
544
|
+
color: p,
|
|
545
|
+
placeholder: r.length > 0 ? f : i,
|
|
546
|
+
"data-placeholder": r.length > 0 ? void 0 : !0,
|
|
508
547
|
...h
|
|
509
548
|
}
|
|
510
549
|
),
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
|
|
550
|
+
/* @__PURE__ */ _(
|
|
551
|
+
j.Content,
|
|
513
552
|
{
|
|
514
553
|
color: "gray",
|
|
515
554
|
variant: "soft",
|
|
516
555
|
position: "popper",
|
|
517
|
-
onEscapeKeyDown:
|
|
518
|
-
onPointerDownOutside:
|
|
556
|
+
onEscapeKeyDown: v,
|
|
557
|
+
onPointerDownOutside: v,
|
|
519
558
|
children: [
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
|
|
559
|
+
/* @__PURE__ */ a(
|
|
560
|
+
je,
|
|
522
561
|
{
|
|
523
|
-
value:
|
|
562
|
+
value: Ce,
|
|
524
563
|
label: "Select all",
|
|
525
|
-
checked:
|
|
526
|
-
size:
|
|
564
|
+
checked: r.length === s.length,
|
|
565
|
+
size: d
|
|
527
566
|
}
|
|
528
567
|
),
|
|
529
|
-
|
|
530
|
-
|
|
568
|
+
s.map((y) => /* @__PURE__ */ a(
|
|
569
|
+
je,
|
|
531
570
|
{
|
|
532
|
-
...
|
|
533
|
-
checked:
|
|
534
|
-
size:
|
|
571
|
+
...y,
|
|
572
|
+
checked: r.includes(y.value),
|
|
573
|
+
size: d
|
|
535
574
|
},
|
|
536
|
-
|
|
575
|
+
y.value
|
|
537
576
|
))
|
|
538
577
|
]
|
|
539
578
|
}
|
|
@@ -542,84 +581,84 @@ const gt = {
|
|
|
542
581
|
}
|
|
543
582
|
);
|
|
544
583
|
})
|
|
545
|
-
),
|
|
584
|
+
), wn = {
|
|
546
585
|
default: "_default_u936h_1"
|
|
547
|
-
},
|
|
548
|
-
const u =
|
|
549
|
-
|
|
550
|
-
var
|
|
551
|
-
const
|
|
552
|
-
"current" in
|
|
553
|
-
}, [
|
|
554
|
-
const
|
|
555
|
-
(
|
|
556
|
-
h(
|
|
586
|
+
}, Sn = b(function({ className: o, severity: n = "primary", icon: t, defaultChecked: i = !1, onCheckedChange: r, ...c }, s) {
|
|
587
|
+
const u = O(null), [l, h] = S(c.checked ? c.checked : i), [d, p] = S(), m = A(n);
|
|
588
|
+
Re(() => {
|
|
589
|
+
var k;
|
|
590
|
+
const g = s || u;
|
|
591
|
+
"current" in g && g.current && p((k = g.current) == null ? void 0 : k.querySelector("span.rt-SwitchThumb"));
|
|
592
|
+
}, [s]);
|
|
593
|
+
const f = x(
|
|
594
|
+
(g) => {
|
|
595
|
+
h(g), r && r(g);
|
|
557
596
|
},
|
|
558
|
-
[
|
|
559
|
-
),
|
|
560
|
-
return /* @__PURE__ */
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
|
|
597
|
+
[r]
|
|
598
|
+
), v = c.checked ? c.checked : l;
|
|
599
|
+
return /* @__PURE__ */ _(F, { children: [
|
|
600
|
+
/* @__PURE__ */ a(
|
|
601
|
+
Pt,
|
|
563
602
|
{
|
|
564
|
-
className:
|
|
565
|
-
ref:
|
|
566
|
-
color:
|
|
603
|
+
className: $("overmap-switch", o, wn.default),
|
|
604
|
+
ref: s || u,
|
|
605
|
+
color: m,
|
|
567
606
|
radius: "full",
|
|
568
607
|
defaultChecked: i,
|
|
569
|
-
onCheckedChange:
|
|
608
|
+
onCheckedChange: f,
|
|
570
609
|
...c
|
|
571
610
|
}
|
|
572
611
|
),
|
|
573
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ a(Tt, { container: d, asChild: !0, children: t && "checked" in t ? v ? t.checked : t.unchecked : t })
|
|
574
613
|
] });
|
|
575
|
-
}),
|
|
576
|
-
sidebarContent:
|
|
577
|
-
right:
|
|
578
|
-
resizeHandle:
|
|
579
|
-
left:
|
|
580
|
-
overlay:
|
|
581
|
-
},
|
|
582
|
-
side:
|
|
583
|
-
modal:
|
|
614
|
+
}), Er = C(Sn), kn = "_sidebarContent_1onyo_1", Pn = "_right_1onyo_7", Tn = "_resizeHandle_1onyo_10", Nn = "_left_1onyo_13", An = "_overlay_1onyo_33", Q = {
|
|
615
|
+
sidebarContent: kn,
|
|
616
|
+
right: Pn,
|
|
617
|
+
resizeHandle: Tn,
|
|
618
|
+
left: Nn,
|
|
619
|
+
overlay: An
|
|
620
|
+
}, Rn = { width: "auto", height: "100%" }, On = b(function({
|
|
621
|
+
side: o = "left",
|
|
622
|
+
modal: n = !0,
|
|
584
623
|
children: t,
|
|
585
624
|
open: i,
|
|
586
|
-
containerSelector:
|
|
625
|
+
containerSelector: r,
|
|
587
626
|
overlay: c = !0,
|
|
588
|
-
resizable:
|
|
627
|
+
resizable: s = !0,
|
|
589
628
|
// Props related to Resizable
|
|
590
629
|
minWidth: u = "300px",
|
|
591
630
|
maxWidth: l = "500px",
|
|
592
631
|
...h
|
|
593
|
-
},
|
|
594
|
-
const
|
|
595
|
-
return
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
throw new Error(`Could not find a container element using the following selector ${
|
|
599
|
-
|
|
600
|
-
}, [
|
|
601
|
-
c && /* @__PURE__ */
|
|
602
|
-
/* @__PURE__ */
|
|
603
|
-
|
|
632
|
+
}, d) {
|
|
633
|
+
const p = o === "right", m = o === "left", [f, v] = S();
|
|
634
|
+
return N(() => {
|
|
635
|
+
const g = r ?? '[data-is-root-theme="true"]', k = document.querySelector(g);
|
|
636
|
+
if (k === void 0)
|
|
637
|
+
throw new Error(`Could not find a container element using the following selector ${g}`);
|
|
638
|
+
v(k);
|
|
639
|
+
}, [r]), /* @__PURE__ */ a(ve.Root, { open: i, modal: n, children: /* @__PURE__ */ _(ve.Portal, { container: f, children: [
|
|
640
|
+
c && /* @__PURE__ */ a(ve.Overlay, { className: $(Q.overlay) }),
|
|
641
|
+
/* @__PURE__ */ a(
|
|
642
|
+
ve.Content,
|
|
604
643
|
{
|
|
605
|
-
className:
|
|
606
|
-
[
|
|
607
|
-
[
|
|
644
|
+
className: $("overmap-sidebar", "rt-DialogContent", Q.sidebarContent, {
|
|
645
|
+
[Q.left]: m,
|
|
646
|
+
[Q.right]: p
|
|
608
647
|
}),
|
|
609
|
-
ref:
|
|
648
|
+
ref: d,
|
|
610
649
|
asChild: !0,
|
|
611
650
|
...h,
|
|
612
|
-
children: /* @__PURE__ */
|
|
613
|
-
|
|
651
|
+
children: /* @__PURE__ */ a(ne, { width: "auto", children: /* @__PURE__ */ a(
|
|
652
|
+
$e,
|
|
614
653
|
{
|
|
615
654
|
minWidth: u,
|
|
616
655
|
maxWidth: l,
|
|
617
|
-
defaultSize:
|
|
618
|
-
enable: { right:
|
|
619
|
-
handleClasses: { left:
|
|
656
|
+
defaultSize: Rn,
|
|
657
|
+
enable: { right: s && m, left: s && p },
|
|
658
|
+
handleClasses: { left: Q.resizeHandle, right: Q.resizeHandle },
|
|
620
659
|
handleComponent: {
|
|
621
|
-
right: /* @__PURE__ */
|
|
622
|
-
left: /* @__PURE__ */
|
|
660
|
+
right: /* @__PURE__ */ a(be, {}),
|
|
661
|
+
left: /* @__PURE__ */ a(be, {})
|
|
623
662
|
},
|
|
624
663
|
children: t
|
|
625
664
|
}
|
|
@@ -627,77 +666,77 @@ const gt = {
|
|
|
627
666
|
}
|
|
628
667
|
)
|
|
629
668
|
] }) });
|
|
630
|
-
}),
|
|
631
|
-
outerContent:
|
|
632
|
-
enter:
|
|
633
|
-
right:
|
|
634
|
-
left:
|
|
635
|
-
enterActive:
|
|
636
|
-
exitActive:
|
|
637
|
-
exitDone:
|
|
638
|
-
resizable:
|
|
639
|
-
slideOutOverlay:
|
|
640
|
-
},
|
|
641
|
-
className:
|
|
642
|
-
open:
|
|
669
|
+
}), Mr = C(On), zn = "_outerContent_1iy9c_1", Dn = "_enter_1iy9c_4", In = "_right_1iy9c_4", En = "_left_1iy9c_8", Mn = "_enterActive_1iy9c_12", Ln = "_exitActive_1iy9c_22", Bn = "_exitDone_1iy9c_32", Wn = "_resizable_1iy9c_41", Hn = "_slideOutOverlay_1iy9c_47", W = {
|
|
670
|
+
outerContent: zn,
|
|
671
|
+
enter: Dn,
|
|
672
|
+
right: In,
|
|
673
|
+
left: En,
|
|
674
|
+
enterActive: Mn,
|
|
675
|
+
exitActive: Ln,
|
|
676
|
+
exitDone: Bn,
|
|
677
|
+
resizable: Wn,
|
|
678
|
+
slideOutOverlay: Hn
|
|
679
|
+
}, jn = 200, Lr = C(function({
|
|
680
|
+
className: o,
|
|
681
|
+
open: n,
|
|
643
682
|
side: t = "left",
|
|
644
683
|
children: i,
|
|
645
|
-
minWidth:
|
|
684
|
+
minWidth: r,
|
|
646
685
|
maxWidth: c,
|
|
647
|
-
resizable:
|
|
686
|
+
resizable: s = !0,
|
|
648
687
|
overlay: u = !1,
|
|
649
688
|
modal: l = !1,
|
|
650
689
|
resizeHandle: h,
|
|
651
|
-
position:
|
|
652
|
-
...
|
|
690
|
+
position: d = "absolute",
|
|
691
|
+
...p
|
|
653
692
|
}) {
|
|
654
|
-
const
|
|
655
|
-
(
|
|
656
|
-
|
|
693
|
+
const m = O(null), [f, v] = S(r), g = t === "left", k = t === "right", y = x(
|
|
694
|
+
(w, R, X, Ie) => {
|
|
695
|
+
v(X.clientWidth), m.current && (m.current.style.width = `${X.clientWidth}px`);
|
|
657
696
|
},
|
|
658
697
|
[]
|
|
659
698
|
);
|
|
660
|
-
return /* @__PURE__ */
|
|
661
|
-
|
|
699
|
+
return /* @__PURE__ */ a(
|
|
700
|
+
It,
|
|
662
701
|
{
|
|
663
|
-
in:
|
|
702
|
+
in: n,
|
|
664
703
|
classNames: {
|
|
665
|
-
enter:
|
|
666
|
-
enterActive:
|
|
667
|
-
exitActive:
|
|
668
|
-
exitDone:
|
|
704
|
+
enter: W.enter,
|
|
705
|
+
enterActive: W.enterActive,
|
|
706
|
+
exitActive: W.exitActive,
|
|
707
|
+
exitDone: W.exitDone
|
|
669
708
|
},
|
|
670
|
-
timeout:
|
|
671
|
-
nodeRef:
|
|
709
|
+
timeout: jn,
|
|
710
|
+
nodeRef: m,
|
|
672
711
|
unmountOnExit: !0,
|
|
673
712
|
mountOnEnter: !0,
|
|
674
|
-
children: /* @__PURE__ */
|
|
675
|
-
u && /* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
|
|
713
|
+
children: /* @__PURE__ */ _(F, { children: [
|
|
714
|
+
u && /* @__PURE__ */ a("div", { className: $("overamp-slide-out-overlay", W.slideOutOverlay) }),
|
|
715
|
+
/* @__PURE__ */ a(Dt, { disableOutsidePointerEvents: l, asChild: !0, ...p, children: /* @__PURE__ */ a(
|
|
716
|
+
T,
|
|
678
717
|
{
|
|
679
|
-
className:
|
|
680
|
-
[
|
|
681
|
-
[
|
|
718
|
+
className: $("overmap-slide-out", o, W.outerContent, {
|
|
719
|
+
[W.left]: g,
|
|
720
|
+
[W.right]: k
|
|
682
721
|
}),
|
|
683
|
-
style: { "--slide-out-width": `${
|
|
722
|
+
style: { "--slide-out-width": `${f}px` },
|
|
684
723
|
height: "100%",
|
|
685
724
|
width: "auto",
|
|
686
|
-
position:
|
|
725
|
+
position: d,
|
|
687
726
|
top: "0",
|
|
688
727
|
bottom: "0",
|
|
689
|
-
left:
|
|
690
|
-
right:
|
|
691
|
-
ref:
|
|
692
|
-
children: /* @__PURE__ */
|
|
693
|
-
|
|
728
|
+
left: g ? "0" : void 0,
|
|
729
|
+
right: k ? "0" : void 0,
|
|
730
|
+
ref: m,
|
|
731
|
+
children: /* @__PURE__ */ a(
|
|
732
|
+
$e,
|
|
694
733
|
{
|
|
695
|
-
className:
|
|
696
|
-
defaultSize: { width:
|
|
697
|
-
onResize:
|
|
698
|
-
enable: { right:
|
|
734
|
+
className: W.resizable,
|
|
735
|
+
defaultSize: { width: f, height: "100%" },
|
|
736
|
+
onResize: y,
|
|
737
|
+
enable: { right: s && g, left: s && k },
|
|
699
738
|
handleComponent: { left: h, right: h },
|
|
700
|
-
minWidth:
|
|
739
|
+
minWidth: r,
|
|
701
740
|
maxWidth: c,
|
|
702
741
|
children: i
|
|
703
742
|
}
|
|
@@ -707,214 +746,214 @@ const gt = {
|
|
|
707
746
|
] })
|
|
708
747
|
}
|
|
709
748
|
);
|
|
710
|
-
}),
|
|
711
|
-
accommodateCharCount:
|
|
712
|
-
wrapper:
|
|
749
|
+
}), Fn = "_accommodateCharCount_sr18k_1", Vn = "_wrapper_sr18k_5", Un = "_noLeftIcon_sr18k_13", Gn = "_noRightIcon_sr18k_17", Kn = "_charCount_sr18k_21", Y = {
|
|
750
|
+
accommodateCharCount: Fn,
|
|
751
|
+
wrapper: Vn,
|
|
713
752
|
default: "_default_sr18k_9",
|
|
714
|
-
noLeftIcon:
|
|
715
|
-
noRightIcon:
|
|
716
|
-
charCount:
|
|
717
|
-
},
|
|
718
|
-
className:
|
|
719
|
-
leftSlot:
|
|
753
|
+
noLeftIcon: Un,
|
|
754
|
+
noRightIcon: Gn,
|
|
755
|
+
charCount: Kn
|
|
756
|
+
}, qn = b(function({
|
|
757
|
+
className: o,
|
|
758
|
+
leftSlot: n,
|
|
720
759
|
rightSlot: t,
|
|
721
760
|
size: i = "medium",
|
|
722
|
-
showInputLength:
|
|
761
|
+
showInputLength: r,
|
|
723
762
|
value: c,
|
|
724
|
-
variant:
|
|
763
|
+
variant: s,
|
|
725
764
|
severity: u = "primary",
|
|
726
765
|
...l
|
|
727
766
|
}, h) {
|
|
728
|
-
const
|
|
729
|
-
return /* @__PURE__ */
|
|
730
|
-
|
|
767
|
+
const d = G(i, oe), p = A(u), m = r || r === void 0 && l.maxLength !== void 0, f = c !== void 0 ? c.toString() : void 0;
|
|
768
|
+
return /* @__PURE__ */ _(
|
|
769
|
+
pe.Root,
|
|
731
770
|
{
|
|
732
|
-
className:
|
|
733
|
-
[
|
|
771
|
+
className: $(Y.wrapper, {
|
|
772
|
+
[Y.accommodateCharCount]: m
|
|
734
773
|
}),
|
|
735
|
-
size:
|
|
736
|
-
variant:
|
|
737
|
-
color:
|
|
774
|
+
size: d,
|
|
775
|
+
variant: s,
|
|
776
|
+
color: p,
|
|
738
777
|
children: [
|
|
739
|
-
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
|
|
778
|
+
n && /* @__PURE__ */ a(pe.Slot, { children: n }),
|
|
779
|
+
/* @__PURE__ */ a(
|
|
780
|
+
pe.Input,
|
|
742
781
|
{
|
|
743
|
-
className:
|
|
744
|
-
[
|
|
745
|
-
[
|
|
782
|
+
className: $(Y.default, o, {
|
|
783
|
+
[Y.noLeftIcon]: !n,
|
|
784
|
+
[Y.noRightIcon]: !t
|
|
746
785
|
}),
|
|
747
786
|
ref: h,
|
|
748
|
-
size:
|
|
749
|
-
variant:
|
|
750
|
-
color:
|
|
787
|
+
size: d,
|
|
788
|
+
variant: s,
|
|
789
|
+
color: p,
|
|
751
790
|
...l
|
|
752
791
|
}
|
|
753
792
|
),
|
|
754
|
-
t && /* @__PURE__ */
|
|
755
|
-
|
|
793
|
+
t && /* @__PURE__ */ a(pe.Slot, { children: t }),
|
|
794
|
+
m && /* @__PURE__ */ a(we, { as: "p", className: Y.charCount, size: "1", color: "gray", children: l.maxLength !== void 0 ? `${f == null ? void 0 : f.length}/${l.maxLength}` : `${f == null ? void 0 : f.length}` })
|
|
756
795
|
]
|
|
757
796
|
}
|
|
758
797
|
);
|
|
759
|
-
}),
|
|
760
|
-
wrapper:
|
|
761
|
-
},
|
|
762
|
-
return /* @__PURE__ */
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
|
|
798
|
+
}), Br = V.memo(qn), Xn = "_wrapper_tmtz0_1", Qn = {
|
|
799
|
+
wrapper: Xn
|
|
800
|
+
}, Yn = b(function({ className: o, defaultOpen: n = !1, modal: t = !1, content: i, children: r, ...c }, s) {
|
|
801
|
+
return /* @__PURE__ */ _(me.Root, { defaultOpen: n, modal: t, children: [
|
|
802
|
+
/* @__PURE__ */ a(me.Trigger, { children: r }),
|
|
803
|
+
/* @__PURE__ */ a(
|
|
804
|
+
me.Content,
|
|
766
805
|
{
|
|
767
|
-
ref:
|
|
768
|
-
className:
|
|
806
|
+
ref: s,
|
|
807
|
+
className: $("overmap-popover", o, Qn.wrapper),
|
|
769
808
|
...c,
|
|
770
|
-
children: i(
|
|
809
|
+
children: i(me.Close)
|
|
771
810
|
}
|
|
772
811
|
)
|
|
773
812
|
] });
|
|
774
|
-
}),
|
|
775
|
-
wrapper:
|
|
776
|
-
panelContent:
|
|
777
|
-
left:
|
|
778
|
-
right:
|
|
779
|
-
resizable:
|
|
780
|
-
resizeHandle:
|
|
781
|
-
panelMainContent:
|
|
782
|
-
},
|
|
783
|
-
children:
|
|
784
|
-
showLeft:
|
|
813
|
+
}), Zn = V.memo(Yn), Jn = "_wrapper_1ssf2_1", eo = "_panelContent_1ssf2_6", to = "_left_1ssf2_14", no = "_right_1ssf2_18", oo = "_resizable_1ssf2_23", ro = "_resizeHandle_1ssf2_28", io = "_panelMainContent_1ssf2_48", E = {
|
|
814
|
+
wrapper: Jn,
|
|
815
|
+
panelContent: eo,
|
|
816
|
+
left: to,
|
|
817
|
+
right: no,
|
|
818
|
+
resizable: oo,
|
|
819
|
+
resizeHandle: ro,
|
|
820
|
+
panelMainContent: io
|
|
821
|
+
}, Fe = 200, H = 150, Wr = C(function({
|
|
822
|
+
children: o,
|
|
823
|
+
showLeft: n,
|
|
785
824
|
leftPanel: t,
|
|
786
|
-
leftMinWidth: i =
|
|
787
|
-
showRight:
|
|
825
|
+
leftMinWidth: i = Fe,
|
|
826
|
+
showRight: r,
|
|
788
827
|
rightPanel: c,
|
|
789
|
-
rightMinWidth:
|
|
828
|
+
rightMinWidth: s = Fe,
|
|
790
829
|
resizeable: u
|
|
791
830
|
}) {
|
|
792
|
-
const l =
|
|
793
|
-
(
|
|
831
|
+
const l = O(null), h = O(null), [d, p] = S(0), [m, f] = S(), v = O(null), [g, k] = S(0), [y, w] = S(), R = x(
|
|
832
|
+
(P, I, L) => (B, Me, Le, ke) => {
|
|
794
833
|
if (!l.current)
|
|
795
834
|
return;
|
|
796
|
-
const
|
|
797
|
-
|
|
835
|
+
const ue = P + ke.width;
|
|
836
|
+
L(l.current.clientWidth - ue), I(() => ue);
|
|
798
837
|
},
|
|
799
838
|
[]
|
|
800
|
-
),
|
|
801
|
-
(
|
|
802
|
-
[
|
|
803
|
-
),
|
|
804
|
-
(
|
|
805
|
-
[
|
|
806
|
-
),
|
|
807
|
-
(
|
|
839
|
+
), X = x(
|
|
840
|
+
(P, I, L, B) => R(d, p, w)(P, I, L, B),
|
|
841
|
+
[R, d]
|
|
842
|
+
), Ie = x(
|
|
843
|
+
(P, I, L, B) => R(g, k, f)(P, I, L, B),
|
|
844
|
+
[R, g]
|
|
845
|
+
), ae = x(
|
|
846
|
+
(P, I, L, B, Me, Le, ke, ue) => {
|
|
808
847
|
if (!l.current)
|
|
809
848
|
return;
|
|
810
|
-
let
|
|
811
|
-
if (
|
|
812
|
-
const
|
|
813
|
-
|
|
849
|
+
let de = P;
|
|
850
|
+
if (de === 0 && (de = I, L(de)), Le) {
|
|
851
|
+
const he = l.current.clientWidth - de;
|
|
852
|
+
ue(he), Me > he && (ke(he), B(l.current.clientWidth - he));
|
|
814
853
|
}
|
|
815
854
|
},
|
|
816
855
|
[]
|
|
817
|
-
),
|
|
818
|
-
() =>
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
856
|
+
), ht = x(
|
|
857
|
+
() => ae(
|
|
858
|
+
g,
|
|
859
|
+
s,
|
|
860
|
+
k,
|
|
861
|
+
w,
|
|
862
|
+
d,
|
|
863
|
+
n,
|
|
823
864
|
p,
|
|
824
|
-
|
|
825
|
-
m,
|
|
826
|
-
d
|
|
865
|
+
f
|
|
827
866
|
),
|
|
828
|
-
[
|
|
829
|
-
),
|
|
830
|
-
() =>
|
|
831
|
-
p,
|
|
832
|
-
i,
|
|
833
|
-
m,
|
|
867
|
+
[ae, d, s, g, n]
|
|
868
|
+
), ft = x(
|
|
869
|
+
() => ae(
|
|
834
870
|
d,
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
871
|
+
i,
|
|
872
|
+
p,
|
|
873
|
+
f,
|
|
874
|
+
g,
|
|
875
|
+
r,
|
|
876
|
+
k,
|
|
877
|
+
w
|
|
839
878
|
),
|
|
840
|
-
[
|
|
841
|
-
),
|
|
842
|
-
(
|
|
843
|
-
l.current &&
|
|
879
|
+
[ae, i, d, g, r]
|
|
880
|
+
), le = x(
|
|
881
|
+
(P, I) => {
|
|
882
|
+
l.current && P && I(l.current.clientWidth);
|
|
844
883
|
},
|
|
845
884
|
[]
|
|
846
|
-
),
|
|
847
|
-
() =>
|
|
848
|
-
[
|
|
849
|
-
),
|
|
850
|
-
() =>
|
|
851
|
-
[
|
|
852
|
-
),
|
|
853
|
-
var
|
|
854
|
-
l.current && (
|
|
885
|
+
), pt = x(
|
|
886
|
+
() => le(n, f),
|
|
887
|
+
[le, n]
|
|
888
|
+
), mt = x(
|
|
889
|
+
() => le(r, w),
|
|
890
|
+
[le, r]
|
|
891
|
+
), Ee = x(() => {
|
|
892
|
+
var P, I, L, B;
|
|
893
|
+
l.current && (f(l.current.clientWidth - (((P = v.current) == null ? void 0 : P.clientWidth) || 0)), w(l.current.clientWidth - (((I = h.current) == null ? void 0 : I.clientWidth) || 0)), p(((L = h.current) == null ? void 0 : L.clientWidth) || 0), k(((B = v.current) == null ? void 0 : B.clientWidth) || 0));
|
|
855
894
|
}, []);
|
|
856
|
-
|
|
895
|
+
N(() => {
|
|
857
896
|
if (!l.current)
|
|
858
897
|
return;
|
|
859
|
-
const
|
|
860
|
-
return
|
|
861
|
-
|
|
898
|
+
const P = new ResizeObserver(Ee);
|
|
899
|
+
return P.observe(l.current), () => {
|
|
900
|
+
P.disconnect();
|
|
862
901
|
};
|
|
863
|
-
}, [
|
|
864
|
-
const
|
|
902
|
+
}, [Ee]);
|
|
903
|
+
const gt = D(() => ({
|
|
865
904
|
entering: {
|
|
866
|
-
transform: `translateX(-${
|
|
867
|
-
marginRight: `-${
|
|
905
|
+
transform: `translateX(-${d}px)`,
|
|
906
|
+
marginRight: `-${d}px`,
|
|
868
907
|
transitionProperty: "transform, margin-right",
|
|
869
|
-
transitionDuration: `${
|
|
908
|
+
transitionDuration: `${H}ms`,
|
|
870
909
|
transitionTimingFunction: "linear"
|
|
871
910
|
},
|
|
872
911
|
entered: {
|
|
873
912
|
transform: "translateX(0)",
|
|
874
913
|
marginRight: 0,
|
|
875
914
|
transitionProperty: "transform, margin-right",
|
|
876
|
-
transitionDuration: `${
|
|
915
|
+
transitionDuration: `${H}ms`,
|
|
877
916
|
transitionTimingFunction: "linear"
|
|
878
917
|
},
|
|
879
918
|
exiting: {
|
|
880
|
-
transform: `translateX(-${
|
|
881
|
-
marginRight: `-${
|
|
919
|
+
transform: `translateX(-${d}px)`,
|
|
920
|
+
marginRight: `-${d}px`,
|
|
882
921
|
transitionProperty: "transform, margin-right",
|
|
883
|
-
transitionDuration: `${
|
|
922
|
+
transitionDuration: `${H}ms`,
|
|
884
923
|
transitionTimingFunction: "linear"
|
|
885
924
|
},
|
|
886
925
|
exited: {},
|
|
887
926
|
unmounted: {}
|
|
888
|
-
}), [
|
|
927
|
+
}), [d]), vt = D(() => ({
|
|
889
928
|
entering: {
|
|
890
|
-
transform: `translateX(${
|
|
891
|
-
marginLeft: `${-
|
|
929
|
+
transform: `translateX(${g}px)`,
|
|
930
|
+
marginLeft: `${-g}px`,
|
|
892
931
|
transitionProperty: "transform, margin-left",
|
|
893
|
-
transitionDuration: `${
|
|
932
|
+
transitionDuration: `${H}ms`,
|
|
894
933
|
transitionTimingFunction: "linear"
|
|
895
934
|
},
|
|
896
935
|
entered: {
|
|
897
936
|
transform: "translateX(0)",
|
|
898
937
|
marginLeft: 0,
|
|
899
938
|
transitionProperty: "transform, margin-left",
|
|
900
|
-
transitionDuration: `${
|
|
939
|
+
transitionDuration: `${H}ms`,
|
|
901
940
|
transitionTimingFunction: "linear"
|
|
902
941
|
},
|
|
903
942
|
exiting: {
|
|
904
|
-
transform: `translateX(${
|
|
905
|
-
marginLeft: `${-
|
|
943
|
+
transform: `translateX(${g}px)`,
|
|
944
|
+
marginLeft: `${-g}px`,
|
|
906
945
|
transitionProperty: "transform, margin-left",
|
|
907
|
-
transitionDuration: `${
|
|
946
|
+
transitionDuration: `${H}ms`,
|
|
908
947
|
transitionTimingFunction: "linear"
|
|
909
948
|
},
|
|
910
949
|
exited: {},
|
|
911
950
|
unmounted: {}
|
|
912
|
-
}), [
|
|
913
|
-
return /* @__PURE__ */
|
|
914
|
-
|
|
951
|
+
}), [g]);
|
|
952
|
+
return /* @__PURE__ */ _(
|
|
953
|
+
T,
|
|
915
954
|
{
|
|
916
|
-
className:
|
|
917
|
-
style: { minWidth: `${i +
|
|
955
|
+
className: E.wrapper,
|
|
956
|
+
style: { minWidth: `${i + s}px` },
|
|
918
957
|
ref: l,
|
|
919
958
|
width: "100%",
|
|
920
959
|
height: "100%",
|
|
@@ -922,40 +961,40 @@ const gt = {
|
|
|
922
961
|
m: "0",
|
|
923
962
|
p: "0",
|
|
924
963
|
children: [
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
|
|
964
|
+
/* @__PURE__ */ a(
|
|
965
|
+
We,
|
|
927
966
|
{
|
|
928
967
|
nodeRef: h,
|
|
929
|
-
timeout:
|
|
930
|
-
in:
|
|
968
|
+
timeout: n ? 0 : H,
|
|
969
|
+
in: n,
|
|
931
970
|
unmountOnExit: !0,
|
|
932
|
-
onEntering:
|
|
933
|
-
onExited:
|
|
934
|
-
children: (
|
|
935
|
-
|
|
971
|
+
onEntering: ft,
|
|
972
|
+
onExited: mt,
|
|
973
|
+
children: (P) => /* @__PURE__ */ a(
|
|
974
|
+
ne,
|
|
936
975
|
{
|
|
937
976
|
ref: h,
|
|
938
|
-
className:
|
|
939
|
-
style:
|
|
977
|
+
className: $(E.panelContent, E.left),
|
|
978
|
+
style: gt[P],
|
|
940
979
|
width: "auto",
|
|
941
980
|
height: "100%",
|
|
942
981
|
m: "0",
|
|
943
982
|
p: "0",
|
|
944
|
-
children: /* @__PURE__ */
|
|
945
|
-
|
|
983
|
+
children: /* @__PURE__ */ a(
|
|
984
|
+
$e,
|
|
946
985
|
{
|
|
947
|
-
className:
|
|
986
|
+
className: E.resizable,
|
|
948
987
|
size: {
|
|
949
|
-
width:
|
|
988
|
+
width: d,
|
|
950
989
|
height: "100%"
|
|
951
990
|
},
|
|
952
|
-
onResizeStop:
|
|
991
|
+
onResizeStop: X,
|
|
953
992
|
enable: { right: (u == null ? void 0 : u.left) !== void 0 ? u.left : !0 },
|
|
954
993
|
minWidth: i,
|
|
955
|
-
maxWidth:
|
|
956
|
-
handleClasses: { right:
|
|
994
|
+
maxWidth: m,
|
|
995
|
+
handleClasses: { right: $(E.resizeHandle, E.left) },
|
|
957
996
|
handleComponent: {
|
|
958
|
-
right: /* @__PURE__ */
|
|
997
|
+
right: /* @__PURE__ */ a(be, { height: "14px", width: "14px" })
|
|
959
998
|
},
|
|
960
999
|
children: t
|
|
961
1000
|
}
|
|
@@ -964,37 +1003,37 @@ const gt = {
|
|
|
964
1003
|
)
|
|
965
1004
|
}
|
|
966
1005
|
),
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
/* @__PURE__ */
|
|
969
|
-
|
|
1006
|
+
/* @__PURE__ */ a("div", { className: E.panelMainContent, children: o }),
|
|
1007
|
+
/* @__PURE__ */ a(
|
|
1008
|
+
We,
|
|
970
1009
|
{
|
|
971
|
-
nodeRef:
|
|
972
|
-
timeout:
|
|
973
|
-
in:
|
|
1010
|
+
nodeRef: v,
|
|
1011
|
+
timeout: r ? 0 : H,
|
|
1012
|
+
in: r,
|
|
974
1013
|
unmountOnExit: !0,
|
|
975
|
-
onEntering:
|
|
976
|
-
onExited:
|
|
977
|
-
children: (
|
|
978
|
-
|
|
1014
|
+
onEntering: ht,
|
|
1015
|
+
onExited: pt,
|
|
1016
|
+
children: (P) => /* @__PURE__ */ a(
|
|
1017
|
+
ne,
|
|
979
1018
|
{
|
|
980
|
-
ref:
|
|
981
|
-
className:
|
|
982
|
-
style:
|
|
1019
|
+
ref: v,
|
|
1020
|
+
className: $(E.panelContent, E.right),
|
|
1021
|
+
style: vt[P],
|
|
983
1022
|
width: "auto",
|
|
984
1023
|
height: "100%",
|
|
985
1024
|
m: "0",
|
|
986
1025
|
p: "0",
|
|
987
|
-
children: /* @__PURE__ */
|
|
988
|
-
|
|
1026
|
+
children: /* @__PURE__ */ a(
|
|
1027
|
+
$e,
|
|
989
1028
|
{
|
|
990
|
-
className:
|
|
991
|
-
size: { width:
|
|
992
|
-
onResizeStop:
|
|
1029
|
+
className: E.resizable,
|
|
1030
|
+
size: { width: g, height: "100%" },
|
|
1031
|
+
onResizeStop: Ie,
|
|
993
1032
|
enable: { left: (u == null ? void 0 : u.right) !== void 0 ? u.right : !0 },
|
|
994
|
-
minWidth:
|
|
995
|
-
maxWidth:
|
|
996
|
-
handleClasses: { left:
|
|
997
|
-
handleComponent: { left: /* @__PURE__ */
|
|
1033
|
+
minWidth: s,
|
|
1034
|
+
maxWidth: y,
|
|
1035
|
+
handleClasses: { left: $(E.resizeHandle, E.right) },
|
|
1036
|
+
handleComponent: { left: /* @__PURE__ */ a(be, { height: "14px", width: "14px" }) },
|
|
998
1037
|
children: c
|
|
999
1038
|
}
|
|
1000
1039
|
)
|
|
@@ -1005,296 +1044,905 @@ const gt = {
|
|
|
1005
1044
|
]
|
|
1006
1045
|
}
|
|
1007
1046
|
);
|
|
1008
|
-
}),
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1047
|
+
}), so = "_multiPagePopover_1w3ey_1", co = "_light_1w3ey_15", ao = "_dark_1w3ey_20", lo = "_pageTitle_1w3ey_28", uo = "_buttonContainer_1w3ey_33", ho = "_optionsButtonContainer_1w3ey_38", fo = "_optionsButton_1w3ey_38", te = {
|
|
1048
|
+
multiPagePopover: so,
|
|
1049
|
+
light: co,
|
|
1050
|
+
dark: ao,
|
|
1051
|
+
pageTitle: lo,
|
|
1052
|
+
buttonContainer: uo,
|
|
1053
|
+
optionsButtonContainer: ho,
|
|
1054
|
+
optionsButton: fo
|
|
1055
|
+
};
|
|
1056
|
+
function tt(e, o, n, t = 0) {
|
|
1057
|
+
if (!e.options)
|
|
1058
|
+
return e.content || /* @__PURE__ */ a(F, {});
|
|
1059
|
+
const i = e.options.map((r, c) => /* @__PURE__ */ a(
|
|
1060
|
+
ye,
|
|
1061
|
+
{
|
|
1062
|
+
className: $(te.optionsButton, r.buttonClassName),
|
|
1063
|
+
variant: "ghost",
|
|
1064
|
+
radius: "large",
|
|
1065
|
+
style: {
|
|
1066
|
+
width: n === "vertical" ? "100%" : "auto"
|
|
1067
|
+
},
|
|
1068
|
+
onClick: r.onClick || (() => o(
|
|
1069
|
+
tt(r.page || {}, o, n, t + 1)
|
|
1070
|
+
)),
|
|
1071
|
+
children: r.label
|
|
1072
|
+
},
|
|
1073
|
+
`${r.value}-page-${t}-button-${c}`
|
|
1074
|
+
));
|
|
1075
|
+
return /* @__PURE__ */ _(F, { children: [
|
|
1076
|
+
e.title && /* @__PURE__ */ a("div", { className: te.pageTitle, children: e.title }),
|
|
1077
|
+
e.content,
|
|
1078
|
+
/* @__PURE__ */ a(
|
|
1079
|
+
"div",
|
|
1080
|
+
{
|
|
1081
|
+
className: $(te.optionsButtonContainer, e.buttonsContainerClassName),
|
|
1082
|
+
style: {
|
|
1083
|
+
flexDirection: n === "vertical" ? "column" : "row"
|
|
1084
|
+
},
|
|
1085
|
+
children: i
|
|
1086
|
+
}
|
|
1087
|
+
)
|
|
1088
|
+
] });
|
|
1089
|
+
}
|
|
1090
|
+
const po = b(function({ page: o, className: n, direction: t = "vertical", color: i = "light", ...r }, c) {
|
|
1091
|
+
const [s, u] = S(void 0), l = x(() => {
|
|
1092
|
+
u(tt(o, u, t, 0));
|
|
1093
|
+
}, [t, o]);
|
|
1094
|
+
N(() => {
|
|
1095
|
+
l();
|
|
1096
|
+
}, [l]);
|
|
1097
|
+
const h = x((d) => s, [s]);
|
|
1098
|
+
return /* @__PURE__ */ a(
|
|
1099
|
+
Zn,
|
|
1100
|
+
{
|
|
1101
|
+
className: $(te.multiPagePopover, i === "light" ? te.light : te.dark, n),
|
|
1102
|
+
content: h,
|
|
1103
|
+
ref: c,
|
|
1104
|
+
...r,
|
|
1105
|
+
onCloseAutoFocus: l
|
|
1106
|
+
}
|
|
1107
|
+
);
|
|
1108
|
+
}), Hr = V.memo(po), mo = "_charCount_17uut_1", go = {
|
|
1109
|
+
charCount: mo
|
|
1110
|
+
}, vo = b(function({ className: o, showInputLength: n, inputLengthTemplate: t, value: i, severity: r = "primary", resize: c, ...s }, u) {
|
|
1111
|
+
const l = A(r), h = A("info"), d = n || n === void 0 && (s.maxLength !== void 0 || s.minLength !== void 0), p = i !== void 0 ? i.toString() : "", m = D(() => {
|
|
1012
1112
|
if (t) {
|
|
1013
|
-
let
|
|
1014
|
-
return
|
|
1113
|
+
let f = t.replace("{current}", p.length.toString());
|
|
1114
|
+
return s.minLength !== void 0 && (f = f.replace("{min}", s.minLength.toString())), s.maxLength !== void 0 && (f = f.replace("{max}", s.maxLength.toString())), f;
|
|
1015
1115
|
}
|
|
1016
|
-
return
|
|
1017
|
-
}, [t,
|
|
1018
|
-
return /* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
|
|
1116
|
+
return p.length;
|
|
1117
|
+
}, [t, s.maxLength, s.minLength, p.length]);
|
|
1118
|
+
return /* @__PURE__ */ _(F, { children: [
|
|
1119
|
+
/* @__PURE__ */ a(
|
|
1120
|
+
Nt,
|
|
1021
1121
|
{
|
|
1022
|
-
className:
|
|
1122
|
+
className: $("overmap-textarea", o),
|
|
1023
1123
|
style: { resize: c },
|
|
1024
1124
|
ref: u,
|
|
1025
1125
|
value: i,
|
|
1026
1126
|
color: l,
|
|
1027
|
-
...
|
|
1127
|
+
...s
|
|
1028
1128
|
}
|
|
1029
1129
|
),
|
|
1030
|
-
|
|
1130
|
+
d && /* @__PURE__ */ a(we, { as: "p", className: go.charCount, color: h, align: "right", children: m })
|
|
1031
1131
|
] });
|
|
1032
|
-
}),
|
|
1132
|
+
}), jr = C(vo), Co = b(function({
|
|
1033
1133
|
// ToggleGroup Primitive Props
|
|
1034
|
-
loop:
|
|
1035
|
-
type:
|
|
1134
|
+
loop: o,
|
|
1135
|
+
type: n,
|
|
1036
1136
|
rovingFocus: t,
|
|
1037
1137
|
value: i,
|
|
1038
|
-
onValueChange:
|
|
1138
|
+
onValueChange: r,
|
|
1039
1139
|
defaultValue: c,
|
|
1040
|
-
disabled:
|
|
1140
|
+
disabled: s,
|
|
1041
1141
|
items: u,
|
|
1042
1142
|
// ButtonGroup Props
|
|
1043
1143
|
className: l,
|
|
1044
1144
|
direction: h = "row",
|
|
1045
|
-
...
|
|
1046
|
-
},
|
|
1047
|
-
return /* @__PURE__ */
|
|
1048
|
-
|
|
1145
|
+
...d
|
|
1146
|
+
}, p) {
|
|
1147
|
+
return /* @__PURE__ */ a(
|
|
1148
|
+
Et,
|
|
1049
1149
|
{
|
|
1050
|
-
type:
|
|
1051
|
-
className:
|
|
1052
|
-
ref:
|
|
1150
|
+
type: n,
|
|
1151
|
+
className: $("overmap-toggle-group", l),
|
|
1152
|
+
ref: p,
|
|
1053
1153
|
value: i,
|
|
1054
|
-
onValueChange:
|
|
1055
|
-
disabled:
|
|
1154
|
+
onValueChange: r,
|
|
1155
|
+
disabled: s,
|
|
1056
1156
|
orientation: h === "column" ? "vertical" : "horizontal",
|
|
1057
|
-
loop:
|
|
1157
|
+
loop: o,
|
|
1058
1158
|
rovingFocus: t,
|
|
1059
1159
|
defaultValue: c,
|
|
1060
1160
|
asChild: !0,
|
|
1061
|
-
children: /* @__PURE__ */
|
|
1062
|
-
|
|
1161
|
+
children: /* @__PURE__ */ a(Ze, { direction: h, ...d, children: u.map(({ children: m, ...f }) => /* @__PURE__ */ z(Mt, { asChild: !0, ...f, key: f.value }, /* @__PURE__ */ a(
|
|
1162
|
+
Ye,
|
|
1063
1163
|
{
|
|
1064
|
-
className:
|
|
1065
|
-
"aria-label":
|
|
1066
|
-
variant:
|
|
1067
|
-
children:
|
|
1164
|
+
className: $("overmap-toggle-group-button"),
|
|
1165
|
+
"aria-label": f.value,
|
|
1166
|
+
variant: f.value === i ? "solid" : "soft",
|
|
1167
|
+
children: m
|
|
1068
1168
|
}
|
|
1069
1169
|
))) })
|
|
1070
1170
|
}
|
|
1071
1171
|
);
|
|
1072
|
-
}),
|
|
1172
|
+
}), Fr = C(Co), _o = {
|
|
1073
1173
|
default: "_default_xqvoc_1"
|
|
1074
|
-
},
|
|
1075
|
-
|
|
1076
|
-
|
|
1174
|
+
}, bo = C(
|
|
1175
|
+
b(({ className: e, minContentGap: o = "2", children: n, ...t }, i) => /* @__PURE__ */ a(
|
|
1176
|
+
Lt,
|
|
1077
1177
|
{
|
|
1078
|
-
className:
|
|
1178
|
+
className: $(e, "overmap-toolbar", _o.default),
|
|
1079
1179
|
ref: i,
|
|
1080
1180
|
asChild: !0,
|
|
1081
1181
|
...t,
|
|
1082
|
-
children: /* @__PURE__ */
|
|
1182
|
+
children: /* @__PURE__ */ a(De, { grow: "1", width: "100%", height: "max-content", align: "center", gap: o, wrap: "nowrap", children: n })
|
|
1083
1183
|
}
|
|
1084
1184
|
))
|
|
1085
|
-
),
|
|
1086
|
-
|
|
1087
|
-
),
|
|
1088
|
-
|
|
1089
|
-
|
|
1185
|
+
), xo = C(
|
|
1186
|
+
b(({ children: e, gap: o = "2" }, n) => /* @__PURE__ */ a(De, { ref: n, grow: "1", width: "max-content", height: "100%", align: "center", gap: o, children: e }))
|
|
1187
|
+
), $o = C(
|
|
1188
|
+
b(({ children: e, gap: o }, n) => /* @__PURE__ */ a(
|
|
1189
|
+
De,
|
|
1090
1190
|
{
|
|
1091
|
-
ref:
|
|
1191
|
+
ref: n,
|
|
1092
1192
|
grow: "1",
|
|
1093
1193
|
width: "max-content",
|
|
1094
1194
|
direction: "row-reverse",
|
|
1095
1195
|
height: "100%",
|
|
1096
1196
|
align: "center",
|
|
1097
|
-
gap:
|
|
1098
|
-
children:
|
|
1197
|
+
gap: o || "2",
|
|
1198
|
+
children: e
|
|
1099
1199
|
}
|
|
1100
1200
|
))
|
|
1101
|
-
),
|
|
1102
|
-
Root:
|
|
1103
|
-
LeftContent:
|
|
1104
|
-
RightContent:
|
|
1105
|
-
},
|
|
1106
|
-
ToastViewport:
|
|
1107
|
-
actionButton:
|
|
1108
|
-
ToastRoot:
|
|
1109
|
-
slideIn:
|
|
1110
|
-
swipeOut:
|
|
1111
|
-
},
|
|
1112
|
-
const [
|
|
1113
|
-
(
|
|
1114
|
-
!
|
|
1201
|
+
), Vr = {
|
|
1202
|
+
Root: bo,
|
|
1203
|
+
LeftContent: xo,
|
|
1204
|
+
RightContent: $o
|
|
1205
|
+
}, yo = "_ToastViewport_1i6bp_1", wo = "_actionButton_1i6bp_20", So = "_ToastRoot_1i6bp_24", ko = "_slideIn_1i6bp_1", Po = "_swipeOut_1i6bp_1", Te = {
|
|
1206
|
+
ToastViewport: yo,
|
|
1207
|
+
actionButton: wo,
|
|
1208
|
+
ToastRoot: So,
|
|
1209
|
+
slideIn: ko,
|
|
1210
|
+
swipeOut: Po
|
|
1211
|
+
}, To = b(function({ title: o, description: n, icon: t, severity: i = "primary", size: r, onClose: c, sensitivity: s, action: u, ...l }, h) {
|
|
1212
|
+
const [d, p] = S(!0), m = A(i), f = x(
|
|
1213
|
+
(v) => {
|
|
1214
|
+
!v && c && c(), p(v);
|
|
1115
1215
|
},
|
|
1116
1216
|
[c]
|
|
1117
1217
|
);
|
|
1118
|
-
return /* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1218
|
+
return /* @__PURE__ */ a(ie.Root, { asChild: !0, ref: h, ...l, open: d, type: s, onOpenChange: f, children: /* @__PURE__ */ a(ge.Root, { className: Te.ToastRoot, variant: "surface", color: m, size: r, children: /* @__PURE__ */ _(T, { width: "100%", align: "center", gap: "4", justify: "between", children: [
|
|
1219
|
+
/* @__PURE__ */ _(T, { align: "center", gap: "3", children: [
|
|
1220
|
+
/* @__PURE__ */ a(ge.Icon, { children: t }),
|
|
1221
|
+
/* @__PURE__ */ _(T, { direction: "column", gap: "2", children: [
|
|
1222
|
+
/* @__PURE__ */ _(T, { direction: "column", gap: "0", children: [
|
|
1223
|
+
/* @__PURE__ */ a(ie.Title, { asChild: !0, children: /* @__PURE__ */ a(ge.Text, { size: "3", weight: "medium", children: o }) }),
|
|
1224
|
+
/* @__PURE__ */ a(ie.Description, { asChild: !0, children: /* @__PURE__ */ a(ge.Text, { children: n }) })
|
|
1125
1225
|
] }),
|
|
1126
|
-
u && /* @__PURE__ */
|
|
1226
|
+
u && /* @__PURE__ */ a(ie.Action, { className: Te.actionButton, altText: u.altText, asChild: !0, children: u.content })
|
|
1127
1227
|
] })
|
|
1128
1228
|
] }),
|
|
1129
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ a(ie.Close, { asChild: !0, children: /* @__PURE__ */ a(Ye, { "aria-label": "Close", variant: "ghost", severity: i, children: /* @__PURE__ */ a(_t, {}) }) })
|
|
1130
1230
|
] }) }) });
|
|
1131
|
-
}),
|
|
1132
|
-
const
|
|
1133
|
-
if (!
|
|
1231
|
+
}), No = C(To), nt = ce({}), Ur = () => {
|
|
1232
|
+
const e = Se(nt);
|
|
1233
|
+
if (!e)
|
|
1134
1234
|
throw new Error("useToast must be used within a ToastProvider");
|
|
1135
|
-
return
|
|
1136
|
-
},
|
|
1137
|
-
if (
|
|
1138
|
-
return
|
|
1139
|
-
const
|
|
1140
|
-
return (
|
|
1235
|
+
return e;
|
|
1236
|
+
}, Ao = 240 / 60, Ve = 5e3, Ro = (e) => {
|
|
1237
|
+
if (e.duration && e.duration >= Ve)
|
|
1238
|
+
return e.duration;
|
|
1239
|
+
const o = e.severity === "danger" ? 1.5 : 1, n = e.description.split(" ").length + e.title.split(" ").length;
|
|
1240
|
+
return (Ve + n / Ao) * o;
|
|
1141
1241
|
};
|
|
1142
|
-
let
|
|
1143
|
-
const
|
|
1144
|
-
children:
|
|
1242
|
+
let Oo;
|
|
1243
|
+
const Gr = C(function({
|
|
1244
|
+
children: o,
|
|
1145
1245
|
// Use this class to change where the viewport for the toasts should be
|
|
1146
|
-
className:
|
|
1246
|
+
className: n,
|
|
1147
1247
|
hotkey: t,
|
|
1148
1248
|
...i
|
|
1149
1249
|
}) {
|
|
1150
|
-
const [
|
|
1151
|
-
c((
|
|
1152
|
-
const
|
|
1153
|
-
return
|
|
1154
|
-
}),
|
|
1155
|
-
}, []), u =
|
|
1250
|
+
const [r, c] = S([]), s = x((l, h, d) => {
|
|
1251
|
+
c((p) => {
|
|
1252
|
+
const m = p.find((f) => f.id === l);
|
|
1253
|
+
return m && h === 0 && clearTimeout(m.timeout), p.filter((f) => f.id !== l);
|
|
1254
|
+
}), d && d();
|
|
1255
|
+
}, []), u = D(() => {
|
|
1156
1256
|
let l = 0;
|
|
1157
|
-
const h = (
|
|
1158
|
-
const
|
|
1257
|
+
const h = (v) => {
|
|
1258
|
+
const g = Ro(v), k = l.toString();
|
|
1159
1259
|
l += 1;
|
|
1160
|
-
const
|
|
1161
|
-
c((
|
|
1162
|
-
},
|
|
1163
|
-
return
|
|
1260
|
+
const y = setTimeout(() => s(k, 1, v.onClose), g);
|
|
1261
|
+
c((w) => [...w, { ...v, timeout: y, duration: g, id: k }]);
|
|
1262
|
+
}, d = (v) => h({ ...v, severity: "primary" }), p = (v) => h({ ...v, severity: "success" }), m = (v) => h({ ...v, severity: "danger" }), f = (v) => h({ ...v, severity: "info" });
|
|
1263
|
+
return Oo = h, {
|
|
1164
1264
|
showToast: h,
|
|
1165
|
-
showPrimary:
|
|
1166
|
-
showSuccess:
|
|
1167
|
-
showError:
|
|
1168
|
-
showInfo:
|
|
1265
|
+
showPrimary: d,
|
|
1266
|
+
showSuccess: p,
|
|
1267
|
+
showError: m,
|
|
1268
|
+
showInfo: f
|
|
1169
1269
|
};
|
|
1170
|
-
}, [
|
|
1171
|
-
return
|
|
1172
|
-
for (const { timeout: l } of
|
|
1270
|
+
}, [s]);
|
|
1271
|
+
return N(() => () => {
|
|
1272
|
+
for (const { timeout: l } of r)
|
|
1173
1273
|
clearTimeout(l);
|
|
1174
|
-
}, []), /* @__PURE__ */
|
|
1175
|
-
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
|
|
1274
|
+
}, []), /* @__PURE__ */ a(nt.Provider, { value: u, children: /* @__PURE__ */ _(Bt, { ...i, children: [
|
|
1275
|
+
o,
|
|
1276
|
+
/* @__PURE__ */ a(Wt, { className: $(n, Te.ToastViewport), hotkey: t }),
|
|
1277
|
+
r.map(({ id: l, onClose: h, ...d }) => /* @__PURE__ */ a(No, { ...d, onClose: () => s(l, 0, h) }, l))
|
|
1178
1278
|
] }) });
|
|
1179
|
-
}),
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1279
|
+
}), zo = {
|
|
1280
|
+
default: "_default_1odpt_1"
|
|
1281
|
+
}, Kr = C(
|
|
1282
|
+
b(({ className: e, children: o, content: n, ...t }, i) => /* @__PURE__ */ a(
|
|
1283
|
+
At,
|
|
1284
|
+
{
|
|
1285
|
+
className: $("overmap-tooltip", e, zo.default),
|
|
1286
|
+
ref: i,
|
|
1287
|
+
content: /* @__PURE__ */ a(T, { align: "center", gap: "1", width: "max-content", height: "max-content", justify: "center", children: n }),
|
|
1288
|
+
...t,
|
|
1289
|
+
children: o
|
|
1290
|
+
}
|
|
1291
|
+
))
|
|
1292
|
+
), Do = "_noWrap_1wpa5_1", Io = {
|
|
1293
|
+
noWrap: Do
|
|
1294
|
+
}, qr = C(
|
|
1295
|
+
b(({ className: e, noWrap: o, severity: n, as: t, ...i }, r) => {
|
|
1296
|
+
const c = A(n);
|
|
1297
|
+
return /* @__PURE__ */ a(
|
|
1298
|
+
we,
|
|
1186
1299
|
{
|
|
1187
|
-
ref:
|
|
1300
|
+
ref: r,
|
|
1188
1301
|
as: t,
|
|
1189
|
-
className:
|
|
1302
|
+
className: $(e, { [Io.noWrap]: o }),
|
|
1190
1303
|
color: c,
|
|
1191
1304
|
...i
|
|
1192
1305
|
}
|
|
1193
1306
|
);
|
|
1194
1307
|
})
|
|
1195
1308
|
);
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
const { panelBackground:
|
|
1199
|
-
return /* @__PURE__ */
|
|
1309
|
+
const Xr = C(
|
|
1310
|
+
b((e, o) => {
|
|
1311
|
+
const { panelBackground: n = "solid", radius: t = "full", ...i } = e;
|
|
1312
|
+
return /* @__PURE__ */ a(Rt, { panelBackground: n, radius: t, ref: o, ...i });
|
|
1200
1313
|
})
|
|
1201
|
-
),
|
|
1314
|
+
), Eo = {
|
|
1202
1315
|
1: "max-content",
|
|
1203
1316
|
2: "max-content",
|
|
1204
1317
|
3: "max-content",
|
|
1205
1318
|
4: "100%"
|
|
1206
|
-
},
|
|
1207
|
-
const l =
|
|
1208
|
-
return /* @__PURE__ */
|
|
1209
|
-
|
|
1319
|
+
}, Mo = b(function({ severity: o = "info", weight: n = "light", gap: t = "1", text: i, orientation: r = "horizontal", size: c, ...s }, u) {
|
|
1320
|
+
const l = G(c, Eo), h = A(o);
|
|
1321
|
+
return /* @__PURE__ */ _(
|
|
1322
|
+
T,
|
|
1210
1323
|
{
|
|
1211
1324
|
ref: u,
|
|
1212
|
-
width:
|
|
1213
|
-
height:
|
|
1214
|
-
direction:
|
|
1325
|
+
width: r === "horizontal" ? l : "max-content",
|
|
1326
|
+
height: r === "vertical" ? l : "max-content",
|
|
1327
|
+
direction: r === "vertical" ? "column" : "row",
|
|
1215
1328
|
align: "center",
|
|
1216
1329
|
gap: t,
|
|
1217
1330
|
children: [
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
i && /* @__PURE__ */
|
|
1220
|
-
/* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1331
|
+
/* @__PURE__ */ a(Be, { size: c, orientation: r, color: h, ...s }),
|
|
1332
|
+
i && /* @__PURE__ */ _(F, { children: [
|
|
1333
|
+
/* @__PURE__ */ a(we, { as: "span", size: "1", weight: n, color: h, children: i }),
|
|
1334
|
+
/* @__PURE__ */ a(Be, { size: c, orientation: r, color: h, ...s })
|
|
1222
1335
|
] })
|
|
1223
1336
|
]
|
|
1224
1337
|
}
|
|
1225
1338
|
);
|
|
1226
|
-
}),
|
|
1339
|
+
}), Qr = C(Mo);
|
|
1340
|
+
function U() {
|
|
1341
|
+
return U = Object.assign ? Object.assign.bind() : function(e) {
|
|
1342
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
1343
|
+
var n = arguments[o];
|
|
1344
|
+
for (var t in n)
|
|
1345
|
+
Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
|
|
1346
|
+
}
|
|
1347
|
+
return e;
|
|
1348
|
+
}, U.apply(this, arguments);
|
|
1349
|
+
}
|
|
1350
|
+
function Lo(e, o) {
|
|
1351
|
+
typeof e == "function" ? e(o) : e != null && (e.current = o);
|
|
1352
|
+
}
|
|
1353
|
+
function ot(...e) {
|
|
1354
|
+
return (o) => e.forEach(
|
|
1355
|
+
(n) => Lo(n, o)
|
|
1356
|
+
);
|
|
1357
|
+
}
|
|
1358
|
+
function rt(...e) {
|
|
1359
|
+
return x(ot(...e), e);
|
|
1360
|
+
}
|
|
1361
|
+
function Bo(e, o = []) {
|
|
1362
|
+
let n = [];
|
|
1363
|
+
function t(r, c) {
|
|
1364
|
+
const s = /* @__PURE__ */ ce(c), u = n.length;
|
|
1365
|
+
n = [
|
|
1366
|
+
...n,
|
|
1367
|
+
c
|
|
1368
|
+
];
|
|
1369
|
+
function l(d) {
|
|
1370
|
+
const { scope: p, children: m, ...f } = d, v = (p == null ? void 0 : p[e][u]) || s, g = D(
|
|
1371
|
+
() => f,
|
|
1372
|
+
Object.values(f)
|
|
1373
|
+
);
|
|
1374
|
+
return /* @__PURE__ */ z(v.Provider, {
|
|
1375
|
+
value: g
|
|
1376
|
+
}, m);
|
|
1377
|
+
}
|
|
1378
|
+
function h(d, p) {
|
|
1379
|
+
const m = (p == null ? void 0 : p[e][u]) || s, f = Se(m);
|
|
1380
|
+
if (f)
|
|
1381
|
+
return f;
|
|
1382
|
+
if (c !== void 0)
|
|
1383
|
+
return c;
|
|
1384
|
+
throw new Error(`\`${d}\` must be used within \`${r}\``);
|
|
1385
|
+
}
|
|
1386
|
+
return l.displayName = r + "Provider", [
|
|
1387
|
+
l,
|
|
1388
|
+
h
|
|
1389
|
+
];
|
|
1390
|
+
}
|
|
1391
|
+
const i = () => {
|
|
1392
|
+
const r = n.map((c) => /* @__PURE__ */ ce(c));
|
|
1393
|
+
return function(s) {
|
|
1394
|
+
const u = (s == null ? void 0 : s[e]) || r;
|
|
1395
|
+
return D(
|
|
1396
|
+
() => ({
|
|
1397
|
+
[`__scope${e}`]: {
|
|
1398
|
+
...s,
|
|
1399
|
+
[e]: u
|
|
1400
|
+
}
|
|
1401
|
+
}),
|
|
1402
|
+
[
|
|
1403
|
+
s,
|
|
1404
|
+
u
|
|
1405
|
+
]
|
|
1406
|
+
);
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
return i.scopeName = e, [
|
|
1410
|
+
t,
|
|
1411
|
+
Wo(i, ...o)
|
|
1412
|
+
];
|
|
1413
|
+
}
|
|
1414
|
+
function Wo(...e) {
|
|
1415
|
+
const o = e[0];
|
|
1416
|
+
if (e.length === 1)
|
|
1417
|
+
return o;
|
|
1418
|
+
const n = () => {
|
|
1419
|
+
const t = e.map(
|
|
1420
|
+
(i) => ({
|
|
1421
|
+
useScope: i(),
|
|
1422
|
+
scopeName: i.scopeName
|
|
1423
|
+
})
|
|
1424
|
+
);
|
|
1425
|
+
return function(r) {
|
|
1426
|
+
const c = t.reduce((s, { useScope: u, scopeName: l }) => {
|
|
1427
|
+
const d = u(r)[`__scope${l}`];
|
|
1428
|
+
return {
|
|
1429
|
+
...s,
|
|
1430
|
+
...d
|
|
1431
|
+
};
|
|
1432
|
+
}, {});
|
|
1433
|
+
return D(
|
|
1434
|
+
() => ({
|
|
1435
|
+
[`__scope${o.scopeName}`]: c
|
|
1436
|
+
}),
|
|
1437
|
+
[
|
|
1438
|
+
c
|
|
1439
|
+
]
|
|
1440
|
+
);
|
|
1441
|
+
};
|
|
1442
|
+
};
|
|
1443
|
+
return n.scopeName = o.scopeName, n;
|
|
1444
|
+
}
|
|
1445
|
+
function Ue(e, o, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
1446
|
+
return function(i) {
|
|
1447
|
+
if (e == null || e(i), n === !1 || !i.defaultPrevented)
|
|
1448
|
+
return o == null ? void 0 : o(i);
|
|
1449
|
+
};
|
|
1450
|
+
}
|
|
1451
|
+
function it(e) {
|
|
1452
|
+
const o = O(e);
|
|
1453
|
+
return N(() => {
|
|
1454
|
+
o.current = e;
|
|
1455
|
+
}), D(
|
|
1456
|
+
() => (...n) => {
|
|
1457
|
+
var t;
|
|
1458
|
+
return (t = o.current) === null || t === void 0 ? void 0 : t.call(o, ...n);
|
|
1459
|
+
},
|
|
1460
|
+
[]
|
|
1461
|
+
);
|
|
1462
|
+
}
|
|
1463
|
+
function Ho({ prop: e, defaultProp: o, onChange: n = () => {
|
|
1464
|
+
} }) {
|
|
1465
|
+
const [t, i] = jo({
|
|
1466
|
+
defaultProp: o,
|
|
1467
|
+
onChange: n
|
|
1468
|
+
}), r = e !== void 0, c = r ? e : t, s = it(n), u = x((l) => {
|
|
1469
|
+
if (r) {
|
|
1470
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
1471
|
+
d !== e && s(d);
|
|
1472
|
+
} else
|
|
1473
|
+
i(l);
|
|
1474
|
+
}, [
|
|
1475
|
+
r,
|
|
1476
|
+
e,
|
|
1477
|
+
i,
|
|
1478
|
+
s
|
|
1479
|
+
]);
|
|
1480
|
+
return [
|
|
1481
|
+
c,
|
|
1482
|
+
u
|
|
1483
|
+
];
|
|
1484
|
+
}
|
|
1485
|
+
function jo({ defaultProp: e, onChange: o }) {
|
|
1486
|
+
const n = S(e), [t] = n, i = O(t), r = it(o);
|
|
1487
|
+
return N(() => {
|
|
1488
|
+
i.current !== t && (r(t), i.current = t);
|
|
1489
|
+
}, [
|
|
1490
|
+
t,
|
|
1491
|
+
i,
|
|
1492
|
+
r
|
|
1493
|
+
]), n;
|
|
1494
|
+
}
|
|
1495
|
+
function Fo(e) {
|
|
1496
|
+
const o = O({
|
|
1497
|
+
value: e,
|
|
1498
|
+
previous: e
|
|
1499
|
+
});
|
|
1500
|
+
return D(() => (o.current.value !== e && (o.current.previous = o.current.value, o.current.value = e), o.current.previous), [
|
|
1501
|
+
e
|
|
1502
|
+
]);
|
|
1503
|
+
}
|
|
1504
|
+
const Ne = globalThis != null && globalThis.document ? Re : () => {
|
|
1505
|
+
};
|
|
1506
|
+
function Vo(e) {
|
|
1507
|
+
const [o, n] = S(void 0);
|
|
1508
|
+
return Ne(() => {
|
|
1509
|
+
if (e) {
|
|
1510
|
+
n({
|
|
1511
|
+
width: e.offsetWidth,
|
|
1512
|
+
height: e.offsetHeight
|
|
1513
|
+
});
|
|
1514
|
+
const t = new ResizeObserver((i) => {
|
|
1515
|
+
if (!Array.isArray(i) || !i.length)
|
|
1516
|
+
return;
|
|
1517
|
+
const r = i[0];
|
|
1518
|
+
let c, s;
|
|
1519
|
+
if ("borderBoxSize" in r) {
|
|
1520
|
+
const u = r.borderBoxSize, l = Array.isArray(u) ? u[0] : u;
|
|
1521
|
+
c = l.inlineSize, s = l.blockSize;
|
|
1522
|
+
} else
|
|
1523
|
+
c = e.offsetWidth, s = e.offsetHeight;
|
|
1524
|
+
n({
|
|
1525
|
+
width: c,
|
|
1526
|
+
height: s
|
|
1527
|
+
});
|
|
1528
|
+
});
|
|
1529
|
+
return t.observe(e, {
|
|
1530
|
+
box: "border-box"
|
|
1531
|
+
}), () => t.unobserve(e);
|
|
1532
|
+
} else
|
|
1533
|
+
n(void 0);
|
|
1534
|
+
}, [
|
|
1535
|
+
e
|
|
1536
|
+
]), o;
|
|
1537
|
+
}
|
|
1538
|
+
function Uo(e, o) {
|
|
1539
|
+
return Ot((n, t) => {
|
|
1540
|
+
const i = o[n][t];
|
|
1541
|
+
return i ?? n;
|
|
1542
|
+
}, e);
|
|
1543
|
+
}
|
|
1544
|
+
const st = (e) => {
|
|
1545
|
+
const { present: o, children: n } = e, t = Go(o), i = typeof n == "function" ? n({
|
|
1546
|
+
present: t.isPresent
|
|
1547
|
+
}) : ee.only(n), r = rt(t.ref, i.ref);
|
|
1548
|
+
return typeof n == "function" || t.isPresent ? /* @__PURE__ */ Oe(i, {
|
|
1549
|
+
ref: r
|
|
1550
|
+
}) : null;
|
|
1551
|
+
};
|
|
1552
|
+
st.displayName = "Presence";
|
|
1553
|
+
function Go(e) {
|
|
1554
|
+
const [o, n] = S(), t = O({}), i = O(e), r = O("none"), c = e ? "mounted" : "unmounted", [s, u] = Uo(c, {
|
|
1555
|
+
mounted: {
|
|
1556
|
+
UNMOUNT: "unmounted",
|
|
1557
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
1558
|
+
},
|
|
1559
|
+
unmountSuspended: {
|
|
1560
|
+
MOUNT: "mounted",
|
|
1561
|
+
ANIMATION_END: "unmounted"
|
|
1562
|
+
},
|
|
1563
|
+
unmounted: {
|
|
1564
|
+
MOUNT: "mounted"
|
|
1565
|
+
}
|
|
1566
|
+
});
|
|
1567
|
+
return N(() => {
|
|
1568
|
+
const l = _e(t.current);
|
|
1569
|
+
r.current = s === "mounted" ? l : "none";
|
|
1570
|
+
}, [
|
|
1571
|
+
s
|
|
1572
|
+
]), Ne(() => {
|
|
1573
|
+
const l = t.current, h = i.current;
|
|
1574
|
+
if (h !== e) {
|
|
1575
|
+
const p = r.current, m = _e(l);
|
|
1576
|
+
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(h && p !== m ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
1577
|
+
}
|
|
1578
|
+
}, [
|
|
1579
|
+
e,
|
|
1580
|
+
u
|
|
1581
|
+
]), Ne(() => {
|
|
1582
|
+
if (o) {
|
|
1583
|
+
const l = (d) => {
|
|
1584
|
+
const m = _e(t.current).includes(d.animationName);
|
|
1585
|
+
d.target === o && m && Ht(
|
|
1586
|
+
() => u("ANIMATION_END")
|
|
1587
|
+
);
|
|
1588
|
+
}, h = (d) => {
|
|
1589
|
+
d.target === o && (r.current = _e(t.current));
|
|
1590
|
+
};
|
|
1591
|
+
return o.addEventListener("animationstart", h), o.addEventListener("animationcancel", l), o.addEventListener("animationend", l), () => {
|
|
1592
|
+
o.removeEventListener("animationstart", h), o.removeEventListener("animationcancel", l), o.removeEventListener("animationend", l);
|
|
1593
|
+
};
|
|
1594
|
+
} else
|
|
1595
|
+
u("ANIMATION_END");
|
|
1596
|
+
}, [
|
|
1597
|
+
o,
|
|
1598
|
+
u
|
|
1599
|
+
]), {
|
|
1600
|
+
isPresent: [
|
|
1601
|
+
"mounted",
|
|
1602
|
+
"unmountSuspended"
|
|
1603
|
+
].includes(s),
|
|
1604
|
+
ref: x((l) => {
|
|
1605
|
+
l && (t.current = getComputedStyle(l)), n(l);
|
|
1606
|
+
}, [])
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
function _e(e) {
|
|
1610
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
1611
|
+
}
|
|
1612
|
+
const ct = /* @__PURE__ */ b((e, o) => {
|
|
1613
|
+
const { children: n, ...t } = e, i = ee.toArray(n), r = i.find(qo);
|
|
1614
|
+
if (r) {
|
|
1615
|
+
const c = r.props.children, s = i.map((u) => u === r ? ee.count(c) > 1 ? ee.only(null) : /* @__PURE__ */ xe(c) ? c.props.children : null : u);
|
|
1616
|
+
return /* @__PURE__ */ z(Ae, U({}, t, {
|
|
1617
|
+
ref: o
|
|
1618
|
+
}), /* @__PURE__ */ xe(c) ? /* @__PURE__ */ Oe(c, void 0, s) : null);
|
|
1619
|
+
}
|
|
1620
|
+
return /* @__PURE__ */ z(Ae, U({}, t, {
|
|
1621
|
+
ref: o
|
|
1622
|
+
}), n);
|
|
1623
|
+
});
|
|
1624
|
+
ct.displayName = "Slot";
|
|
1625
|
+
const Ae = /* @__PURE__ */ b((e, o) => {
|
|
1626
|
+
const { children: n, ...t } = e;
|
|
1627
|
+
return /* @__PURE__ */ xe(n) ? /* @__PURE__ */ Oe(n, {
|
|
1628
|
+
...Xo(t, n.props),
|
|
1629
|
+
ref: o ? ot(o, n.ref) : n.ref
|
|
1630
|
+
}) : ee.count(n) > 1 ? ee.only(null) : null;
|
|
1631
|
+
});
|
|
1632
|
+
Ae.displayName = "SlotClone";
|
|
1633
|
+
const Ko = ({ children: e }) => /* @__PURE__ */ z(zt, null, e);
|
|
1634
|
+
function qo(e) {
|
|
1635
|
+
return /* @__PURE__ */ xe(e) && e.type === Ko;
|
|
1636
|
+
}
|
|
1637
|
+
function Xo(e, o) {
|
|
1638
|
+
const n = {
|
|
1639
|
+
...o
|
|
1640
|
+
};
|
|
1641
|
+
for (const t in o) {
|
|
1642
|
+
const i = e[t], r = o[t];
|
|
1643
|
+
/^on[A-Z]/.test(t) ? i && r ? n[t] = (...s) => {
|
|
1644
|
+
r(...s), i(...s);
|
|
1645
|
+
} : i && (n[t] = i) : t === "style" ? n[t] = {
|
|
1646
|
+
...i,
|
|
1647
|
+
...r
|
|
1648
|
+
} : t === "className" && (n[t] = [
|
|
1649
|
+
i,
|
|
1650
|
+
r
|
|
1651
|
+
].filter(Boolean).join(" "));
|
|
1652
|
+
}
|
|
1653
|
+
return {
|
|
1654
|
+
...e,
|
|
1655
|
+
...n
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
const Qo = [
|
|
1659
|
+
"a",
|
|
1660
|
+
"button",
|
|
1661
|
+
"div",
|
|
1662
|
+
"form",
|
|
1663
|
+
"h2",
|
|
1664
|
+
"h3",
|
|
1665
|
+
"img",
|
|
1666
|
+
"input",
|
|
1667
|
+
"label",
|
|
1668
|
+
"li",
|
|
1669
|
+
"nav",
|
|
1670
|
+
"ol",
|
|
1671
|
+
"p",
|
|
1672
|
+
"span",
|
|
1673
|
+
"svg",
|
|
1674
|
+
"ul"
|
|
1675
|
+
], at = Qo.reduce((e, o) => {
|
|
1676
|
+
const n = /* @__PURE__ */ b((t, i) => {
|
|
1677
|
+
const { asChild: r, ...c } = t, s = r ? ct : o;
|
|
1678
|
+
return N(() => {
|
|
1679
|
+
window[Symbol.for("radix-ui")] = !0;
|
|
1680
|
+
}, []), /* @__PURE__ */ z(s, U({}, c, {
|
|
1681
|
+
ref: i
|
|
1682
|
+
}));
|
|
1683
|
+
});
|
|
1684
|
+
return n.displayName = `Primitive.${o}`, {
|
|
1685
|
+
...e,
|
|
1686
|
+
[o]: n
|
|
1687
|
+
};
|
|
1688
|
+
}, {}), lt = "Checkbox", [Yo, Yr] = Bo(lt), [Zo, Jo] = Yo(lt), er = /* @__PURE__ */ b((e, o) => {
|
|
1689
|
+
const { __scopeCheckbox: n, name: t, checked: i, defaultChecked: r, required: c, disabled: s, value: u = "on", onCheckedChange: l, ...h } = e, [d, p] = S(null), m = rt(
|
|
1690
|
+
o,
|
|
1691
|
+
(w) => p(w)
|
|
1692
|
+
), f = O(!1), v = d ? !!d.closest("form") : !0, [g = !1, k] = Ho({
|
|
1693
|
+
prop: i,
|
|
1694
|
+
defaultProp: r,
|
|
1695
|
+
onChange: l
|
|
1696
|
+
}), y = O(g);
|
|
1697
|
+
return N(() => {
|
|
1698
|
+
const w = d == null ? void 0 : d.form;
|
|
1699
|
+
if (w) {
|
|
1700
|
+
const R = () => k(y.current);
|
|
1701
|
+
return w.addEventListener("reset", R), () => w.removeEventListener("reset", R);
|
|
1702
|
+
}
|
|
1703
|
+
}, [
|
|
1704
|
+
d,
|
|
1705
|
+
k
|
|
1706
|
+
]), /* @__PURE__ */ z(Zo, {
|
|
1707
|
+
scope: n,
|
|
1708
|
+
state: g,
|
|
1709
|
+
disabled: s
|
|
1710
|
+
}, /* @__PURE__ */ z(at.button, U({
|
|
1711
|
+
type: "button",
|
|
1712
|
+
role: "checkbox",
|
|
1713
|
+
"aria-checked": q(g) ? "mixed" : g,
|
|
1714
|
+
"aria-required": c,
|
|
1715
|
+
"data-state": ut(g),
|
|
1716
|
+
"data-disabled": s ? "" : void 0,
|
|
1717
|
+
disabled: s,
|
|
1718
|
+
value: u
|
|
1719
|
+
}, h, {
|
|
1720
|
+
ref: m,
|
|
1721
|
+
onKeyDown: Ue(e.onKeyDown, (w) => {
|
|
1722
|
+
w.key === "Enter" && w.preventDefault();
|
|
1723
|
+
}),
|
|
1724
|
+
onClick: Ue(e.onClick, (w) => {
|
|
1725
|
+
k(
|
|
1726
|
+
(R) => q(R) ? !0 : !R
|
|
1727
|
+
), v && (f.current = w.isPropagationStopped(), f.current || w.stopPropagation());
|
|
1728
|
+
})
|
|
1729
|
+
})), v && /* @__PURE__ */ z(or, {
|
|
1730
|
+
control: d,
|
|
1731
|
+
bubbles: !f.current,
|
|
1732
|
+
name: t,
|
|
1733
|
+
value: u,
|
|
1734
|
+
checked: g,
|
|
1735
|
+
required: c,
|
|
1736
|
+
disabled: s,
|
|
1737
|
+
style: {
|
|
1738
|
+
transform: "translateX(-100%)"
|
|
1739
|
+
}
|
|
1740
|
+
}));
|
|
1741
|
+
}), tr = "CheckboxIndicator", nr = /* @__PURE__ */ b((e, o) => {
|
|
1742
|
+
const { __scopeCheckbox: n, forceMount: t, ...i } = e, r = Jo(tr, n);
|
|
1743
|
+
return /* @__PURE__ */ z(st, {
|
|
1744
|
+
present: t || q(r.state) || r.state === !0
|
|
1745
|
+
}, /* @__PURE__ */ z(at.span, U({
|
|
1746
|
+
"data-state": ut(r.state),
|
|
1747
|
+
"data-disabled": r.disabled ? "" : void 0
|
|
1748
|
+
}, i, {
|
|
1749
|
+
ref: o,
|
|
1750
|
+
style: {
|
|
1751
|
+
pointerEvents: "none",
|
|
1752
|
+
...e.style
|
|
1753
|
+
}
|
|
1754
|
+
})));
|
|
1755
|
+
}), or = (e) => {
|
|
1756
|
+
const { control: o, checked: n, bubbles: t = !0, ...i } = e, r = O(null), c = Fo(n), s = Vo(o);
|
|
1757
|
+
return N(() => {
|
|
1758
|
+
const u = r.current, l = window.HTMLInputElement.prototype, d = Object.getOwnPropertyDescriptor(l, "checked").set;
|
|
1759
|
+
if (c !== n && d) {
|
|
1760
|
+
const p = new Event("click", {
|
|
1761
|
+
bubbles: t
|
|
1762
|
+
});
|
|
1763
|
+
u.indeterminate = q(n), d.call(u, q(n) ? !1 : n), u.dispatchEvent(p);
|
|
1764
|
+
}
|
|
1765
|
+
}, [
|
|
1766
|
+
c,
|
|
1767
|
+
n,
|
|
1768
|
+
t
|
|
1769
|
+
]), /* @__PURE__ */ z("input", U({
|
|
1770
|
+
type: "checkbox",
|
|
1771
|
+
"aria-hidden": !0,
|
|
1772
|
+
defaultChecked: q(n) ? !1 : n
|
|
1773
|
+
}, i, {
|
|
1774
|
+
tabIndex: -1,
|
|
1775
|
+
ref: r,
|
|
1776
|
+
style: {
|
|
1777
|
+
...e.style,
|
|
1778
|
+
...s,
|
|
1779
|
+
position: "absolute",
|
|
1780
|
+
pointerEvents: "none",
|
|
1781
|
+
opacity: 0,
|
|
1782
|
+
margin: 0
|
|
1783
|
+
}
|
|
1784
|
+
}));
|
|
1785
|
+
};
|
|
1786
|
+
function q(e) {
|
|
1787
|
+
return e === "indeterminate";
|
|
1788
|
+
}
|
|
1789
|
+
function ut(e) {
|
|
1790
|
+
return q(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1791
|
+
}
|
|
1792
|
+
const rr = er, ir = nr, sr = "_checkboxContainer_pb9za_5", cr = "_checkbox_pb9za_5", ar = "_checkboxIndicator_pb9za_27", lr = "_checkboxLabel_pb9za_38", ur = "_noTextHighlight_pb9za_42", dr = "_checkboxHidden_pb9za_51", Z = {
|
|
1793
|
+
checkboxContainer: sr,
|
|
1794
|
+
checkbox: cr,
|
|
1795
|
+
checkboxIndicator: ar,
|
|
1796
|
+
checkboxLabel: lr,
|
|
1797
|
+
noTextHighlight: ur,
|
|
1798
|
+
checkboxHidden: dr
|
|
1799
|
+
}, hr = b(function({ className: o, labelClassName: n, label: t, checked: i, onCheckedChange: r, ...c }, s) {
|
|
1800
|
+
const u = `c-${t}-${/* @__PURE__ */ new Date()}`;
|
|
1801
|
+
return /* @__PURE__ */ a(xn, { children: ({ isHovered: l, ...h }) => /* @__PURE__ */ _(T, { className: Z.checkboxContainer, ...h, children: [
|
|
1802
|
+
/* @__PURE__ */ a(
|
|
1803
|
+
rr,
|
|
1804
|
+
{
|
|
1805
|
+
id: u,
|
|
1806
|
+
className: $(
|
|
1807
|
+
Z.checkbox,
|
|
1808
|
+
!l && !i && Z.checkboxHidden,
|
|
1809
|
+
o
|
|
1810
|
+
),
|
|
1811
|
+
checked: i,
|
|
1812
|
+
onCheckedChange: (d) => {
|
|
1813
|
+
r && r(d);
|
|
1814
|
+
},
|
|
1815
|
+
ref: s,
|
|
1816
|
+
...c,
|
|
1817
|
+
children: /* @__PURE__ */ a(ir, { className: Z.checkboxIndicator, children: i === "indeterminate" ? /* @__PURE__ */ a(bt, { width: "13px" }) : /* @__PURE__ */ a(xt, {}) })
|
|
1818
|
+
}
|
|
1819
|
+
),
|
|
1820
|
+
t && /* @__PURE__ */ a(
|
|
1821
|
+
"label",
|
|
1822
|
+
{
|
|
1823
|
+
className: $(Z.checkboxLabel, n, Z.noTextHighlight),
|
|
1824
|
+
htmlFor: u,
|
|
1825
|
+
children: t
|
|
1826
|
+
}
|
|
1827
|
+
)
|
|
1828
|
+
] }) });
|
|
1829
|
+
}), dt = C(hr);
|
|
1830
|
+
dt.displayName = "Checkbox";
|
|
1831
|
+
const Zr = C(function({
|
|
1832
|
+
className: o,
|
|
1833
|
+
labelClassName: n,
|
|
1834
|
+
label: t,
|
|
1835
|
+
onCheckedChange: i,
|
|
1836
|
+
children: r,
|
|
1837
|
+
...c
|
|
1838
|
+
}) {
|
|
1839
|
+
const [s, u] = S(!1), [l, h] = S(Array(r.length).fill(!1)), d = (m) => {
|
|
1840
|
+
const f = s === "indeterminate" || !m;
|
|
1841
|
+
h(l.map((v) => !f)), i && i(m);
|
|
1842
|
+
};
|
|
1843
|
+
N(() => {
|
|
1844
|
+
const m = l.filter((f) => f).length;
|
|
1845
|
+
m === 0 ? u(!1) : m === r.length ? u(!0) : u("indeterminate");
|
|
1846
|
+
}, [r, l]);
|
|
1847
|
+
const p = V.Children.map(
|
|
1848
|
+
r,
|
|
1849
|
+
(m, f) => V.cloneElement(m, {
|
|
1850
|
+
...m.props,
|
|
1851
|
+
checked: !!m.props.checked || l[f],
|
|
1852
|
+
onCheckedChange: (v) => {
|
|
1853
|
+
const g = [...l];
|
|
1854
|
+
g[f] = v, h(g), m.props.onCheckedChange && m.props.onCheckedChange(v);
|
|
1855
|
+
}
|
|
1856
|
+
})
|
|
1857
|
+
);
|
|
1858
|
+
return /* @__PURE__ */ _(F, { children: [
|
|
1859
|
+
/* @__PURE__ */ a(
|
|
1860
|
+
dt,
|
|
1861
|
+
{
|
|
1862
|
+
className: o,
|
|
1863
|
+
labelClassName: n,
|
|
1864
|
+
label: t,
|
|
1865
|
+
checked: s,
|
|
1866
|
+
onCheckedChange: d,
|
|
1867
|
+
...c
|
|
1868
|
+
}
|
|
1869
|
+
),
|
|
1870
|
+
p
|
|
1871
|
+
] });
|
|
1872
|
+
});
|
|
1227
1873
|
export {
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1874
|
+
oi as AccessibleIcon,
|
|
1875
|
+
dn as AlertDialog,
|
|
1876
|
+
et as AlertDialogContent,
|
|
1877
|
+
Rr as AlertDialogProvider,
|
|
1878
|
+
ri as AspectRatio,
|
|
1879
|
+
ii as Avatar,
|
|
1880
|
+
Pr as Badge,
|
|
1881
|
+
si as Blockquote,
|
|
1882
|
+
ci as Box,
|
|
1883
|
+
ye as Button,
|
|
1884
|
+
Ze as ButtonGroup,
|
|
1885
|
+
Nr as ButtonList,
|
|
1886
|
+
ai as Callout,
|
|
1887
|
+
li as Card,
|
|
1888
|
+
ui as Checkbox,
|
|
1889
|
+
di as Code,
|
|
1890
|
+
hi as Container,
|
|
1891
|
+
fi as ContextMenu,
|
|
1892
|
+
Xr as DefaultTheme,
|
|
1893
|
+
Ar as Dialog,
|
|
1894
|
+
zr as DropdownMenu,
|
|
1895
|
+
pi as Em,
|
|
1896
|
+
De as Flex,
|
|
1897
|
+
mi as Grid,
|
|
1898
|
+
gi as Heading,
|
|
1899
|
+
vi as HoverCard,
|
|
1900
|
+
xn as HoverUtility,
|
|
1901
|
+
Ye as IconButton,
|
|
1902
|
+
Br as Input,
|
|
1903
|
+
Ci as Inset,
|
|
1904
|
+
_i as Kbd,
|
|
1905
|
+
Wr as LeftAndRightPanels,
|
|
1906
|
+
bi as Link,
|
|
1907
|
+
Hr as MultiPagePopover,
|
|
1908
|
+
Ir as MultiSelect,
|
|
1909
|
+
Zn as Popover,
|
|
1910
|
+
xi as Portal,
|
|
1911
|
+
$i as Quote,
|
|
1912
|
+
yi as RadioGroup,
|
|
1913
|
+
bo as Root,
|
|
1914
|
+
wi as ScrollArea,
|
|
1915
|
+
Si as Section,
|
|
1916
|
+
Dr as Select,
|
|
1917
|
+
Zr as SelectAllCheckbox,
|
|
1918
|
+
Qr as Separator,
|
|
1919
|
+
Mr as Sidebar,
|
|
1920
|
+
Lr as SlideOut,
|
|
1921
|
+
ki as Slider,
|
|
1922
|
+
Pi as Slot,
|
|
1923
|
+
Ti as Strong,
|
|
1924
|
+
Er as Switch,
|
|
1925
|
+
Ni as Table,
|
|
1926
|
+
Ai as Tabs,
|
|
1927
|
+
qr as Text,
|
|
1928
|
+
jr as TextArea,
|
|
1929
|
+
Ri as TextField,
|
|
1930
|
+
Oi as Theme,
|
|
1931
|
+
No as Toast,
|
|
1932
|
+
nt as ToastContext,
|
|
1933
|
+
Gr as ToastProvider,
|
|
1934
|
+
Fr as ToggleGroup,
|
|
1935
|
+
Vr as Toolbar,
|
|
1936
|
+
Kr as Tooltip,
|
|
1937
|
+
zi as VisuallyHidden,
|
|
1938
|
+
Tr as divButtonProps,
|
|
1939
|
+
Oo as unsafeShowToast,
|
|
1940
|
+
Di as updateThemeAppearanceClass,
|
|
1941
|
+
fn as useAlertDialog,
|
|
1942
|
+
Or as useDiscardAlertDialog,
|
|
1943
|
+
A as useSeverityColor,
|
|
1944
|
+
Ii as useThemeContext,
|
|
1945
|
+
Ur as useToast,
|
|
1946
|
+
kr as useViewportSize
|
|
1299
1947
|
};
|
|
1300
1948
|
//# sourceMappingURL=blocks.js.map
|