@handamade/psi-react 0.10.0 → 0.11.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/index.js CHANGED
@@ -1,320 +1,320 @@
1
- import { jsx as n, jsxs as _, Fragment as V } from "react/jsx-runtime";
2
- import { createContext as K, useId as O, useRef as z, useEffect as x, useContext as B, useState as se, useCallback as C, cloneElement as Y, isValidElement as q, useMemo as ie, Children as H, Fragment as X } from "react";
3
- const ae = "_button_c94w9_3", ce = "_disabled_c94w9_30", le = "_size24_c94w9_44", de = "_size32_c94w9_54", ue = "_size40_c94w9_64", he = "_size48_c94w9_74", _e = "_accent_c94w9_87", fe = "_accentSubtle_c94w9_99", pe = "_neutral_c94w9_111", be = "_neutralSubtle_c94w9_123", ve = "_ghost_c94w9_135", ge = "_danger_c94w9_147", ye = "_dangerSubtle_c94w9_159", we = "_outline_c94w9_171", b = {
4
- button: ae,
5
- disabled: ce,
6
- size24: le,
7
- size32: de,
8
- size40: ue,
9
- size48: he,
10
- accent: _e,
11
- accentSubtle: fe,
12
- neutral: pe,
13
- neutralSubtle: be,
14
- ghost: ve,
15
- danger: ge,
16
- dangerSubtle: ye,
17
- outline: we
18
- }, me = {
19
- accent: b.accent,
20
- "accent-subtle": b.accentSubtle,
21
- neutral: b.neutral,
22
- "neutral-subtle": b.neutralSubtle,
23
- ghost: b.ghost,
24
- danger: b.danger,
25
- "danger-subtle": b.dangerSubtle,
26
- outline: b.outline
27
- }, ke = {
28
- 24: b.size24,
29
- 32: b.size32,
30
- 40: b.size40,
31
- 48: b.size48
1
+ import { jsx as n, jsxs as p, Fragment as G } from "react/jsx-runtime";
2
+ import { createContext as K, useId as U, useRef as B, useEffect as N, useContext as L, useState as le, useCallback as m, cloneElement as ee, isValidElement as O, useMemo as de, Children as W, Fragment as re } from "react";
3
+ const ye = "_button_c94w9_3", me = "_disabled_c94w9_30", we = "_size24_c94w9_44", ke = "_size32_c94w9_54", xe = "_size40_c94w9_64", Ce = "_size48_c94w9_74", Be = "_accent_c94w9_87", Ne = "_accentSubtle_c94w9_99", $e = "_neutral_c94w9_111", Le = "_neutralSubtle_c94w9_123", je = "_ghost_c94w9_135", Se = "_danger_c94w9_147", ze = "_dangerSubtle_c94w9_159", Ie = "_outline_c94w9_171", w = {
4
+ button: ye,
5
+ disabled: me,
6
+ size24: we,
7
+ size32: ke,
8
+ size40: xe,
9
+ size48: Ce,
10
+ accent: Be,
11
+ accentSubtle: Ne,
12
+ neutral: $e,
13
+ neutralSubtle: Le,
14
+ ghost: je,
15
+ danger: Se,
16
+ dangerSubtle: ze,
17
+ outline: Ie
18
+ }, Te = {
19
+ accent: w.accent,
20
+ "accent-subtle": w.accentSubtle,
21
+ neutral: w.neutral,
22
+ "neutral-subtle": w.neutralSubtle,
23
+ ghost: w.ghost,
24
+ danger: w.danger,
25
+ "danger-subtle": w.dangerSubtle,
26
+ outline: w.outline
27
+ }, Ee = {
28
+ 24: w.size24,
29
+ 32: w.size32,
30
+ 40: w.size40,
31
+ 48: w.size48
32
32
  };
33
- function xe({
33
+ function Me({
34
34
  variant: e = "neutral",
35
35
  size: t = 32,
36
- href: s,
37
- target: i,
36
+ href: i,
37
+ target: a,
38
38
  rel: c,
39
39
  disabled: r,
40
40
  className: o,
41
- onClick: a,
42
- ref: d,
43
- ...l
41
+ onClick: s,
42
+ ref: l,
43
+ ...d
44
44
  }) {
45
45
  const u = [
46
- b.button,
47
- me[e],
48
- ke[t],
49
- s !== void 0 && r ? b.disabled : void 0,
46
+ w.button,
47
+ Te[e],
48
+ Ee[t],
49
+ i !== void 0 && r ? w.disabled : void 0,
50
50
  o
51
51
  ].filter(Boolean).join(" ");
52
- return s !== void 0 ? /* @__PURE__ */ n(
52
+ return i !== void 0 ? /* @__PURE__ */ n(
53
53
  "a",
54
54
  {
55
- ref: d,
55
+ ref: l,
56
56
  className: u,
57
- href: r ? void 0 : s,
58
- target: i,
57
+ href: r ? void 0 : i,
58
+ target: a,
59
59
  rel: c,
60
60
  "aria-disabled": r || void 0,
61
- onClick: r ? void 0 : a,
62
- ...l
61
+ onClick: r ? void 0 : s,
62
+ ...d
63
63
  }
64
64
  ) : /* @__PURE__ */ n(
65
65
  "button",
66
66
  {
67
- ref: d,
67
+ ref: l,
68
68
  className: u,
69
69
  disabled: r,
70
- onClick: a,
71
- ...l
70
+ onClick: s,
71
+ ...d
72
72
  }
73
73
  );
74
74
  }
75
- const Ce = "_iconButton_129ca_3", Be = "_disabled_129ca_29", $e = "_size24_129ca_37", ze = "_size32_129ca_42", je = "_size40_129ca_47", Le = "_size48_129ca_52", Ne = "_accent_129ca_60", Se = "_neutral_129ca_72", Ie = "_ghost_129ca_84", Me = "_danger_129ca_96", k = {
76
- iconButton: Ce,
77
- disabled: Be,
78
- size24: $e,
79
- size32: ze,
80
- size40: je,
81
- size48: Le,
82
- accent: Ne,
83
- neutral: Se,
84
- ghost: Ie,
85
- danger: Me
86
- }, Ee = {
87
- accent: k.accent,
88
- neutral: k.neutral,
89
- ghost: k.ghost,
90
- danger: k.danger
91
- }, Te = {
92
- 24: k.size24,
93
- 32: k.size32,
94
- 40: k.size40,
95
- 48: k.size48
75
+ const We = "_iconButton_129ca_3", Ae = "_disabled_129ca_29", Pe = "_size24_129ca_37", De = "_size32_129ca_42", Re = "_size40_129ca_47", He = "_size48_129ca_52", Ve = "_accent_129ca_60", qe = "_neutral_129ca_72", Fe = "_ghost_129ca_84", Oe = "_danger_129ca_96", $ = {
76
+ iconButton: We,
77
+ disabled: Ae,
78
+ size24: Pe,
79
+ size32: De,
80
+ size40: Re,
81
+ size48: He,
82
+ accent: Ve,
83
+ neutral: qe,
84
+ ghost: Fe,
85
+ danger: Oe
86
+ }, Ke = {
87
+ accent: $.accent,
88
+ neutral: $.neutral,
89
+ ghost: $.ghost,
90
+ danger: $.danger
91
+ }, Ue = {
92
+ 24: $.size24,
93
+ 32: $.size32,
94
+ 40: $.size40,
95
+ 48: $.size48
96
96
  };
97
- function U({
97
+ function X({
98
98
  variant: e = "neutral",
99
99
  size: t = 32,
100
- href: s,
101
- target: i,
100
+ href: i,
101
+ target: a,
102
102
  rel: c,
103
103
  disabled: r,
104
104
  className: o,
105
- onClick: a,
106
- ref: d,
107
- ...l
105
+ onClick: s,
106
+ ref: l,
107
+ ...d
108
108
  }) {
109
109
  const u = [
110
- k.iconButton,
111
- Ee[e],
112
- Te[t],
113
- s !== void 0 && r ? k.disabled : void 0,
110
+ $.iconButton,
111
+ Ke[e],
112
+ Ue[t],
113
+ i !== void 0 && r ? $.disabled : void 0,
114
114
  o
115
115
  ].filter(Boolean).join(" ");
116
- return s !== void 0 ? /* @__PURE__ */ n(
116
+ return i !== void 0 ? /* @__PURE__ */ n(
117
117
  "a",
118
118
  {
119
- ref: d,
119
+ ref: l,
120
120
  className: u,
121
- href: r ? void 0 : s,
122
- target: i,
121
+ href: r ? void 0 : i,
122
+ target: a,
123
123
  rel: c,
124
124
  "aria-disabled": r || void 0,
125
- onClick: r ? void 0 : a,
126
- ...l
125
+ onClick: r ? void 0 : s,
126
+ ...d
127
127
  }
128
128
  ) : /* @__PURE__ */ n(
129
129
  "button",
130
130
  {
131
- ref: d,
131
+ ref: l,
132
132
  className: u,
133
133
  disabled: r,
134
- onClick: a,
135
- ...l
134
+ onClick: s,
135
+ ...d
136
136
  }
137
137
  );
138
138
  }
139
- const We = "_card_1btb3_1", Ae = "_stacked_1btb3_8", Pe = "_featured_1btb3_10", He = "_media_1btb3_22", Re = "_body_1btb3_23", De = "_hoverLift_1btb3_31", L = {
140
- card: We,
141
- stacked: Ae,
142
- featured: Pe,
143
- media: He,
144
- body: Re,
145
- hoverLift: De
139
+ const Ye = "_card_1btb3_1", Ze = "_stacked_1btb3_8", Ge = "_featured_1btb3_10", Xe = "_media_1btb3_22", Je = "_body_1btb3_23", Qe = "_hoverLift_1btb3_31", T = {
140
+ card: Ye,
141
+ stacked: Ze,
142
+ featured: Ge,
143
+ media: Xe,
144
+ body: Je,
145
+ hoverLift: Qe
146
146
  };
147
- function An({
147
+ function po({
148
148
  variant: e = "stacked",
149
149
  media: t,
150
- hoverLift: s = !1,
151
- className: i,
150
+ hoverLift: i = !1,
151
+ className: a,
152
152
  children: c,
153
153
  ref: r,
154
154
  ...o
155
155
  }) {
156
- const a = [
157
- L.card,
158
- e === "featured" ? L.featured : L.stacked,
159
- s ? L.hoverLift : void 0,
160
- i
156
+ const s = [
157
+ T.card,
158
+ e === "featured" ? T.featured : T.stacked,
159
+ i ? T.hoverLift : void 0,
160
+ a
161
161
  ].filter(Boolean).join(" ");
162
- return /* @__PURE__ */ _("div", { ref: r, className: a, ...o, children: [
163
- t != null && /* @__PURE__ */ n("div", { className: L.media, children: t }),
164
- /* @__PURE__ */ n("div", { className: L.body, children: c })
162
+ return /* @__PURE__ */ p("div", { ref: r, className: s, ...o, children: [
163
+ t != null && /* @__PURE__ */ n("div", { className: T.media, children: t }),
164
+ /* @__PURE__ */ n("div", { className: T.body, children: c })
165
165
  ] });
166
166
  }
167
- const Ve = "_panel_jn8w4_1", qe = "_padding16_jn8w4_8", J = {
168
- panel: Ve,
169
- padding16: qe
167
+ const et = "_panel_jn8w4_1", tt = "_padding16_jn8w4_8", ie = {
168
+ panel: et,
169
+ padding16: tt
170
170
  };
171
- function Pn({ padding: e = 24, className: t, children: s, ref: i, ...c }) {
172
- const r = [J.panel, e === 16 ? J.padding16 : void 0, t].filter(Boolean).join(" ");
173
- return /* @__PURE__ */ n("div", { ref: i, className: r, ...c, children: s });
174
- }
175
- const Fe = "_navbar_1gyow_1", Ke = "_inner_1gyow_12", Oe = "_brand_1gyow_19", Ue = "_links_1gyow_20", Ye = "_actions_1gyow_50", W = {
176
- navbar: Fe,
177
- inner: Ke,
178
- brand: Oe,
179
- links: Ue,
180
- actions: Ye
171
+ function vo({ padding: e = 24, className: t, children: i, ref: a, ...c }) {
172
+ const r = [ie.panel, e === 16 ? ie.padding16 : void 0, t].filter(Boolean).join(" ");
173
+ return /* @__PURE__ */ n("div", { ref: a, className: r, ...c, children: i });
174
+ }
175
+ const nt = "_navbar_1gyow_1", ot = "_inner_1gyow_12", rt = "_brand_1gyow_19", it = "_links_1gyow_20", st = "_actions_1gyow_50", V = {
176
+ navbar: nt,
177
+ inner: ot,
178
+ brand: rt,
179
+ links: it,
180
+ actions: st
181
181
  };
182
- function Hn({ brand: e, actions: t, children: s, className: i, ref: c, ...r }) {
183
- const o = [W.navbar, i].filter(Boolean).join(" ");
184
- return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ _("div", { className: `psi-container ${W.inner}`, children: [
185
- e != null && /* @__PURE__ */ n("div", { className: W.brand, children: e }),
186
- /* @__PURE__ */ n("nav", { className: W.links, children: s }),
187
- t != null && /* @__PURE__ */ n("div", { className: W.actions, children: t })
182
+ function go({ brand: e, actions: t, children: i, className: a, ref: c, ...r }) {
183
+ const o = [V.navbar, a].filter(Boolean).join(" ");
184
+ return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ p("div", { className: `psi-container ${V.inner}`, children: [
185
+ e != null && /* @__PURE__ */ n("div", { className: V.brand, children: e }),
186
+ /* @__PURE__ */ n("nav", { className: V.links, children: i }),
187
+ t != null && /* @__PURE__ */ n("div", { className: V.actions, children: t })
188
188
  ] }) });
189
189
  }
190
- const Ze = "_frame_et4fc_1", Ge = {
191
- frame: Ze
190
+ const at = "_frame_et4fc_1", ct = {
191
+ frame: at
192
192
  };
193
- function Rn({ ratio: e, className: t, style: s, children: i, ref: c, ...r }) {
194
- const o = [Ge.frame, t].filter(Boolean).join(" ");
195
- return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...s }, ...r, children: i });
196
- }
197
- const Xe = "_field_lplye_1", Je = "_label_lplye_10", Qe = "_marker_lplye_16", et = "_message_lplye_20", tt = "_invalid_lplye_26", N = {
198
- field: Xe,
199
- label: Je,
200
- marker: Qe,
201
- message: et,
202
- invalid: tt
203
- }, Z = K(null);
204
- function Dn({
193
+ function bo({ ratio: e, className: t, style: i, children: a, ref: c, ...r }) {
194
+ const o = [ct.frame, t].filter(Boolean).join(" ");
195
+ return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...i }, ...r, children: a });
196
+ }
197
+ const lt = "_field_lplye_1", dt = "_label_lplye_10", ut = "_marker_lplye_16", ht = "_message_lplye_20", _t = "_invalid_lplye_26", E = {
198
+ field: lt,
199
+ label: dt,
200
+ marker: ut,
201
+ message: ht,
202
+ invalid: _t
203
+ }, te = K(null);
204
+ function yo({
205
205
  label: e,
206
206
  description: t,
207
- error: s,
208
- required: i = !1,
207
+ error: i,
208
+ required: a = !1,
209
209
  group: c = !1,
210
210
  htmlFor: r,
211
211
  className: o,
212
- children: a,
213
- ref: d,
214
- ...l
212
+ children: s,
213
+ ref: l,
214
+ ...d
215
215
  }) {
216
- const u = O(), f = r ?? u, h = !!s, y = h ? s : t, w = y != null && y !== !1 ? `${f}-message` : void 0, j = [N.field, h && N.invalid, o].filter(Boolean).join(" "), p = e != null ? /* @__PURE__ */ _(V, { children: [
216
+ const u = U(), h = r ?? u, _ = !!i, b = _ ? i : t, y = b != null && b !== !1 ? `${h}-message` : void 0, j = [E.field, _ && E.invalid, o].filter(Boolean).join(" "), v = e != null ? /* @__PURE__ */ p(G, { children: [
217
217
  e,
218
- i && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: N.marker, children: " *" })
219
- ] }) : null, R = /* @__PURE__ */ _(V, { children: [
220
- p != null && (c ? /* @__PURE__ */ n("legend", { className: N.label, children: p }) : /* @__PURE__ */ n("label", { className: N.label, htmlFor: f, children: p })),
221
- /* @__PURE__ */ n(Z.Provider, { value: { id: f, describedBy: w, invalid: h, required: i }, children: a }),
222
- w && /* @__PURE__ */ n("p", { id: w, className: N.message, "aria-live": "polite", children: y })
218
+ a && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: E.marker, children: " *" })
219
+ ] }) : null, I = /* @__PURE__ */ p(G, { children: [
220
+ v != null && (c ? /* @__PURE__ */ n("legend", { className: E.label, children: v }) : /* @__PURE__ */ n("label", { className: E.label, htmlFor: h, children: v })),
221
+ /* @__PURE__ */ n(te.Provider, { value: { id: h, describedBy: y, invalid: _, required: a }, children: s }),
222
+ y && /* @__PURE__ */ n("p", { id: y, className: E.message, "aria-live": "polite", children: b })
223
223
  ] });
224
224
  return c ? /* @__PURE__ */ n(
225
225
  "fieldset",
226
226
  {
227
- ref: d,
227
+ ref: l,
228
228
  className: j,
229
- "aria-describedby": w,
230
- ...l,
231
- children: R
229
+ "aria-describedby": y,
230
+ ...d,
231
+ children: I
232
232
  }
233
- ) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children: R });
233
+ ) : /* @__PURE__ */ n("div", { ref: l, className: j, ...d, children: I });
234
234
  }
235
- function Vn({ size: e = 20, ...t }) {
236
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
235
+ function mo({ size: e = 20, ...t }) {
236
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
237
237
  /* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
238
238
  /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
239
239
  ] });
240
240
  }
241
- function qn({ size: e = 20, ...t }) {
241
+ function wo({ size: e = 20, ...t }) {
242
242
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
243
243
  }
244
- function nt({ size: e = 20, ...t }) {
245
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
244
+ function ue({ size: e = 20, ...t }) {
245
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
246
246
  /* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
247
247
  /* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
248
248
  ] });
249
249
  }
250
- function Fn({ size: e = 20, ...t }) {
250
+ function ft({ size: e = 20, ...t }) {
251
251
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "20 6 9 17 4 12" }) });
252
252
  }
253
- function Kn({ size: e = 20, ...t }) {
253
+ function ko({ size: e = 20, ...t }) {
254
254
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
255
255
  }
256
- function On({ size: e = 20, ...t }) {
256
+ function xo({ size: e = 20, ...t }) {
257
257
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "9 18 15 12 9 6" }) });
258
258
  }
259
- function Un({ size: e = 20, ...t }) {
260
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
259
+ function Co({ size: e = 20, ...t }) {
260
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
261
261
  /* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
262
262
  /* @__PURE__ */ n("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
263
263
  ] });
264
264
  }
265
- function Yn({ size: e = 20, ...t }) {
266
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
265
+ function Bo({ size: e = 20, ...t }) {
266
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
267
267
  /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" }),
268
268
  /* @__PURE__ */ n("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
269
269
  ] });
270
270
  }
271
- function Zn({ size: e = 20, ...t }) {
272
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
271
+ function No({ size: e = 20, ...t }) {
272
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
273
273
  /* @__PURE__ */ n("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
274
274
  /* @__PURE__ */ n("circle", { cx: "12", cy: "7", r: "4" })
275
275
  ] });
276
276
  }
277
- function Gn({ size: e = 20, ...t }) {
278
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
277
+ function $o({ size: e = 20, ...t }) {
278
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
279
279
  /* @__PURE__ */ n("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
280
280
  /* @__PURE__ */ n("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
281
281
  ] });
282
282
  }
283
- function Xn({ size: e = 20, ...t }) {
284
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
283
+ function Lo({ size: e = 20, ...t }) {
284
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
285
285
  /* @__PURE__ */ n("polyline", { points: "3 6 5 6 21 6" }),
286
286
  /* @__PURE__ */ n("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
287
287
  ] });
288
288
  }
289
- function Jn({ size: e = 20, ...t }) {
290
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
289
+ function jo({ size: e = 20, ...t }) {
290
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
291
291
  /* @__PURE__ */ n("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
292
292
  /* @__PURE__ */ n("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
293
293
  ] });
294
294
  }
295
- function Qn({ size: e = 20, ...t }) {
296
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
295
+ function So({ size: e = 20, ...t }) {
296
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
297
297
  /* @__PURE__ */ n("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
298
298
  /* @__PURE__ */ n("polyline", { points: "15 3 21 3 21 9" }),
299
299
  /* @__PURE__ */ n("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
300
300
  ] });
301
301
  }
302
- function eo({ size: e = 20, ...t }) {
303
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
302
+ function zo({ size: e = 20, ...t }) {
303
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
304
304
  /* @__PURE__ */ n("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
305
305
  /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
306
306
  ] });
307
307
  }
308
- function to({ size: e = 20, ...t }) {
309
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
308
+ function Io({ size: e = 20, ...t }) {
309
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
310
310
  /* @__PURE__ */ n("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
311
311
  /* @__PURE__ */ n("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" }),
312
312
  /* @__PURE__ */ n("path", { d: "M14.12 14.12a3 3 0 1 1-4.24-4.24" }),
313
313
  /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
314
314
  ] });
315
315
  }
316
- function no({ size: e = 20, ...t }) {
317
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
316
+ function To({ size: e = 20, ...t }) {
317
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
318
318
  /* @__PURE__ */ n("line", { x1: "12", y1: "2", x2: "12", y2: "6" }),
319
319
  /* @__PURE__ */ n("line", { x1: "12", y1: "18", x2: "12", y2: "22" }),
320
320
  /* @__PURE__ */ n("line", { x1: "4.93", y1: "4.93", x2: "7.76", y2: "7.76" }),
@@ -325,285 +325,306 @@ function no({ size: e = 20, ...t }) {
325
325
  /* @__PURE__ */ n("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })
326
326
  ] });
327
327
  }
328
- function oo({ size: e = 20, ...t }) {
329
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
328
+ function Eo({ size: e = 20, ...t }) {
329
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
330
330
  /* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
331
331
  /* @__PURE__ */ n("polyline", { points: "19 12 12 19 5 12" })
332
332
  ] });
333
333
  }
334
- function ro({ size: e = 20, ...t }) {
335
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
334
+ function Mo({ size: e = 20, ...t }) {
335
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
336
336
  /* @__PURE__ */ n("line", { x1: "7", y1: "17", x2: "17", y2: "7" }),
337
337
  /* @__PURE__ */ n("polyline", { points: "7 7 17 7 17 17" })
338
338
  ] });
339
339
  }
340
- function so({ size: e = 20, ...t }) {
340
+ function Wo({ size: e = 20, ...t }) {
341
341
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) });
342
342
  }
