react-resizable-panels 4.14.3 → 4.14.4
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,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useId as
|
|
4
|
-
function
|
|
5
|
-
const t =
|
|
2
|
+
import { jsx as X, jsxs as Cn } from "react/jsx-runtime";
|
|
3
|
+
import { useId as Rn, useLayoutEffect as Qt, useEffect as He, useRef as B, useCallback as re, createContext as en, useContext as tn, useState as he, useMemo as Pe, useImperativeHandle as dt, useSyncExternalStore as Qe, Children as En, isValidElement as nn } from "react";
|
|
4
|
+
function De(e) {
|
|
5
|
+
const t = Rn();
|
|
6
6
|
return `${e ?? t}`;
|
|
7
7
|
}
|
|
8
|
-
const ne = typeof window < "u" ?
|
|
9
|
-
function
|
|
8
|
+
const ne = typeof window < "u" ? Qt : He;
|
|
9
|
+
function ye(e) {
|
|
10
10
|
const t = B(e);
|
|
11
11
|
return ne(() => {
|
|
12
12
|
t.current = e;
|
|
@@ -15,8 +15,8 @@ function ge(e) {
|
|
|
15
15
|
[t]
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function Ve(...e) {
|
|
19
|
+
return ye((t) => {
|
|
20
20
|
e.forEach((n) => {
|
|
21
21
|
if (n)
|
|
22
22
|
switch (typeof n) {
|
|
@@ -32,20 +32,20 @@ function qe(...e) {
|
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function at(e, t) {
|
|
36
36
|
return t ? e * 2 + 1 : e + 1;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Mn(e, t) {
|
|
39
39
|
return t ? e * 2 - 1 : e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const o =
|
|
43
|
-
return t === void 0 ? `${o} / -1` : `${o} / span ${
|
|
41
|
+
function zt(e, t, n) {
|
|
42
|
+
const o = at(e, n);
|
|
43
|
+
return t === void 0 ? `${o} / -1` : `${o} / span ${Mn(t, n)}`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Pn(e) {
|
|
46
46
|
return `${e * 2} / span 1`;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Tn({
|
|
49
49
|
crossCount: e,
|
|
50
50
|
crossSpan: t,
|
|
51
51
|
crossStart: n,
|
|
@@ -54,25 +54,25 @@ function bn({
|
|
|
54
54
|
const r = t === void 0 ? e : n + t;
|
|
55
55
|
if (n === 0 && r === e)
|
|
56
56
|
return "1 / -1";
|
|
57
|
-
let i =
|
|
57
|
+
let i = at(n, o), s = at(r - 1, o) + 1;
|
|
58
58
|
return o && (n > 0 && i--, r < e && s++), `${i} / ${s}`;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function ft(e, t) {
|
|
61
61
|
return Number.isInteger(e) && e >= 1 && e < t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function O(e, t = "Assertion error") {
|
|
64
64
|
if (!e)
|
|
65
65
|
throw Error(t);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
function
|
|
69
|
-
const e =
|
|
70
|
-
return
|
|
67
|
+
const on = en(null);
|
|
68
|
+
function rn() {
|
|
69
|
+
const e = tn(on);
|
|
70
|
+
return O(
|
|
71
71
|
e,
|
|
72
72
|
"Grid Context not found; did you render a Cell or Gridline outside of a Grid?"
|
|
73
73
|
), e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Dn({
|
|
76
76
|
children: e,
|
|
77
77
|
className: t,
|
|
78
78
|
column: n,
|
|
@@ -80,30 +80,30 @@ function xn({
|
|
|
80
80
|
elementRef: r,
|
|
81
81
|
id: i,
|
|
82
82
|
row: s,
|
|
83
|
-
rowSpan:
|
|
83
|
+
rowSpan: c = 1,
|
|
84
84
|
style: a,
|
|
85
|
-
...
|
|
85
|
+
...u
|
|
86
86
|
}) {
|
|
87
|
-
const
|
|
87
|
+
const l = De(i), { gutters: d, registerCell: g } = rn(), p = B(null), m = Ve(p, r);
|
|
88
88
|
return ne(() => {
|
|
89
|
-
const f =
|
|
89
|
+
const f = p.current;
|
|
90
90
|
if (f !== null)
|
|
91
|
-
return
|
|
91
|
+
return g({
|
|
92
92
|
column: n,
|
|
93
93
|
columnSpan: o,
|
|
94
94
|
element: f,
|
|
95
|
-
id:
|
|
95
|
+
id: l,
|
|
96
96
|
row: s,
|
|
97
|
-
rowSpan:
|
|
97
|
+
rowSpan: c
|
|
98
98
|
});
|
|
99
|
-
}, [n, o,
|
|
99
|
+
}, [n, o, l, g, s, c]), /* @__PURE__ */ X(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
|
-
...
|
|
102
|
+
...u,
|
|
103
103
|
className: t,
|
|
104
104
|
"data-cell": !0,
|
|
105
|
-
"data-testid":
|
|
106
|
-
id:
|
|
105
|
+
"data-testid": l,
|
|
106
|
+
id: l,
|
|
107
107
|
ref: m,
|
|
108
108
|
style: {
|
|
109
109
|
overflow: "auto",
|
|
@@ -111,24 +111,24 @@ function xn({
|
|
|
111
111
|
// Allow cells to shrink smaller than their content
|
|
112
112
|
minHeight: 0,
|
|
113
113
|
minWidth: 0,
|
|
114
|
-
gridColumn:
|
|
115
|
-
gridRow:
|
|
114
|
+
gridColumn: zt(n, o, d.column),
|
|
115
|
+
gridRow: zt(s, c, d.row)
|
|
116
116
|
},
|
|
117
117
|
children: e
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
function
|
|
124
|
-
return
|
|
121
|
+
Dn.displayName = "Cell";
|
|
122
|
+
let Ye;
|
|
123
|
+
function kn() {
|
|
124
|
+
return Ye === void 0 && (typeof matchMedia == "function" ? Ye = !!matchMedia("(pointer:coarse)").matches : Ye = !1), Ye;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function ct({
|
|
127
127
|
expandHitTargets: e,
|
|
128
128
|
axis: t,
|
|
129
129
|
rect: n
|
|
130
130
|
}) {
|
|
131
|
-
const o = e ?
|
|
131
|
+
const o = e ? kn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
132
132
|
if (n.width < o) {
|
|
133
133
|
const r = o - n.width;
|
|
134
134
|
n = new DOMRect(
|
|
@@ -149,7 +149,7 @@ function ot({
|
|
|
149
149
|
}
|
|
150
150
|
return n;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function It({
|
|
153
153
|
axis: e,
|
|
154
154
|
cells: t,
|
|
155
155
|
index: n,
|
|
@@ -157,25 +157,25 @@ function gt({
|
|
|
157
157
|
}) {
|
|
158
158
|
let r = [o];
|
|
159
159
|
for (const i of t) {
|
|
160
|
-
const s = e === "column" ? i.column : i.row,
|
|
161
|
-
if (s >= n || s +
|
|
160
|
+
const s = e === "column" ? i.column : i.row, c = e === "column" ? i.columnSpan : i.rowSpan;
|
|
161
|
+
if (s >= n || s + c <= n)
|
|
162
162
|
continue;
|
|
163
|
-
const a = i.element.getBoundingClientRect(),
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
163
|
+
const a = i.element.getBoundingClientRect(), u = e === "column" ? a.top : a.left, l = e === "column" ? a.bottom : a.right;
|
|
164
|
+
l <= u || (r = r.flatMap((d) => {
|
|
165
|
+
const g = e === "column" ? d.top : d.left, p = e === "column" ? d.bottom : d.right;
|
|
166
|
+
if (u >= p || l <= g)
|
|
167
167
|
return [d];
|
|
168
|
-
const m = [], f = (
|
|
168
|
+
const m = [], f = (y, h) => {
|
|
169
169
|
m.push(
|
|
170
|
-
e === "column" ? new DOMRect(d.x,
|
|
170
|
+
e === "column" ? new DOMRect(d.x, y, d.width, h - y) : new DOMRect(y, d.y, h - y, d.height)
|
|
171
171
|
);
|
|
172
172
|
};
|
|
173
|
-
return
|
|
173
|
+
return g < u && f(g, u), p > l && f(l, p), m;
|
|
174
174
|
}));
|
|
175
175
|
}
|
|
176
176
|
return r;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function An({
|
|
179
179
|
axis: e,
|
|
180
180
|
cells: t,
|
|
181
181
|
crossTrackCount: n,
|
|
@@ -183,15 +183,15 @@ function zn({
|
|
|
183
183
|
resizeAxis: r,
|
|
184
184
|
axisSize: i,
|
|
185
185
|
includeDisabled: s,
|
|
186
|
-
separatorPlacements:
|
|
186
|
+
separatorPlacements: c
|
|
187
187
|
}) {
|
|
188
|
-
const { items: a, separators:
|
|
189
|
-
let d = -1,
|
|
188
|
+
const { items: a, separators: u } = r, l = a.length;
|
|
189
|
+
let d = -1, g = -1, p = 0;
|
|
190
190
|
if (a.forEach((b, w) => {
|
|
191
|
-
b.constraintProps.disabled || (
|
|
192
|
-
}), !s &&
|
|
191
|
+
b.constraintProps.disabled || (p++, d === -1 && (d = w), g = w);
|
|
192
|
+
}), !s && p < 2)
|
|
193
193
|
return [];
|
|
194
|
-
const m = (b) => s || b > d && b <=
|
|
194
|
+
const m = (b) => s || b > d && b <= g, f = [], y = (b, w, v) => ({
|
|
195
195
|
axis: r,
|
|
196
196
|
axisSize: i,
|
|
197
197
|
items: [a[b - 1], a[b]],
|
|
@@ -200,65 +200,65 @@ function zn({
|
|
|
200
200
|
}), h = (b, w) => {
|
|
201
201
|
let v;
|
|
202
202
|
for (const T of t) {
|
|
203
|
-
const
|
|
204
|
-
if (w === "start" ?
|
|
205
|
-
const
|
|
203
|
+
const A = e === "column" ? T.row : T.column, E = e === "column" ? T.rowSpan : T.columnSpan;
|
|
204
|
+
if (w === "start" ? A === b : A + E - 1 === b) {
|
|
205
|
+
const D = T.element.getBoundingClientRect();
|
|
206
206
|
if (w === "start") {
|
|
207
|
-
const
|
|
208
|
-
v = v === void 0 ?
|
|
207
|
+
const C = e === "column" ? D.top : D.left;
|
|
208
|
+
v = v === void 0 ? C : Math.min(v, C);
|
|
209
209
|
} else {
|
|
210
|
-
const
|
|
211
|
-
v = v === void 0 ?
|
|
210
|
+
const C = e === "column" ? D.bottom : D.right;
|
|
211
|
+
v = v === void 0 ? C : Math.max(v, C);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
return v;
|
|
216
|
-
},
|
|
217
|
-
for (const b of
|
|
218
|
-
const w =
|
|
219
|
-
if (!w || w.index < 1 || w.index >=
|
|
216
|
+
}, S = /* @__PURE__ */ new Set();
|
|
217
|
+
for (const b of u) {
|
|
218
|
+
const w = c.get(b);
|
|
219
|
+
if (!w || w.index < 1 || w.index >= l || (S.add(w.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !m(w.index))
|
|
220
220
|
continue;
|
|
221
221
|
let v = b.element.getBoundingClientRect();
|
|
222
|
-
const { crossSpan: T, crossStart:
|
|
223
|
-
let
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
226
|
-
|
|
222
|
+
const { crossSpan: T, crossStart: A } = w, E = T === void 0 ? n : A + T;
|
|
223
|
+
let D = e === "column" ? v.top : v.left, C = e === "column" ? v.bottom : v.right;
|
|
224
|
+
if (A > 0) {
|
|
225
|
+
const I = h(A - 1, "end");
|
|
226
|
+
I !== void 0 && I < D && (D = I);
|
|
227
227
|
}
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
|
|
228
|
+
if (E < n) {
|
|
229
|
+
const I = h(E, "start");
|
|
230
|
+
I !== void 0 && I > C && (C = I);
|
|
231
231
|
}
|
|
232
|
-
v = e === "column" ? new DOMRect(v.x,
|
|
232
|
+
v = e === "column" ? new DOMRect(v.x, D, v.width, C - D) : new DOMRect(D, v.y, C - D, v.height), v = ct({ expandHitTargets: o, axis: r, rect: v }), s ? f.push(y(w.index, v, b)) : It({
|
|
233
233
|
axis: e,
|
|
234
234
|
cells: t,
|
|
235
235
|
index: w.index,
|
|
236
236
|
rect: v
|
|
237
|
-
}).forEach((
|
|
238
|
-
f.push(
|
|
237
|
+
}).forEach((I) => {
|
|
238
|
+
f.push(y(w.index, I, b));
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
const
|
|
242
|
-
|
|
241
|
+
const z = (b, w) => {
|
|
242
|
+
It({
|
|
243
243
|
axis: e,
|
|
244
244
|
cells: t,
|
|
245
245
|
index: b,
|
|
246
|
-
rect:
|
|
246
|
+
rect: ct({ expandHitTargets: o, axis: r, rect: w })
|
|
247
247
|
}).forEach((v) => {
|
|
248
|
-
f.push(
|
|
248
|
+
f.push(y(b, v));
|
|
249
249
|
});
|
|
250
250
|
}, x = Array.from(
|
|
251
251
|
{ length: n },
|
|
252
|
-
() => new Array(
|
|
252
|
+
() => new Array(l)
|
|
253
253
|
);
|
|
254
254
|
for (const b of t) {
|
|
255
|
-
const [w, v, T,
|
|
256
|
-
for (let
|
|
257
|
-
for (let
|
|
258
|
-
x[
|
|
255
|
+
const [w, v, T, A] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
|
|
256
|
+
for (let E = Math.max(0, T); E < Math.min(n, T + A); E++)
|
|
257
|
+
for (let D = Math.max(0, w); D < Math.min(l, w + v); D++)
|
|
258
|
+
x[E][D] ??= b;
|
|
259
259
|
}
|
|
260
|
-
const
|
|
261
|
-
let w =
|
|
260
|
+
const R = /* @__PURE__ */ new Map(), N = (b) => {
|
|
261
|
+
let w = R.get(b);
|
|
262
262
|
if (!w) {
|
|
263
263
|
const v = b.element.getBoundingClientRect();
|
|
264
264
|
w = e === "column" ? {
|
|
@@ -271,48 +271,48 @@ function zn({
|
|
|
271
271
|
crossStart: v.left,
|
|
272
272
|
end: v.bottom,
|
|
273
273
|
start: v.top
|
|
274
|
-
},
|
|
274
|
+
}, R.set(b, w);
|
|
275
275
|
}
|
|
276
276
|
return w;
|
|
277
|
-
},
|
|
278
|
-
for (let b = 1; b <
|
|
279
|
-
if (
|
|
277
|
+
}, $ = ({ crossEnd: b, crossStart: w, end: v, start: T }) => e === "column" ? new DOMRect(T, w, v - T, b - w) : new DOMRect(w, T, b - w, v - T);
|
|
278
|
+
for (let b = 1; b < l; b++) {
|
|
279
|
+
if (S.has(b) || !m(b))
|
|
280
280
|
continue;
|
|
281
281
|
let w;
|
|
282
282
|
for (let v = 0; v < n; v++) {
|
|
283
|
-
const T = x[v][b - 1],
|
|
284
|
-
let
|
|
285
|
-
if ((T ||
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
const T = x[v][b - 1], A = x[v][b];
|
|
284
|
+
let E;
|
|
285
|
+
if ((T || A) && T !== A) {
|
|
286
|
+
const D = T ? N(T) : void 0, C = A ? N(A) : void 0, I = D?.end ?? C.start, M = C?.start ?? D.end, q = Math.max(
|
|
287
|
+
D?.crossStart ?? -1 / 0,
|
|
288
|
+
C?.crossStart ?? -1 / 0
|
|
289
289
|
), J = Math.min(
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
D?.crossEnd ?? 1 / 0,
|
|
291
|
+
C?.crossEnd ?? 1 / 0
|
|
292
292
|
);
|
|
293
|
-
|
|
293
|
+
E = {
|
|
294
294
|
crossEnd: Math.max(q, J),
|
|
295
295
|
crossStart: q,
|
|
296
|
-
end: Math.max(
|
|
297
|
-
start: Math.min(
|
|
296
|
+
end: Math.max(I, M),
|
|
297
|
+
start: Math.min(I, M)
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
crossEnd: Math.max(w.crossEnd,
|
|
302
|
-
crossStart: Math.min(w.crossStart,
|
|
303
|
-
end: Math.max(w.end,
|
|
304
|
-
start: Math.min(w.start,
|
|
305
|
-
} :
|
|
306
|
-
}
|
|
307
|
-
w &&
|
|
300
|
+
E ? w = w ? {
|
|
301
|
+
crossEnd: Math.max(w.crossEnd, E.crossEnd),
|
|
302
|
+
crossStart: Math.min(w.crossStart, E.crossStart),
|
|
303
|
+
end: Math.max(w.end, E.end),
|
|
304
|
+
start: Math.min(w.start, E.start)
|
|
305
|
+
} : E : w && (z(b, $(w)), w = void 0);
|
|
306
|
+
}
|
|
307
|
+
w && z(b, $(w));
|
|
308
308
|
}
|
|
309
309
|
return f;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function ce(e) {
|
|
312
312
|
const t = parseFloat(e ?? "");
|
|
313
313
|
return Number.isFinite(t) ? t : 0;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function $n({
|
|
316
316
|
axis: e,
|
|
317
317
|
element: t,
|
|
318
318
|
gutterSizes: n,
|
|
@@ -320,22 +320,22 @@ function In({
|
|
|
320
320
|
layout: r,
|
|
321
321
|
trackIds: i
|
|
322
322
|
}) {
|
|
323
|
-
const s = i.length,
|
|
324
|
-
if (
|
|
325
|
-
const f =
|
|
326
|
-
if (f.length ===
|
|
327
|
-
const
|
|
328
|
-
(h,
|
|
323
|
+
const s = i.length, c = o ? s * 2 - 1 : s, a = t.ownerDocument.defaultView?.getComputedStyle(t), u = e === "column" ? a?.gridTemplateColumns : a?.gridTemplateRows;
|
|
324
|
+
if (u) {
|
|
325
|
+
const f = u.trim().split(/\s+/);
|
|
326
|
+
if (f.length === c && f.every((y) => /^-?[\d.]+px$/.test(y))) {
|
|
327
|
+
const y = i.map(
|
|
328
|
+
(h, S) => ce(f[o ? S * 2 : S])
|
|
329
329
|
);
|
|
330
330
|
return {
|
|
331
|
-
availableSize:
|
|
332
|
-
trackSizes:
|
|
331
|
+
availableSize: y.reduce((h, S) => h + S, 0),
|
|
332
|
+
trackSizes: y
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
const
|
|
336
|
+
const l = e === "column" ? t.offsetWidth : t.offsetHeight, d = e === "column" ? ce(a?.paddingLeft) + ce(a?.paddingRight) + ce(a?.borderLeftWidth) + ce(a?.borderRightWidth) : ce(a?.paddingTop) + ce(a?.paddingBottom) + ce(a?.borderTopWidth) + ce(a?.borderBottomWidth), g = ce(e === "column" ? a?.columnGap : a?.rowGap), p = n.reduce((f, y) => f + y, 0), m = Math.max(
|
|
337
337
|
0,
|
|
338
|
-
|
|
338
|
+
l - d - g * Math.max(0, c - 1) - p
|
|
339
339
|
);
|
|
340
340
|
return {
|
|
341
341
|
availableSize: m,
|
|
@@ -344,7 +344,7 @@ function In({
|
|
|
344
344
|
)
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function sn(e) {
|
|
348
348
|
switch (typeof e) {
|
|
349
349
|
case "number":
|
|
350
350
|
return [e, "px"];
|
|
@@ -354,7 +354,7 @@ function Wt(e) {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
class
|
|
357
|
+
class an {
|
|
358
358
|
#e = {};
|
|
359
359
|
addListener(t, n) {
|
|
360
360
|
const o = this.#e[t];
|
|
@@ -364,23 +364,24 @@ class Yt {
|
|
|
364
364
|
}
|
|
365
365
|
emit(t, n) {
|
|
366
366
|
const o = this.#e[t];
|
|
367
|
-
if (o !== void 0)
|
|
368
|
-
if (o.length === 1)
|
|
367
|
+
if (o !== void 0) {
|
|
368
|
+
if (o.length === 1) {
|
|
369
369
|
o[0].call(null, n);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
let r;
|
|
373
|
+
const i = Array.from(o);
|
|
374
|
+
for (let s = 0; s < i.length; s++) {
|
|
375
|
+
const c = i[s];
|
|
376
|
+
try {
|
|
377
|
+
c.call(null, n);
|
|
378
|
+
} catch (a) {
|
|
379
|
+
r ??= { error: a };
|
|
380
380
|
}
|
|
381
|
-
if (r)
|
|
382
|
-
throw i;
|
|
383
381
|
}
|
|
382
|
+
if (r)
|
|
383
|
+
throw r.error;
|
|
384
|
+
}
|
|
384
385
|
}
|
|
385
386
|
removeAllListeners() {
|
|
386
387
|
this.#e = {};
|
|
@@ -397,16 +398,16 @@ let V = {
|
|
|
397
398
|
cursorFlags: 0,
|
|
398
399
|
state: "inactive"
|
|
399
400
|
};
|
|
400
|
-
const
|
|
401
|
-
function
|
|
401
|
+
const mt = new an();
|
|
402
|
+
function ie() {
|
|
402
403
|
return V;
|
|
403
404
|
}
|
|
404
|
-
function
|
|
405
|
-
return
|
|
405
|
+
function pt(e) {
|
|
406
|
+
return mt.addListener("change", e);
|
|
406
407
|
}
|
|
407
|
-
function
|
|
408
|
+
function On(e, t = [], n, o = !1) {
|
|
408
409
|
const r = V, i = { ...V };
|
|
409
|
-
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i,
|
|
410
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i, mt.emit("change", {
|
|
410
411
|
prev: r,
|
|
411
412
|
next: i
|
|
412
413
|
});
|
|
@@ -415,12 +416,12 @@ function de(e) {
|
|
|
415
416
|
const t = V;
|
|
416
417
|
V = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
417
418
|
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
418
|
-
}),
|
|
419
|
+
}), mt.emit("change", {
|
|
419
420
|
prev: t,
|
|
420
421
|
next: e
|
|
421
422
|
});
|
|
422
423
|
}
|
|
423
|
-
function
|
|
424
|
+
function Nn(e) {
|
|
424
425
|
V.state !== "active" || !V.previews.some((t) => t.separator === e) || de({
|
|
425
426
|
...V,
|
|
426
427
|
previews: V.previews.map(
|
|
@@ -428,35 +429,33 @@ function Cn(e) {
|
|
|
428
429
|
)
|
|
429
430
|
});
|
|
430
431
|
}
|
|
431
|
-
function
|
|
432
|
+
function Gn(e) {
|
|
432
433
|
if (V.state === "inactive")
|
|
433
|
-
return
|
|
434
|
+
return;
|
|
434
435
|
const t = V.hitRegions.filter((o) => o.axis !== e), n = V.state === "active" && V.previews.some((o) => o.axis === e);
|
|
435
|
-
if (t.length === V.hitRegions.length && !n)
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
de({ ...V, hitRegions: t });
|
|
451
|
-
return !0;
|
|
436
|
+
if (!(t.length === V.hitRegions.length && !n))
|
|
437
|
+
if (t.length === 0)
|
|
438
|
+
de({ cursorFlags: 0, state: "inactive" });
|
|
439
|
+
else if (V.state === "active") {
|
|
440
|
+
const o = new Map(V.initialLayoutMap), r = new Map(V.previewLayoutMap);
|
|
441
|
+
o.delete(e), r.delete(e), de({
|
|
442
|
+
...V,
|
|
443
|
+
cursorFlags: 0,
|
|
444
|
+
hitRegions: t,
|
|
445
|
+
initialLayoutMap: o,
|
|
446
|
+
previewLayoutMap: r,
|
|
447
|
+
previews: V.previews.filter((i) => i.axis !== e)
|
|
448
|
+
});
|
|
449
|
+
} else
|
|
450
|
+
de({ ...V, hitRegions: t });
|
|
452
451
|
}
|
|
453
|
-
const
|
|
454
|
-
},
|
|
455
|
-
let
|
|
456
|
-
function
|
|
457
|
-
return
|
|
452
|
+
const Fn = (e) => e, st = () => {
|
|
453
|
+
}, cn = 1, ln = 2, un = 4, dn = 8, Lt = 3, Ct = 12;
|
|
454
|
+
let Xe;
|
|
455
|
+
function Rt() {
|
|
456
|
+
return Xe === void 0 && (Xe = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Xe = !0)), Xe;
|
|
458
457
|
}
|
|
459
|
-
function
|
|
458
|
+
function _n({
|
|
460
459
|
cursorFlags: e,
|
|
461
460
|
axes: t,
|
|
462
461
|
state: n
|
|
@@ -482,13 +481,13 @@ function En({
|
|
|
482
481
|
if (!(o === 0 && r === 0)) {
|
|
483
482
|
switch (n) {
|
|
484
483
|
case "active": {
|
|
485
|
-
if (e &&
|
|
486
|
-
const i = (e &
|
|
484
|
+
if (e && Rt()) {
|
|
485
|
+
const i = (e & cn) !== 0, s = (e & ln) !== 0, c = (e & un) !== 0, a = (e & dn) !== 0;
|
|
487
486
|
if (i)
|
|
488
|
-
return
|
|
487
|
+
return c ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
489
488
|
if (s)
|
|
490
|
-
return
|
|
491
|
-
if (
|
|
489
|
+
return c ? "sw-resize" : a ? "nw-resize" : "w-resize";
|
|
490
|
+
if (c)
|
|
492
491
|
return "s-resize";
|
|
493
492
|
if (a)
|
|
494
493
|
return "n-resize";
|
|
@@ -496,23 +495,23 @@ function En({
|
|
|
496
495
|
break;
|
|
497
496
|
}
|
|
498
497
|
}
|
|
499
|
-
return
|
|
498
|
+
return Rt() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
500
499
|
}
|
|
501
500
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
501
|
+
const Et = /* @__PURE__ */ new WeakMap();
|
|
502
|
+
function Mt(e) {
|
|
504
503
|
if (!e.defaultView || !e.adoptedStyleSheets)
|
|
505
504
|
return;
|
|
506
|
-
let { prevStyle: t, styleSheet: n } =
|
|
505
|
+
let { prevStyle: t, styleSheet: n } = Et.get(e) ?? {};
|
|
507
506
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
508
507
|
...e.adoptedStyleSheets,
|
|
509
508
|
n
|
|
510
509
|
]));
|
|
511
|
-
|
|
512
|
-
switch (o.state) {
|
|
510
|
+
let o = ie();
|
|
511
|
+
switch (o.state !== "inactive" && o.ownerDocument !== e && (o = { cursorFlags: 0, state: "inactive" }), o.state) {
|
|
513
512
|
case "active":
|
|
514
513
|
case "hover": {
|
|
515
|
-
const r =
|
|
514
|
+
const r = _n({
|
|
516
515
|
cursorFlags: o.cursorFlags,
|
|
517
516
|
axes: o.hitRegions.map((s) => s.axis),
|
|
518
517
|
state: o.state
|
|
@@ -527,39 +526,49 @@ function Ve(e) {
|
|
|
527
526
|
break;
|
|
528
527
|
}
|
|
529
528
|
}
|
|
530
|
-
|
|
529
|
+
Et.set(e, {
|
|
531
530
|
prevStyle: t,
|
|
532
531
|
styleSheet: n
|
|
533
532
|
});
|
|
534
533
|
}
|
|
535
|
-
function
|
|
534
|
+
function Pt(e) {
|
|
535
|
+
return e.state === "inactive" ? void 0 : e.ownerDocument;
|
|
536
|
+
}
|
|
537
|
+
function Bn({
|
|
538
|
+
next: e,
|
|
539
|
+
prev: t
|
|
540
|
+
}) {
|
|
541
|
+
const n = Pt(t), o = Pt(e);
|
|
542
|
+
n && n !== o && Mt(n), o && Mt(o);
|
|
543
|
+
}
|
|
544
|
+
function Te({
|
|
536
545
|
axis: e
|
|
537
546
|
}) {
|
|
538
547
|
const { layoutStrategy: t, orientation: n, items: o } = e;
|
|
539
548
|
return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
|
|
540
549
|
}
|
|
541
|
-
function
|
|
550
|
+
function ht(e, t) {
|
|
542
551
|
const n = e.compareDocumentPosition(t);
|
|
543
552
|
return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
544
553
|
}
|
|
545
|
-
function
|
|
554
|
+
function Ge(e, t) {
|
|
546
555
|
return Array.from(t).sort((n, o) => {
|
|
547
|
-
const r = e === "horizontal" ?
|
|
548
|
-
return r !== 0 ? r :
|
|
556
|
+
const r = e === "horizontal" ? qn(n, o) : Hn(n, o);
|
|
557
|
+
return r !== 0 ? r : ht(n.element, o.element);
|
|
549
558
|
});
|
|
550
559
|
}
|
|
551
|
-
function
|
|
560
|
+
function qn(e, t) {
|
|
552
561
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
553
562
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
554
563
|
}
|
|
555
|
-
function
|
|
564
|
+
function Hn(e, t) {
|
|
556
565
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
557
566
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
558
567
|
}
|
|
559
|
-
function
|
|
568
|
+
function lt(e) {
|
|
560
569
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
561
570
|
}
|
|
562
|
-
function
|
|
571
|
+
function fn(e, t) {
|
|
563
572
|
return {
|
|
564
573
|
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
565
574
|
Math.abs(e.x - t.left),
|
|
@@ -571,7 +580,7 @@ function en(e, t) {
|
|
|
571
580
|
)
|
|
572
581
|
};
|
|
573
582
|
}
|
|
574
|
-
function
|
|
583
|
+
function Vn({
|
|
575
584
|
orientation: e,
|
|
576
585
|
rects: t,
|
|
577
586
|
targetRect: n
|
|
@@ -582,12 +591,12 @@ function Tn({
|
|
|
582
591
|
};
|
|
583
592
|
let r, i = Number.MAX_VALUE;
|
|
584
593
|
for (const s of t) {
|
|
585
|
-
const { x:
|
|
586
|
-
|
|
594
|
+
const { x: c, y: a } = fn(o, s), u = e === "horizontal" ? c : a;
|
|
595
|
+
u < i && (i = u, r = s);
|
|
587
596
|
}
|
|
588
|
-
return
|
|
597
|
+
return O(r, "No rect found"), r;
|
|
589
598
|
}
|
|
590
|
-
function
|
|
599
|
+
function gt({
|
|
591
600
|
expandHitTargets: e = !0,
|
|
592
601
|
axis: t,
|
|
593
602
|
includeDisabled: n = !1
|
|
@@ -598,30 +607,30 @@ function ut({
|
|
|
598
607
|
axis: t,
|
|
599
608
|
includeDisabled: n
|
|
600
609
|
});
|
|
601
|
-
const { element: o, orientation: r, items: i, separators: s } = t,
|
|
610
|
+
const { element: o, orientation: r, items: i, separators: s } = t, c = Ge(
|
|
602
611
|
r,
|
|
603
|
-
Array.from(o.children).filter(
|
|
612
|
+
Array.from(o.children).filter(lt).filter((h) => !h.hasAttribute("data-resize-preview")).map((h) => ({ element: h }))
|
|
604
613
|
).map(({ element: h }) => h), a = [];
|
|
605
|
-
let
|
|
614
|
+
let u = !1, l = !1, d = -1, g, p = -1, m = 0, f, y = [];
|
|
606
615
|
{
|
|
607
616
|
let h = -1;
|
|
608
|
-
for (const
|
|
609
|
-
|
|
617
|
+
for (const S of c)
|
|
618
|
+
S.hasAttribute("data-panel") && (h++, S.hasAttribute("data-disabled") || (m++, d === -1 && (d = h), p = h));
|
|
610
619
|
}
|
|
611
620
|
if (n || m > 1) {
|
|
612
621
|
let h = -1;
|
|
613
|
-
for (const
|
|
614
|
-
if (
|
|
622
|
+
for (const S of c)
|
|
623
|
+
if (S.hasAttribute("data-panel")) {
|
|
615
624
|
h++;
|
|
616
|
-
const
|
|
617
|
-
(x) => x.element ===
|
|
625
|
+
const z = i.find(
|
|
626
|
+
(x) => x.element === S
|
|
618
627
|
);
|
|
619
|
-
if (
|
|
628
|
+
if (z) {
|
|
620
629
|
if (f) {
|
|
621
|
-
const x = f.element.getBoundingClientRect(),
|
|
622
|
-
let
|
|
623
|
-
if (
|
|
624
|
-
const
|
|
630
|
+
const x = f.element.getBoundingClientRect(), R = S.getBoundingClientRect();
|
|
631
|
+
let N;
|
|
632
|
+
if (l) {
|
|
633
|
+
const $ = r === "horizontal" ? new DOMRect(
|
|
625
634
|
x.right,
|
|
626
635
|
x.top,
|
|
627
636
|
0,
|
|
@@ -631,86 +640,86 @@ function ut({
|
|
|
631
640
|
x.bottom,
|
|
632
641
|
x.width,
|
|
633
642
|
0
|
|
634
|
-
), b = r === "horizontal" ? new DOMRect(
|
|
635
|
-
switch (
|
|
643
|
+
), b = r === "horizontal" ? new DOMRect(R.left, R.top, 0, R.height) : new DOMRect(R.left, R.top, R.width, 0);
|
|
644
|
+
switch (y.length) {
|
|
636
645
|
case 0: {
|
|
637
|
-
|
|
638
|
-
|
|
646
|
+
N = [
|
|
647
|
+
$,
|
|
639
648
|
b
|
|
640
649
|
];
|
|
641
650
|
break;
|
|
642
651
|
}
|
|
643
652
|
case 1: {
|
|
644
|
-
const w =
|
|
653
|
+
const w = y[0], v = Vn({
|
|
645
654
|
orientation: r,
|
|
646
|
-
rects: [x,
|
|
655
|
+
rects: [x, R],
|
|
647
656
|
targetRect: w.element.getBoundingClientRect()
|
|
648
657
|
});
|
|
649
|
-
|
|
658
|
+
N = [
|
|
650
659
|
w,
|
|
651
|
-
v === x ? b :
|
|
660
|
+
v === x ? b : $
|
|
652
661
|
];
|
|
653
662
|
break;
|
|
654
663
|
}
|
|
655
664
|
default: {
|
|
656
|
-
|
|
665
|
+
N = y;
|
|
657
666
|
break;
|
|
658
667
|
}
|
|
659
668
|
}
|
|
660
669
|
} else
|
|
661
|
-
|
|
670
|
+
y.length ? N = y : N = [
|
|
662
671
|
r === "horizontal" ? new DOMRect(
|
|
663
672
|
x.right,
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
673
|
+
R.top,
|
|
674
|
+
R.left - x.right,
|
|
675
|
+
R.height
|
|
667
676
|
) : new DOMRect(
|
|
668
|
-
|
|
677
|
+
R.left,
|
|
669
678
|
x.bottom,
|
|
670
|
-
|
|
671
|
-
|
|
679
|
+
R.width,
|
|
680
|
+
R.top - x.bottom
|
|
672
681
|
)
|
|
673
682
|
];
|
|
674
|
-
for (const
|
|
675
|
-
const b =
|
|
683
|
+
for (const $ of N) {
|
|
684
|
+
const b = ct({
|
|
676
685
|
expandHitTargets: e,
|
|
677
686
|
axis: t,
|
|
678
|
-
rect: "width" in
|
|
679
|
-
}), w = h <= d || h >
|
|
680
|
-
(n || !
|
|
687
|
+
rect: "width" in $ ? $ : $.element.getBoundingClientRect()
|
|
688
|
+
}), w = h <= d || h > p;
|
|
689
|
+
(n || !u && !w) && (g ??= Te({ axis: t }), a.push({
|
|
681
690
|
axis: t,
|
|
682
|
-
axisSize:
|
|
683
|
-
items: [f,
|
|
684
|
-
separator: "width" in
|
|
691
|
+
axisSize: g,
|
|
692
|
+
items: [f, z],
|
|
693
|
+
separator: "width" in $ ? void 0 : $,
|
|
685
694
|
rect: b
|
|
686
|
-
})),
|
|
695
|
+
})), u = !1;
|
|
687
696
|
}
|
|
688
697
|
}
|
|
689
|
-
|
|
698
|
+
l = !1, f = z, y = [];
|
|
690
699
|
}
|
|
691
|
-
} else if (
|
|
692
|
-
|
|
693
|
-
const
|
|
694
|
-
(x) => x.element ===
|
|
700
|
+
} else if (S.hasAttribute("data-separator")) {
|
|
701
|
+
S.ariaDisabled !== null && (u = !0);
|
|
702
|
+
const z = s.find(
|
|
703
|
+
(x) => x.element === S
|
|
695
704
|
);
|
|
696
|
-
|
|
705
|
+
z ? y.push(z) : (f = void 0, y = []);
|
|
697
706
|
} else
|
|
698
|
-
|
|
707
|
+
l = !0;
|
|
699
708
|
}
|
|
700
709
|
return a;
|
|
701
710
|
}
|
|
702
|
-
function
|
|
711
|
+
function jn(e, t) {
|
|
703
712
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
704
713
|
return t * o;
|
|
705
714
|
}
|
|
706
|
-
function
|
|
715
|
+
function Un(e, t) {
|
|
707
716
|
const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
|
|
708
717
|
return t * o;
|
|
709
718
|
}
|
|
710
|
-
function
|
|
719
|
+
function Wn(e) {
|
|
711
720
|
return e / 100 * window.innerHeight;
|
|
712
721
|
}
|
|
713
|
-
function
|
|
722
|
+
function Yn(e) {
|
|
714
723
|
return e / 100 * window.innerWidth;
|
|
715
724
|
}
|
|
716
725
|
function Ce({
|
|
@@ -719,7 +728,7 @@ function Ce({
|
|
|
719
728
|
styleProp: n
|
|
720
729
|
}) {
|
|
721
730
|
let o;
|
|
722
|
-
const [r, i] =
|
|
731
|
+
const [r, i] = sn(n);
|
|
723
732
|
switch (i) {
|
|
724
733
|
case "%": {
|
|
725
734
|
o = r / 100 * e;
|
|
@@ -730,29 +739,29 @@ function Ce({
|
|
|
730
739
|
break;
|
|
731
740
|
}
|
|
732
741
|
case "rem": {
|
|
733
|
-
o =
|
|
742
|
+
o = Un(t, r);
|
|
734
743
|
break;
|
|
735
744
|
}
|
|
736
745
|
case "em": {
|
|
737
|
-
o =
|
|
746
|
+
o = jn(t, r);
|
|
738
747
|
break;
|
|
739
748
|
}
|
|
740
749
|
case "vh": {
|
|
741
|
-
o =
|
|
750
|
+
o = Wn(r);
|
|
742
751
|
break;
|
|
743
752
|
}
|
|
744
753
|
case "vw": {
|
|
745
|
-
o =
|
|
754
|
+
o = Yn(r);
|
|
746
755
|
break;
|
|
747
756
|
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
}
|
|
751
|
-
function
|
|
760
|
+
function K(e) {
|
|
752
761
|
return parseFloat(e.toFixed(3));
|
|
753
762
|
}
|
|
754
|
-
function
|
|
755
|
-
const { items: t } = e, n =
|
|
763
|
+
function ut(e) {
|
|
764
|
+
const { items: t } = e, n = Te({ axis: e });
|
|
756
765
|
return n === 0 ? t.map((o) => ({
|
|
757
766
|
groupResizeBehavior: o.constraintProps.groupResizeBehavior,
|
|
758
767
|
collapsedSize: 0,
|
|
@@ -771,16 +780,16 @@ function it(e) {
|
|
|
771
780
|
itemElement: r,
|
|
772
781
|
styleProp: i.collapsedSize
|
|
773
782
|
});
|
|
774
|
-
s =
|
|
783
|
+
s = K(d / n * 100);
|
|
775
784
|
}
|
|
776
|
-
let
|
|
785
|
+
let c;
|
|
777
786
|
if (i.collapsedThreshold !== void 0) {
|
|
778
787
|
const d = Ce({
|
|
779
788
|
axisSize: n,
|
|
780
789
|
itemElement: r,
|
|
781
790
|
styleProp: i.collapsedThreshold
|
|
782
791
|
});
|
|
783
|
-
|
|
792
|
+
c = K(d / n * 100);
|
|
784
793
|
}
|
|
785
794
|
let a;
|
|
786
795
|
if (i.defaultSize !== void 0) {
|
|
@@ -789,45 +798,66 @@ function it(e) {
|
|
|
789
798
|
itemElement: r,
|
|
790
799
|
styleProp: i.defaultSize
|
|
791
800
|
});
|
|
792
|
-
a =
|
|
801
|
+
a = K(d / n * 100);
|
|
793
802
|
}
|
|
794
|
-
let
|
|
803
|
+
let u = 0;
|
|
795
804
|
if (i.minSize !== void 0) {
|
|
796
805
|
const d = Ce({
|
|
797
806
|
axisSize: n,
|
|
798
807
|
itemElement: r,
|
|
799
808
|
styleProp: i.minSize
|
|
800
809
|
});
|
|
801
|
-
|
|
810
|
+
u = K(d / n * 100);
|
|
802
811
|
}
|
|
803
|
-
let
|
|
812
|
+
let l = 100;
|
|
804
813
|
if (i.maxSize !== void 0) {
|
|
805
814
|
const d = Ce({
|
|
806
815
|
axisSize: n,
|
|
807
816
|
itemElement: r,
|
|
808
817
|
styleProp: i.maxSize
|
|
809
818
|
});
|
|
810
|
-
|
|
819
|
+
l = K(d / n * 100);
|
|
811
820
|
}
|
|
812
821
|
return {
|
|
813
822
|
groupResizeBehavior: i.groupResizeBehavior,
|
|
814
823
|
collapsedSize: s,
|
|
815
|
-
collapsedThreshold:
|
|
824
|
+
collapsedThreshold: c,
|
|
816
825
|
collapsible: i.collapsible === !0,
|
|
817
826
|
defaultSize: a,
|
|
818
827
|
disabled: i.disabled,
|
|
819
|
-
minSize:
|
|
820
|
-
maxSize:
|
|
828
|
+
minSize: u,
|
|
829
|
+
maxSize: l,
|
|
821
830
|
itemId: o.id
|
|
822
831
|
};
|
|
823
832
|
});
|
|
824
833
|
}
|
|
825
834
|
let ue = /* @__PURE__ */ new Map();
|
|
826
|
-
const
|
|
827
|
-
|
|
835
|
+
const yt = new an();
|
|
836
|
+
let Fe = 0;
|
|
837
|
+
const Ke = [];
|
|
838
|
+
let Je;
|
|
839
|
+
function et() {
|
|
840
|
+
Fe++;
|
|
841
|
+
}
|
|
842
|
+
function St() {
|
|
843
|
+
for (let e = 0; e < Ke.length; e++)
|
|
844
|
+
try {
|
|
845
|
+
yt.emit("axisChange", Ke[e]);
|
|
846
|
+
} catch (t) {
|
|
847
|
+
Je ??= { error: t };
|
|
848
|
+
}
|
|
849
|
+
Ke.length = 0;
|
|
850
|
+
}
|
|
851
|
+
function tt() {
|
|
852
|
+
if (Fe === 1 && St(), Fe--, Fe === 0 && Je) {
|
|
853
|
+
const { error: e } = Je;
|
|
854
|
+
throw Je = void 0, e;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
function Xn(e) {
|
|
828
858
|
ue = new Map(ue), ue.delete(e);
|
|
829
859
|
}
|
|
830
|
-
function
|
|
860
|
+
function Ee(e, t) {
|
|
831
861
|
for (const [n] of ue)
|
|
832
862
|
if (n.id === e)
|
|
833
863
|
return n;
|
|
@@ -839,24 +869,33 @@ function ae(e, t) {
|
|
|
839
869
|
if (t)
|
|
840
870
|
throw Error(`Could not find data for Group with id ${e}`);
|
|
841
871
|
}
|
|
842
|
-
function
|
|
872
|
+
function ge() {
|
|
843
873
|
return ue;
|
|
844
874
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
875
|
+
function Be(e, t) {
|
|
876
|
+
return yt.addListener("axisChange", (n) => {
|
|
847
877
|
n.axis.id === e && t(n);
|
|
848
878
|
});
|
|
849
879
|
}
|
|
850
880
|
function fe(e, t, n) {
|
|
851
881
|
const o = ue.get(e);
|
|
852
|
-
ue = new Map(ue), ue.set(e, t)
|
|
882
|
+
ue = new Map(ue), ue.set(e, t);
|
|
883
|
+
const r = {
|
|
853
884
|
axis: e,
|
|
854
885
|
isUserInteraction: n?.isUserInteraction === !0,
|
|
855
886
|
prev: o,
|
|
856
887
|
next: t
|
|
857
|
-
}
|
|
888
|
+
};
|
|
889
|
+
Fe > 0 ? Ke.push(r) : yt.emit("axisChange", r);
|
|
858
890
|
}
|
|
859
|
-
function
|
|
891
|
+
function mn(e, { pointerId: t, pointerType: n }) {
|
|
892
|
+
return t === e.pointerId || // There is only one pen, but it may be assigned a new pointerId each time it comes into range
|
|
893
|
+
n === "pen" && e.pointerType === "pen";
|
|
894
|
+
}
|
|
895
|
+
function nt(e, t, n = {}) {
|
|
896
|
+
return e.ownerDocument === t && (n.pointerId === void 0 || mn(e, n));
|
|
897
|
+
}
|
|
898
|
+
function Kn(e, t) {
|
|
860
899
|
if (e.length !== t.length)
|
|
861
900
|
return !1;
|
|
862
901
|
for (let n = 0; n < e.length; n++)
|
|
@@ -865,12 +904,12 @@ function Gn(e, t) {
|
|
|
865
904
|
return !0;
|
|
866
905
|
}
|
|
867
906
|
function Y(e, t, n = 0) {
|
|
868
|
-
return Math.abs(
|
|
907
|
+
return Math.abs(K(e) - K(t)) <= n;
|
|
869
908
|
}
|
|
870
|
-
function
|
|
909
|
+
function le(e, t) {
|
|
871
910
|
return Y(e, t) ? 0 : e > t ? 1 : -1;
|
|
872
911
|
}
|
|
873
|
-
function
|
|
912
|
+
function Me({
|
|
874
913
|
overrideDisabledItems: e,
|
|
875
914
|
itemConstraints: t,
|
|
876
915
|
prevSize: n,
|
|
@@ -880,21 +919,21 @@ function Ee({
|
|
|
880
919
|
collapsedSize: r = 0,
|
|
881
920
|
collapsedThreshold: i,
|
|
882
921
|
collapsible: s,
|
|
883
|
-
disabled:
|
|
922
|
+
disabled: c,
|
|
884
923
|
maxSize: a = 100,
|
|
885
|
-
minSize:
|
|
924
|
+
minSize: u = 0
|
|
886
925
|
} = t;
|
|
887
|
-
if (
|
|
926
|
+
if (c && !e)
|
|
888
927
|
return n;
|
|
889
|
-
if (
|
|
928
|
+
if (le(o, u) < 0)
|
|
890
929
|
if (s) {
|
|
891
|
-
const
|
|
892
|
-
|
|
930
|
+
const l = i ?? (u - r) / 2, d = le(n, r) <= 0, g = d ? r + l : u - l, p = le(o, g);
|
|
931
|
+
le(o, r) <= 0 || p < 0 || i !== void 0 && d && p === 0 ? o = r : o = u;
|
|
893
932
|
} else
|
|
894
|
-
o =
|
|
895
|
-
return o = Math.min(a, o), o =
|
|
933
|
+
o = u;
|
|
934
|
+
return o = Math.min(a, o), o = K(o), o;
|
|
896
935
|
}
|
|
897
|
-
function
|
|
936
|
+
function qe({
|
|
898
937
|
delta: e,
|
|
899
938
|
initialLayout: t,
|
|
900
939
|
itemConstraints: n,
|
|
@@ -904,73 +943,73 @@ function Fe({
|
|
|
904
943
|
}) {
|
|
905
944
|
if (Y(e, 0))
|
|
906
945
|
return t;
|
|
907
|
-
const s = i === "imperative-api",
|
|
946
|
+
const s = i === "imperative-api", c = n.map(
|
|
908
947
|
({ itemId: m }) => t[m]
|
|
909
948
|
), a = n.map(
|
|
910
949
|
({ itemId: m }) => r[m]
|
|
911
|
-
),
|
|
912
|
-
|
|
913
|
-
let
|
|
950
|
+
), u = [...c], [l, d] = o;
|
|
951
|
+
O(l != null, "Invalid first pivot index"), O(d != null, "Invalid second pivot index");
|
|
952
|
+
let g = 0;
|
|
914
953
|
switch (i) {
|
|
915
954
|
case "keyboard": {
|
|
916
955
|
{
|
|
917
|
-
const m = e < 0 ? d :
|
|
918
|
-
|
|
956
|
+
const m = e < 0 ? d : l, f = n[m];
|
|
957
|
+
O(
|
|
919
958
|
f,
|
|
920
959
|
`Panel constraints not found for index ${m}`
|
|
921
960
|
);
|
|
922
961
|
const {
|
|
923
|
-
collapsedSize:
|
|
962
|
+
collapsedSize: y = 0,
|
|
924
963
|
collapsible: h,
|
|
925
|
-
minSize:
|
|
964
|
+
minSize: S = 0
|
|
926
965
|
} = f;
|
|
927
966
|
if (h) {
|
|
928
|
-
const
|
|
929
|
-
if (
|
|
930
|
-
|
|
967
|
+
const z = c[m];
|
|
968
|
+
if (O(
|
|
969
|
+
z != null,
|
|
931
970
|
`Previous layout not found for panel index ${m}`
|
|
932
|
-
), Y(
|
|
933
|
-
const x =
|
|
934
|
-
|
|
971
|
+
), Y(z, y)) {
|
|
972
|
+
const x = S - z;
|
|
973
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
935
974
|
}
|
|
936
975
|
}
|
|
937
976
|
}
|
|
938
977
|
{
|
|
939
|
-
const m = e < 0 ?
|
|
940
|
-
|
|
978
|
+
const m = e < 0 ? l : d, f = n[m];
|
|
979
|
+
O(
|
|
941
980
|
f,
|
|
942
981
|
`No panel constraints found for index ${m}`
|
|
943
982
|
);
|
|
944
983
|
const {
|
|
945
|
-
collapsedSize:
|
|
984
|
+
collapsedSize: y = 0,
|
|
946
985
|
collapsible: h,
|
|
947
|
-
minSize:
|
|
986
|
+
minSize: S = 0
|
|
948
987
|
} = f;
|
|
949
988
|
if (h) {
|
|
950
|
-
const
|
|
951
|
-
if (
|
|
952
|
-
|
|
989
|
+
const z = c[m];
|
|
990
|
+
if (O(
|
|
991
|
+
z != null,
|
|
953
992
|
`Previous layout not found for panel index ${m}`
|
|
954
|
-
), Y(
|
|
955
|
-
const x =
|
|
956
|
-
|
|
993
|
+
), Y(z, S)) {
|
|
994
|
+
const x = z - y;
|
|
995
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
957
996
|
}
|
|
958
997
|
}
|
|
959
998
|
}
|
|
960
999
|
break;
|
|
961
1000
|
}
|
|
962
1001
|
default: {
|
|
963
|
-
const m = e < 0 ? d :
|
|
964
|
-
|
|
1002
|
+
const m = e < 0 ? d : l, f = n[m];
|
|
1003
|
+
O(
|
|
965
1004
|
f,
|
|
966
1005
|
`Panel constraints not found for index ${m}`
|
|
967
1006
|
);
|
|
968
|
-
const
|
|
969
|
-
if (
|
|
970
|
-
const
|
|
971
|
-
if (
|
|
972
|
-
const b =
|
|
973
|
-
b > 0 || b === 0 && w ? e = e < 0 ? -
|
|
1007
|
+
const y = c[m], { collapsedSize: h, collapsedThreshold: S, collapsible: z, minSize: x } = f;
|
|
1008
|
+
if (z && le(y, x) < 0) {
|
|
1009
|
+
const R = x - h, N = S ?? R / 2, $ = y + Math.abs(e);
|
|
1010
|
+
if (le($, x) < 0) {
|
|
1011
|
+
const b = le(Math.abs(e), N), w = S === void 0 && e < 0;
|
|
1012
|
+
b > 0 || b === 0 && w ? e = e < 0 ? -R : R : e = 0;
|
|
974
1013
|
}
|
|
975
1014
|
}
|
|
976
1015
|
break;
|
|
@@ -978,212 +1017,229 @@ function Fe({
|
|
|
978
1017
|
}
|
|
979
1018
|
{
|
|
980
1019
|
const m = e < 0 ? 1 : -1;
|
|
981
|
-
let f = e < 0 ? d :
|
|
1020
|
+
let f = e < 0 ? d : l, y = 0;
|
|
982
1021
|
for (; ; ) {
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
|
|
1022
|
+
const S = c[f];
|
|
1023
|
+
O(
|
|
1024
|
+
S != null,
|
|
986
1025
|
`Previous layout not found for panel index ${f}`
|
|
987
1026
|
);
|
|
988
|
-
const x =
|
|
1027
|
+
const x = Me({
|
|
989
1028
|
overrideDisabledItems: s,
|
|
990
1029
|
itemConstraints: n[f],
|
|
991
|
-
prevSize:
|
|
1030
|
+
prevSize: S,
|
|
992
1031
|
size: 100
|
|
993
|
-
}) -
|
|
994
|
-
if (
|
|
1032
|
+
}) - S;
|
|
1033
|
+
if (y += x, f += m, f < 0 || f >= n.length)
|
|
995
1034
|
break;
|
|
996
1035
|
}
|
|
997
|
-
const h = Math.min(Math.abs(e), Math.abs(
|
|
1036
|
+
const h = Math.min(Math.abs(e), Math.abs(y));
|
|
998
1037
|
e = e < 0 ? 0 - h : h;
|
|
999
1038
|
}
|
|
1000
1039
|
{
|
|
1001
|
-
let f = e < 0 ?
|
|
1040
|
+
let f = e < 0 ? l : d;
|
|
1002
1041
|
for (; f >= 0 && f < n.length; ) {
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1042
|
+
const y = Math.abs(e) - Math.abs(g), h = c[f];
|
|
1043
|
+
O(
|
|
1005
1044
|
h != null,
|
|
1006
1045
|
`Previous layout not found for panel index ${f}`
|
|
1007
1046
|
);
|
|
1008
|
-
const
|
|
1047
|
+
const S = h - y, z = Me({
|
|
1009
1048
|
overrideDisabledItems: s,
|
|
1010
1049
|
itemConstraints: n[f],
|
|
1011
1050
|
prevSize: h,
|
|
1012
|
-
size:
|
|
1051
|
+
size: S
|
|
1013
1052
|
});
|
|
1014
|
-
if (!Y(h,
|
|
1053
|
+
if (!Y(h, z) && (g += h - z, u[f] = z, g.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
1015
1054
|
numeric: !0
|
|
1016
1055
|
}) >= 0))
|
|
1017
1056
|
break;
|
|
1018
1057
|
e < 0 ? f-- : f++;
|
|
1019
1058
|
}
|
|
1020
1059
|
}
|
|
1021
|
-
if (
|
|
1060
|
+
if (Kn(a, u))
|
|
1022
1061
|
return r;
|
|
1023
1062
|
{
|
|
1024
|
-
const m = e < 0 ? d :
|
|
1025
|
-
|
|
1063
|
+
const m = e < 0 ? d : l, f = c[m];
|
|
1064
|
+
O(
|
|
1026
1065
|
f != null,
|
|
1027
1066
|
`Previous layout not found for panel index ${m}`
|
|
1028
1067
|
);
|
|
1029
|
-
const
|
|
1068
|
+
const y = f + g, h = Me({
|
|
1030
1069
|
overrideDisabledItems: s,
|
|
1031
1070
|
itemConstraints: n[m],
|
|
1032
1071
|
prevSize: f,
|
|
1033
|
-
size:
|
|
1072
|
+
size: y
|
|
1034
1073
|
});
|
|
1035
|
-
if (
|
|
1036
|
-
let
|
|
1074
|
+
if (u[m] = h, !Y(h, y)) {
|
|
1075
|
+
let S = y - h, x = e < 0 ? d : l;
|
|
1037
1076
|
for (; x >= 0 && x < n.length; ) {
|
|
1038
|
-
const
|
|
1039
|
-
|
|
1040
|
-
|
|
1077
|
+
const R = u[x];
|
|
1078
|
+
O(
|
|
1079
|
+
R != null,
|
|
1041
1080
|
`Previous layout not found for panel index ${x}`
|
|
1042
1081
|
);
|
|
1043
|
-
const
|
|
1082
|
+
const N = R + S, $ = Me({
|
|
1044
1083
|
overrideDisabledItems: s,
|
|
1045
1084
|
itemConstraints: n[x],
|
|
1046
|
-
prevSize:
|
|
1047
|
-
size:
|
|
1085
|
+
prevSize: R,
|
|
1086
|
+
size: N
|
|
1048
1087
|
});
|
|
1049
|
-
if (Y(
|
|
1088
|
+
if (Y(R, $) || (S -= $ - R, u[x] = $), Y(S, 0))
|
|
1050
1089
|
break;
|
|
1051
1090
|
e > 0 ? x-- : x++;
|
|
1052
1091
|
}
|
|
1053
1092
|
}
|
|
1054
1093
|
}
|
|
1055
|
-
const
|
|
1094
|
+
const p = Object.values(u).reduce(
|
|
1056
1095
|
(m, f) => f + m,
|
|
1057
1096
|
0
|
|
1058
1097
|
);
|
|
1059
|
-
return Y(
|
|
1098
|
+
return Y(p, 100, 0.1) ? u.reduce((m, f, y) => (m[n[y].itemId] = f, m), {}) : r;
|
|
1060
1099
|
}
|
|
1061
|
-
function
|
|
1100
|
+
function se(e, t) {
|
|
1062
1101
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1063
1102
|
return !1;
|
|
1064
1103
|
for (const n in e)
|
|
1065
|
-
if (t[n] === void 0 ||
|
|
1104
|
+
if (t[n] === void 0 || le(e[n], t[n]) !== 0)
|
|
1066
1105
|
return !1;
|
|
1067
1106
|
return !0;
|
|
1068
1107
|
}
|
|
1069
|
-
function
|
|
1108
|
+
function vt(e) {
|
|
1109
|
+
et();
|
|
1110
|
+
try {
|
|
1111
|
+
Jn(e);
|
|
1112
|
+
} finally {
|
|
1113
|
+
tt();
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
function Jn({
|
|
1070
1117
|
commit: e,
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
prevCursorFlags: l
|
|
1118
|
+
event: t,
|
|
1119
|
+
hitRegions: n,
|
|
1120
|
+
initialLayoutMap: o,
|
|
1121
|
+
mountedAxes: r,
|
|
1122
|
+
pointerDownAtPoint: i,
|
|
1123
|
+
prevCursorFlags: s
|
|
1078
1124
|
}) {
|
|
1079
|
-
let
|
|
1080
|
-
const
|
|
1081
|
-
let u =
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1125
|
+
let c = 0;
|
|
1126
|
+
const a = ie();
|
|
1127
|
+
let u = a.state === "active" ? a.previews : [];
|
|
1128
|
+
const l = new Map(
|
|
1129
|
+
a.state === "active" ? a.previewLayoutMap : void 0
|
|
1084
1130
|
);
|
|
1085
|
-
|
|
1086
|
-
const { axis:
|
|
1087
|
-
if (e &&
|
|
1131
|
+
n.forEach((p) => {
|
|
1132
|
+
const { axis: m, axisSize: f } = p, { orientation: y, items: h } = m;
|
|
1133
|
+
if (e && m.resizePreviewMode !== "separator")
|
|
1088
1134
|
return;
|
|
1089
|
-
const { disableCursor:
|
|
1090
|
-
let
|
|
1091
|
-
|
|
1092
|
-
const
|
|
1093
|
-
if (!
|
|
1135
|
+
const { disableCursor: S } = m.mutableState;
|
|
1136
|
+
let z = 0;
|
|
1137
|
+
i ? y === "horizontal" ? z = (t.clientX - i.x) / f * 100 : z = (t.clientY - i.y) / f * 100 : y === "horizontal" ? z = t.clientX < 0 ? -100 : 100 : z = t.clientY < 0 ? -100 : 100;
|
|
1138
|
+
const x = o.get(m), R = r.get(m);
|
|
1139
|
+
if (!x || !R)
|
|
1094
1140
|
return;
|
|
1095
1141
|
const {
|
|
1096
1142
|
defaultLayoutDeferred: N,
|
|
1097
|
-
derivedItemConstraints:
|
|
1098
|
-
axisSize:
|
|
1099
|
-
layout:
|
|
1100
|
-
separatorToItems:
|
|
1101
|
-
} =
|
|
1102
|
-
if (
|
|
1103
|
-
const
|
|
1104
|
-
delta:
|
|
1105
|
-
initialLayout:
|
|
1106
|
-
itemConstraints:
|
|
1107
|
-
pivotIndices:
|
|
1108
|
-
prevLayout:
|
|
1143
|
+
derivedItemConstraints: $,
|
|
1144
|
+
axisSize: b,
|
|
1145
|
+
layout: w,
|
|
1146
|
+
separatorToItems: v
|
|
1147
|
+
} = R;
|
|
1148
|
+
if ($ && w && v) {
|
|
1149
|
+
const T = m.resizePreviewMode === "separator" ? l.get(m) ?? w : w, A = qe({
|
|
1150
|
+
delta: z,
|
|
1151
|
+
initialLayout: x,
|
|
1152
|
+
itemConstraints: $,
|
|
1153
|
+
pivotIndices: p.items.map((E) => h.indexOf(E)),
|
|
1154
|
+
prevLayout: T,
|
|
1109
1155
|
trigger: "mouse-or-touch"
|
|
1110
1156
|
});
|
|
1111
|
-
if (
|
|
1112
|
-
|
|
1157
|
+
if (m.resizePreviewMode === "separator" && !e && !se(A, T)) {
|
|
1158
|
+
l.set(m, A);
|
|
1113
1159
|
let E = 0;
|
|
1114
|
-
const
|
|
1115
|
-
u = u.map((
|
|
1116
|
-
if (
|
|
1117
|
-
return
|
|
1118
|
-
const
|
|
1119
|
-
return
|
|
1160
|
+
const D = h.map((C) => (E += A[C.id] - x[C.id], E * (f / 100)));
|
|
1161
|
+
u = u.map((C) => {
|
|
1162
|
+
if (C.axis !== m)
|
|
1163
|
+
return C;
|
|
1164
|
+
const I = D[C.itemIndex];
|
|
1165
|
+
return I === C.offset ? C : { ...C, offset: I };
|
|
1120
1166
|
});
|
|
1121
1167
|
}
|
|
1122
|
-
if (
|
|
1123
|
-
switch (
|
|
1168
|
+
if (se(A, T) && z !== 0 && !S)
|
|
1169
|
+
switch (y) {
|
|
1124
1170
|
case "horizontal": {
|
|
1125
|
-
|
|
1171
|
+
c |= z < 0 ? cn : ln;
|
|
1126
1172
|
break;
|
|
1127
1173
|
}
|
|
1128
1174
|
case "vertical": {
|
|
1129
|
-
|
|
1175
|
+
c |= z < 0 ? un : dn;
|
|
1130
1176
|
break;
|
|
1131
1177
|
}
|
|
1132
1178
|
}
|
|
1133
|
-
(
|
|
1179
|
+
(m.resizePreviewMode !== "separator" || e) && !se(A, w) && fe(p.axis, {
|
|
1134
1180
|
defaultLayoutDeferred: N,
|
|
1135
|
-
derivedItemConstraints:
|
|
1136
|
-
axisSize:
|
|
1137
|
-
layout:
|
|
1138
|
-
requestedAxisSize:
|
|
1139
|
-
requestedLayout:
|
|
1140
|
-
separatorToItems:
|
|
1181
|
+
derivedItemConstraints: $,
|
|
1182
|
+
axisSize: b,
|
|
1183
|
+
layout: A,
|
|
1184
|
+
requestedAxisSize: b,
|
|
1185
|
+
requestedLayout: A,
|
|
1186
|
+
separatorToItems: v
|
|
1141
1187
|
});
|
|
1142
1188
|
}
|
|
1143
1189
|
});
|
|
1144
|
-
let
|
|
1145
|
-
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1148
|
-
}
|
|
1149
|
-
function
|
|
1150
|
-
const n =
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
})
|
|
1190
|
+
let d = 0;
|
|
1191
|
+
t.movementX === 0 ? d |= s & Lt : d |= c & Lt, t.movementY === 0 ? d |= s & Ct : d |= c & Ct;
|
|
1192
|
+
const g = a.state === "active" && (t.clientX !== a.pointerDownAtPoint.x || t.clientY !== a.pointerDownAtPoint.y);
|
|
1193
|
+
On(d, u, l, g);
|
|
1194
|
+
}
|
|
1195
|
+
function pn(e, t) {
|
|
1196
|
+
const n = ie();
|
|
1197
|
+
if (n.state !== "active" || !nt(n, e, t))
|
|
1198
|
+
return;
|
|
1199
|
+
const o = ge();
|
|
1200
|
+
et();
|
|
1201
|
+
try {
|
|
1202
|
+
vt({
|
|
1203
|
+
commit: !0,
|
|
1204
|
+
event: t,
|
|
1205
|
+
hitRegions: n.hitRegions,
|
|
1206
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1207
|
+
mountedAxes: o,
|
|
1208
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
1209
|
+
prevCursorFlags: n.cursorFlags
|
|
1210
|
+
}), St(), de({
|
|
1211
|
+
cursorFlags: 0,
|
|
1212
|
+
state: "inactive"
|
|
1213
|
+
}), n.hitRegions.length > 0 && (t.preventDefault?.(), n.hitRegions.forEach((r) => {
|
|
1214
|
+
if (!o.has(r.axis))
|
|
1215
|
+
return;
|
|
1216
|
+
const i = ae(r.axis.id, !0);
|
|
1217
|
+
fe(r.axis, i, {
|
|
1218
|
+
isUserInteraction: !0
|
|
1219
|
+
});
|
|
1220
|
+
}));
|
|
1221
|
+
} finally {
|
|
1222
|
+
tt();
|
|
1174
1223
|
}
|
|
1175
|
-
return r;
|
|
1176
1224
|
}
|
|
1177
|
-
function
|
|
1178
|
-
|
|
1225
|
+
function Tt(e) {
|
|
1226
|
+
if (e.defaultPrevented)
|
|
1227
|
+
return;
|
|
1228
|
+
const { clientX: t, clientY: n, movementX: o, movementY: r } = e;
|
|
1229
|
+
pn(e.currentTarget, {
|
|
1230
|
+
clientX: t,
|
|
1231
|
+
clientY: n,
|
|
1232
|
+
movementX: o,
|
|
1233
|
+
movementY: r
|
|
1234
|
+
});
|
|
1179
1235
|
}
|
|
1180
|
-
function
|
|
1236
|
+
function Zn(e, t, n) {
|
|
1181
1237
|
let o, r = {
|
|
1182
1238
|
x: 1 / 0,
|
|
1183
1239
|
y: 1 / 0
|
|
1184
1240
|
};
|
|
1185
1241
|
for (const i of t) {
|
|
1186
|
-
const s =
|
|
1242
|
+
const s = fn(n, i.rect);
|
|
1187
1243
|
switch (e) {
|
|
1188
1244
|
case "horizontal": {
|
|
1189
1245
|
(s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
|
|
@@ -1200,126 +1256,126 @@ function _n(e, t, n) {
|
|
|
1200
1256
|
hitRegion: o
|
|
1201
1257
|
} : void 0;
|
|
1202
1258
|
}
|
|
1203
|
-
function
|
|
1259
|
+
function Qn(e) {
|
|
1204
1260
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
1205
1261
|
}
|
|
1206
|
-
function
|
|
1262
|
+
function eo(e, t) {
|
|
1207
1263
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
1208
1264
|
const n = {
|
|
1209
|
-
a:
|
|
1210
|
-
b:
|
|
1265
|
+
a: At(e),
|
|
1266
|
+
b: At(t)
|
|
1211
1267
|
};
|
|
1212
1268
|
let o;
|
|
1213
1269
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
1214
1270
|
o = n.a.pop(), n.b.pop();
|
|
1215
|
-
|
|
1271
|
+
O(
|
|
1216
1272
|
o,
|
|
1217
1273
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
1218
1274
|
);
|
|
1219
1275
|
const r = {
|
|
1220
|
-
a:
|
|
1221
|
-
b:
|
|
1276
|
+
a: kt(Dt(n.a)),
|
|
1277
|
+
b: kt(Dt(n.b))
|
|
1222
1278
|
};
|
|
1223
1279
|
if (r.a === r.b) {
|
|
1224
1280
|
const i = o.childNodes, s = {
|
|
1225
1281
|
a: n.a.at(-1),
|
|
1226
1282
|
b: n.b.at(-1)
|
|
1227
1283
|
};
|
|
1228
|
-
let
|
|
1229
|
-
for (;
|
|
1230
|
-
const a = i[
|
|
1284
|
+
let c = i.length;
|
|
1285
|
+
for (; c--; ) {
|
|
1286
|
+
const a = i[c];
|
|
1231
1287
|
if (a === s.a) return 1;
|
|
1232
1288
|
if (a === s.b) return -1;
|
|
1233
1289
|
}
|
|
1234
1290
|
}
|
|
1235
1291
|
return Math.sign(r.a - r.b);
|
|
1236
1292
|
}
|
|
1237
|
-
const
|
|
1238
|
-
function
|
|
1239
|
-
const t = getComputedStyle(
|
|
1293
|
+
const to = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
1294
|
+
function no(e) {
|
|
1295
|
+
const t = getComputedStyle(hn(e) ?? e).display;
|
|
1240
1296
|
return t === "flex" || t === "inline-flex";
|
|
1241
1297
|
}
|
|
1242
|
-
function
|
|
1298
|
+
function oo(e) {
|
|
1243
1299
|
const t = getComputedStyle(e);
|
|
1244
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
1300
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || no(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" || to.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
1245
1301
|
}
|
|
1246
|
-
function
|
|
1302
|
+
function Dt(e) {
|
|
1247
1303
|
let t = e.length;
|
|
1248
1304
|
for (; t--; ) {
|
|
1249
1305
|
const n = e[t];
|
|
1250
|
-
if (
|
|
1306
|
+
if (O(n, "Missing node"), oo(n)) return n;
|
|
1251
1307
|
}
|
|
1252
1308
|
return null;
|
|
1253
1309
|
}
|
|
1254
|
-
function
|
|
1310
|
+
function kt(e) {
|
|
1255
1311
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
1256
1312
|
}
|
|
1257
|
-
function
|
|
1313
|
+
function At(e) {
|
|
1258
1314
|
const t = [];
|
|
1259
1315
|
for (; e; )
|
|
1260
|
-
t.push(e), e =
|
|
1316
|
+
t.push(e), e = hn(e);
|
|
1261
1317
|
return t;
|
|
1262
1318
|
}
|
|
1263
|
-
function
|
|
1319
|
+
function hn(e) {
|
|
1264
1320
|
const { parentNode: t } = e;
|
|
1265
|
-
return
|
|
1321
|
+
return Qn(t) ? t.host : t;
|
|
1266
1322
|
}
|
|
1267
|
-
function
|
|
1323
|
+
function ro(e, t) {
|
|
1268
1324
|
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;
|
|
1269
1325
|
}
|
|
1270
|
-
function
|
|
1326
|
+
function io(e) {
|
|
1271
1327
|
try {
|
|
1272
1328
|
return e.matches(":modal");
|
|
1273
1329
|
} catch {
|
|
1274
1330
|
return !1;
|
|
1275
1331
|
}
|
|
1276
1332
|
}
|
|
1277
|
-
function
|
|
1333
|
+
function so({
|
|
1278
1334
|
axisElement: e,
|
|
1279
1335
|
hitRegion: t,
|
|
1280
1336
|
pointerEventTarget: n
|
|
1281
1337
|
}) {
|
|
1282
|
-
if (
|
|
1338
|
+
if (lt(n)) {
|
|
1283
1339
|
const o = n.closest("dialog");
|
|
1284
|
-
if (o && !o.contains(e) &&
|
|
1340
|
+
if (o && !o.contains(e) && io(o))
|
|
1285
1341
|
return !1;
|
|
1286
1342
|
}
|
|
1287
|
-
if (!
|
|
1343
|
+
if (!lt(n) || n.contains(e) || e.contains(n))
|
|
1288
1344
|
return !0;
|
|
1289
|
-
if (
|
|
1345
|
+
if (eo(n, e) > 0) {
|
|
1290
1346
|
let o = n;
|
|
1291
1347
|
for (; o; ) {
|
|
1292
1348
|
if (o.contains(e))
|
|
1293
1349
|
return !0;
|
|
1294
|
-
if (
|
|
1350
|
+
if (ro(o.getBoundingClientRect(), t))
|
|
1295
1351
|
return !1;
|
|
1296
1352
|
o = o.parentElement;
|
|
1297
1353
|
}
|
|
1298
1354
|
}
|
|
1299
1355
|
return !0;
|
|
1300
1356
|
}
|
|
1301
|
-
function
|
|
1302
|
-
const
|
|
1303
|
-
return t.forEach((
|
|
1304
|
-
if (
|
|
1357
|
+
function bt(e, t, n) {
|
|
1358
|
+
const o = [];
|
|
1359
|
+
return t.forEach((r, i) => {
|
|
1360
|
+
if (i.disabled || i.element.ownerDocument !== n)
|
|
1305
1361
|
return;
|
|
1306
|
-
const
|
|
1362
|
+
const s = gt({ axis: i }), c = Zn(i.orientation, s, {
|
|
1307
1363
|
x: e.clientX,
|
|
1308
1364
|
y: e.clientY
|
|
1309
1365
|
});
|
|
1310
|
-
|
|
1311
|
-
axisElement:
|
|
1312
|
-
hitRegion:
|
|
1366
|
+
c && c.distance.x <= 0 && c.distance.y <= 0 && so({
|
|
1367
|
+
axisElement: i.element,
|
|
1368
|
+
hitRegion: c.hitRegion.rect,
|
|
1313
1369
|
pointerEventTarget: e.target
|
|
1314
|
-
}) &&
|
|
1315
|
-
}),
|
|
1370
|
+
}) && o.push(c.hitRegion);
|
|
1371
|
+
}), o;
|
|
1316
1372
|
}
|
|
1317
|
-
function
|
|
1373
|
+
function Se({
|
|
1318
1374
|
layout: e,
|
|
1319
1375
|
itemConstraints: t
|
|
1320
1376
|
}) {
|
|
1321
1377
|
const n = t.map(({ itemId: s }) => e[s]), o = [...n], r = o.reduce(
|
|
1322
|
-
(s,
|
|
1378
|
+
(s, c) => s + c,
|
|
1323
1379
|
0
|
|
1324
1380
|
);
|
|
1325
1381
|
if (Object.keys(e).length !== t.length)
|
|
@@ -1328,75 +1384,75 @@ function ye({
|
|
|
1328
1384
|
);
|
|
1329
1385
|
if (!Y(r, 100) && o.length > 0)
|
|
1330
1386
|
for (let s = 0; s < t.length; s++) {
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
const a = 100 / r *
|
|
1387
|
+
const c = o[s];
|
|
1388
|
+
O(c != null, `No layout data found for index ${s}`);
|
|
1389
|
+
const a = 100 / r * c;
|
|
1334
1390
|
o[s] = a;
|
|
1335
1391
|
}
|
|
1336
1392
|
let i = 0;
|
|
1337
1393
|
for (let s = 0; s < t.length; s++) {
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1394
|
+
const c = n[s];
|
|
1395
|
+
O(c != null, `No layout data found for index ${s}`);
|
|
1340
1396
|
const a = o[s];
|
|
1341
|
-
|
|
1342
|
-
const
|
|
1397
|
+
O(a != null, `No layout data found for index ${s}`);
|
|
1398
|
+
const u = Me({
|
|
1343
1399
|
overrideDisabledItems: !0,
|
|
1344
1400
|
itemConstraints: t[s],
|
|
1345
|
-
prevSize:
|
|
1401
|
+
prevSize: c,
|
|
1346
1402
|
size: a
|
|
1347
1403
|
});
|
|
1348
|
-
a !=
|
|
1404
|
+
a != u && (i += a - u, o[s] = u);
|
|
1349
1405
|
}
|
|
1350
1406
|
if (!Y(i, 0))
|
|
1351
1407
|
for (let s = 0; s < t.length; s++) {
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1354
|
-
const a =
|
|
1408
|
+
const c = o[s];
|
|
1409
|
+
O(c != null, `No layout data found for index ${s}`);
|
|
1410
|
+
const a = c + i, u = Me({
|
|
1355
1411
|
overrideDisabledItems: !0,
|
|
1356
1412
|
itemConstraints: t[s],
|
|
1357
|
-
prevSize:
|
|
1413
|
+
prevSize: c,
|
|
1358
1414
|
size: a
|
|
1359
1415
|
});
|
|
1360
|
-
if (
|
|
1416
|
+
if (c !== u && (i -= u - c, o[s] = u, Y(i, 0)))
|
|
1361
1417
|
break;
|
|
1362
1418
|
}
|
|
1363
|
-
return o.reduce((s,
|
|
1419
|
+
return o.reduce((s, c, a) => (s[t[a].itemId] = c, s), {});
|
|
1364
1420
|
}
|
|
1365
|
-
function
|
|
1421
|
+
function xt({
|
|
1366
1422
|
axisId: e,
|
|
1367
1423
|
itemId: t
|
|
1368
1424
|
}) {
|
|
1369
1425
|
const n = () => {
|
|
1370
|
-
const a =
|
|
1426
|
+
const a = ge();
|
|
1371
1427
|
for (const [
|
|
1372
|
-
|
|
1428
|
+
u,
|
|
1373
1429
|
{
|
|
1374
|
-
defaultLayoutDeferred:
|
|
1430
|
+
defaultLayoutDeferred: l,
|
|
1375
1431
|
derivedItemConstraints: d,
|
|
1376
|
-
layout:
|
|
1377
|
-
axisSize:
|
|
1432
|
+
layout: g,
|
|
1433
|
+
axisSize: p,
|
|
1378
1434
|
separatorToItems: m
|
|
1379
1435
|
}
|
|
1380
1436
|
] of a)
|
|
1381
|
-
if (
|
|
1437
|
+
if (u.id === e)
|
|
1382
1438
|
return {
|
|
1383
|
-
defaultLayoutDeferred:
|
|
1439
|
+
defaultLayoutDeferred: l,
|
|
1384
1440
|
derivedItemConstraints: d,
|
|
1385
|
-
axis:
|
|
1386
|
-
axisSize:
|
|
1387
|
-
layout:
|
|
1441
|
+
axis: u,
|
|
1442
|
+
axisSize: p,
|
|
1443
|
+
layout: g,
|
|
1388
1444
|
separatorToItems: m
|
|
1389
1445
|
};
|
|
1390
1446
|
throw Error(`Group ${e} not found`);
|
|
1391
1447
|
}, o = () => {
|
|
1392
1448
|
const a = n().derivedItemConstraints.find(
|
|
1393
|
-
(
|
|
1449
|
+
(u) => u.itemId === t
|
|
1394
1450
|
);
|
|
1395
1451
|
if (a !== void 0)
|
|
1396
1452
|
return a;
|
|
1397
1453
|
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
1398
1454
|
}, r = () => {
|
|
1399
|
-
const a = n().axis.items.find((
|
|
1455
|
+
const a = n().axis.items.find((u) => u.id === t);
|
|
1400
1456
|
if (a !== void 0)
|
|
1401
1457
|
return a;
|
|
1402
1458
|
throw Error(`Layout not found for Panel ${t}`);
|
|
@@ -1407,103 +1463,107 @@ function mt({
|
|
|
1407
1463
|
throw Error(`Layout not found for Panel ${t}`);
|
|
1408
1464
|
}, s = ({
|
|
1409
1465
|
nextSize: a,
|
|
1410
|
-
items:
|
|
1411
|
-
prevLayout:
|
|
1466
|
+
items: u,
|
|
1467
|
+
prevLayout: l,
|
|
1412
1468
|
derivedItemConstraints: d
|
|
1413
1469
|
}) => {
|
|
1414
|
-
const
|
|
1415
|
-
if (f && a <
|
|
1416
|
-
const
|
|
1417
|
-
return
|
|
1470
|
+
const g = i(), p = u.findIndex((h) => h.id === t), m = p === 0, f = p === u.length - 1;
|
|
1471
|
+
if (f && a < g && (m || u.slice(0, p).every((h, S) => {
|
|
1472
|
+
const z = d[S];
|
|
1473
|
+
return z?.collapsible && Y(z.collapsedSize, l[z.itemId]);
|
|
1418
1474
|
}))) {
|
|
1419
|
-
const h =
|
|
1475
|
+
const h = u.slice(0, p).reduce((S, z) => S + l[z.id], 0);
|
|
1420
1476
|
return {
|
|
1421
|
-
...
|
|
1422
|
-
[t]:
|
|
1477
|
+
...l,
|
|
1478
|
+
[t]: K(100 - h)
|
|
1423
1479
|
};
|
|
1424
1480
|
}
|
|
1425
|
-
return
|
|
1426
|
-
delta: f ?
|
|
1427
|
-
initialLayout:
|
|
1481
|
+
return qe({
|
|
1482
|
+
delta: f ? g - a : a - g,
|
|
1483
|
+
initialLayout: l,
|
|
1428
1484
|
itemConstraints: d,
|
|
1429
|
-
pivotIndices: f ? [
|
|
1430
|
-
prevLayout:
|
|
1485
|
+
pivotIndices: f ? [p - 1, p] : [p, p + 1],
|
|
1486
|
+
prevLayout: l,
|
|
1431
1487
|
trigger: "imperative-api"
|
|
1432
1488
|
});
|
|
1433
|
-
},
|
|
1434
|
-
const
|
|
1435
|
-
if (a ===
|
|
1489
|
+
}, c = (a) => {
|
|
1490
|
+
const u = i();
|
|
1491
|
+
if (a === u)
|
|
1436
1492
|
return;
|
|
1437
1493
|
const {
|
|
1438
|
-
defaultLayoutDeferred:
|
|
1494
|
+
defaultLayoutDeferred: l,
|
|
1439
1495
|
derivedItemConstraints: d,
|
|
1440
|
-
axis:
|
|
1441
|
-
axisSize:
|
|
1496
|
+
axis: g,
|
|
1497
|
+
axisSize: p,
|
|
1442
1498
|
layout: m,
|
|
1443
1499
|
separatorToItems: f
|
|
1444
|
-
} = n(),
|
|
1500
|
+
} = n(), y = s({
|
|
1445
1501
|
nextSize: a,
|
|
1446
|
-
items:
|
|
1502
|
+
items: g.items,
|
|
1447
1503
|
prevLayout: m,
|
|
1448
1504
|
derivedItemConstraints: d
|
|
1449
|
-
}), h =
|
|
1450
|
-
layout:
|
|
1505
|
+
}), h = Se({
|
|
1506
|
+
layout: y,
|
|
1451
1507
|
itemConstraints: d
|
|
1452
1508
|
});
|
|
1453
|
-
|
|
1454
|
-
defaultLayoutDeferred:
|
|
1509
|
+
se(m, h) || fe(g, {
|
|
1510
|
+
defaultLayoutDeferred: l,
|
|
1455
1511
|
derivedItemConstraints: d,
|
|
1456
|
-
axisSize:
|
|
1512
|
+
axisSize: p,
|
|
1457
1513
|
layout: h,
|
|
1458
|
-
requestedAxisSize:
|
|
1514
|
+
requestedAxisSize: p,
|
|
1459
1515
|
requestedLayout: h,
|
|
1460
1516
|
separatorToItems: f
|
|
1461
1517
|
});
|
|
1462
1518
|
};
|
|
1463
1519
|
return {
|
|
1464
1520
|
collapse: () => {
|
|
1465
|
-
const { collapsible: a, collapsedSize:
|
|
1466
|
-
a && d !==
|
|
1521
|
+
const { collapsible: a, collapsedSize: u } = o(), { mutableValues: l } = r(), d = i();
|
|
1522
|
+
a && d !== u && (l.expandToSize = d, c(u));
|
|
1467
1523
|
},
|
|
1468
1524
|
expand: () => {
|
|
1469
|
-
const { collapsible: a, collapsedSize:
|
|
1470
|
-
if (a &&
|
|
1471
|
-
let
|
|
1472
|
-
|
|
1525
|
+
const { collapsible: a, collapsedSize: u, minSize: l } = o(), { mutableValues: d } = r(), g = i();
|
|
1526
|
+
if (a && g === u) {
|
|
1527
|
+
let p = d.expandToSize ?? l;
|
|
1528
|
+
p === 0 && (p = 1), c(p);
|
|
1473
1529
|
}
|
|
1474
1530
|
},
|
|
1475
1531
|
getSize: () => {
|
|
1476
|
-
const { axis: a } = n(),
|
|
1532
|
+
const { axis: a } = n(), u = i(), { element: l } = r(), d = a.layoutStrategy ? a.layoutStrategy.getItemSizeInPixels(t) : a.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
|
|
1477
1533
|
return {
|
|
1478
|
-
asPercentage:
|
|
1534
|
+
asPercentage: u,
|
|
1479
1535
|
inPixels: d
|
|
1480
1536
|
};
|
|
1481
1537
|
},
|
|
1482
1538
|
isCollapsed: () => {
|
|
1483
|
-
const { collapsible: a, collapsedSize:
|
|
1484
|
-
return a && Y(
|
|
1539
|
+
const { collapsible: a, collapsedSize: u } = o(), l = i();
|
|
1540
|
+
return a && Y(u, l);
|
|
1485
1541
|
},
|
|
1486
1542
|
resize: (a) => {
|
|
1487
|
-
const { axis:
|
|
1543
|
+
const { axis: u } = n(), { element: l } = r(), d = Te({ axis: u }), g = Ce({
|
|
1488
1544
|
axisSize: d,
|
|
1489
|
-
itemElement:
|
|
1545
|
+
itemElement: l,
|
|
1490
1546
|
styleProp: a
|
|
1491
|
-
}),
|
|
1492
|
-
|
|
1547
|
+
}), p = K(g / d * 100);
|
|
1548
|
+
c(p);
|
|
1493
1549
|
}
|
|
1494
1550
|
};
|
|
1495
1551
|
}
|
|
1496
|
-
function
|
|
1552
|
+
function $t(e) {
|
|
1497
1553
|
if (e.defaultPrevented)
|
|
1498
1554
|
return;
|
|
1499
|
-
const t =
|
|
1500
|
-
|
|
1555
|
+
const t = ge();
|
|
1556
|
+
bt(
|
|
1557
|
+
e,
|
|
1558
|
+
t,
|
|
1559
|
+
e.currentTarget
|
|
1560
|
+
).forEach((o) => {
|
|
1501
1561
|
if (o.separator && !o.separator.disableDoubleClick) {
|
|
1502
1562
|
const r = o.items.find(
|
|
1503
1563
|
(i) => i.constraintProps.defaultSize !== void 0
|
|
1504
1564
|
);
|
|
1505
1565
|
if (r) {
|
|
1506
|
-
const i = r.constraintProps.defaultSize, s =
|
|
1566
|
+
const i = r.constraintProps.defaultSize, s = xt({
|
|
1507
1567
|
axisId: o.axis.id,
|
|
1508
1568
|
itemId: r.id
|
|
1509
1569
|
});
|
|
@@ -1512,8 +1572,8 @@ function Lt(e) {
|
|
|
1512
1572
|
}
|
|
1513
1573
|
});
|
|
1514
1574
|
}
|
|
1515
|
-
function
|
|
1516
|
-
const t =
|
|
1575
|
+
function gn(e) {
|
|
1576
|
+
const t = ge();
|
|
1517
1577
|
for (const [n] of t)
|
|
1518
1578
|
if (n.separators.some(
|
|
1519
1579
|
(o) => o.element === e
|
|
@@ -1521,11 +1581,11 @@ function rn(e) {
|
|
|
1521
1581
|
return n;
|
|
1522
1582
|
throw Error("Could not find parent Group for separator element");
|
|
1523
1583
|
}
|
|
1524
|
-
function
|
|
1584
|
+
function _e({
|
|
1525
1585
|
axisId: e
|
|
1526
1586
|
}) {
|
|
1527
1587
|
const t = () => {
|
|
1528
|
-
const n =
|
|
1588
|
+
const n = ge();
|
|
1529
1589
|
for (const [o, r] of n)
|
|
1530
1590
|
if (o.id === e)
|
|
1531
1591
|
return { axis: o, ...r };
|
|
@@ -1542,51 +1602,51 @@ function Ge({
|
|
|
1542
1602
|
derivedItemConstraints: r,
|
|
1543
1603
|
axis: i,
|
|
1544
1604
|
axisSize: s,
|
|
1545
|
-
layout:
|
|
1605
|
+
layout: c,
|
|
1546
1606
|
separatorToItems: a
|
|
1547
|
-
} = t(),
|
|
1607
|
+
} = t(), u = Se({
|
|
1548
1608
|
layout: n,
|
|
1549
1609
|
itemConstraints: r
|
|
1550
1610
|
});
|
|
1551
|
-
return o ?
|
|
1611
|
+
return o ? c : (se(c, u) || fe(i, {
|
|
1552
1612
|
defaultLayoutDeferred: o,
|
|
1553
1613
|
derivedItemConstraints: r,
|
|
1554
1614
|
axisSize: s,
|
|
1555
|
-
layout:
|
|
1615
|
+
layout: u,
|
|
1556
1616
|
requestedAxisSize: s,
|
|
1557
|
-
requestedLayout:
|
|
1617
|
+
requestedLayout: u,
|
|
1558
1618
|
separatorToItems: a
|
|
1559
|
-
}),
|
|
1619
|
+
}), u);
|
|
1560
1620
|
}
|
|
1561
1621
|
};
|
|
1562
1622
|
}
|
|
1563
1623
|
function we(e, t) {
|
|
1564
|
-
const n =
|
|
1624
|
+
const n = gn(e), o = ae(n.id, !0), r = n.separators.find(
|
|
1565
1625
|
(d) => d.element === e
|
|
1566
1626
|
);
|
|
1567
|
-
|
|
1627
|
+
O(r, "Matching separator not found");
|
|
1568
1628
|
const i = o.separatorToItems.get(r);
|
|
1569
|
-
|
|
1570
|
-
const s = i.map((d) => n.items.indexOf(d)), a =
|
|
1629
|
+
O(i, "Matching panels not found");
|
|
1630
|
+
const s = i.map((d) => n.items.indexOf(d)), a = _e({ axisId: n.id }).getLayout(), u = qe({
|
|
1571
1631
|
delta: t,
|
|
1572
1632
|
initialLayout: a,
|
|
1573
1633
|
itemConstraints: o.derivedItemConstraints,
|
|
1574
1634
|
pivotIndices: s,
|
|
1575
1635
|
prevLayout: a,
|
|
1576
1636
|
trigger: "keyboard"
|
|
1577
|
-
}),
|
|
1578
|
-
layout:
|
|
1637
|
+
}), l = Se({
|
|
1638
|
+
layout: u,
|
|
1579
1639
|
itemConstraints: o.derivedItemConstraints
|
|
1580
1640
|
});
|
|
1581
|
-
|
|
1641
|
+
se(a, l) || fe(
|
|
1582
1642
|
n,
|
|
1583
1643
|
{
|
|
1584
1644
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
1585
1645
|
derivedItemConstraints: o.derivedItemConstraints,
|
|
1586
1646
|
axisSize: o.axisSize,
|
|
1587
|
-
layout:
|
|
1647
|
+
layout: l,
|
|
1588
1648
|
requestedAxisSize: o.axisSize,
|
|
1589
|
-
requestedLayout:
|
|
1649
|
+
requestedLayout: l,
|
|
1590
1650
|
separatorToItems: o.separatorToItems
|
|
1591
1651
|
},
|
|
1592
1652
|
// Keyboard resizes (arrow keys, Home/End, Enter collapse/expand) originate
|
|
@@ -1596,10 +1656,10 @@ function we(e, t) {
|
|
|
1596
1656
|
{ isUserInteraction: !0 }
|
|
1597
1657
|
);
|
|
1598
1658
|
}
|
|
1599
|
-
function
|
|
1659
|
+
function Ot(e) {
|
|
1600
1660
|
if (e.defaultPrevented)
|
|
1601
1661
|
return;
|
|
1602
|
-
const t = e.currentTarget, n =
|
|
1662
|
+
const t = e.currentTarget, n = gn(t);
|
|
1603
1663
|
if (!(n.disabled || n.separators.find(
|
|
1604
1664
|
(r) => r.element === t
|
|
1605
1665
|
)?.disabled))
|
|
@@ -1626,18 +1686,18 @@ function Ct(e) {
|
|
|
1626
1686
|
}
|
|
1627
1687
|
case "Enter": {
|
|
1628
1688
|
e.preventDefault();
|
|
1629
|
-
const r = ae(n.id, !0), { derivedItemConstraints: i, layout: s, separatorToItems:
|
|
1630
|
-
(
|
|
1689
|
+
const r = ae(n.id, !0), { derivedItemConstraints: i, layout: s, separatorToItems: c } = r, a = n.separators.find(
|
|
1690
|
+
(g) => g.element === t
|
|
1631
1691
|
);
|
|
1632
|
-
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1635
|
-
const
|
|
1636
|
-
(
|
|
1692
|
+
O(a, "Matching separator not found");
|
|
1693
|
+
const u = c.get(a);
|
|
1694
|
+
O(u, "Matching panels not found");
|
|
1695
|
+
const l = u[0], d = i.find(
|
|
1696
|
+
(g) => g.itemId === l.id
|
|
1637
1697
|
);
|
|
1638
|
-
if (
|
|
1639
|
-
const
|
|
1640
|
-
we(t,
|
|
1698
|
+
if (O(d, "Panel metadata not found"), d.collapsible) {
|
|
1699
|
+
const g = s[l.id], p = d.collapsedSize === g ? n.mutableState.expandedItemSizes[l.id] ?? d.minSize : d.collapsedSize;
|
|
1700
|
+
we(t, p - g);
|
|
1641
1701
|
}
|
|
1642
1702
|
break;
|
|
1643
1703
|
}
|
|
@@ -1648,7 +1708,7 @@ function Ct(e) {
|
|
|
1648
1708
|
), i = Array.from(r).findIndex(
|
|
1649
1709
|
(a) => a === e.currentTarget
|
|
1650
1710
|
);
|
|
1651
|
-
|
|
1711
|
+
O(i !== null, "Index not found");
|
|
1652
1712
|
const s = e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0;
|
|
1653
1713
|
r[s].focus({
|
|
1654
1714
|
preventScroll: !0
|
|
@@ -1661,33 +1721,39 @@ function Ct(e) {
|
|
|
1661
1721
|
}
|
|
1662
1722
|
}
|
|
1663
1723
|
}
|
|
1664
|
-
function
|
|
1665
|
-
const
|
|
1666
|
-
if (
|
|
1724
|
+
function ke(e, t) {
|
|
1725
|
+
const n = ie();
|
|
1726
|
+
if (n.state !== "active" || !nt(n, e, t))
|
|
1667
1727
|
return !1;
|
|
1668
|
-
const
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
layout
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1728
|
+
const o = ge();
|
|
1729
|
+
et();
|
|
1730
|
+
try {
|
|
1731
|
+
n.previewLayoutMap.forEach((r, i) => {
|
|
1732
|
+
const s = o.get(i);
|
|
1733
|
+
i.resizePreviewMode === "separator" && s && !se(r, s.layout) && fe(i, {
|
|
1734
|
+
...s,
|
|
1735
|
+
layout: r,
|
|
1736
|
+
requestedAxisSize: s.axisSize,
|
|
1737
|
+
requestedLayout: r
|
|
1738
|
+
});
|
|
1739
|
+
}), St(), de({
|
|
1740
|
+
cursorFlags: 0,
|
|
1741
|
+
state: "inactive"
|
|
1742
|
+
}), n.hitRegions.forEach((r) => {
|
|
1743
|
+
if (!o.has(r.axis))
|
|
1744
|
+
return;
|
|
1745
|
+
const i = ae(r.axis.id, !0);
|
|
1746
|
+
fe(r.axis, i, {
|
|
1747
|
+
isUserInteraction: !0
|
|
1748
|
+
});
|
|
1686
1749
|
});
|
|
1687
|
-
}
|
|
1750
|
+
} finally {
|
|
1751
|
+
tt();
|
|
1752
|
+
}
|
|
1753
|
+
return !0;
|
|
1688
1754
|
}
|
|
1689
|
-
function
|
|
1690
|
-
const t =
|
|
1755
|
+
function Nt(e) {
|
|
1756
|
+
const t = ie();
|
|
1691
1757
|
if (t.state !== "active")
|
|
1692
1758
|
return;
|
|
1693
1759
|
const n = t.hitRegions.flatMap(
|
|
@@ -1695,176 +1761,197 @@ function Rt(e) {
|
|
|
1695
1761
|
);
|
|
1696
1762
|
!n.some((o) => o === e.target) || n.some(
|
|
1697
1763
|
(o) => o.hasPointerCapture?.(e.pointerId)
|
|
1698
|
-
) ||
|
|
1764
|
+
) || ke(e.currentTarget, e);
|
|
1699
1765
|
}
|
|
1700
|
-
function
|
|
1701
|
-
|
|
1766
|
+
function Gt(e) {
|
|
1767
|
+
ke(e.currentTarget, e);
|
|
1702
1768
|
}
|
|
1703
|
-
function
|
|
1769
|
+
function ao(e, t) {
|
|
1704
1770
|
const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
1705
|
-
return
|
|
1771
|
+
return gt({
|
|
1706
1772
|
expandHitTargets: !1,
|
|
1707
1773
|
axis: e,
|
|
1708
1774
|
includeDisabled: !0
|
|
1709
|
-
}).map(({ items: a, rect:
|
|
1710
|
-
const
|
|
1775
|
+
}).map(({ items: a, rect: u, separator: l }, d) => {
|
|
1776
|
+
const g = r.indexOf(a[0]), p = s ? u.left + u.width / 2 : u.top + u.height / 2;
|
|
1711
1777
|
return {
|
|
1712
1778
|
active: t.some((f) => {
|
|
1713
1779
|
if (f.axis !== e || f.items[0] !== a[0])
|
|
1714
1780
|
return !1;
|
|
1715
|
-
if (
|
|
1716
|
-
return f.separator ===
|
|
1717
|
-
const
|
|
1718
|
-
return Y(
|
|
1781
|
+
if (l || f.separator)
|
|
1782
|
+
return f.separator === l;
|
|
1783
|
+
const y = s ? f.rect.left + f.rect.width / 2 : f.rect.top + f.rect.height / 2;
|
|
1784
|
+
return Y(p, y);
|
|
1719
1785
|
}),
|
|
1720
1786
|
axis: e,
|
|
1721
|
-
key:
|
|
1787
|
+
key: l ? `separator-${l.id}` : `panel-${a[0].id}-${d}`,
|
|
1722
1788
|
offset: 0,
|
|
1723
|
-
itemIndex:
|
|
1789
|
+
itemIndex: g,
|
|
1724
1790
|
rect: new DOMRect(
|
|
1725
|
-
(s && !
|
|
1726
|
-
(!s && !
|
|
1727
|
-
s && !
|
|
1728
|
-
!s && !
|
|
1791
|
+
(s && !l ? p : u.left) - i.left - n.clientLeft + n.scrollLeft,
|
|
1792
|
+
(!s && !l ? p : u.top) - i.top - n.clientTop + n.scrollTop,
|
|
1793
|
+
s && !l ? 0 : u.width,
|
|
1794
|
+
!s && !l ? 0 : u.height
|
|
1729
1795
|
),
|
|
1730
|
-
separator:
|
|
1796
|
+
separator: l
|
|
1731
1797
|
};
|
|
1732
1798
|
});
|
|
1733
1799
|
}
|
|
1734
|
-
function
|
|
1800
|
+
function Ft(e) {
|
|
1735
1801
|
if (e.defaultPrevented)
|
|
1736
1802
|
return;
|
|
1737
1803
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1738
1804
|
return;
|
|
1739
|
-
const t =
|
|
1740
|
-
if (
|
|
1805
|
+
const t = ie();
|
|
1806
|
+
if (t.state === "active") {
|
|
1807
|
+
mn(t, e) && ke(
|
|
1808
|
+
t.ownerDocument,
|
|
1809
|
+
t
|
|
1810
|
+
);
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
const n = ge(), o = bt(
|
|
1814
|
+
e,
|
|
1815
|
+
n,
|
|
1816
|
+
e.currentTarget
|
|
1817
|
+
);
|
|
1818
|
+
if (o.length === 0)
|
|
1741
1819
|
return;
|
|
1742
|
-
const
|
|
1743
|
-
let
|
|
1744
|
-
|
|
1745
|
-
|
|
1820
|
+
const r = /* @__PURE__ */ new Map();
|
|
1821
|
+
let i = !1;
|
|
1822
|
+
o.forEach((c) => {
|
|
1823
|
+
c.separator && (i || (i = !0, c.separator.element.focus({
|
|
1746
1824
|
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
|
|
1747
1825
|
focusVisible: !1,
|
|
1748
1826
|
preventScroll: !0
|
|
1749
1827
|
})));
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1828
|
+
const a = n.get(c.axis);
|
|
1829
|
+
a && r.set(c.axis, a.layout);
|
|
1752
1830
|
});
|
|
1753
|
-
const
|
|
1754
|
-
(
|
|
1831
|
+
const s = Array.from(r.keys()).flatMap(
|
|
1832
|
+
(c) => c.resizePreviewMode === "separator" ? ao(c, o) : []
|
|
1755
1833
|
);
|
|
1756
1834
|
de({
|
|
1757
1835
|
cursorFlags: 0,
|
|
1758
1836
|
didPointerMove: !1,
|
|
1759
|
-
hitRegions:
|
|
1760
|
-
initialLayoutMap:
|
|
1837
|
+
hitRegions: o,
|
|
1838
|
+
initialLayoutMap: r,
|
|
1839
|
+
ownerDocument: e.currentTarget,
|
|
1761
1840
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
1762
|
-
|
|
1763
|
-
|
|
1841
|
+
pointerId: e.pointerId,
|
|
1842
|
+
pointerType: e.pointerType,
|
|
1843
|
+
previewLayoutMap: new Map(r),
|
|
1844
|
+
previews: s,
|
|
1764
1845
|
state: "active"
|
|
1765
1846
|
}), e.preventDefault();
|
|
1766
1847
|
}
|
|
1767
|
-
function
|
|
1768
|
-
const t =
|
|
1769
|
-
switch (
|
|
1770
|
-
case "active":
|
|
1771
|
-
|
|
1848
|
+
function _t(e) {
|
|
1849
|
+
const t = e.currentTarget, n = ge(), o = ie();
|
|
1850
|
+
switch (o.state) {
|
|
1851
|
+
case "active": {
|
|
1852
|
+
if (!nt(o, t, e))
|
|
1853
|
+
return;
|
|
1854
|
+
vt({
|
|
1772
1855
|
commit: !1,
|
|
1773
|
-
document: e.currentTarget,
|
|
1774
1856
|
event: e,
|
|
1775
|
-
hitRegions:
|
|
1776
|
-
initialLayoutMap:
|
|
1777
|
-
mountedAxes:
|
|
1778
|
-
prevCursorFlags:
|
|
1857
|
+
hitRegions: o.hitRegions,
|
|
1858
|
+
initialLayoutMap: o.initialLayoutMap,
|
|
1859
|
+
mountedAxes: n,
|
|
1860
|
+
prevCursorFlags: o.cursorFlags
|
|
1779
1861
|
});
|
|
1862
|
+
}
|
|
1780
1863
|
}
|
|
1781
1864
|
}
|
|
1782
|
-
function
|
|
1865
|
+
function Bt(e) {
|
|
1783
1866
|
if (e.defaultPrevented)
|
|
1784
1867
|
return;
|
|
1785
|
-
const t =
|
|
1786
|
-
switch (
|
|
1868
|
+
const t = e.currentTarget, n = ie(), o = ge();
|
|
1869
|
+
switch (n.state) {
|
|
1787
1870
|
case "active": {
|
|
1871
|
+
if (!nt(n, t, e))
|
|
1872
|
+
return;
|
|
1788
1873
|
if (
|
|
1789
1874
|
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
1790
1875
|
e.buttons === 0
|
|
1791
1876
|
) {
|
|
1792
|
-
|
|
1877
|
+
ke(t, e);
|
|
1793
1878
|
return;
|
|
1794
1879
|
}
|
|
1795
|
-
for (const
|
|
1796
|
-
if (
|
|
1797
|
-
const { element:
|
|
1798
|
-
|
|
1880
|
+
for (const r of n.hitRegions)
|
|
1881
|
+
if (r.separator) {
|
|
1882
|
+
const { element: i } = r.separator;
|
|
1883
|
+
i.isConnected && !i.hasPointerCapture?.(e.pointerId) && i.setPointerCapture?.(e.pointerId);
|
|
1799
1884
|
}
|
|
1800
|
-
|
|
1885
|
+
vt({
|
|
1801
1886
|
commit: !1,
|
|
1802
|
-
document: e.currentTarget,
|
|
1803
1887
|
event: e,
|
|
1804
|
-
hitRegions:
|
|
1805
|
-
initialLayoutMap:
|
|
1806
|
-
mountedAxes:
|
|
1807
|
-
pointerDownAtPoint:
|
|
1808
|
-
prevCursorFlags:
|
|
1888
|
+
hitRegions: n.hitRegions,
|
|
1889
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1890
|
+
mountedAxes: o,
|
|
1891
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
1892
|
+
prevCursorFlags: n.cursorFlags
|
|
1809
1893
|
});
|
|
1810
1894
|
break;
|
|
1811
1895
|
}
|
|
1812
1896
|
default: {
|
|
1813
|
-
const
|
|
1814
|
-
|
|
1897
|
+
const r = bt(
|
|
1898
|
+
e,
|
|
1899
|
+
o,
|
|
1900
|
+
t
|
|
1901
|
+
);
|
|
1902
|
+
r.length === 0 ? n.state !== "inactive" && de({
|
|
1815
1903
|
cursorFlags: 0,
|
|
1816
1904
|
state: "inactive"
|
|
1817
1905
|
}) : de({
|
|
1818
1906
|
cursorFlags: 0,
|
|
1819
|
-
hitRegions:
|
|
1907
|
+
hitRegions: r,
|
|
1908
|
+
ownerDocument: t,
|
|
1820
1909
|
state: "hover"
|
|
1821
|
-
})
|
|
1910
|
+
});
|
|
1822
1911
|
break;
|
|
1823
1912
|
}
|
|
1824
1913
|
}
|
|
1825
1914
|
}
|
|
1826
|
-
function
|
|
1827
|
-
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
1828
|
-
|
|
1915
|
+
function qt(e) {
|
|
1916
|
+
if (e.relatedTarget instanceof HTMLIFrameElement) {
|
|
1917
|
+
const t = ie();
|
|
1918
|
+
switch (t.state) {
|
|
1829
1919
|
case "hover":
|
|
1830
|
-
de({
|
|
1920
|
+
t.ownerDocument === e.currentTarget && de({
|
|
1831
1921
|
cursorFlags: 0,
|
|
1832
1922
|
state: "inactive"
|
|
1833
1923
|
});
|
|
1834
1924
|
}
|
|
1925
|
+
}
|
|
1835
1926
|
}
|
|
1836
|
-
function
|
|
1837
|
-
|
|
1838
|
-
return;
|
|
1839
|
-
if (e.pointerType === "mouse" && e.button > 0)
|
|
1840
|
-
return;
|
|
1841
|
-
nn(
|
|
1842
|
-
e.currentTarget,
|
|
1843
|
-
e
|
|
1844
|
-
) && e.preventDefault();
|
|
1927
|
+
function Ht(e) {
|
|
1928
|
+
e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || pn(e.currentTarget, e);
|
|
1845
1929
|
}
|
|
1846
|
-
function
|
|
1847
|
-
e.target === e.currentTarget &&
|
|
1930
|
+
function Vt(e) {
|
|
1931
|
+
e.target === e.currentTarget && ke(e.currentTarget.document);
|
|
1848
1932
|
}
|
|
1849
|
-
function
|
|
1933
|
+
function jt(e) {
|
|
1934
|
+
ke(e.currentTarget.document);
|
|
1935
|
+
}
|
|
1936
|
+
function co(e) {
|
|
1850
1937
|
let t = 0, n = 0;
|
|
1851
1938
|
const o = {};
|
|
1852
1939
|
for (const i of e)
|
|
1853
1940
|
if (i.defaultSize !== void 0) {
|
|
1854
1941
|
t++;
|
|
1855
|
-
const s =
|
|
1942
|
+
const s = K(i.defaultSize);
|
|
1856
1943
|
n += s, o[i.itemId] = s;
|
|
1857
1944
|
} else
|
|
1858
1945
|
o[i.itemId] = void 0;
|
|
1859
1946
|
const r = e.length - t;
|
|
1860
1947
|
if (r !== 0) {
|
|
1861
|
-
const i =
|
|
1948
|
+
const i = K((100 - n) / r);
|
|
1862
1949
|
for (const s of e)
|
|
1863
1950
|
s.defaultSize === void 0 && (o[s.itemId] = i);
|
|
1864
1951
|
}
|
|
1865
1952
|
return o;
|
|
1866
1953
|
}
|
|
1867
|
-
function
|
|
1954
|
+
function lo(e, t) {
|
|
1868
1955
|
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
1869
1956
|
if (n.length !== o.length)
|
|
1870
1957
|
return !1;
|
|
@@ -1873,18 +1960,18 @@ function Xn(e, t) {
|
|
|
1873
1960
|
return !1;
|
|
1874
1961
|
return !0;
|
|
1875
1962
|
}
|
|
1876
|
-
function
|
|
1963
|
+
function Ut({
|
|
1877
1964
|
axis: e,
|
|
1878
1965
|
itemConstraints: t
|
|
1879
1966
|
}) {
|
|
1880
1967
|
const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
|
|
1881
|
-
return e.mutableState.layouts[n] ?? (o &&
|
|
1968
|
+
return e.mutableState.layouts[n] ?? (o && lo(e.items, o) ? o : co(t));
|
|
1882
1969
|
}
|
|
1883
|
-
function
|
|
1970
|
+
function Wt({
|
|
1884
1971
|
itemIds: e,
|
|
1885
1972
|
layout: t
|
|
1886
1973
|
}) {
|
|
1887
|
-
return
|
|
1974
|
+
return Se({
|
|
1888
1975
|
layout: t,
|
|
1889
1976
|
itemConstraints: e.map((n) => ({
|
|
1890
1977
|
collapsedSize: 0,
|
|
@@ -1897,19 +1984,19 @@ function Ot({
|
|
|
1897
1984
|
}))
|
|
1898
1985
|
});
|
|
1899
1986
|
}
|
|
1900
|
-
function
|
|
1987
|
+
function uo(e, t, n) {
|
|
1901
1988
|
if (!n[0])
|
|
1902
1989
|
return;
|
|
1903
|
-
const r = e.items.find((
|
|
1990
|
+
const r = e.items.find((u) => u.element === t);
|
|
1904
1991
|
if (!r || !r.onResize)
|
|
1905
1992
|
return;
|
|
1906
|
-
const i =
|
|
1907
|
-
asPercentage:
|
|
1993
|
+
const i = Te({ axis: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, c = r.mutableValues.prevSize, a = {
|
|
1994
|
+
asPercentage: K(s / i * 100),
|
|
1908
1995
|
inPixels: s
|
|
1909
1996
|
};
|
|
1910
|
-
r.mutableValues.prevSize = a, r.onResize(a, r.id,
|
|
1997
|
+
r.mutableValues.prevSize = a, r.onResize(a, r.id, c);
|
|
1911
1998
|
}
|
|
1912
|
-
function
|
|
1999
|
+
function yn(e, t) {
|
|
1913
2000
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1914
2001
|
return !1;
|
|
1915
2002
|
for (const o in e)
|
|
@@ -1917,10 +2004,10 @@ function sn(e, t) {
|
|
|
1917
2004
|
return !1;
|
|
1918
2005
|
return !0;
|
|
1919
2006
|
}
|
|
1920
|
-
function
|
|
1921
|
-
return e.length !== t.length ? !1 : e.every((n, o) =>
|
|
2007
|
+
function fo(e, t) {
|
|
2008
|
+
return e.length !== t.length ? !1 : e.every((n, o) => yn(n, t[o]));
|
|
1922
2009
|
}
|
|
1923
|
-
function
|
|
2010
|
+
function mo({
|
|
1924
2011
|
axis: e,
|
|
1925
2012
|
nextAxisSize: t,
|
|
1926
2013
|
prevAxisSize: n,
|
|
@@ -1929,173 +2016,186 @@ function Qn({
|
|
|
1929
2016
|
if (n <= 0 || t <= 0 || n === t)
|
|
1930
2017
|
return o;
|
|
1931
2018
|
let r = 0, i = 0, s = !1;
|
|
1932
|
-
const
|
|
2019
|
+
const c = /* @__PURE__ */ new Map(), a = [];
|
|
1933
2020
|
for (const d of e.items) {
|
|
1934
|
-
const
|
|
2021
|
+
const g = o[d.id] ?? 0;
|
|
1935
2022
|
switch (d.constraintProps.groupResizeBehavior) {
|
|
1936
2023
|
case "preserve-pixel-size": {
|
|
1937
2024
|
s = !0;
|
|
1938
|
-
const
|
|
1939
|
-
|
|
2025
|
+
const p = g / 100 * n, m = K(
|
|
2026
|
+
p / t * 100
|
|
1940
2027
|
);
|
|
1941
|
-
|
|
2028
|
+
c.set(d.id, m), r += m;
|
|
1942
2029
|
break;
|
|
1943
2030
|
}
|
|
1944
2031
|
case "preserve-relative-size":
|
|
1945
2032
|
default: {
|
|
1946
|
-
a.push(d.id), i +=
|
|
2033
|
+
a.push(d.id), i += g;
|
|
1947
2034
|
break;
|
|
1948
2035
|
}
|
|
1949
2036
|
}
|
|
1950
2037
|
}
|
|
1951
2038
|
if (!s || a.length === 0)
|
|
1952
2039
|
return o;
|
|
1953
|
-
const
|
|
1954
|
-
if (
|
|
1955
|
-
|
|
2040
|
+
const u = 100 - r, l = { ...o };
|
|
2041
|
+
if (c.forEach((d, g) => {
|
|
2042
|
+
l[g] = d;
|
|
1956
2043
|
}), i > 0)
|
|
1957
2044
|
for (const d of a) {
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1960
|
-
|
|
2045
|
+
const g = o[d] ?? 0;
|
|
2046
|
+
l[d] = K(
|
|
2047
|
+
g / i * u
|
|
1961
2048
|
);
|
|
1962
2049
|
}
|
|
1963
2050
|
else {
|
|
1964
|
-
const d =
|
|
1965
|
-
for (const
|
|
1966
|
-
|
|
2051
|
+
const d = K(u / a.length);
|
|
2052
|
+
for (const g of a)
|
|
2053
|
+
l[g] = d;
|
|
1967
2054
|
}
|
|
1968
|
-
return
|
|
2055
|
+
return l;
|
|
1969
2056
|
}
|
|
1970
2057
|
const Le = /* @__PURE__ */ new Map();
|
|
1971
|
-
|
|
2058
|
+
let Yt = !1;
|
|
2059
|
+
function Sn(e) {
|
|
1972
2060
|
let t = !0;
|
|
1973
|
-
|
|
2061
|
+
O(
|
|
1974
2062
|
e.element.ownerDocument.defaultView,
|
|
1975
2063
|
"Cannot register an unmounted Group"
|
|
1976
2064
|
);
|
|
1977
2065
|
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((m) => {
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2066
|
+
let f;
|
|
2067
|
+
et();
|
|
2068
|
+
try {
|
|
2069
|
+
for (const y of m) {
|
|
2070
|
+
const { borderBoxSize: h, target: S } = y;
|
|
2071
|
+
if (S === e.element) {
|
|
2072
|
+
if (t) {
|
|
2073
|
+
const z = Te({ axis: e });
|
|
2074
|
+
if (z === 0)
|
|
2075
|
+
break;
|
|
2076
|
+
const x = ae(e.id);
|
|
2077
|
+
if (!x)
|
|
2078
|
+
break;
|
|
2079
|
+
const R = ut(e);
|
|
2080
|
+
let N = x.requestedAxisSize, $ = x.requestedLayout;
|
|
2081
|
+
x.defaultLayoutDeferred && (N = z, $ = Wt({
|
|
2082
|
+
itemIds: e.items.map(({ id: v }) => v),
|
|
2083
|
+
layout: Ut({
|
|
2084
|
+
axis: e,
|
|
2085
|
+
itemConstraints: R
|
|
2086
|
+
})
|
|
2087
|
+
}));
|
|
2088
|
+
const b = mo({
|
|
1993
2089
|
axis: e,
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
})
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2090
|
+
nextAxisSize: z,
|
|
2091
|
+
prevAxisSize: N,
|
|
2092
|
+
prevLayout: $
|
|
2093
|
+
}), w = Se({
|
|
2094
|
+
layout: b,
|
|
2095
|
+
itemConstraints: R
|
|
2096
|
+
});
|
|
2097
|
+
if (!x.defaultLayoutDeferred && se(x.layout, w) && fo(
|
|
2098
|
+
x.derivedItemConstraints,
|
|
2099
|
+
R
|
|
2100
|
+
) && x.axisSize === z)
|
|
2101
|
+
continue;
|
|
2102
|
+
fe(e, {
|
|
2103
|
+
defaultLayoutDeferred: !1,
|
|
2104
|
+
derivedItemConstraints: R,
|
|
2105
|
+
axisSize: z,
|
|
2106
|
+
layout: w,
|
|
2107
|
+
requestedAxisSize: N,
|
|
2108
|
+
requestedLayout: $,
|
|
2109
|
+
separatorToItems: x.separatorToItems
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
} else
|
|
2113
|
+
try {
|
|
2114
|
+
uo(e, S, h);
|
|
2115
|
+
} catch (z) {
|
|
2116
|
+
f ??= { error: z };
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
} finally {
|
|
2120
|
+
tt();
|
|
2023
2121
|
}
|
|
2122
|
+
if (f)
|
|
2123
|
+
throw f.error;
|
|
2024
2124
|
});
|
|
2025
2125
|
i.observe(e.element), e.items.forEach((m) => {
|
|
2026
|
-
|
|
2126
|
+
O(
|
|
2027
2127
|
!o.has(m.id),
|
|
2028
2128
|
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
2029
2129
|
), o.add(m.id), m.onResize && i.observe(m.element);
|
|
2030
2130
|
});
|
|
2031
|
-
const s =
|
|
2131
|
+
const s = Te({ axis: e }), c = ut(e), a = Ut({
|
|
2032
2132
|
axis: e,
|
|
2033
|
-
itemConstraints:
|
|
2034
|
-
}),
|
|
2133
|
+
itemConstraints: c
|
|
2134
|
+
}), u = Se({
|
|
2035
2135
|
layout: a,
|
|
2036
|
-
itemConstraints:
|
|
2037
|
-
}),
|
|
2136
|
+
itemConstraints: c
|
|
2137
|
+
}), l = e.element.ownerDocument, d = l.defaultView;
|
|
2038
2138
|
Le.set(
|
|
2039
|
-
|
|
2040
|
-
(Le.get(
|
|
2139
|
+
l,
|
|
2140
|
+
(Le.get(l) ?? 0) + 1
|
|
2041
2141
|
);
|
|
2042
|
-
const
|
|
2043
|
-
return
|
|
2044
|
-
m.separator &&
|
|
2142
|
+
const g = /* @__PURE__ */ new Map();
|
|
2143
|
+
return gt({ axis: e, includeDisabled: !0 }).forEach((m) => {
|
|
2144
|
+
m.separator && g.set(m.separator, m.items);
|
|
2045
2145
|
}), fe(e, {
|
|
2046
2146
|
defaultLayoutDeferred: s === 0,
|
|
2047
|
-
derivedItemConstraints:
|
|
2147
|
+
derivedItemConstraints: c,
|
|
2048
2148
|
axisSize: s,
|
|
2049
|
-
layout:
|
|
2149
|
+
layout: u,
|
|
2050
2150
|
requestedAxisSize: s,
|
|
2051
|
-
requestedLayout:
|
|
2151
|
+
requestedLayout: Wt({
|
|
2052
2152
|
itemIds: e.items.map(({ id: m }) => m),
|
|
2053
2153
|
layout: a
|
|
2054
2154
|
}),
|
|
2055
|
-
separatorToItems:
|
|
2155
|
+
separatorToItems: g
|
|
2056
2156
|
}), e.separators.forEach((m) => {
|
|
2057
|
-
|
|
2157
|
+
O(
|
|
2058
2158
|
!r.has(m.id),
|
|
2059
2159
|
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
2060
|
-
), r.add(m.id), m.element.addEventListener("keydown",
|
|
2061
|
-
}), Le.get(
|
|
2160
|
+
), r.add(m.id), m.element.addEventListener("keydown", Ot);
|
|
2161
|
+
}), Yt || (Yt = !0, pt(Bn)), Le.get(l) === 1 && (l.addEventListener("contextmenu", Tt, !0), l.addEventListener("dblclick", $t, !0), l.addEventListener(
|
|
2062
2162
|
"lostpointercapture",
|
|
2063
|
-
|
|
2163
|
+
Nt,
|
|
2064
2164
|
!0
|
|
2065
|
-
),
|
|
2165
|
+
), l.addEventListener(
|
|
2066
2166
|
"pointercancel",
|
|
2067
|
-
|
|
2167
|
+
Gt,
|
|
2068
2168
|
!0
|
|
2069
|
-
),
|
|
2169
|
+
), l.addEventListener("pointerdown", Ft, !0), l.addEventListener("pointerleave", _t), l.addEventListener("pointermove", Bt), l.addEventListener("pointerout", qt), l.addEventListener("pointerup", Ht, !0), d?.addEventListener("blur", Vt), d?.addEventListener("pagehide", jt)), function() {
|
|
2070
2170
|
t = !1, Le.set(
|
|
2071
|
-
|
|
2072
|
-
Math.max(0, (Le.get(
|
|
2073
|
-
),
|
|
2074
|
-
f.element.removeEventListener("keydown",
|
|
2075
|
-
}), Le.get(
|
|
2171
|
+
l,
|
|
2172
|
+
Math.max(0, (Le.get(l) ?? 0) - 1)
|
|
2173
|
+
), Xn(e), Gn(e), e.separators.forEach((f) => {
|
|
2174
|
+
f.element.removeEventListener("keydown", Ot);
|
|
2175
|
+
}), Le.get(l) || (l.removeEventListener(
|
|
2076
2176
|
"contextmenu",
|
|
2077
|
-
|
|
2177
|
+
Tt,
|
|
2078
2178
|
!0
|
|
2079
|
-
),
|
|
2179
|
+
), l.removeEventListener(
|
|
2080
2180
|
"dblclick",
|
|
2081
|
-
|
|
2181
|
+
$t,
|
|
2082
2182
|
!0
|
|
2083
|
-
),
|
|
2183
|
+
), l.removeEventListener(
|
|
2084
2184
|
"lostpointercapture",
|
|
2085
|
-
|
|
2185
|
+
Nt,
|
|
2086
2186
|
!0
|
|
2087
|
-
),
|
|
2187
|
+
), l.removeEventListener(
|
|
2088
2188
|
"pointercancel",
|
|
2089
|
-
|
|
2189
|
+
Gt,
|
|
2090
2190
|
!0
|
|
2091
|
-
),
|
|
2191
|
+
), l.removeEventListener(
|
|
2092
2192
|
"pointerdown",
|
|
2093
|
-
|
|
2193
|
+
Ft,
|
|
2094
2194
|
!0
|
|
2095
|
-
),
|
|
2195
|
+
), l.removeEventListener("pointerleave", _t), l.removeEventListener("pointermove", Bt), l.removeEventListener("pointerout", qt), l.removeEventListener("pointerup", Ht, !0), d?.removeEventListener("blur", Vt), d?.removeEventListener("pagehide", jt)), i.disconnect();
|
|
2096
2196
|
};
|
|
2097
2197
|
}
|
|
2098
|
-
function
|
|
2198
|
+
function vn({
|
|
2099
2199
|
derivedItemConstraints: e,
|
|
2100
2200
|
axis: t,
|
|
2101
2201
|
layout: n,
|
|
@@ -2105,56 +2205,56 @@ function ln({
|
|
|
2105
2205
|
const i = t.items.map(({ id: s }) => s).join(",");
|
|
2106
2206
|
t.mutableState.layouts[i] = r, o && e.forEach((s) => {
|
|
2107
2207
|
if (s.collapsible) {
|
|
2108
|
-
const
|
|
2208
|
+
const c = Y(
|
|
2109
2209
|
s.collapsedSize,
|
|
2110
2210
|
n[s.itemId]
|
|
2111
2211
|
), a = Y(
|
|
2112
2212
|
s.collapsedSize,
|
|
2113
2213
|
o[s.itemId]
|
|
2114
2214
|
);
|
|
2115
|
-
|
|
2215
|
+
c && !a && (t.mutableState.expandedItemSizes[s.itemId] = o[s.itemId]);
|
|
2116
2216
|
}
|
|
2117
2217
|
});
|
|
2118
2218
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const [e, t] =
|
|
2219
|
+
function bn() {
|
|
2220
|
+
const [e, t] = he({}), n = re(() => t({}), []);
|
|
2121
2221
|
return [e, n];
|
|
2122
2222
|
}
|
|
2123
|
-
function
|
|
2223
|
+
function ot(e) {
|
|
2124
2224
|
const t = B({ ...e });
|
|
2125
2225
|
return ne(() => {
|
|
2126
2226
|
for (const n in e)
|
|
2127
2227
|
t.current[n] = e[n];
|
|
2128
2228
|
}, [e]), t.current;
|
|
2129
2229
|
}
|
|
2130
|
-
const
|
|
2131
|
-
function
|
|
2230
|
+
const wt = en(null);
|
|
2231
|
+
function po({
|
|
2132
2232
|
layout: e,
|
|
2133
2233
|
itemConstraints: t,
|
|
2134
2234
|
itemId: n,
|
|
2135
2235
|
itemIndex: o
|
|
2136
2236
|
}) {
|
|
2137
2237
|
let r, i;
|
|
2138
|
-
const s = e[n],
|
|
2238
|
+
const s = e[n], c = t.find(
|
|
2139
2239
|
(a) => a.itemId === n
|
|
2140
2240
|
);
|
|
2141
|
-
if (
|
|
2142
|
-
const a =
|
|
2143
|
-
i =
|
|
2144
|
-
layout:
|
|
2145
|
-
delta:
|
|
2241
|
+
if (c) {
|
|
2242
|
+
const a = c.maxSize, u = c.collapsible ? c.collapsedSize : c.minSize, l = [o, o + 1];
|
|
2243
|
+
i = Se({
|
|
2244
|
+
layout: qe({
|
|
2245
|
+
delta: u - s,
|
|
2146
2246
|
initialLayout: e,
|
|
2147
2247
|
itemConstraints: t,
|
|
2148
|
-
pivotIndices:
|
|
2248
|
+
pivotIndices: l,
|
|
2149
2249
|
prevLayout: e
|
|
2150
2250
|
}),
|
|
2151
2251
|
itemConstraints: t
|
|
2152
|
-
})[n], r =
|
|
2153
|
-
layout:
|
|
2252
|
+
})[n], r = Se({
|
|
2253
|
+
layout: qe({
|
|
2154
2254
|
delta: a - s,
|
|
2155
2255
|
initialLayout: e,
|
|
2156
2256
|
itemConstraints: t,
|
|
2157
|
-
pivotIndices:
|
|
2257
|
+
pivotIndices: l,
|
|
2158
2258
|
prevLayout: e
|
|
2159
2259
|
}),
|
|
2160
2260
|
itemConstraints: t
|
|
@@ -2167,7 +2267,7 @@ function eo({
|
|
|
2167
2267
|
valueNow: s
|
|
2168
2268
|
};
|
|
2169
2269
|
}
|
|
2170
|
-
function
|
|
2270
|
+
function xn({
|
|
2171
2271
|
attributes: e,
|
|
2172
2272
|
axisId: t,
|
|
2173
2273
|
axisOrientation: n,
|
|
@@ -2175,75 +2275,75 @@ function un({
|
|
|
2175
2275
|
className: r,
|
|
2176
2276
|
disableCursor: i,
|
|
2177
2277
|
disabled: s,
|
|
2178
|
-
disableDoubleClick:
|
|
2278
|
+
disableDoubleClick: c,
|
|
2179
2279
|
elementRef: a,
|
|
2180
|
-
id:
|
|
2181
|
-
isSharedHitRegion:
|
|
2280
|
+
id: u,
|
|
2281
|
+
isSharedHitRegion: l,
|
|
2182
2282
|
preview: d,
|
|
2183
|
-
registerSeparator:
|
|
2184
|
-
requiredStyle:
|
|
2283
|
+
registerSeparator: g,
|
|
2284
|
+
requiredStyle: p,
|
|
2185
2285
|
style: m,
|
|
2186
2286
|
styleDefaults: f,
|
|
2187
|
-
tabIndex:
|
|
2287
|
+
tabIndex: y = 0,
|
|
2188
2288
|
updateSeparatorProps: h
|
|
2189
2289
|
}) {
|
|
2190
|
-
const
|
|
2290
|
+
const S = ot({
|
|
2191
2291
|
disabled: s,
|
|
2192
|
-
disableDoubleClick:
|
|
2292
|
+
disableDoubleClick: c,
|
|
2193
2293
|
children: o,
|
|
2194
2294
|
className: r,
|
|
2195
2295
|
preview: d,
|
|
2196
2296
|
style: m
|
|
2197
|
-
}), [
|
|
2297
|
+
}), [z, x] = he({}), [R, N] = he("inactive"), [$, b] = he(!1), w = B(null), v = B(null), T = Ve(w, a), A = n === "horizontal" ? "vertical" : "horizontal";
|
|
2198
2298
|
ne(() => {
|
|
2199
|
-
const
|
|
2200
|
-
if (
|
|
2201
|
-
const
|
|
2202
|
-
disabled:
|
|
2203
|
-
disableDoubleClick:
|
|
2204
|
-
element:
|
|
2205
|
-
id:
|
|
2299
|
+
const C = w.current;
|
|
2300
|
+
if (C !== null) {
|
|
2301
|
+
const I = {
|
|
2302
|
+
disabled: S.disabled,
|
|
2303
|
+
disableDoubleClick: S.disableDoubleClick,
|
|
2304
|
+
element: C,
|
|
2305
|
+
id: u,
|
|
2206
2306
|
get children() {
|
|
2207
|
-
return
|
|
2307
|
+
return S.children;
|
|
2208
2308
|
},
|
|
2209
2309
|
get className() {
|
|
2210
|
-
return
|
|
2310
|
+
return S.className;
|
|
2211
2311
|
},
|
|
2212
2312
|
get preview() {
|
|
2213
|
-
return
|
|
2313
|
+
return S.preview;
|
|
2214
2314
|
},
|
|
2215
2315
|
get style() {
|
|
2216
|
-
return
|
|
2316
|
+
return S.style;
|
|
2217
2317
|
}
|
|
2218
2318
|
};
|
|
2219
|
-
v.current =
|
|
2220
|
-
const M =
|
|
2319
|
+
v.current = I;
|
|
2320
|
+
const M = g(I), q = pt(
|
|
2221
2321
|
(H) => {
|
|
2222
|
-
|
|
2322
|
+
N(
|
|
2223
2323
|
H.next.state !== "inactive" && H.next.hitRegions.some(
|
|
2224
|
-
(Z) => Z.separator ===
|
|
2324
|
+
(Z) => Z.separator === I || (l?.(Z) ?? !1)
|
|
2225
2325
|
) ? H.next.state : "inactive"
|
|
2226
2326
|
);
|
|
2227
2327
|
}
|
|
2228
|
-
), J =
|
|
2328
|
+
), J = Be(
|
|
2229
2329
|
t,
|
|
2230
2330
|
(H) => {
|
|
2231
|
-
const { derivedItemConstraints: Z, layout:
|
|
2331
|
+
const { derivedItemConstraints: Z, layout: ve, separatorToItems: ze } = H.next, Ie = ze.get(I);
|
|
2232
2332
|
if (Ie) {
|
|
2233
|
-
const
|
|
2234
|
-
(
|
|
2235
|
-
), { layoutStrategy:
|
|
2333
|
+
const be = Ie[0], L = Z.findIndex(
|
|
2334
|
+
(F) => F.itemId === be.id
|
|
2335
|
+
), { layoutStrategy: P } = H.axis;
|
|
2236
2336
|
x({
|
|
2237
|
-
...
|
|
2238
|
-
layout:
|
|
2337
|
+
...po({
|
|
2338
|
+
layout: ve,
|
|
2239
2339
|
itemConstraints: Z,
|
|
2240
|
-
itemId:
|
|
2340
|
+
itemId: be.id,
|
|
2241
2341
|
itemIndex: L
|
|
2242
2342
|
}),
|
|
2243
2343
|
// Items without DOM elements of their own (e.g. Grid tracks) control other elements
|
|
2244
|
-
...
|
|
2245
|
-
valueControls:
|
|
2246
|
-
|
|
2344
|
+
...P?.getItemAriaControls && {
|
|
2345
|
+
valueControls: P.getItemAriaControls(
|
|
2346
|
+
be.id
|
|
2247
2347
|
)
|
|
2248
2348
|
}
|
|
2249
2349
|
});
|
|
@@ -2254,59 +2354,59 @@ function un({
|
|
|
2254
2354
|
v.current = null, q(), J(), M();
|
|
2255
2355
|
};
|
|
2256
2356
|
}
|
|
2257
|
-
}, [t,
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
}, [d]),
|
|
2261
|
-
h(
|
|
2262
|
-
}, [s,
|
|
2263
|
-
let R;
|
|
2264
|
-
s && !i && (R = "not-allowed");
|
|
2357
|
+
}, [t, u, l, g, S]), ne(() => {
|
|
2358
|
+
const C = v.current;
|
|
2359
|
+
C && Nn(C);
|
|
2360
|
+
}, [d]), He(() => {
|
|
2361
|
+
h(u, { disabled: s, disableDoubleClick: c });
|
|
2362
|
+
}, [s, c, u, h]);
|
|
2265
2363
|
let E;
|
|
2364
|
+
s && !i && (E = "not-allowed");
|
|
2365
|
+
let D;
|
|
2266
2366
|
if (s)
|
|
2267
|
-
|
|
2367
|
+
D = "disabled";
|
|
2268
2368
|
else
|
|
2269
|
-
switch (
|
|
2369
|
+
switch (R) {
|
|
2270
2370
|
case "active": {
|
|
2271
|
-
|
|
2371
|
+
D = "active";
|
|
2272
2372
|
break;
|
|
2273
2373
|
}
|
|
2274
2374
|
default:
|
|
2275
|
-
|
|
2375
|
+
$ ? D = "focus" : D = R;
|
|
2276
2376
|
}
|
|
2277
|
-
return /* @__PURE__ */
|
|
2377
|
+
return /* @__PURE__ */ X(
|
|
2278
2378
|
"div",
|
|
2279
2379
|
{
|
|
2280
2380
|
...e,
|
|
2281
|
-
"aria-controls":
|
|
2381
|
+
"aria-controls": z.valueControls,
|
|
2282
2382
|
"aria-disabled": s || void 0,
|
|
2283
|
-
"aria-orientation":
|
|
2284
|
-
"aria-valuemax":
|
|
2285
|
-
"aria-valuemin":
|
|
2286
|
-
"aria-valuenow":
|
|
2383
|
+
"aria-orientation": A,
|
|
2384
|
+
"aria-valuemax": z.valueMax,
|
|
2385
|
+
"aria-valuemin": z.valueMin,
|
|
2386
|
+
"aria-valuenow": z.valueNow,
|
|
2287
2387
|
children: o,
|
|
2288
2388
|
className: r,
|
|
2289
|
-
"data-separator":
|
|
2290
|
-
"data-testid":
|
|
2291
|
-
id:
|
|
2389
|
+
"data-separator": D,
|
|
2390
|
+
"data-testid": u,
|
|
2391
|
+
id: u,
|
|
2292
2392
|
onBlur: () => b(!1),
|
|
2293
2393
|
onFocus: () => b(!0),
|
|
2294
2394
|
ref: T,
|
|
2295
2395
|
role: "separator",
|
|
2296
2396
|
style: {
|
|
2297
2397
|
...f,
|
|
2298
|
-
cursor:
|
|
2398
|
+
cursor: E,
|
|
2299
2399
|
...m,
|
|
2300
|
-
...
|
|
2400
|
+
...p,
|
|
2301
2401
|
// Inform the browser that the library is handling touch events for this element
|
|
2302
2402
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2303
2403
|
touchAction: "none"
|
|
2304
2404
|
},
|
|
2305
|
-
tabIndex: s ? void 0 :
|
|
2405
|
+
tabIndex: s ? void 0 : y
|
|
2306
2406
|
}
|
|
2307
2407
|
);
|
|
2308
2408
|
}
|
|
2309
|
-
function
|
|
2409
|
+
function Xt({
|
|
2310
2410
|
axis: e,
|
|
2311
2411
|
children: t,
|
|
2312
2412
|
className: n,
|
|
@@ -2314,73 +2414,73 @@ function Nt({
|
|
|
2314
2414
|
crossStart: r,
|
|
2315
2415
|
disabled: i,
|
|
2316
2416
|
elementRef: s,
|
|
2317
|
-
index:
|
|
2417
|
+
index: c,
|
|
2318
2418
|
style: a
|
|
2319
2419
|
}) {
|
|
2320
|
-
const
|
|
2321
|
-
getDisableCursor:
|
|
2420
|
+
const u = De(void 0), {
|
|
2421
|
+
getDisableCursor: l,
|
|
2322
2422
|
getResizeAxisId: d,
|
|
2323
|
-
gutters:
|
|
2324
|
-
registerSeparator:
|
|
2423
|
+
gutters: g,
|
|
2424
|
+
registerSeparator: p,
|
|
2325
2425
|
separatorPlacements: m,
|
|
2326
2426
|
trackCounts: f,
|
|
2327
|
-
updateSeparatorProps:
|
|
2328
|
-
} =
|
|
2329
|
-
let
|
|
2427
|
+
updateSeparatorProps: y
|
|
2428
|
+
} = rn(), h = d(e), S = e === "column" ? "row" : "column", z = f[S], x = !!i || !ft(c, f[e]);
|
|
2429
|
+
let R = !0;
|
|
2330
2430
|
for (const v of m.values())
|
|
2331
|
-
if (v.axis === e && v.index ===
|
|
2332
|
-
|
|
2431
|
+
if (v.axis === e && v.index === c && !v.disabled && v.crossStart < r) {
|
|
2432
|
+
R = !1;
|
|
2333
2433
|
break;
|
|
2334
2434
|
}
|
|
2335
|
-
const
|
|
2336
|
-
(v) => v.axis.id === h && v.axis.items.indexOf(v.items[1]) ===
|
|
2337
|
-
[h,
|
|
2338
|
-
),
|
|
2339
|
-
(v) =>
|
|
2435
|
+
const N = re(
|
|
2436
|
+
(v) => v.axis.id === h && v.axis.items.indexOf(v.items[1]) === c,
|
|
2437
|
+
[h, c]
|
|
2438
|
+
), $ = re(
|
|
2439
|
+
(v) => p(
|
|
2340
2440
|
{
|
|
2341
2441
|
axis: e,
|
|
2342
2442
|
crossSpan: o,
|
|
2343
2443
|
crossStart: r,
|
|
2344
2444
|
disabled: !!i,
|
|
2345
|
-
index:
|
|
2445
|
+
index: c
|
|
2346
2446
|
},
|
|
2347
2447
|
v
|
|
2348
2448
|
),
|
|
2349
|
-
[e, o, r, i,
|
|
2350
|
-
), b =
|
|
2351
|
-
crossCount:
|
|
2449
|
+
[e, o, r, i, c, p]
|
|
2450
|
+
), b = Pn(c), w = Tn({
|
|
2451
|
+
crossCount: z,
|
|
2352
2452
|
crossSpan: o,
|
|
2353
2453
|
crossStart: r,
|
|
2354
|
-
hasGutters:
|
|
2454
|
+
hasGutters: g[S]
|
|
2355
2455
|
});
|
|
2356
|
-
return /* @__PURE__ */
|
|
2357
|
-
|
|
2456
|
+
return /* @__PURE__ */ X(
|
|
2457
|
+
xn,
|
|
2358
2458
|
{
|
|
2359
2459
|
axisId: h,
|
|
2360
2460
|
axisOrientation: e === "column" ? "horizontal" : "vertical",
|
|
2361
2461
|
className: n,
|
|
2362
|
-
disableCursor:
|
|
2462
|
+
disableCursor: l(),
|
|
2363
2463
|
disabled: x,
|
|
2364
2464
|
disableDoubleClick: void 0,
|
|
2365
2465
|
elementRef: s,
|
|
2366
|
-
id:
|
|
2367
|
-
isSharedHitRegion:
|
|
2368
|
-
registerSeparator:
|
|
2466
|
+
id: u,
|
|
2467
|
+
isSharedHitRegion: N,
|
|
2468
|
+
registerSeparator: $,
|
|
2369
2469
|
requiredStyle: {
|
|
2370
2470
|
gridColumn: e === "column" ? b : w,
|
|
2371
2471
|
gridRow: e === "row" ? b : w
|
|
2372
2472
|
},
|
|
2373
2473
|
style: a,
|
|
2374
|
-
tabIndex:
|
|
2375
|
-
updateSeparatorProps:
|
|
2474
|
+
tabIndex: R ? 0 : -1,
|
|
2475
|
+
updateSeparatorProps: y,
|
|
2376
2476
|
children: t
|
|
2377
2477
|
}
|
|
2378
2478
|
);
|
|
2379
2479
|
}
|
|
2380
|
-
function
|
|
2480
|
+
function wn(e) {
|
|
2381
2481
|
const { children: t, className: n, disabled: o, elementRef: r, style: i } = e;
|
|
2382
|
-
return e.type === "column" ? /* @__PURE__ */
|
|
2383
|
-
|
|
2482
|
+
return e.type === "column" ? /* @__PURE__ */ X(
|
|
2483
|
+
Xt,
|
|
2384
2484
|
{
|
|
2385
2485
|
axis: "column",
|
|
2386
2486
|
className: n,
|
|
@@ -2392,8 +2492,8 @@ function dn(e) {
|
|
|
2392
2492
|
style: i,
|
|
2393
2493
|
children: t
|
|
2394
2494
|
}
|
|
2395
|
-
) : /* @__PURE__ */
|
|
2396
|
-
|
|
2495
|
+
) : /* @__PURE__ */ X(
|
|
2496
|
+
Xt,
|
|
2397
2497
|
{
|
|
2398
2498
|
axis: "row",
|
|
2399
2499
|
className: n,
|
|
@@ -2407,9 +2507,9 @@ function dn(e) {
|
|
|
2407
2507
|
}
|
|
2408
2508
|
);
|
|
2409
2509
|
}
|
|
2410
|
-
|
|
2411
|
-
const Re = ["column", "row"],
|
|
2412
|
-
function
|
|
2510
|
+
wn.displayName = "Gridline";
|
|
2511
|
+
const Re = ["column", "row"], Kt = { columns: {}, rows: {} };
|
|
2512
|
+
function ho({
|
|
2413
2513
|
children: e,
|
|
2414
2514
|
className: t,
|
|
2415
2515
|
columns: n,
|
|
@@ -2417,122 +2517,122 @@ function to({
|
|
|
2417
2517
|
disableCursor: r,
|
|
2418
2518
|
disabled: i,
|
|
2419
2519
|
elementRef: s,
|
|
2420
|
-
gridRef:
|
|
2520
|
+
gridRef: c,
|
|
2421
2521
|
id: a,
|
|
2422
|
-
onLayoutChange:
|
|
2423
|
-
onLayoutChanged:
|
|
2522
|
+
onLayoutChange: u,
|
|
2523
|
+
onLayoutChanged: l,
|
|
2424
2524
|
resizeTargetMinimumSize: d = {
|
|
2425
2525
|
coarse: 20,
|
|
2426
2526
|
fine: 10
|
|
2427
2527
|
},
|
|
2428
|
-
rows:
|
|
2429
|
-
style:
|
|
2528
|
+
rows: g,
|
|
2529
|
+
style: p,
|
|
2430
2530
|
...m
|
|
2431
2531
|
}) {
|
|
2432
|
-
const f =
|
|
2532
|
+
const f = De(a), y = re(
|
|
2433
2533
|
(L) => L === "column" ? `${f}:columns` : `${f}:rows`,
|
|
2434
2534
|
[f]
|
|
2435
|
-
), h =
|
|
2436
|
-
onLayoutChange:
|
|
2437
|
-
onLayoutChanged:
|
|
2438
|
-
}),
|
|
2439
|
-
|
|
2440
|
-
}),
|
|
2441
|
-
(L,
|
|
2442
|
-
|
|
2443
|
-
}
|
|
2444
|
-
),
|
|
2535
|
+
), h = Jt(n, "columns"), S = Jt(g, "rows"), z = (L) => L === "column" ? h : S, x = B({
|
|
2536
|
+
onLayoutChange: Kt,
|
|
2537
|
+
onLayoutChanged: Kt
|
|
2538
|
+
}), R = ye((L) => {
|
|
2539
|
+
Zt(x.current.onLayoutChange, L) || (x.current.onLayoutChange = L, u?.(L));
|
|
2540
|
+
}), N = ye(
|
|
2541
|
+
(L, P, F) => {
|
|
2542
|
+
Zt(x.current.onLayoutChanged, L) || (x.current.onLayoutChanged = L, l?.(L, { isUserInteraction: P, requestedLayout: F }));
|
|
2543
|
+
}
|
|
2544
|
+
), $ = B(null), b = Ve($, s), [w, v] = bn(), T = B({
|
|
2445
2545
|
cells: [],
|
|
2446
2546
|
column: { expandedItemSizes: {}, layouts: {} },
|
|
2447
2547
|
loggedErrors: /* @__PURE__ */ new Set(),
|
|
2448
2548
|
row: { expandedItemSizes: {}, layouts: {} },
|
|
2449
2549
|
separators: /* @__PURE__ */ new Map()
|
|
2450
|
-
}),
|
|
2550
|
+
}), A = { column: !1, row: !1 };
|
|
2451
2551
|
for (const L of T.current.separators.values())
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
const
|
|
2552
|
+
A[L.axis] = !0;
|
|
2553
|
+
zn(e, A);
|
|
2554
|
+
const E = ot({
|
|
2455
2555
|
defaultLayout: o,
|
|
2456
2556
|
disableCursor: r,
|
|
2457
2557
|
resizeTargetMinimumSize: d
|
|
2458
|
-
}),
|
|
2558
|
+
}), D = ye(() => !!E.disableCursor), C = re(
|
|
2459
2559
|
(L) => {
|
|
2460
|
-
const
|
|
2461
|
-
return
|
|
2462
|
-
|
|
2463
|
-
(
|
|
2560
|
+
const P = T.current;
|
|
2561
|
+
return P.cells = [...P.cells, L], v(), () => {
|
|
2562
|
+
P.cells = P.cells.filter(
|
|
2563
|
+
(F) => F !== L
|
|
2464
2564
|
), v();
|
|
2465
2565
|
};
|
|
2466
2566
|
},
|
|
2467
2567
|
[v]
|
|
2468
|
-
),
|
|
2469
|
-
(L,
|
|
2470
|
-
const
|
|
2471
|
-
return
|
|
2472
|
-
|
|
2568
|
+
), I = re(
|
|
2569
|
+
(L, P) => {
|
|
2570
|
+
const F = T.current;
|
|
2571
|
+
return F.separators = new Map(F.separators), F.separators.set(P, L), v(), () => {
|
|
2572
|
+
F.separators = new Map(F.separators), F.separators.delete(P), v();
|
|
2473
2573
|
};
|
|
2474
2574
|
},
|
|
2475
2575
|
[v]
|
|
2476
2576
|
), M = re(
|
|
2477
2577
|
(L, {
|
|
2478
|
-
disabled:
|
|
2479
|
-
disableDoubleClick:
|
|
2578
|
+
disabled: P,
|
|
2579
|
+
disableDoubleClick: F
|
|
2480
2580
|
}) => {
|
|
2481
2581
|
for (const G of T.current.separators.keys())
|
|
2482
|
-
G.id === L && (G.disabled =
|
|
2582
|
+
G.id === L && (G.disabled = P, G.disableDoubleClick = F);
|
|
2483
2583
|
},
|
|
2484
2584
|
[]
|
|
2485
2585
|
), q = T.current.separators, J = Pe(
|
|
2486
2586
|
() => ({
|
|
2487
|
-
getDisableCursor:
|
|
2488
|
-
getResizeAxisId:
|
|
2587
|
+
getDisableCursor: D,
|
|
2588
|
+
getResizeAxisId: y,
|
|
2489
2589
|
gutters: {
|
|
2490
|
-
column:
|
|
2491
|
-
row:
|
|
2590
|
+
column: A.column,
|
|
2591
|
+
row: A.row
|
|
2492
2592
|
},
|
|
2493
2593
|
id: f,
|
|
2494
|
-
registerCell:
|
|
2495
|
-
registerSeparator:
|
|
2594
|
+
registerCell: C,
|
|
2595
|
+
registerSeparator: I,
|
|
2496
2596
|
separatorPlacements: q,
|
|
2497
2597
|
trackCounts: {
|
|
2498
2598
|
column: h.length,
|
|
2499
|
-
row:
|
|
2599
|
+
row: S.length
|
|
2500
2600
|
},
|
|
2501
2601
|
updateSeparatorProps: M
|
|
2502
2602
|
}),
|
|
2503
2603
|
[
|
|
2504
2604
|
h.length,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2605
|
+
D,
|
|
2606
|
+
y,
|
|
2607
|
+
A.column,
|
|
2608
|
+
A.row,
|
|
2509
2609
|
f,
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2610
|
+
C,
|
|
2611
|
+
I,
|
|
2612
|
+
S.length,
|
|
2513
2613
|
q,
|
|
2514
2614
|
M
|
|
2515
2615
|
]
|
|
2516
2616
|
), H = B([]);
|
|
2517
2617
|
ne(() => {
|
|
2518
|
-
const L =
|
|
2618
|
+
const L = $.current;
|
|
2519
2619
|
if (L === null)
|
|
2520
2620
|
return;
|
|
2521
|
-
const
|
|
2522
|
-
cells:
|
|
2523
|
-
separatorPlacements:
|
|
2524
|
-
trackCounts: { column: h.length, row:
|
|
2621
|
+
const P = T.current, F = yo({
|
|
2622
|
+
cells: P.cells,
|
|
2623
|
+
separatorPlacements: P.separators,
|
|
2624
|
+
trackCounts: { column: h.length, row: S.length }
|
|
2525
2625
|
});
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
}),
|
|
2529
|
-
const G = (
|
|
2530
|
-
const W =
|
|
2626
|
+
F.forEach((k) => {
|
|
2627
|
+
P.loggedErrors.has(k) || console.error(k);
|
|
2628
|
+
}), P.loggedErrors = new Set(F);
|
|
2629
|
+
const G = (k) => Array.from(P.separators.entries()).filter(([, W]) => W.axis === k).sort(([, W], [, me]) => W.index - me.index).map(([W]) => W), _ = (k) => {
|
|
2630
|
+
const W = k === "column" ? h : S, me = k === "column" ? S : h, pe = W.map((Q) => Q.id), je = y(k), Ue = G(k), xe = Ue.length > 0, We = W.map(
|
|
2531
2631
|
({ id: Q, ...oe }, ee) => ({
|
|
2532
2632
|
// Tracks don't have DOM elements of their own;
|
|
2533
2633
|
// the Grid element is used to resolve relative size constraints (e.g. "em")
|
|
2534
2634
|
element: L,
|
|
2535
|
-
id:
|
|
2635
|
+
id: pe[ee],
|
|
2536
2636
|
idIsStable: !0,
|
|
2537
2637
|
mutableValues: {
|
|
2538
2638
|
expandToSize: void 0,
|
|
@@ -2541,161 +2641,178 @@ function to({
|
|
|
2541
2641
|
onResize: void 0,
|
|
2542
2642
|
constraintProps: oe
|
|
2543
2643
|
})
|
|
2544
|
-
),
|
|
2644
|
+
), $e = () => {
|
|
2545
2645
|
const Q = [];
|
|
2546
2646
|
if (xe) {
|
|
2547
|
-
for (const [oe, ee] of
|
|
2548
|
-
if (ee.axis ===
|
|
2549
|
-
const
|
|
2647
|
+
for (const [oe, ee] of P.separators)
|
|
2648
|
+
if (ee.axis === k && ft(ee.index, W.length)) {
|
|
2649
|
+
const Ne = oe.element.getBoundingClientRect();
|
|
2550
2650
|
Q[ee.index] = Math.max(
|
|
2551
2651
|
Q[ee.index] ?? 0,
|
|
2552
|
-
|
|
2652
|
+
k === "column" ? Ne.width : Ne.height
|
|
2553
2653
|
);
|
|
2554
2654
|
}
|
|
2555
2655
|
}
|
|
2556
|
-
return
|
|
2557
|
-
axis:
|
|
2656
|
+
return $n({
|
|
2657
|
+
axis: k,
|
|
2558
2658
|
element: L,
|
|
2559
2659
|
gutterSizes: Q.filter((oe) => oe !== void 0),
|
|
2560
2660
|
hasGutters: xe,
|
|
2561
|
-
layout: ae(
|
|
2562
|
-
trackIds:
|
|
2661
|
+
layout: ae(je)?.layout,
|
|
2662
|
+
trackIds: pe
|
|
2563
2663
|
});
|
|
2564
2664
|
};
|
|
2565
|
-
let
|
|
2566
|
-
const
|
|
2567
|
-
if (
|
|
2568
|
-
|
|
2569
|
-
for (const Q of
|
|
2570
|
-
const oe =
|
|
2571
|
-
oe !== void 0 && (
|
|
2665
|
+
let Oe;
|
|
2666
|
+
const it = E.defaultLayout?.[k === "column" ? "columns" : "rows"];
|
|
2667
|
+
if (it !== void 0 && Object.keys(it).length === pe.length) {
|
|
2668
|
+
Oe = {};
|
|
2669
|
+
for (const Q of pe) {
|
|
2670
|
+
const oe = it[Q];
|
|
2671
|
+
oe !== void 0 && (Oe[Q] = oe);
|
|
2572
2672
|
}
|
|
2573
2673
|
}
|
|
2574
2674
|
return {
|
|
2575
2675
|
disabled: !!i,
|
|
2576
2676
|
element: L,
|
|
2577
|
-
id:
|
|
2677
|
+
id: je,
|
|
2578
2678
|
layoutStrategy: {
|
|
2579
2679
|
getItemAriaControls: (Q) => {
|
|
2580
|
-
const oe =
|
|
2581
|
-
return
|
|
2582
|
-
const
|
|
2583
|
-
return
|
|
2680
|
+
const oe = pe.indexOf(Q);
|
|
2681
|
+
return P.cells.filter((ee) => {
|
|
2682
|
+
const Ne = k === "column" ? ee.column : ee.row, Ln = k === "column" ? ee.columnSpan : ee.rowSpan;
|
|
2683
|
+
return Ne <= oe && oe < Ne + Ln;
|
|
2584
2684
|
}).map((ee) => ee.element.id).filter(Boolean).join(" ") || void 0;
|
|
2585
2685
|
},
|
|
2586
|
-
calculateAvailableSize: () =>
|
|
2686
|
+
calculateAvailableSize: () => $e().availableSize,
|
|
2587
2687
|
calculateHitRegions: ({
|
|
2588
2688
|
expandHitTargets: Q,
|
|
2589
2689
|
axis: oe,
|
|
2590
2690
|
includeDisabled: ee
|
|
2591
|
-
}) =>
|
|
2592
|
-
axis:
|
|
2593
|
-
cells:
|
|
2594
|
-
crossTrackCount:
|
|
2691
|
+
}) => An({
|
|
2692
|
+
axis: k,
|
|
2693
|
+
cells: P.cells,
|
|
2694
|
+
crossTrackCount: me.length,
|
|
2595
2695
|
expandHitTargets: Q,
|
|
2596
2696
|
resizeAxis: oe,
|
|
2597
|
-
axisSize:
|
|
2697
|
+
axisSize: $e().availableSize,
|
|
2598
2698
|
includeDisabled: ee,
|
|
2599
|
-
separatorPlacements:
|
|
2699
|
+
separatorPlacements: P.separators
|
|
2600
2700
|
}),
|
|
2601
|
-
getItemSizeInPixels: (Q) =>
|
|
2701
|
+
getItemSizeInPixels: (Q) => $e().trackSizes[pe.indexOf(Q)] ?? 0
|
|
2602
2702
|
},
|
|
2603
2703
|
mutableState: {
|
|
2604
|
-
defaultLayout:
|
|
2605
|
-
disableCursor: !!
|
|
2606
|
-
expandedItemSizes: k
|
|
2607
|
-
layouts: k
|
|
2704
|
+
defaultLayout: Oe,
|
|
2705
|
+
disableCursor: !!E.disableCursor,
|
|
2706
|
+
expandedItemSizes: P[k].expandedItemSizes,
|
|
2707
|
+
layouts: P[k].layouts
|
|
2608
2708
|
},
|
|
2609
|
-
orientation:
|
|
2610
|
-
items:
|
|
2709
|
+
orientation: k === "column" ? "horizontal" : "vertical",
|
|
2710
|
+
items: We,
|
|
2611
2711
|
resizePreviewMode: "panel",
|
|
2612
2712
|
get resizeTargetMinimumSize() {
|
|
2613
|
-
return
|
|
2713
|
+
return E.resizeTargetMinimumSize;
|
|
2614
2714
|
},
|
|
2615
|
-
separators:
|
|
2715
|
+
separators: Ue
|
|
2616
2716
|
};
|
|
2617
|
-
}, j = Re.map(
|
|
2717
|
+
}, j = Re.map(_);
|
|
2618
2718
|
H.current = j;
|
|
2619
|
-
const U = j.map((
|
|
2620
|
-
const [
|
|
2621
|
-
(
|
|
2719
|
+
const U = j.map((k) => Sn(k)), te = () => {
|
|
2720
|
+
const [k, W] = j.map(
|
|
2721
|
+
(me) => ae(me.id)
|
|
2622
2722
|
);
|
|
2623
|
-
if (!(
|
|
2723
|
+
if (!(!k || !W || k.defaultLayoutDeferred || W.defaultLayoutDeferred))
|
|
2624
2724
|
return {
|
|
2625
|
-
layout: { columns:
|
|
2725
|
+
layout: { columns: k.layout, rows: W.layout },
|
|
2626
2726
|
requestedLayout: {
|
|
2627
|
-
columns:
|
|
2727
|
+
columns: k.requestedLayout,
|
|
2628
2728
|
rows: W.requestedLayout
|
|
2629
2729
|
}
|
|
2630
2730
|
};
|
|
2631
2731
|
};
|
|
2632
2732
|
{
|
|
2633
|
-
const
|
|
2634
|
-
|
|
2733
|
+
const k = te();
|
|
2734
|
+
if (k)
|
|
2735
|
+
try {
|
|
2736
|
+
try {
|
|
2737
|
+
R(k.layout);
|
|
2738
|
+
} finally {
|
|
2739
|
+
N(
|
|
2740
|
+
k.layout,
|
|
2741
|
+
!1,
|
|
2742
|
+
k.requestedLayout
|
|
2743
|
+
);
|
|
2744
|
+
}
|
|
2745
|
+
} catch (W) {
|
|
2746
|
+
throw H.current = [], U.forEach((me) => me()), W;
|
|
2747
|
+
}
|
|
2635
2748
|
}
|
|
2636
|
-
const
|
|
2637
|
-
(
|
|
2749
|
+
const Ae = j.map(
|
|
2750
|
+
(k) => Be(k.id, (W) => {
|
|
2638
2751
|
const {
|
|
2639
|
-
defaultLayoutDeferred:
|
|
2640
|
-
derivedItemConstraints:
|
|
2641
|
-
layout:
|
|
2642
|
-
requestedLayout:
|
|
2752
|
+
defaultLayoutDeferred: me,
|
|
2753
|
+
derivedItemConstraints: pe,
|
|
2754
|
+
layout: je,
|
|
2755
|
+
requestedLayout: Ue
|
|
2643
2756
|
} = W.next;
|
|
2644
|
-
if (
|
|
2757
|
+
if (me || pe.length === 0)
|
|
2645
2758
|
return;
|
|
2646
|
-
|
|
2647
|
-
derivedItemConstraints:
|
|
2648
|
-
axis:
|
|
2649
|
-
layout:
|
|
2759
|
+
vn({
|
|
2760
|
+
derivedItemConstraints: pe,
|
|
2761
|
+
axis: k,
|
|
2762
|
+
layout: je,
|
|
2650
2763
|
prevLayout: W.prev?.layout,
|
|
2651
|
-
requestedLayout:
|
|
2764
|
+
requestedLayout: Ue
|
|
2652
2765
|
});
|
|
2653
2766
|
const xe = te();
|
|
2654
2767
|
if (xe) {
|
|
2655
|
-
const
|
|
2656
|
-
(
|
|
2657
|
-
);
|
|
2658
|
-
C(xe.layout), Ae && A(
|
|
2659
|
-
xe.layout,
|
|
2660
|
-
W.isUserInteraction,
|
|
2661
|
-
xe.requestedLayout
|
|
2768
|
+
const We = ie(), $e = We.state !== "active" || !We.hitRegions.some(
|
|
2769
|
+
(Oe) => j.includes(Oe.axis)
|
|
2662
2770
|
);
|
|
2771
|
+
try {
|
|
2772
|
+
R(xe.layout);
|
|
2773
|
+
} finally {
|
|
2774
|
+
$e && N(
|
|
2775
|
+
xe.layout,
|
|
2776
|
+
W.isUserInteraction,
|
|
2777
|
+
xe.requestedLayout
|
|
2778
|
+
);
|
|
2779
|
+
}
|
|
2663
2780
|
}
|
|
2664
2781
|
})
|
|
2665
2782
|
);
|
|
2666
2783
|
return () => {
|
|
2667
|
-
H.current = [], U.forEach((
|
|
2784
|
+
H.current = [], U.forEach((k) => k()), Ae.forEach((k) => k());
|
|
2668
2785
|
};
|
|
2669
2786
|
}, [
|
|
2670
2787
|
h,
|
|
2671
2788
|
i,
|
|
2672
|
-
|
|
2789
|
+
y,
|
|
2673
2790
|
f,
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2791
|
+
N,
|
|
2792
|
+
R,
|
|
2793
|
+
S,
|
|
2677
2794
|
w,
|
|
2678
|
-
|
|
2679
|
-
]),
|
|
2795
|
+
E
|
|
2796
|
+
]), He(() => {
|
|
2680
2797
|
H.current.forEach((L) => {
|
|
2681
2798
|
L.mutableState.defaultLayout = o?.[L.orientation === "horizontal" ? "columns" : "rows"], L.mutableState.disableCursor = !!r;
|
|
2682
2799
|
});
|
|
2683
|
-
}),
|
|
2800
|
+
}), dt(c, () => {
|
|
2684
2801
|
const L = () => {
|
|
2685
|
-
const [G,
|
|
2686
|
-
return !
|
|
2687
|
-
columns:
|
|
2802
|
+
const [G, _] = Re.map(y);
|
|
2803
|
+
return !Ee(G) || !Ee(_) ? { columns: {}, rows: {} } : {
|
|
2804
|
+
columns: _e({
|
|
2688
2805
|
axisId: G
|
|
2689
2806
|
}).getLayout(),
|
|
2690
|
-
rows:
|
|
2807
|
+
rows: _e({ axisId: _ }).getLayout()
|
|
2691
2808
|
};
|
|
2692
|
-
},
|
|
2693
|
-
const j =
|
|
2694
|
-
const te =
|
|
2695
|
-
return
|
|
2696
|
-
te.items.some((
|
|
2697
|
-
`Grid "${f}" no longer contains a ${G} with id "${
|
|
2698
|
-
),
|
|
2809
|
+
}, P = (G) => G.map((_) => `"${_}"`).join(", "), F = (G, _) => {
|
|
2810
|
+
const j = y(G), U = () => {
|
|
2811
|
+
const te = Ee(j);
|
|
2812
|
+
return O(te, `Grid "${f}" has not been mounted`), O(
|
|
2813
|
+
te.items.some((Ae) => Ae.id === _),
|
|
2814
|
+
`Grid "${f}" no longer contains a ${G} with id "${_}"; ${G} ids are ${P(te.items.map((Ae) => Ae.id))}`
|
|
2815
|
+
), xt({ axisId: j, itemId: _ });
|
|
2699
2816
|
};
|
|
2700
2817
|
return {
|
|
2701
2818
|
collapse: () => U().collapse(),
|
|
@@ -2707,46 +2824,46 @@ function to({
|
|
|
2707
2824
|
};
|
|
2708
2825
|
return {
|
|
2709
2826
|
getLayout: L,
|
|
2710
|
-
getTrackById: (G,
|
|
2711
|
-
const j = G === "column" ? h :
|
|
2712
|
-
return
|
|
2827
|
+
getTrackById: (G, _) => {
|
|
2828
|
+
const j = G === "column" ? h : S, U = `${_}`;
|
|
2829
|
+
return O(
|
|
2713
2830
|
j.some((te) => te.id === U),
|
|
2714
|
-
`Grid "${f}" does not contain a ${G} with id "${U}"; ${G} ids are ${
|
|
2715
|
-
),
|
|
2831
|
+
`Grid "${f}" does not contain a ${G} with id "${U}"; ${G} ids are ${P(j.map((te) => te.id))}`
|
|
2832
|
+
), F(G, U);
|
|
2716
2833
|
},
|
|
2717
|
-
getTrackByIndex: (G,
|
|
2718
|
-
const j = G === "column" ? h :
|
|
2719
|
-
return
|
|
2834
|
+
getTrackByIndex: (G, _) => {
|
|
2835
|
+
const j = G === "column" ? h : S, U = Number.isInteger(_) ? j[_] : void 0;
|
|
2836
|
+
return O(
|
|
2720
2837
|
U,
|
|
2721
|
-
`Grid "${f}" does not contain a ${G} at index ${
|
|
2722
|
-
),
|
|
2838
|
+
`Grid "${f}" does not contain a ${G} at index ${_}; it has ${j.length} ${G}s`
|
|
2839
|
+
), F(G, U.id);
|
|
2723
2840
|
},
|
|
2724
|
-
setLayout: (G) => (Re.forEach((
|
|
2725
|
-
const j = G[
|
|
2726
|
-
j &&
|
|
2841
|
+
setLayout: (G) => (Re.forEach((_) => {
|
|
2842
|
+
const j = G[_ === "column" ? "columns" : "rows"], U = y(_);
|
|
2843
|
+
j && Ee(U) && _e({ axisId: U }).setLayout(j);
|
|
2727
2844
|
}), L())
|
|
2728
2845
|
};
|
|
2729
|
-
}, [h,
|
|
2846
|
+
}, [h, y, f, S]);
|
|
2730
2847
|
const Z = () => Re.map((L) => {
|
|
2731
|
-
const
|
|
2732
|
-
return (
|
|
2733
|
-
|
|
2848
|
+
const P = ae(y(L)), F = z(L);
|
|
2849
|
+
return (P && !P.defaultLayoutDeferred ? F.map((_) => `minmax(0, ${P.layout[_.id] ?? 1}fr)`) : go(
|
|
2850
|
+
F,
|
|
2734
2851
|
o?.[L === "column" ? "columns" : "rows"]
|
|
2735
|
-
)).join(
|
|
2736
|
-
}).join("|"),
|
|
2852
|
+
)).join(A[L] ? " auto " : " ");
|
|
2853
|
+
}).join("|"), ve = re(
|
|
2737
2854
|
(L) => {
|
|
2738
|
-
const
|
|
2739
|
-
(
|
|
2855
|
+
const P = Re.map(
|
|
2856
|
+
(F) => Be(y(F), L)
|
|
2740
2857
|
);
|
|
2741
|
-
return () =>
|
|
2858
|
+
return () => P.forEach((F) => F());
|
|
2742
2859
|
},
|
|
2743
|
-
[
|
|
2744
|
-
), ze =
|
|
2745
|
-
|
|
2860
|
+
[y]
|
|
2861
|
+
), ze = Qe(
|
|
2862
|
+
ve,
|
|
2746
2863
|
Z,
|
|
2747
2864
|
Z
|
|
2748
|
-
), [Ie,
|
|
2749
|
-
return /* @__PURE__ */
|
|
2865
|
+
), [Ie, be] = ze.split("|");
|
|
2866
|
+
return /* @__PURE__ */ X(on.Provider, { value: J, children: /* @__PURE__ */ X(
|
|
2750
2867
|
"div",
|
|
2751
2868
|
{
|
|
2752
2869
|
...m,
|
|
@@ -2759,49 +2876,49 @@ function to({
|
|
|
2759
2876
|
height: "100%",
|
|
2760
2877
|
width: "100%",
|
|
2761
2878
|
overflow: "hidden",
|
|
2762
|
-
...
|
|
2879
|
+
...p,
|
|
2763
2880
|
display: "grid",
|
|
2764
2881
|
gridTemplateColumns: Ie,
|
|
2765
|
-
gridTemplateRows:
|
|
2882
|
+
gridTemplateRows: be,
|
|
2766
2883
|
// Inform the browser that the library is handling touch events for this element
|
|
2767
2884
|
// NOTE This is not an inherited style
|
|
2768
2885
|
touchAction: "none"
|
|
2769
2886
|
},
|
|
2770
|
-
children: /* @__PURE__ */
|
|
2887
|
+
children: /* @__PURE__ */ X(wt.Provider, { value: null, children: e })
|
|
2771
2888
|
}
|
|
2772
2889
|
) });
|
|
2773
2890
|
}
|
|
2774
|
-
|
|
2775
|
-
function
|
|
2891
|
+
ho.displayName = "Grid";
|
|
2892
|
+
function Jt(e, t) {
|
|
2776
2893
|
const n = JSON.stringify(e);
|
|
2777
2894
|
return Pe(() => {
|
|
2778
2895
|
const o = typeof e == "number" ? Array.from({ length: e }, (r, i) => ({ id: `${i}` })) : e.map((r, i) => ({
|
|
2779
2896
|
...r,
|
|
2780
2897
|
id: `${r.id ?? i}`
|
|
2781
2898
|
}));
|
|
2782
|
-
return
|
|
2899
|
+
return O(
|
|
2783
2900
|
o.length > 0,
|
|
2784
2901
|
`Grid must have at least one track; "${t}" is ${n}`
|
|
2785
2902
|
), o;
|
|
2786
2903
|
}, [n]);
|
|
2787
2904
|
}
|
|
2788
|
-
function
|
|
2789
|
-
|
|
2790
|
-
if (
|
|
2791
|
-
if (n.type ===
|
|
2905
|
+
function zn(e, t) {
|
|
2906
|
+
En.forEach(e, (n) => {
|
|
2907
|
+
if (nn(n))
|
|
2908
|
+
if (n.type === wn) {
|
|
2792
2909
|
const { type: o } = n.props;
|
|
2793
2910
|
o === "column" ? t.column = !0 : o === "row" && (t.row = !0);
|
|
2794
2911
|
} else // Fragments
|
|
2795
|
-
typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props &&
|
|
2912
|
+
typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && zn(n.props.children, t);
|
|
2796
2913
|
});
|
|
2797
2914
|
}
|
|
2798
|
-
function
|
|
2915
|
+
function go(e, t) {
|
|
2799
2916
|
if (t)
|
|
2800
2917
|
return e.map(
|
|
2801
2918
|
(i) => `minmax(0, ${t[i.id] ?? 1}fr)`
|
|
2802
2919
|
);
|
|
2803
2920
|
const n = e.map(
|
|
2804
|
-
(i) => i.defaultSize === void 0 ? void 0 :
|
|
2921
|
+
(i) => i.defaultSize === void 0 ? void 0 : sn(i.defaultSize)
|
|
2805
2922
|
);
|
|
2806
2923
|
let o = 100, r = 0;
|
|
2807
2924
|
return n.forEach((i) => {
|
|
@@ -2809,100 +2926,100 @@ function no(e, t) {
|
|
|
2809
2926
|
}), n.map((i) => {
|
|
2810
2927
|
if (i === void 0)
|
|
2811
2928
|
return `minmax(0, ${Math.max(0, o) / Math.max(1, r)}fr)`;
|
|
2812
|
-
const [s,
|
|
2813
|
-
return
|
|
2929
|
+
const [s, c] = i;
|
|
2930
|
+
return c === "%" ? `minmax(0, ${s}fr)` : `${s}${c}`;
|
|
2814
2931
|
});
|
|
2815
2932
|
}
|
|
2816
|
-
function
|
|
2933
|
+
function yo({
|
|
2817
2934
|
cells: e,
|
|
2818
2935
|
separatorPlacements: t,
|
|
2819
2936
|
trackCounts: n
|
|
2820
2937
|
}) {
|
|
2821
2938
|
const o = [];
|
|
2822
|
-
for (const
|
|
2939
|
+
for (const c of e)
|
|
2823
2940
|
Re.forEach((a) => {
|
|
2824
|
-
const [
|
|
2825
|
-
(!Number.isInteger(
|
|
2826
|
-
`Invalid Cell ${a} placement (${a}: ${
|
|
2941
|
+
const [u, l] = a === "column" ? [c.column, c.columnSpan] : [c.row, c.rowSpan], d = n[a];
|
|
2942
|
+
(!Number.isInteger(u) || !Number.isInteger(l) || u < 0 || l < 1 || u + l > d) && o.push(
|
|
2943
|
+
`Invalid Cell ${a} placement (${a}: ${u}, ${a}Span: ${l}); Grid has ${d} ${a}s`
|
|
2827
2944
|
);
|
|
2828
2945
|
});
|
|
2829
2946
|
const r = ({
|
|
2830
|
-
axis:
|
|
2947
|
+
axis: c,
|
|
2831
2948
|
crossSpan: a,
|
|
2832
|
-
crossStart:
|
|
2833
|
-
disabled:
|
|
2949
|
+
crossStart: u,
|
|
2950
|
+
disabled: l,
|
|
2834
2951
|
index: d
|
|
2835
2952
|
}) => {
|
|
2836
|
-
const
|
|
2837
|
-
let
|
|
2838
|
-
return (
|
|
2953
|
+
const g = c === "column" ? "row" : "column";
|
|
2954
|
+
let p = `type="${c}" ${c}={${d}}`;
|
|
2955
|
+
return (u !== 0 || a !== void 0) && (p += ` ${g}={${u}}`), a !== void 0 && (p += ` ${g}Span={${a}}`), l && (p += " disabled"), `<Gridline ${p} />`;
|
|
2839
2956
|
}, i = Array.from(t.values()).filter(
|
|
2840
|
-
(
|
|
2841
|
-
const { axis: a, crossSpan:
|
|
2957
|
+
(c) => {
|
|
2958
|
+
const { axis: a, crossSpan: u, crossStart: l, index: d } = c, g = a === "column" ? "row" : "column", p = n[a], m = n[g];
|
|
2842
2959
|
let f = !0;
|
|
2843
|
-
return
|
|
2844
|
-
`Invalid ${a} Gridline ${a} (${d}); must be between 1 and ${
|
|
2845
|
-
), f = !1), !Number.isInteger(
|
|
2846
|
-
`Invalid ${a} Gridline ${
|
|
2847
|
-
), f = !1) :
|
|
2848
|
-
`Invalid ${a} Gridline ${
|
|
2960
|
+
return ft(d, p) || (o.push(
|
|
2961
|
+
`Invalid ${a} Gridline ${a} (${d}); must be between 1 and ${p - 1}`
|
|
2962
|
+
), f = !1), !Number.isInteger(l) || l < 0 || l >= m ? (o.push(
|
|
2963
|
+
`Invalid ${a} Gridline ${g} (${l}); must be between 0 and ${m - 1}`
|
|
2964
|
+
), f = !1) : u !== void 0 && (!Number.isInteger(u) || u < 1 || l + u > m) && (o.push(
|
|
2965
|
+
`Invalid ${a} Gridline ${g}Span (${u}); Grid has ${m} ${g}s`
|
|
2849
2966
|
), f = !1), f;
|
|
2850
2967
|
}
|
|
2851
|
-
), s = (
|
|
2852
|
-
const a = n[
|
|
2968
|
+
), s = (c) => {
|
|
2969
|
+
const a = n[c.axis === "column" ? "row" : "column"];
|
|
2853
2970
|
return [
|
|
2854
|
-
|
|
2855
|
-
|
|
2971
|
+
c.crossStart,
|
|
2972
|
+
c.crossSpan === void 0 ? a : c.crossStart + c.crossSpan
|
|
2856
2973
|
];
|
|
2857
2974
|
};
|
|
2858
|
-
return i.forEach((
|
|
2859
|
-
const { axis:
|
|
2860
|
-
for (const
|
|
2861
|
-
const [m, f,
|
|
2862
|
-
if (m <
|
|
2863
|
-
const
|
|
2975
|
+
return i.forEach((c, a) => {
|
|
2976
|
+
const { axis: u, index: l } = c, [d, g] = s(c);
|
|
2977
|
+
for (const p of e) {
|
|
2978
|
+
const [m, f, y, h] = u === "column" ? [p.column, p.columnSpan, p.row, p.rowSpan] : [p.row, p.rowSpan, p.column, p.columnSpan];
|
|
2979
|
+
if (m < l && l < m + f && y < g && d < y + h) {
|
|
2980
|
+
const S = u === "column" ? "row" : "column";
|
|
2864
2981
|
o.push(
|
|
2865
|
-
`${r(
|
|
2982
|
+
`${r(c)} overlaps a Cell that spans across it (${u}: ${m}, ${u}Span: ${f}, ${S}: ${y}, ${S}Span: ${h}); use the ${S} and ${S}Span props to render gridlines beside the Cell instead`
|
|
2866
2983
|
);
|
|
2867
2984
|
}
|
|
2868
2985
|
}
|
|
2869
|
-
for (const
|
|
2870
|
-
if (
|
|
2871
|
-
const [m, f] = s(
|
|
2872
|
-
m <
|
|
2986
|
+
for (const p of i.slice(a + 1))
|
|
2987
|
+
if (p.axis === u && p.index === l) {
|
|
2988
|
+
const [m, f] = s(p);
|
|
2989
|
+
m < g && d < f && o.push(`${r(c)} overlaps ${r(p)}`);
|
|
2873
2990
|
}
|
|
2874
2991
|
}), o;
|
|
2875
2992
|
}
|
|
2876
|
-
function
|
|
2877
|
-
return
|
|
2993
|
+
function Zt(e, t) {
|
|
2994
|
+
return se(e.columns, t.columns) && se(e.rows, t.rows);
|
|
2878
2995
|
}
|
|
2879
|
-
function
|
|
2996
|
+
function No({
|
|
2880
2997
|
id: e,
|
|
2881
2998
|
onlySaveAfterUserInteractions: t,
|
|
2882
2999
|
storage: n = localStorage
|
|
2883
3000
|
}) {
|
|
2884
|
-
const o = `react-resizable-panels:grid:${e}`, r =
|
|
2885
|
-
|
|
3001
|
+
const o = `react-resizable-panels:grid:${e}`, r = Qe(
|
|
3002
|
+
So,
|
|
2886
3003
|
() => n.getItem(o),
|
|
2887
3004
|
() => n.getItem(o)
|
|
2888
3005
|
), i = Pe(() => {
|
|
2889
3006
|
if (r)
|
|
2890
3007
|
try {
|
|
2891
|
-
const
|
|
2892
|
-
if (
|
|
2893
|
-
return
|
|
3008
|
+
const c = JSON.parse(r);
|
|
3009
|
+
if (c !== null && typeof c == "object")
|
|
3010
|
+
return c;
|
|
2894
3011
|
} catch {
|
|
2895
3012
|
}
|
|
2896
3013
|
}, [r]), s = re(
|
|
2897
|
-
(
|
|
3014
|
+
(c, a) => {
|
|
2898
3015
|
if (!(t && !a.isUserInteraction))
|
|
2899
3016
|
try {
|
|
2900
3017
|
n.setItem(
|
|
2901
3018
|
o,
|
|
2902
|
-
JSON.stringify(a.requestedLayout ??
|
|
3019
|
+
JSON.stringify(a.requestedLayout ?? c)
|
|
2903
3020
|
);
|
|
2904
|
-
} catch (
|
|
2905
|
-
console.error(
|
|
3021
|
+
} catch (u) {
|
|
3022
|
+
console.error(u);
|
|
2906
3023
|
}
|
|
2907
3024
|
},
|
|
2908
3025
|
[t, n, o]
|
|
@@ -2918,41 +3035,41 @@ function Io({
|
|
|
2918
3035
|
onLayoutChanged: s
|
|
2919
3036
|
};
|
|
2920
3037
|
}
|
|
2921
|
-
function
|
|
3038
|
+
function So() {
|
|
2922
3039
|
return function() {
|
|
2923
3040
|
};
|
|
2924
3041
|
}
|
|
2925
|
-
function
|
|
2926
|
-
return
|
|
3042
|
+
function Go() {
|
|
3043
|
+
return he(null);
|
|
2927
3044
|
}
|
|
2928
|
-
function
|
|
3045
|
+
function Fo() {
|
|
2929
3046
|
return B(null);
|
|
2930
3047
|
}
|
|
2931
|
-
function
|
|
3048
|
+
function vo(e) {
|
|
2932
3049
|
for (let t = 1; t < e.length; t++)
|
|
2933
|
-
if (
|
|
3050
|
+
if (ht(e[t - 1], e[t]) > 0)
|
|
2934
3051
|
return !1;
|
|
2935
3052
|
return !0;
|
|
2936
3053
|
}
|
|
2937
|
-
function
|
|
3054
|
+
function bo({
|
|
2938
3055
|
separator: e
|
|
2939
3056
|
}) {
|
|
2940
3057
|
const { element: t } = e, n = B(null);
|
|
2941
3058
|
return ne(() => {
|
|
2942
3059
|
const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
|
|
2943
|
-
return r.forEach((
|
|
2944
|
-
const
|
|
2945
|
-
if (
|
|
2946
|
-
const
|
|
2947
|
-
for (let d = 0; d <
|
|
2948
|
-
const
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
3060
|
+
return r.forEach((c, a) => {
|
|
3061
|
+
const u = i[a];
|
|
3062
|
+
if (u instanceof s.HTMLElement || u instanceof s.SVGElement) {
|
|
3063
|
+
const l = s.getComputedStyle(c);
|
|
3064
|
+
for (let d = 0; d < l.length; d++) {
|
|
3065
|
+
const g = l.item(d);
|
|
3066
|
+
u.style.setProperty(
|
|
3067
|
+
g,
|
|
3068
|
+
l.getPropertyValue(g)
|
|
2952
3069
|
);
|
|
2953
3070
|
}
|
|
2954
3071
|
}
|
|
2955
|
-
|
|
3072
|
+
u.removeAttribute("data-testid"), u.removeAttribute("id");
|
|
2956
3073
|
}), Object.assign(o.style, {
|
|
2957
3074
|
boxSizing: "border-box",
|
|
2958
3075
|
height: "100%",
|
|
@@ -2961,7 +3078,7 @@ function so({
|
|
|
2961
3078
|
transform: "none",
|
|
2962
3079
|
width: "100%"
|
|
2963
3080
|
}), n.current.appendChild(o), () => o.remove();
|
|
2964
|
-
}, [t]), /* @__PURE__ */
|
|
3081
|
+
}, [t]), /* @__PURE__ */ X(
|
|
2965
3082
|
"div",
|
|
2966
3083
|
{
|
|
2967
3084
|
ref: n,
|
|
@@ -2974,24 +3091,24 @@ function so({
|
|
|
2974
3091
|
}
|
|
2975
3092
|
);
|
|
2976
3093
|
}
|
|
2977
|
-
function
|
|
2978
|
-
const e =
|
|
2979
|
-
return
|
|
3094
|
+
function rt() {
|
|
3095
|
+
const e = tn(wt);
|
|
3096
|
+
return O(
|
|
2980
3097
|
e,
|
|
2981
3098
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
2982
3099
|
), e;
|
|
2983
3100
|
}
|
|
2984
|
-
function
|
|
2985
|
-
const { registerOverlay: t } =
|
|
2986
|
-
|
|
3101
|
+
function In(e) {
|
|
3102
|
+
const { registerOverlay: t } = rt(), n = B(e);
|
|
3103
|
+
yn(n.current, e) || (n.current = e);
|
|
2987
3104
|
const o = n.current;
|
|
2988
3105
|
return ne(
|
|
2989
3106
|
() => t(o),
|
|
2990
3107
|
[t, o]
|
|
2991
3108
|
), null;
|
|
2992
3109
|
}
|
|
2993
|
-
|
|
2994
|
-
function
|
|
3110
|
+
In.displayName = "SeparatorOverlay";
|
|
3111
|
+
function xo({
|
|
2995
3112
|
active: e,
|
|
2996
3113
|
orientation: t,
|
|
2997
3114
|
style: n,
|
|
@@ -3014,7 +3131,7 @@ function ao({
|
|
|
3014
3131
|
break;
|
|
3015
3132
|
}
|
|
3016
3133
|
}
|
|
3017
|
-
return /* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ X(
|
|
3018
3135
|
"div",
|
|
3019
3136
|
{
|
|
3020
3137
|
...o,
|
|
@@ -3028,20 +3145,20 @@ function ao({
|
|
|
3028
3145
|
}
|
|
3029
3146
|
);
|
|
3030
3147
|
}
|
|
3031
|
-
function
|
|
3148
|
+
function wo({
|
|
3032
3149
|
overlay: e,
|
|
3033
3150
|
preview: t
|
|
3034
3151
|
}) {
|
|
3035
3152
|
const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
3036
|
-
let
|
|
3037
|
-
return
|
|
3038
|
-
|
|
3153
|
+
let c = i?.preview, a = e;
|
|
3154
|
+
return nn(c) && c.type === In && (a = c.props, c = void 0), c == null && (a ? c = /* @__PURE__ */ X(
|
|
3155
|
+
xo,
|
|
3039
3156
|
{
|
|
3040
3157
|
...a,
|
|
3041
3158
|
active: t.active,
|
|
3042
3159
|
orientation: n.orientation
|
|
3043
3160
|
}
|
|
3044
|
-
) : i && (
|
|
3161
|
+
) : i && (c = /* @__PURE__ */ X(bo, { separator: i }))), /* @__PURE__ */ X(
|
|
3045
3162
|
"div",
|
|
3046
3163
|
{
|
|
3047
3164
|
"aria-hidden": "true",
|
|
@@ -3056,50 +3173,50 @@ function lo({
|
|
|
3056
3173
|
transform: s ? `translateX(${o}px)` : `translateY(${o}px)`,
|
|
3057
3174
|
width: r.width
|
|
3058
3175
|
},
|
|
3059
|
-
children:
|
|
3176
|
+
children: c
|
|
3060
3177
|
}
|
|
3061
3178
|
);
|
|
3062
3179
|
}
|
|
3063
|
-
function
|
|
3064
|
-
return Array.from(e).sort(
|
|
3180
|
+
function zo(e) {
|
|
3181
|
+
return Array.from(e).sort(ht);
|
|
3065
3182
|
}
|
|
3066
|
-
function
|
|
3183
|
+
function Io(e, t) {
|
|
3067
3184
|
const n = B({
|
|
3068
3185
|
getLayout: () => ({}),
|
|
3069
|
-
setLayout:
|
|
3186
|
+
setLayout: Fn
|
|
3070
3187
|
});
|
|
3071
|
-
|
|
3188
|
+
dt(t, () => n.current, []), ne(() => {
|
|
3072
3189
|
Object.assign(
|
|
3073
3190
|
n.current,
|
|
3074
|
-
|
|
3191
|
+
_e({ axisId: e })
|
|
3075
3192
|
);
|
|
3076
3193
|
});
|
|
3077
3194
|
}
|
|
3078
|
-
function
|
|
3195
|
+
function Lo({
|
|
3079
3196
|
groupId: e,
|
|
3080
3197
|
resizePreviewMode: t
|
|
3081
3198
|
}) {
|
|
3082
|
-
const [n, o] =
|
|
3199
|
+
const [n, o] = he([]), r = B(n);
|
|
3083
3200
|
return ne(() => {
|
|
3084
|
-
const i = (
|
|
3085
|
-
const a =
|
|
3201
|
+
const i = (c) => {
|
|
3202
|
+
const a = Ee(e), u = t === "separator" && c.state === "active" ? c.previews.filter(
|
|
3086
3203
|
(d) => d.axis === a && (d.active || !Y(d.offset, 0))
|
|
3087
|
-
) : [],
|
|
3088
|
-
|
|
3089
|
-
(d,
|
|
3090
|
-
) || (r.current =
|
|
3204
|
+
) : [], l = r.current;
|
|
3205
|
+
l.length === u.length && u.every(
|
|
3206
|
+
(d, g) => d === l[g]
|
|
3207
|
+
) || (r.current = u, o(u));
|
|
3091
3208
|
};
|
|
3092
3209
|
if (t !== "separator") {
|
|
3093
|
-
i(
|
|
3210
|
+
i(ie());
|
|
3094
3211
|
return;
|
|
3095
3212
|
}
|
|
3096
|
-
const s =
|
|
3097
|
-
({ next:
|
|
3213
|
+
const s = pt(
|
|
3214
|
+
({ next: c }) => i(c)
|
|
3098
3215
|
);
|
|
3099
|
-
return i(
|
|
3216
|
+
return i(ie()), s;
|
|
3100
3217
|
}, [e, t]), n;
|
|
3101
3218
|
}
|
|
3102
|
-
function
|
|
3219
|
+
function Co({
|
|
3103
3220
|
children: e,
|
|
3104
3221
|
className: t,
|
|
3105
3222
|
defaultLayout: n,
|
|
@@ -3107,40 +3224,40 @@ function mo({
|
|
|
3107
3224
|
disabled: r,
|
|
3108
3225
|
elementRef: i,
|
|
3109
3226
|
groupRef: s,
|
|
3110
|
-
id:
|
|
3227
|
+
id: c,
|
|
3111
3228
|
onLayoutChange: a,
|
|
3112
|
-
onLayoutChanged:
|
|
3113
|
-
orientation:
|
|
3229
|
+
onLayoutChanged: u,
|
|
3230
|
+
orientation: l = "horizontal",
|
|
3114
3231
|
resizePreviewMode: d = "panel",
|
|
3115
|
-
resizeTargetMinimumSize:
|
|
3232
|
+
resizeTargetMinimumSize: g = {
|
|
3116
3233
|
coarse: 20,
|
|
3117
3234
|
fine: 10
|
|
3118
3235
|
},
|
|
3119
|
-
style:
|
|
3236
|
+
style: p,
|
|
3120
3237
|
...m
|
|
3121
3238
|
}) {
|
|
3122
3239
|
const f = B({
|
|
3123
3240
|
onLayoutChange: {},
|
|
3124
3241
|
onLayoutChanged: {}
|
|
3125
|
-
}),
|
|
3126
|
-
|
|
3127
|
-
}), h =
|
|
3128
|
-
(
|
|
3129
|
-
|
|
3130
|
-
}
|
|
3131
|
-
),
|
|
3132
|
-
groupId:
|
|
3242
|
+
}), y = ye((I) => {
|
|
3243
|
+
se(f.current.onLayoutChange, I) || (f.current.onLayoutChange = I, a?.(I));
|
|
3244
|
+
}), h = ye(
|
|
3245
|
+
(I, M, q) => {
|
|
3246
|
+
se(f.current.onLayoutChanged, I) || (f.current.onLayoutChanged = I, u?.(I, { isUserInteraction: M, requestedLayout: q }));
|
|
3247
|
+
}
|
|
3248
|
+
), S = De(c), [z, x] = he(), R = Lo({
|
|
3249
|
+
groupId: S,
|
|
3133
3250
|
resizePreviewMode: d
|
|
3134
|
-
}),
|
|
3251
|
+
}), N = B(null), [$, b] = bn(), w = B([]), v = B({
|
|
3135
3252
|
lastExpandedPanelSizes: {},
|
|
3136
3253
|
layouts: {},
|
|
3137
3254
|
panels: [],
|
|
3138
3255
|
separators: []
|
|
3139
|
-
}), T =
|
|
3140
|
-
|
|
3141
|
-
const
|
|
3142
|
-
(
|
|
3143
|
-
const q = ae(
|
|
3256
|
+
}), T = Ve(N, i);
|
|
3257
|
+
Io(S, s);
|
|
3258
|
+
const A = ye(
|
|
3259
|
+
(I, M) => {
|
|
3260
|
+
const q = ae(I);
|
|
3144
3261
|
if (q)
|
|
3145
3262
|
return {
|
|
3146
3263
|
flexGrow: q.layout[M] ?? 1
|
|
@@ -3150,221 +3267,238 @@ function mo({
|
|
|
3150
3267
|
flexGrow: n?.[M]
|
|
3151
3268
|
};
|
|
3152
3269
|
}
|
|
3153
|
-
),
|
|
3270
|
+
), E = ot({
|
|
3154
3271
|
defaultLayout: n,
|
|
3155
3272
|
disableCursor: o,
|
|
3156
|
-
resizeTargetMinimumSize:
|
|
3157
|
-
}),
|
|
3273
|
+
resizeTargetMinimumSize: g
|
|
3274
|
+
}), D = Pe(
|
|
3158
3275
|
() => ({
|
|
3159
3276
|
get disableCursor() {
|
|
3160
|
-
return !!
|
|
3277
|
+
return !!E.disableCursor;
|
|
3161
3278
|
},
|
|
3162
|
-
getPanelStyles:
|
|
3163
|
-
id:
|
|
3164
|
-
orientation:
|
|
3165
|
-
registerPanel: (
|
|
3279
|
+
getPanelStyles: A,
|
|
3280
|
+
id: S,
|
|
3281
|
+
orientation: l,
|
|
3282
|
+
registerPanel: (I) => {
|
|
3166
3283
|
const M = v.current;
|
|
3167
|
-
return M.panels =
|
|
3284
|
+
return M.panels = Ge(l, [
|
|
3168
3285
|
...M.panels,
|
|
3169
|
-
|
|
3286
|
+
I
|
|
3170
3287
|
]), b(), () => {
|
|
3171
3288
|
M.panels = M.panels.filter(
|
|
3172
|
-
(q) => q !==
|
|
3289
|
+
(q) => q !== I
|
|
3173
3290
|
), b();
|
|
3174
3291
|
};
|
|
3175
3292
|
},
|
|
3176
|
-
registerOverlay: (
|
|
3293
|
+
registerOverlay: (I) => (x(I), () => {
|
|
3177
3294
|
x(void 0);
|
|
3178
3295
|
}),
|
|
3179
|
-
registerSeparator: (
|
|
3296
|
+
registerSeparator: (I) => {
|
|
3180
3297
|
const M = v.current;
|
|
3181
|
-
return M.separators =
|
|
3298
|
+
return M.separators = Ge(l, [
|
|
3182
3299
|
...M.separators,
|
|
3183
|
-
|
|
3300
|
+
I
|
|
3184
3301
|
]), b(), () => {
|
|
3185
3302
|
M.separators = M.separators.filter(
|
|
3186
|
-
(q) => q !==
|
|
3303
|
+
(q) => q !== I
|
|
3187
3304
|
), b();
|
|
3188
3305
|
};
|
|
3189
3306
|
},
|
|
3190
|
-
updatePanelProps: (
|
|
3307
|
+
updatePanelProps: (I, { disabled: M }) => {
|
|
3191
3308
|
const J = v.current.panels.find(
|
|
3192
|
-
(
|
|
3309
|
+
(ve) => ve.id === I
|
|
3193
3310
|
);
|
|
3194
3311
|
J && (J.constraintProps.disabled = M);
|
|
3195
|
-
const H =
|
|
3312
|
+
const H = Ee(S), Z = ae(S);
|
|
3196
3313
|
H && Z && fe(H, {
|
|
3197
3314
|
...Z,
|
|
3198
|
-
derivedItemConstraints:
|
|
3315
|
+
derivedItemConstraints: ut(H)
|
|
3199
3316
|
});
|
|
3200
3317
|
},
|
|
3201
|
-
updateSeparatorProps: (
|
|
3318
|
+
updateSeparatorProps: (I, {
|
|
3202
3319
|
disabled: M,
|
|
3203
3320
|
disableDoubleClick: q
|
|
3204
3321
|
}) => {
|
|
3205
3322
|
const H = v.current.separators.find(
|
|
3206
|
-
(Z) => Z.id ===
|
|
3323
|
+
(Z) => Z.id === I
|
|
3207
3324
|
);
|
|
3208
3325
|
H && (H.disabled = M, H.disableDoubleClick = q);
|
|
3209
3326
|
}
|
|
3210
3327
|
}),
|
|
3211
|
-
[
|
|
3212
|
-
),
|
|
3328
|
+
[A, S, b, l, E]
|
|
3329
|
+
), C = B(null);
|
|
3213
3330
|
return ne(() => {
|
|
3214
|
-
const
|
|
3215
|
-
if (
|
|
3331
|
+
const I = N.current;
|
|
3332
|
+
if (I === null)
|
|
3216
3333
|
return;
|
|
3217
3334
|
const M = v.current;
|
|
3218
|
-
M.panels =
|
|
3219
|
-
|
|
3335
|
+
M.panels = Ge(
|
|
3336
|
+
l,
|
|
3220
3337
|
M.panels
|
|
3221
|
-
), M.separators =
|
|
3222
|
-
|
|
3338
|
+
), M.separators = Ge(
|
|
3339
|
+
l,
|
|
3223
3340
|
M.separators
|
|
3224
|
-
), w.current =
|
|
3341
|
+
), w.current = zo([
|
|
3225
3342
|
...M.panels.map(({ element: L }) => L),
|
|
3226
3343
|
...M.separators.map(({ element: L }) => L)
|
|
3227
3344
|
]);
|
|
3228
3345
|
let q;
|
|
3229
|
-
if (
|
|
3346
|
+
if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === M.panels.length) {
|
|
3230
3347
|
q = {};
|
|
3231
3348
|
for (const L of M.panels) {
|
|
3232
|
-
const
|
|
3233
|
-
|
|
3349
|
+
const P = E.defaultLayout[L.id];
|
|
3350
|
+
P !== void 0 && (q[L.id] = P);
|
|
3234
3351
|
}
|
|
3235
3352
|
}
|
|
3236
3353
|
const J = {
|
|
3237
3354
|
disabled: !!r,
|
|
3238
|
-
element:
|
|
3239
|
-
id:
|
|
3355
|
+
element: I,
|
|
3356
|
+
id: S,
|
|
3240
3357
|
mutableState: {
|
|
3241
3358
|
defaultLayout: q,
|
|
3242
|
-
disableCursor: !!
|
|
3359
|
+
disableCursor: !!E.disableCursor,
|
|
3243
3360
|
expandedItemSizes: v.current.lastExpandedPanelSizes,
|
|
3244
3361
|
layouts: v.current.layouts
|
|
3245
3362
|
},
|
|
3246
|
-
orientation:
|
|
3363
|
+
orientation: l,
|
|
3247
3364
|
items: M.panels,
|
|
3248
3365
|
resizePreviewMode: d,
|
|
3249
3366
|
get resizeTargetMinimumSize() {
|
|
3250
|
-
return
|
|
3367
|
+
return E.resizeTargetMinimumSize;
|
|
3251
3368
|
},
|
|
3252
3369
|
separators: M.separators
|
|
3253
3370
|
};
|
|
3254
|
-
|
|
3255
|
-
const H =
|
|
3371
|
+
C.current = J;
|
|
3372
|
+
const H = Sn(J), {
|
|
3256
3373
|
defaultLayoutDeferred: Z,
|
|
3257
|
-
derivedItemConstraints:
|
|
3374
|
+
derivedItemConstraints: ve,
|
|
3258
3375
|
layout: ze,
|
|
3259
3376
|
requestedLayout: Ie
|
|
3260
3377
|
} = ae(J.id, !0);
|
|
3261
|
-
!Z &&
|
|
3262
|
-
|
|
3378
|
+
if (!Z && ve.length > 0)
|
|
3379
|
+
try {
|
|
3380
|
+
try {
|
|
3381
|
+
y(ze);
|
|
3382
|
+
} finally {
|
|
3383
|
+
h(ze, !1, Ie);
|
|
3384
|
+
}
|
|
3385
|
+
} catch (L) {
|
|
3386
|
+
throw C.current = null, H(), L;
|
|
3387
|
+
}
|
|
3388
|
+
const be = Be(S, (L) => {
|
|
3263
3389
|
const {
|
|
3264
|
-
defaultLayoutDeferred:
|
|
3265
|
-
derivedItemConstraints:
|
|
3390
|
+
defaultLayoutDeferred: P,
|
|
3391
|
+
derivedItemConstraints: F,
|
|
3266
3392
|
layout: G,
|
|
3267
|
-
requestedLayout:
|
|
3393
|
+
requestedLayout: _
|
|
3268
3394
|
} = L.next;
|
|
3269
|
-
if (
|
|
3395
|
+
if (P || F.length === 0)
|
|
3270
3396
|
return;
|
|
3271
|
-
|
|
3272
|
-
derivedItemConstraints:
|
|
3397
|
+
vn({
|
|
3398
|
+
derivedItemConstraints: F,
|
|
3273
3399
|
axis: J,
|
|
3274
3400
|
layout: G,
|
|
3275
3401
|
prevLayout: L.prev?.layout,
|
|
3276
|
-
requestedLayout:
|
|
3402
|
+
requestedLayout: _
|
|
3277
3403
|
});
|
|
3278
|
-
const j =
|
|
3279
|
-
|
|
3404
|
+
const j = ie(), U = j.state !== "active" || !j.hitRegions.some((te) => te.axis === J);
|
|
3405
|
+
try {
|
|
3406
|
+
y(G);
|
|
3407
|
+
} finally {
|
|
3408
|
+
U && h(
|
|
3409
|
+
G,
|
|
3410
|
+
L.isUserInteraction,
|
|
3411
|
+
_
|
|
3412
|
+
);
|
|
3413
|
+
}
|
|
3280
3414
|
});
|
|
3281
3415
|
return () => {
|
|
3282
|
-
|
|
3416
|
+
C.current = null, H(), be();
|
|
3283
3417
|
};
|
|
3284
3418
|
}, [
|
|
3285
3419
|
r,
|
|
3286
|
-
g,
|
|
3287
|
-
h,
|
|
3288
3420
|
S,
|
|
3289
|
-
|
|
3290
|
-
|
|
3421
|
+
h,
|
|
3422
|
+
y,
|
|
3423
|
+
l,
|
|
3424
|
+
$,
|
|
3291
3425
|
d,
|
|
3292
|
-
|
|
3426
|
+
E
|
|
3293
3427
|
]), ne(() => {
|
|
3294
|
-
|
|
3295
|
-
}),
|
|
3296
|
-
const
|
|
3297
|
-
|
|
3298
|
-
}), /* @__PURE__ */
|
|
3428
|
+
vo(w.current) || b();
|
|
3429
|
+
}), He(() => {
|
|
3430
|
+
const I = C.current;
|
|
3431
|
+
I && (I.mutableState.defaultLayout = n, I.mutableState.disableCursor = !!o);
|
|
3432
|
+
}), /* @__PURE__ */ X(wt.Provider, { value: D, children: /* @__PURE__ */ Cn(
|
|
3299
3433
|
"div",
|
|
3300
3434
|
{
|
|
3301
3435
|
...m,
|
|
3302
3436
|
className: t,
|
|
3303
3437
|
"data-group": !0,
|
|
3304
|
-
"data-testid":
|
|
3305
|
-
id:
|
|
3438
|
+
"data-testid": S,
|
|
3439
|
+
id: S,
|
|
3306
3440
|
ref: T,
|
|
3307
3441
|
style: {
|
|
3308
3442
|
height: "100%",
|
|
3309
3443
|
width: "100%",
|
|
3310
3444
|
overflow: "hidden",
|
|
3311
3445
|
position: d === "separator" ? "relative" : void 0,
|
|
3312
|
-
...
|
|
3446
|
+
...p,
|
|
3313
3447
|
display: "flex",
|
|
3314
|
-
flexDirection:
|
|
3448
|
+
flexDirection: l === "horizontal" ? "row" : "column",
|
|
3315
3449
|
flexWrap: "nowrap",
|
|
3316
3450
|
// Inform the browser that the library is handling touch events for this element
|
|
3317
3451
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3318
3452
|
// NOTE This is not an inherited style
|
|
3319
3453
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3320
|
-
touchAction:
|
|
3454
|
+
touchAction: l === "horizontal" ? "pan-y" : "pan-x"
|
|
3321
3455
|
},
|
|
3322
3456
|
children: [
|
|
3323
3457
|
e,
|
|
3324
|
-
|
|
3325
|
-
|
|
3458
|
+
R.map((I) => /* @__PURE__ */ X(
|
|
3459
|
+
wo,
|
|
3326
3460
|
{
|
|
3327
|
-
overlay:
|
|
3328
|
-
preview:
|
|
3461
|
+
overlay: z,
|
|
3462
|
+
preview: I
|
|
3329
3463
|
},
|
|
3330
|
-
|
|
3464
|
+
I.key
|
|
3331
3465
|
))
|
|
3332
3466
|
]
|
|
3333
3467
|
}
|
|
3334
3468
|
) });
|
|
3335
3469
|
}
|
|
3336
|
-
|
|
3337
|
-
function
|
|
3470
|
+
Co.displayName = "Group";
|
|
3471
|
+
function Ze(e, t) {
|
|
3338
3472
|
return `react-resizable-panels:${[e, ...t].join(":")}`;
|
|
3339
3473
|
}
|
|
3340
|
-
function
|
|
3474
|
+
function Ro({
|
|
3341
3475
|
id: e,
|
|
3342
3476
|
panelIds: t,
|
|
3343
3477
|
storage: n
|
|
3344
3478
|
}) {
|
|
3345
|
-
const o =
|
|
3479
|
+
const o = Ze(e, []), r = n.getItem(o);
|
|
3346
3480
|
if (r)
|
|
3347
3481
|
try {
|
|
3348
3482
|
const i = JSON.parse(r);
|
|
3349
3483
|
if (t) {
|
|
3350
|
-
const s = t.join(","),
|
|
3351
|
-
if (
|
|
3484
|
+
const s = t.join(","), c = i[s];
|
|
3485
|
+
if (c && Array.isArray(c.layout) && t.length === c.layout.length) {
|
|
3352
3486
|
const a = {};
|
|
3353
|
-
for (let
|
|
3354
|
-
a[t[
|
|
3487
|
+
for (let u = 0; u < t.length; u++)
|
|
3488
|
+
a[t[u]] = c.layout[u];
|
|
3355
3489
|
return a;
|
|
3356
3490
|
}
|
|
3357
3491
|
} else {
|
|
3358
3492
|
const s = Object.keys(i);
|
|
3359
3493
|
if (s.length === 1) {
|
|
3360
|
-
const
|
|
3361
|
-
if (
|
|
3494
|
+
const c = i[s[0]];
|
|
3495
|
+
if (c && Array.isArray(c.layout)) {
|
|
3362
3496
|
const a = s[0].split(",");
|
|
3363
|
-
if (a.length ===
|
|
3364
|
-
const
|
|
3365
|
-
for (let
|
|
3366
|
-
|
|
3367
|
-
return
|
|
3497
|
+
if (a.length === c.layout.length) {
|
|
3498
|
+
const u = {};
|
|
3499
|
+
for (let l = 0; l < a.length; l++)
|
|
3500
|
+
u[a[l]] = c.layout[l];
|
|
3501
|
+
return u;
|
|
3368
3502
|
}
|
|
3369
3503
|
}
|
|
3370
3504
|
}
|
|
@@ -3372,70 +3506,70 @@ function po({
|
|
|
3372
3506
|
} catch {
|
|
3373
3507
|
}
|
|
3374
3508
|
}
|
|
3375
|
-
function
|
|
3509
|
+
function _o({
|
|
3376
3510
|
debounceSaveMs: e = 100,
|
|
3377
3511
|
onlySaveAfterUserInteractions: t,
|
|
3378
3512
|
panelIds: n,
|
|
3379
3513
|
storage: o = localStorage,
|
|
3380
3514
|
...r
|
|
3381
3515
|
}) {
|
|
3382
|
-
const i = n !== void 0, s = "id" in r ? r.id : r.groupId,
|
|
3383
|
-
|
|
3384
|
-
() => o.getItem(
|
|
3385
|
-
() => o.getItem(
|
|
3386
|
-
),
|
|
3516
|
+
const i = n !== void 0, s = "id" in r ? r.id : r.groupId, c = Ze(s, n ?? []), a = Qe(
|
|
3517
|
+
Eo,
|
|
3518
|
+
() => o.getItem(c),
|
|
3519
|
+
() => o.getItem(c)
|
|
3520
|
+
), u = Pe(() => {
|
|
3387
3521
|
if (a) {
|
|
3388
|
-
const
|
|
3389
|
-
if (Array.from(h).every((
|
|
3390
|
-
return
|
|
3522
|
+
const y = JSON.parse(a), h = Object.values(y);
|
|
3523
|
+
if (Array.from(h).every((S) => typeof S == "number"))
|
|
3524
|
+
return y;
|
|
3391
3525
|
}
|
|
3392
|
-
}, [a]),
|
|
3393
|
-
if (!
|
|
3394
|
-
return
|
|
3526
|
+
}, [a]), l = Pe(() => {
|
|
3527
|
+
if (!u)
|
|
3528
|
+
return Ro({
|
|
3395
3529
|
id: s,
|
|
3396
3530
|
panelIds: n,
|
|
3397
3531
|
storage: o
|
|
3398
3532
|
});
|
|
3399
|
-
}, [
|
|
3400
|
-
const
|
|
3401
|
-
|
|
3533
|
+
}, [u, s, n, o]), d = u ?? l, g = B(null), p = re(() => {
|
|
3534
|
+
const y = g.current;
|
|
3535
|
+
y && (g.current = null, clearTimeout(y));
|
|
3402
3536
|
}, []);
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
}, [
|
|
3537
|
+
Qt(() => () => {
|
|
3538
|
+
p();
|
|
3539
|
+
}, [p]);
|
|
3406
3540
|
const m = re(
|
|
3407
3541
|
// The hook persists every layout commit -- including library-driven ones --
|
|
3408
3542
|
// because it owns its own storage and the goal is to remember whatever
|
|
3409
3543
|
// layout the user is currently looking at. Consumers that only want to
|
|
3410
3544
|
// persist on user interaction should branch on `isUserInteraction` in
|
|
3411
3545
|
// their own callback (see #716) rather than via this hook.
|
|
3412
|
-
(
|
|
3546
|
+
(y, h) => {
|
|
3413
3547
|
if (t && !h.isUserInteraction)
|
|
3414
3548
|
return;
|
|
3415
|
-
|
|
3416
|
-
const
|
|
3417
|
-
let
|
|
3418
|
-
i ?
|
|
3549
|
+
p();
|
|
3550
|
+
const S = h.requestedLayout ?? y;
|
|
3551
|
+
let z;
|
|
3552
|
+
i ? z = Ze(s, Object.keys(S)) : z = Ze(s, []);
|
|
3419
3553
|
try {
|
|
3420
|
-
o.setItem(
|
|
3554
|
+
o.setItem(z, JSON.stringify(S));
|
|
3421
3555
|
} catch (x) {
|
|
3422
3556
|
console.error(x);
|
|
3423
3557
|
}
|
|
3424
3558
|
},
|
|
3425
3559
|
[
|
|
3426
|
-
|
|
3560
|
+
p,
|
|
3427
3561
|
i,
|
|
3428
3562
|
s,
|
|
3429
3563
|
t,
|
|
3430
3564
|
o
|
|
3431
3565
|
]
|
|
3432
3566
|
), f = re(
|
|
3433
|
-
(
|
|
3434
|
-
|
|
3435
|
-
m(
|
|
3567
|
+
(y) => {
|
|
3568
|
+
p(), e === 0 ? m(y, { isUserInteraction: !1 }) : g.current = setTimeout(() => {
|
|
3569
|
+
m(y, { isUserInteraction: !1 });
|
|
3436
3570
|
}, e);
|
|
3437
3571
|
},
|
|
3438
|
-
[
|
|
3572
|
+
[p, e, m]
|
|
3439
3573
|
);
|
|
3440
3574
|
return {
|
|
3441
3575
|
/**
|
|
@@ -3454,35 +3588,35 @@ function Ro({
|
|
|
3454
3588
|
onLayoutChanged: m
|
|
3455
3589
|
};
|
|
3456
3590
|
}
|
|
3457
|
-
function
|
|
3591
|
+
function Eo() {
|
|
3458
3592
|
return function() {
|
|
3459
3593
|
};
|
|
3460
3594
|
}
|
|
3461
|
-
function
|
|
3462
|
-
return
|
|
3595
|
+
function Bo() {
|
|
3596
|
+
return he(null);
|
|
3463
3597
|
}
|
|
3464
|
-
function
|
|
3598
|
+
function qo() {
|
|
3465
3599
|
return B(null);
|
|
3466
3600
|
}
|
|
3467
|
-
function
|
|
3468
|
-
const { id: n } =
|
|
3469
|
-
collapse:
|
|
3470
|
-
expand:
|
|
3601
|
+
function Mo(e, t) {
|
|
3602
|
+
const { id: n } = rt(), o = B({
|
|
3603
|
+
collapse: st,
|
|
3604
|
+
expand: st,
|
|
3471
3605
|
getSize: () => ({
|
|
3472
3606
|
asPercentage: 0,
|
|
3473
3607
|
inPixels: 0
|
|
3474
3608
|
}),
|
|
3475
3609
|
isCollapsed: () => !1,
|
|
3476
|
-
resize:
|
|
3610
|
+
resize: st
|
|
3477
3611
|
});
|
|
3478
|
-
|
|
3612
|
+
dt(t, () => o.current, []), ne(() => {
|
|
3479
3613
|
Object.assign(
|
|
3480
3614
|
o.current,
|
|
3481
|
-
|
|
3615
|
+
xt({ axisId: n, itemId: e })
|
|
3482
3616
|
);
|
|
3483
3617
|
});
|
|
3484
3618
|
}
|
|
3485
|
-
function
|
|
3619
|
+
function Po({
|
|
3486
3620
|
children: e,
|
|
3487
3621
|
className: t,
|
|
3488
3622
|
collapsedSize: n = "0%",
|
|
@@ -3490,36 +3624,36 @@ function yo({
|
|
|
3490
3624
|
collapsible: r = !1,
|
|
3491
3625
|
defaultSize: i,
|
|
3492
3626
|
disabled: s,
|
|
3493
|
-
elementRef:
|
|
3627
|
+
elementRef: c,
|
|
3494
3628
|
groupResizeBehavior: a = "preserve-relative-size",
|
|
3495
|
-
id:
|
|
3496
|
-
maxSize:
|
|
3629
|
+
id: u,
|
|
3630
|
+
maxSize: l = "100%",
|
|
3497
3631
|
minSize: d = "0%",
|
|
3498
|
-
onResize:
|
|
3499
|
-
panelRef:
|
|
3632
|
+
onResize: g,
|
|
3633
|
+
panelRef: p,
|
|
3500
3634
|
style: m,
|
|
3501
3635
|
...f
|
|
3502
3636
|
}) {
|
|
3503
|
-
const
|
|
3637
|
+
const y = !!u, h = De(u), S = ot({
|
|
3504
3638
|
disabled: s
|
|
3505
|
-
}),
|
|
3506
|
-
getPanelStyles:
|
|
3507
|
-
id:
|
|
3508
|
-
orientation:
|
|
3639
|
+
}), z = B(null), x = Ve(z, c), {
|
|
3640
|
+
getPanelStyles: R,
|
|
3641
|
+
id: N,
|
|
3642
|
+
orientation: $,
|
|
3509
3643
|
registerPanel: b,
|
|
3510
3644
|
updatePanelProps: w
|
|
3511
|
-
} =
|
|
3512
|
-
(
|
|
3513
|
-
|
|
3645
|
+
} = rt(), v = g !== null, T = ye(
|
|
3646
|
+
(C, I, M) => {
|
|
3647
|
+
g?.(C, u, M);
|
|
3514
3648
|
}
|
|
3515
3649
|
);
|
|
3516
3650
|
ne(() => {
|
|
3517
|
-
const
|
|
3518
|
-
if (
|
|
3519
|
-
const
|
|
3520
|
-
element:
|
|
3651
|
+
const C = z.current;
|
|
3652
|
+
if (C !== null) {
|
|
3653
|
+
const I = {
|
|
3654
|
+
element: C,
|
|
3521
3655
|
id: h,
|
|
3522
|
-
idIsStable:
|
|
3656
|
+
idIsStable: y,
|
|
3523
3657
|
mutableValues: {
|
|
3524
3658
|
expandToSize: void 0,
|
|
3525
3659
|
prevSize: void 0
|
|
@@ -3531,12 +3665,12 @@ function yo({
|
|
|
3531
3665
|
collapsedThreshold: o,
|
|
3532
3666
|
collapsible: r,
|
|
3533
3667
|
defaultSize: i,
|
|
3534
|
-
disabled:
|
|
3535
|
-
maxSize:
|
|
3668
|
+
disabled: S.disabled,
|
|
3669
|
+
maxSize: l,
|
|
3536
3670
|
minSize: d
|
|
3537
3671
|
}
|
|
3538
3672
|
};
|
|
3539
|
-
return b(
|
|
3673
|
+
return b(I);
|
|
3540
3674
|
}
|
|
3541
3675
|
}, [
|
|
3542
3676
|
a,
|
|
@@ -3546,30 +3680,30 @@ function yo({
|
|
|
3546
3680
|
i,
|
|
3547
3681
|
v,
|
|
3548
3682
|
h,
|
|
3549
|
-
|
|
3550
|
-
|
|
3683
|
+
y,
|
|
3684
|
+
l,
|
|
3551
3685
|
d,
|
|
3552
3686
|
T,
|
|
3553
3687
|
b,
|
|
3554
|
-
|
|
3555
|
-
]),
|
|
3688
|
+
S
|
|
3689
|
+
]), He(() => {
|
|
3556
3690
|
w(h, { disabled: s });
|
|
3557
|
-
}, [s, h, w]),
|
|
3558
|
-
const
|
|
3559
|
-
const
|
|
3560
|
-
if (
|
|
3561
|
-
return JSON.stringify(
|
|
3562
|
-
},
|
|
3563
|
-
(
|
|
3564
|
-
|
|
3565
|
-
|
|
3691
|
+
}, [s, h, w]), Mo(h, p);
|
|
3692
|
+
const A = () => {
|
|
3693
|
+
const C = R(N, h);
|
|
3694
|
+
if (C)
|
|
3695
|
+
return JSON.stringify(C);
|
|
3696
|
+
}, E = Qe(
|
|
3697
|
+
(C) => Be(N, C),
|
|
3698
|
+
A,
|
|
3699
|
+
A
|
|
3566
3700
|
);
|
|
3567
|
-
let
|
|
3568
|
-
return
|
|
3701
|
+
let D;
|
|
3702
|
+
return E ? D = JSON.parse(E) : i !== void 0 ? D = {
|
|
3569
3703
|
flexGrow: void 0,
|
|
3570
3704
|
flexShrink: void 0,
|
|
3571
3705
|
flexBasis: i
|
|
3572
|
-
} :
|
|
3706
|
+
} : D = { flexGrow: 1 }, /* @__PURE__ */ X(
|
|
3573
3707
|
"div",
|
|
3574
3708
|
{
|
|
3575
3709
|
...f,
|
|
@@ -3579,14 +3713,14 @@ function yo({
|
|
|
3579
3713
|
id: h,
|
|
3580
3714
|
ref: x,
|
|
3581
3715
|
style: {
|
|
3582
|
-
...
|
|
3716
|
+
...To,
|
|
3583
3717
|
display: "flex",
|
|
3584
3718
|
flexBasis: 0,
|
|
3585
3719
|
flexShrink: 1,
|
|
3586
3720
|
overflow: "visible",
|
|
3587
|
-
...
|
|
3721
|
+
...D
|
|
3588
3722
|
},
|
|
3589
|
-
children: /* @__PURE__ */
|
|
3723
|
+
children: /* @__PURE__ */ X(
|
|
3590
3724
|
"div",
|
|
3591
3725
|
{
|
|
3592
3726
|
className: t,
|
|
@@ -3600,7 +3734,7 @@ function yo({
|
|
|
3600
3734
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3601
3735
|
// NOTE This is not an inherited style
|
|
3602
3736
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3603
|
-
touchAction:
|
|
3737
|
+
touchAction: $ === "horizontal" ? "pan-y" : "pan-x"
|
|
3604
3738
|
},
|
|
3605
3739
|
children: e
|
|
3606
3740
|
}
|
|
@@ -3608,8 +3742,8 @@ function yo({
|
|
|
3608
3742
|
}
|
|
3609
3743
|
);
|
|
3610
3744
|
}
|
|
3611
|
-
|
|
3612
|
-
const
|
|
3745
|
+
Po.displayName = "Panel";
|
|
3746
|
+
const To = {
|
|
3613
3747
|
minHeight: 0,
|
|
3614
3748
|
maxHeight: "100%",
|
|
3615
3749
|
height: "auto",
|
|
@@ -3621,14 +3755,14 @@ const So = {
|
|
|
3621
3755
|
padding: 0,
|
|
3622
3756
|
margin: 0
|
|
3623
3757
|
};
|
|
3624
|
-
function
|
|
3625
|
-
return
|
|
3758
|
+
function Ho() {
|
|
3759
|
+
return he(null);
|
|
3626
3760
|
}
|
|
3627
|
-
function
|
|
3761
|
+
function Vo() {
|
|
3628
3762
|
return B(null);
|
|
3629
3763
|
}
|
|
3630
|
-
const
|
|
3631
|
-
function
|
|
3764
|
+
const Do = { flexBasis: "auto" }, ko = { flexGrow: 0, flexShrink: 0 };
|
|
3765
|
+
function Ao({
|
|
3632
3766
|
children: e,
|
|
3633
3767
|
className: t,
|
|
3634
3768
|
disabled: n,
|
|
@@ -3636,55 +3770,55 @@ function xo({
|
|
|
3636
3770
|
elementRef: r,
|
|
3637
3771
|
id: i,
|
|
3638
3772
|
preview: s,
|
|
3639
|
-
style:
|
|
3773
|
+
style: c,
|
|
3640
3774
|
...a
|
|
3641
3775
|
}) {
|
|
3642
|
-
const
|
|
3643
|
-
disableCursor:
|
|
3776
|
+
const u = De(i), {
|
|
3777
|
+
disableCursor: l,
|
|
3644
3778
|
id: d,
|
|
3645
|
-
orientation:
|
|
3646
|
-
registerSeparator:
|
|
3779
|
+
orientation: g,
|
|
3780
|
+
registerSeparator: p,
|
|
3647
3781
|
updateSeparatorProps: m
|
|
3648
|
-
} =
|
|
3649
|
-
return /* @__PURE__ */
|
|
3650
|
-
|
|
3782
|
+
} = rt();
|
|
3783
|
+
return /* @__PURE__ */ X(
|
|
3784
|
+
xn,
|
|
3651
3785
|
{
|
|
3652
3786
|
attributes: a,
|
|
3653
3787
|
axisId: d,
|
|
3654
|
-
axisOrientation:
|
|
3788
|
+
axisOrientation: g,
|
|
3655
3789
|
className: t,
|
|
3656
|
-
disableCursor:
|
|
3790
|
+
disableCursor: l,
|
|
3657
3791
|
disabled: n,
|
|
3658
3792
|
disableDoubleClick: o,
|
|
3659
3793
|
elementRef: r,
|
|
3660
|
-
id:
|
|
3794
|
+
id: u,
|
|
3661
3795
|
preview: s,
|
|
3662
|
-
registerSeparator:
|
|
3663
|
-
requiredStyle:
|
|
3664
|
-
style:
|
|
3665
|
-
styleDefaults:
|
|
3796
|
+
registerSeparator: p,
|
|
3797
|
+
requiredStyle: ko,
|
|
3798
|
+
style: c,
|
|
3799
|
+
styleDefaults: Do,
|
|
3666
3800
|
updateSeparatorProps: m,
|
|
3667
3801
|
children: e
|
|
3668
3802
|
}
|
|
3669
3803
|
);
|
|
3670
3804
|
}
|
|
3671
|
-
|
|
3805
|
+
Ao.displayName = "Separator";
|
|
3672
3806
|
export {
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3807
|
+
Dn as Cell,
|
|
3808
|
+
ho as Grid,
|
|
3809
|
+
wn as Gridline,
|
|
3810
|
+
Co as Group,
|
|
3811
|
+
Po as Panel,
|
|
3812
|
+
Ao as Separator,
|
|
3813
|
+
In as SeparatorOverlay,
|
|
3814
|
+
kn as isCoarsePointer,
|
|
3815
|
+
No as useDefaultGridLayout,
|
|
3816
|
+
_o as useDefaultLayout,
|
|
3817
|
+
Go as useGridCallbackRef,
|
|
3818
|
+
Fo as useGridRef,
|
|
3819
|
+
Bo as useGroupCallbackRef,
|
|
3820
|
+
qo as useGroupRef,
|
|
3821
|
+
Ho as usePanelCallbackRef,
|
|
3822
|
+
Vo as usePanelRef
|
|
3689
3823
|
};
|
|
3690
3824
|
//# sourceMappingURL=react-resizable-panels.js.map
|