virtua 0.52.2 → 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
@@ -245,11 +245,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
245
245
  t.H(n, s), i !== e.A() && e.P(5, [ i ]);
246
246
  const c = t.D(o, r, e.M() - e.u(0), l);
247
247
  null != c && e.P(9, c);
248
- }, v = /*#__PURE__*/ new WeakMap, I = (e, t, o, s, l, i, c) => {
249
- if (t < s || n(t, l) < r(o, i + 1) || c < o) return !0;
250
- for (const r of e) if (r >= t && r < o) return !0;
251
- return !1;
252
- }, k = (e, t, o) => {
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) => {
253
249
  const r = [];
254
250
  for (const n of e) n >= t && n < o && r.push(n);
255
251
  return c(r);
@@ -261,25 +257,22 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
261
257
  e[o] <= t ? r = o + 1 : n = o;
262
258
  }
263
259
  return r - 1;
264
- }, T = (e, t, o, r) => {
265
- const n = O(t, o, r);
266
- n >= 0 && e.push(t[n]);
267
- }, R = (e, t, o, r, n) => {
260
+ }, T = (e, t, o, r, n) => {
268
261
  const s = t.length;
269
262
  for (;o < s && t[o] < r; o++) {
270
263
  const r = t[o];
271
264
  r > n && (e.push(r), n = r);
272
265
  }
273
266
  return o;
274
- }, A = (e, t, o, r, n, s) => {
267
+ }, R = (e, t, o, r, n, s) => {
275
268
  const l = [];
276
269
  for (let e = 0; e < o; e++) l.push(e);
277
- const i = R(l, e, 0, r, o - 1);
270
+ const i = T(l, e, 0, r, o - 1);
278
271
  for (let e = r; e <= n; e++) l.push(e);
279
- R(l, e, i, s, n);
272
+ T(l, e, i, s, n);
280
273
  for (let e = s; e < t; e++) l.push(e);
281
274
  return l;
282
- }, M = (e, t) => r(e.rowIndex + (e.rowSpan || 1), t), N = (e, t) => r(e.colIndex + (e.colSpan || 1), t), C = (e, t, o, n, s, l) => {
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) => {
283
276
  const i = t.length, c = n.length;
284
277
  let a = "[l0]", u = 0, f = 0, d = 0;
285
278
  for (;u < l; ) {
@@ -294,7 +287,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
294
287
  a += " " + g + " [l" + m + "]", u = m;
295
288
  }
296
289
  return a;
297
- }, E = (e, t, o, r, n) => {
290
+ }, C = (e, t, o, r, n) => {
298
291
  const s = {
299
292
  display: "grid",
300
293
  gridTemplateRows: "subgrid",
@@ -303,7 +296,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
303
296
  gridRow: "l" + e + "/l" + t
304
297
  };
305
298
  return null != o && (s.position = "sticky", s[r] = o + "px", s.zIndex = n), s;
306
- }, j = e => {
299
+ }, E = e => {
307
300
  let t;
308
301
  return {
309
302
  F(o) {
@@ -316,7 +309,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
316
309
  t && t.disconnect();
317
310
  }
318
311
  };
319
- }, q = (e, t, o, r, n, s, l) => {
312
+ }, j = (e, t, o, r, n, s, l) => {
320
313
  let i, c, d = 0, p = !1, m = !1, _ = !1, $ = !1;
321
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) => {
322
315
  o.scrollTo({
@@ -385,9 +378,9 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
385
378
  o ? (e.P(8, t()), f(d)) : d();
386
379
  }
387
380
  };
388
- }, P = (e, t) => {
381
+ }, q = (e, t) => {
389
382
  e.G(() => t);
390
- }, B = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
383
+ }, P = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
391
384
  if (o = i(o, 0, t.A() - 1), "nearest" === r) {
392
385
  const e = t.u(o), n = t.M();
393
386
  if (e < n) r = "start"; else {
@@ -396,10 +389,10 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
396
389
  }
397
390
  }
398
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);
399
- }, L = (e, t, o, s, l, c, a) => {
392
+ }, B = (e, t, o, s, l, c, a) => {
400
393
  const u = t.A(), f = o.W(), d = o.V();
401
394
  l = i(l, 0, u - 1);
402
- 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 : t.u(g + 1) - t.u(g)), $ = () => o.u(u) - o.u(d);
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);
403
396
  if ("nearest" === c) {
404
397
  if (l < f || l >= d) return;
405
398
  const e = _(), o = t.M() + e, s = t.o() - e - $(), i = t.p(l);
@@ -417,7 +410,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
417
410
  const e = _(), o = t.p(l) - (t.o() - e - $());
418
411
  return t.u(l) - e + ("end" === c ? o : "center" === c ? o / 2 : 0);
419
412
  });
