@overmap-ai/blocks 0.0.7 → 0.0.9-alpha.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/dist/blocks.js CHANGED
@@ -1,21 +1,24 @@
1
1
  import "@radix-ui/themes/styles.css";
2
2
  export * from "@radix-ui/colors";
3
- import { Cross1Icon as Fe, DragHandleDots2Icon as ae, Cross2Icon as Xe } from "@radix-ui/react-icons";
3
+ import { Cross1Icon as Ke, DragHandleDots2Icon as ue, Cross2Icon as Qe } from "@radix-ui/react-icons";
4
4
  export * from "@radix-ui/react-icons";
5
- import { useThemeContext as Ue, Badge as qe, Button as Ke, IconButton as De, Flex as R, Box as M, Card as Qe, Inset as ee, Dialog as j, AlertDialog as W, DropdownMenu as O, Select as E, Checkbox as Ye, Switch as Je, Portal as Ze, TextField as te, Text as ce, Popover as ne, TextArea as et, Callout as oe, Theme as tt, Separator as xe } from "@radix-ui/themes";
6
- import { AccessibleIcon as co, AspectRatio as lo, Avatar as uo, Blockquote as ho, Box as po, Callout as mo, Card as fo, Checkbox as go, Code as Co, Container as vo, ContextMenu as _o, Em as yo, Flex as wo, Grid as xo, Heading as To, HoverCard as So, Inset as Po, Kbd as bo, Link as Ro, Portal as Do, Quote as $o, RadioGroup as zo, ScrollArea as Io, Section as Oo, Slider as ko, Slot as No, Strong as Ao, Table as Eo, Tabs as Bo, TextField as Lo, Theme as Mo, Tooltip as Wo, VisuallyHidden as Go, updateThemeAppearanceClass as Ho, useThemeContext as Vo } from "@radix-ui/themes";
7
- import { jsx as n, jsxs as v, Fragment as le } from "react/jsx-runtime";
8
- import q, { useMemo as G, forwardRef as T, memo as _, createContext as ge, useContext as Ce, useState as D, useCallback as w, createElement as $e, useEffect as ue, useRef as se, useLayoutEffect as nt } from "react";
9
- import * as re from "@radix-ui/react-dialog";
10
- import { Resizable as pe } from "re-resizable";
11
- import { Transition as Te } from "react-transition-group";
12
- import { Root as ot, Item as rt } from "@radix-ui/react-toggle-group";
13
- import * as X from "@radix-ui/react-toast";
14
- import { ToastProvider as it, ToastViewport as st } from "@radix-ui/react-toast";
15
- function at(r) {
5
+ import { useThemeContext as Ye, Badge as Je, Button as Ze, IconButton as Ee, Flex as P, Box as W, Card as et, Inset as re, Dialog as F, AlertDialog as M, DropdownMenu as I, Select as B, Checkbox as tt, Switch as nt, Portal as ot, TextField as ie, Text as he, Popover as se, TextArea as rt, Callout as ae, Theme as it, Separator as Oe } from "@radix-ui/themes";
6
+ import { AccessibleIcon as Bo, AspectRatio as Lo, Avatar as Mo, Blockquote as Wo, Box as jo, Callout as Ho, Card as Go, Checkbox as Vo, Code as Fo, Container as Xo, ContextMenu as Uo, Em as qo, Grid as Ko, Heading as Qo, HoverCard as Yo, Inset as Jo, Kbd as Zo, Link as er, Portal as tr, Quote as nr, RadioGroup as or, ScrollArea as rr, Section as ir, Slider as sr, Slot as ar, Strong as cr, Table as lr, Tabs as ur, TextField as dr, Theme as hr, Tooltip as pr, VisuallyHidden as mr, updateThemeAppearanceClass as fr, useThemeContext as gr } from "@radix-ui/themes";
7
+ import { jsx as e, jsxs as v, Fragment as pe } from "react/jsx-runtime";
8
+ import Z, { useMemo as j, forwardRef as x, memo as C, createContext as we, useContext as xe, useState as b, useCallback as w, createElement as ke, useEffect as ee, useRef as Y, useLayoutEffect as st } from "react";
9
+ import "react-responsive";
10
+ import * as ce from "@radix-ui/react-dialog";
11
+ import { Root as at, Portal as ct, Overlay as lt, Content as ut } from "@radix-ui/react-dialog";
12
+ import { Resizable as de } from "re-resizable";
13
+ import { Transition as Ce } from "react-transition-group";
14
+ import { Root as dt, Item as ht } from "@radix-ui/react-toggle-group";
15
+ import { Root as pt } from "@radix-ui/react-toolbar";
16
+ import * as K from "@radix-ui/react-toast";
17
+ import { ToastProvider as mt, ToastViewport as ft } from "@radix-ui/react-toast";
18
+ function gt(r) {
16
19
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
17
20
  }
18
- var ze = { exports: {} };
21
+ var Ae = { exports: {} };
19
22
  /*!
20
23
  Copyright (c) 2018 Jed Watson.
21
24
  Licensed under the MIT License (MIT), see
@@ -23,26 +26,26 @@ var ze = { exports: {} };
23
26
  */
24
27
  (function(r) {
25
28
  (function() {
26
- var s = {}.hasOwnProperty;
29
+ var i = {}.hasOwnProperty;
27
30
  function o() {
28
- for (var t = [], i = 0; i < arguments.length; i++) {
29
- var e = arguments[i];
30
- if (e) {
31
- var c = typeof e;
31
+ for (var t = [], s = 0; s < arguments.length; s++) {
32
+ var n = arguments[s];
33
+ if (n) {
34
+ var c = typeof n;
32
35
  if (c === "string" || c === "number")
33
- t.push(e);
34
- else if (Array.isArray(e)) {
35
- if (e.length) {
36
- var a = o.apply(null, e);
36
+ t.push(n);
37
+ else if (Array.isArray(n)) {
38
+ if (n.length) {
39
+ var a = o.apply(null, n);
37
40
  a && t.push(a);
38
41
  }
39
42
  } else if (c === "object") {
40
- if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]")) {
41
- t.push(e.toString());
43
+ if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]")) {
44
+ t.push(n.toString());
42
45
  continue;
43
46
  }
44
- for (var u in e)
45
- s.call(e, u) && e[u] && t.push(u);
47
+ for (var u in n)
48
+ i.call(n, u) && n[u] && t.push(u);
46
49
  }
47
50
  }
48
51
  }
@@ -50,438 +53,458 @@ var ze = { exports: {} };
50
53
  }
51
54
  r.exports ? (o.default = o, r.exports = o) : window.classNames = o;
52
55
  })();
53
- })(ze);
54
- var ct = ze.exports;
55
- const x = /* @__PURE__ */ at(ct);
56
- function B(r, s) {
57
- return G(() => {
56
+ })(Ae);
57
+ var _t = Ae.exports;
58
+ const S = /* @__PURE__ */ gt(_t);
59
+ function L(r, i) {
60
+ return j(() => {
58
61
  if (r !== void 0)
59
62
  if (typeof r == "object") {
60
63
  if (!("initial" in r))
61
64
  throw new Error("Expected initial property to be set in Responsive object");
62
- return Object.fromEntries(Object.entries(r).map(([o, t]) => [o, s[t]]));
65
+ return Object.fromEntries(Object.entries(r).map(([o, t]) => [o, i[t]]));
63
66
  } else
64
- return s[r];
65
- }, [s, r]);
67
+ return i[r];
68
+ }, [i, r]);
66
69
  }
67
- const lt = {
70
+ const Ct = {
68
71
  success: "green",
69
72
  danger: "red",
70
73
  info: "gray"
71
- }, b = (r) => {
72
- const s = Ue();
74
+ }, O = (r) => {
75
+ const i = Ye();
73
76
  if (r)
74
- return r === "primary" ? s.accentColor : lt[r];
75
- }, ut = T(function({ className: s, severity: o = "primary", color: t, children: i, ...e }, c) {
76
- const a = b(o);
77
- return /* @__PURE__ */ n(
78
- qe,
77
+ return r === "primary" ? i.accentColor : Ct[r];
78
+ }, vt = x(function({ className: i, severity: o = "primary", color: t, children: s, ...n }, c) {
79
+ const a = O(o);
80
+ return /* @__PURE__ */ e(
81
+ Je,
79
82
  {
80
- className: x("overmap-badge", s),
83
+ className: S("overmap-badge", i),
81
84
  ref: c,
82
85
  color: t || a,
83
- ...e,
84
- children: i
86
+ ...n,
87
+ children: s
85
88
  }
86
89
  );
87
- }), En = _(ut), dt = "_fluid_r73gr_1", ht = "_hoverSpin90Clockwise_r73gr_15", pt = "_hoverSpin180Clockwise_r73gr_25", mt = "_hoverSpin360Clockwise_r73gr_35", U = {
88
- fluid: dt,
89
- hoverSpin90Clockwise: ht,
90
- hoverSpin180Clockwise: pt,
91
- hoverSpin360Clockwise: mt
92
- }, Ie = {
93
- spin90Clockwise: U.hoverSpin90Clockwise,
94
- spin180Clockwise: U.hoverSpin180Clockwise,
95
- spin360Clockwise: U.hoverSpin360Clockwise
96
- }, ft = (r) => {
90
+ }), co = C(vt), yt = "_fluid_r73gr_1", wt = "_hoverSpin90Clockwise_r73gr_15", xt = "_hoverSpin180Clockwise_r73gr_25", St = "_hoverSpin360Clockwise_r73gr_35", J = {
91
+ fluid: yt,
92
+ hoverSpin90Clockwise: wt,
93
+ hoverSpin180Clockwise: xt,
94
+ hoverSpin360Clockwise: St
95
+ }, Be = {
96
+ spin90Clockwise: J.hoverSpin90Clockwise,
97
+ spin180Clockwise: J.hoverSpin180Clockwise,
98
+ spin360Clockwise: J.hoverSpin360Clockwise
99
+ }, Tt = (r) => {
97
100
  (r.key === "Enter" || r.key === " ") && r.currentTarget.click();
98
- }, Bn = {
101
+ }, lo = {
99
102
  role: "button",
100
103
  tabIndex: 0,
101
- onKeyDown: ft
102
- }, F = {
104
+ onKeyDown: Tt
105
+ }, X = {
103
106
  small: "1",
104
107
  medium: "2",
105
108
  large: "3"
106
- }, Oe = ge({}), ve = () => Ce(Oe), gt = T(function(s, o) {
107
- const t = ve(), {
108
- className: i,
109
- type: e = "button",
109
+ }, Le = we({}), Se = () => xe(Le), Rt = x(function(i, o) {
110
+ const t = Se(), {
111
+ className: s,
112
+ type: n = "button",
110
113
  fluid: c = t.fluid ?? !1,
111
114
  size: a = t.size ?? "medium",
112
115
  severity: u = t.severity ?? "primary",
113
116
  hoverEffects: l = t.hoverEffects ?? [],
114
- variant: h = t.variant,
117
+ variant: d = t.variant,
115
118
  ...p
116
- } = s, m = b(u), f = l.map((d) => Ie[d]);
117
- return /* @__PURE__ */ n(
118
- Ke,
119
+ } = i, m = O(u), f = l.map((h) => Be[h]);
120
+ return /* @__PURE__ */ e(
121
+ Ze,
119
122
  {
120
123
  ref: o,
121
- type: e,
122
- className: x(i, f, {
123
- [U.fluid]: c
124
+ type: n,
125
+ className: S(s, f, {
126
+ [J.fluid]: c
124
127
  }),
125
128
  color: m,
126
- size: B(a, F),
127
- variant: h,
129
+ size: L(a, X),
130
+ variant: d,
128
131
  ...p
129
132
  }
130
133
  );
131
- }), me = q.memo(gt), Ct = T(function(s, o) {
132
- const t = ve(), {
133
- className: i,
134
- children: e,
134
+ }), ve = Z.memo(Rt), bt = x(function(i, o) {
135
+ const t = Se(), {
136
+ className: s,
137
+ children: n,
135
138
  type: c = "button",
136
139
  fluid: a = t.fluid ?? !1,
137
140
  size: u = t.size ?? "medium",
138
141
  severity: l = t.severity ?? "primary",
139
- hoverEffects: h = t.hoverEffects ?? [],
142
+ hoverEffects: d = t.hoverEffects ?? [],
140
143
  variant: p = t.variant,
141
144
  ...m
142
- } = s, f = b(l), d = (h == null ? void 0 : h.map((g) => Ie[g])) || [];
143
- return /* @__PURE__ */ n(
144
- De,
145
+ } = i, f = O(l), h = (d == null ? void 0 : d.map((g) => Be[g])) || [];
146
+ return /* @__PURE__ */ e(
147
+ Ee,
145
148
  {
146
- className: x(i, d, {
147
- [U.fluid]: a
149
+ className: S(s, h, {
150
+ [J.fluid]: a
148
151
  }),
149
152
  ref: o,
150
153
  color: f,
151
- size: B(u, F),
154
+ size: L(u, X),
152
155
  variant: p,
153
156
  type: c,
154
157
  ...m,
155
- children: e
158
+ children: n
156
159
  }
157
160
  );
158
- }), ke = q.memo(Ct), vt = "_merged_wdgxo_1", _t = {
159
- merged: vt
160
- }, yt = {
161
+ }), Me = Z.memo(bt), $t = "_merged_wdgxo_1", Pt = {
162
+ merged: $t
163
+ }, Ot = {
161
164
  row: { small: "4", medium: "4", large: "5" },
162
165
  column: { small: "2", medium: "3", large: "4" }
163
- }, wt = T(function({
164
- className: s,
166
+ }, Dt = x(function({
167
+ className: i,
165
168
  merged: o = !1,
166
169
  children: t,
167
- gap: i,
168
- direction: e = "row",
170
+ gap: s,
171
+ direction: n = "row",
169
172
  severity: c,
170
173
  size: a = "medium",
171
174
  variant: u,
172
175
  hoverEffects: l,
173
- fluid: h,
176
+ fluid: d,
174
177
  ...p
175
178
  }, m) {
176
- const f = B(a, yt[e]), d = u === "ghost" ? f : "0";
177
- return /* @__PURE__ */ n(
178
- R,
179
+ const f = L(a, Ot[n]), h = u === "ghost" ? f : "0";
180
+ return /* @__PURE__ */ e(
181
+ P,
179
182
  {
180
- className: x("overmap-button-group", s, {
181
- [_t.merged]: o
183
+ className: S("overmap-button-group", i, {
184
+ [Pt.merged]: o
182
185
  }),
183
186
  ref: m,
184
- gap: o ? i ?? d : i ?? "2",
185
- direction: e,
186
- "data-direction": e,
187
+ gap: o ? s ?? h : s ?? "2",
188
+ direction: n,
189
+ "data-direction": n,
187
190
  ...p,
188
- children: /* @__PURE__ */ n(Oe.Provider, { value: { size: a, severity: c, variant: u, hoverEffects: l, fluid: h }, children: t })
191
+ children: /* @__PURE__ */ e(Le.Provider, { value: { size: a, severity: c, variant: u, hoverEffects: l, fluid: d }, children: t })
189
192
  }
190
193
  );
191
- }), Ne = _(wt), xt = "_separators_1f7v1_1", Tt = {
192
- separators: xt
193
- }, St = _(
194
- T((r, s) => {
195
- const { children: o, border: t, before: i, after: e, size: c } = r, a = t ? "surface" : "ghost", u = B(c, F), h = /* @__PURE__ */ v(Qe, { ref: s, size: u, variant: a, children: [
196
- i,
197
- i && e ? /* @__PURE__ */ n(ee, { side: "x", pt: "current", pb: "current", children: o }) : i ? /* @__PURE__ */ n(ee, { side: "bottom", pt: "current", children: o }) : e ? /* @__PURE__ */ n(ee, { side: "top", pb: "current", children: o }) : /* @__PURE__ */ n(ee, { children: o }),
198
- e
194
+ }), We = C(Dt), zt = "_separators_1f7v1_1", It = {
195
+ separators: zt
196
+ }, Nt = C(
197
+ x((r, i) => {
198
+ const { children: o, border: t, before: s, after: n, size: c } = r, a = t ? "surface" : "ghost", u = L(c, X), d = /* @__PURE__ */ v(et, { ref: i, size: u, variant: a, children: [
199
+ s,
200
+ s && n ? /* @__PURE__ */ e(re, { side: "x", pt: "current", pb: "current", children: o }) : s ? /* @__PURE__ */ e(re, { side: "bottom", pt: "current", children: o }) : n ? /* @__PURE__ */ e(re, { side: "top", pb: "current", children: o }) : /* @__PURE__ */ e(re, { children: o }),
201
+ n
199
202
  ] });
200
- return a === "ghost" ? /* @__PURE__ */ n(M, { p: "3", children: h }) : h;
203
+ return a === "ghost" ? /* @__PURE__ */ e(W, { p: "3", children: d }) : d;
201
204
  })
202
- ), Pt = _(
203
- T((r, s) => {
204
- const { children: o, variant: t = "outline", size: i, className: e, ...c } = r;
205
- return /* @__PURE__ */ n(St, { ...c, border: t === "outline" || t === "surface", size: i, children: /* @__PURE__ */ n(
206
- Ne,
205
+ ), Et = C(
206
+ x((r, i) => {
207
+ const { children: o, variant: t = "outline", size: s, className: n, ...c } = r;
208
+ return /* @__PURE__ */ e(Nt, { ...c, border: t === "outline" || t === "surface", size: s, children: /* @__PURE__ */ e(
209
+ We,
207
210
  {
208
- size: i,
211
+ size: s,
209
212
  severity: "info",
210
213
  variant: t === "outline" ? "ghost" : t === "surface" ? "soft" : t,
211
- className: x(e, Tt.separators),
214
+ className: S(n, It.separators),
212
215
  merged: !0,
213
216
  gap: "0",
214
217
  direction: "column",
215
- ref: s,
218
+ ref: i,
216
219
  children: o
217
220
  }
218
221
  ) });
219
222
  })
220
- ), bt = _(
221
- T((r, s) => {
222
- const { variant: o } = ve(), t = /* @__PURE__ */ n(me, { ref: s, ...r, radius: "large", variant: o });
223
- return o === "ghost" ? /* @__PURE__ */ n(M, { asChild: !0, my: "1", mx: "2", children: t }) : t;
223
+ ), kt = C(
224
+ x((r, i) => {
225
+ const { variant: o } = Se(), t = /* @__PURE__ */ e(ve, { ref: i, ...r, radius: "large", variant: o });
226
+ return o === "ghost" ? /* @__PURE__ */ e(W, { asChild: !0, my: "1", mx: "2", children: t }) : t;
224
227
  })
225
- ), Ln = {
226
- Root: Pt,
227
- Item: bt
228
- }, Rt = _(function(s) {
229
- const { title: o, description: t, content: i, closeDialog: e } = s;
230
- return /* @__PURE__ */ v(R, { direction: "column", gap: "2", children: [
231
- /* @__PURE__ */ v(R, { direction: "column", gap: "1", children: [
232
- /* @__PURE__ */ v(R, { justify: "between", children: [
233
- /* @__PURE__ */ n(j.Title, { mb: "0", children: o }),
234
- /* @__PURE__ */ n(j.Close, { children: /* @__PURE__ */ n(De, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ n(Fe, {}) }) })
228
+ ), uo = {
229
+ Root: Et,
230
+ Item: kt
231
+ }, At = C(function(i) {
232
+ const { title: o, description: t, content: s, closeDialog: n } = i;
233
+ return /* @__PURE__ */ v(P, { direction: "column", gap: "2", children: [
234
+ /* @__PURE__ */ v(P, { direction: "column", gap: "1", children: [
235
+ /* @__PURE__ */ v(P, { justify: "between", children: [
236
+ /* @__PURE__ */ e(F.Title, { mb: "0", children: o }),
237
+ /* @__PURE__ */ e(F.Close, { children: /* @__PURE__ */ e(Ee, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ e(Ke, {}) }) })
235
238
  ] }),
236
- t && /* @__PURE__ */ n(j.Description, { children: t })
239
+ t && /* @__PURE__ */ e(F.Description, { children: t })
237
240
  ] }),
238
- i(e)
241
+ s(n)
239
242
  ] });
240
- }), Mn = _(
241
- T((r, s) => {
242
- const { children: o, content: t, title: i, description: e, onOpen: c, defaultOpen: a, onCloseInterrupt: u, ...l } = r, [h, p] = D(a ?? !1), m = w(
243
- (d) => {
244
- if (d && c)
243
+ }), ho = C(
244
+ x((r, i) => {
245
+ const { children: o, content: t, title: s, description: n, onOpen: c, defaultOpen: a, onCloseInterrupt: u, ...l } = r, [d, p] = b(a ?? !1), m = w(
246
+ (h) => {
247
+ if (h && c)
245
248
  c();
246
- else if (!d && u)
249
+ else if (!h && u)
247
250
  return u(() => p(!1));
248
- p(d);
251
+ p(h);
249
252
  },
250
253
  [c, u]
251
254
  ), f = w(
252
- (d) => {
253
- if (d != null && d.force)
255
+ (h) => {
256
+ if (h != null && h.force)
254
257
  return p(!1);
255
258
  m(!1);
256
259
  },
257
260
  [m]
258
261
  );
259
- return /* @__PURE__ */ v(j.Root, { open: h, onOpenChange: m, children: [
260
- /* @__PURE__ */ n(j.Trigger, { children: o }),
261
- /* @__PURE__ */ n(j.Content, { ref: s, ...l, children: /* @__PURE__ */ n(
262
- Rt,
262
+ return /* @__PURE__ */ v(F.Root, { open: d, onOpenChange: m, children: [
263
+ /* @__PURE__ */ e(F.Trigger, { children: o }),
264
+ /* @__PURE__ */ e(F.Content, { ref: i, ...l, children: /* @__PURE__ */ e(
265
+ At,
263
266
  {
264
267
  closeDialog: f,
265
268
  content: t,
266
- title: i,
267
- description: e
269
+ title: s,
270
+ description: n
268
271
  }
269
272
  ) })
270
273
  ] });
271
274
  })
272
- ), Ae = (r) => /* @__PURE__ */ n(W.Title, { mb: "0", ...r }), Dt = (r) => {
273
- const { title: s, description: o, actionText: t = "Confirm", cancelText: i = "Cancel", onAction: e, onCancel: c, severity: a } = r;
274
- return /* @__PURE__ */ v(R, { direction: "column", gap: "2", children: [
275
- /* @__PURE__ */ v(R, { direction: "column", gap: "1", children: [
276
- /* @__PURE__ */ n(Ae, { children: s }),
277
- /* @__PURE__ */ n(W.Description, { children: o })
275
+ ), je = (r) => /* @__PURE__ */ e(M.Title, { mb: "0", ...r }), Bt = (r) => {
276
+ const { title: i, description: o, actionText: t = "Confirm", cancelText: s = "Cancel", onAction: n, onCancel: c, severity: a } = r;
277
+ return /* @__PURE__ */ v(P, { direction: "column", gap: "2", children: [
278
+ /* @__PURE__ */ v(P, { direction: "column", gap: "1", children: [
279
+ /* @__PURE__ */ e(je, { children: i }),
280
+ /* @__PURE__ */ e(M.Description, { children: o })
278
281
  ] }),
279
- /* @__PURE__ */ v(R, { gap: "3", mt: "4", justify: "end", children: [
280
- /* @__PURE__ */ n(W.Cancel, { children: /* @__PURE__ */ n(me, { variant: "soft", severity: "info", onClick: c, children: i }) }),
281
- /* @__PURE__ */ n(W.Action, { children: /* @__PURE__ */ n(me, { variant: "solid", severity: a, onClick: e, children: t }) })
282
+ /* @__PURE__ */ v(P, { gap: "3", mt: "4", justify: "end", children: [
283
+ /* @__PURE__ */ e(M.Cancel, { children: /* @__PURE__ */ e(ve, { variant: "soft", severity: "info", onClick: c, children: s }) }),
284
+ /* @__PURE__ */ e(M.Action, { children: /* @__PURE__ */ e(ve, { variant: "solid", severity: a, onClick: n, children: t }) })
282
285
  ] })
283
286
  ] });
284
- }, $t = _(function(s) {
285
- const { open: o, setOpen: t, children: i, ...e } = s, c = G(() => ({
287
+ }, Lt = C(function(i) {
288
+ const { open: o, setOpen: t, children: s, ...n } = i, c = j(() => ({
286
289
  close: () => t(!1),
287
- Title: Ae,
288
- Description: W.Description
290
+ Title: je,
291
+ Description: M.Description
289
292
  }), [t]);
290
- return /* @__PURE__ */ v(W.Root, { open: o, onOpenChange: t, children: [
291
- /* @__PURE__ */ n(W.Content, { children: "content" in e ? e.content(c) : /* @__PURE__ */ n(Dt, { ...e }) }),
292
- i
293
+ return /* @__PURE__ */ v(M.Root, { open: o, onOpenChange: t, children: [
294
+ /* @__PURE__ */ e(M.Content, { children: "content" in n ? n.content(c) : /* @__PURE__ */ e(Bt, { ...n }) }),
295
+ s
293
296
  ] });
294
- }), Ee = ge(() => {
297
+ }), He = we(() => {
295
298
  throw new Error("No AlertDialogProvider found");
296
- }), zt = {
299
+ }), Mt = {
297
300
  content: () => null
298
- }, Wn = _(function({ children: s }) {
299
- const [o, t] = D(!1), [i, e] = D(zt), c = w(
301
+ }, po = C(function({ children: i }) {
302
+ const [o, t] = b(!1), [s, n] = b(Mt), c = w(
300
303
  (a) => {
301
304
  if (o)
302
305
  throw new Error("AlertDialog is already open");
303
- e(a), t(!0);
306
+ n(a), t(!0);
304
307
  },
305
308
  [o]
306
309
  );
307
- return /* @__PURE__ */ n($t, { open: o, setOpen: t, ...i, children: /* @__PURE__ */ n(Ee.Provider, { value: c, children: s }) });
308
- }), It = () => Ce(Ee), Gn = () => {
309
- const r = It();
310
+ return /* @__PURE__ */ e(Lt, { open: o, setOpen: t, ...s, children: /* @__PURE__ */ e(He.Provider, { value: c, children: i }) });
311
+ }), Wt = () => xe(He), mo = () => {
312
+ const r = Wt();
310
313
  return w(
311
- (s) => r({
314
+ (i) => r({
312
315
  title: "Discard changes?",
313
316
  description: "You have unsaved changes. Are you sure you want to discard them?",
314
317
  actionText: "Discard",
315
318
  severity: "danger",
316
- onAction: s.onDiscard,
317
- onCancel: s.onCancel
319
+ onAction: i.onDiscard,
320
+ onCancel: i.onCancel
318
321
  }),
319
322
  [r]
320
323
  );
321
- }, Ot = _(function({
322
- severity: s,
324
+ }, jt = "_zeroMinWidth_curjh_1", Ht = "_zeroMinHeight_curjh_5", Gt = "_radius_curjh_9", _e = {
325
+ zeroMinWidth: jt,
326
+ zeroMinHeight: Ht,
327
+ radius: Gt
328
+ }, Te = C(
329
+ x(
330
+ ({ className: r, radius: i = !1, children: o, zeroMinWidth: t = !1, zeroMinHeight: s = !1, ...n }, c) => /* @__PURE__ */ e(
331
+ P,
332
+ {
333
+ className: S(r, {
334
+ [_e.radius]: i,
335
+ [_e.zeroMinWidth]: t,
336
+ [_e.zeroMinHeight]: s
337
+ }),
338
+ ref: c,
339
+ ...n,
340
+ children: o
341
+ }
342
+ )
343
+ )
344
+ ), Vt = C(function({
345
+ severity: i,
323
346
  itemContent: o,
324
347
  closeOnSelect: t = !0,
325
- onSelect: i,
326
- ...e
348
+ onSelect: s,
349
+ ...n
327
350
  }) {
328
- const c = b(s), a = w(
351
+ const c = O(i), a = w(
329
352
  (u) => {
330
- t || u.preventDefault(), i && i(u);
353
+ t || u.preventDefault(), s && s(u);
331
354
  },
332
- [t, i]
355
+ [t, s]
333
356
  );
334
- return /* @__PURE__ */ n(O.Item, { onSelect: a, color: c, ...e, children: o });
335
- }), kt = _(function({
336
- defaultOpen: s,
357
+ return /* @__PURE__ */ e(I.Item, { onSelect: a, color: c, ...n, children: o });
358
+ }), Ft = C(function({
359
+ defaultOpen: i,
337
360
  open: o,
338
361
  onOpenChange: t,
339
- modal: i,
340
- trigger: e,
362
+ modal: s,
363
+ trigger: n,
341
364
  label: c,
342
365
  severity: a = "info",
343
366
  children: u,
344
367
  ...l
345
368
  }) {
346
- const h = b(a);
347
- return /* @__PURE__ */ v(O.Root, { defaultOpen: s, open: o, onOpenChange: t, modal: i, children: [
348
- /* @__PURE__ */ n(O.Trigger, { children: e }),
349
- /* @__PURE__ */ v(O.Content, { color: h, ...l, children: [
350
- c && /* @__PURE__ */ n(O.Label, { children: c }),
369
+ const d = O(a);
370
+ return /* @__PURE__ */ v(I.Root, { defaultOpen: i, open: o, onOpenChange: t, modal: s, children: [
371
+ /* @__PURE__ */ e(I.Trigger, { children: n }),
372
+ /* @__PURE__ */ v(I.Content, { color: d, ...l, children: [
373
+ c && /* @__PURE__ */ e(I.Label, { children: c }),
351
374
  u
352
375
  ] })
353
376
  ] });
354
- }), Nt = _(function({
355
- separatorBelow: s = !1,
377
+ }), Xt = C(function({
378
+ separatorBelow: i = !1,
356
379
  separatorAbove: o = !1,
357
380
  children: t,
358
- ...i
381
+ ...s
359
382
  }) {
360
- return /* @__PURE__ */ v(le, { children: [
361
- o && /* @__PURE__ */ n(O.Separator, {}),
362
- /* @__PURE__ */ n(O.Group, { ...i, children: t }),
363
- s && /* @__PURE__ */ n(O.Separator, {})
383
+ return /* @__PURE__ */ v(pe, { children: [
384
+ o && /* @__PURE__ */ e(I.Separator, {}),
385
+ /* @__PURE__ */ e(I.Group, { ...s, children: t }),
386
+ i && /* @__PURE__ */ e(I.Separator, {})
364
387
  ] });
365
- }), At = _(function({
366
- defaultOpen: s,
388
+ }), Ut = C(function({
389
+ defaultOpen: i,
367
390
  open: o,
368
391
  onOpenChange: t,
369
- trigger: i,
370
- children: e,
392
+ trigger: s,
393
+ children: n,
371
394
  ...c
372
395
  }) {
373
- return /* @__PURE__ */ v(O.Sub, { defaultOpen: s, open: o, onOpenChange: t, children: [
374
- /* @__PURE__ */ n(O.SubTrigger, { children: i }),
375
- /* @__PURE__ */ n(O.SubContent, { ...c, children: e })
396
+ return /* @__PURE__ */ v(I.Sub, { defaultOpen: i, open: o, onOpenChange: t, children: [
397
+ /* @__PURE__ */ e(I.SubTrigger, { children: s }),
398
+ /* @__PURE__ */ e(I.SubContent, { ...c, children: n })
376
399
  ] });
377
- }), Hn = {
378
- Root: kt,
379
- ItemGroup: Nt,
380
- Item: Ot,
381
- SubMenu: At
382
- }, Vn = _(function({ children: s }) {
383
- const [o, t] = D(!1), i = w(() => {
400
+ }), fo = {
401
+ Root: Ft,
402
+ ItemGroup: Xt,
403
+ Item: Vt,
404
+ SubMenu: Ut
405
+ }, go = C(function({ children: i }) {
406
+ const [o, t] = b(!1), s = w(() => {
384
407
  t(!0);
385
- }, []), e = w(() => {
408
+ }, []), n = w(() => {
386
409
  t(!1);
387
410
  }, []);
388
- return s({
411
+ return i({
389
412
  isHovered: o,
390
- onPointerEnter: i,
391
- onPointerLeave: e
413
+ onPointerEnter: s,
414
+ onPointerLeave: n
392
415
  });
393
- }), Et = "_fluid_7n1wr_1", Se = {
394
- fluid: Et
395
- }, Bt = T(function({
396
- className: s,
416
+ }), qt = "_fluid_7n1wr_1", De = {
417
+ fluid: qt
418
+ }, Kt = x(function({
419
+ className: i,
397
420
  fluid: o,
398
421
  size: t = "medium",
399
- variant: i = "surface",
400
- severity: e = "primary",
422
+ variant: s = "surface",
423
+ severity: n = "primary",
401
424
  itemSeverity: c = "info",
402
425
  placeholder: a = "Select",
403
426
  side: u,
404
427
  items: l = [],
405
- value: h,
428
+ value: d,
406
429
  id: p,
407
430
  ...m
408
431
  }, f) {
409
- const d = B(t, F), g = b(e), C = b(c);
410
- return /* @__PURE__ */ $e(E.Root, { size: d, ...m, key: h === void 0 ? 1 : 0, value: h }, /* @__PURE__ */ n(
411
- E.Trigger,
432
+ const h = L(t, X), g = O(n), _ = O(c);
433
+ return /* @__PURE__ */ ke(B.Root, { size: h, ...m, key: d === void 0 ? 1 : 0, value: d }, /* @__PURE__ */ e(
434
+ B.Trigger,
412
435
  {
413
- className: x(s, {
414
- [Se.fluid]: o
436
+ className: S(i, {
437
+ [De.fluid]: o
415
438
  }),
416
439
  id: p,
417
440
  ref: f,
418
- variant: i,
441
+ variant: s,
419
442
  placeholder: a,
420
443
  color: g
421
444
  }
422
- ), /* @__PURE__ */ n(
423
- E.Content,
445
+ ), /* @__PURE__ */ e(
446
+ B.Content,
424
447
  {
425
448
  side: u,
426
- className: Se.contentDefault,
449
+ className: De.contentDefault,
427
450
  position: "popper",
428
- variant: i !== "surface" ? "soft" : "solid",
429
- color: C,
430
- children: l.map(({ itemContent: P, value: y, ...$ }) => /* @__PURE__ */ n(E.Item, { className: "overmap-select-item", value: y, ...$, children: P }, y))
451
+ variant: s !== "surface" ? "soft" : "solid",
452
+ color: _,
453
+ children: l.map(({ itemContent: T, value: y, ...$ }) => /* @__PURE__ */ e(B.Item, { className: "overmap-select-item", value: y, ...$, children: T }, y))
431
454
  }
432
455
  ));
433
- }), jn = q.memo(Bt), Pe = _(
434
- T((r, s) => {
435
- const { checked: o, label: t, value: i, size: e = "2" } = r;
436
- return /* @__PURE__ */ n(M, { asChild: !0, px: e, children: /* @__PURE__ */ n(E.Item, { value: i, ref: s, children: /* @__PURE__ */ v(R, { gap: e, align: "center", children: [
437
- /* @__PURE__ */ n(Ye, { checked: o }),
456
+ }), _o = Z.memo(Kt), ze = C(
457
+ x((r, i) => {
458
+ const { checked: o, label: t, value: s, size: n = "2" } = r;
459
+ return /* @__PURE__ */ e(W, { asChild: !0, px: n, children: /* @__PURE__ */ e(B.Item, { value: s, ref: i, children: /* @__PURE__ */ v(P, { gap: n, align: "center", children: [
460
+ /* @__PURE__ */ e(tt, { checked: o }),
438
461
  t
439
462
  ] }) }) });
440
463
  })
441
- ), ie = "__select_all__", Fn = _(
442
- T((r, s) => {
443
- const [o, t] = D(!1), { placeholder: i, value: e, onValueChange: c, options: a, disabled: u, name: l, ...h } = r, p = B(r.size, F), m = b(r.severity), f = G(() => new Map(a.map((y) => [y.value, y.label])), [a]), d = e.length > 4 ? (
464
+ ), le = "__select_all__", Co = C(
465
+ x((r, i) => {
466
+ const [o, t] = b(!1), { placeholder: s, value: n, onValueChange: c, options: a, disabled: u, name: l, ...d } = r, p = L(r.size, X), m = O(r.severity), f = j(() => new Map(a.map((y) => [y.value, y.label])), [a]), h = n.length > 4 ? (
444
467
  // to ensure the width of the select doesn't get too big
445
- `${e.length} options selected`
468
+ `${n.length} options selected`
446
469
  ) : (
447
470
  // convert the values to labels
448
- /* @__PURE__ */ n("span", { children: e.flatMap((y) => [f.get(y), ", "]).slice(0, -1) })
449
- ), g = w(() => t(!1), []), C = w((y) => {
471
+ /* @__PURE__ */ e("span", { children: n.flatMap((y) => [f.get(y), ", "]).slice(0, -1) })
472
+ ), g = w(() => t(!1), []), _ = w((y) => {
450
473
  y && t(!0);
451
- }, []), P = w(
474
+ }, []), T = w(
452
475
  (y) => {
453
476
  let $;
454
- y === ie ? $ = e.length === a.length ? [] : a.map((de) => de.value) : $ = e.includes(y) ? e.filter((L) => L !== y) : [...e, y], c($);
477
+ y === le ? $ = n.length === a.length ? [] : a.map((H) => H.value) : $ = n.includes(y) ? n.filter((N) => N !== y) : [...n, y], c($);
455
478
  },
456
- [c, a, e]
479
+ [c, a, n]
457
480
  );
458
- return ue(() => {
459
- if (a.some(({ value: y }) => y === ie))
460
- throw new Error(`Cannot have an option with the value "${ie}"`);
481
+ return ee(() => {
482
+ if (a.some(({ value: y }) => y === le))
483
+ throw new Error(`Cannot have an option with the value "${le}"`);
461
484
  }, [a]), /* @__PURE__ */ v(
462
- E.Root,
485
+ B.Root,
463
486
  {
464
487
  open: o,
465
488
  value: "",
466
- onOpenChange: C,
467
- onValueChange: P,
489
+ onOpenChange: _,
490
+ onValueChange: T,
468
491
  disabled: u,
469
492
  size: p,
470
493
  name: l,
471
494
  autoComplete: "off",
472
495
  children: [
473
- /* @__PURE__ */ n(
474
- E.Trigger,
496
+ /* @__PURE__ */ e(
497
+ B.Trigger,
475
498
  {
476
- ref: s,
499
+ ref: i,
477
500
  color: m,
478
- placeholder: e.length > 0 ? d : i,
479
- "data-placeholder": e.length > 0 ? void 0 : !0,
480
- ...h
501
+ placeholder: n.length > 0 ? h : s,
502
+ "data-placeholder": n.length > 0 ? void 0 : !0,
503
+ ...d
481
504
  }
482
505
  ),
483
506
  /* @__PURE__ */ v(
484
- E.Content,
507
+ B.Content,
485
508
  {
486
509
  color: "gray",
487
510
  variant: "soft",
@@ -489,20 +512,20 @@ const lt = {
489
512
  onEscapeKeyDown: g,
490
513
  onPointerDownOutside: g,
491
514
  children: [
492
- /* @__PURE__ */ n(
493
- Pe,
515
+ /* @__PURE__ */ e(
516
+ ze,
494
517
  {
495
- value: ie,
518
+ value: le,
496
519
  label: "Select all",
497
- checked: e.length === a.length,
520
+ checked: n.length === a.length,
498
521
  size: p
499
522
  }
500
523
  ),
501
- a.map((y) => /* @__PURE__ */ n(
502
- Pe,
524
+ a.map((y) => /* @__PURE__ */ e(
525
+ ze,
503
526
  {
504
527
  ...y,
505
- checked: e.includes(y.value),
528
+ checked: n.includes(y.value),
506
529
  size: p
507
530
  },
508
531
  y.value
@@ -514,84 +537,84 @@ const lt = {
514
537
  }
515
538
  );
516
539
  })
517
- ), Lt = {
540
+ ), Qt = {
518
541
  default: "_default_u936h_1"
519
- }, Mt = T(function({ className: s, severity: o = "primary", icon: t, defaultChecked: i = !1, onCheckedChange: e, ...c }, a) {
520
- const u = se(null), [l, h] = D(c.checked ? c.checked : i), [p, m] = D(), f = b(o);
521
- nt(() => {
522
- var P;
523
- const C = a || u;
524
- "current" in C && C.current && m((P = C.current) == null ? void 0 : P.querySelector("span.rt-SwitchThumb"));
542
+ }, Yt = x(function({ className: i, severity: o = "primary", icon: t, defaultChecked: s = !1, onCheckedChange: n, ...c }, a) {
543
+ const u = Y(null), [l, d] = b(c.checked ? c.checked : s), [p, m] = b(), f = O(o);
544
+ st(() => {
545
+ var T;
546
+ const _ = a || u;
547
+ "current" in _ && _.current && m((T = _.current) == null ? void 0 : T.querySelector("span.rt-SwitchThumb"));
525
548
  }, [a]);
526
- const d = w(
527
- (C) => {
528
- h(C), e && e(C);
549
+ const h = w(
550
+ (_) => {
551
+ d(_), n && n(_);
529
552
  },
530
- [e]
553
+ [n]
531
554
  ), g = c.checked ? c.checked : l;
532
- return /* @__PURE__ */ v(le, { children: [
533
- /* @__PURE__ */ n(
534
- Je,
555
+ return /* @__PURE__ */ v(pe, { children: [
556
+ /* @__PURE__ */ e(
557
+ nt,
535
558
  {
536
- className: x("overmap-switch", s, Lt.default),
559
+ className: S("overmap-switch", i, Qt.default),
537
560
  ref: a || u,
538
561
  color: f,
539
562
  radius: "full",
540
- defaultChecked: i,
541
- onCheckedChange: d,
563
+ defaultChecked: s,
564
+ onCheckedChange: h,
542
565
  ...c
543
566
  }
544
567
  ),
545
- /* @__PURE__ */ n(Ze, { container: p, asChild: !0, children: t && "checked" in t ? g ? t.checked : t.unchecked : t })
568
+ /* @__PURE__ */ e(ot, { container: p, asChild: !0, children: t && "checked" in t ? g ? t.checked : t.unchecked : t })
546
569
  ] });
547
- }), Xn = _(Mt), Wt = "_sidebarContent_1onyo_1", Gt = "_right_1onyo_7", Ht = "_resizeHandle_1onyo_10", Vt = "_left_1onyo_13", jt = "_overlay_1onyo_33", H = {
548
- sidebarContent: Wt,
549
- right: Gt,
550
- resizeHandle: Ht,
551
- left: Vt,
552
- overlay: jt
553
- }, Ft = T(function({
554
- side: s = "left",
570
+ }), vo = C(Yt), Jt = "_sidebarContent_1onyo_1", Zt = "_right_1onyo_7", en = "_resizeHandle_1onyo_10", tn = "_left_1onyo_13", nn = "_overlay_1onyo_33", G = {
571
+ sidebarContent: Jt,
572
+ right: Zt,
573
+ resizeHandle: en,
574
+ left: tn,
575
+ overlay: nn
576
+ }, on = { width: "auto", height: "100%" }, rn = x(function({
577
+ side: i = "left",
555
578
  modal: o = !0,
556
579
  children: t,
557
- open: i,
558
- containerSelector: e,
580
+ open: s,
581
+ containerSelector: n,
559
582
  overlay: c = !0,
560
583
  resizable: a = !0,
561
584
  // Props related to Resizable
562
585
  minWidth: u = "300px",
563
586
  maxWidth: l = "500px",
564
- ...h
587
+ ...d
565
588
  }, p) {
566
- const m = s === "right", f = s === "left", [d, g] = D();
567
- return ue(() => {
568
- const C = e ?? '[data-is-root-theme="true"]', P = document.querySelector(C);
569
- if (P === void 0)
570
- throw new Error(`Could not find a container element using the following selector ${C}`);
571
- g(P);
572
- }, [e]), /* @__PURE__ */ n(re.Root, { open: i, modal: o, children: /* @__PURE__ */ v(re.Portal, { container: d, children: [
573
- c && /* @__PURE__ */ n(re.Overlay, { className: x(H.overlay) }),
574
- /* @__PURE__ */ n(
575
- re.Content,
589
+ const m = i === "right", f = i === "left", [h, g] = b();
590
+ return ee(() => {
591
+ const _ = n ?? '[data-is-root-theme="true"]', T = document.querySelector(_);
592
+ if (T === void 0)
593
+ throw new Error(`Could not find a container element using the following selector ${_}`);
594
+ g(T);
595
+ }, [n]), /* @__PURE__ */ e(ce.Root, { open: s, modal: o, children: /* @__PURE__ */ v(ce.Portal, { container: h, children: [
596
+ c && /* @__PURE__ */ e(ce.Overlay, { className: S(G.overlay) }),
597
+ /* @__PURE__ */ e(
598
+ ce.Content,
576
599
  {
577
- className: x("overmap-sidebar", "rt-DialogContent", H.sidebarContent, {
578
- [H.left]: f,
579
- [H.right]: m
600
+ className: S("overmap-sidebar", "rt-DialogContent", G.sidebarContent, {
601
+ [G.left]: f,
602
+ [G.right]: m
580
603
  }),
581
604
  ref: p,
582
605
  asChild: !0,
583
- ...h,
584
- children: /* @__PURE__ */ n(M, { width: "auto", children: /* @__PURE__ */ n(
585
- pe,
606
+ ...d,
607
+ children: /* @__PURE__ */ e(W, { width: "auto", children: /* @__PURE__ */ e(
608
+ de,
586
609
  {
587
610
  minWidth: u,
588
611
  maxWidth: l,
589
- defaultSize: { width: "300px", height: "100%" },
612
+ defaultSize: on,
590
613
  enable: { right: a && f, left: a && m },
591
- handleClasses: { left: H.resizeHandle, right: H.resizeHandle },
614
+ handleClasses: { left: G.resizeHandle, right: G.resizeHandle },
592
615
  handleComponent: {
593
- right: /* @__PURE__ */ n(ae, {}),
594
- left: /* @__PURE__ */ n(ae, {})
616
+ right: /* @__PURE__ */ e(ue, {}),
617
+ left: /* @__PURE__ */ e(ue, {})
595
618
  },
596
619
  children: t
597
620
  }
@@ -599,161 +622,241 @@ const lt = {
599
622
  }
600
623
  )
601
624
  ] }) });
602
- }), Un = _(Ft), Xt = "_accommodateCharCount_sr18k_1", Ut = "_wrapper_sr18k_5", qt = "_noLeftIcon_sr18k_13", Kt = "_noRightIcon_sr18k_17", Qt = "_charCount_sr18k_21", V = {
603
- accommodateCharCount: Xt,
604
- wrapper: Ut,
625
+ }), yo = C(rn), sn = "_content_jyaca_1", an = "_left_jyaca_10", cn = "_right_jyaca_13", ln = "_resizable_jyaca_17", un = "_slideOutOverlay_jyaca_21", Q = {
626
+ content: sn,
627
+ left: an,
628
+ right: cn,
629
+ resizable: ln,
630
+ slideOutOverlay: un
631
+ }, Ge = 200, dn = {
632
+ enter: 0,
633
+ exit: Ge
634
+ }, wo = C(function({
635
+ open: i,
636
+ side: o = "left",
637
+ container: t,
638
+ children: s,
639
+ minWidth: n,
640
+ maxWidth: c,
641
+ resizable: a = !0,
642
+ overlay: u = !1,
643
+ modal: l = !1,
644
+ resizeHandle: d,
645
+ ...p
646
+ }) {
647
+ const m = Y(null), [f, h] = b(n), [g, _] = b(), T = o === "left", y = o === "right";
648
+ ee(() => {
649
+ _(document.querySelector('[data-is-root-theme="true"]'));
650
+ }, []);
651
+ const $ = w(
652
+ (U, Re, fe, q) => {
653
+ h(fe.clientWidth);
654
+ },
655
+ []
656
+ ), N = w(() => {
657
+ m.current && (m.current.style.transform = `translateX(${y ? 100 : -100}%)`);
658
+ }, [y]), H = w(() => {
659
+ m.current && (m.current.style.transition = `transform ${Ge}ms linear`);
660
+ }, []), me = w(() => {
661
+ m.current && (m.current.style.transform = "translateX(0)");
662
+ }, []);
663
+ return /* @__PURE__ */ e(at, { open: !0, modal: l, children: /* @__PURE__ */ e(
664
+ Ce,
665
+ {
666
+ in: i,
667
+ timeout: dn,
668
+ nodeRef: m,
669
+ onEnter: N,
670
+ onEntering: H,
671
+ onEntered: me,
672
+ onExiting: H,
673
+ onExit: N,
674
+ unmountOnExit: !0,
675
+ mountOnEnter: !0,
676
+ children: () => /* @__PURE__ */ v(ct, { container: t || g, children: [
677
+ u && /* @__PURE__ */ e(lt, { className: Q.slideOutOverlay }),
678
+ /* @__PURE__ */ e(
679
+ ut,
680
+ {
681
+ className: S("overmap-slide-out", Q.content, {
682
+ [Q.left]: T,
683
+ [Q.right]: y
684
+ }),
685
+ asChild: !0,
686
+ ...p,
687
+ children: /* @__PURE__ */ e(W, { width: "auto", ref: m, children: /* @__PURE__ */ e(
688
+ de,
689
+ {
690
+ className: Q.resizable,
691
+ defaultSize: { width: f, height: "100%" },
692
+ onResize: $,
693
+ enable: { right: a && T, left: a && y },
694
+ handleComponent: { left: d, right: d },
695
+ minWidth: n,
696
+ maxWidth: c,
697
+ children: s
698
+ }
699
+ ) })
700
+ }
701
+ )
702
+ ] })
703
+ }
704
+ ) });
705
+ }), hn = "_accommodateCharCount_sr18k_1", pn = "_wrapper_sr18k_5", mn = "_noLeftIcon_sr18k_13", fn = "_noRightIcon_sr18k_17", gn = "_charCount_sr18k_21", V = {
706
+ accommodateCharCount: hn,
707
+ wrapper: pn,
605
708
  default: "_default_sr18k_9",
606
- noLeftIcon: qt,
607
- noRightIcon: Kt,
608
- charCount: Qt
609
- }, Yt = T(function({
610
- className: s,
709
+ noLeftIcon: mn,
710
+ noRightIcon: fn,
711
+ charCount: gn
712
+ }, _n = x(function({
713
+ className: i,
611
714
  leftSlot: o,
612
715
  rightSlot: t,
613
- size: i = "medium",
614
- showInputLength: e,
716
+ size: s = "medium",
717
+ showInputLength: n,
615
718
  value: c,
616
719
  variant: a,
617
720
  severity: u = "primary",
618
721
  ...l
619
- }, h) {
620
- const p = B(i, F), m = b(u), f = e || e === void 0 && l.maxLength !== void 0, d = c !== void 0 ? c.toString() : void 0;
722
+ }, d) {
723
+ const p = L(s, X), m = O(u), f = n || n === void 0 && l.maxLength !== void 0, h = c !== void 0 ? c.toString() : void 0;
621
724
  return /* @__PURE__ */ v(
622
- te.Root,
725
+ ie.Root,
623
726
  {
624
- className: x(V.wrapper, {
727
+ className: S(V.wrapper, {
625
728
  [V.accommodateCharCount]: f
626
729
  }),
627
730
  size: p,
628
731
  variant: a,
629
732
  color: m,
630
733
  children: [
631
- o && /* @__PURE__ */ n(te.Slot, { children: o }),
632
- /* @__PURE__ */ n(
633
- te.Input,
734
+ o && /* @__PURE__ */ e(ie.Slot, { children: o }),
735
+ /* @__PURE__ */ e(
736
+ ie.Input,
634
737
  {
635
- className: x(V.default, s, {
738
+ className: S(V.default, i, {
636
739
  [V.noLeftIcon]: !o,
637
740
  [V.noRightIcon]: !t
638
741
  }),
639
- ref: h,
742
+ ref: d,
640
743
  size: p,
641
744
  variant: a,
642
745
  color: m,
643
746
  ...l
644
747
  }
645
748
  ),
646
- t && /* @__PURE__ */ n(te.Slot, { children: t }),
647
- f && /* @__PURE__ */ n(ce, { as: "p", className: V.charCount, size: "1", color: "gray", children: l.maxLength !== void 0 ? `${d == null ? void 0 : d.length}/${l.maxLength}` : `${d == null ? void 0 : d.length}` })
749
+ t && /* @__PURE__ */ e(ie.Slot, { children: t }),
750
+ f && /* @__PURE__ */ e(he, { as: "p", className: V.charCount, size: "1", color: "gray", children: l.maxLength !== void 0 ? `${h == null ? void 0 : h.length}/${l.maxLength}` : `${h == null ? void 0 : h.length}` })
648
751
  ]
649
752
  }
650
753
  );
651
- }), qn = q.memo(Yt), Jt = "_wrapper_tmtz0_1", Zt = {
652
- wrapper: Jt
653
- }, en = T(function({ className: s, defaultOpen: o = !1, modal: t = !1, content: i, children: e, ...c }, a) {
654
- return /* @__PURE__ */ v(ne.Root, { defaultOpen: o, modal: t, children: [
655
- /* @__PURE__ */ n(ne.Trigger, { children: e }),
656
- /* @__PURE__ */ n(
657
- ne.Content,
754
+ }), xo = Z.memo(_n), Cn = "_wrapper_tmtz0_1", vn = {
755
+ wrapper: Cn
756
+ }, yn = x(function({ className: i, defaultOpen: o = !1, modal: t = !1, content: s, children: n, ...c }, a) {
757
+ return /* @__PURE__ */ v(se.Root, { defaultOpen: o, modal: t, children: [
758
+ /* @__PURE__ */ e(se.Trigger, { children: n }),
759
+ /* @__PURE__ */ e(
760
+ se.Content,
658
761
  {
659
762
  ref: a,
660
- className: x("overmap-popover", s, Zt.wrapper),
763
+ className: S("overmap-popover", i, vn.wrapper),
661
764
  ...c,
662
- children: i(ne.Close)
765
+ children: s(se.Close)
663
766
  }
664
767
  )
665
768
  ] });
666
- }), Kn = q.memo(en), tn = "_wrapper_1mz2e_1", nn = "_panelContent_1mz2e_6", on = "_left_1mz2e_14", rn = "_right_1mz2e_18", sn = "_resizable_1mz2e_23", an = "_resizeHandle_1mz2e_28", cn = "_panelMainContent_1mz2e_48", I = {
667
- wrapper: tn,
668
- panelContent: nn,
669
- left: on,
670
- right: rn,
671
- resizable: sn,
672
- resizeHandle: an,
673
- panelMainContent: cn
674
- }, be = 200, A = 150, Qn = _(function({
675
- children: s,
769
+ }), So = Z.memo(yn), wn = "_wrapper_1ssf2_1", xn = "_panelContent_1ssf2_6", Sn = "_left_1ssf2_14", Tn = "_right_1ssf2_18", Rn = "_resizable_1ssf2_23", bn = "_resizeHandle_1ssf2_28", $n = "_panelMainContent_1ssf2_48", z = {
770
+ wrapper: wn,
771
+ panelContent: xn,
772
+ left: Sn,
773
+ right: Tn,
774
+ resizable: Rn,
775
+ resizeHandle: bn,
776
+ panelMainContent: $n
777
+ }, Ie = 200, A = 150, To = C(function({
778
+ children: i,
676
779
  showLeft: o,
677
780
  leftPanel: t,
678
- leftMinWidth: i = be,
679
- showRight: e,
781
+ leftMinWidth: s = Ie,
782
+ showRight: n,
680
783
  rightPanel: c,
681
- rightMinWidth: a = be,
784
+ rightMinWidth: a = Ie,
682
785
  resizeable: u
683
786
  }) {
684
- const l = se(null), h = se(null), [p, m] = D(0), [f, d] = D(), g = se(null), [C, P] = D(0), [y, $] = D(), L = w(
685
- (S, z, k) => (N, ye, we, he) => {
787
+ const l = Y(null), d = Y(null), [p, m] = b(0), [f, h] = b(), g = Y(null), [_, T] = b(0), [y, $] = b(), N = w(
788
+ (R, D, E) => (k, $e, Pe, ge) => {
686
789
  if (!l.current)
687
790
  return;
688
- const Y = S + he.width;
689
- k(l.current.clientWidth - Y), z(() => Y);
791
+ const te = R + ge.width;
792
+ E(l.current.clientWidth - te), D(() => te);
690
793
  },
691
794
  []
692
- ), de = w(
693
- (S, z, k, N) => L(p, m, $)(S, z, k, N),
694
- [L, p]
695
- ), Le = w(
696
- (S, z, k, N) => L(C, P, d)(S, z, k, N),
697
- [L, C]
698
- ), K = w(
699
- (S, z, k, N, ye, we, he, Y) => {
795
+ ), H = w(
796
+ (R, D, E, k) => N(p, m, $)(R, D, E, k),
797
+ [N, p]
798
+ ), me = w(
799
+ (R, D, E, k) => N(_, T, h)(R, D, E, k),
800
+ [N, _]
801
+ ), U = w(
802
+ (R, D, E, k, $e, Pe, ge, te) => {
700
803
  if (!l.current)
701
804
  return;
702
- let J = S;
703
- if (J === 0 && (J = z, k(J)), we) {
704
- const Z = l.current.clientWidth - J;
705
- Y(Z), ye > Z && (he(Z), N(l.current.clientWidth - Z));
805
+ let ne = R;
806
+ if (ne === 0 && (ne = D, E(ne)), Pe) {
807
+ const oe = l.current.clientWidth - ne;
808
+ te(oe), $e > oe && (ge(oe), k(l.current.clientWidth - oe));
706
809
  }
707
810
  },
708
811
  []
709
- ), Me = w(
710
- () => K(
711
- C,
812
+ ), Re = w(
813
+ () => U(
814
+ _,
712
815
  a,
713
- P,
816
+ T,
714
817
  $,
715
818
  p,
716
819
  o,
717
820
  m,
718
- d
821
+ h
719
822
  ),
720
- [K, p, a, C, o]
721
- ), We = w(
722
- () => K(
823
+ [U, p, a, _, o]
824
+ ), fe = w(
825
+ () => U(
723
826
  p,
724
- i,
827
+ s,
725
828
  m,
726
- d,
727
- C,
728
- e,
729
- P,
829
+ h,
830
+ _,
831
+ n,
832
+ T,
730
833
  $
731
834
  ),
732
- [K, i, p, C, e]
733
- ), Q = w(
734
- (S, z) => {
735
- l.current && S && z(l.current.clientWidth);
835
+ [U, s, p, _, n]
836
+ ), q = w(
837
+ (R, D) => {
838
+ l.current && R && D(l.current.clientWidth);
736
839
  },
737
840
  []
738
- ), Ge = w(
739
- () => Q(o, d),
740
- [Q, o]
741
- ), He = w(
742
- () => Q(e, $),
743
- [Q, e]
744
- ), _e = w(() => {
745
- var S, z, k, N;
746
- l.current && (d(l.current.clientWidth - (((S = g.current) == null ? void 0 : S.clientWidth) || 0)), $(l.current.clientWidth - (((z = h.current) == null ? void 0 : z.clientWidth) || 0)), m(((k = h.current) == null ? void 0 : k.clientWidth) || 0), P(((N = g.current) == null ? void 0 : N.clientWidth) || 0));
841
+ ), Fe = w(
842
+ () => q(o, h),
843
+ [q, o]
844
+ ), Xe = w(
845
+ () => q(n, $),
846
+ [q, n]
847
+ ), be = w(() => {
848
+ var R, D, E, k;
849
+ l.current && (h(l.current.clientWidth - (((R = g.current) == null ? void 0 : R.clientWidth) || 0)), $(l.current.clientWidth - (((D = d.current) == null ? void 0 : D.clientWidth) || 0)), m(((E = d.current) == null ? void 0 : E.clientWidth) || 0), T(((k = g.current) == null ? void 0 : k.clientWidth) || 0));
747
850
  }, []);
748
- ue(() => {
851
+ ee(() => {
749
852
  if (!l.current)
750
853
  return;
751
- const S = new ResizeObserver(_e);
752
- return S.observe(l.current), () => {
753
- S.disconnect();
854
+ const R = new ResizeObserver(be);
855
+ return R.observe(l.current), () => {
856
+ R.disconnect();
754
857
  };
755
- }, [_e]);
756
- const Ve = G(() => ({
858
+ }, [be]);
859
+ const Ue = j(() => ({
757
860
  entering: {
758
861
  transform: `translateX(-${p}px)`,
759
862
  marginRight: `-${p}px`,
@@ -777,10 +880,10 @@ const lt = {
777
880
  },
778
881
  exited: {},
779
882
  unmounted: {}
780
- }), [p]), je = G(() => ({
883
+ }), [p]), qe = j(() => ({
781
884
  entering: {
782
- transform: `translateX(${C}px)`,
783
- marginLeft: `${-C}px`,
885
+ transform: `translateX(${_}px)`,
886
+ marginLeft: `${-_}px`,
784
887
  transitionProperty: "transform, margin-left",
785
888
  transitionDuration: `${A}ms`,
786
889
  transitionTimingFunction: "linear"
@@ -793,20 +896,20 @@ const lt = {
793
896
  transitionTimingFunction: "linear"
794
897
  },
795
898
  exiting: {
796
- transform: `translateX(${C}px)`,
797
- marginLeft: `${-C}px`,
899
+ transform: `translateX(${_}px)`,
900
+ marginLeft: `${-_}px`,
798
901
  transitionProperty: "transform, margin-left",
799
902
  transitionDuration: `${A}ms`,
800
903
  transitionTimingFunction: "linear"
801
904
  },
802
905
  exited: {},
803
906
  unmounted: {}
804
- }), [C]);
907
+ }), [_]);
805
908
  return /* @__PURE__ */ v(
806
- R,
909
+ P,
807
910
  {
808
- className: I.wrapper,
809
- style: { minWidth: `${i + a}px` },
911
+ className: z.wrapper,
912
+ style: { minWidth: `${s + a}px` },
810
913
  ref: l,
811
914
  width: "100%",
812
915
  height: "100%",
@@ -814,40 +917,40 @@ const lt = {
814
917
  m: "0",
815
918
  p: "0",
816
919
  children: [
817
- /* @__PURE__ */ n(
818
- Te,
920
+ /* @__PURE__ */ e(
921
+ Ce,
819
922
  {
820
- nodeRef: h,
923
+ nodeRef: d,
821
924
  timeout: o ? 0 : A,
822
925
  in: o,
823
926
  unmountOnExit: !0,
824
- onEntering: We,
825
- onExited: He,
826
- children: (S) => /* @__PURE__ */ n(
827
- M,
927
+ onEntering: fe,
928
+ onExited: Xe,
929
+ children: (R) => /* @__PURE__ */ e(
930
+ W,
828
931
  {
829
- ref: h,
830
- className: x(I.panelContent, I.left),
831
- style: Ve[S],
932
+ ref: d,
933
+ className: S(z.panelContent, z.left),
934
+ style: Ue[R],
832
935
  width: "auto",
833
936
  height: "100%",
834
937
  m: "0",
835
938
  p: "0",
836
- children: /* @__PURE__ */ n(
837
- pe,
939
+ children: /* @__PURE__ */ e(
940
+ de,
838
941
  {
839
- className: I.resizable,
942
+ className: z.resizable,
840
943
  size: {
841
944
  width: p,
842
945
  height: "100%"
843
946
  },
844
- onResizeStop: de,
947
+ onResizeStop: H,
845
948
  enable: { right: (u == null ? void 0 : u.left) !== void 0 ? u.left : !0 },
846
- minWidth: i,
949
+ minWidth: s,
847
950
  maxWidth: f,
848
- handleClasses: { right: x(I.resizeHandle, I.left) },
951
+ handleClasses: { right: S(z.resizeHandle, z.left) },
849
952
  handleComponent: {
850
- right: /* @__PURE__ */ n(ae, { height: "14px", width: "14px" })
953
+ right: /* @__PURE__ */ e(ue, { height: "14px", width: "14px" })
851
954
  },
852
955
  children: t
853
956
  }
@@ -856,37 +959,37 @@ const lt = {
856
959
  )
857
960
  }
858
961
  ),
859
- /* @__PURE__ */ n(M, { className: I.panelMainContent, width: "max-content", children: s }),
860
- /* @__PURE__ */ n(
861
- Te,
962
+ /* @__PURE__ */ e("div", { className: z.panelMainContent, children: i }),
963
+ /* @__PURE__ */ e(
964
+ Ce,
862
965
  {
863
966
  nodeRef: g,
864
- timeout: e ? 0 : A,
865
- in: e,
967
+ timeout: n ? 0 : A,
968
+ in: n,
866
969
  unmountOnExit: !0,
867
- onEntering: Me,
868
- onExited: Ge,
869
- children: (S) => /* @__PURE__ */ n(
870
- M,
970
+ onEntering: Re,
971
+ onExited: Fe,
972
+ children: (R) => /* @__PURE__ */ e(
973
+ W,
871
974
  {
872
975
  ref: g,
873
- className: x(I.panelContent, I.right),
874
- style: je[S],
976
+ className: S(z.panelContent, z.right),
977
+ style: qe[R],
875
978
  width: "auto",
876
979
  height: "100%",
877
980
  m: "0",
878
981
  p: "0",
879
- children: /* @__PURE__ */ n(
880
- pe,
982
+ children: /* @__PURE__ */ e(
983
+ de,
881
984
  {
882
- className: I.resizable,
883
- size: { width: C, height: "100%" },
884
- onResizeStop: Le,
985
+ className: z.resizable,
986
+ size: { width: _, height: "100%" },
987
+ onResizeStop: me,
885
988
  enable: { left: (u == null ? void 0 : u.right) !== void 0 ? u.right : !0 },
886
989
  minWidth: a,
887
990
  maxWidth: y,
888
- handleClasses: { left: x(I.resizeHandle, I.right) },
889
- handleComponent: { left: /* @__PURE__ */ n(ae, { height: "14px", width: "14px" }) },
991
+ handleClasses: { left: S(z.resizeHandle, z.right) },
992
+ handleComponent: { left: /* @__PURE__ */ e(ue, { height: "14px", width: "14px" }) },
890
993
  children: c
891
994
  }
892
995
  )
@@ -897,259 +1000,295 @@ const lt = {
897
1000
  ]
898
1001
  }
899
1002
  );
900
- }), ln = "_charCount_17uut_1", un = {
901
- charCount: ln
902
- }, dn = T(function({ className: s, showInputLength: o, inputLengthTemplate: t, value: i, severity: e = "primary", resize: c, ...a }, u) {
903
- const l = b(e), h = b("info"), p = o || o === void 0 && (a.maxLength !== void 0 || a.minLength !== void 0), m = i !== void 0 ? i.toString() : "", f = G(() => {
1003
+ }), Pn = "_charCount_17uut_1", On = {
1004
+ charCount: Pn
1005
+ }, Dn = x(function({ className: i, showInputLength: o, inputLengthTemplate: t, value: s, severity: n = "primary", resize: c, ...a }, u) {
1006
+ const l = O(n), d = O("info"), p = o || o === void 0 && (a.maxLength !== void 0 || a.minLength !== void 0), m = s !== void 0 ? s.toString() : "", f = j(() => {
904
1007
  if (t) {
905
- let d = t.replace("{current}", m.length.toString());
906
- return a.minLength !== void 0 && (d = d.replace("{min}", a.minLength.toString())), a.maxLength !== void 0 && (d = d.replace("{max}", a.maxLength.toString())), d;
1008
+ let h = t.replace("{current}", m.length.toString());
1009
+ return a.minLength !== void 0 && (h = h.replace("{min}", a.minLength.toString())), a.maxLength !== void 0 && (h = h.replace("{max}", a.maxLength.toString())), h;
907
1010
  }
908
1011
  return m.length;
909
1012
  }, [t, a.maxLength, a.minLength, m.length]);
910
- return /* @__PURE__ */ v(le, { children: [
911
- /* @__PURE__ */ n(
912
- et,
1013
+ return /* @__PURE__ */ v(pe, { children: [
1014
+ /* @__PURE__ */ e(
1015
+ rt,
913
1016
  {
914
- className: x("overmap-textarea", s),
1017
+ className: S("overmap-textarea", i),
915
1018
  style: { resize: c },
916
1019
  ref: u,
917
- value: i,
1020
+ value: s,
918
1021
  color: l,
919
1022
  ...a
920
1023
  }
921
1024
  ),
922
- p && /* @__PURE__ */ n(ce, { as: "p", className: un.charCount, color: h, align: "right", children: f })
1025
+ p && /* @__PURE__ */ e(he, { as: "p", className: On.charCount, color: d, align: "right", children: f })
923
1026
  ] });
924
- }), Yn = _(dn), hn = T(function({
1027
+ }), Ro = C(Dn), zn = x(function({
925
1028
  // ToggleGroup Primitive Props
926
- loop: s,
1029
+ loop: i,
927
1030
  type: o,
928
1031
  rovingFocus: t,
929
- value: i,
930
- onValueChange: e,
1032
+ value: s,
1033
+ onValueChange: n,
931
1034
  defaultValue: c,
932
1035
  disabled: a,
933
1036
  items: u,
934
1037
  // ButtonGroup Props
935
1038
  className: l,
936
- direction: h = "row",
1039
+ direction: d = "row",
937
1040
  ...p
938
1041
  }, m) {
939
- return /* @__PURE__ */ n(
940
- ot,
1042
+ return /* @__PURE__ */ e(
1043
+ dt,
941
1044
  {
942
1045
  type: o,
943
- className: x("overmap-toggle-group", l),
1046
+ className: S("overmap-toggle-group", l),
944
1047
  ref: m,
945
- value: i,
946
- onValueChange: e,
1048
+ value: s,
1049
+ onValueChange: n,
947
1050
  disabled: a,
948
- orientation: h === "column" ? "vertical" : "horizontal",
949
- loop: s,
1051
+ orientation: d === "column" ? "vertical" : "horizontal",
1052
+ loop: i,
950
1053
  rovingFocus: t,
951
1054
  defaultValue: c,
952
1055
  asChild: !0,
953
- children: /* @__PURE__ */ n(Ne, { direction: h, ...p, children: u.map(({ children: f, ...d }) => /* @__PURE__ */ $e(rt, { asChild: !0, ...d, key: d.value }, /* @__PURE__ */ n(
954
- ke,
1056
+ children: /* @__PURE__ */ e(We, { direction: d, ...p, children: u.map(({ children: f, ...h }) => /* @__PURE__ */ ke(ht, { asChild: !0, ...h, key: h.value }, /* @__PURE__ */ e(
1057
+ Me,
955
1058
  {
956
- className: x("overmap-toggle-group-button"),
957
- "aria-label": d.value,
958
- variant: d.value === i ? "solid" : "soft",
1059
+ className: S("overmap-toggle-group-button"),
1060
+ "aria-label": h.value,
1061
+ variant: h.value === s ? "solid" : "soft",
959
1062
  children: f
960
1063
  }
961
1064
  ))) })
962
1065
  }
963
1066
  );
964
- }), Jn = _(hn), pn = "_ToastViewport_1i6bp_1", mn = "_actionButton_1i6bp_20", fn = "_ToastRoot_1i6bp_24", gn = "_slideIn_1i6bp_1", Cn = "_swipeOut_1i6bp_1", fe = {
965
- ToastViewport: pn,
966
- actionButton: mn,
967
- ToastRoot: fn,
968
- slideIn: gn,
969
- swipeOut: Cn
970
- }, vn = T(function({ title: s, description: o, icon: t, severity: i = "primary", size: e, onClose: c, sensitivity: a, action: u, ...l }, h) {
971
- const [p, m] = D(!0), f = b(i), d = w(
1067
+ }), bo = C(zn), In = {
1068
+ default: "_default_xqvoc_1"
1069
+ }, Nn = C(
1070
+ x(({ className: r, minContentGap: i = "2", children: o, ...t }, s) => /* @__PURE__ */ e(
1071
+ pt,
1072
+ {
1073
+ className: S(r, "overmap-toolbar", In.default),
1074
+ ref: s,
1075
+ asChild: !0,
1076
+ ...t,
1077
+ children: /* @__PURE__ */ e(Te, { grow: "1", width: "100%", height: "max-content", align: "center", gap: i, wrap: "nowrap", children: o })
1078
+ }
1079
+ ))
1080
+ ), En = C(
1081
+ x(({ children: r, gap: i = "2" }, o) => /* @__PURE__ */ e(Te, { ref: o, grow: "1", width: "max-content", height: "100%", align: "center", gap: i, children: r }))
1082
+ ), kn = C(
1083
+ x(({ children: r, gap: i }, o) => /* @__PURE__ */ e(
1084
+ Te,
1085
+ {
1086
+ ref: o,
1087
+ grow: "1",
1088
+ width: "max-content",
1089
+ direction: "row-reverse",
1090
+ height: "100%",
1091
+ align: "center",
1092
+ gap: i || "2",
1093
+ children: r
1094
+ }
1095
+ ))
1096
+ ), $o = {
1097
+ Root: Nn,
1098
+ LeftContent: En,
1099
+ RightContent: kn
1100
+ }, An = "_ToastViewport_1i6bp_1", Bn = "_actionButton_1i6bp_20", Ln = "_ToastRoot_1i6bp_24", Mn = "_slideIn_1i6bp_1", Wn = "_swipeOut_1i6bp_1", ye = {
1101
+ ToastViewport: An,
1102
+ actionButton: Bn,
1103
+ ToastRoot: Ln,
1104
+ slideIn: Mn,
1105
+ swipeOut: Wn
1106
+ }, jn = x(function({ title: i, description: o, icon: t, severity: s = "primary", size: n, onClose: c, sensitivity: a, action: u, ...l }, d) {
1107
+ const [p, m] = b(!0), f = O(s), h = w(
972
1108
  (g) => {
973
1109
  !g && c && c(), m(g);
974
1110
  },
975
1111
  [c]
976
1112
  );
977
- return /* @__PURE__ */ n(X.Root, { asChild: !0, ref: h, ...l, open: p, type: a, onOpenChange: d, children: /* @__PURE__ */ n(oe.Root, { className: fe.ToastRoot, variant: "surface", color: f, size: e, children: /* @__PURE__ */ v(R, { width: "100%", align: "center", gap: "4", justify: "between", children: [
978
- /* @__PURE__ */ v(R, { align: "center", gap: "3", children: [
979
- /* @__PURE__ */ n(oe.Icon, { children: t }),
980
- /* @__PURE__ */ v(R, { direction: "column", gap: "2", children: [
981
- /* @__PURE__ */ v(R, { direction: "column", gap: "0", children: [
982
- /* @__PURE__ */ n(X.Title, { asChild: !0, children: /* @__PURE__ */ n(oe.Text, { size: "3", weight: "medium", children: s }) }),
983
- /* @__PURE__ */ n(X.Description, { asChild: !0, children: /* @__PURE__ */ n(oe.Text, { children: o }) })
1113
+ return /* @__PURE__ */ e(K.Root, { asChild: !0, ref: d, ...l, open: p, type: a, onOpenChange: h, children: /* @__PURE__ */ e(ae.Root, { className: ye.ToastRoot, variant: "surface", color: f, size: n, children: /* @__PURE__ */ v(P, { width: "100%", align: "center", gap: "4", justify: "between", children: [
1114
+ /* @__PURE__ */ v(P, { align: "center", gap: "3", children: [
1115
+ /* @__PURE__ */ e(ae.Icon, { children: t }),
1116
+ /* @__PURE__ */ v(P, { direction: "column", gap: "2", children: [
1117
+ /* @__PURE__ */ v(P, { direction: "column", gap: "0", children: [
1118
+ /* @__PURE__ */ e(K.Title, { asChild: !0, children: /* @__PURE__ */ e(ae.Text, { size: "3", weight: "medium", children: i }) }),
1119
+ /* @__PURE__ */ e(K.Description, { asChild: !0, children: /* @__PURE__ */ e(ae.Text, { children: o }) })
984
1120
  ] }),
985
- u && /* @__PURE__ */ n(X.Action, { className: fe.actionButton, altText: u.altText, asChild: !0, children: u.content })
1121
+ u && /* @__PURE__ */ e(K.Action, { className: ye.actionButton, altText: u.altText, asChild: !0, children: u.content })
986
1122
  ] })
987
1123
  ] }),
988
- /* @__PURE__ */ n(X.Close, { asChild: !0, children: /* @__PURE__ */ n(ke, { "aria-label": "Close", variant: "ghost", severity: i, children: /* @__PURE__ */ n(Xe, {}) }) })
1124
+ /* @__PURE__ */ e(K.Close, { asChild: !0, children: /* @__PURE__ */ e(Me, { "aria-label": "Close", variant: "ghost", severity: s, children: /* @__PURE__ */ e(Qe, {}) }) })
989
1125
  ] }) }) });
990
- }), _n = _(vn), Be = ge({}), Zn = () => {
991
- const r = Ce(Be);
1126
+ }), Hn = C(jn), Ve = we({}), Po = () => {
1127
+ const r = xe(Ve);
992
1128
  if (!r)
993
1129
  throw new Error("useToast must be used within a ToastProvider");
994
1130
  return r;
995
- }, yn = 240 / 60, Re = 5e3, wn = (r) => {
996
- if (r.duration && r.duration >= Re)
1131
+ }, Gn = 240 / 60, Ne = 5e3, Vn = (r) => {
1132
+ if (r.duration && r.duration >= Ne)
997
1133
  return r.duration;
998
- const s = r.severity === "danger" ? 1.5 : 1, o = r.description.split(" ").length + r.title.split(" ").length;
999
- return (Re + o / yn) * s;
1134
+ const i = r.severity === "danger" ? 1.5 : 1, o = r.description.split(" ").length + r.title.split(" ").length;
1135
+ return (Ne + o / Gn) * i;
1000
1136
  };
1001
- let xn;
1002
- const eo = _(function({
1003
- children: s,
1137
+ let Fn;
1138
+ const Oo = C(function({
1139
+ children: i,
1004
1140
  // Use this class to change where the viewport for the toasts should be
1005
1141
  className: o,
1006
1142
  hotkey: t,
1007
- ...i
1143
+ ...s
1008
1144
  }) {
1009
- const [e, c] = D([]), a = w((l, h, p) => {
1145
+ const [n, c] = b([]), a = w((l, d, p) => {
1010
1146
  c((m) => {
1011
- const f = m.find((d) => d.id === l);
1012
- return f && h === 0 && clearTimeout(f.timeout), m.filter((d) => d.id !== l);
1147
+ const f = m.find((h) => h.id === l);
1148
+ return f && d === 0 && clearTimeout(f.timeout), m.filter((h) => h.id !== l);
1013
1149
  }), p && p();
1014
- }, []), u = G(() => {
1150
+ }, []), u = j(() => {
1015
1151
  let l = 0;
1016
- const h = (g) => {
1017
- const C = wn(g), P = l.toString();
1152
+ const d = (g) => {
1153
+ const _ = Vn(g), T = l.toString();
1018
1154
  l += 1;
1019
- const y = setTimeout(() => a(P, 1, g.onClose), C);
1020
- c(($) => [...$, { ...g, timeout: y, duration: C, id: P }]);
1021
- }, p = (g) => h({ ...g, severity: "primary" }), m = (g) => h({ ...g, severity: "success" }), f = (g) => h({ ...g, severity: "danger" }), d = (g) => h({ ...g, severity: "info" });
1022
- return xn = h, {
1023
- showToast: h,
1155
+ const y = setTimeout(() => a(T, 1, g.onClose), _);
1156
+ c(($) => [...$, { ...g, timeout: y, duration: _, id: T }]);
1157
+ }, p = (g) => d({ ...g, severity: "primary" }), m = (g) => d({ ...g, severity: "success" }), f = (g) => d({ ...g, severity: "danger" }), h = (g) => d({ ...g, severity: "info" });
1158
+ return Fn = d, {
1159
+ showToast: d,
1024
1160
  showPrimary: p,
1025
1161
  showSuccess: m,
1026
1162
  showError: f,
1027
- showInfo: d
1163
+ showInfo: h
1028
1164
  };
1029
1165
  }, [a]);
1030
- return ue(() => () => {
1031
- for (const { timeout: l } of e)
1166
+ return ee(() => () => {
1167
+ for (const { timeout: l } of n)
1032
1168
  clearTimeout(l);
1033
- }, []), /* @__PURE__ */ n(Be.Provider, { value: u, children: /* @__PURE__ */ v(it, { ...i, children: [
1034
- s,
1035
- /* @__PURE__ */ n(st, { className: x(o, fe.ToastViewport), hotkey: t }),
1036
- e.map(({ id: l, onClose: h, ...p }) => /* @__PURE__ */ n(_n, { ...p, onClose: () => a(l, 0, h) }, l))
1169
+ }, []), /* @__PURE__ */ e(Ve.Provider, { value: u, children: /* @__PURE__ */ v(mt, { ...s, children: [
1170
+ i,
1171
+ /* @__PURE__ */ e(ft, { className: S(o, ye.ToastViewport), hotkey: t }),
1172
+ n.map(({ id: l, onClose: d, ...p }) => /* @__PURE__ */ e(Hn, { ...p, onClose: () => a(l, 0, d) }, l))
1037
1173
  ] }) });
1038
- }), Tn = "_noWrap_1wpa5_1", Sn = {
1039
- noWrap: Tn
1040
- }, to = _(
1041
- T(({ className: r, noWrap: s, severity: o, as: t, ...i }, e) => {
1042
- const c = b(o);
1043
- return /* @__PURE__ */ n(
1044
- ce,
1174
+ }), Xn = "_noWrap_1wpa5_1", Un = {
1175
+ noWrap: Xn
1176
+ }, Do = C(
1177
+ x(({ className: r, noWrap: i, severity: o, as: t, ...s }, n) => {
1178
+ const c = O(o);
1179
+ return /* @__PURE__ */ e(
1180
+ he,
1045
1181
  {
1046
- ref: e,
1182
+ ref: n,
1047
1183
  as: t,
1048
- className: x(r, { [Sn.noWrap]: s }),
1184
+ className: S(r, { [Un.noWrap]: i }),
1049
1185
  color: c,
1050
- ...i
1186
+ ...s
1051
1187
  }
1052
1188
  );
1053
1189
  })
1054
1190
  );
1055
- const no = _(
1056
- T((r, s) => {
1057
- const { panelBackground: o = "solid", radius: t = "full", ...i } = r;
1058
- return /* @__PURE__ */ n(tt, { panelBackground: o, radius: t, ref: s, ...i });
1191
+ const zo = C(
1192
+ x((r, i) => {
1193
+ const { panelBackground: o = "solid", radius: t = "full", ...s } = r;
1194
+ return /* @__PURE__ */ e(it, { panelBackground: o, radius: t, ref: i, ...s });
1059
1195
  })
1060
- ), Pn = {
1196
+ ), qn = {
1061
1197
  1: "max-content",
1062
1198
  2: "max-content",
1063
1199
  3: "max-content",
1064
1200
  4: "100%"
1065
- }, bn = T(function({ severity: s = "info", weight: o = "light", gap: t = "1", text: i, orientation: e = "horizontal", size: c, ...a }, u) {
1066
- const l = B(c, Pn), h = b(s);
1201
+ }, Kn = x(function({ severity: i = "info", weight: o = "light", gap: t = "1", text: s, orientation: n = "horizontal", size: c, ...a }, u) {
1202
+ const l = L(c, qn), d = O(i);
1067
1203
  return /* @__PURE__ */ v(
1068
- R,
1204
+ P,
1069
1205
  {
1070
1206
  ref: u,
1071
- width: e === "horizontal" ? l : "max-content",
1072
- height: e === "vertical" ? l : "max-content",
1073
- direction: e === "vertical" ? "column" : "row",
1207
+ width: n === "horizontal" ? l : "max-content",
1208
+ height: n === "vertical" ? l : "max-content",
1209
+ direction: n === "vertical" ? "column" : "row",
1074
1210
  align: "center",
1075
1211
  gap: t,
1076
1212
  children: [
1077
- /* @__PURE__ */ n(xe, { size: c, orientation: e, color: h, ...a }),
1078
- i && /* @__PURE__ */ v(le, { children: [
1079
- /* @__PURE__ */ n(ce, { as: "span", size: "1", weight: o, color: h, children: i }),
1080
- /* @__PURE__ */ n(xe, { size: c, orientation: e, color: h, ...a })
1213
+ /* @__PURE__ */ e(Oe, { size: c, orientation: n, color: d, ...a }),
1214
+ s && /* @__PURE__ */ v(pe, { children: [
1215
+ /* @__PURE__ */ e(he, { as: "span", size: "1", weight: o, color: d, children: s }),
1216
+ /* @__PURE__ */ e(Oe, { size: c, orientation: n, color: d, ...a })
1081
1217
  ] })
1082
1218
  ]
1083
1219
  }
1084
1220
  );
1085
- }), oo = _(bn);
1221
+ }), Io = C(Kn);
1086
1222
  export {
1087
- co as AccessibleIcon,
1088
- $t as AlertDialog,
1089
- Ee as AlertDialogContent,
1090
- Wn as AlertDialogProvider,
1091
- lo as AspectRatio,
1092
- uo as Avatar,
1093
- En as Badge,
1094
- ho as Blockquote,
1095
- po as Box,
1096
- me as Button,
1097
- Ne as ButtonGroup,
1098
- Ln as ButtonList,
1099
- mo as Callout,
1100
- fo as Card,
1101
- go as Checkbox,
1102
- Co as Code,
1103
- vo as Container,
1104
- _o as ContextMenu,
1105
- no as DefaultTheme,
1106
- Mn as Dialog,
1107
- Hn as DropdownMenu,
1108
- yo as Em,
1109
- wo as Flex,
1110
- xo as Grid,
1111
- To as Heading,
1112
- So as HoverCard,
1113
- Vn as HoverUtility,
1114
- ke as IconButton,
1115
- qn as Input,
1116
- Po as Inset,
1117
- bo as Kbd,
1118
- Qn as LeftAndRightPanels,
1119
- Ro as Link,
1120
- Fn as MultiSelect,
1121
- Kn as Popover,
1122
- Do as Portal,
1123
- $o as Quote,
1124
- zo as RadioGroup,
1125
- Io as ScrollArea,
1126
- Oo as Section,
1127
- jn as Select,
1128
- oo as Separator,
1129
- Un as Sidebar,
1130
- ko as Slider,
1131
- No as Slot,
1132
- Ao as Strong,
1133
- Xn as Switch,
1134
- Eo as Table,
1135
- Bo as Tabs,
1136
- to as Text,
1137
- Yn as TextArea,
1138
- Lo as TextField,
1139
- Mo as Theme,
1140
- _n as Toast,
1141
- Be as ToastContext,
1142
- eo as ToastProvider,
1143
- Jn as ToggleGroup,
1144
- Wo as Tooltip,
1145
- Go as VisuallyHidden,
1146
- Bn as divButtonProps,
1147
- xn as unsafeShowToast,
1148
- Ho as updateThemeAppearanceClass,
1149
- It as useAlertDialog,
1150
- Gn as useDiscardAlertDialog,
1151
- b as useSeverityColor,
1152
- Vo as useThemeContext,
1153
- Zn as useToast
1223
+ Bo as AccessibleIcon,
1224
+ Lt as AlertDialog,
1225
+ He as AlertDialogContent,
1226
+ po as AlertDialogProvider,
1227
+ Lo as AspectRatio,
1228
+ Mo as Avatar,
1229
+ co as Badge,
1230
+ Wo as Blockquote,
1231
+ jo as Box,
1232
+ ve as Button,
1233
+ We as ButtonGroup,
1234
+ uo as ButtonList,
1235
+ Ho as Callout,
1236
+ Go as Card,
1237
+ Vo as Checkbox,
1238
+ Fo as Code,
1239
+ Xo as Container,
1240
+ Uo as ContextMenu,
1241
+ zo as DefaultTheme,
1242
+ ho as Dialog,
1243
+ fo as DropdownMenu,
1244
+ qo as Em,
1245
+ Te as Flex,
1246
+ Ko as Grid,
1247
+ Qo as Heading,
1248
+ Yo as HoverCard,
1249
+ go as HoverUtility,
1250
+ Me as IconButton,
1251
+ xo as Input,
1252
+ Jo as Inset,
1253
+ Zo as Kbd,
1254
+ To as LeftAndRightPanels,
1255
+ er as Link,
1256
+ Co as MultiSelect,
1257
+ So as Popover,
1258
+ tr as Portal,
1259
+ nr as Quote,
1260
+ or as RadioGroup,
1261
+ Nn as Root,
1262
+ rr as ScrollArea,
1263
+ ir as Section,
1264
+ _o as Select,
1265
+ Io as Separator,
1266
+ yo as Sidebar,
1267
+ wo as SlideOut,
1268
+ sr as Slider,
1269
+ ar as Slot,
1270
+ cr as Strong,
1271
+ vo as Switch,
1272
+ lr as Table,
1273
+ ur as Tabs,
1274
+ Do as Text,
1275
+ Ro as TextArea,
1276
+ dr as TextField,
1277
+ hr as Theme,
1278
+ Hn as Toast,
1279
+ Ve as ToastContext,
1280
+ Oo as ToastProvider,
1281
+ bo as ToggleGroup,
1282
+ $o as Toolbar,
1283
+ pr as Tooltip,
1284
+ mr as VisuallyHidden,
1285
+ lo as divButtonProps,
1286
+ Fn as unsafeShowToast,
1287
+ fr as updateThemeAppearanceClass,
1288
+ Wt as useAlertDialog,
1289
+ mo as useDiscardAlertDialog,
1290
+ O as useSeverityColor,
1291
+ gr as useThemeContext,
1292
+ Po as useToast
1154
1293
  };
1155
1294
  //# sourceMappingURL=blocks.js.map