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