react-resizable-panels 4.4.2 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,33 +1,33 @@
1
1
  "use client";
2
2
  import { jsx as q } from "react/jsx-runtime";
3
- import { useState as Y, useCallback as K, useId as Ze, useLayoutEffect as ke, useEffect as Ge, useRef as k, createContext as Je, useImperativeHandle as Ie, useMemo as Oe, useSyncExternalStore as Qe, useContext as et } from "react";
3
+ import { useState as Y, useCallback as K, useId as Je, useLayoutEffect as Ge, useEffect as Ie, useRef as k, createContext as Qe, useImperativeHandle as De, useMemo as Oe, useSyncExternalStore as et, useContext as tt } from "react";
4
4
  function b(e, t = "Assertion error") {
5
5
  if (!e)
6
6
  throw Error(t);
7
7
  }
8
- function V({
8
+ function U({
9
9
  group: e
10
10
  }) {
11
11
  const { orientation: t, panels: n } = e;
12
- return n.reduce((o, r) => (o += t === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o), 0);
12
+ return n.reduce((o, i) => (o += t === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, o), 0);
13
13
  }
14
14
  function ce(e, t) {
15
15
  return t.sort(
16
- e === "horizontal" ? tt : nt
16
+ e === "horizontal" ? nt : ot
17
17
  );
18
18
  }
19
- function tt(e, t) {
19
+ function nt(e, t) {
20
20
  const n = e.element.offsetLeft - t.element.offsetLeft;
21
21
  return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
22
22
  }
23
- function nt(e, t) {
23
+ function ot(e, t) {
24
24
  const n = e.element.offsetTop - t.element.offsetTop;
25
25
  return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
26
26
  }
27
- function De(e) {
27
+ function Te(e) {
28
28
  return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
29
29
  }
30
- function Te(e, t) {
30
+ function _e(e, t) {
31
31
  return {
32
32
  x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
33
33
  Math.abs(e.x - t.left),
@@ -39,7 +39,7 @@ function Te(e, t) {
39
39
  )
40
40
  };
41
41
  }
42
- function ot({
42
+ function it({
43
43
  orientation: e,
44
44
  rects: t,
45
45
  targetRect: n
@@ -48,52 +48,56 @@ function ot({
48
48
  x: n.x + n.width / 2,
49
49
  y: n.y + n.height / 2
50
50
  };
51
- let r, s = Number.MAX_VALUE;
51
+ let i, s = Number.MAX_VALUE;
52
52
  for (const l of t) {
53
- const { x: i, y: a } = Te(o, l), u = e === "horizontal" ? i : a;
54
- u < s && (s = u, r = l);
53
+ const { x: r, y: a } = _e(o, l), u = e === "horizontal" ? r : a;
54
+ u < s && (s = u, i = l);
55
55
  }
56
- return b(r, "No rect found"), r;
56
+ return b(i, "No rect found"), i;
57
57
  }
58
- function _e(e) {
59
- const { element: t, orientation: n, panels: o, separators: r } = e, s = ce(
58
+ let oe;
59
+ function rt() {
60
+ return oe === void 0 && (typeof matchMedia == "function" ? oe = !!matchMedia("(pointer:coarse)").matches : oe = !1), oe;
61
+ }
62
+ function Ne(e) {
63
+ const { element: t, orientation: n, panels: o, separators: i } = e, s = ce(
60
64
  n,
61
- Array.from(t.children).filter(De).map((c) => ({ element: c }))
65
+ Array.from(t.children).filter(Te).map((c) => ({ element: c }))
62
66
  ).map(({ element: c }) => c), l = [];
63
- let i = !1, a, u = [];
67
+ let r = !1, a, u = [];
64
68
  for (const c of s)
65
69
  if (c.hasAttribute("data-panel")) {
66
- const h = o.find(
70
+ const m = o.find(
67
71
  (g) => g.element === c
68
72
  );
69
- if (h) {
73
+ if (m) {
70
74
  if (a) {
71
- const g = a.element.getBoundingClientRect(), p = c.getBoundingClientRect();
75
+ const g = a.element.getBoundingClientRect(), h = c.getBoundingClientRect();
72
76
  let f;
73
- if (i) {
74
- const d = n === "horizontal" ? new DOMRect(g.right, g.top, 0, g.height) : new DOMRect(
77
+ if (r) {
78
+ const p = n === "horizontal" ? new DOMRect(g.right, g.top, 0, g.height) : new DOMRect(
75
79
  g.left,
76
80
  g.bottom,
77
81
  g.width,
78
82
  0
79
- ), m = n === "horizontal" ? new DOMRect(p.left, p.top, 0, p.height) : new DOMRect(p.left, p.top, p.width, 0);
83
+ ), d = n === "horizontal" ? new DOMRect(h.left, h.top, 0, h.height) : new DOMRect(h.left, h.top, h.width, 0);
80
84
  switch (u.length) {
81
85
  case 0: {
82
86
  f = [
83
- d,
84
- m
87
+ p,
88
+ d
85
89
  ];
86
90
  break;
87
91
  }
88
92
  case 1: {
89
- const S = u[0], x = ot({
93
+ const y = u[0], v = it({
90
94
  orientation: n,
91
- rects: [g, p],
92
- targetRect: S.element.getBoundingClientRect()
95
+ rects: [g, h],
96
+ targetRect: y.element.getBoundingClientRect()
93
97
  });
94
98
  f = [
95
- S,
96
- x === g ? m : d
99
+ y,
100
+ v === g ? d : p
97
101
  ];
98
102
  break;
99
103
  }
@@ -106,51 +110,72 @@ function _e(e) {
106
110
  u.length ? f = u : f = [
107
111
  n === "horizontal" ? new DOMRect(
108
112
  g.right,
109
- p.top,
110
- p.left - g.right,
111
- p.height
113
+ h.top,
114
+ h.left - g.right,
115
+ h.height
112
116
  ) : new DOMRect(
113
- p.left,
117
+ h.left,
114
118
  g.bottom,
115
- p.width,
116
- p.top - g.bottom
119
+ h.width,
120
+ h.top - g.bottom
117
121
  )
118
122
  ];
119
- for (const d of f)
123
+ for (const p of f) {
124
+ let d = "width" in p ? p : p.element.getBoundingClientRect();
125
+ const y = rt() ? 37 : 27;
126
+ if (d.width < y) {
127
+ const v = y - d.width;
128
+ d = new DOMRect(
129
+ d.x - v / 2,
130
+ d.y,
131
+ d.width + v,
132
+ d.height
133
+ );
134
+ }
135
+ if (d.height < y) {
136
+ const v = y - d.height;
137
+ d = new DOMRect(
138
+ d.x,
139
+ d.y - v / 2,
140
+ d.width,
141
+ d.height + v
142
+ );
143
+ }
120
144
  l.push({
121
145
  group: e,
122
- groupSize: V({ group: e }),
123
- panels: [a, h],
124
- separator: "width" in d ? void 0 : d,
125
- rect: "width" in d ? d : d.element.getBoundingClientRect()
146
+ groupSize: U({ group: e }),
147
+ panels: [a, m],
148
+ separator: "width" in p ? void 0 : p,
149
+ rect: d
126
150
  });
151
+ }
127
152
  }
128
- i = !1, a = h, u = [];
153
+ r = !1, a = m, u = [];
129
154
  }
130
155
  } else if (c.hasAttribute("data-separator")) {
131
- const h = r.find(
156
+ const m = i.find(
132
157
  (g) => g.element === c
133
158
  );
134
- h ? u.push(h) : (a = void 0, u = []);
159
+ m ? u.push(m) : (a = void 0, u = []);
135
160
  } else
136
- i = !0;
161
+ r = !0;
137
162
  return l;
138
163
  }
139
- function rt(e, t) {
164
+ function st(e, t) {
140
165
  const n = getComputedStyle(e), o = parseFloat(n.fontSize);
141
166
  return t * o;
142
167
  }
143
- function it(e, t) {
168
+ function at(e, t) {
144
169
  const n = getComputedStyle(e.ownerDocument.body), o = parseFloat(n.fontSize);
145
170
  return t * o;
146
171
  }
147
- function st(e) {
172
+ function lt(e) {
148
173
  return e / 100 * window.innerHeight;
149
174
  }
150
- function at(e) {
175
+ function ut(e) {
151
176
  return e / 100 * window.innerWidth;
152
177
  }
153
- function lt(e) {
178
+ function ct(e) {
154
179
  switch (typeof e) {
155
180
  case "number":
156
181
  return [e, "px"];
@@ -160,46 +185,46 @@ function lt(e) {
160
185
  }
161
186
  }
162
187
  }
163
- function oe({
188
+ function ie({
164
189
  groupSize: e,
165
190
  panelElement: t,
166
191
  styleProp: n
167
192
  }) {
168
193
  let o;
169
- const [r, s] = lt(n);
194
+ const [i, s] = ct(n);
170
195
  switch (s) {
171
196
  case "%": {
172
- o = r / 100 * e;
197
+ o = i / 100 * e;
173
198
  break;
174
199
  }
175
200
  case "px": {
176
- o = r;
201
+ o = i;
177
202
  break;
178
203
  }
179
204
  case "rem": {
180
- o = it(t, r);
205
+ o = at(t, i);
181
206
  break;
182
207
  }
183
208
  case "em": {
184
- o = rt(t, r);
209
+ o = st(t, i);
185
210
  break;
186
211
  }
187
212
  case "vh": {
188
- o = st(r);
213
+ o = lt(i);
189
214
  break;
190
215
  }
191
216
  case "vw": {
192
- o = at(r);
217
+ o = ut(i);
193
218
  break;
194
219
  }
195
220
  }
196
221
  return o;
197
222
  }
198
- function D(e) {
223
+ function O(e) {
199
224
  return parseFloat(e.toFixed(3));
200
225
  }
201
- function ge(e) {
202
- const { panels: t } = e, n = V({ group: e });
226
+ function ye(e) {
227
+ const { panels: t } = e, n = U({ group: e });
203
228
  return n === 0 ? t.map((o) => ({
204
229
  collapsedSize: 0,
205
230
  collapsible: o.panelConstraints.collapsible === !0,
@@ -208,54 +233,54 @@ function ge(e) {
208
233
  maxSize: 100,
209
234
  panelId: o.id
210
235
  })) : t.map((o) => {
211
- const { element: r, panelConstraints: s } = o;
236
+ const { element: i, panelConstraints: s } = o;
212
237
  let l = 0;
213
238
  if (s.collapsedSize !== void 0) {
214
- const c = oe({
239
+ const c = ie({
215
240
  groupSize: n,
216
- panelElement: r,
241
+ panelElement: i,
217
242
  styleProp: s.collapsedSize
218
243
  });
219
- l = D(c / n * 100);
244
+ l = O(c / n * 100);
220
245
  }
221
- let i;
246
+ let r;
222
247
  if (s.defaultSize !== void 0) {
223
- const c = oe({
248
+ const c = ie({
224
249
  groupSize: n,
225
- panelElement: r,
250
+ panelElement: i,
226
251
  styleProp: s.defaultSize
227
252
  });
228
- i = D(c / n * 100);
253
+ r = O(c / n * 100);
229
254
  }
230
255
  let a = 0;
231
256
  if (s.minSize !== void 0) {
232
- const c = oe({
257
+ const c = ie({
233
258
  groupSize: n,
234
- panelElement: r,
259
+ panelElement: i,
235
260
  styleProp: s.minSize
236
261
  });
237
- a = D(c / n * 100);
262
+ a = O(c / n * 100);
238
263
  }
239
264
  let u = 100;
240
265
  if (s.maxSize !== void 0) {
241
- const c = oe({
266
+ const c = ie({
242
267
  groupSize: n,
243
- panelElement: r,
268
+ panelElement: i,
244
269
  styleProp: s.maxSize
245
270
  });
246
- u = D(c / n * 100);
271
+ u = O(c / n * 100);
247
272
  }
248
273
  return {
249
274
  collapsedSize: l,
250
275
  collapsible: s.collapsible === !0,
251
- defaultSize: i,
276
+ defaultSize: r,
252
277
  minSize: a,
253
278
  maxSize: u,
254
279
  panelId: o.id
255
280
  };
256
281
  });
257
282
  }
258
- class ut {
283
+ class ft {
259
284
  #e = {};
260
285
  addListener(t, n) {
261
286
  const o = this.#e[t];
@@ -269,17 +294,17 @@ class ut {
269
294
  if (o.length === 1)
270
295
  o[0].call(null, n);
271
296
  else {
272
- let r = !1, s = null;
297
+ let i = !1, s = null;
273
298
  const l = Array.from(o);
274
- for (let i = 0; i < l.length; i++) {
275
- const a = l[i];
299
+ for (let r = 0; r < l.length; r++) {
300
+ const a = l[r];
276
301
  try {
277
302
  a.call(null, n);
278
303
  } catch (u) {
279
- s === null && (r = !0, s = u);
304
+ s === null && (i = !0, s = u);
280
305
  }
281
306
  }
282
- if (r)
307
+ if (i)
283
308
  throw s;
284
309
  }
285
310
  }
@@ -289,52 +314,177 @@ class ut {
289
314
  removeListener(t, n) {
290
315
  const o = this.#e[t];
291
316
  if (o !== void 0) {
292
- const r = o.indexOf(n);
293
- r >= 0 && o.splice(r, 1);
317
+ const i = o.indexOf(n);
318
+ i >= 0 && o.splice(i, 1);
294
319
  }
295
320
  }
296
321
  }
297
322
  function R(e, t, n = 0) {
298
- return Math.abs(D(e) - D(t)) <= n;
323
+ return Math.abs(O(e) - O(t)) <= n;
299
324
  }
300
- let I = {
325
+ let D = {
301
326
  cursorFlags: 0,
302
327
  interactionState: {
303
328
  state: "inactive"
304
329
  },
305
330
  mountedGroups: /* @__PURE__ */ new Map()
306
331
  };
307
- const _ = new ut();
308
- function O() {
309
- return I;
332
+ const _ = new ft();
333
+ function G() {
334
+ return D;
310
335
  }
311
336
  function E(e) {
312
- const t = typeof e == "function" ? e(I) : e;
313
- if (I === t)
314
- return I;
315
- const n = I;
316
- return I = {
317
- ...I,
337
+ const t = typeof e == "function" ? e(D) : e;
338
+ if (D === t)
339
+ return D;
340
+ const n = D;
341
+ return D = {
342
+ ...D,
318
343
  ...t
319
- }, t.cursorFlags !== void 0 && _.emit("cursorFlagsChange", I.cursorFlags), t.interactionState !== void 0 && _.emit("interactionStateChange", I.interactionState), t.mountedGroups !== void 0 && (I.mountedGroups.forEach((o, r) => {
344
+ }, t.cursorFlags !== void 0 && _.emit("cursorFlagsChange", D.cursorFlags), t.interactionState !== void 0 && _.emit("interactionStateChange", D.interactionState), t.mountedGroups !== void 0 && (D.mountedGroups.forEach((o, i) => {
320
345
  o.derivedPanelConstraints.forEach((s) => {
321
346
  if (s.collapsible) {
322
- const { layout: l } = n.mountedGroups.get(r) ?? {};
347
+ const { layout: l } = n.mountedGroups.get(i) ?? {};
323
348
  if (l) {
324
- const i = R(
349
+ const r = R(
325
350
  s.collapsedSize,
326
351
  o.layout[s.panelId]
327
352
  ), a = R(
328
353
  s.collapsedSize,
329
354
  l[s.panelId]
330
355
  );
331
- i && !a && (r.inMemoryLastExpandedPanelSizes[s.panelId] = l[s.panelId]);
356
+ r && !a && (i.inMemoryLastExpandedPanelSizes[s.panelId] = l[s.panelId]);
332
357
  }
333
358
  }
334
359
  });
335
- }), _.emit("mountedGroupsChange", I.mountedGroups)), I;
360
+ }), _.emit("mountedGroupsChange", D.mountedGroups)), D;
336
361
  }
337
- function ct(e, t) {
362
+ function dt(e, t, n) {
363
+ let o, i = {
364
+ x: 1 / 0,
365
+ y: 1 / 0
366
+ };
367
+ for (const s of t) {
368
+ const l = _e(n, s.rect);
369
+ switch (e) {
370
+ case "horizontal": {
371
+ l.x <= i.x && (o = s, i = l);
372
+ break;
373
+ }
374
+ case "vertical": {
375
+ l.y <= i.y && (o = s, i = l);
376
+ break;
377
+ }
378
+ }
379
+ }
380
+ return o ? {
381
+ distance: i,
382
+ hitRegion: o
383
+ } : void 0;
384
+ }
385
+ function pt(e) {
386
+ return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
387
+ }
388
+ function ht(e, t) {
389
+ if (e === t) throw new Error("Cannot compare node with itself");
390
+ const n = {
391
+ a: xe(e),
392
+ b: xe(t)
393
+ };
394
+ let o;
395
+ for (; n.a.at(-1) === n.b.at(-1); )
396
+ e = n.a.pop(), t = n.b.pop(), o = e;
397
+ b(
398
+ o,
399
+ "Stacking order can only be calculated for elements with a common ancestor"
400
+ );
401
+ const i = {
402
+ a: ve(Se(n.a)),
403
+ b: ve(Se(n.b))
404
+ };
405
+ if (i.a === i.b) {
406
+ const s = o.childNodes, l = {
407
+ a: n.a.at(-1),
408
+ b: n.b.at(-1)
409
+ };
410
+ let r = s.length;
411
+ for (; r--; ) {
412
+ const a = s[r];
413
+ if (a === l.a) return 1;
414
+ if (a === l.b) return -1;
415
+ }
416
+ }
417
+ return Math.sign(i.a - i.b);
418
+ }
419
+ const mt = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
420
+ function gt(e) {
421
+ const t = getComputedStyle(Ae(e) ?? e).display;
422
+ return t === "flex" || t === "inline-flex";
423
+ }
424
+ function yt(e) {
425
+ const t = getComputedStyle(e);
426
+ return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || gt(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || mt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
427
+ }
428
+ function Se(e) {
429
+ let t = e.length;
430
+ for (; t--; ) {
431
+ const n = e[t];
432
+ if (b(n, "Missing node"), yt(n)) return n;
433
+ }
434
+ return null;
435
+ }
436
+ function ve(e) {
437
+ return e && Number(getComputedStyle(e).zIndex) || 0;
438
+ }
439
+ function xe(e) {
440
+ const t = [];
441
+ for (; e; )
442
+ t.push(e), e = Ae(e);
443
+ return t;
444
+ }
445
+ function Ae(e) {
446
+ const { parentNode: t } = e;
447
+ return pt(t) ? t.host : t;
448
+ }
449
+ function St(e, t) {
450
+ return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
451
+ }
452
+ function vt({
453
+ groupElement: e,
454
+ hitRegion: t,
455
+ pointerEventTarget: n
456
+ }) {
457
+ if (!Te(n) || n.contains(e) || e.contains(n))
458
+ return !0;
459
+ if (ht(n, e) > 0) {
460
+ let o = n;
461
+ for (; o; ) {
462
+ if (o.contains(e))
463
+ return !0;
464
+ if (St(o.getBoundingClientRect(), t))
465
+ return !1;
466
+ o = o.parentElement;
467
+ }
468
+ }
469
+ return !0;
470
+ }
471
+ function fe(e, t) {
472
+ const n = [];
473
+ return t.forEach((o, i) => {
474
+ if (i.disabled)
475
+ return;
476
+ const s = Ne(i), l = dt(i.orientation, s, {
477
+ x: e.clientX,
478
+ y: e.clientY
479
+ });
480
+ l && l.distance.x <= 0 && l.distance.y <= 0 && vt({
481
+ groupElement: i.element,
482
+ hitRegion: l.hitRegion.rect,
483
+ pointerEventTarget: e.target
484
+ }) && n.push(l.hitRegion);
485
+ }), n;
486
+ }
487
+ function xt(e, t) {
338
488
  if (e.length !== t.length)
339
489
  return !1;
340
490
  for (let n = 0; n < e.length; n++)
@@ -345,14 +495,14 @@ function ct(e, t) {
345
495
  function Z(e, t) {
346
496
  return R(e, t) ? 0 : e > t ? 1 : -1;
347
497
  }
348
- function U({
498
+ function V({
349
499
  panelConstraints: e,
350
500
  size: t
351
501
  }) {
352
502
  const {
353
503
  collapsedSize: n = 0,
354
504
  collapsible: o,
355
- maxSize: r = 100,
505
+ maxSize: i = 100,
356
506
  minSize: s = 0
357
507
  } = e;
358
508
  if (Z(t, s) < 0)
@@ -361,152 +511,143 @@ function U({
361
511
  Z(t, l) < 0 ? t = n : t = s;
362
512
  } else
363
513
  t = s;
364
- return t = Math.min(r, t), t = D(t), t;
514
+ return t = Math.min(i, t), t = O(t), t;
365
515
  }
366
516
  function J({
367
517
  delta: e,
368
518
  initialLayout: t,
369
519
  panelConstraints: n,
370
520
  pivotIndices: o,
371
- prevLayout: r,
521
+ prevLayout: i,
372
522
  trigger: s
373
523
  }) {
374
524
  if (R(e, 0))
375
525
  return t;
376
- const l = Object.values(t), i = Object.values(r), a = [...l], [u, c] = o;
526
+ const l = Object.values(t), r = Object.values(i), a = [...l], [u, c] = o;
377
527
  b(u != null, "Invalid first pivot index"), b(c != null, "Invalid second pivot index");
378
- let h = 0;
528
+ let m = 0;
379
529
  if (s === "keyboard") {
380
530
  {
381
- const f = e < 0 ? c : u, d = n[f];
531
+ const f = e < 0 ? c : u, p = n[f];
382
532
  b(
383
- d,
533
+ p,
384
534
  `Panel constraints not found for index ${f}`
385
535
  );
386
536
  const {
387
- collapsedSize: m = 0,
388
- collapsible: S,
389
- minSize: x = 0
390
- } = d;
391
- if (S) {
392
- const v = l[f];
537
+ collapsedSize: d = 0,
538
+ collapsible: y,
539
+ minSize: v = 0
540
+ } = p;
541
+ if (y) {
542
+ const x = l[f];
393
543
  if (b(
394
- v != null,
544
+ x != null,
395
545
  `Previous layout not found for panel index ${f}`
396
- ), R(v, m)) {
397
- const y = x - v;
398
- Z(y, Math.abs(e)) > 0 && (e = e < 0 ? 0 - y : y);
546
+ ), R(x, d)) {
547
+ const S = v - x;
548
+ Z(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
399
549
  }
400
550
  }
401
551
  }
402
552
  {
403
- const f = e < 0 ? u : c, d = n[f];
553
+ const f = e < 0 ? u : c, p = n[f];
404
554
  b(
405
- d,
555
+ p,
406
556
  `No panel constraints found for index ${f}`
407
557
  );
408
558
  const {
409
- collapsedSize: m = 0,
410
- collapsible: S,
411
- minSize: x = 0
412
- } = d;
413
- if (S) {
414
- const v = l[f];
559
+ collapsedSize: d = 0,
560
+ collapsible: y,
561
+ minSize: v = 0
562
+ } = p;
563
+ if (y) {
564
+ const x = l[f];
415
565
  if (b(
416
- v != null,
566
+ x != null,
417
567
  `Previous layout not found for panel index ${f}`
418
- ), R(v, x)) {
419
- const y = v - m;
420
- Z(y, Math.abs(e)) > 0 && (e = e < 0 ? 0 - y : y);
568
+ ), R(x, v)) {
569
+ const S = x - d;
570
+ Z(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
421
571
  }
422
572
  }
423
573
  }
424
574
  }
425
575
  {
426
576
  const f = e < 0 ? 1 : -1;
427
- let d = e < 0 ? c : u, m = 0;
577
+ let p = e < 0 ? c : u, d = 0;
428
578
  for (; ; ) {
429
- const x = l[d];
579
+ const v = l[p];
430
580
  b(
431
- x != null,
432
- `Previous layout not found for panel index ${d}`
581
+ v != null,
582
+ `Previous layout not found for panel index ${p}`
433
583
  );
434
- const y = U({
435
- panelConstraints: n[d],
584
+ const S = V({
585
+ panelConstraints: n[p],
436
586
  size: 100
437
- }) - x;
438
- if (m += y, d += f, d < 0 || d >= n.length)
587
+ }) - v;
588
+ if (d += S, p += f, p < 0 || p >= n.length)
439
589
  break;
440
590
  }
441
- const S = Math.min(Math.abs(e), Math.abs(m));
442
- e = e < 0 ? 0 - S : S;
591
+ const y = Math.min(Math.abs(e), Math.abs(d));
592
+ e = e < 0 ? 0 - y : y;
443
593
  }
444
594
  {
445
- let d = e < 0 ? u : c;
446
- for (; d >= 0 && d < n.length; ) {
447
- const m = Math.abs(e) - Math.abs(h), S = l[d];
595
+ let p = e < 0 ? u : c;
596
+ for (; p >= 0 && p < n.length; ) {
597
+ const d = Math.abs(e) - Math.abs(m), y = l[p];
448
598
  b(
449
- S != null,
450
- `Previous layout not found for panel index ${d}`
599
+ y != null,
600
+ `Previous layout not found for panel index ${p}`
451
601
  );
452
- const x = S - m, v = U({
453
- panelConstraints: n[d],
454
- size: x
602
+ const v = y - d, x = V({
603
+ panelConstraints: n[p],
604
+ size: v
455
605
  });
456
- if (!R(S, v) && (h += S - v, a[d] = v, h.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
606
+ if (!R(y, x) && (m += y - x, a[p] = x, m.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
457
607
  numeric: !0
458
608
  }) >= 0))
459
609
  break;
460
- e < 0 ? d-- : d++;
610
+ e < 0 ? p-- : p++;
461
611
  }
462
612
  }
463
- if (ct(i, a))
464
- return r;
613
+ if (xt(r, a))
614
+ return i;
465
615
  {
466
- const f = e < 0 ? c : u, d = l[f];
616
+ const f = e < 0 ? c : u, p = l[f];
467
617
  b(
468
- d != null,
618
+ p != null,
469
619
  `Previous layout not found for panel index ${f}`
470
620
  );
471
- const m = d + h, S = U({
621
+ const d = p + m, y = V({
472
622
  panelConstraints: n[f],
473
- size: m
623
+ size: d
474
624
  });
475
- if (a[f] = S, !R(S, m)) {
476
- let x = m - S, y = e < 0 ? c : u;
477
- for (; y >= 0 && y < n.length; ) {
478
- const C = a[y];
625
+ if (a[f] = y, !R(y, d)) {
626
+ let v = d - y, S = e < 0 ? c : u;
627
+ for (; S >= 0 && S < n.length; ) {
628
+ const C = a[S];
479
629
  b(
480
630
  C != null,
481
- `Previous layout not found for panel index ${y}`
631
+ `Previous layout not found for panel index ${S}`
482
632
  );
483
- const w = C + x, P = U({
484
- panelConstraints: n[y],
485
- size: w
633
+ const L = C + v, P = V({
634
+ panelConstraints: n[S],
635
+ size: L
486
636
  });
487
- if (R(C, P) || (x -= P - C, a[y] = P), R(x, 0))
637
+ if (R(C, P) || (v -= P - C, a[S] = P), R(v, 0))
488
638
  break;
489
- e > 0 ? y-- : y++;
639
+ e > 0 ? S-- : S++;
490
640
  }
491
641
  }
492
642
  }
493
643
  const g = Object.values(a).reduce(
494
- (f, d) => d + f,
644
+ (f, p) => p + f,
495
645
  0
496
646
  );
497
647
  if (!R(g, 100, 0.1))
498
- return r;
499
- const p = Object.keys(r);
500
- return a.reduce((f, d, m) => (f[p[m]] = d, f), {});
501
- }
502
- function ie(e) {
503
- const { mountedGroups: t } = O();
504
- for (const [n] of t)
505
- if (n.separators.some(
506
- (o) => o.element === e
507
- ))
508
- return n;
509
- throw Error("Could not find parent Group for separator element");
648
+ return i;
649
+ const h = Object.keys(i);
650
+ return a.reduce((f, p, d) => (f[h[d]] = p, f), {});
510
651
  }
511
652
  function N(e, t) {
512
653
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -520,53 +661,196 @@ function A({
520
661
  layout: e,
521
662
  panelConstraints: t
522
663
  }) {
523
- const o = [...Object.values(e)], r = o.reduce(
524
- (i, a) => i + a,
664
+ const o = [...Object.values(e)], i = o.reduce(
665
+ (r, a) => r + a,
525
666
  0
526
667
  );
527
668
  if (o.length !== t.length)
528
669
  throw Error(
529
- `Invalid ${t.length} panel layout: ${o.map((i) => `${i}%`).join(", ")}`
670
+ `Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`
530
671
  );
531
- if (!R(r, 100) && o.length > 0)
532
- for (let i = 0; i < t.length; i++) {
533
- const a = o[i];
534
- b(a != null, `No layout data found for index ${i}`);
535
- const u = 100 / r * a;
536
- o[i] = u;
672
+ if (!R(i, 100) && o.length > 0)
673
+ for (let r = 0; r < t.length; r++) {
674
+ const a = o[r];
675
+ b(a != null, `No layout data found for index ${r}`);
676
+ const u = 100 / i * a;
677
+ o[r] = u;
537
678
  }
538
679
  let s = 0;
539
- for (let i = 0; i < t.length; i++) {
540
- const a = o[i];
541
- b(a != null, `No layout data found for index ${i}`);
542
- const u = U({
543
- panelConstraints: t[i],
680
+ for (let r = 0; r < t.length; r++) {
681
+ const a = o[r];
682
+ b(a != null, `No layout data found for index ${r}`);
683
+ const u = V({
684
+ panelConstraints: t[r],
544
685
  size: a
545
686
  });
546
- a != u && (s += a - u, o[i] = u);
687
+ a != u && (s += a - u, o[r] = u);
547
688
  }
548
689
  if (!R(s, 0))
549
- for (let i = 0; i < t.length; i++) {
550
- const a = o[i];
551
- b(a != null, `No layout data found for index ${i}`);
552
- const u = a + s, c = U({
553
- panelConstraints: t[i],
690
+ for (let r = 0; r < t.length; r++) {
691
+ const a = o[r];
692
+ b(a != null, `No layout data found for index ${r}`);
693
+ const u = a + s, c = V({
694
+ panelConstraints: t[r],
554
695
  size: u
555
696
  });
556
- if (a !== c && (s -= c - a, o[i] = c, R(s, 0)))
697
+ if (a !== c && (s -= c - a, o[r] = c, R(s, 0)))
557
698
  break;
558
699
  }
559
700
  const l = Object.keys(e);
560
- return o.reduce((i, a, u) => (i[l[u]] = a, i), {});
701
+ return o.reduce((r, a, u) => (r[l[u]] = a, r), {});
702
+ }
703
+ function Fe({
704
+ groupId: e,
705
+ panelId: t
706
+ }) {
707
+ const n = () => {
708
+ const { mountedGroups: r } = G();
709
+ for (const [
710
+ a,
711
+ {
712
+ defaultLayoutDeferred: u,
713
+ derivedPanelConstraints: c,
714
+ layout: m,
715
+ separatorToPanels: g
716
+ }
717
+ ] of r)
718
+ if (a.id === e)
719
+ return {
720
+ defaultLayoutDeferred: u,
721
+ derivedPanelConstraints: c,
722
+ group: a,
723
+ layout: m,
724
+ separatorToPanels: g
725
+ };
726
+ throw Error(`Group ${e} not found`);
727
+ }, o = () => {
728
+ const r = n().derivedPanelConstraints.find(
729
+ (a) => a.panelId === t
730
+ );
731
+ if (r !== void 0)
732
+ return r;
733
+ throw Error(`Panel constraints not found for Panel ${t}`);
734
+ }, i = () => {
735
+ const r = n().group.panels.find((a) => a.id === t);
736
+ if (r !== void 0)
737
+ return r;
738
+ throw Error(`Layout not found for Panel ${t}`);
739
+ }, s = () => {
740
+ const r = n().layout[t];
741
+ if (r !== void 0)
742
+ return r;
743
+ throw Error(`Layout not found for Panel ${t}`);
744
+ }, l = (r) => {
745
+ const a = s();
746
+ if (r === a)
747
+ return;
748
+ const {
749
+ defaultLayoutDeferred: u,
750
+ derivedPanelConstraints: c,
751
+ group: m,
752
+ layout: g,
753
+ separatorToPanels: h
754
+ } = n(), f = m.panels.findIndex((v) => v.id === t), p = f === m.panels.length - 1, d = J({
755
+ delta: p ? a - r : r - a,
756
+ initialLayout: g,
757
+ panelConstraints: c,
758
+ pivotIndices: p ? [f - 1, f] : [f, f + 1],
759
+ prevLayout: g,
760
+ trigger: "imperative-api"
761
+ }), y = A({
762
+ layout: d,
763
+ panelConstraints: c
764
+ });
765
+ N(g, y) || E((v) => ({
766
+ mountedGroups: new Map(v.mountedGroups).set(m, {
767
+ defaultLayoutDeferred: u,
768
+ derivedPanelConstraints: c,
769
+ layout: y,
770
+ separatorToPanels: h
771
+ })
772
+ }));
773
+ };
774
+ return {
775
+ collapse: () => {
776
+ const { collapsible: r, collapsedSize: a } = o(), { mutableValues: u } = i(), c = s();
777
+ r && c !== a && (u.expandToSize = c, l(a));
778
+ },
779
+ expand: () => {
780
+ const { collapsible: r, collapsedSize: a, minSize: u } = o(), { mutableValues: c } = i(), m = s();
781
+ if (r && m === a) {
782
+ let g = c.expandToSize ?? u;
783
+ g === 0 && (g = 1), l(g);
784
+ }
785
+ },
786
+ getSize: () => {
787
+ const { group: r } = n(), a = s(), { element: u } = i(), c = r.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
788
+ return {
789
+ asPercentage: a,
790
+ inPixels: c
791
+ };
792
+ },
793
+ isCollapsed: () => {
794
+ const { collapsible: r, collapsedSize: a } = o(), u = s();
795
+ return r && R(a, u);
796
+ },
797
+ resize: (r) => {
798
+ if (s() !== r) {
799
+ let u;
800
+ switch (typeof r) {
801
+ case "number": {
802
+ const { group: c } = n(), m = U({ group: c });
803
+ u = O(r / m * 100);
804
+ break;
805
+ }
806
+ case "string": {
807
+ u = parseFloat(r);
808
+ break;
809
+ }
810
+ }
811
+ l(u);
812
+ }
813
+ }
814
+ };
815
+ }
816
+ function ze(e) {
817
+ if (e.defaultPrevented)
818
+ return;
819
+ const { mountedGroups: t } = G(), n = fe(e, t), o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
820
+ n.forEach((s) => {
821
+ if (o.add(s.group), s.panels.forEach((l) => {
822
+ i.add(l);
823
+ }), s.separator) {
824
+ const l = s.panels.find(
825
+ (r) => r.panelConstraints.defaultSize !== void 0
826
+ );
827
+ if (l) {
828
+ const r = l.panelConstraints.defaultSize, a = Fe({
829
+ groupId: s.group.id,
830
+ panelId: l.id
831
+ });
832
+ a && r !== void 0 && (a.resize(r), e.preventDefault());
833
+ }
834
+ }
835
+ });
836
+ }
837
+ function re(e) {
838
+ const { mountedGroups: t } = G();
839
+ for (const [n] of t)
840
+ if (n.separators.some(
841
+ (o) => o.element === e
842
+ ))
843
+ return n;
844
+ throw Error("Could not find parent Group for separator element");
561
845
  }
562
- function Ne({
846
+ function $e({
563
847
  groupId: e
564
848
  }) {
565
849
  const t = () => {
566
- const { mountedGroups: n } = O();
567
- for (const [o, r] of n)
850
+ const { mountedGroups: n } = G();
851
+ for (const [o, i] of n)
568
852
  if (o.id === e)
569
- return { group: o, ...r };
853
+ return { group: o, ...i };
570
854
  throw Error(`Could not find Group with id "${e}"`);
571
855
  };
572
856
  return {
@@ -577,37 +861,37 @@ function Ne({
577
861
  setLayout(n) {
578
862
  const {
579
863
  defaultLayoutDeferred: o,
580
- derivedPanelConstraints: r,
864
+ derivedPanelConstraints: i,
581
865
  group: s,
582
866
  layout: l,
583
- separatorToPanels: i
867
+ separatorToPanels: r
584
868
  } = t(), a = A({
585
869
  layout: n,
586
- panelConstraints: r
870
+ panelConstraints: i
587
871
  });
588
872
  return o ? l : (N(l, a) || E((u) => ({
589
873
  mountedGroups: new Map(u.mountedGroups).set(s, {
590
874
  defaultLayoutDeferred: o,
591
- derivedPanelConstraints: r,
875
+ derivedPanelConstraints: i,
592
876
  layout: a,
593
- separatorToPanels: i
877
+ separatorToPanels: r
594
878
  })
595
879
  })), a);
596
880
  }
597
881
  };
598
882
  }
599
- function Ae(e) {
600
- const { mountedGroups: t } = O(), n = t.get(e);
883
+ function He(e) {
884
+ const { mountedGroups: t } = G(), n = t.get(e);
601
885
  return b(n, `Mounted Group ${e.id} not found`), n;
602
886
  }
603
887
  function T(e, t) {
604
- const n = ie(e), o = Ae(n), r = n.separators.find(
605
- (h) => h.element === e
888
+ const n = re(e), o = He(n), i = n.separators.find(
889
+ (m) => m.element === e
606
890
  );
607
- b(r, "Matching separator not found");
608
- const s = o.separatorToPanels.get(r);
891
+ b(i, "Matching separator not found");
892
+ const s = o.separatorToPanels.get(i);
609
893
  b(s, "Matching panels not found");
610
- const l = s.map((h) => n.panels.indexOf(h)), a = Ne({ groupId: n.id }).getLayout(), u = J({
894
+ const l = s.map((m) => n.panels.indexOf(m)), a = $e({ groupId: n.id }).getLayout(), u = J({
611
895
  delta: t,
612
896
  initialLayout: a,
613
897
  panelConstraints: o.derivedPanelConstraints,
@@ -618,8 +902,8 @@ function T(e, t) {
618
902
  layout: u,
619
903
  panelConstraints: o.derivedPanelConstraints
620
904
  });
621
- N(a, c) || E((h) => ({
622
- mountedGroups: new Map(h.mountedGroups).set(n, {
905
+ N(a, c) || E((m) => ({
906
+ mountedGroups: new Map(m.mountedGroups).set(n, {
623
907
  defaultLayoutDeferred: o.defaultLayoutDeferred,
624
908
  derivedPanelConstraints: o.derivedPanelConstraints,
625
909
  layout: c,
@@ -627,10 +911,10 @@ function T(e, t) {
627
911
  })
628
912
  }));
629
913
  }
630
- function ye(e) {
914
+ function be(e) {
631
915
  if (e.defaultPrevented)
632
916
  return;
633
- const t = e.currentTarget, n = ie(t);
917
+ const t = e.currentTarget, n = re(t);
634
918
  if (!n.disabled)
635
919
  switch (e.key) {
636
920
  case "ArrowDown": {
@@ -655,31 +939,31 @@ function ye(e) {
655
939
  }
656
940
  case "Enter": {
657
941
  e.preventDefault();
658
- const o = ie(t), { derivedPanelConstraints: r, layout: s, separatorToPanels: l } = Ae(o), i = o.separators.find(
659
- (h) => h.element === t
942
+ const o = re(t), { derivedPanelConstraints: i, layout: s, separatorToPanels: l } = He(o), r = o.separators.find(
943
+ (m) => m.element === t
660
944
  );
661
- b(i, "Matching separator not found");
662
- const a = l.get(i);
945
+ b(r, "Matching separator not found");
946
+ const a = l.get(r);
663
947
  b(a, "Matching panels not found");
664
- const u = a[0], c = r.find(
665
- (h) => h.panelId === u.id
948
+ const u = a[0], c = i.find(
949
+ (m) => m.panelId === u.id
666
950
  );
667
951
  if (b(c, "Panel metadata not found"), c.collapsible) {
668
- const h = s[u.id], g = c.collapsedSize === h ? o.inMemoryLastExpandedPanelSizes[u.id] ?? c.minSize : c.collapsedSize;
669
- T(t, g - h);
952
+ const m = s[u.id], g = c.collapsedSize === m ? o.inMemoryLastExpandedPanelSizes[u.id] ?? c.minSize : c.collapsedSize;
953
+ T(t, g - m);
670
954
  }
671
955
  break;
672
956
  }
673
957
  case "F6": {
674
958
  e.preventDefault();
675
- const r = ie(t).separators.map(
959
+ const i = re(t).separators.map(
676
960
  (a) => a.element
677
- ), s = Array.from(r).findIndex(
961
+ ), s = Array.from(i).findIndex(
678
962
  (a) => a === e.currentTarget
679
963
  );
680
964
  b(s !== null, "Index not found");
681
- const l = e.shiftKey ? s > 0 ? s - 1 : r.length - 1 : s + 1 < r.length ? s + 1 : 0;
682
- r[l].focus();
965
+ const l = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
966
+ i[l].focus();
683
967
  break;
684
968
  }
685
969
  case "Home": {
@@ -688,151 +972,17 @@ function ye(e) {
688
972
  }
689
973
  }
690
974
  }
691
- const ft = (e) => e, le = () => {
692
- }, Fe = 1, $e = 2, He = 4, je = 8, Se = 3, ve = 12, xe = {
693
- coarse: 10,
694
- precise: 5
695
- };
696
- function dt(e, t, n) {
697
- let o, r = {
698
- x: 1 / 0,
699
- y: 1 / 0
700
- };
701
- for (const s of t) {
702
- const l = Te(n, s.rect);
703
- switch (e) {
704
- case "horizontal": {
705
- l.x <= r.x && (o = s, r = l);
706
- break;
707
- }
708
- case "vertical": {
709
- l.y <= r.y && (o = s, r = l);
710
- break;
711
- }
712
- }
713
- }
714
- return o ? {
715
- distance: r,
716
- hitRegion: o
717
- } : void 0;
718
- }
719
- let re;
720
- function pt() {
721
- return re === void 0 && (typeof matchMedia == "function" ? re = !!matchMedia("(pointer:coarse)").matches : re = !1), re;
722
- }
723
- function ht(e) {
724
- return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
725
- }
726
- function mt(e, t) {
727
- if (e === t) throw new Error("Cannot compare node with itself");
728
- const n = {
729
- a: Le(e),
730
- b: Le(t)
731
- };
732
- let o;
733
- for (; n.a.at(-1) === n.b.at(-1); )
734
- e = n.a.pop(), t = n.b.pop(), o = e;
735
- b(
736
- o,
737
- "Stacking order can only be calculated for elements with a common ancestor"
738
- );
739
- const r = {
740
- a: be(ze(n.a)),
741
- b: be(ze(n.b))
742
- };
743
- if (r.a === r.b) {
744
- const s = o.childNodes, l = {
745
- a: n.a.at(-1),
746
- b: n.b.at(-1)
747
- };
748
- let i = s.length;
749
- for (; i--; ) {
750
- const a = s[i];
751
- if (a === l.a) return 1;
752
- if (a === l.b) return -1;
753
- }
754
- }
755
- return Math.sign(r.a - r.b);
756
- }
757
- const gt = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
758
- function yt(e) {
759
- const t = getComputedStyle(Ue(e) ?? e).display;
760
- return t === "flex" || t === "inline-flex";
761
- }
762
- function St(e) {
763
- const t = getComputedStyle(e);
764
- return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || yt(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || gt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
765
- }
766
- function ze(e) {
767
- let t = e.length;
768
- for (; t--; ) {
769
- const n = e[t];
770
- if (b(n, "Missing node"), St(n)) return n;
771
- }
772
- return null;
773
- }
774
- function be(e) {
775
- return e && Number(getComputedStyle(e).zIndex) || 0;
776
- }
777
- function Le(e) {
778
- const t = [];
779
- for (; e; )
780
- t.push(e), e = Ue(e);
781
- return t;
782
- }
783
- function Ue(e) {
784
- const { parentNode: t } = e;
785
- return ht(t) ? t.host : t;
786
- }
787
- function vt(e, t) {
788
- return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
789
- }
790
- function xt({
791
- groupElement: e,
792
- hitRegion: t,
793
- pointerEventTarget: n
794
- }) {
795
- if (!De(n) || n.contains(e) || e.contains(n))
796
- return !0;
797
- if (mt(n, e) > 0) {
798
- let o = n;
799
- for (; o; ) {
800
- if (o.contains(e))
801
- return !0;
802
- if (vt(o.getBoundingClientRect(), t))
803
- return !1;
804
- o = o.parentElement;
805
- }
806
- }
807
- return !0;
808
- }
809
- function Ve(e, t) {
810
- const n = [];
811
- return t.forEach((o, r) => {
812
- if (r.disabled)
813
- return;
814
- const s = pt() ? xe.coarse : xe.precise, l = _e(r), i = dt(r.orientation, l, {
815
- x: e.clientX,
816
- y: e.clientY
817
- });
818
- i && i.distance.x <= s && i.distance.y <= s && xt({
819
- groupElement: r.element,
820
- hitRegion: i.hitRegion.rect,
821
- pointerEventTarget: e.target
822
- }) && n.push(i.hitRegion);
823
- }), n;
824
- }
825
975
  function we(e) {
826
976
  if (e.defaultPrevented)
827
977
  return;
828
978
  if (e.pointerType === "mouse" && e.button > 0)
829
979
  return;
830
- const { mountedGroups: t } = O(), n = Ve(e, t), o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
831
- let i = !1;
980
+ const { mountedGroups: t } = G(), n = fe(e, t), o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
981
+ let r = !1;
832
982
  n.forEach((a) => {
833
983
  o.add(a.group), a.panels.forEach((c) => {
834
- r.add(c);
835
- }), a.separator && (s.add(a.separator), i || (i = !0, a.separator.element.focus()));
984
+ i.add(c);
985
+ }), a.separator && (s.add(a.separator), r || (r = !0, a.separator.element.focus()));
836
986
  const u = t.get(a.group);
837
987
  u && l.set(a.group, u.layout);
838
988
  }), E({
@@ -844,12 +994,14 @@ function we(e) {
844
994
  }
845
995
  }), n.length && e.preventDefault();
846
996
  }
847
- function zt({
997
+ const zt = (e) => e, le = () => {
998
+ }, je = 1, Ve = 2, Ue = 4, We = 8, Le = 3, Ce = 12;
999
+ function bt({
848
1000
  cursorFlags: e,
849
1001
  groups: t,
850
1002
  state: n
851
1003
  }) {
852
- let o = 0, r = 0;
1004
+ let o = 0, i = 0;
853
1005
  switch (n) {
854
1006
  case "active":
855
1007
  case "hover":
@@ -861,23 +1013,23 @@ function zt({
861
1013
  break;
862
1014
  }
863
1015
  case "vertical": {
864
- r++;
1016
+ i++;
865
1017
  break;
866
1018
  }
867
1019
  }
868
1020
  });
869
1021
  }
870
- if (o === 0 && r === 0)
1022
+ if (o === 0 && i === 0)
871
1023
  return null;
872
1024
  switch (n) {
873
1025
  case "active": {
874
- const s = (e & Fe) !== 0, l = (e & $e) !== 0, i = (e & He) !== 0, a = (e & je) !== 0;
1026
+ const s = (e & je) !== 0, l = (e & Ve) !== 0, r = (e & Ue) !== 0, a = (e & We) !== 0;
875
1027
  if (e) {
876
1028
  if (s)
877
- return i ? "se-resize" : a ? "ne-resize" : "e-resize";
1029
+ return r ? "se-resize" : a ? "ne-resize" : "e-resize";
878
1030
  if (l)
879
- return i ? "sw-resize" : a ? "nw-resize" : "w-resize";
880
- if (i)
1031
+ return r ? "sw-resize" : a ? "nw-resize" : "w-resize";
1032
+ if (r)
881
1033
  return "s-resize";
882
1034
  if (a)
883
1035
  return "n-resize";
@@ -885,23 +1037,23 @@ function zt({
885
1037
  break;
886
1038
  }
887
1039
  }
888
- return o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize";
1040
+ return o > 0 && i > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize";
889
1041
  }
890
- const Ce = /* @__PURE__ */ new WeakMap();
891
- function fe(e) {
1042
+ const Pe = /* @__PURE__ */ new WeakMap();
1043
+ function de(e) {
892
1044
  if (e.defaultView === null || e.defaultView === void 0)
893
1045
  return;
894
- let { prevStyle: t, styleSheet: n } = Ce.get(e) ?? {};
895
- n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets = [n]);
896
- const { cursorFlags: o, interactionState: r } = O();
897
- switch (r.state) {
1046
+ let { prevStyle: t, styleSheet: n } = Pe.get(e) ?? {};
1047
+ n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets.push(n));
1048
+ const { cursorFlags: o, interactionState: i } = G();
1049
+ switch (i.state) {
898
1050
  case "active":
899
1051
  case "hover": {
900
- const s = zt({
1052
+ const s = bt({
901
1053
  cursorFlags: o,
902
- groups: r.hitRegions.map((i) => i.group),
903
- state: r.state
904
- }), l = `*{cursor: ${s} !important; ${r.state === "active" ? "touch-action: none;" : ""} }`;
1054
+ groups: i.hitRegions.map((r) => r.group),
1055
+ state: i.state
1056
+ }), l = `*{cursor: ${s} !important; ${i.state === "active" ? "touch-action: none;" : ""} }`;
905
1057
  if (t === l)
906
1058
  return;
907
1059
  t = l, s ? n.cssRules.length === 0 ? n.insertRule(l) : n.replaceSync(l) : n.cssRules.length === 1 && n.deleteRule(0);
@@ -912,76 +1064,76 @@ function fe(e) {
912
1064
  break;
913
1065
  }
914
1066
  }
915
- Ce.set(e, {
1067
+ Pe.set(e, {
916
1068
  prevStyle: t,
917
1069
  styleSheet: n
918
1070
  });
919
1071
  }
920
- function We({
1072
+ function Be({
921
1073
  document: e,
922
1074
  event: t,
923
1075
  hitRegions: n,
924
1076
  initialLayoutMap: o,
925
- mountedGroups: r,
1077
+ mountedGroups: i,
926
1078
  pointerDownAtPoint: s,
927
1079
  prevCursorFlags: l
928
1080
  }) {
929
- let i = 0;
930
- const a = new Map(r);
1081
+ let r = 0;
1082
+ const a = new Map(i);
931
1083
  n.forEach((c) => {
932
- const { group: h, groupSize: g } = c, { disableCursor: p, orientation: f, panels: d } = h;
933
- let m = 0;
934
- s ? f === "horizontal" ? m = (t.clientX - s.x) / g * 100 : m = (t.clientY - s.y) / g * 100 : f === "horizontal" ? m = t.clientX < 0 ? -100 : 100 : m = t.clientY < 0 ? -100 : 100;
935
- const S = o.get(h), {
936
- defaultLayoutDeferred: x,
937
- derivedPanelConstraints: v,
938
- layout: y,
1084
+ const { group: m, groupSize: g } = c, { disableCursor: h, orientation: f, panels: p } = m;
1085
+ let d = 0;
1086
+ s ? f === "horizontal" ? d = (t.clientX - s.x) / g * 100 : d = (t.clientY - s.y) / g * 100 : f === "horizontal" ? d = t.clientX < 0 ? -100 : 100 : d = t.clientY < 0 ? -100 : 100;
1087
+ const y = o.get(m), {
1088
+ defaultLayoutDeferred: v,
1089
+ derivedPanelConstraints: x,
1090
+ layout: S,
939
1091
  separatorToPanels: C
940
- } = r.get(h) ?? { defaultLayoutDeferred: !1 };
941
- if (v && S && y && C) {
942
- const w = J({
943
- delta: m,
944
- initialLayout: S,
945
- panelConstraints: v,
946
- pivotIndices: c.panels.map((P) => d.indexOf(P)),
947
- prevLayout: y,
1092
+ } = i.get(m) ?? { defaultLayoutDeferred: !1 };
1093
+ if (x && y && S && C) {
1094
+ const L = J({
1095
+ delta: d,
1096
+ initialLayout: y,
1097
+ panelConstraints: x,
1098
+ pivotIndices: c.panels.map((P) => p.indexOf(P)),
1099
+ prevLayout: S,
948
1100
  trigger: "mouse-or-touch"
949
1101
  });
950
- if (N(w, y)) {
951
- if (m !== 0 && !p)
1102
+ if (N(L, S)) {
1103
+ if (d !== 0 && !h)
952
1104
  switch (f) {
953
1105
  case "horizontal": {
954
- i |= m < 0 ? Fe : $e;
1106
+ r |= d < 0 ? je : Ve;
955
1107
  break;
956
1108
  }
957
1109
  case "vertical": {
958
- i |= m < 0 ? He : je;
1110
+ r |= d < 0 ? Ue : We;
959
1111
  break;
960
1112
  }
961
1113
  }
962
1114
  } else {
963
1115
  a.set(c.group, {
964
- defaultLayoutDeferred: x,
965
- derivedPanelConstraints: v,
966
- layout: w,
1116
+ defaultLayoutDeferred: v,
1117
+ derivedPanelConstraints: x,
1118
+ layout: L,
967
1119
  separatorToPanels: C
968
1120
  });
969
- const P = c.group.panels.map(({ id: G }) => G).join(",");
970
- c.group.inMemoryLayouts[P] = w;
1121
+ const P = c.group.panels.map(({ id: I }) => I).join(",");
1122
+ c.group.inMemoryLayouts[P] = L;
971
1123
  }
972
1124
  }
973
1125
  });
974
1126
  let u = 0;
975
- t.movementX === 0 ? u |= l & Se : u |= i & Se, t.movementY === 0 ? u |= l & ve : u |= i & ve, E({
1127
+ t.movementX === 0 ? u |= l & Le : u |= r & Le, t.movementY === 0 ? u |= l & Ce : u |= r & Ce, E({
976
1128
  cursorFlags: u,
977
1129
  mountedGroups: a
978
- }), fe(e);
1130
+ }), de(e);
979
1131
  }
980
- function Pe(e) {
981
- const { cursorFlags: t, interactionState: n, mountedGroups: o } = O();
1132
+ function Re(e) {
1133
+ const { cursorFlags: t, interactionState: n, mountedGroups: o } = G();
982
1134
  switch (n.state) {
983
1135
  case "active":
984
- We({
1136
+ Be({
985
1137
  document: e.currentTarget,
986
1138
  event: e,
987
1139
  hitRegions: n.hitRegions,
@@ -991,10 +1143,10 @@ function Pe(e) {
991
1143
  });
992
1144
  }
993
1145
  }
994
- function Re(e) {
1146
+ function Me(e) {
995
1147
  if (e.defaultPrevented)
996
1148
  return;
997
- const { cursorFlags: t, interactionState: n, mountedGroups: o } = O();
1149
+ const { cursorFlags: t, interactionState: n, mountedGroups: o } = G();
998
1150
  switch (n.state) {
999
1151
  case "active": {
1000
1152
  if (
@@ -1002,16 +1154,16 @@ function Re(e) {
1002
1154
  e.buttons === 0
1003
1155
  ) {
1004
1156
  E(
1005
- (r) => r.interactionState.state === "inactive" ? r : {
1157
+ (i) => i.interactionState.state === "inactive" ? i : {
1006
1158
  cursorFlags: 0,
1007
1159
  interactionState: { state: "inactive" }
1008
1160
  }
1009
- ), E((r) => ({
1010
- mountedGroups: new Map(r.mountedGroups)
1161
+ ), E((i) => ({
1162
+ mountedGroups: new Map(i.mountedGroups)
1011
1163
  }));
1012
1164
  return;
1013
1165
  }
1014
- We({
1166
+ Be({
1015
1167
  document: e.currentTarget,
1016
1168
  event: e,
1017
1169
  hitRegions: n.hitRegions,
@@ -1023,27 +1175,27 @@ function Re(e) {
1023
1175
  break;
1024
1176
  }
1025
1177
  default: {
1026
- const r = Ve(e, o);
1027
- r.length === 0 ? n.state !== "inactive" && E({
1178
+ const i = fe(e, o);
1179
+ i.length === 0 ? n.state !== "inactive" && E({
1028
1180
  interactionState: {
1029
1181
  state: "inactive"
1030
1182
  }
1031
1183
  }) : E({
1032
1184
  interactionState: {
1033
- hitRegions: r,
1185
+ hitRegions: i,
1034
1186
  state: "hover"
1035
1187
  }
1036
- }), fe(e.currentTarget);
1188
+ }), de(e.currentTarget);
1037
1189
  break;
1038
1190
  }
1039
1191
  }
1040
1192
  }
1041
- function Me(e) {
1193
+ function Ee(e) {
1042
1194
  if (e.defaultPrevented)
1043
1195
  return;
1044
1196
  if (e.pointerType === "mouse" && e.button > 0)
1045
1197
  return;
1046
- const { interactionState: t } = O();
1198
+ const { interactionState: t } = G();
1047
1199
  switch (t.state) {
1048
1200
  case "active":
1049
1201
  E({
@@ -1051,40 +1203,40 @@ function Me(e) {
1051
1203
  interactionState: {
1052
1204
  state: "inactive"
1053
1205
  }
1054
- }), t.hitRegions.length > 0 && (fe(e.currentTarget), E((n) => ({
1206
+ }), t.hitRegions.length > 0 && (de(e.currentTarget), E((n) => ({
1055
1207
  mountedGroups: new Map(n.mountedGroups)
1056
1208
  })), e.preventDefault());
1057
1209
  }
1058
1210
  }
1059
- function Ee(e) {
1211
+ function ke(e) {
1060
1212
  let t = 0, n = 0;
1061
1213
  const o = {};
1062
1214
  for (const s of e)
1063
1215
  if (s.defaultSize !== void 0) {
1064
1216
  t++;
1065
- const l = D(s.defaultSize);
1217
+ const l = O(s.defaultSize);
1066
1218
  n += l, o[s.panelId] = l;
1067
1219
  } else
1068
1220
  o[s.panelId] = void 0;
1069
- const r = e.length - t;
1070
- if (r !== 0) {
1071
- const s = D((100 - n) / r);
1221
+ const i = e.length - t;
1222
+ if (i !== 0) {
1223
+ const s = O((100 - n) / i);
1072
1224
  for (const l of e)
1073
1225
  l.defaultSize === void 0 && (o[l.panelId] = s);
1074
1226
  }
1075
1227
  return o;
1076
1228
  }
1077
- function bt(e, t, n) {
1229
+ function wt(e, t, n) {
1078
1230
  if (!n[0])
1079
1231
  return;
1080
- const r = e.panels.find((u) => u.element === t);
1081
- if (!r || !r.onResize)
1232
+ const i = e.panels.find((u) => u.element === t);
1233
+ if (!i || !i.onResize)
1082
1234
  return;
1083
- const s = V({ group: e }), l = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, i = r.mutableValues.prevSize, a = {
1084
- asPercentage: D(l / s * 100),
1235
+ const s = U({ group: e }), l = e.orientation === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r = i.mutableValues.prevSize, a = {
1236
+ asPercentage: O(l / s * 100),
1085
1237
  inPixels: l
1086
1238
  };
1087
- r.mutableValues.prevSize = a, r.onResize(a, r.id, i);
1239
+ i.mutableValues.prevSize = a, i.onResize(a, i.id, r);
1088
1240
  }
1089
1241
  function Lt(e, t) {
1090
1242
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -1094,53 +1246,53 @@ function Lt(e, t) {
1094
1246
  return !1;
1095
1247
  return !0;
1096
1248
  }
1097
- function wt(e, t) {
1098
- const n = e.map((r) => r.id), o = Object.keys(t);
1249
+ function Ct(e, t) {
1250
+ const n = e.map((i) => i.id), o = Object.keys(t);
1099
1251
  if (n.length !== o.length)
1100
1252
  return !1;
1101
- for (const r of n)
1102
- if (!o.includes(r))
1253
+ for (const i of n)
1254
+ if (!o.includes(i))
1103
1255
  return !1;
1104
1256
  return !0;
1105
1257
  }
1106
1258
  const j = /* @__PURE__ */ new Map();
1107
- function Ct(e) {
1259
+ function Pt(e) {
1108
1260
  let t = !0;
1109
1261
  b(
1110
1262
  e.element.ownerDocument.defaultView,
1111
1263
  "Cannot register an unmounted Group"
1112
1264
  );
1113
- const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = new n((f) => {
1114
- for (const d of f) {
1115
- const { borderBoxSize: m, target: S } = d;
1116
- if (S === e.element) {
1265
+ const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = new n((f) => {
1266
+ for (const p of f) {
1267
+ const { borderBoxSize: d, target: y } = p;
1268
+ if (y === e.element) {
1117
1269
  if (t) {
1118
- if (V({ group: e }) === 0)
1270
+ if (U({ group: e }) === 0)
1119
1271
  return;
1120
- E((v) => {
1121
- const y = v.mountedGroups.get(e);
1122
- if (y) {
1123
- const C = ge(e), w = y.defaultLayoutDeferred ? Ee(C) : y.layout, P = A({
1124
- layout: w,
1272
+ E((x) => {
1273
+ const S = x.mountedGroups.get(e);
1274
+ if (S) {
1275
+ const C = ye(e), L = S.defaultLayoutDeferred ? ke(C) : S.layout, P = A({
1276
+ layout: L,
1125
1277
  panelConstraints: C
1126
1278
  });
1127
- return !y.defaultLayoutDeferred && N(w, P) && Lt(
1128
- y.derivedPanelConstraints,
1279
+ return !S.defaultLayoutDeferred && N(L, P) && Lt(
1280
+ S.derivedPanelConstraints,
1129
1281
  C
1130
- ) ? v : {
1131
- mountedGroups: new Map(v.mountedGroups).set(e, {
1282
+ ) ? x : {
1283
+ mountedGroups: new Map(x.mountedGroups).set(e, {
1132
1284
  defaultLayoutDeferred: !1,
1133
1285
  derivedPanelConstraints: C,
1134
1286
  layout: P,
1135
- separatorToPanels: y.separatorToPanels
1287
+ separatorToPanels: S.separatorToPanels
1136
1288
  })
1137
1289
  };
1138
1290
  }
1139
- return v;
1291
+ return x;
1140
1292
  });
1141
1293
  }
1142
1294
  } else
1143
- bt(e, S, m);
1295
+ wt(e, y, d);
1144
1296
  }
1145
1297
  });
1146
1298
  s.observe(e.element), e.panels.forEach((f) => {
@@ -1149,58 +1301,62 @@ function Ct(e) {
1149
1301
  `Panel ids must be unique; id "${f.id}" was used more than once`
1150
1302
  ), o.add(f.id), f.onResize && s.observe(f.element);
1151
1303
  });
1152
- const l = V({ group: e }), i = ge(e), a = e.panels.map(({ id: f }) => f).join(",");
1304
+ const l = U({ group: e }), r = ye(e), a = e.panels.map(({ id: f }) => f).join(",");
1153
1305
  let u = e.defaultLayout;
1154
- u && (wt(e.panels, u) || (u = void 0));
1155
- const c = e.inMemoryLayouts[a] ?? u ?? Ee(i), h = A({
1306
+ u && (Ct(e.panels, u) || (u = void 0));
1307
+ const c = e.inMemoryLayouts[a] ?? u ?? ke(r), m = A({
1156
1308
  layout: c,
1157
- panelConstraints: i
1158
- }), g = _e(e), p = e.element.ownerDocument;
1309
+ panelConstraints: r
1310
+ }), g = Ne(e), h = e.element.ownerDocument;
1159
1311
  return E((f) => {
1160
- const d = /* @__PURE__ */ new Map();
1312
+ const p = /* @__PURE__ */ new Map();
1161
1313
  return j.set(
1162
- p,
1163
- (j.get(p) ?? 0) + 1
1164
- ), g.forEach((m) => {
1165
- m.separator && d.set(m.separator, m.panels);
1314
+ h,
1315
+ (j.get(h) ?? 0) + 1
1316
+ ), g.forEach((d) => {
1317
+ d.separator && p.set(d.separator, d.panels);
1166
1318
  }), {
1167
1319
  mountedGroups: new Map(f.mountedGroups).set(e, {
1168
1320
  defaultLayoutDeferred: l === 0,
1169
- derivedPanelConstraints: i,
1170
- layout: h,
1171
- separatorToPanels: d
1321
+ derivedPanelConstraints: r,
1322
+ layout: m,
1323
+ separatorToPanels: p
1172
1324
  })
1173
1325
  };
1174
1326
  }), e.separators.forEach((f) => {
1175
1327
  b(
1176
- !r.has(f.id),
1328
+ !i.has(f.id),
1177
1329
  `Separator ids must be unique; id "${f.id}" was used more than once`
1178
- ), r.add(f.id), f.element.addEventListener("keydown", ye);
1179
- }), j.get(p) === 1 && (p.addEventListener("pointerdown", we, !0), p.addEventListener("pointerleave", Pe), p.addEventListener("pointermove", Re), p.addEventListener("pointerup", Me, !0)), function() {
1330
+ ), i.add(f.id), f.element.addEventListener("keydown", be);
1331
+ }), j.get(h) === 1 && (h.addEventListener("dblclick", ze, !0), h.addEventListener("pointerdown", we, !0), h.addEventListener("pointerleave", Re), h.addEventListener("pointermove", Me), h.addEventListener("pointerup", Ee, !0)), function() {
1180
1332
  t = !1, j.set(
1181
- p,
1182
- Math.max(0, (j.get(p) ?? 0) - 1)
1183
- ), E((d) => {
1184
- const m = new Map(d.mountedGroups);
1185
- return m.delete(e), { mountedGroups: m };
1186
- }), e.separators.forEach((d) => {
1187
- d.element.removeEventListener("keydown", ye);
1188
- }), j.get(p) || (p.removeEventListener(
1333
+ h,
1334
+ Math.max(0, (j.get(h) ?? 0) - 1)
1335
+ ), E((p) => {
1336
+ const d = new Map(p.mountedGroups);
1337
+ return d.delete(e), { mountedGroups: d };
1338
+ }), e.separators.forEach((p) => {
1339
+ p.element.removeEventListener("keydown", be);
1340
+ }), j.get(h) || (h.removeEventListener(
1341
+ "dblclick",
1342
+ ze,
1343
+ !0
1344
+ ), h.removeEventListener(
1189
1345
  "pointerdown",
1190
1346
  we,
1191
1347
  !0
1192
- ), p.removeEventListener("pointerleave", Pe), p.removeEventListener("pointermove", Re), p.removeEventListener("pointerup", Me, !0)), s.disconnect();
1348
+ ), h.removeEventListener("pointerleave", Re), h.removeEventListener("pointermove", Me), h.removeEventListener("pointerup", Ee, !0)), s.disconnect();
1193
1349
  };
1194
1350
  }
1195
- function Be() {
1351
+ function Ke() {
1196
1352
  const [e, t] = Y({}), n = K(() => t({}), []);
1197
1353
  return [e, n];
1198
1354
  }
1199
- function de(e) {
1200
- const t = Ze();
1355
+ function pe(e) {
1356
+ const t = Je();
1201
1357
  return `${e ?? t}`;
1202
1358
  }
1203
- const F = typeof window < "u" ? ke : Ge;
1359
+ const F = typeof window < "u" ? Ge : Ie;
1204
1360
  function X(e) {
1205
1361
  const t = k(e);
1206
1362
  return F(() => {
@@ -1210,7 +1366,7 @@ function X(e) {
1210
1366
  [t]
1211
1367
  );
1212
1368
  }
1213
- function pe(...e) {
1369
+ function he(...e) {
1214
1370
  return X((t) => {
1215
1371
  e.forEach((n) => {
1216
1372
  if (n)
@@ -1227,58 +1383,58 @@ function pe(...e) {
1227
1383
  });
1228
1384
  });
1229
1385
  }
1230
- function Pt(e) {
1386
+ function Rt(e) {
1231
1387
  const t = k({ ...e });
1232
1388
  return F(() => {
1233
1389
  for (const n in e)
1234
1390
  t.current[n] = e[n];
1235
1391
  }, [e]), t.current;
1236
1392
  }
1237
- const Ke = Je(null);
1238
- function Rt(e, t) {
1393
+ const Xe = Qe(null);
1394
+ function Mt(e, t) {
1239
1395
  const n = k({
1240
1396
  getLayout: () => ({}),
1241
- setLayout: ft
1397
+ setLayout: zt
1242
1398
  });
1243
- Ie(t, () => n.current, []), F(() => {
1399
+ De(t, () => n.current, []), F(() => {
1244
1400
  Object.assign(
1245
1401
  n.current,
1246
- Ne({ groupId: e })
1402
+ $e({ groupId: e })
1247
1403
  );
1248
1404
  });
1249
1405
  }
1250
- function Mt({
1406
+ function Et({
1251
1407
  children: e,
1252
1408
  className: t,
1253
1409
  defaultLayout: n,
1254
1410
  disableCursor: o,
1255
- disabled: r,
1411
+ disabled: i,
1256
1412
  elementRef: s,
1257
1413
  groupRef: l,
1258
- id: i,
1414
+ id: r,
1259
1415
  onLayoutChange: a,
1260
1416
  onLayoutChanged: u,
1261
1417
  orientation: c = "horizontal",
1262
- style: h,
1418
+ style: m,
1263
1419
  ...g
1264
1420
  }) {
1265
- const p = k({
1421
+ const h = k({
1266
1422
  onLayoutChange: {},
1267
1423
  onLayoutChanged: {}
1268
1424
  }), f = X((z) => {
1269
- N(p.current.onLayoutChange, z) || (p.current.onLayoutChange = z, a?.(z));
1270
- }), d = X((z) => {
1271
- N(p.current.onLayoutChanged, z) || (p.current.onLayoutChanged = z, u?.(z));
1272
- }), m = de(i), S = k(null), [x, v] = Be(), y = k({
1425
+ N(h.current.onLayoutChange, z) || (h.current.onLayoutChange = z, a?.(z));
1426
+ }), p = X((z) => {
1427
+ N(h.current.onLayoutChanged, z) || (h.current.onLayoutChanged = z, u?.(z));
1428
+ }), d = pe(r), y = k(null), [v, x] = Ke(), S = k({
1273
1429
  lastExpandedPanelSizes: {},
1274
1430
  layouts: {},
1275
1431
  panels: [],
1276
1432
  separators: []
1277
- }), C = pe(S, s);
1278
- Rt(m, l);
1279
- const w = X(
1280
- (z, L) => {
1281
- const { interactionState: M, mountedGroups: H } = O();
1433
+ }), C = he(y, s);
1434
+ Mt(d, l);
1435
+ const L = X(
1436
+ (z, w) => {
1437
+ const { interactionState: M, mountedGroups: H } = G();
1282
1438
  for (const Q of H.keys())
1283
1439
  if (Q.id === z) {
1284
1440
  const W = H.get(Q);
@@ -1293,76 +1449,76 @@ function Mt({
1293
1449
  }
1294
1450
  }
1295
1451
  return {
1296
- flexGrow: W.layout[L] ?? 1,
1452
+ flexGrow: W.layout[w] ?? 1,
1297
1453
  pointerEvents: ee ? "none" : void 0
1298
1454
  };
1299
1455
  }
1300
1456
  }
1301
1457
  return {
1302
- flexGrow: n?.[L] ?? 1
1458
+ flexGrow: n?.[w] ?? 1
1303
1459
  };
1304
1460
  }
1305
1461
  ), P = Oe(
1306
1462
  () => ({
1307
- getPanelStyles: w,
1308
- id: m,
1463
+ getPanelStyles: L,
1464
+ id: d,
1309
1465
  orientation: c,
1310
1466
  registerPanel: (z) => {
1311
- const L = y.current;
1312
- return L.panels = ce(c, [
1313
- ...L.panels,
1467
+ const w = S.current;
1468
+ return w.panels = ce(c, [
1469
+ ...w.panels,
1314
1470
  z
1315
- ]), v(), () => {
1316
- L.panels = L.panels.filter(
1471
+ ]), x(), () => {
1472
+ w.panels = w.panels.filter(
1317
1473
  (M) => M !== z
1318
- ), v();
1474
+ ), x();
1319
1475
  };
1320
1476
  },
1321
1477
  registerSeparator: (z) => {
1322
- const L = y.current;
1323
- return L.separators = ce(c, [
1324
- ...L.separators,
1478
+ const w = S.current;
1479
+ return w.separators = ce(c, [
1480
+ ...w.separators,
1325
1481
  z
1326
- ]), v(), () => {
1327
- L.separators = L.separators.filter(
1482
+ ]), x(), () => {
1483
+ w.separators = w.separators.filter(
1328
1484
  (M) => M !== z
1329
- ), v();
1485
+ ), x();
1330
1486
  };
1331
1487
  }
1332
1488
  }),
1333
- [w, m, v, c]
1334
- ), G = Pt({
1489
+ [L, d, x, c]
1490
+ ), I = Rt({
1335
1491
  defaultLayout: n,
1336
1492
  disableCursor: o
1337
1493
  }), $ = k(null);
1338
1494
  return F(() => {
1339
- const z = S.current;
1495
+ const z = y.current;
1340
1496
  if (z === null)
1341
1497
  return;
1342
- const L = y.current, M = {
1343
- defaultLayout: G.defaultLayout,
1344
- disableCursor: !!G.disableCursor,
1345
- disabled: !!r,
1498
+ const w = S.current, M = {
1499
+ defaultLayout: I.defaultLayout,
1500
+ disableCursor: !!I.disableCursor,
1501
+ disabled: !!i,
1346
1502
  element: z,
1347
- id: m,
1348
- inMemoryLastExpandedPanelSizes: y.current.lastExpandedPanelSizes,
1349
- inMemoryLayouts: y.current.layouts,
1503
+ id: d,
1504
+ inMemoryLastExpandedPanelSizes: S.current.lastExpandedPanelSizes,
1505
+ inMemoryLayouts: S.current.layouts,
1350
1506
  orientation: c,
1351
- panels: L.panels,
1352
- separators: L.separators
1507
+ panels: w.panels,
1508
+ separators: w.separators
1353
1509
  };
1354
1510
  $.current = M;
1355
- const H = Ct(M), W = O().mountedGroups.get(M);
1511
+ const H = Pt(M), W = G().mountedGroups.get(M);
1356
1512
  if (W) {
1357
1513
  const { defaultLayoutDeferred: B, derivedPanelConstraints: te, layout: ne } = W;
1358
- !B && te.length > 0 && (f(ne), d(ne), L.panels.forEach((ae) => {
1514
+ !B && te.length > 0 && (f(ne), p(ne), w.panels.forEach((ae) => {
1359
1515
  ae.scheduleUpdate();
1360
1516
  }));
1361
1517
  }
1362
1518
  const ee = _.addListener(
1363
1519
  "interactionStateChange",
1364
1520
  () => {
1365
- L.panels.forEach((B) => {
1521
+ w.panels.forEach((B) => {
1366
1522
  B.scheduleUpdate();
1367
1523
  });
1368
1524
  }
@@ -1371,12 +1527,12 @@ function Mt({
1371
1527
  (B) => {
1372
1528
  const te = B.get(M);
1373
1529
  if (te) {
1374
- const { defaultLayoutDeferred: ne, derivedPanelConstraints: ae, layout: me } = te;
1530
+ const { defaultLayoutDeferred: ne, derivedPanelConstraints: ae, layout: ge } = te;
1375
1531
  if (ne || ae.length === 0)
1376
1532
  return;
1377
- const { interactionState: Xe } = O(), qe = Xe.state !== "active";
1378
- f(me), qe && d(me), L.panels.forEach((Ye) => {
1379
- Ye.scheduleUpdate();
1533
+ const { interactionState: qe } = G(), Ye = qe.state !== "active";
1534
+ f(ge), Ye && p(ge), w.panels.forEach((Ze) => {
1535
+ Ze.scheduleUpdate();
1380
1536
  });
1381
1537
  }
1382
1538
  }
@@ -1385,31 +1541,31 @@ function Mt({
1385
1541
  $.current = null, H(), ee(), se();
1386
1542
  };
1387
1543
  }, [
1388
- r,
1389
- m,
1544
+ i,
1390
1545
  d,
1546
+ p,
1391
1547
  f,
1392
1548
  c,
1393
- x,
1394
- G
1395
- ]), Ge(() => {
1549
+ v,
1550
+ I
1551
+ ]), Ie(() => {
1396
1552
  const z = $.current;
1397
1553
  z && (z.defaultLayout = n, z.disableCursor = !!o);
1398
- }), /* @__PURE__ */ q(Ke.Provider, { value: P, children: /* @__PURE__ */ q(
1554
+ }), /* @__PURE__ */ q(Xe.Provider, { value: P, children: /* @__PURE__ */ q(
1399
1555
  "div",
1400
1556
  {
1401
1557
  ...g,
1402
1558
  "aria-orientation": c,
1403
1559
  className: t,
1404
1560
  "data-group": !0,
1405
- "data-testid": m,
1406
- id: m,
1561
+ "data-testid": d,
1562
+ id: d,
1407
1563
  ref: C,
1408
1564
  style: {
1409
1565
  height: "100%",
1410
1566
  width: "100%",
1411
1567
  overflow: "hidden",
1412
- ...h,
1568
+ ...m,
1413
1569
  display: "flex",
1414
1570
  flexDirection: c === "horizontal" ? "row" : "column",
1415
1571
  flexWrap: "nowrap"
@@ -1418,7 +1574,7 @@ function Mt({
1418
1574
  }
1419
1575
  ) });
1420
1576
  }
1421
- Mt.displayName = "Group";
1577
+ Et.displayName = "Group";
1422
1578
  function ue(e, t) {
1423
1579
  return `react-resizable-panels:${[e, ...t].join(":")}`;
1424
1580
  }
@@ -1428,39 +1584,39 @@ function At({
1428
1584
  storage: n = localStorage,
1429
1585
  ...o
1430
1586
  }) {
1431
- const r = t !== void 0, s = "id" in o ? o.id : o.groupId, l = ue(s, t ?? []), i = Qe(
1432
- Et,
1587
+ const i = t !== void 0, s = "id" in o ? o.id : o.groupId, l = ue(s, t ?? []), r = et(
1588
+ kt,
1433
1589
  () => n.getItem(l),
1434
1590
  () => n.getItem(l)
1435
1591
  ), a = Oe(
1436
- () => i ? JSON.parse(i) : void 0,
1437
- [i]
1592
+ () => r ? JSON.parse(r) : void 0,
1593
+ [r]
1438
1594
  ), u = k(null), c = K(() => {
1439
- const p = u.current;
1440
- p && (u.current = null, clearTimeout(p));
1595
+ const h = u.current;
1596
+ h && (u.current = null, clearTimeout(h));
1441
1597
  }, []);
1442
- ke(() => () => {
1598
+ Ge(() => () => {
1443
1599
  c();
1444
1600
  }, [c]);
1445
- const h = K(
1446
- (p) => {
1601
+ const m = K(
1602
+ (h) => {
1447
1603
  c();
1448
1604
  let f;
1449
- r ? f = ue(s, Object.keys(p)) : f = ue(s, []);
1605
+ i ? f = ue(s, Object.keys(h)) : f = ue(s, []);
1450
1606
  try {
1451
- n.setItem(f, JSON.stringify(p));
1452
- } catch (d) {
1453
- console.error(d);
1607
+ n.setItem(f, JSON.stringify(h));
1608
+ } catch (p) {
1609
+ console.error(p);
1454
1610
  }
1455
1611
  },
1456
- [c, r, s, n]
1612
+ [c, i, s, n]
1457
1613
  ), g = K(
1458
- (p) => {
1459
- c(), e === 0 ? h(p) : u.current = setTimeout(() => {
1460
- h(p);
1614
+ (h) => {
1615
+ c(), e === 0 ? m(h) : u.current = setTimeout(() => {
1616
+ m(h);
1461
1617
  }, e);
1462
1618
  },
1463
- [c, e, h]
1619
+ [c, e, m]
1464
1620
  );
1465
1621
  return {
1466
1622
  /**
@@ -1476,10 +1632,10 @@ function At({
1476
1632
  /**
1477
1633
  * Attach this callback on the `Group` as the `onLayoutChanged` prop.
1478
1634
  */
1479
- onLayoutChanged: h
1635
+ onLayoutChanged: m
1480
1636
  };
1481
1637
  }
1482
- function Et() {
1638
+ function kt() {
1483
1639
  return function() {
1484
1640
  };
1485
1641
  }
@@ -1489,128 +1645,15 @@ function Ft() {
1489
1645
  function $t() {
1490
1646
  return k(null);
1491
1647
  }
1492
- function he() {
1493
- const e = et(Ke);
1648
+ function me() {
1649
+ const e = tt(Xe);
1494
1650
  return b(
1495
1651
  e,
1496
1652
  "Group Context not found; did you render a Panel or Separator outside of a Group?"
1497
1653
  ), e;
1498
1654
  }
1499
- function kt({
1500
- groupId: e,
1501
- panelId: t
1502
- }) {
1503
- const n = () => {
1504
- const { mountedGroups: i } = O();
1505
- for (const [
1506
- a,
1507
- {
1508
- defaultLayoutDeferred: u,
1509
- derivedPanelConstraints: c,
1510
- layout: h,
1511
- separatorToPanels: g
1512
- }
1513
- ] of i)
1514
- if (a.id === e)
1515
- return {
1516
- defaultLayoutDeferred: u,
1517
- derivedPanelConstraints: c,
1518
- group: a,
1519
- layout: h,
1520
- separatorToPanels: g
1521
- };
1522
- throw Error(`Group ${e} not found`);
1523
- }, o = () => {
1524
- const i = n().derivedPanelConstraints.find(
1525
- (a) => a.panelId === t
1526
- );
1527
- if (i !== void 0)
1528
- return i;
1529
- throw Error(`Panel constraints not found for Panel ${t}`);
1530
- }, r = () => {
1531
- const i = n().group.panels.find((a) => a.id === t);
1532
- if (i !== void 0)
1533
- return i;
1534
- throw Error(`Layout not found for Panel ${t}`);
1535
- }, s = () => {
1536
- const i = n().layout[t];
1537
- if (i !== void 0)
1538
- return i;
1539
- throw Error(`Layout not found for Panel ${t}`);
1540
- }, l = (i) => {
1541
- const a = s();
1542
- if (i === a)
1543
- return;
1544
- const {
1545
- defaultLayoutDeferred: u,
1546
- derivedPanelConstraints: c,
1547
- group: h,
1548
- layout: g,
1549
- separatorToPanels: p
1550
- } = n(), f = h.panels.findIndex((x) => x.id === t), d = f === h.panels.length - 1, m = J({
1551
- delta: d ? a - i : i - a,
1552
- initialLayout: g,
1553
- panelConstraints: c,
1554
- pivotIndices: d ? [f - 1, f] : [f, f + 1],
1555
- prevLayout: g,
1556
- trigger: "imperative-api"
1557
- }), S = A({
1558
- layout: m,
1559
- panelConstraints: c
1560
- });
1561
- N(g, S) || E((x) => ({
1562
- mountedGroups: new Map(x.mountedGroups).set(h, {
1563
- defaultLayoutDeferred: u,
1564
- derivedPanelConstraints: c,
1565
- layout: S,
1566
- separatorToPanels: p
1567
- })
1568
- }));
1569
- };
1570
- return {
1571
- collapse: () => {
1572
- const { collapsible: i, collapsedSize: a } = o(), { mutableValues: u } = r(), c = s();
1573
- i && c !== a && (u.expandToSize = c, l(a));
1574
- },
1575
- expand: () => {
1576
- const { collapsible: i, collapsedSize: a, minSize: u } = o(), { mutableValues: c } = r(), h = s();
1577
- if (i && h === a) {
1578
- let g = c.expandToSize ?? u;
1579
- g === 0 && (g = 1), l(g);
1580
- }
1581
- },
1582
- getSize: () => {
1583
- const { group: i } = n(), a = s(), { element: u } = r(), c = i.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
1584
- return {
1585
- asPercentage: a,
1586
- inPixels: c
1587
- };
1588
- },
1589
- isCollapsed: () => {
1590
- const { collapsible: i, collapsedSize: a } = o(), u = s();
1591
- return i && R(a, u);
1592
- },
1593
- resize: (i) => {
1594
- if (s() !== i) {
1595
- let u;
1596
- switch (typeof i) {
1597
- case "number": {
1598
- const { group: c } = n(), h = V({ group: c });
1599
- u = D(i / h * 100);
1600
- break;
1601
- }
1602
- case "string": {
1603
- u = parseFloat(i);
1604
- break;
1605
- }
1606
- }
1607
- l(u);
1608
- }
1609
- }
1610
- };
1611
- }
1612
1655
  function Gt(e, t) {
1613
- const { id: n } = he(), o = k({
1656
+ const { id: n } = me(), o = k({
1614
1657
  collapse: le,
1615
1658
  expand: le,
1616
1659
  getSize: () => ({
@@ -1620,10 +1663,10 @@ function Gt(e, t) {
1620
1663
  isCollapsed: () => !1,
1621
1664
  resize: le
1622
1665
  });
1623
- Ie(t, () => o.current, []), F(() => {
1666
+ De(t, () => o.current, []), F(() => {
1624
1667
  Object.assign(
1625
1668
  o.current,
1626
- kt({ groupId: n, panelId: e })
1669
+ Fe({ groupId: n, panelId: e })
1627
1670
  );
1628
1671
  });
1629
1672
  }
@@ -1632,56 +1675,56 @@ function It({
1632
1675
  className: t,
1633
1676
  collapsedSize: n = "0%",
1634
1677
  collapsible: o = !1,
1635
- defaultSize: r,
1678
+ defaultSize: i,
1636
1679
  elementRef: s,
1637
1680
  id: l,
1638
- maxSize: i = "100%",
1681
+ maxSize: r = "100%",
1639
1682
  minSize: a = "0%",
1640
1683
  onResize: u,
1641
1684
  panelRef: c,
1642
- style: h,
1685
+ style: m,
1643
1686
  ...g
1644
1687
  }) {
1645
- const p = !!l, f = de(l), d = k(null), m = pe(d, s), [, S] = Be(), { getPanelStyles: x, id: v, registerPanel: y } = he(), C = u !== null, w = X(
1646
- (G, $, z) => {
1647
- u?.(G, l, z);
1688
+ const h = !!l, f = pe(l), p = k(null), d = he(p, s), [, y] = Ke(), { getPanelStyles: v, id: x, registerPanel: S } = me(), C = u !== null, L = X(
1689
+ (I, $, z) => {
1690
+ u?.(I, l, z);
1648
1691
  }
1649
1692
  );
1650
1693
  F(() => {
1651
- const G = d.current;
1652
- if (G !== null)
1653
- return y({
1654
- element: G,
1694
+ const I = p.current;
1695
+ if (I !== null)
1696
+ return S({
1697
+ element: I,
1655
1698
  id: f,
1656
- idIsStable: p,
1699
+ idIsStable: h,
1657
1700
  mutableValues: {
1658
1701
  expandToSize: void 0,
1659
1702
  prevSize: void 0
1660
1703
  },
1661
- onResize: C ? w : void 0,
1704
+ onResize: C ? L : void 0,
1662
1705
  panelConstraints: {
1663
1706
  collapsedSize: n,
1664
1707
  collapsible: o,
1665
- defaultSize: r,
1666
- maxSize: i,
1708
+ defaultSize: i,
1709
+ maxSize: r,
1667
1710
  minSize: a
1668
1711
  },
1669
- scheduleUpdate: S
1712
+ scheduleUpdate: y
1670
1713
  });
1671
1714
  }, [
1672
1715
  n,
1673
1716
  o,
1674
- r,
1675
- S,
1717
+ i,
1718
+ y,
1676
1719
  C,
1677
1720
  f,
1678
- p,
1679
- i,
1721
+ h,
1722
+ r,
1680
1723
  a,
1681
- w,
1682
- y
1724
+ L,
1725
+ S
1683
1726
  ]), Gt(f, c);
1684
- const P = x(v, f);
1727
+ const P = v(x, f);
1685
1728
  return /* @__PURE__ */ q(
1686
1729
  "div",
1687
1730
  {
@@ -1689,9 +1732,10 @@ function It({
1689
1732
  "data-panel": !0,
1690
1733
  "data-testid": f,
1691
1734
  id: f,
1692
- ref: m,
1735
+ ref: d,
1693
1736
  style: {
1694
- ...Ot,
1737
+ ...Dt,
1738
+ display: "flex",
1695
1739
  flexBasis: 0,
1696
1740
  flexShrink: 1,
1697
1741
  // Prevent Panel content from interfering with panel size
@@ -1703,9 +1747,8 @@ function It({
1703
1747
  {
1704
1748
  className: t,
1705
1749
  style: {
1706
- width: "100%",
1707
- height: "100%",
1708
- ...h
1750
+ flexGrow: 1,
1751
+ ...m
1709
1752
  },
1710
1753
  children: e
1711
1754
  }
@@ -1714,7 +1757,7 @@ function It({
1714
1757
  );
1715
1758
  }
1716
1759
  It.displayName = "Panel";
1717
- const Ot = {
1760
+ const Dt = {
1718
1761
  minHeight: 0,
1719
1762
  maxHeight: "100%",
1720
1763
  height: "auto",
@@ -1732,18 +1775,18 @@ function Ht() {
1732
1775
  function jt() {
1733
1776
  return k(null);
1734
1777
  }
1735
- function Dt({
1778
+ function Ot({
1736
1779
  layout: e,
1737
1780
  panelConstraints: t,
1738
1781
  panelId: n,
1739
1782
  panelIndex: o
1740
1783
  }) {
1741
- let r, s;
1742
- const l = e[n], i = t.find(
1784
+ let i, s;
1785
+ const l = e[n], r = t.find(
1743
1786
  (a) => a.panelId === n
1744
1787
  );
1745
- if (i) {
1746
- const a = i.maxSize, u = s = i.collapsible ? i.collapsedSize : i.minSize, c = [o, o + 1];
1788
+ if (r) {
1789
+ const a = r.maxSize, u = s = r.collapsible ? r.collapsedSize : r.minSize, c = [o, o + 1];
1747
1790
  s = A({
1748
1791
  layout: J({
1749
1792
  delta: u - l,
@@ -1754,7 +1797,7 @@ function Dt({
1754
1797
  trigger: "keyboard"
1755
1798
  }),
1756
1799
  panelConstraints: t
1757
- })[n], r = A({
1800
+ })[n], i = A({
1758
1801
  layout: J({
1759
1802
  delta: a - l,
1760
1803
  initialLayout: e,
@@ -1768,7 +1811,7 @@ function Dt({
1768
1811
  }
1769
1812
  return {
1770
1813
  valueControls: n,
1771
- valueMax: r,
1814
+ valueMax: i,
1772
1815
  valueMin: s,
1773
1816
  valueNow: l
1774
1817
  };
@@ -1778,41 +1821,41 @@ function Tt({
1778
1821
  className: t,
1779
1822
  elementRef: n,
1780
1823
  id: o,
1781
- style: r,
1824
+ style: i,
1782
1825
  ...s
1783
1826
  }) {
1784
- const l = de(o), [i, a] = Y({}), [u, c] = Y("inactive"), h = k(null), g = pe(h, n), {
1785
- id: p,
1827
+ const l = pe(o), [r, a] = Y({}), [u, c] = Y("inactive"), m = k(null), g = he(m, n), {
1828
+ id: h,
1786
1829
  orientation: f,
1787
- registerSeparator: d
1788
- } = he(), m = f === "horizontal" ? "vertical" : "horizontal";
1830
+ registerSeparator: p
1831
+ } = me(), d = f === "horizontal" ? "vertical" : "horizontal";
1789
1832
  return F(() => {
1790
- const S = h.current;
1791
- if (S !== null) {
1792
- const x = {
1793
- element: S,
1833
+ const y = m.current;
1834
+ if (y !== null) {
1835
+ const v = {
1836
+ element: y,
1794
1837
  id: l
1795
- }, v = d(x), y = _.addListener(
1838
+ }, x = p(v), S = _.addListener(
1796
1839
  "interactionStateChange",
1797
- (w) => {
1840
+ (L) => {
1798
1841
  c(
1799
- w.state !== "inactive" && w.hitRegions.some(
1800
- (P) => P.separator === x
1801
- ) ? w.state : "inactive"
1842
+ L.state !== "inactive" && L.hitRegions.some(
1843
+ (P) => P.separator === v
1844
+ ) ? L.state : "inactive"
1802
1845
  );
1803
1846
  }
1804
1847
  ), C = _.addListener(
1805
1848
  "mountedGroupsChange",
1806
- (w) => {
1807
- w.forEach(
1808
- ({ derivedPanelConstraints: P, layout: G, separatorToPanels: $ }, z) => {
1809
- if (z.id === p) {
1810
- const L = $.get(x);
1811
- if (L) {
1812
- const M = L[0], H = z.panels.indexOf(M);
1849
+ (L) => {
1850
+ L.forEach(
1851
+ ({ derivedPanelConstraints: P, layout: I, separatorToPanels: $ }, z) => {
1852
+ if (z.id === h) {
1853
+ const w = $.get(v);
1854
+ if (w) {
1855
+ const M = w[0], H = z.panels.indexOf(M);
1813
1856
  a(
1814
- Dt({
1815
- layout: G,
1857
+ Ot({
1858
+ layout: I,
1816
1859
  panelConstraints: P,
1817
1860
  panelId: M.id,
1818
1861
  panelIndex: H
@@ -1825,18 +1868,18 @@ function Tt({
1825
1868
  }
1826
1869
  );
1827
1870
  return () => {
1828
- y(), C(), v();
1871
+ S(), C(), x();
1829
1872
  };
1830
1873
  }
1831
- }, [p, l, d]), /* @__PURE__ */ q(
1874
+ }, [h, l, p]), /* @__PURE__ */ q(
1832
1875
  "div",
1833
1876
  {
1834
1877
  ...s,
1835
- "aria-controls": i.valueControls,
1836
- "aria-orientation": m,
1837
- "aria-valuemax": i.valueMax,
1838
- "aria-valuemin": i.valueMin,
1839
- "aria-valuenow": i.valueNow,
1878
+ "aria-controls": r.valueControls,
1879
+ "aria-orientation": d,
1880
+ "aria-valuemax": r.valueMax,
1881
+ "aria-valuemin": r.valueMin,
1882
+ "aria-valuenow": r.valueNow,
1840
1883
  children: e,
1841
1884
  className: t,
1842
1885
  "data-separator": u,
@@ -1846,7 +1889,7 @@ function Tt({
1846
1889
  role: "separator",
1847
1890
  style: {
1848
1891
  flexBasis: "auto",
1849
- ...r,
1892
+ ...i,
1850
1893
  flexGrow: 0,
1851
1894
  flexShrink: 0
1852
1895
  },
@@ -1856,9 +1899,10 @@ function Tt({
1856
1899
  }
1857
1900
  Tt.displayName = "Separator";
1858
1901
  export {
1859
- Mt as Group,
1902
+ Et as Group,
1860
1903
  It as Panel,
1861
1904
  Tt as Separator,
1905
+ rt as isCoarsePointer,
1862
1906
  At as useDefaultLayout,
1863
1907
  Ft as useGroupCallbackRef,
1864
1908
  $t as useGroupRef,