react-composable-treeview 1.0.14 → 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 We, { createContext as Ye, useRef as M, useState as Ue, useCallback as Ge, forwardRef as z, useContext as V } from "react";
2
- var de = { exports: {} }, q = {};
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 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 Ne;
12
+ var Ve;
13
13
  function br() {
14
- if (Ne)
15
- return q;
16
- Ne = 1;
17
- var t = We, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function s(l, h, y) {
19
- var g, T = {}, x = null, S = null;
20
- y !== void 0 && (x = "" + y), h.key !== void 0 && (x = "" + h.key), h.ref !== void 0 && (S = h.ref);
21
- for (g in h)
22
- a.call(h, g) && !v.hasOwnProperty(g) && (T[g] = h[g]);
23
- if (l && l.defaultProps)
24
- for (g in h = l.defaultProps, h)
25
- T[g] === void 0 && (T[g] = h[g]);
26
- return { $$typeof: o, type: l, key: x, ref: S, props: T, _owner: p.current };
14
+ if (Ve) return G;
15
+ Ve = 1;
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 };
17
+ function l(s, d, y) {
18
+ var b, w = {}, T = null, S = null;
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 q.Fragment = i, q.jsx = s, q.jsxs = s, q;
24
+ return G.Fragment = i, G.jsx = l, G.jsxs = l, G;
29
25
  }
30
- var K = {};
26
+ var B = {};
31
27
  /**
32
28
  * @license React
33
29
  * react-jsx-runtime.development.js
@@ -37,57 +33,57 @@ var K = {};
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 $e;
41
- function Rr() {
42
- return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
43
- var t = We, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), l = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), F = Symbol.iterator, b = "@@iterator";
44
- function L(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 = F && e[F] || e[b];
43
+ var r = D && e[D] || e[R];
48
44
  return typeof r == "function" ? r : null;
49
45
  }
50
- var O = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
- function R(e) {
46
+ var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
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];
55
- w("error", e, n);
51
+ x("error", e, n);
56
52
  }
57
53
  }
58
- function w(e, r, n) {
54
+ function x(e, r, n) {
59
55
  {
60
- var u = O.ReactDebugCurrentFrame, d = u.getStackAddendum();
61
- d !== "" && (r += "%s", n = n.concat([d]));
62
- var _ = n.map(function(f) {
56
+ var u = P.ReactDebugCurrentFrame, p = u.getStackAddendum();
57
+ p !== "" && (r += "%s", n = n.concat([p]));
58
+ var g = n.map(function(f) {
63
59
  return String(f);
64
60
  });
65
- _.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _);
61
+ g.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, g);
66
62
  }
67
63
  }
68
- var P = !1, j = !1, N = !1, X = !1, Z = !1, pe;
69
- pe = 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 || Z || e === p || e === y || e === g || X || e === S || P || j || N || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === T || e.$$typeof === s || e.$$typeof === l || e.$$typeof === h || // 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 === pe || 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 he(e) {
80
+ function de(e) {
85
81
  return e.displayName || "Context";
86
82
  }
87
- function D(e) {
83
+ function L(e) {
88
84
  if (e == null)
89
85
  return null;
90
- if (typeof e.tag == "number" && R("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;
@@ -98,30 +94,30 @@ function Rr() {
98
94
  return "Portal";
99
95
  case v:
100
96
  return "Profiler";
101
- case p:
97
+ case h:
102
98
  return "StrictMode";
103
99
  case y:
104
100
  return "Suspense";
105
- case g:
101
+ case b:
106
102
  return "SuspenseList";
107
103
  }
108
104
  if (typeof e == "object")
109
105
  switch (e.$$typeof) {
110
- case l:
111
- var r = e;
112
- return he(r) + ".Consumer";
113
106
  case s:
107
+ var r = e;
108
+ return de(r) + ".Consumer";
109
+ case l:
114
110
  var n = e;
115
- return he(n._context) + ".Provider";
116
- case h:
111
+ return de(n._context) + ".Provider";
112
+ case d:
117
113
  return Ke(e, e.render, "ForwardRef");
118
- case T:
114
+ case w:
119
115
  var u = e.displayName || null;
120
- return u !== null ? u : D(e.type) || "Memo";
121
- case x: {
122
- var d = e, _ = d._payload, f = d._init;
116
+ return u !== null ? u : L(e.type) || "Memo";
117
+ case T: {
118
+ var p = e, g = p._payload, f = p._init;
123
119
  try {
124
- return D(f(_));
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 $ = Object.assign, G = 0, _e, ge, be, Re, Ee, me, ye;
133
- function we() {
128
+ var $ = Object.assign, U = 0, ve, pe, he, _e, ge, be, Ee;
129
+ function Re() {
134
130
  }
135
- we.__reactDisabledLog = !0;
136
- function Me() {
131
+ Re.__reactDisabledLog = !0;
132
+ function Je() {
137
133
  {
138
- if (G === 0) {
139
- _e = console.log, ge = console.info, be = console.warn, Re = console.error, Ee = console.group, me = console.groupCollapsed, ye = console.groupEnd;
134
+ if (U === 0) {
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: we,
139
+ value: Re,
144
140
  writable: !0
145
141
  };
146
142
  Object.defineProperties(console, {
@@ -153,12 +149,12 @@ function Rr() {
153
149
  groupEnd: e
154
150
  });
155
151
  }
156
- G++;
152
+ U++;
157
153
  }
158
154
  }
159
- function Je() {
155
+ function ze() {
160
156
  {
161
- if (G--, G === 0) {
157
+ if (U--, U === 0) {
162
158
  var e = {
163
159
  configurable: !0,
164
160
  enumerable: !0,
@@ -166,64 +162,64 @@ function Rr() {
166
162
  };
167
163
  Object.defineProperties(console, {
168
164
  log: $({}, e, {
169
- value: _e
165
+ value: ve
170
166
  }),
171
167
  info: $({}, e, {
172
- value: ge
168
+ value: pe
173
169
  }),
174
170
  warn: $({}, e, {
175
- value: be
171
+ value: he
176
172
  }),
177
173
  error: $({}, e, {
178
- value: Re
174
+ value: _e
179
175
  }),
180
176
  group: $({}, e, {
181
- value: Ee
177
+ value: ge
182
178
  }),
183
179
  groupCollapsed: $({}, e, {
184
- value: me
180
+ value: be
185
181
  }),
186
182
  groupEnd: $({}, e, {
187
- value: ye
183
+ value: Ee
188
184
  })
189
185
  });
190
186
  }
191
- G < 0 && R("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 oe = O.ReactCurrentDispatcher, ae;
195
- function Q(e, r, n) {
190
+ var te = P.ReactCurrentDispatcher, ne;
191
+ function H(e, r, n) {
196
192
  {
197
- if (ae === 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
- ae = 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
- ` + ae + e;
201
+ ` + ne + e;
206
202
  }
207
203
  }
208
- var ie = !1, ee;
204
+ var oe = !1, X;
209
205
  {
210
- var ze = typeof WeakMap == "function" ? WeakMap : Map;
211
- ee = new ze();
206
+ var Me = typeof WeakMap == "function" ? WeakMap : Map;
207
+ X = new Me();
212
208
  }
213
- function Te(e, r) {
214
- if (!e || ie)
209
+ function me(e, r) {
210
+ if (!e || oe)
215
211
  return "";
216
212
  {
217
- var n = ee.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
- ie = !0;
223
- var d = Error.prepareStackTrace;
218
+ oe = !0;
219
+ var p = Error.prepareStackTrace;
224
220
  Error.prepareStackTrace = void 0;
225
- var _;
226
- _ = oe.current, oe.current = null, Me();
221
+ var g;
222
+ g = te.current, te.current = null, Je();
227
223
  try {
228
224
  if (r) {
229
225
  var f = function() {
@@ -236,29 +232,29 @@ function Rr() {
236
232
  }), typeof Reflect == "object" && Reflect.construct) {
237
233
  try {
238
234
  Reflect.construct(f, []);
239
- } catch (A) {
240
- u = A;
235
+ } catch (j) {
236
+ u = j;
241
237
  }
242
238
  Reflect.construct(e, [], f);
243
239
  } else {
244
240
  try {
245
241
  f.call();
246
- } catch (A) {
247
- u = A;
242
+ } catch (j) {
243
+ u = j;
248
244
  }
249
245
  e.call(f.prototype);
250
246
  }
251
247
  } else {
252
248
  try {
253
249
  throw Error();
254
- } catch (A) {
255
- u = A;
250
+ } catch (j) {
251
+ u = j;
256
252
  }
257
253
  e();
258
254
  }
259
- } catch (A) {
260
- if (A && u && typeof A.stack == "string") {
261
- for (var c = A.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
259
  `), E = c.length - 1, m = C.length - 1; E >= 1 && m >= 0 && c[E] !== C[m]; )
264
260
  m--;
@@ -267,69 +263,69 @@ function Rr() {
267
263
  if (E !== 1 || m !== 1)
268
264
  do
269
265
  if (E--, m--, m < 0 || c[E] !== C[m]) {
270
- var k = `
266
+ var O = `
271
267
  ` + c[E].replace(" at new ", " at ");
272
- return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && ee.set(e, k), k;
268
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, O), O;
273
269
  }
274
270
  while (E >= 1 && m >= 0);
275
271
  break;
276
272
  }
277
273
  }
278
274
  } finally {
279
- ie = !1, oe.current = _, Je(), Error.prepareStackTrace = d;
275
+ oe = !1, te.current = g, ze(), Error.prepareStackTrace = p;
280
276
  }
281
- var Y = e ? e.displayName || e.name : "", Le = Y ? Q(Y) : "";
282
- return typeof e == "function" && ee.set(e, Le), Le;
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 Te(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 re(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 Te(e, Xe(e));
291
+ return me(e, Xe(e));
296
292
  if (typeof e == "string")
297
- return Q(e);
293
+ return H(e);
298
294
  switch (e) {
299
295
  case y:
300
- return Q("Suspense");
301
- case g:
302
- return Q("SuspenseList");
296
+ return H("Suspense");
297
+ case b:
298
+ return H("SuspenseList");
303
299
  }
304
300
  if (typeof e == "object")
305
301
  switch (e.$$typeof) {
306
- case h:
302
+ case d:
307
303
  return He(e.render);
308
- case T:
309
- return re(e.type, r, n);
310
- case x: {
311
- var u = e, d = u._payload, _ = u._init;
304
+ case w:
305
+ return Z(e.type, r, n);
306
+ case T: {
307
+ var u = e, p = u._payload, g = u._init;
312
308
  try {
313
- return re(_(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 te = Object.prototype.hasOwnProperty, xe = {}, Ce = O.ReactDebugCurrentFrame;
321
- function ne(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 = re(e.type, e._source, r ? r.type : null);
324
- Ce.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
- Ce.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 _ = Function.call.bind(te);
326
+ var g = Function.call.bind(Q);
331
327
  for (var f in e)
332
- if (_(e, f)) {
328
+ if (g(e, f)) {
333
329
  var c = void 0;
334
330
  try {
335
331
  if (typeof e[f] != "function") {
@@ -340,12 +336,12 @@ function Rr() {
340
336
  } catch (E) {
341
337
  c = E;
342
338
  }
343
- c && !(c instanceof Error) && (ne(d), R("%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), ne(null)), c instanceof Error && !(c.message in xe) && (xe[c.message] = !0, ne(d), R("Failed %s type: %s", n, c.message), ne(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 ue(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 Se(e), !1;
355
+ return Te(e), !1;
360
356
  } catch {
361
357
  return !0;
362
358
  }
363
359
  }
364
- function Se(e) {
360
+ function Te(e) {
365
361
  return "" + e;
366
362
  }
367
- function Pe(e) {
363
+ function xe(e) {
368
364
  if (rr(e))
369
- return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Se(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 B = O.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
- }, Oe, ke, ce;
377
- ce = {};
372
+ }, Se, Pe;
378
373
  function nr(e) {
379
- if (te.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 (te.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" && B.current && r && B.current.stateNode !== r) {
396
- var n = D(B.current.type);
397
- ce[n] || (R('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', D(B.current.type), e.ref), ce[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
- Oe || (Oe = !0, R("%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
- ke || (ke = !0, R("%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, _, f) {
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,
@@ -429,7 +421,7 @@ function Rr() {
429
421
  ref: n,
430
422
  props: f,
431
423
  // Record the component responsible for creating this element.
432
- _owner: _
424
+ _owner: g
433
425
  };
434
426
  return c._store = {}, Object.defineProperty(c._store, "validated", {
435
427
  configurable: !1,
@@ -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 _, f = {}, c = null, C = null;
454
- n !== void 0 && (Pe(n), c = "" + n), or(r) && (Pe(r.key), c = "" + r.key), nr(r) && (C = r.ref, ar(r, d));
455
- for (_ in r)
456
- te.call(r, _) && !tr.hasOwnProperty(_) && (f[_] = r[_]);
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));
447
+ for (g in r)
448
+ Q.call(r, g) && !tr.hasOwnProperty(g) && (f[g] = r[g]);
457
449
  if (e && e.defaultProps) {
458
450
  var E = e.defaultProps;
459
- for (_ in E)
460
- f[_] === void 0 && (f[_] = E[_]);
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
456
  c && ir(f, m), C && ur(f, m);
465
457
  }
466
- return cr(e, c, C, d, u, B.current, f);
458
+ return sr(e, c, C, p, u, Ce.current, f);
467
459
  }
468
460
  }
469
- var se = O.ReactCurrentOwner, je = O.ReactDebugCurrentFrame;
470
- function W(e) {
461
+ var ie = P.ReactCurrentOwner, Oe = P.ReactDebugCurrentFrame;
462
+ function N(e) {
471
463
  if (e) {
472
- var r = e._owner, n = re(e.type, e._source, r ? r.type : null);
473
- je.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
- je.setExtraStackFrame(null);
467
+ Oe.setExtraStackFrame(null);
476
468
  }
477
- var fe;
478
- fe = !1;
479
- function le(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 De() {
474
+ function ke() {
483
475
  {
484
- if (se.current) {
485
- var e = D(se.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 Ae = {};
489
+ var je = {};
506
490
  function lr(e) {
507
491
  {
508
- var r = De();
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 Fe(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 (Ae[n])
508
+ if (je[n])
525
509
  return;
526
- Ae[n] = !0;
510
+ je[n] = !0;
527
511
  var u = "";
528
- e && e._owner && e._owner !== se.current && (u = " It was passed a child from " + D(e._owner.type) + "."), W(e), R('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), W(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 Ie(e, r) {
515
+ function Ae(e, r) {
532
516
  {
533
517
  if (typeof e != "object")
534
518
  return;
535
- if (ue(e))
519
+ if (ae(e))
536
520
  for (var n = 0; n < e.length; n++) {
537
521
  var u = e[n];
538
- le(u) && Fe(u, r);
522
+ se(u) && De(u, r);
539
523
  }
540
- else if (le(e))
524
+ else if (se(e))
541
525
  e._store && (e._store.validated = !0);
542
526
  else if (e) {
543
- var d = L(e);
544
- if (typeof d == "function" && d !== e.entries)
545
- for (var _ = d.call(e), f; !(f = _.next()).done; )
546
- le(f.value) && Fe(f.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 === h || // 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
- r.$$typeof === T))
544
+ r.$$typeof === w))
561
545
  n = r.propTypes;
562
546
  else
563
547
  return;
564
548
  if (n) {
565
- var u = D(r);
549
+ var u = L(r);
566
550
  Ze(n, e.props, "prop", u, e);
567
- } else if (r.PropTypes !== void 0 && !fe) {
568
- fe = !0;
569
- var d = D(r);
570
- R("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 && R("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
- W(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), W(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 && (W(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
568
+ e.ref !== null && (N(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
585
569
  }
586
570
  }
587
- function Ve(e, r, n, u, d, _) {
571
+ function Fe(e, r, n, u, p, g) {
588
572
  {
589
573
  var f = qe(e);
590
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 += De();
577
+ var C = fr();
578
+ C ? c += C : c += ke();
595
579
  var E;
596
- e === null ? E = "null" : ue(e) ? E = "array" : e !== void 0 && e.$$typeof === o ? (E = "<" + (D(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, R("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);
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, _);
582
+ var m = cr(e, r, n, p, g);
599
583
  if (m == null)
600
584
  return m;
601
585
  if (f) {
602
- var k = r.children;
603
- if (k !== void 0)
586
+ var O = r.children;
587
+ if (O !== void 0)
604
588
  if (u)
605
- if (ue(k)) {
606
- for (var Y = 0; Y < k.length; Y++)
607
- Ie(k[Y], e);
608
- Object.freeze && Object.freeze(k);
589
+ if (ae(O)) {
590
+ for (var Y = 0; Y < O.length; Y++)
591
+ Ae(O[Y], e);
592
+ Object.freeze && Object.freeze(O);
609
593
  } else
610
- R("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
- Ie(k, 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 Ve(e, r, n, !0);
602
+ return Fe(e, r, n, !0);
619
603
  }
620
604
  function hr(e, r, n) {
621
- return Ve(e, r, n, !1);
605
+ return Fe(e, r, n, !1);
622
606
  }
623
607
  var _r = hr, gr = pr;
624
- K.Fragment = a, K.jsx = _r, K.jsxs = gr;
625
- }()), K;
608
+ B.Fragment = a, B.jsx = _r, B.jsxs = gr;
609
+ }()), B;
626
610
  }
627
- process.env.NODE_ENV === "production" ? de.exports = br() : de.exports = Rr();
628
- var I = de.exports;
629
- const H = Ye({
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,45 +618,45 @@ const H = Ye({
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 = M({});
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, p, v, s) => {
646
- t.current[i] = { value: i, parent: a, children: {}, childrenLength: 0, index: p, isGroup: v, ref: s }, t.current[a].children[p] = i, (p + 1 > t.current[a].childrenLength || t.current[t.current[a].childrenLength - 1] == null) && (t.current[a].childrenLength = p + 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 U = Ye({
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
- const [a, p] = Ue(i), v = t !== void 0 ? t : a;
656
- return [v, (l) => {
657
- const h = typeof l == "function" ? l(v) : l;
658
- o && o(h), p(h);
639
+ const [a, h] = Ye(i), v = t !== void 0 ? t : a;
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 J(t, o) {
645
+ function q(t, o) {
662
646
  return function(a) {
663
- const p = a.defaultPrevented;
664
- p && (a.defaultPrevented = !1), t == null || t(a);
647
+ const h = a.defaultPrevented;
648
+ h && (a.defaultPrevented = !1), t == null || t(a);
665
649
  let v;
666
- return a.defaultPrevented || (v = o == null ? void 0 : o(a), p && (a.defaultPrevented = !0)), v;
650
+ return a.defaultPrevented || (v = o == null ? void 0 : o(a), h && (a.defaultPrevented = !0)), v;
667
651
  };
668
652
  }
669
- function ve(...t) {
670
- return Ge((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]);
674
658
  }
675
- function Be() {
659
+ function Ge() {
676
660
  let t = -1;
677
661
  const o = {};
678
662
  function i(a) {
@@ -692,30 +676,29 @@ function Tr(t, o) {
692
676
  i != "__root__" && ((a = t[i].ref.current) == null || a.focus());
693
677
  }
694
678
  function xr(t, o) {
695
- var p, v;
679
+ var h, v;
696
680
  const i = t[o].parent, a = t[o].index;
697
681
  if (a != 0) {
698
- let s = t[i].children[a - 1], l;
699
- for (; t[s].isGroup && (l = t[s].children[t[s].childrenLength - 1], !(l == null || t[l].ref.current == null)); )
700
- s = l;
701
- (p = t[s].ref.current) == null || p.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());
705
689
  }
706
690
  function Cr(t, o) {
707
- var p, v;
691
+ var h, v;
708
692
  if (t[o].isGroup) {
709
- const s = (p = t[t[o].children[0]]) == null ? void 0 : p.ref.current;
710
- if (s) {
711
- s.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,109 +715,109 @@ function Pr(t) {
732
715
  o = i;
733
716
  (a = t[o].ref.current) == null || a.focus();
734
717
  }
735
- const Or = z(({ value: t, onValueChange: o, defaultValue: i, onKeyDown: a, ...p }, v) => {
736
- var R;
737
- const [s, l] = Er(), h = Be(), [y, g] = mr(t, o, i ?? /* @__PURE__ */ new Set()), [T, x] = Ue(""), S = M(null), F = ve(S, v), b = M("");
738
- b.current != "" && !((R = s.current) != null && R[b.current]) && (b.current = "");
739
- const L = Ge((w) => {
740
- if (!(!yr.includes(w.key) || !s.current))
741
- switch (w.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) {
742
722
  case "ArrowRight":
743
- if (!s.current[b.current].isGroup)
744
- break;
745
- w.preventDefault(), y.has(b.current) ? wr(s.current, b.current) : g((P) => /* @__PURE__ */ new Set([...P, b.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]));
746
725
  break;
747
726
  case "ArrowLeft":
748
- w.preventDefault(), y.has(b.current) ? g((P) => new Set([...P].filter((j) => j !== b.current))) : Tr(s.current, b.current);
727
+ _.preventDefault(), y.has(R.current) ? b((x) => new Set([...x].filter((k) => k !== R.current))) : Tr(l, R.current);
749
728
  break;
750
729
  case "ArrowUp":
751
- w.preventDefault(), xr(s.current, b.current);
730
+ _.preventDefault(), xr(l, R.current);
752
731
  break;
753
732
  case "ArrowDown":
754
- w.preventDefault(), Cr(s.current, b.current);
733
+ _.preventDefault(), Cr(l, R.current);
755
734
  break;
756
735
  case "Home":
757
- w.preventDefault(), Sr(s.current);
736
+ _.preventDefault(), Sr(l);
758
737
  break;
759
738
  case "End":
760
- w.preventDefault(), Pr(s.current);
739
+ _.preventDefault(), Pr(l);
761
740
  break;
762
741
  case "Enter":
763
- w.preventDefault(), x(b.current), y.has(b.current) ? g((P) => new Set([...P].filter((j) => j !== b.current))) : g((P) => /* @__PURE__ */ new Set([...P, b.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]));
764
743
  break;
765
744
  }
766
- }, [y]), O = J(a, L);
767
- return /* @__PURE__ */ I.jsx(H.Provider, { value: { rootValue: y, setRootValue: g, selection: T, setSelection: x, focus: b, nodeMap: s, pushToNodeMap: l }, children: /* @__PURE__ */ I.jsx(U.Provider, { value: { parent: "__root__", getIndex: h, depth: 0 }, children: /* @__PURE__ */ I.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(
768
747
  "ul",
769
748
  {
770
- ref: F,
749
+ ref: D,
771
750
  role: "tree",
772
751
  "aria-multiselectable": "false",
773
- onKeyDown: O,
774
- ...p
752
+ onKeyDown: P,
753
+ ...h
775
754
  }
776
755
  ) }) });
