react-composable-treeview 1.0.21 → 1.1.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/README.md +10 -0
- package/dist/contexts/groupContext.d.ts +1 -3
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +410 -421
- package/dist/index.js.map +1 -1
- package/dist/treeView.d.ts +2 -0
- package/package.json +1 -1
- package/dist/hooks/useIndex.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Le, { createContext as We, useRef as
|
|
2
|
-
var
|
|
1
|
+
import Le, { createContext as We, useRef as J, useState as Ue, useCallback as Ge, forwardRef as H, useContext as I, useEffect as ne } from "react";
|
|
2
|
+
var le = { exports: {} }, q = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,20 +10,20 @@ var de = { exports: {} }, J = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var $e;
|
|
13
|
-
function
|
|
14
|
-
if ($e) return
|
|
13
|
+
function Er() {
|
|
14
|
+
if ($e) return q;
|
|
15
15
|
$e = 1;
|
|
16
|
-
var r = Le,
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
16
|
+
var r = Le, u = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function y(f, l, C) {
|
|
18
|
+
var g, E = {}, x = null, S = null;
|
|
19
|
+
C !== void 0 && (x = "" + C), l.key !== void 0 && (x = "" + l.key), l.ref !== void 0 && (S = l.ref);
|
|
20
|
+
for (g in l) a.call(l, g) && !s.hasOwnProperty(g) && (E[g] = l[g]);
|
|
21
|
+
if (f && f.defaultProps) for (g in l = f.defaultProps, l) E[g] === void 0 && (E[g] = l[g]);
|
|
22
|
+
return { $$typeof: u, type: f, key: x, ref: S, props: E, _owner: i.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return q.Fragment = n, q.jsx = y, q.jsxs = y, q;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var K = {};
|
|
27
27
|
/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.development.js
|
|
@@ -34,90 +34,90 @@ var z = {};
|
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
36
|
var Ye;
|
|
37
|
-
function
|
|
37
|
+
function Rr() {
|
|
38
38
|
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var r = Le,
|
|
40
|
-
function
|
|
39
|
+
var r = Le, u = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), f = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), j = Symbol.iterator, $ = "@@iterator";
|
|
40
|
+
function R(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var t =
|
|
43
|
+
var t = j && e[j] || e[$];
|
|
44
44
|
return typeof t == "function" ? t : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var P = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function h(e) {
|
|
48
48
|
{
|
|
49
|
-
for (var t = arguments.length,
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
|
|
50
|
+
o[c - 1] = arguments[c];
|
|
51
|
+
w("error", e, o);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function w(e, t, o) {
|
|
55
55
|
{
|
|
56
|
-
var c =
|
|
57
|
-
p !== "" && (t += "%s",
|
|
58
|
-
var _ =
|
|
59
|
-
return String(
|
|
56
|
+
var c = P.ReactDebugCurrentFrame, p = c.getStackAddendum();
|
|
57
|
+
p !== "" && (t += "%s", o = o.concat([p]));
|
|
58
|
+
var _ = o.map(function(v) {
|
|
59
|
+
return String(v);
|
|
60
60
|
});
|
|
61
61
|
_.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, _);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
64
|
+
var F = !1, D = !1, O = !1, N = !1, Z = !1, ve;
|
|
65
|
+
ve = Symbol.for("react.module.reference");
|
|
66
|
+
function Ke(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === s || Z || e === i || e === C || e === g || N || e === S || F || D || O || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === E || e.$$typeof === y || e.$$typeof === f || e.$$typeof === l || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
|
-
e.$$typeof ===
|
|
71
|
+
e.$$typeof === ve || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Je(e, t, o) {
|
|
74
74
|
var c = e.displayName;
|
|
75
75
|
if (c)
|
|
76
76
|
return c;
|
|
77
77
|
var p = t.displayName || t.name || "";
|
|
78
|
-
return p !== "" ?
|
|
78
|
+
return p !== "" ? o + "(" + p + ")" : o;
|
|
79
79
|
}
|
|
80
80
|
function pe(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Y(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
|
-
if (typeof e.tag == "number" &&
|
|
86
|
+
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
87
87
|
return e.displayName || e.name || null;
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
|
-
case
|
|
91
|
+
case a:
|
|
92
92
|
return "Fragment";
|
|
93
93
|
case n:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case s:
|
|
96
96
|
return "Profiler";
|
|
97
97
|
case i:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case C:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case g:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case
|
|
106
|
+
case f:
|
|
107
107
|
var t = e;
|
|
108
108
|
return pe(t) + ".Consumer";
|
|
109
|
-
case
|
|
110
|
-
var
|
|
111
|
-
return pe(
|
|
112
|
-
case
|
|
113
|
-
return
|
|
114
|
-
case
|
|
109
|
+
case y:
|
|
110
|
+
var o = e;
|
|
111
|
+
return pe(o._context) + ".Provider";
|
|
112
|
+
case l:
|
|
113
|
+
return Je(e, e.render, "ForwardRef");
|
|
114
|
+
case E:
|
|
115
115
|
var c = e.displayName || null;
|
|
116
|
-
return c !== null ? c :
|
|
116
|
+
return c !== null ? c : Y(e.type) || "Memo";
|
|
117
117
|
case x: {
|
|
118
|
-
var p = e, _ = p._payload,
|
|
118
|
+
var p = e, _ = p._payload, v = p._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return Y(v(_));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,13 +125,13 @@ function mr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
128
|
+
var L = Object.assign, B = 0, _e, ge, he, be, Ee, Re, me;
|
|
129
129
|
function ye() {
|
|
130
130
|
}
|
|
131
131
|
ye.__reactDisabledLog = !0;
|
|
132
|
-
function
|
|
132
|
+
function ze() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
134
|
+
if (B === 0) {
|
|
135
135
|
_e = console.log, ge = console.info, he = console.warn, be = console.error, Ee = console.group, Re = console.groupCollapsed, me = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
@@ -149,208 +149,208 @@ function mr() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
B++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function He() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (B--, B === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
161
161
|
writable: !0
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
|
-
log:
|
|
164
|
+
log: L({}, e, {
|
|
165
165
|
value: _e
|
|
166
166
|
}),
|
|
167
|
-
info:
|
|
167
|
+
info: L({}, e, {
|
|
168
168
|
value: ge
|
|
169
169
|
}),
|
|
170
|
-
warn:
|
|
170
|
+
warn: L({}, e, {
|
|
171
171
|
value: he
|
|
172
172
|
}),
|
|
173
|
-
error:
|
|
173
|
+
error: L({}, e, {
|
|
174
174
|
value: be
|
|
175
175
|
}),
|
|
176
|
-
group:
|
|
176
|
+
group: L({}, e, {
|
|
177
177
|
value: Ee
|
|
178
178
|
}),
|
|
179
|
-
groupCollapsed:
|
|
179
|
+
groupCollapsed: L({}, e, {
|
|
180
180
|
value: Re
|
|
181
181
|
}),
|
|
182
|
-
groupEnd:
|
|
182
|
+
groupEnd: L({}, e, {
|
|
183
183
|
value: me
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
B < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function Q(e, t,
|
|
190
|
+
var oe = P.ReactCurrentDispatcher, ae;
|
|
191
|
+
function Q(e, t, o) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (ae === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
196
|
} catch (p) {
|
|
197
197
|
var c = p.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
|
|
198
|
+
ae = c && c[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + ae + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var ue = !1, M;
|
|
205
205
|
{
|
|
206
|
-
var
|
|
207
|
-
|
|
206
|
+
var Xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
M = new Xe();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function we(e, t) {
|
|
210
|
+
if (!e || ue)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var
|
|
214
|
-
if (
|
|
215
|
-
return
|
|
213
|
+
var o = M.get(e);
|
|
214
|
+
if (o !== void 0)
|
|
215
|
+
return o;
|
|
216
216
|
}
|
|
217
217
|
var c;
|
|
218
|
-
|
|
218
|
+
ue = !0;
|
|
219
219
|
var p = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var _;
|
|
222
|
-
_ =
|
|
222
|
+
_ = oe.current, oe.current = null, ze();
|
|
223
223
|
try {
|
|
224
224
|
if (t) {
|
|
225
|
-
var
|
|
225
|
+
var v = function() {
|
|
226
226
|
throw Error();
|
|
227
227
|
};
|
|
228
|
-
if (Object.defineProperty(
|
|
228
|
+
if (Object.defineProperty(v.prototype, "props", {
|
|
229
229
|
set: function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
}
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
|
-
Reflect.construct(
|
|
235
|
-
} catch (
|
|
236
|
-
c =
|
|
234
|
+
Reflect.construct(v, []);
|
|
235
|
+
} catch (A) {
|
|
236
|
+
c = A;
|
|
237
237
|
}
|
|
238
|
-
Reflect.construct(e, [],
|
|
238
|
+
Reflect.construct(e, [], v);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
|
-
|
|
242
|
-
} catch (
|
|
243
|
-
c =
|
|
241
|
+
v.call();
|
|
242
|
+
} catch (A) {
|
|
243
|
+
c = A;
|
|
244
244
|
}
|
|
245
|
-
e.call(
|
|
245
|
+
e.call(v.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
c =
|
|
250
|
+
} catch (A) {
|
|
251
|
+
c = A;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var
|
|
258
|
-
`),
|
|
259
|
-
`),
|
|
260
|
-
|
|
261
|
-
for (;
|
|
262
|
-
if (
|
|
263
|
-
if (
|
|
255
|
+
} catch (A) {
|
|
256
|
+
if (A && c && typeof A.stack == "string") {
|
|
257
|
+
for (var d = A.stack.split(`
|
|
258
|
+
`), T = c.stack.split(`
|
|
259
|
+
`), b = d.length - 1, m = T.length - 1; b >= 1 && m >= 0 && d[b] !== T[m]; )
|
|
260
|
+
m--;
|
|
261
|
+
for (; b >= 1 && m >= 0; b--, m--)
|
|
262
|
+
if (d[b] !== T[m]) {
|
|
263
|
+
if (b !== 1 || m !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (
|
|
266
|
-
var
|
|
267
|
-
` +
|
|
268
|
-
return e.displayName &&
|
|
265
|
+
if (b--, m--, m < 0 || d[b] !== T[m]) {
|
|
266
|
+
var k = `
|
|
267
|
+
` + d[b].replace(" at new ", " at ");
|
|
268
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, k), k;
|
|
269
269
|
}
|
|
270
|
-
while (
|
|
270
|
+
while (b >= 1 && m >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
ue = !1, oe.current = _, He(), Error.prepareStackTrace = p;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var U = e ? e.displayName || e.name : "", Ie = U ? Q(U) : "";
|
|
278
|
+
return typeof e == "function" && M.set(e, Ie), Ie;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function Ze(e, t, o) {
|
|
281
|
+
return we(e, !1);
|
|
282
282
|
}
|
|
283
283
|
function Qe(e) {
|
|
284
284
|
var t = e.prototype;
|
|
285
285
|
return !!(t && t.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ee(e, t, o) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return we(e, Qe(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
293
|
return Q(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
295
|
+
case C:
|
|
296
296
|
return Q("Suspense");
|
|
297
|
-
case
|
|
297
|
+
case g:
|
|
298
298
|
return Q("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
303
|
-
return
|
|
304
|
-
case
|
|
305
|
-
return
|
|
302
|
+
case l:
|
|
303
|
+
return Ze(e.render);
|
|
304
|
+
case E:
|
|
305
|
+
return ee(e.type, t, o);
|
|
306
306
|
case x: {
|
|
307
307
|
var c = e, p = c._payload, _ = c._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return ee(_(p), t, o);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var re = Object.prototype.hasOwnProperty, xe = {}, Te = P.ReactDebugCurrentFrame;
|
|
317
|
+
function te(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var t = e._owner,
|
|
320
|
-
Te.setExtraStackFrame(
|
|
319
|
+
var t = e._owner, o = ee(e.type, e._source, t ? t.type : null);
|
|
320
|
+
Te.setExtraStackFrame(o);
|
|
321
321
|
} else
|
|
322
322
|
Te.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Me(e, t, o, c, p) {
|
|
325
325
|
{
|
|
326
|
-
var _ = Function.call.bind(
|
|
327
|
-
for (var
|
|
328
|
-
if (_(e,
|
|
329
|
-
var
|
|
326
|
+
var _ = Function.call.bind(re);
|
|
327
|
+
for (var v in e)
|
|
328
|
+
if (_(e, v)) {
|
|
329
|
+
var d = void 0;
|
|
330
330
|
try {
|
|
331
|
-
if (typeof e[
|
|
332
|
-
var
|
|
333
|
-
throw
|
|
331
|
+
if (typeof e[v] != "function") {
|
|
332
|
+
var T = Error((c || "React class") + ": " + o + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
+
throw T.name = "Invariant Violation", T;
|
|
334
334
|
}
|
|
335
|
-
|
|
336
|
-
} catch (
|
|
337
|
-
|
|
335
|
+
d = e[v](t, v, c, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
+
} catch (b) {
|
|
337
|
+
d = b;
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
d && !(d instanceof Error) && (te(p), h("%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", o, v, typeof d), te(null)), d instanceof Error && !(d.message in xe) && (xe[d.message] = !0, te(p), h("Failed %s type: %s", o, d.message), te(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
var
|
|
344
|
-
function
|
|
345
|
-
return
|
|
343
|
+
var er = Array.isArray;
|
|
344
|
+
function ie(e) {
|
|
345
|
+
return er(e);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function rr(e) {
|
|
348
348
|
{
|
|
349
|
-
var t = typeof Symbol == "function" && Symbol.toStringTag,
|
|
350
|
-
return
|
|
349
|
+
var t = typeof Symbol == "function" && Symbol.toStringTag, o = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
350
|
+
return o;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function tr(e) {
|
|
354
354
|
try {
|
|
355
355
|
return Ce(e), !1;
|
|
356
356
|
} catch {
|
|
@@ -361,120 +361,120 @@ function mr() {
|
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
363
|
function Se(e) {
|
|
364
|
-
if (
|
|
365
|
-
return
|
|
364
|
+
if (tr(e))
|
|
365
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), Ce(e);
|
|
366
366
|
}
|
|
367
|
-
var Pe =
|
|
367
|
+
var Pe = P.ReactCurrentOwner, nr = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
372
|
}, Oe, ke;
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
373
|
+
function or(e) {
|
|
374
|
+
if (re.call(e, "ref")) {
|
|
375
375
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
376
|
if (t && t.isReactWarning)
|
|
377
377
|
return !1;
|
|
378
378
|
}
|
|
379
379
|
return e.ref !== void 0;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
if (
|
|
381
|
+
function ar(e) {
|
|
382
|
+
if (re.call(e, "key")) {
|
|
383
383
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
384
|
if (t && t.isReactWarning)
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function ur(e, t) {
|
|
390
390
|
typeof e.ref == "string" && Pe.current;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function ir(e, t) {
|
|
393
393
|
{
|
|
394
|
-
var
|
|
395
|
-
Oe || (Oe = !0,
|
|
394
|
+
var o = function() {
|
|
395
|
+
Oe || (Oe = !0, h("%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)", t));
|
|
396
396
|
};
|
|
397
|
-
|
|
398
|
-
get:
|
|
397
|
+
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
|
+
get: o,
|
|
399
399
|
configurable: !0
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function cr(e, t) {
|
|
404
404
|
{
|
|
405
|
-
var
|
|
406
|
-
ke || (ke = !0,
|
|
405
|
+
var o = function() {
|
|
406
|
+
ke || (ke = !0, h("%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)", t));
|
|
407
407
|
};
|
|
408
|
-
|
|
409
|
-
get:
|
|
408
|
+
o.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
|
+
get: o,
|
|
410
410
|
configurable: !0
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
415
|
-
var
|
|
414
|
+
var sr = function(e, t, o, c, p, _, v) {
|
|
415
|
+
var d = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: u,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: t,
|
|
421
|
-
ref:
|
|
422
|
-
props:
|
|
421
|
+
ref: o,
|
|
422
|
+
props: v,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
424
|
_owner: _
|
|
425
425
|
};
|
|
426
|
-
return
|
|
426
|
+
return d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
428
428
|
enumerable: !1,
|
|
429
429
|
writable: !0,
|
|
430
430
|
value: !1
|
|
431
|
-
}), Object.defineProperty(
|
|
431
|
+
}), Object.defineProperty(d, "_self", {
|
|
432
432
|
configurable: !1,
|
|
433
433
|
enumerable: !1,
|
|
434
434
|
writable: !1,
|
|
435
435
|
value: c
|
|
436
|
-
}), Object.defineProperty(
|
|
436
|
+
}), Object.defineProperty(d, "_source", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !1,
|
|
440
440
|
value: p
|
|
441
|
-
}), Object.freeze && (Object.freeze(
|
|
441
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function fr(e, t, o, c, p) {
|
|
444
444
|
{
|
|
445
|
-
var _,
|
|
446
|
-
|
|
445
|
+
var _, v = {}, d = null, T = null;
|
|
446
|
+
o !== void 0 && (Se(o), d = "" + o), ar(t) && (Se(t.key), d = "" + t.key), or(t) && (T = t.ref, ur(t, p));
|
|
447
447
|
for (_ in t)
|
|
448
|
-
|
|
448
|
+
re.call(t, _) && !nr.hasOwnProperty(_) && (v[_] = t[_]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
|
-
var
|
|
451
|
-
for (_ in
|
|
452
|
-
|
|
450
|
+
var b = e.defaultProps;
|
|
451
|
+
for (_ in b)
|
|
452
|
+
v[_] === void 0 && (v[_] = b[_]);
|
|
453
453
|
}
|
|
454
|
-
if (
|
|
455
|
-
var
|
|
456
|
-
|
|
454
|
+
if (d || T) {
|
|
455
|
+
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
d && ir(v, m), T && cr(v, m);
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return sr(e, d, T, p, c, Pe.current, v);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var ce = P.ReactCurrentOwner, je = P.ReactDebugCurrentFrame;
|
|
462
|
+
function W(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var t = e._owner,
|
|
465
|
-
je.setExtraStackFrame(
|
|
464
|
+
var t = e._owner, o = ee(e.type, e._source, t ? t.type : null);
|
|
465
|
+
je.setExtraStackFrame(o);
|
|
466
466
|
} else
|
|
467
467
|
je.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
469
|
+
var se;
|
|
470
|
+
se = !1;
|
|
471
|
+
function fe(e) {
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === u;
|
|
473
473
|
}
|
|
474
474
|
function De() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e =
|
|
476
|
+
if (ce.current) {
|
|
477
|
+
var e = Y(ce.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -483,18 +483,18 @@ Check the render method of \`` + e + "`.";
|
|
|
483
483
|
return "";
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function lr(e) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
489
|
var Fe = {};
|
|
490
|
-
function
|
|
490
|
+
function dr(e) {
|
|
491
491
|
{
|
|
492
492
|
var t = De();
|
|
493
493
|
if (!t) {
|
|
494
|
-
var
|
|
495
|
-
|
|
494
|
+
var o = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
|
+
o && (t = `
|
|
496
496
|
|
|
497
|
-
Check the top-level render call using <` +
|
|
497
|
+
Check the top-level render call using <` + o + ">.");
|
|
498
498
|
}
|
|
499
499
|
return t;
|
|
500
500
|
}
|
|
@@ -504,113 +504,113 @@ Check the top-level render call using <` + u + ">.");
|
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
|
-
var
|
|
508
|
-
if (Fe[
|
|
507
|
+
var o = dr(t);
|
|
508
|
+
if (Fe[o])
|
|
509
509
|
return;
|
|
510
|
-
Fe[
|
|
510
|
+
Fe[o] = !0;
|
|
511
511
|
var c = "";
|
|
512
|
-
e && e._owner && e._owner !==
|
|
512
|
+
e && e._owner && e._owner !== ce.current && (c = " It was passed a child from " + Y(e._owner.type) + "."), W(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, c), W(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Ne(e, t) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
520
|
-
for (var
|
|
521
|
-
var c = e[
|
|
522
|
-
|
|
519
|
+
if (ie(e))
|
|
520
|
+
for (var o = 0; o < e.length; o++) {
|
|
521
|
+
var c = e[o];
|
|
522
|
+
fe(c) && Ae(c, t);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (fe(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var p =
|
|
527
|
+
var p = R(e);
|
|
528
528
|
if (typeof p == "function" && p !== e.entries)
|
|
529
|
-
for (var _ = p.call(e),
|
|
530
|
-
|
|
529
|
+
for (var _ = p.call(e), v; !(v = _.next()).done; )
|
|
530
|
+
fe(v.value) && Ae(v.value, t);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function vr(e) {
|
|
535
535
|
{
|
|
536
536
|
var t = e.type;
|
|
537
537
|
if (t == null || typeof t == "string")
|
|
538
538
|
return;
|
|
539
|
-
var
|
|
539
|
+
var o;
|
|
540
540
|
if (typeof t == "function")
|
|
541
|
-
|
|
542
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
541
|
+
o = t.propTypes;
|
|
542
|
+
else if (typeof t == "object" && (t.$$typeof === l || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
t.$$typeof ===
|
|
545
|
-
|
|
544
|
+
t.$$typeof === E))
|
|
545
|
+
o = t.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
|
-
if (
|
|
549
|
-
var c =
|
|
550
|
-
|
|
551
|
-
} else if (t.PropTypes !== void 0 && !
|
|
552
|
-
|
|
553
|
-
var p =
|
|
554
|
-
|
|
548
|
+
if (o) {
|
|
549
|
+
var c = Y(t);
|
|
550
|
+
Me(o, e.props, "prop", c, e);
|
|
551
|
+
} else if (t.PropTypes !== void 0 && !se) {
|
|
552
|
+
se = !0;
|
|
553
|
+
var p = Y(t);
|
|
554
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
555
555
|
}
|
|
556
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
556
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function pr(e) {
|
|
560
560
|
{
|
|
561
|
-
for (var t = Object.keys(e.props),
|
|
562
|
-
var c = t[
|
|
561
|
+
for (var t = Object.keys(e.props), o = 0; o < t.length; o++) {
|
|
562
|
+
var c = t[o];
|
|
563
563
|
if (c !== "children" && c !== "key") {
|
|
564
|
-
|
|
564
|
+
W(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), W(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (W(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Ve(e, t, o, c, p, _) {
|
|
572
572
|
{
|
|
573
|
-
var
|
|
574
|
-
if (!
|
|
575
|
-
var
|
|
576
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
var
|
|
580
|
-
e === null ?
|
|
573
|
+
var v = Ke(e);
|
|
574
|
+
if (!v) {
|
|
575
|
+
var d = "";
|
|
576
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
577
|
+
var T = lr();
|
|
578
|
+
T ? d += T : d += De();
|
|
579
|
+
var b;
|
|
580
|
+
e === null ? b = "null" : ie(e) ? b = "array" : e !== void 0 && e.$$typeof === u ? (b = "<" + (Y(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, d);
|
|
581
581
|
}
|
|
582
|
-
var
|
|
583
|
-
if (
|
|
584
|
-
return
|
|
585
|
-
if (
|
|
586
|
-
var
|
|
587
|
-
if (
|
|
582
|
+
var m = fr(e, t, o, p, _);
|
|
583
|
+
if (m == null)
|
|
584
|
+
return m;
|
|
585
|
+
if (v) {
|
|
586
|
+
var k = t.children;
|
|
587
|
+
if (k !== void 0)
|
|
588
588
|
if (c)
|
|
589
|
-
if (
|
|
590
|
-
for (var
|
|
591
|
-
|
|
592
|
-
Object.freeze && Object.freeze(
|
|
589
|
+
if (ie(k)) {
|
|
590
|
+
for (var U = 0; U < k.length; U++)
|
|
591
|
+
Ne(k[U], e);
|
|
592
|
+
Object.freeze && Object.freeze(k);
|
|
593
593
|
} else
|
|
594
|
-
|
|
594
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
595
595
|
else
|
|
596
|
-
|
|
596
|
+
Ne(k, e);
|
|
597
597
|
}
|
|
598
|
-
return e ===
|
|
598
|
+
return e === a ? pr(m) : vr(m), m;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function _r(e, t, o) {
|
|
602
|
+
return Ve(e, t, o, !0);
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
604
|
+
function gr(e, t, o) {
|
|
605
|
+
return Ve(e, t, o, !1);
|
|
606
606
|
}
|
|
607
|
-
var
|
|
608
|
-
|
|
609
|
-
}()),
|
|
607
|
+
var hr = gr, br = _r;
|
|
608
|
+
K.Fragment = a, K.jsx = hr, K.jsxs = br;
|
|
609
|
+
}()), K;
|
|
610
610
|
}
|
|
611
|
-
process.env.NODE_ENV === "production" ?
|
|
612
|
-
var
|
|
613
|
-
const
|
|
611
|
+
process.env.NODE_ENV === "production" ? le.exports = Er() : le.exports = Rr();
|
|
612
|
+
var V = le.exports;
|
|
613
|
+
const X = We({
|
|
614
614
|
rootValue: /* @__PURE__ */ new Set(),
|
|
615
615
|
setRootValue: () => {
|
|
616
616
|
},
|
|
@@ -624,300 +624,289 @@ const M = We({
|
|
|
624
624
|
removeNode: () => {
|
|
625
625
|
}
|
|
626
626
|
});
|
|
627
|
-
function
|
|
628
|
-
const r =
|
|
627
|
+
function mr() {
|
|
628
|
+
const r = J(/* @__PURE__ */ new Map([
|
|
629
629
|
["__root__", { value: "__root__", parent: "", index: 0, isGroup: !0, ref: { current: null } }]
|
|
630
630
|
]));
|
|
631
|
-
return [r, (
|
|
632
|
-
var
|
|
633
|
-
(
|
|
634
|
-
}, (
|
|
631
|
+
return [r, (a, i, s, y, f) => {
|
|
632
|
+
var l;
|
|
633
|
+
(l = r.current) == null || l.set(a, { value: a, parent: i, index: s, isGroup: y, ref: f });
|
|
634
|
+
}, (a) => {
|
|
635
635
|
var i;
|
|
636
|
-
(i = r.current) == null || i.delete(
|
|
636
|
+
(i = r.current) == null || i.delete(a);
|
|
637
637
|
}];
|
|
638
638
|
}
|
|
639
|
-
function Be(r,
|
|
639
|
+
function Be(r, u) {
|
|
640
640
|
if (!r.current) return "";
|
|
641
|
-
for (const [n,
|
|
642
|
-
if (
|
|
643
|
-
return
|
|
641
|
+
for (const [n, a] of r.current)
|
|
642
|
+
if (a.parent == u && a.index == 0)
|
|
643
|
+
return a.value;
|
|
644
644
|
return "";
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function yr(r, u) {
|
|
647
647
|
if (!r.current) return "";
|
|
648
|
-
const n = r.current.get(
|
|
648
|
+
const n = r.current.get(u);
|
|
649
649
|
if (n) {
|
|
650
|
-
for (const [
|
|
650
|
+
for (const [a, i] of r.current)
|
|
651
651
|
if (i.parent == n.parent && i.index == n.index - 1)
|
|
652
652
|
return i.value;
|
|
653
653
|
return "";
|
|
654
654
|
} else
|
|
655
655
|
return "";
|
|
656
656
|
}
|
|
657
|
-
function wr(r,
|
|
657
|
+
function wr(r, u) {
|
|
658
658
|
if (!r.current) return "";
|
|
659
|
-
const n = r.current.get(
|
|
659
|
+
const n = r.current.get(u);
|
|
660
660
|
if (n) {
|
|
661
661
|
if (n.index == 0)
|
|
662
662
|
return n.parent;
|
|
663
663
|
{
|
|
664
|
-
let
|
|
665
|
-
for (;
|
|
666
|
-
const i = r.current.get(qe(r,
|
|
664
|
+
let a = r.current.get(yr(r, n.value));
|
|
665
|
+
for (; a && a.isGroup; ) {
|
|
666
|
+
const i = r.current.get(qe(r, a.value));
|
|
667
667
|
if (!i)
|
|
668
|
-
return
|
|
669
|
-
|
|
668
|
+
return a.value;
|
|
669
|
+
a = i;
|
|
670
670
|
}
|
|
671
|
-
return
|
|
671
|
+
return a ? a.value : "";
|
|
672
672
|
}
|
|
673
673
|
} else
|
|
674
674
|
return "";
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function xr(r, u) {
|
|
677
677
|
if (!r.current) return "";
|
|
678
|
-
const n = r.current.get(
|
|
678
|
+
const n = r.current.get(u);
|
|
679
679
|
if (n) {
|
|
680
|
-
for (const [
|
|
680
|
+
for (const [a, i] of r.current)
|
|
681
681
|
if (i.parent == n.parent && i.index == n.index + 1)
|
|
682
682
|
return i.value;
|
|
683
683
|
return "";
|
|
684
684
|
} else
|
|
685
685
|
return "";
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function Tr(r, u) {
|
|
688
688
|
if (!r.current) return "";
|
|
689
|
-
const n = r.current.get(
|
|
689
|
+
const n = r.current.get(u);
|
|
690
690
|
if (n) {
|
|
691
691
|
if (n.isGroup) {
|
|
692
|
-
const i = Be(r,
|
|
692
|
+
const i = Be(r, u);
|
|
693
693
|
if (i)
|
|
694
694
|
return i;
|
|
695
695
|
}
|
|
696
|
-
let
|
|
696
|
+
let a = n;
|
|
697
697
|
for (; ; ) {
|
|
698
|
-
const i =
|
|
698
|
+
const i = xr(r, a.value);
|
|
699
699
|
if (i)
|
|
700
700
|
return i;
|
|
701
701
|
{
|
|
702
|
-
const
|
|
703
|
-
if (!
|
|
702
|
+
const s = r.current.get(a.parent);
|
|
703
|
+
if (!s || a.value == "__root__")
|
|
704
704
|
return "";
|
|
705
|
-
|
|
705
|
+
a = s;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
} else
|
|
709
709
|
return "";
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Cr(r) {
|
|
712
712
|
if (!r.current) return "";
|
|
713
|
-
for (const [
|
|
713
|
+
for (const [u, n] of r.current)
|
|
714
714
|
if (n.parent == "__root__" && n.index == 0)
|
|
715
715
|
return n.value;
|
|
716
716
|
return "";
|
|
717
717
|
}
|
|
718
|
-
function qe(r,
|
|
718
|
+
function qe(r, u) {
|
|
719
719
|
if (!r.current) return "";
|
|
720
720
|
let n = null;
|
|
721
|
-
for (const [
|
|
722
|
-
i.parent ==
|
|
721
|
+
for (const [a, i] of r.current)
|
|
722
|
+
i.parent == u && (!n || i.index > n.index) && (n = i);
|
|
723
723
|
return n ? n.value : "";
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Sr(r) {
|
|
726
726
|
if (!r.current) return "";
|
|
727
|
-
let
|
|
728
|
-
for (;
|
|
729
|
-
const n = r.current.get(qe(r,
|
|
727
|
+
let u = r.current.get("__root__");
|
|
728
|
+
for (; u && u.isGroup; ) {
|
|
729
|
+
const n = r.current.get(qe(r, u.value));
|
|
730
730
|
if (!n)
|
|
731
|
-
return
|
|
732
|
-
|
|
731
|
+
return u.value;
|
|
732
|
+
u = n;
|
|
733
733
|
}
|
|
734
|
-
return
|
|
734
|
+
return u ? u.value : "";
|
|
735
735
|
}
|
|
736
|
-
const
|
|
736
|
+
const G = We({
|
|
737
737
|
parent: "",
|
|
738
|
-
getIndex: () => -1,
|
|
739
738
|
depth: -1
|
|
740
739
|
});
|
|
741
|
-
function
|
|
742
|
-
const [
|
|
743
|
-
return [
|
|
744
|
-
const
|
|
745
|
-
|
|
740
|
+
function Pr(r, u, n) {
|
|
741
|
+
const [a, i] = Ue(n), s = r !== void 0 ? r : a;
|
|
742
|
+
return [s, (f) => {
|
|
743
|
+
const l = typeof f == "function" ? f(s) : f;
|
|
744
|
+
u && u(l), i(l);
|
|
746
745
|
}];
|
|
747
746
|
}
|
|
748
|
-
function
|
|
749
|
-
return function(
|
|
750
|
-
const i =
|
|
751
|
-
i && (
|
|
752
|
-
let
|
|
753
|
-
return
|
|
747
|
+
function z(r, u) {
|
|
748
|
+
return function(a) {
|
|
749
|
+
const i = a.defaultPrevented;
|
|
750
|
+
i && (a.defaultPrevented = !1), r == null || r(a);
|
|
751
|
+
let s;
|
|
752
|
+
return a.defaultPrevented || (s = u == null ? void 0 : u(a), i && (a.defaultPrevented = !0)), s;
|
|
754
753
|
};
|
|
755
754
|
}
|
|
756
|
-
function
|
|
757
|
-
return Ge((
|
|
755
|
+
function de(...r) {
|
|
756
|
+
return Ge((u) => {
|
|
758
757
|
for (const n of r)
|
|
759
|
-
typeof n == "function" ? n(
|
|
758
|
+
typeof n == "function" ? n(u) : n != null && (n.current = u);
|
|
760
759
|
}, [r]);
|
|
761
760
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
return n;
|
|
769
|
-
}
|
|
770
|
-
const kr = ["ArrowRight", "ArrowUp", "ArrowLeft", "ArrowDown", "Home", "End", "Enter"];
|
|
771
|
-
function jr(r, a) {
|
|
772
|
-
var o, i, f;
|
|
773
|
-
const n = Be(r, a);
|
|
774
|
-
n && ((f = (i = (o = r.current) == null ? void 0 : o.get(n)) == null ? void 0 : i.ref.current) == null || f.focus());
|
|
761
|
+
const Or = ["ArrowRight", "ArrowUp", "ArrowLeft", "ArrowDown", "Home", "End", "Enter"];
|
|
762
|
+
function kr(r, u) {
|
|
763
|
+
var a, i, s;
|
|
764
|
+
const n = Be(r, u);
|
|
765
|
+
n && ((s = (i = (a = r.current) == null ? void 0 : a.get(n)) == null ? void 0 : i.ref.current) == null || s.focus());
|
|
775
766
|
}
|
|
776
|
-
function
|
|
777
|
-
var
|
|
778
|
-
const n = (i = (
|
|
779
|
-
n && n != "__root__" && ((
|
|
767
|
+
function jr(r, u) {
|
|
768
|
+
var a, i, s, y, f;
|
|
769
|
+
const n = (i = (a = r.current) == null ? void 0 : a.get(u)) == null ? void 0 : i.parent;
|
|
770
|
+
n && n != "__root__" && ((f = (y = (s = r.current) == null ? void 0 : s.get(n)) == null ? void 0 : y.ref.current) == null || f.focus());
|
|
780
771
|
}
|
|
781
|
-
function
|
|
782
|
-
var
|
|
783
|
-
const n = wr(r,
|
|
784
|
-
n && n != "__root__" && ((
|
|
772
|
+
function Dr(r, u) {
|
|
773
|
+
var a, i, s;
|
|
774
|
+
const n = wr(r, u);
|
|
775
|
+
n && n != "__root__" && ((s = (i = (a = r.current) == null ? void 0 : a.get(n)) == null ? void 0 : i.ref.current) == null || s.focus());
|
|
785
776
|
}
|
|
786
|
-
function
|
|
787
|
-
var
|
|
788
|
-
const n =
|
|
789
|
-
n && n != "__root__" && ((
|
|
777
|
+
function Fr(r, u) {
|
|
778
|
+
var a, i, s;
|
|
779
|
+
const n = Tr(r, u);
|
|
780
|
+
n && n != "__root__" && ((s = (i = (a = r.current) == null ? void 0 : a.get(n)) == null ? void 0 : i.ref.current) == null || s.focus());
|
|
790
781
|
}
|
|
791
|
-
function
|
|
792
|
-
var n,
|
|
793
|
-
const
|
|
794
|
-
|
|
782
|
+
function Ar(r) {
|
|
783
|
+
var n, a, i;
|
|
784
|
+
const u = Cr(r);
|
|
785
|
+
u && u != "__root__" && ((i = (a = (n = r.current) == null ? void 0 : n.get(u)) == null ? void 0 : a.ref.current) == null || i.focus());
|
|
795
786
|
}
|
|
796
787
|
function Nr(r) {
|
|
797
|
-
var n,
|
|
798
|
-
const
|
|
799
|
-
|
|
788
|
+
var n, a, i;
|
|
789
|
+
const u = Sr(r);
|
|
790
|
+
u && u != "__root__" && ((i = (a = (n = r.current) == null ? void 0 : n.get(u)) == null ? void 0 : a.ref.current) == null || i.focus());
|
|
800
791
|
}
|
|
801
|
-
const Vr =
|
|
802
|
-
const [
|
|
803
|
-
var
|
|
804
|
-
if (!(!
|
|
792
|
+
const Vr = H(({ value: r, onValueChange: u, defaultValue: n, defaultSelection: a, onKeyDown: i, ...s }, y) => {
|
|
793
|
+
const [f, l, C] = mr(), [g, E] = Pr(r, u, n ?? /* @__PURE__ */ new Set()), [x, S] = Ue(""), j = J(null), $ = de(j, y), R = J(""), P = Ge((w) => {
|
|
794
|
+
var F;
|
|
795
|
+
if (!(!Or.includes(w.key) || !f))
|
|
805
796
|
switch (w.key) {
|
|
806
797
|
case "ArrowRight":
|
|
807
|
-
const
|
|
808
|
-
if (!
|
|
809
|
-
w.preventDefault(),
|
|
798
|
+
const D = (F = f.current) == null ? void 0 : F.get(R.current);
|
|
799
|
+
if (!D || !D.isGroup) break;
|
|
800
|
+
w.preventDefault(), g.has(R.current) ? kr(f, R.current) : E((O) => /* @__PURE__ */ new Set([...O, R.current]));
|
|
810
801
|
break;
|
|
811
802
|
case "ArrowLeft":
|
|
812
|
-
w.preventDefault(),
|
|
803
|
+
w.preventDefault(), g.has(R.current) ? E((O) => new Set([...O].filter((N) => N !== R.current))) : jr(f, R.current);
|
|
813
804
|
break;
|
|
814
805
|
case "ArrowUp":
|
|
815
|
-
w.preventDefault(),
|
|
806
|
+
w.preventDefault(), Dr(f, R.current);
|
|
816
807
|
break;
|
|
817
808
|
case "ArrowDown":
|
|
818
|
-
w.preventDefault(),
|
|
809
|
+
w.preventDefault(), Fr(f, R.current);
|
|
819
810
|
break;
|
|
820
811
|
case "Home":
|
|
821
|
-
w.preventDefault(),
|
|
812
|
+
w.preventDefault(), Ar(f);
|
|
822
813
|
break;
|
|
823
814
|
case "End":
|
|
824
|
-
w.preventDefault(), Nr(
|
|
815
|
+
w.preventDefault(), Nr(f);
|
|
825
816
|
break;
|
|
826
817
|
case "Enter":
|
|
827
|
-
w.preventDefault(),
|
|
818
|
+
w.preventDefault(), S(R.current), g.has(R.current) ? E((O) => new Set([...O].filter((N) => N !== R.current))) : E((O) => /* @__PURE__ */ new Set([...O, R.current]));
|
|
828
819
|
break;
|
|
829
820
|
}
|
|
830
|
-
}, [
|
|
831
|
-
return /* @__PURE__ */
|
|
821
|
+
}, [g]), h = z(i, P);
|
|
822
|
+
return /* @__PURE__ */ V.jsx(X.Provider, { value: { rootValue: g, setRootValue: E, selection: x, setSelection: S, focus: R, nodeMap: f, registerNode: l, removeNode: C }, children: /* @__PURE__ */ V.jsx(G.Provider, { value: { parent: "__root__", depth: 0 }, children: /* @__PURE__ */ V.jsx(
|
|
832
823
|
"ul",
|
|
833
824
|
{
|
|
834
825
|
ref: $,
|
|
835
826
|
role: "tree",
|
|
836
827
|
"aria-multiselectable": "false",
|
|
837
|
-
onKeyDown:
|
|
838
|
-
...
|
|
828
|
+
onKeyDown: h,
|
|
829
|
+
...s
|
|
839
830
|
}
|
|
840
831
|
) }) });
|
|
841
|
-
}),
|
|
842
|
-
const { selection:
|
|
843
|
-
function
|
|
844
|
-
var
|
|
845
|
-
(
|
|
832
|
+
}), Ir = H(({ value: r, index: u, onFocus: n, onClick: a, ...i }, s) => {
|
|
833
|
+
const { selection: y, setSelection: f, focus: l, nodeMap: C, registerNode: g, removeNode: E } = I(X), { parent: x, depth: S } = I(G), j = J(null), $ = de(j, s), R = z(n, h), P = z(a, w);
|
|
834
|
+
function h(F) {
|
|
835
|
+
var D, O, N, Z;
|
|
836
|
+
(N = (O = (D = C.current) == null ? void 0 : D.get(l.current)) == null ? void 0 : O.ref.current) == null || N.setAttribute("tabindex", "-1"), (Z = j.current) == null || Z.setAttribute("tabindex", "0"), l.current = r, F.stopPropagation();
|
|
846
837
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
838
|
+
function w() {
|
|
839
|
+
f(r);
|
|
849
840
|
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}, []), /* @__PURE__ */ I.jsx(
|
|
841
|
+
return l.current == "" && x == "__root__" && u == 0 && (l.current = r), ne(() => (g(r, x, u, !1, j), () => E(r)), []), ne(() => () => {
|
|
842
|
+
l.current == r && (l.current = "");
|
|
843
|
+
}, []), /* @__PURE__ */ V.jsx(
|
|
854
844
|
"li",
|
|
855
845
|
{
|
|
856
|
-
ref:
|
|
846
|
+
ref: $,
|
|
857
847
|
role: "treeitem",
|
|
858
|
-
"aria-selected":
|
|
859
|
-
tabIndex:
|
|
860
|
-
onFocus:
|
|
861
|
-
onClick:
|
|
862
|
-
"data-depth":
|
|
863
|
-
...
|
|
848
|
+
"aria-selected": y == r,
|
|
849
|
+
tabIndex: l.current == r ? 0 : -1,
|
|
850
|
+
onFocus: R,
|
|
851
|
+
onClick: P,
|
|
852
|
+
"data-depth": S,
|
|
853
|
+
...i
|
|
864
854
|
}
|
|
865
855
|
);
|
|
866
|
-
}),
|
|
867
|
-
const
|
|
868
|
-
function
|
|
869
|
-
var
|
|
870
|
-
(
|
|
856
|
+
}), $r = H(({ value: r, index: u, onFocus: n, ...a }, i) => {
|
|
857
|
+
const { rootValue: s, selection: y, focus: f, nodeMap: l, registerNode: C, removeNode: g } = I(X), { parent: E, depth: x } = I(G), S = J(null), j = de(S, i), $ = z(n, R);
|
|
858
|
+
function R(P) {
|
|
859
|
+
var h, w, F, D;
|
|
860
|
+
(F = (w = (h = l.current) == null ? void 0 : h.get(f.current)) == null ? void 0 : w.ref.current) == null || F.setAttribute("tabindex", "-1"), (D = S.current) == null || D.setAttribute("tabindex", "0"), f.current = r, P.stopPropagation();
|
|
871
861
|
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}, []), /* @__PURE__ */ I.jsx(B.Provider, { value: { parent: r, getIndex: i, depth: k + 1 }, children: /* @__PURE__ */ I.jsx(
|
|
862
|
+
return f.current == "" && E == "__root__" && u == 0 && (f.current = r), ne(() => (C(r, E, u, !0, S), () => g(r)), []), ne(() => () => {
|
|
863
|
+
f.current == r && (f.current = "");
|
|
864
|
+
}, []), /* @__PURE__ */ V.jsx(G.Provider, { value: { parent: r, depth: x + 1 }, children: /* @__PURE__ */ V.jsx(
|
|
876
865
|
"li",
|
|
877
866
|
{
|
|
878
|
-
ref:
|
|
867
|
+
ref: j,
|
|
879
868
|
role: "treeitem",
|
|
880
|
-
"data-state":
|
|
881
|
-
"data-depth":
|
|
882
|
-
"aria-expanded":
|
|
883
|
-
"aria-selected":
|
|
884
|
-
tabIndex:
|
|
869
|
+
"data-state": s.has(r) ? "open" : "closed",
|
|
870
|
+
"data-depth": x,
|
|
871
|
+
"aria-expanded": s.has(r),
|
|
872
|
+
"aria-selected": y == r,
|
|
873
|
+
tabIndex: f.current == r ? 0 : -1,
|
|
885
874
|
onFocus: $,
|
|
886
|
-
...
|
|
875
|
+
...a
|
|
887
876
|
}
|
|
888
877
|
) });
|
|
889
|
-
}),
|
|
890
|
-
const { setRootValue:
|
|
891
|
-
function
|
|
892
|
-
i(
|
|
878
|
+
}), Yr = H(({ onClick: r, ...u }, n) => {
|
|
879
|
+
const { setRootValue: a, setSelection: i } = I(X), { parent: s } = I(G), y = z(r, f);
|
|
880
|
+
function f() {
|
|
881
|
+
i(s), a((l) => l.has(s) ? new Set([...l].filter((C) => C !== s)) : /* @__PURE__ */ new Set([...l, s]));
|
|
893
882
|
}
|
|
894
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ V.jsx(
|
|
895
884
|
"div",
|
|
896
885
|
{
|
|
897
886
|
ref: n,
|
|
898
|
-
onClick:
|
|
899
|
-
...
|
|
887
|
+
onClick: y,
|
|
888
|
+
...u
|
|
900
889
|
}
|
|
901
890
|
);
|
|
902
|
-
}),
|
|
903
|
-
const { rootValue: n } =
|
|
904
|
-
if (n.has(
|
|
905
|
-
return /* @__PURE__ */
|
|
891
|
+
}), Lr = H(({ ...r }, u) => {
|
|
892
|
+
const { rootValue: n } = I(X), { parent: a } = I(G);
|
|
893
|
+
if (n.has(a))
|
|
894
|
+
return /* @__PURE__ */ V.jsx(
|
|
906
895
|
"ul",
|
|
907
896
|
{
|
|
908
|
-
ref:
|
|
897
|
+
ref: u,
|
|
909
898
|
role: "group",
|
|
910
899
|
...r
|
|
911
900
|
}
|
|
912
901
|
);
|
|
913
|
-
}),
|
|
902
|
+
}), Ur = {
|
|
914
903
|
Root: Vr,
|
|
915
|
-
Group:
|
|
916
|
-
Trigger:
|
|
917
|
-
Content:
|
|
918
|
-
Item:
|
|
904
|
+
Group: $r,
|
|
905
|
+
Trigger: Yr,
|
|
906
|
+
Content: Lr,
|
|
907
|
+
Item: Ir
|
|
919
908
|
};
|
|
920
909
|
export {
|
|
921
|
-
|
|
910
|
+
Ur as default
|
|
922
911
|
};
|
|
923
912
|
//# sourceMappingURL=index.js.map
|