@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.
- package/dist/inertiaui-modal.js +1226 -1190
- package/dist/inertiaui-modal.umd.cjs +16 -16
- package/package.json +1 -1
- package/src/HeadlessModal.jsx +17 -1
- package/src/Modal.jsx +6 -1
- package/src/ModalContent.jsx +17 -3
- package/src/ModalRoot.jsx +46 -36
- package/src/SlideoverContent.jsx +19 -5
- package/src/focusTrapper.js +23 -0
- package/src/helpers.js +2 -2
- package/src/useFocusTrap.js +0 -25
package/dist/inertiaui-modal.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { router as
|
|
8
|
-
import { mergeDataIntoQueryString as
|
|
9
|
-
const
|
|
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
|
|
29
|
+
class on {
|
|
30
30
|
constructor() {
|
|
31
31
|
this.config = {}, this.reset();
|
|
32
32
|
}
|
|
33
33
|
reset() {
|
|
34
|
-
this.config = JSON.parse(JSON.stringify(
|
|
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 ??
|
|
40
|
-
navigate: e.navigate ??
|
|
41
|
-
modal: { ...
|
|
42
|
-
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
|
|
47
|
+
let s = this.config;
|
|
48
48
|
for (let l = 0; l < n.length - 1; l++)
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
58
|
-
if (n[
|
|
57
|
+
for (const s of r) {
|
|
58
|
+
if (n[s] === void 0)
|
|
59
59
|
return null;
|
|
60
|
-
n = n[
|
|
60
|
+
n = n[s];
|
|
61
61
|
}
|
|
62
62
|
return n;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
var
|
|
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
|
|
77
|
-
function
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
var t =
|
|
81
|
-
function
|
|
82
|
-
var
|
|
83
|
-
g !== void 0 && (
|
|
84
|
-
for (
|
|
85
|
-
if (m && m.defaultProps) for (
|
|
86
|
-
return { $$typeof: e, type: m, key:
|
|
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 =
|
|
88
|
+
return Fe.Fragment = r, Fe.jsx = i, Fe.jsxs = i, Fe;
|
|
89
89
|
}
|
|
90
|
-
var
|
|
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
|
|
101
|
-
function
|
|
102
|
-
return
|
|
103
|
-
var t =
|
|
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 =
|
|
107
|
+
var h = p && a[p] || a[E];
|
|
108
108
|
return typeof h == "function" ? h : null;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
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
|
-
|
|
115
|
+
R("error", a, x);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function R(a, h, x) {
|
|
119
119
|
{
|
|
120
|
-
var C =
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
return String(
|
|
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
|
-
|
|
125
|
+
$.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, $);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
var O = !1,
|
|
129
|
-
|
|
130
|
-
function
|
|
131
|
-
return !!(typeof a == "string" || typeof a == "function" || a === n || a === l ||
|
|
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 ===
|
|
135
|
+
a.$$typeof === ee || a.getModuleId !== void 0));
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function G(a, h, x) {
|
|
138
138
|
var C = a.displayName;
|
|
139
139
|
if (C)
|
|
140
140
|
return C;
|
|
141
|
-
var
|
|
142
|
-
return
|
|
141
|
+
var M = h.displayName || h.name || "";
|
|
142
|
+
return M !== "" ? x + "(" + M + ")" : x;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
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" &&
|
|
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
|
|
161
|
+
case s:
|
|
162
162
|
return "StrictMode";
|
|
163
163
|
case g:
|
|
164
164
|
return "Suspense";
|
|
165
|
-
case
|
|
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
|
|
173
|
-
case
|
|
172
|
+
return j(h) + ".Consumer";
|
|
173
|
+
case i:
|
|
174
174
|
var x = a;
|
|
175
|
-
return
|
|
175
|
+
return j(x._context) + ".Provider";
|
|
176
176
|
case o:
|
|
177
|
-
return
|
|
178
|
-
case
|
|
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
|
|
182
|
-
var
|
|
181
|
+
case P: {
|
|
182
|
+
var M = a, $ = M._payload, A = M._init;
|
|
183
183
|
try {
|
|
184
|
-
return u(
|
|
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,
|
|
193
|
-
function
|
|
192
|
+
var c = Object.assign, T = 0, I, _, L, k, W, U, ae;
|
|
193
|
+
function K() {
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
function
|
|
195
|
+
K.__reactDisabledLog = !0;
|
|
196
|
+
function ie() {
|
|
197
197
|
{
|
|
198
|
-
if (
|
|
199
|
-
I = console.log, _ = console.info,
|
|
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:
|
|
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
|
-
|
|
216
|
+
T++;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function re() {
|
|
220
220
|
{
|
|
221
|
-
if (
|
|
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:
|
|
235
|
+
value: L
|
|
236
236
|
}),
|
|
237
237
|
error: c({}, a, {
|
|
238
|
-
value:
|
|
238
|
+
value: k
|
|
239
239
|
}),
|
|
240
240
|
group: c({}, a, {
|
|
241
|
-
value:
|
|
241
|
+
value: W
|
|
242
242
|
}),
|
|
243
243
|
groupCollapsed: c({}, a, {
|
|
244
|
-
value:
|
|
244
|
+
value: U
|
|
245
245
|
}),
|
|
246
246
|
groupEnd: c({}, a, {
|
|
247
|
-
value:
|
|
247
|
+
value: ae
|
|
248
248
|
})
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
|
|
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 =
|
|
255
|
-
function
|
|
254
|
+
var fe = f.ReactCurrentDispatcher, le;
|
|
255
|
+
function ne(a, h, x) {
|
|
256
256
|
{
|
|
257
|
-
if (
|
|
257
|
+
if (le === void 0)
|
|
258
258
|
try {
|
|
259
259
|
throw Error();
|
|
260
|
-
} catch (
|
|
261
|
-
var C =
|
|
262
|
-
|
|
260
|
+
} catch (M) {
|
|
261
|
+
var C = M.stack.trim().match(/\n( *(at )?)/);
|
|
262
|
+
le = C && C[1] || "";
|
|
263
263
|
}
|
|
264
264
|
return `
|
|
265
|
-
` +
|
|
265
|
+
` + le + a;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
var ce = !1,
|
|
268
|
+
var ce = !1, Le;
|
|
269
269
|
{
|
|
270
|
-
var
|
|
271
|
-
|
|
270
|
+
var kr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
271
|
+
Le = new kr();
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Ct(a, h) {
|
|
274
274
|
if (!a || ce)
|
|
275
275
|
return "";
|
|
276
276
|
{
|
|
277
|
-
var x =
|
|
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
|
|
283
|
+
var M = Error.prepareStackTrace;
|
|
284
284
|
Error.prepareStackTrace = void 0;
|
|
285
|
-
var
|
|
286
|
-
|
|
285
|
+
var $;
|
|
286
|
+
$ = fe.current, fe.current = null, ie();
|
|
287
287
|
try {
|
|
288
288
|
if (h) {
|
|
289
|
-
var
|
|
289
|
+
var A = function() {
|
|
290
290
|
throw Error();
|
|
291
291
|
};
|
|
292
|
-
if (Object.defineProperty(
|
|
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(
|
|
299
|
-
} catch (
|
|
300
|
-
C =
|
|
298
|
+
Reflect.construct(A, []);
|
|
299
|
+
} catch (te) {
|
|
300
|
+
C = te;
|
|
301
301
|
}
|
|
302
|
-
Reflect.construct(a, [],
|
|
302
|
+
Reflect.construct(a, [], A);
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
305
|
-
|
|
306
|
-
} catch (
|
|
307
|
-
C =
|
|
305
|
+
A.call();
|
|
306
|
+
} catch (te) {
|
|
307
|
+
C = te;
|
|
308
308
|
}
|
|
309
|
-
a.call(
|
|
309
|
+
a.call(A.prototype);
|
|
310
310
|
}
|
|
311
311
|
} else {
|
|
312
312
|
try {
|
|
313
313
|
throw Error();
|
|
314
|
-
} catch (
|
|
315
|
-
C =
|
|
314
|
+
} catch (te) {
|
|
315
|
+
C = te;
|
|
316
316
|
}
|
|
317
317
|
a();
|
|
318
318
|
}
|
|
319
|
-
} catch (
|
|
320
|
-
if (
|
|
321
|
-
for (var
|
|
322
|
-
`),
|
|
323
|
-
`),
|
|
324
|
-
|
|
325
|
-
for (;
|
|
326
|
-
if (
|
|
327
|
-
if (
|
|
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 (
|
|
330
|
-
var
|
|
331
|
-
` +
|
|
332
|
-
return a.displayName &&
|
|
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 (
|
|
334
|
+
while (V >= 1 && H >= 0);
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
} finally {
|
|
339
|
-
ce = !1, fe.current =
|
|
339
|
+
ce = !1, fe.current = $, re(), Error.prepareStackTrace = M;
|
|
340
340
|
}
|
|
341
|
-
var Te = a ? a.displayName || a.name : "", me = Te ?
|
|
342
|
-
return typeof a == "function" &&
|
|
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
|
|
345
|
-
return
|
|
344
|
+
function Fr(a, h, x) {
|
|
345
|
+
return Ct(a, !1);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Nr(a) {
|
|
348
348
|
var h = a.prototype;
|
|
349
349
|
return !!(h && h.isReactComponent);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function $e(a, h, x) {
|
|
352
352
|
if (a == null)
|
|
353
353
|
return "";
|
|
354
354
|
if (typeof a == "function")
|
|
355
|
-
return
|
|
355
|
+
return Ct(a, Nr(a));
|
|
356
356
|
if (typeof a == "string")
|
|
357
|
-
return
|
|
357
|
+
return ne(a);
|
|
358
358
|
switch (a) {
|
|
359
359
|
case g:
|
|
360
|
-
return
|
|
361
|
-
case
|
|
362
|
-
return
|
|
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
|
|
368
|
-
case
|
|
369
|
-
return
|
|
370
|
-
case
|
|
371
|
-
var C = a,
|
|
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
|
|
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,
|
|
381
|
-
function
|
|
380
|
+
var Ce = Object.prototype.hasOwnProperty, kt = {}, Ft = f.ReactDebugCurrentFrame;
|
|
381
|
+
function We(a) {
|
|
382
382
|
if (a) {
|
|
383
|
-
var h = a._owner, x =
|
|
384
|
-
|
|
383
|
+
var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
|
|
384
|
+
Ft.setExtraStackFrame(x);
|
|
385
385
|
} else
|
|
386
|
-
|
|
386
|
+
Ft.setExtraStackFrame(null);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function jr(a, h, x, C, M) {
|
|
389
389
|
{
|
|
390
|
-
var
|
|
391
|
-
for (var
|
|
392
|
-
if (
|
|
393
|
-
var
|
|
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[
|
|
396
|
-
var
|
|
397
|
-
throw
|
|
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
|
-
|
|
400
|
-
} catch (
|
|
401
|
-
|
|
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
|
-
|
|
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
|
|
408
|
-
function
|
|
409
|
-
return
|
|
407
|
+
var Ar = Array.isArray;
|
|
408
|
+
function lt(a) {
|
|
409
|
+
return Ar(a);
|
|
410
410
|
}
|
|
411
|
-
function
|
|
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
|
|
417
|
+
function _r(a) {
|
|
418
418
|
try {
|
|
419
|
-
return
|
|
419
|
+
return Nt(a), !1;
|
|
420
420
|
} catch {
|
|
421
421
|
return !0;
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Nt(a) {
|
|
425
425
|
return "" + a;
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
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
|
|
431
|
+
var At = f.ReactCurrentOwner, Dr = {
|
|
432
432
|
key: !0,
|
|
433
433
|
ref: !0,
|
|
434
434
|
__self: !0,
|
|
435
435
|
__source: !0
|
|
436
|
-
},
|
|
437
|
-
function
|
|
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
|
|
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
|
|
454
|
-
typeof a.ref == "string" &&
|
|
453
|
+
function $r(a, h) {
|
|
454
|
+
typeof a.ref == "string" && At.current;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Wr(a, h) {
|
|
457
457
|
{
|
|
458
458
|
var x = function() {
|
|
459
|
-
|
|
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
|
|
467
|
+
function Ur(a, h) {
|
|
468
468
|
{
|
|
469
469
|
var x = function() {
|
|
470
|
-
|
|
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
|
|
479
|
-
var
|
|
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:
|
|
486
|
+
props: A,
|
|
487
487
|
// Record the component responsible for creating this element.
|
|
488
|
-
_owner:
|
|
488
|
+
_owner: $
|
|
489
489
|
};
|
|
490
|
-
return
|
|
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(
|
|
495
|
+
}), Object.defineProperty(N, "_self", {
|
|
496
496
|
configurable: !1,
|
|
497
497
|
enumerable: !1,
|
|
498
498
|
writable: !1,
|
|
499
499
|
value: C
|
|
500
|
-
}), Object.defineProperty(
|
|
500
|
+
}), Object.defineProperty(N, "_source", {
|
|
501
501
|
configurable: !1,
|
|
502
502
|
enumerable: !1,
|
|
503
503
|
writable: !1,
|
|
504
|
-
value:
|
|
505
|
-
}), Object.freeze && (Object.freeze(
|
|
504
|
+
value: M
|
|
505
|
+
}), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
|
|
506
506
|
};
|
|
507
|
-
function
|
|
507
|
+
function Kr(a, h, x, C, M) {
|
|
508
508
|
{
|
|
509
|
-
var
|
|
510
|
-
x !== void 0 && (
|
|
511
|
-
for (
|
|
512
|
-
Ce.call(h,
|
|
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
|
|
515
|
-
for (
|
|
516
|
-
|
|
514
|
+
var V = a.defaultProps;
|
|
515
|
+
for ($ in V)
|
|
516
|
+
A[$] === void 0 && (A[$] = V[$]);
|
|
517
517
|
}
|
|
518
|
-
if (
|
|
519
|
-
var
|
|
520
|
-
|
|
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
|
|
522
|
+
return Br(a, N, Q, M, C, At.current, A);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
var
|
|
525
|
+
var ot = f.ReactCurrentOwner, Dt = f.ReactDebugCurrentFrame;
|
|
526
526
|
function Ee(a) {
|
|
527
527
|
if (a) {
|
|
528
|
-
var h = a._owner, x =
|
|
529
|
-
|
|
528
|
+
var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
|
|
529
|
+
Dt.setExtraStackFrame(x);
|
|
530
530
|
} else
|
|
531
|
-
|
|
531
|
+
Dt.setExtraStackFrame(null);
|
|
532
532
|
}
|
|
533
|
-
var
|
|
534
|
-
|
|
535
|
-
function
|
|
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
|
|
538
|
+
function Mt() {
|
|
539
539
|
{
|
|
540
|
-
if (
|
|
541
|
-
var a = u(
|
|
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
|
|
550
|
+
function Vr(a) {
|
|
551
551
|
return "";
|
|
552
552
|
}
|
|
553
|
-
var
|
|
554
|
-
function
|
|
553
|
+
var Lt = {};
|
|
554
|
+
function Hr(a) {
|
|
555
555
|
{
|
|
556
|
-
var h =
|
|
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
|
|
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 =
|
|
572
|
-
if (
|
|
571
|
+
var x = Hr(h);
|
|
572
|
+
if (Lt[x])
|
|
573
573
|
return;
|
|
574
|
-
|
|
574
|
+
Lt[x] = !0;
|
|
575
575
|
var C = "";
|
|
576
|
-
a && a._owner && a._owner !==
|
|
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
|
|
579
|
+
function Wt(a, h) {
|
|
580
580
|
{
|
|
581
581
|
if (typeof a != "object")
|
|
582
582
|
return;
|
|
583
|
-
if (
|
|
583
|
+
if (lt(a))
|
|
584
584
|
for (var x = 0; x < a.length; x++) {
|
|
585
585
|
var C = a[x];
|
|
586
|
-
|
|
586
|
+
ct(C) && $t(C, h);
|
|
587
587
|
}
|
|
588
|
-
else if (
|
|
588
|
+
else if (ct(a))
|
|
589
589
|
a._store && (a._store.validated = !0);
|
|
590
590
|
else if (a) {
|
|
591
|
-
var
|
|
592
|
-
if (typeof
|
|
593
|
-
for (var
|
|
594
|
-
|
|
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
|
|
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 ===
|
|
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
|
-
|
|
615
|
-
} else if (h.PropTypes !== void 0 && !
|
|
616
|
-
|
|
617
|
-
var
|
|
618
|
-
|
|
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 &&
|
|
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
|
|
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),
|
|
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),
|
|
632
|
+
a.ref !== null && (Ee(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), Ee(null));
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
var
|
|
636
|
-
function
|
|
635
|
+
var Ut = {};
|
|
636
|
+
function Bt(a, h, x, C, M, $) {
|
|
637
637
|
{
|
|
638
|
-
var
|
|
639
|
-
if (!
|
|
640
|
-
var
|
|
641
|
-
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (
|
|
642
|
-
var
|
|
643
|
-
|
|
644
|
-
var
|
|
645
|
-
a === null ?
|
|
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
|
|
648
|
-
if (
|
|
649
|
-
return
|
|
650
|
-
if (
|
|
651
|
-
var
|
|
652
|
-
if (
|
|
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 (
|
|
655
|
-
for (var Te = 0; Te <
|
|
656
|
-
|
|
657
|
-
Object.freeze && Object.freeze(
|
|
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
|
-
|
|
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
|
-
|
|
661
|
+
Wt(se, a);
|
|
662
662
|
}
|
|
663
663
|
if (Ce.call(h, "key")) {
|
|
664
|
-
var me = u(a),
|
|
665
|
-
return
|
|
666
|
-
}),
|
|
667
|
-
if (
|
|
668
|
-
var
|
|
669
|
-
|
|
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} />`,
|
|
674
|
+
<%s key={someKey} {...props} />`, dt, me, Zr, me), Ut[me + dt] = !0;
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
-
return a === n ?
|
|
677
|
+
return a === n ? qr(H) : Yr(H), H;
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
return
|
|
680
|
+
function Xr(a, h, x) {
|
|
681
|
+
return Bt(a, h, x, !0);
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
return
|
|
683
|
+
function zr(a, h, x) {
|
|
684
|
+
return Bt(a, h, x, !1);
|
|
685
685
|
}
|
|
686
|
-
var
|
|
687
|
-
|
|
688
|
-
}()),
|
|
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" ?
|
|
691
|
-
var F =
|
|
692
|
-
const
|
|
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
|
|
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
|
|
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
|
|
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
|
|
723
|
-
return new Promise((n,
|
|
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
|
|
732
|
+
let i = e * 1e3 / r;
|
|
730
733
|
const m = setInterval(() => {
|
|
731
734
|
const o = t();
|
|
732
|
-
o && (clearInterval(m), n(o)), --
|
|
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
|
|
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
|
|
740
|
-
|
|
741
|
-
let
|
|
742
|
-
const
|
|
743
|
-
const [e, r] =
|
|
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
|
|
748
|
+
const f = E([...d]), v = (R) => {
|
|
746
749
|
var O;
|
|
747
|
-
return
|
|
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
|
|
750
|
-
|
|
751
|
-
}),
|
|
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
|
-
|
|
755
|
-
|
|
757
|
+
X(() => {
|
|
758
|
+
gt = e;
|
|
756
759
|
}, [e]);
|
|
757
|
-
class
|
|
758
|
-
constructor(d,
|
|
759
|
-
|
|
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((
|
|
764
|
+
(d) => d.map((f) => (f.id === this.id && !f.isOpen && (f.isOpen = !0, f.shouldRender = !0), f))
|
|
767
765
|
);
|
|
768
766
|
});
|
|
769
|
-
|
|
767
|
+
oe(this, "setOpen", (d) => {
|
|
770
768
|
d ? this.show() : this.close();
|
|
771
769
|
});
|
|
772
|
-
|
|
770
|
+
oe(this, "close", () => {
|
|
773
771
|
l(
|
|
774
|
-
(d) => d.map((
|
|
775
|
-
var
|
|
776
|
-
return
|
|
777
|
-
|
|
778
|
-
}),
|
|
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
|
-
|
|
780
|
+
oe(this, "afterLeave", () => {
|
|
783
781
|
this.isOpen || l((d) => {
|
|
784
|
-
const
|
|
785
|
-
var
|
|
786
|
-
return
|
|
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 ? [] :
|
|
786
|
+
return this.index === 0 ? [] : f;
|
|
789
787
|
});
|
|
790
788
|
});
|
|
791
|
-
|
|
792
|
-
d =
|
|
789
|
+
oe(this, "on", (d, f) => {
|
|
790
|
+
d = je(d), this.listeners[d] = this.listeners[d] ?? [], this.listeners[d].push(f);
|
|
793
791
|
});
|
|
794
|
-
|
|
795
|
-
var
|
|
796
|
-
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
|
-
|
|
799
|
-
var
|
|
800
|
-
(
|
|
796
|
+
oe(this, "emit", (d, ...f) => {
|
|
797
|
+
var v;
|
|
798
|
+
(v = this.listeners[je(d)]) == null || v.forEach((R) => R(...f));
|
|
801
799
|
});
|
|
802
|
-
|
|
803
|
-
const
|
|
804
|
-
return Object.keys(d).filter((
|
|
805
|
-
const
|
|
806
|
-
this.on(
|
|
807
|
-
}), () =>
|
|
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
|
-
|
|
810
|
-
var
|
|
811
|
-
let
|
|
812
|
-
d.only && (
|
|
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":
|
|
819
|
-
"X-InertiaUI-Modal":
|
|
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":
|
|
819
|
+
"X-InertiaUI-Modal-Base-Url": De
|
|
822
820
|
}
|
|
823
|
-
}).then((
|
|
824
|
-
this.updateProps(
|
|
821
|
+
}).then((R) => {
|
|
822
|
+
this.updateProps(R.data.props);
|
|
825
823
|
});
|
|
826
824
|
});
|
|
827
|
-
|
|
828
|
-
Object.assign(this.props, d), l((
|
|
825
|
+
oe(this, "updateProps", (d) => {
|
|
826
|
+
Object.assign(this.props, d), l((f) => f);
|
|
829
827
|
});
|
|
830
|
-
this.id =
|
|
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 = (
|
|
837
|
-
const O = new
|
|
838
|
-
return O.index = e.length, l((
|
|
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(
|
|
841
|
-
if (!n[
|
|
842
|
-
throw new Error(`The local modal "${
|
|
843
|
-
const
|
|
844
|
-
return
|
|
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
|
|
847
|
-
|
|
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 ??
|
|
856
|
-
).then((
|
|
857
|
-
const
|
|
858
|
-
return Object.keys(
|
|
859
|
-
const O =
|
|
860
|
-
|
|
861
|
-
}),
|
|
862
|
-
}),
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
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:
|
|
882
|
-
headers:
|
|
883
|
-
|
|
884
|
-
|
|
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
|
-
}
|
|
915
|
+
}, p = {
|
|
910
916
|
stack: e,
|
|
911
917
|
localModals: n,
|
|
912
918
|
push: o,
|
|
913
919
|
pushFromResponseData: m,
|
|
914
920
|
closeAll: () => {
|
|
915
|
-
|
|
921
|
+
gt.reverse().forEach((E) => E.close());
|
|
916
922
|
},
|
|
917
923
|
reset: () => l(() => []),
|
|
918
|
-
visit:
|
|
919
|
-
visitModal:
|
|
920
|
-
registerLocalModal: (
|
|
921
|
-
|
|
922
|
-
...
|
|
923
|
-
[
|
|
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: (
|
|
927
|
-
|
|
928
|
-
const
|
|
929
|
-
return delete
|
|
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(
|
|
934
|
-
},
|
|
935
|
-
const t =
|
|
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
|
-
},
|
|
940
|
-
t.initialPage && (
|
|
941
|
-
},
|
|
942
|
-
|
|
943
|
-
const r = ({ Component: n, props:
|
|
944
|
-
const
|
|
945
|
-
const m =
|
|
946
|
-
return typeof n.layout == "function" ? n.layout(m) : Array.isArray(n.layout) ? n.layout.concat(m).reverse().reduce((g,
|
|
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
|
-
|
|
950
|
-
/* @__PURE__ */ F.jsx(
|
|
955
|
+
i(),
|
|
956
|
+
/* @__PURE__ */ F.jsx(mn, {})
|
|
951
957
|
] });
|
|
952
958
|
};
|
|
953
|
-
return /* @__PURE__ */ F.jsx(
|
|
954
|
-
},
|
|
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 =
|
|
962
|
+
const e = Pe(Qe);
|
|
957
963
|
let r = !1, n = !1;
|
|
958
|
-
|
|
959
|
-
() =>
|
|
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,
|
|
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 &&
|
|
976
|
+
!r && window.location.href !== g.baseUrl && Ie.visit(g.baseUrl, {
|
|
971
977
|
preserveScroll: !0,
|
|
972
978
|
preserveState: !0
|
|
973
979
|
});
|
|
974
|
-
}).then((
|
|
975
|
-
|
|
980
|
+
}).then((y) => {
|
|
981
|
+
bt = y;
|
|
976
982
|
});
|
|
977
983
|
}),
|
|
978
984
|
[]
|
|
979
985
|
);
|
|
980
|
-
const
|
|
981
|
-
|
|
982
|
-
const l =
|
|
983
|
-
return
|
|
984
|
-
var
|
|
985
|
-
const o = (
|
|
986
|
-
|
|
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(
|
|
995
|
+
e.stack.length > 0 && /* @__PURE__ */ F.jsx(ir, { index: 0 })
|
|
990
996
|
] });
|
|
991
|
-
},
|
|
992
|
-
|
|
993
|
-
const
|
|
994
|
-
const t =
|
|
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
|
-
},
|
|
999
|
-
const { stack: e } =
|
|
1000
|
-
return (r == null ? void 0 : r.component) && /* @__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
|
-
},
|
|
1008
|
-
const
|
|
1009
|
-
var
|
|
1010
|
-
return (
|
|
1011
|
-
}, [
|
|
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:
|
|
1014
|
-
closeButton:
|
|
1015
|
-
closeExplicitly:
|
|
1016
|
-
maxWidth:
|
|
1017
|
-
paddingClasses:
|
|
1018
|
-
panelClasses:
|
|
1019
|
-
position:
|
|
1020
|
-
...
|
|
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
|
-
[
|
|
1028
|
+
[i, p == null ? void 0 : p.config]
|
|
1023
1029
|
);
|
|
1024
|
-
|
|
1030
|
+
X(() => {
|
|
1025
1031
|
if (t) {
|
|
1026
|
-
let
|
|
1027
|
-
return
|
|
1028
|
-
|
|
1032
|
+
let b = null;
|
|
1033
|
+
return y(t, (D) => {
|
|
1034
|
+
b = D.registerEventListenersFromProps(i), S(D);
|
|
1029
1035
|
}), () => {
|
|
1030
|
-
|
|
1036
|
+
b == null || b(), b = null, w(t);
|
|
1031
1037
|
};
|
|
1032
1038
|
}
|
|
1033
|
-
return
|
|
1039
|
+
return p.registerEventListenersFromProps(i);
|
|
1034
1040
|
}, [t]);
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
}, [
|
|
1039
|
-
|
|
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
|
|
1043
|
-
return (
|
|
1054
|
+
var b;
|
|
1055
|
+
return (b = v.current) == null ? void 0 : b.afterLeave();
|
|
1044
1056
|
},
|
|
1045
1057
|
close: () => {
|
|
1046
|
-
var
|
|
1047
|
-
return (
|
|
1058
|
+
var b;
|
|
1059
|
+
return (b = v.current) == null ? void 0 : b.close();
|
|
1048
1060
|
},
|
|
1049
|
-
emit: (...
|
|
1050
|
-
var
|
|
1051
|
-
return (
|
|
1061
|
+
emit: (...b) => {
|
|
1062
|
+
var D;
|
|
1063
|
+
return (D = v.current) == null ? void 0 : D.emit(...b);
|
|
1052
1064
|
},
|
|
1053
1065
|
getChildModal: () => {
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1066
|
+
var b;
|
|
1067
|
+
return (b = v.current) == null ? void 0 : b.getChildModal();
|
|
1056
1068
|
},
|
|
1057
1069
|
getParentModal: () => {
|
|
1058
|
-
var
|
|
1059
|
-
return (
|
|
1070
|
+
var b;
|
|
1071
|
+
return (b = v.current) == null ? void 0 : b.getParentModal();
|
|
1060
1072
|
},
|
|
1061
|
-
reload: (...
|
|
1062
|
-
var
|
|
1063
|
-
return (
|
|
1073
|
+
reload: (...b) => {
|
|
1074
|
+
var D;
|
|
1075
|
+
return (D = v.current) == null ? void 0 : D.reload(...b);
|
|
1064
1076
|
},
|
|
1065
1077
|
setOpen: () => {
|
|
1066
|
-
var
|
|
1067
|
-
return (
|
|
1078
|
+
var b;
|
|
1079
|
+
return (b = v.current) == null ? void 0 : b.setOpen();
|
|
1068
1080
|
},
|
|
1069
1081
|
get id() {
|
|
1070
|
-
var
|
|
1071
|
-
return (
|
|
1082
|
+
var b;
|
|
1083
|
+
return (b = v.current) == null ? void 0 : b.id;
|
|
1072
1084
|
},
|
|
1073
1085
|
get index() {
|
|
1074
|
-
var
|
|
1075
|
-
return (
|
|
1086
|
+
var b;
|
|
1087
|
+
return (b = v.current) == null ? void 0 : b.index;
|
|
1076
1088
|
},
|
|
1077
1089
|
get isOpen() {
|
|
1078
|
-
var
|
|
1079
|
-
return (
|
|
1090
|
+
var b;
|
|
1091
|
+
return (b = v.current) == null ? void 0 : b.isOpen;
|
|
1080
1092
|
},
|
|
1081
1093
|
get config() {
|
|
1082
|
-
var
|
|
1083
|
-
return (
|
|
1094
|
+
var b;
|
|
1095
|
+
return (b = v.current) == null ? void 0 : b.config;
|
|
1084
1096
|
},
|
|
1085
1097
|
get modalContext() {
|
|
1086
|
-
return
|
|
1098
|
+
return v.current;
|
|
1087
1099
|
},
|
|
1088
1100
|
get onTopOfStack() {
|
|
1089
|
-
var
|
|
1090
|
-
return (
|
|
1101
|
+
var b;
|
|
1102
|
+
return (b = v.current) == null ? void 0 : b.onTopOfStack;
|
|
1091
1103
|
},
|
|
1092
1104
|
get shouldRender() {
|
|
1093
|
-
var
|
|
1094
|
-
return (
|
|
1105
|
+
var b;
|
|
1106
|
+
return (b = v.current) == null ? void 0 : b.shouldRender;
|
|
1095
1107
|
}
|
|
1096
1108
|
}),
|
|
1097
|
-
[
|
|
1098
|
-
), (
|
|
1109
|
+
[p]
|
|
1110
|
+
), (p == null ? void 0 : p.shouldRender) && /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
|
|
1099
1111
|
typeof e == "function" ? e({
|
|
1100
|
-
afterLeave:
|
|
1101
|
-
close:
|
|
1102
|
-
config:
|
|
1103
|
-
emit:
|
|
1104
|
-
getChildModal:
|
|
1105
|
-
getParentModal:
|
|
1106
|
-
id:
|
|
1107
|
-
index:
|
|
1108
|
-
isOpen:
|
|
1109
|
-
modalContext:
|
|
1110
|
-
onTopOfStack:
|
|
1111
|
-
reload:
|
|
1112
|
-
setOpen:
|
|
1113
|
-
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(
|
|
1127
|
+
E && /* @__PURE__ */ F.jsx(ir, { index: E })
|
|
1116
1128
|
] });
|
|
1117
1129
|
});
|
|
1118
|
-
|
|
1119
|
-
function
|
|
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
|
|
1124
|
-
for (e = 0; e <
|
|
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
|
|
1129
|
-
for (var t, e, r = 0, n = "",
|
|
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
|
|
1133
|
-
let
|
|
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
|
-
|
|
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
|
-
},
|
|
1162
|
-
function
|
|
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
|
|
1168
|
-
let t = [], e = { addEventListener(r, n,
|
|
1169
|
-
return r.addEventListener(n,
|
|
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
|
|
1192
|
+
return wn(() => {
|
|
1181
1193
|
n.current && r[0]();
|
|
1182
1194
|
}), e.add(() => {
|
|
1183
1195
|
n.current = !1;
|
|
1184
1196
|
});
|
|
1185
|
-
}, style(r, n,
|
|
1197
|
+
}, style(r, n, s) {
|
|
1186
1198
|
let l = r.style.getPropertyValue(n);
|
|
1187
|
-
return Object.assign(r.style, { [n]:
|
|
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 =
|
|
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
|
|
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
|
|
1204
|
-
let [t] =
|
|
1205
|
-
return
|
|
1215
|
+
function or() {
|
|
1216
|
+
let [t] = z(tt);
|
|
1217
|
+
return X(() => () => t.dispose(), [t]), t;
|
|
1206
1218
|
}
|
|
1207
1219
|
let he = (t, e) => {
|
|
1208
|
-
|
|
1220
|
+
Ke.isServer ? X(t, e) : rn(t, e);
|
|
1209
1221
|
};
|
|
1210
|
-
function
|
|
1211
|
-
let e =
|
|
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 =
|
|
1218
|
-
return
|
|
1229
|
+
let e = ur(t);
|
|
1230
|
+
return J.useCallback((...r) => e.current(...r), [e]);
|
|
1219
1231
|
};
|
|
1220
|
-
function
|
|
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
|
|
1235
|
+
function rt(t, e, ...r) {
|
|
1224
1236
|
if (t in e) {
|
|
1225
|
-
let
|
|
1226
|
-
return typeof
|
|
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((
|
|
1229
|
-
throw Error.captureStackTrace && Error.captureStackTrace(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
|
|
1232
|
-
function
|
|
1233
|
-
let t =
|
|
1234
|
-
return ue((e) =>
|
|
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
|
|
1237
|
-
m = m ??
|
|
1238
|
-
let o =
|
|
1239
|
-
if (l) return
|
|
1240
|
-
let g =
|
|
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:
|
|
1243
|
-
if (
|
|
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:
|
|
1247
|
-
return
|
|
1258
|
+
let { unmount: y = !0, ...w } = o;
|
|
1259
|
+
return rt(y ? 0 : 1, { 0() {
|
|
1248
1260
|
return null;
|
|
1249
1261
|
}, 1() {
|
|
1250
|
-
return
|
|
1262
|
+
return Ue({ ...w, hidden: !0, style: { display: "none" } }, r, n, i, m);
|
|
1251
1263
|
} });
|
|
1252
1264
|
}
|
|
1253
|
-
return
|
|
1265
|
+
return Ue(o, r, n, i, m);
|
|
1254
1266
|
}
|
|
1255
|
-
function
|
|
1256
|
-
let { as: l = r, children:
|
|
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
|
|
1270
|
+
let w = {};
|
|
1259
1271
|
if (e) {
|
|
1260
|
-
let
|
|
1261
|
-
for (let [
|
|
1262
|
-
if (
|
|
1263
|
-
|
|
1264
|
-
for (let
|
|
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(
|
|
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(
|
|
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((
|
|
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
|
|
1274
|
-
for (let
|
|
1275
|
-
return
|
|
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
|
|
1289
|
+
return Ve(l, Object.assign({}, pt(o, ["ref"]), l !== we && g, l !== we && w), y);
|
|
1278
1290
|
}
|
|
1279
|
-
function
|
|
1280
|
-
let t =
|
|
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
|
|
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
|
|
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
|
|
1297
|
-
if (e.disabled || e["aria-disabled"]) for (let n in r) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n) && (r[n] = [(
|
|
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 =
|
|
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](
|
|
1302
|
-
let
|
|
1303
|
-
for (let m of
|
|
1304
|
-
if ((
|
|
1305
|
-
m(
|
|
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
|
|
1322
|
+
function Ot(t) {
|
|
1311
1323
|
var e;
|
|
1312
|
-
return Object.assign(
|
|
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
|
|
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
|
|
1325
|
-
return
|
|
1336
|
+
function Rn(t) {
|
|
1337
|
+
return J.version.split(".")[0] >= "19" ? t.props.ref : t.ref;
|
|
1326
1338
|
}
|
|
1327
|
-
let
|
|
1328
|
-
function
|
|
1329
|
-
let e =
|
|
1330
|
-
|
|
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
|
|
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[
|
|
1348
|
+
return t.every((n) => n == null || (n == null ? void 0 : n[Sn])) ? void 0 : r;
|
|
1337
1349
|
}
|
|
1338
|
-
function
|
|
1339
|
-
let [e, r] =
|
|
1340
|
-
return { flags: e, setFlag: n, addFlag:
|
|
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
|
|
1343
|
-
typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((
|
|
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
|
|
1348
|
-
function
|
|
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
|
|
1354
|
-
let [
|
|
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
|
|
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 (
|
|
1363
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
1374
|
-
let l =
|
|
1375
|
-
return
|
|
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(
|
|
1389
|
+
l.add(Nn(t, n));
|
|
1378
1390
|
});
|
|
1379
1391
|
}), l.dispose;
|
|
1380
1392
|
}
|
|
1381
|
-
function
|
|
1393
|
+
function Nn(t, e) {
|
|
1382
1394
|
var r, n;
|
|
1383
|
-
let
|
|
1384
|
-
if (!t) return
|
|
1395
|
+
let s = tt();
|
|
1396
|
+
if (!t) return s.dispose;
|
|
1385
1397
|
let l = !1;
|
|
1386
|
-
|
|
1398
|
+
s.add(() => {
|
|
1387
1399
|
l = !0;
|
|
1388
1400
|
});
|
|
1389
|
-
let
|
|
1390
|
-
return
|
|
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
|
-
}),
|
|
1404
|
+
}), s.dispose);
|
|
1393
1405
|
}
|
|
1394
|
-
function
|
|
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
|
|
1407
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector,
|
|
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
|
-
},
|
|
1424
|
+
}, ze = function t(e, r) {
|
|
1413
1425
|
var n;
|
|
1414
1426
|
r === void 0 && (r = !0);
|
|
1415
|
-
var
|
|
1416
|
-
return
|
|
1417
|
-
},
|
|
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
|
-
},
|
|
1421
|
-
if (
|
|
1432
|
+
}, mr = function(e, r, n) {
|
|
1433
|
+
if (ze(e))
|
|
1422
1434
|
return [];
|
|
1423
|
-
var
|
|
1424
|
-
return r && xe.call(e,
|
|
1425
|
-
},
|
|
1426
|
-
for (var
|
|
1427
|
-
var
|
|
1428
|
-
if (!
|
|
1429
|
-
if (
|
|
1430
|
-
var m =
|
|
1431
|
-
n.flatten ?
|
|
1432
|
-
scopeParent:
|
|
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
|
|
1437
|
-
|
|
1438
|
-
var
|
|
1439
|
-
typeof n.getShadowRoot == "function" && n.getShadowRoot(
|
|
1440
|
-
if (
|
|
1441
|
-
var S = t(
|
|
1442
|
-
n.flatten ?
|
|
1443
|
-
scopeParent:
|
|
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,
|
|
1459
|
+
l.unshift.apply(l, i.children);
|
|
1448
1460
|
}
|
|
1449
1461
|
}
|
|
1450
|
-
return
|
|
1451
|
-
},
|
|
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) ||
|
|
1457
|
-
},
|
|
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 && !
|
|
1460
|
-
},
|
|
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
|
-
},
|
|
1474
|
+
}, yr = function(e) {
|
|
1463
1475
|
return e.tagName === "INPUT";
|
|
1464
|
-
},
|
|
1465
|
-
return
|
|
1466
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
1487
|
+
}, $n = function(e) {
|
|
1476
1488
|
if (!e.name)
|
|
1477
1489
|
return !0;
|
|
1478
|
-
var r = e.form ||
|
|
1490
|
+
var r = e.form || Xe(e), n = function(m) {
|
|
1479
1491
|
return r.querySelectorAll('input[type="radio"][name="' + m + '"]');
|
|
1480
|
-
},
|
|
1492
|
+
}, s;
|
|
1481
1493
|
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
1482
|
-
|
|
1494
|
+
s = n(window.CSS.escape(e.name));
|
|
1483
1495
|
else
|
|
1484
1496
|
try {
|
|
1485
|
-
|
|
1486
|
-
} catch (
|
|
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",
|
|
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 =
|
|
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
|
-
|
|
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
|
|
1499
|
-
for (l = !!((
|
|
1500
|
-
var g,
|
|
1501
|
-
n =
|
|
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
|
-
},
|
|
1506
|
-
var r = e.getBoundingClientRect(), n = r.width,
|
|
1507
|
-
return n === 0 &&
|
|
1508
|
-
},
|
|
1509
|
-
var n = r.displayCheck,
|
|
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"),
|
|
1513
|
-
if (xe.call(
|
|
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
|
|
1528
|
+
if (typeof s == "function") {
|
|
1517
1529
|
for (var m = e; e; ) {
|
|
1518
|
-
var o = e.parentElement, g =
|
|
1519
|
-
if (o && !o.shadowRoot &&
|
|
1520
|
-
return
|
|
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 (
|
|
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
|
|
1542
|
+
return zt(e);
|
|
1531
1543
|
return !1;
|
|
1532
|
-
},
|
|
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
|
|
1538
|
-
if (
|
|
1539
|
-
return xe.call(r, "fieldset[disabled] *") ? !0 : !
|
|
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
|
-
},
|
|
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
|
-
|
|
1551
|
-
|
|
1552
|
-
},
|
|
1553
|
-
return !(
|
|
1554
|
-
},
|
|
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
|
-
},
|
|
1569
|
+
}, Yn = function t(e) {
|
|
1558
1570
|
var r = [], n = [];
|
|
1559
|
-
return e.forEach(function(
|
|
1560
|
-
var
|
|
1561
|
-
o === 0 ?
|
|
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:
|
|
1565
|
-
isScope:
|
|
1576
|
+
item: s,
|
|
1577
|
+
isScope: i,
|
|
1566
1578
|
content: g
|
|
1567
1579
|
});
|
|
1568
|
-
}), n.sort(
|
|
1569
|
-
return l.isScope ?
|
|
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
|
-
},
|
|
1583
|
+
}, qn = function(e, r) {
|
|
1572
1584
|
r = r || {};
|
|
1573
1585
|
var n;
|
|
1574
|
-
return r.getShadowRoot ? n =
|
|
1575
|
-
filter:
|
|
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:
|
|
1579
|
-
}) : n =
|
|
1580
|
-
},
|
|
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 =
|
|
1584
|
-
filter:
|
|
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 =
|
|
1588
|
-
},
|
|
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,
|
|
1592
|
-
},
|
|
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,
|
|
1607
|
+
return xe.call(e, zn) === !1 ? !1 : Ge(r, e);
|
|
1596
1608
|
};
|
|
1597
|
-
let
|
|
1598
|
-
|
|
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
|
|
1601
|
-
return
|
|
1612
|
+
function wr() {
|
|
1613
|
+
return Pe(Pt);
|
|
1602
1614
|
}
|
|
1603
|
-
function
|
|
1604
|
-
return
|
|
1615
|
+
function Gn({ value: t, children: e }) {
|
|
1616
|
+
return J.createElement(Pt.Provider, { value: t }, e);
|
|
1605
1617
|
}
|
|
1606
|
-
function
|
|
1618
|
+
function Jn() {
|
|
1607
1619
|
let t = typeof document > "u";
|
|
1608
|
-
return "useSyncExternalStore" in
|
|
1620
|
+
return "useSyncExternalStore" in _e ? ((e) => e.useSyncExternalStore)(_e)(() => () => {
|
|
1609
1621
|
}, () => !1, () => !t) : !1;
|
|
1610
1622
|
}
|
|
1611
|
-
function
|
|
1612
|
-
let t =
|
|
1613
|
-
return e &&
|
|
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]),
|
|
1627
|
+
}, [e]), _e.useEffect(() => Ke.handoff(), []), t ? !1 : e;
|
|
1616
1628
|
}
|
|
1617
|
-
function
|
|
1618
|
-
let t =
|
|
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
|
|
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 :
|
|
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
|
|
1628
|
-
|
|
1629
|
-
var
|
|
1630
|
-
function
|
|
1631
|
-
let t =
|
|
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
|
|
1636
|
-
let t =
|
|
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
|
|
1641
|
-
|
|
1642
|
-
function
|
|
1643
|
-
return "children" in t ?
|
|
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
|
|
1646
|
-
let r =
|
|
1647
|
-
let
|
|
1648
|
-
|
|
1649
|
-
n.current.splice(
|
|
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[
|
|
1663
|
+
n.current[E].state = "hidden";
|
|
1652
1664
|
} }), l.microTask(() => {
|
|
1653
1665
|
var d;
|
|
1654
|
-
!
|
|
1666
|
+
!it(n) && s.current && ((d = r.current) == null || d.call(r));
|
|
1655
1667
|
}));
|
|
1656
1668
|
}), m = de((S) => {
|
|
1657
|
-
let
|
|
1658
|
-
return
|
|
1659
|
-
}), o =
|
|
1660
|
-
o.current.splice(0), e && (e.chains.current[
|
|
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[
|
|
1663
|
-
Promise.all(
|
|
1664
|
-
})]),
|
|
1665
|
-
}),
|
|
1666
|
-
Promise.all(
|
|
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(() =>
|
|
1681
|
+
}).then(() => E(p));
|
|
1670
1682
|
});
|
|
1671
|
-
return ve(() => ({ children: n, register: m, unregister:
|
|
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
|
|
1674
|
-
function
|
|
1685
|
+
let Rr = we, Sr = cr.RenderStrategy;
|
|
1686
|
+
function ra(t, e) {
|
|
1675
1687
|
var r, n;
|
|
1676
|
-
let { transition:
|
|
1677
|
-
he(() => u(
|
|
1678
|
-
if (
|
|
1679
|
-
if (
|
|
1680
|
-
|
|
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
|
|
1695
|
+
return rt(Y, { hidden: () => c(R), visible: () => u(R) });
|
|
1684
1696
|
}
|
|
1685
|
-
}, [
|
|
1686
|
-
let
|
|
1697
|
+
}, [Y, R, u, c, B, D]);
|
|
1698
|
+
let T = xr();
|
|
1687
1699
|
he(() => {
|
|
1688
|
-
if (O &&
|
|
1689
|
-
}, [
|
|
1690
|
-
let I =
|
|
1691
|
-
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1694
|
-
let
|
|
1695
|
-
|
|
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
|
-
}),
|
|
1699
|
-
let
|
|
1700
|
-
|
|
1701
|
-
ce === "enter" ?
|
|
1702
|
-
}),
|
|
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
|
-
|
|
1705
|
-
O &&
|
|
1706
|
-
}, [
|
|
1707
|
-
let
|
|
1708
|
-
|
|
1709
|
-
let fe =
|
|
1710
|
-
return
|
|
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
|
|
1713
|
-
let { show: r, appear: n = !1, unmount:
|
|
1714
|
-
|
|
1715
|
-
let g =
|
|
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 [
|
|
1718
|
-
r ||
|
|
1719
|
-
}), [S,
|
|
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 &&
|
|
1722
|
-
}, [
|
|
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 ?
|
|
1726
|
-
}, [r,
|
|
1727
|
-
let
|
|
1728
|
-
var
|
|
1729
|
-
S &&
|
|
1730
|
-
}),
|
|
1731
|
-
var
|
|
1732
|
-
S &&
|
|
1733
|
-
}), O =
|
|
1734
|
-
return
|
|
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
|
|
1737
|
-
let r =
|
|
1738
|
-
return
|
|
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
|
|
1741
|
-
function
|
|
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
|
|
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
|
|
1784
|
-
if (Array.isArray(t)) return
|
|
1795
|
+
function sa(t) {
|
|
1796
|
+
if (Array.isArray(t)) return Et(t);
|
|
1785
1797
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return (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
|
|
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
|
|
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
|
|
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(
|
|
1806
|
-
return Object.getOwnPropertyDescriptor(t,
|
|
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
|
|
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 ?
|
|
1815
|
-
|
|
1816
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
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
|
|
1823
|
-
return
|
|
1834
|
+
function ca(t) {
|
|
1835
|
+
return sa(t) || oa(t) || va(t) || ua();
|
|
1824
1836
|
}
|
|
1825
|
-
function
|
|
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
|
|
1836
|
-
var e =
|
|
1847
|
+
function fa(t) {
|
|
1848
|
+
var e = da(t, "string");
|
|
1837
1849
|
return typeof e == "symbol" ? e : e + "";
|
|
1838
1850
|
}
|
|
1839
|
-
function
|
|
1851
|
+
function va(t, e) {
|
|
1840
1852
|
if (t) {
|
|
1841
|
-
if (typeof t == "string") return
|
|
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) ?
|
|
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
|
|
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
|
|
1853
|
-
|
|
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
|
-
},
|
|
1871
|
+
}, pa = function(e) {
|
|
1860
1872
|
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
1861
|
-
},
|
|
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
|
-
},
|
|
1875
|
+
}, Me = function(e) {
|
|
1864
1876
|
return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
|
|
1865
|
-
},
|
|
1866
|
-
return
|
|
1867
|
-
},
|
|
1868
|
-
return
|
|
1869
|
-
},
|
|
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
|
-
},
|
|
1872
|
-
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0),
|
|
1873
|
-
n[
|
|
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
|
-
},
|
|
1887
|
+
}, Be = function(e) {
|
|
1876
1888
|
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
1877
|
-
},
|
|
1878
|
-
var n = (r == null ? void 0 : r.document) || document,
|
|
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:
|
|
1883
|
-
isKeyBackward:
|
|
1884
|
-
}, r),
|
|
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,
|
|
1921
|
-
return u && u[c] !== void 0 ? u[c] : l[
|
|
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
|
|
1924
|
-
return
|
|
1925
|
-
var _ = I.container,
|
|
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
|
-
(
|
|
1931
|
-
return
|
|
1942
|
+
(T == null ? void 0 : T.includes(_)) || L.find(function(k) {
|
|
1943
|
+
return k === u;
|
|
1932
1944
|
});
|
|
1933
1945
|
});
|
|
1934
|
-
},
|
|
1935
|
-
var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
1936
|
-
if (typeof
|
|
1937
|
-
if (
|
|
1938
|
-
return
|
|
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
|
|
1942
|
-
if (typeof
|
|
1953
|
+
var W = k;
|
|
1954
|
+
if (typeof k == "string") {
|
|
1943
1955
|
try {
|
|
1944
|
-
|
|
1945
|
-
} catch (
|
|
1946
|
-
throw new Error("`".concat(u, '` appears to be an invalid selector; error="').concat(
|
|
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 (
|
|
1960
|
+
if (!W && !I)
|
|
1949
1961
|
throw new Error("`".concat(u, "` as selector refers to no known node"));
|
|
1950
1962
|
}
|
|
1951
|
-
return
|
|
1952
|
-
},
|
|
1953
|
-
var u =
|
|
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 && !
|
|
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 =
|
|
1963
|
-
u =
|
|
1974
|
+
var c = i.tabbableGroups[0], T = c && c.firstTabbableNode;
|
|
1975
|
+
u = T || y("fallbackFocus");
|
|
1964
1976
|
}
|
|
1965
|
-
else u === null && (u =
|
|
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
|
-
},
|
|
1970
|
-
if (
|
|
1971
|
-
var c =
|
|
1972
|
-
return
|
|
1973
|
-
}),
|
|
1974
|
-
return
|
|
1975
|
-
}),
|
|
1976
|
-
return ge(
|
|
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:
|
|
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:
|
|
2008
|
+
firstDomTabbableNode: L,
|
|
1997
2009
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1998
|
-
lastDomTabbableNode:
|
|
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(
|
|
2008
|
-
var
|
|
2009
|
-
return
|
|
2010
|
-
return
|
|
2011
|
-
}) :
|
|
2012
|
-
return
|
|
2013
|
-
}) : c[
|
|
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
|
-
}),
|
|
2028
|
+
}), i.tabbableGroups = i.containerGroups.filter(function(u) {
|
|
2017
2029
|
return u.tabbableNodes.length > 0;
|
|
2018
|
-
}),
|
|
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 (
|
|
2032
|
+
if (i.containerGroups.find(function(u) {
|
|
2021
2033
|
return u.posTabIndexesFound;
|
|
2022
|
-
}) &&
|
|
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
|
-
},
|
|
2040
|
+
}, p = function(u) {
|
|
2029
2041
|
if (u !== !1 && u !== S(document)) {
|
|
2030
2042
|
if (!u || !u.focus) {
|
|
2031
|
-
w(
|
|
2043
|
+
p(w());
|
|
2032
2044
|
return;
|
|
2033
2045
|
}
|
|
2034
2046
|
u.focus({
|
|
2035
2047
|
preventScroll: !!l.preventScroll
|
|
2036
|
-
}),
|
|
2048
|
+
}), i.mostRecentlyFocusedNode = u, pa(u) && u.select();
|
|
2037
2049
|
}
|
|
2038
|
-
},
|
|
2039
|
-
var c =
|
|
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,
|
|
2045
|
-
c = c ||
|
|
2046
|
-
var
|
|
2047
|
-
if (
|
|
2048
|
-
var
|
|
2049
|
-
if (
|
|
2050
|
-
_ ?
|
|
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
|
|
2053
|
-
var
|
|
2054
|
-
return c ===
|
|
2064
|
+
var U = i.tabbableGroups.findIndex(function(le) {
|
|
2065
|
+
var ne = le.firstTabbableNode;
|
|
2066
|
+
return c === ne;
|
|
2055
2067
|
});
|
|
2056
|
-
if (
|
|
2057
|
-
var
|
|
2058
|
-
|
|
2059
|
-
} else
|
|
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
|
|
2062
|
-
var
|
|
2063
|
-
return c ===
|
|
2073
|
+
var ie = i.tabbableGroups.findIndex(function(le) {
|
|
2074
|
+
var ne = le.lastTabbableNode;
|
|
2075
|
+
return c === ne;
|
|
2064
2076
|
});
|
|
2065
|
-
if (
|
|
2066
|
-
var
|
|
2067
|
-
|
|
2068
|
-
} else
|
|
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
|
-
|
|
2072
|
-
return
|
|
2073
|
-
},
|
|
2074
|
-
var c =
|
|
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 (
|
|
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
|
-
|
|
2100
|
+
Ae(l.allowOutsideClick, u) || u.preventDefault();
|
|
2089
2101
|
}
|
|
2090
|
-
},
|
|
2091
|
-
var c =
|
|
2092
|
-
if (
|
|
2093
|
-
|
|
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 (
|
|
2098
|
-
if (ge(
|
|
2099
|
-
var
|
|
2100
|
-
if (
|
|
2101
|
-
var
|
|
2102
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
2108
|
-
return
|
|
2109
|
-
return ge(
|
|
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:
|
|
2118
|
-
isBackward: l.isKeyBackward(
|
|
2119
|
-
})),
|
|
2129
|
+
target: i.mostRecentlyFocusedNode,
|
|
2130
|
+
isBackward: l.isKeyBackward(i.recentNavEvent)
|
|
2131
|
+
})), p(I || i.mostRecentlyFocusedNode || w());
|
|
2120
2132
|
}
|
|
2121
|
-
|
|
2122
|
-
},
|
|
2133
|
+
i.recentNavEvent = void 0;
|
|
2134
|
+
}, R = function(u) {
|
|
2123
2135
|
var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2124
|
-
|
|
2125
|
-
var
|
|
2136
|
+
i.recentNavEvent = u;
|
|
2137
|
+
var T = d({
|
|
2126
2138
|
event: u,
|
|
2127
2139
|
isBackward: c
|
|
2128
2140
|
});
|
|
2129
|
-
|
|
2141
|
+
T && (Me(u) && u.preventDefault(), p(T));
|
|
2130
2142
|
}, O = function(u) {
|
|
2131
|
-
(l.isKeyForward(u) || l.isKeyBackward(u)) &&
|
|
2132
|
-
},
|
|
2133
|
-
|
|
2134
|
-
},
|
|
2135
|
-
var c =
|
|
2136
|
-
g(c, u) >= 0 ||
|
|
2137
|
-
},
|
|
2138
|
-
if (
|
|
2139
|
-
return
|
|
2140
|
-
w(
|
|
2141
|
-
}) : w(
|
|
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",
|
|
2156
|
+
}), n.addEventListener("touchstart", f, {
|
|
2145
2157
|
capture: !0,
|
|
2146
2158
|
passive: !1
|
|
2147
|
-
}), n.addEventListener("click",
|
|
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",
|
|
2154
|
-
},
|
|
2155
|
-
if (
|
|
2156
|
-
return n.removeEventListener("focusin",
|
|
2157
|
-
},
|
|
2158
|
-
var c = u.some(function(
|
|
2159
|
-
var I = Array.from(
|
|
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 _ ===
|
|
2173
|
+
return _ === i.mostRecentlyFocusedNode;
|
|
2162
2174
|
});
|
|
2163
2175
|
});
|
|
2164
|
-
c && w(
|
|
2165
|
-
},
|
|
2166
|
-
|
|
2167
|
-
|
|
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
|
|
2187
|
+
return i.active;
|
|
2176
2188
|
},
|
|
2177
2189
|
get paused() {
|
|
2178
|
-
return
|
|
2190
|
+
return i.paused;
|
|
2179
2191
|
},
|
|
2180
2192
|
activate: function(u) {
|
|
2181
|
-
if (
|
|
2193
|
+
if (i.active)
|
|
2182
2194
|
return this;
|
|
2183
|
-
var c = o(u, "onActivate"),
|
|
2184
|
-
I ||
|
|
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 &&
|
|
2198
|
+
I && P(), B(), G(), T == null || T();
|
|
2187
2199
|
};
|
|
2188
|
-
return I ? (I(
|
|
2200
|
+
return I ? (I(i.containers.concat()).then(_, _), this) : (_(), this);
|
|
2189
2201
|
},
|
|
2190
2202
|
deactivate: function(u) {
|
|
2191
|
-
if (!
|
|
2203
|
+
if (!i.active)
|
|
2192
2204
|
return this;
|
|
2193
|
-
var c =
|
|
2205
|
+
var c = Jt({
|
|
2194
2206
|
onDeactivate: l.onDeactivate,
|
|
2195
2207
|
onPostDeactivate: l.onPostDeactivate,
|
|
2196
2208
|
checkCanReturnFocus: l.checkCanReturnFocus
|
|
2197
2209
|
}, u);
|
|
2198
|
-
clearTimeout(
|
|
2199
|
-
var
|
|
2200
|
-
|
|
2201
|
-
var
|
|
2202
|
-
|
|
2203
|
-
|
|
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
|
|
2218
|
+
return L && _ ? (_(E(i.nodeFocusedBeforeActivation)).then(k, k), this) : (k(), this);
|
|
2207
2219
|
},
|
|
2208
2220
|
pause: function(u) {
|
|
2209
|
-
if (
|
|
2221
|
+
if (i.paused || !i.active)
|
|
2210
2222
|
return this;
|
|
2211
|
-
var c = o(u, "onPause"),
|
|
2212
|
-
return
|
|
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 (!
|
|
2227
|
+
if (!i.paused || !i.active)
|
|
2216
2228
|
return this;
|
|
2217
|
-
var c = o(u, "onUnpause"),
|
|
2218
|
-
return
|
|
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
|
|
2223
|
-
return typeof
|
|
2224
|
-
}),
|
|
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
|
|
2229
|
-
|
|
2230
|
-
return
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
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
|
|
2243
|
-
const n =
|
|
2244
|
-
|
|
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:
|
|
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
|
-
|
|
2265
|
+
st,
|
|
2254
2266
|
{
|
|
2255
2267
|
as: "div",
|
|
2256
|
-
ref:
|
|
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:
|
|
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(
|
|
2279
|
-
|
|
2280
|
-
|
|
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
|
-
},
|
|
2287
|
-
const n =
|
|
2288
|
-
|
|
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:
|
|
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
|
-
|
|
2319
|
+
st,
|
|
2297
2320
|
{
|
|
2298
2321
|
as: "div",
|
|
2299
|
-
ref:
|
|
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:
|
|
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(
|
|
2322
|
-
|
|
2323
|
-
|
|
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
|
-
},
|
|
2330
|
-
const
|
|
2331
|
-
return
|
|
2332
|
-
var
|
|
2333
|
-
if (((
|
|
2334
|
-
return
|
|
2335
|
-
}, [
|
|
2336
|
-
|
|
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:
|
|
2369
|
+
ref: y,
|
|
2339
2370
|
name: t,
|
|
2340
|
-
|
|
2371
|
+
onFocus: r,
|
|
2372
|
+
onBlur: n,
|
|
2373
|
+
onClose: s,
|
|
2374
|
+
onSuccess: l,
|
|
2375
|
+
...m,
|
|
2341
2376
|
children: ({
|
|
2342
|
-
afterLeave:
|
|
2343
|
-
close:
|
|
2344
|
-
config:
|
|
2345
|
-
emit:
|
|
2346
|
-
getChildModal:
|
|
2347
|
-
getParentModal:
|
|
2348
|
-
id:
|
|
2349
|
-
index:
|
|
2350
|
-
isOpen:
|
|
2351
|
-
modalContext:
|
|
2352
|
-
onTopOfStack:
|
|
2353
|
-
reload:
|
|
2354
|
-
setOpen:
|
|
2355
|
-
shouldRender:
|
|
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
|
-
|
|
2392
|
+
ia,
|
|
2358
2393
|
{
|
|
2359
2394
|
appear: !0,
|
|
2360
|
-
show:
|
|
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":
|
|
2366
|
-
"data-inertiaui-modal-index":
|
|
2401
|
+
"data-inertiaui-modal-id": f,
|
|
2402
|
+
"data-inertiaui-modal-index": v,
|
|
2367
2403
|
children: [
|
|
2368
|
-
|
|
2369
|
-
|
|
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:
|
|
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
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
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:
|
|
2391
|
-
config:
|
|
2392
|
-
children:
|
|
2393
|
-
afterLeave:
|
|
2394
|
-
close:
|
|
2395
|
-
config:
|
|
2396
|
-
emit:
|
|
2397
|
-
getChildModal:
|
|
2398
|
-
getParentModal:
|
|
2399
|
-
id:
|
|
2400
|
-
index:
|
|
2401
|
-
isOpen:
|
|
2402
|
-
modalContext:
|
|
2403
|
-
onTopOfStack:
|
|
2404
|
-
reload:
|
|
2405
|
-
setOpen:
|
|
2406
|
-
shouldRender:
|
|
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
|
-
|
|
2446
|
+
wa,
|
|
2411
2447
|
{
|
|
2412
|
-
modalContext:
|
|
2413
|
-
config:
|
|
2414
|
-
children:
|
|
2415
|
-
afterLeave:
|
|
2416
|
-
close:
|
|
2417
|
-
config:
|
|
2418
|
-
emit:
|
|
2419
|
-
getChildModal:
|
|
2420
|
-
getParentModal:
|
|
2421
|
-
id:
|
|
2422
|
-
index:
|
|
2423
|
-
isOpen:
|
|
2424
|
-
modalContext:
|
|
2425
|
-
onTopOfStack:
|
|
2426
|
-
reload:
|
|
2427
|
-
setOpen:
|
|
2428
|
-
shouldRender:
|
|
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
|
-
|
|
2441
|
-
const
|
|
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:
|
|
2482
|
+
headers: s = {},
|
|
2447
2483
|
queryStringArrayFormat: l = "brackets",
|
|
2448
|
-
onAfterLeave:
|
|
2484
|
+
onAfterLeave: i = null,
|
|
2449
2485
|
onBlur: m = null,
|
|
2450
2486
|
onClose: o = null,
|
|
2451
2487
|
onError: g = null,
|
|
2452
|
-
onFocus:
|
|
2453
|
-
onStart:
|
|
2454
|
-
onSuccess:
|
|
2488
|
+
onFocus: y = null,
|
|
2489
|
+
onStart: w = null,
|
|
2490
|
+
onSuccess: P = null,
|
|
2455
2491
|
navigate: S = null,
|
|
2456
|
-
children:
|
|
2457
|
-
...
|
|
2492
|
+
children: p,
|
|
2493
|
+
...E
|
|
2458
2494
|
}) => {
|
|
2459
|
-
const [d,
|
|
2460
|
-
Object.keys(
|
|
2461
|
-
|
|
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 [
|
|
2464
|
-
|
|
2465
|
-
|
|
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
|
|
2503
|
+
const G = ue(() => {
|
|
2468
2504
|
o == null || o();
|
|
2469
|
-
}, [o]),
|
|
2470
|
-
|
|
2471
|
-
}, [
|
|
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("#") || (
|
|
2509
|
+
c == null || c.preventDefault(), !d && (t.startsWith("#") || (f(!0), w == null || w()), b(
|
|
2474
2510
|
t,
|
|
2475
2511
|
e,
|
|
2476
2512
|
r,
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
() =>
|
|
2480
|
-
|
|
2513
|
+
s,
|
|
2514
|
+
fn(tr(E, Yt)),
|
|
2515
|
+
() => G(O.length),
|
|
2516
|
+
j,
|
|
2481
2517
|
l,
|
|
2482
|
-
|
|
2483
|
-
).then((
|
|
2484
|
-
T
|
|
2485
|
-
}).catch((
|
|
2486
|
-
console.error(
|
|
2487
|
-
}).finally(() =>
|
|
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,
|
|
2525
|
+
[t, e, r, s, l, E, G, j]
|
|
2490
2526
|
);
|
|
2491
2527
|
return /* @__PURE__ */ F.jsx(
|
|
2492
2528
|
n,
|
|
2493
2529
|
{
|
|
2494
|
-
...
|
|
2530
|
+
...B,
|
|
2495
2531
|
href: t,
|
|
2496
2532
|
onClick: u,
|
|
2497
|
-
children: typeof
|
|
2533
|
+
children: typeof p == "function" ? p({ loading: d }) : p
|
|
2498
2534
|
}
|
|
2499
2535
|
);
|
|
2500
2536
|
};
|
|
2501
|
-
function
|
|
2502
|
-
return
|
|
2537
|
+
function Aa() {
|
|
2538
|
+
return et().stack[ar()] ?? null;
|
|
2503
2539
|
}
|
|
2504
|
-
const
|
|
2540
|
+
const Ia = (t) => (e) => (e.default.layout = (r) => Ve(t, {}, r), e);
|
|
2505
2541
|
export {
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
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
|
};
|