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