virtua 0.52.10 → 0.53.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.
Files changed (55) hide show
  1. package/README.md +286 -193
  2. package/lib/angular/VList.d.ts +3 -1
  3. package/lib/angular/VMasonry.d.ts +114 -0
  4. package/lib/angular/Virtualizer.d.ts +3 -1
  5. package/lib/angular/WindowVirtualizer.d.ts +3 -1
  6. package/lib/angular/index.d.ts +1 -0
  7. package/lib/angular/index.js +733 -352
  8. package/lib/angular/index.js.map +1 -1
  9. package/lib/core/index.cjs +180 -104
  10. package/lib/core/index.cjs.map +1 -1
  11. package/lib/core/index.d.ts +1 -0
  12. package/lib/core/index.js +257 -181
  13. package/lib/core/index.js.map +1 -1
  14. package/lib/core/layouts/masonry.d.ts +1 -0
  15. package/lib/index.cjs +555 -385
  16. package/lib/index.cjs.map +1 -1
  17. package/lib/index.js +572 -404
  18. package/lib/index.js.map +1 -1
  19. package/lib/react/VMasonry.d.ts +105 -0
  20. package/lib/react/Virtualizer.d.ts +3 -1
  21. package/lib/react/WindowVirtualizer.d.ts +3 -1
  22. package/lib/react/index.d.ts +2 -0
  23. package/lib/react/types.d.ts +1 -1
  24. package/lib/solid/VMasonry.d.ts +107 -0
  25. package/lib/solid/Virtualizer.d.ts +3 -1
  26. package/lib/solid/WindowVirtualizer.d.ts +3 -1
  27. package/lib/solid/index.cjs +720 -514
  28. package/lib/solid/index.cjs.map +1 -1
  29. package/lib/solid/index.d.ts +2 -0
  30. package/lib/solid/index.js +691 -494
  31. package/lib/solid/index.js.map +1 -1
  32. package/lib/solid/index.jsx +329 -8
  33. package/lib/solid/index.jsx.map +1 -1
  34. package/lib/solid/types.d.ts +1 -1
  35. package/lib/svelte/MasonryItem.svelte +49 -0
  36. package/lib/svelte/VGrid.svelte +1 -1
  37. package/lib/svelte/VList.svelte +1 -1
  38. package/lib/svelte/VMasonry.svelte +182 -0
  39. package/lib/svelte/VMasonry.type.d.ts +104 -0
  40. package/lib/svelte/Virtualizer.svelte +1 -1
  41. package/lib/svelte/Virtualizer.type.d.ts +3 -1
  42. package/lib/svelte/WindowVirtualizer.svelte +1 -1
  43. package/lib/svelte/WindowVirtualizer.type.d.ts +3 -1
  44. package/lib/svelte/index.d.ts +2 -0
  45. package/lib/svelte/index.js +2 -1
  46. package/lib/svelte/types.d.ts +2 -2
  47. package/lib/vue/VMasonry.d.ts +110 -0
  48. package/lib/vue/Virtualizer.d.ts +3 -1
  49. package/lib/vue/WindowVirtualizer.d.ts +3 -1
  50. package/lib/vue/index.cjs +625 -403
  51. package/lib/vue/index.cjs.map +1 -1
  52. package/lib/vue/index.d.ts +2 -0
  53. package/lib/vue/index.js +672 -455
  54. package/lib/vue/index.js.map +1 -1
  55. package/package.json +6 -16