343
- function io({ size: e = 20, ...t }) {
343
+ function Ao({ size: e = 20, ...t }) {
344
344
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) });
345
345
  }
346
- function ao({ size: e = 20, ...t }) {
346
+ function Po({ size: e = 20, ...t }) {
347
347
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" }) });
348
348
  }
349
- function co({ size: e = 20, ...t }) {
350
- return /* @__PURE__ */ _("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
349
+ function Do({ size: e = 20, ...t }) {
350
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
351
351
  /* @__PURE__ */ n("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
352
352
  /* @__PURE__ */ n("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
353
353
  /* @__PURE__ */ n("line", { x1: "17.5", y1: "6.5", x2: "17.51", y2: "6.5" })
354
354
  ] });
355
355
  }
356
- const ot = "_dialog_l23jf_2", rt = "_w400_l23jf_31", st = "_w560_l23jf_32", it = "_w720_l23jf_33", at = "_panel_l23jf_35", ct = "_header_l23jf_41", lt = "_title_l23jf_48", dt = "_footer_l23jf_54", $ = {
357
- dialog: ot,
358
- w400: rt,
359
- w560: st,
360
- w720: it,
361
- panel: at,
362
- header: ct,
363
- title: lt,
364
- footer: dt
365
- }, ut = {
366
- 400: $.w400,
367
- 560: $.w560,
368
- 720: $.w720
356
+ function pt({ size: e = 20, ...t }) {
357
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
358
+ /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
359
+ /* @__PURE__ */ n("line", { x1: "12", y1: "11", x2: "12", y2: "16" }),
360
+ /* @__PURE__ */ n("line", { x1: "12", y1: "8", x2: "12", y2: "8" })
361
+ ] });
362
+ }
363
+ function vt({ size: e = 20, ...t }) {
364
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
365
+ /* @__PURE__ */ n("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }),
366
+ /* @__PURE__ */ n("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
367
+ /* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "17" })
368
+ ] });
369
+ }
370
+ function gt({ size: e = 20, ...t }) {
371
+ return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
372
+ /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
373
+ /* @__PURE__ */ n("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
374
+ /* @__PURE__ */ n("line", { x1: "12", y1: "16", x2: "12", y2: "16" })
375
+ ] });
376
+ }
377
+ const bt = "_dialog_l23jf_2", yt = "_w400_l23jf_31", mt = "_w560_l23jf_32", wt = "_w720_l23jf_33", kt = "_panel_l23jf_35", xt = "_header_l23jf_41", Ct = "_title_l23jf_48", Bt = "_footer_l23jf_54", z = {
378
+ dialog: bt,
379
+ w400: yt,
380
+ w560: mt,
381
+ w720: wt,
382
+ panel: kt,
383
+ header: xt,
384
+ title: Ct,
385
+ footer: Bt
386
+ }, Nt = {
387
+ 400: z.w400,
388
+ 560: z.w560,
389
+ 720: z.w720
369
390
  };
