@window-splitter/vue 1.1.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +17 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +827 -810
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/PanelGroup.vue +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,279 +1,279 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
var
|
|
1
|
+
import { defineComponent as Ie, useId as ye, inject as Y, computed as H, onMounted as X, watchEffect as ue, onUnmounted as Be, createElementBlock as Pe, openBlock as Se, normalizeProps as We, guardReactiveProps as Ue, renderSlot as Ce, createPropsRestProxy as Ke, ref as he, provide as ie, onWatcherCleanup as Xe, mergeProps as Ee, unref as Ye } from "vue";
|
|
2
|
+
var Ge = 20, Je = 1, J = 1e6, Qe = 1e6, Ze = -7, _e = 21, et = !1, ne = "[big.js] ", W = ne + "Invalid ", pe = W + "decimal places", tt = W + "rounding mode", Ne = ne + "Division by zero", y = {}, N = void 0, nt = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
3
3
|
function Oe() {
|
|
4
4
|
function e(t) {
|
|
5
|
-
var
|
|
6
|
-
if (!(
|
|
5
|
+
var n = this;
|
|
6
|
+
if (!(n instanceof e)) return t === N ? Oe() : new e(t);
|
|
7
7
|
if (t instanceof e)
|
|
8
|
-
|
|
8
|
+
n.s = t.s, n.e = t.e, n.c = t.c.slice();
|
|
9
9
|
else {
|
|
10
10
|
if (typeof t != "string") {
|
|
11
11
|
if (e.strict === !0 && typeof t != "bigint")
|
|
12
12
|
throw TypeError(W + "value");
|
|
13
13
|
t = t === 0 && 1 / t < 0 ? "-0" : String(t);
|
|
14
14
|
}
|
|
15
|
-
at(
|
|
15
|
+
at(n, t);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
n.constructor = e;
|
|
18
18
|
}
|
|
19
|
-
return e.prototype =
|
|
19
|
+
return e.prototype = y, e.DP = Ge, e.RM = Je, e.NE = Ze, e.PE = _e, e.strict = et, e.roundDown = 0, e.roundHalfUp = 1, e.roundHalfEven = 2, e.roundUp = 3, e;
|
|
20
20
|
}
|
|
21
21
|
function at(e, t) {
|
|
22
|
-
var a, r
|
|
22
|
+
var n, a, r;
|
|
23
23
|
if (!nt.test(t))
|
|
24
24
|
throw Error(W + "number");
|
|
25
|
-
for (e.s = t.charAt(0) == "-" ? (t = t.slice(1), -1) : 1, (
|
|
26
|
-
if (
|
|
25
|
+
for (e.s = t.charAt(0) == "-" ? (t = t.slice(1), -1) : 1, (n = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (a = t.search(/e/i)) > 0 ? (n < 0 && (n = a), n += +t.slice(a + 1), t = t.substring(0, a)) : n < 0 && (n = t.length), r = t.length, a = 0; a < r && t.charAt(a) == "0"; ) ++a;
|
|
26
|
+
if (a == r)
|
|
27
27
|
e.c = [e.e = 0];
|
|
28
28
|
else {
|
|
29
|
-
for (;
|
|
30
|
-
for (e.e =
|
|
29
|
+
for (; r > 0 && t.charAt(--r) == "0"; ) ;
|
|
30
|
+
for (e.e = n - a - 1, e.c = [], n = 0; a <= r; ) e.c[n++] = +t.charAt(a++);
|
|
31
31
|
}
|
|
32
32
|
return e;
|
|
33
33
|
}
|
|
34
|
-
function U(e, t,
|
|
35
|
-
var
|
|
36
|
-
if (
|
|
34
|
+
function U(e, t, n, a) {
|
|
35
|
+
var r = e.c;
|
|
36
|
+
if (n === N && (n = e.constructor.RM), n !== 0 && n !== 1 && n !== 2 && n !== 3)
|
|
37
37
|
throw Error(tt);
|
|
38
38
|
if (t < 1)
|
|
39
|
-
|
|
40
|
-
else if (t <
|
|
41
|
-
if (
|
|
42
|
-
for (; ++
|
|
43
|
-
if (
|
|
44
|
-
++e.e,
|
|
39
|
+
a = n === 3 && (a || !!r[0]) || t === 0 && (n === 1 && r[0] >= 5 || n === 2 && (r[0] > 5 || r[0] === 5 && (a || r[1] !== N))), r.length = 1, a ? (e.e = e.e - t + 1, r[0] = 1) : r[0] = e.e = 0;
|
|
40
|
+
else if (t < r.length) {
|
|
41
|
+
if (a = n === 1 && r[t] >= 5 || n === 2 && (r[t] > 5 || r[t] === 5 && (a || r[t + 1] !== N || r[t - 1] & 1)) || n === 3 && (a || !!r[0]), r.length = t, a) {
|
|
42
|
+
for (; ++r[--t] > 9; )
|
|
43
|
+
if (r[t] = 0, t === 0) {
|
|
44
|
+
++e.e, r.unshift(1);
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
for (t =
|
|
48
|
+
for (t = r.length; !r[--t]; ) r.pop();
|
|
49
49
|
}
|
|
50
50
|
return e;
|
|
51
51
|
}
|
|
52
|
-
function Q(e, t,
|
|
53
|
-
var
|
|
52
|
+
function Q(e, t, n) {
|
|
53
|
+
var a = e.e, r = e.c.join(""), i = r.length;
|
|
54
54
|
if (t)
|
|
55
|
-
|
|
56
|
-
else if (
|
|
57
|
-
for (; ++
|
|
58
|
-
|
|
59
|
-
} else if (
|
|
60
|
-
if (++
|
|
61
|
-
for (
|
|
62
|
-
else
|
|
63
|
-
else
|
|
64
|
-
return e.s < 0 &&
|
|
65
|
-
}
|
|
66
|
-
|
|
55
|
+
r = r.charAt(0) + (i > 1 ? "." + r.slice(1) : "") + (a < 0 ? "e" : "e+") + a;
|
|
56
|
+
else if (a < 0) {
|
|
57
|
+
for (; ++a; ) r = "0" + r;
|
|
58
|
+
r = "0." + r;
|
|
59
|
+
} else if (a > 0)
|
|
60
|
+
if (++a > i)
|
|
61
|
+
for (a -= i; a--; ) r += "0";
|
|
62
|
+
else a < i && (r = r.slice(0, a) + "." + r.slice(a));
|
|
63
|
+
else i > 1 && (r = r.charAt(0) + "." + r.slice(1));
|
|
64
|
+
return e.s < 0 && n ? "-" + r : r;
|
|
65
|
+
}
|
|
66
|
+
y.abs = function() {
|
|
67
67
|
var e = new this.constructor(this);
|
|
68
68
|
return e.s = 1, e;
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
var t,
|
|
72
|
-
if (!
|
|
73
|
-
if (
|
|
74
|
-
if (t =
|
|
75
|
-
for (
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
70
|
+
y.cmp = function(e) {
|
|
71
|
+
var t, n = this, a = n.c, r = (e = new n.constructor(e)).c, i = n.s, l = e.s, o = n.e, u = e.e;
|
|
72
|
+
if (!a[0] || !r[0]) return a[0] ? i : r[0] ? -l : 0;
|
|
73
|
+
if (i != l) return i;
|
|
74
|
+
if (t = i < 0, o != u) return o > u ^ t ? 1 : -1;
|
|
75
|
+
for (l = (o = a.length) < (u = r.length) ? o : u, i = -1; ++i < l; )
|
|
76
|
+
if (a[i] != r[i]) return a[i] > r[i] ^ t ? 1 : -1;
|
|
77
|
+
return o == u ? 0 : o > u ^ t ? 1 : -1;
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
var t = this,
|
|
81
|
-
if (
|
|
82
|
-
throw Error(
|
|
83
|
-
if (!l[0])
|
|
84
|
-
throw Error(Ne);
|
|
79
|
+
y.div = function(e) {
|
|
80
|
+
var t = this, n = t.constructor, a = t.c, r = (e = new n(e)).c, i = t.s == e.s ? 1 : -1, l = n.DP;
|
|
81
|
+
if (l !== ~~l || l < 0 || l > J)
|
|
82
|
+
throw Error(pe);
|
|
85
83
|
if (!r[0])
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
throw Error(Ne);
|
|
85
|
+
if (!a[0])
|
|
86
|
+
return e.s = i, e.c = [e.e = 0], e;
|
|
87
|
+
var o, u, c, v, s, f = r.slice(), m = o = r.length, d = a.length, p = a.slice(0, o), g = p.length, h = e, z = h.c = [], b = 0, P = l + (h.e = t.e - e.e) + 1;
|
|
88
|
+
for (h.s = i, i = P < 0 ? 0 : P, f.unshift(0); g++ < o; ) p.push(0);
|
|
89
89
|
do {
|
|
90
90
|
for (c = 0; c < 10; c++) {
|
|
91
|
-
if (
|
|
92
|
-
|
|
91
|
+
if (o != (g = p.length))
|
|
92
|
+
v = o > g ? 1 : -1;
|
|
93
93
|
else
|
|
94
|
-
for (
|
|
95
|
-
if (
|
|
96
|
-
|
|
94
|
+
for (s = -1, v = 0; ++s < o; )
|
|
95
|
+
if (r[s] != p[s]) {
|
|
96
|
+
v = r[s] > p[s] ? 1 : -1;
|
|
97
97
|
break;
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
100
|
-
for (
|
|
101
|
-
if (p[--
|
|
102
|
-
for (
|
|
103
|
-
--p[
|
|
99
|
+
if (v < 0) {
|
|
100
|
+
for (u = g == o ? r : f; g; ) {
|
|
101
|
+
if (p[--g] < u[g]) {
|
|
102
|
+
for (s = g; s && !p[--s]; ) p[s] = 9;
|
|
103
|
+
--p[s], p[g] += 10;
|
|
104
104
|
}
|
|
105
|
-
p[
|
|
105
|
+
p[g] -= u[g];
|
|
106
106
|
}
|
|
107
107
|
for (; !p[0]; ) p.shift();
|
|
108
108
|
} else
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
|
-
z[
|
|
112
|
-
} while ((
|
|
113
|
-
return !z[0] &&
|
|
111
|
+
z[b++] = v ? c : ++c, p[0] && v ? p[g] = a[m] || 0 : p = [a[m]];
|
|
112
|
+
} while ((m++ < d || p[0] !== N) && i--);
|
|
113
|
+
return !z[0] && b != 1 && (z.shift(), h.e--, P--), b > P && U(h, P, n.RM, p[0] !== N), h;
|
|
114
114
|
};
|
|
115
|
-
|
|
115
|
+
y.eq = function(e) {
|
|
116
116
|
return this.cmp(e) === 0;
|
|
117
117
|
};
|
|
118
|
-
|
|
118
|
+
y.gt = function(e) {
|
|
119
119
|
return this.cmp(e) > 0;
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
y.gte = function(e) {
|
|
122
122
|
return this.cmp(e) > -1;
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
y.lt = function(e) {
|
|
125
125
|
return this.cmp(e) < 0;
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
y.lte = function(e) {
|
|
128
128
|
return this.cmp(e) < 1;
|
|
129
129
|
};
|
|
130
|
-
|
|
131
|
-
var t, a, r,
|
|
132
|
-
if (
|
|
133
|
-
return e.s = -
|
|
134
|
-
var c =
|
|
135
|
-
if (!c[0] || !
|
|
136
|
-
return
|
|
137
|
-
if (
|
|
138
|
-
for ((
|
|
139
|
-
|
|
130
|
+
y.minus = y.sub = function(e) {
|
|
131
|
+
var t, n, a, r, i = this, l = i.constructor, o = i.s, u = (e = new l(e)).s;
|
|
132
|
+
if (o != u)
|
|
133
|
+
return e.s = -u, i.plus(e);
|
|
134
|
+
var c = i.c.slice(), v = i.e, s = e.c, f = e.e;
|
|
135
|
+
if (!c[0] || !s[0])
|
|
136
|
+
return s[0] ? e.s = -u : c[0] ? e = new l(i) : e.s = 1, e;
|
|
137
|
+
if (o = v - f) {
|
|
138
|
+
for ((r = o < 0) ? (o = -o, a = c) : (f = v, a = s), a.reverse(), u = o; u--; ) a.push(0);
|
|
139
|
+
a.reverse();
|
|
140
140
|
} else
|
|
141
|
-
for (
|
|
142
|
-
if (c[
|
|
143
|
-
|
|
141
|
+
for (n = ((r = c.length < s.length) ? c : s).length, o = u = 0; u < n; u++)
|
|
142
|
+
if (c[u] != s[u]) {
|
|
143
|
+
r = c[u] < s[u];
|
|
144
144
|
break;
|
|
145
145
|
}
|
|
146
|
-
if (
|
|
147
|
-
for (
|
|
148
|
-
if (c[--
|
|
149
|
-
for (t =
|
|
150
|
-
--c[t], c[
|
|
146
|
+
if (r && (a = c, c = s, s = a, e.s = -e.s), (u = (n = s.length) - (t = c.length)) > 0) for (; u--; ) c[t++] = 0;
|
|
147
|
+
for (u = t; n > o; ) {
|
|
148
|
+
if (c[--n] < s[n]) {
|
|
149
|
+
for (t = n; t && !c[--t]; ) c[t] = 9;
|
|
150
|
+
--c[t], c[n] += 10;
|
|
151
151
|
}
|
|
152
|
-
c[
|
|
152
|
+
c[n] -= s[n];
|
|
153
153
|
}
|
|
154
|
-
for (; c[--
|
|
154
|
+
for (; c[--u] === 0; ) c.pop();
|
|
155
155
|
for (; c[0] === 0; )
|
|
156
|
-
c.shift(), --
|
|
157
|
-
return c[0] || (e.s = 1, c = [
|
|
156
|
+
c.shift(), --f;
|
|
157
|
+
return c[0] || (e.s = 1, c = [f = 0]), e.c = c, e.e = f, e;
|
|
158
158
|
};
|
|
159
|
-
|
|
160
|
-
var t,
|
|
159
|
+
y.mod = function(e) {
|
|
160
|
+
var t, n = this, a = n.constructor, r = n.s, i = (e = new a(e)).s;
|
|
161
161
|
if (!e.c[0])
|
|
162
162
|
throw Error(Ne);
|
|
163
|
-
return
|
|
163
|
+
return n.s = e.s = 1, t = e.cmp(n) == 1, n.s = r, e.s = i, t ? new a(n) : (r = a.DP, i = a.RM, a.DP = a.RM = 0, n = n.div(e), a.DP = r, a.RM = i, this.minus(n.times(e)));
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
y.neg = function() {
|
|
166
166
|
var e = new this.constructor(this);
|
|
167
167
|
return e.s = -e.s, e;
|
|
168
168
|
};
|
|
169
|
-
|
|
170
|
-
var t, a, r
|
|
171
|
-
if (e = new
|
|
172
|
-
return e.s = -e.s,
|
|
173
|
-
var
|
|
174
|
-
if (!
|
|
175
|
-
return c[0] || (
|
|
176
|
-
if (
|
|
177
|
-
for (t > 0 ? (
|
|
178
|
-
|
|
169
|
+
y.plus = y.add = function(e) {
|
|
170
|
+
var t, n, a, r = this, i = r.constructor;
|
|
171
|
+
if (e = new i(e), r.s != e.s)
|
|
172
|
+
return e.s = -e.s, r.minus(e);
|
|
173
|
+
var l = r.e, o = r.c, u = e.e, c = e.c;
|
|
174
|
+
if (!o[0] || !c[0])
|
|
175
|
+
return c[0] || (o[0] ? e = new i(r) : e.s = r.s), e;
|
|
176
|
+
if (o = o.slice(), t = l - u) {
|
|
177
|
+
for (t > 0 ? (u = l, a = c) : (t = -t, a = o), a.reverse(); t--; ) a.push(0);
|
|
178
|
+
a.reverse();
|
|
179
179
|
}
|
|
180
|
-
for (
|
|
181
|
-
for (
|
|
182
|
-
return e.c =
|
|
180
|
+
for (o.length - c.length < 0 && (a = c, c = o, o = a), t = c.length, n = 0; t; o[t] %= 10) n = (o[--t] = o[t] + c[t] + n) / 10 | 0;
|
|
181
|
+
for (n && (o.unshift(n), ++u), t = o.length; o[--t] === 0; ) o.pop();
|
|
182
|
+
return e.c = o, e.e = u, e;
|
|
183
183
|
};
|
|
184
|
-
|
|
185
|
-
var t = this,
|
|
184
|
+
y.pow = function(e) {
|
|
185
|
+
var t = this, n = new t.constructor("1"), a = n, r = e < 0;
|
|
186
186
|
if (e !== ~~e || e < -1e6 || e > Qe)
|
|
187
187
|
throw Error(W + "exponent");
|
|
188
|
-
for (
|
|
188
|
+
for (r && (e = -e); e & 1 && (a = a.times(t)), e >>= 1, !!e; )
|
|
189
189
|
t = t.times(t);
|
|
190
|
-
return
|
|
190
|
+
return r ? n.div(a) : a;
|
|
191
191
|
};
|
|
192
|
-
|
|
192
|
+
y.prec = function(e, t) {
|
|
193
193
|
if (e !== ~~e || e < 1 || e > J)
|
|
194
194
|
throw Error(W + "precision");
|
|
195
195
|
return U(new this.constructor(this), e, t);
|
|
196
196
|
};
|
|
197
|
-
|
|
197
|
+
y.round = function(e, t) {
|
|
198
198
|
if (e === N) e = 0;
|
|
199
199
|
else if (e !== ~~e || e < -1e6 || e > J)
|
|
200
|
-
throw Error(
|
|
200
|
+
throw Error(pe);
|
|
201
201
|
return U(new this.constructor(this), e + this.e + 1, t);
|
|
202
202
|
};
|
|
203
|
-
|
|
204
|
-
var e, t,
|
|
205
|
-
if (!
|
|
206
|
-
if (
|
|
203
|
+
y.sqrt = function() {
|
|
204
|
+
var e, t, n, a = this, r = a.constructor, i = a.s, l = a.e, o = new r("0.5");
|
|
205
|
+
if (!a.c[0]) return new r(a);
|
|
206
|
+
if (i < 0)
|
|
207
207
|
throw Error(ne + "No square root");
|
|
208
|
-
|
|
208
|
+
i = Math.sqrt(a + ""), i === 0 || i === 1 / 0 ? (t = a.c.join(""), t.length + l & 1 || (t += "0"), i = Math.sqrt(t), l = ((l + 1) / 2 | 0) - (l < 0 || l & 1), e = new r((i == 1 / 0 ? "5e" : (i = i.toExponential()).slice(0, i.indexOf("e") + 1)) + l)) : e = new r(i + ""), l = e.e + (r.DP += 4);
|
|
209
209
|
do
|
|
210
|
-
|
|
211
|
-
while (
|
|
212
|
-
return U(e, (
|
|
210
|
+
n = e, e = o.times(n.plus(a.div(n)));
|
|
211
|
+
while (n.c.slice(0, l).join("") !== e.c.slice(0, l).join(""));
|
|
212
|
+
return U(e, (r.DP -= 4) + e.e + 1, r.RM);
|
|
213
213
|
};
|
|
214
|
-
|
|
215
|
-
var t,
|
|
216
|
-
if (e.s =
|
|
214
|
+
y.times = y.mul = function(e) {
|
|
215
|
+
var t, n = this, a = n.constructor, r = n.c, i = (e = new a(e)).c, l = r.length, o = i.length, u = n.e, c = e.e;
|
|
216
|
+
if (e.s = n.s == e.s ? 1 : -1, !r[0] || !i[0])
|
|
217
217
|
return e.c = [e.e = 0], e;
|
|
218
|
-
for (e.e =
|
|
219
|
-
for (
|
|
220
|
-
for (
|
|
221
|
-
|
|
222
|
-
t[c] =
|
|
218
|
+
for (e.e = u + c, l < o && (t = r, r = i, i = t, c = l, l = o, o = c), t = new Array(c = l + o); c--; ) t[c] = 0;
|
|
219
|
+
for (u = o; u--; ) {
|
|
220
|
+
for (o = 0, c = l + u; c > u; )
|
|
221
|
+
o = t[c] + i[u] * r[c - u - 1] + o, t[c--] = o % 10, o = o / 10 | 0;
|
|
222
|
+
t[c] = o;
|
|
223
223
|
}
|
|
224
|
-
for (
|
|
224
|
+
for (o ? ++e.e : t.shift(), u = t.length; !t[--u]; ) t.pop();
|
|
225
225
|
return e.c = t, e;
|
|
226
226
|
};
|
|
227
|
-
|
|
228
|
-
var
|
|
227
|
+
y.toExponential = function(e, t) {
|
|
228
|
+
var n = this, a = n.c[0];
|
|
229
229
|
if (e !== N) {
|
|
230
230
|
if (e !== ~~e || e < 0 || e > J)
|
|
231
|
-
throw Error(
|
|
232
|
-
for (
|
|
231
|
+
throw Error(pe);
|
|
232
|
+
for (n = U(new n.constructor(n), ++e, t); n.c.length < e; ) n.c.push(0);
|
|
233
233
|
}
|
|
234
|
-
return Q(
|
|
234
|
+
return Q(n, !0, !!a);
|
|
235
235
|
};
|
|
236
|
-
|
|
237
|
-
var
|
|
236
|
+
y.toFixed = function(e, t) {
|
|
237
|
+
var n = this, a = n.c[0];
|
|
238
238
|
if (e !== N) {
|
|
239
239
|
if (e !== ~~e || e < 0 || e > J)
|
|
240
|
-
throw Error(
|
|
241
|
-
for (
|
|
240
|
+
throw Error(pe);
|
|
241
|
+
for (n = U(new n.constructor(n), e + n.e + 1, t), e = e + n.e + 1; n.c.length < e; ) n.c.push(0);
|
|
242
242
|
}
|
|
243
|
-
return Q(
|
|
243
|
+
return Q(n, !1, !!a);
|
|
244
244
|
};
|
|
245
|
-
|
|
245
|
+
y[Symbol.for("nodejs.util.inspect.custom")] = y.toJSON = y.toString = function() {
|
|
246
246
|
var e = this, t = e.constructor;
|
|
247
247
|
return Q(e, e.e <= t.NE || e.e >= t.PE, !!e.c[0]);
|
|
248
248
|
};
|
|
249
|
-
|
|
249
|
+
y.toNumber = function() {
|
|
250
250
|
var e = Number(Q(this, !0, !0));
|
|
251
251
|
if (this.constructor.strict === !0 && !this.eq(e.toString()))
|
|
252
252
|
throw Error(ne + "Imprecise conversion");
|
|
253
253
|
return e;
|
|
254
254
|
};
|
|
255
|
-
|
|
256
|
-
var
|
|
255
|
+
y.toPrecision = function(e, t) {
|
|
256
|
+
var n = this, a = n.constructor, r = n.c[0];
|
|
257
257
|
if (e !== N) {
|
|
258
258
|
if (e !== ~~e || e < 1 || e > J)
|
|
259
259
|
throw Error(W + "precision");
|
|
260
|
-
for (
|
|
260
|
+
for (n = U(new a(n), e, t); n.c.length < e; ) n.c.push(0);
|
|
261
261
|
}
|
|
262
|
-
return Q(
|
|
262
|
+
return Q(n, e <= n.e || n.e <= a.NE || n.e >= a.PE, !!r);
|
|
263
263
|
};
|
|
264
|
-
|
|
264
|
+
y.valueOf = function() {
|
|
265
265
|
var e = this, t = e.constructor;
|
|
266
266
|
if (t.strict === !0)
|
|
267
267
|
throw Error(ne + "valueOf disallowed");
|
|
268
268
|
return Q(e, e.e <= t.NE || e.e >= t.PE, !0);
|
|
269
269
|
};
|
|
270
|
-
var
|
|
270
|
+
var I = Oe();
|
|
271
271
|
function rt(e, t) {
|
|
272
|
-
e.forEach((
|
|
272
|
+
e.forEach((n) => {
|
|
273
273
|
try {
|
|
274
|
-
t(
|
|
275
|
-
} catch (
|
|
276
|
-
console.error(
|
|
274
|
+
t(n);
|
|
275
|
+
} catch (a) {
|
|
276
|
+
console.error(a);
|
|
277
277
|
}
|
|
278
278
|
});
|
|
279
279
|
}
|
|
@@ -281,14 +281,14 @@ let _ = 0;
|
|
|
281
281
|
function lt() {
|
|
282
282
|
let e = /* @__PURE__ */ new Set(), t = e;
|
|
283
283
|
return {
|
|
284
|
-
add(
|
|
285
|
-
_ += t == e && !e.has(
|
|
284
|
+
add(n) {
|
|
285
|
+
_ += t == e && !e.has(n) ? 1 : 0, e.add(n);
|
|
286
286
|
},
|
|
287
|
-
delete(
|
|
288
|
-
return _ -= t == e && e.has(
|
|
287
|
+
delete(n) {
|
|
288
|
+
return _ -= t == e && e.has(n) ? 1 : 0, e.delete(n);
|
|
289
289
|
},
|
|
290
|
-
flush(
|
|
291
|
-
t.size && (e = /* @__PURE__ */ new Set(), _ -= t.size, rt(t, (
|
|
290
|
+
flush(n) {
|
|
291
|
+
t.size && (e = /* @__PURE__ */ new Set(), _ -= t.size, rt(t, (a) => a(n) && e.add(a)), _ += e.size, t = e);
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
}
|
|
@@ -296,39 +296,39 @@ const He = lt(), $e = typeof window < "u" ? window.requestAnimationFrame : () =>
|
|
|
296
296
|
}, ae = (e) => it(e, He);
|
|
297
297
|
ae.now = typeof performance < "u" ? () => performance.now() : Date.now;
|
|
298
298
|
ae.batchedUpdates = (e) => e();
|
|
299
|
-
let
|
|
299
|
+
let F = -1;
|
|
300
300
|
function it(e, t) {
|
|
301
301
|
t.add(e), ot();
|
|
302
302
|
}
|
|
303
303
|
function ot() {
|
|
304
|
-
|
|
304
|
+
F < 0 && (F = 0, $e(Le));
|
|
305
305
|
}
|
|
306
306
|
function st() {
|
|
307
|
-
|
|
307
|
+
F = -1;
|
|
308
308
|
}
|
|
309
309
|
function Le() {
|
|
310
|
-
~
|
|
310
|
+
~F && ($e(Le), ae.batchedUpdates(ut));
|
|
311
311
|
}
|
|
312
312
|
function ut() {
|
|
313
|
-
const e =
|
|
314
|
-
if (
|
|
313
|
+
const e = F;
|
|
314
|
+
if (F = ae.now(), !_) {
|
|
315
315
|
st();
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
-
He.flush(e ? Math.min(64,
|
|
318
|
+
He.flush(e ? Math.min(64, F - e) : 16.667);
|
|
319
319
|
}
|
|
320
|
-
const
|
|
320
|
+
const Ve = 50;
|
|
321
321
|
function ct(e) {
|
|
322
|
-
return { type: "percent", value: new
|
|
322
|
+
return { type: "percent", value: new I(e) };
|
|
323
323
|
}
|
|
324
324
|
function $(e) {
|
|
325
|
-
return { type: "pixel", value: new
|
|
325
|
+
return { type: "pixel", value: new I(e) };
|
|
326
326
|
}
|
|
327
327
|
function dt(e) {
|
|
328
|
-
let t =
|
|
329
|
-
return e.collapseAnimation && (typeof e.collapseAnimation == "string" ? t =
|
|
328
|
+
let t = ge.linear, n = 300;
|
|
329
|
+
return e.collapseAnimation && (typeof e.collapseAnimation == "string" ? t = ge[e.collapseAnimation] : (n = e.collapseAnimation.duration, t = typeof e.collapseAnimation.easing == "function" ? e.collapseAnimation.easing : ge[e.collapseAnimation.easing])), { ease: t, duration: n };
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const ge = {
|
|
332
332
|
"ease-in-out": function(t) {
|
|
333
333
|
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
|
|
334
334
|
},
|
|
@@ -339,14 +339,14 @@ const he = {
|
|
|
339
339
|
return +t;
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
function
|
|
342
|
+
function Re(e) {
|
|
343
343
|
return e.orientation === "horizontal" ? e.dragOvershoot.gt(0) ? "w-resize" : e.dragOvershoot.lt(0) ? "e-resize" : "ew-resize" : e.dragOvershoot.gt(0) ? "n-resize" : e.dragOvershoot.lt(0) ? "s-resize" : "ns-resize";
|
|
344
344
|
}
|
|
345
345
|
function ft(e) {
|
|
346
346
|
if ("context" in e && (e = e.context), "items" in e) {
|
|
347
|
-
e.dragOvershoot = new
|
|
347
|
+
e.dragOvershoot = new I(e.dragOvershoot || 0);
|
|
348
348
|
for (const t of e.items)
|
|
349
|
-
|
|
349
|
+
S(t) ? (t.currentValue.value = new I(t.currentValue.value), t.collapsedSize.value = new I(t.collapsedSize.value), t.min.value = new I(t.min.value), t.default && (t.default.value = new I(t.default.value)), t.max && t.max !== "1fr" && (t.max.value = new I(t.max.value))) : t.size.value = new I(t.size.value);
|
|
350
350
|
return e;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
@@ -357,38 +357,38 @@ function j(e, t) {
|
|
|
357
357
|
function Z(e, t) {
|
|
358
358
|
j(t.includes(e.type), `Invalid event type: ${t}. Expected: ${t.join(" | ")}`);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function S(e) {
|
|
361
361
|
return !!(e && typeof e == "object" && "type" in e && e.type === "panel");
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function D(e) {
|
|
364
364
|
return !!(e && typeof e == "object" && "type" in e && e.type === "handle");
|
|
365
365
|
}
|
|
366
366
|
function pt(e) {
|
|
367
367
|
const t = () => {
|
|
368
|
-
let
|
|
369
|
-
return (
|
|
370
|
-
var
|
|
371
|
-
if (!
|
|
372
|
-
|
|
368
|
+
let a = null;
|
|
369
|
+
return (r) => {
|
|
370
|
+
var i, l;
|
|
371
|
+
if (!a || a.pixel === r.pixel && a.percentage === r.percentage) {
|
|
372
|
+
a = r;
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
|
-
|
|
375
|
+
a = r, (l = (i = e.onResize) == null ? void 0 : i.current) == null || l.call(i, r);
|
|
376
376
|
};
|
|
377
377
|
};
|
|
378
378
|
return { ...{
|
|
379
379
|
type: "panel",
|
|
380
|
-
min:
|
|
381
|
-
max: e.max ?
|
|
380
|
+
min: T(e.min || "0px"),
|
|
381
|
+
max: e.max ? T(e.max) : "1fr",
|
|
382
382
|
collapsed: e.collapsible ? e.collapsed ?? e.defaultCollapsed ?? !1 : void 0,
|
|
383
383
|
collapsible: e.collapsible,
|
|
384
|
-
collapsedSize:
|
|
384
|
+
collapsedSize: T(e.collapsedSize ?? "0px"),
|
|
385
385
|
onCollapseChange: e.onCollapseChange,
|
|
386
386
|
onResize: { current: t() },
|
|
387
387
|
collapseIsControlled: typeof e.collapsed < "u",
|
|
388
388
|
sizeBeforeCollapse: void 0,
|
|
389
389
|
id: e.id,
|
|
390
390
|
collapseAnimation: e.collapseAnimation,
|
|
391
|
-
default: e.default ?
|
|
391
|
+
default: e.default ? T(e.default) : void 0,
|
|
392
392
|
isStaticAtRest: e.isStaticAtRest
|
|
393
393
|
}, currentValue: $(-1) };
|
|
394
394
|
}
|
|
@@ -405,280 +405,280 @@ function gt(e) {
|
|
|
405
405
|
return {
|
|
406
406
|
type: "handle",
|
|
407
407
|
...e,
|
|
408
|
-
size: typeof e.size == "string" ?
|
|
408
|
+
size: typeof e.size == "string" ? T(e.size) : e.size
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function T(e) {
|
|
412
412
|
if (e === "1fr" && (e = "100%"), e.endsWith("px"))
|
|
413
413
|
return $(parseFloat(e));
|
|
414
414
|
if (e.endsWith("%"))
|
|
415
415
|
return ct(parseFloat(e) / 100);
|
|
416
416
|
throw new Error(`Invalid unit: ${e}`);
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function G(e, t) {
|
|
419
419
|
return t.type === "pixel" ? e === 0 ? 0 : t.value.div(e).toNumber() : t.value.toNumber();
|
|
420
420
|
}
|
|
421
421
|
function V(e) {
|
|
422
422
|
return e.orientation === "horizontal" ? e.size.width : e.size.height;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
425
|
-
const
|
|
426
|
-
return
|
|
424
|
+
function A(e, t) {
|
|
425
|
+
const n = t === "1fr" ? T(t) : t;
|
|
426
|
+
return n.type === "pixel" ? n.value : n.value.mul(V(e));
|
|
427
427
|
}
|
|
428
|
-
function O(e, t,
|
|
429
|
-
const
|
|
430
|
-
return
|
|
428
|
+
function O(e, t, n) {
|
|
429
|
+
const a = A(e, t.min), r = A(e, t.max);
|
|
430
|
+
return n.gte(a) && n.lte(r) ? n : n.lt(a) ? a : r;
|
|
431
431
|
}
|
|
432
432
|
function B(e, t) {
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
435
|
-
return
|
|
433
|
+
const n = e.items.find((a) => a.id === t);
|
|
434
|
+
if (n && S(n))
|
|
435
|
+
return n;
|
|
436
436
|
throw new Error(`Expected panel with id: ${t}`);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
const
|
|
440
|
-
if (
|
|
441
|
-
return
|
|
438
|
+
function Ae(e, t) {
|
|
439
|
+
const n = e.items.findIndex((a) => a.id === t);
|
|
440
|
+
if (n !== -1 && D(e.items[n]))
|
|
441
|
+
return n;
|
|
442
442
|
throw new Error(`Expected panel handle with id: ${t}`);
|
|
443
443
|
}
|
|
444
444
|
function vt(e, t) {
|
|
445
445
|
if (!e.items.length)
|
|
446
446
|
throw new Error("No items in group");
|
|
447
|
-
const
|
|
448
|
-
if (
|
|
447
|
+
const n = Ae(e, t), a = e.items[n - 1], r = e.items[n + 1];
|
|
448
|
+
if (a && S(a) && a.collapsible)
|
|
449
|
+
return a;
|
|
450
|
+
if (r && S(r) && r.collapsible)
|
|
449
451
|
return r;
|
|
450
|
-
if (l && P(l) && l.collapsible)
|
|
451
|
-
return l;
|
|
452
452
|
throw new Error(`No collapsible panel found for handle: ${t}`);
|
|
453
453
|
}
|
|
454
454
|
function ce(e, t) {
|
|
455
|
-
const
|
|
455
|
+
const n = e.items.findIndex((r) => r.id === t);
|
|
456
456
|
if (e.activeDragHandleId) {
|
|
457
|
-
const
|
|
458
|
-
if (
|
|
457
|
+
const r = Ae(e, e.activeDragHandleId), i = e.items[r];
|
|
458
|
+
if (i && D(i))
|
|
459
459
|
return {
|
|
460
|
-
item:
|
|
461
|
-
direction:
|
|
460
|
+
item: i,
|
|
461
|
+
direction: r > n ? 1 : -1
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
j(
|
|
465
|
-
let
|
|
466
|
-
if (
|
|
467
|
-
return { item:
|
|
468
|
-
if (
|
|
469
|
-
return { item:
|
|
464
|
+
j(n !== -1, `Expected panel before: ${t}`);
|
|
465
|
+
let a = e.items[n + 1];
|
|
466
|
+
if (a && D(a))
|
|
467
|
+
return { item: a, direction: 1 };
|
|
468
|
+
if (a = e.items[n - 1], a && D(a))
|
|
469
|
+
return { item: a, direction: -1 };
|
|
470
470
|
throw new Error(`Cant find handle for panel: ${t}`);
|
|
471
471
|
}
|
|
472
472
|
function Me(e, t) {
|
|
473
|
-
const
|
|
474
|
-
j(
|
|
475
|
-
let
|
|
476
|
-
return
|
|
473
|
+
const n = e.items.findIndex((r) => r.id === t);
|
|
474
|
+
j(n !== -1, `Expected panel before: ${t}`);
|
|
475
|
+
let a = e.items[n + 1];
|
|
476
|
+
return a && D(a) && te(e, e.items, n + 1, 1, "add") ? { item: a, direction: 1 } : (a = e.items[n - 1], a && D(a) && te(e, e.items, n - 1, -1, "add") ? { item: a, direction: -1 } : ce(e, t));
|
|
477
477
|
}
|
|
478
478
|
function qe(e) {
|
|
479
|
-
const t = {},
|
|
480
|
-
let
|
|
481
|
-
for (const
|
|
482
|
-
if (
|
|
483
|
-
for (;
|
|
484
|
-
|
|
485
|
-
t[
|
|
479
|
+
const t = {}, n = e.map((l) => l.order).filter((l) => l !== void 0);
|
|
480
|
+
let a = 0;
|
|
481
|
+
for (const l of e)
|
|
482
|
+
if (l.order === void 0) {
|
|
483
|
+
for (; n.includes(a) || Object.values(t).includes(a); )
|
|
484
|
+
a++;
|
|
485
|
+
t[l.id] = a;
|
|
486
486
|
}
|
|
487
|
-
const
|
|
488
|
-
for (const
|
|
489
|
-
|
|
490
|
-
return
|
|
491
|
-
}
|
|
492
|
-
function wt(e, t,
|
|
493
|
-
return j(t.currentValue.type === "pixel", `panelHasSpace only works with number values: ${t.id} ${t.currentValue}`), t.collapsible ? !t.collapsed :
|
|
494
|
-
}
|
|
495
|
-
function te(e, t, a, r,
|
|
496
|
-
const
|
|
497
|
-
for (const
|
|
498
|
-
if (!
|
|
487
|
+
const r = e.filter((l) => l.order === void 0), i = e.filter((l) => l.order !== void 0).sort((l, o) => l.order - o.order);
|
|
488
|
+
for (const l of i)
|
|
489
|
+
r.splice(l.order, 0, l);
|
|
490
|
+
return r;
|
|
491
|
+
}
|
|
492
|
+
function wt(e, t, n) {
|
|
493
|
+
return j(t.currentValue.type === "pixel", `panelHasSpace only works with number values: ${t.id} ${t.currentValue}`), t.collapsible ? !t.collapsed : n === "add" ? t.currentValue.value.gte(A(e, t.min)) && t.currentValue.value.lt(A(e, t.max)) : t.currentValue.value.gt(A(e, t.min));
|
|
494
|
+
}
|
|
495
|
+
function te(e, t, n, a, r, i) {
|
|
496
|
+
const l = a === -1 ? t.slice(0, n + 1).reverse() : t.slice(n);
|
|
497
|
+
for (const o of l) {
|
|
498
|
+
if (!S(o))
|
|
499
499
|
continue;
|
|
500
|
-
const
|
|
501
|
-
if (wt(e,
|
|
502
|
-
return
|
|
500
|
+
const u = i ? we(e, o) : o;
|
|
501
|
+
if (wt(e, u, r))
|
|
502
|
+
return o;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
let t = new
|
|
507
|
-
for (const
|
|
508
|
-
|
|
505
|
+
function me(e) {
|
|
506
|
+
let t = new I(0);
|
|
507
|
+
for (const n of e.items)
|
|
508
|
+
D(n) ? t = t.add(n.size.value) : (n.collapsed && n.currentValue.type === "pixel" || n.isStaticAtRest) && (t = t.add(n.currentValue.value));
|
|
509
509
|
return t;
|
|
510
510
|
}
|
|
511
511
|
function k(e) {
|
|
512
512
|
return e.type === "pixel" ? `${e.value.toNumber()}px` : `${e.value.mul(100).toNumber()}%`;
|
|
513
513
|
}
|
|
514
514
|
function zt(e) {
|
|
515
|
-
return
|
|
515
|
+
return K(e).map((t) => S(t) ? t.currentValue.value.toNumber() : A(e, t.size).toNumber());
|
|
516
516
|
}
|
|
517
517
|
function bt(e, t) {
|
|
518
|
-
return B({ ...e, items:
|
|
518
|
+
return B({ ...e, items: K(e) }, t).currentValue.value.toNumber();
|
|
519
519
|
}
|
|
520
520
|
function It(e) {
|
|
521
|
-
return
|
|
521
|
+
return xe({
|
|
522
522
|
...e,
|
|
523
|
-
items:
|
|
524
|
-
}).map((
|
|
523
|
+
items: K(e)
|
|
524
|
+
}).map((n) => D(n) ? G(V(e), n.size) : G(V(e), n.currentValue));
|
|
525
525
|
}
|
|
526
526
|
function yt(e, t) {
|
|
527
|
-
const
|
|
528
|
-
return
|
|
529
|
-
}
|
|
530
|
-
function
|
|
531
|
-
const t =
|
|
532
|
-
let
|
|
533
|
-
return e.items.map((
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
537
|
-
if (
|
|
538
|
-
const
|
|
539
|
-
return `clamp(${
|
|
527
|
+
const n = K(e), a = B({ ...e, items: n }, t);
|
|
528
|
+
return G(V(e), a.currentValue);
|
|
529
|
+
}
|
|
530
|
+
function de(e) {
|
|
531
|
+
const t = me(e);
|
|
532
|
+
let n = !1;
|
|
533
|
+
return e.items.map((a) => {
|
|
534
|
+
if (a.type === "panel") {
|
|
535
|
+
const r = k(a.min);
|
|
536
|
+
if (a.currentValue.type === "pixel" && a.currentValue.value.toNumber() !== -1) {
|
|
537
|
+
if (a.isStaticAtRest) {
|
|
538
|
+
const i = a.max === "1fr" ? "100%" : k(a.max);
|
|
539
|
+
return `clamp(${r}, ${k(a.currentValue)}, ${i})`;
|
|
540
540
|
}
|
|
541
|
-
return k(
|
|
542
|
-
} else if (
|
|
543
|
-
if (!
|
|
544
|
-
return
|
|
545
|
-
const
|
|
546
|
-
return `minmax(${
|
|
541
|
+
return k(a.currentValue);
|
|
542
|
+
} else if (a.currentValue.type === "percent") {
|
|
543
|
+
if (!n && (a.max === "1fr" || a.max.type === "percent" && a.max.value.eq(100)))
|
|
544
|
+
return n = !0, `minmax(${r}, 1fr)`;
|
|
545
|
+
const i = a.max === "1fr" ? "100%" : k(a.max);
|
|
546
|
+
return `minmax(${r}, min(calc(${a.currentValue.value} * (100% - ${t}px)), ${i}))`;
|
|
547
547
|
} else {
|
|
548
|
-
if (
|
|
549
|
-
return k(
|
|
550
|
-
if (
|
|
551
|
-
if (e.items.some((
|
|
552
|
-
return k(
|
|
553
|
-
const
|
|
554
|
-
return `minmax(${k(
|
|
548
|
+
if (a.collapsible && a.collapsed)
|
|
549
|
+
return k(a.collapsedSize);
|
|
550
|
+
if (a.default) {
|
|
551
|
+
if (e.items.some((o) => S(o) && o.id !== a.id && !o.collapsed && (o.max === "1fr" || o.max.type === "percent" && o.max.value.eq(100))))
|
|
552
|
+
return k(a.default);
|
|
553
|
+
const l = a.max === "1fr" ? "1fr" : k(a.max);
|
|
554
|
+
return `minmax(${k(a.default)}, ${l})`;
|
|
555
555
|
} else {
|
|
556
|
-
const
|
|
557
|
-
return `minmax(${
|
|
556
|
+
const i = a.max === "1fr" ? "1fr" : k(a.max);
|
|
557
|
+
return `minmax(${r}, ${i})`;
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
return k(
|
|
561
|
+
return k(a.size);
|
|
562
562
|
}).join(" ");
|
|
563
563
|
}
|
|
564
|
-
function ge(e, t) {
|
|
565
|
-
const a = e.findIndex((l) => l.id === t.id || typeof l.order == "number" && l.order === t.order);
|
|
566
|
-
let r = e;
|
|
567
|
-
return a !== -1 && (r = e.filter((l, n) => n !== a)), qe([...r, t]);
|
|
568
|
-
}
|
|
569
564
|
function ve(e, t) {
|
|
565
|
+
const n = e.findIndex((r) => r.id === t.id || typeof r.order == "number" && r.order === t.order);
|
|
566
|
+
let a = e;
|
|
567
|
+
return n !== -1 && (a = e.filter((r, i) => i !== n)), qe([...a, t]);
|
|
568
|
+
}
|
|
569
|
+
function we(e, t) {
|
|
570
570
|
return {
|
|
571
571
|
...t,
|
|
572
572
|
min: $(-1e5),
|
|
573
573
|
max: $(1e5)
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
const t =
|
|
578
|
-
for (const
|
|
579
|
-
if (!
|
|
580
|
-
|
|
576
|
+
function K(e) {
|
|
577
|
+
const t = me(e), n = [];
|
|
578
|
+
for (const a of e.items) {
|
|
579
|
+
if (!a || !S(a)) {
|
|
580
|
+
n.push({ ...a });
|
|
581
581
|
continue;
|
|
582
582
|
}
|
|
583
|
-
if (
|
|
584
|
-
const
|
|
585
|
-
|
|
583
|
+
if (a.lastKnownSize) {
|
|
584
|
+
const i = $(e.orientation === "horizontal" ? a.lastKnownSize.width : a.lastKnownSize.height);
|
|
585
|
+
n.push({ ...a, currentValue: i });
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
|
-
if (
|
|
589
|
-
|
|
588
|
+
if (a.currentValue.type === "pixel") {
|
|
589
|
+
n.push({ ...a });
|
|
590
590
|
continue;
|
|
591
591
|
}
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
...
|
|
595
|
-
currentValue: $(
|
|
592
|
+
const r = new I(V(e)).minus(t).mul(a.currentValue.value);
|
|
593
|
+
n.push({
|
|
594
|
+
...a,
|
|
595
|
+
currentValue: $(r.toNumber())
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
return
|
|
598
|
+
return n;
|
|
599
599
|
}
|
|
600
600
|
function oe(e, t) {
|
|
601
|
-
var
|
|
602
|
-
const
|
|
603
|
-
let
|
|
604
|
-
if (t.value.shiftKey && (
|
|
601
|
+
var R, E, L, M;
|
|
602
|
+
const n = Ae(e, t.handleId), a = e.items[n], i = e.items.some((w) => S(w) && w.currentValue.type !== "pixel") ? K(e) : [...e.items];
|
|
603
|
+
let l = e.orientation === "horizontal" ? t.value.deltaX : t.value.deltaY;
|
|
604
|
+
if (t.value.shiftKey && (l *= e.shiftAmount ?? 15), l === 0)
|
|
605
605
|
return {};
|
|
606
|
-
const
|
|
607
|
-
if (!
|
|
606
|
+
const o = l / Math.abs(l), u = te(e, i, n + o, o, "subtract", t.disregardCollapseBuffer);
|
|
607
|
+
if (!u)
|
|
608
608
|
return {
|
|
609
|
-
dragOvershoot: e.dragOvershoot.add(
|
|
609
|
+
dragOvershoot: e.dragOvershoot.add(l)
|
|
610
610
|
};
|
|
611
|
-
j(
|
|
611
|
+
j(S(u), `Expected panel before: ${a.id}`);
|
|
612
612
|
const c = t.type === "collapsePanel" && // If we have the panel id just use that
|
|
613
|
-
(
|
|
614
|
-
te(e,
|
|
615
|
-
if (j(c &&
|
|
613
|
+
(i.find((w) => w.id === t.panelId && u.id !== t.panelId) || // otherwise fallback to the next panel with space
|
|
614
|
+
te(e, i, n - o, o * -1, "add", t.disregardCollapseBuffer)) || i[n - o];
|
|
615
|
+
if (j(c && S(c), `Expected panel after: ${a.id}`), c.currentValue.value.eq(A(e, c.max)))
|
|
616
616
|
return {
|
|
617
|
-
dragOvershoot: e.dragOvershoot.add(
|
|
617
|
+
dragOvershoot: e.dragOvershoot.add(l)
|
|
618
618
|
};
|
|
619
|
-
const
|
|
619
|
+
const v = e.dragOvershoot.add(l);
|
|
620
620
|
if (!t.disregardCollapseBuffer && !t.controlled) {
|
|
621
|
-
const w =
|
|
622
|
-
!c.currentValue.value.add(
|
|
623
|
-
if (le.lte(
|
|
624
|
-
return { dragOvershoot:
|
|
621
|
+
const w = v.lt(0) && o > 0, C = v.gt(0) && o > 0, q = v.gt(0) && o < 0, re = v.lt(0) && o < 0, le = c.currentValue.value.add(new I(v).mul(q ? o : 1)), Fe = A(e, c.min), je = v.abs().lt(Ve) && // Let the panel expand at it's min size
|
|
622
|
+
!c.currentValue.value.add(v.abs()).gte(c.min.value) && c.collapsible && c.collapsed && (C || re);
|
|
623
|
+
if (le.lte(Fe) && (v.eq(0) || q || w || je))
|
|
624
|
+
return { dragOvershoot: v };
|
|
625
625
|
}
|
|
626
|
-
if (!t.disregardCollapseBuffer && !t.controlled &&
|
|
627
|
-
const w =
|
|
628
|
-
if (
|
|
629
|
-
return { dragOvershoot:
|
|
626
|
+
if (!t.disregardCollapseBuffer && !t.controlled && u.collapsible && u.currentValue.value.eq(A(e, u.min))) {
|
|
627
|
+
const w = u.currentValue.value.sub(v.abs());
|
|
628
|
+
if (v.abs().lt(Ve) && w.gt(A(e, u.collapsedSize)))
|
|
629
|
+
return { dragOvershoot: v };
|
|
630
630
|
}
|
|
631
|
-
const
|
|
632
|
-
let
|
|
633
|
-
const p =
|
|
634
|
-
let
|
|
631
|
+
const s = we(e, u), f = u.currentValue.value, m = u.currentValue.value.minus(new I(l).mul(o));
|
|
632
|
+
let d = t.disregardCollapseBuffer ? O(e, s, m) : O(e, u, m);
|
|
633
|
+
const p = we(e, c), g = c.currentValue.value, h = f.minus(d), z = c.currentValue.value.add(h);
|
|
634
|
+
let b = t.disregardCollapseBuffer ? O(e, p, z) : O(e, c, z);
|
|
635
635
|
if (t.disregardCollapseBuffer)
|
|
636
636
|
c.collapsible && c.collapsed && (c.collapsed = !1);
|
|
637
637
|
else if (c.collapsible && c.collapsed) {
|
|
638
|
-
if ((
|
|
639
|
-
return c.onCollapseChange.current(!1), { dragOvershoot:
|
|
638
|
+
if ((R = c.onCollapseChange) != null && R.current && c.collapseIsControlled && !t.controlled && !t.isVirtual)
|
|
639
|
+
return c.onCollapseChange.current(!1), { dragOvershoot: v };
|
|
640
640
|
const w = (
|
|
641
641
|
// Take the size it was at
|
|
642
|
-
|
|
642
|
+
A(e, c.collapsedSize).add(e.dragOvershoot.abs()).sub(b.add(Math.abs(l)))
|
|
643
643
|
);
|
|
644
|
-
if (w.gt(0) && (
|
|
645
|
-
return { dragOvershoot:
|
|
646
|
-
c.collapsed = !1, (
|
|
644
|
+
if (w.gt(0) && (b = b.add(w)), d = d.minus(b.minus(g).minus(Math.abs(l))), d.lt(u.min.value) && !u.collapsible)
|
|
645
|
+
return { dragOvershoot: v };
|
|
646
|
+
c.collapsed = !1, (E = c.onCollapseChange) != null && E.current && !c.collapseIsControlled && !t.controlled && !t.isVirtual && c.onCollapseChange.current(!1);
|
|
647
647
|
}
|
|
648
|
-
const
|
|
649
|
-
if (!t.disregardCollapseBuffer &&
|
|
650
|
-
if ((L =
|
|
651
|
-
return
|
|
652
|
-
|
|
648
|
+
const P = u.currentValue.value.eq(A(e, u.min));
|
|
649
|
+
if (!t.disregardCollapseBuffer && u.collapsible && P) {
|
|
650
|
+
if ((L = u.onCollapseChange) != null && L.current && u.collapseIsControlled && !t.controlled && !t.isVirtual)
|
|
651
|
+
return u.onCollapseChange.current(!0), { dragOvershoot: v };
|
|
652
|
+
u.collapsed = !0, d = A(e, u.collapsedSize), b = c.currentValue.value.add(f.minus(d)), (M = u.onCollapseChange) != null && M.current && !u.collapseIsControlled && !t.controlled && !t.isVirtual && u.onCollapseChange.current(!0);
|
|
653
653
|
}
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
return
|
|
654
|
+
u.currentValue = { type: "pixel", value: d }, c.currentValue = { type: "pixel", value: b };
|
|
655
|
+
const x = new I(V(e)).minus(i.reduce((w, C) => w.add(S(C) ? C.currentValue.value : C.size.value), new I(0)));
|
|
656
|
+
return x.eq(0) || (u.currentValue.value = O(e, u, u.currentValue.value.add(x))), { items: i };
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function xe(e) {
|
|
659
659
|
const t = [...e.items];
|
|
660
|
-
t.forEach((
|
|
661
|
-
|
|
662
|
-
...
|
|
663
|
-
currentValue:
|
|
660
|
+
t.forEach((a, r) => {
|
|
661
|
+
a.type === "panel" && a.collapsed && (t[r] = {
|
|
662
|
+
...a,
|
|
663
|
+
currentValue: a.collapsedSize
|
|
664
664
|
});
|
|
665
665
|
});
|
|
666
|
-
const
|
|
667
|
-
return t.forEach((
|
|
668
|
-
|
|
669
|
-
...
|
|
666
|
+
const n = me({ ...e, items: t });
|
|
667
|
+
return t.forEach((a, r) => {
|
|
668
|
+
a.type !== "panel" || a.collapsed || a.isStaticAtRest || (t[r] = {
|
|
669
|
+
...a,
|
|
670
670
|
currentValue: {
|
|
671
671
|
type: "percent",
|
|
672
|
-
value:
|
|
672
|
+
value: a.currentValue.value.div(new I(V(e)).sub(n))
|
|
673
673
|
}
|
|
674
674
|
});
|
|
675
675
|
}), t;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function ze({ delta: e, orientation: t = "horizontal", shiftKey: n = !1 }) {
|
|
678
678
|
return {
|
|
679
679
|
type: "move",
|
|
680
680
|
pointerType: "keyboard",
|
|
681
|
-
shiftKey:
|
|
681
|
+
shiftKey: n,
|
|
682
682
|
ctrlKey: !1,
|
|
683
683
|
altKey: !1,
|
|
684
684
|
metaKey: !1,
|
|
@@ -686,115 +686,115 @@ function we({ delta: e, orientation: t = "horizontal", shiftKey: a = !1 }) {
|
|
|
686
686
|
deltaY: t === "horizontal" ? 0 : e
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
let
|
|
691
|
-
for (let c = 0; c <
|
|
692
|
-
|
|
689
|
+
function fe({ context: e, handleId: t, delta: n, direction: a, controlled: r, disregardCollapseBuffer: i, isVirtual: l, panelId: o }) {
|
|
690
|
+
let u = e;
|
|
691
|
+
for (let c = 0; c < n.abs().toNumber(); c++)
|
|
692
|
+
u = oe({
|
|
693
693
|
...e,
|
|
694
|
-
...
|
|
694
|
+
...u
|
|
695
695
|
}, {
|
|
696
696
|
handleId: t,
|
|
697
697
|
type: "collapsePanel",
|
|
698
|
-
controlled:
|
|
699
|
-
disregardCollapseBuffer:
|
|
700
|
-
isVirtual:
|
|
701
|
-
panelId:
|
|
702
|
-
value:
|
|
703
|
-
delta:
|
|
698
|
+
controlled: r,
|
|
699
|
+
disregardCollapseBuffer: i,
|
|
700
|
+
isVirtual: l,
|
|
701
|
+
panelId: o,
|
|
702
|
+
value: ze({
|
|
703
|
+
delta: a,
|
|
704
704
|
orientation: e.orientation
|
|
705
705
|
})
|
|
706
706
|
});
|
|
707
|
-
return
|
|
708
|
-
}
|
|
709
|
-
function
|
|
710
|
-
let
|
|
711
|
-
for (;
|
|
712
|
-
const
|
|
713
|
-
if (!
|
|
714
|
-
if (
|
|
707
|
+
return u;
|
|
708
|
+
}
|
|
709
|
+
function be(e, t, n, a) {
|
|
710
|
+
let r = !1, i = 1, l = new I(a);
|
|
711
|
+
for (; l.toNumber() !== 0; ) {
|
|
712
|
+
const o = te(e, t, n + i, i, a.gt(0) ? "add" : "subtract");
|
|
713
|
+
if (!o) {
|
|
714
|
+
if (r)
|
|
715
715
|
break;
|
|
716
|
-
|
|
716
|
+
i = i === 1 ? -1 : 1, r = !0;
|
|
717
717
|
continue;
|
|
718
718
|
}
|
|
719
|
-
const
|
|
720
|
-
|
|
719
|
+
const u = o.currentValue.value, c = O(e, o, u.add(l));
|
|
720
|
+
o.currentValue.value = c, l = l.sub(c.sub(u)), i = i === 1 ? -1 : 1;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
function Pt(e) {
|
|
724
|
-
if (e.items.some((
|
|
724
|
+
if (e.items.some((u) => S(u) && u.currentValue.value.eq(-1)))
|
|
725
725
|
return e;
|
|
726
|
-
const t = new
|
|
727
|
-
if (
|
|
728
|
-
return
|
|
729
|
-
if (
|
|
730
|
-
return
|
|
731
|
-
const c =
|
|
732
|
-
return O(e,
|
|
733
|
-
}).reduce((
|
|
734
|
-
if (
|
|
726
|
+
const t = new I(V(e)), n = t.sub(me(e).toNumber()), r = e.items.map((u) => {
|
|
727
|
+
if (D(u))
|
|
728
|
+
return u.size.value;
|
|
729
|
+
if (u.collapsed)
|
|
730
|
+
return A(e, u.currentValue);
|
|
731
|
+
const c = u.currentValue.type === "pixel" && u.currentValue.value || u.currentValue.value.mul(n);
|
|
732
|
+
return O(e, u, c);
|
|
733
|
+
}).reduce((u, c) => u.add(c), new I(0)), i = r.abs().sub(t);
|
|
734
|
+
if (i.abs().lt(1) || t.eq(0))
|
|
735
735
|
return e;
|
|
736
|
-
let
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
...
|
|
742
|
-
...
|
|
736
|
+
let l = { ...e, items: K(e) };
|
|
737
|
+
const o = l.items.find((u) => !!(S(u) && u.collapsible));
|
|
738
|
+
if (o) {
|
|
739
|
+
const u = l.items.findIndex((s) => s.id === o.id), c = ce(l, o.id), v = o.currentValue.value.sub(A(l, o.collapsedSize));
|
|
740
|
+
l = {
|
|
741
|
+
...l,
|
|
742
|
+
...fe({
|
|
743
743
|
handleId: c.item.id,
|
|
744
|
-
delta:
|
|
744
|
+
delta: v,
|
|
745
745
|
direction: c.direction * -1,
|
|
746
|
-
panelId:
|
|
746
|
+
panelId: o.id,
|
|
747
747
|
context: {
|
|
748
|
-
...
|
|
748
|
+
...l,
|
|
749
749
|
// act like its the old size so the space is distributed correctly
|
|
750
|
-
size: { width:
|
|
750
|
+
size: { width: r.toNumber(), height: r.toNumber() }
|
|
751
751
|
}
|
|
752
752
|
})
|
|
753
|
-
},
|
|
753
|
+
}, be(l, l.items, u, i.neg());
|
|
754
754
|
}
|
|
755
|
-
return { ...
|
|
755
|
+
return { ...l, items: xe(l) };
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function De(e) {
|
|
758
758
|
return e.map((t) => ({ ...t, lastKnownSize: void 0 }));
|
|
759
759
|
}
|
|
760
760
|
function St(e, t) {
|
|
761
761
|
document.cookie = `${e}=${encodeURIComponent(`${t}`)};path=/;max-age=31536000`;
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
const
|
|
763
|
+
function Te(e, t) {
|
|
764
|
+
const n = B(e, t.panelId);
|
|
765
765
|
if (t.type === "expandPanel")
|
|
766
|
-
return new
|
|
767
|
-
const
|
|
768
|
-
return
|
|
769
|
-
}
|
|
770
|
-
function ke(e, t,
|
|
771
|
-
const
|
|
772
|
-
let
|
|
773
|
-
const
|
|
774
|
-
context:
|
|
766
|
+
return new I(n.sizeBeforeCollapse ?? A(e, n.min)).minus(n.currentValue.value);
|
|
767
|
+
const a = A(e, n.collapsedSize);
|
|
768
|
+
return n.currentValue.value.minus(a);
|
|
769
|
+
}
|
|
770
|
+
function ke(e, t, n, a) {
|
|
771
|
+
const r = B(e, t.panelId), i = Me(e, t.panelId);
|
|
772
|
+
let l = new I(i.direction);
|
|
773
|
+
const o = Te(e, t), u = { ...e, items: K(e) }, c = fe({
|
|
774
|
+
context: u,
|
|
775
775
|
panelId: t.panelId,
|
|
776
|
-
handleId:
|
|
777
|
-
delta:
|
|
778
|
-
direction:
|
|
776
|
+
handleId: i.item.id,
|
|
777
|
+
delta: o,
|
|
778
|
+
direction: i.direction,
|
|
779
779
|
isVirtual: !0
|
|
780
780
|
});
|
|
781
|
-
return new Promise((
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
}), t.type === "collapsePanel" && (
|
|
785
|
-
const
|
|
786
|
-
let
|
|
781
|
+
return new Promise((v, s) => {
|
|
782
|
+
a.signal.addEventListener("abort", () => {
|
|
783
|
+
s(new Error("Operation was canceled"));
|
|
784
|
+
}), t.type === "collapsePanel" && (r.sizeBeforeCollapse = r.currentValue.value.toNumber(), l = l.mul(new I(-1)));
|
|
785
|
+
const f = 60, { duration: m, ease: d } = dt(r), p = Math.ceil(r.collapseAnimation ? m / (1e3 / f) : 1);
|
|
786
|
+
let g = 0, h = new I(0);
|
|
787
787
|
function z() {
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
788
|
+
const b = ++g / p, P = new I(r.collapseAnimation ? d(b) : 1), x = P.mul(o).sub(h).mul(l);
|
|
789
|
+
if (n({
|
|
790
790
|
type: "applyDelta",
|
|
791
|
-
handleId:
|
|
792
|
-
delta:
|
|
793
|
-
panelId:
|
|
794
|
-
}),
|
|
795
|
-
e.items.find((
|
|
796
|
-
const
|
|
797
|
-
return
|
|
791
|
+
handleId: i.item.id,
|
|
792
|
+
delta: x.toNumber(),
|
|
793
|
+
panelId: r.id
|
|
794
|
+
}), h = h.add(x.abs().mul(x.gt(0) && l.lt(0) || x.lt(0) && l.gt(0) ? -1 : 1)), P.eq(1)) {
|
|
795
|
+
e.items.find((E) => S(E) && E.currentValue.value.round(void 0, I.roundHalfEven).lt(0)) && se(e, c);
|
|
796
|
+
const R = t.type === "expandPanel" ? "expand" : "collapse";
|
|
797
|
+
return v({ panelId: r.id, action: R, resolve: t.resolve }), !1;
|
|
798
798
|
}
|
|
799
799
|
return !0;
|
|
800
800
|
}
|
|
@@ -802,412 +802,430 @@ function ke(e, t, a, r) {
|
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
804
|
function se(e, t) {
|
|
805
|
-
for (const
|
|
806
|
-
e[
|
|
805
|
+
for (const n in t)
|
|
806
|
+
e[n] = t[n];
|
|
807
807
|
}
|
|
808
808
|
let Ct = 0;
|
|
809
|
-
function At(e, t) {
|
|
809
|
+
function At(e, t, n) {
|
|
810
810
|
const a = new AbortController(), r = {
|
|
811
811
|
current: "idle"
|
|
812
812
|
};
|
|
813
|
-
let
|
|
814
|
-
const
|
|
813
|
+
let i = !1;
|
|
814
|
+
const l = {
|
|
815
815
|
size: e.size || { width: 0, height: 0 },
|
|
816
816
|
items: e.items || [],
|
|
817
817
|
orientation: e.orientation || "horizontal",
|
|
818
|
-
dragOvershoot: new
|
|
818
|
+
dragOvershoot: new I(0),
|
|
819
819
|
groupId: e.groupId || `group-${Ct++}`,
|
|
820
820
|
autosaveStrategy: e.autosaveStrategy,
|
|
821
821
|
shiftAmount: e.shiftAmount ?? 15
|
|
822
|
-
},
|
|
822
|
+
}, o = {
|
|
823
823
|
prepare: () => {
|
|
824
|
-
|
|
824
|
+
l.items = K(l);
|
|
825
825
|
},
|
|
826
826
|
clearLastKnownSize: () => {
|
|
827
|
-
|
|
827
|
+
l.items = De(l.items);
|
|
828
828
|
},
|
|
829
829
|
commit: () => {
|
|
830
|
-
|
|
830
|
+
l.dragOvershoot = new I(0), l.items = xe(l);
|
|
831
831
|
},
|
|
832
832
|
onResize: () => {
|
|
833
|
-
var s,
|
|
834
|
-
for (const
|
|
835
|
-
if (
|
|
836
|
-
const
|
|
837
|
-
(
|
|
838
|
-
pixel:
|
|
839
|
-
percentage:
|
|
833
|
+
var s, f;
|
|
834
|
+
for (const m of l.items)
|
|
835
|
+
if (S(m)) {
|
|
836
|
+
const d = m.lastKnownSize ? new I(l.orientation === "horizontal" ? m.lastKnownSize.width : m.lastKnownSize.height) : O(l, m, A(l, m.currentValue)), p = V(l);
|
|
837
|
+
(f = (s = m.onResize) == null ? void 0 : s.current) == null || f.call(s, {
|
|
838
|
+
pixel: d.toNumber(),
|
|
839
|
+
percentage: p > 0 ? d.div(V(l)).toNumber() : -1
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
},
|
|
843
843
|
onAutosave: () => {
|
|
844
|
-
if (!
|
|
844
|
+
if (!l.autosaveStrategy || typeof window > "u")
|
|
845
845
|
return;
|
|
846
|
-
const s = { ...
|
|
847
|
-
s.items =
|
|
848
|
-
const
|
|
849
|
-
|
|
846
|
+
const s = { ...l };
|
|
847
|
+
s.items = De(l.items), s.activeDragHandleId = l.activeDragHandleId;
|
|
848
|
+
const f = JSON.stringify(s);
|
|
849
|
+
l.autosaveStrategy === "localStorage" ? localStorage.setItem(l.groupId, f) : St(l.groupId, f);
|
|
850
850
|
},
|
|
851
851
|
removeItem: (s) => {
|
|
852
|
-
const
|
|
853
|
-
if (!
|
|
852
|
+
const f = l.items.findIndex((g) => g.id === s), m = l.items[f];
|
|
853
|
+
if (!m)
|
|
854
854
|
return;
|
|
855
|
-
const
|
|
856
|
-
|
|
855
|
+
const d = l.items.filter((g) => g.id !== s), p = S(m) ? m.currentValue.value : m.size.value;
|
|
856
|
+
be(l, d, f, p), l.items = d;
|
|
857
857
|
},
|
|
858
858
|
notifyCollapseToggle: (s) => {
|
|
859
|
-
var
|
|
859
|
+
var m, d;
|
|
860
860
|
Z(s, ["collapsePanel", "expandPanel"]);
|
|
861
|
-
const
|
|
862
|
-
(
|
|
861
|
+
const f = B(l, s.panelId);
|
|
862
|
+
(d = (m = f.onCollapseChange) == null ? void 0 : m.current) == null || d.call(m, !f.collapsed);
|
|
863
863
|
},
|
|
864
864
|
runCollapseToggle: (s) => {
|
|
865
865
|
Z(s, ["collapsePanel", "expandPanel"]);
|
|
866
|
-
const
|
|
866
|
+
const f = ce(l, s.panelId), m = s.type === "collapsePanel" ? f.direction * -1 : f.direction, d = oe(l, {
|
|
867
867
|
panelId: s.panelId,
|
|
868
|
-
handleId:
|
|
868
|
+
handleId: f.item.id,
|
|
869
869
|
type: "dragHandle",
|
|
870
870
|
controlled: s.controlled,
|
|
871
|
-
value:
|
|
872
|
-
delta:
|
|
873
|
-
orientation:
|
|
871
|
+
value: ze({
|
|
872
|
+
delta: m,
|
|
873
|
+
orientation: l.orientation
|
|
874
874
|
})
|
|
875
875
|
});
|
|
876
|
-
se(
|
|
876
|
+
se(l, d);
|
|
877
877
|
},
|
|
878
878
|
onAnimationEnd: (s) => {
|
|
879
|
-
var
|
|
879
|
+
var m, d;
|
|
880
880
|
j(s, "Expected output from animation actor");
|
|
881
|
-
const
|
|
882
|
-
|
|
881
|
+
const f = B(l, s.panelId);
|
|
882
|
+
f.collapsed = s.action === "collapse", f.collapsed && (f.currentValue = f.collapsedSize), f.collapseIsControlled || (d = (m = f.onCollapseChange) == null ? void 0 : m.current) == null || d.call(m, f.collapsed), o.commit();
|
|
883
883
|
}
|
|
884
884
|
};
|
|
885
|
-
|
|
885
|
+
o.onAutosave();
|
|
886
886
|
const u = {
|
|
887
887
|
shouldNotifyCollapseToggle: (s) => {
|
|
888
888
|
Z(s, ["collapsePanel", "expandPanel"]);
|
|
889
|
-
const
|
|
890
|
-
return !s.controlled &&
|
|
889
|
+
const f = B(l, s.panelId);
|
|
890
|
+
return !s.controlled && f.collapseIsControlled === !0;
|
|
891
891
|
},
|
|
892
|
-
shouldCollapseToggle: (s) => (Z(s, ["collapsePanel", "expandPanel"]), B(
|
|
892
|
+
shouldCollapseToggle: (s) => (Z(s, ["collapsePanel", "expandPanel"]), B(l, s.panelId).collapseIsControlled === !0),
|
|
893
893
|
cannotExpandPanel: (s) => {
|
|
894
894
|
Z(s, ["expandPanel"]);
|
|
895
|
-
const
|
|
896
|
-
let
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
...
|
|
900
|
-
...
|
|
901
|
-
context:
|
|
895
|
+
const f = K(l);
|
|
896
|
+
let m = { ...l, items: f };
|
|
897
|
+
const d = Te(l, s), p = Me(m, s.panelId);
|
|
898
|
+
m = {
|
|
899
|
+
...m,
|
|
900
|
+
...fe({
|
|
901
|
+
context: m,
|
|
902
902
|
panelId: s.panelId,
|
|
903
|
-
handleId:
|
|
903
|
+
handleId: p.item.id,
|
|
904
904
|
controlled: s.controlled,
|
|
905
|
-
delta:
|
|
906
|
-
direction:
|
|
905
|
+
delta: d,
|
|
906
|
+
direction: p.direction,
|
|
907
907
|
isVirtual: !0
|
|
908
908
|
})
|
|
909
909
|
};
|
|
910
|
-
const
|
|
911
|
-
return
|
|
910
|
+
const g = m.items.find((b) => b.id === s.panelId), h = m.items.reduce((b, P) => b.add(S(P) ? P.currentValue.value : P.size.value), new I(0)), z = g && S(g) && !g.currentValue.value.eq(g.collapsedSize.value);
|
|
911
|
+
return h.gt(V(l)) || !z;
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
|
-
function
|
|
914
|
+
function c(s) {
|
|
915
915
|
switch (r.current) {
|
|
916
916
|
case "dragging":
|
|
917
|
-
|
|
917
|
+
o.commit(), l.activeDragHandleId = void 0;
|
|
918
918
|
break;
|
|
919
919
|
}
|
|
920
|
+
let f = !1;
|
|
920
921
|
switch (s) {
|
|
921
922
|
case "idle":
|
|
922
|
-
|
|
923
|
+
o.onAutosave();
|
|
923
924
|
break;
|
|
924
925
|
case "dragging":
|
|
925
|
-
|
|
926
|
+
o.prepare();
|
|
926
927
|
break;
|
|
927
928
|
case "togglingCollapse":
|
|
928
|
-
|
|
929
|
+
if (o.prepare(), o.clearLastKnownSize(), n) {
|
|
930
|
+
const m = n();
|
|
931
|
+
if (m) {
|
|
932
|
+
const d = de(l);
|
|
933
|
+
l.orientation === "horizontal" ? m.style.gridTemplateColumns = d : m.style.gridTemplateRows = d, f = !0;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
929
936
|
break;
|
|
930
937
|
}
|
|
931
|
-
r.current = s, t == null || t(
|
|
938
|
+
return r.current = s, f || t == null || t(l), f;
|
|
932
939
|
}
|
|
933
|
-
function
|
|
940
|
+
function v(s) {
|
|
934
941
|
var m;
|
|
942
|
+
let f = !1;
|
|
935
943
|
switch (s.type) {
|
|
936
944
|
case "lockGroup":
|
|
937
|
-
|
|
945
|
+
i = !0;
|
|
938
946
|
break;
|
|
939
947
|
case "unlockGroup":
|
|
940
|
-
|
|
948
|
+
i = !1;
|
|
941
949
|
break;
|
|
942
950
|
}
|
|
943
|
-
if (!
|
|
951
|
+
if (!i) {
|
|
944
952
|
switch (s.type) {
|
|
945
953
|
case "updateItemIndex":
|
|
946
|
-
|
|
954
|
+
l.items = qe(l.items.map((d) => d.id === s.itemId ? { ...d, order: s.index } : d));
|
|
947
955
|
break;
|
|
948
956
|
case "registerPanel":
|
|
949
|
-
|
|
957
|
+
l.items = ve(l.items, {
|
|
950
958
|
type: "panel",
|
|
951
959
|
currentValue: $(-1),
|
|
952
960
|
...s.data
|
|
953
961
|
});
|
|
954
962
|
break;
|
|
955
963
|
case "unregisterPanel":
|
|
956
|
-
|
|
964
|
+
o.prepare(), o.removeItem(s.id), o.clearLastKnownSize(), o.commit(), o.onResize(), o.onAutosave();
|
|
957
965
|
break;
|
|
958
966
|
case "registerPanelHandle": {
|
|
959
|
-
|
|
967
|
+
l.items = ve(l.items, s.data);
|
|
960
968
|
break;
|
|
961
969
|
}
|
|
962
970
|
case "unregisterPanelHandle":
|
|
963
|
-
|
|
971
|
+
o.prepare(), o.removeItem(s.id), o.clearLastKnownSize(), o.commit(), o.onResize(), o.onAutosave();
|
|
964
972
|
break;
|
|
965
973
|
case "registerDynamicPanel": {
|
|
966
|
-
|
|
967
|
-
let
|
|
968
|
-
s.data.collapsible && s.data.collapsed && s.data.collapsedSize ?
|
|
974
|
+
o.prepare();
|
|
975
|
+
let d = $(0);
|
|
976
|
+
s.data.collapsible && s.data.collapsed && s.data.collapsedSize ? d = {
|
|
969
977
|
type: "pixel",
|
|
970
|
-
value:
|
|
971
|
-
} : s.data.default ?
|
|
978
|
+
value: A(l, s.data.collapsedSize)
|
|
979
|
+
} : s.data.default ? d = {
|
|
972
980
|
type: "pixel",
|
|
973
|
-
value:
|
|
974
|
-
} :
|
|
981
|
+
value: A(l, s.data.default)
|
|
982
|
+
} : d = {
|
|
975
983
|
type: "pixel",
|
|
976
|
-
value:
|
|
984
|
+
value: A(l, s.data.min)
|
|
977
985
|
};
|
|
978
|
-
const
|
|
986
|
+
const p = ve(l.items, {
|
|
979
987
|
type: "panel",
|
|
980
988
|
...s.data,
|
|
981
|
-
currentValue:
|
|
982
|
-
}),
|
|
983
|
-
|
|
989
|
+
currentValue: d
|
|
990
|
+
}), g = p.findIndex((b) => b.id === s.data.id), h = { ...l }, z = l.items.reduce((b, P) => D(P) ? b.add(A(l, P.size)) : b.add(P.currentValue.value), new I(0)).minus(V(l));
|
|
991
|
+
be(h, p, g, d.value.add(z).neg()), l.items = p, o.clearLastKnownSize(), o.commit(), o.onResize(), o.onAutosave();
|
|
984
992
|
break;
|
|
985
993
|
}
|
|
986
994
|
case "rebindPanelCallbacks":
|
|
987
|
-
for (const
|
|
988
|
-
|
|
995
|
+
for (const d of l.items)
|
|
996
|
+
S(d) && d.id === s.data.id && (d.onCollapseChange = s.data.onCollapseChange, d.onResize = s.data.onResize);
|
|
989
997
|
break;
|
|
990
998
|
case "updateConstraints":
|
|
991
|
-
|
|
992
|
-
for (const
|
|
993
|
-
if (
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
} else if (
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
+
o.prepare();
|
|
1000
|
+
for (const d of l.items)
|
|
1001
|
+
if (S(d) && d.id === s.data.id) {
|
|
1002
|
+
const p = s.data;
|
|
1003
|
+
d.min = p.min, d.max = p.max, d.default = p.default, d.collapsedSize = p.collapsedSize, d.isStaticAtRest = p.isStaticAtRest, d.collapseAnimation = p.collapseAnimation, d.collapsible = p.collapsible;
|
|
1004
|
+
} else if (D(d) && d.id === s.data.id) {
|
|
1005
|
+
const p = s.data;
|
|
1006
|
+
d.size = p.size;
|
|
999
1007
|
}
|
|
1000
|
-
|
|
1008
|
+
o.clearLastKnownSize(), o.commit(), o.onResize(), o.onAutosave();
|
|
1001
1009
|
break;
|
|
1002
1010
|
case "setActualItemsSize": {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1011
|
+
if (r.current === "togglingCollapse" && n) {
|
|
1012
|
+
f = !0;
|
|
1013
|
+
break;
|
|
1014
|
+
}
|
|
1015
|
+
const d = l.items.map((h) => {
|
|
1016
|
+
if (!S(h))
|
|
1017
|
+
return h;
|
|
1018
|
+
const z = s.childrenSizes[h.id] || h.lastKnownSize;
|
|
1019
|
+
return { ...h, lastKnownSize: z };
|
|
1008
1020
|
});
|
|
1009
|
-
let
|
|
1010
|
-
for (const
|
|
1011
|
-
if (
|
|
1012
|
-
const
|
|
1013
|
-
if (!
|
|
1014
|
-
|
|
1021
|
+
let p = 0, g = !1;
|
|
1022
|
+
for (const h of d)
|
|
1023
|
+
if (S(h)) {
|
|
1024
|
+
const z = (m = h.lastKnownSize) == null ? void 0 : m[l.orientation === "horizontal" ? "width" : "height"];
|
|
1025
|
+
if (!z) {
|
|
1026
|
+
l.items = d, g = !0;
|
|
1015
1027
|
break;
|
|
1016
1028
|
}
|
|
1017
|
-
|
|
1029
|
+
p += z;
|
|
1018
1030
|
} else
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
...
|
|
1022
|
-
items:
|
|
1023
|
-
}).items :
|
|
1031
|
+
p += h.size.value.toNumber();
|
|
1032
|
+
g ? l.items = d : p > V(l) && r.current === "idle" ? l.items = Pt({
|
|
1033
|
+
...l,
|
|
1034
|
+
items: K({ ...l, items: d })
|
|
1035
|
+
}).items : l.items = d, o.onResize();
|
|
1024
1036
|
break;
|
|
1025
1037
|
}
|
|
1026
1038
|
case "setSize": {
|
|
1027
|
-
|
|
1039
|
+
l.size = s.size, o.onResize();
|
|
1028
1040
|
break;
|
|
1029
1041
|
}
|
|
1030
1042
|
case "setOrientation":
|
|
1031
|
-
|
|
1043
|
+
l.orientation = s.orientation, o.clearLastKnownSize(), o.onResize();
|
|
1032
1044
|
break;
|
|
1033
1045
|
}
|
|
1034
1046
|
if (r.current === "idle")
|
|
1035
1047
|
switch (s.type) {
|
|
1036
1048
|
case "dragHandleStart":
|
|
1037
|
-
|
|
1049
|
+
c("dragging"), l.activeDragHandleId = s.handleId;
|
|
1038
1050
|
break;
|
|
1039
1051
|
case "setPanelPixelSize": {
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
context:
|
|
1052
|
+
o.prepare(), o.clearLastKnownSize();
|
|
1053
|
+
const d = B(l, s.panelId), p = ce(l, s.panelId), g = d.currentValue.value, h = O(l, d, A(l, T(s.size))), z = h.gt(g), b = z ? h.minus(g) : g.minus(h);
|
|
1054
|
+
d.sizeBeforeCollapse = h.toNumber(), Object.assign(l, fe({
|
|
1055
|
+
context: l,
|
|
1044
1056
|
panelId: s.panelId,
|
|
1045
|
-
direction:
|
|
1046
|
-
handleId:
|
|
1047
|
-
delta:
|
|
1048
|
-
})),
|
|
1057
|
+
direction: p.direction * (z ? 1 : -1),
|
|
1058
|
+
handleId: p.item.id,
|
|
1059
|
+
delta: b
|
|
1060
|
+
})), o.commit(), o.onResize(), o.onAutosave();
|
|
1049
1061
|
break;
|
|
1050
1062
|
}
|
|
1051
1063
|
case "collapsePanel":
|
|
1052
|
-
u.shouldNotifyCollapseToggle(s) ?
|
|
1053
|
-
|
|
1064
|
+
u.shouldNotifyCollapseToggle(s) ? o.notifyCollapseToggle(s) : B(l, s.panelId).collapsed || (c("togglingCollapse") && (f = !0), a.abort(), ke(l, s, v, a).then((p) => {
|
|
1065
|
+
o.onAnimationEnd(p), c("idle"), s.resolve && requestAnimationFrame(s.resolve);
|
|
1054
1066
|
}));
|
|
1055
1067
|
break;
|
|
1056
1068
|
case "expandPanel":
|
|
1057
1069
|
if (u.cannotExpandPanel(s))
|
|
1058
1070
|
break;
|
|
1059
|
-
u.shouldNotifyCollapseToggle(s) ?
|
|
1060
|
-
|
|
1071
|
+
u.shouldNotifyCollapseToggle(s) ? o.notifyCollapseToggle(s) : B(l, s.panelId).collapsed && (c("togglingCollapse") && (f = !0), a.abort(), ke(l, s, v, a).then((p) => {
|
|
1072
|
+
o.onAnimationEnd(p), c("idle"), s.resolve && requestAnimationFrame(s.resolve);
|
|
1061
1073
|
}));
|
|
1062
1074
|
break;
|
|
1063
1075
|
}
|
|
1064
1076
|
else if (r.current === "dragging")
|
|
1065
1077
|
switch (s.type) {
|
|
1066
1078
|
case "dragHandle":
|
|
1067
|
-
|
|
1079
|
+
o.clearLastKnownSize(), se(l, oe(l, s)), o.onResize();
|
|
1068
1080
|
break;
|
|
1069
1081
|
case "dragHandleEnd":
|
|
1070
|
-
|
|
1082
|
+
c("idle");
|
|
1071
1083
|
break;
|
|
1072
1084
|
case "expandPanel":
|
|
1073
1085
|
case "collapsePanel":
|
|
1074
|
-
u.shouldCollapseToggle(s) &&
|
|
1086
|
+
u.shouldCollapseToggle(s) && o.runCollapseToggle(s);
|
|
1075
1087
|
break;
|
|
1076
1088
|
}
|
|
1077
1089
|
else if (r.current === "togglingCollapse")
|
|
1078
1090
|
switch (s.type) {
|
|
1079
1091
|
case "applyDelta":
|
|
1080
|
-
se(
|
|
1092
|
+
if (se(l, oe(l, {
|
|
1081
1093
|
panelId: s.panelId,
|
|
1082
1094
|
handleId: s.handleId,
|
|
1083
1095
|
type: "collapsePanel",
|
|
1084
1096
|
disregardCollapseBuffer: !0,
|
|
1085
|
-
value:
|
|
1097
|
+
value: ze({
|
|
1086
1098
|
delta: s.delta,
|
|
1087
|
-
orientation:
|
|
1099
|
+
orientation: l.orientation
|
|
1088
1100
|
})
|
|
1089
|
-
})),
|
|
1101
|
+
})), o.onResize(), n) {
|
|
1102
|
+
const d = n();
|
|
1103
|
+
if (d) {
|
|
1104
|
+
const p = de(l);
|
|
1105
|
+
l.orientation === "horizontal" ? d.style.gridTemplateColumns = p : d.style.gridTemplateRows = p, f = !0;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1090
1108
|
break;
|
|
1091
1109
|
}
|
|
1092
|
-
t == null || t(
|
|
1110
|
+
f || t == null || t(l);
|
|
1093
1111
|
}
|
|
1094
1112
|
}
|
|
1095
|
-
return [
|
|
1113
|
+
return [l, v, r];
|
|
1096
1114
|
}
|
|
1097
|
-
function xt({ groupId: e, id: t, collapsible:
|
|
1098
|
-
const
|
|
1115
|
+
function xt({ groupId: e, id: t, collapsible: n, collapsed: a }) {
|
|
1116
|
+
const r = {
|
|
1099
1117
|
id: t,
|
|
1100
1118
|
"data-splitter-group-id": e,
|
|
1101
1119
|
"data-splitter-type": "panel",
|
|
1102
1120
|
"data-splitter-id": t
|
|
1103
1121
|
};
|
|
1104
|
-
return
|
|
1122
|
+
return n && (r["data-collapsed"] = a), r;
|
|
1105
1123
|
}
|
|
1106
|
-
function Vt({ groupId: e, id: t, orientation:
|
|
1124
|
+
function Vt({ groupId: e, id: t, orientation: n, isDragging: a, activeDragHandleId: r, disabled: i, controlsId: l, min: o, max: u, currentValue: c, groupSize: v }) {
|
|
1107
1125
|
return {
|
|
1108
1126
|
id: t,
|
|
1109
1127
|
role: "separator",
|
|
1110
1128
|
"data-splitter-type": "handle",
|
|
1111
1129
|
"data-splitter-id": t,
|
|
1112
1130
|
"data-splitter-group-id": e,
|
|
1113
|
-
"data-handle-orientation":
|
|
1114
|
-
"data-state":
|
|
1131
|
+
"data-handle-orientation": n,
|
|
1132
|
+
"data-state": a ? "dragging" : r ? "inactive" : "idle",
|
|
1115
1133
|
"aria-label": "Resize Handle",
|
|
1116
|
-
"aria-disabled":
|
|
1117
|
-
"aria-controls":
|
|
1118
|
-
"aria-valuemin":
|
|
1119
|
-
"aria-valuemax":
|
|
1120
|
-
"aria-valuenow": c ?
|
|
1134
|
+
"aria-disabled": i,
|
|
1135
|
+
"aria-controls": l,
|
|
1136
|
+
"aria-valuemin": o ? G(v, o) : void 0,
|
|
1137
|
+
"aria-valuemax": u === "1fr" ? 100 : u ? G(v, u) : void 0,
|
|
1138
|
+
"aria-valuenow": c ? G(v, c) : void 0
|
|
1121
1139
|
};
|
|
1122
1140
|
}
|
|
1123
|
-
function
|
|
1124
|
-
const
|
|
1125
|
-
const
|
|
1126
|
-
for (const
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1141
|
+
function Rt(e, t) {
|
|
1142
|
+
const n = new ResizeObserver((r) => {
|
|
1143
|
+
const i = {};
|
|
1144
|
+
for (const l of r) {
|
|
1145
|
+
const u = l.target.getAttribute("data-splitter-id"), c = l.borderBoxSize[0];
|
|
1146
|
+
u && c && (i[u] = {
|
|
1129
1147
|
width: c.inlineSize,
|
|
1130
1148
|
height: c.blockSize
|
|
1131
1149
|
});
|
|
1132
1150
|
}
|
|
1133
|
-
t(
|
|
1134
|
-
}),
|
|
1135
|
-
for (const
|
|
1136
|
-
|
|
1151
|
+
t(i);
|
|
1152
|
+
}), a = document.querySelectorAll(`[data-splitter-group-id="${e}"]`);
|
|
1153
|
+
for (const r of a)
|
|
1154
|
+
n.observe(r);
|
|
1137
1155
|
return () => {
|
|
1138
|
-
|
|
1156
|
+
n.disconnect();
|
|
1139
1157
|
};
|
|
1140
1158
|
}
|
|
1141
|
-
function
|
|
1142
|
-
const { onMoveStart: t, onMove:
|
|
1143
|
-
|
|
1159
|
+
function Dt(e) {
|
|
1160
|
+
const { onMoveStart: t, onMove: n, onMoveEnd: a } = e, r = { didMove: !1, lastPosition: null, id: null }, i = (f, m, d, p) => {
|
|
1161
|
+
d === 0 && p === 0 || (r.didMove || (r.didMove = !0, t == null || t({
|
|
1144
1162
|
type: "movestart",
|
|
1145
|
-
pointerType:
|
|
1146
|
-
shiftKey:
|
|
1147
|
-
metaKey:
|
|
1148
|
-
ctrlKey:
|
|
1149
|
-
altKey:
|
|
1150
|
-
})),
|
|
1163
|
+
pointerType: m,
|
|
1164
|
+
shiftKey: f.shiftKey,
|
|
1165
|
+
metaKey: f.metaKey,
|
|
1166
|
+
ctrlKey: f.ctrlKey,
|
|
1167
|
+
altKey: f.altKey
|
|
1168
|
+
})), n == null || n({
|
|
1151
1169
|
type: "move",
|
|
1152
|
-
pointerType:
|
|
1153
|
-
deltaX:
|
|
1170
|
+
pointerType: m,
|
|
1171
|
+
deltaX: d,
|
|
1154
1172
|
deltaY: p,
|
|
1155
|
-
shiftKey:
|
|
1156
|
-
metaKey:
|
|
1157
|
-
ctrlKey:
|
|
1158
|
-
altKey:
|
|
1173
|
+
shiftKey: f.shiftKey,
|
|
1174
|
+
metaKey: f.metaKey,
|
|
1175
|
+
ctrlKey: f.ctrlKey,
|
|
1176
|
+
altKey: f.altKey
|
|
1159
1177
|
}));
|
|
1160
|
-
},
|
|
1161
|
-
|
|
1178
|
+
}, l = (f, m) => {
|
|
1179
|
+
r.didMove && (a == null || a({
|
|
1162
1180
|
type: "moveend",
|
|
1163
|
-
pointerType:
|
|
1164
|
-
shiftKey:
|
|
1165
|
-
metaKey:
|
|
1166
|
-
ctrlKey:
|
|
1167
|
-
altKey:
|
|
1181
|
+
pointerType: m,
|
|
1182
|
+
shiftKey: f.shiftKey,
|
|
1183
|
+
metaKey: f.metaKey,
|
|
1184
|
+
ctrlKey: f.ctrlKey,
|
|
1185
|
+
altKey: f.altKey
|
|
1168
1186
|
}));
|
|
1169
|
-
},
|
|
1170
|
-
|
|
1171
|
-
}, c = (
|
|
1172
|
-
var
|
|
1173
|
-
if (
|
|
1174
|
-
const p =
|
|
1175
|
-
|
|
1187
|
+
}, o = {}, u = () => {
|
|
1188
|
+
r.didMove = !1;
|
|
1189
|
+
}, c = (f) => {
|
|
1190
|
+
var m, d;
|
|
1191
|
+
if (f.pointerId === r.id) {
|
|
1192
|
+
const p = f.pointerType || "mouse";
|
|
1193
|
+
i(f, p, f.pageX - (((m = r.lastPosition) == null ? void 0 : m.pageX) ?? 0), f.pageY - (((d = r.lastPosition) == null ? void 0 : d.pageY) ?? 0)), r.lastPosition = { pageX: f.pageX, pageY: f.pageY };
|
|
1176
1194
|
}
|
|
1177
|
-
},
|
|
1178
|
-
if (
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1195
|
+
}, v = (f) => {
|
|
1196
|
+
if (f.pointerId === r.id) {
|
|
1197
|
+
const m = f.pointerType || "mouse";
|
|
1198
|
+
l(f, m), r.id = null, window.removeEventListener("pointermove", c, !1), window.removeEventListener("pointerup", v, !1), window.removeEventListener("pointercancel", v, !1);
|
|
1181
1199
|
}
|
|
1182
1200
|
};
|
|
1183
|
-
|
|
1184
|
-
|
|
1201
|
+
o.onPointerDown = (f) => {
|
|
1202
|
+
f.button === 0 && r.id == null && (u(), f.stopPropagation(), f.preventDefault(), r.lastPosition = { pageX: f.pageX, pageY: f.pageY }, r.id = f.pointerId, window.addEventListener("pointermove", c, !1), window.addEventListener("pointerup", v, !1), window.addEventListener("pointercancel", v, !1));
|
|
1185
1203
|
};
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1204
|
+
const s = (f, m, d) => {
|
|
1205
|
+
u(), i(f, "keyboard", m, d), l(f, "keyboard");
|
|
1188
1206
|
};
|
|
1189
|
-
return
|
|
1190
|
-
switch (
|
|
1207
|
+
return o.onKeyDown = (f) => {
|
|
1208
|
+
switch (f.key) {
|
|
1191
1209
|
case "Left":
|
|
1192
1210
|
case "ArrowLeft":
|
|
1193
|
-
|
|
1211
|
+
f.preventDefault(), f.stopPropagation(), s(f, -1, 0);
|
|
1194
1212
|
break;
|
|
1195
1213
|
case "Right":
|
|
1196
1214
|
case "ArrowRight":
|
|
1197
|
-
|
|
1215
|
+
f.preventDefault(), f.stopPropagation(), s(f, 1, 0);
|
|
1198
1216
|
break;
|
|
1199
1217
|
case "Up":
|
|
1200
1218
|
case "ArrowUp":
|
|
1201
|
-
|
|
1219
|
+
f.preventDefault(), f.stopPropagation(), s(f, 0, -1);
|
|
1202
1220
|
break;
|
|
1203
1221
|
case "Down":
|
|
1204
1222
|
case "ArrowDown":
|
|
1205
|
-
|
|
1223
|
+
f.preventDefault(), f.stopPropagation(), s(f, 0, 1);
|
|
1206
1224
|
break;
|
|
1207
1225
|
}
|
|
1208
|
-
}, { moveProps:
|
|
1226
|
+
}, { moveProps: o };
|
|
1209
1227
|
}
|
|
1210
|
-
const
|
|
1228
|
+
const Et = /* @__PURE__ */ Ie({
|
|
1211
1229
|
__name: "Panel",
|
|
1212
1230
|
props: {
|
|
1213
1231
|
onResize: {},
|
|
@@ -1224,115 +1242,115 @@ const Kt = /* @__PURE__ */ be({
|
|
|
1224
1242
|
id: {}
|
|
1225
1243
|
},
|
|
1226
1244
|
setup(e, { expose: t }) {
|
|
1227
|
-
const
|
|
1228
|
-
min:
|
|
1229
|
-
max:
|
|
1230
|
-
id:
|
|
1231
|
-
collapsible:
|
|
1232
|
-
collapsedSize:
|
|
1233
|
-
onCollapseChange:
|
|
1245
|
+
const n = e, {
|
|
1246
|
+
min: a,
|
|
1247
|
+
max: r,
|
|
1248
|
+
id: i,
|
|
1249
|
+
collapsible: l,
|
|
1250
|
+
collapsedSize: o,
|
|
1251
|
+
onCollapseChange: u,
|
|
1234
1252
|
collapseAnimation: c,
|
|
1235
|
-
onResize:
|
|
1236
|
-
defaultCollapsed:
|
|
1237
|
-
default:
|
|
1238
|
-
isStaticAtRest:
|
|
1239
|
-
collapsed:
|
|
1253
|
+
onResize: v,
|
|
1254
|
+
defaultCollapsed: s,
|
|
1255
|
+
default: f,
|
|
1256
|
+
isStaticAtRest: m,
|
|
1257
|
+
collapsed: d,
|
|
1240
1258
|
...p
|
|
1241
|
-
} =
|
|
1242
|
-
id:
|
|
1243
|
-
min:
|
|
1244
|
-
max:
|
|
1245
|
-
collapsible:
|
|
1246
|
-
collapsed:
|
|
1247
|
-
collapsedSize:
|
|
1248
|
-
onCollapseChange:
|
|
1249
|
-
collapseAnimation:
|
|
1250
|
-
onResize:
|
|
1251
|
-
defaultCollapsed:
|
|
1252
|
-
default:
|
|
1253
|
-
isStaticAtRest:
|
|
1254
|
-
}),
|
|
1255
|
-
var
|
|
1256
|
-
const w = (
|
|
1257
|
-
if (!(!w || !
|
|
1259
|
+
} = n, g = i || ye(), h = Y("send"), z = Y("state"), b = Y("isPrerender"), P = () => pt({
|
|
1260
|
+
id: g,
|
|
1261
|
+
min: n.min,
|
|
1262
|
+
max: n.max,
|
|
1263
|
+
collapsible: n.collapsible,
|
|
1264
|
+
collapsed: n.collapsed,
|
|
1265
|
+
collapsedSize: n.collapsedSize,
|
|
1266
|
+
onCollapseChange: n.onCollapseChange ? { current: n.onCollapseChange } : void 0,
|
|
1267
|
+
collapseAnimation: n.collapseAnimation,
|
|
1268
|
+
onResize: n.onResize ? { current: n.onResize } : void 0,
|
|
1269
|
+
defaultCollapsed: s,
|
|
1270
|
+
default: f,
|
|
1271
|
+
isStaticAtRest: m
|
|
1272
|
+
}), x = H(() => {
|
|
1273
|
+
var C;
|
|
1274
|
+
const w = (C = z == null ? void 0 : z.value) == null ? void 0 : C.items.find((q) => q.id === g);
|
|
1275
|
+
if (!(!w || !S(w)))
|
|
1258
1276
|
return w;
|
|
1259
1277
|
});
|
|
1260
|
-
let
|
|
1261
|
-
|
|
1278
|
+
let R = !1;
|
|
1279
|
+
x.value ? h == null || h({
|
|
1262
1280
|
type: "rebindPanelCallbacks",
|
|
1263
1281
|
data: {
|
|
1264
|
-
id:
|
|
1265
|
-
onCollapseChange:
|
|
1266
|
-
onResize:
|
|
1282
|
+
id: g,
|
|
1283
|
+
onCollapseChange: n.onCollapseChange ? { current: n.onCollapseChange } : void 0,
|
|
1284
|
+
onResize: n.onResize ? { current: n.onResize } : void 0
|
|
1267
1285
|
}
|
|
1268
|
-
}) :
|
|
1286
|
+
}) : b != null && b.value ? h == null || h({ type: "registerPanel", data: P() }) : R = !0, X(() => {
|
|
1269
1287
|
var le;
|
|
1270
1288
|
const w = (le = z == null ? void 0 : z.value) == null ? void 0 : le.groupId;
|
|
1271
|
-
if (!w || !
|
|
1272
|
-
const
|
|
1273
|
-
if (!
|
|
1274
|
-
const q = document.getElementById(
|
|
1289
|
+
if (!w || !R) return;
|
|
1290
|
+
const C = document.getElementById(w);
|
|
1291
|
+
if (!C) return;
|
|
1292
|
+
const q = document.getElementById(g);
|
|
1275
1293
|
if (!q) return;
|
|
1276
|
-
const re = Array.from(
|
|
1277
|
-
typeof re == "number" && (
|
|
1294
|
+
const re = Array.from(C.children).indexOf(q);
|
|
1295
|
+
typeof re == "number" && (h == null || h({
|
|
1278
1296
|
type: "registerDynamicPanel",
|
|
1279
|
-
data: { ...
|
|
1280
|
-
}),
|
|
1297
|
+
data: { ...P(), order: re }
|
|
1298
|
+
}), R = !1);
|
|
1281
1299
|
});
|
|
1282
|
-
const
|
|
1283
|
-
() => !
|
|
1300
|
+
const E = H(
|
|
1301
|
+
() => !R && mt(P(), x.value)
|
|
1284
1302
|
);
|
|
1285
1303
|
ue(() => {
|
|
1286
|
-
|
|
1304
|
+
E.value && (h == null || h({ type: "updateConstraints", data: P() }));
|
|
1287
1305
|
}), Be(() => {
|
|
1288
|
-
requestAnimationFrame(() =>
|
|
1306
|
+
requestAnimationFrame(() => h == null ? void 0 : h({ type: "unregisterPanel", id: g }));
|
|
1289
1307
|
}), t({
|
|
1290
|
-
getId: () =>
|
|
1308
|
+
getId: () => g,
|
|
1291
1309
|
collapse: async () => {
|
|
1292
1310
|
var w;
|
|
1293
|
-
if ((w =
|
|
1294
|
-
return await new Promise((
|
|
1295
|
-
|
|
1311
|
+
if ((w = x.value) != null && w.collapsible)
|
|
1312
|
+
return await new Promise((C) => {
|
|
1313
|
+
h == null || h({ type: "collapsePanel", panelId: g, controlled: !0, resolve: C });
|
|
1296
1314
|
});
|
|
1297
1315
|
},
|
|
1298
1316
|
isCollapsed: () => {
|
|
1299
|
-
var w,
|
|
1300
|
-
return !!((w =
|
|
1317
|
+
var w, C;
|
|
1318
|
+
return !!((w = x.value) != null && w.collapsible && ((C = x.value) != null && C.collapsed));
|
|
1301
1319
|
},
|
|
1302
1320
|
expand: async () => {
|
|
1303
1321
|
var w;
|
|
1304
|
-
if ((w =
|
|
1305
|
-
return await new Promise((
|
|
1306
|
-
|
|
1322
|
+
if ((w = x.value) != null && w.collapsible)
|
|
1323
|
+
return await new Promise((C) => {
|
|
1324
|
+
h == null || h({ type: "expandPanel", panelId: g, controlled: !0, resolve: C });
|
|
1307
1325
|
});
|
|
1308
1326
|
},
|
|
1309
1327
|
isExpanded: () => {
|
|
1310
|
-
var w,
|
|
1311
|
-
return !!((w =
|
|
1328
|
+
var w, C;
|
|
1329
|
+
return !!((w = x.value) != null && w.collapsible && !((C = x.value) != null && C.collapsed));
|
|
1312
1330
|
},
|
|
1313
|
-
getPixelSize: () => bt(z.value,
|
|
1314
|
-
getPercentageSize: () => yt(z.value,
|
|
1315
|
-
setSize: (w) =>
|
|
1331
|
+
getPixelSize: () => bt(z.value, g),
|
|
1332
|
+
getPercentageSize: () => yt(z.value, g),
|
|
1333
|
+
setSize: (w) => h == null ? void 0 : h({ type: "setPanelPixelSize", panelId: g, size: w })
|
|
1316
1334
|
});
|
|
1317
1335
|
const L = H(
|
|
1318
1336
|
() => {
|
|
1319
1337
|
var w;
|
|
1320
|
-
return (w =
|
|
1338
|
+
return (w = x.value) == null ? void 0 : w.collapseIsControlled;
|
|
1321
1339
|
}
|
|
1322
1340
|
);
|
|
1323
1341
|
ue(() => {
|
|
1324
|
-
|
|
1325
|
-
L.value && (
|
|
1342
|
+
n.collapsed, requestAnimationFrame(() => {
|
|
1343
|
+
L.value && (n.collapsed ? h == null || h({ type: "collapsePanel", panelId: g, controlled: !0 }) : h == null || h({ type: "expandPanel", panelId: g, controlled: !0 }));
|
|
1326
1344
|
});
|
|
1327
1345
|
});
|
|
1328
1346
|
const M = H(() => {
|
|
1329
|
-
var
|
|
1330
|
-
const w =
|
|
1347
|
+
var C;
|
|
1348
|
+
const w = x.value;
|
|
1331
1349
|
return {
|
|
1332
1350
|
...p,
|
|
1333
1351
|
...xt({
|
|
1334
|
-
groupId: (
|
|
1335
|
-
id:
|
|
1352
|
+
groupId: (C = z == null ? void 0 : z.value) == null ? void 0 : C.groupId,
|
|
1353
|
+
id: g,
|
|
1336
1354
|
collapsible: w == null ? void 0 : w.collapsible,
|
|
1337
1355
|
collapsed: w == null ? void 0 : w.collapsed
|
|
1338
1356
|
}),
|
|
@@ -1343,11 +1361,11 @@ const Kt = /* @__PURE__ */ be({
|
|
|
1343
1361
|
}
|
|
1344
1362
|
};
|
|
1345
1363
|
});
|
|
1346
|
-
return (w,
|
|
1347
|
-
|
|
1364
|
+
return (w, C) => (Se(), Pe("div", We(Ue(M.value)), [
|
|
1365
|
+
Ce(w.$slots, "default")
|
|
1348
1366
|
], 16));
|
|
1349
1367
|
}
|
|
1350
|
-
}), kt = ["id"], Nt = /* @__PURE__ */
|
|
1368
|
+
}), kt = ["id"], Nt = /* @__PURE__ */ Ie({
|
|
1351
1369
|
__name: "PanelGroup",
|
|
1352
1370
|
props: {
|
|
1353
1371
|
snapshot: {},
|
|
@@ -1358,91 +1376,90 @@ const Kt = /* @__PURE__ */ be({
|
|
|
1358
1376
|
id: {}
|
|
1359
1377
|
},
|
|
1360
1378
|
setup(e, { expose: t }) {
|
|
1361
|
-
const
|
|
1362
|
-
let
|
|
1363
|
-
if (!
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1379
|
+
const n = Ke(e, ["orientation", "autosaveStrategy", "snapshot", "autosaveId", "id", "shiftAmount"]);
|
|
1380
|
+
let a = e.snapshot;
|
|
1381
|
+
if (!a && typeof window < "u" && e.autosaveId && e.autosaveStrategy === "localStorage") {
|
|
1382
|
+
const m = localStorage.getItem(e.autosaveId);
|
|
1383
|
+
m && (a = JSON.parse(m));
|
|
1366
1384
|
}
|
|
1367
|
-
const
|
|
1368
|
-
ie("isPrerender",
|
|
1369
|
-
const
|
|
1385
|
+
const r = he(!0);
|
|
1386
|
+
ie("isPrerender", r);
|
|
1387
|
+
const i = e.autosaveId || e.id || ye(), l = he(null), [o, u, c] = At(
|
|
1370
1388
|
{
|
|
1371
1389
|
orientation: e.orientation,
|
|
1372
|
-
groupId:
|
|
1390
|
+
groupId: i,
|
|
1373
1391
|
autosaveStrategy: e.autosaveStrategy,
|
|
1374
1392
|
shiftAmount: e.shiftAmount,
|
|
1375
|
-
...
|
|
1393
|
+
...a ? ft(a) : void 0
|
|
1376
1394
|
},
|
|
1377
|
-
(
|
|
1378
|
-
|
|
1379
|
-
}
|
|
1395
|
+
(m) => {
|
|
1396
|
+
v.value = { ...m };
|
|
1397
|
+
},
|
|
1398
|
+
() => l.value
|
|
1380
1399
|
);
|
|
1381
|
-
|
|
1382
|
-
|
|
1400
|
+
X(() => {
|
|
1401
|
+
r.value = !1;
|
|
1383
1402
|
});
|
|
1384
|
-
const
|
|
1385
|
-
const
|
|
1403
|
+
const v = he(o), s = H(() => {
|
|
1404
|
+
const m = de(v.value);
|
|
1386
1405
|
return {
|
|
1387
1406
|
height: "100%",
|
|
1388
1407
|
display: "grid",
|
|
1389
|
-
gridTemplateColumns: e.orientation === "horizontal" ?
|
|
1390
|
-
gridTemplateRows: e.orientation === "vertical" ?
|
|
1408
|
+
gridTemplateColumns: e.orientation === "horizontal" ? m : void 0,
|
|
1409
|
+
gridTemplateRows: e.orientation === "vertical" ? m : void 0
|
|
1391
1410
|
};
|
|
1392
1411
|
});
|
|
1393
|
-
ie("send", u), ie("state",
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
const f = new ResizeObserver(([h]) => {
|
|
1397
|
-
h && h.contentRect.width > 0 && h.contentRect.height > 0 && (u == null || u({ type: "setSize", size: h.contentRect }));
|
|
1412
|
+
ie("send", u), ie("state", v), ie("id", c), X(() => {
|
|
1413
|
+
const m = new ResizeObserver(([d]) => {
|
|
1414
|
+
d && d.contentRect.width > 0 && d.contentRect.height > 0 && (u == null || u({ type: "setSize", size: d.contentRect }));
|
|
1398
1415
|
});
|
|
1399
|
-
return
|
|
1416
|
+
return l.value && m.observe(l.value), () => m.disconnect();
|
|
1400
1417
|
});
|
|
1401
|
-
const
|
|
1418
|
+
const f = H(
|
|
1402
1419
|
() => {
|
|
1403
|
-
var
|
|
1404
|
-
return (
|
|
1420
|
+
var m;
|
|
1421
|
+
return (m = v.value) == null ? void 0 : m.items.map((d) => d.id).join(",");
|
|
1405
1422
|
}
|
|
1406
1423
|
);
|
|
1407
|
-
return
|
|
1424
|
+
return X(() => {
|
|
1408
1425
|
ue(() => {
|
|
1409
|
-
|
|
1410
|
-
const
|
|
1411
|
-
u({ type: "setActualItemsSize", childrenSizes:
|
|
1426
|
+
f.value;
|
|
1427
|
+
const m = Rt(i, (d) => {
|
|
1428
|
+
u({ type: "setActualItemsSize", childrenSizes: d });
|
|
1412
1429
|
});
|
|
1413
|
-
|
|
1430
|
+
Xe(m);
|
|
1414
1431
|
});
|
|
1415
|
-
}),
|
|
1416
|
-
getId: () =>
|
|
1417
|
-
getPixelSizes: () => zt(
|
|
1418
|
-
getPercentageSizes: () => It(
|
|
1419
|
-
getTemplate: () =>
|
|
1420
|
-
...
|
|
1421
|
-
items:
|
|
1432
|
+
}), X(() => (u({ type: "unlockGroup" }), () => u({ type: "lockGroup" }))), t({
|
|
1433
|
+
getId: () => i,
|
|
1434
|
+
getPixelSizes: () => zt(v.value),
|
|
1435
|
+
getPercentageSizes: () => It(v.value),
|
|
1436
|
+
getTemplate: () => de({
|
|
1437
|
+
...v.value,
|
|
1438
|
+
items: K(v.value)
|
|
1422
1439
|
}),
|
|
1423
|
-
getState: () =>
|
|
1424
|
-
setSizes: (
|
|
1425
|
-
var
|
|
1426
|
-
for (let p = 0; p <
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1440
|
+
getState: () => c.current === "idle" ? "idle" : "dragging",
|
|
1441
|
+
setSizes: (m) => {
|
|
1442
|
+
var d;
|
|
1443
|
+
for (let p = 0; p < m.length; p++) {
|
|
1444
|
+
const g = (d = v.value) == null ? void 0 : d.items[p], h = m[p];
|
|
1445
|
+
g && S(g) && h && u({
|
|
1429
1446
|
type: "setPanelPixelSize",
|
|
1430
|
-
panelId:
|
|
1431
|
-
size:
|
|
1447
|
+
panelId: g.id,
|
|
1448
|
+
size: h
|
|
1432
1449
|
});
|
|
1433
1450
|
}
|
|
1434
1451
|
}
|
|
1435
|
-
}), (
|
|
1436
|
-
id:
|
|
1452
|
+
}), (m, d) => (Se(), Pe("div", Ee(n, {
|
|
1453
|
+
id: Ye(i),
|
|
1437
1454
|
ref_key: "elementRef",
|
|
1438
|
-
ref:
|
|
1455
|
+
ref: l,
|
|
1439
1456
|
"data-panel-group-wrapper": "",
|
|
1440
1457
|
style: s.value
|
|
1441
1458
|
}), [
|
|
1442
|
-
|
|
1459
|
+
Ce(m.$slots, "default")
|
|
1443
1460
|
], 16, kt));
|
|
1444
1461
|
}
|
|
1445
|
-
}), Bt = ["tabindex"], Ot = /* @__PURE__ */
|
|
1462
|
+
}), Bt = ["tabindex"], Ot = /* @__PURE__ */ Ie({
|
|
1446
1463
|
__name: "PanelResizer",
|
|
1447
1464
|
props: {
|
|
1448
1465
|
disabled: { type: Boolean },
|
|
@@ -1454,94 +1471,94 @@ const Kt = /* @__PURE__ */ be({
|
|
|
1454
1471
|
id: {}
|
|
1455
1472
|
},
|
|
1456
1473
|
setup(e) {
|
|
1457
|
-
const t =
|
|
1474
|
+
const t = Ke(e, ["size", "id", "onDragStart", "onDrag", "onDragEnd", "disabled"]), a = e.id || ye(), r = Y("send"), i = Y("state"), l = Y("isPrerender"), o = () => gt({ size: e.size, id: a }), u = H(() => {
|
|
1458
1475
|
var p;
|
|
1459
|
-
const
|
|
1460
|
-
if (!(!
|
|
1461
|
-
return
|
|
1476
|
+
const d = (p = i == null ? void 0 : i.value) == null ? void 0 : p.items.find((g) => g.id === a);
|
|
1477
|
+
if (!(!d || !D(d)))
|
|
1478
|
+
return d;
|
|
1462
1479
|
});
|
|
1463
1480
|
let c = !1;
|
|
1464
|
-
|
|
1465
|
-
var z,
|
|
1466
|
-
if (!((z =
|
|
1467
|
-
const p = document.getElementById((
|
|
1481
|
+
u.value || (l != null && l.value ? r == null || r({ type: "registerPanelHandle", data: o() }) : c = !0), X(() => {
|
|
1482
|
+
var z, b;
|
|
1483
|
+
if (!((z = i == null ? void 0 : i.value) == null ? void 0 : z.groupId) || !c) return;
|
|
1484
|
+
const p = document.getElementById((b = i == null ? void 0 : i.value) == null ? void 0 : b.groupId);
|
|
1468
1485
|
if (!p) return;
|
|
1469
|
-
const
|
|
1470
|
-
if (!
|
|
1471
|
-
const
|
|
1472
|
-
typeof
|
|
1486
|
+
const g = document.getElementById(a);
|
|
1487
|
+
if (!g) return;
|
|
1488
|
+
const h = Array.from(p.children).indexOf(g);
|
|
1489
|
+
typeof h == "number" && (r == null || r({
|
|
1473
1490
|
type: "registerPanelHandle",
|
|
1474
|
-
data: { ...
|
|
1491
|
+
data: { ...o(), order: h }
|
|
1475
1492
|
}), c = !1);
|
|
1476
1493
|
});
|
|
1477
|
-
const
|
|
1478
|
-
() => !c && ht(
|
|
1494
|
+
const v = H(
|
|
1495
|
+
() => !c && ht(o(), u.value)
|
|
1479
1496
|
);
|
|
1480
1497
|
ue(() => {
|
|
1481
|
-
|
|
1498
|
+
v.value && (r == null || r({ type: "updateConstraints", data: o() }));
|
|
1482
1499
|
}), Be(() => {
|
|
1483
|
-
requestAnimationFrame(() =>
|
|
1500
|
+
requestAnimationFrame(() => r == null ? void 0 : r({ type: "unregisterPanelHandle", id: a }));
|
|
1484
1501
|
});
|
|
1485
|
-
const { moveProps:
|
|
1502
|
+
const { moveProps: s } = Dt({
|
|
1486
1503
|
onMoveStart: () => {
|
|
1487
|
-
var
|
|
1488
|
-
|
|
1504
|
+
var d;
|
|
1505
|
+
r == null || r({ type: "dragHandleStart", handleId: a }), (d = e.onDragStart) == null || d.call(e), i != null && i.value && (document.body.style.cursor = Re(i == null ? void 0 : i.value) || "auto");
|
|
1489
1506
|
},
|
|
1490
|
-
onMove: (
|
|
1507
|
+
onMove: (d) => {
|
|
1491
1508
|
var p;
|
|
1492
|
-
|
|
1509
|
+
r == null || r({ type: "dragHandle", handleId: a, value: d }), (p = e.onDrag) == null || p.call(e);
|
|
1493
1510
|
},
|
|
1494
1511
|
onMoveEnd: () => {
|
|
1495
|
-
var
|
|
1496
|
-
|
|
1512
|
+
var d;
|
|
1513
|
+
r == null || r({ type: "dragHandleEnd", handleId: a }), (d = e.onDragEnd) == null || d.call(e), document.body.style.cursor = "auto";
|
|
1497
1514
|
}
|
|
1498
|
-
}),
|
|
1499
|
-
if (
|
|
1515
|
+
}), f = (d) => {
|
|
1516
|
+
if (i != null && i.value)
|
|
1500
1517
|
try {
|
|
1501
|
-
const p = vt(
|
|
1502
|
-
|
|
1518
|
+
const p = vt(i == null ? void 0 : i.value, a);
|
|
1519
|
+
d.key === "Enter" && p && (p.collapsed ? r == null || r({ type: "expandPanel", panelId: p.id }) : r == null || r({ type: "collapsePanel", panelId: p.id }));
|
|
1503
1520
|
} catch {
|
|
1504
1521
|
}
|
|
1505
|
-
},
|
|
1506
|
-
var
|
|
1507
|
-
const
|
|
1508
|
-
if (!
|
|
1509
|
-
const p = (z =
|
|
1510
|
-
return !
|
|
1522
|
+
}, m = H(() => {
|
|
1523
|
+
var h, z, b, P, x, R, E, L, M;
|
|
1524
|
+
const d = (h = i == null ? void 0 : i.value) == null ? void 0 : h.items.findIndex((w) => w.id === a);
|
|
1525
|
+
if (!d) return { id: a };
|
|
1526
|
+
const p = (z = i == null ? void 0 : i.value) == null ? void 0 : z.items[d], g = (b = i == null ? void 0 : i.value) == null ? void 0 : b.items[d - 1];
|
|
1527
|
+
return !g || !S(g) ? { id: a } : {
|
|
1511
1528
|
...t,
|
|
1512
1529
|
...Vt({
|
|
1513
|
-
groupId: (
|
|
1514
|
-
id:
|
|
1515
|
-
orientation: ((
|
|
1516
|
-
isDragging: ((
|
|
1517
|
-
activeDragHandleId: (
|
|
1530
|
+
groupId: (P = i == null ? void 0 : i.value) == null ? void 0 : P.groupId,
|
|
1531
|
+
id: a,
|
|
1532
|
+
orientation: ((x = i == null ? void 0 : i.value) == null ? void 0 : x.orientation) || "horizontal",
|
|
1533
|
+
isDragging: ((R = i == null ? void 0 : i.value) == null ? void 0 : R.activeDragHandleId) === a,
|
|
1534
|
+
activeDragHandleId: (E = i == null ? void 0 : i.value) == null ? void 0 : E.activeDragHandleId,
|
|
1518
1535
|
disabled: e.disabled,
|
|
1519
|
-
controlsId:
|
|
1520
|
-
min:
|
|
1521
|
-
max:
|
|
1522
|
-
currentValue:
|
|
1523
|
-
groupSize: V(
|
|
1536
|
+
controlsId: g.id,
|
|
1537
|
+
min: g.min,
|
|
1538
|
+
max: g.max,
|
|
1539
|
+
currentValue: g.currentValue,
|
|
1540
|
+
groupSize: V(i.value)
|
|
1524
1541
|
}),
|
|
1525
|
-
onpointerdown: e.disabled ? void 0 :
|
|
1542
|
+
onpointerdown: e.disabled ? void 0 : s.onPointerDown,
|
|
1526
1543
|
onkeydown: e.disabled ? void 0 : (w) => {
|
|
1527
|
-
|
|
1544
|
+
s.onKeyDown(w), f(w);
|
|
1528
1545
|
},
|
|
1529
1546
|
style: {
|
|
1530
|
-
cursor:
|
|
1531
|
-
width: ((L =
|
|
1532
|
-
height: ((M =
|
|
1547
|
+
cursor: i != null && i.value ? Re(i.value) : void 0,
|
|
1548
|
+
width: ((L = i == null ? void 0 : i.value) == null ? void 0 : L.orientation) === "horizontal" ? `${p == null ? void 0 : p.size.value.toNumber()}px` : "100%",
|
|
1549
|
+
height: ((M = i == null ? void 0 : i.value) == null ? void 0 : M.orientation) === "vertical" ? `${p == null ? void 0 : p.size.value.toNumber()}px` : "100%"
|
|
1533
1550
|
}
|
|
1534
1551
|
};
|
|
1535
1552
|
});
|
|
1536
|
-
return (
|
|
1537
|
-
tabindex:
|
|
1553
|
+
return (d, p) => (Se(), Pe("div", Ee(m.value, {
|
|
1554
|
+
tabindex: d.disabled ? -1 : 0
|
|
1538
1555
|
}), [
|
|
1539
|
-
|
|
1556
|
+
Ce(d.$slots, "default")
|
|
1540
1557
|
], 16, Bt));
|
|
1541
1558
|
}
|
|
1542
1559
|
});
|
|
1543
1560
|
export {
|
|
1544
|
-
|
|
1561
|
+
Et as Panel,
|
|
1545
1562
|
Nt as PanelGroup,
|
|
1546
1563
|
Ot as PanelResizer
|
|
1547
1564
|
};
|