777
- }), kr = z(({ value: t, onFocus: o, onClick: i, ...a }, p) => {
778
- const { selection: v, setSelection: s, focus: l, nodeMap: h, pushToNodeMap: y } = V(H), { parent: g, getIndex: T, depth: x } = V(U), S = M(null), F = ve(S, p), b = J(o, O), L = J(i, R);
779
- function O(P) {
780
- var j, N, X, Z;
781
- (X = (N = (j = h.current) == null ? void 0 : j[l.current]) == null ? void 0 : N.ref.current) == null || X.setAttribute("tabindex", "-1"), (Z = S.current) == null || Z.setAttribute("tabindex", "0"), l.current = t, P.stopPropagation();
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, _);
758
+ function P(k) {
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();
782
761
  }
783
- function R() {
784
- s(t);
762
+ function _() {
763
+ l(t);
785
764
  }
786
- const w = T(t);
787
- return y(t, g, w, !1, S), l.current == "" && g == "__root__" && w == 0 && (l.current = t), /* @__PURE__ */ I.jsx(
765
+ const x = w(t);
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(
788
769
  "li",
789
770
  {
790
- ref: F,
771
+ ref: D,
791
772
  role: "treenode",
792
773
  "aria-selected": v == t,
793
- tabIndex: l.current == t ? 0 : -1,
794
- onFocus: b,
795
- onClick: L,
796
- "data-depth": x,
774
+ tabIndex: s.current == t ? 0 : -1,
775
+ onFocus: R,
776
+ onClick: I,
777
+ "data-depth": T,
797
778
  ...a
798
779
  }
799
780
  );
800
- }), jr = z(({ value: t, onFocus: o, ...i }, a) => {
801
- const p = Be(), { rootValue: v, selection: s, focus: l, nodeMap: h, pushToNodeMap: y } = V(H), { parent: g, getIndex: T, depth: x } = V(U), S = M(null), F = ve(S, a), b = J(o, L);
802
- function L(R) {
803
- var w, P, j, N;
804
- (j = (P = (w = h.current) == null ? void 0 : w[l.current]) == null ? void 0 : P.ref.current) == null || j.setAttribute("tabindex", "-1"), (N = S.current) == null || N.setAttribute("tabindex", "0"), l.current = t, R.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();
805
786
  }
806
- const O = T(t);
807
- return y(t, g, O, !0, S), l.current == "" && g == "__root__" && O == 0 && (l.current = t), /* @__PURE__ */ I.jsx(U.Provider, { value: { parent: t, getIndex: p, depth: x + 1 }, children: /* @__PURE__ */ I.jsx(
787
+ const P = w(t);
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(
808
791
  "li",
809
792
  {
810
- ref: F,
793
+ ref: D,
811
794
  role: "treenode",
812
795
  "data-state": v.has(t) ? "open" : "closed",
813
- "data-depth": x,
796
+ "data-depth": T,
814
797
  "aria-expanded": v.has(t),
815
- "aria-selected": s == t,
816
- tabIndex: l.current == t ? 0 : -1,
817
- onFocus: b,
798
+ "aria-selected": l == t,
799
+ tabIndex: s.current == t ? 0 : -1,
800
+ onFocus: R,
818
801
  ...i
819
802
  }
820
803
  ) });
821
- }), Dr = z(({ onClick: t, ...o }, i) => {
822
- const { setRootValue: a, setSelection: p } = V(H), { parent: v } = V(U), s = J(t, l);
823
- function l() {
824
- p(v), a((h) => h.has(v) ? new Set([...h].filter((y) => y !== v)) : /* @__PURE__ */ new Set([...h, 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]));
825
808
  }
826
- return /* @__PURE__ */ I.jsx(
809
+ return /* @__PURE__ */ A.jsx(
827
810
  "div",
828
811
  {
829
812
  ref: i,
830
- onClick: s,
813
+ onClick: l,
831
814
  ...o
832
815
  }
833
816
  );
834
- }), Ar = z(({ ...t }, o) => {
835
- const { rootValue: i } = V(H), { parent: a } = V(U);
817
+ }), Ar = K(({ ...t }, o) => {
818
+ const { rootValue: i } = F(J), { parent: a } = F(W);
836
819
  if (i.has(a))
837
- return /* @__PURE__ */ I.jsx(
820
+ return /* @__PURE__ */ A.jsx(
838
821
  "ul",
839
822
  {
840
823
  ref: o,