370
- function lo({
391
+ function Ro({
371
392
  open: e,
372
393
  onClose: t,
373
- title: s,
374
- footer: i,
394
+ title: i,
395
+ footer: a,
375
396
  width: c = 560,
376
397
  dismissible: r = !0,
377
398
  className: o,
378
- children: a,
379
- ref: d,
380
- ...l
399
+ children: s,
400
+ ref: l,
401
+ ...d
381
402
  }) {
382
- const u = z(null), f = O(), h = (p) => {
383
- u.current = p, typeof d == "function" ? d(p) : d && (d.current = p);
403
+ const u = B(null), h = U(), _ = (v) => {
404
+ u.current = v, typeof l == "function" ? l(v) : l && (l.current = v);
384
405
  };
385
- x(() => {
386
- const p = u.current;
387
- p && (e && !p.open ? p.showModal() : !e && p.open && p.close());
388
- }, [e]), x(() => {
406
+ N(() => {
407
+ const v = u.current;
408
+ v && (e && !v.open ? v.showModal() : !e && v.open && v.close());
409
+ }, [e]), N(() => {
389
410
  if (!e) return;
390
- const p = document.body.style.overflow;
411
+ const v = document.body.style.overflow;
391
412
  return document.body.style.overflow = "hidden", () => {
392
- document.body.style.overflow = p;
413
+ document.body.style.overflow = v;
393
414
  };
394
415
  }, [e]);
395
- const y = (p) => {
396
- p.preventDefault(), r && t("esc");
397
- }, w = (p) => {
398
- r && p.target === u.current && t("backdrop");
399
- }, j = [$.dialog, ut[c], o].filter(Boolean).join(" ");
416
+ const b = (v) => {
417
+ v.preventDefault(), r && t("esc");
418
+ }, y = (v) => {
419
+ r && v.target === u.current && t("backdrop");
420
+ }, j = [z.dialog, Nt[c], o].filter(Boolean).join(" ");
400
421
  return /* @__PURE__ */ n(
401
422
  "dialog",
402
423
  {
403
- ref: h,
424
+ ref: _,
404
425
  className: j,
405
- "aria-labelledby": s != null ? f : void 0,
406
- onCancel: y,
407
- onClick: w,
408
- ...l,
409
- children: /* @__PURE__ */ _("div", { className: $.panel, children: [
410
- (s != null || r) && /* @__PURE__ */ _("div", { className: $.header, children: [
411
- s != null && /* @__PURE__ */ n("h2", { id: f, className: $.title, children: s }),
426
+ "aria-labelledby": i != null ? h : void 0,
427
+ onCancel: b,
428
+ onClick: y,
429
+ ...d,
430
+ children: /* @__PURE__ */ p("div", { className: z.panel, children: [
431
+ (i != null || r) && /* @__PURE__ */ p("div", { className: z.header, children: [
432
+ i != null && /* @__PURE__ */ n("h2", { id: h, className: z.title, children: i }),
412
433
  r && /* @__PURE__ */ n(
413
- U,
434
+ X,
414
435
  {
415
436
  variant: "ghost",
416
437
  size: 32,
417
438
  "aria-label": "Close dialog",
418
439
  onClick: () => t("close-button"),
419
- children: /* @__PURE__ */ n(nt, { "aria-hidden": "true" })
440
+ children: /* @__PURE__ */ n(ue, { "aria-hidden": "true" })
420
441
  }
421
442
  )
422
443
  ] }),
423
- a,
424
- i != null && /* @__PURE__ */ n("div", { className: $.footer, children: i })
444
+ s,
445
+ a != null && /* @__PURE__ */ n("div", { className: z.footer, children: a })
425
446
  ] })
426
447
  }
427
448
  );
428
449
  }
429
- const ht = "_input_hpei8_3", _t = "_size24_hpei8_37", ft = "_size32_hpei8_43", pt = "_size40_hpei8_49", bt = "_size48_hpei8_55", vt = "_error_hpei8_63", I = {
430
- input: ht,
431
- size24: _t,
432
- size32: ft,
433
- size40: pt,
434
- size48: bt,
435
- error: vt
436
- }, gt = {
437
- 24: I.size24,
438
- 32: I.size32,
439
- 40: I.size40,
440
- 48: I.size48
450
+ const $t = "_input_hpei8_3", Lt = "_size24_hpei8_37", jt = "_size32_hpei8_43", St = "_size40_hpei8_49", zt = "_size48_hpei8_55", It = "_error_hpei8_63", A = {
451
+ input: $t,
452
+ size24: Lt,
453
+ size32: jt,
454
+ size40: St,
455
+ size48: zt,
456
+ error: It
457
+ }, Tt = {
458
+ 24: A.size24,
459
+ 32: A.size32,
460
+ 40: A.size40,
461
+ 48: A.size48
441
462
  };
442
- function uo({ size: e = 32, error: t = !1, type: s = "text", className: i, ref: c, ...r }) {
443
- const o = B(Z), a = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [I.input, gt[e], a && I.error, i].filter(Boolean).join(" ");
463
+ function Ho({ size: e = 32, error: t = !1, type: i = "text", className: a, ref: c, ...r }) {
464
+ const o = L(te), s = t || ((o == null ? void 0 : o.invalid) ?? !1), l = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, d = [A.input, Tt[e], s && A.error, a].filter(Boolean).join(" ");
444
465
  return /* @__PURE__ */ n(
445
466
  "input",
446
467
  {
447
468
  ref: c,
448
- className: l,
469
+ className: d,
449
470
  id: r.id ?? (o == null ? void 0 : o.id),
450
471
  required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
451
472
  "aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
452
- type: s,
473
+ type: i,
453
474
  ...r,
454
- "aria-describedby": d
475
+ "aria-describedby": l
455
476
  }
456
477
  );
457
478
  }
458
- const yt = "_select_4x9ck_3", wt = "_size24_4x9ck_37", mt = "_size32_4x9ck_45", kt = "_size40_4x9ck_53", xt = "_size48_4x9ck_61", Ct = "_error_4x9ck_71", M = {
459
- select: yt,
460
- size24: wt,
461
- size32: mt,
462
- size40: kt,
463
- size48: xt,
464
- error: Ct
465
- }, Bt = {
466
- 24: M.size24,
467
- 32: M.size32,
468
- 40: M.size40,
469
- 48: M.size48
479
+ const Et = "_select_4x9ck_3", Mt = "_size24_4x9ck_37", Wt = "_size32_4x9ck_45", At = "_size40_4x9ck_53", Pt = "_size48_4x9ck_61", Dt = "_error_4x9ck_71", P = {
480
+ select: Et,
481
+ size24: Mt,
482
+ size32: Wt,
483
+ size40: At,
484
+ size48: Pt,
485
+ error: Dt
486
+ }, Rt = {
487
+ 24: P.size24,
488
+ 32: P.size32,
489
+ 40: P.size40,
490
+ 48: P.size48
470
491
  };
471
- function ho({
492
+ function Vo({
472
493
  size: e = 32,
473
494
  error: t = !1,
474
- className: s,
475
- ref: i,
495
+ className: i,
496
+ ref: a,
476
497
  children: c,
477
498
  ...r
478
499
  }) {
479
- const o = B(Z), a = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [
480
- M.select,
481
- Bt[e],
482
- a && M.error,
483
- s
500
+ const o = L(te), s = t || ((o == null ? void 0 : o.invalid) ?? !1), l = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, d = [
501
+ P.select,
502
+ Rt[e],
503
+ s && P.error,
504
+ i
484
505
  ].filter(Boolean).join(" ");
485
506
  return /* @__PURE__ */ n(
486
507
  "select",
487
508
  {
488
- ref: i,
489
- className: l,
509
+ ref: a,
510
+ className: d,
490
511
  id: r.id ?? (o == null ? void 0 : o.id),
491
512
  required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
492
513
  "aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
493
514
  ...r,
494
- "aria-describedby": d,
515
+ "aria-describedby": l,
495
516
  children: c
496
517
  }
497
518
  );
498
519
  }
499
- const $t = "_label_1v4vv_3", zt = "_disabled_1v4vv_13", jt = "_input_1v4vv_20", Lt = "_indicator_1v4vv_34", Nt = "_text_1v4vv_75", A = {
500
- label: $t,
501
- disabled: zt,
502
- input: jt,
503
- indicator: Lt,
504
- text: Nt
520
+ const Ht = "_label_1v4vv_3", Vt = "_disabled_1v4vv_13", qt = "_input_1v4vv_20", Ft = "_indicator_1v4vv_34", Ot = "_text_1v4vv_75", q = {
521
+ label: Ht,
522
+ disabled: Vt,
523
+ input: qt,
524
+ indicator: Ft,
525
+ text: Ot
505
526
  };
506
- function te({
527
+ function he({
507
528
  children: e,
508
529
  className: t,
509
- disabled: s,
510
- ref: i,
530
+ disabled: i,
531
+ ref: a,
511
532
  ...c
512
533
  }) {
513
- const r = [A.label, s && A.disabled, t].filter(Boolean).join(" ");
514
- return /* @__PURE__ */ _("label", { className: r, children: [
534
+ const r = [q.label, i && q.disabled, t].filter(Boolean).join(" ");
535
+ return /* @__PURE__ */ p("label", { className: r, children: [
515
536
  /* @__PURE__ */ n(
516
537
  "input",
517
538
  {
518
- ref: i,
539
+ ref: a,
519
540
  type: "checkbox",
520
- className: A.input,
521
- disabled: s,
541
+ className: q.input,
542
+ disabled: i,
522
543
  ...c
523
544
  }
524
545
  ),
525
- /* @__PURE__ */ n("span", { className: A.indicator, "aria-hidden": "true" }),
526
- e && /* @__PURE__ */ n("span", { className: A.text, children: e })
546
+ /* @__PURE__ */ n("span", { className: q.indicator, "aria-hidden": "true" }),
547
+ e && /* @__PURE__ */ n("span", { className: q.text, children: e })
527
548
  ] });
528
549
  }
529
- const St = "_label_jru2c_3", It = "_disabled_jru2c_13", Mt = "_input_jru2c_20", Et = "_track_jru2c_34", Tt = "_thumb_jru2c_58", Wt = "_text_jru2c_75", S = {
530
- label: St,
531
- disabled: It,
532
- input: Mt,
533
- track: Et,
534
- thumb: Tt,
535
- text: Wt
550
+ const Kt = "_label_jru2c_3", Ut = "_disabled_jru2c_13", Yt = "_input_jru2c_20", Zt = "_track_jru2c_34", Gt = "_thumb_jru2c_58", Xt = "_text_jru2c_75", M = {
551
+ label: Kt,
552
+ disabled: Ut,
553
+ input: Yt,
554
+ track: Zt,
555
+ thumb: Gt,
556
+ text: Xt
536
557
  };
537
- function _o({
558
+ function qo({
538
559
  children: e,
539
560
  className: t,
540
- disabled: s,
541
- ref: i,
561
+ disabled: i,
562
+ ref: a,
542
563
  ...c
543
564
  }) {
544
- const r = [S.label, s && S.disabled, t].filter(Boolean).join(" ");
545
- return /* @__PURE__ */ _("label", { className: r, children: [
565
+ const r = [M.label, i && M.disabled, t].filter(Boolean).join(" ");
566
+ return /* @__PURE__ */ p("label", { className: r, children: [
546
567
  /* @__PURE__ */ n(
547
568
  "input",
548
569
  {
549
- ref: i,
570
+ ref: a,
550
571
  type: "checkbox",
551
572
  role: "switch",
552
- className: S.input,
553
- disabled: s,
573
+ className: M.input,
574
+ disabled: i,
554
575
  ...c
555
576
  }
556
577
  ),
557
- /* @__PURE__ */ n("span", { className: S.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: S.thumb }) }),
558
- e && /* @__PURE__ */ n("span", { className: S.text, children: e })
578
+ /* @__PURE__ */ n("span", { className: M.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: M.thumb }) }),
579
+ e && /* @__PURE__ */ n("span", { className: M.text, children: e })
559
580
  ] });
560
581
  }
561
- const At = "_tag_3oysa_3", Pt = "_dismiss_3oysa_17", Ht = "_neutral_3oysa_43", Rt = "_accent_3oysa_48", Dt = "_success_3oysa_53", Vt = "_warning_3oysa_58", qt = "_danger_3oysa_63", Ft = "_neutralSubtle_3oysa_70", Kt = "_accentSubtle_3oysa_75", Ot = "_successSubtle_3oysa_80", Ut = "_warningSubtle_3oysa_85", Yt = "_dangerSubtle_3oysa_90", m = {
562
- tag: At,
563
- dismiss: Pt,
564
- neutral: Ht,
565
- accent: Rt,
566
- success: Dt,
567
- warning: Vt,
568
- danger: qt,
569
- neutralSubtle: Ft,
570
- accentSubtle: Kt,
571
- successSubtle: Ot,
572
- warningSubtle: Ut,
573
- dangerSubtle: Yt
574
- }, Zt = {
575
- neutral: m.neutral,
576
- accent: m.accent,
577
- success: m.success,
578
- warning: m.warning,
579
- danger: m.danger
580
- }, Gt = {
581
- neutral: m.neutralSubtle,
582
- accent: m.accentSubtle,
583
- success: m.successSubtle,
584
- warning: m.warningSubtle,
585
- danger: m.dangerSubtle
582
+ const Jt = "_tag_3oysa_3", Qt = "_dismiss_3oysa_17", en = "_neutral_3oysa_43", tn = "_accent_3oysa_48", nn = "_success_3oysa_53", on = "_warning_3oysa_58", rn = "_danger_3oysa_63", sn = "_neutralSubtle_3oysa_70", an = "_accentSubtle_3oysa_75", cn = "_successSubtle_3oysa_80", ln = "_warningSubtle_3oysa_85", dn = "_dangerSubtle_3oysa_90", x = {
583
+ tag: Jt,
584
+ dismiss: Qt,
585
+ neutral: en,
586
+ accent: tn,
587
+ success: nn,
588
+ warning: on,
589
+ danger: rn,
590
+ neutralSubtle: sn,
591
+ accentSubtle: an,
592
+ successSubtle: cn,
593
+ warningSubtle: ln,
594
+ dangerSubtle: dn
595
+ }, un = {
596
+ neutral: x.neutral,
597
+ accent: x.accent,
598
+ success: x.success,
599
+ warning: x.warning,
600
+ danger: x.danger
601
+ }, hn = {
602
+ neutral: x.neutralSubtle,
603
+ accent: x.accentSubtle,
604
+ success: x.successSubtle,
605
+ warning: x.warningSubtle,
606
+ danger: x.dangerSubtle
586
607
  };
587
- function fo({
608
+ function Fo({
588
609
  variant: e = "neutral",
589
610
  subtle: t = !1,
590
- onDismiss: s,
591
- className: i,
611
+ onDismiss: i,
612
+ className: a,
592
613
  children: c,
593
614
  ref: r,
594
615
  ...o
595
616
  }) {
596
- const a = t ? Gt : Zt, d = [m.tag, a[e], i].filter(Boolean).join(" ");
597
- return /* @__PURE__ */ _("span", { ref: r, className: d, ...o, children: [
617
+ const s = t ? hn : un, l = [x.tag, s[e], a].filter(Boolean).join(" ");
618
+ return /* @__PURE__ */ p("span", { ref: r, className: l, ...o, children: [
598
619
  c,
599
- s && /* @__PURE__ */ n(
620
+ i && /* @__PURE__ */ n(
600
621
  "button",
601
622
  {
602
623
  type: "button",
603
- className: m.dismiss,
604
- onClick: s,
624
+ className: x.dismiss,
625
+ onClick: i,
605
626
  "aria-label": "Dismiss",
606
- children: /* @__PURE__ */ _(
627
+ children: /* @__PURE__ */ p(
607
628
  "svg",
608
629
  {
609
630
  width: "12",
@@ -625,509 +646,708 @@ function fo({
625
646
  )
626
647
  ] });
627
648
  }
628
- const Xt = "_wrapper_1eu6z_3", Jt = "_tooltip_1eu6z_10", Qt = "_top_1eu6z_24", en = "_bottom_1eu6z_31", tn = "_left_1eu6z_38", nn = "_right_1eu6z_45", E = {
629
- wrapper: Xt,
630
- tooltip: Jt,
631
- top: Qt,
632
- bottom: en,
633
- left: tn,
634
- right: nn
635
- }, on = {
636
- top: E.top,
637
- bottom: E.bottom,
638
- left: E.left,
639
- right: E.right
640
- }, rn = 150;
641
- function po({
649
+ const _n = "_wrapper_1eu6z_3", fn = "_tooltip_1eu6z_10", pn = "_top_1eu6z_24", vn = "_bottom_1eu6z_31", gn = "_left_1eu6z_38", bn = "_right_1eu6z_45", D = {
650
+ wrapper: _n,
651
+ tooltip: fn,
652
+ top: pn,
653
+ bottom: vn,
654
+ left: gn,
655
+ right: bn
656
+ }, yn = {
657
+ top: D.top,
658
+ bottom: D.bottom,
659
+ left: D.left,
660
+ right: D.right
661
+ }, mn = 150;
662
+ function Oo({
642
663
  content: e,
643
664
  children: t,
644
- placement: s = "top"
665
+ placement: i = "top"
645
666
  }) {
646
- const [i, c] = se(!1), r = O(), o = z(void 0), a = C(() => {
667
+ const [a, c] = le(!1), r = U(), o = B(void 0), s = m(() => {
647
668
  o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
648
- }, []), d = C(() => c(!0), []), l = C(() => c(!1), []);
649
- x(() => a, [a]), x(() => {
650
- if (!i) return;
651
- const f = (h) => {
652
- h.key === "Escape" && l();
669
+ }, []), l = m(() => c(!0), []), d = m(() => c(!1), []);
670
+ N(() => s, [s]), N(() => {
671
+ if (!a) return;
672
+ const h = (_) => {
673
+ _.key === "Escape" && d();
653
674
  };
654
- return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
655
- }, [i, l]);
656
- const u = Y(t, {
657
- "aria-describedby": i ? r : void 0,
658
- onMouseEnter: (f) => {
659
- a(), o.current = window.setTimeout(d, rn);
660
- const h = t.props.onMouseEnter;
661
- h == null || h(f);
675
+ return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
676
+ }, [a, d]);
677
+ const u = ee(t, {
678
+ "aria-describedby": a ? r : void 0,
679
+ onMouseEnter: (h) => {
680
+ s(), o.current = window.setTimeout(l, mn);
681
+ const _ = t.props.onMouseEnter;
682
+ _ == null || _(h);
662
683
  },
663
- onMouseLeave: (f) => {
664
- a(), l();
665
- const h = t.props.onMouseLeave;
666
- h == null || h(f);
684
+ onMouseLeave: (h) => {
685
+ s(), d();
686
+ const _ = t.props.onMouseLeave;
687
+ _ == null || _(h);
667
688
  },
668
- onFocus: (f) => {
669
- d();
670
- const h = t.props.onFocus;
671
- h == null || h(f);
689
+ onFocus: (h) => {
690
+ l();
691
+ const _ = t.props.onFocus;
692
+ _ == null || _(h);
672
693
  },
673
- onBlur: (f) => {
674
- a(), l();
675
- const h = t.props.onBlur;
676
- h == null || h(f);
694
+ onBlur: (h) => {
695
+ s(), d();
696
+ const _ = t.props.onBlur;
697
+ _ == null || _(h);
677
698
  }
678
699
  });
679
- return /* @__PURE__ */ _("span", { className: E.wrapper, children: [
700
+ return /* @__PURE__ */ p("span", { className: D.wrapper, children: [
680
701
  u,
681
- i && /* @__PURE__ */ n(
702
+ a && /* @__PURE__ */ n(
682
703
  "span",
683
704
  {
684
705
  id: r,
685
706
  role: "tooltip",
686
- className: [E.tooltip, on[s]].filter(Boolean).join(" "),
707
+ className: [D.tooltip, yn[i]].filter(Boolean).join(" "),
687
708
  children: e
688
709
  }
689
710
  )
690
711
  ] });
691
712
  }
692
- const sn = "_toolbar_1i848_1", an = "_gap8_1i848_7", cn = "_gap12_1i848_8", ln = "_gap16_1i848_9", D = {
693
- toolbar: sn,
694
- gap8: an,
695
- gap12: cn,
696
- gap16: ln
697
- }, dn = { 8: D.gap8, 12: D.gap12, 16: D.gap16 };
698
- function bo({ gap: e = 8, className: t, children: s, ref: i, ...c }) {
699
- const r = [D.toolbar, dn[e], t].filter(Boolean).join(" ");
700
- return /* @__PURE__ */ n("div", { ref: i, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: s });
701
- }
702
- const un = "_trigger_vpa0u_4", hn = "_menu_vpa0u_16", _n = "_item_vpa0u_37", fn = "_separator_vpa0u_74", F = {
703
- trigger: un,
704
- menu: hn,
705
- item: _n,
706
- separator: fn
707
- }, pn = 500;
708
- function bn({ popoverRef: e, triggerRef: t, open: s, onEsc: i }) {
709
- const c = z(""), r = z(0), o = C(() => {
710
- const l = e.current;
711
- return l ? Array.from(
712
- l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
713
+ const wn = "_toolbar_1i848_1", kn = "_gap8_1i848_7", xn = "_gap12_1i848_8", Cn = "_gap16_1i848_9", Z = {
714
+ toolbar: wn,
715
+ gap8: kn,
716
+ gap12: xn,
717
+ gap16: Cn
718
+ }, Bn = { 8: Z.gap8, 12: Z.gap12, 16: Z.gap16 };
719
+ function Ko({ gap: e = 8, className: t, children: i, ref: a, ...c }) {
720
+ const r = [Z.toolbar, Bn[e], t].filter(Boolean).join(" ");
721
+ return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: i });
722
+ }
723
+ const Nn = "_trigger_vpa0u_4", $n = "_menu_vpa0u_16", Ln = "_item_vpa0u_37", jn = "_separator_vpa0u_74", J = {
724
+ trigger: Nn,
725
+ menu: $n,
726
+ item: Ln,
727
+ separator: jn
728
+ }, Sn = 500;
729
+ function zn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
730
+ const c = B(""), r = B(0), o = m(() => {
731
+ const d = e.current;
732
+ return d ? Array.from(
733
+ d.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
713
734
  ) : [];
714
- }, [e]), a = C(
715
- (l) => {
716
- if (l) {
717
- for (const u of o()) u.tabIndex = u === l ? 0 : -1;
718
- l.focus();
735
+ }, [e]), s = m(
736
+ (d) => {
737
+ if (d) {
738
+ for (const u of o()) u.tabIndex = u === d ? 0 : -1;
739
+ d.focus();
719
740
  }
720
741
  },
721
742
  [o]
722
- ), d = C(() => {
743
+ ), l = m(() => {
723
744
  var u;
724
- const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
725
- l == null || l.focus();
745
+ const d = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
746
+ d == null || d.focus();
726
747
  }, [t]);
727
- return x(() => {
728
- if (!s) return;
729
- const l = o();
730
- return a(l[0]), () => {
748
+ return N(() => {
749
+ if (!i) return;
750
+ const d = o();
751
+ return s(d[0]), () => {
731
752
  var u;
732
- (u = e.current) != null && u.contains(document.activeElement) && d();
753
+ (u = e.current) != null && u.contains(document.activeElement) && l();
733
754
  };
734
- }, [s, e, o, a, d]), C(
735
- (l) => {
736
- if (l.key === "Escape") {
737
- l.preventDefault(), i();
755
+ }, [i, e, o, s, l]), m(
756
+ (d) => {
757
+ if (d.key === "Escape") {
758
+ d.preventDefault(), a();
738
759
  return;
739
760
  }
740
761
  const u = o();
741
762
  if (u.length === 0) return;
742
- const f = u.indexOf(document.activeElement);
743
- switch (l.key) {
763
+ const h = u.indexOf(document.activeElement);
764
+ switch (d.key) {
744
765
  case "ArrowDown":
745
- l.preventDefault(), a(u[(f + 1 + u.length) % u.length]);
766
+ d.preventDefault(), s(u[(h + 1 + u.length) % u.length]);
746
767
  return;
747
768
  case "ArrowUp":
748
- l.preventDefault(), a(u[f <= 0 ? u.length - 1 : f - 1]);
769
+ d.preventDefault(), s(u[h <= 0 ? u.length - 1 : h - 1]);
749
770
  return;
750
771
  case "Home":
751
- l.preventDefault(), a(u[0]);
772
+ d.preventDefault(), s(u[0]);
752
773
  return;
753
774
  case "End":
754
- l.preventDefault(), a(u[u.length - 1]);
775
+ d.preventDefault(), s(u[u.length - 1]);
755
776
  return;
756
777
  }
757
- if (l.key.length !== 1 || l.metaKey || l.ctrlKey || l.altKey) return;
758
- const h = Date.now();
759
- c.current = h - r.current > pn ? l.key.toLowerCase() : c.current + l.key.toLowerCase(), r.current = h;
760
- const y = u.find(
761
- (w) => (w.textContent ?? "").trim().toLowerCase().startsWith(c.current)
778
+ if (d.key.length !== 1 || d.metaKey || d.ctrlKey || d.altKey) return;
779
+ const _ = Date.now();
780
+ c.current = _ - r.current > Sn ? d.key.toLowerCase() : c.current + d.key.toLowerCase(), r.current = _;
781
+ const b = u.find(
782
+ (y) => (y.textContent ?? "").trim().toLowerCase().startsWith(c.current)
762
783
  );
763
- y && (l.preventDefault(), a(y));
784
+ b && (d.preventDefault(), s(b));
764
785
  },
765
- [o, a, i]
786
+ [o, s, a]
766
787
  );
767
788
  }
768
- function vn() {
789
+ function In() {
769
790
  return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
770
791
  }
771
- function gn({ popoverRef: e, triggerRef: t, open: s, placement: i, anchorName: c }) {
772
- x(() => {
792
+ function Tn({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
793
+ N(() => {
773
794
  const r = t.current, o = e.current;
774
795
  !r || !o || (r.style.setProperty("anchor-name", c), o.style.setProperty("position-anchor", c));
775
- }, [e, t, c]), x(() => {
776
- if (!s || vn()) return;
796
+ }, [e, t, c]), N(() => {
797
+ if (!i || In()) return;
777
798
  const r = t.current, o = e.current;
778
799
  if (!r || !o) return;
779
- const a = () => {
780
- const d = r.getBoundingClientRect(), l = i.startsWith("bottom"), u = i.endsWith("end"), f = getComputedStyle(r).direction === "rtl", h = u !== f;
781
- o.style.position = "fixed", o.style.top = l ? `${d.bottom}px` : "", o.style.bottom = l ? "" : `${window.innerHeight - d.top}px`, o.style.left = h ? "" : `${d.left}px`, o.style.right = h ? `${window.innerWidth - d.right}px` : "";
800
+ const s = () => {
801
+ const l = r.getBoundingClientRect(), d = a.startsWith("bottom"), u = a.endsWith("end"), h = getComputedStyle(r).direction === "rtl", _ = u !== h;
802
+ o.style.position = "fixed", o.style.top = d ? `${l.bottom}px` : "", o.style.bottom = d ? "" : `${window.innerHeight - l.top}px`, o.style.left = _ ? "" : `${l.left}px`, o.style.right = _ ? `${window.innerWidth - l.right}px` : "";
782
803
  };
783
- return a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
784
- window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
804
+ return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
805
+ window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
785
806
  };
786
- }, [s, i, e, t]);
807
+ }, [i, a, e, t]);
787
808
  }
788
- const ne = K({ close: () => {
809
+ const _e = K({ close: () => {
789
810
  } });
790
- function Q(e) {
811
+ function se(e) {
791
812
  return e.hasAttribute("data-open") || e.matches(":popover-open");
792
813
  }
793
- function vo({
814
+ function Uo({
794
815
  open: e,
795
816
  onClose: t,
796
- trigger: s,
797
- placement: i = "bottom-start",
817
+ trigger: i,
818
+ placement: a = "bottom-start",
798
819
  children: c,
799
820
  className: r,
800
821
  ref: o,
801
- ...a
822
+ ...s
802
823
  }) {
803
- const d = z(null), l = z(null), u = z(!1), f = `--psi-menu-${O().replace(/:/g, "")}`;
804
- gn({ popoverRef: d, triggerRef: l, open: e, placement: i, anchorName: f });
805
- const h = (v) => {
806
- d.current = v, typeof o == "function" ? o(v) : o && (o.current = v);
824
+ const l = B(null), d = B(null), u = B(!1), h = `--psi-menu-${U().replace(/:/g, "")}`;
825
+ Tn({ popoverRef: l, triggerRef: d, open: e, placement: a, anchorName: h });
826
+ const _ = (f) => {
827
+ l.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
807
828
  };
808
- x(() => {
809
- const v = d.current;
810
- if (!v) return;
811
- const G = Q(v);
812
- e && !G ? v.showPopover() : !e && G && (u.current = !0, v.hidePopover());
829
+ N(() => {
830
+ const f = l.current;
831
+ if (!f) return;
832
+ const g = se(f);
833
+ e && !g ? f.showPopover() : !e && g && (u.current = !0, f.hidePopover());
813
834
  }, [e]);
814
- const y = C(() => {
815
- const v = d.current;
816
- if (v) {
835
+ const b = m(() => {
836
+ const f = l.current;
837
+ if (f) {
817
838
  if (u.current) {
818
839
  u.current = !1;
819
840
  return;
820
841
  }
821
- Q(v) || e && t("outside");
842
+ se(f) || e && t("outside");
822
843
  }
823
- }, [t, e]), w = bn({
824
- popoverRef: d,
825
- triggerRef: l,
844
+ }, [t, e]), y = zn({
845
+ popoverRef: l,
846
+ triggerRef: d,
826
847
  open: e,
827
848
  onEsc: () => t("esc")
828
- }), j = C(
829
- (v) => {
830
- t(v);
849
+ }), j = m(
850
+ (f) => {
851
+ t(f);
831
852
  },
832
853
  [t]
833
- ), p = q(s);
834
- x(() => {
835
- p || console.warn(
854
+ ), v = O(i);
855
+ N(() => {
856
+ v || console.warn(
836
857
  "Psi Menu: `trigger` must be a single React element that forwards props to a focusable node. Menu clones it to attach aria-haspopup and aria-expanded; a string, fragment or array cannot carry them, so the menu renders without its trigger ARIA."
837
858
  );
838
- }, [p]);
839
- const R = p ? Y(s, { "aria-haspopup": "menu", "aria-expanded": e }) : s;
840
- return /* @__PURE__ */ _(V, { children: [
841
- /* @__PURE__ */ n("div", { ref: l, className: F.trigger, "data-psi-menu-trigger": !0, children: R }),
859
+ }, [v]);
860
+ const I = v ? ee(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
861
+ return /* @__PURE__ */ p(G, { children: [
862
+ /* @__PURE__ */ n("div", { ref: d, className: J.trigger, "data-psi-menu-trigger": !0, children: I }),
842
863
  /* @__PURE__ */ n(
843
864
  "div",
844
865
  {
845
- ...a,
846
- ref: h,
866
+ ...s,
867
+ ref: _,
847
868
  popover: "auto",
848
869
  role: "menu",
849
870
  "data-psi-menu": !0,
850
- "data-placement": i,
851
- className: [F.menu, r].filter(Boolean).join(" "),
852
- onToggle: y,
853
- onKeyDown: w,
854
- children: /* @__PURE__ */ n(ne.Provider, { value: { close: j }, children: c })
871
+ "data-placement": a,
872
+ className: [J.menu, r].filter(Boolean).join(" "),
873
+ onToggle: b,
874
+ onKeyDown: y,
875
+ children: /* @__PURE__ */ n(_e.Provider, { value: { close: j }, children: c })
855
876
  }
856
877
  )
857
878
  ] });
858
879
  }
859
- function go({ children: e, onSelect: t, variant: s = "neutral", disabled: i = !1 }) {
860
- const { close: c } = B(ne);
880
+ function Yo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
881
+ const { close: c } = L(_e);
861
882
  return /* @__PURE__ */ n(
862
883
  "button",
863
884
  {
864
885
  type: "button",
865
886
  role: "menuitem",
866
887
  "data-psi-menu-item": !0,
867
- "data-variant": s,
868
- "aria-disabled": i || void 0,
888
+ "data-variant": i,
889
+ "aria-disabled": a || void 0,
869
890
  tabIndex: -1,
870
- className: F.item,
891
+ className: J.item,
871
892
  onClick: () => {
872
- i || (t(), c("item-select"));
893
+ a || (t(), c("item-select"));
873
894
  },
874
895
  children: e
875
896
  }
876
897
  );
877
898
  }
878
- function yo() {
879
- return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: F.separator });
880
- }
881
- const yn = "_table_146hc_3", wn = "_headerCell_146hc_13", mn = "_cell_146hc_19", kn = "_sortButton_146hc_30", xn = "_sortIndicator_146hc_47", Cn = "_selectCell_146hc_79", Bn = "_body_146hc_86", $n = "_row_146hc_89", zn = "_sticky_146hc_111", g = {
882
- table: yn,
883
- headerCell: wn,
884
- cell: mn,
885
- sortButton: kn,
886
- sortIndicator: xn,
887
- selectCell: Cn,
888
- body: Bn,
889
- row: $n,
890
- sticky: zn
891
- }, oe = /* @__PURE__ */ new Set(), T = K({
899
+ function Zo() {
900
+ return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: J.separator });
901
+ }
902
+ const En = "_table_146hc_3", Mn = "_headerCell_146hc_13", Wn = "_cell_146hc_19", An = "_sortButton_146hc_30", Pn = "_sortIndicator_146hc_47", Dn = "_selectCell_146hc_79", Rn = "_body_146hc_86", Hn = "_row_146hc_89", Vn = "_sticky_146hc_111", k = {
903
+ table: En,
904
+ headerCell: Mn,
905
+ cell: Wn,
906
+ sortButton: An,
907
+ sortIndicator: Pn,
908
+ selectCell: Dn,
909
+ body: Rn,
910
+ row: Hn,
911
+ sticky: Vn
912
+ }, fe = /* @__PURE__ */ new Set(), R = K({
892
913
  size: 40,
893
914
  sortable: !1,
894
915
  sort: null,
895
916
  selectable: !1,
896
- selected: oe
897
- }), re = K([]);
898
- function jn({ children: e, className: t }) {
899
- return /* @__PURE__ */ n("tbody", { className: [g.body, t].filter(Boolean).join(" "), children: e });
917
+ selected: fe
918
+ }), pe = K([]);
919
+ function qn({ children: e, className: t }) {
920
+ return /* @__PURE__ */ n("tbody", { className: [k.body, t].filter(Boolean).join(" "), children: e });
900
921
  }
901
- function Ln(e) {
922
+ function Fn(e) {
902
923
  const t = [];
903
- let s = !1, i = !1;
924
+ let i = !1, a = !1;
904
925
  const c = (r) => {
905
- H.forEach(r, function o(a) {
906
- if (!q(a)) return;
907
- if (a.type === X) {
908
- H.forEach(a.props.children, o);
926
+ W.forEach(r, function o(s) {
927
+ if (!O(s)) return;
928
+ if (s.type === re) {
929
+ W.forEach(s.props.children, o);
909
930
  return;
910
931
  }
911
- const d = a.props.rowId;
912
- typeof d == "string" ? t.push(d) : i = !0;
932
+ const l = s.props.rowId;
933
+ typeof l == "string" ? t.push(l) : a = !0;
913
934
  });
914
935
  };
915
- return H.forEach(e, function r(o) {
916
- if (q(o)) {
917
- if (o.type === X) {
918
- H.forEach(o.props.children, r);
936
+ return W.forEach(e, function r(o) {
937
+ if (O(o)) {
938
+ if (o.type === re) {
939
+ W.forEach(o.props.children, r);
919
940
  return;
920
941
  }
921
- o.type === jn && (s = !0, c(o.props.children));
942
+ o.type === qn && (i = !0, c(o.props.children));
922
943
  }
923
- }), { ids: t, sawBody: s, hasRowWithoutId: i };
944
+ }), { ids: t, sawBody: i, hasRowWithoutId: a };
924
945
  }
925
- function wo({
946
+ function Go({
926
947
  size: e = 40,
927
948
  stickyHeader: t,
928
- sortable: s = !1,
929
- sort: i = null,
949
+ sortable: i = !1,
950
+ sort: a = null,
930
951
  onSortChange: c,
931
952
  selectable: r = !1,
932
- selected: o = oe,
933
- onSelectionChange: a,
934
- children: d,
935
- className: l,
953
+ selected: o = fe,
954
+ onSelectionChange: s,
955
+ children: l,
956
+ className: d,
936
957
  ref: u
937
958
  }) {
938
- const f = [g.table, t && g.sticky, l].filter(Boolean).join(" "), { ids: h, sawBody: y, hasRowWithoutId: w } = ie(() => Ln(d), [d]);
939
- return process.env.NODE_ENV !== "production" && (s && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !a && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !y && console.warn("Psi Table: `selectable` is set but no `TableBody` is visible to `Table`. Wrapping `TableBody` in a component other than a Fragment hides its rows, and select-all will clear the selection instead of filling it."), r && w && console.warn("Psi Table: `selectable` is set but a row in `TableBody` has no `rowId`. That row will render without a selection checkbox and select-all will not include it.")), /* @__PURE__ */ n(T.Provider, { value: { size: e, sortable: s, sort: i, onSortChange: c, selectable: r, selected: o, onSelectionChange: a }, children: /* @__PURE__ */ n(re.Provider, { value: h, children: /* @__PURE__ */ n("table", { ref: u, className: f, "data-size": e, children: d }) }) });
959
+ const h = [k.table, t && k.sticky, d].filter(Boolean).join(" "), { ids: _, sawBody: b, hasRowWithoutId: y } = de(() => Fn(l), [l]);
960
+ return process.env.NODE_ENV !== "production" && (i && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !s && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !b && console.warn("Psi Table: `selectable` is set but no `TableBody` is visible to `Table`. Wrapping `TableBody` in a component other than a Fragment hides its rows, and select-all will clear the selection instead of filling it."), r && y && console.warn("Psi Table: `selectable` is set but a row in `TableBody` has no `rowId`. That row will render without a selection checkbox and select-all will not include it.")), /* @__PURE__ */ n(R.Provider, { value: { size: e, sortable: i, sort: a, onSortChange: c, selectable: r, selected: o, onSelectionChange: s }, children: /* @__PURE__ */ n(pe.Provider, { value: _, children: /* @__PURE__ */ n("table", { ref: u, className: h, "data-size": e, children: l }) }) });
940
961
  }
941
- function Nn({ rowId: e, label: t }) {
942
- const { selected: s, onSelectionChange: i } = B(T), c = () => {
943
- const r = new Set(s);
944
- r.has(e) ? r.delete(e) : r.add(e), i == null || i(r);
962
+ function On({ rowId: e, label: t }) {
963
+ const { selected: i, onSelectionChange: a } = L(R), c = () => {
964
+ const r = new Set(i);
965
+ r.has(e) ? r.delete(e) : r.add(e), a == null || a(r);
945
966
  };
946
- return /* @__PURE__ */ n("td", { className: `${g.cell} ${g.selectCell}`, children: /* @__PURE__ */ n(te, { "aria-label": t, checked: s.has(e), onChange: c }) });
967
+ return /* @__PURE__ */ n("td", { className: `${k.cell} ${k.selectCell}`, children: /* @__PURE__ */ n(he, { "aria-label": t, checked: i.has(e), onChange: c }) });
947
968
  }
948
- function Sn() {
949
- const { selected: e, onSelectionChange: t } = B(T), s = B(re), i = z(null), c = s.length > 0 && s.every((a) => e.has(a)), r = s.some((a) => e.has(a));
950
- x(() => {
951
- i.current && (i.current.indeterminate = r && !c);
969
+ function Kn() {
970
+ const { selected: e, onSelectionChange: t } = L(R), i = L(pe), a = B(null), c = i.length > 0 && i.every((s) => e.has(s)), r = i.some((s) => e.has(s));
971
+ N(() => {
972
+ a.current && (a.current.indeterminate = r && !c);
952
973
  }, [r, c]);
953
974
  const o = () => {
954
- const a = new Set(e);
955
- c ? s.forEach((d) => a.delete(d)) : s.forEach((d) => a.add(d)), t == null || t(a);
975
+ const s = new Set(e);
976
+ c ? i.forEach((l) => s.delete(l)) : i.forEach((l) => s.add(l)), t == null || t(s);
956
977
  };
957
- return /* @__PURE__ */ n("th", { scope: "col", className: `${g.headerCell} ${g.selectCell}`, children: /* @__PURE__ */ n(te, { ref: i, "aria-label": "Select all rows", checked: c, onChange: o }) });
958
- }
959
- function mo({ children: e, className: t }) {
960
- const { selectable: s } = B(T);
961
- let i = !1;
962
- const c = s ? H.map(e, (r) => {
963
- if (i || !q(r)) return r;
964
- i = !0;
978
+ return /* @__PURE__ */ n("th", { scope: "col", className: `${k.headerCell} ${k.selectCell}`, children: /* @__PURE__ */ n(he, { ref: a, "aria-label": "Select all rows", checked: c, onChange: o }) });
979
+ }
980
+ function Xo({ children: e, className: t }) {
981
+ const { selectable: i } = L(R);
982
+ let a = !1;
983
+ const c = i ? W.map(e, (r) => {
984
+ if (a || !O(r)) return r;
985
+ a = !0;
965
986
  const o = r;
966
- return Y(
987
+ return ee(
967
988
  o,
968
989
  void 0,
969
- /* @__PURE__ */ _(V, { children: [
970
- /* @__PURE__ */ n(Sn, {}),
990
+ /* @__PURE__ */ p(G, { children: [
991
+ /* @__PURE__ */ n(Kn, {}),
971
992
  o.props.children
972
993
  ] })
973
994
  );
974
995
  }) : e;
975
- return /* @__PURE__ */ n("thead", { className: [g.head, t].filter(Boolean).join(" "), children: c });
996
+ return /* @__PURE__ */ n("thead", { className: [k.head, t].filter(Boolean).join(" "), children: c });
976
997
  }
977
- function ko({ rowId: e, selectLabel: t, children: s, className: i }) {
978
- const { selectable: c, selected: r } = B(T), o = e !== void 0 && r.has(e);
979
- return /* @__PURE__ */ _(
998
+ function Jo({ rowId: e, selectLabel: t, children: i, className: a }) {
999
+ const { selectable: c, selected: r } = L(R), o = e !== void 0 && r.has(e);
1000
+ return /* @__PURE__ */ p(
980
1001
  "tr",
981
1002
  {
982
- className: [g.row, i].filter(Boolean).join(" "),
1003
+ className: [k.row, a].filter(Boolean).join(" "),
983
1004
  "data-row-id": e,
984
1005
  "data-selected": o || void 0,
985
1006
  children: [
986
- c && e !== void 0 && /* @__PURE__ */ n(Nn, { rowId: e, label: t ?? `Select row ${e}` }),
987
- s
1007
+ c && e !== void 0 && /* @__PURE__ */ n(On, { rowId: e, label: t ?? `Select row ${e}` }),
1008
+ i
988
1009
  ]
989
1010
  }
990
1011
  );
991
1012
  }
992
- function xo({ sortKey: e, numeric: t, children: s, className: i }) {
993
- const { sortable: c, sort: r, onSortChange: o } = B(T), a = c && e !== void 0, d = a && (r == null ? void 0 : r.key) === e, l = a ? d ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
1013
+ function Qo({ sortKey: e, numeric: t, children: i, className: a }) {
1014
+ const { sortable: c, sort: r, onSortChange: o } = L(R), s = c && e !== void 0, l = s && (r == null ? void 0 : r.key) === e, d = s ? l ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
994
1015
  if (!e) return;
995
- const f = d && r.direction === "asc" ? "desc" : "asc";
996
- o == null || o({ key: e, direction: f });
1016
+ const h = l && r.direction === "asc" ? "desc" : "asc";
1017
+ o == null || o({ key: e, direction: h });
997
1018
  };
998
1019
  return /* @__PURE__ */ n(
999
1020
  "th",
1000
1021
  {
1001
1022
  scope: "col",
1002
- className: [g.headerCell, i].filter(Boolean).join(" "),
1023
+ className: [k.headerCell, a].filter(Boolean).join(" "),
1003
1024
  "data-numeric": t || void 0,
1004
- "aria-sort": l,
1005
- children: a ? /* @__PURE__ */ _("button", { type: "button", className: g.sortButton, onClick: u, children: [
1006
- s,
1007
- /* @__PURE__ */ n("span", { className: g.sortIndicator, "aria-hidden": "true", children: d ? r.direction === "asc" ? "↑" : "↓" : "" })
1008
- ] }) : s
1025
+ "aria-sort": d,
1026
+ children: s ? /* @__PURE__ */ p("button", { type: "button", className: k.sortButton, onClick: u, children: [
1027
+ i,
1028
+ /* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children: l ? r.direction === "asc" ? "↑" : "↓" : "" })
1029
+ ] }) : i
1009
1030
  }
1010
1031
  );
1011
1032
  }
1012
- function Co({ numeric: e, children: t, className: s }) {
1013
- return /* @__PURE__ */ n("td", { className: [g.cell, s].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
1033
+ function er({ numeric: e, children: t, className: i }) {
1034
+ return /* @__PURE__ */ n("td", { className: [k.cell, i].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
1014
1035
  }
1015
- const In = "_nav_166vs_6", Mn = "_ellipsis_166vs_12", ee = {
1016
- nav: In,
1017
- ellipsis: Mn
1036
+ const Un = "_nav_166vs_6", Yn = "_ellipsis_166vs_12", ae = {
1037
+ nav: Un,
1038
+ ellipsis: Yn
1018
1039
  };
1019
- function P(e, t) {
1020
- return Array.from({ length: t - e + 1 }, (s, i) => e + i);
1040
+ function F(e, t) {
1041
+ return Array.from({ length: t - e + 1 }, (i, a) => e + a);
1021
1042
  }
1022
- function En(e, t, s) {
1023
- const i = Math.max(0, s), c = i * 2 + 1, r = c + 4;
1043
+ function Zn(e, t, i) {
1044
+ const a = Math.max(0, i), c = a * 2 + 1, r = c + 4;
1024
1045
  if (t <= r)
1025
- return P(1, t);
1026
- const o = Math.max(e - i, 1), a = Math.min(e + i, t), d = o > 3, l = a < t - 2;
1027
- if (!d && l) {
1028
- const u = Math.max(a, c);
1029
- return [...P(1, u), "ellipsis", t];
1046
+ return F(1, t);
1047
+ const o = Math.max(e - a, 1), s = Math.min(e + a, t), l = o > 3, d = s < t - 2;
1048
+ if (!l && d) {
1049
+ const u = Math.max(s, c);
1050
+ return [...F(1, u), "ellipsis", t];
1030
1051
  }
1031
- if (d && !l) {
1052
+ if (l && !d) {
1032
1053
  const u = Math.min(o, t - c + 1);
1033
- return [1, "ellipsis", ...P(u, t)];
1054
+ return [1, "ellipsis", ...F(u, t)];
1034
1055
  }
1035
- return d && l ? [1, "ellipsis", ...P(o, a), "ellipsis", t] : P(1, t);
1056
+ return l && d ? [1, "ellipsis", ...F(o, s), "ellipsis", t] : F(1, t);
1036
1057
  }
1037
- function Bo({
1058
+ function tr({
1038
1059
  page: e,
1039
1060
  pageCount: t,
1040
- onPageChange: s,
1041
- siblingCount: i = 1,
1061
+ onPageChange: i,
1062
+ siblingCount: a = 1,
1042
1063
  "aria-label": c = "Pagination",
1043
1064
  className: r
1044
1065
  }) {
1045
- const o = En(e, t, i);
1046
- return /* @__PURE__ */ _("nav", { "aria-label": c, className: [ee.nav, r].filter(Boolean).join(" "), children: [
1066
+ const o = Zn(e, t, a);
1067
+ return /* @__PURE__ */ p("nav", { "aria-label": c, className: [ae.nav, r].filter(Boolean).join(" "), children: [
1047
1068
  /* @__PURE__ */ n(
1048
- U,
1069
+ X,
1049
1070
  {
1050
1071
  "aria-label": "Previous page",
1051
1072
  size: 32,
1052
1073
  variant: "ghost",
1053
1074
  disabled: e <= 1,
1054
- onClick: () => s(e - 1),
1075
+ onClick: () => i(e - 1),
1055
1076
  children: /* @__PURE__ */ n("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ n("path", { d: "M10 3 5 8l5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }) })
1056
1077
  }
1057
1078
  ),
1058
1079
  o.map(
1059
- (a, d) => a === "ellipsis" ? /* @__PURE__ */ n("span", { className: ee.ellipsis, "aria-hidden": "true", children: "…" }, `e${d}`) : /* @__PURE__ */ n(
1060
- xe,
1080
+ (s, l) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className: ae.ellipsis, "aria-hidden": "true", children: "…" }, `e${l}`) : /* @__PURE__ */ n(
1081
+ Me,
1061
1082
  {
1062
1083
  size: 32,
1063
- variant: a === e ? "accent-subtle" : "ghost",
1064
- "aria-current": a === e ? "page" : void 0,
1065
- onClick: () => s(a),
1066
- children: String(a)
1084
+ variant: s === e ? "accent-subtle" : "ghost",
1085
+ "aria-current": s === e ? "page" : void 0,
1086
+ onClick: () => i(s),
1087
+ children: String(s)
1067
1088
  },
1068
- a
1089
+ s
1069
1090
  )
1070
1091
  ),
1071
1092
  /* @__PURE__ */ n(
1072
- U,
1093
+ X,
1073
1094
  {
1074
1095
  "aria-label": "Next page",
1075
1096
  size: 32,
1076
1097
  variant: "ghost",
1077
1098
  disabled: e >= t,
1078
- onClick: () => s(e + 1),
1099
+ onClick: () => i(e + 1),
1079
1100
  children: /* @__PURE__ */ n("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ n("path", { d: "m6 3 5 5-5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }) })
1080
1101
  }
1081
1102
  )
1082
1103
  ] });
1083
1104
  }
1105
+ const Gn = "_toast_7toru_10", Xn = "_icon_7toru_39", Jn = "_iconNeutral_7toru_44", Qn = "_iconSuccess_7toru_45", eo = "_iconWarning_7toru_46", to = "_iconDanger_7toru_47", no = "_body_7toru_51", oo = "_action_7toru_55", ro = "_srOnly_7toru_60", io = "_region_7toru_74", so = "_live_7toru_104", C = {
1106
+ toast: Gn,
1107
+ icon: Xn,
1108
+ iconNeutral: Jn,
1109
+ iconSuccess: Qn,
1110
+ iconWarning: eo,
1111
+ iconDanger: to,
1112
+ body: no,
1113
+ action: oo,
1114
+ srOnly: ro,
1115
+ region: io,
1116
+ live: so
1117
+ }, ao = {
1118
+ neutral: pt,
1119
+ success: ft,
1120
+ warning: vt,
1121
+ danger: gt
1122
+ }, co = {
1123
+ neutral: null,
1124
+ success: "Success:",
1125
+ warning: "Warning:",
1126
+ danger: "Error:"
1127
+ }, lo = {
1128
+ neutral: C.iconNeutral,
1129
+ success: C.iconSuccess,
1130
+ warning: C.iconWarning,
1131
+ danger: C.iconDanger
1132
+ };
1133
+ function ve({
1134
+ variant: e = "neutral",
1135
+ children: t,
1136
+ action: i,
1137
+ onDismiss: a,
1138
+ className: c,
1139
+ ref: r
1140
+ }) {
1141
+ const o = ao[e], s = co[e], l = [C.toast, c].filter(Boolean).join(" ");
1142
+ return /* @__PURE__ */ p("div", { ref: r, className: l, "data-variant": e, "data-psi-toast": !0, children: [
1143
+ /* @__PURE__ */ n("span", { className: [C.icon, lo[e]].join(" "), children: /* @__PURE__ */ n(o, { size: 20, "aria-hidden": "true" }) }),
1144
+ /* @__PURE__ */ p("div", { className: C.body, children: [
1145
+ s && /* @__PURE__ */ n("span", { className: C.srOnly, children: s }),
1146
+ t
1147
+ ] }),
1148
+ i != null && /* @__PURE__ */ n("div", { className: C.action, children: i }),
1149
+ a && /* @__PURE__ */ n(
1150
+ X,
1151
+ {
1152
+ variant: "ghost",
1153
+ size: 32,
1154
+ "aria-label": "Dismiss notification",
1155
+ onClick: a,
1156
+ children: /* @__PURE__ */ n(ue, { "aria-hidden": "true" })
1157
+ }
1158
+ )
1159
+ ] });
1160
+ }
1161
+ const uo = /* @__PURE__ */ new Set(["warning", "danger"]);
1162
+ function ce(e) {
1163
+ if (!O(e) || e.type !== ve) return !1;
1164
+ const { variant: t } = e.props;
1165
+ return uo.has(t ?? "neutral");
1166
+ }
1167
+ function ho({
1168
+ placement: e = "bottom-end",
1169
+ "aria-label": t = "Notifications",
1170
+ children: i,
1171
+ className: a,
1172
+ ref: c
1173
+ }) {
1174
+ const r = B(null), o = (u) => {
1175
+ r.current = u, typeof c == "function" ? c(u) : c && (c.current = u);
1176
+ };
1177
+ N(() => {
1178
+ var h;
1179
+ const u = r.current;
1180
+ if (u)
1181
+ return (h = u.showPopover) == null || h.call(u), () => {
1182
+ var _;
1183
+ (_ = u.hidePopover) == null || _.call(u);
1184
+ };
1185
+ }, []);
1186
+ const s = W.toArray(i), l = s.filter(ce), d = s.filter((u) => !ce(u));
1187
+ return /* @__PURE__ */ p(
1188
+ "div",
1189
+ {
1190
+ ref: o,
1191
+ popover: "manual",
1192
+ "aria-label": t,
1193
+ "data-placement": e,
1194
+ "data-psi-toast-region": !0,
1195
+ className: [C.region, a].filter(Boolean).join(" "),
1196
+ children: [
1197
+ /* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className: C.live, children: d }),
1198
+ /* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className: C.live, children: l })
1199
+ ]
1200
+ }
1201
+ );
1202
+ }
1203
+ const ge = K(null);
1204
+ function nr() {
1205
+ const e = L(ge);
1206
+ if (!e)
1207
+ throw new Error(
1208
+ "Psi useToast: no ToastProvider found. Wrap your app (or the subtree that raises toasts) in <ToastProvider> — it owns the queue, the auto-dismiss timers and the single ToastRegion."
1209
+ );
1210
+ return e;
1211
+ }
1212
+ function or({
1213
+ limit: e = 3,
1214
+ duration: t = 5e3,
1215
+ actionDuration: i = 1e4,
1216
+ placement: a = "bottom-end",
1217
+ children: c
1218
+ }) {
1219
+ const [r, o] = le([]), s = B(/* @__PURE__ */ new Map()), l = B(!1), d = B(0), u = U(), h = m((f) => {
1220
+ const g = s.current.get(f);
1221
+ (g == null ? void 0 : g.handle) !== void 0 && clearTimeout(g.handle), s.current.delete(f), o((S) => S.filter((H) => H.id !== f));
1222
+ }, []), _ = m(
1223
+ (f, g) => {
1224
+ const S = l.current ? { handle: void 0, remaining: g, startedAt: void 0 } : { handle: setTimeout(() => h(f), g), remaining: g, startedAt: Date.now() };
1225
+ s.current.set(f, S);
1226
+ },
1227
+ [h]
1228
+ ), b = m(
1229
+ ({ variant: f = "neutral", message: g, action: S }) => {
1230
+ const H = `${u}-${d.current++}`, ne = S != null ? i : t;
1231
+ return o((be) => {
1232
+ const Q = [...be, { id: H, variant: f, message: g, action: S, duration: ne }];
1233
+ for (; Q.length > e; ) {
1234
+ const oe = Q.shift(), Y = s.current.get(oe.id);
1235
+ (Y == null ? void 0 : Y.handle) !== void 0 && clearTimeout(Y.handle), s.current.delete(oe.id);
1236
+ }
1237
+ return Q;
1238
+ }), _(H, ne), H;
1239
+ },
1240
+ [i, _, t, u, e]
1241
+ ), y = m(() => {
1242
+ for (const f of s.current.values())
1243
+ f.handle !== void 0 && clearTimeout(f.handle);
1244
+ s.current.clear(), o([]);
1245
+ }, []), j = m(() => {
1246
+ if (!l.current) {
1247
+ l.current = !0;
1248
+ for (const [f, g] of s.current) {
1249
+ if (g.handle === void 0) continue;
1250
+ clearTimeout(g.handle);
1251
+ const S = g.startedAt === void 0 ? 0 : Date.now() - g.startedAt;
1252
+ s.current.set(f, {
1253
+ handle: void 0,
1254
+ remaining: Math.max(0, g.remaining - S),
1255
+ startedAt: void 0
1256
+ });
1257
+ }
1258
+ }
1259
+ }, []), v = m(() => {
1260
+ if (l.current) {
1261
+ l.current = !1;
1262
+ for (const [f, g] of s.current)
1263
+ g.handle === void 0 && s.current.set(f, {
1264
+ handle: setTimeout(() => h(f), g.remaining),
1265
+ remaining: g.remaining,
1266
+ startedAt: Date.now()
1267
+ });
1268
+ }
1269
+ }, [h]);
1270
+ N(() => {
1271
+ const f = s.current;
1272
+ return () => {
1273
+ for (const g of f.values())
1274
+ g.handle !== void 0 && clearTimeout(g.handle);
1275
+ f.clear();
1276
+ };
1277
+ }, []);
1278
+ const I = de(
1279
+ () => ({ show: b, dismiss: h, clear: y }),
1280
+ [b, h, y]
1281
+ );
1282
+ return /* @__PURE__ */ p(ge.Provider, { value: I, children: [
1283
+ c,
1284
+ /* @__PURE__ */ n(
1285
+ "div",
1286
+ {
1287
+ onPointerEnter: j,
1288
+ onPointerLeave: v,
1289
+ onFocusCapture: j,
1290
+ onBlurCapture: v,
1291
+ children: /* @__PURE__ */ n(ho, { placement: a, children: r.map((f) => /* @__PURE__ */ n(ve, { variant: f.variant, action: f.action, onDismiss: () => h(f.id), children: f.message }, f.id)) })
1292
+ }
1293
+ )
1294
+ ] });
1295
+ }
1084
1296
  export {
1085
- Rn as AspectRatio,
1086
- xe as Button,
1087
- An as Card,
1088
- te as Checkbox,
1089
- lo as Dialog,
1090
- Dn as Field,
1091
- oo as IconArrowDown,
1092
- ro as IconArrowUpRight,
1093
- U as IconButton,
1094
- Fn as IconCheck,
1095
- Kn as IconChevronDown,
1096
- On as IconChevronRight,
1097
- nt as IconClose,
1098
- Jn as IconCopy,
1099
- Gn as IconEdit,
1100
- Qn as IconExternalLink,
1101
- eo as IconEye,
1102
- to as IconEyeOff,
1103
- io as IconGitHub,
1104
- co as IconInstagram,
1105
- so as IconLinkedIn,
1106
- no as IconLoader,
1107
- qn as IconMinus,
1108
- Vn as IconPlus,
1109
- Un as IconSearch,
1110
- Yn as IconSettings,
1111
- Xn as IconTrash,
1112
- Zn as IconUser,
1113
- ao as IconX,
1114
- uo as Input,
1115
- vo as Menu,
1116
- ne as MenuContext,
1117
- go as MenuItem,
1118
- yo as MenuSeparator,
1119
- Hn as NavBar,
1120
- Bo as Pagination,
1121
- Pn as Panel,
1122
- ho as Select,
1123
- _o as Switch,
1124
- wo as Table,
1125
- jn as TableBody,
1126
- Co as TableCell,
1127
- mo as TableHead,
1128
- xo as TableHeaderCell,
1129
- ko as TableRow,
1130
- fo as Tag,
1131
- bo as Toolbar,
1132
- po as Tooltip
1297
+ bo as AspectRatio,
1298
+ Me as Button,
1299
+ po as Card,
1300
+ he as Checkbox,
1301
+ Ro as Dialog,
1302
+ yo as Field,
1303
+ gt as IconAlertCircle,
1304
+ vt as IconAlertTriangle,
1305
+ Eo as IconArrowDown,
1306
+ Mo as IconArrowUpRight,
1307
+ X as IconButton,
1308
+ ft as IconCheck,
1309
+ ko as IconChevronDown,
1310
+ xo as IconChevronRight,
1311
+ ue as IconClose,
1312
+ jo as IconCopy,
1313
+ $o as IconEdit,
1314
+ So as IconExternalLink,
1315
+ zo as IconEye,
1316
+ Io as IconEyeOff,
1317
+ Ao as IconGitHub,
1318
+ pt as IconInfo,
1319
+ Do as IconInstagram,
1320
+ Wo as IconLinkedIn,
1321
+ To as IconLoader,
1322
+ wo as IconMinus,
1323
+ mo as IconPlus,
1324
+ Co as IconSearch,
1325
+ Bo as IconSettings,
1326
+ Lo as IconTrash,
1327
+ No as IconUser,
1328
+ Po as IconX,
1329
+ Ho as Input,
1330
+ Uo as Menu,
1331
+ _e as MenuContext,
1332
+ Yo as MenuItem,
1333
+ Zo as MenuSeparator,
1334
+ go as NavBar,
1335
+ tr as Pagination,
1336
+ vo as Panel,
1337
+ Vo as Select,
1338
+ qo as Switch,
1339
+ Go as Table,
1340
+ qn as TableBody,
1341
+ er as TableCell,
1342
+ Xo as TableHead,
1343
+ Qo as TableHeaderCell,
1344
+ Jo as TableRow,
1345
+ Fo as Tag,
1346
+ ve as Toast,
1347
+ ge as ToastContext,
1348
+ or as ToastProvider,
1349
+ ho as ToastRegion,
1350
+ Ko as Toolbar,
1351
+ Oo as Tooltip,
1352
+ nr as useToast
1133
1353
  };