virtua 0.52.1 → 0.52.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/lib/vue/index.cjs CHANGED
@@ -13,17 +13,17 @@ var t, o = [], {min: r, max: n, abs: s, floor: l} = Math, i = (e, t, o) => r(o,
13
13
  }), e ];
14
14
  }, p = e => e.ownerDocument, m = e => e.defaultView, g = () => (null == t && (t = /iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0),
15
15
  t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S: u, v: f, I: d}, p = 0) => {
16
- let m = !!d, _ = !!p, $ = 1, h = 0, w = 0, S = 0, y = 0, b = 0, z = 0, x = 0, v = 0, I = null, k = [ 0, _ ? n(p - 1, 0) : -1 ], O = 0, R = !1;
17
- const T = /* @__PURE__ */ new Set, A = () => S - w, M = () => A() + b + y, N = e => o(e) - b, C = e => {
16
+ let m = !!d, _ = !!p, $ = 1, h = 0, S = 0, w = 0, y = 0, b = 0, z = 0, x = 0, v = 0, I = null, k = [ 0, _ ? n(p - 1, 0) : -1 ], O = 0, T = !1;
17
+ const R = /* @__PURE__ */ new Set, A = () => w - S, M = () => A() + b + y, N = e => o(e) - b, C = e => {
18
18
  e && (g() && 0 !== x || I && 1 === v ? b += e : y += e);
19
19
  };
20
20
  return {
21
21
  k: () => {
22
- T.clear();
22
+ R.clear();
23
23
  },
24
24
  O: () => $,
25
25
  l: (t = 200) => {
26
- if (!R || _) return k;
26
+ if (!T || _) return k;
27
27
  let o, s;
28
28
  if (z) [o, s] = k; else {
29
29
  let l = n(0, M()), i = l + h;
@@ -32,33 +32,33 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
32
32
  }
33
33
  return [ n(o, 0), r(s, u() - 1) ];
34
34
  },
35
- R: e => t(e - w),
36
- T: c,
35
+ T: e => t(e - S),
36
+ R: c,
37
37
  u: N,
38
38
  p: l,
39
39
  A: u,
40
- M: () => S,
40
+ M: () => w,
41
41
  N: () => 0 !== x,
42
42
  o: () => h,
43
- C: () => w,
43
+ C: () => S,
44
44
  t: a,
45
45
  j: () => (z = y, y = 0, [ z, 2 === v ]),
46
46
  q: (e, t) => {
47
47
  const o = [ e, t ];
48
- return T.add(o), () => {
49
- T.delete(o);
48
+ return R.add(o), () => {
49
+ R.delete(o);
50
50
  };
51
51
  },
52
- B: (o, r) => {
52
+ P: (o, r) => {
53
53
  let n, u, p = 0;
54
54
  switch (o) {
55
55
  case 1:
56
56
  {
57
- if (r === S && 0 === v) break;
57
+ if (r === w && 0 === v) break;
58
58
  const e = z;
59
59
  z = 0;
60
- const t = r - S, o = s(t);
61
- e && o < s(e) + 1 || 0 !== v || (x = t < 0 ? 2 : 1), _ && (_ = !1), S = r, p = 4;
60
+ const t = r - w, o = s(t);
61
+ e && o < s(e) + 1 || 0 !== v || (x = t < 0 ? 2 : 1), _ && (_ = !1), w = r, p = 4;
62
62
  const n = A();
63
63
  n >= -h && n <= a() && (p += 1, u = o > h);
64
64
  break;
@@ -89,7 +89,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
89
89
  }
90
90
 
91
91
  case 4:
92
- h !== r && (h || (R = u = !0), h = r, p = 3);
92
+ h !== r && (h || (T = u = !0), h = r, p = 3);
93
93
  break;
94
94
 
95
95
  case 5:
@@ -97,7 +97,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
97
97
  break;
98
98
 
99
99
  case 6:
100
- w = r;
100
+ S = r;
101
101
  break;
102
102
 
103
103
  case 7:
@@ -111,7 +111,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
111
111
  case 8:
112
112
  I = e(r, r + h), p = 1;
113
113
  }
114
- p && ($ = 1 + (2147483647 & $), n && b && (y += b, b = 0), T.forEach(([e, t]) => {
114
+ p && ($ = 1 + (2147483647 & $), n && b && (y += b, b = 0), R.forEach(([e, t]) => {
115
115
  p & e && t(u);
116
116
  }));
117
117
  }
@@ -123,13 +123,13 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
123
123
  e(t) <= o ? (s = t, r = t + 1) : n = t - 1;
124
124
  }
125
125
  return i(s, 0, t - 1);
126
- }, w = (e, t, o) => {
126
+ }, S = (e, t, o) => {
127
127
  const r = o ? "unshift" : "push";
128
128
  for (let o = 0; o < t; o++) e[r](-1);
129
129
  return e;
130
- }, S = (e, t, o) => {
130
+ }, w = (e, t, o) => {
131
131
  let s = o && o[1] || t || 40, l = -1, i = 0;
132
- const a = o && o[0], u = a ? w(a.slice(0, r(e, a.length)), n(0, e - a.length)) : w([], e), f = w([], e + 1), d = e => {
132
+ const a = o && o[0], u = a ? S(a.slice(0, r(e, a.length)), n(0, e - a.length)) : S([], e), f = S([], e + 1), d = e => {
133
133
  const t = u[e];
134
134
  return -1 === t ? s : t;
135
135
  }, p = t => {
@@ -158,7 +158,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
158
158
  S: () => e,
159
159
  v: (t, o) => {
160
160
  const n = t - e;
161
- return l = o ? -1 : r(t - 1, l), e = t, n > 0 ? (w(f, n), w(u, n, o), s * n) : (f.splice(n),
161
+ return l = o ? -1 : r(t - 1, l), e = t, n > 0 ? (S(f, n), S(u, n, o), s * n) : (f.splice(n),
162
162
  (o ? u.splice(0, -n) : u.splice(n)).reduce((e, t) => e - (-1 === t ? s : t), 0));
163
163
  },
164
164
  I: t ? void 0 : e => {
@@ -170,73 +170,82 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
170
170
  const r = o.length, i = r / 2 | 0, a = r % 2 == 0 ? (o[i - 1] + o[i]) / 2 : o[i], f = s;
171
171
  return ((s = a) - f) * n(e - t, 0);
172
172
  },
173
- L: () => [ u.slice(), s ]
173
+ B: () => [ u.slice(), s ]
174
174
  };
175
175
  }, y = e => "number" == typeof e ? e : e.length, b = (e, t) => "number" == typeof e ? t : e[t], z = (e, t, o = 0) => {
176
+ let s = 0, c = 0;
177
+ const a = (e = 0, t = 0) => {
178
+ s = e, c = t;
179
+ }, u = e => r(s, e), f = e => n(e - c, u(e)), d = (e, t, r, s, l) => {
180
+ const i = t(u(r)), c = t(r) - t(f(r)), a = s + (i ? i - o : 0);
181
+ return e(a, n(a, l - (c ? c - o : 0)));
182
+ };
176
183
  if ("number" == typeof t) {
177
184
  let r = y(e), n = t;
178
- const s = e => n + o ? i(l(e / (n + o)), 0, r - 1) : 0;
185
+ const s = e => n + o ? i(l(e / (n + o)), 0, r - 1) : 0, c = e => e * (n + o), p = (e, t) => [ s(e), s(t) ];
179
186
  return {
180
- l: (e, t) => [ s(e), s(t) ],
187
+ l: (e, t) => d(p, c, r, e, t),
181
188
  i: s,
182
- u: e => e * (n + o),
189
+ u: c,
183
190
  p: () => n,
184
191
  m: () => !1,
185
192
  h: () => !1,
186
193
  t: () => r ? r * (n + o) - o : 0,
187
194
  S: () => r,
188
195
  v: e => (r = e, 0),
189
- P: () => !1,
190
- H: (e, t, o) => {
196
+ L: () => !1,
197
+ H: a,
198
+ W: () => u(r),
199
+ V: () => f(r),
200
+ D: (e, t, o) => {
191
201
  if ("number" != typeof t || t === n) return;
192
202
  const r = s(o) * (t - n);
193
203
  return n = t, r;
194
204
  }
195
205
  };
196
206
  }
197
- const r = "auto" === t;
198
- let n, s = t;
199
- const c = y(e), a = [], u = S(c, void 0, [ [], 40 + o ]), f = e => r || !!a[e], d = {
200
- l: u.l,
201
- i: u.i,
202
- u: u.u,
203
- p: e => u.p(e) - o,
204
- m: (e, t) => f(e) && u.m(e, t + o),
205
- h: (e, t) => u.h(e, t + o),
206
- t: () => u.S() ? u.t() - o : 0,
207
- S: u.S,
208
- v: u.v,
209
- I: r ? u.I : void 0,
210
- P: f,
211
- H: (e, t, l, i) => {
212
- if (r) return;
213
- const c = "number" == typeof t || "auto" === t ? s : t, f = u.S();
214
- if (!i && e === n && c === s && f === a.length) return;
215
- n = e, s = c, a.length = f;
216
- const d = u.i(l), p = u.u(d);
217
- let m;
218
- for (let t = 0; t < f; t++) {
219
- const r = e[t], n = null !== r && "object" == typeof r ? r[c] : null, s = "number" != typeof n;
220
- if (!s || !a[t]) {
221
- a[t] = s;
222
- const e = s ? -1 : n + o;
223
- u.h(t, e) || (u.m(t, e), m = !0);
207
+ const p = "auto" === t;
208
+ let m, g = t;
209
+ const _ = y(e), $ = [], h = w(_, void 0, [ [], 40 + o ]), S = e => p || !!$[e], b = {
210
+ l: (e, t) => d(h.l, h.u, h.S(), e, t),
211
+ i: h.i,
212
+ u: h.u,
213
+ p: e => h.p(e) - o,
214
+ m: (e, t) => S(e) && h.m(e, t + o),
215
+ h: (e, t) => h.h(e, t + o),
216
+ t: () => h.S() ? h.t() - o : 0,
217
+ S: h.S,
218
+ v: h.v,
219
+ I: p ? h.I : void 0,
220
+ L: S,
221
+ H: a,
222
+ W: () => u(h.S()),
223
+ V: () => f(h.S()),
224
+ D: (e, t, r, n) => {
225
+ if (p) return;
226
+ const s = "number" == typeof t || "auto" === t ? g : t, l = h.S();
227
+ if (!n && e === m && s === g && l === $.length) return;
228
+ m = e, g = s, $.length = l;
229
+ const i = h.i(r), c = h.u(i);
230
+ let a;
231
+ for (let t = 0; t < l; t++) {
232
+ const r = e[t], n = null !== r && "object" == typeof r ? r[s] : null, l = "number" != typeof n;
233
+ if (!l || !$[t]) {
234
+ $[t] = l;
235
+ const e = l ? -1 : n + o;
236
+ h.h(t, e) || (h.m(t, e), a = !0);
224
237
  }
225
238
  }
226
- return m ? u.u(d) - p : void 0;
239
+ return a ? h.u(i) - c : void 0;
227
240
  }
228
241
  };
229
- return d.H(e, t, 0), d;
230
- }, x = (e, t, o, r, n) => {
231
- const s = y(o);
232
- s !== e.A() && e.B(5, [ s ]);
233
- const l = t.H(o, r, e.M() - e.u(0), n);
234
- null != l && e.B(9, l);
235
- }, v = /*#__PURE__*/ new WeakMap, I = (e, t, o, s, l, i, c) => {
236
- if (t < s || n(t, l) < r(o, i + 1) || c < o) return !0;
237
- for (const r of e) if (r >= t && r < o) return !0;
238
- return !1;
239
- }, k = (e, t, o) => {
242
+ return b.D(e, t, 0), b;
243
+ }, x = (e, t, o, r, n, s, l) => {
244
+ const i = y(o);
245
+ t.H(n, s), i !== e.A() && e.P(5, [ i ]);
246
+ const c = t.D(o, r, e.M() - e.u(0), l);
247
+ null != c && e.P(9, c);
248
+ }, v = /*#__PURE__*/ new WeakMap, I = (e, t, o, s, l, i) => e < o || n(e, s) < r(t, l + 1) || i < t, k = (e, t, o) => {
240
249
  const r = [];
241
250
  for (const n of e) n >= t && n < o && r.push(n);
242
251
  return c(r);
@@ -248,42 +257,36 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
248
257
  e[o] <= t ? r = o + 1 : n = o;
249
258
  }
250
259
  return r - 1;
251
- }, R = (e, t, o, r) => {
252
- const n = O(t, o, r);
253
- n >= 0 && e.push(t[n]);
254
- }, T = (e, t, o, r, n, s) => {
260
+ }, T = (e, t, o, r, n) => {
261
+ const s = t.length;
262
+ for (;o < s && t[o] < r; o++) {
263
+ const r = t[o];
264
+ r > n && (e.push(r), n = r);
265
+ }
266
+ return o;
267
+ }, R = (e, t, o, r, n, s) => {
255
268
  const l = [];
256
269
  for (let e = 0; e < o; e++) l.push(e);
257
- const i = e.length;
258
- let c = 0, a = o - 1;
259
- for (;c < i && e[c] < r; c++) {
260
- const t = e[c];
261
- t > a && (l.push(t), a = t);
262
- }
270
+ const i = T(l, e, 0, r, o - 1);
263
271
  for (let e = r; e <= n; e++) l.push(e);
264
- for (a = n; c < i && e[c] < s; c++) {
265
- const t = e[c];
266
- t > a && (l.push(t), a = t);
267
- }
272
+ T(l, e, i, s, n);
268
273
  for (let e = s; e < t; e++) l.push(e);
269
274
  return l;
270
275
  }, A = (e, t) => r(e.rowIndex + (e.rowSpan || 1), t), M = (e, t) => r(e.colIndex + (e.colSpan || 1), t), N = (e, t, o, n, s, l) => {
271
276
  const i = t.length, c = n.length;
272
277
  let a = "[l0]", u = 0, f = 0, d = 0;
273
- for (;f < i || d < c; ) {
274
- const p = f < i ? t[f] : l, m = d < c ? n[d] : l;
275
- if (m <= u) d++; else {
276
- let t, n;
277
- if (p === u) {
278
- t = u + 1;
279
- const r = o[f];
280
- n = null == r ? e.p(u) + "px" : r ? s : "minmax(" + e.p(u) + "px,auto)", f++;
281
- } else t = r(p, m), n = "minmax(" + (e.u(t - 1) + e.p(t - 1) - e.u(u)) + "px,auto)";
282
- a += " " + n + " [l" + t + "]", u = t;
283
- }
278
+ for (;u < l; ) {
279
+ for (;d < c && n[d] <= u; ) d++;
280
+ const p = f < i ? t[f] : l;
281
+ let m, g;
282
+ if (p === u) {
283
+ m = u + 1;
284
+ const t = o[f];
285
+ g = null == t ? e.p(u) + "px" : t ? s : "minmax(" + e.p(u) + "px,auto)", f++;
286
+ } else m = r(p, d < c ? n[d] : l), g = "minmax(" + (e.u(m - 1) + e.p(m - 1) - e.u(u)) + "px,auto)";
287
+ a += " " + g + " [l" + m + "]", u = m;
284
288
  }
285
- return u < l && (a += " minmax(" + (e.t() - e.u(u)) + "px,auto) [l" + l + "]"),
286
- a;
289
+ return a;
287
290
  }, C = (e, t, o, r, n) => {
288
291
  const s = {
289
292
  display: "grid",
@@ -296,61 +299,61 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
296
299
  }, E = e => {
297
300
  let t;
298
301
  return {
299
- W(o) {
302
+ F(o) {
300
303
  (t || (t = new (m(p(o)).ResizeObserver)(e))).observe(o);
301
304
  },
302
- V(e) {
305
+ X(e) {
303
306
  t.unobserve(e);
304
307
  },
305
- D() {
308
+ Y() {
306
309
  t && t.disconnect();
307
310
  }
308
311
  };
309
312
  }, j = (e, t, o, r, n, s, l) => {
310
313
  let i, c, d = 0, p = !1, m = !1, _ = !1, $ = !1;
311
- const h = Date.now, w = r ? "scrollLeft" : "scrollTop", S = r ? "left" : "top", y = e => n ? -e : e, b = () => y(o[w]), z = (e, t) => {
314
+ const h = Date.now, S = r ? "scrollLeft" : "scrollTop", w = r ? "left" : "top", y = e => n ? -e : e, b = () => y(o[S]), z = (e, t) => {
312
315
  o.scrollTo({
313
- [S]: y(e),
316
+ [w]: y(e),
314
317
  behavior: t ? "smooth" : "instant"
315
318
  });
316
319
  }, x = () => {
317
320
  if (p || m) return p = !1, void v();
318
- _ = !1, e.B(2);
321
+ _ = !1, e.P(2);
319
322
  }, v = () => {
320
323
  u(c), c = a(x, 150);
321
324
  }, I = () => {
322
- d = h(), _ && ($ = !0), l && e.B(6, l()), e.B(1, b()), v();
325
+ d = h(), _ && ($ = !0), l && e.P(6, l()), e.P(1, b()), v();
323
326
  }, k = t => {
324
327
  if (p || !e.N() || t.ctrlKey) return;
325
328
  const o = h() - d;
326
329
  150 > o && 50 < o && (r ? t.deltaX : t.deltaY) && (p = !0);
327
330
  }, O = () => {
328
331
  m = !0, _ = $ = !1;
329
- }, R = () => {
332
+ }, T = () => {
330
333
  m = !1, g() && (_ = !0);
331
334
  };
332
335
  return t.addEventListener("scroll", I), t.addEventListener("wheel", k, {
333
336
  passive: !0
334
337
  }), t.addEventListener("touchstart", O, {
335
338
  passive: !0
336
- }), t.addEventListener("touchend", R, {
339
+ }), t.addEventListener("touchend", T, {
337
340
  passive: !0
338
341
  }), {
339
- D: () => {
342
+ Y: () => {
340
343
  t.removeEventListener("scroll", I), t.removeEventListener("wheel", k), t.removeEventListener("touchstart", O),
341
- t.removeEventListener("touchend", R), u(c);
344
+ t.removeEventListener("touchend", T), u(c);
342
345
  },
343
- F: () => {
346
+ J: () => {
344
347
  const [t, r] = e.j();
345
348
  if (!t) return;
346
349
  $ && s && s(), $ = !1;
347
350
  const n = e.M() + t;
348
351
  n <= 0 || n >= e.C() + e.t() - e.o() ? z(n) : o.scrollBy({
349
- [S]: y(t),
352
+ [w]: y(t),
350
353
  behavior: "instant"
351
- }), r && (i && i(), e.o() > e.t() && e.B(1, b()));
354
+ }), r && (i && i(), e.o() > e.t() && e.P(1, b()));
352
355
  },
353
- X: (t, o) => {
356
+ U: (t, o) => {
354
357
  let r, n, s;
355
358
  i && i();
356
359
  const l = i = () => {
@@ -358,10 +361,10 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
358
361
  }, c = () => {
359
362
  if (!r) {
360
363
  if (e.o() && (u(n), n = a(l, 150)), o) {
361
- for (let [t, o] = e.l(0); t <= o; t++) if (e.T(t)) return;
364
+ for (let [t, o] = e.l(0); t <= o; t++) if (e.R(t)) return;
362
365
  l();
363
366
  }
364
- e.B(7), z(t(), o);
367
+ e.P(7), z(t(), o);
365
368
  }
366
369
  }, d = () => {
367
370
  if (r) return;
@@ -372,12 +375,12 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
372
375
  }));
373
376
  }), c();
374
377
  };
375
- o ? (e.B(8, t()), f(d)) : d();
378
+ o ? (e.P(8, t()), f(d)) : d();
376
379
  }
377
380
  };
378
381
  }, q = (e, t) => {
379
- e.Y(() => t);
380
- }, B = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
382
+ e.G(() => t);
383
+ }, P = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
381
384
  if (o = i(o, 0, t.A() - 1), "nearest" === r) {
382
385
  const e = t.u(o), n = t.M();
383
386
  if (e < n) r = "start"; else {
@@ -385,40 +388,40 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
385
388
  r = "end";
386
389
  }
387
390
  }
388
- e.Y(() => s + e.J() + t.u(o) + ("end" === r ? t.p(o) - t.o() : "center" === r ? (t.p(o) - t.o()) / 2 : 0), n);
389
- }, L = (e, t, o, s, l, c, a, u) => {
390
- const f = t.A(), d = r(o, f), p = n(f - l, d);
391
- c = i(c, 0, f - 1);
392
- const m = k(s, d, p), g = O(m, c, p), _ = g < 0 ? -1 : m[g], $ = () => [ t.u(d) - t.u(0) + (_ < 0 || _ === c ? 0 : t.u(_ + 1) - t.u(_)), t.u(f) - t.u(p) ];
393
- if ("nearest" === a) {
394
- if (c < d || c >= p) return;
395
- const [e, o] = $(), s = t.M(), l = t.p(c);
396
- let i = t.u(c);
397
- if (_ === c) {
398
- const o = (g + 1 < m.length ? m[g + 1] : p) - 1;
399
- i = n(i, r(s + e, t.u(o) + t.p(o) - l));
391
+ e.G(() => s + e.K() + t.u(o) + ("end" === r ? t.p(o) - t.o() : "center" === r ? (t.p(o) - t.o()) / 2 : 0), n);
392
+ }, B = (e, t, o, s, l, c, a) => {
393
+ const u = t.A(), f = o.W(), d = o.V();
394
+ l = i(l, 0, u - 1);
395
+ const p = k(s, f, d), m = O(p, l, d), g = m < 0 ? -1 : p[m], _ = () => o.u(f) + (g < 0 || g === l ? 0 : o.u(g + 1) - o.u(g)), $ = () => o.u(u) - o.u(d);
396
+ if ("nearest" === c) {
397
+ if (l < f || l >= d) return;
398
+ const e = _(), o = t.M() + e, s = t.o() - e - $(), i = t.p(l);
399
+ let a = t.u(l);
400
+ if (g === l) {
401
+ const e = (m + 1 < p.length ? p[m + 1] : d) - 1;
402
+ a = n(a, r(o, t.u(e) + t.p(e) - i));
400
403
  }
401
- if (i < s + e) a = "start"; else {
402
- if (!(i + l > s + t.o() - o)) return;
403
- a = "end";
404
+ if (a < o) c = "start"; else {
405
+ if (!(a + i > o + s)) return;
406
+ c = "end";
404
407
  }
405
408
  }
406
- e.Y(u, () => {
407
- const [e, o] = $(), r = t.p(c) - t.o();
408
- return t.u(c) + ("end" === a ? r + o : "center" === a ? (r + o - e) / 2 : -e);
409
+ e.G(a, () => {
410
+ const e = _(), o = t.p(l) - (t.o() - e - $());
411
+ return t.u(l) - e + ("end" === c ? o : "center" === c ? o / 2 : 0);
409
412
  });
410
- }, P = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
411
- const o = (0, e.ref)(), r = (0, e.computed)(() => t.U.value && t.G.u(t.K)), n = (0,
412
- e.computed)(() => t.U.value && t.G.T(t.K)), s = (0, e.computed)(() => t.Z({
413
- item: t.ee,
414
- index: t.K
413
+ }, L = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
414
+ const o = (0, e.ref)(), r = (0, e.computed)(() => t.Z.value && t.ee.u(t.te)), n = (0,
415
+ e.computed)(() => t.Z.value && t.ee.R(t.te)), s = (0, e.computed)(() => t.oe({
416
+ item: t.re,
417
+ index: t.te
415
418
  }));
416
- return (0, e.watch)(() => o.value && t.K, (e, r, n) => {
417
- n(t.te(o.value, t.K));
419
+ return (0, e.watch)(() => o.value && t.te, (e, r, n) => {
420
+ n(t.ne(o.value, t.te));
418
421
  }, {
419
422
  flush: "post"
420
423
  }), () => {
421
- const {oe: l, re: i, ne: c, K: a, ee: u} = t, f = n.value, {style: d, ...p} = t.se?.({
424
+ const {se: l, le: i, ie: c, te: a, re: u} = t, f = n.value, {style: d, ...p} = t.ce?.({
422
425
  item: u,
423
426
  index: a
424
427
  }) || {}, m = {
@@ -439,16 +442,16 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
439
442
  };
440
443
  }, {
441
444
  props: {
442
- U: null,
443
- G: null,
444
445
  Z: null,
445
446
  ee: null,
446
- te: null,
447
- K: null,
448
447
  oe: null,
449
448
  re: null,
450
449
  ne: null,
451
- se: null
450
+ te: null,
451
+ se: null,
452
+ le: null,
453
+ ie: null,
454
+ ce: null
452
455
  }
453
456
  }), H = (e, t) => {
454
457
  if (1 === e.length) {
@@ -488,19 +491,19 @@ e.defineComponent)({
488
491
  emits: [ "scroll", "scrollEnd" ],
489
492
  setup(t, {emit: o, expose: r, slots: n}) {
490
493
  let s = !!t.ssrCount;
491
- const l = t.horizontal, i = (0, e.ref)(), u = S(t.data.length, t.itemSize, t.cache), f = $(u, t.ssrCount), p = ((e, t) => {
494
+ const l = t.horizontal, i = (0, e.ref)(), u = w(t.data.length, t.itemSize, t.cache), f = $(u, t.ssrCount), p = ((e, t) => {
492
495
  let o, r, n = d();
493
496
  const s = /* @__PURE__ */ new WeakMap, l = E(r => {
494
497
  const n = [];
495
- for (const {target: l, contentRect: {width: i, height: c}} of r) if (l === o) (i || c) && e.B(4, t ? i : c); else if (l.offsetParent) {
498
+ for (const {target: l, contentRect: {width: i, height: c}} of r) if (l === o) (i || c) && e.P(4, t ? i : c); else if (l.offsetParent) {
496
499
  const e = s.get(l);
497
500
  null != e && n.push([ e, t ? i : c ]);
498
501
  }
499
- n.length && e.B(3, n);
502
+ n.length && e.P(3, n);
500
503
  });
501
504
  return {
502
- le(s, i = s.parentElement) {
503
- l.W(o = i), r = j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
505
+ ae(s, i = s.parentElement) {
506
+ l.F(o = i), r = j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
504
507
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
505
508
  o[e] = "hidden", a(() => {
506
509
  o[e] = r;
@@ -508,18 +511,18 @@ e.defineComponent)({
508
511
  }), n[1](!0);
509
512
  },
510
513
  k() {
511
- l.D(), r && r.D(), n[1](!1), n = d();
514
+ l.Y(), r && r.Y(), n[1](!1), n = d();
512
515
  },
513
- ie: (e, t) => (s.set(e, t), l.W(e), () => {
514
- s.delete(e), l.V(e);
516
+ ue: (e, t) => (s.set(e, t), l.F(e), () => {
517
+ s.delete(e), l.X(e);
515
518
  }),
516
- async Y(e, t) {
517
- await n[0] && r.X(e, t);
519
+ async G(e, t) {
520
+ await n[0] && r.U(e, t);
518
521
  },
519
- ce() {
520
- r && r.F();
522
+ fe() {
523
+ r && r.J();
521
524
  },
522
- J: e.C
525
+ K: e.C
523
526
  };
524
527
  })(f, l), m = (0, e.ref)(f.O());
525
528
  f.q(1, () => {
@@ -533,11 +536,11 @@ e.defineComponent)({
533
536
  m.value;
534
537
  const o = f.l(t.bufferSize);
535
538
  return e && W(e, o) ? e : o;
536
- }), h = (0, e.computed)(() => m.value && f.N()), w = (0, e.computed)(() => m.value && f.t());
539
+ }), h = (0, e.computed)(() => m.value && f.N()), S = (0, e.computed)(() => m.value && f.t());
537
540
  return (0, e.onMounted)(() => {
538
541
  s = !1;
539
542
  const o = i.value, r = requestAnimationFrame(() => {
540
- p.le(o, t.scrollRef);
543
+ p.ae(o, t.scrollRef);
541
544
  });
542
545
  (0, e.onUnmounted)(() => {
543
546
  cancelAnimationFrame(r);
@@ -545,18 +548,18 @@ e.defineComponent)({
545
548
  }), (0, e.onUnmounted)(() => {
546
549
  f.k(), p.k();
547
550
  }), (0, e.watch)(() => t.data.length, e => {
548
- f.B(5, [ e, t.shift ]);
551
+ f.P(5, [ e, t.shift ]);
549
552
  }), (0, e.watch)(() => t.startMargin, e => {
550
- f.B(6, e);
553
+ f.P(6, e);
551
554
  }, {
552
555
  immediate: !0
553
556
  }), (0, e.watch)([ m ], () => {
554
- p.ce();
557
+ p.fe();
555
558
  }, {
556
559
  flush: "post"
557
560
  }), r({
558
561
  get cache() {
559
- return u.L();
562
+ return u.B();
560
563
  },
561
564
  get scrollOffset() {
562
565
  return f.M();
@@ -567,33 +570,33 @@ e.defineComponent)({
567
570
  get viewportSize() {
568
571
  return f.o();
569
572
  },
570
- findItemIndex: f.R,
573
+ findItemIndex: f.T,
571
574
  getItemOffset: f.u,
572
575
  getItemSize: f.p,
573
- scrollToIndex: (e, t) => B(p, f, e, t),
576
+ scrollToIndex: (e, t) => P(p, f, e, t),
574
577
  scrollTo: e => q(p, e),
575
578
  scrollBy: e => ((e, t, o) => {
576
579
  q(e, o + t.M());
577
580
  })(p, f, e)
578
581
  }), () => {
579
- const o = t.as, r = t.item, a = w.value, u = [], d = o => {
582
+ const o = t.as, r = t.item, a = S.value, u = [], d = o => {
580
583
  const i = n.default({
581
584
  item: t.data[o],
582
585
  index: o
583
586
  });
584
- return (0, e.createVNode)(P, {
587
+ return (0, e.createVNode)(L, {
585
588
  key: H(i, o),
586
- U: m,
587
- G: f,
588
- te: p.ie,
589
- K: o,
590
- Z: n.default,
591
- ee: t.data[o],
592
- oe: l,
593
- re: s,
594
- ne: r,
595
- se: t.itemProps
596
- }, null, 8, [ "U", "G", "te", "K", "Z", "ee", "oe", "re", "ne", "se" ]);
589
+ Z: m,
590
+ ee: f,
591
+ ne: p.ue,
592
+ te: o,
593
+ oe: n.default,
594
+ re: t.data[o],
595
+ se: l,
596
+ le: s,
597
+ ie: r,
598
+ ce: t.itemProps
599
+ }, null, 8, [ "Z", "ee", "ne", "te", "oe", "re", "se", "le", "ie", "ce" ]);
597
600
  };
598
601
  if (t.keepMounted) {
599
602
  const e = t.data.length, o = new Set(t.keepMounted);
@@ -716,7 +719,7 @@ e.defineComponent)({
716
719
  emits: [ "scroll", "scrollEnd" ],
717
720
  setup(t, {emit: o, slots: r, expose: n}) {
718
721
  let s = !!t.ssrCount;
719
- const l = t.horizontal, i = (0, e.ref)(), c = S(t.data.length, t.itemSize, t.cache), a = $(c, t.ssrCount), u = ((e, t) => {
722
+ const l = t.horizontal, i = (0, e.ref)(), c = w(t.data.length, t.itemSize, t.cache), a = $(c, t.ssrCount), u = ((e, t) => {
720
723
  let o, r, n, s, l, i = d();
721
724
  const c = /* @__PURE__ */ new WeakMap, a = E(r => {
722
725
  const n = [];
@@ -724,33 +727,33 @@ e.defineComponent)({
724
727
  const o = c.get(e);
725
728
  null != o && n.push([ o, t ? s : i ]);
726
729
  }
727
- n.length && e.B(3, n);
730
+ n.length && e.P(3, n);
728
731
  });
729
732
  return {
730
- le(c) {
733
+ ae(c) {
731
734
  const u = p(c), f = m(u), d = o = u.scrollingElement, g = t && "rtl" === getComputedStyle(d).direction, _ = (e, t, o, r, n = 0) => {
732
735
  const s = r ? "offsetLeft" : "offsetTop", l = n + (g ? t.clientWidth - e[s] - e.offsetWidth : e[s]), i = e.offsetParent;
733
736
  return e !== o && i ? _(i, t, o, r, l) : l;
734
737
  }, $ = s = () => _(c, d, u.body, t), h = l = () => {
735
- e.B(4, d[t ? "clientWidth" : "clientHeight"]);
738
+ e.P(4, d[t ? "clientWidth" : "clientHeight"]);
736
739
  };
737
- f.addEventListener("resize", h), a.W(d), n = () => {
740
+ f.addEventListener("resize", h), a.F(d), n = () => {
738
741
  f.removeEventListener("resize", h);
739
742
  }, r = j(e, f, d, t, g, null, $), i[1](!0);
740
743
  },
741
744
  k() {
742
- n && n(), a.D(), r && r.D(), i[1](!1), i = d();
745
+ n && n(), a.Y(), r && r.Y(), i[1](!1), i = d();
743
746
  },
744
- ie: (e, t) => (c.set(e, t), a.W(e), () => {
745
- c.delete(e), a.V(e);
747
+ ue: (e, t) => (c.set(e, t), a.F(e), () => {
748
+ c.delete(e), a.X(e);
746
749
  }),
747
- async Y(e, t) {
748
- await i[0] && r.X(e, t);
750
+ async G(e, t) {
751
+ await i[0] && r.U(e, t);
749
752
  },
750
- ce() {
751
- r && r.F();
753
+ fe() {
754
+ r && r.J();
752
755
  },
753
- J: () => s()
756
+ K: () => s()
754
757
  };
755
758
  })(a, l), f = (0, e.ref)(a.O());
756
759
  a.q(1, () => {
@@ -768,18 +771,18 @@ e.defineComponent)({
768
771
  return (0, e.onMounted)(() => {
769
772
  s = !1;
770
773
  const e = i.value;
771
- e && u.le(e);
774
+ e && u.ae(e);
772
775
  }), (0, e.onUnmounted)(() => {
773
776
  a.k(), u.k();
774
777
  }), (0, e.watch)(() => t.data.length, e => {
775
- a.B(5, [ e, t.shift ]);
778
+ a.P(5, [ e, t.shift ]);
776
779
  }), (0, e.watch)([ f ], () => {
777
- u.ce();
780
+ u.fe();
778
781
  }, {
779
782
  flush: "post"
780
783
  }), n({
781
784
  get cache() {
782
- return c.L();
785
+ return c.B();
783
786
  },
784
787
  get scrollOffset() {
785
788
  return a.M();
@@ -787,10 +790,10 @@ e.defineComponent)({
787
790
  get viewportSize() {
788
791
  return a.o();
789
792
  },
790
- findItemIndex: a.R,
793
+ findItemIndex: a.T,
791
794
  getItemOffset: a.u,
792
795
  getItemSize: a.p,
793
- scrollToIndex: (e, t) => B(u, a, e, t)
796
+ scrollToIndex: (e, t) => P(u, a, e, t)
794
797
  }), () => {
795
798
  const o = t.as, n = t.item, c = h.value, d = [];
796
799
  for (let [o, i] = g.value; o <= i; o++) {
@@ -798,18 +801,18 @@ e.defineComponent)({
798
801
  item: t.data[o],
799
802
  index: o
800
803
  });
801
- d.push((0, e.createVNode)(P, {
804
+ d.push((0, e.createVNode)(L, {
802
805
  key: H(i, o),
803
- U: f,
804
- G: a,
805
- te: u.ie,
806
- K: o,
807
- Z: r.default,
808
- ee: t.data[o],
809
- oe: l,
810
- re: s,
811
- ne: n
812
- }, null, 8, [ "U", "G", "te", "K", "Z", "ee", "oe", "re", "ne" ]));
806
+ Z: f,
807
+ ee: a,
808
+ ne: u.ue,
809
+ te: o,
810
+ oe: r.default,
811
+ re: t.data[o],
812
+ se: l,
813
+ le: s,
814
+ ie: n
815
+ }, null, 8, [ "Z", "ee", "ne", "te", "oe", "re", "se", "le", "ie" ]));
813
816
  }
814
817
  return (0, e.createVNode)(o, {
815
818
  ref: i,
@@ -832,12 +835,12 @@ e.defineComponent)({
832
835
  }
833
836
  }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
834
837
  const o = (0, e.ref)();
835
- return (0, e.watch)([ o, () => t.ue.ae, () => t.ue.fe ], ([e, o, r], n, s) => {
836
- !e || null == o && null == r || s(t.te(e, o, r));
838
+ return (0, e.watch)([ o, () => t.pe.de, () => t.pe.me ], ([e, o, r], n, s) => {
839
+ !e || null == o && null == r || s(t.ne(e, o, r));
837
840
  }, {
838
841
  flush: "post"
839
842
  }), () => {
840
- const {de: r, pe: n, me: s, ge: l, _e: i, $e: c} = t.ue;
843
+ const {ge: r, _e: n, $e: s, he: l, Se: i, we: c} = t.pe;
841
844
  return (0, e.createVNode)("div", {
842
845
  ref: o,
843
846
  role: l,
@@ -846,67 +849,67 @@ e.defineComponent)({
846
849
  "aria-colspan": s,
847
850
  "aria-sort": i,
848
851
  style: c
849
- }, [ t.Z({
850
- row: t.he,
851
- col: t.we,
852
+ }, [ t.oe({
853
+ row: t.ye,
854
+ col: t.be,
852
855
  cell: {
853
- rowIndex: t.Se,
856
+ rowIndex: t.ze,
854
857
  colIndex: r
855
858
  }
856
859
  }) ], 12, [ "role", "aria-colindex", "aria-rowspan", "aria-colspan", "aria-sort" ]);
857
860
  };
858
861
  }, {
859
862
  props: {
860
- ue: null,
861
- Z: null,
862
- he: null,
863
- we: null,
864
- Se: null,
865
- te: null
863
+ pe: null,
864
+ oe: null,
865
+ ye: null,
866
+ be: null,
867
+ ze: null,
868
+ ne: null
866
869
  }
867
870
  }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
868
- const {ye: o, be: r, $e: n} = t.ue;
871
+ const {xe: o, ve: r, we: n} = t.pe;
869
872
  return (0, e.createVNode)("div", {
870
873
  role: "row",
871
874
  "aria-rowindex": o + 1,
872
875
  style: n
873
876
  }, [ r.map(r => (0, e.createVNode)(X, {
874
- key: r.de,
875
- ue: r,
876
- Z: t.Z,
877
- he: t.he,
878
- we: b(t.ze, r.de),
879
- Se: o,
880
- te: t.te
881
- }, null, 8, [ "ue", "Z", "he", "we", "Se", "te" ])) ], 12, [ "aria-rowindex" ]);
877
+ key: r.ge,
878
+ pe: r,
879
+ oe: t.oe,
880
+ ye: t.ye,
881
+ be: b(t.Ie, r.ge),
882
+ ze: o,
883
+ ne: t.ne
884
+ }, null, 8, [ "pe", "oe", "ye", "be", "ze", "ne" ])) ], 12, [ "aria-rowindex" ]);
882
885
  }, {
883
886
  props: {
884
- ue: null,
885
- Z: null,
886
- he: null,
887
- ze: null,
888
- te: null
887
+ pe: null,
888
+ oe: null,
889
+ ye: null,
890
+ Ie: null,
891
+ ne: null
889
892
  }
890
893
  }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
891
- const {xe: o, $e: r} = t.ue;
894
+ const {ke: o, we: r} = t.pe;
892
895
  return (0, e.createVNode)("div", {
893
896
  role: "rowgroup",
894
897
  style: r
895
898
  }, [ o.map(o => (0, e.createVNode)(Y, {
896
- key: o.ye,
897
- ue: o,
898
- Z: t.Z,
899
- he: b(t.ve, o.ye),
900
- ze: t.ze,
901
- te: t.te
902
- }, null, 8, [ "ue", "Z", "he", "ze", "te" ])) ], 4);
899
+ key: o.xe,
900
+ pe: o,
901
+ oe: t.oe,
902
+ ye: b(t.Oe, o.xe),
903
+ Ie: t.Ie,
904
+ ne: t.ne
905
+ }, null, 8, [ "pe", "oe", "ye", "Ie", "ne" ])) ], 4);
903
906
  }, {
904
907
  props: {
905
- ue: null,
906
- Z: null,
907
- ve: null,
908
- ze: null,
909
- te: null
908
+ pe: null,
909
+ oe: null,
910
+ Oe: null,
911
+ Ie: null,
912
+ ne: null
910
913
  }
911
914
  }), U = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
912
915
  props: {
@@ -942,24 +945,24 @@ e.defineComponent)({
942
945
  },
943
946
  emits: [ "verticalScroll", "horizontalScroll", "scrollEnd" ],
944
947
  setup(t, {emit: s, expose: l, slots: u}) {
945
- const f = (0, e.ref)(), p = z(t.rows, t.rowHeight, t.gap), m = z(t.cols, t.colWidth, t.gap), g = $(p), h = $(m), w = ((e, t) => {
948
+ const f = (0, e.ref)(), p = z(t.rows, t.rowHeight, t.gap), m = z(t.cols, t.colWidth, t.gap), g = $(p), h = $(m), S = ((e, t) => {
946
949
  let o, r, n, s = d();
947
950
  const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c = E(r => {
948
951
  const n = [], s = [];
949
- for (const {target: c, contentRect: {width: a, height: u}} of r) if (c === o) (a || u) && (e.B(4, u),
950
- t.B(4, a)); else if (c.offsetParent) {
952
+ for (const {target: c, contentRect: {width: a, height: u}} of r) if (c === o) (a || u) && (e.P(4, u),
953
+ t.P(4, a)); else if (c.offsetParent) {
951
954
  const e = l.get(c), t = i.get(c);
952
955
  null != e && n.push([ e, u ]), null != t && s.push([ t, a ]);
953
956
  }
954
- n.length && e.B(3, n), s.length && t.B(3, s);
957
+ n.length && e.P(3, n), s.length && t.P(3, s);
955
958
  });
956
959
  return {
957
- async Y(e, t) {
958
- await s[0] && (e ? n : r).X(t);
960
+ async G(e, t) {
961
+ await s[0] && (e ? n : r).U(t);
959
962
  },
960
- le(l) {
963
+ ae(l) {
961
964
  const i = o = l.parentElement;
962
- c.W(i);
965
+ c.F(i);
963
966
  const u = (e, t) => j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
964
967
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
965
968
  o[e] = "hidden", a(() => {
@@ -969,146 +972,148 @@ e.defineComponent)({
969
972
  r = u(e, !1), n = u(t, !0), s[1](!0);
970
973
  },
971
974
  k() {
972
- c.D(), r && r.D(), n && n.D(), s[1](!1), s = d();
975
+ c.Y(), r && r.Y(), n && n.Y(), s[1](!1), s = d();
973
976
  },
974
- ie: (e, t, o) => (null != t && l.set(e, t), null != o && i.set(e, o), c.W(e), () => {
975
- l.delete(e), i.delete(e), c.V(e);
977
+ ue: (e, t, o) => (null != t && l.set(e, t), null != o && i.set(e, o), c.F(e), () => {
978
+ l.delete(e), i.delete(e), c.X(e);
976
979
  }),
977
- ce() {
978
- r && r.F(), n && n.F();
980
+ fe() {
981
+ r && r.J(), n && n.J();
979
982
  }
980
983
  };
981
- })(g, h), S = (0, e.ref)(g.O() + h.O()), y = () => {
982
- S.value = g.O() + h.O();
984
+ })(g, h), w = (0, e.ref)(g.O() + h.O()), y = () => {
985
+ w.value = g.O() + h.O();
983
986
  };
984
987
  g.q(1, y), h.q(1, y);
985
- let q = !1;
988
+ let T = !1;
986
989
  g.q(4, () => {
987
- q = !0, s("verticalScroll", g.M());
990
+ T = !0, s("verticalScroll", g.M());
988
991
  }), h.q(4, () => {
989
- q = !0, s("horizontalScroll", h.M());
992
+ T = !0, s("horizontalScroll", h.M());
990
993
  });
991
- const B = () => {
992
- !q || g.N() || h.N() || (q = !1, s("scrollEnd"));
994
+ const q = () => {
995
+ !T || g.N() || h.N() || (T = !1, s("scrollEnd"));
993
996
  };
994
- g.q(8, B), h.q(8, B), (0, e.watchEffect)(() => {
995
- x(g, p, t.rows, t.rowHeight, !0);
997
+ g.q(8, q), h.q(8, q), (0, e.watchEffect)(() => {
998
+ x(g, p, t.rows, t.rowHeight, t.headerRows, t.footerRows, !0);
996
999
  }), (0, e.watchEffect)(() => {
997
- x(h, m, t.cols, t.colWidth, !0);
1000
+ x(h, m, t.cols, t.colWidth, t.headerCols, t.footerCols, !0);
998
1001
  });
999
- const P = (0, e.computed)(() => S.value && g.A()), H = (0, e.computed)(() => S.value && h.A()), W = (0,
1000
- e.computed)(() => (S.value, ((e, t, s, l, a = 0, u = o, f = 0, d = 0, p = 0, m = o, g = o, _) => {
1001
- const $ = e.S(), h = t.S(), w = r(a, $), S = n($ - f, w), y = r(d, h), b = n(h - p, y), z = i(s[0], w, S), x = r(s[1], S - 1), E = i(l[0], y, b), j = r(l[1], b - 1), q = k(u, w, S), B = n(y - 1, 0), L = [], P = [], H = [];
1002
- for (const e of g) e.rowIndex < $ && e.colIndex < h && H.push(e);
1003
- const W = q.length;
1004
- W && (R(L, q, z, S), P.push(B));
1005
- let V = m, D = 0;
1006
- do {
1007
- for (;D < H.length; D++) {
1008
- const {rowIndex: e, colIndex: t} = H[D];
1009
- L.push(e), R(L, q, e, S), P.push(t);
1010
- }
1011
- const e = [];
1012
- for (const t of V) {
1013
- const o = t.rowIndex, r = t.colIndex, n = A(t, $), s = M(t, h);
1014
- if (o < $ && r < h && (n - o > 1 || s - r > 1)) if (I(L, o, n, w, z, x, S)) if (I(P, r, s, y, E, j, b)) H.push(t); else {
1015
- const r = O(q, n - 1, S);
1016
- (o < w || r >= 0 && q[r] >= o) && e.push(t);
1017
- } else r < y && e.push(t);
1002
+ const P = (0, e.computed)(() => w.value && g.A()), L = (0, e.computed)(() => w.value && h.A()), H = (0,
1003
+ e.computed)(() => (w.value, ((e, t, s, l, a = o, u = o, f = o, d) => {
1004
+ const p = e.S(), m = t.S(), g = e.W(), _ = e.V(), $ = t.W(), h = t.V(), S = i(s[0], g, _), w = r(s[1], _ - 1), y = i(l[0], $, h), b = r(l[1], h - 1), z = k(a, g, _), x = n($ - 1, 0), T = [], E = [], j = [];
1005
+ for (const e of f) e.rowIndex < p && e.colIndex < m && j.push(e);
1006
+ const q = j.length, P = z.length, B = O(z, S, _), L = B < 0 ? -1 : z[B];
1007
+ L >= 0 && T.push(L);
1008
+ for (const e of u) {
1009
+ const t = e.rowIndex, o = e.colIndex, r = A(e, p), n = M(e, m);
1010
+ if (t < p && o < m && (r - t > 1 || n - o > 1)) {
1011
+ let s = (I(t, r, g, S, w, _) || L >= t && L < r) && I(o, n, $, y, b, h);
1012
+ for (let e = 0; !s && e < q; e++) {
1013
+ const {rowIndex: l, colIndex: i} = j[e];
1014
+ s = l >= t && l < r && i >= o && i < n;
1015
+ }
1016
+ s && j.push(e);
1018
1017
  }
1019
- V = e;
1020
- } while (D < H.length);
1021
- c(L), c(P);
1022
- const F = T(L, $, w, z, x, S), X = T(P, h, y, E, j, b), Y = F.length, J = X.length, U = /* @__PURE__ */ new Map, G = [], K = [];
1023
- for (const e of H) {
1024
- const t = A(e, $), o = M(e, h);
1025
- G.push(t), K.push(o);
1026
- const r = X.indexOf(e.colIndex);
1027
- for (let n = F.indexOf(e.rowIndex); n < Y && F[n] < t; n++) {
1028
- const t = F[n] * h;
1029
- for (let n = r; n < J && X[n] < o; n++) U.set(t + X[n], e);
1018
+ }
1019
+ for (const {rowIndex: e, colIndex: t} of j) {
1020
+ const o = O(z, e, _);
1021
+ T.push(e), o >= 0 && T.push(z[o]), E.push(t);
1022
+ }
1023
+ c(T), c(E);
1024
+ const H = R(T, p, g, S, w, _), W = R(E, m, $, y, b, h), V = H.length, D = W.length, F = /* @__PURE__ */ new Map, X = [], Y = [];
1025
+ for (const e of j) {
1026
+ const t = A(e, p), o = M(e, m);
1027
+ X.push(t), Y.push(o);
1028
+ const r = W.indexOf(e.colIndex);
1029
+ for (let n = H.indexOf(e.rowIndex); n < V && H[n] < t; n++) {
1030
+ const t = H[n] * m;
1031
+ for (let n = r; n < D && W[n] < o; n++) F.set(t + W[n], e);
1030
1032
  }
1031
1033
  }
1032
- const Q = [];
1033
- for (const e of X) Q.push(!t.P(e) && null);
1034
- const Z = [], ee = e.u(w), te = [];
1035
- let oe = te;
1036
- const re = v.get(e), ne = /* @__PURE__ */ new Map;
1037
- for (const o of F) {
1038
- const r = o < w, s = o >= S, l = s || o >= z && o <= x, i = O(q, o, S), c = r ? 0 : s ? S : i < 0 ? -1 : q[i];
1039
- if (o === c) {
1040
- const e = r ? w : s ? $ : i + 1 < W ? q[i + 1] : S;
1041
- G.push(e);
1034
+ const J = [];
1035
+ for (const e of W) J.push(!t.L(e) && null);
1036
+ const U = [], G = e.u(g), K = [];
1037
+ let Q = K;
1038
+ const Z = v.get(e), ee = /* @__PURE__ */ new Map;
1039
+ for (const o of H) {
1040
+ const r = o < g, s = o >= _, l = O(z, o, _), i = r ? 0 : s ? _ : l < 0 ? -1 : z[l];
1041
+ if (o === i) {
1042
+ const e = r ? g : s ? p : l + 1 < P ? z[l + 1] : _;
1043
+ X.push(e);
1042
1044
  const t = [];
1043
- te.push({
1044
- Ie: r ? -1 : s ? -2 : -3 - c,
1045
- xe: t,
1046
- $e: C(c, e, r || s ? 0 : null, s ? "bottom" : "top", 4)
1047
- }), oe = t;
1048
- } else c < 0 && (oe = te);
1049
- const a = i >= 0 && o === c, u = a ? ee : null, f = o * h, d = re && re.get(o), p = d && d.be, m = [];
1050
- let g = 0, v = !e.P(o) && null, I = o + 1, k = !1;
1051
- for (let e = 0; e < J; e++) {
1052
- const s = X[e], i = s < y, c = s >= b, u = c || s >= E && s <= j, d = U.get(f + s);
1053
- if (d ? d.rowIndex === o && d.colIndex === s : l && u || r || a || i) {
1054
- const l = d ? A(d, $) : o + 1, u = d ? M(d, h) : s + 1, f = l - o > 1, w = u - s > 1, S = f || w, y = S ? l - o : void 0, b = S ? u - s : void 0;
1055
- let z, x;
1056
- I = n(I, l);
1057
- const O = i ? t.u(s) : null, R = c ? t.t() - t.u(u - 1) - t.p(u - 1) : null;
1058
- !1 !== v || f || (z = o, v = !0), !1 !== Q[e] || w || (x = s, Q[e] = !0);
1059
- const T = r ? "columnheader" : s === B && (i || a) ? "rowheader" : "cell", N = "cell" !== T && _ && _.rowIndex === o && _.colIndex === s ? _.order : void 0;
1060
- let C;
1061
- if (p) {
1062
- for (;g < p.length && p[g].de < s; ) g++;
1063
- g < p.length && (C = p[g]);
1045
+ K.push({
1046
+ Te: r ? -1 : s ? -2 : -3 - i,
1047
+ ke: t,
1048
+ we: C(i, e, r || s ? 0 : null, s ? "bottom" : "top", 4)
1049
+ }), Q = t;
1050
+ } else i < 0 && (Q = K);
1051
+ const c = l >= 0 && o === i, a = r || s || o === L || o >= S && o <= w, u = c ? G : null, f = o * m, v = Z && Z.get(o), I = v && v.ve, k = [];
1052
+ let T = 0, R = !e.L(o) && null, N = o + 1, E = !1;
1053
+ for (let e = 0; e < D; e++) {
1054
+ const s = W[e], l = s < $, i = s >= h, u = l || i || s >= y && s <= b, g = F.get(f + s);
1055
+ if (g ? g.rowIndex === o && g.colIndex === s : a && u) {
1056
+ const a = g ? A(g, p) : o + 1, u = g ? M(g, m) : s + 1, f = a - o, _ = u - s, $ = f > 1, h = _ > 1, S = $ || h;
1057
+ let w, y;
1058
+ N = n(N, a);
1059
+ const b = l ? t.u(s) : null, z = i ? t.t() - t.u(u - 1) - t.p(u - 1) : null;
1060
+ !1 !== R || $ || (w = o, R = !0), !1 !== J[e] || h || (y = s, J[e] = !0);
1061
+ const v = r ? "columnheader" : s === x && (l || c) ? "rowheader" : "cell", O = S ? f : void 0, C = S ? _ : void 0, j = "cell" !== v && d && d.rowIndex === o && d.colIndex === s ? d.order : void 0;
1062
+ let q;
1063
+ if (I) {
1064
+ const e = I.length;
1065
+ for (;T < e && I[T].ge < s; ) T++;
1066
+ T < e && I[T].ge === s && (q = I[T]);
1064
1067
  }
1065
- if (!C || C.de !== s || C.pe !== y || C.me !== b || C.ke !== O || C.Oe !== R || C.ae !== z || C.fe !== x || C.ge !== T || C._e !== N) {
1066
- const e = {
1068
+ if (!q || q._e !== O || q.$e !== C || q.Re !== b || q.Ae !== z || q.de !== w || q.me !== y || q.he !== v || q.Se !== j) {
1069
+ let e = "1/l" + s;
1070
+ S && (e += "/l" + a + "/l" + u);
1071
+ const t = {
1067
1072
  contain: "layout style",
1068
1073
  display: "grid",
1069
- gridArea: S ? "1/l" + s + "/l" + l + "/l" + u : "1/l" + s
1074
+ gridArea: e
1070
1075
  };
1071
- f && (e.height = "0px", e.minHeight = "100%", e.zIndex = 1), w && (e.width = "0px",
1072
- e.minWidth = "100%"), (i || c) && (i ? e.insetInlineStart = O + "px" : e.insetInlineEnd = R + "px",
1073
- e.position = "sticky", e.zIndex = 2), C = {
1074
- de: s,
1075
- pe: y,
1076
- me: b,
1077
- ae: z,
1078
- fe: x,
1079
- ge: T,
1080
- _e: N,
1081
- $e: e,
1082
- ke: O,
1083
- Oe: R
1084
- }, k = !0;
1076
+ $ && (t.height = "0px", t.minHeight = "100%", t.zIndex = 1), h && (t.width = "0px",
1077
+ t.minWidth = "100%"), (l || i) && (t[l ? "insetInlineStart" : "insetInlineEnd"] = (l ? b : z) + "px",
1078
+ t.position = "sticky", t.zIndex = 2), q = {
1079
+ ge: s,
1080
+ _e: O,
1081
+ $e: C,
1082
+ de: w,
1083
+ me: y,
1084
+ he: v,
1085
+ Se: j,
1086
+ we: t,
1087
+ Re: b,
1088
+ Ae: z
1089
+ }, E = !0;
1085
1090
  }
1086
- m.push(C);
1091
+ k.push(q);
1087
1092
  }
1088
1093
  }
1089
- if (Z.push(v), m.length) {
1090
- const e = d && !k && d.be.length === m.length && d.Re === u ? d : {
1091
- ye: o,
1092
- be: m,
1093
- $e: C(o, I, u, "top", 3),
1094
- Re: u
1094
+ if (U.push(R), k.length) {
1095
+ const e = v && !E && v.ve.length === k.length && v.Me === u ? v : {
1096
+ xe: o,
1097
+ ve: k,
1098
+ we: C(o, N, u, "top", 3),
1099
+ Me: u
1095
1100
  };
1096
- ne.set(o, e), oe.push(e);
1101
+ ee.set(o, e), Q.push(e);
1097
1102
  }
1098
1103
  }
1099
- return v.set(e, ne), {
1100
- Te: N(e, F, Z, c(G), "max-content", $),
1101
- Ae: N(t, X, Q, c(K), "minmax(max-content,auto)", h),
1102
- Me: te
1104
+ return v.set(e, ee), {
1105
+ Ne: N(e, H, U, c(X), "max-content", p),
1106
+ Ce: N(t, W, J, c(Y), "minmax(max-content,auto)", m),
1107
+ Ee: K
1103
1108
  };
1104
- })(p, m, g.l(t.bufferSize), h.l(t.bufferSize), t.headerRows, t.sectionRows, t.footerRows, t.headerCols, t.footerCols, t.spans, t.keepMounted, t.ariaSort))), V = (0,
1105
- e.computed)(() => S.value && (g.N() || h.N()));
1109
+ })(p, m, g.l(t.bufferSize), h.l(t.bufferSize), t.sectionRows, t.spans, t.keepMounted, t.ariaSort))), W = (0,
1110
+ e.computed)(() => w.value && (g.N() || h.N()));
1106
1111
  return (0, e.onMounted)(() => {
1107
- w.le(f.value);
1112
+ S.ae(f.value);
1108
1113
  }), (0, e.onUnmounted)(() => {
1109
- g.k(), h.k(), w.k();
1110
- }), (0, e.watch)([ S ], () => {
1111
- w.ce();
1114
+ g.k(), h.k(), S.k();
1115
+ }), (0, e.watch)([ w ], () => {
1116
+ S.fe();
1112
1117
  }, {
1113
1118
  flush: "post"
1114
1119
  }), l({
@@ -1130,30 +1135,30 @@ e.defineComponent)({
1130
1135
  get viewportWidth() {
1131
1136
  return h.o();
1132
1137
  },
1133
- findRowIndex: g.R,
1134
- findColIndex: h.R,
1138
+ findRowIndex: g.T,
1139
+ findColIndex: h.T,
1135
1140
  getRowOffset: g.u,
1136
1141
  getColOffset: h.u,
1137
1142
  getRowSize: g.p,
1138
1143
  getColSize: h.p,
1139
- scrollToIndex: e => ((e, t, r, n = 0, s = o, l = 0, i = 0, c = 0, {rowIndex: a, colIndex: u, rowAlign: f, colAlign: d}) => {
1140
- null != a && L(e, t, n, s, l, a, f, !1), null != u && L(e, r, i, o, c, u, d, !0);
1141
- })(w, g, h, t.headerRows, t.sectionRows, t.footerRows, t.headerCols, t.footerCols, e),
1144
+ scrollToIndex: e => ((e, t, r, n, s, l = o, {rowIndex: i, colIndex: c, rowAlign: a, colAlign: u}) => {
1145
+ null != i && B(e, t, n, l, i, a, !1), null != c && B(e, r, s, o, c, u, !0);
1146
+ })(S, g, h, p, m, t.sectionRows, e),
1142
1147
  scrollTo: ({vertical: e, horizontal: t}) => ((e, t, o) => {
1143
- null != t && e.Y(!1, () => t), null != o && e.Y(!0, () => o);
1144
- })(w, e, t),
1148
+ null != t && e.G(!1, () => t), null != o && e.G(!0, () => o);
1149
+ })(S, e, t),
1145
1150
  scrollBy: ({vertical: e, horizontal: t}) => ((e, t, o, r, n) => {
1146
1151
  if (null != r) {
1147
1152
  const o = r + t.M();
1148
- e.Y(!1, () => o);
1153
+ e.G(!1, () => o);
1149
1154
  }
1150
1155
  if (null != n) {
1151
1156
  const t = n + o.M();
1152
- e.Y(!0, () => t);
1157
+ e.G(!0, () => t);
1153
1158
  }
1154
- })(w, g, h, e, t)
1159
+ })(S, g, h, e, t)
1155
1160
  }), () => {
1156
- const {Te: o, Ae: r, Me: n} = W.value, s = g.u(0), l = h.u(0), i = {
1161
+ const {Ne: o, Ce: r, Ee: n} = H.value, s = g.u(0), l = h.u(0), i = {
1157
1162
  contain: "size style",
1158
1163
  overflowAnchor: "none",
1159
1164
  flex: "none",
@@ -1164,12 +1169,12 @@ e.defineComponent)({
1164
1169
  marginTop: s + "px",
1165
1170
  marginInlineStart: l + "px",
1166
1171
  height: _(g) - s + "px",
1167
- pointerEvents: V.value ? "none" : void 0
1172
+ pointerEvents: W.value ? "none" : void 0
1168
1173
  };
1169
1174
  return (0, e.createVNode)("div", {
1170
1175
  role: "table",
1171
1176
  "aria-rowcount": P.value,
1172
- "aria-colcount": H.value,
1177
+ "aria-colcount": L.value,
1173
1178
  style: {
1174
1179
  overflow: "auto",
1175
1180
  contain: "strict",
@@ -1179,21 +1184,21 @@ e.defineComponent)({
1179
1184
  }, [ (0, e.createVNode)("div", {
1180
1185
  ref: f,
1181
1186
  style: i
1182
- }, [ n.map(o => "xe" in o ? (0, e.createVNode)(J, {
1183
- key: o.Ie,
1184
- ue: o,
1185
- Z: u.default,
1186
- ve: t.rows,
1187
- ze: t.cols,
1188
- te: w.ie
1189
- }, null, 8, [ "ue", "Z", "ve", "ze", "te" ]) : (0, e.createVNode)(Y, {
1190
- key: o.ye,
1191
- ue: o,
1192
- Z: u.default,
1193
- he: b(t.rows, o.ye),
1194
- ze: t.cols,
1195
- te: w.ie
1196
- }, null, 8, [ "ue", "Z", "he", "ze", "te" ])) ], 4) ], 8, [ "aria-rowcount", "aria-colcount" ]);
1187
+ }, [ n.map(o => "ke" in o ? (0, e.createVNode)(J, {
1188
+ key: o.Te,
1189
+ pe: o,
1190
+ oe: u.default,
1191
+ Oe: t.rows,
1192
+ Ie: t.cols,
1193
+ ne: S.ue
1194
+ }, null, 8, [ "pe", "oe", "Oe", "Ie", "ne" ]) : (0, e.createVNode)(Y, {
1195
+ key: o.xe,
1196
+ pe: o,
1197
+ oe: u.default,
1198
+ ye: b(t.rows, o.xe),
1199
+ Ie: t.cols,
1200
+ ne: S.ue
1201
+ }, null, 8, [ "pe", "oe", "ye", "Ie", "ne" ])) ], 4) ], 8, [ "aria-rowcount", "aria-colcount" ]);
1197
1202
  };
1198
1203
  }
1199
1204
  });