react-composable-treeview 1.0.16 → 1.0.18

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