react-resizable-panels 4.7.2 → 4.7.3

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,6 +1,6 @@
1
1
  "use client";
2
- import { jsx as oe } from "react/jsx-runtime";
3
- import { useState as ie, useCallback as te, useId as pt, useLayoutEffect as Be, useEffect as de, useRef as T, createContext as ht, useImperativeHandle as We, useMemo as Ue, useSyncExternalStore as Ke, useContext as mt } from "react";
2
+ import { jsx as ie } from "react/jsx-runtime";
3
+ import { useState as re, useCallback as ne, useId as pt, useLayoutEffect as Be, useEffect as de, useRef as T, createContext as ht, useImperativeHandle as We, useMemo as Ue, useSyncExternalStore as Ke, useContext as mt } from "react";
4
4
  function gt(e, t) {
5
5
  const n = getComputedStyle(e), o = parseFloat(n.fontSize);
6
6
  return t * o;
@@ -25,36 +25,36 @@ function zt(e) {
25
25
  }
26
26
  }
27
27
  }
28
- function le({
28
+ function te({
29
29
  groupSize: e,
30
30
  panelElement: t,
31
31
  styleProp: n
32
32
  }) {
33
33
  let o;
34
- const [r, a] = zt(n);
35
- switch (a) {
34
+ const [i, s] = zt(n);
35
+ switch (s) {
36
36
  case "%": {
37
- o = r / 100 * e;
37
+ o = i / 100 * e;
38
38
  break;
39
39
  }
40
40
  case "px": {
41
- o = r;
41
+ o = i;
42
42
  break;
43
43
  }
44
44
  case "rem": {
45
- o = St(t, r);
45
+ o = St(t, i);
46
46
  break;
47
47
  }
48
48
  case "em": {
49
- o = gt(t, r);
49
+ o = gt(t, i);
50
50
  break;
51
51
  }
52
52
  case "vh": {
53
- o = yt(r);
53
+ o = yt(i);
54
54
  break;
55
55
  }
56
56
  case "vw": {
57
- o = vt(r);
57
+ o = vt(i);
58
58
  break;
59
59
  }
60
60
  }
@@ -67,7 +67,7 @@ function Q({
67
67
  group: e
68
68
  }) {
69
69
  const { orientation: t, panels: n } = e;
70
- return n.reduce((o, r) => (o += t === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o), 0);
70
+ return n.reduce((o, i) => (o += t === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, o), 0);
71
71
  }
72
72
  function ge(e) {
73
73
  const { panels: t } = e, n = Q({ group: e });
@@ -81,51 +81,51 @@ function ge(e) {
81
81
  maxSize: 100,
82
82
  panelId: o.id
83
83
  })) : t.map((o) => {
84
- const { element: r, panelConstraints: a } = o;
85
- let u = 0;
86
- if (a.collapsedSize !== void 0) {
87
- const c = le({
84
+ const { element: i, panelConstraints: s } = o;
85
+ let l = 0;
86
+ if (s.collapsedSize !== void 0) {
87
+ const c = te({
88
88
  groupSize: n,
89
- panelElement: r,
90
- styleProp: a.collapsedSize
89
+ panelElement: i,
90
+ styleProp: s.collapsedSize
91
91
  });
92
- u = D(c / n * 100);
92
+ l = D(c / n * 100);
93
93
  }
94
- let i;
95
- if (a.defaultSize !== void 0) {
96
- const c = le({
94
+ let r;
95
+ if (s.defaultSize !== void 0) {
96
+ const c = te({
97
97
  groupSize: n,
98
- panelElement: r,
99
- styleProp: a.defaultSize
98
+ panelElement: i,
99
+ styleProp: s.defaultSize
100
100
  });
101
- i = D(c / n * 100);
101
+ r = D(c / n * 100);
102
102
  }
103
- let s = 0;
104
- if (a.minSize !== void 0) {
105
- const c = le({
103
+ let a = 0;
104
+ if (s.minSize !== void 0) {
105
+ const c = te({
106
106
  groupSize: n,
107
- panelElement: r,
108
- styleProp: a.minSize
107
+ panelElement: i,
108
+ styleProp: s.minSize
109
109
  });
110
- s = D(c / n * 100);
110
+ a = D(c / n * 100);
111
111
  }
112
- let l = 100;
113
- if (a.maxSize !== void 0) {
114
- const c = le({
112
+ let u = 100;
113
+ if (s.maxSize !== void 0) {
114
+ const c = te({
115
115
  groupSize: n,
116
- panelElement: r,
117
- styleProp: a.maxSize
116
+ panelElement: i,
117
+ styleProp: s.maxSize
118
118
  });
119
- l = D(c / n * 100);
119
+ u = D(c / n * 100);
120
120
  }
121
121
  return {
122
- groupResizeBehavior: a.groupResizeBehavior,
123
- collapsedSize: u,
124
- collapsible: a.collapsible === !0,
125
- defaultSize: i,
126
- disabled: a.disabled,
127
- minSize: s,
128
- maxSize: l,
122
+ groupResizeBehavior: s.groupResizeBehavior,
123
+ collapsedSize: l,
124
+ collapsible: s.collapsible === !0,
125
+ defaultSize: r,
126
+ disabled: s.disabled,
127
+ minSize: a,
128
+ maxSize: u,
129
129
  panelId: o.id
130
130
  };
131
131
  });
@@ -171,41 +171,41 @@ function wt({
171
171
  x: n.x + n.width / 2,
172
172
  y: n.y + n.height / 2
173
173
  };
174
- let r, a = Number.MAX_VALUE;
175
- for (const u of t) {
176
- const { x: i, y: s } = qe(o, u), l = e === "horizontal" ? i : s;
177
- l < a && (a = l, r = u);
174
+ let i, s = Number.MAX_VALUE;
175
+ for (const l of t) {
176
+ const { x: r, y: a } = qe(o, l), u = e === "horizontal" ? r : a;
177
+ u < s && (s = u, i = l);
178
178
  }
179
- return L(r, "No rect found"), r;
179
+ return L(i, "No rect found"), i;
180
180
  }
181
181
  let ue;
182
182
  function Pt() {
183
183
  return ue === void 0 && (typeof matchMedia == "function" ? ue = !!matchMedia("(pointer:coarse)").matches : ue = !1), ue;
184
184
  }
185
185
  function Ye(e) {
186
- const { element: t, orientation: n, panels: o, separators: r } = e, a = Se(
186
+ const { element: t, orientation: n, panels: o, separators: i } = e, s = Se(
187
187
  n,
188
188
  Array.from(t.children).filter(Xe).map((x) => ({ element: x }))
189
- ).map(({ element: x }) => x), u = [];
190
- let i = !1, s = !1, l = -1, c = -1, m = 0, p, v = [];
189
+ ).map(({ element: x }) => x), l = [];
190
+ let r = !1, a = !1, u = -1, c = -1, m = 0, d, v = [];
191
191
  {
192
192
  let x = -1;
193
- for (const f of a)
194
- f.hasAttribute("data-panel") && (x++, f.ariaDisabled === null && (m++, l === -1 && (l = x), c = x));
193
+ for (const f of s)
194
+ f.hasAttribute("data-panel") && (x++, f.ariaDisabled === null && (m++, u === -1 && (u = x), c = x));
195
195
  }
196
196
  if (m > 1) {
197
197
  let x = -1;
198
- for (const f of a)
198
+ for (const f of s)
199
199
  if (f.hasAttribute("data-panel")) {
200
200
  x++;
201
201
  const h = o.find(
202
202
  (g) => g.element === f
203
203
  );
204
204
  if (h) {
205
- if (p) {
206
- const g = p.element.getBoundingClientRect(), y = f.getBoundingClientRect();
205
+ if (d) {
206
+ const g = d.element.getBoundingClientRect(), y = f.getBoundingClientRect();
207
207
  let z;
208
- if (s) {
208
+ if (a) {
209
209
  const S = n === "horizontal" ? new DOMRect(
210
210
  g.right,
211
211
  g.top,
@@ -216,12 +216,12 @@ function Ye(e) {
216
216
  g.bottom,
217
217
  g.width,
218
218
  0
219
- ), d = n === "horizontal" ? new DOMRect(y.left, y.top, 0, y.height) : new DOMRect(y.left, y.top, y.width, 0);
219
+ ), p = n === "horizontal" ? new DOMRect(y.left, y.top, 0, y.height) : new DOMRect(y.left, y.top, y.width, 0);
220
220
  switch (v.length) {
221
221
  case 0: {
222
222
  z = [
223
223
  S,
224
- d
224
+ p
225
225
  ];
226
226
  break;
227
227
  }
@@ -233,7 +233,7 @@ function Ye(e) {
233
233
  });
234
234
  z = [
235
235
  P,
236
- R === g ? d : S
236
+ R === g ? p : S
237
237
  ];
238
238
  break;
239
239
  }
@@ -257,48 +257,48 @@ function Ye(e) {
257
257
  )
258
258
  ];
259
259
  for (const S of z) {
260
- let d = "width" in S ? S : S.element.getBoundingClientRect();
260
+ let p = "width" in S ? S : S.element.getBoundingClientRect();
261
261
  const P = Pt() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
262
- if (d.width < P) {
263
- const C = P - d.width;
264
- d = new DOMRect(
265
- d.x - C / 2,
266
- d.y,
267
- d.width + C,
268
- d.height
262
+ if (p.width < P) {
263
+ const C = P - p.width;
264
+ p = new DOMRect(
265
+ p.x - C / 2,
266
+ p.y,
267
+ p.width + C,
268
+ p.height
269
269
  );
270
270
  }
271
- if (d.height < P) {
272
- const C = P - d.height;
273
- d = new DOMRect(
274
- d.x,
275
- d.y - C / 2,
276
- d.width,
277
- d.height + C
271
+ if (p.height < P) {
272
+ const C = P - p.height;
273
+ p = new DOMRect(
274
+ p.x,
275
+ p.y - C / 2,
276
+ p.width,
277
+ p.height + C
278
278
  );
279
279
  }
280
- const R = x <= l || x > c;
281
- !i && !R && u.push({
280
+ const R = x <= u || x > c;
281
+ !r && !R && l.push({
282
282
  group: e,
283
283
  groupSize: Q({ group: e }),
284
- panels: [p, h],
284
+ panels: [d, h],
285
285
  separator: "width" in S ? void 0 : S,
286
- rect: d
287
- }), i = !1;
286
+ rect: p
287
+ }), r = !1;
288
288
  }
289
289
  }
290
- s = !1, p = h, v = [];
290
+ a = !1, d = h, v = [];
291
291
  }
292
292
  } else if (f.hasAttribute("data-separator")) {
293
- f.ariaDisabled !== null && (i = !0);
294
- const h = r.find(
293
+ f.ariaDisabled !== null && (r = !0);
294
+ const h = i.find(
295
295
  (g) => g.element === f
296
296
  );
297
- h ? v.push(h) : (p = void 0, v = []);
297
+ h ? v.push(h) : (d = void 0, v = []);
298
298
  } else
299
- s = !0;
299
+ a = !0;
300
300
  }
301
- return u;
301
+ return l;
302
302
  }
303
303
  class Je {
304
304
  #e = {};
@@ -314,18 +314,18 @@ class Je {
314
314
  if (o.length === 1)
315
315
  o[0].call(null, n);
316
316
  else {
317
- let r = !1, a = null;
318
- const u = Array.from(o);
319
- for (let i = 0; i < u.length; i++) {
320
- const s = u[i];
317
+ let i = !1, s = null;
318
+ const l = Array.from(o);
319
+ for (let r = 0; r < l.length; r++) {
320
+ const a = l[r];
321
321
  try {
322
- s.call(null, n);
323
- } catch (l) {
324
- a === null && (r = !0, a = l);
322
+ a.call(null, n);
323
+ } catch (u) {
324
+ s === null && (i = !0, s = u);
325
325
  }
326
326
  }
327
- if (r)
328
- throw a;
327
+ if (i)
328
+ throw s;
329
329
  }
330
330
  }
331
331
  removeAllListeners() {
@@ -334,8 +334,8 @@ class Je {
334
334
  removeListener(t, n) {
335
335
  const o = this.#e[t];
336
336
  if (o !== void 0) {
337
- const r = o.indexOf(n);
338
- r >= 0 && o.splice(r, 1);
337
+ const i = o.indexOf(n);
338
+ i >= 0 && o.splice(i, 1);
339
339
  }
340
340
  }
341
341
  }
@@ -364,7 +364,7 @@ function ye(e, t) {
364
364
  n.group.id === e && t(n);
365
365
  });
366
366
  }
367
- function F(e, t) {
367
+ function _(e, t) {
368
368
  const n = A.get(e);
369
369
  A = new Map(A), A.set(e, t), Ze.emit("groupChange", {
370
370
  group: e,
@@ -373,25 +373,25 @@ function F(e, t) {
373
373
  });
374
374
  }
375
375
  function Ct(e, t, n) {
376
- let o, r = {
376
+ let o, i = {
377
377
  x: 1 / 0,
378
378
  y: 1 / 0
379
379
  };
380
- for (const a of t) {
381
- const u = qe(n, a.rect);
380
+ for (const s of t) {
381
+ const l = qe(n, s.rect);
382
382
  switch (e) {
383
383
  case "horizontal": {
384
- u.x <= r.x && (o = a, r = u);
384
+ l.x <= i.x && (o = s, i = l);
385
385
  break;
386
386
  }
387
387
  case "vertical": {
388
- u.y <= r.y && (o = a, r = u);
388
+ l.y <= i.y && (o = s, i = l);
389
389
  break;
390
390
  }
391
391
  }
392
392
  }
393
393
  return o ? {
394
- distance: r,
394
+ distance: i,
395
395
  hitRegion: o
396
396
  } : void 0;
397
397
  }
@@ -411,23 +411,23 @@ function Mt(e, t) {
411
411
  o,
412
412
  "Stacking order can only be calculated for elements with a common ancestor"
413
413
  );
414
- const r = {
414
+ const i = {
415
415
  a: Ie(Ee(n.a)),
416
416
  b: Ie(Ee(n.b))
417
417
  };
418
- if (r.a === r.b) {
419
- const a = o.childNodes, u = {
418
+ if (i.a === i.b) {
419
+ const s = o.childNodes, l = {
420
420
  a: n.a.at(-1),
421
421
  b: n.b.at(-1)
422
422
  };
423
- let i = a.length;
424
- for (; i--; ) {
425
- const s = a[i];
426
- if (s === u.a) return 1;
427
- if (s === u.b) return -1;
423
+ let r = s.length;
424
+ for (; r--; ) {
425
+ const a = s[r];
426
+ if (a === l.a) return 1;
427
+ if (a === l.b) return -1;
428
428
  }
429
429
  }
430
- return Math.sign(r.a - r.b);
430
+ return Math.sign(i.a - i.b);
431
431
  }
432
432
  const Et = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
433
433
  function It(e) {
@@ -483,18 +483,18 @@ function Tt({
483
483
  }
484
484
  function ve(e, t) {
485
485
  const n = [];
486
- return t.forEach((o, r) => {
487
- if (r.disabled)
486
+ return t.forEach((o, i) => {
487
+ if (i.disabled)
488
488
  return;
489
- const a = Ye(r), u = Ct(r.orientation, a, {
489
+ const s = Ye(i), l = Ct(i.orientation, s, {
490
490
  x: e.clientX,
491
491
  y: e.clientY
492
492
  });
493
- u && u.distance.x <= 0 && u.distance.y <= 0 && Tt({
494
- groupElement: r.element,
495
- hitRegion: u.hitRegion.rect,
493
+ l && l.distance.x <= 0 && l.distance.y <= 0 && Tt({
494
+ groupElement: i.element,
495
+ hitRegion: l.hitRegion.rect,
496
496
  pointerEventTarget: e.target
497
- }) && n.push(u.hitRegion);
497
+ }) && n.push(l.hitRegion);
498
498
  }), n;
499
499
  }
500
500
  function Ot(e, t) {
@@ -518,36 +518,36 @@ function Y({
518
518
  size: o
519
519
  }) {
520
520
  const {
521
- collapsedSize: r = 0,
522
- collapsible: a,
523
- disabled: u,
524
- maxSize: i = 100,
525
- minSize: s = 0
521
+ collapsedSize: i = 0,
522
+ collapsible: s,
523
+ disabled: l,
524
+ maxSize: r = 100,
525
+ minSize: a = 0
526
526
  } = t;
527
- if (u && !e)
527
+ if (l && !e)
528
528
  return n;
529
- if (G(o, s) < 0)
530
- if (a) {
531
- const l = (r + s) / 2;
532
- G(o, l) < 0 ? o = r : o = s;
529
+ if (G(o, a) < 0)
530
+ if (s) {
531
+ const u = (i + a) / 2;
532
+ G(o, u) < 0 ? o = i : o = a;
533
533
  } else
534
- o = s;
535
- return o = Math.min(i, o), o = D(o), o;
534
+ o = a;
535
+ return o = Math.min(r, o), o = D(o), o;
536
536
  }
537
- function re({
537
+ function se({
538
538
  delta: e,
539
539
  initialLayout: t,
540
540
  panelConstraints: n,
541
541
  pivotIndices: o,
542
- prevLayout: r,
543
- trigger: a
542
+ prevLayout: i,
543
+ trigger: s
544
544
  }) {
545
545
  if (I(e, 0))
546
546
  return t;
547
- const u = a === "imperative-api", i = Object.values(t), s = Object.values(r), l = [...i], [c, m] = o;
547
+ const l = s === "imperative-api", r = Object.values(t), a = Object.values(i), u = [...r], [c, m] = o;
548
548
  L(c != null, "Invalid first pivot index"), L(m != null, "Invalid second pivot index");
549
- let p = 0;
550
- switch (a) {
549
+ let d = 0;
550
+ switch (s) {
551
551
  case "keyboard": {
552
552
  {
553
553
  const f = e < 0 ? m : c, h = n[f];
@@ -561,13 +561,13 @@ function re({
561
561
  minSize: z = 0
562
562
  } = h;
563
563
  if (y) {
564
- const S = i[f];
564
+ const S = r[f];
565
565
  if (L(
566
566
  S != null,
567
567
  `Previous layout not found for panel index ${f}`
568
568
  ), I(S, g)) {
569
- const d = z - S;
570
- G(d, Math.abs(e)) > 0 && (e = e < 0 ? 0 - d : d);
569
+ const p = z - S;
570
+ G(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
571
571
  }
572
572
  }
573
573
  }
@@ -583,13 +583,13 @@ function re({
583
583
  minSize: z = 0
584
584
  } = h;
585
585
  if (y) {
586
- const S = i[f];
586
+ const S = r[f];
587
587
  if (L(
588
588
  S != null,
589
589
  `Previous layout not found for panel index ${f}`
590
590
  ), I(S, z)) {
591
- const d = S - g;
592
- G(d, Math.abs(e)) > 0 && (e = e < 0 ? 0 - d : d);
591
+ const p = S - g;
592
+ G(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
593
593
  }
594
594
  }
595
595
  }
@@ -601,14 +601,14 @@ function re({
601
601
  h,
602
602
  `Panel constraints not found for index ${f}`
603
603
  );
604
- const g = i[f], { collapsible: y, collapsedSize: z, minSize: S } = h;
604
+ const g = r[f], { collapsible: y, collapsedSize: z, minSize: S } = h;
605
605
  if (y && G(g, S) < 0)
606
606
  if (e > 0) {
607
- const d = S - z, P = d / 2, R = g + e;
608
- G(R, S) < 0 && (e = G(e, P) <= 0 ? 0 : d);
607
+ const p = S - z, P = p / 2, R = g + e;
608
+ G(R, S) < 0 && (e = G(e, P) <= 0 ? 0 : p);
609
609
  } else {
610
- const d = S - z, P = 100 - d / 2, R = g - e;
611
- G(R, S) < 0 && (e = G(100 + e, P) > 0 ? 0 : -d);
610
+ const p = S - z, P = 100 - p / 2, R = g - e;
611
+ G(R, S) < 0 && (e = G(100 + e, P) > 0 ? 0 : -p);
612
612
  }
613
613
  break;
614
614
  }
@@ -617,18 +617,18 @@ function re({
617
617
  const f = e < 0 ? 1 : -1;
618
618
  let h = e < 0 ? m : c, g = 0;
619
619
  for (; ; ) {
620
- const z = i[h];
620
+ const z = r[h];
621
621
  L(
622
622
  z != null,
623
623
  `Previous layout not found for panel index ${h}`
624
624
  );
625
- const d = Y({
626
- overrideDisabledPanels: u,
625
+ const p = Y({
626
+ overrideDisabledPanels: l,
627
627
  panelConstraints: n[h],
628
628
  prevSize: z,
629
629
  size: 100
630
630
  }) - z;
631
- if (g += d, h += f, h < 0 || h >= n.length)
631
+ if (g += p, h += f, h < 0 || h >= n.length)
632
632
  break;
633
633
  }
634
634
  const y = Math.min(Math.abs(e), Math.abs(g));
@@ -637,66 +637,66 @@ function re({
637
637
  {
638
638
  let h = e < 0 ? c : m;
639
639
  for (; h >= 0 && h < n.length; ) {
640
- const g = Math.abs(e) - Math.abs(p), y = i[h];
640
+ const g = Math.abs(e) - Math.abs(d), y = r[h];
641
641
  L(
642
642
  y != null,
643
643
  `Previous layout not found for panel index ${h}`
644
644
  );
645
645
  const z = y - g, S = Y({
646
- overrideDisabledPanels: u,
646
+ overrideDisabledPanels: l,
647
647
  panelConstraints: n[h],
648
648
  prevSize: y,
649
649
  size: z
650
650
  });
651
- if (!I(y, S) && (p += y - S, l[h] = S, p.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
651
+ if (!I(y, S) && (d += y - S, u[h] = S, d.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
652
652
  numeric: !0
653
653
  }) >= 0))
654
654
  break;
655
655
  e < 0 ? h-- : h++;
656
656
  }
657
657
  }
658
- if (Ot(s, l))
659
- return r;
658
+ if (Ot(a, u))
659
+ return i;
660
660
  {
661
- const f = e < 0 ? m : c, h = i[f];
661
+ const f = e < 0 ? m : c, h = r[f];
662
662
  L(
663
663
  h != null,
664
664
  `Previous layout not found for panel index ${f}`
665
665
  );
666
- const g = h + p, y = Y({
667
- overrideDisabledPanels: u,
666
+ const g = h + d, y = Y({
667
+ overrideDisabledPanels: l,
668
668
  panelConstraints: n[f],
669
669
  prevSize: h,
670
670
  size: g
671
671
  });
672
- if (l[f] = y, !I(y, g)) {
673
- let z = g - y, d = e < 0 ? m : c;
674
- for (; d >= 0 && d < n.length; ) {
675
- const P = l[d];
672
+ if (u[f] = y, !I(y, g)) {
673
+ let z = g - y, p = e < 0 ? m : c;
674
+ for (; p >= 0 && p < n.length; ) {
675
+ const P = u[p];
676
676
  L(
677
677
  P != null,
678
- `Previous layout not found for panel index ${d}`
678
+ `Previous layout not found for panel index ${p}`
679
679
  );
680
680
  const R = P + z, C = Y({
681
- overrideDisabledPanels: u,
682
- panelConstraints: n[d],
681
+ overrideDisabledPanels: l,
682
+ panelConstraints: n[p],
683
683
  prevSize: P,
684
684
  size: R
685
685
  });
686
- if (I(P, C) || (z -= C - P, l[d] = C), I(z, 0))
686
+ if (I(P, C) || (z -= C - P, u[p] = C), I(z, 0))
687
687
  break;
688
- e > 0 ? d-- : d++;
688
+ e > 0 ? p-- : p++;
689
689
  }
690
690
  }
691
691
  }
692
- const v = Object.values(l).reduce(
692
+ const v = Object.values(u).reduce(
693
693
  (f, h) => h + f,
694
694
  0
695
695
  );
696
696
  if (!I(v, 100, 0.1))
697
- return r;
698
- const x = Object.keys(r);
699
- return l.reduce((f, h, g) => (f[x[g]] = h, f), {});
697
+ return i;
698
+ const x = Object.keys(i);
699
+ return u.reduce((f, h, g) => (f[x[g]] = h, f), {});
700
700
  }
701
701
  function j(e, t) {
702
702
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -710,107 +710,107 @@ function B({
710
710
  layout: e,
711
711
  panelConstraints: t
712
712
  }) {
713
- const n = Object.values(e), o = [...n], r = o.reduce(
714
- (i, s) => i + s,
713
+ const n = Object.values(e), o = [...n], i = o.reduce(
714
+ (r, a) => r + a,
715
715
  0
716
716
  );
717
717
  if (o.length !== t.length)
718
718
  throw Error(
719
- `Invalid ${t.length} panel layout: ${o.map((i) => `${i}%`).join(", ")}`
719
+ `Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`
720
720
  );
721
- if (!I(r, 100) && o.length > 0)
722
- for (let i = 0; i < t.length; i++) {
723
- const s = o[i];
724
- L(s != null, `No layout data found for index ${i}`);
725
- const l = 100 / r * s;
726
- o[i] = l;
721
+ if (!I(i, 100) && o.length > 0)
722
+ for (let r = 0; r < t.length; r++) {
723
+ const a = o[r];
724
+ L(a != null, `No layout data found for index ${r}`);
725
+ const u = 100 / i * a;
726
+ o[r] = u;
727
727
  }
728
- let a = 0;
729
- for (let i = 0; i < t.length; i++) {
730
- const s = n[i];
731
- L(s != null, `No layout data found for index ${i}`);
732
- const l = o[i];
733
- L(l != null, `No layout data found for index ${i}`);
728
+ let s = 0;
729
+ for (let r = 0; r < t.length; r++) {
730
+ const a = n[r];
731
+ L(a != null, `No layout data found for index ${r}`);
732
+ const u = o[r];
733
+ L(u != null, `No layout data found for index ${r}`);
734
734
  const c = Y({
735
735
  overrideDisabledPanels: !0,
736
- panelConstraints: t[i],
737
- prevSize: s,
738
- size: l
736
+ panelConstraints: t[r],
737
+ prevSize: a,
738
+ size: u
739
739
  });
740
- l != c && (a += l - c, o[i] = c);
740
+ u != c && (s += u - c, o[r] = c);
741
741
  }
742
- if (!I(a, 0))
743
- for (let i = 0; i < t.length; i++) {
744
- const s = o[i];
745
- L(s != null, `No layout data found for index ${i}`);
746
- const l = s + a, c = Y({
742
+ if (!I(s, 0))
743
+ for (let r = 0; r < t.length; r++) {
744
+ const a = o[r];
745
+ L(a != null, `No layout data found for index ${r}`);
746
+ const u = a + s, c = Y({
747
747
  overrideDisabledPanels: !0,
748
- panelConstraints: t[i],
749
- prevSize: s,
750
- size: l
748
+ panelConstraints: t[r],
749
+ prevSize: a,
750
+ size: u
751
751
  });
752
- if (s !== c && (a -= c - s, o[i] = c, I(a, 0)))
752
+ if (a !== c && (s -= c - a, o[r] = c, I(s, 0)))
753
753
  break;
754
754
  }
755
- const u = Object.keys(e);
756
- return o.reduce((i, s, l) => (i[u[l]] = s, i), {});
755
+ const l = Object.keys(e);
756
+ return o.reduce((r, a, u) => (r[l[u]] = a, r), {});
757
757
  }
758
758
  function et({
759
759
  groupId: e,
760
760
  panelId: t
761
761
  }) {
762
762
  const n = () => {
763
- const i = U();
763
+ const r = U();
764
764
  for (const [
765
- s,
765
+ a,
766
766
  {
767
- defaultLayoutDeferred: l,
767
+ defaultLayoutDeferred: u,
768
768
  derivedPanelConstraints: c,
769
769
  layout: m,
770
- groupSize: p,
770
+ groupSize: d,
771
771
  separatorToPanels: v
772
772
  }
773
- ] of i)
774
- if (s.id === e)
773
+ ] of r)
774
+ if (a.id === e)
775
775
  return {
776
- defaultLayoutDeferred: l,
776
+ defaultLayoutDeferred: u,
777
777
  derivedPanelConstraints: c,
778
- group: s,
779
- groupSize: p,
778
+ group: a,
779
+ groupSize: d,
780
780
  layout: m,
781
781
  separatorToPanels: v
782
782
  };
783
783
  throw Error(`Group ${e} not found`);
784
784
  }, o = () => {
785
- const i = n().derivedPanelConstraints.find(
786
- (s) => s.panelId === t
785
+ const r = n().derivedPanelConstraints.find(
786
+ (a) => a.panelId === t
787
787
  );
788
- if (i !== void 0)
789
- return i;
788
+ if (r !== void 0)
789
+ return r;
790
790
  throw Error(`Panel constraints not found for Panel ${t}`);
791
- }, r = () => {
792
- const i = n().group.panels.find((s) => s.id === t);
793
- if (i !== void 0)
794
- return i;
791
+ }, i = () => {
792
+ const r = n().group.panels.find((a) => a.id === t);
793
+ if (r !== void 0)
794
+ return r;
795
795
  throw Error(`Layout not found for Panel ${t}`);
796
- }, a = () => {
797
- const i = n().layout[t];
798
- if (i !== void 0)
799
- return i;
796
+ }, s = () => {
797
+ const r = n().layout[t];
798
+ if (r !== void 0)
799
+ return r;
800
800
  throw Error(`Layout not found for Panel ${t}`);
801
- }, u = (i) => {
802
- const s = a();
803
- if (i === s)
801
+ }, l = (r) => {
802
+ const a = s();
803
+ if (r === a)
804
804
  return;
805
805
  const {
806
- defaultLayoutDeferred: l,
806
+ defaultLayoutDeferred: u,
807
807
  derivedPanelConstraints: c,
808
808
  group: m,
809
- groupSize: p,
809
+ groupSize: d,
810
810
  layout: v,
811
811
  separatorToPanels: x
812
- } = n(), f = m.panels.findIndex((z) => z.id === t), h = f === m.panels.length - 1, g = re({
813
- delta: h ? s - i : i - s,
812
+ } = n(), f = m.panels.findIndex((z) => z.id === t), h = f === m.panels.length - 1, g = se({
813
+ delta: h ? a - r : r - a,
814
814
  initialLayout: v,
815
815
  panelConstraints: c,
816
816
  pivotIndices: h ? [f - 1, f] : [f, f + 1],
@@ -820,53 +820,44 @@ function et({
820
820
  layout: g,
821
821
  panelConstraints: c
822
822
  });
823
- j(v, y) || F(m, {
824
- defaultLayoutDeferred: l,
823
+ j(v, y) || _(m, {
824
+ defaultLayoutDeferred: u,
825
825
  derivedPanelConstraints: c,
826
- groupSize: p,
826
+ groupSize: d,
827
827
  layout: y,
828
828
  separatorToPanels: x
829
829
  });
830
830
  };
831
831
  return {
832
832
  collapse: () => {
833
- const { collapsible: i, collapsedSize: s } = o(), { mutableValues: l } = r(), c = a();
834
- i && c !== s && (l.expandToSize = c, u(s));
833
+ const { collapsible: r, collapsedSize: a } = o(), { mutableValues: u } = i(), c = s();
834
+ r && c !== a && (u.expandToSize = c, l(a));
835
835
  },
836
836
  expand: () => {
837
- const { collapsible: i, collapsedSize: s, minSize: l } = o(), { mutableValues: c } = r(), m = a();
838
- if (i && m === s) {
839
- let p = c.expandToSize ?? l;
840
- p === 0 && (p = 1), u(p);
837
+ const { collapsible: r, collapsedSize: a, minSize: u } = o(), { mutableValues: c } = i(), m = s();
838
+ if (r && m === a) {
839
+ let d = c.expandToSize ?? u;
840
+ d === 0 && (d = 1), l(d);
841
841
  }
842
842
  },
843
843
  getSize: () => {
844
- const { group: i } = n(), s = a(), { element: l } = r(), c = i.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
844
+ const { group: r } = n(), a = s(), { element: u } = i(), c = r.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
845
845
  return {
846
- asPercentage: s,
846
+ asPercentage: a,
847
847
  inPixels: c
848
848
  };
849
849
  },
850
850
  isCollapsed: () => {
851
- const { collapsible: i, collapsedSize: s } = o(), l = a();
852
- return i && I(s, l);
851
+ const { collapsible: r, collapsedSize: a } = o(), u = s();
852
+ return r && I(a, u);
853
853
  },
854
- resize: (i) => {
855
- if (a() !== i) {
856
- let l;
857
- switch (typeof i) {
858
- case "number": {
859
- const { group: c } = n(), m = Q({ group: c });
860
- l = D(i / m * 100);
861
- break;
862
- }
863
- case "string": {
864
- l = parseFloat(i);
865
- break;
866
- }
867
- }
868
- u(l);
869
- }
854
+ resize: (r) => {
855
+ const { group: a } = n(), { element: u } = i(), c = Q({ group: a }), m = te({
856
+ groupSize: c,
857
+ panelElement: u,
858
+ styleProp: r
859
+ }), d = D(m / c * 100);
860
+ l(d);
870
861
  }
871
862
  };
872
863
  }
@@ -876,15 +867,15 @@ function De(e) {
876
867
  const t = U();
877
868
  ve(e, t).forEach((o) => {
878
869
  if (o.separator) {
879
- const r = o.panels.find(
880
- (a) => a.panelConstraints.defaultSize !== void 0
870
+ const i = o.panels.find(
871
+ (s) => s.panelConstraints.defaultSize !== void 0
881
872
  );
882
- if (r) {
883
- const a = r.panelConstraints.defaultSize, u = et({
873
+ if (i) {
874
+ const s = i.panelConstraints.defaultSize, l = et({
884
875
  groupId: o.group.id,
885
- panelId: r.id
876
+ panelId: i.id
886
877
  });
887
- u && a !== void 0 && (u.resize(a), e.preventDefault());
878
+ l && s !== void 0 && (l.resize(s), e.preventDefault());
888
879
  }
889
880
  }
890
881
  });
@@ -903,9 +894,9 @@ function tt({
903
894
  }) {
904
895
  const t = () => {
905
896
  const n = U();
906
- for (const [o, r] of n)
897
+ for (const [o, i] of n)
907
898
  if (o.id === e)
908
- return { group: o, ...r };
899
+ return { group: o, ...i };
909
900
  throw Error(`Could not find Group with id "${e}"`);
910
901
  };
911
902
  return {
@@ -916,44 +907,44 @@ function tt({
916
907
  setLayout(n) {
917
908
  const {
918
909
  defaultLayoutDeferred: o,
919
- derivedPanelConstraints: r,
920
- group: a,
921
- groupSize: u,
922
- layout: i,
923
- separatorToPanels: s
924
- } = t(), l = B({
910
+ derivedPanelConstraints: i,
911
+ group: s,
912
+ groupSize: l,
913
+ layout: r,
914
+ separatorToPanels: a
915
+ } = t(), u = B({
925
916
  layout: n,
926
- panelConstraints: r
917
+ panelConstraints: i
927
918
  });
928
- return o ? i : (j(i, l) || F(a, {
919
+ return o ? r : (j(r, u) || _(s, {
929
920
  defaultLayoutDeferred: o,
930
- derivedPanelConstraints: r,
931
- groupSize: u,
932
- layout: l,
933
- separatorToPanels: s
934
- }), l);
921
+ derivedPanelConstraints: i,
922
+ groupSize: l,
923
+ layout: u,
924
+ separatorToPanels: a
925
+ }), u);
935
926
  }
936
927
  };
937
928
  }
938
929
  function V(e, t) {
939
- const n = fe(e), o = $(n.id, !0), r = n.separators.find(
930
+ const n = fe(e), o = $(n.id, !0), i = n.separators.find(
940
931
  (m) => m.element === e
941
932
  );
942
- L(r, "Matching separator not found");
943
- const a = o.separatorToPanels.get(r);
944
- L(a, "Matching panels not found");
945
- const u = a.map((m) => n.panels.indexOf(m)), s = tt({ groupId: n.id }).getLayout(), l = re({
933
+ L(i, "Matching separator not found");
934
+ const s = o.separatorToPanels.get(i);
935
+ L(s, "Matching panels not found");
936
+ const l = s.map((m) => n.panels.indexOf(m)), a = tt({ groupId: n.id }).getLayout(), u = se({
946
937
  delta: t,
947
- initialLayout: s,
938
+ initialLayout: a,
948
939
  panelConstraints: o.derivedPanelConstraints,
949
- pivotIndices: u,
950
- prevLayout: s,
940
+ pivotIndices: l,
941
+ prevLayout: a,
951
942
  trigger: "keyboard"
952
943
  }), c = B({
953
- layout: l,
944
+ layout: u,
954
945
  panelConstraints: o.derivedPanelConstraints
955
946
  });
956
- j(s, c) || F(n, {
947
+ j(a, c) || _(n, {
957
948
  defaultLayoutDeferred: o.defaultLayoutDeferred,
958
949
  derivedPanelConstraints: o.derivedPanelConstraints,
959
950
  groupSize: o.groupSize,
@@ -989,31 +980,31 @@ function Te(e) {
989
980
  }
990
981
  case "Enter": {
991
982
  e.preventDefault();
992
- const o = fe(t), r = $(o.id, !0), { derivedPanelConstraints: a, layout: u, separatorToPanels: i } = r, s = o.separators.find(
993
- (p) => p.element === t
983
+ const o = fe(t), i = $(o.id, !0), { derivedPanelConstraints: s, layout: l, separatorToPanels: r } = i, a = o.separators.find(
984
+ (d) => d.element === t
994
985
  );
995
- L(s, "Matching separator not found");
996
- const l = i.get(s);
997
- L(l, "Matching panels not found");
998
- const c = l[0], m = a.find(
999
- (p) => p.panelId === c.id
986
+ L(a, "Matching separator not found");
987
+ const u = r.get(a);
988
+ L(u, "Matching panels not found");
989
+ const c = u[0], m = s.find(
990
+ (d) => d.panelId === c.id
1000
991
  );
1001
992
  if (L(m, "Panel metadata not found"), m.collapsible) {
1002
- const p = u[c.id], v = m.collapsedSize === p ? o.mutableState.expandedPanelSizes[c.id] ?? m.minSize : m.collapsedSize;
1003
- V(t, v - p);
993
+ const d = l[c.id], v = m.collapsedSize === d ? o.mutableState.expandedPanelSizes[c.id] ?? m.minSize : m.collapsedSize;
994
+ V(t, v - d);
1004
995
  }
1005
996
  break;
1006
997
  }
1007
998
  case "F6": {
1008
999
  e.preventDefault();
1009
- const r = fe(t).separators.map(
1010
- (s) => s.element
1011
- ), a = Array.from(r).findIndex(
1012
- (s) => s === e.currentTarget
1000
+ const i = fe(t).separators.map(
1001
+ (a) => a.element
1002
+ ), s = Array.from(i).findIndex(
1003
+ (a) => a === e.currentTarget
1013
1004
  );
1014
- L(a !== null, "Index not found");
1015
- const u = e.shiftKey ? a > 0 ? a - 1 : r.length - 1 : a + 1 < r.length ? a + 1 : 0;
1016
- r[u].focus({
1005
+ L(s !== null, "Index not found");
1006
+ const l = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
1007
+ i[l].focus({
1017
1008
  preventScroll: !0
1018
1009
  });
1019
1010
  break;
@@ -1055,13 +1046,13 @@ function Oe(e) {
1055
1046
  if (e.pointerType === "mouse" && e.button > 0)
1056
1047
  return;
1057
1048
  const t = U(), n = ve(e, t), o = /* @__PURE__ */ new Map();
1058
- let r = !1;
1059
- n.forEach((a) => {
1060
- a.separator && (r || (r = !0, a.separator.element.focus({
1049
+ let i = !1;
1050
+ n.forEach((s) => {
1051
+ s.separator && (i || (i = !0, s.separator.element.focus({
1061
1052
  preventScroll: !0
1062
1053
  })));
1063
- const u = t.get(a.group);
1064
- u && o.set(a.group, u.layout);
1054
+ const l = t.get(s.group);
1055
+ l && o.set(s.group, l.layout);
1065
1056
  }), Z({
1066
1057
  cursorFlags: 0,
1067
1058
  hitRegions: n,
@@ -1076,67 +1067,67 @@ let ce;
1076
1067
  function Ne() {
1077
1068
  return ce === void 0 && (ce = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (ce = !0)), ce;
1078
1069
  }
1079
- function Ft({
1070
+ function _t({
1080
1071
  cursorFlags: e,
1081
1072
  groups: t,
1082
1073
  state: n
1083
1074
  }) {
1084
- let o = 0, r = 0;
1075
+ let o = 0, i = 0;
1085
1076
  switch (n) {
1086
1077
  case "active":
1087
1078
  case "hover":
1088
- t.forEach((a) => {
1089
- if (!a.mutableState.disableCursor)
1090
- switch (a.orientation) {
1079
+ t.forEach((s) => {
1080
+ if (!s.mutableState.disableCursor)
1081
+ switch (s.orientation) {
1091
1082
  case "horizontal": {
1092
1083
  o++;
1093
1084
  break;
1094
1085
  }
1095
1086
  case "vertical": {
1096
- r++;
1087
+ i++;
1097
1088
  break;
1098
1089
  }
1099
1090
  }
1100
1091
  });
1101
1092
  }
1102
- if (!(o === 0 && r === 0)) {
1093
+ if (!(o === 0 && i === 0)) {
1103
1094
  switch (n) {
1104
1095
  case "active": {
1105
1096
  if (e && Ne()) {
1106
- const a = (e & nt) !== 0, u = (e & ot) !== 0, i = (e & it) !== 0, s = (e & rt) !== 0;
1107
- if (a)
1108
- return i ? "se-resize" : s ? "ne-resize" : "e-resize";
1109
- if (u)
1110
- return i ? "sw-resize" : s ? "nw-resize" : "w-resize";
1111
- if (i)
1112
- return "s-resize";
1097
+ const s = (e & nt) !== 0, l = (e & ot) !== 0, r = (e & it) !== 0, a = (e & rt) !== 0;
1113
1098
  if (s)
1099
+ return r ? "se-resize" : a ? "ne-resize" : "e-resize";
1100
+ if (l)
1101
+ return r ? "sw-resize" : a ? "nw-resize" : "w-resize";
1102
+ if (r)
1103
+ return "s-resize";
1104
+ if (a)
1114
1105
  return "n-resize";
1115
1106
  }
1116
1107
  break;
1117
1108
  }
1118
1109
  }
1119
- return Ne() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
1110
+ return Ne() ? o > 0 && i > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && i > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
1120
1111
  }
1121
1112
  }
1122
- const Fe = /* @__PURE__ */ new WeakMap();
1113
+ const _e = /* @__PURE__ */ new WeakMap();
1123
1114
  function be(e) {
1124
1115
  if (e.defaultView === null || e.defaultView === void 0)
1125
1116
  return;
1126
- let { prevStyle: t, styleSheet: n } = Fe.get(e) ?? {};
1117
+ let { prevStyle: t, styleSheet: n } = _e.get(e) ?? {};
1127
1118
  n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && e.adoptedStyleSheets.push(n));
1128
1119
  const o = W();
1129
1120
  switch (o.state) {
1130
1121
  case "active":
1131
1122
  case "hover": {
1132
- const r = Ft({
1123
+ const i = _t({
1133
1124
  cursorFlags: o.cursorFlags,
1134
- groups: o.hitRegions.map((u) => u.group),
1125
+ groups: o.hitRegions.map((l) => l.group),
1135
1126
  state: o.state
1136
- }), a = `*, *:hover {cursor: ${r} !important; }`;
1137
- if (t === a)
1127
+ }), s = `*, *:hover {cursor: ${i} !important; }`;
1128
+ if (t === s)
1138
1129
  return;
1139
- t = a, r ? n.cssRules.length === 0 ? n.insertRule(a) : n.replaceSync(a) : n.cssRules.length === 1 && n.deleteRule(0);
1130
+ t = s, i ? n.cssRules.length === 0 ? n.insertRule(s) : n.replaceSync(s) : n.cssRules.length === 1 && n.deleteRule(0);
1140
1131
  break;
1141
1132
  }
1142
1133
  case "inactive": {
@@ -1144,58 +1135,58 @@ function be(e) {
1144
1135
  break;
1145
1136
  }
1146
1137
  }
1147
- Fe.set(e, {
1138
+ _e.set(e, {
1148
1139
  prevStyle: t,
1149
1140
  styleSheet: n
1150
1141
  });
1151
1142
  }
1152
- function at({
1143
+ function st({
1153
1144
  document: e,
1154
1145
  event: t,
1155
1146
  hitRegions: n,
1156
1147
  initialLayoutMap: o,
1157
- mountedGroups: r,
1158
- pointerDownAtPoint: a,
1159
- prevCursorFlags: u
1148
+ mountedGroups: i,
1149
+ pointerDownAtPoint: s,
1150
+ prevCursorFlags: l
1160
1151
  }) {
1161
- let i = 0;
1162
- n.forEach((l) => {
1163
- const { group: c, groupSize: m } = l, { orientation: p, panels: v } = c, { disableCursor: x } = c.mutableState;
1152
+ let r = 0;
1153
+ n.forEach((u) => {
1154
+ const { group: c, groupSize: m } = u, { orientation: d, panels: v } = c, { disableCursor: x } = c.mutableState;
1164
1155
  let f = 0;
1165
- a ? p === "horizontal" ? f = (t.clientX - a.x) / m * 100 : f = (t.clientY - a.y) / m * 100 : p === "horizontal" ? f = t.clientX < 0 ? -100 : 100 : f = t.clientY < 0 ? -100 : 100;
1166
- const h = o.get(c), g = r.get(c);
1156
+ s ? d === "horizontal" ? f = (t.clientX - s.x) / m * 100 : f = (t.clientY - s.y) / m * 100 : d === "horizontal" ? f = t.clientX < 0 ? -100 : 100 : f = t.clientY < 0 ? -100 : 100;
1157
+ const h = o.get(c), g = i.get(c);
1167
1158
  if (!h || !g)
1168
1159
  return;
1169
1160
  const {
1170
1161
  defaultLayoutDeferred: y,
1171
1162
  derivedPanelConstraints: z,
1172
1163
  groupSize: S,
1173
- layout: d,
1164
+ layout: p,
1174
1165
  separatorToPanels: P
1175
1166
  } = g;
1176
- if (z && d && P) {
1177
- const R = re({
1167
+ if (z && p && P) {
1168
+ const R = se({
1178
1169
  delta: f,
1179
1170
  initialLayout: h,
1180
1171
  panelConstraints: z,
1181
- pivotIndices: l.panels.map((C) => v.indexOf(C)),
1182
- prevLayout: d,
1172
+ pivotIndices: u.panels.map((C) => v.indexOf(C)),
1173
+ prevLayout: p,
1183
1174
  trigger: "mouse-or-touch"
1184
1175
  });
1185
- if (j(R, d)) {
1176
+ if (j(R, p)) {
1186
1177
  if (f !== 0 && !x)
1187
- switch (p) {
1178
+ switch (d) {
1188
1179
  case "horizontal": {
1189
- i |= f < 0 ? nt : ot;
1180
+ r |= f < 0 ? nt : ot;
1190
1181
  break;
1191
1182
  }
1192
1183
  case "vertical": {
1193
- i |= f < 0 ? it : rt;
1184
+ r |= f < 0 ? it : rt;
1194
1185
  break;
1195
1186
  }
1196
1187
  }
1197
1188
  } else
1198
- F(l.group, {
1189
+ _(u.group, {
1199
1190
  defaultLayoutDeferred: y,
1200
1191
  derivedPanelConstraints: z,
1201
1192
  groupSize: S,
@@ -1204,14 +1195,14 @@ function at({
1204
1195
  });
1205
1196
  }
1206
1197
  });
1207
- let s = 0;
1208
- t.movementX === 0 ? s |= u & Ge : s |= i & Ge, t.movementY === 0 ? s |= u & Ae : s |= i & Ae, At(s), be(e);
1198
+ let a = 0;
1199
+ t.movementX === 0 ? a |= l & Ge : a |= r & Ge, t.movementY === 0 ? a |= l & Ae : a |= r & Ae, At(a), be(e);
1209
1200
  }
1210
- function _e(e) {
1201
+ function Fe(e) {
1211
1202
  const t = U(), n = W();
1212
1203
  switch (n.state) {
1213
1204
  case "active":
1214
- at({
1205
+ st({
1215
1206
  document: e.currentTarget,
1216
1207
  event: e,
1217
1208
  hitRegions: n.hitRegions,
@@ -1235,12 +1226,12 @@ function $e(e) {
1235
1226
  cursorFlags: 0,
1236
1227
  state: "inactive"
1237
1228
  }), t.hitRegions.forEach((o) => {
1238
- const r = $(o.group.id, !0);
1239
- F(o.group, r);
1229
+ const i = $(o.group.id, !0);
1230
+ _(o.group, i);
1240
1231
  });
1241
1232
  return;
1242
1233
  }
1243
- at({
1234
+ st({
1244
1235
  document: e.currentTarget,
1245
1236
  event: e,
1246
1237
  hitRegions: t.hitRegions,
@@ -1288,39 +1279,39 @@ function Ve(e) {
1288
1279
  state: "inactive"
1289
1280
  }), t.hitRegions.length > 0 && (be(e.currentTarget), t.hitRegions.forEach((n) => {
1290
1281
  const o = $(n.group.id, !0);
1291
- F(n.group, o);
1282
+ _(n.group, o);
1292
1283
  }), e.preventDefault());
1293
1284
  }
1294
1285
  }
1295
1286
  function je(e) {
1296
1287
  let t = 0, n = 0;
1297
1288
  const o = {};
1298
- for (const a of e)
1299
- if (a.defaultSize !== void 0) {
1289
+ for (const s of e)
1290
+ if (s.defaultSize !== void 0) {
1300
1291
  t++;
1301
- const u = D(a.defaultSize);
1302
- n += u, o[a.panelId] = u;
1292
+ const l = D(s.defaultSize);
1293
+ n += l, o[s.panelId] = l;
1303
1294
  } else
1304
- o[a.panelId] = void 0;
1305
- const r = e.length - t;
1306
- if (r !== 0) {
1307
- const a = D((100 - n) / r);
1308
- for (const u of e)
1309
- u.defaultSize === void 0 && (o[u.panelId] = a);
1295
+ o[s.panelId] = void 0;
1296
+ const i = e.length - t;
1297
+ if (i !== 0) {
1298
+ const s = D((100 - n) / i);
1299
+ for (const l of e)
1300
+ l.defaultSize === void 0 && (o[l.panelId] = s);
1310
1301
  }
1311
1302
  return o;
1312
1303
  }
1313
- function _t(e, t, n) {
1304
+ function Ft(e, t, n) {
1314
1305
  if (!n[0])
1315
1306
  return;
1316
- const r = e.panels.find((l) => l.element === t);
1317
- if (!r || !r.onResize)
1307
+ const i = e.panels.find((u) => u.element === t);
1308
+ if (!i || !i.onResize)
1318
1309
  return;
1319
- const a = Q({ group: e }), u = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, i = r.mutableValues.prevSize, s = {
1320
- asPercentage: D(u / a * 100),
1321
- inPixels: u
1310
+ const s = Q({ group: e }), l = e.orientation === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r = i.mutableValues.prevSize, a = {
1311
+ asPercentage: D(l / s * 100),
1312
+ inPixels: l
1322
1313
  };
1323
- r.mutableValues.prevSize = s, r.onResize(s, r.id, i);
1314
+ i.mutableValues.prevSize = a, i.onResize(a, i.id, r);
1324
1315
  }
1325
1316
  function $t(e, t) {
1326
1317
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -1338,53 +1329,53 @@ function Ht({
1338
1329
  }) {
1339
1330
  if (n <= 0 || t <= 0 || n === t)
1340
1331
  return o;
1341
- let r = 0, a = 0, u = !1;
1342
- const i = /* @__PURE__ */ new Map(), s = [];
1332
+ let i = 0, s = 0, l = !1;
1333
+ const r = /* @__PURE__ */ new Map(), a = [];
1343
1334
  for (const m of e.panels) {
1344
- const p = o[m.id] ?? 0;
1335
+ const d = o[m.id] ?? 0;
1345
1336
  switch (m.panelConstraints.groupResizeBehavior) {
1346
1337
  case "preserve-pixel-size": {
1347
- u = !0;
1348
- const v = p / 100 * n, x = D(
1338
+ l = !0;
1339
+ const v = d / 100 * n, x = D(
1349
1340
  v / t * 100
1350
1341
  );
1351
- i.set(m.id, x), r += x;
1342
+ r.set(m.id, x), i += x;
1352
1343
  break;
1353
1344
  }
1354
1345
  case "preserve-relative-size":
1355
1346
  default: {
1356
- s.push(m.id), a += p;
1347
+ a.push(m.id), s += d;
1357
1348
  break;
1358
1349
  }
1359
1350
  }
1360
1351
  }
1361
- if (!u || s.length === 0)
1352
+ if (!l || a.length === 0)
1362
1353
  return o;
1363
- const l = 100 - r, c = { ...o };
1364
- if (i.forEach((m, p) => {
1365
- c[p] = m;
1366
- }), a > 0)
1367
- for (const m of s) {
1368
- const p = o[m] ?? 0;
1354
+ const u = 100 - i, c = { ...o };
1355
+ if (r.forEach((m, d) => {
1356
+ c[d] = m;
1357
+ }), s > 0)
1358
+ for (const m of a) {
1359
+ const d = o[m] ?? 0;
1369
1360
  c[m] = D(
1370
- p / a * l
1361
+ d / s * u
1371
1362
  );
1372
1363
  }
1373
1364
  else {
1374
1365
  const m = D(
1375
- l / s.length
1366
+ u / a.length
1376
1367
  );
1377
- for (const p of s)
1378
- c[p] = m;
1368
+ for (const d of a)
1369
+ c[d] = m;
1379
1370
  }
1380
1371
  return c;
1381
1372
  }
1382
1373
  function Vt(e, t) {
1383
- const n = e.map((r) => r.id), o = Object.keys(t);
1374
+ const n = e.map((i) => i.id), o = Object.keys(t);
1384
1375
  if (n.length !== o.length)
1385
1376
  return !1;
1386
- for (const r of n)
1387
- if (!o.includes(r))
1377
+ for (const i of n)
1378
+ if (!o.includes(i))
1388
1379
  return !1;
1389
1380
  return !0;
1390
1381
  }
@@ -1395,7 +1386,7 @@ function jt(e) {
1395
1386
  e.element.ownerDocument.defaultView,
1396
1387
  "Cannot register an unmounted Group"
1397
1388
  );
1398
- const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = new n((f) => {
1389
+ const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = new n((f) => {
1399
1390
  for (const h of f) {
1400
1391
  const { borderBoxSize: g, target: y } = h;
1401
1392
  if (y === e.element) {
@@ -1406,82 +1397,82 @@ function jt(e) {
1406
1397
  const S = $(e.id);
1407
1398
  if (!S)
1408
1399
  return;
1409
- const d = ge(e), P = S.defaultLayoutDeferred ? je(d) : S.layout, R = Ht({
1400
+ const p = ge(e), P = S.defaultLayoutDeferred ? je(p) : S.layout, R = Ht({
1410
1401
  group: e,
1411
1402
  nextGroupSize: z,
1412
1403
  prevGroupSize: S.groupSize,
1413
1404
  prevLayout: P
1414
1405
  }), C = B({
1415
1406
  layout: R,
1416
- panelConstraints: d
1407
+ panelConstraints: p
1417
1408
  });
1418
1409
  if (!S.defaultLayoutDeferred && j(S.layout, C) && $t(
1419
1410
  S.derivedPanelConstraints,
1420
- d
1411
+ p
1421
1412
  ) && S.groupSize === z)
1422
1413
  return;
1423
- F(e, {
1414
+ _(e, {
1424
1415
  defaultLayoutDeferred: !1,
1425
- derivedPanelConstraints: d,
1416
+ derivedPanelConstraints: p,
1426
1417
  groupSize: z,
1427
1418
  layout: C,
1428
1419
  separatorToPanels: S.separatorToPanels
1429
1420
  });
1430
1421
  }
1431
1422
  } else
1432
- _t(e, y, g);
1423
+ Ft(e, y, g);
1433
1424
  }
1434
1425
  });
1435
- a.observe(e.element), e.panels.forEach((f) => {
1426
+ s.observe(e.element), e.panels.forEach((f) => {
1436
1427
  L(
1437
1428
  !o.has(f.id),
1438
1429
  `Panel ids must be unique; id "${f.id}" was used more than once`
1439
- ), o.add(f.id), f.onResize && a.observe(f.element);
1430
+ ), o.add(f.id), f.onResize && s.observe(f.element);
1440
1431
  });
1441
- const u = Q({ group: e }), i = ge(e), s = e.panels.map(({ id: f }) => f).join(",");
1442
- let l = e.mutableState.defaultLayout;
1443
- l && (Vt(e.panels, l) || (l = void 0));
1444
- const c = e.mutableState.layouts[s] ?? l ?? je(i), m = B({
1432
+ const l = Q({ group: e }), r = ge(e), a = e.panels.map(({ id: f }) => f).join(",");
1433
+ let u = e.mutableState.defaultLayout;
1434
+ u && (Vt(e.panels, u) || (u = void 0));
1435
+ const c = e.mutableState.layouts[a] ?? u ?? je(r), m = B({
1445
1436
  layout: c,
1446
- panelConstraints: i
1447
- }), p = e.element.ownerDocument;
1437
+ panelConstraints: r
1438
+ }), d = e.element.ownerDocument;
1448
1439
  q.set(
1449
- p,
1450
- (q.get(p) ?? 0) + 1
1440
+ d,
1441
+ (q.get(d) ?? 0) + 1
1451
1442
  );
1452
1443
  const v = /* @__PURE__ */ new Map();
1453
1444
  return Ye(e).forEach((f) => {
1454
1445
  f.separator && v.set(f.separator, f.panels);
1455
- }), F(e, {
1456
- defaultLayoutDeferred: u === 0,
1457
- derivedPanelConstraints: i,
1458
- groupSize: u,
1446
+ }), _(e, {
1447
+ defaultLayoutDeferred: l === 0,
1448
+ derivedPanelConstraints: r,
1449
+ groupSize: l,
1459
1450
  layout: m,
1460
1451
  separatorToPanels: v
1461
1452
  }), e.separators.forEach((f) => {
1462
1453
  L(
1463
- !r.has(f.id),
1454
+ !i.has(f.id),
1464
1455
  `Separator ids must be unique; id "${f.id}" was used more than once`
1465
- ), r.add(f.id), f.element.addEventListener("keydown", Te);
1466
- }), q.get(p) === 1 && (p.addEventListener("dblclick", De, !0), p.addEventListener("pointerdown", Oe, !0), p.addEventListener("pointerleave", _e), p.addEventListener("pointermove", $e), p.addEventListener("pointerout", He), p.addEventListener("pointerup", Ve, !0)), function() {
1456
+ ), i.add(f.id), f.element.addEventListener("keydown", Te);
1457
+ }), q.get(d) === 1 && (d.addEventListener("dblclick", De, !0), d.addEventListener("pointerdown", Oe, !0), d.addEventListener("pointerleave", Fe), d.addEventListener("pointermove", $e), d.addEventListener("pointerout", He), d.addEventListener("pointerup", Ve, !0)), function() {
1467
1458
  t = !1, q.set(
1468
- p,
1469
- Math.max(0, (q.get(p) ?? 0) - 1)
1459
+ d,
1460
+ Math.max(0, (q.get(d) ?? 0) - 1)
1470
1461
  ), Lt(e), e.separators.forEach((h) => {
1471
1462
  h.element.removeEventListener("keydown", Te);
1472
- }), q.get(p) || (p.removeEventListener(
1463
+ }), q.get(d) || (d.removeEventListener(
1473
1464
  "dblclick",
1474
1465
  De,
1475
1466
  !0
1476
- ), p.removeEventListener(
1467
+ ), d.removeEventListener(
1477
1468
  "pointerdown",
1478
1469
  Oe,
1479
1470
  !0
1480
- ), p.removeEventListener("pointerleave", _e), p.removeEventListener("pointermove", $e), p.removeEventListener("pointerout", He), p.removeEventListener("pointerup", Ve, !0)), a.disconnect();
1471
+ ), d.removeEventListener("pointerleave", Fe), d.removeEventListener("pointermove", $e), d.removeEventListener("pointerout", He), d.removeEventListener("pointerup", Ve, !0)), s.disconnect();
1481
1472
  };
1482
1473
  }
1483
1474
  function Bt() {
1484
- const [e, t] = ie({}), n = te(() => t({}), []);
1475
+ const [e, t] = re({}), n = ne(() => t({}), []);
1485
1476
  return [e, n];
1486
1477
  }
1487
1478
  function xe(e) {
@@ -1489,17 +1480,17 @@ function xe(e) {
1489
1480
  return `${e ?? t}`;
1490
1481
  }
1491
1482
  const K = typeof window < "u" ? Be : de;
1492
- function ne(e) {
1483
+ function oe(e) {
1493
1484
  const t = T(e);
1494
1485
  return K(() => {
1495
1486
  t.current = e;
1496
- }, [e]), te(
1487
+ }, [e]), ne(
1497
1488
  (...n) => t.current?.(...n),
1498
1489
  [t]
1499
1490
  );
1500
1491
  }
1501
1492
  function we(...e) {
1502
- return ne((t) => {
1493
+ return oe((t) => {
1503
1494
  e.forEach((n) => {
1504
1495
  if (n)
1505
1496
  switch (typeof n) {
@@ -1522,7 +1513,7 @@ function Pe(e) {
1522
1513
  t.current[n] = e[n];
1523
1514
  }, [e]), t.current;
1524
1515
  }
1525
- const st = ht(null);
1516
+ const at = ht(null);
1526
1517
  function Wt(e, t) {
1527
1518
  const n = T({
1528
1519
  getLayout: () => ({}),
@@ -1540,36 +1531,36 @@ function Ut({
1540
1531
  className: t,
1541
1532
  defaultLayout: n,
1542
1533
  disableCursor: o,
1543
- disabled: r,
1544
- elementRef: a,
1545
- groupRef: u,
1546
- id: i,
1547
- onLayoutChange: s,
1548
- onLayoutChanged: l,
1534
+ disabled: i,
1535
+ elementRef: s,
1536
+ groupRef: l,
1537
+ id: r,
1538
+ onLayoutChange: a,
1539
+ onLayoutChanged: u,
1549
1540
  orientation: c = "horizontal",
1550
1541
  resizeTargetMinimumSize: m = {
1551
1542
  coarse: 20,
1552
1543
  fine: 10
1553
1544
  },
1554
- style: p,
1545
+ style: d,
1555
1546
  ...v
1556
1547
  }) {
1557
1548
  const x = T({
1558
1549
  onLayoutChange: {},
1559
1550
  onLayoutChanged: {}
1560
- }), f = ne((b) => {
1561
- j(x.current.onLayoutChange, b) || (x.current.onLayoutChange = b, s?.(b));
1562
- }), h = ne((b) => {
1563
- j(x.current.onLayoutChanged, b) || (x.current.onLayoutChanged = b, l?.(b));
1564
- }), g = xe(i), y = T(null), [z, S] = Bt(), d = T({
1551
+ }), f = oe((b) => {
1552
+ j(x.current.onLayoutChange, b) || (x.current.onLayoutChange = b, a?.(b));
1553
+ }), h = oe((b) => {
1554
+ j(x.current.onLayoutChanged, b) || (x.current.onLayoutChanged = b, u?.(b));
1555
+ }), g = xe(r), y = T(null), [z, S] = Bt(), p = T({
1565
1556
  lastExpandedPanelSizes: {},
1566
1557
  layouts: {},
1567
1558
  panels: [],
1568
1559
  resizeTargetMinimumSize: m,
1569
1560
  separators: []
1570
- }), P = we(y, a);
1571
- Wt(g, u);
1572
- const R = ne(
1561
+ }), P = we(y, s);
1562
+ Wt(g, l);
1563
+ const R = oe(
1573
1564
  (b, w) => {
1574
1565
  const E = W(), M = Me(b), k = $(b);
1575
1566
  if (k) {
@@ -1603,7 +1594,7 @@ function Ut({
1603
1594
  id: g,
1604
1595
  orientation: c,
1605
1596
  registerPanel: (b) => {
1606
- const w = d.current;
1597
+ const w = p.current;
1607
1598
  return w.panels = Se(c, [
1608
1599
  ...w.panels,
1609
1600
  b
@@ -1614,7 +1605,7 @@ function Ut({
1614
1605
  };
1615
1606
  },
1616
1607
  registerSeparator: (b) => {
1617
- const w = d.current;
1608
+ const w = p.current;
1618
1609
  return w.separators = Se(c, [
1619
1610
  ...w.separators,
1620
1611
  b
@@ -1625,30 +1616,30 @@ function Ut({
1625
1616
  };
1626
1617
  },
1627
1618
  togglePanelDisabled: (b, w) => {
1628
- const M = d.current.panels.find(
1619
+ const M = p.current.panels.find(
1629
1620
  (H) => H.id === b
1630
1621
  );
1631
1622
  M && (M.panelConstraints.disabled = w);
1632
1623
  const k = Me(g), O = $(g);
1633
- k && O && F(k, {
1624
+ k && O && _(k, {
1634
1625
  ...O,
1635
1626
  derivedPanelConstraints: ge(k)
1636
1627
  });
1637
1628
  },
1638
1629
  toggleSeparatorDisabled: (b, w) => {
1639
- const M = d.current.separators.find(
1630
+ const M = p.current.separators.find(
1640
1631
  (k) => k.id === b
1641
1632
  );
1642
1633
  M && (M.disabled = w);
1643
1634
  }
1644
1635
  }),
1645
1636
  [R, g, S, c, C]
1646
- ), _ = T(null);
1637
+ ), F = T(null);
1647
1638
  return K(() => {
1648
1639
  const b = y.current;
1649
1640
  if (b === null)
1650
1641
  return;
1651
- const w = d.current;
1642
+ const w = p.current;
1652
1643
  let E;
1653
1644
  if (C.defaultLayout !== void 0 && Object.keys(C.defaultLayout).length === w.panels.length) {
1654
1645
  E = {};
@@ -1658,35 +1649,35 @@ function Ut({
1658
1649
  }
1659
1650
  }
1660
1651
  const M = {
1661
- disabled: !!r,
1652
+ disabled: !!i,
1662
1653
  element: b,
1663
1654
  id: g,
1664
1655
  mutableState: {
1665
1656
  defaultLayout: E,
1666
1657
  disableCursor: !!C.disableCursor,
1667
- expandedPanelSizes: d.current.lastExpandedPanelSizes,
1668
- layouts: d.current.layouts
1658
+ expandedPanelSizes: p.current.lastExpandedPanelSizes,
1659
+ layouts: p.current.layouts
1669
1660
  },
1670
1661
  orientation: c,
1671
1662
  panels: w.panels,
1672
1663
  resizeTargetMinimumSize: w.resizeTargetMinimumSize,
1673
1664
  separators: w.separators
1674
1665
  };
1675
- _.current = M;
1666
+ F.current = M;
1676
1667
  const k = jt(M), { defaultLayoutDeferred: O, derivedPanelConstraints: H, layout: Ce } = $(M.id, !0);
1677
1668
  !O && H.length > 0 && (f(Ce), h(Ce));
1678
1669
  const lt = ye(g, (ee) => {
1679
- const { defaultLayoutDeferred: ae, derivedPanelConstraints: Re, layout: se } = ee.next;
1670
+ const { defaultLayoutDeferred: ae, derivedPanelConstraints: Re, layout: le } = ee.next;
1680
1671
  if (ae || Re.length === 0)
1681
1672
  return;
1682
1673
  const ut = M.panels.map(({ id: N }) => N).join(",");
1683
- M.mutableState.layouts[ut] = se, Re.forEach((N) => {
1674
+ M.mutableState.layouts[ut] = le, Re.forEach((N) => {
1684
1675
  if (N.collapsible) {
1685
1676
  const { layout: pe } = ee.prev ?? {};
1686
1677
  if (pe) {
1687
1678
  const ft = I(
1688
1679
  N.collapsedSize,
1689
- se[N.panelId]
1680
+ le[N.panelId]
1690
1681
  ), dt = I(
1691
1682
  N.collapsedSize,
1692
1683
  pe[N.panelId]
@@ -1696,13 +1687,13 @@ function Ut({
1696
1687
  }
1697
1688
  });
1698
1689
  const ct = W().state !== "active";
1699
- f(se), ct && h(se);
1690
+ f(le), ct && h(le);
1700
1691
  });
1701
1692
  return () => {
1702
- _.current = null, k(), lt();
1693
+ F.current = null, k(), lt();
1703
1694
  };
1704
1695
  }, [
1705
- r,
1696
+ i,
1706
1697
  g,
1707
1698
  h,
1708
1699
  f,
@@ -1710,9 +1701,9 @@ function Ut({
1710
1701
  z,
1711
1702
  C
1712
1703
  ]), de(() => {
1713
- const b = _.current;
1704
+ const b = F.current;
1714
1705
  b && (b.mutableState.defaultLayout = n, b.mutableState.disableCursor = !!o);
1715
- }), /* @__PURE__ */ oe(st.Provider, { value: X, children: /* @__PURE__ */ oe(
1706
+ }), /* @__PURE__ */ ie(at.Provider, { value: X, children: /* @__PURE__ */ ie(
1716
1707
  "div",
1717
1708
  {
1718
1709
  ...v,
@@ -1725,7 +1716,7 @@ function Ut({
1725
1716
  height: "100%",
1726
1717
  width: "100%",
1727
1718
  overflow: "hidden",
1728
- ...p,
1719
+ ...d,
1729
1720
  display: "flex",
1730
1721
  flexDirection: c === "horizontal" ? "row" : "column",
1731
1722
  flexWrap: "nowrap",
@@ -1749,35 +1740,35 @@ function nn({
1749
1740
  storage: n = localStorage,
1750
1741
  ...o
1751
1742
  }) {
1752
- const r = t !== void 0, a = "id" in o ? o.id : o.groupId, u = me(a, t ?? []), i = Ke(
1743
+ const i = t !== void 0, s = "id" in o ? o.id : o.groupId, l = me(s, t ?? []), r = Ke(
1753
1744
  Kt,
1754
- () => n.getItem(u),
1755
- () => n.getItem(u)
1756
- ), s = Ue(
1757
- () => i ? JSON.parse(i) : void 0,
1758
- [i]
1759
- ), l = T(null), c = te(() => {
1760
- const v = l.current;
1761
- v && (l.current = null, clearTimeout(v));
1745
+ () => n.getItem(l),
1746
+ () => n.getItem(l)
1747
+ ), a = Ue(
1748
+ () => r ? JSON.parse(r) : void 0,
1749
+ [r]
1750
+ ), u = T(null), c = ne(() => {
1751
+ const v = u.current;
1752
+ v && (u.current = null, clearTimeout(v));
1762
1753
  }, []);
1763
1754
  Be(() => () => {
1764
1755
  c();
1765
1756
  }, [c]);
1766
- const m = te(
1757
+ const m = ne(
1767
1758
  (v) => {
1768
1759
  c();
1769
1760
  let x;
1770
- r ? x = me(a, Object.keys(v)) : x = me(a, []);
1761
+ i ? x = me(s, Object.keys(v)) : x = me(s, []);
1771
1762
  try {
1772
1763
  n.setItem(x, JSON.stringify(v));
1773
1764
  } catch (f) {
1774
1765
  console.error(f);
1775
1766
  }
1776
1767
  },
1777
- [c, r, a, n]
1778
- ), p = te(
1768
+ [c, i, s, n]
1769
+ ), d = ne(
1779
1770
  (v) => {
1780
- c(), e === 0 ? m(v) : l.current = setTimeout(() => {
1771
+ c(), e === 0 ? m(v) : u.current = setTimeout(() => {
1781
1772
  m(v);
1782
1773
  }, e);
1783
1774
  },
@@ -1787,13 +1778,13 @@ function nn({
1787
1778
  /**
1788
1779
  * Pass this value to `Group` as the `defaultLayout` prop.
1789
1780
  */
1790
- defaultLayout: s,
1781
+ defaultLayout: a,
1791
1782
  /**
1792
1783
  * Attach this callback on the `Group` as the `onLayoutChange` prop.
1793
1784
  *
1794
1785
  * @deprecated Use the {@link onLayoutChanged} prop instead.
1795
1786
  */
1796
- onLayoutChange: p,
1787
+ onLayoutChange: d,
1797
1788
  /**
1798
1789
  * Attach this callback on the `Group` as the `onLayoutChanged` prop.
1799
1790
  */
@@ -1805,13 +1796,13 @@ function Kt() {
1805
1796
  };
1806
1797
  }
1807
1798
  function on() {
1808
- return ie(null);
1799
+ return re(null);
1809
1800
  }
1810
1801
  function rn() {
1811
1802
  return T(null);
1812
1803
  }
1813
1804
  function Le() {
1814
- const e = mt(st);
1805
+ const e = mt(at);
1815
1806
  return L(
1816
1807
  e,
1817
1808
  "Group Context not found; did you render a Panel or Separator outside of a Group?"
@@ -1840,29 +1831,29 @@ function qt({
1840
1831
  className: t,
1841
1832
  collapsedSize: n = "0%",
1842
1833
  collapsible: o = !1,
1843
- defaultSize: r,
1844
- disabled: a,
1845
- elementRef: u,
1846
- groupResizeBehavior: i = "preserve-relative-size",
1847
- id: s,
1848
- maxSize: l = "100%",
1834
+ defaultSize: i,
1835
+ disabled: s,
1836
+ elementRef: l,
1837
+ groupResizeBehavior: r = "preserve-relative-size",
1838
+ id: a,
1839
+ maxSize: u = "100%",
1849
1840
  minSize: c = "0%",
1850
1841
  onResize: m,
1851
- panelRef: p,
1842
+ panelRef: d,
1852
1843
  style: v,
1853
1844
  ...x
1854
1845
  }) {
1855
- const f = !!s, h = xe(s), g = Pe({
1856
- disabled: a
1857
- }), y = T(null), z = we(y, u), {
1846
+ const f = !!a, h = xe(a), g = Pe({
1847
+ disabled: s
1848
+ }), y = T(null), z = we(y, l), {
1858
1849
  getPanelStyles: S,
1859
- id: d,
1850
+ id: p,
1860
1851
  orientation: P,
1861
1852
  registerPanel: R,
1862
1853
  togglePanelDisabled: C
1863
- } = Le(), X = m !== null, _ = ne(
1854
+ } = Le(), X = m !== null, F = oe(
1864
1855
  (w, E, M) => {
1865
- m?.(w, s, M);
1856
+ m?.(w, a, M);
1866
1857
  }
1867
1858
  );
1868
1859
  K(() => {
@@ -1876,47 +1867,47 @@ function qt({
1876
1867
  expandToSize: void 0,
1877
1868
  prevSize: void 0
1878
1869
  },
1879
- onResize: X ? _ : void 0,
1870
+ onResize: X ? F : void 0,
1880
1871
  panelConstraints: {
1881
- groupResizeBehavior: i,
1872
+ groupResizeBehavior: r,
1882
1873
  collapsedSize: n,
1883
1874
  collapsible: o,
1884
- defaultSize: r,
1875
+ defaultSize: i,
1885
1876
  disabled: g.disabled,
1886
- maxSize: l,
1877
+ maxSize: u,
1887
1878
  minSize: c
1888
1879
  }
1889
1880
  };
1890
1881
  return R(E);
1891
1882
  }
1892
1883
  }, [
1893
- i,
1884
+ r,
1894
1885
  n,
1895
1886
  o,
1896
- r,
1887
+ i,
1897
1888
  X,
1898
1889
  h,
1899
1890
  f,
1900
- l,
1891
+ u,
1901
1892
  c,
1902
- _,
1893
+ F,
1903
1894
  R,
1904
1895
  g
1905
1896
  ]), de(() => {
1906
- C(h, !!a);
1907
- }, [a, h, C]), Xt(h, p);
1897
+ C(h, !!s);
1898
+ }, [s, h, C]), Xt(h, d);
1908
1899
  const b = Ke(
1909
- (w) => ye(d, w),
1900
+ (w) => ye(p, w),
1910
1901
  // useSyncExternalStore does not support a custom equality check
1911
1902
  // stringify avoids re-rendering when the style value hasn't changed
1912
- () => JSON.stringify(S(d, h)),
1913
- () => JSON.stringify(S(d, h))
1903
+ () => JSON.stringify(S(p, h)),
1904
+ () => JSON.stringify(S(p, h))
1914
1905
  );
1915
- return /* @__PURE__ */ oe(
1906
+ return /* @__PURE__ */ ie(
1916
1907
  "div",
1917
1908
  {
1918
1909
  ...x,
1919
- "aria-disabled": a || void 0,
1910
+ "aria-disabled": s || void 0,
1920
1911
  "data-panel": !0,
1921
1912
  "data-testid": h,
1922
1913
  id: h,
@@ -1929,7 +1920,7 @@ function qt({
1929
1920
  overflow: "visible",
1930
1921
  ...JSON.parse(b)
1931
1922
  },
1932
- children: /* @__PURE__ */ oe(
1923
+ children: /* @__PURE__ */ ie(
1933
1924
  "div",
1934
1925
  {
1935
1926
  className: t,
@@ -1964,10 +1955,10 @@ const Yt = {
1964
1955
  padding: 0,
1965
1956
  margin: 0
1966
1957
  };
1967
- function an() {
1968
- return ie(null);
1969
- }
1970
1958
  function sn() {
1959
+ return re(null);
1960
+ }
1961
+ function an() {
1971
1962
  return T(null);
1972
1963
  }
1973
1964
  function Jt({
@@ -1976,24 +1967,24 @@ function Jt({
1976
1967
  panelId: n,
1977
1968
  panelIndex: o
1978
1969
  }) {
1979
- let r, a;
1980
- const u = e[n], i = t.find(
1981
- (s) => s.panelId === n
1970
+ let i, s;
1971
+ const l = e[n], r = t.find(
1972
+ (a) => a.panelId === n
1982
1973
  );
1983
- if (i) {
1984
- const s = i.maxSize, l = i.collapsible ? i.collapsedSize : i.minSize, c = [o, o + 1];
1985
- a = B({
1986
- layout: re({
1987
- delta: l - u,
1974
+ if (r) {
1975
+ const a = r.maxSize, u = r.collapsible ? r.collapsedSize : r.minSize, c = [o, o + 1];
1976
+ s = B({
1977
+ layout: se({
1978
+ delta: u - l,
1988
1979
  initialLayout: e,
1989
1980
  panelConstraints: t,
1990
1981
  pivotIndices: c,
1991
1982
  prevLayout: e
1992
1983
  }),
1993
1984
  panelConstraints: t
1994
- })[n], r = B({
1995
- layout: re({
1996
- delta: s - u,
1985
+ })[n], i = B({
1986
+ layout: se({
1987
+ delta: a - l,
1997
1988
  initialLayout: e,
1998
1989
  panelConstraints: t,
1999
1990
  pivotIndices: c,
@@ -2004,9 +1995,9 @@ function Jt({
2004
1995
  }
2005
1996
  return {
2006
1997
  valueControls: n,
2007
- valueMax: r,
2008
- valueMin: a,
2009
- valueNow: u
1998
+ valueMax: i,
1999
+ valueMin: s,
2000
+ valueNow: l
2010
2001
  };
2011
2002
  }
2012
2003
  function Zt({
@@ -2014,13 +2005,13 @@ function Zt({
2014
2005
  className: t,
2015
2006
  disabled: n,
2016
2007
  elementRef: o,
2017
- id: r,
2018
- style: a,
2019
- ...u
2008
+ id: i,
2009
+ style: s,
2010
+ ...l
2020
2011
  }) {
2021
- const i = xe(r), s = Pe({
2012
+ const r = xe(i), a = Pe({
2022
2013
  disabled: n
2023
- }), [l, c] = ie({}), [m, p] = ie("inactive"), v = T(null), x = we(v, o), {
2014
+ }), [u, c] = re({}), [m, d] = re("inactive"), v = T(null), x = we(v, o), {
2024
2015
  disableCursor: f,
2025
2016
  id: h,
2026
2017
  orientation: g,
@@ -2031,18 +2022,18 @@ function Zt({
2031
2022
  const P = v.current;
2032
2023
  if (P !== null) {
2033
2024
  const R = {
2034
- disabled: s.disabled,
2025
+ disabled: a.disabled,
2035
2026
  element: P,
2036
- id: i
2027
+ id: r
2037
2028
  }, C = y(R), X = Gt(
2038
2029
  (b) => {
2039
- p(
2030
+ d(
2040
2031
  b.next.state !== "inactive" && b.next.hitRegions.some(
2041
2032
  (w) => w.separator === R
2042
2033
  ) ? b.next.state : "inactive"
2043
2034
  );
2044
2035
  }
2045
- ), _ = ye(
2036
+ ), F = ye(
2046
2037
  h,
2047
2038
  (b) => {
2048
2039
  const { derivedPanelConstraints: w, layout: E, separatorToPanels: M } = b.next, k = M.get(R);
@@ -2060,34 +2051,34 @@ function Zt({
2060
2051
  }
2061
2052
  );
2062
2053
  return () => {
2063
- X(), _(), C();
2054
+ X(), F(), C();
2064
2055
  };
2065
2056
  }
2066
- }, [h, i, y, s]), de(() => {
2067
- z(i, !!n);
2068
- }, [n, i, z]);
2069
- let d;
2070
- return n && !f && (d = "not-allowed"), /* @__PURE__ */ oe(
2057
+ }, [h, r, y, a]), de(() => {
2058
+ z(r, !!n);
2059
+ }, [n, r, z]);
2060
+ let p;
2061
+ return n && !f && (p = "not-allowed"), /* @__PURE__ */ ie(
2071
2062
  "div",
2072
2063
  {
2073
- ...u,
2074
- "aria-controls": l.valueControls,
2064
+ ...l,
2065
+ "aria-controls": u.valueControls,
2075
2066
  "aria-disabled": n || void 0,
2076
2067
  "aria-orientation": S,
2077
- "aria-valuemax": l.valueMax,
2078
- "aria-valuemin": l.valueMin,
2079
- "aria-valuenow": l.valueNow,
2068
+ "aria-valuemax": u.valueMax,
2069
+ "aria-valuemin": u.valueMin,
2070
+ "aria-valuenow": u.valueNow,
2080
2071
  children: e,
2081
2072
  className: t,
2082
2073
  "data-separator": n ? "disabled" : m,
2083
- "data-testid": i,
2084
- id: i,
2074
+ "data-testid": r,
2075
+ id: r,
2085
2076
  ref: x,
2086
2077
  role: "separator",
2087
2078
  style: {
2088
2079
  flexBasis: "auto",
2089
- cursor: d,
2090
- ...a,
2080
+ cursor: p,
2081
+ ...s,
2091
2082
  flexGrow: 0,
2092
2083
  flexShrink: 0,
2093
2084
  // Inform the browser that the library is handling touch events for this element
@@ -2107,7 +2098,7 @@ export {
2107
2098
  nn as useDefaultLayout,
2108
2099
  on as useGroupCallbackRef,
2109
2100
  rn as useGroupRef,
2110
- an as usePanelCallbackRef,
2111
- sn as usePanelRef
2101
+ sn as usePanelCallbackRef,
2102
+ an as usePanelRef
2112
2103
  };
2113
2104
  //# sourceMappingURL=react-resizable-panels.js.map