react-composable-treeview 1.0.13 → 1.0.15

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