@window-splitter/vue 1.1.1 → 1.1.3

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