package/lib/vue/index.cjs CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, {
4
4
 
5
5
  let e = require("vue");
6
6
 
7
- var t, o = [], {min: r, max: n, abs: s, floor: l} = Math, i = (e, t, o) => r(o, n(t, e)), c = e => e.sort((e, t) => e - t), a = setTimeout, u = clearTimeout, f = "function" == typeof queueMicrotask ? queueMicrotask : e => {
7
+ var t, o = [], {min: r, max: n, abs: s, floor: l} = Math, i = (e, t, o) => r(o, n(t, e)), c = e => e.sort((e, t) => e - t), u = setTimeout, a = clearTimeout, f = "function" == typeof queueMicrotask ? queueMicrotask : e => {
8
8
  Promise.resolve().then(e);
9
9
  }, d = () => {
10
10
  let e;
@@ -12,14 +12,14 @@ var t, o = [], {min: r, max: n, abs: s, floor: l} = Math, i = (e, t, o) => r(o,
12
12
  e = t;
13
13
  }), e ];
14
14
  }, p = e => e.ownerDocument, m = e => e.defaultView, _ = () => (null == t && (t = /iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0),
15
- t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S: u, v: f, I: d, k: p}, m = 0) => {
16
- let g = !!m, $ = 1, h = 0, w = 0, y = 0, S = 0, b = 0, x = 0, z = 0, v = 0, I = null, k = [ 0, g ? n(m - 1, 0) : -1 ], O = !1;
17
- const T = /* @__PURE__ */ new Set, R = () => y - w, M = () => R() + b + S, N = e => o(e) - b, E = e => {
15
+ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: u, S: a, v: f, I: d, k: p}, m = 0) => {
16
+ let g = !!m, $ = 1, h = 0, y = 0, w = 0, S = 0, b = 0, x = 0, z = 0, v = 0, I = null, k = [ 0, g ? n(m - 1, 0) : -1 ], O = !1;
17
+ const T = /* @__PURE__ */ new Set, R = () => w - y, E = () => R() + b + S, N = e => o(e) - b, A = e => {
18
18
  if (2 === v) return !0;
19
19
  if (I && 1 === v) return e < I[0];
20
20
  const t = R(), o = N(e), r = l(e);
21
21
  return 1 !== z && 0 === v ? o + r <= t : o < t && o + r < t + h;
22
- }, A = e => {
22
+ }, M = e => {
23
23
  e && (_() && 0 !== z || I && 1 === v ? b += e : S += e);
24
24
  };
25
25
  return {
@@ -31,24 +31,24 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
31
31
  if (!O || g) return k;
32
32
  let o, s;
33
33
  if (x) [o, s] = k; else {
34
- let l = n(0, M()), i = l + h;
34
+ let l = n(0, E()), i = l + h;
35
35
  f() || (t = n(0, t), 1 !== z && (l -= t), 2 !== z && (i += t)), [o, s] = k = e(n(0, l), n(0, i)),
36
36
  I && (o = r(o, I[0]), s = n(s, I[1]));
37
37
  }
38
- return [ n(o, 0), r(s, a() - 1) ];
38
+ return [ n(o, 0), r(s, u() - 1) ];
39
39
  },
40
- R: e => t(e - w),
41
- M: i,
40
+ R: e => t(e - y),
41
+ N: i,
42
42
  u: N,
43
43
  p: l,
44
- N: a,
45
- A: () => y,
46
- C: () => 0 !== z,
44
+ A: u,
45
+ M: () => w,
46
+ q: () => 0 !== z,
47
47
  o: () => h,
48
- j: () => w,
48
+ C: () => y,
49
49
  t: c,
50
- q: () => (x = S, S = 0, [ x, 2 === v ]),
51
- P: (e, t) => {
50
+ j: () => (x = S, S = 0, [ x, 2 === v ]),
51
+ L: (e, t) => {
52
52
  const o = [ e, t ];
53
53
  return T.add(o), () => {
54
54
  T.delete(o);
@@ -59,11 +59,11 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
59
59
  switch (t) {
60
60
  case 1:
61
61
  {
62
- if (o === y && 0 === v) break;
62
+ if (o === w && 0 === v) break;
63
63
  const e = x;
64
64
  x = 0;
65
- const t = o - y, r = s(t);
66
- e && r < s(e) + 1 || 0 !== v || (z = t < 0 ? 2 : 1), g && (g = !1), y = o, l = 4;
65
+ const t = o - w, r = s(t);
66
+ e && r < s(e) + 1 || 0 !== v || (z = t < 0 ? 2 : 1), g && (g = !1), w = o, l = 4;
67
67
  const i = R();
68
68
  i >= -h && i <= c() && (l += 1, n = r > h);
69
69
  break;
@@ -77,7 +77,7 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
77
77
  {
78
78
  const e = o.filter(([e, t]) => !i(e, t));
79
79
  if (!e.length) break;
80
- A(d(e, E, M(), h)), l = 3, n = !0;
80
+ M(d(e, A, E(), h)), l = 3, n = !0;
81
81
  break;
82
82
  }
83
83
 
@@ -86,11 +86,11 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
86
86
  break;
87
87
 
88
88
  case 5:
89
- o[1] ? (A(u(o[0], !0)), v = 2, l = 1) : (u(o[0]), l = 1);
89
+ o[1] ? (M(a(o[0], !0)), v = 2, l = 1) : (a(o[0]), l = 1);
90
90
  break;
91
91
 
92
92
  case 6:
93
- w = o;
93
+ y = o;
94
94
  break;
95
95
 
96
96
  case 7:
@@ -99,8 +99,8 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
99
99
 
100
100
  case 9:
101
101
  {
102
- const e = p(o, M());
103
- null != e && (A(e), l = 3);
102
+ const e = p(o, E());
103
+ null != e && (M(e), l = 3);
104
104
  break;
105
105
  }
106
106
 
@@ -116,15 +116,15 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
116
116
  const r = o ? "unshift" : "push";
117
117
  for (let o = 0; o < t; o++) e[r](-1);
118
118
  return e;
119
- }, w = (e, t, o, r = 0, n = t - 1) => {
119
+ }, y = (e, t, o, r = 0, n = t - 1) => {
120
120
  let s = r;
121
121
  for (;r <= n; ) {
122
122
  const t = l((r + n) / 2);
123
123
  e(t) <= o ? (s = t, r = t + 1) : n = t - 1;
124
124
  }
125
125
  return i(s, 0, t - 1);
126
- }, y = (e, t, o) => {
127
- let s = o && o[1] || t || 40, l = -1, i = 0, a = !t, u = 0;
126
+ }, w = (e, t, o) => {
127
+ let s = o && o[1] || t || 40, l = -1, i = 0, u = !t, a = 0;
128
128
  const f = o && o[0], d = f ? h(f.slice(0, r(e, f.length)), n(0, e - f.length)) : h([], e), p = h([], e + 1), m = e => {
129
129
  const t = d[e];
130
130
  return -1 === t ? s : t;
@@ -139,24 +139,24 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
139
139
  return {
140
140
  l: (t, o) => {
141
141
  let n, s;
142
- return u = r(u, e - 1), _(u) <= t ? (s = w(_, e, o, u), n = w(_, e, t, u, s)) : (n = w(_, e, t, void 0, u),
143
- s = w(_, e, o, n)), u = n, [ n, s ];
142
+ return a = r(a, e - 1), _(a) <= t ? (s = y(_, e, o, a), n = y(_, e, t, a, s)) : (n = y(_, e, t, void 0, a),
143
+ s = y(_, e, o, n)), a = n, [ n, s ];
144
144
  },
145
- i: t => w(_, e, t),
145
+ i: t => y(_, e, t),
146
146
  u: _,
147
147
  p: m,
148
148
  m: (e, t = -1) => d[e] === t,
149
- I: (t, o, u, f) => {
149
+ I: (t, o, a, f) => {
150
150
  let p = t.reduce((e, [t, r]) => o(t) ? e + (r - m(t)) : e, 0);
151
151
  for (const [e, o] of t) i += -1 === d[e] ? o : o - m(e), d[e] = o, l = r(e, l);
152
- if (a && f && i > f) {
152
+ if (u && f && i > f) {
153
153
  let t = 0;
154
- const o = w(_, e, u + p), r = [];
154
+ const o = y(_, e, a + p), r = [];
155
155
  d.forEach((e, n) => {
156
156
  -1 !== e && (e && r.push(e), n < o && t++);
157
157
  }), l = -1, c(r);
158
158
  const i = r.length, f = i / 2 | 0, m = i % 2 == 0 ? (r[f - 1] + r[f]) / 2 : r[f], g = s;
159
- p += ((s = m) - g) * n(o - t, 0), a = !1;
159
+ p += ((s = m) - g) * n(o - t, 0), u = !1;
160
160
  }
161
161
  return p;
162
162
  },
@@ -167,32 +167,32 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
167
167
  return l = o ? -1 : r(t - 1, l), e = t, n > 0 ? (h(p, n), h(d, n, o), s * n) : (p.splice(n),
168
168
  (o ? d.splice(0, -n) : d.splice(n)).reduce((e, t) => e - (-1 === t ? s : t), 0));
169
169
  },
170
- v: () => a,
171
- H: () => [ d.slice(), s ]
170
+ v: () => u,
171
+ P: () => [ d.slice(), s ]
172
172
  };
173
173
  }, S = e => "number" == typeof e ? e : e.length, b = (e, t) => "number" == typeof e ? t : e[t], x = (e, t, o = 0) => {
174
174
  let s = S(e);
175
- const a = "number" == typeof t, u = "auto" === t;
176
- let f = (a ? t : 40) + o, d = -1, p = 0, m = u, _ = 0, g = 0, $ = null;
177
- const y = [], b = [], x = [], z = e => u || !!x[e], v = () => {
178
- y.length || h(y, s);
175
+ const u = "number" == typeof t, a = "auto" === t;
176
+ let f = (u ? t : 40) + o, d = -1, p = 0, m = a, _ = 0, g = 0, $ = null;
177
+ const w = [], b = [], x = [], z = e => a || !!x[e], v = () => {
178
+ w.length || h(w, s);
179
179
  }, I = e => {
180
- const t = y[e];
180
+ const t = w[e];
181
181
  return -1 === t ? f : t;
182
182
  }, k = e => {
183
183
  if (!s) return 0;
184
- if (!y.length) return e * f;
184
+ if (!w.length) return e * f;
185
185
  if (d >= e) return b[e];
186
186
  d < 0 && (b[0] = 0, d = 0);
187
187
  let t = d, o = b[t];
188
188
  for (;t < e; ) o += I(t), b[++t] = o;
189
189
  return d = e, o;
190
190
  }, O = (e, t) => {
191
- y[e] = t, d = r(e, d);
192
- }, T = e => y.length ? w(k, s, e) : f ? i(l(e / f), 0, s - 1) : 0, R = () => r(_, s), M = () => n(s - g, R()), N = e => (y.length ? I(e) : f) - o;
191
+ w[e] = t, d = r(e, d);
192
+ }, T = e => w.length ? y(k, s, e) : f ? i(l(e / f), 0, s - 1) : 0, R = () => r(_, s), E = () => n(s - g, R()), N = e => (w.length ? I(e) : f) - o;
193
193
  return {
194
194
  l: (e, t) => {
195
- const r = k(R()), l = k(s) - k(M()), i = e + (r ? r - o : 0);
195
+ const r = k(R()), l = k(s) - k(E()), i = e + (r ? r - o : 0);
196
196
  return [ T(i), T(n(i, t - (l ? l - o : 0))) ];
197
197
  },
198
198
  i: T,
@@ -200,36 +200,36 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
200
200
  p: N,
201
201
  I: (e, t, r, s) => {
202
202
  let l = e.reduce((e, [o, r]) => z(o) && t(o) ? e + (r - N(o)) : e, 0);
203
- for (const [t, r] of e) z(t) && (v(), p += -1 === y[t] ? r : r - N(t), O(t, r + o));
203
+ for (const [t, r] of e) z(t) && (v(), p += -1 === w[t] ? r : r - N(t), O(t, r + o));
204
204
  if (m && s && p > s) {
205
205
  let e = 0;
206
206
  const t = T(r + l), o = [];
207
- y.forEach((r, n) => {
207
+ w.forEach((r, n) => {
208
208
  -1 !== r && (r && o.push(r), n < t && e++);
209
209
  }), d = -1, c(o);
210
- const s = o.length, i = s / 2 | 0, a = s % 2 == 0 ? (o[i - 1] + o[i]) / 2 : o[i], u = f;
211
- l += ((f = a) - u) * n(t - e, 0), m = !1;
210
+ const s = o.length, i = s / 2 | 0, u = s % 2 == 0 ? (o[i - 1] + o[i]) / 2 : o[i], a = f;
211
+ l += ((f = u) - a) * n(t - e, 0), m = !1;
212
212
  }
213
213
  return l;
214
214
  },
215
215
  m: (e, t = -1) => {
216
- const r = y.length ? y[e] : -1;
216
+ const r = w.length ? w[e] : -1;
217
217
  return -1 === t ? z(e) && -1 === r : r === t + o;
218
218
  },
219
219
  t: () => s ? k(s) - o : 0,
220
220
  h: () => s,
221
221
  S: e => {
222
222
  const t = e - s;
223
- return d = r(e - 1, d), s = e, y.length && (t > 0 ? h(y, t) : y.splice(t)), 0;
223
+ return d = r(e - 1, d), s = e, w.length && (t > 0 ? h(w, t) : w.splice(t)), 0;
224
224
  },
225
225
  v: () => m,
226
- L: z,
227
- W: (e = 0, t = 0) => {
226
+ V: z,
227
+ H: (e = 0, t = 0) => {
228
228
  _ = e, g = t;
229
229
  },
230
- V: R,
231
- F: M,
232
- X: (e, t) => "number" == typeof t ? a ? t : null : a || u || "auto" === t ? null : e.map(e => null != e ? e[t] : null),
230
+ W: R,
231
+ F: E,
232
+ Y: (e, t) => "number" == typeof t ? u ? t : null : u || a || "auto" === t ? null : e.map(e => null != e ? e[t] : null),
233
233
  k: (e, t) => {
234
234
  if (null == e) return;
235
235
  if ("number" == typeof e) {
@@ -247,7 +247,7 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
247
247
  if (!n || !x[t]) {
248
248
  x[t] = n;
249
249
  const e = n ? -1 : r + o;
250
- y[t] !== e && (O(t, e), l = !0);
250
+ w[t] !== e && (O(t, e), l = !0);
251
251
  }
252
252
  }
253
253
  return l ? k(r) - n : void 0;
@@ -280,21 +280,21 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
280
280
  k(l, e, i, s, n);
281
281
  for (let e = s; e < t; e++) l.push(e);
282
282
  return l;
283
- }, T = (e, t) => r(e.rowIndex + (e.rowSpan || 1), t), R = (e, t) => r(e.colIndex + (e.colSpan || 1), t), M = (e, t, o, n, s, l) => {
283
+ }, T = (e, t) => r(e.rowIndex + (e.rowSpan || 1), t), R = (e, t) => r(e.colIndex + (e.colSpan || 1), t), E = (e, t, o, n, s, l) => {
284
284
  const i = t.length, c = n.length;
285
- let a = "[l0]", u = 0, f = 0, d = 0;
286
- for (;u < l; ) {
287
- for (;d < c && n[d] <= u; ) d++;
285
+ let u = "[l0]", a = 0, f = 0, d = 0;
286
+ for (;a < l; ) {
287
+ for (;d < c && n[d] <= a; ) d++;
288
288
  const p = f < i ? t[f] : l;
289
289
  let m, _;
290
- if (p === u) {
291
- m = u + 1;
290
+ if (p === a) {
291
+ m = a + 1;
292
292
  const t = o[f];
293
- _ = null == t ? e.p(u) + "px" : t ? s : "minmax(" + e.p(u) + "px,auto)", f++;
294
- } else m = r(p, d < c ? n[d] : l), _ = "minmax(" + (e.u(m - 1) + e.p(m - 1) - e.u(u)) + "px,auto)";
295
- a += " " + _ + " [l" + m + "]", u = m;
293
+ _ = null == t ? e.p(a) + "px" : t ? s : "minmax(" + e.p(a) + "px,auto)", f++;
294
+ } else m = r(p, d < c ? n[d] : l), _ = "minmax(" + (e.u(m - 1) + e.p(m - 1) - e.u(a)) + "px,auto)";
295
+ u += " " + _ + " [l" + m + "]", a = m;
296
296
  }
297
- return a;
297
+ return u;
298
298
  }, N = (e, t, o, r, n) => {
299
299
  const s = {
300
300
  display: "grid",
@@ -304,10 +304,10 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
304
304
  gridRow: "l" + e + "/l" + t
305
305
  };
306
306
  return null != o && (s.position = "sticky", s[r] = o + "px", s.zIndex = n), s;
307
- }, E = e => {
307
+ }, A = e => {
308
308
  let t;
309
309
  return {
310
- Y(o) {
310
+ X(o) {
311
311
  (t || (t = new (m(p(o)).ResizeObserver)(e))).observe(o);
312
312
  },
313
313
  J(e) {
@@ -317,22 +317,22 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
317
317
  t && t.disconnect();
318
318
  }
319
319
  };
320
- }, A = (e, t, o, r, n, s, l) => {
320
+ }, M = (e, t, o, r, n, s, l) => {
321
321
  let i, c, d = 0, p = !1, m = !1, g = !1, $ = !1;
322
- const h = Date.now, w = r ? "scrollLeft" : "scrollTop", y = r ? "left" : "top", S = e => n ? -e : e, b = () => S(o[w]), x = (e, t) => {
322
+ const h = Date.now, y = r ? "scrollLeft" : "scrollTop", w = r ? "left" : "top", S = e => n ? -e : e, b = () => S(o[y]), x = (e, t) => {
323
323
  o.scrollTo({
324
- [y]: S(e),
324
+ [w]: S(e),
325
325
  behavior: t ? "smooth" : "instant"
326
326
  });
327
327
  }, z = () => {
328
328
  if (p || m) return p = !1, void v();
329
329
  g = !1, e.B(2);
330
330
  }, v = () => {
331
- u(c), c = a(z, 150);
331
+ a(c), c = u(z, 150);
332
332
  }, I = () => {
333
333
  d = h(), g && ($ = !0), l && e.B(6, l()), e.B(1, b()), v();
334
334
  }, k = t => {
335
- if (p || !e.C() || t.ctrlKey) return;
335
+ if (p || !e.q() || t.ctrlKey) return;
336
336
  const o = h() - d;
337
337
  150 > o && 50 < o && (r ? t.deltaX : t.deltaY) && (p = !0);
338
338
  }, O = () => {
@@ -347,18 +347,18 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
347
347
  }), t.addEventListener("touchend", T, {
348
348
  passive: !0
349
349
  }), {
350
- U: I,
350
+ G: I,
351
351
  D: () => {
352
352
  t.removeEventListener("scroll", I), t.removeEventListener("wheel", k), t.removeEventListener("touchstart", O),
353
- t.removeEventListener("touchend", T), u(c);
353
+ t.removeEventListener("touchend", T), a(c);
354
354
  },
355
- G: () => {
356
- const [t, r] = e.q();
355
+ U: () => {
356
+ const [t, r] = e.j();
357
357
  if (!t) return;
358
358
  $ && s && s(), $ = !1;
359
- const n = e.A(), l = n + t, c = e.j() + e.t() - e.o();
359
+ const n = e.M(), l = n + t, c = e.C() + e.t() - e.o();
360
360
  l <= 0 || l >= c || n >= c ? x(l) : o.scrollBy({
361
- [y]: S(t),
361
+ [w]: S(t),
362
362
  behavior: "instant"
363
363
  }), r && (i && i(), e.o() > e.t() && e.B(1, b()));
364
364
  },
@@ -366,73 +366,109 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
366
366
  let r, n, s;
367
367
  i && i();
368
368
  const l = i = () => {
369
- r = !0, u(n), s && s();
369
+ r = !0, a(n), s && s();
370
370
  }, c = () => {
371
371
  if (!r) {
372
- if (e.o() && (u(n), n = a(l, 150)), o) {
373
- for (let [t, o] = e.l(0); t <= o; t++) if (e.M(t)) return;
372
+ if (e.o() && (a(n), n = u(l, 150)), o) {
373
+ for (let [t, o] = e.l(0); t <= o; t++) if (e.N(t)) return;
374
374
  l();
375
375
  }
376
376
  e.B(7), x(t(), o);
377
377
  }
378
- }, d = () => {
378
+ };
379
+ o && e.B(8, t()), (() => {
379
380
  if (r) return;
380
381
  let t;
381
- s = e.P(2, () => {
382
+ s = e.L(2, () => {
382
383
  t || (t = !0, f(() => {
383
384
  t = !1, c();
384
385
  }));
385
386
  }), c();
386
- };
387
- o ? (e.B(8, t()), f(d)) : d();
387
+ })();
388
388
  }
389
389
  };
390
+ }, q = (e, t) => {
391
+ let o, r, n = d(), s = !0;
392
+ const l = /* @__PURE__ */ new WeakMap, i = A(n => {
393
+ const i = [];
394
+ for (const {target: c, contentRect: {width: u, height: a}} of n) if (c === o) u || a ? (s || r.G(),
395
+ s = !0, e.B(4, t ? u : a)) : s = !1; else if (c.offsetParent) {
396
+ const e = l.get(c);
397
+ null != e && i.push([ e, t ? u : a ]);
398
+ }
399
+ i.length && e.B(3, i);
400
+ });
401
+ return {
402
+ Z(s, l = s.parentElement) {
403
+ i.X(o = l), r = M(e, l, l, t, t && "rtl" === getComputedStyle(l).direction, () => {
404
+ const e = t ? "overflowX" : "overflowY", o = l.style, r = o[e];
405
+ o[e] = "hidden", u(() => {
406
+ o[e] = r;
407
+ });
408
+ }), n[1](!0);
409
+ },
410
+ O() {
411
+ i.D(), r && r.D(), n[1](!1), n = d();
412
+ },
413
+ ee: (e, t) => (l.set(e, t), i.X(e), () => {
414
+ l.delete(e), i.J(e);
415
+ }),
416
+ async te(e, t) {
417
+ await n[0] && r.K(e, t);
418
+ },
419
+ oe() {
420
+ r && r.U();
421
+ },
422
+ re: e.C
423
+ };
390
424
  }, C = (e, t) => {
391
- e.Z(() => t);
392
- }, j = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
393
- if (o = i(o, 0, t.N() - 1), "nearest" === r) {
394
- const e = t.u(o), n = t.A();
425
+ e.te(() => t);
426
+ }, j = (e, t, o) => {
427
+ C(e, o + t.M());
428
+ }, L = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
429
+ if (o = i(o, 0, t.A() - 1), "nearest" === r) {
430
+ const e = t.u(o), n = t.M();
395
431
  if (e < n) r = "start"; else {
396
432
  if (!(e + t.p(o) > n + t.o())) return;
397
433
  r = "end";
398
434
  }
399
435
  }
400
- e.Z(() => s + e.ee() + t.u(o) + ("end" === r ? t.p(o) - t.o() : "center" === r ? (t.p(o) - t.o()) / 2 : 0), n);
401
- }, q = (e, t, o, s, l, c, a) => {
402
- const u = t.N(), f = o.V(), d = o.F();
403
- l = i(l, 0, u - 1);
404
- const p = v(s, f, d), m = I(p, l, d), _ = m < 0 ? -1 : p[m], g = () => o.u(f) + (_ < 0 || _ === l ? 0 : o.u(_ + 1) - o.u(_)), $ = () => o.u(u) - o.u(d);
436
+ e.te(() => s + e.re() + t.u(o) + ("end" === r ? t.p(o) - t.o() : "center" === r ? (t.p(o) - t.o()) / 2 : 0), n);
437
+ }, B = (e, t, o, s, l, c, u) => {
438
+ const a = t.A(), f = o.W(), d = o.F();
439
+ l = i(l, 0, a - 1);
440
+ const p = v(s, f, d), m = I(p, l, d), _ = m < 0 ? -1 : p[m], g = () => o.u(f) + (_ < 0 || _ === l ? 0 : o.u(_ + 1) - o.u(_)), $ = () => o.u(a) - o.u(d);
405
441
  if ("nearest" === c) {
406
442
  if (l < f || l >= d) return;
407
- const e = g(), o = t.A() + e, s = t.o() - e - $(), i = t.p(l);
408
- let a = t.u(l);
443
+ const e = g(), o = t.M() + e, s = t.o() - e - $(), i = t.p(l);
444
+ let u = t.u(l);
409
445
  if (_ === l) {
410
446
  const e = (m + 1 < p.length ? p[m + 1] : d) - 1;
411
- a = n(a, r(o, t.u(e) + t.p(e) - i));
447
+ u = n(u, r(o, t.u(e) + t.p(e) - i));
412
448
  }
413
- if (a < o) c = "start"; else {
414
- if (!(a + i > o + s)) return;
449
+ if (u < o) c = "start"; else {
450
+ if (!(u + i > o + s)) return;
415
451
  c = "end";
416
452
  }
417
453
  }
418
- e.Z(a, () => {
454
+ e.te(u, () => {
419
455
  const e = g(), o = t.p(l) - (t.o() - e - $());
420
456
  return t.u(l) - e + ("end" === c ? o : "center" === c ? o / 2 : 0);
421
457
  });
422
458
  }, P = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
423
- const o = (0, e.ref)(), r = (0, e.computed)(() => t.te.value && t.oe.u(t.re)), n = (0,
424
- e.computed)(() => t.te.value && t.oe.M(t.re)), s = (0, e.computed)(() => t.ne({
425
- item: t.se,
426
- index: t.re
459
+ const o = (0, e.ref)(), r = (0, e.computed)(() => t.ne.value && t.se.u(t.le)), n = (0,
460
+ e.computed)(() => t.ne.value && t.se.N(t.le)), s = (0, e.computed)(() => t.ie({
461
+ item: t.ce,
462
+ index: t.le
427
463
  }));
428
- return (0, e.watch)(() => o.value && t.re, (e, r, n) => {
429
- n(t.le(o.value, t.re));
464
+ return (0, e.watch)(() => o.value && t.le, (e, r, n) => {
465
+ n(t.ue(o.value, t.le));
430
466
  }, {
431
467
  flush: "post"
432
468
  }), () => {
433
- const {ie: l, ce: i, ae: c, re: a, se: u} = t, f = n.value, {style: d, ...p} = t.ue?.({
434
- item: u,
435
- index: a
469
+ const {ae: l, fe: i, de: c, le: u, ce: a} = t, f = n.value, {style: d, ...p} = t.pe?.({
470
+ item: a,
471
+ index: u
436
472
  }) || {}, m = {
437
473
  contain: "layout style",
438
474
  position: f && i ? void 0 : "absolute",
@@ -451,24 +487,24 @@ t), g = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, t: c, h: a, S:
451
487
  };
452
488
  }, {
453
489
  props: {
454
- te: null,
455
- oe: null,
456
490
  ne: null,
457
491
  se: null,
458
- le: null,
459
- re: null,
460
492
  ie: null,
461
493
  ce: null,
494
+ ue: null,
495
+ le: null,
462
496
  ae: null,
463
- ue: null
497
+ fe: null,
498
+ de: null,
499
+ pe: null
464
500
  }
465
- }), B = (e, t) => {
501
+ }), V = (e, t) => {
466
502
  if (1 === e.length) {
467
503
  const t = e[0].key;
468
504
  if (null != t) return t;
469
505
  }
470
506
  return "_" + t;
471
- }, H = (e, t) => e[0] === t[0] && e[1] === t[1], L = /* @__PURE__ */ /* @__PURE__ */ (0,
507
+ }, H = (e, t) => e[0] === t[0] && e[1] === t[1], W = /* @__PURE__ */ /* @__PURE__ */ (0,
472
508
  e.defineComponent)({
473
509
  props: {
474
510
  data: {
@@ -500,121 +536,86 @@ e.defineComponent)({
500
536
  emits: [ "scroll", "scrollEnd" ],
501
537
  setup(t, {emit: o, expose: r, slots: n}) {
502
538
  let s = !!t.ssrCount;
503
- const l = t.horizontal, i = (0, e.ref)(), u = y(t.data.length, t.itemSize, t.cache), f = $(u, t.ssrCount), p = ((e, t) => {
504
- let o, r, n = d(), s = !0;
505
- const l = /* @__PURE__ */ new WeakMap, i = E(n => {
506
- const i = [];
507
- for (const {target: c, contentRect: {width: a, height: u}} of n) if (c === o) a || u ? (s || r.U(),
508
- s = !0, e.B(4, t ? a : u)) : s = !1; else if (c.offsetParent) {
509
- const e = l.get(c);
510
- null != e && i.push([ e, t ? a : u ]);
511
- }
512
- i.length && e.B(3, i);
513
- });
514
- return {
515
- fe(s, l = s.parentElement) {
516
- i.Y(o = l), r = A(e, l, l, t, t && "rtl" === getComputedStyle(l).direction, () => {
517
- const e = t ? "overflowX" : "overflowY", o = l.style, r = o[e];
518
- o[e] = "hidden", a(() => {
519
- o[e] = r;
520
- });
521
- }), n[1](!0);
522
- },
523
- O() {
524
- i.D(), r && r.D(), n[1](!1), n = d();
525
- },
526
- de: (e, t) => (l.set(e, t), i.Y(e), () => {
527
- l.delete(e), i.J(e);
528
- }),
529
- async Z(e, t) {
530
- await n[0] && r.K(e, t);
531
- },
532
- pe() {
533
- r && r.G();
534
- },
535
- ee: e.j
536
- };
537
- })(f, l), m = (0, e.ref)(f.T());
538
- f.P(1, () => {
539
- m.value = f.T();
540
- }), f.P(4, () => {
541
- o("scroll", f.A());
542
- }), f.P(8, () => {
539
+ const l = t.horizontal, i = (0, e.ref)(), u = w(t.data.length, t.itemSize, t.cache), a = $(u, t.ssrCount), f = q(a, l), d = (0,
540
+ e.ref)(a.T());
541
+ a.L(1, () => {
542
+ d.value = a.T();
543
+ }), a.L(4, () => {
544
+ o("scroll", a.M());
545
+ }), a.L(8, () => {
543
546
  o("scrollEnd");
544
547
  });
545
- const _ = (0, e.computed)(e => {
546
- m.value;
547
- const o = f.l(t.bufferSize);
548
+ const p = (0, e.computed)(e => {
549
+ d.value;
550
+ const o = a.l(t.bufferSize);
548
551
  return e && H(e, o) ? e : o;
549
- }), h = (0, e.computed)(() => m.value && f.C()), w = (0, e.computed)(() => m.value && f.t());
552
+ }), m = (0, e.computed)(() => d.value && a.q()), _ = (0, e.computed)(() => d.value && a.t());
550
553
  return (0, e.onMounted)(() => {
551
554
  s = !1;
552
555
  const o = i.value, r = requestAnimationFrame(() => {
553
- p.fe(o, t.scrollRef);
556
+ f.Z(o, t.scrollRef);
554
557
  });
555
558
  (0, e.onUnmounted)(() => {
556
559
  cancelAnimationFrame(r);
557
560
  });
558
561
  }), (0, e.onUnmounted)(() => {
559
- f.O(), p.O();
562
+ a.O(), f.O();
560
563
  }), (0, e.watch)(() => t.data.length, e => {
561
- f.B(5, [ e, t.shift ]);
564
+ a.B(5, [ e, t.shift ]);
562
565
  }), (0, e.watch)(() => t.startMargin, e => {
563
- f.B(6, e);
566
+ a.B(6, e);
564
567
  }, {
565
568
  immediate: !0
566
- }), (0, e.watch)([ m ], () => {
567
- p.pe();
569
+ }), (0, e.watch)([ d ], () => {
570
+ f.oe();
568
571
  }, {
569
572
  flush: "post"
570
573
  }), r({
571
574
  get cache() {
572
- return u.H();
575
+ return u.P();
573
576
  },
574
577
  get scrollOffset() {
575
- return f.A();
578
+ return a.M();
576
579
  },
577
580
  get scrollSize() {
578
- return g(f);
581
+ return g(a);
579
582
  },
580
583
  get viewportSize() {
581
- return f.o();
584
+ return a.o();
582
585
  },
583
- findItemIndex: f.R,
584
- getItemOffset: f.u,
585
- getItemSize: f.p,
586
- scrollToIndex: (e, t) => j(p, f, e, t),
587
- scrollTo: e => C(p, e),
588
- scrollBy: e => ((e, t, o) => {
589
- C(e, o + t.A());
590
- })(p, f, e)
586
+ findItemIndex: a.R,
587
+ getItemOffset: a.u,
588
+ getItemSize: a.p,
589
+ scrollToIndex: (e, t) => L(f, a, e, t),
590
+ scrollTo: e => C(f, e),
591
+ scrollBy: e => j(f, a, e)
591
592
  }), () => {
592
- const o = t.as, r = t.item, a = w.value, u = [], d = o => {
593
+ const o = t.as, r = t.item, u = _.value, g = [], $ = o => {
593
594
  const i = n.default({
594
595
  item: t.data[o],
595
596
  index: o
596
597
  });
597
598
  return (0, e.createVNode)(P, {
598
- key: B(i, o),
599
- te: m,
600
- oe: f,
601
- le: p.de,
602
- re: o,
603
- ne: n.default,
604
- se: t.data[o],
605
- ie: l,
606
- ce: s,
607
- ae: r,
608
- ue: t.itemProps
609
- }, null, 8, [ "te", "oe", "le", "re", "ne", "se", "ie", "ce", "ae", "ue" ]);
599
+ key: V(i, o),
600
+ ne: d,
601
+ se: a,
602
+ ue: f.ee,
603
+ le: o,
604
+ ie: n.default,
605
+ ce: t.data[o],
606
+ ae: l,
607
+ fe: s,
608
+ de: r,
609
+ pe: t.itemProps
610
+ }, null, 8, [ "ne", "se", "ue", "le", "ie", "ce", "ae", "fe", "de", "pe" ]);
610
611
  };
611
612
  if (t.keepMounted) {
612
613
  const e = t.data.length, o = new Set(t.keepMounted);
613
- for (let [e, t] = _.value; e <= t; e++) o.add(e);
614
+ for (let [e, t] = p.value; e <= t; e++) o.add(e);
614
615
  c([ ...o ]).forEach(t => {
615
- t < e && u.push(d(t));
616
+ t < e && g.push($(t));
616
617
  });
617
- } else for (let [e, t] = _.value; e <= t; e++) u.push(d(e));
618
+ } else for (let [e, t] = p.value; e <= t; e++) g.push($(e));
618
619
  return (0, e.createVNode)(o, {
619
620
  ref: i,
620
621
  style: {
@@ -622,19 +623,19 @@ e.defineComponent)({
622
623
  overflowAnchor: "none",
623
624
  flex: "none",
624
625
  position: "relative",
625
- width: l ? a + "px" : "100%",
626
- height: l ? "100%" : a + "px",
627
- pointerEvents: h.value ? "none" : void 0
626
+ width: l ? u + "px" : "100%",
627
+ height: l ? "100%" : u + "px",
628
+ pointerEvents: m.value ? "none" : void 0
628
629
  }
629
- }, "function" == typeof (g = u) || "[object Object]" === Object.prototype.toString.call(g) && !(0,
630
- e.isVNode)(g) ? u : {
631
- default: () => [ u ],
630
+ }, "function" == typeof (h = g) || "[object Object]" === Object.prototype.toString.call(h) && !(0,
631
+ e.isVNode)(h) ? g : {
632
+ default: () => [ g ],
632
633
  _: 2
633
634
  }, 8, [ "style" ]);
634
- var g;
635
+ var h;
635
636
  };
636
637
  }
637
- }), W = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
638
+ }), F = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
638
639
  props: {
639
640
  data: {
640
641
  type: Array,
@@ -678,13 +679,13 @@ e.defineComponent)({
678
679
  }), () => {
679
680
  return (0, e.createVNode)("div", {
680
681
  style: {
681
- display: s ? "inline-block" : "block",
682
+ display: "block",
682
683
  [s ? "overflowX" : "overflowY"]: "auto",
683
684
  contain: "strict",
684
685
  width: "100%",
685
686
  height: "100%"
686
687
  }
687
- }, [ (0, e.createVNode)(L, {
688
+ }, [ (0, e.createVNode)(W, {
688
689
  ref: c,
689
690
  data: t.data,
690
691
  bufferSize: t.bufferSize,
@@ -701,11 +702,11 @@ e.defineComponent)({
701
702
  e.isVNode)(o) ? n : {
702
703
  default: () => [ n ],
703
704
  _: 2
704
- }), 8, [ "data", "bufferSize", "itemSize", "itemProps", "shift", "ssrCount", "horizontal", "keepMounted", "cache", "onScroll", "onScrollEnd" ]) ], 4);
705
+ }), 8, [ "data", "bufferSize", "itemSize", "itemProps", "shift", "ssrCount", "horizontal", "keepMounted", "cache", "onScroll", "onScrollEnd" ]) ]);
705
706
  var o;
706
707
  };
707
708
  }
708
- }), V = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
709
+ }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
709
710
  props: {
710
711
  data: {
711
712
  type: Array,
@@ -729,9 +730,9 @@ e.defineComponent)({
729
730
  emits: [ "scroll", "scrollEnd" ],
730
731
  setup(t, {emit: o, slots: r, expose: n}) {
731
732
  let s = !!t.ssrCount;
732
- const l = t.horizontal, i = (0, e.ref)(), c = y(t.data.length, t.itemSize, t.cache), a = $(c, t.ssrCount), u = ((e, t) => {
733
+ const l = t.horizontal, i = (0, e.ref)(), c = w(t.data.length, t.itemSize, t.cache), u = $(c, t.ssrCount), a = ((e, t) => {
733
734
  let o, r, n, s, l, i = d();
734
- const c = /* @__PURE__ */ new WeakMap, a = E(r => {
735
+ const c = /* @__PURE__ */ new WeakMap, u = A(r => {
735
736
  const n = [];
736
737
  for (const {target: e, contentRect: {width: s, height: i}} of r) if (e === o) l && l(); else if (e.offsetParent) {
737
738
  const o = c.get(e);
@@ -740,70 +741,70 @@ e.defineComponent)({
740
741
  n.length && e.B(3, n);
741
742
  });
742
743
  return {
743
- fe(c) {
744
- const u = p(c), f = m(u), d = o = u.scrollingElement, _ = t && "rtl" === getComputedStyle(d).direction, g = (e, t, o, r, n = 0) => {
744
+ Z(c) {
745
+ const a = p(c), f = m(a), d = o = a.scrollingElement, _ = t && "rtl" === getComputedStyle(d).direction, g = (e, t, o, r, n = 0) => {
745
746
  const s = r ? "offsetLeft" : "offsetTop", l = n + (_ ? t.clientWidth - e[s] - e.offsetWidth : e[s]), i = e.offsetParent;
746
747
  return e !== o && i ? g(i, t, o, r, l) : l;
747
- }, $ = s = () => g(c, d, u.body, t), h = l = () => {
748
+ }, $ = s = () => g(c, d, a.body, t), h = l = () => {
748
749
  e.B(4, d[t ? "clientWidth" : "clientHeight"]);
749
750
  };
750
- f.addEventListener("resize", h), a.Y(d), n = () => {
751
+ f.addEventListener("resize", h), u.X(d), n = () => {
751
752
  f.removeEventListener("resize", h);
752
- }, r = A(e, f, d, t, _, null, $), i[1](!0);
753
+ }, r = M(e, f, d, t, _, null, $), i[1](!0);
753
754
  },
754
755
  O() {
755
- n && n(), a.D(), r && r.D(), i[1](!1), i = d();
756
+ n && n(), u.D(), r && r.D(), i[1](!1), i = d();
756
757
  },
757
- de: (e, t) => (c.set(e, t), a.Y(e), () => {
758
- c.delete(e), a.J(e);
758
+ ee: (e, t) => (c.set(e, t), u.X(e), () => {
759
+ c.delete(e), u.J(e);
759
760
  }),
760
- async Z(e, t) {
761
+ async te(e, t) {
761
762
  await i[0] && r.K(e, t);
762
763
  },
763
- pe() {
764
- r && r.G();
764
+ oe() {
765
+ r && r.U();
765
766
  },
766
- ee: () => s()
767
+ re: () => s()
767
768
  };
768
- })(a, l), f = (0, e.ref)(a.T());
769
- a.P(1, () => {
770
- f.value = a.T();
771
- }), a.P(4, () => {
769
+ })(u, l), f = (0, e.ref)(u.T());
770
+ u.L(1, () => {
771
+ f.value = u.T();
772
+ }), u.L(4, () => {
772
773
  o("scroll");
773
- }), a.P(8, () => {
774
+ }), u.L(8, () => {
774
775
  o("scrollEnd");
775
776
  });
776
777
  const _ = (0, e.computed)(e => {
777
778
  f.value;
778
- const o = a.l(t.bufferSize);
779
+ const o = u.l(t.bufferSize);
779
780
  return e && H(e, o) ? e : o;
780
- }), g = (0, e.computed)(() => f.value && a.C()), h = (0, e.computed)(() => f.value && a.t());
781
+ }), g = (0, e.computed)(() => f.value && u.q()), h = (0, e.computed)(() => f.value && u.t());
781
782
  return (0, e.onMounted)(() => {
782
783
  s = !1;
783
784
  const e = i.value;
784
- e && u.fe(e);
785
+ e && a.Z(e);
785
786
  }), (0, e.onUnmounted)(() => {
786
- a.O(), u.O();
787
+ u.O(), a.O();
787
788
  }), (0, e.watch)(() => t.data.length, e => {
788
- a.B(5, [ e, t.shift ]);
789
+ u.B(5, [ e, t.shift ]);
789
790
  }), (0, e.watch)([ f ], () => {
790
- u.pe();
791
+ a.oe();
791
792
  }, {
792
793
  flush: "post"
793
794
  }), n({
794
795
  get cache() {
795
- return c.H();
796
+ return c.P();
796
797
  },
797
798
  get scrollOffset() {
798
- return a.A();
799
+ return u.M();
799
800
  },
800
801
  get viewportSize() {
801
- return a.o();
802
+ return u.o();
802
803
  },
803
- findItemIndex: a.R,
804
- getItemOffset: a.u,
805
- getItemSize: a.p,
806
- scrollToIndex: (e, t) => j(u, a, e, t)
804
+ findItemIndex: u.R,
805
+ getItemOffset: u.u,
806
+ getItemSize: u.p,
807
+ scrollToIndex: (e, t) => L(a, u, e, t)
807
808
  }), () => {
808
809
  const o = t.as, n = t.item, c = h.value, d = [];
809
810
  for (let [o, i] = _.value; o <= i; o++) {
@@ -812,17 +813,17 @@ e.defineComponent)({
812
813
  index: o
813
814
  });
814
815
  d.push((0, e.createVNode)(P, {
815
- key: B(i, o),
816
- te: f,
817
- oe: a,
818
- le: u.de,
819
- re: o,
820
- ne: r.default,
821
- se: t.data[o],
822
- ie: l,
823
- ce: s,
824
- ae: n
825
- }, null, 8, [ "te", "oe", "le", "re", "ne", "se", "ie", "ce", "ae" ]));
816
+ key: V(i, o),
817
+ ne: f,
818
+ se: u,
819
+ ue: a.ee,
820
+ le: o,
821
+ ie: r.default,
822
+ ce: t.data[o],
823
+ ae: l,
824
+ fe: s,
825
+ de: n
826
+ }, null, 8, [ "ne", "se", "ue", "le", "ie", "ce", "ae", "fe", "de" ]));
826
827
  }
827
828
  return (0, e.createVNode)(o, {
828
829
  ref: i,
@@ -843,14 +844,14 @@ e.defineComponent)({
843
844
  var p;
844
845
  };
845
846
  }
846
- }), F = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
847
+ }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
847
848
  const o = (0, e.ref)();
848
849
  return (0, e.watch)([ o, () => t._e.me, () => t._e.ge ], ([e, o, r], n, s) => {
849
- !e || null == o && null == r || s(t.le(e, o, r));
850
+ !e || null == o && null == r || s(t.ue(e, o, r));
850
851
  }, {
851
852
  flush: "post"
852
853
  }), () => {
853
- const {$e: r, he: n, we: s, ye: l, Se: i, be: c} = t._e;
854
+ const {$e: r, he: n, ye: s, we: l, Se: i, be: c} = t._e;
854
855
  return (0, e.createVNode)("div", {
855
856
  ref: o,
856
857
  role: l,
@@ -859,7 +860,7 @@ e.defineComponent)({
859
860
  "aria-colspan": s,
860
861
  "aria-sort": i,
861
862
  style: c
862
- }, [ t.ne({
863
+ }, [ t.ie({
863
864
  row: t.xe,
864
865
  col: t.ze,
865
866
  cell: {
@@ -871,57 +872,57 @@ e.defineComponent)({
871
872
  }, {
872
873
  props: {
873
874
  _e: null,
874
- ne: null,
875
+ ie: null,
875
876
  xe: null,
876
877
  ze: null,
877
878
  ve: null,
878
- le: null
879
+ ue: null
879
880
  }
880
- }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
881
+ }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
881
882
  const {Ie: o, ke: r, be: n} = t._e;
882
883
  return (0, e.createVNode)("div", {
883
884
  role: "row",
884
885
  "aria-rowindex": o + 1,
885
886
  style: n
886
- }, [ r.map(r => (0, e.createVNode)(F, {
887
+ }, [ r.map(r => (0, e.createVNode)(X, {
887
888
  key: r.$e,
888
889
  _e: r,
889
- ne: t.ne,
890
+ ie: t.ie,
890
891
  xe: t.xe,
891
892
  ze: b(t.Oe, r.$e),
892
893
  ve: o,
893
- le: t.le
894
- }, null, 8, [ "_e", "ne", "xe", "ze", "ve", "le" ])) ], 12, [ "aria-rowindex" ]);
894
+ ue: t.ue
895
+ }, null, 8, [ "_e", "ie", "xe", "ze", "ve", "ue" ])) ], 12, [ "aria-rowindex" ]);
895
896
  }, {
896
897
  props: {
897
898
  _e: null,
898
- ne: null,
899
+ ie: null,
899
900
  xe: null,
900
901
  Oe: null,
901
- le: null
902
+ ue: null
902
903
  }
903
- }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
904
+ }), D = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
904
905
  const {Te: o, be: r} = t._e;
905
906
  return (0, e.createVNode)("div", {
906
907
  role: "rowgroup",
907
908
  style: r
908
- }, [ o.map(o => (0, e.createVNode)(X, {
909
+ }, [ o.map(o => (0, e.createVNode)(J, {
909
910
  key: o.Ie,
910
911
  _e: o,
911
- ne: t.ne,
912
+ ie: t.ie,
912
913
  xe: b(t.Re, o.Ie),
913
914
  Oe: t.Oe,
914
- le: t.le
915
- }, null, 8, [ "_e", "ne", "xe", "Oe", "le" ])) ], 4);
915
+ ue: t.ue
916
+ }, null, 8, [ "_e", "ie", "xe", "Oe", "ue" ])) ], 4);
916
917
  }, {
917
918
  props: {
918
919
  _e: null,
919
- ne: null,
920
+ ie: null,
920
921
  Re: null,
921
922
  Oe: null,
922
- le: null
923
+ ue: null
923
924
  }
924
- }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
925
+ }), G = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
925
926
  props: {
926
927
  rows: {
927
928
  type: [ Number, Array ],
@@ -954,9 +955,9 @@ e.defineComponent)({
954
955
  ariaSort: Object
955
956
  },
956
957
  emits: [ "verticalScroll", "horizontalScroll", "scrollEnd" ],
957
- setup(t, {emit: s, expose: l, slots: u}) {
958
+ setup(t, {emit: s, expose: l, slots: a}) {
958
959
  const f = (0, e.ref)(), p = x(t.rows, t.rowHeight, t.gap), m = x(t.cols, t.colWidth, t.gap), _ = (0,
959
- e.computed)(() => p.X(t.rows, t.rowHeight)), h = (0, e.computed)(() => m.X(t.cols, t.colWidth)), w = (0,
960
+ e.computed)(() => p.Y(t.rows, t.rowHeight)), h = (0, e.computed)(() => m.Y(t.cols, t.colWidth)), y = (0,
960
961
  e.computed)(() => ((e = o) => {
961
962
  const t = /* @__PURE__ */ new Map;
962
963
  for (const o of e) {
@@ -967,132 +968,131 @@ e.defineComponent)({
967
968
  }
968
969
  }
969
970
  return t;
970
- })(t.spans)), y = $(p), k = $(m), C = ((e, t) => {
971
+ })(t.spans)), w = $(p), k = $(m), q = ((e, t) => {
971
972
  let o, r, n, s = d(), l = !0;
972
- const i = /* @__PURE__ */ new WeakMap, c = /* @__PURE__ */ new WeakMap, u = E(s => {
973
- const a = [], u = [];
974
- for (const {target: f, contentRect: {width: d, height: p}} of s) if (f === o) d || p ? (l || (r.U(),
975
- n.U()), l = !0, e.B(4, p), t.B(4, d)) : l = !1; else if (f.offsetParent) {
973
+ const i = /* @__PURE__ */ new WeakMap, c = /* @__PURE__ */ new WeakMap, a = A(s => {
974
+ const u = [], a = [];
975
+ for (const {target: f, contentRect: {width: d, height: p}} of s) if (f === o) d || p ? (l || (r.G(),
976
+ n.G()), l = !0, e.B(4, p), t.B(4, d)) : l = !1; else if (f.offsetParent) {
976
977
  const e = i.get(f), t = c.get(f);
977
- null != e && a.push([ e, p ]), null != t && u.push([ t, d ]);
978
+ null != e && u.push([ e, p ]), null != t && a.push([ t, d ]);
978
979
  }
979
- a.length && e.B(3, a), u.length && t.B(3, u);
980
+ u.length && e.B(3, u), a.length && t.B(3, a);
980
981
  });
981
982
  return {
982
- async Z(e, t) {
983
+ async te(e, t) {
983
984
  await s[0] && (e ? n : r).K(t);
984
985
  },
985
- fe(l) {
986
- const i = o = l.parentElement;
987
- u.Y(i);
988
- const c = (e, t) => A(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
986
+ Z(l, i = l.parentElement) {
987
+ a.X(o = i);
988
+ const c = (e, t) => M(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
989
989
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
990
- o[e] = "hidden", a(() => {
990
+ o[e] = "hidden", u(() => {
991
991
  o[e] = r;
992
992
  });
993
993
  });
994
994
  r = c(e, !1), n = c(t, !0), s[1](!0);
995
995
  },
996
996
  O() {
997
- u.D(), r && r.D(), n && n.D(), s[1](!1), s = d();
997
+ a.D(), r && r.D(), n && n.D(), s[1](!1), s = d();
998
998
  },
999
- de: (e, t, o) => (null != t && i.set(e, t), null != o && c.set(e, o), u.Y(e), () => {
1000
- i.delete(e), c.delete(e), u.J(e);
999
+ ee: (e, t, o) => (null != t && i.set(e, t), null != o && c.set(e, o), a.X(e), () => {
1000
+ i.delete(e), c.delete(e), a.J(e);
1001
1001
  }),
1002
- pe() {
1003
- r && r.G(), n && n.G();
1002
+ oe() {
1003
+ r && r.U(), n && n.U();
1004
1004
  }
1005
1005
  };
1006
- })(y, k), j = (0, e.ref)(y.T() + k.T()), P = () => {
1007
- j.value = y.T() + k.T();
1006
+ })(w, k), C = (0, e.ref)(w.T() + k.T()), j = () => {
1007
+ C.value = w.T() + k.T();
1008
1008
  };
1009
- y.P(1, P), k.P(1, P);
1010
- let B = !1;
1011
- y.P(4, () => {
1012
- B = !0, s("verticalScroll", y.A());
1013
- }), k.P(4, () => {
1014
- B = !0, s("horizontalScroll", k.A());
1009
+ w.L(1, j), k.L(1, j);
1010
+ let L = !1;
1011
+ w.L(4, () => {
1012
+ L = !0, s("verticalScroll", w.M());
1013
+ }), k.L(4, () => {
1014
+ L = !0, s("horizontalScroll", k.M());
1015
1015
  });
1016
- const H = () => {
1017
- !B || y.C() || k.C() || (B = !1, s("scrollEnd"));
1016
+ const P = () => {
1017
+ !L || w.q() || k.q() || (L = !1, s("scrollEnd"));
1018
1018
  };
1019
- y.P(8, H), k.P(8, H), (0, e.watchEffect)(() => {
1020
- p.W(t.headerRows, t.footerRows), m.W(t.headerCols, t.footerCols);
1019
+ w.L(8, P), k.L(8, P), (0, e.watchEffect)(() => {
1020
+ p.H(t.headerRows, t.footerRows), m.H(t.headerCols, t.footerCols);
1021
1021
  const e = S(t.rows), o = S(t.cols);
1022
- e !== y.N() && y.B(5, [ e ]), o !== k.N() && k.B(5, [ o ]), y.B(9, _.value), k.B(9, h.value);
1022
+ e !== w.A() && w.B(5, [ e ]), o !== k.A() && k.B(5, [ o ]), w.B(9, _.value), k.B(9, h.value);
1023
1023
  });
1024
- const L = (0, e.computed)(() => j.value && y.N()), W = (0, e.computed)(() => j.value && k.N()), V = (0,
1025
- e.computed)(() => (j.value, ((e, t, [s, l], [a, u], f, d = o, p = o, m) => {
1026
- const _ = e.h(), g = t.h(), $ = e.V(), h = e.F(), w = t.V(), y = t.F();
1027
- s = i(s, $, h), l = r(l, h - 1), a = i(a, w, y), u = r(u, y - 1);
1028
- const S = v(d, $, h), b = n(w - 1, 0), x = [], k = [], E = [];
1029
- for (const e of p) e.rowIndex < _ && e.colIndex < g && (E.push(e), x.push(e.rowIndex));
1030
- const A = E.length, C = I(S, s, h), j = C < 0 ? -1 : S[C];
1031
- j >= 0 && x.push(j);
1032
- const q = O(c(x), _, $, s, l, h);
1033
- for (let e = 0; e < q.length; e++) for (const t of f.get(q[e]) || o) {
1024
+ const V = (0, e.computed)(() => C.value && w.A()), H = (0, e.computed)(() => C.value && k.A()), W = (0,
1025
+ e.computed)(() => (C.value, ((e, t, [s, l], [u, a], f, d = o, p = o, m) => {
1026
+ const _ = e.h(), g = t.h(), $ = e.W(), h = e.F(), y = t.W(), w = t.F();
1027
+ s = i(s, $, h), l = r(l, h - 1), u = i(u, y, w), a = r(a, w - 1);
1028
+ const S = v(d, $, h), b = n(y - 1, 0), x = [], k = [], A = [];
1029
+ for (const e of p) e.rowIndex < _ && e.colIndex < g && (A.push(e), x.push(e.rowIndex));
1030
+ const M = A.length, q = I(S, s, h), C = q < 0 ? -1 : S[q];
1031
+ C >= 0 && x.push(C);
1032
+ const j = O(c(x), _, $, s, l, h);
1033
+ for (let e = 0; e < j.length; e++) for (const t of f.get(j[e]) || o) {
1034
1034
  const {rowIndex: o, colIndex: i} = t, c = T(t, _), f = R(t, g);
1035
- if ((e < 1 || q[e - 1] < o) && i < g && (c - o > 1 || f - i > 1)) {
1036
- let e = (o < $ || n(o, s) < r(c, l + 1) || h < c || j >= o && j < c) && (i < w || n(i, a) < r(f, u + 1) || y < f);
1037
- for (let t = 0; !e && t < A; t++) {
1038
- const r = E[t];
1035
+ if ((e < 1 || j[e - 1] < o) && i < g && (c - o > 1 || f - i > 1)) {
1036
+ let e = (o < $ || n(o, s) < r(c, l + 1) || h < c || C >= o && C < c) && (i < y || n(i, u) < r(f, a + 1) || w < f);
1037
+ for (let t = 0; !e && t < M; t++) {
1038
+ const r = A[t];
1039
1039
  e = r.rowIndex >= o && r.rowIndex < c && r.colIndex >= i && r.colIndex < f;
1040
1040
  }
1041
- e && E.push(t);
1041
+ e && A.push(t);
1042
1042
  }
1043
1043
  }
1044
- for (const {rowIndex: e, colIndex: t} of E) {
1044
+ for (const {rowIndex: e, colIndex: t} of A) {
1045
1045
  const o = I(S, e, h);
1046
1046
  x.push(e), o >= 0 && x.push(S[o]), k.push(t);
1047
1047
  }
1048
1048
  c(x), c(k);
1049
- const P = O(x, _, $, s, l, h), B = O(k, g, w, a, u, y), H = P.length, L = B.length, W = /* @__PURE__ */ new Map, V = [], F = [];
1050
- for (const e of E) {
1049
+ const L = O(x, _, $, s, l, h), B = O(k, g, y, u, a, w), P = L.length, V = B.length, H = /* @__PURE__ */ new Map, W = [], F = [];
1050
+ for (const e of A) {
1051
1051
  const t = T(e, _), o = R(e, g);
1052
- V.push(t), F.push(o);
1052
+ W.push(t), F.push(o);
1053
1053
  const r = B.indexOf(e.colIndex);
1054
- for (let n = P.indexOf(e.rowIndex); n < H && P[n] < t; n++) {
1055
- const t = P[n] * g;
1056
- for (let n = r; n < L && B[n] < o; n++) W.set(t + B[n], e);
1054
+ for (let n = L.indexOf(e.rowIndex); n < P && L[n] < t; n++) {
1055
+ const t = L[n] * g;
1056
+ for (let n = r; n < V && B[n] < o; n++) H.set(t + B[n], e);
1057
1057
  }
1058
1058
  }
1059
- const X = [];
1060
- for (const e of B) X.push(!t.L(e) && null);
1061
- const Y = [], J = e.u($), D = [];
1062
- let U = D;
1063
- const G = z.get(e), K = /* @__PURE__ */ new Map;
1064
- for (const o of P) {
1059
+ const Y = [];
1060
+ for (const e of B) Y.push(!t.V(e) && null);
1061
+ const X = [], J = e.u($), D = [];
1062
+ let G = D;
1063
+ const U = z.get(e), K = /* @__PURE__ */ new Map;
1064
+ for (const o of L) {
1065
1065
  const r = o < $, i = o >= h, c = I(S, o, h), f = r ? 0 : i ? h : c < 0 ? -1 : S[c];
1066
1066
  if (o === f) {
1067
1067
  const e = r ? $ : i ? _ : c + 1 < S.length ? S[c + 1] : h;
1068
- V.push(e);
1068
+ W.push(e);
1069
1069
  const t = [];
1070
1070
  D.push({
1071
- Me: r ? -1 : i ? -2 : -3 - f,
1071
+ Ee: r ? -1 : i ? -2 : -3 - f,
1072
1072
  Te: t,
1073
1073
  be: N(f, e, r || i ? 0 : null, i ? "bottom" : "top", 4)
1074
- }), U = t;
1075
- } else f < 0 && (U = D);
1076
- const d = c >= 0 && o === f, p = r || i || o === j || o >= s && o <= l, x = d ? J : null, z = o * g, v = G && G.get(o), k = v && v.ke, O = [];
1077
- let M = 0, E = !e.L(o) && null, A = o + 1, C = !1;
1078
- for (let e = 0; e < L; e++) {
1079
- const s = B[e], l = s < w, i = s >= y, c = l || i || s >= a && s <= u, f = W.get(z + s);
1074
+ }), G = t;
1075
+ } else f < 0 && (G = D);
1076
+ const d = c >= 0 && o === f, p = r || i || o === C || o >= s && o <= l, x = d ? J : null, z = o * g, v = U && U.get(o), k = v && v.ke, O = [];
1077
+ let E = 0, A = !e.V(o) && null, M = o + 1, q = !1;
1078
+ for (let e = 0; e < V; e++) {
1079
+ const s = B[e], l = s < y, i = s >= w, c = l || i || s >= u && s <= a, f = H.get(z + s);
1080
1080
  if (f ? f.rowIndex === o && f.colIndex === s : p && c) {
1081
- const c = f ? T(f, _) : o + 1, a = f ? R(f, g) : s + 1, u = c - o, p = a - s, $ = u > 1, h = p > 1, w = $ || h;
1082
- let y, S;
1083
- A = n(A, c);
1084
- const x = l ? t.u(s) : null, z = i ? t.u(g) - t.u(a) : null;
1085
- !1 !== E || $ || (y = o, E = !0), !1 !== X[e] || h || (S = s, X[e] = !0);
1086
- const v = r ? "columnheader" : s === b && (l || d) ? "rowheader" : "cell", I = w ? u : void 0, N = w ? p : void 0, j = "cell" !== v && m && m.rowIndex === o && m.colIndex === s ? m.order : void 0;
1087
- let q;
1081
+ const c = f ? T(f, _) : o + 1, u = f ? R(f, g) : s + 1, a = c - o, p = u - s, $ = a > 1, h = p > 1, y = $ || h;
1082
+ let w, S;
1083
+ M = n(M, c);
1084
+ const x = l ? t.u(s) : null, z = i ? t.u(g) - t.u(u) : null;
1085
+ !1 !== A || $ || (w = o, A = !0), !1 !== Y[e] || h || (S = s, Y[e] = !0);
1086
+ const v = r ? "columnheader" : s === b && (l || d) ? "rowheader" : "cell", I = y ? a : void 0, N = y ? p : void 0, C = "cell" !== v && m && m.rowIndex === o && m.colIndex === s ? m.order : void 0;
1087
+ let j;
1088
1088
  if (k) {
1089
1089
  const e = k.length;
1090
- for (;M < e && k[M].$e < s; ) M++;
1091
- M < e && k[M].$e === s && (q = k[M]);
1090
+ for (;E < e && k[E].$e < s; ) E++;
1091
+ E < e && k[E].$e === s && (j = k[E]);
1092
1092
  }
1093
- if (!q || q.he !== I || q.we !== N || q.Ne !== x || q.Ee !== z || q.me !== y || q.ge !== S || q.ye !== v || q.Se !== j) {
1093
+ if (!j || j.he !== I || j.ye !== N || j.Ne !== x || j.Ae !== z || j.me !== w || j.ge !== S || j.we !== v || j.Se !== C) {
1094
1094
  let e = "1/l" + s;
1095
- w && (e += "/l" + c + "/l" + a);
1095
+ y && (e += "/l" + c + "/l" + u);
1096
1096
  const t = {
1097
1097
  contain: "layout style",
1098
1098
  display: "grid",
@@ -1100,90 +1100,90 @@ e.defineComponent)({
1100
1100
  };
1101
1101
  $ && (t.height = "0px", t.minHeight = "100%", t.zIndex = 1), h && (t.width = "0px",
1102
1102
  t.minWidth = "100%"), (l || i) && (t[l ? "insetInlineStart" : "insetInlineEnd"] = (l ? x : z) + "px",
1103
- t.position = "sticky", t.zIndex = 2), q = {
1103
+ t.position = "sticky", t.zIndex = 2), j = {
1104
1104
  $e: s,
1105
1105
  he: I,
1106
- we: N,
1107
- me: y,
1106
+ ye: N,
1107
+ me: w,
1108
1108
  ge: S,
1109
- ye: v,
1110
- Se: j,
1109
+ we: v,
1110
+ Se: C,
1111
1111
  be: t,
1112
1112
  Ne: x,
1113
- Ee: z
1114
- }, C = !0;
1113
+ Ae: z
1114
+ }, q = !0;
1115
1115
  }
1116
- O.push(q);
1116
+ O.push(j);
1117
1117
  }
1118
1118
  }
1119
- if (Y.push(E), O.length) {
1120
- const e = v && !C && v.ke.length === O.length && v.Ae === x ? v : {
1119
+ if (X.push(A), O.length) {
1120
+ const e = v && !q && v.ke.length === O.length && v.Me === x ? v : {
1121
1121
  Ie: o,
1122
1122
  ke: O,
1123
- be: N(o, A, x, "top", 3),
1124
- Ae: x
1123
+ be: N(o, M, x, "top", 3),
1124
+ Me: x
1125
1125
  };
1126
- K.set(o, e), U.push(e);
1126
+ K.set(o, e), G.push(e);
1127
1127
  }
1128
1128
  }
1129
1129
  return z.set(e, K), {
1130
- Ce: M(e, P, Y, c(V), "max-content", _),
1131
- je: M(t, B, X, c(F), "minmax(max-content,auto)", g),
1132
- qe: D
1130
+ qe: E(e, L, X, c(W), "max-content", _),
1131
+ Ce: E(t, B, Y, c(F), "minmax(max-content,auto)", g),
1132
+ je: D
1133
1133
  };
1134
- })(p, m, y.l(t.bufferSize), k.l(t.bufferSize), w.value, t.sectionRows, t.keepMounted, t.ariaSort))), F = (0,
1135
- e.computed)(() => j.value && (y.C() || k.C()));
1134
+ })(p, m, w.l(t.bufferSize), k.l(t.bufferSize), y.value, t.sectionRows, t.keepMounted, t.ariaSort))), F = (0,
1135
+ e.computed)(() => C.value && (w.q() || k.q()));
1136
1136
  return (0, e.onMounted)(() => {
1137
- C.fe(f.value);
1137
+ q.Z(f.value);
1138
1138
  }), (0, e.onUnmounted)(() => {
1139
- y.O(), k.O(), C.O();
1140
- }), (0, e.watch)([ j ], () => {
1141
- C.pe();
1139
+ w.O(), k.O(), q.O();
1140
+ }), (0, e.watch)([ C ], () => {
1141
+ q.oe();
1142
1142
  }, {
1143
1143
  flush: "post"
1144
1144
  }), l({
1145
1145
  get verticalScrollOffset() {
1146
- return y.A();
1146
+ return w.M();
1147
1147
  },
1148
1148
  get horizontalScrollOffset() {
1149
- return k.A();
1149
+ return k.M();
1150
1150
  },
1151
1151
  get scrollHeight() {
1152
- return g(y);
1152
+ return g(w);
1153
1153
  },
1154
1154
  get scrollWidth() {
1155
1155
  return g(k);
1156
1156
  },
1157
1157
  get viewportHeight() {
1158
- return y.o();
1158
+ return w.o();
1159
1159
  },
1160
1160
  get viewportWidth() {
1161
1161
  return k.o();
1162
1162
  },
1163
- findRowIndex: y.R,
1163
+ findRowIndex: w.R,
1164
1164
  findColIndex: k.R,
1165
- getRowOffset: y.u,
1165
+ getRowOffset: w.u,
1166
1166
  getColOffset: k.u,
1167
- getRowSize: y.p,
1167
+ getRowSize: w.p,
1168
1168
  getColSize: k.p,
1169
- scrollToIndex: e => ((e, t, r, n, s, l = o, {rowIndex: i, colIndex: c, rowAlign: a, colAlign: u}) => {
1170
- null != i && q(e, t, n, l, i, a, !1), null != c && q(e, r, s, o, c, u, !0);
1171
- })(C, y, k, p, m, t.sectionRows, e),
1169
+ scrollToIndex: e => ((e, t, r, n, s, l = o, {rowIndex: i, colIndex: c, rowAlign: u, colAlign: a}) => {
1170
+ null != i && B(e, t, n, l, i, u, !1), null != c && B(e, r, s, o, c, a, !0);
1171
+ })(q, w, k, p, m, t.sectionRows, e),
1172
1172
  scrollTo: ({vertical: e, horizontal: t}) => ((e, t, o) => {
1173
- null != t && e.Z(!1, () => t), null != o && e.Z(!0, () => o);
1174
- })(C, e, t),
1173
+ null != t && e.te(!1, () => t), null != o && e.te(!0, () => o);
1174
+ })(q, e, t),
1175
1175
  scrollBy: ({vertical: e, horizontal: t}) => ((e, t, o, r, n) => {
1176
1176
  if (null != r) {
1177
- const o = r + t.A();
1178
- e.Z(!1, () => o);
1177
+ const o = r + t.M();
1178
+ e.te(!1, () => o);
1179
1179
  }
1180
1180
  if (null != n) {
1181
- const t = n + o.A();
1182
- e.Z(!0, () => t);
1181
+ const t = n + o.M();
1182
+ e.te(!0, () => t);
1183
1183
  }
1184
- })(C, y, k, e, t)
1184
+ })(q, w, k, e, t)
1185
1185
  }), () => {
1186
- const {Ce: o, je: r, qe: n} = V.value, s = y.u(0), l = k.u(0), i = {
1186
+ const {qe: o, Ce: r, je: n} = W.value, s = w.u(0), l = k.u(0), i = {
1187
1187
  contain: "size style",
1188
1188
  overflowAnchor: "none",
1189
1189
  flex: "none",
@@ -1193,13 +1193,13 @@ e.defineComponent)({
1193
1193
  gap: t.gap + "px",
1194
1194
  marginTop: s + "px",
1195
1195
  marginInlineStart: l + "px",
1196
- height: g(y) - s + "px",
1196
+ height: g(w) - s + "px",
1197
1197
  pointerEvents: F.value ? "none" : void 0
1198
1198
  };
1199
1199
  return (0, e.createVNode)("div", {
1200
1200
  role: "table",
1201
- "aria-rowcount": L.value,
1202
- "aria-colcount": W.value,
1201
+ "aria-rowcount": V.value,
1202
+ "aria-colcount": H.value,
1203
1203
  style: {
1204
1204
  overflow: "auto",
1205
1205
  contain: "strict",
@@ -1209,24 +1209,246 @@ e.defineComponent)({
1209
1209
  }, [ (0, e.createVNode)("div", {
1210
1210
  ref: f,
1211
1211
  style: i
1212
- }, [ n.map(o => "Te" in o ? (0, e.createVNode)(Y, {
1213
- key: o.Me,
1212
+ }, [ n.map(o => "Te" in o ? (0, e.createVNode)(D, {
1213
+ key: o.Ee,
1214
1214
  _e: o,
1215
- ne: u.default,
1215
+ ie: a.default,
1216
1216
  Re: t.rows,
1217
1217
  Oe: t.cols,
1218
- le: C.de
1219
- }, null, 8, [ "_e", "ne", "Re", "Oe", "le" ]) : (0, e.createVNode)(X, {
1218
+ ue: q.ee
1219
+ }, null, 8, [ "_e", "ie", "Re", "Oe", "ue" ]) : (0, e.createVNode)(J, {
1220
1220
  key: o.Ie,
1221
1221
  _e: o,
1222
- ne: u.default,
1222
+ ie: a.default,
1223
1223
  xe: b(t.rows, o.Ie),
1224
1224
  Oe: t.cols,
1225
- le: C.de
1226
- }, null, 8, [ "_e", "ne", "xe", "Oe", "le" ])) ], 4) ], 8, [ "aria-rowcount", "aria-colcount" ]);
1225
+ ue: q.ee
1226
+ }, null, 8, [ "_e", "ie", "xe", "Oe", "ue" ])) ], 4) ], 8, [ "aria-rowcount", "aria-colcount" ]);
1227
+ };
1228
+ }
1229
+ }), U = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", K = /* @__PURE__ */ /* @__PURE__ */ (0,
1230
+ e.defineComponent)(t => {
1231
+ const o = (0, e.ref)(), r = (0, e.computed)(() => t.ne.value && t.se.u(t.le)), n = (0,
1232
+ e.computed)(() => {
1233
+ t.ne.value;
1234
+ const e = t.Be.Le(), o = t.Be.Pe(t.le);
1235
+ return U(o / e, o * t.Be.Ve() / e);
1236
+ }), s = (0, e.computed)(() => {
1237
+ t.ne.value;
1238
+ const e = t.Be.Le(), o = t.Be.Ve();
1239
+ return U(1 / e, o / e - o);
1240
+ }), l = (0, e.computed)(() => t.ne.value && t.se.N(t.le)), i = (0, e.computed)(() => t.ie({
1241
+ item: t.ce,
1242
+ index: t.le
1243
+ }));
1244
+ return (0, e.watch)(() => o.value && t.le, (e, r, n) => {
1245
+ n(t.ue(o.value, t.le));
1246
+ }, {
1247
+ flush: "post"
1248
+ }), () => {
1249
+ const t = {
1250
+ contain: "layout style",
1251
+ position: "absolute",
1252
+ top: r.value + "px",
1253
+ insetInlineStart: n.value,
1254
+ width: s.value,
1255
+ visibility: l.value ? "hidden" : void 0
1256
+ };
1257
+ return (0, e.createVNode)("div", {
1258
+ ref: o,
1259
+ style: t
1260
+ }, [ i.value ], 4);
1261
+ };
1262
+ }, {
1263
+ props: {
1264
+ ne: null,
1265
+ se: null,
1266
+ Be: null,
1267
+ ie: null,
1268
+ ce: null,
1269
+ ue: null,
1270
+ le: null
1271
+ }
1272
+ }), Q = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
1273
+ props: {
1274
+ data: {
1275
+ type: Array,
1276
+ required: !0
1277
+ },
1278
+ lanes: {
1279
+ type: Number,
1280
+ required: !0
1281
+ },
1282
+ gap: Number,
1283
+ itemSize: Number,
1284
+ bufferSize: Number,
1285
+ cache: Object
1286
+ },
1287
+ emits: [ "scroll", "scrollEnd" ],
1288
+ setup(t, {emit: o, expose: s, slots: l}) {
1289
+ const i = (0, e.ref)(), u = ((e, t, o = 0, s, l) => {
1290
+ let i = n(t, 1), u = i, a = o, f = l && l[1] || s || 40, d = -1, p = s ? void 0 : /* @__PURE__ */ new Set, m = !s;
1291
+ const _ = l && l[0], g = _ ? h(_.slice(0, r(e, _.length)), n(0, e - _.length)) : h([], e), $ = [], w = [], S = [], b = e => {
1292
+ const t = g[e];
1293
+ return -1 === t ? f : t;
1294
+ }, x = t => {
1295
+ if (t = r(t, e - 1), d >= t) return;
1296
+ const s = [], l = [];
1297
+ for (let e = 0; e < i; e++) s.push(0), l.push(-1);
1298
+ for (let e = d, t = i; e >= 0 && t; e--) {
1299
+ const o = w[e];
1300
+ -1 === l[o] && (l[o] = e, s[o] = $[e] + b(e), t--);
1301
+ }
1302
+ for (;d < t; ) {
1303
+ const e = ++d;
1304
+ let t = 0, r = 1 / 0, c = 1 / 0;
1305
+ for (let e = 0; e < i; e++) {
1306
+ const n = s[e] + (l[e] >= 0 ? o : 0);
1307
+ (n < r || n === r && l[e] < c) && (t = e, r = n, c = l[e]);
1308
+ }
1309
+ $[e] = r, w[e] = t, s[t] = r + b(e), l[t] = e, S[e] = n(e ? S[e - 1] : 0, s[t]);
1310
+ }
1311
+ }, z = t => t >= e ? I() : (x(t), $[t]), v = e => (x(e), S[e]), I = () => e ? v(e - 1) : 0, k = t => {
1312
+ if (!e) return 0;
1313
+ const o = y(v, e, t);
1314
+ return v(o) <= t ? o + 1 : o;
1315
+ };
1316
+ return {
1317
+ l: (t, o) => {
1318
+ const n = y(z, e, o);
1319
+ return [ r(k(t), n), n ];
1320
+ },
1321
+ i: t => y(z, e, t),
1322
+ u: z,
1323
+ p: b,
1324
+ m: (e, t = -1) => g[e] === t,
1325
+ I: (t, n, s, l) => {
1326
+ let u = k(s);
1327
+ for (;u > 0 && !n(u - 1); ) u--;
1328
+ for (;u < e && n(u); ) u++;
1329
+ const a = z(u);
1330
+ for (const [e, o] of t) g[e] = o, p && p.add(e), d = r(e - 1, d);
1331
+ let _ = z(u) - a;
1332
+ if (p && l) {
1333
+ const e = [];
1334
+ let t = 0;
1335
+ if (p.forEach(r => {
1336
+ const n = g[r];
1337
+ n > 0 && (e.push(n), t += n + o);
1338
+ }), t > l * i) {
1339
+ c(e);
1340
+ const t = e.length, o = t / 2 | 0, r = t % 2 == 0 ? (e[o - 1] + e[o]) / 2 : e[o], n = k(s + _), l = z(n);
1341
+ f = r, d = -1, _ += z(n) - l, p = void 0, m = !1;
1342
+ }
1343
+ }
1344
+ return _;
1345
+ },
1346
+ t: I,
1347
+ h: () => e,
1348
+ S: t => {
1349
+ const o = t - e;
1350
+ return d = r(t - 1, d), e = t, o > 0 ? h(g, o) : g.splice(o), 0;
1351
+ },
1352
+ k: (e, t) => {
1353
+ if (u === i && a === o) return;
1354
+ const r = k(t), n = z(r);
1355
+ return i = u, o = a, d = -1, p = s ? void 0 : /* @__PURE__ */ new Set, z(r) - n;
1356
+ },
1357
+ He: (e, t = 0) => {
1358
+ u = n(e, 1), a = t;
1359
+ },
1360
+ v: () => m,
1361
+ P: () => [ g.slice(), f ],
1362
+ Le: () => i,
1363
+ Ve: () => o,
1364
+ Pe: e => (x(e), w[e])
1365
+ };
1366
+ })(t.data.length, t.lanes, t.gap, t.itemSize, t.cache), a = $(u), f = q(a, !1), d = (0,
1367
+ e.ref)(a.T());
1368
+ a.L(1, () => {
1369
+ d.value = a.T();
1370
+ }), a.L(4, () => {
1371
+ o("scroll", a.M());
1372
+ }), a.L(8, () => {
1373
+ o("scrollEnd");
1374
+ });
1375
+ const p = (0, e.computed)(e => {
1376
+ d.value;
1377
+ const o = a.l(t.bufferSize);
1378
+ return e && H(e, o) ? e : o;
1379
+ }), m = (0, e.computed)(() => d.value && a.q()), _ = (0, e.computed)(() => d.value && a.t());
1380
+ return (0, e.onMounted)(() => {
1381
+ f.Z(i.value);
1382
+ }), (0, e.onUnmounted)(() => {
1383
+ a.O(), f.O();
1384
+ }), (0, e.watchEffect)(() => {
1385
+ t.data.length !== a.A() && a.B(5, [ t.data.length ]);
1386
+ }), (0, e.watchEffect)(() => {
1387
+ u.He(t.lanes, t.gap), a.B(9, void 0);
1388
+ }), (0, e.watch)([ d ], () => {
1389
+ f.oe();
1390
+ }, {
1391
+ flush: "post"
1392
+ }), s({
1393
+ get cache() {
1394
+ return u.P();
1395
+ },
1396
+ get scrollOffset() {
1397
+ return a.M();
1398
+ },
1399
+ get scrollSize() {
1400
+ return g(a);
1401
+ },
1402
+ get viewportSize() {
1403
+ return a.o();
1404
+ },
1405
+ getItemOffset: a.u,
1406
+ getItemSize: a.p,
1407
+ scrollToIndex: (e, t) => L(f, a, e, t),
1408
+ scrollTo: e => C(f, e),
1409
+ scrollBy: e => j(f, a, e)
1410
+ }), () => {
1411
+ const o = _.value, r = [];
1412
+ for (let [o, n] = p.value; o <= n; o++) {
1413
+ const n = l.default({
1414
+ item: t.data[o],
1415
+ index: o
1416
+ });
1417
+ r.push((0, e.createVNode)(K, {
1418
+ key: V(n, o),
1419
+ ne: d,
1420
+ se: a,
1421
+ Be: u,
1422
+ ie: l.default,
1423
+ ce: t.data[o],
1424
+ ue: f.ee,
1425
+ le: o
1426
+ }, null, 8, [ "ne", "se", "Be", "ie", "ce", "ue", "le" ]));
1427
+ }
1428
+ return (0, e.createVNode)("div", {
1429
+ style: {
1430
+ display: "block",
1431
+ overflowY: "auto",
1432
+ contain: "strict",
1433
+ width: "100%",
1434
+ height: "100%"
1435
+ }
1436
+ }, [ (0, e.createVNode)("div", {
1437
+ ref: i,
1438
+ style: {
1439
+ contain: "size style",
1440
+ overflowAnchor: "none",
1441
+ flex: "none",
1442
+ position: "relative",
1443
+ width: "100%",
1444
+ height: o + "px",
1445
+ pointerEvents: m.value ? "none" : void 0
1446
+ }
1447
+ }, [ r ], 4) ]);
1227
1448
  };
1228
1449
  }
1229
1450
  });
1230
1451
 
1231
- exports.VGrid = J, exports.VList = W, exports.Virtualizer = L, exports.WindowVirtualizer = V;
1452
+ exports.VGrid = G, exports.VList = F, exports.VMasonry = Q, exports.Virtualizer = W,
1453
+ exports.WindowVirtualizer = Y;
1232
1454
  //# sourceMappingURL=index.cjs.map