@inertiaui/modal-react 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- var Zr = Object.defineProperty;
2
- var Qr = (t, e, r) => e in t ? Zr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var se = (t, e, r) => Qr(t, typeof e != "symbol" ? e + "" : e, r);
4
- import * as Ie from "react";
5
- import X, { createContext as Ge, useState as re, useEffect as G, useContext as Oe, useRef as Y, createElement as Ke, useMemo as ve, forwardRef as xt, useImperativeHandle as Zt, useLayoutEffect as en, useCallback as ue, Fragment as we, isValidElement as tn, cloneElement as rn } from "react";
6
- import Ve from "axios";
7
- import { router as Ae, usePage as nn } from "@inertiajs/react";
8
- import { mergeDataIntoQueryString as an } from "@inertiajs/core";
9
- const Pe = {
1
+ var en = Object.defineProperty;
2
+ var tn = (t, e, r) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var oe = (t, e, r) => tn(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import * as _e from "react";
5
+ import J, { createContext as Je, useState as z, useEffect as X, useContext as Pe, useRef as q, createElement as Ve, useMemo as ve, forwardRef as Tt, useImperativeHandle as er, useLayoutEffect as rn, useCallback as ue, Fragment as we, isValidElement as nn, cloneElement as an } from "react";
6
+ import He from "axios";
7
+ import { router as Ie, usePage as sn } from "@inertiajs/react";
8
+ import { mergeDataIntoQueryString as ln } from "@inertiajs/core";
9
+ const ke = {
10
10
  type: "modal",
11
11
  navigate: !1,
12
12
  modal: {
@@ -26,44 +26,44 @@ const Pe = {
26
26
  position: "right"
27
27
  }
28
28
  };
29
- class sn {
29
+ class on {
30
30
  constructor() {
31
31
  this.config = {}, this.reset();
32
32
  }
33
33
  reset() {
34
- this.config = JSON.parse(JSON.stringify(Pe));
34
+ this.config = JSON.parse(JSON.stringify(ke));
35
35
  }
36
36
  put(e, r) {
37
37
  if (typeof e == "object") {
38
38
  this.config = {
39
- type: e.type ?? Pe.type,
40
- navigate: e.navigate ?? Pe.navigate,
41
- modal: { ...Pe.modal, ...e.modal ?? {} },
42
- slideover: { ...Pe.slideover, ...e.slideover ?? {} }
39
+ type: e.type ?? ke.type,
40
+ navigate: e.navigate ?? ke.navigate,
41
+ modal: { ...ke.modal, ...e.modal ?? {} },
42
+ slideover: { ...ke.slideover, ...e.slideover ?? {} }
43
43
  };
44
44
  return;
45
45
  }
46
46
  const n = e.split(".");
47
- let i = this.config;
47
+ let s = this.config;
48
48
  for (let l = 0; l < n.length - 1; l++)
49
- i = i[n[l]] = i[n[l]] || {};
50
- i[n[n.length - 1]] = r;
49
+ s = s[n[l]] = s[n[l]] || {};
50
+ s[n[n.length - 1]] = r;
51
51
  }
52
52
  get(e) {
53
53
  if (typeof e > "u")
54
54
  return this.config;
55
55
  const r = e.split(".");
56
56
  let n = this.config;
57
- for (const i of r) {
58
- if (n[i] === void 0)
57
+ for (const s of r) {
58
+ if (n[s] === void 0)
59
59
  return null;
60
- n = n[i];
60
+ n = n[s];
61
61
  }
62
62
  return n;
63
63
  }
64
64
  }
65
- const Je = new sn(), Oa = () => Je.reset(), Ca = (t, e) => Je.put(t, e), Et = (t) => Je.get(t), Re = (t, e) => Je.get(t ? `slideover.${e}` : `modal.${e}`);
66
- var pt = { exports: {} }, Fe = {};
65
+ const Ze = new on(), Ca = () => Ze.reset(), ka = (t, e) => Ze.put(t, e), Rt = (t) => Ze.get(t), Re = (t, e) => Ze.get(t ? `slideover.${e}` : `modal.${e}`);
66
+ var mt = { exports: {} }, Fe = {};
67
67
  /**
68
68
  * @license React
69
69
  * react-jsx-runtime.production.min.js
@@ -73,21 +73,21 @@ var pt = { exports: {} }, Fe = {};
73
73
  * This source code is licensed under the MIT license found in the
74
74
  * LICENSE file in the root directory of this source tree.
75
75
  */
76
- var Ut;
77
- function ln() {
78
- if (Ut) return Fe;
79
- Ut = 1;
80
- var t = X, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
81
- function s(m, o, g) {
82
- var v, E = {}, R = null, S = null;
83
- g !== void 0 && (R = "" + g), o.key !== void 0 && (R = "" + o.key), o.ref !== void 0 && (S = o.ref);
84
- for (v in o) n.call(o, v) && !l.hasOwnProperty(v) && (E[v] = o[v]);
85
- if (m && m.defaultProps) for (v in o = m.defaultProps, o) E[v] === void 0 && (E[v] = o[v]);
86
- return { $$typeof: e, type: m, key: R, ref: S, props: E, _owner: i.current };
76
+ var Kt;
77
+ function un() {
78
+ if (Kt) return Fe;
79
+ Kt = 1;
80
+ var t = J, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
81
+ function i(m, o, g) {
82
+ var y, w = {}, P = null, S = null;
83
+ g !== void 0 && (P = "" + g), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (S = o.ref);
84
+ for (y in o) n.call(o, y) && !l.hasOwnProperty(y) && (w[y] = o[y]);
85
+ if (m && m.defaultProps) for (y in o = m.defaultProps, o) w[y] === void 0 && (w[y] = o[y]);
86
+ return { $$typeof: e, type: m, key: P, ref: S, props: w, _owner: s.current };
87
87
  }
88
- return Fe.Fragment = r, Fe.jsx = s, Fe.jsxs = s, Fe;
88
+ return Fe.Fragment = r, Fe.jsx = i, Fe.jsxs = i, Fe;
89
89
  }
90
- var ke = {};
90
+ var Ne = {};
91
91
  /**
92
92
  * @license React
93
93
  * react-jsx-runtime.development.js
@@ -97,57 +97,57 @@ var ke = {};
97
97
  * This source code is licensed under the MIT license found in the
98
98
  * LICENSE file in the root directory of this source tree.
99
99
  */
100
- var Bt;
101
- function on() {
102
- return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && function() {
103
- var t = X, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), m = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), w = Symbol.iterator, f = "@@iterator";
100
+ var Vt;
101
+ function cn() {
102
+ return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
103
+ var t = J, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), m = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), p = Symbol.iterator, E = "@@iterator";
104
104
  function d(a) {
105
105
  if (a === null || typeof a != "object")
106
106
  return null;
107
- var h = w && a[w] || a[f];
107
+ var h = p && a[p] || a[E];
108
108
  return typeof h == "function" ? h : null;
109
109
  }
110
- var p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
111
- function b(a) {
110
+ var f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
111
+ function v(a) {
112
112
  {
113
113
  for (var h = arguments.length, x = new Array(h > 1 ? h - 1 : 0), C = 1; C < h; C++)
114
114
  x[C - 1] = arguments[C];
115
- T("error", a, x);
115
+ R("error", a, x);
116
116
  }
117
117
  }
118
- function T(a, h, x) {
118
+ function R(a, h, x) {
119
119
  {
120
- var C = p.ReactDebugCurrentFrame, D = C.getStackAddendum();
121
- D !== "" && (h += "%s", x = x.concat([D]));
122
- var L = x.map(function(j) {
123
- return String(j);
120
+ var C = f.ReactDebugCurrentFrame, M = C.getStackAddendum();
121
+ M !== "" && (h += "%s", x = x.concat([M]));
122
+ var $ = x.map(function(A) {
123
+ return String(A);
124
124
  });
125
- L.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, L);
125
+ $.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, $);
126
126
  }
127
127
  }
128
- var O = !1, A = !1, le = !1, K = !1, J = !1, Q;
129
- Q = Symbol.for("react.module.reference");
130
- function H(a) {
131
- return !!(typeof a == "string" || typeof a == "function" || a === n || a === l || J || a === i || a === g || a === v || K || a === S || O || A || le || typeof a == "object" && a !== null && (a.$$typeof === R || a.$$typeof === E || a.$$typeof === s || a.$$typeof === m || a.$$typeof === o || // This needs to include all possible module reference object
128
+ var O = !1, b = !1, D = !1, B = !1, Z = !1, ee;
129
+ ee = Symbol.for("react.module.reference");
130
+ function Y(a) {
131
+ return !!(typeof a == "string" || typeof a == "function" || a === n || a === l || Z || a === s || a === g || a === y || B || a === S || O || b || D || typeof a == "object" && a !== null && (a.$$typeof === P || a.$$typeof === w || a.$$typeof === i || a.$$typeof === m || a.$$typeof === o || // This needs to include all possible module reference object
132
132
  // types supported by any Flight configuration anywhere since
133
133
  // we don't know which Flight build this will end up being used
134
134
  // with.
135
- a.$$typeof === Q || a.getModuleId !== void 0));
135
+ a.$$typeof === ee || a.getModuleId !== void 0));
136
136
  }
137
- function q(a, h, x) {
137
+ function G(a, h, x) {
138
138
  var C = a.displayName;
139
139
  if (C)
140
140
  return C;
141
- var D = h.displayName || h.name || "";
142
- return D !== "" ? x + "(" + D + ")" : x;
141
+ var M = h.displayName || h.name || "";
142
+ return M !== "" ? x + "(" + M + ")" : x;
143
143
  }
144
- function N(a) {
144
+ function j(a) {
145
145
  return a.displayName || "Context";
146
146
  }
147
147
  function u(a) {
148
148
  if (a == null)
149
149
  return null;
150
- if (typeof a.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
150
+ if (typeof a.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
151
151
  return a.displayName || a.name || null;
152
152
  if (typeof a == "string")
153
153
  return a;
@@ -158,30 +158,30 @@ function on() {
158
158
  return "Portal";
159
159
  case l:
160
160
  return "Profiler";
161
- case i:
161
+ case s:
162
162
  return "StrictMode";
163
163
  case g:
164
164
  return "Suspense";
165
- case v:
165
+ case y:
166
166
  return "SuspenseList";
167
167
  }
168
168
  if (typeof a == "object")
169
169
  switch (a.$$typeof) {
170
170
  case m:
171
171
  var h = a;
172
- return N(h) + ".Consumer";
173
- case s:
172
+ return j(h) + ".Consumer";
173
+ case i:
174
174
  var x = a;
175
- return N(x._context) + ".Provider";
175
+ return j(x._context) + ".Provider";
176
176
  case o:
177
- return q(a, a.render, "ForwardRef");
178
- case E:
177
+ return G(a, a.render, "ForwardRef");
178
+ case w:
179
179
  var C = a.displayName || null;
180
180
  return C !== null ? C : u(a.type) || "Memo";
181
- case R: {
182
- var D = a, L = D._payload, j = D._init;
181
+ case P: {
182
+ var M = a, $ = M._payload, A = M._init;
183
183
  try {
184
- return u(j(L));
184
+ return u(A($));
185
185
  } catch {
186
186
  return null;
187
187
  }
@@ -189,18 +189,18 @@ function on() {
189
189
  }
190
190
  return null;
191
191
  }
192
- var c = Object.assign, y = 0, I, _, M, P, $, W, ne;
193
- function U() {
192
+ var c = Object.assign, T = 0, I, _, L, k, W, U, ae;
193
+ function K() {
194
194
  }
195
- U.__reactDisabledLog = !0;
196
- function ae() {
195
+ K.__reactDisabledLog = !0;
196
+ function ie() {
197
197
  {
198
- if (y === 0) {
199
- I = console.log, _ = console.info, M = console.warn, P = console.error, $ = console.group, W = console.groupCollapsed, ne = console.groupEnd;
198
+ if (T === 0) {
199
+ I = console.log, _ = console.info, L = console.warn, k = console.error, W = console.group, U = console.groupCollapsed, ae = console.groupEnd;
200
200
  var a = {
201
201
  configurable: !0,
202
202
  enumerable: !0,
203
- value: U,
203
+ value: K,
204
204
  writable: !0
205
205
  };
206
206
  Object.defineProperties(console, {
@@ -213,12 +213,12 @@ function on() {
213
213
  groupEnd: a
214
214
  });
215
215
  }
216
- y++;
216
+ T++;
217
217
  }
218
218
  }
219
- function ee() {
219
+ function re() {
220
220
  {
221
- if (y--, y === 0) {
221
+ if (T--, T === 0) {
222
222
  var a = {
223
223
  configurable: !0,
224
224
  enumerable: !0,
@@ -232,209 +232,209 @@ function on() {
232
232
  value: _
233
233
  }),
234
234
  warn: c({}, a, {
235
- value: M
235
+ value: L
236
236
  }),
237
237
  error: c({}, a, {
238
- value: P
238
+ value: k
239
239
  }),
240
240
  group: c({}, a, {
241
- value: $
241
+ value: W
242
242
  }),
243
243
  groupCollapsed: c({}, a, {
244
- value: W
244
+ value: U
245
245
  }),
246
246
  groupEnd: c({}, a, {
247
- value: ne
247
+ value: ae
248
248
  })
249
249
  });
250
250
  }
251
- y < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
251
+ T < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
252
252
  }
253
253
  }
254
- var fe = p.ReactCurrentDispatcher, oe;
255
- function te(a, h, x) {
254
+ var fe = f.ReactCurrentDispatcher, le;
255
+ function ne(a, h, x) {
256
256
  {
257
- if (oe === void 0)
257
+ if (le === void 0)
258
258
  try {
259
259
  throw Error();
260
- } catch (D) {
261
- var C = D.stack.trim().match(/\n( *(at )?)/);
262
- oe = C && C[1] || "";
260
+ } catch (M) {
261
+ var C = M.stack.trim().match(/\n( *(at )?)/);
262
+ le = C && C[1] || "";
263
263
  }
264
264
  return `
265
- ` + oe + a;
265
+ ` + le + a;
266
266
  }
267
267
  }
268
- var ce = !1, Me;
268
+ var ce = !1, Le;
269
269
  {
270
- var Cr = typeof WeakMap == "function" ? WeakMap : Map;
271
- Me = new Cr();
270
+ var kr = typeof WeakMap == "function" ? WeakMap : Map;
271
+ Le = new kr();
272
272
  }
273
- function Ot(a, h) {
273
+ function Ct(a, h) {
274
274
  if (!a || ce)
275
275
  return "";
276
276
  {
277
- var x = Me.get(a);
277
+ var x = Le.get(a);
278
278
  if (x !== void 0)
279
279
  return x;
280
280
  }
281
281
  var C;
282
282
  ce = !0;
283
- var D = Error.prepareStackTrace;
283
+ var M = Error.prepareStackTrace;
284
284
  Error.prepareStackTrace = void 0;
285
- var L;
286
- L = fe.current, fe.current = null, ae();
285
+ var $;
286
+ $ = fe.current, fe.current = null, ie();
287
287
  try {
288
288
  if (h) {
289
- var j = function() {
289
+ var A = function() {
290
290
  throw Error();
291
291
  };
292
- if (Object.defineProperty(j.prototype, "props", {
292
+ if (Object.defineProperty(A.prototype, "props", {
293
293
  set: function() {
294
294
  throw Error();
295
295
  }
296
296
  }), typeof Reflect == "object" && Reflect.construct) {
297
297
  try {
298
- Reflect.construct(j, []);
299
- } catch (Z) {
300
- C = Z;
298
+ Reflect.construct(A, []);
299
+ } catch (te) {
300
+ C = te;
301
301
  }
302
- Reflect.construct(a, [], j);
302
+ Reflect.construct(a, [], A);
303
303
  } else {
304
304
  try {
305
- j.call();
306
- } catch (Z) {
307
- C = Z;
305
+ A.call();
306
+ } catch (te) {
307
+ C = te;
308
308
  }
309
- a.call(j.prototype);
309
+ a.call(A.prototype);
310
310
  }
311
311
  } else {
312
312
  try {
313
313
  throw Error();
314
- } catch (Z) {
315
- C = Z;
314
+ } catch (te) {
315
+ C = te;
316
316
  }
317
317
  a();
318
318
  }
319
- } catch (Z) {
320
- if (Z && C && typeof Z.stack == "string") {
321
- for (var k = Z.stack.split(`
322
- `), z = C.stack.split(`
323
- `), B = k.length - 1, V = z.length - 1; B >= 1 && V >= 0 && k[B] !== z[V]; )
324
- V--;
325
- for (; B >= 1 && V >= 0; B--, V--)
326
- if (k[B] !== z[V]) {
327
- if (B !== 1 || V !== 1)
319
+ } catch (te) {
320
+ if (te && C && typeof te.stack == "string") {
321
+ for (var N = te.stack.split(`
322
+ `), Q = C.stack.split(`
323
+ `), V = N.length - 1, H = Q.length - 1; V >= 1 && H >= 0 && N[V] !== Q[H]; )
324
+ H--;
325
+ for (; V >= 1 && H >= 0; V--, H--)
326
+ if (N[V] !== Q[H]) {
327
+ if (V !== 1 || H !== 1)
328
328
  do
329
- if (B--, V--, V < 0 || k[B] !== z[V]) {
330
- var ie = `
331
- ` + k[B].replace(" at new ", " at ");
332
- return a.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", a.displayName)), typeof a == "function" && Me.set(a, ie), ie;
329
+ if (V--, H--, H < 0 || N[V] !== Q[H]) {
330
+ var se = `
331
+ ` + N[V].replace(" at new ", " at ");
332
+ return a.displayName && se.includes("<anonymous>") && (se = se.replace("<anonymous>", a.displayName)), typeof a == "function" && Le.set(a, se), se;
333
333
  }
334
- while (B >= 1 && V >= 0);
334
+ while (V >= 1 && H >= 0);
335
335
  break;
336
336
  }
337
337
  }
338
338
  } finally {
339
- ce = !1, fe.current = L, ee(), Error.prepareStackTrace = D;
339
+ ce = !1, fe.current = $, re(), Error.prepareStackTrace = M;
340
340
  }
341
- var Te = a ? a.displayName || a.name : "", me = Te ? te(Te) : "";
342
- return typeof a == "function" && Me.set(a, me), me;
341
+ var Te = a ? a.displayName || a.name : "", me = Te ? ne(Te) : "";
342
+ return typeof a == "function" && Le.set(a, me), me;
343
343
  }
344
- function Pr(a, h, x) {
345
- return Ot(a, !1);
344
+ function Fr(a, h, x) {
345
+ return Ct(a, !1);
346
346
  }
347
- function Fr(a) {
347
+ function Nr(a) {
348
348
  var h = a.prototype;
349
349
  return !!(h && h.isReactComponent);
350
350
  }
351
- function Le(a, h, x) {
351
+ function $e(a, h, x) {
352
352
  if (a == null)
353
353
  return "";
354
354
  if (typeof a == "function")
355
- return Ot(a, Fr(a));
355
+ return Ct(a, Nr(a));
356
356
  if (typeof a == "string")
357
- return te(a);
357
+ return ne(a);
358
358
  switch (a) {
359
359
  case g:
360
- return te("Suspense");
361
- case v:
362
- return te("SuspenseList");
360
+ return ne("Suspense");
361
+ case y:
362
+ return ne("SuspenseList");
363
363
  }
364
364
  if (typeof a == "object")
365
365
  switch (a.$$typeof) {
366
366
  case o:
367
- return Pr(a.render);
368
- case E:
369
- return Le(a.type, h, x);
370
- case R: {
371
- var C = a, D = C._payload, L = C._init;
367
+ return Fr(a.render);
368
+ case w:
369
+ return $e(a.type, h, x);
370
+ case P: {
371
+ var C = a, M = C._payload, $ = C._init;
372
372
  try {
373
- return Le(L(D), h, x);
373
+ return $e($(M), h, x);
374
374
  } catch {
375
375
  }
376
376
  }
377
377
  }
378
378
  return "";
379
379
  }
380
- var Ce = Object.prototype.hasOwnProperty, Ct = {}, Pt = p.ReactDebugCurrentFrame;
381
- function $e(a) {
380
+ var Ce = Object.prototype.hasOwnProperty, kt = {}, Ft = f.ReactDebugCurrentFrame;
381
+ function We(a) {
382
382
  if (a) {
383
- var h = a._owner, x = Le(a.type, a._source, h ? h.type : null);
384
- Pt.setExtraStackFrame(x);
383
+ var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
384
+ Ft.setExtraStackFrame(x);
385
385
  } else
386
- Pt.setExtraStackFrame(null);
386
+ Ft.setExtraStackFrame(null);
387
387
  }
388
- function kr(a, h, x, C, D) {
388
+ function jr(a, h, x, C, M) {
389
389
  {
390
- var L = Function.call.bind(Ce);
391
- for (var j in a)
392
- if (L(a, j)) {
393
- var k = void 0;
390
+ var $ = Function.call.bind(Ce);
391
+ for (var A in a)
392
+ if ($(a, A)) {
393
+ var N = void 0;
394
394
  try {
395
- if (typeof a[j] != "function") {
396
- var z = Error((C || "React class") + ": " + x + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
397
- throw z.name = "Invariant Violation", z;
395
+ if (typeof a[A] != "function") {
396
+ var Q = Error((C || "React class") + ": " + x + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
397
+ throw Q.name = "Invariant Violation", Q;
398
398
  }
399
- k = a[j](h, j, C, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
- } catch (B) {
401
- k = B;
399
+ N = a[A](h, A, C, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
+ } catch (V) {
401
+ N = V;
402
402
  }
403
- k && !(k instanceof Error) && ($e(D), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", x, j, typeof k), $e(null)), k instanceof Error && !(k.message in Ct) && (Ct[k.message] = !0, $e(D), b("Failed %s type: %s", x, k.message), $e(null));
403
+ N && !(N instanceof Error) && (We(M), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", x, A, typeof N), We(null)), N instanceof Error && !(N.message in kt) && (kt[N.message] = !0, We(M), v("Failed %s type: %s", x, N.message), We(null));
404
404
  }
405
405
  }
406
406
  }
407
- var Nr = Array.isArray;
408
- function st(a) {
409
- return Nr(a);
407
+ var Ar = Array.isArray;
408
+ function lt(a) {
409
+ return Ar(a);
410
410
  }
411
- function jr(a) {
411
+ function Ir(a) {
412
412
  {
413
413
  var h = typeof Symbol == "function" && Symbol.toStringTag, x = h && a[Symbol.toStringTag] || a.constructor.name || "Object";
414
414
  return x;
415
415
  }
416
416
  }
417
- function Ar(a) {
417
+ function _r(a) {
418
418
  try {
419
- return Ft(a), !1;
419
+ return Nt(a), !1;
420
420
  } catch {
421
421
  return !0;
422
422
  }
423
423
  }
424
- function Ft(a) {
424
+ function Nt(a) {
425
425
  return "" + a;
426
426
  }
427
- function kt(a) {
428
- if (Ar(a))
429
- return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jr(a)), Ft(a);
427
+ function jt(a) {
428
+ if (_r(a))
429
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ir(a)), Nt(a);
430
430
  }
431
- var Nt = p.ReactCurrentOwner, Ir = {
431
+ var At = f.ReactCurrentOwner, Dr = {
432
432
  key: !0,
433
433
  ref: !0,
434
434
  __self: !0,
435
435
  __source: !0
436
- }, jt, At;
437
- function _r(a) {
436
+ }, It, _t;
437
+ function Mr(a) {
438
438
  if (Ce.call(a, "ref")) {
439
439
  var h = Object.getOwnPropertyDescriptor(a, "ref").get;
440
440
  if (h && h.isReactWarning)
@@ -442,7 +442,7 @@ function on() {
442
442
  }
443
443
  return a.ref !== void 0;
444
444
  }
445
- function Dr(a) {
445
+ function Lr(a) {
446
446
  if (Ce.call(a, "key")) {
447
447
  var h = Object.getOwnPropertyDescriptor(a, "key").get;
448
448
  if (h && h.isReactWarning)
@@ -450,13 +450,13 @@ function on() {
450
450
  }
451
451
  return a.key !== void 0;
452
452
  }
453
- function Mr(a, h) {
454
- typeof a.ref == "string" && Nt.current;
453
+ function $r(a, h) {
454
+ typeof a.ref == "string" && At.current;
455
455
  }
456
- function Lr(a, h) {
456
+ function Wr(a, h) {
457
457
  {
458
458
  var x = function() {
459
- jt || (jt = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
459
+ It || (It = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
460
460
  };
461
461
  x.isReactWarning = !0, Object.defineProperty(a, "key", {
462
462
  get: x,
@@ -464,10 +464,10 @@ function on() {
464
464
  });
465
465
  }
466
466
  }
467
- function $r(a, h) {
467
+ function Ur(a, h) {
468
468
  {
469
469
  var x = function() {
470
- At || (At = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
470
+ _t || (_t = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
471
471
  };
472
472
  x.isReactWarning = !0, Object.defineProperty(a, "ref", {
473
473
  get: x,
@@ -475,70 +475,70 @@ function on() {
475
475
  });
476
476
  }
477
477
  }
478
- var Wr = function(a, h, x, C, D, L, j) {
479
- var k = {
478
+ var Br = function(a, h, x, C, M, $, A) {
479
+ var N = {
480
480
  // This tag allows us to uniquely identify this as a React Element
481
481
  $$typeof: e,
482
482
  // Built-in properties that belong on the element
483
483
  type: a,
484
484
  key: h,
485
485
  ref: x,
486
- props: j,
486
+ props: A,
487
487
  // Record the component responsible for creating this element.
488
- _owner: L
488
+ _owner: $
489
489
  };
490
- return k._store = {}, Object.defineProperty(k._store, "validated", {
490
+ return N._store = {}, Object.defineProperty(N._store, "validated", {
491
491
  configurable: !1,
492
492
  enumerable: !1,
493
493
  writable: !0,
494
494
  value: !1
495
- }), Object.defineProperty(k, "_self", {
495
+ }), Object.defineProperty(N, "_self", {
496
496
  configurable: !1,
497
497
  enumerable: !1,
498
498
  writable: !1,
499
499
  value: C
500
- }), Object.defineProperty(k, "_source", {
500
+ }), Object.defineProperty(N, "_source", {
501
501
  configurable: !1,
502
502
  enumerable: !1,
503
503
  writable: !1,
504
- value: D
505
- }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
504
+ value: M
505
+ }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
506
506
  };
507
- function Ur(a, h, x, C, D) {
507
+ function Kr(a, h, x, C, M) {
508
508
  {
509
- var L, j = {}, k = null, z = null;
510
- x !== void 0 && (kt(x), k = "" + x), Dr(h) && (kt(h.key), k = "" + h.key), _r(h) && (z = h.ref, Mr(h, D));
511
- for (L in h)
512
- Ce.call(h, L) && !Ir.hasOwnProperty(L) && (j[L] = h[L]);
509
+ var $, A = {}, N = null, Q = null;
510
+ x !== void 0 && (jt(x), N = "" + x), Lr(h) && (jt(h.key), N = "" + h.key), Mr(h) && (Q = h.ref, $r(h, M));
511
+ for ($ in h)
512
+ Ce.call(h, $) && !Dr.hasOwnProperty($) && (A[$] = h[$]);
513
513
  if (a && a.defaultProps) {
514
- var B = a.defaultProps;
515
- for (L in B)
516
- j[L] === void 0 && (j[L] = B[L]);
514
+ var V = a.defaultProps;
515
+ for ($ in V)
516
+ A[$] === void 0 && (A[$] = V[$]);
517
517
  }
518
- if (k || z) {
519
- var V = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
520
- k && Lr(j, V), z && $r(j, V);
518
+ if (N || Q) {
519
+ var H = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
520
+ N && Wr(A, H), Q && Ur(A, H);
521
521
  }
522
- return Wr(a, k, z, D, C, Nt.current, j);
522
+ return Br(a, N, Q, M, C, At.current, A);
523
523
  }
524
524
  }
525
- var lt = p.ReactCurrentOwner, It = p.ReactDebugCurrentFrame;
525
+ var ot = f.ReactCurrentOwner, Dt = f.ReactDebugCurrentFrame;
526
526
  function Ee(a) {
527
527
  if (a) {
528
- var h = a._owner, x = Le(a.type, a._source, h ? h.type : null);
529
- It.setExtraStackFrame(x);
528
+ var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
529
+ Dt.setExtraStackFrame(x);
530
530
  } else
531
- It.setExtraStackFrame(null);
531
+ Dt.setExtraStackFrame(null);
532
532
  }
533
- var ot;
534
- ot = !1;
535
- function ut(a) {
533
+ var ut;
534
+ ut = !1;
535
+ function ct(a) {
536
536
  return typeof a == "object" && a !== null && a.$$typeof === e;
537
537
  }
538
- function _t() {
538
+ function Mt() {
539
539
  {
540
- if (lt.current) {
541
- var a = u(lt.current.type);
540
+ if (ot.current) {
541
+ var a = u(ot.current.type);
542
542
  if (a)
543
543
  return `
544
544
 
@@ -547,13 +547,13 @@ Check the render method of \`` + a + "`.";
547
547
  return "";
548
548
  }
549
549
  }
550
- function Br(a) {
550
+ function Vr(a) {
551
551
  return "";
552
552
  }
553
- var Dt = {};
554
- function Kr(a) {
553
+ var Lt = {};
554
+ function Hr(a) {
555
555
  {
556
- var h = _t();
556
+ var h = Mt();
557
557
  if (!h) {
558
558
  var x = typeof a == "string" ? a : a.displayName || a.name;
559
559
  x && (h = `
@@ -563,39 +563,39 @@ Check the top-level render call using <` + x + ">.");
563
563
  return h;
564
564
  }
565
565
  }
566
- function Mt(a, h) {
566
+ function $t(a, h) {
567
567
  {
568
568
  if (!a._store || a._store.validated || a.key != null)
569
569
  return;
570
570
  a._store.validated = !0;
571
- var x = Kr(h);
572
- if (Dt[x])
571
+ var x = Hr(h);
572
+ if (Lt[x])
573
573
  return;
574
- Dt[x] = !0;
574
+ Lt[x] = !0;
575
575
  var C = "";
576
- a && a._owner && a._owner !== lt.current && (C = " It was passed a child from " + u(a._owner.type) + "."), Ee(a), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, C), Ee(null);
576
+ a && a._owner && a._owner !== ot.current && (C = " It was passed a child from " + u(a._owner.type) + "."), Ee(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, C), Ee(null);
577
577
  }
578
578
  }
579
- function Lt(a, h) {
579
+ function Wt(a, h) {
580
580
  {
581
581
  if (typeof a != "object")
582
582
  return;
583
- if (st(a))
583
+ if (lt(a))
584
584
  for (var x = 0; x < a.length; x++) {
585
585
  var C = a[x];
586
- ut(C) && Mt(C, h);
586
+ ct(C) && $t(C, h);
587
587
  }
588
- else if (ut(a))
588
+ else if (ct(a))
589
589
  a._store && (a._store.validated = !0);
590
590
  else if (a) {
591
- var D = d(a);
592
- if (typeof D == "function" && D !== a.entries)
593
- for (var L = D.call(a), j; !(j = L.next()).done; )
594
- ut(j.value) && Mt(j.value, h);
591
+ var M = d(a);
592
+ if (typeof M == "function" && M !== a.entries)
593
+ for (var $ = M.call(a), A; !(A = $.next()).done; )
594
+ ct(A.value) && $t(A.value, h);
595
595
  }
596
596
  }
597
597
  }
598
- function Vr(a) {
598
+ function Yr(a) {
599
599
  {
600
600
  var h = a.type;
601
601
  if (h == null || typeof h == "string")
@@ -605,91 +605,91 @@ Check the top-level render call using <` + x + ">.");
605
605
  x = h.propTypes;
606
606
  else if (typeof h == "object" && (h.$$typeof === o || // Note: Memo only checks outer props here.
607
607
  // Inner props are checked in the reconciler.
608
- h.$$typeof === E))
608
+ h.$$typeof === w))
609
609
  x = h.propTypes;
610
610
  else
611
611
  return;
612
612
  if (x) {
613
613
  var C = u(h);
614
- kr(x, a.props, "prop", C, a);
615
- } else if (h.PropTypes !== void 0 && !ot) {
616
- ot = !0;
617
- var D = u(h);
618
- b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
614
+ jr(x, a.props, "prop", C, a);
615
+ } else if (h.PropTypes !== void 0 && !ut) {
616
+ ut = !0;
617
+ var M = u(h);
618
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
619
619
  }
620
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
620
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
621
621
  }
622
622
  }
623
- function Hr(a) {
623
+ function qr(a) {
624
624
  {
625
625
  for (var h = Object.keys(a.props), x = 0; x < h.length; x++) {
626
626
  var C = h[x];
627
627
  if (C !== "children" && C !== "key") {
628
- Ee(a), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Ee(null);
628
+ Ee(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Ee(null);
629
629
  break;
630
630
  }
631
631
  }
632
- a.ref !== null && (Ee(a), b("Invalid attribute `ref` supplied to `React.Fragment`."), Ee(null));
632
+ a.ref !== null && (Ee(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), Ee(null));
633
633
  }
634
634
  }
635
- var $t = {};
636
- function Wt(a, h, x, C, D, L) {
635
+ var Ut = {};
636
+ function Bt(a, h, x, C, M, $) {
637
637
  {
638
- var j = H(a);
639
- if (!j) {
640
- var k = "";
641
- (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
642
- var z = Br();
643
- z ? k += z : k += _t();
644
- var B;
645
- a === null ? B = "null" : st(a) ? B = "array" : a !== void 0 && a.$$typeof === e ? (B = "<" + (u(a.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : B = typeof a, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, k);
638
+ var A = Y(a);
639
+ if (!A) {
640
+ var N = "";
641
+ (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
642
+ var Q = Vr();
643
+ Q ? N += Q : N += Mt();
644
+ var V;
645
+ a === null ? V = "null" : lt(a) ? V = "array" : a !== void 0 && a.$$typeof === e ? (V = "<" + (u(a.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : V = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, N);
646
646
  }
647
- var V = Ur(a, h, x, D, L);
648
- if (V == null)
649
- return V;
650
- if (j) {
651
- var ie = h.children;
652
- if (ie !== void 0)
647
+ var H = Kr(a, h, x, M, $);
648
+ if (H == null)
649
+ return H;
650
+ if (A) {
651
+ var se = h.children;
652
+ if (se !== void 0)
653
653
  if (C)
654
- if (st(ie)) {
655
- for (var Te = 0; Te < ie.length; Te++)
656
- Lt(ie[Te], a);
657
- Object.freeze && Object.freeze(ie);
654
+ if (lt(se)) {
655
+ for (var Te = 0; Te < se.length; Te++)
656
+ Wt(se[Te], a);
657
+ Object.freeze && Object.freeze(se);
658
658
  } else
659
- b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
659
+ v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
660
660
  else
661
- Lt(ie, a);
661
+ Wt(se, a);
662
662
  }
663
663
  if (Ce.call(h, "key")) {
664
- var me = u(a), Z = Object.keys(h).filter(function(Jr) {
665
- return Jr !== "key";
666
- }), ct = Z.length > 0 ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}";
667
- if (!$t[me + ct]) {
668
- var Gr = Z.length > 0 ? "{" + Z.join(": ..., ") + ": ...}" : "{}";
669
- b(`A props object containing a "key" prop is being spread into JSX:
664
+ var me = u(a), te = Object.keys(h).filter(function(Qr) {
665
+ return Qr !== "key";
666
+ }), dt = te.length > 0 ? "{key: someKey, " + te.join(": ..., ") + ": ...}" : "{key: someKey}";
667
+ if (!Ut[me + dt]) {
668
+ var Zr = te.length > 0 ? "{" + te.join(": ..., ") + ": ...}" : "{}";
669
+ v(`A props object containing a "key" prop is being spread into JSX:
670
670
  let props = %s;
671
671
  <%s {...props} />
672
672
  React keys must be passed directly to JSX without using spread:
673
673
  let props = %s;
674
- <%s key={someKey} {...props} />`, ct, me, Gr, me), $t[me + ct] = !0;
674
+ <%s key={someKey} {...props} />`, dt, me, Zr, me), Ut[me + dt] = !0;
675
675
  }
676
676
  }
677
- return a === n ? Hr(V) : Vr(V), V;
677
+ return a === n ? qr(H) : Yr(H), H;
678
678
  }
679
679
  }
680
- function Yr(a, h, x) {
681
- return Wt(a, h, x, !0);
680
+ function Xr(a, h, x) {
681
+ return Bt(a, h, x, !0);
682
682
  }
683
- function qr(a, h, x) {
684
- return Wt(a, h, x, !1);
683
+ function zr(a, h, x) {
684
+ return Bt(a, h, x, !1);
685
685
  }
686
- var Xr = qr, zr = Yr;
687
- ke.Fragment = n, ke.jsx = Xr, ke.jsxs = zr;
688
- }()), ke;
686
+ var Gr = zr, Jr = Xr;
687
+ Ne.Fragment = n, Ne.jsx = Gr, Ne.jsxs = Jr;
688
+ }()), Ne;
689
689
  }
690
- process.env.NODE_ENV === "production" ? pt.exports = ln() : pt.exports = on();
691
- var F = pt.exports;
692
- const Kt = {
690
+ process.env.NODE_ENV === "production" ? mt.exports = un() : mt.exports = cn();
691
+ var F = mt.exports;
692
+ const Ht = {
693
693
  modifiedElements: [],
694
694
  bodyState: {
695
695
  hasOverflowHidden: !1,
@@ -710,141 +710,151 @@ const Kt = {
710
710
  }), this.modifiedElements = [];
711
711
  }
712
712
  };
713
- function un(t, e) {
713
+ function ft(t = "inertiaui_modal_") {
714
+ return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `${t}${crypto.randomUUID()}` : `${t}${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
715
+ }
716
+ function dn(t, e) {
714
717
  return Array.isArray(t) ? t.filter((r) => !e.includes(r)) : Object.keys(t).reduce((r, n) => (e.includes(n) || (r[n] = t[n]), r), {});
715
718
  }
716
- function Qt(t, e) {
719
+ function tr(t, e) {
717
720
  return Array.isArray(t) ? t.filter((r) => e.includes(r)) : e.reduce((r, n) => (n in t && (r[n] = t[n]), r), {});
718
721
  }
719
- function cn(t) {
722
+ function fn(t) {
720
723
  return Array.isArray(t) ? t.filter((e) => e !== null) : Object.keys(t).reduce((e, r) => (r in t && t[r] !== null && (e[r] = t[r]), e), {});
721
724
  }
722
- function dn(t, e = 3, r = 10) {
723
- return new Promise((n, i) => {
725
+ function vn(t, e = 3, r = 10) {
726
+ return new Promise((n, s) => {
724
727
  const l = t();
725
728
  if (l) {
726
729
  n(l);
727
730
  return;
728
731
  }
729
- let s = e * 1e3 / r;
732
+ let i = e * 1e3 / r;
730
733
  const m = setInterval(() => {
731
734
  const o = t();
732
- o && (clearInterval(m), n(o)), --s <= 0 && (clearInterval(m), i(new Error("Condition not met in time")));
735
+ o && (clearInterval(m), n(o)), --i <= 0 && (clearInterval(m), s(new Error("Condition not met in time")));
733
736
  }, r);
734
737
  });
735
738
  }
736
- function Ne(t) {
739
+ function je(t) {
737
740
  return t ? (t = t.replace(/_/g, "-"), t = t.replace(/-+/g, "-"), /[A-Z]/.test(t) ? (t = t.replace(/\s+/g, "").replace(/_/g, "").replace(/(?:^|\s|-)+([A-Za-z])/g, (e, r) => r.toUpperCase()), t = t.replace(/(.)(?=[A-Z])/g, "$1-"), t.toLowerCase()) : t) : "";
738
741
  }
739
- const Ze = Ge(null);
740
- Ze.displayName = "ModalStackContext";
741
- let er = null, tr = null, _e = null, ht = null, mt = [];
742
- const fn = ({ children: t }) => {
743
- const [e, r] = re([]), [n, i] = re({}), l = (f) => {
742
+ const Qe = Je(null);
743
+ Qe.displayName = "ModalStackContext";
744
+ let rr = null, nr = null, De = null, bt = null, gt = [], Se = {};
745
+ const pn = ({ children: t }) => {
746
+ const [e, r] = z([]), [n, s] = z({}), l = (E) => {
744
747
  r((d) => {
745
- const p = f([...d]), b = (T) => {
748
+ const f = E([...d]), v = (R) => {
746
749
  var O;
747
- return p.length < 2 ? !0 : ((O = p.map((A) => ({ id: A.id, shouldRender: A.shouldRender })).reverse().find((A) => A.shouldRender)) == null ? void 0 : O.id) === T;
750
+ return f.length < 2 ? !0 : ((O = f.map((b) => ({ id: b.id, shouldRender: b.shouldRender })).reverse().find((b) => b.shouldRender)) == null ? void 0 : O.id) === R;
748
751
  };
749
- return p.forEach((T, O) => {
750
- p[O].onTopOfStack = b(T.id), p[O].getParentModal = () => O < 1 ? null : p.slice(0, O).reverse().find((A) => A.isOpen), p[O].getChildModal = () => O === p.length - 1 ? null : p.slice(O + 1).find((A) => A.isOpen);
751
- }), p;
752
+ return f.forEach((R, O) => {
753
+ f[O].onTopOfStack = v(R.id), f[O].getParentModal = () => O < 1 ? null : f.slice(0, O).reverse().find((b) => b.isOpen), f[O].getChildModal = () => O === f.length - 1 ? null : f.slice(O + 1).find((b) => b.isOpen);
754
+ }), f;
752
755
  });
753
756
  };
754
- G(() => {
755
- mt = e;
757
+ X(() => {
758
+ gt = e;
756
759
  }, [e]);
757
- class s {
758
- constructor(d, p, b, T, O) {
759
- se(this, "update", (d, p, b) => {
760
- l(
761
- (T) => T.map((O) => (O.id === this.id && (O.config = d, O.onCloseCallback = p, O.afterLeaveCallback = b), O))
762
- );
763
- });
764
- se(this, "show", () => {
760
+ class i {
761
+ constructor(d, f, v, R, O) {
762
+ oe(this, "show", () => {
765
763
  l(
766
- (d) => d.map((p) => (p.id === this.id && !p.isOpen && (p.isOpen = !0, p.shouldRender = !0), p))
764
+ (d) => d.map((f) => (f.id === this.id && !f.isOpen && (f.isOpen = !0, f.shouldRender = !0), f))
767
765
  );
768
766
  });
769
- se(this, "setOpen", (d) => {
767
+ oe(this, "setOpen", (d) => {
770
768
  d ? this.show() : this.close();
771
769
  });
772
- se(this, "close", () => {
770
+ oe(this, "close", () => {
773
771
  l(
774
- (d) => d.map((p) => {
775
- var b;
776
- return p.id === this.id && p.isOpen && (Object.keys(p.listeners).forEach((T) => {
777
- p.off(T);
778
- }), p.isOpen = !1, (b = p.onCloseCallback) == null || b.call(p)), p;
772
+ (d) => d.map((f) => {
773
+ var v;
774
+ return f.id === this.id && f.isOpen && (Object.keys(f.listeners).forEach((R) => {
775
+ f.off(R);
776
+ }), f.isOpen = !1, (v = f.onCloseCallback) == null || v.call(f)), f;
779
777
  })
780
778
  );
781
779
  });
782
- se(this, "afterLeave", () => {
780
+ oe(this, "afterLeave", () => {
783
781
  this.isOpen || l((d) => {
784
- const p = d.map((b) => {
785
- var T;
786
- return b.id === this.id && !b.isOpen && (b.shouldRender = !1, (T = b.afterLeaveCallback) == null || T.call(b), b.afterLeaveCallback = null), b;
782
+ const f = d.map((v) => {
783
+ var R;
784
+ return v.id === this.id && !v.isOpen && (v.shouldRender = !1, (R = v.afterLeaveCallback) == null || R.call(v), v.afterLeaveCallback = null), v;
787
785
  });
788
- return this.index === 0 ? [] : p;
786
+ return this.index === 0 ? [] : f;
789
787
  });
790
788
  });
791
- se(this, "on", (d, p) => {
792
- d = Ne(d), this.listeners[d] = this.listeners[d] ?? [], this.listeners[d].push(p);
789
+ oe(this, "on", (d, f) => {
790
+ d = je(d), this.listeners[d] = this.listeners[d] ?? [], this.listeners[d].push(f);
793
791
  });
794
- se(this, "off", (d, p) => {
795
- var b;
796
- d = Ne(d), p ? this.listeners[d] = ((b = this.listeners[d]) == null ? void 0 : b.filter((T) => T !== p)) ?? [] : delete this.listeners[d];
792
+ oe(this, "off", (d, f) => {
793
+ var v;
794
+ d = je(d), f ? this.listeners[d] = ((v = this.listeners[d]) == null ? void 0 : v.filter((R) => R !== f)) ?? [] : delete this.listeners[d];
797
795
  });
798
- se(this, "emit", (d, ...p) => {
799
- var b;
800
- (b = this.listeners[Ne(d)]) == null || b.forEach((T) => T(...p));
796
+ oe(this, "emit", (d, ...f) => {
797
+ var v;
798
+ (v = this.listeners[je(d)]) == null || v.forEach((R) => R(...f));
801
799
  });
802
- se(this, "registerEventListenersFromProps", (d) => {
803
- const p = [];
804
- return Object.keys(d).filter((b) => b.startsWith("on")).forEach((b) => {
805
- const T = Ne(b).replace(/^on-/, "");
806
- this.on(T, d[b]), p.push(() => this.off(T, d[b]));
807
- }), () => p.forEach((b) => b());
800
+ oe(this, "registerEventListenersFromProps", (d) => {
801
+ const f = [];
802
+ return Object.keys(d).filter((v) => v.startsWith("on")).forEach((v) => {
803
+ const R = je(v).replace(/^on-/, "");
804
+ this.on(R, d[v]), f.push(() => this.off(R, d[v]));
805
+ }), () => f.forEach((v) => v());
808
806
  });
809
- se(this, "reload", (d = {}) => {
810
- var b;
811
- let p = Object.keys(this.response.props);
812
- d.only && (p = Qt(p, d.only)), d.except && (p = un(p, d.except)), (b = this.response) != null && b.url && Ve.get(this.response.url, {
807
+ oe(this, "reload", (d = {}) => {
808
+ var v;
809
+ let f = Object.keys(this.response.props);
810
+ d.only && (f = tr(f, d.only)), d.except && (f = dn(f, d.except)), (v = this.response) != null && v.url && He.get(this.response.url, {
813
811
  headers: {
814
812
  Accept: "text/html, application/xhtml+xml",
815
813
  "X-Inertia": !0,
816
814
  "X-Inertia-Partial-Component": this.response.component,
817
815
  "X-Inertia-Version": this.response.version,
818
- "X-Inertia-Partial-Data": p.join(","),
819
- "X-InertiaUI-Modal": !0,
816
+ "X-Inertia-Partial-Data": f.join(","),
817
+ "X-InertiaUI-Modal": ft(),
820
818
  "X-InertiaUI-Modal-Use-Router": 0,
821
- "X-InertiaUI-Modal-Base-Url": _e
819
+ "X-InertiaUI-Modal-Base-Url": De
822
820
  }
823
- }).then((T) => {
824
- this.updateProps(T.data.props);
821
+ }).then((R) => {
822
+ this.updateProps(R.data.props);
825
823
  });
826
824
  });
827
- se(this, "updateProps", (d) => {
828
- Object.assign(this.props, d), l((p) => p);
825
+ oe(this, "updateProps", (d) => {
826
+ Object.assign(this.props, d), l((f) => f);
829
827
  });
830
- this.id = s.generateId(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = d, this.props = p.props, this.response = p, this.config = b, this.onCloseCallback = T, this.afterLeaveCallback = O, this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
828
+ if (this.id = f.id ?? ft(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = d, this.props = f.props, this.response = f, this.config = v ?? {}, this.onCloseCallback = R, this.afterLeaveCallback = O, Se[this.id]) {
829
+ this.config = {
830
+ ...this.config,
831
+ ...Se[this.id].config ?? {}
832
+ };
833
+ const b = Se[this.id].onClose, D = Se[this.id].onAfterLeave;
834
+ b && (this.onCloseCallback = R ? () => {
835
+ R(), b();
836
+ } : b), D && (this.afterLeaveCallback = O ? () => {
837
+ O(), D();
838
+ } : D), delete Se[this.id];
839
+ }
840
+ this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
831
841
  }
832
842
  static generateId() {
833
843
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `inertiaui_modal_${crypto.randomUUID()}` : `inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
834
844
  }
835
845
  }
836
- const m = (f, d = {}, p = null, b = null) => tr(f.component).then((T) => o(T, f, d, p, b)), o = (f, d, p, b, T) => {
837
- const O = new s(f, d, p, b, T);
838
- return O.index = e.length, l((A) => [...A, O]), O.show(), O;
846
+ const m = (E, d = {}, f = null, v = null) => nr(E.component).then((R) => o(R, E, d, f, v)), o = (E, d, f, v, R) => {
847
+ const O = new i(E, d, f, v, R);
848
+ return O.index = e.length, l((b) => [...b, O]), O.show(), O;
839
849
  };
840
- function g(f, d, p, b) {
841
- if (!n[f])
842
- throw new Error(`The local modal "${f}" has not been registered.`);
843
- const T = o(null, {}, d, p, b);
844
- return T.name = f, n[f].callback(T), T;
850
+ function g(E, d, f, v) {
851
+ if (!n[E])
852
+ throw new Error(`The local modal "${E}" has not been registered.`);
853
+ const R = o(null, {}, d, f, v);
854
+ return R.name = E, n[E].callback(R), R;
845
855
  }
846
- const v = (f, d = {}) => E(
847
- f,
856
+ const y = (E, d = {}) => w(
857
+ E,
848
858
  d.method ?? "get",
849
859
  d.data ?? {},
850
860
  d.headers ?? {},
@@ -852,287 +862,289 @@ const fn = ({ children: t }) => {
852
862
  d.onClose,
853
863
  d.onAfterLeave,
854
864
  d.queryStringArrayFormat ?? "brackets",
855
- d.navigate ?? Et("navigate")
856
- ).then((p) => {
857
- const b = d.listeners ?? {};
858
- return Object.keys(b).forEach((T) => {
859
- const O = Ne(T);
860
- p.on(O, b[T]);
861
- }), p;
862
- }), E = (f, d, p = {}, b = {}, T = {}, O = null, A = null, le = "brackets", K = !1) => new Promise((J, Q) => {
863
- if (f.startsWith("#")) {
864
- J(g(f.substring(1), T, O, A));
865
- return;
866
- }
867
- const [H, q] = an(d, f || "", p, le);
868
- let N = K && e.length === 0;
869
- if (e.length === 0 && (_e = typeof window < "u" ? window.location.href : ""), b = {
870
- ...b,
871
- Accept: "text/html, application/xhtml+xml",
872
- "X-Requested-With": "XMLHttpRequest",
873
- "X-Inertia": !0,
874
- "X-Inertia-Version": er,
875
- "X-InertiaUI-Modal": !0,
876
- "X-InertiaUI-Modal-Use-Router": N ? 1 : 0,
877
- "X-InertiaUI-Modal-Base-Url": _e
878
- }, N)
879
- return ht = null, Ae.visit(H, {
865
+ d.navigate ?? Rt("navigate")
866
+ ).then((f) => {
867
+ const v = d.listeners ?? {};
868
+ return Object.keys(v).forEach((R) => {
869
+ const O = je(R);
870
+ f.on(O, v[R]);
871
+ }), f;
872
+ }), w = (E, d, f = {}, v = {}, R = {}, O = null, b = null, D = "brackets", B = !1) => {
873
+ const Z = ft();
874
+ return new Promise((ee, Y) => {
875
+ if (E.startsWith("#")) {
876
+ ee(g(E.substring(1), R, O, b));
877
+ return;
878
+ }
879
+ const [G, j] = ln(d, E || "", f, D);
880
+ let u = B && e.length === 0;
881
+ if (e.length === 0 && (De = typeof window < "u" ? window.location.href : ""), v = {
882
+ ...v,
883
+ Accept: "text/html, application/xhtml+xml",
884
+ "X-Requested-With": "XMLHttpRequest",
885
+ "X-Inertia": !0,
886
+ "X-Inertia-Version": rr,
887
+ "X-InertiaUI-Modal": Z,
888
+ "X-InertiaUI-Modal-Use-Router": u ? 1 : 0,
889
+ "X-InertiaUI-Modal-Base-Url": De
890
+ }, u)
891
+ return bt = null, Se[Z] = {
892
+ config: R,
893
+ onClose: O,
894
+ onAfterLeave: b
895
+ }, Ie.visit(G, {
896
+ method: d,
897
+ data: j,
898
+ headers: v,
899
+ preserveScroll: !0,
900
+ preserveState: !0,
901
+ onError: Y,
902
+ onFinish: () => {
903
+ vn(() => bt).then(ee);
904
+ }
905
+ });
906
+ He({
907
+ url: G,
880
908
  method: d,
881
- data: q,
882
- headers: b,
883
- preserveScroll: !0,
884
- preserveState: !0,
885
- onError: Q,
886
- onFinish: () => {
887
- dn(() => ht).then((u) => {
888
- const c = u.onCloseCallback, y = u.afterLeaveCallback;
889
- u.update(
890
- T,
891
- () => {
892
- O == null || O(), c == null || c();
893
- },
894
- () => {
895
- A == null || A(), y == null || y();
896
- }
897
- ), J(u);
898
- });
899
- }
909
+ data: j,
910
+ headers: v
911
+ }).then((c) => ee(m(c.data, R, O, b))).catch((c) => {
912
+ Y(c);
900
913
  });
901
- Ve({
902
- url: H,
903
- method: d,
904
- data: q,
905
- headers: b
906
- }).then((u) => J(m(u.data, T, O, A))).catch((u) => {
907
- Q(u);
908
914
  });
909
- }), w = {
915
+ }, p = {
910
916
  stack: e,
911
917
  localModals: n,
912
918
  push: o,
913
919
  pushFromResponseData: m,
914
920
  closeAll: () => {
915
- mt.reverse().forEach((f) => f.close());
921
+ gt.reverse().forEach((E) => E.close());
916
922
  },
917
923
  reset: () => l(() => []),
918
- visit: E,
919
- visitModal: v,
920
- registerLocalModal: (f, d) => {
921
- i((p) => ({
922
- ...p,
923
- [f]: { name: f, callback: d }
924
+ visit: w,
925
+ visitModal: y,
926
+ registerLocalModal: (E, d) => {
927
+ s((f) => ({
928
+ ...f,
929
+ [E]: { name: E, callback: d }
924
930
  }));
925
931
  },
926
- removeLocalModal: (f) => {
927
- i((d) => {
928
- const p = { ...d };
929
- return delete p[f], p;
932
+ removeLocalModal: (E) => {
933
+ s((d) => {
934
+ const f = { ...d };
935
+ return delete f[E], f;
930
936
  });
931
937
  }
932
938
  };
933
- return /* @__PURE__ */ F.jsx(Ze.Provider, { value: w, children: t });
934
- }, Qe = () => {
935
- const t = Oe(Ze);
939
+ return /* @__PURE__ */ F.jsx(Qe.Provider, { value: p, children: t });
940
+ }, et = () => {
941
+ const t = Pe(Qe);
936
942
  if (t === null)
937
943
  throw new Error("useModalStack must be used within a ModalStackProvider");
938
944
  return t;
939
- }, Vt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], vn = (t) => {
940
- t.initialPage && (er = t.initialPage.version), t.resolveComponent && (tr = t.resolveComponent);
941
- }, Pa = (t, e) => {
942
- vn(e);
943
- const r = ({ Component: n, props: i, key: l }) => {
944
- const s = () => {
945
- const m = Ke(n, { key: l, ...i });
946
- return typeof n.layout == "function" ? n.layout(m) : Array.isArray(n.layout) ? n.layout.concat(m).reverse().reduce((g, v) => Ke(v, i, g)) : m;
945
+ }, Yt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], hn = (t) => {
946
+ t.initialPage && (rr = t.initialPage.version), t.resolveComponent && (nr = t.resolveComponent);
947
+ }, Fa = (t, e) => {
948
+ hn(e);
949
+ const r = ({ Component: n, props: s, key: l }) => {
950
+ const i = () => {
951
+ const m = Ve(n, { key: l, ...s });
952
+ return typeof n.layout == "function" ? n.layout(m) : Array.isArray(n.layout) ? n.layout.concat(m).reverse().reduce((g, y) => Ve(y, s, g)) : m;
947
953
  };
948
954
  return /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
949
- s(),
950
- /* @__PURE__ */ F.jsx(pn, {})
955
+ i(),
956
+ /* @__PURE__ */ F.jsx(mn, {})
951
957
  ] });
952
958
  };
953
- return /* @__PURE__ */ F.jsx(fn, { children: /* @__PURE__ */ F.jsx(t, { ...e, children: r }) });
954
- }, pn = ({ children: t }) => {
959
+ return /* @__PURE__ */ F.jsx(pn, { children: /* @__PURE__ */ F.jsx(t, { ...e, children: r }) });
960
+ }, mn = ({ children: t }) => {
955
961
  var m;
956
- const e = Oe(Ze);
962
+ const e = Pe(Qe);
957
963
  let r = !1, n = !1;
958
- G(() => Ae.on("start", () => r = !0), []), G(() => Ae.on("finish", () => r = !1), []), G(
959
- () => Ae.on("navigate", function(o) {
964
+ X(() => Ie.on("start", () => r = !0), []), X(() => Ie.on("finish", () => r = !1), []), X(
965
+ () => Ie.on("navigate", function(o) {
960
966
  const g = o.detail.page.props._inertiaui_modal;
961
967
  if (!g) {
962
968
  n && e.closeAll();
963
969
  return;
964
970
  }
965
- n = g, _e = g.baseUrl, e.pushFromResponseData(g, {}, () => {
971
+ n = g, De = g.baseUrl, e.pushFromResponseData(g, {}, () => {
966
972
  if (!g.baseUrl) {
967
973
  console.error("No base url in modal response data so cannot navigate back");
968
974
  return;
969
975
  }
970
- !r && window.location.href !== g.baseUrl && Ae.visit(g.baseUrl, {
976
+ !r && window.location.href !== g.baseUrl && Ie.visit(g.baseUrl, {
971
977
  preserveScroll: !0,
972
978
  preserveState: !0
973
979
  });
974
- }).then((v) => {
975
- ht = v;
980
+ }).then((y) => {
981
+ bt = y;
976
982
  });
977
983
  }),
978
984
  []
979
985
  );
980
- const i = (o) => (mt.length && (o.headers["X-InertiaUI-Modal-Base-Url"] = _e), o);
981
- G(() => (Ve.interceptors.request.use(i), () => Ve.interceptors.request.eject(i)), []);
982
- const l = nn(), s = Y();
983
- return G(() => {
984
- var v, E;
985
- const o = (v = l.props) == null ? void 0 : v._inertiaui_modal, g = s.current;
986
- s.current = o, o && g && o.component === g.component && o.url === g.url && ((E = e.stack[0]) == null || E.updateProps(o.props ?? {}));
986
+ const s = (o) => (gt.length && (o.headers["X-InertiaUI-Modal-Base-Url"] = De), o);
987
+ X(() => (He.interceptors.request.use(s), () => He.interceptors.request.eject(s)), []);
988
+ const l = sn(), i = q();
989
+ return X(() => {
990
+ var y, w;
991
+ const o = (y = l.props) == null ? void 0 : y._inertiaui_modal, g = i.current;
992
+ i.current = o, o && g && o.component === g.component && o.url === g.url && ((w = e.stack[0]) == null || w.updateProps(o.props ?? {}));
987
993
  }, [(m = l.props) == null ? void 0 : m._inertiaui_modal]), /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
988
994
  t,
989
- e.stack.length > 0 && /* @__PURE__ */ F.jsx(nr, { index: 0 })
995
+ e.stack.length > 0 && /* @__PURE__ */ F.jsx(ir, { index: 0 })
990
996
  ] });
991
- }, Tt = X.createContext(null);
992
- Tt.displayName = "ModalIndexContext";
993
- const rr = () => {
994
- const t = X.useContext(Tt);
997
+ }, St = J.createContext(null);
998
+ St.displayName = "ModalIndexContext";
999
+ const ar = () => {
1000
+ const t = J.useContext(St);
995
1001
  if (t === void 0)
996
1002
  throw new Error("useModalIndex must be used within a ModalIndexProvider");
997
1003
  return t;
998
- }, nr = ({ index: t }) => {
999
- const { stack: e } = Qe(), r = ve(() => e[t], [e, t]);
1000
- return (r == null ? void 0 : r.component) && /* @__PURE__ */ F.jsx(Tt.Provider, { value: t, children: /* @__PURE__ */ F.jsx(
1004
+ }, ir = ({ index: t }) => {
1005
+ const { stack: e } = et(), r = ve(() => e[t], [e, t]);
1006
+ return (r == null ? void 0 : r.component) && /* @__PURE__ */ F.jsx(St.Provider, { value: t, children: /* @__PURE__ */ F.jsx(
1001
1007
  r.component,
1002
1008
  {
1003
1009
  ...r.props,
1004
1010
  onModalEvent: (...n) => r.emit(...n)
1005
1011
  }
1006
1012
  ) });
1007
- }, ar = xt(({ name: t, children: e, ...r }, n) => {
1008
- const i = rr(), { stack: l, registerLocalModal: s, removeLocalModal: m } = Qe(), [o, g] = re(null), v = ve(() => t ? o : l[i], [t, o, i, l]), E = ve(() => {
1009
- var f;
1010
- return (f = l.find((d) => d.shouldRender && d.index > (v == null ? void 0 : v.index))) == null ? void 0 : f.index;
1011
- }, [i, l]), R = ve(() => (v == null ? void 0 : v.config.slideover) ?? r.slideover ?? Et("type") === "slideover", [r.slideover]), S = ve(
1013
+ }, sr = Tt(({ name: t, children: e, onFocus: r = null, onBlur: n = null, onClose: s = null, onSuccess: l = null, ...i }, m) => {
1014
+ const o = ar(), { stack: g, registerLocalModal: y, removeLocalModal: w } = et(), [P, S] = z(null), p = ve(() => t ? P : g[o], [t, P, o, g]), E = ve(() => {
1015
+ var b;
1016
+ return (b = g.find((D) => D.shouldRender && D.index > (p == null ? void 0 : p.index))) == null ? void 0 : b.index;
1017
+ }, [o, g]), d = ve(() => (p == null ? void 0 : p.config.slideover) ?? i.slideover ?? Rt("type") === "slideover", [i.slideover]), f = ve(
1012
1018
  () => ({
1013
- slideover: R,
1014
- closeButton: r.closeButton ?? Re(R, "closeButton"),
1015
- closeExplicitly: r.closeExplicitly ?? Re(R, "closeExplicitly"),
1016
- maxWidth: r.maxWidth ?? Re(R, "maxWidth"),
1017
- paddingClasses: r.paddingClasses ?? Re(R, "paddingClasses"),
1018
- panelClasses: r.panelClasses ?? Re(R, "panelClasses"),
1019
- position: r.position ?? Re(R, "position"),
1020
- ...v == null ? void 0 : v.config
1019
+ slideover: d,
1020
+ closeButton: i.closeButton ?? Re(d, "closeButton"),
1021
+ closeExplicitly: i.closeExplicitly ?? Re(d, "closeExplicitly"),
1022
+ maxWidth: i.maxWidth ?? Re(d, "maxWidth"),
1023
+ paddingClasses: i.paddingClasses ?? Re(d, "paddingClasses"),
1024
+ panelClasses: i.panelClasses ?? Re(d, "panelClasses"),
1025
+ position: i.position ?? Re(d, "position"),
1026
+ ...p == null ? void 0 : p.config
1021
1027
  }),
1022
- [r, v == null ? void 0 : v.config]
1028
+ [i, p == null ? void 0 : p.config]
1023
1029
  );
1024
- G(() => {
1030
+ X(() => {
1025
1031
  if (t) {
1026
- let f = null;
1027
- return s(t, (d) => {
1028
- f = d.registerEventListenersFromProps(r), g(d);
1032
+ let b = null;
1033
+ return y(t, (D) => {
1034
+ b = D.registerEventListenersFromProps(i), S(D);
1029
1035
  }), () => {
1030
- f == null || f(), f = null, m(t);
1036
+ b == null || b(), b = null, w(t);
1031
1037
  };
1032
1038
  }
1033
- return v.registerEventListenersFromProps(r);
1039
+ return p.registerEventListenersFromProps(i);
1034
1040
  }, [t]);
1035
- const w = Y(v);
1036
- return G(() => {
1037
- w.current = v;
1038
- }, [v]), Zt(
1039
- n,
1041
+ const v = q(p);
1042
+ X(() => {
1043
+ v.current = p;
1044
+ }, [p]), X(() => {
1045
+ p !== null && (p.isOpen ? l == null || l() : s == null || s());
1046
+ }, [p == null ? void 0 : p.isOpen]);
1047
+ const [R, O] = z(!1);
1048
+ return X(() => {
1049
+ R && p !== null && p.isOpen && (p.onTopOfStack ? r == null || r() : n == null || n()), O(!0);
1050
+ }, [p == null ? void 0 : p.onTopOfStack]), er(
1051
+ m,
1040
1052
  () => ({
1041
1053
  afterLeave: () => {
1042
- var f;
1043
- return (f = w.current) == null ? void 0 : f.afterLeave();
1054
+ var b;
1055
+ return (b = v.current) == null ? void 0 : b.afterLeave();
1044
1056
  },
1045
1057
  close: () => {
1046
- var f;
1047
- return (f = w.current) == null ? void 0 : f.close();
1058
+ var b;
1059
+ return (b = v.current) == null ? void 0 : b.close();
1048
1060
  },
1049
- emit: (...f) => {
1050
- var d;
1051
- return (d = w.current) == null ? void 0 : d.emit(...f);
1061
+ emit: (...b) => {
1062
+ var D;
1063
+ return (D = v.current) == null ? void 0 : D.emit(...b);
1052
1064
  },
1053
1065
  getChildModal: () => {
1054
- var f;
1055
- return (f = w.current) == null ? void 0 : f.getChildModal();
1066
+ var b;
1067
+ return (b = v.current) == null ? void 0 : b.getChildModal();
1056
1068
  },
1057
1069
  getParentModal: () => {
1058
- var f;
1059
- return (f = w.current) == null ? void 0 : f.getParentModal();
1070
+ var b;
1071
+ return (b = v.current) == null ? void 0 : b.getParentModal();
1060
1072
  },
1061
- reload: (...f) => {
1062
- var d;
1063
- return (d = w.current) == null ? void 0 : d.reload(...f);
1073
+ reload: (...b) => {
1074
+ var D;
1075
+ return (D = v.current) == null ? void 0 : D.reload(...b);
1064
1076
  },
1065
1077
  setOpen: () => {
1066
- var f;
1067
- return (f = w.current) == null ? void 0 : f.setOpen();
1078
+ var b;
1079
+ return (b = v.current) == null ? void 0 : b.setOpen();
1068
1080
  },
1069
1081
  get id() {
1070
- var f;
1071
- return (f = w.current) == null ? void 0 : f.id;
1082
+ var b;
1083
+ return (b = v.current) == null ? void 0 : b.id;
1072
1084
  },
1073
1085
  get index() {
1074
- var f;
1075
- return (f = w.current) == null ? void 0 : f.index;
1086
+ var b;
1087
+ return (b = v.current) == null ? void 0 : b.index;
1076
1088
  },
1077
1089
  get isOpen() {
1078
- var f;
1079
- return (f = w.current) == null ? void 0 : f.isOpen;
1090
+ var b;
1091
+ return (b = v.current) == null ? void 0 : b.isOpen;
1080
1092
  },
1081
1093
  get config() {
1082
- var f;
1083
- return (f = w.current) == null ? void 0 : f.config;
1094
+ var b;
1095
+ return (b = v.current) == null ? void 0 : b.config;
1084
1096
  },
1085
1097
  get modalContext() {
1086
- return w.current;
1098
+ return v.current;
1087
1099
  },
1088
1100
  get onTopOfStack() {
1089
- var f;
1090
- return (f = w.current) == null ? void 0 : f.onTopOfStack;
1101
+ var b;
1102
+ return (b = v.current) == null ? void 0 : b.onTopOfStack;
1091
1103
  },
1092
1104
  get shouldRender() {
1093
- var f;
1094
- return (f = w.current) == null ? void 0 : f.shouldRender;
1105
+ var b;
1106
+ return (b = v.current) == null ? void 0 : b.shouldRender;
1095
1107
  }
1096
1108
  }),
1097
- [v]
1098
- ), (v == null ? void 0 : v.shouldRender) && /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
1109
+ [p]
1110
+ ), (p == null ? void 0 : p.shouldRender) && /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
1099
1111
  typeof e == "function" ? e({
1100
- afterLeave: v.afterLeave,
1101
- close: v.close,
1102
- config: S,
1103
- emit: v.emit,
1104
- getChildModal: v.getChildModal,
1105
- getParentModal: v.getParentModal,
1106
- id: v.id,
1107
- index: v.index,
1108
- isOpen: v.isOpen,
1109
- modalContext: v,
1110
- onTopOfStack: v.onTopOfStack,
1111
- reload: v.reload,
1112
- setOpen: v.setOpen,
1113
- shouldRender: v.shouldRender
1112
+ afterLeave: p.afterLeave,
1113
+ close: p.close,
1114
+ config: f,
1115
+ emit: p.emit,
1116
+ getChildModal: p.getChildModal,
1117
+ getParentModal: p.getParentModal,
1118
+ id: p.id,
1119
+ index: p.index,
1120
+ isOpen: p.isOpen,
1121
+ modalContext: p,
1122
+ onTopOfStack: p.onTopOfStack,
1123
+ reload: p.reload,
1124
+ setOpen: p.setOpen,
1125
+ shouldRender: p.shouldRender
1114
1126
  }) : e,
1115
- E && /* @__PURE__ */ F.jsx(nr, { index: E })
1127
+ E && /* @__PURE__ */ F.jsx(ir, { index: E })
1116
1128
  ] });
1117
1129
  });
1118
- ar.displayName = "HeadlessModal";
1119
- function ir(t) {
1130
+ sr.displayName = "HeadlessModal";
1131
+ function lr(t) {
1120
1132
  var e, r, n = "";
1121
1133
  if (typeof t == "string" || typeof t == "number") n += t;
1122
1134
  else if (typeof t == "object") if (Array.isArray(t)) {
1123
- var i = t.length;
1124
- for (e = 0; e < i; e++) t[e] && (r = ir(t[e])) && (n && (n += " "), n += r);
1135
+ var s = t.length;
1136
+ for (e = 0; e < s; e++) t[e] && (r = lr(t[e])) && (n && (n += " "), n += r);
1125
1137
  } else for (r in t) t[r] && (n && (n += " "), n += r);
1126
1138
  return n;
1127
1139
  }
1128
- function He() {
1129
- for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = ir(t)) && (n && (n += " "), n += e);
1140
+ function Ye() {
1141
+ for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = lr(t)) && (n && (n += " "), n += e);
1130
1142
  return n;
1131
1143
  }
1132
- var hn = Object.defineProperty, mn = (t, e, r) => e in t ? hn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, dt = (t, e, r) => (mn(t, typeof e != "symbol" ? e + "" : e, r), r);
1133
- let bn = class {
1144
+ var bn = Object.defineProperty, gn = (t, e, r) => e in t ? bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, vt = (t, e, r) => (gn(t, typeof e != "symbol" ? e + "" : e, r), r);
1145
+ let yn = class {
1134
1146
  constructor() {
1135
- dt(this, "current", this.detect()), dt(this, "handoffState", "pending"), dt(this, "currentId", 0);
1147
+ vt(this, "current", this.detect()), vt(this, "handoffState", "pending"), vt(this, "currentId", 0);
1136
1148
  }
1137
1149
  set(e) {
1138
1150
  this.current !== e && (this.handoffState = "pending", this.currentId = 0, this.current = e);
@@ -1158,15 +1170,15 @@ let bn = class {
1158
1170
  get isHandoffComplete() {
1159
1171
  return this.handoffState === "complete";
1160
1172
  }
1161
- }, Be = new bn();
1162
- function gn(t) {
1173
+ }, Ke = new yn();
1174
+ function wn(t) {
1163
1175
  typeof queueMicrotask == "function" ? queueMicrotask(t) : Promise.resolve().then(t).catch((e) => setTimeout(() => {
1164
1176
  throw e;
1165
1177
  }));
1166
1178
  }
1167
- function et() {
1168
- let t = [], e = { addEventListener(r, n, i, l) {
1169
- return r.addEventListener(n, i, l), e.add(() => r.removeEventListener(n, i, l));
1179
+ function tt() {
1180
+ let t = [], e = { addEventListener(r, n, s, l) {
1181
+ return r.addEventListener(n, s, l), e.add(() => r.removeEventListener(n, s, l));
1170
1182
  }, requestAnimationFrame(...r) {
1171
1183
  let n = requestAnimationFrame(...r);
1172
1184
  return e.add(() => cancelAnimationFrame(n));
@@ -1177,221 +1189,221 @@ function et() {
1177
1189
  return e.add(() => clearTimeout(n));
1178
1190
  }, microTask(...r) {
1179
1191
  let n = { current: !0 };
1180
- return gn(() => {
1192
+ return wn(() => {
1181
1193
  n.current && r[0]();
1182
1194
  }), e.add(() => {
1183
1195
  n.current = !1;
1184
1196
  });
1185
- }, style(r, n, i) {
1197
+ }, style(r, n, s) {
1186
1198
  let l = r.style.getPropertyValue(n);
1187
- return Object.assign(r.style, { [n]: i }), this.add(() => {
1199
+ return Object.assign(r.style, { [n]: s }), this.add(() => {
1188
1200
  Object.assign(r.style, { [n]: l });
1189
1201
  });
1190
1202
  }, group(r) {
1191
- let n = et();
1203
+ let n = tt();
1192
1204
  return r(n), this.add(() => n.dispose());
1193
1205
  }, add(r) {
1194
1206
  return t.includes(r) || t.push(r), () => {
1195
1207
  let n = t.indexOf(r);
1196
- if (n >= 0) for (let i of t.splice(n, 1)) i();
1208
+ if (n >= 0) for (let s of t.splice(n, 1)) s();
1197
1209
  };
1198
1210
  }, dispose() {
1199
1211
  for (let r of t.splice(0)) r();
1200
1212
  } };
1201
1213
  return e;
1202
1214
  }
1203
- function sr() {
1204
- let [t] = re(et);
1205
- return G(() => () => t.dispose(), [t]), t;
1215
+ function or() {
1216
+ let [t] = z(tt);
1217
+ return X(() => () => t.dispose(), [t]), t;
1206
1218
  }
1207
1219
  let he = (t, e) => {
1208
- Be.isServer ? G(t, e) : en(t, e);
1220
+ Ke.isServer ? X(t, e) : rn(t, e);
1209
1221
  };
1210
- function lr(t) {
1211
- let e = Y(t);
1222
+ function ur(t) {
1223
+ let e = q(t);
1212
1224
  return he(() => {
1213
1225
  e.current = t;
1214
1226
  }, [t]), e;
1215
1227
  }
1216
1228
  let de = function(t) {
1217
- let e = lr(t);
1218
- return X.useCallback((...r) => e.current(...r), [e]);
1229
+ let e = ur(t);
1230
+ return J.useCallback((...r) => e.current(...r), [e]);
1219
1231
  };
1220
- function bt(...t) {
1232
+ function yt(...t) {
1221
1233
  return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" ");
1222
1234
  }
1223
- function tt(t, e, ...r) {
1235
+ function rt(t, e, ...r) {
1224
1236
  if (t in e) {
1225
- let i = e[t];
1226
- return typeof i == "function" ? i(...r) : i;
1237
+ let s = e[t];
1238
+ return typeof s == "function" ? s(...r) : s;
1227
1239
  }
1228
- let n = new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((i) => `"${i}"`).join(", ")}.`);
1229
- throw Error.captureStackTrace && Error.captureStackTrace(n, tt), n;
1240
+ let n = new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((s) => `"${s}"`).join(", ")}.`);
1241
+ throw Error.captureStackTrace && Error.captureStackTrace(n, rt), n;
1230
1242
  }
1231
- var or = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(or || {}), pe = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(pe || {});
1232
- function ur() {
1233
- let t = wn();
1234
- return ue((e) => yn({ mergeRefs: t, ...e }), [t]);
1243
+ var cr = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(cr || {}), pe = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(pe || {});
1244
+ function dr() {
1245
+ let t = En();
1246
+ return ue((e) => xn({ mergeRefs: t, ...e }), [t]);
1235
1247
  }
1236
- function yn({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: i, visible: l = !0, name: s, mergeRefs: m }) {
1237
- m = m ?? xn;
1238
- let o = cr(e, t);
1239
- if (l) return We(o, r, n, s, m);
1240
- let g = i ?? 0;
1248
+ function xn({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: s, visible: l = !0, name: i, mergeRefs: m }) {
1249
+ m = m ?? Tn;
1250
+ let o = fr(e, t);
1251
+ if (l) return Ue(o, r, n, i, m);
1252
+ let g = s ?? 0;
1241
1253
  if (g & 2) {
1242
- let { static: v = !1, ...E } = o;
1243
- if (v) return We(E, r, n, s, m);
1254
+ let { static: y = !1, ...w } = o;
1255
+ if (y) return Ue(w, r, n, i, m);
1244
1256
  }
1245
1257
  if (g & 1) {
1246
- let { unmount: v = !0, ...E } = o;
1247
- return tt(v ? 0 : 1, { 0() {
1258
+ let { unmount: y = !0, ...w } = o;
1259
+ return rt(y ? 0 : 1, { 0() {
1248
1260
  return null;
1249
1261
  }, 1() {
1250
- return We({ ...E, hidden: !0, style: { display: "none" } }, r, n, s, m);
1262
+ return Ue({ ...w, hidden: !0, style: { display: "none" } }, r, n, i, m);
1251
1263
  } });
1252
1264
  }
1253
- return We(o, r, n, s, m);
1265
+ return Ue(o, r, n, i, m);
1254
1266
  }
1255
- function We(t, e = {}, r, n, i) {
1256
- let { as: l = r, children: s, refName: m = "ref", ...o } = ft(t, ["unmount", "static"]), g = t.ref !== void 0 ? { [m]: t.ref } : {}, v = typeof s == "function" ? s(e) : s;
1267
+ function Ue(t, e = {}, r, n, s) {
1268
+ let { as: l = r, children: i, refName: m = "ref", ...o } = pt(t, ["unmount", "static"]), g = t.ref !== void 0 ? { [m]: t.ref } : {}, y = typeof i == "function" ? i(e) : i;
1257
1269
  "className" in o && o.className && typeof o.className == "function" && (o.className = o.className(e)), o["aria-labelledby"] && o["aria-labelledby"] === o.id && (o["aria-labelledby"] = void 0);
1258
- let E = {};
1270
+ let w = {};
1259
1271
  if (e) {
1260
- let R = !1, S = [];
1261
- for (let [w, f] of Object.entries(e)) typeof f == "boolean" && (R = !0), f === !0 && S.push(w.replace(/([A-Z])/g, (d) => `-${d.toLowerCase()}`));
1262
- if (R) {
1263
- E["data-headlessui-state"] = S.join(" ");
1264
- for (let w of S) E[`data-${w}`] = "";
1272
+ let P = !1, S = [];
1273
+ for (let [p, E] of Object.entries(e)) typeof E == "boolean" && (P = !0), E === !0 && S.push(p.replace(/([A-Z])/g, (d) => `-${d.toLowerCase()}`));
1274
+ if (P) {
1275
+ w["data-headlessui-state"] = S.join(" ");
1276
+ for (let p of S) w[`data-${p}`] = "";
1265
1277
  }
1266
1278
  }
1267
- if (l === we && (Object.keys(be(o)).length > 0 || Object.keys(be(E)).length > 0)) if (!tn(v) || Array.isArray(v) && v.length > 1) {
1268
- if (Object.keys(be(o)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${n} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(be(o)).concat(Object.keys(be(E))).map((R) => ` - ${R}`).join(`
1269
- `), "", "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((R) => ` - ${R}`).join(`
1279
+ if (l === we && (Object.keys(be(o)).length > 0 || Object.keys(be(w)).length > 0)) if (!nn(y) || Array.isArray(y) && y.length > 1) {
1280
+ if (Object.keys(be(o)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${n} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(be(o)).concat(Object.keys(be(w))).map((P) => ` - ${P}`).join(`
1281
+ `), "", "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((P) => ` - ${P}`).join(`
1270
1282
  `)].join(`
1271
1283
  `));
1272
1284
  } else {
1273
- let R = v.props, S = R == null ? void 0 : R.className, w = typeof S == "function" ? (...p) => bt(S(...p), o.className) : bt(S, o.className), f = w ? { className: w } : {}, d = cr(v.props, be(ft(o, ["ref"])));
1274
- for (let p in E) p in d && delete E[p];
1275
- return rn(v, Object.assign({}, d, E, g, { ref: i(En(v), g.ref) }, f));
1285
+ let P = y.props, S = P == null ? void 0 : P.className, p = typeof S == "function" ? (...f) => yt(S(...f), o.className) : yt(S, o.className), E = p ? { className: p } : {}, d = fr(y.props, be(pt(o, ["ref"])));
1286
+ for (let f in w) f in d && delete w[f];
1287
+ return an(y, Object.assign({}, d, w, g, { ref: s(Rn(y), g.ref) }, E));
1276
1288
  }
1277
- return Ke(l, Object.assign({}, ft(o, ["ref"]), l !== we && g, l !== we && E), v);
1289
+ return Ve(l, Object.assign({}, pt(o, ["ref"]), l !== we && g, l !== we && w), y);
1278
1290
  }
1279
- function wn() {
1280
- let t = Y([]), e = ue((r) => {
1291
+ function En() {
1292
+ let t = q([]), e = ue((r) => {
1281
1293
  for (let n of t.current) n != null && (typeof n == "function" ? n(r) : n.current = r);
1282
1294
  }, []);
1283
1295
  return (...r) => {
1284
1296
  if (!r.every((n) => n == null)) return t.current = r, e;
1285
1297
  };
1286
1298
  }
1287
- function xn(...t) {
1299
+ function Tn(...t) {
1288
1300
  return t.every((e) => e == null) ? void 0 : (e) => {
1289
1301
  for (let r of t) r != null && (typeof r == "function" ? r(e) : r.current = e);
1290
1302
  };
1291
1303
  }
1292
- function cr(...t) {
1304
+ function fr(...t) {
1293
1305
  if (t.length === 0) return {};
1294
1306
  if (t.length === 1) return t[0];
1295
1307
  let e = {}, r = {};
1296
- for (let n of t) for (let i in n) i.startsWith("on") && typeof n[i] == "function" ? (r[i] != null || (r[i] = []), r[i].push(n[i])) : e[i] = n[i];
1297
- if (e.disabled || e["aria-disabled"]) for (let n in r) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n) && (r[n] = [(i) => {
1308
+ for (let n of t) for (let s in n) s.startsWith("on") && typeof n[s] == "function" ? (r[s] != null || (r[s] = []), r[s].push(n[s])) : e[s] = n[s];
1309
+ if (e.disabled || e["aria-disabled"]) for (let n in r) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n) && (r[n] = [(s) => {
1298
1310
  var l;
1299
- return (l = i == null ? void 0 : i.preventDefault) == null ? void 0 : l.call(i);
1311
+ return (l = s == null ? void 0 : s.preventDefault) == null ? void 0 : l.call(s);
1300
1312
  }]);
1301
- for (let n in r) Object.assign(e, { [n](i, ...l) {
1302
- let s = r[n];
1303
- for (let m of s) {
1304
- if ((i instanceof Event || (i == null ? void 0 : i.nativeEvent) instanceof Event) && i.defaultPrevented) return;
1305
- m(i, ...l);
1313
+ for (let n in r) Object.assign(e, { [n](s, ...l) {
1314
+ let i = r[n];
1315
+ for (let m of i) {
1316
+ if ((s instanceof Event || (s == null ? void 0 : s.nativeEvent) instanceof Event) && s.defaultPrevented) return;
1317
+ m(s, ...l);
1306
1318
  }
1307
1319
  } });
1308
1320
  return e;
1309
1321
  }
1310
- function Rt(t) {
1322
+ function Ot(t) {
1311
1323
  var e;
1312
- return Object.assign(xt(t), { displayName: (e = t.displayName) != null ? e : t.name });
1324
+ return Object.assign(Tt(t), { displayName: (e = t.displayName) != null ? e : t.name });
1313
1325
  }
1314
1326
  function be(t) {
1315
1327
  let e = Object.assign({}, t);
1316
1328
  for (let r in e) e[r] === void 0 && delete e[r];
1317
1329
  return e;
1318
1330
  }
1319
- function ft(t, e = []) {
1331
+ function pt(t, e = []) {
1320
1332
  let r = Object.assign({}, t);
1321
1333
  for (let n of e) n in r && delete r[n];
1322
1334
  return r;
1323
1335
  }
1324
- function En(t) {
1325
- return X.version.split(".")[0] >= "19" ? t.props.ref : t.ref;
1336
+ function Rn(t) {
1337
+ return J.version.split(".")[0] >= "19" ? t.props.ref : t.ref;
1326
1338
  }
1327
- let Tn = Symbol();
1328
- function dr(...t) {
1329
- let e = Y(t);
1330
- G(() => {
1339
+ let Sn = Symbol();
1340
+ function vr(...t) {
1341
+ let e = q(t);
1342
+ X(() => {
1331
1343
  e.current = t;
1332
1344
  }, [t]);
1333
1345
  let r = de((n) => {
1334
- for (let i of e.current) i != null && (typeof i == "function" ? i(n) : i.current = n);
1346
+ for (let s of e.current) s != null && (typeof s == "function" ? s(n) : s.current = n);
1335
1347
  });
1336
- return t.every((n) => n == null || (n == null ? void 0 : n[Tn])) ? void 0 : r;
1348
+ return t.every((n) => n == null || (n == null ? void 0 : n[Sn])) ? void 0 : r;
1337
1349
  }
1338
- function Rn(t = 0) {
1339
- let [e, r] = re(t), n = ue((o) => r(o), [e]), i = ue((o) => r((g) => g | o), [e]), l = ue((o) => (e & o) === o, [e]), s = ue((o) => r((g) => g & ~o), [r]), m = ue((o) => r((g) => g ^ o), [r]);
1340
- return { flags: e, setFlag: n, addFlag: i, hasFlag: l, removeFlag: s, toggleFlag: m };
1350
+ function On(t = 0) {
1351
+ let [e, r] = z(t), n = ue((o) => r(o), [e]), s = ue((o) => r((g) => g | o), [e]), l = ue((o) => (e & o) === o, [e]), i = ue((o) => r((g) => g & ~o), [r]), m = ue((o) => r((g) => g ^ o), [r]);
1352
+ return { flags: e, setFlag: n, addFlag: s, hasFlag: l, removeFlag: i, toggleFlag: m };
1341
1353
  }
1342
- var Ht, Yt;
1343
- typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Ht = process == null ? void 0 : process.env) == null ? void 0 : Ht.NODE_ENV) === "test" && typeof ((Yt = Element == null ? void 0 : Element.prototype) == null ? void 0 : Yt.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
1354
+ var qt, Xt;
1355
+ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((qt = process == null ? void 0 : process.env) == null ? void 0 : qt.NODE_ENV) === "test" && typeof ((Xt = Element == null ? void 0 : Element.prototype) == null ? void 0 : Xt.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
1344
1356
  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(`
1345
1357
  `)), [];
1346
1358
  });
1347
- var Sn = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(Sn || {});
1348
- function On(t) {
1359
+ var Pn = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(Pn || {});
1360
+ function Cn(t) {
1349
1361
  let e = {};
1350
1362
  for (let r in t) t[r] === !0 && (e[`data-${r}`] = "");
1351
1363
  return e;
1352
1364
  }
1353
- function Cn(t, e, r, n) {
1354
- let [i, l] = re(r), { hasFlag: s, addFlag: m, removeFlag: o } = Rn(t && i ? 3 : 0), g = Y(!1), v = Y(!1), E = sr();
1365
+ function kn(t, e, r, n) {
1366
+ let [s, l] = z(r), { hasFlag: i, addFlag: m, removeFlag: o } = On(t && s ? 3 : 0), g = q(!1), y = q(!1), w = or();
1355
1367
  return he(() => {
1356
- var R;
1368
+ var P;
1357
1369
  if (t) {
1358
1370
  if (r && l(!0), !e) {
1359
1371
  r && m(3);
1360
1372
  return;
1361
1373
  }
1362
- return (R = n == null ? void 0 : n.start) == null || R.call(n, r), Pn(e, { inFlight: g, prepare() {
1363
- v.current ? v.current = !1 : v.current = g.current, g.current = !0, !v.current && (r ? (m(3), o(4)) : (m(4), o(2)));
1374
+ return (P = n == null ? void 0 : n.start) == null || P.call(n, r), Fn(e, { inFlight: g, prepare() {
1375
+ y.current ? y.current = !1 : y.current = g.current, g.current = !0, !y.current && (r ? (m(3), o(4)) : (m(4), o(2)));
1364
1376
  }, run() {
1365
- v.current ? r ? (o(3), m(4)) : (o(4), m(3)) : r ? o(1) : m(1);
1377
+ y.current ? r ? (o(3), m(4)) : (o(4), m(3)) : r ? o(1) : m(1);
1366
1378
  }, done() {
1367
1379
  var S;
1368
- v.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (g.current = !1, o(7), r || l(!1), (S = n == null ? void 0 : n.end) == null || S.call(n, r));
1380
+ y.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (g.current = !1, o(7), r || l(!1), (S = n == null ? void 0 : n.end) == null || S.call(n, r));
1369
1381
  } });
1370
1382
  }
1371
- }, [t, r, e, E]), t ? [i, { closed: s(1), enter: s(2), leave: s(4), transition: s(2) || s(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1383
+ }, [t, r, e, w]), t ? [s, { closed: i(1), enter: i(2), leave: i(4), transition: i(2) || i(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1372
1384
  }
1373
- function Pn(t, { prepare: e, run: r, done: n, inFlight: i }) {
1374
- let l = et();
1375
- return kn(t, { prepare: e, inFlight: i }), l.nextFrame(() => {
1385
+ function Fn(t, { prepare: e, run: r, done: n, inFlight: s }) {
1386
+ let l = tt();
1387
+ return jn(t, { prepare: e, inFlight: s }), l.nextFrame(() => {
1376
1388
  r(), l.requestAnimationFrame(() => {
1377
- l.add(Fn(t, n));
1389
+ l.add(Nn(t, n));
1378
1390
  });
1379
1391
  }), l.dispose;
1380
1392
  }
1381
- function Fn(t, e) {
1393
+ function Nn(t, e) {
1382
1394
  var r, n;
1383
- let i = et();
1384
- if (!t) return i.dispose;
1395
+ let s = tt();
1396
+ if (!t) return s.dispose;
1385
1397
  let l = !1;
1386
- i.add(() => {
1398
+ s.add(() => {
1387
1399
  l = !0;
1388
1400
  });
1389
- let s = (n = (r = t.getAnimations) == null ? void 0 : r.call(t).filter((m) => m instanceof CSSTransition)) != null ? n : [];
1390
- return s.length === 0 ? (e(), i.dispose) : (Promise.allSettled(s.map((m) => m.finished)).then(() => {
1401
+ let i = (n = (r = t.getAnimations) == null ? void 0 : r.call(t).filter((m) => m instanceof CSSTransition)) != null ? n : [];
1402
+ return i.length === 0 ? (e(), s.dispose) : (Promise.allSettled(i.map((m) => m.finished)).then(() => {
1391
1403
  l || e();
1392
- }), i.dispose);
1404
+ }), s.dispose);
1393
1405
  }
1394
- function kn(t, { inFlight: e, prepare: r }) {
1406
+ function jn(t, { inFlight: e, prepare: r }) {
1395
1407
  if (e != null && e.current) {
1396
1408
  r();
1397
1409
  return;
@@ -1403,342 +1415,342 @@ function kn(t, { inFlight: e, prepare: r }) {
1403
1415
  * tabbable 6.2.0
1404
1416
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1405
1417
  */
1406
- var fr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Ye = /* @__PURE__ */ fr.join(","), vr = typeof Element > "u", xe = vr ? function() {
1407
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, qe = !vr && Element.prototype.getRootNode ? function(t) {
1418
+ var pr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], qe = /* @__PURE__ */ pr.join(","), hr = typeof Element > "u", xe = hr ? function() {
1419
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Xe = !hr && Element.prototype.getRootNode ? function(t) {
1408
1420
  var e;
1409
1421
  return t == null || (e = t.getRootNode) === null || e === void 0 ? void 0 : e.call(t);
1410
1422
  } : function(t) {
1411
1423
  return t == null ? void 0 : t.ownerDocument;
1412
- }, Xe = function t(e, r) {
1424
+ }, ze = function t(e, r) {
1413
1425
  var n;
1414
1426
  r === void 0 && (r = !0);
1415
- var i = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "inert"), l = i === "" || i === "true", s = l || r && e && t(e.parentNode);
1416
- return s;
1417
- }, Nn = function(e) {
1427
+ var s = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "inert"), l = s === "" || s === "true", i = l || r && e && t(e.parentNode);
1428
+ return i;
1429
+ }, An = function(e) {
1418
1430
  var r, n = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "contenteditable");
1419
1431
  return n === "" || n === "true";
1420
- }, pr = function(e, r, n) {
1421
- if (Xe(e))
1432
+ }, mr = function(e, r, n) {
1433
+ if (ze(e))
1422
1434
  return [];
1423
- var i = Array.prototype.slice.apply(e.querySelectorAll(Ye));
1424
- return r && xe.call(e, Ye) && i.unshift(e), i = i.filter(n), i;
1425
- }, hr = function t(e, r, n) {
1426
- for (var i = [], l = Array.from(e); l.length; ) {
1427
- var s = l.shift();
1428
- if (!Xe(s, !1))
1429
- if (s.tagName === "SLOT") {
1430
- var m = s.assignedElements(), o = m.length ? m : s.children, g = t(o, !0, n);
1431
- n.flatten ? i.push.apply(i, g) : i.push({
1432
- scopeParent: s,
1435
+ var s = Array.prototype.slice.apply(e.querySelectorAll(qe));
1436
+ return r && xe.call(e, qe) && s.unshift(e), s = s.filter(n), s;
1437
+ }, br = function t(e, r, n) {
1438
+ for (var s = [], l = Array.from(e); l.length; ) {
1439
+ var i = l.shift();
1440
+ if (!ze(i, !1))
1441
+ if (i.tagName === "SLOT") {
1442
+ var m = i.assignedElements(), o = m.length ? m : i.children, g = t(o, !0, n);
1443
+ n.flatten ? s.push.apply(s, g) : s.push({
1444
+ scopeParent: i,
1433
1445
  candidates: g
1434
1446
  });
1435
1447
  } else {
1436
- var v = xe.call(s, Ye);
1437
- v && n.filter(s) && (r || !e.includes(s)) && i.push(s);
1438
- var E = s.shadowRoot || // check for an undisclosed shadow
1439
- typeof n.getShadowRoot == "function" && n.getShadowRoot(s), R = !Xe(E, !1) && (!n.shadowRootFilter || n.shadowRootFilter(s));
1440
- if (E && R) {
1441
- var S = t(E === !0 ? s.children : E.children, !0, n);
1442
- n.flatten ? i.push.apply(i, S) : i.push({
1443
- scopeParent: s,
1448
+ var y = xe.call(i, qe);
1449
+ y && n.filter(i) && (r || !e.includes(i)) && s.push(i);
1450
+ var w = i.shadowRoot || // check for an undisclosed shadow
1451
+ typeof n.getShadowRoot == "function" && n.getShadowRoot(i), P = !ze(w, !1) && (!n.shadowRootFilter || n.shadowRootFilter(i));
1452
+ if (w && P) {
1453
+ var S = t(w === !0 ? i.children : w.children, !0, n);
1454
+ n.flatten ? s.push.apply(s, S) : s.push({
1455
+ scopeParent: i,
1444
1456
  candidates: S
1445
1457
  });
1446
1458
  } else
1447
- l.unshift.apply(l, s.children);
1459
+ l.unshift.apply(l, i.children);
1448
1460
  }
1449
1461
  }
1450
- return i;
1451
- }, mr = function(e) {
1462
+ return s;
1463
+ }, gr = function(e) {
1452
1464
  return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
1453
1465
  }, ge = function(e) {
1454
1466
  if (!e)
1455
1467
  throw new Error("No node provided");
1456
- return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Nn(e)) && !mr(e) ? 0 : e.tabIndex;
1457
- }, jn = function(e, r) {
1468
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || An(e)) && !gr(e) ? 0 : e.tabIndex;
1469
+ }, In = function(e, r) {
1458
1470
  var n = ge(e);
1459
- return n < 0 && r && !mr(e) ? 0 : n;
1460
- }, An = function(e, r) {
1471
+ return n < 0 && r && !gr(e) ? 0 : n;
1472
+ }, _n = function(e, r) {
1461
1473
  return e.tabIndex === r.tabIndex ? e.documentOrder - r.documentOrder : e.tabIndex - r.tabIndex;
1462
- }, br = function(e) {
1474
+ }, yr = function(e) {
1463
1475
  return e.tagName === "INPUT";
1464
- }, In = function(e) {
1465
- return br(e) && e.type === "hidden";
1466
- }, _n = function(e) {
1476
+ }, Dn = function(e) {
1477
+ return yr(e) && e.type === "hidden";
1478
+ }, Mn = function(e) {
1467
1479
  var r = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(n) {
1468
1480
  return n.tagName === "SUMMARY";
1469
1481
  });
1470
1482
  return r;
1471
- }, Dn = function(e, r) {
1483
+ }, Ln = function(e, r) {
1472
1484
  for (var n = 0; n < e.length; n++)
1473
1485
  if (e[n].checked && e[n].form === r)
1474
1486
  return e[n];
1475
- }, Mn = function(e) {
1487
+ }, $n = function(e) {
1476
1488
  if (!e.name)
1477
1489
  return !0;
1478
- var r = e.form || qe(e), n = function(m) {
1490
+ var r = e.form || Xe(e), n = function(m) {
1479
1491
  return r.querySelectorAll('input[type="radio"][name="' + m + '"]');
1480
- }, i;
1492
+ }, s;
1481
1493
  if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
1482
- i = n(window.CSS.escape(e.name));
1494
+ s = n(window.CSS.escape(e.name));
1483
1495
  else
1484
1496
  try {
1485
- i = n(e.name);
1486
- } catch (s) {
1487
- return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
1497
+ s = n(e.name);
1498
+ } catch (i) {
1499
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
1488
1500
  }
1489
- var l = Dn(i, e.form);
1501
+ var l = Ln(s, e.form);
1490
1502
  return !l || l === e;
1491
- }, Ln = function(e) {
1492
- return br(e) && e.type === "radio";
1493
- }, $n = function(e) {
1494
- return Ln(e) && !Mn(e);
1495
1503
  }, Wn = function(e) {
1496
- var r, n = e && qe(e), i = (r = n) === null || r === void 0 ? void 0 : r.host, l = !1;
1504
+ return yr(e) && e.type === "radio";
1505
+ }, Un = function(e) {
1506
+ return Wn(e) && !$n(e);
1507
+ }, Bn = function(e) {
1508
+ var r, n = e && Xe(e), s = (r = n) === null || r === void 0 ? void 0 : r.host, l = !1;
1497
1509
  if (n && n !== e) {
1498
- var s, m, o;
1499
- for (l = !!((s = i) !== null && s !== void 0 && (m = s.ownerDocument) !== null && m !== void 0 && m.contains(i) || e != null && (o = e.ownerDocument) !== null && o !== void 0 && o.contains(e)); !l && i; ) {
1500
- var g, v, E;
1501
- n = qe(i), i = (g = n) === null || g === void 0 ? void 0 : g.host, l = !!((v = i) !== null && v !== void 0 && (E = v.ownerDocument) !== null && E !== void 0 && E.contains(i));
1510
+ var i, m, o;
1511
+ for (l = !!((i = s) !== null && i !== void 0 && (m = i.ownerDocument) !== null && m !== void 0 && m.contains(s) || e != null && (o = e.ownerDocument) !== null && o !== void 0 && o.contains(e)); !l && s; ) {
1512
+ var g, y, w;
1513
+ n = Xe(s), s = (g = n) === null || g === void 0 ? void 0 : g.host, l = !!((y = s) !== null && y !== void 0 && (w = y.ownerDocument) !== null && w !== void 0 && w.contains(s));
1502
1514
  }
1503
1515
  }
1504
1516
  return l;
1505
- }, qt = function(e) {
1506
- var r = e.getBoundingClientRect(), n = r.width, i = r.height;
1507
- return n === 0 && i === 0;
1508
- }, Un = function(e, r) {
1509
- var n = r.displayCheck, i = r.getShadowRoot;
1517
+ }, zt = function(e) {
1518
+ var r = e.getBoundingClientRect(), n = r.width, s = r.height;
1519
+ return n === 0 && s === 0;
1520
+ }, Kn = function(e, r) {
1521
+ var n = r.displayCheck, s = r.getShadowRoot;
1510
1522
  if (getComputedStyle(e).visibility === "hidden")
1511
1523
  return !0;
1512
- var l = xe.call(e, "details>summary:first-of-type"), s = l ? e.parentElement : e;
1513
- if (xe.call(s, "details:not([open]) *"))
1524
+ var l = xe.call(e, "details>summary:first-of-type"), i = l ? e.parentElement : e;
1525
+ if (xe.call(i, "details:not([open]) *"))
1514
1526
  return !0;
1515
1527
  if (!n || n === "full" || n === "legacy-full") {
1516
- if (typeof i == "function") {
1528
+ if (typeof s == "function") {
1517
1529
  for (var m = e; e; ) {
1518
- var o = e.parentElement, g = qe(e);
1519
- if (o && !o.shadowRoot && i(o) === !0)
1520
- return qt(e);
1530
+ var o = e.parentElement, g = Xe(e);
1531
+ if (o && !o.shadowRoot && s(o) === !0)
1532
+ return zt(e);
1521
1533
  e.assignedSlot ? e = e.assignedSlot : !o && g !== e.ownerDocument ? e = g.host : e = o;
1522
1534
  }
1523
1535
  e = m;
1524
1536
  }
1525
- if (Wn(e))
1537
+ if (Bn(e))
1526
1538
  return !e.getClientRects().length;
1527
1539
  if (n !== "legacy-full")
1528
1540
  return !0;
1529
1541
  } else if (n === "non-zero-area")
1530
- return qt(e);
1542
+ return zt(e);
1531
1543
  return !1;
1532
- }, Bn = function(e) {
1544
+ }, Vn = function(e) {
1533
1545
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
1534
1546
  for (var r = e.parentElement; r; ) {
1535
1547
  if (r.tagName === "FIELDSET" && r.disabled) {
1536
1548
  for (var n = 0; n < r.children.length; n++) {
1537
- var i = r.children.item(n);
1538
- if (i.tagName === "LEGEND")
1539
- return xe.call(r, "fieldset[disabled] *") ? !0 : !i.contains(e);
1549
+ var s = r.children.item(n);
1550
+ if (s.tagName === "LEGEND")
1551
+ return xe.call(r, "fieldset[disabled] *") ? !0 : !s.contains(e);
1540
1552
  }
1541
1553
  return !0;
1542
1554
  }
1543
1555
  r = r.parentElement;
1544
1556
  }
1545
1557
  return !1;
1546
- }, ze = function(e, r) {
1558
+ }, Ge = function(e, r) {
1547
1559
  return !(r.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
1548
1560
  // because we're limited in the type of selectors we can use in JSDom (see related
1549
1561
  // note related to `candidateSelectors`)
1550
- Xe(r) || In(r) || Un(r, e) || // For a details element with a summary, the summary element gets the focus
1551
- _n(r) || Bn(r));
1552
- }, gt = function(e, r) {
1553
- return !($n(r) || ge(r) < 0 || !ze(e, r));
1554
- }, Kn = function(e) {
1562
+ ze(r) || Dn(r) || Kn(r, e) || // For a details element with a summary, the summary element gets the focus
1563
+ Mn(r) || Vn(r));
1564
+ }, wt = function(e, r) {
1565
+ return !(Un(r) || ge(r) < 0 || !Ge(e, r));
1566
+ }, Hn = function(e) {
1555
1567
  var r = parseInt(e.getAttribute("tabindex"), 10);
1556
1568
  return !!(isNaN(r) || r >= 0);
1557
- }, Vn = function t(e) {
1569
+ }, Yn = function t(e) {
1558
1570
  var r = [], n = [];
1559
- return e.forEach(function(i, l) {
1560
- var s = !!i.scopeParent, m = s ? i.scopeParent : i, o = jn(m, s), g = s ? t(i.candidates) : m;
1561
- o === 0 ? s ? r.push.apply(r, g) : r.push(m) : n.push({
1571
+ return e.forEach(function(s, l) {
1572
+ var i = !!s.scopeParent, m = i ? s.scopeParent : s, o = In(m, i), g = i ? t(s.candidates) : m;
1573
+ o === 0 ? i ? r.push.apply(r, g) : r.push(m) : n.push({
1562
1574
  documentOrder: l,
1563
1575
  tabIndex: o,
1564
- item: i,
1565
- isScope: s,
1576
+ item: s,
1577
+ isScope: i,
1566
1578
  content: g
1567
1579
  });
1568
- }), n.sort(An).reduce(function(i, l) {
1569
- return l.isScope ? i.push.apply(i, l.content) : i.push(l.content), i;
1580
+ }), n.sort(_n).reduce(function(s, l) {
1581
+ return l.isScope ? s.push.apply(s, l.content) : s.push(l.content), s;
1570
1582
  }, []).concat(r);
1571
- }, Hn = function(e, r) {
1583
+ }, qn = function(e, r) {
1572
1584
  r = r || {};
1573
1585
  var n;
1574
- return r.getShadowRoot ? n = hr([e], r.includeContainer, {
1575
- filter: gt.bind(null, r),
1586
+ return r.getShadowRoot ? n = br([e], r.includeContainer, {
1587
+ filter: wt.bind(null, r),
1576
1588
  flatten: !1,
1577
1589
  getShadowRoot: r.getShadowRoot,
1578
- shadowRootFilter: Kn
1579
- }) : n = pr(e, r.includeContainer, gt.bind(null, r)), Vn(n);
1580
- }, Yn = function(e, r) {
1590
+ shadowRootFilter: Hn
1591
+ }) : n = mr(e, r.includeContainer, wt.bind(null, r)), Yn(n);
1592
+ }, Xn = function(e, r) {
1581
1593
  r = r || {};
1582
1594
  var n;
1583
- return r.getShadowRoot ? n = hr([e], r.includeContainer, {
1584
- filter: ze.bind(null, r),
1595
+ return r.getShadowRoot ? n = br([e], r.includeContainer, {
1596
+ filter: Ge.bind(null, r),
1585
1597
  flatten: !0,
1586
1598
  getShadowRoot: r.getShadowRoot
1587
- }) : n = pr(e, r.includeContainer, ze.bind(null, r)), n;
1588
- }, Se = function(e, r) {
1599
+ }) : n = mr(e, r.includeContainer, Ge.bind(null, r)), n;
1600
+ }, Oe = function(e, r) {
1589
1601
  if (r = r || {}, !e)
1590
1602
  throw new Error("No node provided");
1591
- return xe.call(e, Ye) === !1 ? !1 : gt(r, e);
1592
- }, qn = /* @__PURE__ */ fr.concat("iframe").join(","), vt = function(e, r) {
1603
+ return xe.call(e, qe) === !1 ? !1 : wt(r, e);
1604
+ }, zn = /* @__PURE__ */ pr.concat("iframe").join(","), ht = function(e, r) {
1593
1605
  if (r = r || {}, !e)
1594
1606
  throw new Error("No node provided");
1595
- return xe.call(e, qn) === !1 ? !1 : ze(r, e);
1607
+ return xe.call(e, zn) === !1 ? !1 : Ge(r, e);
1596
1608
  };
1597
- let St = Ge(null);
1598
- St.displayName = "OpenClosedContext";
1609
+ let Pt = Je(null);
1610
+ Pt.displayName = "OpenClosedContext";
1599
1611
  var ye = ((t) => (t[t.Open = 1] = "Open", t[t.Closed = 2] = "Closed", t[t.Closing = 4] = "Closing", t[t.Opening = 8] = "Opening", t))(ye || {});
1600
- function gr() {
1601
- return Oe(St);
1612
+ function wr() {
1613
+ return Pe(Pt);
1602
1614
  }
1603
- function Xn({ value: t, children: e }) {
1604
- return X.createElement(St.Provider, { value: t }, e);
1615
+ function Gn({ value: t, children: e }) {
1616
+ return J.createElement(Pt.Provider, { value: t }, e);
1605
1617
  }
1606
- function zn() {
1618
+ function Jn() {
1607
1619
  let t = typeof document > "u";
1608
- return "useSyncExternalStore" in Ie ? ((e) => e.useSyncExternalStore)(Ie)(() => () => {
1620
+ return "useSyncExternalStore" in _e ? ((e) => e.useSyncExternalStore)(_e)(() => () => {
1609
1621
  }, () => !1, () => !t) : !1;
1610
1622
  }
1611
- function yr() {
1612
- let t = zn(), [e, r] = Ie.useState(Be.isHandoffComplete);
1613
- return e && Be.isHandoffComplete === !1 && r(!1), Ie.useEffect(() => {
1623
+ function xr() {
1624
+ let t = Jn(), [e, r] = _e.useState(Ke.isHandoffComplete);
1625
+ return e && Ke.isHandoffComplete === !1 && r(!1), _e.useEffect(() => {
1614
1626
  e !== !0 && r(!0);
1615
- }, [e]), Ie.useEffect(() => Be.handoff(), []), t ? !1 : e;
1627
+ }, [e]), _e.useEffect(() => Ke.handoff(), []), t ? !1 : e;
1616
1628
  }
1617
- function Gn() {
1618
- let t = Y(!1);
1629
+ function Zn() {
1630
+ let t = q(!1);
1619
1631
  return he(() => (t.current = !0, () => {
1620
1632
  t.current = !1;
1621
1633
  }), []), t;
1622
1634
  }
1623
- function wr(t) {
1635
+ function Er(t) {
1624
1636
  var e;
1625
- return !!(t.enter || t.enterFrom || t.enterTo || t.leave || t.leaveFrom || t.leaveTo) || ((e = t.as) != null ? e : Er) !== we || X.Children.count(t.children) === 1;
1637
+ return !!(t.enter || t.enterFrom || t.enterTo || t.leave || t.leaveFrom || t.leaveTo) || ((e = t.as) != null ? e : Rr) !== we || J.Children.count(t.children) === 1;
1626
1638
  }
1627
- let rt = Ge(null);
1628
- rt.displayName = "TransitionContext";
1629
- var Jn = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(Jn || {});
1630
- function Zn() {
1631
- let t = Oe(rt);
1639
+ let nt = Je(null);
1640
+ nt.displayName = "TransitionContext";
1641
+ var Qn = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(Qn || {});
1642
+ function ea() {
1643
+ let t = Pe(nt);
1632
1644
  if (t === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
1633
1645
  return t;
1634
1646
  }
1635
- function Qn() {
1636
- let t = Oe(nt);
1647
+ function ta() {
1648
+ let t = Pe(at);
1637
1649
  if (t === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
1638
1650
  return t;
1639
1651
  }
1640
- let nt = Ge(null);
1641
- nt.displayName = "NestingContext";
1642
- function at(t) {
1643
- return "children" in t ? at(t.children) : t.current.filter(({ el: e }) => e.current !== null).filter(({ state: e }) => e === "visible").length > 0;
1652
+ let at = Je(null);
1653
+ at.displayName = "NestingContext";
1654
+ function it(t) {
1655
+ return "children" in t ? it(t.children) : t.current.filter(({ el: e }) => e.current !== null).filter(({ state: e }) => e === "visible").length > 0;
1644
1656
  }
1645
- function xr(t, e) {
1646
- let r = lr(t), n = Y([]), i = Gn(), l = sr(), s = de((S, w = pe.Hidden) => {
1647
- let f = n.current.findIndex(({ el: d }) => d === S);
1648
- f !== -1 && (tt(w, { [pe.Unmount]() {
1649
- n.current.splice(f, 1);
1657
+ function Tr(t, e) {
1658
+ let r = ur(t), n = q([]), s = Zn(), l = or(), i = de((S, p = pe.Hidden) => {
1659
+ let E = n.current.findIndex(({ el: d }) => d === S);
1660
+ E !== -1 && (rt(p, { [pe.Unmount]() {
1661
+ n.current.splice(E, 1);
1650
1662
  }, [pe.Hidden]() {
1651
- n.current[f].state = "hidden";
1663
+ n.current[E].state = "hidden";
1652
1664
  } }), l.microTask(() => {
1653
1665
  var d;
1654
- !at(n) && i.current && ((d = r.current) == null || d.call(r));
1666
+ !it(n) && s.current && ((d = r.current) == null || d.call(r));
1655
1667
  }));
1656
1668
  }), m = de((S) => {
1657
- let w = n.current.find(({ el: f }) => f === S);
1658
- return w ? w.state !== "visible" && (w.state = "visible") : n.current.push({ el: S, state: "visible" }), () => s(S, pe.Unmount);
1659
- }), o = Y([]), g = Y(Promise.resolve()), v = Y({ enter: [], leave: [] }), E = de((S, w, f) => {
1660
- o.current.splice(0), e && (e.chains.current[w] = e.chains.current[w].filter(([d]) => d !== S)), e == null || e.chains.current[w].push([S, new Promise((d) => {
1669
+ let p = n.current.find(({ el: E }) => E === S);
1670
+ return p ? p.state !== "visible" && (p.state = "visible") : n.current.push({ el: S, state: "visible" }), () => i(S, pe.Unmount);
1671
+ }), o = q([]), g = q(Promise.resolve()), y = q({ enter: [], leave: [] }), w = de((S, p, E) => {
1672
+ o.current.splice(0), e && (e.chains.current[p] = e.chains.current[p].filter(([d]) => d !== S)), e == null || e.chains.current[p].push([S, new Promise((d) => {
1661
1673
  o.current.push(d);
1662
- })]), e == null || e.chains.current[w].push([S, new Promise((d) => {
1663
- Promise.all(v.current[w].map(([p, b]) => b)).then(() => d());
1664
- })]), w === "enter" ? g.current = g.current.then(() => e == null ? void 0 : e.wait.current).then(() => f(w)) : f(w);
1665
- }), R = de((S, w, f) => {
1666
- Promise.all(v.current[w].splice(0).map(([d, p]) => p)).then(() => {
1674
+ })]), e == null || e.chains.current[p].push([S, new Promise((d) => {
1675
+ Promise.all(y.current[p].map(([f, v]) => v)).then(() => d());
1676
+ })]), p === "enter" ? g.current = g.current.then(() => e == null ? void 0 : e.wait.current).then(() => E(p)) : E(p);
1677
+ }), P = de((S, p, E) => {
1678
+ Promise.all(y.current[p].splice(0).map(([d, f]) => f)).then(() => {
1667
1679
  var d;
1668
1680
  (d = o.current.shift()) == null || d();
1669
- }).then(() => f(w));
1681
+ }).then(() => E(p));
1670
1682
  });
1671
- return ve(() => ({ children: n, register: m, unregister: s, onStart: E, onStop: R, wait: g, chains: v }), [m, s, n, E, R, v, g]);
1683
+ return ve(() => ({ children: n, register: m, unregister: i, onStart: w, onStop: P, wait: g, chains: y }), [m, i, n, w, P, y, g]);
1672
1684
  }
1673
- let Er = we, Tr = or.RenderStrategy;
1674
- function ea(t, e) {
1685
+ let Rr = we, Sr = cr.RenderStrategy;
1686
+ function ra(t, e) {
1675
1687
  var r, n;
1676
- let { transition: i = !0, beforeEnter: l, afterEnter: s, beforeLeave: m, afterLeave: o, enter: g, enterFrom: v, enterTo: E, entered: R, leave: S, leaveFrom: w, leaveTo: f, ...d } = t, [p, b] = re(null), T = Y(null), O = wr(t), A = dr(...O ? [T, e, b] : e === null ? [] : [e]), le = (r = d.unmount) == null || r ? pe.Unmount : pe.Hidden, { show: K, appear: J, initial: Q } = Zn(), [H, q] = re(K ? "visible" : "hidden"), N = Qn(), { register: u, unregister: c } = N;
1677
- he(() => u(T), [u, T]), he(() => {
1678
- if (le === pe.Hidden && T.current) {
1679
- if (K && H !== "visible") {
1680
- q("visible");
1688
+ let { transition: s = !0, beforeEnter: l, afterEnter: i, beforeLeave: m, afterLeave: o, enter: g, enterFrom: y, enterTo: w, entered: P, leave: S, leaveFrom: p, leaveTo: E, ...d } = t, [f, v] = z(null), R = q(null), O = Er(t), b = vr(...O ? [R, e, v] : e === null ? [] : [e]), D = (r = d.unmount) == null || r ? pe.Unmount : pe.Hidden, { show: B, appear: Z, initial: ee } = ea(), [Y, G] = z(B ? "visible" : "hidden"), j = ta(), { register: u, unregister: c } = j;
1689
+ he(() => u(R), [u, R]), he(() => {
1690
+ if (D === pe.Hidden && R.current) {
1691
+ if (B && Y !== "visible") {
1692
+ G("visible");
1681
1693
  return;
1682
1694
  }
1683
- return tt(H, { hidden: () => c(T), visible: () => u(T) });
1695
+ return rt(Y, { hidden: () => c(R), visible: () => u(R) });
1684
1696
  }
1685
- }, [H, T, u, c, K, le]);
1686
- let y = yr();
1697
+ }, [Y, R, u, c, B, D]);
1698
+ let T = xr();
1687
1699
  he(() => {
1688
- if (O && y && H === "visible" && T.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
1689
- }, [T, H, y, O]);
1690
- let I = Q && !J, _ = J && K && Q, M = Y(!1), P = xr(() => {
1691
- M.current || (q("hidden"), c(T));
1692
- }, N), $ = de((oe) => {
1693
- M.current = !0;
1694
- let te = oe ? "enter" : "leave";
1695
- P.onStart(T, te, (ce) => {
1700
+ if (O && T && Y === "visible" && R.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
1701
+ }, [R, Y, T, O]);
1702
+ let I = ee && !Z, _ = Z && B && ee, L = q(!1), k = Tr(() => {
1703
+ L.current || (G("hidden"), c(R));
1704
+ }, j), W = de((le) => {
1705
+ L.current = !0;
1706
+ let ne = le ? "enter" : "leave";
1707
+ k.onStart(R, ne, (ce) => {
1696
1708
  ce === "enter" ? l == null || l() : ce === "leave" && (m == null || m());
1697
1709
  });
1698
- }), W = de((oe) => {
1699
- let te = oe ? "enter" : "leave";
1700
- M.current = !1, P.onStop(T, te, (ce) => {
1701
- ce === "enter" ? s == null || s() : ce === "leave" && (o == null || o());
1702
- }), te === "leave" && !at(P) && (q("hidden"), c(T));
1710
+ }), U = de((le) => {
1711
+ let ne = le ? "enter" : "leave";
1712
+ L.current = !1, k.onStop(R, ne, (ce) => {
1713
+ ce === "enter" ? i == null || i() : ce === "leave" && (o == null || o());
1714
+ }), ne === "leave" && !it(k) && (G("hidden"), c(R));
1703
1715
  });
1704
- G(() => {
1705
- O && i || ($(K), W(K));
1706
- }, [K, O, i]);
1707
- let ne = !(!i || !O || !y || I), [, U] = Cn(ne, p, K, { start: $, end: W }), ae = be({ ref: A, className: ((n = bt(d.className, _ && g, _ && v, U.enter && g, U.enter && U.closed && v, U.enter && !U.closed && E, U.leave && S, U.leave && !U.closed && w, U.leave && U.closed && f, !U.transition && K && R)) == null ? void 0 : n.trim()) || void 0, ...On(U) }), ee = 0;
1708
- H === "visible" && (ee |= ye.Open), H === "hidden" && (ee |= ye.Closed), U.enter && (ee |= ye.Opening), U.leave && (ee |= ye.Closing);
1709
- let fe = ur();
1710
- return X.createElement(nt.Provider, { value: P }, X.createElement(Xn, { value: ee }, fe({ ourProps: ae, theirProps: d, defaultTag: Er, features: Tr, visible: H === "visible", name: "Transition.Child" })));
1716
+ X(() => {
1717
+ O && s || (W(B), U(B));
1718
+ }, [B, O, s]);
1719
+ let ae = !(!s || !O || !T || I), [, K] = kn(ae, f, B, { start: W, end: U }), ie = be({ ref: b, className: ((n = yt(d.className, _ && g, _ && y, K.enter && g, K.enter && K.closed && y, K.enter && !K.closed && w, K.leave && S, K.leave && !K.closed && p, K.leave && K.closed && E, !K.transition && B && P)) == null ? void 0 : n.trim()) || void 0, ...Cn(K) }), re = 0;
1720
+ Y === "visible" && (re |= ye.Open), Y === "hidden" && (re |= ye.Closed), K.enter && (re |= ye.Opening), K.leave && (re |= ye.Closing);
1721
+ let fe = dr();
1722
+ return J.createElement(at.Provider, { value: k }, J.createElement(Gn, { value: re }, fe({ ourProps: ie, theirProps: d, defaultTag: Rr, features: Sr, visible: Y === "visible", name: "Transition.Child" })));
1711
1723
  }
1712
- function ta(t, e) {
1713
- let { show: r, appear: n = !1, unmount: i = !0, ...l } = t, s = Y(null), m = wr(t), o = dr(...m ? [s, e] : e === null ? [] : [e]);
1714
- yr();
1715
- let g = gr();
1724
+ function na(t, e) {
1725
+ let { show: r, appear: n = !1, unmount: s = !0, ...l } = t, i = q(null), m = Er(t), o = vr(...m ? [i, e] : e === null ? [] : [e]);
1726
+ xr();
1727
+ let g = wr();
1716
1728
  if (r === void 0 && g !== null && (r = (g & ye.Open) === ye.Open), r === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1717
- let [v, E] = re(r ? "visible" : "hidden"), R = xr(() => {
1718
- r || E("hidden");
1719
- }), [S, w] = re(!0), f = Y([r]);
1729
+ let [y, w] = z(r ? "visible" : "hidden"), P = Tr(() => {
1730
+ r || w("hidden");
1731
+ }), [S, p] = z(!0), E = q([r]);
1720
1732
  he(() => {
1721
- S !== !1 && f.current[f.current.length - 1] !== r && (f.current.push(r), w(!1));
1722
- }, [f, r]);
1733
+ S !== !1 && E.current[E.current.length - 1] !== r && (E.current.push(r), p(!1));
1734
+ }, [E, r]);
1723
1735
  let d = ve(() => ({ show: r, appear: n, initial: S }), [r, n, S]);
1724
1736
  he(() => {
1725
- r ? E("visible") : !at(R) && s.current !== null && E("hidden");
1726
- }, [r, R]);
1727
- let p = { unmount: i }, b = de(() => {
1728
- var A;
1729
- S && w(!1), (A = t.beforeEnter) == null || A.call(t);
1730
- }), T = de(() => {
1731
- var A;
1732
- S && w(!1), (A = t.beforeLeave) == null || A.call(t);
1733
- }), O = ur();
1734
- return X.createElement(nt.Provider, { value: R }, X.createElement(rt.Provider, { value: d }, O({ ourProps: { ...p, as: we, children: X.createElement(Rr, { ref: o, ...p, ...l, beforeEnter: b, beforeLeave: T }) }, theirProps: {}, defaultTag: we, features: Tr, visible: v === "visible", name: "Transition" })));
1737
+ r ? w("visible") : !it(P) && i.current !== null && w("hidden");
1738
+ }, [r, P]);
1739
+ let f = { unmount: s }, v = de(() => {
1740
+ var b;
1741
+ S && p(!1), (b = t.beforeEnter) == null || b.call(t);
1742
+ }), R = de(() => {
1743
+ var b;
1744
+ S && p(!1), (b = t.beforeLeave) == null || b.call(t);
1745
+ }), O = dr();
1746
+ return J.createElement(at.Provider, { value: P }, J.createElement(nt.Provider, { value: d }, O({ ourProps: { ...f, as: we, children: J.createElement(Or, { ref: o, ...f, ...l, beforeEnter: v, beforeLeave: R }) }, theirProps: {}, defaultTag: we, features: Sr, visible: y === "visible", name: "Transition" })));
1735
1747
  }
1736
- function ra(t, e) {
1737
- let r = Oe(rt) !== null, n = gr() !== null;
1738
- return X.createElement(X.Fragment, null, !r && n ? X.createElement(yt, { ref: e, ...t }) : X.createElement(Rr, { ref: e, ...t }));
1748
+ function aa(t, e) {
1749
+ let r = Pe(nt) !== null, n = wr() !== null;
1750
+ return J.createElement(J.Fragment, null, !r && n ? J.createElement(xt, { ref: e, ...t }) : J.createElement(Or, { ref: e, ...t }));
1739
1751
  }
1740
- let yt = Rt(ta), Rr = Rt(ea), it = Rt(ra), na = Object.assign(yt, { Child: it, Root: yt });
1741
- function Sr({ onClick: t }) {
1752
+ let xt = Ot(na), Or = Ot(ra), st = Ot(aa), ia = Object.assign(xt, { Child: st, Root: xt });
1753
+ function Pr({ onClick: t }) {
1742
1754
  return /* @__PURE__ */ F.jsxs(
1743
1755
  "button",
1744
1756
  {
@@ -1775,54 +1787,54 @@ function Sr({ onClick: t }) {
1775
1787
  * focus-trap 7.6.2
1776
1788
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
1777
1789
  */
1778
- function wt(t, e) {
1790
+ function Et(t, e) {
1779
1791
  (e == null || e > t.length) && (e = t.length);
1780
1792
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1781
1793
  return n;
1782
1794
  }
1783
- function aa(t) {
1784
- if (Array.isArray(t)) return wt(t);
1795
+ function sa(t) {
1796
+ if (Array.isArray(t)) return Et(t);
1785
1797
  }
1786
- function ia(t, e, r) {
1787
- return (e = ca(e)) in t ? Object.defineProperty(t, e, {
1798
+ function la(t, e, r) {
1799
+ return (e = fa(e)) in t ? Object.defineProperty(t, e, {
1788
1800
  value: r,
1789
1801
  enumerable: !0,
1790
1802
  configurable: !0,
1791
1803
  writable: !0
1792
1804
  }) : t[e] = r, t;
1793
1805
  }
1794
- function sa(t) {
1806
+ function oa(t) {
1795
1807
  if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
1796
1808
  }
1797
- function la() {
1809
+ function ua() {
1798
1810
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1799
1811
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1800
1812
  }
1801
- function Xt(t, e) {
1813
+ function Gt(t, e) {
1802
1814
  var r = Object.keys(t);
1803
1815
  if (Object.getOwnPropertySymbols) {
1804
1816
  var n = Object.getOwnPropertySymbols(t);
1805
- e && (n = n.filter(function(i) {
1806
- return Object.getOwnPropertyDescriptor(t, i).enumerable;
1817
+ e && (n = n.filter(function(s) {
1818
+ return Object.getOwnPropertyDescriptor(t, s).enumerable;
1807
1819
  })), r.push.apply(r, n);
1808
1820
  }
1809
1821
  return r;
1810
1822
  }
1811
- function zt(t) {
1823
+ function Jt(t) {
1812
1824
  for (var e = 1; e < arguments.length; e++) {
1813
1825
  var r = arguments[e] != null ? arguments[e] : {};
1814
- e % 2 ? Xt(Object(r), !0).forEach(function(n) {
1815
- ia(t, n, r[n]);
1816
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Xt(Object(r)).forEach(function(n) {
1826
+ e % 2 ? Gt(Object(r), !0).forEach(function(n) {
1827
+ la(t, n, r[n]);
1828
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Gt(Object(r)).forEach(function(n) {
1817
1829
  Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
1818
1830
  });
1819
1831
  }
1820
1832
  return t;
1821
1833
  }
1822
- function oa(t) {
1823
- return aa(t) || sa(t) || da(t) || la();
1834
+ function ca(t) {
1835
+ return sa(t) || oa(t) || va(t) || ua();
1824
1836
  }
1825
- function ua(t, e) {
1837
+ function da(t, e) {
1826
1838
  if (typeof t != "object" || !t) return t;
1827
1839
  var r = t[Symbol.toPrimitive];
1828
1840
  if (r !== void 0) {
@@ -1832,56 +1844,56 @@ function ua(t, e) {
1832
1844
  }
1833
1845
  return (e === "string" ? String : Number)(t);
1834
1846
  }
1835
- function ca(t) {
1836
- var e = ua(t, "string");
1847
+ function fa(t) {
1848
+ var e = da(t, "string");
1837
1849
  return typeof e == "symbol" ? e : e + "";
1838
1850
  }
1839
- function da(t, e) {
1851
+ function va(t, e) {
1840
1852
  if (t) {
1841
- if (typeof t == "string") return wt(t, e);
1853
+ if (typeof t == "string") return Et(t, e);
1842
1854
  var r = {}.toString.call(t).slice(8, -1);
1843
- return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? wt(t, e) : void 0;
1855
+ return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Et(t, e) : void 0;
1844
1856
  }
1845
1857
  }
1846
- var Gt = {
1858
+ var Zt = {
1847
1859
  activateTrap: function(e, r) {
1848
1860
  if (e.length > 0) {
1849
1861
  var n = e[e.length - 1];
1850
1862
  n !== r && n.pause();
1851
1863
  }
1852
- var i = e.indexOf(r);
1853
- i === -1 || e.splice(i, 1), e.push(r);
1864
+ var s = e.indexOf(r);
1865
+ s === -1 || e.splice(s, 1), e.push(r);
1854
1866
  },
1855
1867
  deactivateTrap: function(e, r) {
1856
1868
  var n = e.indexOf(r);
1857
1869
  n !== -1 && e.splice(n, 1), e.length > 0 && e[e.length - 1].unpause();
1858
1870
  }
1859
- }, fa = function(e) {
1871
+ }, pa = function(e) {
1860
1872
  return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
1861
- }, va = function(e) {
1873
+ }, ha = function(e) {
1862
1874
  return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
1863
- }, De = function(e) {
1875
+ }, Me = function(e) {
1864
1876
  return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
1865
- }, pa = function(e) {
1866
- return De(e) && !e.shiftKey;
1867
- }, ha = function(e) {
1868
- return De(e) && e.shiftKey;
1869
- }, Jt = function(e) {
1877
+ }, ma = function(e) {
1878
+ return Me(e) && !e.shiftKey;
1879
+ }, ba = function(e) {
1880
+ return Me(e) && e.shiftKey;
1881
+ }, Qt = function(e) {
1870
1882
  return setTimeout(e, 0);
1871
- }, je = function(e) {
1872
- for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
1873
- n[i - 1] = arguments[i];
1883
+ }, Ae = function(e) {
1884
+ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
1885
+ n[s - 1] = arguments[s];
1874
1886
  return typeof e == "function" ? e.apply(void 0, n) : e;
1875
- }, Ue = function(e) {
1887
+ }, Be = function(e) {
1876
1888
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
1877
- }, ma = [], ba = function(e, r) {
1878
- var n = (r == null ? void 0 : r.document) || document, i = (r == null ? void 0 : r.trapStack) || ma, l = zt({
1889
+ }, ga = [], ya = function(e, r) {
1890
+ var n = (r == null ? void 0 : r.document) || document, s = (r == null ? void 0 : r.trapStack) || ga, l = Jt({
1879
1891
  returnFocusOnDeactivate: !0,
1880
1892
  escapeDeactivates: !0,
1881
1893
  delayInitialFocus: !0,
1882
- isKeyForward: pa,
1883
- isKeyBackward: ha
1884
- }, r), s = {
1894
+ isKeyForward: ma,
1895
+ isKeyBackward: ba
1896
+ }, r), i = {
1885
1897
  // containers given to createFocusTrap()
1886
1898
  // @type {Array<HTMLElement>}
1887
1899
  containers: [],
@@ -1917,70 +1929,70 @@ var Gt = {
1917
1929
  delayInitialFocusTimer: void 0,
1918
1930
  // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
1919
1931
  recentNavEvent: void 0
1920
- }, m, o = function(u, c, y) {
1921
- return u && u[c] !== void 0 ? u[c] : l[y || c];
1932
+ }, m, o = function(u, c, T) {
1933
+ return u && u[c] !== void 0 ? u[c] : l[T || c];
1922
1934
  }, g = function(u, c) {
1923
- var y = typeof (c == null ? void 0 : c.composedPath) == "function" ? c.composedPath() : void 0;
1924
- return s.containerGroups.findIndex(function(I) {
1925
- var _ = I.container, M = I.tabbableNodes;
1935
+ var T = typeof (c == null ? void 0 : c.composedPath) == "function" ? c.composedPath() : void 0;
1936
+ return i.containerGroups.findIndex(function(I) {
1937
+ var _ = I.container, L = I.tabbableNodes;
1926
1938
  return _.contains(u) || // fall back to explicit tabbable search which will take into consideration any
1927
1939
  // web components if the `tabbableOptions.getShadowRoot` option was used for
1928
1940
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
1929
1941
  // look inside web components even if open)
1930
- (y == null ? void 0 : y.includes(_)) || M.find(function(P) {
1931
- return P === u;
1942
+ (T == null ? void 0 : T.includes(_)) || L.find(function(k) {
1943
+ return k === u;
1932
1944
  });
1933
1945
  });
1934
- }, v = function(u) {
1935
- var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = c.hasFallback, I = y === void 0 ? !1 : y, _ = c.params, M = _ === void 0 ? [] : _, P = l[u];
1936
- if (typeof P == "function" && (P = P.apply(void 0, oa(M))), P === !0 && (P = void 0), !P) {
1937
- if (P === void 0 || P === !1)
1938
- return P;
1946
+ }, y = function(u) {
1947
+ var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, T = c.hasFallback, I = T === void 0 ? !1 : T, _ = c.params, L = _ === void 0 ? [] : _, k = l[u];
1948
+ if (typeof k == "function" && (k = k.apply(void 0, ca(L))), k === !0 && (k = void 0), !k) {
1949
+ if (k === void 0 || k === !1)
1950
+ return k;
1939
1951
  throw new Error("`".concat(u, "` was specified but was not a node, or did not return a node"));
1940
1952
  }
1941
- var $ = P;
1942
- if (typeof P == "string") {
1953
+ var W = k;
1954
+ if (typeof k == "string") {
1943
1955
  try {
1944
- $ = n.querySelector(P);
1945
- } catch (W) {
1946
- throw new Error("`".concat(u, '` appears to be an invalid selector; error="').concat(W.message, '"'));
1956
+ W = n.querySelector(k);
1957
+ } catch (U) {
1958
+ throw new Error("`".concat(u, '` appears to be an invalid selector; error="').concat(U.message, '"'));
1947
1959
  }
1948
- if (!$ && !I)
1960
+ if (!W && !I)
1949
1961
  throw new Error("`".concat(u, "` as selector refers to no known node"));
1950
1962
  }
1951
- return $;
1952
- }, E = function() {
1953
- var u = v("initialFocus", {
1963
+ return W;
1964
+ }, w = function() {
1965
+ var u = y("initialFocus", {
1954
1966
  hasFallback: !0
1955
1967
  });
1956
1968
  if (u === !1)
1957
1969
  return !1;
1958
- if (u === void 0 || u && !vt(u, l.tabbableOptions))
1970
+ if (u === void 0 || u && !ht(u, l.tabbableOptions))
1959
1971
  if (g(n.activeElement) >= 0)
1960
1972
  u = n.activeElement;
1961
1973
  else {
1962
- var c = s.tabbableGroups[0], y = c && c.firstTabbableNode;
1963
- u = y || v("fallbackFocus");
1974
+ var c = i.tabbableGroups[0], T = c && c.firstTabbableNode;
1975
+ u = T || y("fallbackFocus");
1964
1976
  }
1965
- else u === null && (u = v("fallbackFocus"));
1977
+ else u === null && (u = y("fallbackFocus"));
1966
1978
  if (!u)
1967
1979
  throw new Error("Your focus-trap needs to have at least one focusable element");
1968
1980
  return u;
1969
- }, R = function() {
1970
- if (s.containerGroups = s.containers.map(function(u) {
1971
- var c = Hn(u, l.tabbableOptions), y = Yn(u, l.tabbableOptions), I = c.length > 0 ? c[0] : void 0, _ = c.length > 0 ? c[c.length - 1] : void 0, M = y.find(function(W) {
1972
- return Se(W);
1973
- }), P = y.slice().reverse().find(function(W) {
1974
- return Se(W);
1975
- }), $ = !!c.find(function(W) {
1976
- return ge(W) > 0;
1981
+ }, P = function() {
1982
+ if (i.containerGroups = i.containers.map(function(u) {
1983
+ var c = qn(u, l.tabbableOptions), T = Xn(u, l.tabbableOptions), I = c.length > 0 ? c[0] : void 0, _ = c.length > 0 ? c[c.length - 1] : void 0, L = T.find(function(U) {
1984
+ return Oe(U);
1985
+ }), k = T.slice().reverse().find(function(U) {
1986
+ return Oe(U);
1987
+ }), W = !!c.find(function(U) {
1988
+ return ge(U) > 0;
1977
1989
  });
1978
1990
  return {
1979
1991
  container: u,
1980
1992
  tabbableNodes: c,
1981
- focusableNodes: y,
1993
+ focusableNodes: T,
1982
1994
  /** True if at least one node with positive `tabindex` was found in this container. */
1983
- posTabIndexesFound: $,
1995
+ posTabIndexesFound: W,
1984
1996
  /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
1985
1997
  firstTabbableNode: I,
1986
1998
  /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
@@ -1993,9 +2005,9 @@ var Gt = {
1993
2005
  // "close enough most of the time" alternative for positive tabindexes which should generally
1994
2006
  // be avoided anyway...
1995
2007
  /** First tabbable node in container, __DOM__ order; `undefined` if none. */
1996
- firstDomTabbableNode: M,
2008
+ firstDomTabbableNode: L,
1997
2009
  /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
1998
- lastDomTabbableNode: P,
2010
+ lastDomTabbableNode: k,
1999
2011
  /**
2000
2012
  * Finds the __tabbable__ node that follows the given node in the specified direction,
2001
2013
  * in this container, if any.
@@ -2004,76 +2016,76 @@ var Gt = {
2004
2016
  * in reverse.
2005
2017
  * @returns {HTMLElement|undefined} The next tabbable node, if any.
2006
2018
  */
2007
- nextTabbableNode: function(ne) {
2008
- var U = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ae = c.indexOf(ne);
2009
- return ae < 0 ? U ? y.slice(y.indexOf(ne) + 1).find(function(ee) {
2010
- return Se(ee);
2011
- }) : y.slice(0, y.indexOf(ne)).reverse().find(function(ee) {
2012
- return Se(ee);
2013
- }) : c[ae + (U ? 1 : -1)];
2019
+ nextTabbableNode: function(ae) {
2020
+ var K = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ie = c.indexOf(ae);
2021
+ return ie < 0 ? K ? T.slice(T.indexOf(ae) + 1).find(function(re) {
2022
+ return Oe(re);
2023
+ }) : T.slice(0, T.indexOf(ae)).reverse().find(function(re) {
2024
+ return Oe(re);
2025
+ }) : c[ie + (K ? 1 : -1)];
2014
2026
  }
2015
2027
  };
2016
- }), s.tabbableGroups = s.containerGroups.filter(function(u) {
2028
+ }), i.tabbableGroups = i.containerGroups.filter(function(u) {
2017
2029
  return u.tabbableNodes.length > 0;
2018
- }), s.tabbableGroups.length <= 0 && !v("fallbackFocus"))
2030
+ }), i.tabbableGroups.length <= 0 && !y("fallbackFocus"))
2019
2031
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
2020
- if (s.containerGroups.find(function(u) {
2032
+ if (i.containerGroups.find(function(u) {
2021
2033
  return u.posTabIndexesFound;
2022
- }) && s.containerGroups.length > 1)
2034
+ }) && i.containerGroups.length > 1)
2023
2035
  throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
2024
2036
  }, S = function(u) {
2025
2037
  var c = u.activeElement;
2026
2038
  if (c)
2027
2039
  return c.shadowRoot && c.shadowRoot.activeElement !== null ? S(c.shadowRoot) : c;
2028
- }, w = function(u) {
2040
+ }, p = function(u) {
2029
2041
  if (u !== !1 && u !== S(document)) {
2030
2042
  if (!u || !u.focus) {
2031
- w(E());
2043
+ p(w());
2032
2044
  return;
2033
2045
  }
2034
2046
  u.focus({
2035
2047
  preventScroll: !!l.preventScroll
2036
- }), s.mostRecentlyFocusedNode = u, fa(u) && u.select();
2048
+ }), i.mostRecentlyFocusedNode = u, pa(u) && u.select();
2037
2049
  }
2038
- }, f = function(u) {
2039
- var c = v("setReturnFocus", {
2050
+ }, E = function(u) {
2051
+ var c = y("setReturnFocus", {
2040
2052
  params: [u]
2041
2053
  });
2042
2054
  return c || (c === !1 ? !1 : u);
2043
2055
  }, d = function(u) {
2044
- var c = u.target, y = u.event, I = u.isBackward, _ = I === void 0 ? !1 : I;
2045
- c = c || Ue(y), R();
2046
- var M = null;
2047
- if (s.tabbableGroups.length > 0) {
2048
- var P = g(c, y), $ = P >= 0 ? s.containerGroups[P] : void 0;
2049
- if (P < 0)
2050
- _ ? M = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : M = s.tabbableGroups[0].firstTabbableNode;
2056
+ var c = u.target, T = u.event, I = u.isBackward, _ = I === void 0 ? !1 : I;
2057
+ c = c || Be(T), P();
2058
+ var L = null;
2059
+ if (i.tabbableGroups.length > 0) {
2060
+ var k = g(c, T), W = k >= 0 ? i.containerGroups[k] : void 0;
2061
+ if (k < 0)
2062
+ _ ? L = i.tabbableGroups[i.tabbableGroups.length - 1].lastTabbableNode : L = i.tabbableGroups[0].firstTabbableNode;
2051
2063
  else if (_) {
2052
- var W = s.tabbableGroups.findIndex(function(oe) {
2053
- var te = oe.firstTabbableNode;
2054
- return c === te;
2064
+ var U = i.tabbableGroups.findIndex(function(le) {
2065
+ var ne = le.firstTabbableNode;
2066
+ return c === ne;
2055
2067
  });
2056
- if (W < 0 && ($.container === c || vt(c, l.tabbableOptions) && !Se(c, l.tabbableOptions) && !$.nextTabbableNode(c, !1)) && (W = P), W >= 0) {
2057
- var ne = W === 0 ? s.tabbableGroups.length - 1 : W - 1, U = s.tabbableGroups[ne];
2058
- M = ge(c) >= 0 ? U.lastTabbableNode : U.lastDomTabbableNode;
2059
- } else De(y) || (M = $.nextTabbableNode(c, !1));
2068
+ if (U < 0 && (W.container === c || ht(c, l.tabbableOptions) && !Oe(c, l.tabbableOptions) && !W.nextTabbableNode(c, !1)) && (U = k), U >= 0) {
2069
+ var ae = U === 0 ? i.tabbableGroups.length - 1 : U - 1, K = i.tabbableGroups[ae];
2070
+ L = ge(c) >= 0 ? K.lastTabbableNode : K.lastDomTabbableNode;
2071
+ } else Me(T) || (L = W.nextTabbableNode(c, !1));
2060
2072
  } else {
2061
- var ae = s.tabbableGroups.findIndex(function(oe) {
2062
- var te = oe.lastTabbableNode;
2063
- return c === te;
2073
+ var ie = i.tabbableGroups.findIndex(function(le) {
2074
+ var ne = le.lastTabbableNode;
2075
+ return c === ne;
2064
2076
  });
2065
- if (ae < 0 && ($.container === c || vt(c, l.tabbableOptions) && !Se(c, l.tabbableOptions) && !$.nextTabbableNode(c)) && (ae = P), ae >= 0) {
2066
- var ee = ae === s.tabbableGroups.length - 1 ? 0 : ae + 1, fe = s.tabbableGroups[ee];
2067
- M = ge(c) >= 0 ? fe.firstTabbableNode : fe.firstDomTabbableNode;
2068
- } else De(y) || (M = $.nextTabbableNode(c));
2077
+ if (ie < 0 && (W.container === c || ht(c, l.tabbableOptions) && !Oe(c, l.tabbableOptions) && !W.nextTabbableNode(c)) && (ie = k), ie >= 0) {
2078
+ var re = ie === i.tabbableGroups.length - 1 ? 0 : ie + 1, fe = i.tabbableGroups[re];
2079
+ L = ge(c) >= 0 ? fe.firstTabbableNode : fe.firstDomTabbableNode;
2080
+ } else Me(T) || (L = W.nextTabbableNode(c));
2069
2081
  }
2070
2082
  } else
2071
- M = v("fallbackFocus");
2072
- return M;
2073
- }, p = function(u) {
2074
- var c = Ue(u);
2083
+ L = y("fallbackFocus");
2084
+ return L;
2085
+ }, f = function(u) {
2086
+ var c = Be(u);
2075
2087
  if (!(g(c, u) >= 0)) {
2076
- if (je(l.clickOutsideDeactivates, u)) {
2088
+ if (Ae(l.clickOutsideDeactivates, u)) {
2077
2089
  m.deactivate({
2078
2090
  // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
2079
2091
  // which will result in the outside click setting focus to the node
@@ -2085,28 +2097,28 @@ var Gt = {
2085
2097
  });
2086
2098
  return;
2087
2099
  }
2088
- je(l.allowOutsideClick, u) || u.preventDefault();
2100
+ Ae(l.allowOutsideClick, u) || u.preventDefault();
2089
2101
  }
2090
- }, b = function(u) {
2091
- var c = Ue(u), y = g(c, u) >= 0;
2092
- if (y || c instanceof Document)
2093
- y && (s.mostRecentlyFocusedNode = c);
2102
+ }, v = function(u) {
2103
+ var c = Be(u), T = g(c, u) >= 0;
2104
+ if (T || c instanceof Document)
2105
+ T && (i.mostRecentlyFocusedNode = c);
2094
2106
  else {
2095
2107
  u.stopImmediatePropagation();
2096
2108
  var I, _ = !0;
2097
- if (s.mostRecentlyFocusedNode)
2098
- if (ge(s.mostRecentlyFocusedNode) > 0) {
2099
- var M = g(s.mostRecentlyFocusedNode), P = s.containerGroups[M].tabbableNodes;
2100
- if (P.length > 0) {
2101
- var $ = P.findIndex(function(W) {
2102
- return W === s.mostRecentlyFocusedNode;
2109
+ if (i.mostRecentlyFocusedNode)
2110
+ if (ge(i.mostRecentlyFocusedNode) > 0) {
2111
+ var L = g(i.mostRecentlyFocusedNode), k = i.containerGroups[L].tabbableNodes;
2112
+ if (k.length > 0) {
2113
+ var W = k.findIndex(function(U) {
2114
+ return U === i.mostRecentlyFocusedNode;
2103
2115
  });
2104
- $ >= 0 && (l.isKeyForward(s.recentNavEvent) ? $ + 1 < P.length && (I = P[$ + 1], _ = !1) : $ - 1 >= 0 && (I = P[$ - 1], _ = !1));
2116
+ W >= 0 && (l.isKeyForward(i.recentNavEvent) ? W + 1 < k.length && (I = k[W + 1], _ = !1) : W - 1 >= 0 && (I = k[W - 1], _ = !1));
2105
2117
  }
2106
2118
  } else
2107
- s.containerGroups.some(function(W) {
2108
- return W.tabbableNodes.some(function(ne) {
2109
- return ge(ne) > 0;
2119
+ i.containerGroups.some(function(U) {
2120
+ return U.tabbableNodes.some(function(ae) {
2121
+ return ge(ae) > 0;
2110
2122
  });
2111
2123
  }) || (_ = !1);
2112
2124
  else
@@ -2114,57 +2126,57 @@ var Gt = {
2114
2126
  _ && (I = d({
2115
2127
  // move FROM the MRU node, not event-related node (which will be the node that is
2116
2128
  // outside the trap causing the focus escape we're trying to fix)
2117
- target: s.mostRecentlyFocusedNode,
2118
- isBackward: l.isKeyBackward(s.recentNavEvent)
2119
- })), w(I || s.mostRecentlyFocusedNode || E());
2129
+ target: i.mostRecentlyFocusedNode,
2130
+ isBackward: l.isKeyBackward(i.recentNavEvent)
2131
+ })), p(I || i.mostRecentlyFocusedNode || w());
2120
2132
  }
2121
- s.recentNavEvent = void 0;
2122
- }, T = function(u) {
2133
+ i.recentNavEvent = void 0;
2134
+ }, R = function(u) {
2123
2135
  var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2124
- s.recentNavEvent = u;
2125
- var y = d({
2136
+ i.recentNavEvent = u;
2137
+ var T = d({
2126
2138
  event: u,
2127
2139
  isBackward: c
2128
2140
  });
2129
- y && (De(u) && u.preventDefault(), w(y));
2141
+ T && (Me(u) && u.preventDefault(), p(T));
2130
2142
  }, O = function(u) {
2131
- (l.isKeyForward(u) || l.isKeyBackward(u)) && T(u, l.isKeyBackward(u));
2132
- }, A = function(u) {
2133
- va(u) && je(l.escapeDeactivates, u) !== !1 && (u.preventDefault(), m.deactivate());
2134
- }, le = function(u) {
2135
- var c = Ue(u);
2136
- g(c, u) >= 0 || je(l.clickOutsideDeactivates, u) || je(l.allowOutsideClick, u) || (u.preventDefault(), u.stopImmediatePropagation());
2137
- }, K = function() {
2138
- if (s.active)
2139
- return Gt.activateTrap(i, m), s.delayInitialFocusTimer = l.delayInitialFocus ? Jt(function() {
2140
- w(E());
2141
- }) : w(E()), n.addEventListener("focusin", b, !0), n.addEventListener("mousedown", p, {
2143
+ (l.isKeyForward(u) || l.isKeyBackward(u)) && R(u, l.isKeyBackward(u));
2144
+ }, b = function(u) {
2145
+ ha(u) && Ae(l.escapeDeactivates, u) !== !1 && (u.preventDefault(), m.deactivate());
2146
+ }, D = function(u) {
2147
+ var c = Be(u);
2148
+ g(c, u) >= 0 || Ae(l.clickOutsideDeactivates, u) || Ae(l.allowOutsideClick, u) || (u.preventDefault(), u.stopImmediatePropagation());
2149
+ }, B = function() {
2150
+ if (i.active)
2151
+ return Zt.activateTrap(s, m), i.delayInitialFocusTimer = l.delayInitialFocus ? Qt(function() {
2152
+ p(w());
2153
+ }) : p(w()), n.addEventListener("focusin", v, !0), n.addEventListener("mousedown", f, {
2142
2154
  capture: !0,
2143
2155
  passive: !1
2144
- }), n.addEventListener("touchstart", p, {
2156
+ }), n.addEventListener("touchstart", f, {
2145
2157
  capture: !0,
2146
2158
  passive: !1
2147
- }), n.addEventListener("click", le, {
2159
+ }), n.addEventListener("click", D, {
2148
2160
  capture: !0,
2149
2161
  passive: !1
2150
2162
  }), n.addEventListener("keydown", O, {
2151
2163
  capture: !0,
2152
2164
  passive: !1
2153
- }), n.addEventListener("keydown", A), m;
2154
- }, J = function() {
2155
- if (s.active)
2156
- return n.removeEventListener("focusin", b, !0), n.removeEventListener("mousedown", p, !0), n.removeEventListener("touchstart", p, !0), n.removeEventListener("click", le, !0), n.removeEventListener("keydown", O, !0), n.removeEventListener("keydown", A), m;
2157
- }, Q = function(u) {
2158
- var c = u.some(function(y) {
2159
- var I = Array.from(y.removedNodes);
2165
+ }), n.addEventListener("keydown", b), m;
2166
+ }, Z = function() {
2167
+ if (i.active)
2168
+ return n.removeEventListener("focusin", v, !0), n.removeEventListener("mousedown", f, !0), n.removeEventListener("touchstart", f, !0), n.removeEventListener("click", D, !0), n.removeEventListener("keydown", O, !0), n.removeEventListener("keydown", b), m;
2169
+ }, ee = function(u) {
2170
+ var c = u.some(function(T) {
2171
+ var I = Array.from(T.removedNodes);
2160
2172
  return I.some(function(_) {
2161
- return _ === s.mostRecentlyFocusedNode;
2173
+ return _ === i.mostRecentlyFocusedNode;
2162
2174
  });
2163
2175
  });
2164
- c && w(E());
2165
- }, H = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(Q) : void 0, q = function() {
2166
- H && (H.disconnect(), s.active && !s.paused && s.containers.map(function(u) {
2167
- H.observe(u, {
2176
+ c && p(w());
2177
+ }, Y = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ee) : void 0, G = function() {
2178
+ Y && (Y.disconnect(), i.active && !i.paused && i.containers.map(function(u) {
2179
+ Y.observe(u, {
2168
2180
  subtree: !0,
2169
2181
  childList: !0
2170
2182
  });
@@ -2172,94 +2184,95 @@ var Gt = {
2172
2184
  };
2173
2185
  return m = {
2174
2186
  get active() {
2175
- return s.active;
2187
+ return i.active;
2176
2188
  },
2177
2189
  get paused() {
2178
- return s.paused;
2190
+ return i.paused;
2179
2191
  },
2180
2192
  activate: function(u) {
2181
- if (s.active)
2193
+ if (i.active)
2182
2194
  return this;
2183
- var c = o(u, "onActivate"), y = o(u, "onPostActivate"), I = o(u, "checkCanFocusTrap");
2184
- I || R(), s.active = !0, s.paused = !1, s.nodeFocusedBeforeActivation = n.activeElement, c == null || c();
2195
+ var c = o(u, "onActivate"), T = o(u, "onPostActivate"), I = o(u, "checkCanFocusTrap");
2196
+ I || P(), i.active = !0, i.paused = !1, i.nodeFocusedBeforeActivation = n.activeElement, c == null || c();
2185
2197
  var _ = function() {
2186
- I && R(), K(), q(), y == null || y();
2198
+ I && P(), B(), G(), T == null || T();
2187
2199
  };
2188
- return I ? (I(s.containers.concat()).then(_, _), this) : (_(), this);
2200
+ return I ? (I(i.containers.concat()).then(_, _), this) : (_(), this);
2189
2201
  },
2190
2202
  deactivate: function(u) {
2191
- if (!s.active)
2203
+ if (!i.active)
2192
2204
  return this;
2193
- var c = zt({
2205
+ var c = Jt({
2194
2206
  onDeactivate: l.onDeactivate,
2195
2207
  onPostDeactivate: l.onPostDeactivate,
2196
2208
  checkCanReturnFocus: l.checkCanReturnFocus
2197
2209
  }, u);
2198
- clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, J(), s.active = !1, s.paused = !1, q(), Gt.deactivateTrap(i, m);
2199
- var y = o(c, "onDeactivate"), I = o(c, "onPostDeactivate"), _ = o(c, "checkCanReturnFocus"), M = o(c, "returnFocus", "returnFocusOnDeactivate");
2200
- y == null || y();
2201
- var P = function() {
2202
- Jt(function() {
2203
- M && w(f(s.nodeFocusedBeforeActivation)), I == null || I();
2210
+ clearTimeout(i.delayInitialFocusTimer), i.delayInitialFocusTimer = void 0, Z(), i.active = !1, i.paused = !1, G(), Zt.deactivateTrap(s, m);
2211
+ var T = o(c, "onDeactivate"), I = o(c, "onPostDeactivate"), _ = o(c, "checkCanReturnFocus"), L = o(c, "returnFocus", "returnFocusOnDeactivate");
2212
+ T == null || T();
2213
+ var k = function() {
2214
+ Qt(function() {
2215
+ L && p(E(i.nodeFocusedBeforeActivation)), I == null || I();
2204
2216
  });
2205
2217
  };
2206
- return M && _ ? (_(f(s.nodeFocusedBeforeActivation)).then(P, P), this) : (P(), this);
2218
+ return L && _ ? (_(E(i.nodeFocusedBeforeActivation)).then(k, k), this) : (k(), this);
2207
2219
  },
2208
2220
  pause: function(u) {
2209
- if (s.paused || !s.active)
2221
+ if (i.paused || !i.active)
2210
2222
  return this;
2211
- var c = o(u, "onPause"), y = o(u, "onPostPause");
2212
- return s.paused = !0, c == null || c(), J(), q(), y == null || y(), this;
2223
+ var c = o(u, "onPause"), T = o(u, "onPostPause");
2224
+ return i.paused = !0, c == null || c(), Z(), G(), T == null || T(), this;
2213
2225
  },
2214
2226
  unpause: function(u) {
2215
- if (!s.paused || !s.active)
2227
+ if (!i.paused || !i.active)
2216
2228
  return this;
2217
- var c = o(u, "onUnpause"), y = o(u, "onPostUnpause");
2218
- return s.paused = !1, c == null || c(), R(), K(), q(), y == null || y(), this;
2229
+ var c = o(u, "onUnpause"), T = o(u, "onPostUnpause");
2230
+ return i.paused = !1, c == null || c(), P(), B(), G(), T == null || T(), this;
2219
2231
  },
2220
2232
  updateContainerElements: function(u) {
2221
2233
  var c = [].concat(u).filter(Boolean);
2222
- return s.containers = c.map(function(y) {
2223
- return typeof y == "string" ? n.querySelector(y) : y;
2224
- }), s.active && R(), q(), this;
2234
+ return i.containers = c.map(function(T) {
2235
+ return typeof T == "string" ? n.querySelector(T) : T;
2236
+ }), i.active && P(), G(), this;
2225
2237
  }
2226
2238
  }, m.updateContainerElements(e), m;
2227
2239
  };
2228
- function Or(t, e) {
2229
- const r = Y(null);
2230
- return G(() => {
2231
- if (!r.current)
2232
- return;
2233
- const n = ba(r.current, {
2234
- clickOutsideDeactivates: !t,
2235
- escapeDeactivates: !t,
2236
- onDeactivate: () => e == null ? void 0 : e(),
2237
- fallbackFocus: () => r.current
2238
- });
2239
- return n.activate(), () => n.deactivate();
2240
- }, []), r;
2240
+ function Cr(t, e, r) {
2241
+ let n = null;
2242
+ return t && (n = ya(t, {
2243
+ clickOutsideDeactivates: !e,
2244
+ escapeDeactivates: !e,
2245
+ onDeactivate: () => r == null ? void 0 : r(),
2246
+ fallbackFocus: () => t
2247
+ }), n.activate()), { deactivate: () => {
2248
+ n == null || n.deactivate(), n = null;
2249
+ }, wrapper: t };
2241
2250
  }
2242
- const ga = ({ modalContext: t, config: e, children: r }) => {
2243
- const n = Or(e == null ? void 0 : e.closeExplicitly, () => t.close());
2244
- return /* @__PURE__ */ F.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ F.jsx(
2251
+ const wa = ({ modalContext: t, config: e, children: r }) => {
2252
+ const [n, s] = z(!1), l = q(null), [i, m] = z(null);
2253
+ function o() {
2254
+ m(Cr(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), s(!0);
2255
+ }
2256
+ return X(() => () => i == null ? void 0 : i.deactivate(), [i]), /* @__PURE__ */ F.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ F.jsx(
2245
2257
  "div",
2246
2258
  {
2247
- className: He("im-modal-positioner flex min-h-full justify-center", {
2259
+ className: Ye("im-modal-positioner flex min-h-full justify-center", {
2248
2260
  "items-start": e.position === "top",
2249
2261
  "items-center": e.position === "center",
2250
2262
  "items-end": e.position === "bottom"
2251
2263
  }),
2252
2264
  children: /* @__PURE__ */ F.jsx(
2253
- it,
2265
+ st,
2254
2266
  {
2255
2267
  as: "div",
2256
- ref: n,
2268
+ ref: l,
2257
2269
  enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2258
2270
  enterTo: "opacity-100 translate-y-0 sm:scale-100",
2259
2271
  leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
2260
2272
  leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2273
+ afterEnter: o,
2261
2274
  afterLeave: t.afterLeave,
2262
- className: He(
2275
+ className: Ye(
2263
2276
  "im-modal-wrapper pointer-events-auto w-full transition duration-300 ease-in-out",
2264
2277
  t.onTopOfStack ? "" : "blur-sm",
2265
2278
  {
@@ -2275,34 +2288,45 @@ const ga = ({ modalContext: t, config: e, children: r }) => {
2275
2288
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
2276
2289
  }
2277
2290
  ),
2278
- children: /* @__PURE__ */ F.jsxs("div", { className: `im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`, children: [
2279
- e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Sr, { onClick: t.close }) }),
2280
- typeof r == "function" ? r({ modalContext: t, config: e }) : r
2281
- ] })
2291
+ children: /* @__PURE__ */ F.jsxs(
2292
+ "div",
2293
+ {
2294
+ className: `im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,
2295
+ "data-inertiaui-modal-entered": n,
2296
+ children: [
2297
+ e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Pr, { onClick: t.close }) }),
2298
+ typeof r == "function" ? r({ modalContext: t, config: e }) : r
2299
+ ]
2300
+ }
2301
+ )
2282
2302
  }
2283
2303
  )
2284
2304
  }
2285
2305
  ) });
2286
- }, ya = ({ modalContext: t, config: e, children: r }) => {
2287
- const n = Or(e == null ? void 0 : e.closeExplicitly, () => t.close());
2288
- return /* @__PURE__ */ F.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ F.jsx(
2306
+ }, xa = ({ modalContext: t, config: e, children: r }) => {
2307
+ const [n, s] = z(!1), l = q(null), [i, m] = z(null);
2308
+ function o() {
2309
+ m(Cr(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), s(!0);
2310
+ }
2311
+ return X(() => () => i == null ? void 0 : i.deactivate(), [i]), /* @__PURE__ */ F.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ F.jsx(
2289
2312
  "div",
2290
2313
  {
2291
- className: He("im-slideover-positioner flex min-h-full items-center", {
2292
- "justify-start": e.position === "left",
2293
- "justify-end": e.position === "right"
2314
+ className: Ye("im-slideover-positioner flex min-h-full items-center", {
2315
+ "justify-start rtl:justify-end": (e == null ? void 0 : e.position) === "left",
2316
+ "justify-end rtl:justify-start": (e == null ? void 0 : e.position) === "right"
2294
2317
  }),
2295
2318
  children: /* @__PURE__ */ F.jsx(
2296
- it,
2319
+ st,
2297
2320
  {
2298
2321
  as: "div",
2299
- ref: n,
2322
+ ref: l,
2300
2323
  enterFrom: `opacity-0 ${e.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
2301
2324
  enterTo: "opacity-100 translate-x-0",
2302
2325
  leaveFrom: "opacity-100 translate-x-0",
2303
2326
  leaveTo: `opacity-0 ${e.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
2327
+ afterEnter: o,
2304
2328
  afterLeave: t.afterLeave,
2305
- className: He(
2329
+ className: Ye(
2306
2330
  "im-slideover-wrapper pointer-events-auto w-full transition duration-300 ease-in-out",
2307
2331
  t.onTopOfStack ? "" : "blur-sm",
2308
2332
  {
@@ -2318,55 +2342,67 @@ const ga = ({ modalContext: t, config: e, children: r }) => {
2318
2342
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
2319
2343
  }
2320
2344
  ),
2321
- children: /* @__PURE__ */ F.jsxs("div", { className: `im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`, children: [
2322
- e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Sr, { onClick: t.close }) }),
2323
- typeof r == "function" ? r({ modalContext: t, config: e }) : r
2324
- ] })
2345
+ children: /* @__PURE__ */ F.jsxs(
2346
+ "div",
2347
+ {
2348
+ className: `im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,
2349
+ "data-inertiaui-modal-entered": n,
2350
+ children: [
2351
+ e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Pr, { onClick: t.close }) }),
2352
+ typeof r == "function" ? r({ modalContext: t, config: e }) : r
2353
+ ]
2354
+ }
2355
+ )
2325
2356
  }
2326
2357
  )
2327
2358
  }
2328
2359
  ) });
2329
- }, wa = xt(({ name: t, children: e, ...r }, n) => {
2330
- const i = (s) => typeof e == "function" ? e(s) : e, l = Y(null);
2331
- return G(() => {
2332
- var s;
2333
- if (((s = l == null ? void 0 : l.current) == null ? void 0 : s.index) === 0)
2334
- return Kt.prepare(), () => Kt.cleanup();
2335
- }, [l]), Zt(n, () => l.current, [l]), /* @__PURE__ */ F.jsx(
2336
- ar,
2360
+ }, Ea = Tt(({ name: t, children: e, onFocus: r = null, onBlur: n = null, onClose: s = null, onSuccess: l = null, onAfterLeave: i = null, ...m }, o) => {
2361
+ const g = (w) => typeof e == "function" ? e(w) : e, y = q(null);
2362
+ return X(() => {
2363
+ var w;
2364
+ if (((w = y == null ? void 0 : y.current) == null ? void 0 : w.index) === 0)
2365
+ return Ht.prepare(), () => Ht.cleanup();
2366
+ }, [y]), er(o, () => y.current, [y]), /* @__PURE__ */ F.jsx(
2367
+ sr,
2337
2368
  {
2338
- ref: l,
2369
+ ref: y,
2339
2370
  name: t,
2340
- ...r,
2371
+ onFocus: r,
2372
+ onBlur: n,
2373
+ onClose: s,
2374
+ onSuccess: l,
2375
+ ...m,
2341
2376
  children: ({
2342
- afterLeave: s,
2343
- close: m,
2344
- config: o,
2345
- emit: g,
2346
- getChildModal: v,
2347
- getParentModal: E,
2348
- id: R,
2349
- index: S,
2350
- isOpen: w,
2351
- modalContext: f,
2352
- onTopOfStack: d,
2353
- reload: p,
2354
- setOpen: b,
2355
- shouldRender: T
2377
+ afterLeave: w,
2378
+ close: P,
2379
+ config: S,
2380
+ emit: p,
2381
+ getChildModal: E,
2382
+ getParentModal: d,
2383
+ id: f,
2384
+ index: v,
2385
+ isOpen: R,
2386
+ modalContext: O,
2387
+ onTopOfStack: b,
2388
+ reload: D,
2389
+ setOpen: B,
2390
+ shouldRender: Z
2356
2391
  }) => /* @__PURE__ */ F.jsx(
2357
- na,
2392
+ ia,
2358
2393
  {
2359
2394
  appear: !0,
2360
- show: w ?? !1,
2395
+ show: R ?? !1,
2396
+ afterLeave: i,
2361
2397
  children: /* @__PURE__ */ F.jsxs(
2362
2398
  "div",
2363
2399
  {
2364
2400
  className: "im-dialog relative z-20",
2365
- "data-inertiaui-modal-id": R,
2366
- "data-inertiaui-modal-index": S,
2401
+ "data-inertiaui-modal-id": f,
2402
+ "data-inertiaui-modal-index": v,
2367
2403
  children: [
2368
- S === 0 ? /* @__PURE__ */ F.jsx(
2369
- it,
2404
+ v === 0 ? /* @__PURE__ */ F.jsx(
2405
+ st,
2370
2406
  {
2371
2407
  enter: "transition transform ease-in-out duration-300",
2372
2408
  enterFrom: "opacity-0",
@@ -2374,7 +2410,7 @@ const ga = ({ modalContext: t, config: e, children: r }) => {
2374
2410
  leave: "transition transform ease-in-out duration-300",
2375
2411
  leaveFrom: "opacity-100",
2376
2412
  leaveTo: "opacity-0",
2377
- children: d ? /* @__PURE__ */ F.jsx(
2413
+ children: b ? /* @__PURE__ */ F.jsx(
2378
2414
  "div",
2379
2415
  {
2380
2416
  className: "im-backdrop fixed inset-0 z-30 bg-black/75",
@@ -2383,49 +2419,49 @@ const ga = ({ modalContext: t, config: e, children: r }) => {
2383
2419
  ) : /* @__PURE__ */ F.jsx("div", {})
2384
2420
  }
2385
2421
  ) : null,
2386
- S > 0 && d ? /* @__PURE__ */ F.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
2387
- o.slideover ? /* @__PURE__ */ F.jsx(
2388
- ya,
2422
+ v > 0 && b ? /* @__PURE__ */ F.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
2423
+ S.slideover ? /* @__PURE__ */ F.jsx(
2424
+ xa,
2389
2425
  {
2390
- modalContext: f,
2391
- config: o,
2392
- children: i({
2393
- afterLeave: s,
2394
- close: m,
2395
- config: o,
2396
- emit: g,
2397
- getChildModal: v,
2398
- getParentModal: E,
2399
- id: R,
2400
- index: S,
2401
- isOpen: w,
2402
- modalContext: f,
2403
- onTopOfStack: d,
2404
- reload: p,
2405
- setOpen: b,
2406
- shouldRender: T
2426
+ modalContext: O,
2427
+ config: S,
2428
+ children: g({
2429
+ afterLeave: w,
2430
+ close: P,
2431
+ config: S,
2432
+ emit: p,
2433
+ getChildModal: E,
2434
+ getParentModal: d,
2435
+ id: f,
2436
+ index: v,
2437
+ isOpen: R,
2438
+ modalContext: O,
2439
+ onTopOfStack: b,
2440
+ reload: D,
2441
+ setOpen: B,
2442
+ shouldRender: Z
2407
2443
  })
2408
2444
  }
2409
2445
  ) : /* @__PURE__ */ F.jsx(
2410
- ga,
2446
+ wa,
2411
2447
  {
2412
- modalContext: f,
2413
- config: o,
2414
- children: i({
2415
- afterLeave: s,
2416
- close: m,
2417
- config: o,
2418
- emit: g,
2419
- getChildModal: v,
2420
- getParentModal: E,
2421
- id: R,
2422
- index: S,
2423
- isOpen: w,
2424
- modalContext: f,
2425
- onTopOfStack: d,
2426
- reload: p,
2427
- setOpen: b,
2428
- shouldRender: T
2448
+ modalContext: O,
2449
+ config: S,
2450
+ children: g({
2451
+ afterLeave: w,
2452
+ close: P,
2453
+ config: S,
2454
+ emit: p,
2455
+ getChildModal: E,
2456
+ getParentModal: d,
2457
+ id: f,
2458
+ index: v,
2459
+ isOpen: R,
2460
+ modalContext: O,
2461
+ onTopOfStack: b,
2462
+ reload: D,
2463
+ setOpen: B,
2464
+ shouldRender: Z
2429
2465
  })
2430
2466
  }
2431
2467
  )
@@ -2437,84 +2473,84 @@ const ga = ({ modalContext: t, config: e, children: r }) => {
2437
2473
  }
2438
2474
  );
2439
2475
  });
2440
- wa.displayName = "Modal";
2441
- const ka = ({
2476
+ Ea.displayName = "Modal";
2477
+ const ja = ({
2442
2478
  href: t,
2443
2479
  method: e = "get",
2444
2480
  data: r = {},
2445
2481
  as: n = "a",
2446
- headers: i = {},
2482
+ headers: s = {},
2447
2483
  queryStringArrayFormat: l = "brackets",
2448
- onAfterLeave: s = null,
2484
+ onAfterLeave: i = null,
2449
2485
  onBlur: m = null,
2450
2486
  onClose: o = null,
2451
2487
  onError: g = null,
2452
- onFocus: v = null,
2453
- onStart: E = null,
2454
- onSuccess: R = null,
2488
+ onFocus: y = null,
2489
+ onStart: w = null,
2490
+ onSuccess: P = null,
2455
2491
  navigate: S = null,
2456
- children: w,
2457
- ...f
2492
+ children: p,
2493
+ ...E
2458
2494
  }) => {
2459
- const [d, p] = re(!1), [b, T] = re(null), { stack: O, visit: A } = Qe(), le = ve(() => S ?? Et("navigate"), [S]), K = {}, J = {};
2460
- Object.keys(f).forEach((c) => {
2461
- Vt.includes(c) || (c.startsWith("on") && typeof f[c] == "function" ? c.toLowerCase() in window ? K[c] = f[c] : J[c] = f[c] : K[c] = f[c]);
2495
+ const [d, f] = z(!1), [v, R] = z(null), { stack: O, visit: b } = et(), D = ve(() => S ?? Rt("navigate"), [S]), B = {}, Z = {};
2496
+ Object.keys(E).forEach((c) => {
2497
+ Yt.includes(c) || (c.startsWith("on") && typeof E[c] == "function" ? c.toLowerCase() in window ? B[c] = E[c] : Z[c] = E[c] : B[c] = E[c]);
2462
2498
  });
2463
- const [Q, H] = re(!1);
2464
- G(() => {
2465
- b && (b.onTopOfStack && Q ? v == null || v() : !b.onTopOfStack && !Q && (m == null || m()), H(!b.onTopOfStack));
2499
+ const [ee, Y] = z(!1);
2500
+ X(() => {
2501
+ v && (v.onTopOfStack && ee ? y == null || y() : !v.onTopOfStack && !ee && (m == null || m()), Y(!v.onTopOfStack));
2466
2502
  }, [O]);
2467
- const q = ue(() => {
2503
+ const G = ue(() => {
2468
2504
  o == null || o();
2469
- }, [o]), N = ue(() => {
2470
- T(null), s == null || s();
2471
- }, [s]), u = ue(
2505
+ }, [o]), j = ue(() => {
2506
+ R(null), i == null || i();
2507
+ }, [i]), u = ue(
2472
2508
  (c) => {
2473
- c == null || c.preventDefault(), !d && (t.startsWith("#") || (p(!0), E == null || E()), A(
2509
+ c == null || c.preventDefault(), !d && (t.startsWith("#") || (f(!0), w == null || w()), b(
2474
2510
  t,
2475
2511
  e,
2476
2512
  r,
2477
- i,
2478
- cn(Qt(f, Vt)),
2479
- () => q(O.length),
2480
- N,
2513
+ s,
2514
+ fn(tr(E, Yt)),
2515
+ () => G(O.length),
2516
+ j,
2481
2517
  l,
2482
- le
2483
- ).then((y) => {
2484
- T(y), y.registerEventListenersFromProps(J), R == null || R();
2485
- }).catch((y) => {
2486
- console.error(y), g == null || g(y);
2487
- }).finally(() => p(!1)));
2518
+ D
2519
+ ).then((T) => {
2520
+ R(T), T.registerEventListenersFromProps(Z), P == null || P();
2521
+ }).catch((T) => {
2522
+ console.error(T), g == null || g(T);
2523
+ }).finally(() => f(!1)));
2488
2524
  },
2489
- [t, e, r, i, l, f, q, N]
2525
+ [t, e, r, s, l, E, G, j]
2490
2526
  );
2491
2527
  return /* @__PURE__ */ F.jsx(
2492
2528
  n,
2493
2529
  {
2494
- ...K,
2530
+ ...B,
2495
2531
  href: t,
2496
2532
  onClick: u,
2497
- children: typeof w == "function" ? w({ loading: d }) : w
2533
+ children: typeof p == "function" ? p({ loading: d }) : p
2498
2534
  }
2499
2535
  );
2500
2536
  };
2501
- function Na() {
2502
- return Qe().stack[rr()] ?? null;
2537
+ function Aa() {
2538
+ return et().stack[ar()] ?? null;
2503
2539
  }
2504
- const ja = (t) => (e) => (e.default.layout = (r) => Ke(t, {}, r), e);
2540
+ const Ia = (t) => (e) => (e.default.layout = (r) => Ve(t, {}, r), e);
2505
2541
  export {
2506
- ar as HeadlessModal,
2507
- wa as Modal,
2508
- ka as ModalLink,
2509
- pn as ModalRoot,
2510
- fn as ModalStackProvider,
2511
- Et as getConfig,
2512
- vn as initFromPageProps,
2513
- Ca as putConfig,
2514
- Pa as renderApp,
2515
- Oa as resetConfig,
2516
- ja as setPageLayout,
2517
- Na as useModal,
2518
- rr as useModalIndex,
2519
- Qe as useModalStack
2542
+ sr as HeadlessModal,
2543
+ Ea as Modal,
2544
+ ja as ModalLink,
2545
+ mn as ModalRoot,
2546
+ pn as ModalStackProvider,
2547
+ Rt as getConfig,
2548
+ hn as initFromPageProps,
2549
+ ka as putConfig,
2550
+ Fa as renderApp,
2551
+ Ca as resetConfig,
2552
+ Ia as setPageLayout,
2553
+ Aa as useModal,
2554
+ ar as useModalIndex,
2555
+ et as useModalStack
2520
2556
  };