@inertiaui/modal-react 0.19.3 → 0.19.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- var fn = Object.defineProperty;
2
- var mn = (e, t, n) => t in e ? fn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var q = (e, t, n) => mn(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var pn = Object.defineProperty;
2
+ var hn = (e, t, n) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var q = (e, t, n) => hn(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Ee from "react";
5
- import E, { createContext as H, useState as S, useEffect as M, useContext as R, useRef as O, createElement as Re, useMemo as C, forwardRef as dt, useImperativeHandle as St, useLayoutEffect as pn, useCallback as Y, Fragment as G, isValidElement as hn, cloneElement as vn, useId as Pe, useSyncExternalStore as gn, useReducer as wn, createRef as yn } from "react";
6
- import { jsx as T, jsxs as se, Fragment as ct } from "react/jsx-runtime";
5
+ import E, { createContext as H, useContext as R, useEffect as M, useRef as O, useState as S, createElement as Re, useMemo as C, forwardRef as ct, useImperativeHandle as Ft, useLayoutEffect as vn, useCallback as Y, Fragment as G, isValidElement as gn, cloneElement as wn, useId as Pe, useSyncExternalStore as xn, useReducer as yn, createRef as bn } from "react";
6
+ import { jsxs as se, Fragment as dt, jsx as T } from "react/jsx-runtime";
7
7
  import De from "axios";
8
- import { router as xe, usePage as xn } from "@inertiajs/react";
9
- import { mergeDataIntoQueryString as bn } from "@inertiajs/core";
10
- import { createPortal as En } from "react-dom";
8
+ import { router as ye, usePage as En } from "@inertiajs/react";
9
+ import { mergeDataIntoQueryString as $n } from "@inertiajs/core";
10
+ import { createPortal as Tn } from "react-dom";
11
11
  const ge = {
12
12
  type: "modal",
13
13
  navigate: !1,
@@ -28,7 +28,7 @@ const ge = {
28
28
  position: "right"
29
29
  }
30
30
  };
31
- class $n {
31
+ class On {
32
32
  constructor() {
33
33
  this.config = {}, this.reset();
34
34
  }
@@ -47,8 +47,8 @@ class $n {
47
47
  }
48
48
  const r = t.split(".");
49
49
  let l = this.config;
50
- for (let a = 0; a < r.length - 1; a++)
51
- l = l[r[a]] = l[r[a]] || {};
50
+ for (let o = 0; o < r.length - 1; o++)
51
+ l = l[r[o]] = l[r[o]] || {};
52
52
  l[r[r.length - 1]] = n;
53
53
  }
54
54
  get(t) {
@@ -64,61 +64,83 @@ class $n {
64
64
  return r;
65
65
  }
66
66
  }
67
- const _e = new $n(), Ll = () => _e.reset(), Sl = (e, t) => _e.put(e, t), ft = (e) => _e.get(e), de = (e, t) => _e.get(e ? `slideover.${t}` : `modal.${t}`);
68
- function Tn(e, t) {
67
+ const _e = new On(), Sl = () => _e.reset(), Fl = (e, t) => _e.put(e, t), ft = (e) => _e.get(e), ce = (e, t) => _e.get(e ? `slideover.${t}` : `modal.${t}`);
68
+ function Pn(e, t) {
69
69
  return e = typeof e == "string" ? new URL(e, window.location.origin) : e, t = typeof t == "string" ? new URL(t, window.location.origin) : t, `${e.origin}${e.pathname}` == `${t.origin}${t.pathname}`;
70
70
  }
71
71
  function et(e = "inertiaui_modal_") {
72
72
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `${e}${crypto.randomUUID()}` : `${e}${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
73
73
  }
74
- function On(e, t) {
75
- return Array.isArray(e) ? e.filter((n) => !t.includes(n)) : Object.keys(e).reduce((n, r) => (t.includes(r) || (n[r] = e[r]), n), {});
74
+ function Ct(e, t, n = !1) {
75
+ const r = (l) => typeof l == "string" ? l.toLowerCase() : l;
76
+ return n && (t = t.map(r)), Array.isArray(e) ? e.filter((l) => !t.includes(n ? r(l) : l)) : Object.keys(e).reduce((l, o) => (t.includes(n ? r(o) : o) || (l[o] = e[o]), l), {});
76
77
  }
77
- function Ft(e, t) {
78
+ function Nt(e, t) {
78
79
  return Array.isArray(e) ? e.filter((n) => t.includes(n)) : t.reduce((n, r) => (r in e && (n[r] = e[r]), n), {});
79
80
  }
80
- function Pn(e) {
81
+ function Mn(e) {
81
82
  return Array.isArray(e) ? e.filter((t) => t !== null) : Object.keys(e).reduce((t, n) => (n in e && e[n] !== null && (t[n] = e[n]), t), {});
82
83
  }
83
- function Mn(e, t = 3, n = 10) {
84
+ function Ln(e, t = 3, n = 10) {
84
85
  return new Promise((r, l) => {
85
- const a = e();
86
- if (a) {
87
- r(a);
86
+ const o = e();
87
+ if (o) {
88
+ r(o);
88
89
  return;
89
90
  }
90
- let o = t * 1e3 / n;
91
+ let a = t * 1e3 / n;
91
92
  const s = setInterval(() => {
92
93
  const i = e();
93
- i && (clearInterval(s), r(i)), --o <= 0 && (clearInterval(s), l(new Error("Condition not met in time")));
94
+ i && (clearInterval(s), r(i)), --a <= 0 && (clearInterval(s), l(new Error("Condition not met in time")));
94
95
  }, n);
95
96
  });
96
97
  }
97
98
  function we(e) {
98
99
  return e ? (e = e.replace(/_/g, "-"), e = e.replace(/-+/g, "-"), /[A-Z]/.test(e) ? (e = e.replace(/\s+/g, "").replace(/_/g, "").replace(/(?:^|\s|-)+([A-Za-z])/g, (t, n) => n.toUpperCase()), e = e.replace(/(.)(?=[A-Z])/g, "$1-"), e.toLowerCase()) : e) : "";
99
100
  }
101
+ function yt(e) {
102
+ return Ct(
103
+ e || {},
104
+ [
105
+ "name",
106
+ "slideover",
107
+ "closeButton",
108
+ "close-button",
109
+ "closeExplicitly",
110
+ "close-explicitly",
111
+ "maxWidth",
112
+ "max-width",
113
+ "paddingClasses",
114
+ "padding-classes",
115
+ "panelClasses",
116
+ "panel-classes",
117
+ "position"
118
+ ],
119
+ !0
120
+ );
121
+ }
100
122
  const Be = H(null);
101
123
  Be.displayName = "ModalStackContext";
102
- let Ct = null, kt = null, $e = null, rt = null, Ie = [], ce = {};
103
- const Ln = ({ children: e }) => {
104
- const [t, n] = S([]), [r, l] = S({}), a = (v) => {
124
+ let At = null, kt = null, $e = null, rt = null, Ie = [], de = {};
125
+ const Sn = ({ children: e }) => {
126
+ const [t, n] = S([]), [r, l] = S({}), o = (v) => {
105
127
  n((u) => {
106
128
  const m = v([...u]), p = (g) => {
107
- var x;
108
- return m.length < 2 ? !0 : ((x = m.map((h) => ({ id: h.id, shouldRender: h.shouldRender })).reverse().find((h) => h.shouldRender)) == null ? void 0 : x.id) === g;
129
+ var y;
130
+ return m.length < 2 ? !0 : ((y = m.map((h) => ({ id: h.id, shouldRender: h.shouldRender })).reverse().find((h) => h.shouldRender)) == null ? void 0 : y.id) === g;
109
131
  };
110
- return m.forEach((g, x) => {
111
- m[x].onTopOfStack = p(g.id), m[x].getParentModal = () => x < 1 ? null : m.slice(0, x).reverse().find((h) => h.isOpen), m[x].getChildModal = () => x === m.length - 1 ? null : m.slice(x + 1).find((h) => h.isOpen);
132
+ return m.forEach((g, y) => {
133
+ m[y].onTopOfStack = p(g.id), m[y].getParentModal = () => y < 1 ? null : m.slice(0, y).reverse().find((h) => h.isOpen), m[y].getChildModal = () => y === m.length - 1 ? null : m.slice(y + 1).find((h) => h.isOpen);
112
134
  }), m;
113
135
  });
114
136
  };
115
137
  M(() => {
116
138
  Ie = t;
117
139
  }, [t]);
118
- class o {
119
- constructor(u, m, p, g, x) {
140
+ class a {
141
+ constructor(u, m, p, g, y) {
120
142
  q(this, "show", () => {
121
- a(
143
+ o(
122
144
  (u) => u.map((m) => (m.id === this.id && !m.isOpen && (m.isOpen = !0, m.shouldRender = !0), m))
123
145
  );
124
146
  });
@@ -126,7 +148,7 @@ const Ln = ({ children: e }) => {
126
148
  u ? this.show() : this.close();
127
149
  });
128
150
  q(this, "close", () => {
129
- a(
151
+ o(
130
152
  (u) => u.map((m) => {
131
153
  var p;
132
154
  return m.id === this.id && m.isOpen && (Object.keys(m.listeners).forEach((g) => {
@@ -136,7 +158,7 @@ const Ln = ({ children: e }) => {
136
158
  );
137
159
  });
138
160
  q(this, "afterLeave", () => {
139
- this.isOpen || a((u) => {
161
+ this.isOpen || o((u) => {
140
162
  const m = u.map((p) => {
141
163
  var g;
142
164
  return p.id === this.id && !p.isOpen && (p.shouldRender = !1, (g = p.afterLeaveCallback) == null || g.call(p), p.afterLeaveCallback = null), p;
@@ -165,7 +187,7 @@ const Ln = ({ children: e }) => {
165
187
  q(this, "reload", (u = {}) => {
166
188
  var p;
167
189
  let m = Object.keys(this.response.props);
168
- u.only && (m = Ft(m, u.only)), u.except && (m = On(m, u.except)), (p = this.response) != null && p.url && De.get(this.response.url, {
190
+ u.only && (m = Nt(m, u.only)), u.except && (m = Ct(m, u.except)), (p = this.response) != null && p.url && De.get(this.response.url, {
169
191
  headers: {
170
192
  Accept: "text/html, application/xhtml+xml",
171
193
  "X-Inertia": !0,
@@ -181,19 +203,19 @@ const Ln = ({ children: e }) => {
181
203
  });
182
204
  });
183
205
  q(this, "updateProps", (u) => {
184
- Object.assign(this.props, u), a((m) => m);
206
+ Object.assign(this.props, yt(u)), o((m) => m);
185
207
  });
186
- if (this.id = m.id ?? et(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = u, this.props = m.props, this.response = m, this.config = p ?? {}, this.onCloseCallback = g, this.afterLeaveCallback = x, ce[this.id]) {
208
+ if (this.id = m.id ?? et(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = u, this.props = yt(m.props), this.response = m, this.config = p ?? {}, this.onCloseCallback = g, this.afterLeaveCallback = y, de[this.id]) {
187
209
  this.config = {
188
210
  ...this.config,
189
- ...ce[this.id].config ?? {}
211
+ ...de[this.id].config ?? {}
190
212
  };
191
- const h = ce[this.id].onClose, $ = ce[this.id].onAfterLeave;
213
+ const h = de[this.id].onClose, $ = de[this.id].onAfterLeave;
192
214
  h && (this.onCloseCallback = g ? () => {
193
215
  g(), h();
194
- } : h), $ && (this.afterLeaveCallback = x ? () => {
195
- x(), $();
196
- } : $), delete ce[this.id];
216
+ } : h), $ && (this.afterLeaveCallback = y ? () => {
217
+ y(), $();
218
+ } : $), delete de[this.id];
197
219
  }
198
220
  this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
199
221
  }
@@ -202,16 +224,16 @@ const Ln = ({ children: e }) => {
202
224
  }
203
225
  }
204
226
  const s = (v, u = {}, m = null, p = null) => kt(v.component).then((g) => i(g, v, u, m, p)), i = (v, u, m, p, g) => {
205
- const x = new o(v, u, m, p, g);
206
- return x.index = t.length, a((h) => [...h, x]), x.show(), x;
227
+ const y = new a(v, u, m, p, g);
228
+ return y.index = t.length, o((h) => [...h, y]), y.show(), y;
207
229
  };
208
- function d(v, u, m, p) {
230
+ function c(v, u, m, p) {
209
231
  if (!r[v])
210
232
  throw new Error(`The local modal "${v}" has not been registered.`);
211
233
  const g = i(null, {}, u, m, p);
212
234
  return g.name = v, r[v].callback(g), g;
213
235
  }
214
- const f = (v, u = {}) => y(
236
+ const f = (v, u = {}) => x(
215
237
  v,
216
238
  u.method ?? "get",
217
239
  u.data ?? {},
@@ -224,41 +246,41 @@ const Ln = ({ children: e }) => {
224
246
  ).then((m) => {
225
247
  const p = u.listeners ?? {};
226
248
  return Object.keys(p).forEach((g) => {
227
- const x = we(g);
228
- m.on(x, p[g]);
249
+ const y = we(g);
250
+ m.on(y, p[g]);
229
251
  }), m;
230
- }), y = (v, u, m = {}, p = {}, g = {}, x = null, h = null, $ = "brackets", F = !1) => {
252
+ }), x = (v, u, m = {}, p = {}, g = {}, y = null, h = null, $ = "brackets", F = !1) => {
231
253
  const j = et();
232
- return new Promise((_, N) => {
254
+ return new Promise((_, A) => {
233
255
  if (v.startsWith("#")) {
234
- _(d(v.substring(1), g, x, h));
256
+ _(c(v.substring(1), g, y, h));
235
257
  return;
236
258
  }
237
- const [U, B] = bn(u, v || "", m, $);
259
+ const [U, B] = $n(u, v || "", m, $);
238
260
  let X = F && t.length === 0;
239
261
  if (t.length === 0 && ($e = typeof window < "u" ? window.location.href : ""), p = {
240
262
  ...p,
241
263
  Accept: "text/html, application/xhtml+xml",
242
264
  "X-Requested-With": "XMLHttpRequest",
243
265
  "X-Inertia": !0,
244
- "X-Inertia-Version": Ct,
266
+ "X-Inertia-Version": At,
245
267
  "X-InertiaUI-Modal": j,
246
268
  "X-InertiaUI-Modal-Use-Router": X ? 1 : 0,
247
269
  "X-InertiaUI-Modal-Base-Url": $e
248
270
  }, X)
249
- return rt = null, ce[j] = {
271
+ return rt = null, de[j] = {
250
272
  config: g,
251
- onClose: x,
273
+ onClose: y,
252
274
  onAfterLeave: h
253
- }, xe.visit(U, {
275
+ }, ye.visit(U, {
254
276
  method: u,
255
277
  data: B,
256
278
  headers: p,
257
279
  preserveScroll: !0,
258
280
  preserveState: !0,
259
- onError: N,
281
+ onError: A,
260
282
  onFinish: () => {
261
- Mn(() => rt).then(_);
283
+ Ln(() => rt).then(_);
262
284
  }
263
285
  });
264
286
  De({
@@ -266,11 +288,11 @@ const Ln = ({ children: e }) => {
266
288
  method: u,
267
289
  data: B,
268
290
  headers: p
269
- }).then((P) => _(s(P.data, g, x, h))).catch((P) => {
270
- N(P);
291
+ }).then((P) => _(s(P.data, g, y, h))).catch((P) => {
292
+ A(P);
271
293
  });
272
294
  });
273
- }, c = {
295
+ }, d = {
274
296
  stack: t,
275
297
  localModals: r,
276
298
  push: i,
@@ -279,8 +301,8 @@ const Ln = ({ children: e }) => {
279
301
  closeAll: () => {
280
302
  Ie.reverse().forEach((v) => v.close());
281
303
  },
282
- reset: () => a(() => []),
283
- visit: y,
304
+ reset: () => o(() => []),
305
+ visit: x,
284
306
  visitModal: f,
285
307
  registerLocalModal: (v, u) => {
286
308
  l((m) => ({
@@ -295,37 +317,37 @@ const Ln = ({ children: e }) => {
295
317
  });
296
318
  }
297
319
  };
298
- return /* @__PURE__ */ T(Be.Provider, { value: c, children: e });
320
+ return /* @__PURE__ */ T(Be.Provider, { value: d, children: e });
299
321
  }, Xe = () => {
300
322
  const e = R(Be);
301
323
  if (e === null)
302
324
  throw new Error("useModalStack must be used within a ModalStackProvider");
303
325
  return e;
304
- }, xt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Sn = (e) => {
305
- e.initialPage && (Ct = e.initialPage.version), e.resolveComponent && (kt = e.resolveComponent);
306
- }, Fl = (e, t) => (Sn(t), /* @__PURE__ */ T(Ln, { children: /* @__PURE__ */ T(e, { ...t, children: ({ Component: r, props: l, key: a }) => /* @__PURE__ */ se(ct, { children: [
326
+ }, bt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Fn = (e) => {
327
+ e.initialPage && (At = e.initialPage.version), e.resolveComponent && (kt = e.resolveComponent);
328
+ }, Cl = (e, t) => (Fn(t), /* @__PURE__ */ T(Sn, { children: /* @__PURE__ */ T(e, { ...t, children: ({ Component: r, props: l, key: o }) => /* @__PURE__ */ se(dt, { children: [
307
329
  (() => {
308
- const s = Re(r, { key: a, ...l });
309
- return typeof r.layout == "function" ? r.layout(s) : Array.isArray(r.layout) ? r.layout.concat(s).reverse().reduce((d, f) => Re(f, l, d)) : s;
330
+ const s = Re(r, { key: o, ...l });
331
+ return typeof r.layout == "function" ? r.layout(s) : Array.isArray(r.layout) ? r.layout.concat(s).reverse().reduce((c, f) => Re(f, l, c)) : s;
310
332
  })(),
311
- /* @__PURE__ */ T(Fn, {})
312
- ] }) }) })), Fn = ({ children: e }) => {
333
+ /* @__PURE__ */ T(Cn, {})
334
+ ] }) }) })), Cn = ({ children: e }) => {
313
335
  var s;
314
336
  const t = R(Be);
315
337
  let n = !1, r = !1;
316
- M(() => xe.on("start", () => n = !0), []), M(() => xe.on("finish", () => n = !1), []), M(
317
- () => xe.on("navigate", function(i) {
318
- const d = i.detail.page.props._inertiaui_modal;
319
- if (!d) {
338
+ M(() => ye.on("start", () => n = !0), []), M(() => ye.on("finish", () => n = !1), []), M(
339
+ () => ye.on("navigate", function(i) {
340
+ const c = i.detail.page.props._inertiaui_modal;
341
+ if (!c) {
320
342
  r && t.closeAll();
321
343
  return;
322
344
  }
323
- r = d, $e = d.baseUrl, t.pushFromResponseData(d, {}, () => {
324
- if (!d.baseUrl) {
345
+ r = c, $e = c.baseUrl, t.pushFromResponseData(c, {}, () => {
346
+ if (!c.baseUrl) {
325
347
  console.error("No base url in modal response data so cannot navigate back");
326
348
  return;
327
349
  }
328
- !n && window.location.href !== d.baseUrl && xe.visit(d.baseUrl, {
350
+ !n && window.location.href !== c.baseUrl && ye.visit(c.baseUrl, {
329
351
  preserveScroll: !0,
330
352
  preserveState: !0
331
353
  });
@@ -337,23 +359,23 @@ const Ln = ({ children: e }) => {
337
359
  );
338
360
  const l = (i) => (Ie.length && (i.headers["X-InertiaUI-Modal-Base-Url"] = $e), i);
339
361
  M(() => (De.interceptors.request.use(l), () => De.interceptors.request.eject(l)), []);
340
- const a = xn(), o = O();
362
+ const o = En(), a = O();
341
363
  return M(() => {
342
- var f, y;
343
- const i = (f = a.props) == null ? void 0 : f._inertiaui_modal, d = o.current;
344
- o.current = i, i && d && i.component === d.component && Tn(i.url, d.url) && ((y = t.stack[0]) == null || y.updateProps(i.props ?? {}));
345
- }, [(s = a.props) == null ? void 0 : s._inertiaui_modal]), /* @__PURE__ */ se(ct, { children: [
364
+ var f, x;
365
+ const i = (f = o.props) == null ? void 0 : f._inertiaui_modal, c = a.current;
366
+ a.current = i, i && c && i.component === c.component && Pn(i.url, c.url) && ((x = t.stack[0]) == null || x.updateProps(i.props ?? {}));
367
+ }, [(s = o.props) == null ? void 0 : s._inertiaui_modal]), /* @__PURE__ */ se(dt, { children: [
346
368
  e,
347
- t.stack.length > 0 && /* @__PURE__ */ T(At, { index: 0 })
369
+ t.stack.length > 0 && /* @__PURE__ */ T(Rt, { index: 0 })
348
370
  ] });
349
371
  }, mt = E.createContext(null);
350
372
  mt.displayName = "ModalIndexContext";
351
- const Nt = () => {
373
+ const It = () => {
352
374
  const e = E.useContext(mt);
353
375
  if (e === void 0)
354
376
  throw new Error("useModalIndex must be used within a ModalIndexProvider");
355
377
  return e;
356
- }, At = ({ index: e }) => {
378
+ }, Rt = ({ index: e }) => {
357
379
  const { stack: t } = Xe(), n = C(() => t[e], [t, e]);
358
380
  return (n == null ? void 0 : n.component) && /* @__PURE__ */ T(mt.Provider, { value: e, children: /* @__PURE__ */ T(
359
381
  n.component,
@@ -362,44 +384,44 @@ const Nt = () => {
362
384
  onModalEvent: (...r) => n.emit(...r)
363
385
  }
364
386
  ) });
365
- }, It = dt(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: a = null, ...o }, s) => {
366
- const i = Nt(), { stack: d, registerLocalModal: f, removeLocalModal: y } = Xe(), [b, w] = S(null), c = C(() => e ? b : d[i], [e, b, i, d]), v = C(() => {
387
+ }, Dt = ct(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: o = null, ...a }, s) => {
388
+ const i = It(), { stack: c, registerLocalModal: f, removeLocalModal: x } = Xe(), [b, w] = S(null), d = C(() => e ? b : c[i], [e, b, i, c]), v = C(() => {
367
389
  var h;
368
- return (h = d.find(($) => $.shouldRender && $.index > (c == null ? void 0 : c.index))) == null ? void 0 : h.index;
369
- }, [i, d]), u = C(() => (c == null ? void 0 : c.config.slideover) ?? o.slideover ?? ft("type") === "slideover", [o.slideover]), m = C(
390
+ return (h = c.find(($) => $.shouldRender && $.index > (d == null ? void 0 : d.index))) == null ? void 0 : h.index;
391
+ }, [i, c]), u = C(() => (d == null ? void 0 : d.config.slideover) ?? a.slideover ?? ft("type") === "slideover", [a.slideover]), m = C(
370
392
  () => ({
371
393
  slideover: u,
372
- closeButton: o.closeButton ?? de(u, "closeButton"),
373
- closeExplicitly: o.closeExplicitly ?? de(u, "closeExplicitly"),
374
- maxWidth: o.maxWidth ?? de(u, "maxWidth"),
375
- paddingClasses: o.paddingClasses ?? de(u, "paddingClasses"),
376
- panelClasses: o.panelClasses ?? de(u, "panelClasses"),
377
- position: o.position ?? de(u, "position"),
378
- ...c == null ? void 0 : c.config
394
+ closeButton: a.closeButton ?? ce(u, "closeButton"),
395
+ closeExplicitly: a.closeExplicitly ?? ce(u, "closeExplicitly"),
396
+ maxWidth: a.maxWidth ?? ce(u, "maxWidth"),
397
+ paddingClasses: a.paddingClasses ?? ce(u, "paddingClasses"),
398
+ panelClasses: a.panelClasses ?? ce(u, "panelClasses"),
399
+ position: a.position ?? ce(u, "position"),
400
+ ...d == null ? void 0 : d.config
379
401
  }),
380
- [o, c == null ? void 0 : c.config]
402
+ [a, d == null ? void 0 : d.config]
381
403
  );
382
404
  M(() => {
383
405
  if (e) {
384
406
  let h = null;
385
407
  return f(e, ($) => {
386
- h = $.registerEventListenersFromProps(o), w($);
408
+ h = $.registerEventListenersFromProps(a), w($);
387
409
  }), () => {
388
- h == null || h(), h = null, y(e);
410
+ h == null || h(), h = null, x(e);
389
411
  };
390
412
  }
391
- return c.registerEventListenersFromProps(o);
413
+ return d.registerEventListenersFromProps(a);
392
414
  }, [e]);
393
- const p = O(c);
415
+ const p = O(d);
394
416
  M(() => {
395
- p.current = c;
396
- }, [c]), M(() => {
397
- c !== null && (c.isOpen ? a == null || a() : l == null || l());
398
- }, [c == null ? void 0 : c.isOpen]);
399
- const [g, x] = S(!1);
417
+ p.current = d;
418
+ }, [d]), M(() => {
419
+ d !== null && (d.isOpen ? o == null || o() : l == null || l());
420
+ }, [d == null ? void 0 : d.isOpen]);
421
+ const [g, y] = S(!1);
400
422
  return M(() => {
401
- g && c !== null && c.isOpen && (c.onTopOfStack ? n == null || n() : r == null || r()), x(!0);
402
- }, [c == null ? void 0 : c.onTopOfStack]), St(
423
+ g && d !== null && d.isOpen && (d.onTopOfStack ? n == null || n() : r == null || r()), y(!0);
424
+ }, [d == null ? void 0 : d.onTopOfStack]), Ft(
403
425
  s,
404
426
  () => ({
405
427
  afterLeave: () => {
@@ -458,43 +480,43 @@ const Nt = () => {
458
480
  return (h = p.current) == null ? void 0 : h.shouldRender;
459
481
  }
460
482
  }),
461
- [c]
462
- ), (c == null ? void 0 : c.shouldRender) && /* @__PURE__ */ se(ct, { children: [
483
+ [d]
484
+ ), (d == null ? void 0 : d.shouldRender) && /* @__PURE__ */ se(dt, { children: [
463
485
  typeof t == "function" ? t({
464
- afterLeave: c.afterLeave,
465
- close: c.close,
486
+ afterLeave: d.afterLeave,
487
+ close: d.close,
466
488
  config: m,
467
- emit: c.emit,
468
- getChildModal: c.getChildModal,
469
- getParentModal: c.getParentModal,
470
- id: c.id,
471
- index: c.index,
472
- isOpen: c.isOpen,
473
- modalContext: c,
474
- onTopOfStack: c.onTopOfStack,
475
- reload: c.reload,
476
- setOpen: c.setOpen,
477
- shouldRender: c.shouldRender
489
+ emit: d.emit,
490
+ getChildModal: d.getChildModal,
491
+ getParentModal: d.getParentModal,
492
+ id: d.id,
493
+ index: d.index,
494
+ isOpen: d.isOpen,
495
+ modalContext: d,
496
+ onTopOfStack: d.onTopOfStack,
497
+ reload: d.reload,
498
+ setOpen: d.setOpen,
499
+ shouldRender: d.shouldRender
478
500
  }) : t,
479
- v && /* @__PURE__ */ T(At, { index: v })
501
+ v && /* @__PURE__ */ T(Rt, { index: v })
480
502
  ] });
481
503
  });
482
- It.displayName = "HeadlessModal";
483
- function Rt(e) {
504
+ Dt.displayName = "HeadlessModal";
505
+ function jt(e) {
484
506
  var t, n, r = "";
485
507
  if (typeof e == "string" || typeof e == "number") r += e;
486
508
  else if (typeof e == "object") if (Array.isArray(e)) {
487
509
  var l = e.length;
488
- for (t = 0; t < l; t++) e[t] && (n = Rt(e[t])) && (r && (r += " "), r += n);
510
+ for (t = 0; t < l; t++) e[t] && (n = jt(e[t])) && (r && (r += " "), r += n);
489
511
  } else for (n in e) e[n] && (r && (r += " "), r += n);
490
512
  return r;
491
513
  }
492
514
  function je() {
493
- for (var e, t, n = 0, r = "", l = arguments.length; n < l; n++) (e = arguments[n]) && (t = Rt(e)) && (r && (r += " "), r += t);
515
+ for (var e, t, n = 0, r = "", l = arguments.length; n < l; n++) (e = arguments[n]) && (t = jt(e)) && (r && (r += " "), r += t);
494
516
  return r;
495
517
  }
496
- var Cn = Object.defineProperty, kn = (e, t, n) => t in e ? Cn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, tt = (e, t, n) => (kn(e, typeof t != "symbol" ? t + "" : t, n), n);
497
- let Nn = class {
518
+ var Nn = Object.defineProperty, An = (e, t, n) => t in e ? Nn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, tt = (e, t, n) => (An(e, typeof t != "symbol" ? t + "" : t, n), n);
519
+ let kn = class {
498
520
  constructor() {
499
521
  tt(this, "current", this.detect()), tt(this, "handoffState", "pending"), tt(this, "currentId", 0);
500
522
  }
@@ -522,9 +544,9 @@ let Nn = class {
522
544
  get isHandoffComplete() {
523
545
  return this.handoffState === "complete";
524
546
  }
525
- }, oe = new Nn();
547
+ }, ae = new kn();
526
548
  function Ve(e) {
527
- return oe.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
549
+ return ae.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
528
550
  }
529
551
  function qe(e) {
530
552
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
@@ -532,8 +554,8 @@ function qe(e) {
532
554
  }));
533
555
  }
534
556
  function re() {
535
- let e = [], t = { addEventListener(n, r, l, a) {
536
- return n.addEventListener(r, l, a), t.add(() => n.removeEventListener(r, l, a));
557
+ let e = [], t = { addEventListener(n, r, l, o) {
558
+ return n.addEventListener(r, l, o), t.add(() => n.removeEventListener(r, l, o));
537
559
  }, requestAnimationFrame(...n) {
538
560
  let r = requestAnimationFrame(...n);
539
561
  return t.add(() => cancelAnimationFrame(r));
@@ -550,9 +572,9 @@ function re() {
550
572
  r.current = !1;
551
573
  });
552
574
  }, style(n, r, l) {
553
- let a = n.style.getPropertyValue(r);
575
+ let o = n.style.getPropertyValue(r);
554
576
  return Object.assign(n.style, { [r]: l }), this.add(() => {
555
- Object.assign(n.style, { [r]: a });
577
+ Object.assign(n.style, { [r]: o });
556
578
  });
557
579
  }, group(n) {
558
580
  let r = re();
@@ -571,21 +593,21 @@ function pt() {
571
593
  let [e] = S(re);
572
594
  return M(() => () => e.dispose(), [e]), e;
573
595
  }
574
- let A = (e, t) => {
575
- oe.isServer ? M(e, t) : pn(e, t);
596
+ let k = (e, t) => {
597
+ ae.isServer ? M(e, t) : vn(e, t);
576
598
  };
577
599
  function ue(e) {
578
600
  let t = O(e);
579
- return A(() => {
601
+ return k(() => {
580
602
  t.current = e;
581
603
  }, [e]), t;
582
604
  }
583
605
  let L = function(e) {
584
606
  let t = ue(e);
585
607
  return E.useCallback((...n) => t.current(...n), [t]);
586
- }, An = H(void 0);
587
- function In() {
588
- return R(An);
608
+ }, In = H(void 0);
609
+ function Rn() {
610
+ return R(In);
589
611
  }
590
612
  function lt(...e) {
591
613
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
@@ -600,53 +622,53 @@ function ne(e, t, ...n) {
600
622
  }
601
623
  var Ue = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ue || {}), te = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(te || {});
602
624
  function W() {
603
- let e = Dn();
604
- return Y((t) => Rn({ mergeRefs: e, ...t }), [e]);
605
- }
606
- function Rn({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: l, visible: a = !0, name: o, mergeRefs: s }) {
607
- s = s ?? jn;
608
- let i = Dt(t, e);
609
- if (a) return Ae(i, n, r, o, s);
610
- let d = l ?? 0;
611
- if (d & 2) {
612
- let { static: f = !1, ...y } = i;
613
- if (f) return Ae(y, n, r, o, s);
625
+ let e = jn();
626
+ return Y((t) => Dn({ mergeRefs: e, ...t }), [e]);
627
+ }
628
+ function Dn({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: l, visible: o = !0, name: a, mergeRefs: s }) {
629
+ s = s ?? Un;
630
+ let i = Ut(t, e);
631
+ if (o) return ke(i, n, r, a, s);
632
+ let c = l ?? 0;
633
+ if (c & 2) {
634
+ let { static: f = !1, ...x } = i;
635
+ if (f) return ke(x, n, r, a, s);
614
636
  }
615
- if (d & 1) {
616
- let { unmount: f = !0, ...y } = i;
637
+ if (c & 1) {
638
+ let { unmount: f = !0, ...x } = i;
617
639
  return ne(f ? 0 : 1, { 0() {
618
640
  return null;
619
641
  }, 1() {
620
- return Ae({ ...y, hidden: !0, style: { display: "none" } }, n, r, o, s);
642
+ return ke({ ...x, hidden: !0, style: { display: "none" } }, n, r, a, s);
621
643
  } });
622
644
  }
623
- return Ae(i, n, r, o, s);
645
+ return ke(i, n, r, a, s);
624
646
  }
625
- function Ae(e, t = {}, n, r, l) {
626
- let { as: a = n, children: o, refName: s = "ref", ...i } = nt(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [s]: e.ref } : {}, f = typeof o == "function" ? o(t) : o;
647
+ function ke(e, t = {}, n, r, l) {
648
+ let { as: o = n, children: a, refName: s = "ref", ...i } = nt(e, ["unmount", "static"]), c = e.ref !== void 0 ? { [s]: e.ref } : {}, f = typeof a == "function" ? a(t) : a;
627
649
  "className" in i && i.className && typeof i.className == "function" && (i.className = i.className(t)), i["aria-labelledby"] && i["aria-labelledby"] === i.id && (i["aria-labelledby"] = void 0);
628
- let y = {};
650
+ let x = {};
629
651
  if (t) {
630
652
  let b = !1, w = [];
631
- for (let [c, v] of Object.entries(t)) typeof v == "boolean" && (b = !0), v === !0 && w.push(c.replace(/([A-Z])/g, (u) => `-${u.toLowerCase()}`));
653
+ for (let [d, v] of Object.entries(t)) typeof v == "boolean" && (b = !0), v === !0 && w.push(d.replace(/([A-Z])/g, (u) => `-${u.toLowerCase()}`));
632
654
  if (b) {
633
- y["data-headlessui-state"] = w.join(" ");
634
- for (let c of w) y[`data-${c}`] = "";
655
+ x["data-headlessui-state"] = w.join(" ");
656
+ for (let d of w) x[`data-${d}`] = "";
635
657
  }
636
658
  }
637
- if (a === G && (Object.keys(le(i)).length > 0 || Object.keys(le(y)).length > 0)) if (!hn(f) || Array.isArray(f) && f.length > 1) {
638
- if (Object.keys(le(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(le(i)).concat(Object.keys(le(y))).map((b) => ` - ${b}`).join(`
659
+ if (o === G && (Object.keys(le(i)).length > 0 || Object.keys(le(x)).length > 0)) if (!gn(f) || Array.isArray(f) && f.length > 1) {
660
+ if (Object.keys(le(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(le(i)).concat(Object.keys(le(x))).map((b) => ` - ${b}`).join(`
639
661
  `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((b) => ` - ${b}`).join(`
640
662
  `)].join(`
641
663
  `));
642
664
  } else {
643
- let b = f.props, w = b == null ? void 0 : b.className, c = typeof w == "function" ? (...m) => lt(w(...m), i.className) : lt(w, i.className), v = c ? { className: c } : {}, u = Dt(f.props, le(nt(i, ["ref"])));
644
- for (let m in y) m in u && delete y[m];
645
- return vn(f, Object.assign({}, u, y, d, { ref: l(Un(f), d.ref) }, v));
665
+ let b = f.props, w = b == null ? void 0 : b.className, d = typeof w == "function" ? (...m) => lt(w(...m), i.className) : lt(w, i.className), v = d ? { className: d } : {}, u = Ut(f.props, le(nt(i, ["ref"])));
666
+ for (let m in x) m in u && delete x[m];
667
+ return wn(f, Object.assign({}, u, x, c, { ref: l(Hn(f), c.ref) }, v));
646
668
  }
647
- return Re(a, Object.assign({}, nt(i, ["ref"]), a !== G && d, a !== G && y), f);
669
+ return Re(o, Object.assign({}, nt(i, ["ref"]), o !== G && c, o !== G && x), f);
648
670
  }
649
- function Dn() {
671
+ function jn() {
650
672
  let e = O([]), t = Y((n) => {
651
673
  for (let r of e.current) r != null && (typeof r == "function" ? r(n) : r.current = n);
652
674
  }, []);
@@ -654,32 +676,32 @@ function Dn() {
654
676
  if (!n.every((r) => r == null)) return e.current = n, t;
655
677
  };
656
678
  }
657
- function jn(...e) {
679
+ function Un(...e) {
658
680
  return e.every((t) => t == null) ? void 0 : (t) => {
659
681
  for (let n of e) n != null && (typeof n == "function" ? n(t) : n.current = t);
660
682
  };
661
683
  }
662
- function Dt(...e) {
684
+ function Ut(...e) {
663
685
  if (e.length === 0) return {};
664
686
  if (e.length === 1) return e[0];
665
687
  let t = {}, n = {};
666
688
  for (let r of e) for (let l in r) l.startsWith("on") && typeof r[l] == "function" ? (n[l] != null || (n[l] = []), n[l].push(r[l])) : t[l] = r[l];
667
689
  if (t.disabled || t["aria-disabled"]) for (let r in n) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r) && (n[r] = [(l) => {
668
- var a;
669
- return (a = l == null ? void 0 : l.preventDefault) == null ? void 0 : a.call(l);
690
+ var o;
691
+ return (o = l == null ? void 0 : l.preventDefault) == null ? void 0 : o.call(l);
670
692
  }]);
671
- for (let r in n) Object.assign(t, { [r](l, ...a) {
672
- let o = n[r];
673
- for (let s of o) {
693
+ for (let r in n) Object.assign(t, { [r](l, ...o) {
694
+ let a = n[r];
695
+ for (let s of a) {
674
696
  if ((l instanceof Event || (l == null ? void 0 : l.nativeEvent) instanceof Event) && l.defaultPrevented) return;
675
- s(l, ...a);
697
+ s(l, ...o);
676
698
  }
677
699
  } });
678
700
  return t;
679
701
  }
680
702
  function D(e) {
681
703
  var t;
682
- return Object.assign(dt(e), { displayName: (t = e.displayName) != null ? t : e.name });
704
+ return Object.assign(ct(e), { displayName: (t = e.displayName) != null ? t : e.name });
683
705
  }
684
706
  function le(e) {
685
707
  let t = Object.assign({}, e);
@@ -691,19 +713,19 @@ function nt(e, t = []) {
691
713
  for (let r of t) r in n && delete n[r];
692
714
  return n;
693
715
  }
694
- function Un(e) {
716
+ function Hn(e) {
695
717
  return E.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
696
718
  }
697
- let Hn = "span";
719
+ let Wn = "span";
698
720
  var He = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(He || {});
699
- function Wn(e, t) {
721
+ function _n(e, t) {
700
722
  var n;
701
- let { features: r = 1, ...l } = e, a = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = l["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
702
- return W()({ ourProps: a, theirProps: l, slot: {}, defaultTag: Hn, name: "Hidden" });
723
+ let { features: r = 1, ...l } = e, o = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = l["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
724
+ return W()({ ourProps: o, theirProps: l, slot: {}, defaultTag: Wn, name: "Hidden" });
703
725
  }
704
- let it = D(Wn), jt = Symbol();
705
- function _n(e, t = !0) {
706
- return Object.assign(e, { [jt]: t });
726
+ let it = D(_n), Ht = Symbol();
727
+ function Bn(e, t = !0) {
728
+ return Object.assign(e, { [Ht]: t });
707
729
  }
708
730
  function Z(...e) {
709
731
  let t = O(e);
@@ -713,43 +735,43 @@ function Z(...e) {
713
735
  let n = L((r) => {
714
736
  for (let l of t.current) l != null && (typeof l == "function" ? l(r) : l.current = r);
715
737
  });
716
- return e.every((r) => r == null || (r == null ? void 0 : r[jt])) ? void 0 : n;
738
+ return e.every((r) => r == null || (r == null ? void 0 : r[Ht])) ? void 0 : n;
717
739
  }
718
740
  let ht = H(null);
719
741
  ht.displayName = "DescriptionContext";
720
- function Ut() {
742
+ function Wt() {
721
743
  let e = R(ht);
722
744
  if (e === null) {
723
745
  let t = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
724
- throw Error.captureStackTrace && Error.captureStackTrace(t, Ut), t;
746
+ throw Error.captureStackTrace && Error.captureStackTrace(t, Wt), t;
725
747
  }
726
748
  return e;
727
749
  }
728
- function Bn() {
750
+ function Xn() {
729
751
  let [e, t] = S([]);
730
752
  return [e.length > 0 ? e.join(" ") : void 0, C(() => function(n) {
731
- let r = L((a) => (t((o) => [...o, a]), () => t((o) => {
732
- let s = o.slice(), i = s.indexOf(a);
753
+ let r = L((o) => (t((a) => [...a, o]), () => t((a) => {
754
+ let s = a.slice(), i = s.indexOf(o);
733
755
  return i !== -1 && s.splice(i, 1), s;
734
756
  }))), l = C(() => ({ register: r, slot: n.slot, name: n.name, props: n.props, value: n.value }), [r, n.slot, n.name, n.props, n.value]);
735
757
  return E.createElement(ht.Provider, { value: l }, n.children);
736
758
  }, [t])];
737
759
  }
738
- let Xn = "p";
739
- function Vn(e, t) {
740
- let n = Pe(), r = In(), { id: l = `headlessui-description-${n}`, ...a } = e, o = Ut(), s = Z(t);
741
- A(() => o.register(l), [l, o.register]);
742
- let i = r || !1, d = C(() => ({ ...o.slot, disabled: i }), [o.slot, i]), f = { ref: s, ...o.props, id: l };
743
- return W()({ ourProps: f, theirProps: a, slot: d, defaultTag: Xn, name: o.name || "Description" });
760
+ let Vn = "p";
761
+ function qn(e, t) {
762
+ let n = Pe(), r = Rn(), { id: l = `headlessui-description-${n}`, ...o } = e, a = Wt(), s = Z(t);
763
+ k(() => a.register(l), [l, a.register]);
764
+ let i = r || !1, c = C(() => ({ ...a.slot, disabled: i }), [a.slot, i]), f = { ref: s, ...a.props, id: l };
765
+ return W()({ ourProps: f, theirProps: o, slot: c, defaultTag: Vn, name: a.name || "Description" });
744
766
  }
745
- let qn = D(Vn), Yn = Object.assign(qn, {});
746
- var Ht = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Ht || {});
747
- let zn = H(() => {
767
+ let Yn = D(qn), zn = Object.assign(Yn, {});
768
+ var _t = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(_t || {});
769
+ let Gn = H(() => {
748
770
  });
749
- function Gn({ value: e, children: t }) {
750
- return E.createElement(zn.Provider, { value: e }, t);
771
+ function Kn({ value: e, children: t }) {
772
+ return E.createElement(Gn.Provider, { value: e }, t);
751
773
  }
752
- let Kn = class extends Map {
774
+ let Zn = class extends Map {
753
775
  constructor(t) {
754
776
  super(), this.factory = t;
755
777
  }
@@ -758,21 +780,21 @@ let Kn = class extends Map {
758
780
  return n === void 0 && (n = this.factory(t), this.set(t, n)), n;
759
781
  }
760
782
  };
761
- function Wt(e, t) {
783
+ function Bt(e, t) {
762
784
  let n = e(), r = /* @__PURE__ */ new Set();
763
785
  return { getSnapshot() {
764
786
  return n;
765
787
  }, subscribe(l) {
766
788
  return r.add(l), () => r.delete(l);
767
- }, dispatch(l, ...a) {
768
- let o = t[l].call(n, ...a);
769
- o && (n = o, r.forEach((s) => s()));
789
+ }, dispatch(l, ...o) {
790
+ let a = t[l].call(n, ...o);
791
+ a && (n = a, r.forEach((s) => s()));
770
792
  } };
771
793
  }
772
- function _t(e) {
773
- return gn(e.subscribe, e.getSnapshot, e.getSnapshot);
794
+ function Xt(e) {
795
+ return xn(e.subscribe, e.getSnapshot, e.getSnapshot);
774
796
  }
775
- let Zn = new Kn(() => Wt(() => [], { ADD(e) {
797
+ let Jn = new Zn(() => Bt(() => [], { ADD(e) {
776
798
  return this.includes(e) ? this : [...this, e];
777
799
  }, REMOVE(e) {
778
800
  let t = this.indexOf(e);
@@ -781,78 +803,78 @@ let Zn = new Kn(() => Wt(() => [], { ADD(e) {
781
803
  return n.splice(t, 1), n;
782
804
  } }));
783
805
  function fe(e, t) {
784
- let n = Zn.get(t), r = Pe(), l = _t(n);
785
- if (A(() => {
806
+ let n = Jn.get(t), r = Pe(), l = Xt(n);
807
+ if (k(() => {
786
808
  if (e) return n.dispatch("ADD", r), () => n.dispatch("REMOVE", r);
787
809
  }, [n, e]), !e) return !1;
788
- let a = l.indexOf(r), o = l.length;
789
- return a === -1 && (a = o, o += 1), a === o - 1;
810
+ let o = l.indexOf(r), a = l.length;
811
+ return o === -1 && (o = a, a += 1), o === a - 1;
790
812
  }
791
- let at = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
792
- function bt(e) {
813
+ let ot = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
814
+ function Et(e) {
793
815
  var t;
794
816
  let n = (t = Te.get(e)) != null ? t : 0;
795
- return Te.set(e, n + 1), n !== 0 ? () => Et(e) : (at.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => Et(e));
817
+ return Te.set(e, n + 1), n !== 0 ? () => $t(e) : (ot.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => $t(e));
796
818
  }
797
- function Et(e) {
819
+ function $t(e) {
798
820
  var t;
799
821
  let n = (t = Te.get(e)) != null ? t : 1;
800
822
  if (n === 1 ? Te.delete(e) : Te.set(e, n - 1), n !== 1) return;
801
- let r = at.get(e);
802
- r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert, at.delete(e));
823
+ let r = ot.get(e);
824
+ r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert, ot.delete(e));
803
825
  }
804
- function Jn(e, { allowed: t, disallowed: n } = {}) {
826
+ function Qn(e, { allowed: t, disallowed: n } = {}) {
805
827
  let r = fe(e, "inert-others");
806
- A(() => {
807
- var l, a;
828
+ k(() => {
829
+ var l, o;
808
830
  if (!r) return;
809
- let o = re();
810
- for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i && o.add(bt(i));
811
- let s = (a = t == null ? void 0 : t()) != null ? a : [];
831
+ let a = re();
832
+ for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i && a.add(Et(i));
833
+ let s = (o = t == null ? void 0 : t()) != null ? o : [];
812
834
  for (let i of s) {
813
835
  if (!i) continue;
814
- let d = Ve(i);
815
- if (!d) continue;
836
+ let c = Ve(i);
837
+ if (!c) continue;
816
838
  let f = i.parentElement;
817
- for (; f && f !== d.body; ) {
818
- for (let y of f.children) s.some((b) => y.contains(b)) || o.add(bt(y));
839
+ for (; f && f !== c.body; ) {
840
+ for (let x of f.children) s.some((b) => x.contains(b)) || a.add(Et(x));
819
841
  f = f.parentElement;
820
842
  }
821
843
  }
822
- return o.dispose;
844
+ return a.dispose;
823
845
  }, [r, t, n]);
824
846
  }
825
- function Qn(e, t, n) {
847
+ function er(e, t, n) {
826
848
  let r = ue((l) => {
827
- let a = l.getBoundingClientRect();
828
- a.x === 0 && a.y === 0 && a.width === 0 && a.height === 0 && n();
849
+ let o = l.getBoundingClientRect();
850
+ o.x === 0 && o.y === 0 && o.width === 0 && o.height === 0 && n();
829
851
  });
830
852
  M(() => {
831
853
  if (!e) return;
832
854
  let l = t === null ? null : t instanceof HTMLElement ? t : t.current;
833
855
  if (!l) return;
834
- let a = re();
856
+ let o = re();
835
857
  if (typeof ResizeObserver < "u") {
836
- let o = new ResizeObserver(() => r.current(l));
837
- o.observe(l), a.add(() => o.disconnect());
858
+ let a = new ResizeObserver(() => r.current(l));
859
+ a.observe(l), o.add(() => a.disconnect());
838
860
  }
839
861
  if (typeof IntersectionObserver < "u") {
840
- let o = new IntersectionObserver(() => r.current(l));
841
- o.observe(l), a.add(() => o.disconnect());
862
+ let a = new IntersectionObserver(() => r.current(l));
863
+ a.observe(l), o.add(() => a.disconnect());
842
864
  }
843
- return () => a.dispose();
865
+ return () => o.dispose();
844
866
  }, [t, r, e]);
845
867
  }
846
- let We = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), er = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
847
- var J = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(J || {}), ot = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(ot || {}), tr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(tr || {});
848
- function nr(e = document.body) {
868
+ let We = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), tr = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
869
+ var J = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(J || {}), at = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(at || {}), nr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(nr || {});
870
+ function rr(e = document.body) {
849
871
  return e == null ? [] : Array.from(e.querySelectorAll(We)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
850
872
  }
851
- function rr(e = document.body) {
852
- return e == null ? [] : Array.from(e.querySelectorAll(er)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
873
+ function lr(e = document.body) {
874
+ return e == null ? [] : Array.from(e.querySelectorAll(tr)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
853
875
  }
854
- var Bt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Bt || {});
855
- function lr(e, t = 0) {
876
+ var Vt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Vt || {});
877
+ function ir(e, t = 0) {
856
878
  var n;
857
879
  return e === ((n = Ve(e)) == null ? void 0 : n.body) ? !1 : ne(t, { 0() {
858
880
  return e.matches(We);
@@ -865,7 +887,7 @@ function lr(e, t = 0) {
865
887
  return !1;
866
888
  } });
867
889
  }
868
- var ir = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(ir || {});
890
+ var or = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(or || {});
869
891
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
870
892
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
871
893
  }, !0), document.addEventListener("click", (e) => {
@@ -875,130 +897,130 @@ function Q(e) {
875
897
  e == null || e.focus({ preventScroll: !0 });
876
898
  }
877
899
  let ar = ["textarea", "input"].join(",");
878
- function or(e) {
900
+ function sr(e) {
879
901
  var t, n;
880
902
  return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, ar)) != null ? n : !1;
881
903
  }
882
- function sr(e, t = (n) => n) {
904
+ function ur(e, t = (n) => n) {
883
905
  return e.slice().sort((n, r) => {
884
- let l = t(n), a = t(r);
885
- if (l === null || a === null) return 0;
886
- let o = l.compareDocumentPosition(a);
887
- return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
906
+ let l = t(n), o = t(r);
907
+ if (l === null || o === null) return 0;
908
+ let a = l.compareDocumentPosition(o);
909
+ return a & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : a & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
888
910
  });
889
911
  }
890
912
  function Oe(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: l = [] } = {}) {
891
- let a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, o = Array.isArray(e) ? n ? sr(e) : e : t & 64 ? rr(e) : nr(e);
892
- l.length > 0 && o.length > 1 && (o = o.filter((w) => !l.some((c) => c != null && "current" in c ? (c == null ? void 0 : c.current) === w : c === w))), r = r ?? a.activeElement;
913
+ let o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, a = Array.isArray(e) ? n ? ur(e) : e : t & 64 ? lr(e) : rr(e);
914
+ l.length > 0 && a.length > 1 && (a = a.filter((w) => !l.some((d) => d != null && "current" in d ? (d == null ? void 0 : d.current) === w : d === w))), r = r ?? o.activeElement;
893
915
  let s = (() => {
894
916
  if (t & 5) return 1;
895
917
  if (t & 10) return -1;
896
918
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
897
919
  })(), i = (() => {
898
920
  if (t & 1) return 0;
899
- if (t & 2) return Math.max(0, o.indexOf(r)) - 1;
900
- if (t & 4) return Math.max(0, o.indexOf(r)) + 1;
901
- if (t & 8) return o.length - 1;
921
+ if (t & 2) return Math.max(0, a.indexOf(r)) - 1;
922
+ if (t & 4) return Math.max(0, a.indexOf(r)) + 1;
923
+ if (t & 8) return a.length - 1;
902
924
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
903
- })(), d = t & 32 ? { preventScroll: !0 } : {}, f = 0, y = o.length, b;
925
+ })(), c = t & 32 ? { preventScroll: !0 } : {}, f = 0, x = a.length, b;
904
926
  do {
905
- if (f >= y || f + y <= 0) return 0;
927
+ if (f >= x || f + x <= 0) return 0;
906
928
  let w = i + f;
907
- if (t & 16) w = (w + y) % y;
929
+ if (t & 16) w = (w + x) % x;
908
930
  else {
909
931
  if (w < 0) return 3;
910
- if (w >= y) return 1;
932
+ if (w >= x) return 1;
911
933
  }
912
- b = o[w], b == null || b.focus(d), f += s;
913
- } while (b !== a.activeElement);
914
- return t & 6 && or(b) && b.select(), 2;
934
+ b = a[w], b == null || b.focus(c), f += s;
935
+ } while (b !== o.activeElement);
936
+ return t & 6 && sr(b) && b.select(), 2;
915
937
  }
916
- function Xt() {
938
+ function qt() {
917
939
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
918
940
  }
919
- function ur() {
941
+ function cr() {
920
942
  return /Android/gi.test(window.navigator.userAgent);
921
943
  }
922
944
  function dr() {
923
- return Xt() || ur();
945
+ return qt() || cr();
924
946
  }
925
- function ye(e, t, n, r) {
947
+ function xe(e, t, n, r) {
926
948
  let l = ue(n);
927
949
  M(() => {
928
950
  if (!e) return;
929
- function a(o) {
930
- l.current(o);
951
+ function o(a) {
952
+ l.current(a);
931
953
  }
932
- return document.addEventListener(t, a, r), () => document.removeEventListener(t, a, r);
954
+ return document.addEventListener(t, o, r), () => document.removeEventListener(t, o, r);
933
955
  }, [e, t, r]);
934
956
  }
935
- function Vt(e, t, n, r) {
957
+ function Yt(e, t, n, r) {
936
958
  let l = ue(n);
937
959
  M(() => {
938
960
  if (!e) return;
939
- function a(o) {
940
- l.current(o);
961
+ function o(a) {
962
+ l.current(a);
941
963
  }
942
- return window.addEventListener(t, a, r), () => window.removeEventListener(t, a, r);
964
+ return window.addEventListener(t, o, r), () => window.removeEventListener(t, o, r);
943
965
  }, [e, t, r]);
944
966
  }
945
- const $t = 30;
946
- function cr(e, t, n) {
947
- let r = fe(e, "outside-click"), l = ue(n), a = Y(function(i, d) {
967
+ const Tt = 30;
968
+ function fr(e, t, n) {
969
+ let r = fe(e, "outside-click"), l = ue(n), o = Y(function(i, c) {
948
970
  if (i.defaultPrevented) return;
949
- let f = d(i);
971
+ let f = c(i);
950
972
  if (f === null || !f.getRootNode().contains(f) || !f.isConnected) return;
951
- let y = function b(w) {
973
+ let x = function b(w) {
952
974
  return typeof w == "function" ? b(w()) : Array.isArray(w) || w instanceof Set ? w : [w];
953
975
  }(t);
954
- for (let b of y) if (b !== null && (b.contains(f) || i.composed && i.composedPath().includes(b))) return;
955
- return !lr(f, Bt.Loose) && f.tabIndex !== -1 && i.preventDefault(), l.current(i, f);
956
- }, [l, t]), o = O(null);
957
- ye(r, "pointerdown", (i) => {
958
- var d, f;
959
- o.current = ((f = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : f[0]) || i.target;
960
- }, !0), ye(r, "mousedown", (i) => {
961
- var d, f;
962
- o.current = ((f = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : f[0]) || i.target;
963
- }, !0), ye(r, "click", (i) => {
964
- dr() || o.current && (a(i, () => o.current), o.current = null);
976
+ for (let b of x) if (b !== null && (b.contains(f) || i.composed && i.composedPath().includes(b))) return;
977
+ return !ir(f, Vt.Loose) && f.tabIndex !== -1 && i.preventDefault(), l.current(i, f);
978
+ }, [l, t]), a = O(null);
979
+ xe(r, "pointerdown", (i) => {
980
+ var c, f;
981
+ a.current = ((f = (c = i.composedPath) == null ? void 0 : c.call(i)) == null ? void 0 : f[0]) || i.target;
982
+ }, !0), xe(r, "mousedown", (i) => {
983
+ var c, f;
984
+ a.current = ((f = (c = i.composedPath) == null ? void 0 : c.call(i)) == null ? void 0 : f[0]) || i.target;
985
+ }, !0), xe(r, "click", (i) => {
986
+ dr() || a.current && (o(i, () => a.current), a.current = null);
965
987
  }, !0);
966
988
  let s = O({ x: 0, y: 0 });
967
- ye(r, "touchstart", (i) => {
989
+ xe(r, "touchstart", (i) => {
968
990
  s.current.x = i.touches[0].clientX, s.current.y = i.touches[0].clientY;
969
- }, !0), ye(r, "touchend", (i) => {
970
- let d = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
971
- if (!(Math.abs(d.x - s.current.x) >= $t || Math.abs(d.y - s.current.y) >= $t)) return a(i, () => i.target instanceof HTMLElement ? i.target : null);
972
- }, !0), Vt(r, "blur", (i) => a(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
991
+ }, !0), xe(r, "touchend", (i) => {
992
+ let c = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
993
+ if (!(Math.abs(c.x - s.current.x) >= Tt || Math.abs(c.y - s.current.y) >= Tt)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
994
+ }, !0), Yt(r, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
973
995
  }
974
996
  function Me(...e) {
975
997
  return C(() => Ve(...e), [...e]);
976
998
  }
977
- function qt(e, t, n, r) {
999
+ function zt(e, t, n, r) {
978
1000
  let l = ue(n);
979
1001
  M(() => {
980
1002
  e = e ?? window;
981
- function a(o) {
982
- l.current(o);
1003
+ function o(a) {
1004
+ l.current(a);
983
1005
  }
984
- return e.addEventListener(t, a, r), () => e.removeEventListener(t, a, r);
1006
+ return e.addEventListener(t, o, r), () => e.removeEventListener(t, o, r);
985
1007
  }, [e, t, r]);
986
1008
  }
987
- function fr() {
1009
+ function mr() {
988
1010
  let e;
989
1011
  return { before({ doc: t }) {
990
1012
  var n;
991
1013
  let r = t.documentElement, l = (n = t.defaultView) != null ? n : window;
992
1014
  e = Math.max(0, l.innerWidth - r.clientWidth);
993
1015
  }, after({ doc: t, d: n }) {
994
- let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth), a = Math.max(0, e - l);
995
- n.style(r, "paddingRight", `${a}px`);
1016
+ let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth), o = Math.max(0, e - l);
1017
+ n.style(r, "paddingRight", `${o}px`);
996
1018
  } };
997
1019
  }
998
- function mr() {
999
- return Xt() ? { before({ doc: e, d: t, meta: n }) {
1020
+ function pr() {
1021
+ return qt() ? { before({ doc: e, d: t, meta: n }) {
1000
1022
  function r(l) {
1001
- return n.containers.flatMap((a) => a()).some((a) => a.contains(l));
1023
+ return n.containers.flatMap((o) => o()).some((o) => o.contains(l));
1002
1024
  }
1003
1025
  t.microTask(() => {
1004
1026
  var l;
@@ -1006,13 +1028,13 @@ function mr() {
1006
1028
  let s = re();
1007
1029
  s.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => s.dispose()));
1008
1030
  }
1009
- let a = (l = window.scrollY) != null ? l : window.pageYOffset, o = null;
1031
+ let o = (l = window.scrollY) != null ? l : window.pageYOffset, a = null;
1010
1032
  t.addEventListener(e, "click", (s) => {
1011
1033
  if (s.target instanceof HTMLElement) try {
1012
1034
  let i = s.target.closest("a");
1013
1035
  if (!i) return;
1014
- let { hash: d } = new URL(i.href), f = e.querySelector(d);
1015
- f && !r(f) && (o = f);
1036
+ let { hash: c } = new URL(i.href), f = e.querySelector(c);
1037
+ f && !r(f) && (a = f);
1016
1038
  } catch {
1017
1039
  }
1018
1040
  }, !0), t.addEventListener(e, "touchstart", (s) => {
@@ -1033,22 +1055,22 @@ function mr() {
1033
1055
  }, { passive: !1 }), t.add(() => {
1034
1056
  var s;
1035
1057
  let i = (s = window.scrollY) != null ? s : window.pageYOffset;
1036
- a !== i && window.scrollTo(0, a), o && o.isConnected && (o.scrollIntoView({ block: "nearest" }), o = null);
1058
+ o !== i && window.scrollTo(0, o), a && a.isConnected && (a.scrollIntoView({ block: "nearest" }), a = null);
1037
1059
  });
1038
1060
  });
1039
1061
  } } : {};
1040
1062
  }
1041
- function pr() {
1063
+ function hr() {
1042
1064
  return { before({ doc: e, d: t }) {
1043
1065
  t.style(e.documentElement, "overflow", "hidden");
1044
1066
  } };
1045
1067
  }
1046
- function hr(e) {
1068
+ function vr(e) {
1047
1069
  let t = {};
1048
1070
  for (let n of e) Object.assign(t, n(t));
1049
1071
  return t;
1050
1072
  }
1051
- let ae = Wt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1073
+ let oe = Bt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1052
1074
  var n;
1053
1075
  let r = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: re(), meta: /* @__PURE__ */ new Set() };
1054
1076
  return r.count++, r.meta.add(t), this.set(e, r), this;
@@ -1056,91 +1078,91 @@ let ae = Wt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1056
1078
  let n = this.get(e);
1057
1079
  return n && (n.count--, n.meta.delete(t)), this;
1058
1080
  }, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
1059
- let r = { doc: e, d: t, meta: hr(n) }, l = [mr(), fr(), pr()];
1060
- l.forEach(({ before: a }) => a == null ? void 0 : a(r)), l.forEach(({ after: a }) => a == null ? void 0 : a(r));
1081
+ let r = { doc: e, d: t, meta: vr(n) }, l = [pr(), mr(), hr()];
1082
+ l.forEach(({ before: o }) => o == null ? void 0 : o(r)), l.forEach(({ after: o }) => o == null ? void 0 : o(r));
1061
1083
  }, SCROLL_ALLOW({ d: e }) {
1062
1084
  e.dispose();
1063
1085
  }, TEARDOWN({ doc: e }) {
1064
1086
  this.delete(e);
1065
1087
  } });
1066
- ae.subscribe(() => {
1067
- let e = ae.getSnapshot(), t = /* @__PURE__ */ new Map();
1088
+ oe.subscribe(() => {
1089
+ let e = oe.getSnapshot(), t = /* @__PURE__ */ new Map();
1068
1090
  for (let [n] of e) t.set(n, n.documentElement.style.overflow);
1069
1091
  for (let n of e.values()) {
1070
1092
  let r = t.get(n.doc) === "hidden", l = n.count !== 0;
1071
- (l && !r || !l && r) && ae.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && ae.dispatch("TEARDOWN", n);
1093
+ (l && !r || !l && r) && oe.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && oe.dispatch("TEARDOWN", n);
1072
1094
  }
1073
1095
  });
1074
- function vr(e, t, n = () => ({ containers: [] })) {
1075
- let r = _t(ae), l = t ? r.get(t) : void 0, a = l ? l.count > 0 : !1;
1076
- return A(() => {
1077
- if (!(!t || !e)) return ae.dispatch("PUSH", t, n), () => ae.dispatch("POP", t, n);
1078
- }, [e, t]), a;
1096
+ function gr(e, t, n = () => ({ containers: [] })) {
1097
+ let r = Xt(oe), l = t ? r.get(t) : void 0, o = l ? l.count > 0 : !1;
1098
+ return k(() => {
1099
+ if (!(!t || !e)) return oe.dispatch("PUSH", t, n), () => oe.dispatch("POP", t, n);
1100
+ }, [e, t]), o;
1079
1101
  }
1080
- function gr(e, t, n = () => [document.body]) {
1102
+ function wr(e, t, n = () => [document.body]) {
1081
1103
  let r = fe(e, "scroll-lock");
1082
- vr(r, t, (l) => {
1083
- var a;
1084
- return { containers: [...(a = l.containers) != null ? a : [], n] };
1104
+ gr(r, t, (l) => {
1105
+ var o;
1106
+ return { containers: [...(o = l.containers) != null ? o : [], n] };
1085
1107
  });
1086
1108
  }
1087
- function wr(e = 0) {
1088
- let [t, n] = S(e), r = Y((i) => n(i), [t]), l = Y((i) => n((d) => d | i), [t]), a = Y((i) => (t & i) === i, [t]), o = Y((i) => n((d) => d & ~i), [n]), s = Y((i) => n((d) => d ^ i), [n]);
1089
- return { flags: t, setFlag: r, addFlag: l, hasFlag: a, removeFlag: o, toggleFlag: s };
1109
+ function xr(e = 0) {
1110
+ let [t, n] = S(e), r = Y((i) => n(i), [t]), l = Y((i) => n((c) => c | i), [t]), o = Y((i) => (t & i) === i, [t]), a = Y((i) => n((c) => c & ~i), [n]), s = Y((i) => n((c) => c ^ i), [n]);
1111
+ return { flags: t, setFlag: r, addFlag: l, hasFlag: o, removeFlag: a, toggleFlag: s };
1090
1112
  }
1091
- var Tt, Ot;
1092
- typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Tt = process == null ? void 0 : process.env) == null ? void 0 : Tt.NODE_ENV) === "test" && typeof ((Ot = Element == null ? void 0 : Element.prototype) == null ? void 0 : Ot.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
1113
+ var Ot, Pt;
1114
+ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Ot = process == null ? void 0 : process.env) == null ? void 0 : Ot.NODE_ENV) === "test" && typeof ((Pt = Element == null ? void 0 : Element.prototype) == null ? void 0 : Pt.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
1093
1115
  return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
1094
1116
  `)), [];
1095
1117
  });
1096
1118
  var yr = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(yr || {});
1097
- function xr(e) {
1119
+ function br(e) {
1098
1120
  let t = {};
1099
1121
  for (let n in e) e[n] === !0 && (t[`data-${n}`] = "");
1100
1122
  return t;
1101
1123
  }
1102
- function br(e, t, n, r) {
1103
- let [l, a] = S(n), { hasFlag: o, addFlag: s, removeFlag: i } = wr(e && l ? 3 : 0), d = O(!1), f = O(!1), y = pt();
1104
- return A(() => {
1124
+ function Er(e, t, n, r) {
1125
+ let [l, o] = S(n), { hasFlag: a, addFlag: s, removeFlag: i } = xr(e && l ? 3 : 0), c = O(!1), f = O(!1), x = pt();
1126
+ return k(() => {
1105
1127
  var b;
1106
1128
  if (e) {
1107
- if (n && a(!0), !t) {
1129
+ if (n && o(!0), !t) {
1108
1130
  n && s(3);
1109
1131
  return;
1110
1132
  }
1111
- return (b = r == null ? void 0 : r.start) == null || b.call(r, n), Er(t, { inFlight: d, prepare() {
1112
- f.current ? f.current = !1 : f.current = d.current, d.current = !0, !f.current && (n ? (s(3), i(4)) : (s(4), i(2)));
1133
+ return (b = r == null ? void 0 : r.start) == null || b.call(r, n), $r(t, { inFlight: c, prepare() {
1134
+ f.current ? f.current = !1 : f.current = c.current, c.current = !0, !f.current && (n ? (s(3), i(4)) : (s(4), i(2)));
1113
1135
  }, run() {
1114
1136
  f.current ? n ? (i(3), s(4)) : (i(4), s(3)) : n ? i(1) : s(1);
1115
1137
  }, done() {
1116
1138
  var w;
1117
- f.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (d.current = !1, i(7), n || a(!1), (w = r == null ? void 0 : r.end) == null || w.call(r, n));
1139
+ f.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (c.current = !1, i(7), n || o(!1), (w = r == null ? void 0 : r.end) == null || w.call(r, n));
1118
1140
  } });
1119
1141
  }
1120
- }, [e, n, t, y]), e ? [l, { closed: o(1), enter: o(2), leave: o(4), transition: o(2) || o(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1142
+ }, [e, n, t, x]), e ? [l, { closed: a(1), enter: a(2), leave: a(4), transition: a(2) || a(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1121
1143
  }
1122
- function Er(e, { prepare: t, run: n, done: r, inFlight: l }) {
1123
- let a = re();
1124
- return Tr(e, { prepare: t, inFlight: l }), a.nextFrame(() => {
1125
- n(), a.requestAnimationFrame(() => {
1126
- a.add($r(e, r));
1144
+ function $r(e, { prepare: t, run: n, done: r, inFlight: l }) {
1145
+ let o = re();
1146
+ return Or(e, { prepare: t, inFlight: l }), o.nextFrame(() => {
1147
+ n(), o.requestAnimationFrame(() => {
1148
+ o.add(Tr(e, r));
1127
1149
  });
1128
- }), a.dispose;
1150
+ }), o.dispose;
1129
1151
  }
1130
- function $r(e, t) {
1152
+ function Tr(e, t) {
1131
1153
  var n, r;
1132
1154
  let l = re();
1133
1155
  if (!e) return l.dispose;
1134
- let a = !1;
1156
+ let o = !1;
1135
1157
  l.add(() => {
1136
- a = !0;
1158
+ o = !0;
1137
1159
  });
1138
- let o = (r = (n = e.getAnimations) == null ? void 0 : n.call(e).filter((s) => s instanceof CSSTransition)) != null ? r : [];
1139
- return o.length === 0 ? (t(), l.dispose) : (Promise.allSettled(o.map((s) => s.finished)).then(() => {
1140
- a || t();
1160
+ let a = (r = (n = e.getAnimations) == null ? void 0 : n.call(e).filter((s) => s instanceof CSSTransition)) != null ? r : [];
1161
+ return a.length === 0 ? (t(), l.dispose) : (Promise.allSettled(a.map((s) => s.finished)).then(() => {
1162
+ o || t();
1141
1163
  }), l.dispose);
1142
1164
  }
1143
- function Tr(e, { inFlight: t, prepare: n }) {
1165
+ function Or(e, { inFlight: t, prepare: n }) {
1144
1166
  if (t != null && t.current) {
1145
1167
  n();
1146
1168
  return;
@@ -1152,7 +1174,7 @@ function vt(e, t) {
1152
1174
  let n = O([]), r = L(e);
1153
1175
  M(() => {
1154
1176
  let l = [...n.current];
1155
- for (let [a, o] of t.entries()) if (n.current[a] !== o) {
1177
+ for (let [o, a] of t.entries()) if (n.current[o] !== a) {
1156
1178
  let s = r(t, l);
1157
1179
  return n.current = t, s;
1158
1180
  }
@@ -1164,20 +1186,20 @@ var z = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing
1164
1186
  function ze() {
1165
1187
  return R(Ye);
1166
1188
  }
1167
- function Or({ value: e, children: t }) {
1189
+ function Pr({ value: e, children: t }) {
1168
1190
  return E.createElement(Ye.Provider, { value: e }, t);
1169
1191
  }
1170
- function Pr({ children: e }) {
1192
+ function Mr({ children: e }) {
1171
1193
  return E.createElement(Ye.Provider, { value: null }, e);
1172
1194
  }
1173
- function Mr(e) {
1195
+ function Lr(e) {
1174
1196
  function t() {
1175
1197
  document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
1176
1198
  }
1177
1199
  typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
1178
1200
  }
1179
1201
  let ee = [];
1180
- Mr(() => {
1202
+ Lr(() => {
1181
1203
  function e(t) {
1182
1204
  if (!(t.target instanceof HTMLElement) || t.target === document.body || ee[0] === t.target) return;
1183
1205
  let n = t.target;
@@ -1185,7 +1207,7 @@ Mr(() => {
1185
1207
  }
1186
1208
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
1187
1209
  });
1188
- function Yt(e) {
1210
+ function Gt(e) {
1189
1211
  let t = L(e), n = O(!1);
1190
1212
  M(() => (n.current = !1, () => {
1191
1213
  n.current = !0, qe(() => {
@@ -1193,29 +1215,29 @@ function Yt(e) {
1193
1215
  });
1194
1216
  }), [t]);
1195
1217
  }
1196
- function Lr() {
1218
+ function Sr() {
1197
1219
  let e = typeof document > "u";
1198
1220
  return "useSyncExternalStore" in Ee ? ((t) => t.useSyncExternalStore)(Ee)(() => () => {
1199
1221
  }, () => !1, () => !e) : !1;
1200
1222
  }
1201
1223
  function Le() {
1202
- let e = Lr(), [t, n] = Ee.useState(oe.isHandoffComplete);
1203
- return t && oe.isHandoffComplete === !1 && n(!1), Ee.useEffect(() => {
1224
+ let e = Sr(), [t, n] = Ee.useState(ae.isHandoffComplete);
1225
+ return t && ae.isHandoffComplete === !1 && n(!1), Ee.useEffect(() => {
1204
1226
  t !== !0 && n(!0);
1205
- }, [t]), Ee.useEffect(() => oe.handoff(), []), e ? !1 : t;
1227
+ }, [t]), Ee.useEffect(() => ae.handoff(), []), e ? !1 : t;
1206
1228
  }
1207
- let zt = H(!1);
1208
- function Sr() {
1209
- return R(zt);
1229
+ let Kt = H(!1);
1230
+ function Fr() {
1231
+ return R(Kt);
1210
1232
  }
1211
- function Pt(e) {
1212
- return E.createElement(zt.Provider, { value: e.force }, e.children);
1233
+ function Mt(e) {
1234
+ return E.createElement(Kt.Provider, { value: e.force }, e.children);
1213
1235
  }
1214
- function Fr(e) {
1215
- let t = Sr(), n = R(Kt), r = Me(e), [l, a] = S(() => {
1216
- var o;
1217
- if (!t && n !== null) return (o = n.current) != null ? o : null;
1218
- if (oe.isServer) return null;
1236
+ function Cr(e) {
1237
+ let t = Fr(), n = R(Jt), r = Me(e), [l, o] = S(() => {
1238
+ var a;
1239
+ if (!t && n !== null) return (a = n.current) != null ? a : null;
1240
+ if (ae.isServer) return null;
1219
1241
  let s = r == null ? void 0 : r.getElementById("headlessui-portal-root");
1220
1242
  if (s) return s;
1221
1243
  if (r === null) return null;
@@ -1225,145 +1247,145 @@ function Fr(e) {
1225
1247
  return M(() => {
1226
1248
  l !== null && (r != null && r.body.contains(l) || r == null || r.body.appendChild(l));
1227
1249
  }, [l, r]), M(() => {
1228
- t || n !== null && a(n.current);
1229
- }, [n, a, t]), l;
1230
- }
1231
- let Gt = G, Cr = D(function(e, t) {
1232
- let n = e, r = O(null), l = Z(_n((y) => {
1233
- r.current = y;
1234
- }), t), a = Me(r), o = Fr(r), [s] = S(() => {
1235
- var y;
1236
- return oe.isServer ? null : (y = a == null ? void 0 : a.createElement("div")) != null ? y : null;
1237
- }), i = R(st), d = Le();
1238
- A(() => {
1239
- !o || !s || o.contains(s) || (s.setAttribute("data-headlessui-portal", ""), o.appendChild(s));
1240
- }, [o, s]), A(() => {
1250
+ t || n !== null && o(n.current);
1251
+ }, [n, o, t]), l;
1252
+ }
1253
+ let Zt = G, Nr = D(function(e, t) {
1254
+ let n = e, r = O(null), l = Z(Bn((x) => {
1255
+ r.current = x;
1256
+ }), t), o = Me(r), a = Cr(r), [s] = S(() => {
1257
+ var x;
1258
+ return ae.isServer ? null : (x = o == null ? void 0 : o.createElement("div")) != null ? x : null;
1259
+ }), i = R(st), c = Le();
1260
+ k(() => {
1261
+ !a || !s || a.contains(s) || (s.setAttribute("data-headlessui-portal", ""), a.appendChild(s));
1262
+ }, [a, s]), k(() => {
1241
1263
  if (s && i) return i.register(s);
1242
- }, [i, s]), Yt(() => {
1243
- var y;
1244
- !o || !s || (s instanceof Node && o.contains(s) && o.removeChild(s), o.childNodes.length <= 0 && ((y = o.parentElement) == null || y.removeChild(o)));
1264
+ }, [i, s]), Gt(() => {
1265
+ var x;
1266
+ !a || !s || (s instanceof Node && a.contains(s) && a.removeChild(s), a.childNodes.length <= 0 && ((x = a.parentElement) == null || x.removeChild(a)));
1245
1267
  });
1246
1268
  let f = W();
1247
- return d ? !o || !s ? null : En(f({ ourProps: { ref: l }, theirProps: n, slot: {}, defaultTag: Gt, name: "Portal" }), s) : null;
1269
+ return c ? !a || !s ? null : Tn(f({ ourProps: { ref: l }, theirProps: n, slot: {}, defaultTag: Zt, name: "Portal" }), s) : null;
1248
1270
  });
1249
- function kr(e, t) {
1250
- let n = Z(t), { enabled: r = !0, ...l } = e, a = W();
1251
- return r ? E.createElement(Cr, { ...l, ref: n }) : a({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Gt, name: "Portal" });
1252
- }
1253
- let Nr = G, Kt = H(null);
1254
1271
  function Ar(e, t) {
1255
- let { target: n, ...r } = e, l = { ref: Z(t) }, a = W();
1256
- return E.createElement(Kt.Provider, { value: n }, a({ ourProps: l, theirProps: r, defaultTag: Nr, name: "Popover.Group" }));
1272
+ let n = Z(t), { enabled: r = !0, ...l } = e, o = W();
1273
+ return r ? E.createElement(Nr, { ...l, ref: n }) : o({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Zt, name: "Portal" });
1274
+ }
1275
+ let kr = G, Jt = H(null);
1276
+ function Ir(e, t) {
1277
+ let { target: n, ...r } = e, l = { ref: Z(t) }, o = W();
1278
+ return E.createElement(Jt.Provider, { value: n }, o({ ourProps: l, theirProps: r, defaultTag: kr, name: "Popover.Group" }));
1257
1279
  }
1258
1280
  let st = H(null);
1259
- function Ir() {
1260
- let e = R(st), t = O([]), n = L((a) => (t.current.push(a), e && e.register(a), () => r(a))), r = L((a) => {
1261
- let o = t.current.indexOf(a);
1262
- o !== -1 && t.current.splice(o, 1), e && e.unregister(a);
1281
+ function Rr() {
1282
+ let e = R(st), t = O([]), n = L((o) => (t.current.push(o), e && e.register(o), () => r(o))), r = L((o) => {
1283
+ let a = t.current.indexOf(o);
1284
+ a !== -1 && t.current.splice(a, 1), e && e.unregister(o);
1263
1285
  }), l = C(() => ({ register: n, unregister: r, portals: t }), [n, r, t]);
1264
- return [t, C(() => function({ children: a }) {
1265
- return E.createElement(st.Provider, { value: l }, a);
1286
+ return [t, C(() => function({ children: o }) {
1287
+ return E.createElement(st.Provider, { value: l }, o);
1266
1288
  }, [l])];
1267
1289
  }
1268
- let Rr = D(kr), Zt = D(Ar), Dr = Object.assign(Rr, { Group: Zt });
1269
- function jr(e, t = typeof document < "u" ? document.defaultView : null, n) {
1290
+ let Dr = D(Ar), Qt = D(Ir), jr = Object.assign(Dr, { Group: Qt });
1291
+ function Ur(e, t = typeof document < "u" ? document.defaultView : null, n) {
1270
1292
  let r = fe(e, "escape");
1271
- qt(t, "keydown", (l) => {
1272
- r && (l.defaultPrevented || l.key === Ht.Escape && n(l));
1293
+ zt(t, "keydown", (l) => {
1294
+ r && (l.defaultPrevented || l.key === _t.Escape && n(l));
1273
1295
  });
1274
1296
  }
1275
- function Ur() {
1297
+ function Hr() {
1276
1298
  var e;
1277
1299
  let [t] = S(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [n, r] = S((e = t == null ? void 0 : t.matches) != null ? e : !1);
1278
- return A(() => {
1300
+ return k(() => {
1279
1301
  if (!t) return;
1280
- function l(a) {
1281
- r(a.matches);
1302
+ function l(o) {
1303
+ r(o.matches);
1282
1304
  }
1283
1305
  return t.addEventListener("change", l), () => t.removeEventListener("change", l);
1284
1306
  }, [t]), n;
1285
1307
  }
1286
- function Hr({ defaultContainers: e = [], portals: t, mainTreeNode: n } = {}) {
1308
+ function Wr({ defaultContainers: e = [], portals: t, mainTreeNode: n } = {}) {
1287
1309
  let r = Me(n), l = L(() => {
1288
- var a, o;
1310
+ var o, a;
1289
1311
  let s = [];
1290
1312
  for (let i of e) i !== null && (i instanceof HTMLElement ? s.push(i) : "current" in i && i.current instanceof HTMLElement && s.push(i.current));
1291
1313
  if (t != null && t.current) for (let i of t.current) s.push(i);
1292
- for (let i of (a = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? a : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (n && (i.contains(n) || i.contains((o = n == null ? void 0 : n.getRootNode()) == null ? void 0 : o.host)) || s.some((d) => i.contains(d)) || s.push(i));
1314
+ for (let i of (o = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? o : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (n && (i.contains(n) || i.contains((a = n == null ? void 0 : n.getRootNode()) == null ? void 0 : a.host)) || s.some((c) => i.contains(c)) || s.push(i));
1293
1315
  return s;
1294
1316
  });
1295
- return { resolveContainers: l, contains: L((a) => l().some((o) => o.contains(a))) };
1296
- }
1297
- let Jt = H(null);
1298
- function Mt({ children: e, node: t }) {
1299
- let [n, r] = S(null), l = Qt(t ?? n);
1300
- return E.createElement(Jt.Provider, { value: l }, e, l === null && E.createElement(it, { features: He.Hidden, ref: (a) => {
1301
- var o, s;
1302
- if (a) {
1303
- for (let i of (s = (o = Ve(a)) == null ? void 0 : o.querySelectorAll("html > *, body > *")) != null ? s : []) if (i !== document.body && i !== document.head && i instanceof HTMLElement && i != null && i.contains(a)) {
1317
+ return { resolveContainers: l, contains: L((o) => l().some((a) => a.contains(o))) };
1318
+ }
1319
+ let en = H(null);
1320
+ function Lt({ children: e, node: t }) {
1321
+ let [n, r] = S(null), l = tn(t ?? n);
1322
+ return E.createElement(en.Provider, { value: l }, e, l === null && E.createElement(it, { features: He.Hidden, ref: (o) => {
1323
+ var a, s;
1324
+ if (o) {
1325
+ for (let i of (s = (a = Ve(o)) == null ? void 0 : a.querySelectorAll("html > *, body > *")) != null ? s : []) if (i !== document.body && i !== document.head && i instanceof HTMLElement && i != null && i.contains(o)) {
1304
1326
  r(i);
1305
1327
  break;
1306
1328
  }
1307
1329
  }
1308
1330
  } }));
1309
1331
  }
1310
- function Qt(e = null) {
1332
+ function tn(e = null) {
1311
1333
  var t;
1312
- return (t = R(Jt)) != null ? t : e;
1334
+ return (t = R(en)) != null ? t : e;
1313
1335
  }
1314
1336
  function gt() {
1315
1337
  let e = O(!1);
1316
- return A(() => (e.current = !0, () => {
1338
+ return k(() => (e.current = !0, () => {
1317
1339
  e.current = !1;
1318
1340
  }), []), e;
1319
1341
  }
1320
1342
  var be = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(be || {});
1321
- function Wr() {
1343
+ function _r() {
1322
1344
  let e = O(0);
1323
- return Vt(!0, "keydown", (t) => {
1345
+ return Yt(!0, "keydown", (t) => {
1324
1346
  t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0);
1325
1347
  }, !0), e;
1326
1348
  }
1327
- function en(e) {
1349
+ function nn(e) {
1328
1350
  if (!e) return /* @__PURE__ */ new Set();
1329
1351
  if (typeof e == "function") return new Set(e());
1330
1352
  let t = /* @__PURE__ */ new Set();
1331
1353
  for (let n of e.current) n.current instanceof HTMLElement && t.add(n.current);
1332
1354
  return t;
1333
1355
  }
1334
- let _r = "div";
1356
+ let Br = "div";
1335
1357
  var ie = ((e) => (e[e.None = 0] = "None", e[e.InitialFocus = 1] = "InitialFocus", e[e.TabLock = 2] = "TabLock", e[e.FocusLock = 4] = "FocusLock", e[e.RestoreFocus = 8] = "RestoreFocus", e[e.AutoFocus = 16] = "AutoFocus", e))(ie || {});
1336
- function Br(e, t) {
1337
- let n = O(null), r = Z(n, t), { initialFocus: l, initialFocusFallback: a, containers: o, features: s = 15, ...i } = e;
1358
+ function Xr(e, t) {
1359
+ let n = O(null), r = Z(n, t), { initialFocus: l, initialFocusFallback: o, containers: a, features: s = 15, ...i } = e;
1338
1360
  Le() || (s = 0);
1339
- let d = Me(n);
1340
- Yr(s, { ownerDocument: d });
1341
- let f = zr(s, { ownerDocument: d, container: n, initialFocus: l, initialFocusFallback: a });
1342
- Gr(s, { ownerDocument: d, container: n, containers: o, previousActiveElement: f });
1343
- let y = Wr(), b = L((p) => {
1361
+ let c = Me(n);
1362
+ zr(s, { ownerDocument: c });
1363
+ let f = Gr(s, { ownerDocument: c, container: n, initialFocus: l, initialFocusFallback: o });
1364
+ Kr(s, { ownerDocument: c, container: n, containers: a, previousActiveElement: f });
1365
+ let x = _r(), b = L((p) => {
1344
1366
  let g = n.current;
1345
- g && ((x) => x())(() => {
1346
- ne(y.current, { [be.Forwards]: () => {
1347
- Oe(g, J.First, { skipElements: [p.relatedTarget, a] });
1367
+ g && ((y) => y())(() => {
1368
+ ne(x.current, { [be.Forwards]: () => {
1369
+ Oe(g, J.First, { skipElements: [p.relatedTarget, o] });
1348
1370
  }, [be.Backwards]: () => {
1349
- Oe(g, J.Last, { skipElements: [p.relatedTarget, a] });
1371
+ Oe(g, J.Last, { skipElements: [p.relatedTarget, o] });
1350
1372
  } });
1351
1373
  });
1352
- }), w = fe(!!(s & 2), "focus-trap#tab-lock"), c = pt(), v = O(!1), u = { ref: r, onKeyDown(p) {
1353
- p.key == "Tab" && (v.current = !0, c.requestAnimationFrame(() => {
1374
+ }), w = fe(!!(s & 2), "focus-trap#tab-lock"), d = pt(), v = O(!1), u = { ref: r, onKeyDown(p) {
1375
+ p.key == "Tab" && (v.current = !0, d.requestAnimationFrame(() => {
1354
1376
  v.current = !1;
1355
1377
  }));
1356
1378
  }, onBlur(p) {
1357
1379
  if (!(s & 4)) return;
1358
- let g = en(o);
1380
+ let g = nn(a);
1359
1381
  n.current instanceof HTMLElement && g.add(n.current);
1360
- let x = p.relatedTarget;
1361
- x instanceof HTMLElement && x.dataset.headlessuiFocusGuard !== "true" && (tn(g, x) || (v.current ? Oe(n.current, ne(y.current, { [be.Forwards]: () => J.Next, [be.Backwards]: () => J.Previous }) | J.WrapAround, { relativeTo: p.target }) : p.target instanceof HTMLElement && Q(p.target)));
1382
+ let y = p.relatedTarget;
1383
+ y instanceof HTMLElement && y.dataset.headlessuiFocusGuard !== "true" && (rn(g, y) || (v.current ? Oe(n.current, ne(x.current, { [be.Forwards]: () => J.Next, [be.Backwards]: () => J.Previous }) | J.WrapAround, { relativeTo: p.target }) : p.target instanceof HTMLElement && Q(p.target)));
1362
1384
  } }, m = W();
1363
- return E.createElement(E.Fragment, null, w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }), m({ ourProps: u, theirProps: i, defaultTag: _r, name: "FocusTrap" }), w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }));
1385
+ return E.createElement(E.Fragment, null, w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }), m({ ourProps: u, theirProps: i, defaultTag: Br, name: "FocusTrap" }), w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }));
1364
1386
  }
1365
- let Xr = D(Br), Vr = Object.assign(Xr, { features: ie });
1366
- function qr(e = !0) {
1387
+ let Vr = D(Xr), qr = Object.assign(Vr, { features: ie });
1388
+ function Yr(e = !0) {
1367
1389
  let t = O(ee.slice());
1368
1390
  return vt(([n], [r]) => {
1369
1391
  r === !0 && n === !1 && qe(() => {
@@ -1374,76 +1396,76 @@ function qr(e = !0) {
1374
1396
  return (n = t.current.find((r) => r != null && r.isConnected)) != null ? n : null;
1375
1397
  });
1376
1398
  }
1377
- function Yr(e, { ownerDocument: t }) {
1378
- let n = !!(e & 8), r = qr(n);
1399
+ function zr(e, { ownerDocument: t }) {
1400
+ let n = !!(e & 8), r = Yr(n);
1379
1401
  vt(() => {
1380
1402
  n || (t == null ? void 0 : t.activeElement) === (t == null ? void 0 : t.body) && Q(r());
1381
- }, [n]), Yt(() => {
1403
+ }, [n]), Gt(() => {
1382
1404
  n && Q(r());
1383
1405
  });
1384
1406
  }
1385
- function zr(e, { ownerDocument: t, container: n, initialFocus: r, initialFocusFallback: l }) {
1386
- let a = O(null), o = fe(!!(e & 1), "focus-trap#initial-focus"), s = gt();
1407
+ function Gr(e, { ownerDocument: t, container: n, initialFocus: r, initialFocusFallback: l }) {
1408
+ let o = O(null), a = fe(!!(e & 1), "focus-trap#initial-focus"), s = gt();
1387
1409
  return vt(() => {
1388
1410
  if (e === 0) return;
1389
- if (!o) {
1411
+ if (!a) {
1390
1412
  l != null && l.current && Q(l.current);
1391
1413
  return;
1392
1414
  }
1393
1415
  let i = n.current;
1394
1416
  i && qe(() => {
1395
1417
  if (!s.current) return;
1396
- let d = t == null ? void 0 : t.activeElement;
1418
+ let c = t == null ? void 0 : t.activeElement;
1397
1419
  if (r != null && r.current) {
1398
- if ((r == null ? void 0 : r.current) === d) {
1399
- a.current = d;
1420
+ if ((r == null ? void 0 : r.current) === c) {
1421
+ o.current = c;
1400
1422
  return;
1401
1423
  }
1402
- } else if (i.contains(d)) {
1403
- a.current = d;
1424
+ } else if (i.contains(c)) {
1425
+ o.current = c;
1404
1426
  return;
1405
1427
  }
1406
1428
  if (r != null && r.current) Q(r.current);
1407
1429
  else {
1408
1430
  if (e & 16) {
1409
- if (Oe(i, J.First | J.AutoFocus) !== ot.Error) return;
1410
- } else if (Oe(i, J.First) !== ot.Error) return;
1431
+ if (Oe(i, J.First | J.AutoFocus) !== at.Error) return;
1432
+ } else if (Oe(i, J.First) !== at.Error) return;
1411
1433
  if (l != null && l.current && (Q(l.current), (t == null ? void 0 : t.activeElement) === l.current)) return;
1412
1434
  console.warn("There are no focusable elements inside the <FocusTrap />");
1413
1435
  }
1414
- a.current = t == null ? void 0 : t.activeElement;
1436
+ o.current = t == null ? void 0 : t.activeElement;
1415
1437
  });
1416
- }, [l, o, e]), a;
1438
+ }, [l, a, e]), o;
1417
1439
  }
1418
- function Gr(e, { ownerDocument: t, container: n, containers: r, previousActiveElement: l }) {
1419
- let a = gt(), o = !!(e & 4);
1420
- qt(t == null ? void 0 : t.defaultView, "focus", (s) => {
1421
- if (!o || !a.current) return;
1422
- let i = en(r);
1440
+ function Kr(e, { ownerDocument: t, container: n, containers: r, previousActiveElement: l }) {
1441
+ let o = gt(), a = !!(e & 4);
1442
+ zt(t == null ? void 0 : t.defaultView, "focus", (s) => {
1443
+ if (!a || !o.current) return;
1444
+ let i = nn(r);
1423
1445
  n.current instanceof HTMLElement && i.add(n.current);
1424
- let d = l.current;
1425
- if (!d) return;
1446
+ let c = l.current;
1447
+ if (!c) return;
1426
1448
  let f = s.target;
1427
- f && f instanceof HTMLElement ? tn(i, f) ? (l.current = f, Q(f)) : (s.preventDefault(), s.stopPropagation(), Q(d)) : Q(l.current);
1449
+ f && f instanceof HTMLElement ? rn(i, f) ? (l.current = f, Q(f)) : (s.preventDefault(), s.stopPropagation(), Q(c)) : Q(l.current);
1428
1450
  }, !0);
1429
1451
  }
1430
- function tn(e, t) {
1452
+ function rn(e, t) {
1431
1453
  for (let n of e) if (n.contains(t)) return !0;
1432
1454
  return !1;
1433
1455
  }
1434
- function nn(e) {
1456
+ function ln(e) {
1435
1457
  var t;
1436
- return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : ln) !== G || E.Children.count(e.children) === 1;
1458
+ return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : an) !== G || E.Children.count(e.children) === 1;
1437
1459
  }
1438
1460
  let Ge = H(null);
1439
1461
  Ge.displayName = "TransitionContext";
1440
- var Kr = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Kr || {});
1441
- function Zr() {
1462
+ var Zr = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Zr || {});
1463
+ function Jr() {
1442
1464
  let e = R(Ge);
1443
1465
  if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
1444
1466
  return e;
1445
1467
  }
1446
- function Jr() {
1468
+ function Qr() {
1447
1469
  let e = R(Ke);
1448
1470
  if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
1449
1471
  return e;
@@ -1453,104 +1475,104 @@ Ke.displayName = "NestingContext";
1453
1475
  function Ze(e) {
1454
1476
  return "children" in e ? Ze(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
1455
1477
  }
1456
- function rn(e, t) {
1457
- let n = ue(e), r = O([]), l = gt(), a = pt(), o = L((w, c = te.Hidden) => {
1478
+ function on(e, t) {
1479
+ let n = ue(e), r = O([]), l = gt(), o = pt(), a = L((w, d = te.Hidden) => {
1458
1480
  let v = r.current.findIndex(({ el: u }) => u === w);
1459
- v !== -1 && (ne(c, { [te.Unmount]() {
1481
+ v !== -1 && (ne(d, { [te.Unmount]() {
1460
1482
  r.current.splice(v, 1);
1461
1483
  }, [te.Hidden]() {
1462
1484
  r.current[v].state = "hidden";
1463
- } }), a.microTask(() => {
1485
+ } }), o.microTask(() => {
1464
1486
  var u;
1465
1487
  !Ze(r) && l.current && ((u = n.current) == null || u.call(n));
1466
1488
  }));
1467
1489
  }), s = L((w) => {
1468
- let c = r.current.find(({ el: v }) => v === w);
1469
- return c ? c.state !== "visible" && (c.state = "visible") : r.current.push({ el: w, state: "visible" }), () => o(w, te.Unmount);
1470
- }), i = O([]), d = O(Promise.resolve()), f = O({ enter: [], leave: [] }), y = L((w, c, v) => {
1471
- i.current.splice(0), t && (t.chains.current[c] = t.chains.current[c].filter(([u]) => u !== w)), t == null || t.chains.current[c].push([w, new Promise((u) => {
1490
+ let d = r.current.find(({ el: v }) => v === w);
1491
+ return d ? d.state !== "visible" && (d.state = "visible") : r.current.push({ el: w, state: "visible" }), () => a(w, te.Unmount);
1492
+ }), i = O([]), c = O(Promise.resolve()), f = O({ enter: [], leave: [] }), x = L((w, d, v) => {
1493
+ i.current.splice(0), t && (t.chains.current[d] = t.chains.current[d].filter(([u]) => u !== w)), t == null || t.chains.current[d].push([w, new Promise((u) => {
1472
1494
  i.current.push(u);
1473
- })]), t == null || t.chains.current[c].push([w, new Promise((u) => {
1474
- Promise.all(f.current[c].map(([m, p]) => p)).then(() => u());
1475
- })]), c === "enter" ? d.current = d.current.then(() => t == null ? void 0 : t.wait.current).then(() => v(c)) : v(c);
1476
- }), b = L((w, c, v) => {
1477
- Promise.all(f.current[c].splice(0).map(([u, m]) => m)).then(() => {
1495
+ })]), t == null || t.chains.current[d].push([w, new Promise((u) => {
1496
+ Promise.all(f.current[d].map(([m, p]) => p)).then(() => u());
1497
+ })]), d === "enter" ? c.current = c.current.then(() => t == null ? void 0 : t.wait.current).then(() => v(d)) : v(d);
1498
+ }), b = L((w, d, v) => {
1499
+ Promise.all(f.current[d].splice(0).map(([u, m]) => m)).then(() => {
1478
1500
  var u;
1479
1501
  (u = i.current.shift()) == null || u();
1480
- }).then(() => v(c));
1502
+ }).then(() => v(d));
1481
1503
  });
1482
- return C(() => ({ children: r, register: s, unregister: o, onStart: y, onStop: b, wait: d, chains: f }), [s, o, r, y, b, f, d]);
1504
+ return C(() => ({ children: r, register: s, unregister: a, onStart: x, onStop: b, wait: c, chains: f }), [s, a, r, x, b, f, c]);
1483
1505
  }
1484
- let ln = G, an = Ue.RenderStrategy;
1485
- function Qr(e, t) {
1506
+ let an = G, sn = Ue.RenderStrategy;
1507
+ function el(e, t) {
1486
1508
  var n, r;
1487
- let { transition: l = !0, beforeEnter: a, afterEnter: o, beforeLeave: s, afterLeave: i, enter: d, enterFrom: f, enterTo: y, entered: b, leave: w, leaveFrom: c, leaveTo: v, ...u } = e, [m, p] = S(null), g = O(null), x = nn(e), h = Z(...x ? [g, t, p] : t === null ? [] : [t]), $ = (n = u.unmount) == null || n ? te.Unmount : te.Hidden, { show: F, appear: j, initial: _ } = Zr(), [N, U] = S(F ? "visible" : "hidden"), B = Jr(), { register: X, unregister: P } = B;
1488
- A(() => X(g), [X, g]), A(() => {
1509
+ let { transition: l = !0, beforeEnter: o, afterEnter: a, beforeLeave: s, afterLeave: i, enter: c, enterFrom: f, enterTo: x, entered: b, leave: w, leaveFrom: d, leaveTo: v, ...u } = e, [m, p] = S(null), g = O(null), y = ln(e), h = Z(...y ? [g, t, p] : t === null ? [] : [t]), $ = (n = u.unmount) == null || n ? te.Unmount : te.Hidden, { show: F, appear: j, initial: _ } = Jr(), [A, U] = S(F ? "visible" : "hidden"), B = Qr(), { register: X, unregister: P } = B;
1510
+ k(() => X(g), [X, g]), k(() => {
1489
1511
  if ($ === te.Hidden && g.current) {
1490
- if (F && N !== "visible") {
1512
+ if (F && A !== "visible") {
1491
1513
  U("visible");
1492
1514
  return;
1493
1515
  }
1494
- return ne(N, { hidden: () => P(g), visible: () => X(g) });
1516
+ return ne(A, { hidden: () => P(g), visible: () => X(g) });
1495
1517
  }
1496
- }, [N, g, X, P, F, $]);
1518
+ }, [A, g, X, P, F, $]);
1497
1519
  let V = Le();
1498
- A(() => {
1499
- if (x && V && N === "visible" && g.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
1500
- }, [g, N, V, x]);
1501
- let Se = _ && !j, Fe = j && F && _, pe = O(!1), K = rn(() => {
1520
+ k(() => {
1521
+ if (y && V && A === "visible" && g.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
1522
+ }, [g, A, V, y]);
1523
+ let Se = _ && !j, Fe = j && F && _, pe = O(!1), K = on(() => {
1502
1524
  pe.current || (U("hidden"), P(g));
1503
1525
  }, B), Ce = L((Qe) => {
1504
1526
  pe.current = !0;
1505
- let Ne = Qe ? "enter" : "leave";
1506
- K.onStart(g, Ne, (ve) => {
1507
- ve === "enter" ? a == null || a() : ve === "leave" && (s == null || s());
1527
+ let Ae = Qe ? "enter" : "leave";
1528
+ K.onStart(g, Ae, (ve) => {
1529
+ ve === "enter" ? o == null || o() : ve === "leave" && (s == null || s());
1508
1530
  });
1509
- }), k = L((Qe) => {
1510
- let Ne = Qe ? "enter" : "leave";
1511
- pe.current = !1, K.onStop(g, Ne, (ve) => {
1512
- ve === "enter" ? o == null || o() : ve === "leave" && (i == null || i());
1513
- }), Ne === "leave" && !Ze(K) && (U("hidden"), P(g));
1531
+ }), N = L((Qe) => {
1532
+ let Ae = Qe ? "enter" : "leave";
1533
+ pe.current = !1, K.onStop(g, Ae, (ve) => {
1534
+ ve === "enter" ? a == null || a() : ve === "leave" && (i == null || i());
1535
+ }), Ae === "leave" && !Ze(K) && (U("hidden"), P(g));
1514
1536
  });
1515
1537
  M(() => {
1516
- x && l || (Ce(F), k(F));
1517
- }, [F, x, l]);
1518
- let ke = !(!l || !x || !V || Se), [, I] = br(ke, m, F, { start: Ce, end: k }), dn = le({ ref: h, className: ((r = lt(u.className, Fe && d, Fe && f, I.enter && d, I.enter && I.closed && f, I.enter && !I.closed && y, I.leave && w, I.leave && !I.closed && c, I.leave && I.closed && v, !I.transition && F && b)) == null ? void 0 : r.trim()) || void 0, ...xr(I) }), he = 0;
1519
- N === "visible" && (he |= z.Open), N === "hidden" && (he |= z.Closed), I.enter && (he |= z.Opening), I.leave && (he |= z.Closing);
1520
- let cn = W();
1521
- return E.createElement(Ke.Provider, { value: K }, E.createElement(Or, { value: he }, cn({ ourProps: dn, theirProps: u, defaultTag: ln, features: an, visible: N === "visible", name: "Transition.Child" })));
1538
+ y && l || (Ce(F), N(F));
1539
+ }, [F, y, l]);
1540
+ let Ne = !(!l || !y || !V || Se), [, I] = Er(Ne, m, F, { start: Ce, end: N }), fn = le({ ref: h, className: ((r = lt(u.className, Fe && c, Fe && f, I.enter && c, I.enter && I.closed && f, I.enter && !I.closed && x, I.leave && w, I.leave && !I.closed && d, I.leave && I.closed && v, !I.transition && F && b)) == null ? void 0 : r.trim()) || void 0, ...br(I) }), he = 0;
1541
+ A === "visible" && (he |= z.Open), A === "hidden" && (he |= z.Closed), I.enter && (he |= z.Opening), I.leave && (he |= z.Closing);
1542
+ let mn = W();
1543
+ return E.createElement(Ke.Provider, { value: K }, E.createElement(Pr, { value: he }, mn({ ourProps: fn, theirProps: u, defaultTag: an, features: sn, visible: A === "visible", name: "Transition.Child" })));
1522
1544
  }
1523
- function el(e, t) {
1524
- let { show: n, appear: r = !1, unmount: l = !0, ...a } = e, o = O(null), s = nn(e), i = Z(...s ? [o, t] : t === null ? [] : [t]);
1545
+ function tl(e, t) {
1546
+ let { show: n, appear: r = !1, unmount: l = !0, ...o } = e, a = O(null), s = ln(e), i = Z(...s ? [a, t] : t === null ? [] : [t]);
1525
1547
  Le();
1526
- let d = ze();
1527
- if (n === void 0 && d !== null && (n = (d & z.Open) === z.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1528
- let [f, y] = S(n ? "visible" : "hidden"), b = rn(() => {
1529
- n || y("hidden");
1530
- }), [w, c] = S(!0), v = O([n]);
1531
- A(() => {
1532
- w !== !1 && v.current[v.current.length - 1] !== n && (v.current.push(n), c(!1));
1548
+ let c = ze();
1549
+ if (n === void 0 && c !== null && (n = (c & z.Open) === z.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1550
+ let [f, x] = S(n ? "visible" : "hidden"), b = on(() => {
1551
+ n || x("hidden");
1552
+ }), [w, d] = S(!0), v = O([n]);
1553
+ k(() => {
1554
+ w !== !1 && v.current[v.current.length - 1] !== n && (v.current.push(n), d(!1));
1533
1555
  }, [v, n]);
1534
1556
  let u = C(() => ({ show: n, appear: r, initial: w }), [n, r, w]);
1535
- A(() => {
1536
- n ? y("visible") : !Ze(b) && o.current !== null && y("hidden");
1557
+ k(() => {
1558
+ n ? x("visible") : !Ze(b) && a.current !== null && x("hidden");
1537
1559
  }, [n, b]);
1538
1560
  let m = { unmount: l }, p = L(() => {
1539
1561
  var h;
1540
- w && c(!1), (h = e.beforeEnter) == null || h.call(e);
1562
+ w && d(!1), (h = e.beforeEnter) == null || h.call(e);
1541
1563
  }), g = L(() => {
1542
1564
  var h;
1543
- w && c(!1), (h = e.beforeLeave) == null || h.call(e);
1544
- }), x = W();
1545
- return E.createElement(Ke.Provider, { value: b }, E.createElement(Ge.Provider, { value: u }, x({ ourProps: { ...m, as: G, children: E.createElement(on, { ref: i, ...m, ...a, beforeEnter: p, beforeLeave: g }) }, theirProps: {}, defaultTag: G, features: an, visible: f === "visible", name: "Transition" })));
1565
+ w && d(!1), (h = e.beforeLeave) == null || h.call(e);
1566
+ }), y = W();
1567
+ return E.createElement(Ke.Provider, { value: b }, E.createElement(Ge.Provider, { value: u }, y({ ourProps: { ...m, as: G, children: E.createElement(un, { ref: i, ...m, ...o, beforeEnter: p, beforeLeave: g }) }, theirProps: {}, defaultTag: G, features: sn, visible: f === "visible", name: "Transition" })));
1546
1568
  }
1547
- function tl(e, t) {
1569
+ function nl(e, t) {
1548
1570
  let n = R(Ge) !== null, r = ze() !== null;
1549
- return E.createElement(E.Fragment, null, !n && r ? E.createElement(ut, { ref: t, ...e }) : E.createElement(on, { ref: t, ...e }));
1571
+ return E.createElement(E.Fragment, null, !n && r ? E.createElement(ut, { ref: t, ...e }) : E.createElement(un, { ref: t, ...e }));
1550
1572
  }
1551
- let ut = D(el), on = D(Qr), me = D(tl), sn = Object.assign(ut, { Child: me, Root: ut });
1552
- var nl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(nl || {}), rl = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(rl || {});
1553
- let ll = { 0(e, t) {
1573
+ let ut = D(tl), un = D(el), me = D(nl), cn = Object.assign(ut, { Child: me, Root: ut });
1574
+ var rl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(rl || {}), ll = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(ll || {});
1575
+ let il = { 0(e, t) {
1554
1576
  return e.titleId === t.id ? e : { ...e, titleId: t.id };
1555
1577
  } }, wt = H(null);
1556
1578
  wt.displayName = "DialogContext";
@@ -1562,68 +1584,68 @@ function Je(e) {
1562
1584
  }
1563
1585
  return t;
1564
1586
  }
1565
- function il(e, t) {
1566
- return ne(t.type, ll, e, t);
1587
+ function ol(e, t) {
1588
+ return ne(t.type, il, e, t);
1567
1589
  }
1568
- let Lt = D(function(e, t) {
1569
- let n = Pe(), { id: r = `headlessui-dialog-${n}`, open: l, onClose: a, initialFocus: o, role: s = "dialog", autoFocus: i = !0, __demoMode: d = !1, unmount: f = !1, ...y } = e, b = O(!1);
1590
+ let St = D(function(e, t) {
1591
+ let n = Pe(), { id: r = `headlessui-dialog-${n}`, open: l, onClose: o, initialFocus: a, role: s = "dialog", autoFocus: i = !0, __demoMode: c = !1, unmount: f = !1, ...x } = e, b = O(!1);
1570
1592
  s = function() {
1571
1593
  return s === "dialog" || s === "alertdialog" ? s : (b.current || (b.current = !0, console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
1572
1594
  }();
1573
1595
  let w = ze();
1574
1596
  l === void 0 && w !== null && (l = (w & z.Open) === z.Open);
1575
- let c = O(null), v = Z(c, t), u = Me(c), m = l ? 0 : 1, [p, g] = wn(il, { titleId: null, descriptionId: null, panelRef: yn() }), x = L(() => a(!1)), h = L((k) => g({ type: 0, id: k })), $ = Le() ? m === 0 : !1, [F, j] = Ir(), _ = { get current() {
1576
- var k;
1577
- return (k = p.panelRef.current) != null ? k : c.current;
1578
- } }, N = Qt(), { resolveContainers: U } = Hr({ mainTreeNode: N, portals: F, defaultContainers: [_] }), B = w !== null ? (w & z.Closing) === z.Closing : !1;
1579
- Jn(d || B ? !1 : $, { allowed: L(() => {
1580
- var k, ke;
1581
- return [(ke = (k = c.current) == null ? void 0 : k.closest("[data-headlessui-portal]")) != null ? ke : null];
1597
+ let d = O(null), v = Z(d, t), u = Me(d), m = l ? 0 : 1, [p, g] = yn(ol, { titleId: null, descriptionId: null, panelRef: bn() }), y = L(() => o(!1)), h = L((N) => g({ type: 0, id: N })), $ = Le() ? m === 0 : !1, [F, j] = Rr(), _ = { get current() {
1598
+ var N;
1599
+ return (N = p.panelRef.current) != null ? N : d.current;
1600
+ } }, A = tn(), { resolveContainers: U } = Wr({ mainTreeNode: A, portals: F, defaultContainers: [_] }), B = w !== null ? (w & z.Closing) === z.Closing : !1;
1601
+ Qn(c || B ? !1 : $, { allowed: L(() => {
1602
+ var N, Ne;
1603
+ return [(Ne = (N = d.current) == null ? void 0 : N.closest("[data-headlessui-portal]")) != null ? Ne : null];
1582
1604
  }), disallowed: L(() => {
1583
- var k;
1584
- return [(k = N == null ? void 0 : N.closest("body > *:not(#headlessui-portal-root)")) != null ? k : null];
1585
- }) }), cr($, U, (k) => {
1586
- k.preventDefault(), x();
1587
- }), jr($, u == null ? void 0 : u.defaultView, (k) => {
1588
- k.preventDefault(), k.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), x();
1589
- }), gr(d || B ? !1 : $, u, U), Qn($, c, x);
1590
- let [X, P] = Bn(), V = C(() => [{ dialogState: m, close: x, setTitleId: h, unmount: f }, p], [m, p, x, h, f]), Se = C(() => ({ open: m === 0 }), [m]), Fe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": d ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": p.titleId, "aria-describedby": X, unmount: f }, pe = !Ur(), K = ie.None;
1591
- $ && !d && (K |= ie.RestoreFocus, K |= ie.TabLock, i && (K |= ie.AutoFocus), pe && (K |= ie.InitialFocus));
1605
+ var N;
1606
+ return [(N = A == null ? void 0 : A.closest("body > *:not(#headlessui-portal-root)")) != null ? N : null];
1607
+ }) }), fr($, U, (N) => {
1608
+ N.preventDefault(), y();
1609
+ }), Ur($, u == null ? void 0 : u.defaultView, (N) => {
1610
+ N.preventDefault(), N.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), y();
1611
+ }), wr(c || B ? !1 : $, u, U), er($, d, y);
1612
+ let [X, P] = Xn(), V = C(() => [{ dialogState: m, close: y, setTitleId: h, unmount: f }, p], [m, p, y, h, f]), Se = C(() => ({ open: m === 0 }), [m]), Fe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": c ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": p.titleId, "aria-describedby": X, unmount: f }, pe = !Hr(), K = ie.None;
1613
+ $ && !c && (K |= ie.RestoreFocus, K |= ie.TabLock, i && (K |= ie.AutoFocus), pe && (K |= ie.InitialFocus));
1592
1614
  let Ce = W();
1593
- return E.createElement(Pr, null, E.createElement(Pt, { force: !0 }, E.createElement(Dr, null, E.createElement(wt.Provider, { value: V }, E.createElement(Zt, { target: c }, E.createElement(Pt, { force: !1 }, E.createElement(P, { slot: Se }, E.createElement(j, null, E.createElement(Vr, { initialFocus: o, initialFocusFallback: c, containers: U, features: K }, E.createElement(Gn, { value: x }, Ce({ ourProps: Fe, theirProps: y, slot: Se, defaultTag: al, features: ol, visible: m === 0, name: "Dialog" })))))))))));
1594
- }), al = "div", ol = Ue.RenderStrategy | Ue.Static;
1595
- function sl(e, t) {
1596
- let { transition: n = !1, open: r, ...l } = e, a = ze(), o = e.hasOwnProperty("open") || a !== null, s = e.hasOwnProperty("onClose");
1597
- if (!o && !s) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
1598
- if (!o) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
1615
+ return E.createElement(Mr, null, E.createElement(Mt, { force: !0 }, E.createElement(jr, null, E.createElement(wt.Provider, { value: V }, E.createElement(Qt, { target: d }, E.createElement(Mt, { force: !1 }, E.createElement(P, { slot: Se }, E.createElement(j, null, E.createElement(qr, { initialFocus: a, initialFocusFallback: d, containers: U, features: K }, E.createElement(Kn, { value: y }, Ce({ ourProps: Fe, theirProps: x, slot: Se, defaultTag: al, features: sl, visible: m === 0, name: "Dialog" })))))))))));
1616
+ }), al = "div", sl = Ue.RenderStrategy | Ue.Static;
1617
+ function ul(e, t) {
1618
+ let { transition: n = !1, open: r, ...l } = e, o = ze(), a = e.hasOwnProperty("open") || o !== null, s = e.hasOwnProperty("onClose");
1619
+ if (!a && !s) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
1620
+ if (!a) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
1599
1621
  if (!s) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
1600
- if (!a && typeof e.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);
1622
+ if (!o && typeof e.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);
1601
1623
  if (typeof e.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);
1602
- return (r !== void 0 || n) && !l.static ? E.createElement(Mt, null, E.createElement(sn, { show: r, transition: n, unmount: l.unmount }, E.createElement(Lt, { ref: t, ...l }))) : E.createElement(Mt, null, E.createElement(Lt, { ref: t, open: r, ...l }));
1624
+ return (r !== void 0 || n) && !l.static ? E.createElement(Lt, null, E.createElement(cn, { show: r, transition: n, unmount: l.unmount }, E.createElement(St, { ref: t, ...l }))) : E.createElement(Lt, null, E.createElement(St, { ref: t, open: r, ...l }));
1603
1625
  }
1604
- let ul = "div";
1626
+ let cl = "div";
1605
1627
  function dl(e, t) {
1606
- let n = Pe(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...a } = e, [{ dialogState: o, unmount: s }, i] = Je("Dialog.Panel"), d = Z(t, i.panelRef), f = C(() => ({ open: o === 0 }), [o]), y = L((u) => {
1628
+ let n = Pe(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...o } = e, [{ dialogState: a, unmount: s }, i] = Je("Dialog.Panel"), c = Z(t, i.panelRef), f = C(() => ({ open: a === 0 }), [a]), x = L((u) => {
1607
1629
  u.stopPropagation();
1608
- }), b = { ref: d, id: r, onClick: y }, w = l ? me : G, c = l ? { unmount: s } : {}, v = W();
1609
- return E.createElement(w, { ...c }, v({ ourProps: b, theirProps: a, slot: f, defaultTag: ul, name: "Dialog.Panel" }));
1610
- }
1611
- let cl = "div";
1612
- function fl(e, t) {
1613
- let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount: a }] = Je("Dialog.Backdrop"), o = C(() => ({ open: l === 0 }), [l]), s = { ref: t, "aria-hidden": !0 }, i = n ? me : G, d = n ? { unmount: a } : {}, f = W();
1614
- return E.createElement(i, { ...d }, f({ ourProps: s, theirProps: r, slot: o, defaultTag: cl, name: "Dialog.Backdrop" }));
1615
- }
1616
- let ml = "h2";
1617
- function pl(e, t) {
1618
- let n = Pe(), { id: r = `headlessui-dialog-title-${n}`, ...l } = e, [{ dialogState: a, setTitleId: o }] = Je("Dialog.Title"), s = Z(t);
1619
- M(() => (o(r), () => o(null)), [r, o]);
1620
- let i = C(() => ({ open: a === 0 }), [a]), d = { ref: s, id: r };
1621
- return W()({ ourProps: d, theirProps: l, slot: i, defaultTag: ml, name: "Dialog.Title" });
1622
- }
1623
- let hl = D(sl), yt = D(dl);
1624
- D(fl);
1625
- let vl = D(pl), gl = Object.assign(hl, { Panel: yt, Title: vl, Description: Yn });
1626
- function un({ onClick: e }) {
1630
+ }), b = { ref: c, id: r, onClick: x }, w = l ? me : G, d = l ? { unmount: s } : {}, v = W();
1631
+ return E.createElement(w, { ...d }, v({ ourProps: b, theirProps: o, slot: f, defaultTag: cl, name: "Dialog.Panel" }));
1632
+ }
1633
+ let fl = "div";
1634
+ function ml(e, t) {
1635
+ let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount: o }] = Je("Dialog.Backdrop"), a = C(() => ({ open: l === 0 }), [l]), s = { ref: t, "aria-hidden": !0 }, i = n ? me : G, c = n ? { unmount: o } : {}, f = W();
1636
+ return E.createElement(i, { ...c }, f({ ourProps: s, theirProps: r, slot: a, defaultTag: fl, name: "Dialog.Backdrop" }));
1637
+ }
1638
+ let pl = "h2";
1639
+ function hl(e, t) {
1640
+ let n = Pe(), { id: r = `headlessui-dialog-title-${n}`, ...l } = e, [{ dialogState: o, setTitleId: a }] = Je("Dialog.Title"), s = Z(t);
1641
+ M(() => (a(r), () => a(null)), [r, a]);
1642
+ let i = C(() => ({ open: o === 0 }), [o]), c = { ref: s, id: r };
1643
+ return W()({ ourProps: c, theirProps: l, slot: i, defaultTag: pl, name: "Dialog.Title" });
1644
+ }
1645
+ let vl = D(ul), xt = D(dl);
1646
+ D(ml);
1647
+ let gl = D(hl), wl = Object.assign(vl, { Panel: xt, Title: gl, Description: zn });
1648
+ function dn({ onClick: e }) {
1627
1649
  return /* @__PURE__ */ se(
1628
1650
  "button",
1629
1651
  {
@@ -1656,7 +1678,7 @@ function un({ onClick: e }) {
1656
1678
  }
1657
1679
  );
1658
1680
  }
1659
- const wl = ({ modalContext: e, config: t, children: n }) => {
1681
+ const xl = ({ modalContext: e, config: t, children: n }) => {
1660
1682
  const [r, l] = S(!1);
1661
1683
  return /* @__PURE__ */ T("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ T(
1662
1684
  "div",
@@ -1689,12 +1711,12 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1689
1711
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.maxWidth === "7xl"
1690
1712
  }),
1691
1713
  children: /* @__PURE__ */ se(
1692
- yt,
1714
+ xt,
1693
1715
  {
1694
1716
  className: `im-modal-content relative ${t.paddingClasses} ${t.panelClasses}`,
1695
1717
  "data-inertiaui-modal-entered": r,
1696
1718
  children: [
1697
- t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(un, { onClick: e.close }) }),
1719
+ t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(dn, { onClick: e.close }) }),
1698
1720
  typeof n == "function" ? n({ modalContext: e, config: t }) : n
1699
1721
  ]
1700
1722
  }
@@ -1735,12 +1757,12 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1735
1757
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.maxWidth === "7xl"
1736
1758
  }),
1737
1759
  children: /* @__PURE__ */ se(
1738
- yt,
1760
+ xt,
1739
1761
  {
1740
1762
  className: `im-slideover-content relative ${t.paddingClasses} ${t.panelClasses}`,
1741
1763
  "data-inertiaui-modal-entered": r,
1742
1764
  children: [
1743
- t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(un, { onClick: e.close }) }),
1765
+ t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(dn, { onClick: e.close }) }),
1744
1766
  typeof n == "function" ? n({ modalContext: e, config: t }) : n
1745
1767
  ]
1746
1768
  }
@@ -1749,41 +1771,41 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1749
1771
  )
1750
1772
  }
1751
1773
  ) });
1752
- }, xl = dt(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: a = null, onAfterLeave: o = null, ...s }, i) => {
1753
- const d = (y) => typeof t == "function" ? t(y) : t, f = O(null);
1754
- return St(i, () => f.current, [f]), /* @__PURE__ */ T(
1755
- It,
1774
+ }, bl = ct(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: o = null, onAfterLeave: a = null, ...s }, i) => {
1775
+ const c = (x) => typeof t == "function" ? t(x) : t, f = O(null);
1776
+ return Ft(i, () => f.current, [f]), /* @__PURE__ */ T(
1777
+ Dt,
1756
1778
  {
1757
1779
  ref: f,
1758
1780
  name: e,
1759
1781
  onFocus: n,
1760
1782
  onBlur: r,
1761
1783
  onClose: l,
1762
- onSuccess: a,
1784
+ onSuccess: o,
1763
1785
  ...s,
1764
1786
  children: ({
1765
- afterLeave: y,
1787
+ afterLeave: x,
1766
1788
  close: b,
1767
1789
  config: w,
1768
- emit: c,
1790
+ emit: d,
1769
1791
  getChildModal: v,
1770
1792
  getParentModal: u,
1771
1793
  id: m,
1772
1794
  index: p,
1773
1795
  isOpen: g,
1774
- modalContext: x,
1796
+ modalContext: y,
1775
1797
  onTopOfStack: h,
1776
1798
  reload: $,
1777
1799
  setOpen: F,
1778
1800
  shouldRender: j
1779
1801
  }) => /* @__PURE__ */ T(
1780
- sn,
1802
+ cn,
1781
1803
  {
1782
1804
  appear: !0,
1783
1805
  show: g ?? !1,
1784
- afterLeave: o,
1806
+ afterLeave: a,
1785
1807
  children: /* @__PURE__ */ se(
1786
- gl,
1808
+ wl,
1787
1809
  {
1788
1810
  as: "div",
1789
1811
  className: "im-dialog relative z-20",
@@ -1813,19 +1835,19 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1813
1835
  w.slideover ? /* @__PURE__ */ T(
1814
1836
  yl,
1815
1837
  {
1816
- modalContext: x,
1838
+ modalContext: y,
1817
1839
  config: w,
1818
- children: d({
1819
- afterLeave: y,
1840
+ children: c({
1841
+ afterLeave: x,
1820
1842
  close: b,
1821
1843
  config: w,
1822
- emit: c,
1844
+ emit: d,
1823
1845
  getChildModal: v,
1824
1846
  getParentModal: u,
1825
1847
  id: m,
1826
1848
  index: p,
1827
1849
  isOpen: g,
1828
- modalContext: x,
1850
+ modalContext: y,
1829
1851
  onTopOfStack: h,
1830
1852
  reload: $,
1831
1853
  setOpen: F,
@@ -1833,21 +1855,21 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1833
1855
  })
1834
1856
  }
1835
1857
  ) : /* @__PURE__ */ T(
1836
- wl,
1858
+ xl,
1837
1859
  {
1838
- modalContext: x,
1860
+ modalContext: y,
1839
1861
  config: w,
1840
- children: d({
1841
- afterLeave: y,
1862
+ children: c({
1863
+ afterLeave: x,
1842
1864
  close: b,
1843
1865
  config: w,
1844
- emit: c,
1866
+ emit: d,
1845
1867
  getChildModal: v,
1846
1868
  getParentModal: u,
1847
1869
  id: m,
1848
1870
  index: p,
1849
1871
  isOpen: g,
1850
- modalContext: x,
1872
+ modalContext: y,
1851
1873
  onTopOfStack: h,
1852
1874
  reload: $,
1853
1875
  setOpen: F,
@@ -1863,56 +1885,56 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1863
1885
  }
1864
1886
  );
1865
1887
  });
1866
- xl.displayName = "Modal";
1867
- const Nl = ({
1888
+ bl.displayName = "Modal";
1889
+ const kl = ({
1868
1890
  href: e,
1869
1891
  method: t = "get",
1870
1892
  data: n = {},
1871
1893
  as: r = "a",
1872
1894
  headers: l = {},
1873
- queryStringArrayFormat: a = "brackets",
1874
- onAfterLeave: o = null,
1895
+ queryStringArrayFormat: o = "brackets",
1896
+ onAfterLeave: a = null,
1875
1897
  onBlur: s = null,
1876
1898
  onClose: i = null,
1877
- onError: d = null,
1899
+ onError: c = null,
1878
1900
  onFocus: f = null,
1879
- onStart: y = null,
1901
+ onStart: x = null,
1880
1902
  onSuccess: b = null,
1881
1903
  navigate: w = null,
1882
- children: c,
1904
+ children: d,
1883
1905
  ...v
1884
1906
  }) => {
1885
- const [u, m] = S(!1), [p, g] = S(null), { stack: x, visit: h } = Xe(), $ = C(() => w ?? ft("navigate"), [w]), F = {}, j = {};
1907
+ const [u, m] = S(!1), [p, g] = S(null), { stack: y, visit: h } = Xe(), $ = C(() => w ?? ft("navigate"), [w]), F = {}, j = {};
1886
1908
  Object.keys(v).forEach((P) => {
1887
- xt.includes(P) || (P.startsWith("on") && typeof v[P] == "function" ? P.toLowerCase() in window ? F[P] = v[P] : j[P] = v[P] : F[P] = v[P]);
1909
+ bt.includes(P) || (P.startsWith("on") && typeof v[P] == "function" ? P.toLowerCase() in window ? F[P] = v[P] : j[P] = v[P] : F[P] = v[P]);
1888
1910
  });
1889
- const [_, N] = S(!1);
1911
+ const [_, A] = S(!1);
1890
1912
  M(() => {
1891
- p && (p.onTopOfStack && _ ? f == null || f() : !p.onTopOfStack && !_ && (s == null || s()), N(!p.onTopOfStack));
1892
- }, [x]);
1913
+ p && (p.onTopOfStack && _ ? f == null || f() : !p.onTopOfStack && !_ && (s == null || s()), A(!p.onTopOfStack));
1914
+ }, [y]);
1893
1915
  const U = Y(() => {
1894
1916
  i == null || i();
1895
1917
  }, [i]), B = Y(() => {
1896
- g(null), o == null || o();
1897
- }, [o]), X = Y(
1918
+ g(null), a == null || a();
1919
+ }, [a]), X = Y(
1898
1920
  (P) => {
1899
- P == null || P.preventDefault(), !u && (e.startsWith("#") || (m(!0), y == null || y()), h(
1921
+ P == null || P.preventDefault(), !u && (e.startsWith("#") || (m(!0), x == null || x()), h(
1900
1922
  e,
1901
1923
  t,
1902
1924
  n,
1903
1925
  l,
1904
- Pn(Ft(v, xt)),
1905
- () => U(x.length),
1926
+ Mn(Nt(v, bt)),
1927
+ () => U(y.length),
1906
1928
  B,
1907
- a,
1929
+ o,
1908
1930
  $
1909
1931
  ).then((V) => {
1910
1932
  g(V), V.registerEventListenersFromProps(j), b == null || b();
1911
1933
  }).catch((V) => {
1912
- console.error(V), d == null || d(V);
1934
+ console.error(V), c == null || c(V);
1913
1935
  }).finally(() => m(!1)));
1914
1936
  },
1915
- [e, t, n, l, a, v, U, B]
1937
+ [e, t, n, l, o, v, U, B]
1916
1938
  );
1917
1939
  return /* @__PURE__ */ T(
1918
1940
  r,
@@ -1920,27 +1942,27 @@ const Nl = ({
1920
1942
  ...F,
1921
1943
  href: e,
1922
1944
  onClick: X,
1923
- children: typeof c == "function" ? c({ loading: u }) : c
1945
+ children: typeof d == "function" ? d({ loading: u }) : d
1924
1946
  }
1925
1947
  );
1926
1948
  };
1927
- function Al() {
1928
- return Xe().stack[Nt()] ?? null;
1949
+ function Il() {
1950
+ return Xe().stack[It()] ?? null;
1929
1951
  }
1930
- const Il = (e) => (t) => (t.default.layout = (n) => Re(e, {}, n), t);
1952
+ const Rl = (e) => (t) => (t.default.layout = (n) => Re(e, {}, n), t);
1931
1953
  export {
1932
- It as HeadlessModal,
1933
- xl as Modal,
1934
- Nl as ModalLink,
1935
- Fn as ModalRoot,
1936
- Ln as ModalStackProvider,
1954
+ Dt as HeadlessModal,
1955
+ bl as Modal,
1956
+ kl as ModalLink,
1957
+ Cn as ModalRoot,
1958
+ Sn as ModalStackProvider,
1937
1959
  ft as getConfig,
1938
- Sn as initFromPageProps,
1939
- Sl as putConfig,
1940
- Fl as renderApp,
1941
- Ll as resetConfig,
1942
- Il as setPageLayout,
1943
- Al as useModal,
1944
- Nt as useModalIndex,
1960
+ Fn as initFromPageProps,
1961
+ Fl as putConfig,
1962
+ Cl as renderApp,
1963
+ Sl as resetConfig,
1964
+ Rl as setPageLayout,
1965
+ Il as useModal,
1966
+ It as useModalIndex,
1945
1967
  Xe as useModalStack
1946
1968
  };