420
- }, H = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
413
+ }, L = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
421
414
  const o = (0, e.ref)(), r = (0, e.computed)(() => t.Z.value && t.ee.u(t.te)), n = (0,
422
415
  e.computed)(() => t.Z.value && t.ee.R(t.te)), s = (0, e.computed)(() => t.oe({
423
416
  item: t.re,
@@ -460,13 +453,13 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
460
453
  ie: null,
461
454
  ce: null
462
455
  }
463
- }), W = (e, t) => {
456
+ }), H = (e, t) => {
464
457
  if (1 === e.length) {
465
458
  const t = e[0].key;
466
459
  if (null != t) return t;
467
460
  }
468
461
  return "_" + t;
469
- }, V = (e, t) => e[0] === t[0] && e[1] === t[1], D = /* @__PURE__ */ /* @__PURE__ */ (0,
462
+ }, W = (e, t) => e[0] === t[0] && e[1] === t[1], V = /* @__PURE__ */ /* @__PURE__ */ (0,
470
463
  e.defineComponent)({
471
464
  props: {
472
465
  data: {
@@ -500,7 +493,7 @@ e.defineComponent)({
500
493
  let s = !!t.ssrCount;
501
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) => {
502
495
  let o, r, n = d();
503
- const s = /* @__PURE__ */ new WeakMap, l = j(r => {
496
+ const s = /* @__PURE__ */ new WeakMap, l = E(r => {
504
497
  const n = [];
505
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) {
506
499
  const e = s.get(l);
@@ -510,7 +503,7 @@ e.defineComponent)({
510
503
  });
511
504
  return {
512
505
  ae(s, i = s.parentElement) {
513
- l.F(o = i), r = q(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
506
+ l.F(o = i), r = j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
514
507
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
515
508
  o[e] = "hidden", a(() => {
516
509
  o[e] = r;
@@ -542,7 +535,7 @@ e.defineComponent)({
542
535
  const g = (0, e.computed)(e => {
543
536
  m.value;
544
537
  const o = f.l(t.bufferSize);
545
- return e && V(e, o) ? e : o;
538
+ return e && W(e, o) ? e : o;
546
539
  }), h = (0, e.computed)(() => m.value && f.N()), S = (0, e.computed)(() => m.value && f.t());
547
540
  return (0, e.onMounted)(() => {
548
541
  s = !1;
@@ -580,10 +573,10 @@ e.defineComponent)({
580
573
  findItemIndex: f.T,
581
574
  getItemOffset: f.u,
582
575
  getItemSize: f.p,
583
- scrollToIndex: (e, t) => B(p, f, e, t),
584
- scrollTo: e => P(p, e),
576
+ scrollToIndex: (e, t) => P(p, f, e, t),
577
+ scrollTo: e => q(p, e),
585
578
  scrollBy: e => ((e, t, o) => {
586
- P(e, o + t.M());
579
+ q(e, o + t.M());
587
580
  })(p, f, e)
588
581
  }), () => {
589
582
  const o = t.as, r = t.item, a = S.value, u = [], d = o => {
@@ -591,8 +584,8 @@ e.defineComponent)({
591
584
  item: t.data[o],
592
585
  index: o
593
586
  });
594
- return (0, e.createVNode)(H, {
595
- key: W(i, o),
587
+ return (0, e.createVNode)(L, {
588
+ key: H(i, o),
596
589
  Z: m,
597
590
  ee: f,
598
591
  ne: p.ue,
@@ -631,7 +624,7 @@ e.defineComponent)({
631
624
  var _;
632
625
  };
633
626
  }
634
- }), F = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
627
+ }), D = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
635
628
  props: {
636
629
  data: {
637
630
  type: Array,
@@ -681,7 +674,7 @@ e.defineComponent)({
681
674
  width: "100%",
682
675
  height: "100%"
683
676
  }
684
- }, [ (0, e.createVNode)(D, {
677
+ }, [ (0, e.createVNode)(V, {
685
678
  ref: c,
686
679
  data: t.data,
687
680
  bufferSize: t.bufferSize,
@@ -702,7 +695,7 @@ e.defineComponent)({
702
695
  var o;
703
696
  };
704
697
  }
705
- }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
698
+ }), F = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
706
699
  props: {
707
700
  data: {
708
701
  type: Array,
@@ -728,7 +721,7 @@ e.defineComponent)({
728
721
  let s = !!t.ssrCount;
729
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) => {
730
723
  let o, r, n, s, l, i = d();
731
- const c = /* @__PURE__ */ new WeakMap, a = j(r => {
724
+ const c = /* @__PURE__ */ new WeakMap, a = E(r => {
732
725
  const n = [];
733
726
  for (const {target: e, contentRect: {width: s, height: i}} of r) if (e === o) l && l(); else if (e.offsetParent) {
734
727
  const o = c.get(e);
@@ -746,7 +739,7 @@ e.defineComponent)({
746
739
  };
747
740
  f.addEventListener("resize", h), a.F(d), n = () => {
748
741
  f.removeEventListener("resize", h);
749
- }, r = q(e, f, d, t, g, null, $), i[1](!0);
742
+ }, r = j(e, f, d, t, g, null, $), i[1](!0);
750
743
  },
751
744
  k() {
752
745
  n && n(), a.Y(), r && r.Y(), i[1](!1), i = d();
@@ -773,7 +766,7 @@ e.defineComponent)({
773
766
  const g = (0, e.computed)(e => {
774
767
  f.value;
775
768
  const o = a.l(t.bufferSize);
776
- return e && V(e, o) ? e : o;
769
+ return e && W(e, o) ? e : o;
777
770
  }), _ = (0, e.computed)(() => f.value && a.N()), h = (0, e.computed)(() => f.value && a.t());
778
771
  return (0, e.onMounted)(() => {
779
772
  s = !1;
@@ -800,7 +793,7 @@ e.defineComponent)({
800
793
  findItemIndex: a.T,
801
794
  getItemOffset: a.u,
802
795
  getItemSize: a.p,
803
- scrollToIndex: (e, t) => B(u, a, e, t)
796
+ scrollToIndex: (e, t) => P(u, a, e, t)
804
797
  }), () => {
805
798
  const o = t.as, n = t.item, c = h.value, d = [];
806
799
  for (let [o, i] = g.value; o <= i; o++) {
@@ -808,8 +801,8 @@ e.defineComponent)({
808
801
  item: t.data[o],
809
802
  index: o
810
803
  });
811
- d.push((0, e.createVNode)(H, {
812
- key: W(i, o),
804
+ d.push((0, e.createVNode)(L, {
805
+ key: H(i, o),
813
806
  Z: f,
814
807
  ee: a,
815
808
  ne: u.ue,
@@ -840,7 +833,7 @@ e.defineComponent)({
840
833
  var p;
841
834
  };
842
835
  }
843
- }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
836
+ }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
844
837
  const o = (0, e.ref)();
845
838
  return (0, e.watch)([ o, () => t.pe.de, () => t.pe.me ], ([e, o, r], n, s) => {
846
839
  !e || null == o && null == r || s(t.ne(e, o, r));
@@ -874,13 +867,13 @@ e.defineComponent)({
874
867
  ze: null,
875
868
  ne: null
876
869
  }
877
- }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
870
+ }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
878
871
  const {xe: o, ve: r, we: n} = t.pe;
879
872
  return (0, e.createVNode)("div", {
880
873
  role: "row",
881
874
  "aria-rowindex": o + 1,
882
875
  style: n
883
- }, [ r.map(r => (0, e.createVNode)(Y, {
876
+ }, [ r.map(r => (0, e.createVNode)(X, {
884
877
  key: r.ge,
885
878
  pe: r,
886
879
  oe: t.oe,
@@ -897,12 +890,12 @@ e.defineComponent)({
897
890
  Ie: null,
898
891
  ne: null
899
892
  }
900
- }), U = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
893
+ }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
901
894
  const {ke: o, we: r} = t.pe;
902
895
  return (0, e.createVNode)("div", {
903
896
  role: "rowgroup",
904
897
  style: r
905
- }, [ o.map(o => (0, e.createVNode)(J, {
898
+ }, [ o.map(o => (0, e.createVNode)(Y, {
906
899
  key: o.xe,
907
900
  pe: o,
908
901
  oe: t.oe,
@@ -918,7 +911,7 @@ e.defineComponent)({
918
911
  Ie: null,
919
912
  ne: null
920
913
  }
921
- }), G = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
914
+ }), U = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
922
915
  props: {
923
916
  rows: {
924
917
  type: [ Number, Array ],
@@ -954,7 +947,7 @@ e.defineComponent)({
954
947
  setup(t, {emit: s, expose: l, slots: u}) {
955
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) => {
956
949
  let o, r, n, s = d();
957
- const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c = j(r => {
950
+ const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c = E(r => {
958
951
  const n = [], s = [];
959
952
  for (const {target: c, contentRect: {width: a, height: u}} of r) if (c === o) (a || u) && (e.P(4, u),
960
953
  t.P(4, a)); else if (c.offsetParent) {
@@ -970,7 +963,7 @@ e.defineComponent)({
970
963
  ae(l) {
971
964
  const i = o = l.parentElement;
972
965
  c.F(i);
973
- const u = (e, t) => q(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
966
+ const u = (e, t) => j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
974
967
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
975
968
  o[e] = "hidden", a(() => {
976
969
  o[e] = r;
@@ -992,49 +985,45 @@ e.defineComponent)({
992
985
  w.value = g.O() + h.O();
993
986
  };
994
987
  g.q(1, y), h.q(1, y);
995
- let R = !1;
988
+ let T = !1;
996
989
  g.q(4, () => {
997
- R = !0, s("verticalScroll", g.M());
990
+ T = !0, s("verticalScroll", g.M());
998
991
  }), h.q(4, () => {
999
- R = !0, s("horizontalScroll", h.M());
992
+ T = !0, s("horizontalScroll", h.M());
1000
993
  });
1001
- const P = () => {
1002
- !R || g.N() || h.N() || (R = !1, s("scrollEnd"));
994
+ const q = () => {
995
+ !T || g.N() || h.N() || (T = !1, s("scrollEnd"));
1003
996
  };
1004
- g.q(8, P), h.q(8, P), (0, e.watchEffect)(() => {
997
+ g.q(8, q), h.q(8, q), (0, e.watchEffect)(() => {
1005
998
  x(g, p, t.rows, t.rowHeight, t.headerRows, t.footerRows, !0);
1006
999
  }), (0, e.watchEffect)(() => {
1007
1000
  x(h, m, t.cols, t.colWidth, t.headerCols, t.footerCols, !0);
1008
1001
  });
1009
- const B = (0, e.computed)(() => w.value && g.A()), H = (0, e.computed)(() => w.value && h.A()), W = (0,
1002
+ const P = (0, e.computed)(() => w.value && g.A()), L = (0, e.computed)(() => w.value && h.A()), H = (0,
1010
1003
  e.computed)(() => (w.value, ((e, t, s, l, a = o, u = o, f = o, d) => {
1011
- 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), R = [], j = [], q = [];
1012
- for (const e of f) e.rowIndex < p && e.colIndex < m && q.push(e);
1013
- const P = z.length;
1014
- P && (T(R, z, S, _), j.push(x));
1015
- let B = u, L = 0;
1016
- do {
1017
- for (;L < q.length; L++) {
1018
- const {rowIndex: e, colIndex: t} = q[L];
1019
- R.push(e), T(R, z, e, _), j.push(t);
1020
- }
1021
- const e = [];
1022
- for (const t of B) {
1023
- const o = t.rowIndex, r = t.colIndex, n = M(t, p), s = N(t, m);
1024
- if (o < p && r < m && (n - o > 1 || s - r > 1)) {
1025
- const l = I(R, o, n, g, S, w, _);
1026
- if (l && I(j, r, s, $, y, b, h)) q.push(t); else if (l) {
1027
- const r = O(z, n - 1, _);
1028
- (o < g || r >= 0 && z[r] >= o) && e.push(t);
1029
- } else r < $ && e.push(t);
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;
1030
1015
  }
1016
+ s && j.push(e);
1031
1017
  }
1032
- B = e;
1033
- } while (L < q.length);
1034
- c(R), c(j);
1035
- const H = A(R, p, g, S, w, _), W = A(j, m, $, y, b, h), V = H.length, D = W.length, F = /* @__PURE__ */ new Map, X = [], Y = [];
1036
- for (const e of q) {
1037
- const t = M(e, p), o = N(e, m);
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);
1038
1027
  X.push(t), Y.push(o);
1039
1028
  const r = W.indexOf(e.colIndex);
1040
1029
  for (let n = H.indexOf(e.rowIndex); n < V && H[n] < t; n++) {
@@ -1048,48 +1037,48 @@ e.defineComponent)({
1048
1037
  let Q = K;
1049
1038
  const Z = v.get(e), ee = /* @__PURE__ */ new Map;
1050
1039
  for (const o of H) {
1051
- const r = o < g, s = o >= _, l = s || o >= S && o <= w, i = O(z, o, _), c = r ? 0 : s ? _ : i < 0 ? -1 : z[i];
1052
- if (o === c) {
1053
- const e = r ? g : s ? p : i + 1 < P ? z[i + 1] : _;
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] : _;
1054
1043
  X.push(e);
1055
1044
  const t = [];
1056
1045
  K.push({
1057
- Te: r ? -1 : s ? -2 : -3 - c,
1046
+ Te: r ? -1 : s ? -2 : -3 - i,
1058
1047
  ke: t,
1059
- we: E(c, e, r || s ? 0 : null, s ? "bottom" : "top", 4)
1048
+ we: C(i, e, r || s ? 0 : null, s ? "bottom" : "top", 4)
1060
1049
  }), Q = t;
1061
- } else c < 0 && (Q = K);
1062
- const a = i >= 0 && o === c, u = a ? G : null, f = o * m, v = Z && Z.get(o), I = v && v.ve, k = [];
1063
- let T = 0, R = !e.L(o) && null, A = o + 1, C = !1;
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;
1064
1053
  for (let e = 0; e < D; e++) {
1065
- const s = W[e], i = s < $, c = s >= h, u = c || s >= y && s <= b, g = F.get(f + s);
1066
- if (g ? g.rowIndex === o && g.colIndex === s : l && u || r || a || i) {
1067
- const l = g ? M(g, p) : o + 1, u = g ? N(g, m) : s + 1, f = l - o, _ = u - s, $ = f > 1, h = _ > 1, S = $ || h;
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;
1068
1057
  let w, y;
1069
- A = n(A, l);
1070
- const b = i ? t.u(s) : null, z = c ? t.t() - t.u(u - 1) - t.p(u - 1) : null;
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;
1071
1060
  !1 !== R || $ || (w = o, R = !0), !1 !== J[e] || h || (y = s, J[e] = !0);
1072
- const v = r ? "columnheader" : s === x && (i || a) ? "rowheader" : "cell", O = S ? f : void 0, E = S ? _ : void 0, j = "cell" !== v && d && d.rowIndex === o && d.colIndex === s ? d.order : void 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;
1073
1062
  let q;
1074
1063
  if (I) {
1075
1064
  const e = I.length;
1076
1065
  for (;T < e && I[T].ge < s; ) T++;
1077
1066
  T < e && I[T].ge === s && (q = I[T]);
1078
1067
  }
1079
- if (!q || q._e !== O || q.$e !== E || q.Re !== b || q.Ae !== z || q.de !== w || q.me !== y || q.he !== v || q.Se !== j) {
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) {
1080
1069
  let e = "1/l" + s;
1081
- S && (e += "/l" + l + "/l" + u);
1070
+ S && (e += "/l" + a + "/l" + u);
1082
1071
  const t = {
1083
1072
  contain: "layout style",
1084
1073
  display: "grid",
1085
1074
  gridArea: e
1086
1075
  };
1087
1076
  $ && (t.height = "0px", t.minHeight = "100%", t.zIndex = 1), h && (t.width = "0px",
1088
- t.minWidth = "100%"), (i || c) && (t[i ? "insetInlineStart" : "insetInlineEnd"] = (i ? b : z) + "px",
1077
+ t.minWidth = "100%"), (l || i) && (t[l ? "insetInlineStart" : "insetInlineEnd"] = (l ? b : z) + "px",
1089
1078
  t.position = "sticky", t.zIndex = 2), q = {
1090
1079
  ge: s,
1091
1080
  _e: O,
1092
- $e: E,
1081
+ $e: C,
1093
1082
  de: w,
1094
1083
  me: y,
1095
1084
  he: v,
@@ -1097,27 +1086,27 @@ e.defineComponent)({
1097
1086
  we: t,
1098
1087
  Re: b,
1099
1088
  Ae: z
1100
- }, C = !0;
1089
+ }, E = !0;
1101
1090
  }
1102
1091
  k.push(q);
1103
1092
  }
1104
1093
  }
1105
1094
  if (U.push(R), k.length) {
1106
- const e = v && !C && v.ve.length === k.length && v.Me === u ? v : {
1095
+ const e = v && !E && v.ve.length === k.length && v.Me === u ? v : {
1107
1096
  xe: o,
1108
1097
  ve: k,
1109
- we: E(o, A, u, "top", 3),
1098
+ we: C(o, N, u, "top", 3),
1110
1099
  Me: u
1111
1100
  };
1112
1101
  ee.set(o, e), Q.push(e);
1113
1102
  }
1114
1103
  }
1115
1104
  return v.set(e, ee), {
1116
- Ne: C(e, H, U, c(X), "max-content", p),
1117
- Ce: C(t, W, J, c(Y), "minmax(max-content,auto)", m),
1105
+ Ne: N(e, H, U, c(X), "max-content", p),
1106
+ Ce: N(t, W, J, c(Y), "minmax(max-content,auto)", m),
1118
1107
  Ee: K
1119
1108
  };
1120
- })(p, m, g.l(t.bufferSize), h.l(t.bufferSize), t.sectionRows, t.spans, t.keepMounted, t.ariaSort))), V = (0,
1109
+ })(p, m, g.l(t.bufferSize), h.l(t.bufferSize), t.sectionRows, t.spans, t.keepMounted, t.ariaSort))), W = (0,
1121
1110
  e.computed)(() => w.value && (g.N() || h.N()));
1122
1111
  return (0, e.onMounted)(() => {
1123
1112
  S.ae(f.value);
@@ -1153,7 +1142,7 @@ e.defineComponent)({
1153
1142
  getRowSize: g.p,
1154
1143
  getColSize: h.p,
1155
1144
  scrollToIndex: e => ((e, t, r, n, s, l = o, {rowIndex: i, colIndex: c, rowAlign: a, colAlign: u}) => {
1156
- null != i && L(e, t, n, l, i, a, !1), null != c && L(e, r, s, o, c, u, !0);
1145
+ null != i && B(e, t, n, l, i, a, !1), null != c && B(e, r, s, o, c, u, !0);
1157
1146
  })(S, g, h, p, m, t.sectionRows, e),
1158
1147
  scrollTo: ({vertical: e, horizontal: t}) => ((e, t, o) => {
1159
1148
  null != t && e.G(!1, () => t), null != o && e.G(!0, () => o);
@@ -1169,7 +1158,7 @@ e.defineComponent)({
1169
1158
  }
1170
1159
  })(S, g, h, e, t)
1171
1160
  }), () => {
1172
- const {Ne: o, Ce: r, Ee: 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 = {
1173
1162
  contain: "size style",
1174
1163
  overflowAnchor: "none",
1175
1164
  flex: "none",
@@ -1180,12 +1169,12 @@ e.defineComponent)({
1180
1169
  marginTop: s + "px",
1181
1170
  marginInlineStart: l + "px",
1182
1171
  height: _(g) - s + "px",
1183
- pointerEvents: V.value ? "none" : void 0
1172
+ pointerEvents: W.value ? "none" : void 0
1184
1173
  };
1185
1174
  return (0, e.createVNode)("div", {
1186
1175
  role: "table",
1187
- "aria-rowcount": B.value,
1188
- "aria-colcount": H.value,
1176
+ "aria-rowcount": P.value,
1177
+ "aria-colcount": L.value,
1189
1178
  style: {
1190
1179
  overflow: "auto",
1191
1180
  contain: "strict",
@@ -1195,14 +1184,14 @@ e.defineComponent)({
1195
1184
  }, [ (0, e.createVNode)("div", {
1196
1185
  ref: f,
1197
1186
  style: i
1198
- }, [ n.map(o => "ke" in o ? (0, e.createVNode)(U, {
1187
+ }, [ n.map(o => "ke" in o ? (0, e.createVNode)(J, {
1199
1188
  key: o.Te,
1200
1189
  pe: o,
1201
1190
  oe: u.default,
1202
1191
  Oe: t.rows,
1203
1192
  Ie: t.cols,
1204
1193
  ne: S.ue
1205
- }, null, 8, [ "pe", "oe", "Oe", "Ie", "ne" ]) : (0, e.createVNode)(J, {
1194
+ }, null, 8, [ "pe", "oe", "Oe", "Ie", "ne" ]) : (0, e.createVNode)(Y, {
1206
1195
  key: o.xe,
1207
1196
  pe: o,
1208
1197
  oe: u.default,
@@ -1214,5 +1203,5 @@ e.defineComponent)({
1214
1203
  }
1215
1204
  });
1216
1205
 
1217
- exports.VGrid = G, exports.VList = F, exports.Virtualizer = D, exports.WindowVirtualizer = X;
1206
+ exports.VGrid = U, exports.VList = D, exports.Virtualizer = V, exports.WindowVirtualizer = F;
1218
1207
  //# sourceMappingURL=index.cjs.map