react-virtuoso 4.18.14 → 4.18.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -33,10 +33,10 @@ function ye(t, e) {
33
33
  function vo(t, e) {
34
34
  return e(t);
35
35
  }
36
- function it(...t) {
36
+ function st(...t) {
37
37
  return t;
38
38
  }
39
- function J(t, e) {
39
+ function X(t, e) {
40
40
  return t(Wt, e);
41
41
  }
42
42
  function M(t, e) {
@@ -45,11 +45,11 @@ function M(t, e) {
45
45
  function De(t) {
46
46
  t(Xt);
47
47
  }
48
- function ot(t) {
48
+ function lt(t) {
49
49
  return t(Pn);
50
50
  }
51
51
  function L(t, e) {
52
- return J(t, So(e, we));
52
+ return X(t, So(e, we));
53
53
  }
54
54
  function bt(t, e) {
55
55
  const n = t(Wt, (o) => {
@@ -68,7 +68,7 @@ function hn(t) {
68
68
  function Wn(t, e) {
69
69
  return t === e;
70
70
  }
71
- function rt(t = Wn) {
71
+ function ot(t = Wn) {
72
72
  let e;
73
73
  return (n) => (o) => {
74
74
  t(e, o) || (e = o, n(o));
@@ -79,10 +79,10 @@ function W(t) {
79
79
  t(n) && e(n);
80
80
  };
81
81
  }
82
- function B(t) {
82
+ function k(t) {
83
83
  return (e) => re(e, t);
84
84
  }
85
- function Bt(t) {
85
+ function kt(t) {
86
86
  return (e) => () => {
87
87
  e(t);
88
88
  };
@@ -95,11 +95,11 @@ function S(t, ...e) {
95
95
  De(t);
96
96
  return;
97
97
  case Wt:
98
- return J(t, n(r));
98
+ return X(t, n(r));
99
99
  }
100
100
  });
101
101
  }
102
- function kt(t, e) {
102
+ function Bt(t, e) {
103
103
  return (n) => (o) => {
104
104
  n(e = t(e, o));
105
105
  };
@@ -123,7 +123,7 @@ function D(...t) {
123
123
  const r = 2 ** t.length - 1;
124
124
  return t.forEach((s, i) => {
125
125
  const l = 2 ** i;
126
- J(s, (c) => {
126
+ X(s, (c) => {
127
127
  const d = n;
128
128
  n |= l, e[i] = c, d !== r && n === r && o && (o(), o = null);
129
129
  });
@@ -143,7 +143,7 @@ function Co(t) {
143
143
  return function(r, s) {
144
144
  switch (r) {
145
145
  case Wt:
146
- return s ? n === s ? void 0 : (o(), n = s, e = J(t, s), e) : (o(), Jt);
146
+ return s ? n === s ? void 0 : (o(), n = s, e = X(t, s), e) : (o(), Jt);
147
147
  case Xt:
148
148
  o(), n = null;
149
149
  return;
@@ -168,7 +168,7 @@ function w(t) {
168
168
  return n(o, r);
169
169
  });
170
170
  }
171
- function ht(t, e) {
171
+ function gt(t, e) {
172
172
  return ye(w(e), (n) => L(t, n));
173
173
  }
174
174
  function K() {
@@ -214,13 +214,13 @@ function bo(t) {
214
214
  };
215
215
  return n(t);
216
216
  }
217
- function dt(...t) {
217
+ function at(...t) {
218
218
  const e = K(), n = Array.from({ length: t.length });
219
219
  let o = 0;
220
220
  const r = 2 ** t.length - 1;
221
221
  return t.forEach((s, i) => {
222
222
  const l = 2 ** i;
223
- J(s, (c) => {
223
+ X(s, (c) => {
224
224
  n[i] = c, o |= l, o === r && M(e, n);
225
225
  });
226
226
  }), function(s, i) {
@@ -230,12 +230,12 @@ function dt(...t) {
230
230
  return;
231
231
  }
232
232
  case Wt:
233
- return o === r && i(n), J(e, i);
233
+ return o === r && i(n), X(e, i);
234
234
  }
235
235
  };
236
236
  }
237
237
  function P(t, e = Wn) {
238
- return S(t, rt(e));
238
+ return S(t, ot(e));
239
239
  }
240
240
  function Ve(...t) {
241
241
  return function(e, n) {
@@ -243,7 +243,7 @@ function Ve(...t) {
243
243
  case Xt:
244
244
  return;
245
245
  case Wt:
246
- return xo(...t.map((o) => J(o, n)));
246
+ return xo(...t.map((o) => X(o, n)));
247
247
  }
248
248
  };
249
249
  }
@@ -266,7 +266,7 @@ const mt = {
266
266
  const t = w(mt.ERROR);
267
267
  return {
268
268
  log: w((n, o, r = mt.INFO) => {
269
- const s = Ho().VIRTUOSO_LOG_LEVEL ?? ot(t);
269
+ const s = Ho().VIRTUOSO_LOG_LEVEL ?? lt(t);
270
270
  r >= s && console[Ro[r]](
271
271
  "%creact-virtuoso: %c%s %o",
272
272
  "color: #0253b3; font-weight: bold",
@@ -315,17 +315,17 @@ function $e(t, e, n) {
315
315
  function An(t, e, n, o, r, s, i, l, c) {
316
316
  const d = E.useCallback(
317
317
  (f) => {
318
- const v = Bo(f.children, e, l ? "offsetWidth" : "offsetHeight", r);
318
+ const v = ko(f.children, e, l ? "offsetWidth" : "offsetHeight", r);
319
319
  let m = f.parentElement;
320
320
  for (; m.dataset.virtuosoScroller === void 0; )
321
321
  m = m.parentElement;
322
- const g = m.lastElementChild?.dataset.viewportType === "window";
322
+ const h = m.lastElementChild?.dataset.viewportType === "window";
323
323
  let y;
324
- g && (y = m.ownerDocument.defaultView);
325
- const R = i ? l ? i.scrollWidth : i.scrollHeight : g ? l ? y.document.documentElement.scrollWidth : y.document.documentElement.scrollHeight : l ? m.scrollWidth : m.scrollHeight, I = i ? l ? i.offsetWidth : i.offsetHeight : g ? l ? y.innerWidth : y.innerHeight : l ? m.offsetWidth : m.offsetHeight, h = i ? l ? _t(i, i.scrollLeft) : i.scrollTop : g ? l ? _t(y, y.scrollX || y.document.documentElement.scrollLeft) : y.scrollY || y.document.documentElement.scrollTop : l ? _t(m, m.scrollLeft) : m.scrollTop;
324
+ h && (y = m.ownerDocument.defaultView);
325
+ const R = i ? l ? i.scrollWidth : i.scrollHeight : h ? l ? y.document.documentElement.scrollWidth : y.document.documentElement.scrollHeight : l ? m.scrollWidth : m.scrollHeight, I = i ? l ? i.offsetWidth : i.offsetHeight : h ? l ? y.innerWidth : y.innerHeight : l ? m.offsetWidth : m.offsetHeight, g = i ? l ? _t(i, i.scrollLeft) : i.scrollTop : h ? l ? _t(y, y.scrollX || y.document.documentElement.scrollLeft) : y.scrollY || y.document.documentElement.scrollTop : l ? _t(m, m.scrollLeft) : m.scrollTop;
326
326
  o({
327
327
  scrollHeight: R,
328
- scrollTop: Math.max(h, 0),
328
+ scrollTop: Math.max(g, 0),
329
329
  viewportHeight: I
330
330
  }), s?.(
331
331
  l ? In("column-gap", getComputedStyle(f).columnGap, r) : In("row-gap", getComputedStyle(f).rowGap, r)
@@ -335,7 +335,7 @@ function An(t, e, n, o, r, s, i, l, c) {
335
335
  );
336
336
  return $e(d, n, c);
337
337
  }
338
- function Bo(t, e, n, o) {
338
+ function ko(t, e, n, o) {
339
339
  const r = t.length;
340
340
  if (r === 0)
341
341
  return null;
@@ -364,11 +364,11 @@ function Ue(t, e, n) {
364
364
  const d = c.getBoundingClientRect(), f = d.width;
365
365
  let v, m;
366
366
  if (e) {
367
- const g = e.getBoundingClientRect(), y = d.top - g.top;
368
- m = g.height - Math.max(0, y), v = y + e.scrollTop;
367
+ const h = e.getBoundingClientRect(), y = d.top - h.top;
368
+ m = h.height - Math.max(0, y), v = y + e.scrollTop;
369
369
  } else {
370
- const g = i.current.ownerDocument.defaultView;
371
- m = g.innerHeight - Math.max(0, d.top), v = d.top + g.scrollY;
370
+ const h = i.current.ownerDocument.defaultView;
371
+ m = h.innerHeight - Math.max(0, d.top), v = d.top + h.scrollY;
372
372
  }
373
373
  o.current = {
374
374
  listHeight: d.height,
@@ -398,19 +398,19 @@ function Ue(t, e, n) {
398
398
  };
399
399
  }, [l, e, i]), s;
400
400
  }
401
- const It = Z(
401
+ const St = Z(
402
402
  () => {
403
- const t = K(), e = K(), n = w(0), o = K(), r = K(), s = w(0), i = K(), l = K(), c = w(0), d = w(0), f = w(0), v = w(0), m = K(), g = K(), y = w(!1), R = w(!1), I = w(!1);
403
+ const t = K(), e = K(), n = w(0), o = K(), r = K(), s = w(0), i = K(), l = K(), c = w(0), d = w(0), f = w(0), v = w(0), m = K(), h = K(), y = w(!1), R = w(!1), I = w(!1);
404
404
  return L(
405
405
  S(
406
406
  t,
407
- B(({ scrollTop: h }) => h)
407
+ k(({ scrollTop: g }) => g)
408
408
  ),
409
409
  e
410
410
  ), L(
411
411
  S(
412
412
  t,
413
- B(({ scrollHeight: h }) => h)
413
+ k(({ scrollHeight: g }) => g)
414
414
  ),
415
415
  l
416
416
  ), L(e, s), {
@@ -421,7 +421,7 @@ const It = Z(
421
421
  footerHeight: v,
422
422
  headerHeight: c,
423
423
  horizontalDirection: R,
424
- scrollBy: g,
424
+ scrollBy: h,
425
425
  // input
426
426
  scrollContainerState: t,
427
427
  scrollHeight: l,
@@ -479,7 +479,7 @@ function Zt(t, e, n) {
479
479
  if (tt(t))
480
480
  return [];
481
481
  const o = Rt(t, e)[0];
482
- return ko(We(t, o, n));
482
+ return Bo(We(t, o, n));
483
483
  }
484
484
  function Pe(t, e) {
485
485
  if (tt(t))
@@ -510,7 +510,7 @@ function xe(t) {
510
510
  if (o.lvl >= n - 1 && e.lvl >= n - 1)
511
511
  return t;
512
512
  if (n > o.lvl + 1) {
513
- if (ke(e))
513
+ if (Be(e))
514
514
  return $n(ft(t, { lvl: n - 1 }));
515
515
  if (!tt(e) && !tt(e.r))
516
516
  return ft(e.r, {
@@ -523,10 +523,10 @@ function xe(t) {
523
523
  });
524
524
  throw new Error("Unexpected empty nodes");
525
525
  }
526
- if (ke(t))
526
+ if (Be(t))
527
527
  return Ge(ft(t, { lvl: n - 1 }));
528
528
  if (!tt(o) && !tt(o.l)) {
529
- const r = o.l, s = ke(r) ? o.lvl - 1 : o.lvl;
529
+ const r = o.l, s = Be(r) ? o.lvl - 1 : o.lvl;
530
530
  return ft(r, {
531
531
  l: ft(t, {
532
532
  lvl: n - 1,
@@ -550,7 +550,7 @@ function ft(t, e) {
550
550
  function _n(t) {
551
551
  return tt(t.r) ? t.l : xe(ft(t, { r: _n(t.r) }));
552
552
  }
553
- function ke(t) {
553
+ function Be(t) {
554
554
  return tt(t) || t.lvl > t.r.lvl;
555
555
  }
556
556
  function Nn(t) {
@@ -570,7 +570,7 @@ function Ge(t) {
570
570
  const { lvl: e, r: n } = t;
571
571
  return !tt(n) && !tt(n.r) && n.lvl === e && n.r.lvl === e ? ft(n, { l: ft(t, { r: n.l }), lvl: e + 1 }) : t;
572
572
  }
573
- function ko(t) {
573
+ function Bo(t) {
574
574
  return Mn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
575
575
  }
576
576
  function Un(t, e) {
@@ -682,8 +682,8 @@ function Wo(t, [e, n, o, r]) {
682
682
  const s = t.sizeTree;
683
683
  let i = s, l = 0;
684
684
  if (n.length > 0 && tt(s) && e.length === 2) {
685
- const m = e[0].size, g = e[1].size;
686
- i = n.reduce((y, R) => vt(vt(y, R, m), R + 1, g), i);
685
+ const m = e[0].size, h = e[1].size;
686
+ i = n.reduce((y, R) => vt(vt(y, R, m), R + 1, h), i);
687
687
  } else
688
688
  [i, l] = zo(i, e);
689
689
  if (i === s)
@@ -691,7 +691,7 @@ function Wo(t, [e, n, o, r]) {
691
691
  const { lastIndex: c, lastOffset: d, lastSize: f, offsetTree: v } = Ae(t.offsetTree, l, i, r);
692
692
  return {
693
693
  groupIndices: n,
694
- groupOffsetTree: n.reduce((m, g) => vt(m, g, ce(g, v, r)), Yt()),
694
+ groupOffsetTree: n.reduce((m, h) => vt(m, h, ce(h, v, r)), Yt()),
695
695
  lastIndex: c,
696
696
  lastOffset: d,
697
697
  lastSize: f,
@@ -747,18 +747,18 @@ const _o = {
747
747
  offsetWidth: "width"
748
748
  }, Lt = Z(
749
749
  ([{ log: t }, { recalcInProgress: e }]) => {
750
- const n = K(), o = K(), r = ht(o, 0), s = K(), i = K(), l = w(0), c = w([]), d = w(void 0), f = w(void 0), v = w(void 0), m = w(void 0), g = w((u, p) => Ht(u, _o[p])), y = w(void 0), R = w(0), I = Lo(), h = ht(
751
- S(n, D(c, t, R), kt(Wo, I), rt()),
750
+ const n = K(), o = K(), r = gt(o, 0), s = K(), i = K(), l = w(0), c = w([]), d = w(void 0), f = w(void 0), v = w(void 0), m = w(void 0), h = w((u, p) => Ht(u, _o[p])), y = w(void 0), R = w(0), I = Lo(), g = gt(
751
+ S(n, D(c, t, R), Bt(Wo, I), ot()),
752
752
  I
753
- ), a = ht(
753
+ ), a = gt(
754
754
  S(
755
755
  c,
756
- rt(),
757
- kt((u, p) => ({ current: p, prev: u.current }), {
756
+ ot(),
757
+ Bt((u, p) => ({ current: p, prev: u.current }), {
758
758
  current: [],
759
759
  prev: []
760
760
  }),
761
- B(({ prev: u }) => u)
761
+ k(({ prev: u }) => u)
762
762
  ),
763
763
  []
764
764
  );
@@ -766,8 +766,8 @@ const _o = {
766
766
  S(
767
767
  c,
768
768
  W((u) => u.length > 0),
769
- D(h, R),
770
- B(([u, p, b]) => {
769
+ D(g, R),
770
+ k(([u, p, b]) => {
771
771
  const z = u.reduce((F, O, V) => vt(F, O, ce(O, p.offsetTree, b) || V), Yt());
772
772
  return {
773
773
  ...p,
@@ -776,13 +776,13 @@ const _o = {
776
776
  };
777
777
  })
778
778
  ),
779
- h
779
+ g
780
780
  ), L(
781
781
  S(
782
782
  o,
783
- D(h),
783
+ D(g),
784
784
  W(([u, { lastIndex: p }]) => u < p),
785
- B(([u, { lastIndex: p, lastSize: b }]) => [
785
+ k(([u, { lastIndex: p, lastSize: b }]) => [
786
786
  {
787
787
  endIndex: p,
788
788
  size: b,
@@ -792,19 +792,19 @@ const _o = {
792
792
  ),
793
793
  n
794
794
  ), L(d, f);
795
- const T = ht(
795
+ const T = gt(
796
796
  S(
797
797
  d,
798
- B((u) => u === void 0)
798
+ k((u) => u === void 0)
799
799
  ),
800
800
  !0
801
801
  );
802
802
  L(
803
803
  S(
804
804
  f,
805
- W((u) => u !== void 0 && tt(ot(h).sizeTree)),
806
- B((u) => {
807
- const p = ot(v), b = ot(c).length > 0;
805
+ W((u) => u !== void 0 && tt(lt(g).sizeTree)),
806
+ k((u) => {
807
+ const p = lt(v), b = lt(c).length > 0;
808
808
  return p !== void 0 && p !== 0 ? b ? [
809
809
  { endIndex: 0, size: p, startIndex: 0 },
810
810
  { endIndex: 1, size: u, startIndex: 1 }
@@ -815,8 +815,8 @@ const _o = {
815
815
  ), L(
816
816
  S(
817
817
  m,
818
- W((u) => u !== void 0 && u.length > 0 && tt(ot(h).sizeTree)),
819
- B((u) => {
818
+ W((u) => u !== void 0 && u.length > 0 && tt(lt(g).sizeTree)),
819
+ k((u) => {
820
820
  const p = [];
821
821
  let b = u[0], z = 0;
822
822
  for (let F = 1; F < u.length; F++) {
@@ -840,7 +840,7 @@ const _o = {
840
840
  c,
841
841
  D(v, f),
842
842
  W(([, u, p]) => u !== void 0 && p !== void 0),
843
- B(([u, p, b]) => {
843
+ k(([u, p, b]) => {
844
844
  const z = [];
845
845
  for (let F = 0; F < u.length; F++) {
846
846
  const O = u[F], V = u[F + 1];
@@ -862,36 +862,36 @@ const _o = {
862
862
  const x = Ct(
863
863
  S(
864
864
  n,
865
- D(h),
866
- kt(
865
+ D(g),
866
+ Bt(
867
867
  ({ sizes: u }, [p, b]) => ({
868
868
  changed: b !== u,
869
869
  sizes: b
870
870
  }),
871
871
  { changed: !1, sizes: I }
872
872
  ),
873
- B((u) => u.changed)
873
+ k((u) => u.changed)
874
874
  )
875
875
  );
876
- J(
876
+ X(
877
877
  S(
878
878
  l,
879
- kt(
879
+ Bt(
880
880
  (u, p) => ({ diff: u.prev - p, prev: p }),
881
881
  { diff: 0, prev: 0 }
882
882
  ),
883
- B((u) => u.diff)
883
+ k((u) => u.diff)
884
884
  ),
885
885
  (u) => {
886
- const { groupIndices: p } = ot(h);
886
+ const { groupIndices: p } = lt(g);
887
887
  if (u > 0)
888
888
  M(e, !0), M(s, u + xn(u, p));
889
889
  else if (u < 0) {
890
- const b = ot(a);
890
+ const b = lt(a);
891
891
  b.length > 0 && (u -= xn(-u, b)), M(i, u);
892
892
  }
893
893
  }
894
- ), J(S(l, D(t)), ([u, p]) => {
894
+ ), X(S(l, D(t)), ([u, p]) => {
895
895
  u < 0 && p(
896
896
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
897
897
  { firstItemIndex: l },
@@ -902,39 +902,39 @@ const _o = {
902
902
  L(
903
903
  S(
904
904
  s,
905
- D(h),
906
- B(([u, p]) => {
905
+ D(g),
906
+ k(([u, p]) => {
907
907
  const b = p.groupIndices.length > 0, z = [], F = p.lastSize;
908
908
  if (b) {
909
909
  const O = ie(p.sizeTree, 0);
910
910
  let V = 0, U = 0;
911
911
  for (; V < u; ) {
912
- const j = p.groupIndices[U], X = p.groupIndices.length === U + 1 ? 1 / 0 : p.groupIndices[U + 1] - j - 1;
912
+ const j = p.groupIndices[U], J = p.groupIndices.length === U + 1 ? 1 / 0 : p.groupIndices[U + 1] - j - 1;
913
913
  z.push({
914
914
  endIndex: j,
915
915
  size: O,
916
916
  startIndex: j
917
917
  }), z.push({
918
- endIndex: j + 1 + X - 1,
918
+ endIndex: j + 1 + J - 1,
919
919
  size: F,
920
920
  startIndex: j + 1
921
- }), U++, V += X + 1;
921
+ }), U++, V += J + 1;
922
922
  }
923
923
  const q = Nt(p.sizeTree);
924
924
  return V !== u && q.shift(), q.reduce(
925
- (j, { k: X, v: gt }) => {
926
- let ct = j.ranges;
927
- return j.prevSize !== 0 && (ct = [
925
+ (j, { k: J, v: dt }) => {
926
+ let pt = j.ranges;
927
+ return j.prevSize !== 0 && (pt = [
928
928
  ...j.ranges,
929
929
  {
930
- endIndex: X + u - 1,
930
+ endIndex: J + u - 1,
931
931
  size: j.prevSize,
932
932
  startIndex: j.prevIndex
933
933
  }
934
934
  ]), {
935
- prevIndex: X + u,
936
- prevSize: gt,
937
- ranges: ct
935
+ prevIndex: J + u,
936
+ prevSize: dt,
937
+ ranges: pt
938
938
  };
939
939
  },
940
940
  {
@@ -960,11 +960,11 @@ const _o = {
960
960
  ),
961
961
  n
962
962
  );
963
- const k = Ct(
963
+ const B = Ct(
964
964
  S(
965
965
  i,
966
- D(h, R),
967
- B(([u, { offsetTree: p }, b]) => {
966
+ D(g, R),
967
+ k(([u, { offsetTree: p }, b]) => {
968
968
  const z = -u;
969
969
  return ce(z, p, b);
970
970
  })
@@ -973,24 +973,24 @@ const _o = {
973
973
  return L(
974
974
  S(
975
975
  i,
976
- D(h, R),
977
- B(([u, p, b]) => {
976
+ D(g, R),
977
+ k(([u, p, b]) => {
978
978
  if (p.groupIndices.length > 0) {
979
979
  if (tt(p.sizeTree))
980
980
  return p;
981
981
  let O = Yt();
982
- const V = ot(a);
982
+ const V = lt(a);
983
983
  let U = 0, q = 0, $ = 0;
984
984
  for (; U < -u; ) {
985
985
  $ = V[q];
986
- const X = V[q + 1] - $ - 1;
987
- q++, U += X + 1;
986
+ const J = V[q + 1] - $ - 1;
987
+ q++, U += J + 1;
988
988
  }
989
- if (O = Nt(p.sizeTree).reduce((X, { k: gt, v: ct }) => vt(X, Math.max(0, gt + u), ct), O), U !== -u) {
990
- const X = ie(p.sizeTree, $);
991
- O = vt(O, 0, X);
992
- const gt = Rt(p.sizeTree, -u + 1)[1];
993
- O = vt(O, 1, gt);
989
+ if (O = Nt(p.sizeTree).reduce((J, { k: dt, v: pt }) => vt(J, Math.max(0, dt + u), pt), O), U !== -u) {
990
+ const J = ie(p.sizeTree, $);
991
+ O = vt(O, 0, J);
992
+ const dt = Rt(p.sizeTree, -u + 1)[1];
993
+ O = vt(O, 1, dt);
994
994
  }
995
995
  return {
996
996
  ...p,
@@ -1006,7 +1006,7 @@ const _o = {
1006
1006
  };
1007
1007
  })
1008
1008
  ),
1009
- h
1009
+ g
1010
1010
  ), {
1011
1011
  beforeUnshiftWith: C,
1012
1012
  // input
@@ -1018,20 +1018,20 @@ const _o = {
1018
1018
  gap: R,
1019
1019
  groupIndices: c,
1020
1020
  heightEstimates: m,
1021
- itemSize: g,
1021
+ itemSize: h,
1022
1022
  listRefresh: x,
1023
1023
  shiftWith: i,
1024
- shiftWithOffset: k,
1024
+ shiftWithOffset: B,
1025
1025
  sizeRanges: n,
1026
1026
  // output
1027
- sizes: h,
1027
+ sizes: g,
1028
1028
  statefulTotalCount: r,
1029
1029
  totalCount: o,
1030
1030
  trackItemSizes: T,
1031
1031
  unshiftWith: s
1032
1032
  };
1033
1033
  },
1034
- it(Gt, Ke),
1034
+ st(Gt, Ke),
1035
1035
  { singleton: !0 }
1036
1036
  );
1037
1037
  function No(t) {
@@ -1045,45 +1045,45 @@ function No(t) {
1045
1045
  }
1046
1046
  const Yn = Z(
1047
1047
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
1048
- const s = K(), i = K(), l = Ct(S(s, B(No)));
1048
+ const s = K(), i = K(), l = Ct(S(s, k(No)));
1049
1049
  return L(
1050
1050
  S(
1051
1051
  l,
1052
- B((c) => c.totalCount)
1052
+ k((c) => c.totalCount)
1053
1053
  ),
1054
1054
  n
1055
1055
  ), L(
1056
1056
  S(
1057
1057
  l,
1058
- B((c) => c.groupIndices)
1058
+ k((c) => c.groupIndices)
1059
1059
  ),
1060
1060
  t
1061
1061
  ), L(
1062
1062
  S(
1063
- dt(r, e, o),
1063
+ at(r, e, o),
1064
1064
  W(([c, d]) => Re(d)),
1065
- B(([c, d, f]) => Rt(d.groupOffsetTree, Math.max(c - f, 0), "v")[0]),
1066
- rt(),
1067
- B((c) => [c])
1065
+ k(([c, d, f]) => Rt(d.groupOffsetTree, Math.max(c - f, 0), "v")[0]),
1066
+ ot(),
1067
+ k((c) => [c])
1068
1068
  ),
1069
1069
  i
1070
1070
  ), { groupCounts: s, topItemsIndexes: i };
1071
1071
  },
1072
- it(Lt, It)
1072
+ st(Lt, St)
1073
1073
  ), At = Z(
1074
1074
  ([{ log: t }]) => {
1075
1075
  const e = w(!1), n = Ct(
1076
1076
  S(
1077
1077
  e,
1078
1078
  W((o) => o),
1079
- rt()
1079
+ ot()
1080
1080
  )
1081
1081
  );
1082
- return J(e, (o) => {
1083
- o && ot(t)("props updated", {}, mt.DEBUG);
1082
+ return X(e, (o) => {
1083
+ o && lt(t)("props updated", {}, mt.DEBUG);
1084
1084
  }), { didMount: n, propsReady: e };
1085
1085
  },
1086
- it(Gt),
1086
+ st(Gt),
1087
1087
  { singleton: !0 }
1088
1088
  ), Do = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1089
1089
  function Zn(t) {
@@ -1105,52 +1105,52 @@ const fe = Z(
1105
1105
  },
1106
1106
  { log: m }
1107
1107
  ]) => {
1108
- const g = K(), y = K(), R = w(0);
1109
- let I = null, h = null, a = null;
1108
+ const h = K(), y = K(), R = w(0);
1109
+ let I = null, g = null, a = null;
1110
1110
  function T() {
1111
- I !== null && (I(), I = null), a !== null && (a(), a = null), h && (clearTimeout(h), h = null), M(c, !1);
1111
+ I !== null && (I(), I = null), a !== null && (a(), a = null), g && (clearTimeout(g), g = null), M(c, !1);
1112
1112
  }
1113
1113
  return L(
1114
1114
  S(
1115
- g,
1115
+ h,
1116
1116
  D(n, v, o, R, l, i, m),
1117
1117
  D(t, s, r),
1118
- B(
1118
+ k(
1119
1119
  ([
1120
- [x, C, k, u, p, b, z, F],
1120
+ [x, C, B, u, p, b, z, F],
1121
1121
  O,
1122
1122
  V,
1123
1123
  U
1124
1124
  ]) => {
1125
- const q = Zn(x), { align: $, behavior: j, offset: X } = q, gt = u - 1, ct = qn(q, C, gt);
1126
- let St = ce(ct, C.offsetTree, O) + b;
1127
- $ === "end" ? (St += V + Rt(C.sizeTree, ct)[1] - k + U, ct === gt && (St += z)) : $ === "center" ? St += (V + Rt(C.sizeTree, ct)[1] - k + U) / 2 : St -= p, X !== void 0 && X !== 0 && (St += X);
1128
- const Ft = (pt) => {
1129
- T(), pt ? (F("retrying to scroll to", { location: x }, mt.DEBUG), M(g, x)) : (M(y, !0), F("list did not change, scroll successful", {}, mt.DEBUG));
1125
+ const q = Zn(x), { align: $, behavior: j, offset: J } = q, dt = u - 1, pt = qn(q, C, dt);
1126
+ let It = ce(pt, C.offsetTree, O) + b;
1127
+ $ === "end" ? (It += V + Rt(C.sizeTree, pt)[1] - B + U, pt === dt && (It += z)) : $ === "center" ? It += (V + Rt(C.sizeTree, pt)[1] - B + U) / 2 : It -= p, J !== void 0 && J !== 0 && (It += J);
1128
+ const Ft = (ht) => {
1129
+ T(), ht ? (F("retrying to scroll to", { location: x }, mt.DEBUG), M(h, x)) : (M(y, !0), F("list did not change, scroll successful", {}, mt.DEBUG));
1130
1130
  };
1131
1131
  if (T(), j === "smooth") {
1132
- let pt = !1;
1133
- a = J(e, (jt) => {
1134
- pt = pt || jt;
1132
+ let ht = !1;
1133
+ a = X(e, (jt) => {
1134
+ ht = ht || jt;
1135
1135
  }), I = bt(f, () => {
1136
- Ft(pt);
1136
+ Ft(ht);
1137
1137
  });
1138
1138
  } else
1139
1139
  I = bt(S(e, $o(150)), Ft);
1140
- return h = setTimeout(() => {
1140
+ return g = setTimeout(() => {
1141
1141
  T();
1142
- }, 1200), M(c, !0), F("scrolling from index to", { behavior: j, index: ct, top: St }, mt.DEBUG), { behavior: j, top: St };
1142
+ }, 1200), M(c, !0), F("scrolling from index to", { behavior: j, index: pt, top: It }, mt.DEBUG), { behavior: j, top: It };
1143
1143
  }
1144
1144
  )
1145
1145
  ),
1146
1146
  d
1147
1147
  ), {
1148
1148
  scrollTargetReached: y,
1149
- scrollToIndex: g,
1149
+ scrollToIndex: h,
1150
1150
  topListHeight: R
1151
1151
  };
1152
1152
  },
1153
- it(Lt, It, Gt),
1153
+ st(Lt, St, Gt),
1154
1154
  { singleton: !0 }
1155
1155
  );
1156
1156
  function $o(t) {
@@ -1185,7 +1185,7 @@ const me = Z(
1185
1185
  i,
1186
1186
  D(c),
1187
1187
  W(([f, v]) => !Me(v)),
1188
- Bt(!1)
1188
+ kt(!1)
1189
1189
  ),
1190
1190
  l
1191
1191
  ), L(
@@ -1193,14 +1193,14 @@ const me = Z(
1193
1193
  i,
1194
1194
  D(c),
1195
1195
  W(([f, v]) => !Me(v)),
1196
- Bt(!1)
1196
+ kt(!1)
1197
1197
  ),
1198
1198
  d
1199
- ), J(
1199
+ ), X(
1200
1200
  S(
1201
- dt(e, i),
1201
+ at(e, i),
1202
1202
  D(l, n, t, d),
1203
- W(([[, f], v, { sizeTree: m }, g, y]) => f && (!tt(m) || Ne(g)) && !v && !y),
1203
+ W(([[, f], v, { sizeTree: m }, h, y]) => f && (!tt(m) || Ne(h)) && !v && !y),
1204
1204
  D(c)
1205
1205
  ),
1206
1206
  ([, f]) => {
@@ -1222,7 +1222,7 @@ const me = Z(
1222
1222
  scrolledToInitialItem: l
1223
1223
  };
1224
1224
  },
1225
- it(Lt, It, fe, At),
1225
+ st(Lt, St, fe, At),
1226
1226
  { singleton: !0 }
1227
1227
  );
1228
1228
  function Xn(t, e) {
@@ -1238,28 +1238,28 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
1238
1238
  viewportHeight: 0
1239
1239
  }
1240
1240
  }, jo = 0, pe = Z(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1241
- const i = w(!1), l = w(!0), c = K(), d = K(), f = w(4), v = w(jo), m = ht(
1241
+ const i = w(!1), l = w(!0), c = K(), d = K(), f = w(4), v = w(jo), m = gt(
1242
1242
  S(
1243
- Ve(S(P(r), Ut(1), Bt(!0)), S(P(r), Ut(1), Bt(!1), hn(100))),
1244
- rt()
1243
+ Ve(S(P(r), Ut(1), kt(!0)), S(P(r), Ut(1), kt(!1), hn(100))),
1244
+ ot()
1245
1245
  ),
1246
1246
  !1
1247
- ), g = ht(
1248
- S(Ve(S(n, Bt(!0)), S(n, Bt(!1), hn(200))), rt()),
1247
+ ), h = gt(
1248
+ S(Ve(S(n, kt(!0)), S(n, kt(!1), hn(200))), ot()),
1249
1249
  !1
1250
1250
  );
1251
1251
  L(
1252
1252
  S(
1253
- dt(P(r), P(v)),
1254
- B(([a, T]) => a <= T),
1255
- rt()
1253
+ at(P(r), P(v)),
1254
+ k(([a, T]) => a <= T),
1255
+ ot()
1256
1256
  ),
1257
1257
  l
1258
1258
  ), L(S(l, zt(50)), d);
1259
1259
  const y = Ct(
1260
1260
  S(
1261
- dt(o, P(s), P(e), P(t), P(f)),
1262
- kt((a, [{ scrollHeight: T, scrollTop: x }, C, k, u, p]) => {
1261
+ at(o, P(s), P(e), P(t), P(f)),
1262
+ Bt((a, [{ scrollHeight: T, scrollTop: x }, C, B, u, p]) => {
1263
1263
  const b = x + C - T > -p, z = {
1264
1264
  scrollHeight: T,
1265
1265
  scrollTop: x,
@@ -1281,16 +1281,16 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
1281
1281
  state: z
1282
1282
  };
1283
1283
  }, Ko),
1284
- rt((a, T) => a !== void 0 && a.atBottom === T.atBottom)
1284
+ ot((a, T) => a !== void 0 && a.atBottom === T.atBottom)
1285
1285
  )
1286
- ), R = ht(
1286
+ ), R = gt(
1287
1287
  S(
1288
1288
  o,
1289
- kt(
1289
+ Bt(
1290
1290
  (a, { scrollHeight: T, scrollTop: x, viewportHeight: C }) => {
1291
1291
  if (!Xn(a.scrollHeight, T)) {
1292
- const k = T - (x + C) < 1;
1293
- return a.scrollTop !== x && k ? {
1292
+ const B = T - (x + C) < 1;
1293
+ return a.scrollTop !== x && B ? {
1294
1294
  changed: !0,
1295
1295
  jump: a.scrollTop - x,
1296
1296
  scrollHeight: T,
@@ -1312,14 +1312,14 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
1312
1312
  { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
1313
1313
  ),
1314
1314
  W((a) => a.changed),
1315
- B((a) => a.jump)
1315
+ k((a) => a.jump)
1316
1316
  ),
1317
1317
  0
1318
1318
  );
1319
1319
  L(
1320
1320
  S(
1321
1321
  y,
1322
- B((a) => a.atBottom)
1322
+ k((a) => a.atBottom)
1323
1323
  ),
1324
1324
  i
1325
1325
  ), L(S(i, zt(50)), c);
@@ -1327,34 +1327,34 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
1327
1327
  L(
1328
1328
  S(
1329
1329
  o,
1330
- B(({ scrollTop: a }) => a),
1331
- rt(),
1332
- kt(
1333
- (a, T) => ot(g) ? { direction: a.direction, prevScrollTop: T } : { direction: T < a.prevScrollTop ? ue : ne, prevScrollTop: T },
1330
+ k(({ scrollTop: a }) => a),
1331
+ ot(),
1332
+ Bt(
1333
+ (a, T) => lt(h) ? { direction: a.direction, prevScrollTop: T } : { direction: T < a.prevScrollTop ? ue : ne, prevScrollTop: T },
1334
1334
  { direction: ne, prevScrollTop: 0 }
1335
1335
  ),
1336
- B((a) => a.direction)
1336
+ k((a) => a.direction)
1337
1337
  ),
1338
1338
  I
1339
- ), L(S(o, zt(50), Bt(Uo)), I);
1340
- const h = w(0);
1339
+ ), L(S(o, zt(50), kt(Uo)), I);
1340
+ const g = w(0);
1341
1341
  return L(
1342
1342
  S(
1343
1343
  m,
1344
1344
  W((a) => !a),
1345
- Bt(0)
1345
+ kt(0)
1346
1346
  ),
1347
- h
1347
+ g
1348
1348
  ), L(
1349
1349
  S(
1350
1350
  r,
1351
1351
  zt(100),
1352
1352
  D(m),
1353
1353
  W(([a, T]) => T),
1354
- kt(([a, T], [x]) => [T, x], [0, 0]),
1355
- B(([a, T]) => T - a)
1354
+ Bt(([a, T], [x]) => [T, x], [0, 0]),
1355
+ k(([a, T]) => T - a)
1356
1356
  ),
1357
- h
1357
+ g
1358
1358
  ), {
1359
1359
  atBottomState: y,
1360
1360
  atBottomStateChange: c,
@@ -1366,9 +1366,9 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
1366
1366
  isScrolling: m,
1367
1367
  lastJumpDueToItemResize: R,
1368
1368
  scrollDirection: I,
1369
- scrollVelocity: h
1369
+ scrollVelocity: g
1370
1370
  };
1371
- }, it(It)), ae = "top", de = "bottom", vn = "none";
1371
+ }, st(St)), ae = "top", de = "bottom", vn = "none";
1372
1372
  function Tn(t, e, n) {
1373
1373
  return typeof t == "number" ? n === ue && e === ae || n === ne && e === de ? t : 0 : n === ue ? e === ae ? t.main : t.reverse : e === de ? t.main : t.reverse;
1374
1374
  }
@@ -1377,9 +1377,9 @@ function Cn(t, e) {
1377
1377
  }
1378
1378
  const Ze = Z(
1379
1379
  ([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
1380
- const s = K(), i = w(0), l = w(0), c = w(0), d = ht(
1380
+ const s = K(), i = w(0), l = w(0), c = w(0), d = gt(
1381
1381
  S(
1382
- dt(
1382
+ at(
1383
1383
  P(o),
1384
1384
  P(r),
1385
1385
  P(n),
@@ -1390,29 +1390,29 @@ const Ze = Z(
1390
1390
  P(t),
1391
1391
  P(l)
1392
1392
  ),
1393
- B(
1393
+ k(
1394
1394
  ([
1395
1395
  f,
1396
1396
  v,
1397
1397
  m,
1398
- [g, y],
1398
+ [h, y],
1399
1399
  R,
1400
1400
  I,
1401
- h,
1401
+ g,
1402
1402
  a,
1403
1403
  T
1404
1404
  ]) => {
1405
- const x = f - a, C = I + h, k = Math.max(m - x, 0);
1405
+ const x = f - a, C = I + g, B = Math.max(m - x, 0);
1406
1406
  let u = vn;
1407
1407
  const p = Cn(T, ae), b = Cn(T, de);
1408
- return g -= a, g += m + h, y += m + h, y -= a, g > f + C - p && (u = ue), y < f - k + v + b && (u = ne), u !== vn ? [
1408
+ return h -= a, h += m + g, y += m + g, y -= a, h > f + C - p && (u = ue), y < f - B + v + b && (u = ne), u !== vn ? [
1409
1409
  Math.max(x - m - Tn(R, ae, u) - p, 0),
1410
- x - k - h + v + Tn(R, de, u) + b
1410
+ x - B - g + v + Tn(R, de, u) + b
1411
1411
  ] : null;
1412
1412
  }
1413
1413
  ),
1414
1414
  W((f) => f !== null),
1415
- rt(le)
1415
+ ot(le)
1416
1416
  ),
1417
1417
  [0, 0]
1418
1418
  );
@@ -1426,7 +1426,7 @@ const Ze = Z(
1426
1426
  visibleRange: d
1427
1427
  };
1428
1428
  },
1429
- it(It),
1429
+ st(St),
1430
1430
  { singleton: !0 }
1431
1431
  );
1432
1432
  function qo(t, e, n) {
@@ -1458,14 +1458,14 @@ function ve(t, e, n, o, r, s) {
1458
1458
  const R = t[t.length - 1];
1459
1459
  f = R.offset + R.size;
1460
1460
  }
1461
- const v = n - i, m = l + v * c + (v - 1) * o, g = d, y = m - f;
1461
+ const v = n - i, m = l + v * c + (v - 1) * o, h = d, y = m - f;
1462
1462
  return {
1463
1463
  bottom: f,
1464
1464
  firstItemIndex: s,
1465
1465
  items: wn(t, r, s),
1466
1466
  offsetBottom: y,
1467
1467
  offsetTop: d,
1468
- top: g,
1468
+ top: h,
1469
1469
  topItems: wn(e, r, s),
1470
1470
  topListHeight: e.reduce((R, I) => I.size + R, 0),
1471
1471
  totalCount: n
@@ -1474,18 +1474,18 @@ function ve(t, e, n, o, r, s) {
1474
1474
  function Jn(t, e, n, o, r, s) {
1475
1475
  let i = 0;
1476
1476
  if (n.groupIndices.length > 0)
1477
- for (const f of n.groupIndices) {
1478
- if (f - i >= t)
1477
+ for (const h of n.groupIndices) {
1478
+ if (h - i >= t)
1479
1479
  break;
1480
1480
  i++;
1481
1481
  }
1482
- const l = t + i, c = Ye(e, l), d = Array.from({ length: l }).map((f, v) => ({
1483
- data: s[v + c],
1484
- index: v + c,
1482
+ const l = t + i, c = s !== void 0, d = s?.length ?? 0, f = Ye(e, c ? d : l), v = c ? Math.max(0, Math.min(l, d - f)) : l, m = Array.from({ length: v }).map((h, y) => ({
1483
+ data: s?.[y + f],
1484
+ index: y + f,
1485
1485
  offset: 0,
1486
1486
  size: 0
1487
1487
  }));
1488
- return ve(d, [], l, r, n, o);
1488
+ return ve(m, [], v, r, n, o);
1489
1489
  }
1490
1490
  function wn(t, e, n) {
1491
1491
  if (t.length === 0)
@@ -1524,15 +1524,15 @@ const Kt = Z(
1524
1524
  { initialTopMostItemIndex: d, scrolledToInitialItem: f },
1525
1525
  { topListHeight: v },
1526
1526
  m,
1527
- { didMount: g },
1527
+ { didMount: h },
1528
1528
  { recalcInProgress: y }
1529
1529
  ]) => {
1530
- const R = w([]), I = w(0), h = K(), a = w(0);
1530
+ const R = w([]), I = w(0), g = K(), a = w(0);
1531
1531
  L(s.topItemsIndexes, R);
1532
- const T = ht(
1532
+ const T = gt(
1533
1533
  S(
1534
- dt(
1535
- g,
1534
+ at(
1535
+ h,
1536
1536
  y,
1537
1537
  P(c, le),
1538
1538
  P(r),
@@ -1543,13 +1543,14 @@ const Kt = Z(
1543
1543
  P(e),
1544
1544
  P(n),
1545
1545
  P(a),
1546
- t
1546
+ t,
1547
+ P(I)
1547
1548
  ),
1548
1549
  W(([u, p, , b, , , , , , , , z]) => {
1549
1550
  const F = z !== void 0 && z.length !== b;
1550
1551
  return u && !p && !F;
1551
1552
  }),
1552
- B(
1553
+ k(
1553
1554
  ([
1554
1555
  ,
1555
1556
  ,
@@ -1562,79 +1563,80 @@ const Kt = Z(
1562
1563
  U,
1563
1564
  q,
1564
1565
  $,
1565
- j
1566
+ j,
1567
+ J
1566
1568
  ]) => {
1567
- const X = z, { offsetTree: gt, sizeTree: ct } = X, St = ot(I);
1569
+ const dt = z, { offsetTree: pt, sizeTree: It } = dt;
1568
1570
  if (b === 0)
1569
1571
  return { ...Oe, totalCount: b };
1570
1572
  if (u === 0 && p === 0)
1571
- return St === 0 ? { ...Oe, totalCount: b } : Jn(St, F, z, U, q, j || []);
1572
- if (tt(ct))
1573
- return St > 0 ? null : ve(
1574
- qo(Ye(F, b), X, j),
1573
+ return J === 0 ? { ...Oe, totalCount: b } : Jn(J, F, z, U, q, j);
1574
+ if (tt(It))
1575
+ return J > 0 ? null : ve(
1576
+ qo(Ye(F, b), dt, j),
1575
1577
  [],
1576
1578
  b,
1577
1579
  q,
1578
- X,
1580
+ dt,
1579
1581
  U
1580
1582
  );
1581
1583
  const Ft = [];
1582
1584
  if (V.length > 0) {
1583
1585
  const N = V[0], Y = V[V.length - 1];
1584
- let lt = 0;
1585
- for (const et of Zt(ct, N, Y)) {
1586
- const Q = et.value, ut = Math.max(et.start, N), xt = Math.min(et.end, Y);
1587
- for (let at = ut; at <= xt; at++)
1588
- Ft.push({ data: j?.[at], index: at, offset: lt, size: Q }), lt += Q;
1586
+ let it = 0;
1587
+ for (const et of Zt(It, N, Y)) {
1588
+ const Q = et.value, ct = Math.max(et.start, N), xt = Math.min(et.end, Y);
1589
+ for (let ut = ct; ut <= xt; ut++)
1590
+ Ft.push({ data: j?.[ut], index: ut, offset: it, size: Q }), it += Q;
1589
1591
  }
1590
1592
  }
1591
1593
  if (!O)
1592
- return ve([], Ft, b, q, X, U);
1593
- const pt = V.length > 0 ? V[V.length - 1] + 1 : 0, jt = Po(gt, u, p, pt);
1594
+ return ve([], Ft, b, q, dt, U);
1595
+ const ht = V.length > 0 ? V[V.length - 1] + 1 : 0, jt = Po(pt, u, p, ht);
1594
1596
  if (jt.length === 0)
1595
1597
  return null;
1596
1598
  const Qt = b - 1, Et = ye([], (N) => {
1597
1599
  for (const Y of jt) {
1598
- const lt = Y.value;
1599
- let et = lt.offset, Q = Y.start;
1600
- const ut = lt.size;
1601
- if (lt.offset < u) {
1602
- Q += Math.floor((u - lt.offset + q) / (ut + q));
1603
- const at = Q - Y.start;
1604
- et += at * ut + at * q;
1600
+ const it = Y.value;
1601
+ let et = it.offset, Q = Y.start;
1602
+ const ct = it.size;
1603
+ if (it.offset < u) {
1604
+ Q += Math.floor((u - it.offset + q) / (ct + q));
1605
+ const ut = Q - Y.start;
1606
+ et += ut * ct + ut * q;
1605
1607
  }
1606
- Q < pt && (et += (pt - Q) * ut, Q = pt);
1608
+ Q < ht && (et += (ht - Q) * ct, Q = ht);
1607
1609
  const xt = Math.min(Y.end, Qt);
1608
- for (let at = Q; at <= xt && !(et >= p); at++)
1609
- N.push({ data: j?.[at], index: at, offset: et, size: ut }), et += ut + q;
1610
+ for (let ut = Q; ut <= xt && !(et >= p); ut++)
1611
+ N.push({ data: j?.[ut], index: ut, offset: et, size: ct }), et += ct + q;
1610
1612
  }
1611
1613
  }), te = yn($, ae), H = yn($, de);
1612
1614
  if (Et.length > 0 && (te > 0 || H > 0)) {
1613
1615
  const N = Et[0], Y = Et[Et.length - 1];
1614
- if (te > 0 && N.index > pt) {
1615
- const lt = Math.min(te, N.index - pt), et = [];
1616
+ if (te > 0 && N.index > ht) {
1617
+ const it = Math.min(te, N.index - ht), et = [];
1616
1618
  let Q = N.offset;
1617
- for (let ut = N.index - 1; ut >= N.index - lt; ut--) {
1618
- const at = Zt(ct, ut, ut)[0]?.value ?? N.size;
1619
- Q -= at + q, et.unshift({ data: j?.[ut], index: ut, offset: Q, size: at });
1619
+ for (let ct = N.index - 1; ct >= N.index - it; ct--) {
1620
+ const ut = Zt(It, ct, ct)[0]?.value ?? N.size;
1621
+ Q -= ut + q, et.unshift({ data: j?.[ct], index: ct, offset: Q, size: ut });
1620
1622
  }
1621
1623
  Et.unshift(...et);
1622
1624
  }
1623
1625
  if (H > 0 && Y.index < Qt) {
1624
- const lt = Math.min(H, Qt - Y.index);
1626
+ const it = Math.min(H, Qt - Y.index);
1625
1627
  let et = Y.offset + Y.size + q;
1626
- for (let Q = Y.index + 1; Q <= Y.index + lt; Q++) {
1627
- const xt = Zt(ct, Q, Q)[0]?.value ?? Y.size;
1628
+ for (let Q = Y.index + 1; Q <= Y.index + it; Q++) {
1629
+ const xt = Zt(It, Q, Q)[0]?.value ?? Y.size;
1628
1630
  Et.push({ data: j?.[Q], index: Q, offset: et, size: xt }), et += xt + q;
1629
1631
  }
1630
1632
  }
1631
1633
  }
1632
- return ve(Et, Ft, b, q, X, U);
1634
+ return ve(Et, Ft, b, q, dt, U);
1633
1635
  }
1634
1636
  ),
1635
1637
  //@ts-expect-error filter needs to be fixed
1636
1638
  W((u) => u !== null),
1637
- rt()
1639
+ ot()
1638
1640
  ),
1639
1641
  Oe
1640
1642
  );
@@ -1642,27 +1644,27 @@ const Kt = Z(
1642
1644
  S(
1643
1645
  t,
1644
1646
  W(Ne),
1645
- B((u) => u?.length)
1647
+ k((u) => u?.length)
1646
1648
  ),
1647
1649
  r
1648
1650
  ), L(
1649
1651
  S(
1650
1652
  T,
1651
- B((u) => u.topListHeight)
1653
+ k((u) => u.topListHeight)
1652
1654
  ),
1653
1655
  v
1654
1656
  ), L(v, l), L(
1655
1657
  S(
1656
1658
  T,
1657
- B((u) => [u.top, u.bottom])
1659
+ k((u) => [u.top, u.bottom])
1658
1660
  ),
1659
1661
  i
1660
1662
  ), L(
1661
1663
  S(
1662
1664
  T,
1663
- B((u) => u.items)
1665
+ k((u) => u.items)
1664
1666
  ),
1665
- h
1667
+ g
1666
1668
  );
1667
1669
  const x = Ct(
1668
1670
  S(
@@ -1670,24 +1672,24 @@ const Kt = Z(
1670
1672
  W(({ items: u }) => u.length > 0),
1671
1673
  D(r, t),
1672
1674
  W(([{ items: u }, p]) => u[u.length - 1].originalIndex === p - 1),
1673
- B(([, u, p]) => [u - 1, p]),
1674
- rt(le),
1675
- B(([u]) => u)
1675
+ k(([, u, p]) => [u - 1, p]),
1676
+ ot(le),
1677
+ k(([u]) => u)
1676
1678
  )
1677
1679
  ), C = Ct(
1678
1680
  S(
1679
1681
  T,
1680
1682
  zt(200),
1681
1683
  W(({ items: u, topItems: p }) => u.length > 0 && u[0].originalIndex === p.length),
1682
- B(({ items: u }) => u[0].index),
1683
- rt()
1684
+ k(({ items: u }) => u[0].index),
1685
+ ot()
1684
1686
  )
1685
- ), k = Ct(
1687
+ ), B = Ct(
1686
1688
  S(
1687
1689
  T,
1688
1690
  W(({ items: u }) => u.length > 0),
1689
1691
  // oxlint-disable-next-line array-callback-return -- callback always returns after trimming group sentinels
1690
- B(({ items: u }) => {
1692
+ k(({ items: u }) => {
1691
1693
  let p = 0, b = u.length - 1;
1692
1694
  for (; u[p].type === "group" && p < b; )
1693
1695
  p++;
@@ -1698,22 +1700,22 @@ const Kt = Z(
1698
1700
  startIndex: u[p].index
1699
1701
  };
1700
1702
  }),
1701
- rt(Un)
1703
+ ot(Un)
1702
1704
  )
1703
1705
  );
1704
1706
  return {
1705
1707
  endReached: x,
1706
1708
  initialItemCount: I,
1707
- itemsRendered: h,
1709
+ itemsRendered: g,
1708
1710
  listState: T,
1709
1711
  minOverscanItemCount: a,
1710
- rangeChanged: k,
1712
+ rangeChanged: B,
1711
1713
  startReached: C,
1712
1714
  topItemsIndexes: R,
1713
1715
  ...m
1714
1716
  };
1715
1717
  },
1716
- it(
1718
+ st(
1717
1719
  Lt,
1718
1720
  Yn,
1719
1721
  Ze,
@@ -1726,32 +1728,32 @@ const Kt = Z(
1726
1728
  { singleton: !0 }
1727
1729
  ), Qn = Z(
1728
1730
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1729
- const s = K(), i = ht(
1731
+ const s = K(), i = gt(
1730
1732
  S(
1731
- dt(n, t, o, e, r),
1732
- B(([l, c, d, f, v]) => l + c + d + f + v.offsetBottom + v.bottom)
1733
+ at(n, t, o, e, r),
1734
+ k(([l, c, d, f, v]) => l + c + d + f + v.offsetBottom + v.bottom)
1733
1735
  ),
1734
1736
  0
1735
1737
  );
1736
1738
  return L(P(i), s), { totalListHeight: i, totalListHeightChanged: s };
1737
1739
  },
1738
- it(It, Kt),
1740
+ st(St, Kt),
1739
1741
  { singleton: !0 }
1740
1742
  ), Yo = Z(
1741
1743
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1742
- const n = w(!1), o = ht(
1744
+ const n = w(!1), o = gt(
1743
1745
  S(
1744
- dt(n, t, e),
1746
+ at(n, t, e),
1745
1747
  W(([r]) => r),
1746
- B(([, r, s]) => Math.max(0, r - s)),
1748
+ k(([, r, s]) => Math.max(0, r - s)),
1747
1749
  zt(0),
1748
- rt()
1750
+ ot()
1749
1751
  ),
1750
1752
  0
1751
1753
  );
1752
1754
  return { alignToBottom: n, paddingTopAddition: o };
1753
1755
  },
1754
- it(It, Qn),
1756
+ st(St, Qn),
1755
1757
  { singleton: !0 }
1756
1758
  ), to = Z(() => ({
1757
1759
  context: w(null)
@@ -1773,11 +1775,11 @@ const Kt = Z(
1773
1775
  f,
1774
1776
  D(e, c, n, s, r, o, l),
1775
1777
  D(t),
1776
- B(([[v, m, g, y, R, I, h, a], T]) => {
1777
- const { calculateViewLocation: x = Zo, done: C, ...k } = v, u = qn(v, m, y - 1), p = ce(u, m.offsetTree, T) + R + I, b = p + Rt(m.sizeTree, u)[1], z = a + I, F = a + g - h, O = x({
1778
+ k(([[v, m, h, y, R, I, g, a], T]) => {
1779
+ const { calculateViewLocation: x = Zo, done: C, ...B } = v, u = qn(v, m, y - 1), p = ce(u, m.offsetTree, T) + R + I, b = p + Rt(m.sizeTree, u)[1], z = a + I, F = a + h - g, O = x({
1778
1780
  itemBottom: b,
1779
1781
  itemTop: p,
1780
- locationParams: k,
1782
+ locationParams: B,
1781
1783
  viewportBottom: F,
1782
1784
  viewportTop: z
1783
1785
  });
@@ -1787,7 +1789,7 @@ const Kt = Z(
1787
1789
  W((V) => !V),
1788
1790
  // skips the initial publish of false, and the cleanup call.
1789
1791
  // but if scrollingInProgress is true, we skip the initial publish.
1790
- Ut(ot(i) ? 1 : 2)
1792
+ Ut(lt(i) ? 1 : 2)
1791
1793
  ),
1792
1794
  C
1793
1795
  ), O;
@@ -1799,7 +1801,7 @@ const Kt = Z(
1799
1801
  scrollIntoView: f
1800
1802
  };
1801
1803
  },
1802
- it(Lt, It, fe, Kt, Gt),
1804
+ st(Lt, St, fe, Kt, Gt),
1803
1805
  { singleton: !0 }
1804
1806
  );
1805
1807
  function bn(t) {
@@ -1815,95 +1817,95 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
1815
1817
  { log: f },
1816
1818
  { scrollingInProgress: v },
1817
1819
  { context: m },
1818
- { scrollIntoView: g }
1820
+ { scrollIntoView: h }
1819
1821
  ]) => {
1820
1822
  const y = w(!1), R = K();
1821
1823
  let I = null;
1822
- function h(C) {
1824
+ function g(C) {
1823
1825
  M(i, {
1824
1826
  align: "end",
1825
1827
  behavior: C,
1826
1828
  index: "LAST"
1827
1829
  });
1828
1830
  }
1829
- J(
1831
+ X(
1830
1832
  S(
1831
- dt(S(P(e), Ut(1)), c),
1833
+ at(S(P(e), Ut(1)), c),
1832
1834
  D(P(y), s, l, v),
1833
- B(([[C, k], u, p, b, z]) => {
1834
- let F = k && b, O = "auto";
1835
+ k(([[C, B], u, p, b, z]) => {
1836
+ let F = B && b, O = "auto";
1835
1837
  return F && (O = Xo(u, p || z), F = F && O !== !1), { followOutputBehavior: O, shouldFollow: F, totalCount: C };
1836
1838
  }),
1837
1839
  W(({ shouldFollow: C }) => C)
1838
1840
  ),
1839
- ({ followOutputBehavior: C, totalCount: k }) => {
1840
- I !== null && (I(), I = null), ot(n) === void 0 ? I = bt(t, () => {
1841
- ot(f)("following output to ", { totalCount: k }, mt.DEBUG), h(C), I = null;
1841
+ ({ followOutputBehavior: C, totalCount: B }) => {
1842
+ I !== null && (I(), I = null), lt(n) === void 0 ? I = bt(t, () => {
1843
+ lt(f)("following output to ", { totalCount: B }, mt.DEBUG), g(C), I = null;
1842
1844
  }) : requestAnimationFrame(() => {
1843
- ot(f)("following output to ", { totalCount: k }, mt.DEBUG), h(C);
1845
+ lt(f)("following output to ", { totalCount: B }, mt.DEBUG), g(C);
1844
1846
  });
1845
1847
  }
1846
1848
  );
1847
1849
  function a(C) {
1848
- const k = bt(r, (u) => {
1849
- C && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && I === null && (ot(f)("scrolling to bottom due to increased size", {}, mt.DEBUG), h("auto"));
1850
+ const B = bt(r, (u) => {
1851
+ C && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && I === null && (lt(f)("scrolling to bottom due to increased size", {}, mt.DEBUG), g("auto"));
1850
1852
  });
1851
- setTimeout(k, 100);
1853
+ setTimeout(B, 100);
1852
1854
  }
1853
- J(
1855
+ X(
1854
1856
  S(
1855
- dt(P(y), e, d),
1856
- W(([C, , k]) => C !== !1 && k),
1857
- kt(
1858
- ({ value: C }, [, k]) => ({ refreshed: C === k, value: k }),
1857
+ at(P(y), e, d),
1858
+ W(([C, , B]) => C !== !1 && B),
1859
+ Bt(
1860
+ ({ value: C }, [, B]) => ({ refreshed: C === B, value: B }),
1859
1861
  { refreshed: !1, value: 0 }
1860
1862
  ),
1861
1863
  W(({ refreshed: C }) => C),
1862
1864
  D(y, e)
1863
1865
  ),
1864
1866
  ([, C]) => {
1865
- ot(l) && a(C !== !1);
1867
+ lt(l) && a(C !== !1);
1866
1868
  }
1867
- ), J(R, () => {
1868
- a(ot(y) !== !1);
1869
- }), J(dt(P(y), r), ([C, k]) => {
1870
- C !== !1 && !k.atBottom && k.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && h("auto");
1869
+ ), X(R, () => {
1870
+ a(lt(y) !== !1);
1871
+ }), X(at(P(y), r), ([C, B]) => {
1872
+ C !== !1 && !B.atBottom && B.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && g("auto");
1871
1873
  });
1872
1874
  const T = w(null), x = K();
1873
1875
  return L(
1874
1876
  Ve(
1875
1877
  S(
1876
1878
  P(o),
1877
- B((C) => C?.length ?? 0)
1879
+ k((C) => C?.length ?? 0)
1878
1880
  ),
1879
1881
  S(P(e))
1880
1882
  ),
1881
1883
  x
1882
- ), J(
1884
+ ), X(
1883
1885
  S(
1884
- dt(S(x, Ut(1)), c),
1886
+ at(S(x, Ut(1)), c),
1885
1887
  D(P(T), l, v, m),
1886
- B(([[C, k], u, p, b, z]) => k && p && u?.({ context: z, totalCount: C, scrollingInProgress: b })),
1888
+ k(([[C, B], u, p, b, z]) => B && p && u?.({ context: z, totalCount: C, scrollingInProgress: b })),
1887
1889
  W((C) => !!C),
1888
1890
  zt(0)
1889
1891
  ),
1890
1892
  (C) => {
1891
- I !== null && (I(), I = null), ot(n) === void 0 ? I = bt(t, () => {
1892
- ot(f)("scrolling into view", {}), M(g, C), I = null;
1893
+ I !== null && (I(), I = null), lt(n) === void 0 ? I = bt(t, () => {
1894
+ lt(f)("scrolling into view", {}), M(h, C), I = null;
1893
1895
  }) : requestAnimationFrame(() => {
1894
- ot(f)("scrolling into view", {}), M(g, C);
1896
+ lt(f)("scrolling into view", {}), M(h, C);
1895
1897
  });
1896
1898
  }
1897
1899
  ), { autoscrollToBottom: R, followOutput: y, scrollIntoViewOnChange: T };
1898
1900
  },
1899
- it(
1901
+ st(
1900
1902
  Lt,
1901
1903
  pe,
1902
1904
  fe,
1903
1905
  me,
1904
1906
  At,
1905
1907
  Gt,
1906
- It,
1908
+ St,
1907
1909
  to,
1908
1910
  eo
1909
1911
  )
@@ -1914,21 +1916,21 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
1914
1916
  D(s),
1915
1917
  W(([, c]) => c !== 0),
1916
1918
  D(r, o, e, n, t),
1917
- B(([[, c], d, f, v, m, g = []]) => Jn(c, d, f, v, m, g))
1919
+ k(([[, c], d, f, v, m, h]) => Jn(c, d, f, v, m, h))
1918
1920
  ),
1919
1921
  i
1920
1922
  ), {}),
1921
- it(Lt, me, Kt, At),
1923
+ st(Lt, me, Kt, At),
1922
1924
  { singleton: !0 }
1923
1925
  ), tr = Z(
1924
1926
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1925
1927
  const o = w(0);
1926
- return J(
1928
+ return X(
1927
1929
  S(
1928
1930
  t,
1929
1931
  D(o),
1930
1932
  W(([, r]) => r !== 0),
1931
- B(([, r]) => ({ top: r }))
1933
+ k(([, r]) => ({ top: r }))
1932
1934
  ),
1933
1935
  (r) => {
1934
1936
  bt(
@@ -1948,7 +1950,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
1948
1950
  initialScrollTop: o
1949
1951
  };
1950
1952
  },
1951
- it(At, It, Kt),
1953
+ st(At, St, Kt),
1952
1954
  { singleton: !0 }
1953
1955
  ), no = Z(
1954
1956
  ([{ scrollVelocity: t }]) => {
@@ -1958,7 +1960,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
1958
1960
  t,
1959
1961
  D(o, e, n),
1960
1962
  W(([r, s]) => s !== !1 && s !== void 0),
1961
- B(([r, s, i, l]) => {
1963
+ k(([r, s, i, l]) => {
1962
1964
  const { enter: c, exit: d } = s;
1963
1965
  if (i) {
1964
1966
  if (d(r, l))
@@ -1967,24 +1969,24 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
1967
1969
  return !0;
1968
1970
  return i;
1969
1971
  }),
1970
- rt()
1972
+ ot()
1971
1973
  ),
1972
1974
  e
1973
- ), J(
1974
- S(dt(e, t, n), D(o)),
1975
+ ), X(
1976
+ S(at(e, t, n), D(o)),
1975
1977
  ([[r, s, i], l]) => {
1976
1978
  r && l !== !1 && l !== void 0 && l.change && l.change(s, i);
1977
1979
  }
1978
1980
  ), { isSeeking: e, scrollSeekConfiguration: o, scrollSeekRangeChanged: n, scrollVelocity: t };
1979
1981
  },
1980
- it(pe),
1982
+ st(pe),
1981
1983
  { singleton: !0 }
1982
1984
  ), Xe = Z(([{ scrollContainerState: t, scrollTo: e }]) => {
1983
1985
  const n = K(), o = K(), r = K(), s = w(!1), i = w(void 0);
1984
1986
  return L(
1985
1987
  S(
1986
- dt(n, o),
1987
- B(([{ scrollTop: l, viewportHeight: c }, { offsetTop: d, listHeight: f }]) => ({
1988
+ at(n, o),
1989
+ k(([{ scrollTop: l, viewportHeight: c }, { offsetTop: d, listHeight: f }]) => ({
1988
1990
  scrollHeight: f,
1989
1991
  scrollTop: Math.max(0, l - d),
1990
1992
  viewportHeight: c
@@ -1995,7 +1997,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
1995
1997
  S(
1996
1998
  e,
1997
1999
  D(o),
1998
- B(([l, { offsetTop: c }]) => ({
2000
+ k(([l, { offsetTop: c }]) => ({
1999
2001
  ...l,
2000
2002
  top: l.top + c
2001
2003
  }))
@@ -2011,7 +2013,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
2011
2013
  windowScrollTo: r,
2012
2014
  windowViewportRect: o
2013
2015
  };
2014
- }, it(It)), er = Z(
2016
+ }, st(St)), er = Z(
2015
2017
  ([
2016
2018
  { sizeRanges: t, sizes: e },
2017
2019
  { headerHeight: n, scrollTop: o },
@@ -2020,22 +2022,22 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
2020
2022
  { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
2021
2023
  ]) => {
2022
2024
  const d = K(), f = w(void 0), v = w(null), m = w(null);
2023
- return L(l, v), L(c, m), J(
2025
+ return L(l, v), L(c, m), X(
2024
2026
  S(
2025
2027
  d,
2026
2028
  D(e, o, i, v, m, n)
2027
2029
  ),
2028
- ([g, y, R, I, h, a, T]) => {
2030
+ ([h, y, R, I, g, a, T]) => {
2029
2031
  const x = Go(y.sizeTree);
2030
- I && h !== null && a !== null && (R = h.scrollTop - a.offsetTop), R -= T, g({ ranges: x, scrollTop: R });
2032
+ I && g !== null && a !== null && (R = g.scrollTop - a.offsetTop), R -= T, h({ ranges: x, scrollTop: R });
2031
2033
  }
2032
- ), L(S(f, W(Ne), B(nr)), r), L(
2034
+ ), L(S(f, W(Ne), k(nr)), r), L(
2033
2035
  S(
2034
2036
  s,
2035
2037
  D(f),
2036
- W(([, g]) => g !== void 0),
2037
- rt(),
2038
- B(([, g]) => g.ranges)
2038
+ W(([, h]) => h !== void 0),
2039
+ ot(),
2040
+ k(([, h]) => h.ranges)
2039
2041
  ),
2040
2042
  t
2041
2043
  ), {
@@ -2043,7 +2045,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
2043
2045
  restoreStateFrom: f
2044
2046
  };
2045
2047
  },
2046
- it(Lt, It, me, At, Xe)
2048
+ st(Lt, St, me, At, Xe)
2047
2049
  );
2048
2050
  function nr(t) {
2049
2051
  return { align: "start", index: 0, offset: t.scrollTop };
@@ -2054,11 +2056,11 @@ const or = Z(([{ topItemsIndexes: t }]) => {
2054
2056
  S(
2055
2057
  e,
2056
2058
  W((n) => n >= 0),
2057
- B((n) => Array.from({ length: n }).map((o, r) => r))
2059
+ k((n) => Array.from({ length: n }).map((o, r) => r))
2058
2060
  ),
2059
2061
  t
2060
2062
  ), { topItemCount: e };
2061
- }, it(Kt));
2063
+ }, st(Kt));
2062
2064
  function oo(t) {
2063
2065
  let e = !1, n;
2064
2066
  return (() => (e || (e = !0, n = t()), n));
@@ -2068,7 +2070,7 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2068
2070
  { deviation: t, deviationCommitted: e, scrollBy: n, scrollingInProgress: o, scrollTop: r },
2069
2071
  { isAtBottom: s, isScrolling: i, lastJumpDueToItemResize: l, scrollDirection: c },
2070
2072
  { listState: d },
2071
- { beforeUnshiftWith: f, gap: v, shiftWithOffset: m, sizes: g },
2073
+ { beforeUnshiftWith: f, gap: v, shiftWithOffset: m, sizes: h },
2072
2074
  { log: y },
2073
2075
  { recalcInProgress: R }
2074
2076
  ]) => {
@@ -2076,37 +2078,37 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2076
2078
  S(
2077
2079
  d,
2078
2080
  D(l),
2079
- kt(
2080
- ([, x, C, k], [{ bottom: u, items: p, offsetBottom: b, totalCount: z }, F]) => {
2081
+ Bt(
2082
+ ([, x, C, B], [{ bottom: u, items: p, offsetBottom: b, totalCount: z }, F]) => {
2081
2083
  const O = u + b;
2082
2084
  let V = 0;
2083
- return C === z && x.length > 0 && p.length > 0 && (p[0].originalIndex === 0 && x[0].originalIndex === 0 || (V = O - k, V !== 0 && (V += F))), [V, p, z, O];
2085
+ return C === z && x.length > 0 && p.length > 0 && (p[0].originalIndex === 0 && x[0].originalIndex === 0 || (V = O - B, V !== 0 && (V += F))), [V, p, z, O];
2084
2086
  },
2085
2087
  [0, [], 0, 0]
2086
2088
  ),
2087
2089
  W(([x]) => x !== 0),
2088
2090
  D(r, c, o, s, y, R),
2089
- W(([, x, C, k, , , u]) => !u && !k && x !== 0 && C === ue),
2090
- B(([[x], , , , , C]) => (C("Upward scrolling compensation", { amount: x }, mt.DEBUG), x))
2091
+ W(([, x, C, B, , , u]) => !u && !B && x !== 0 && C === ue),
2092
+ k(([[x], , , , , C]) => (C("Upward scrolling compensation", { amount: x }, mt.DEBUG), x))
2091
2093
  )
2092
2094
  );
2093
- function h(x) {
2095
+ function g(x) {
2094
2096
  x > 0 ? (M(n, { behavior: "auto", top: -x }), M(t, 0)) : (M(t, 0), M(n, { behavior: "auto", top: -x }));
2095
2097
  }
2096
- J(S(I, D(t, i)), ([x, C, k]) => {
2097
- k && rr() ? M(t, C - x) : h(-x);
2098
- }), J(
2098
+ X(S(I, D(t, i)), ([x, C, B]) => {
2099
+ B && rr() ? M(t, C - x) : g(-x);
2100
+ }), X(
2099
2101
  S(
2100
- dt(ht(i, !1), t, R),
2101
- W(([x, C, k]) => !x && !k && C !== 0),
2102
- B(([x, C]) => C),
2102
+ at(gt(i, !1), t, R),
2103
+ W(([x, C, B]) => !x && !B && C !== 0),
2104
+ k(([x, C]) => C),
2103
2105
  zt(1)
2104
2106
  ),
2105
- h
2107
+ g
2106
2108
  ), L(
2107
2109
  S(
2108
2110
  m,
2109
- B((x) => ({ top: -x }))
2111
+ k((x) => ({ top: -x }))
2110
2112
  ),
2111
2113
  n
2112
2114
  );
@@ -2119,15 +2121,15 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2119
2121
  M(t, 0), M(R, !1);
2120
2122
  });
2121
2123
  }
2122
- return J(e, (x) => {
2124
+ return X(e, (x) => {
2123
2125
  a === null || !a.acknowledgeable || x === a.offset && T();
2124
- }), J(
2126
+ }), X(
2125
2127
  S(
2126
2128
  f,
2127
- D(g, v),
2128
- B(([x, { groupIndices: C, lastSize: k, sizeTree: u }, p]) => {
2129
+ D(h, v),
2130
+ k(([x, { groupIndices: C, lastSize: B, sizeTree: u }, p]) => {
2129
2131
  function b(U) {
2130
- return U * (k + p);
2132
+ return U * (B + p);
2131
2133
  }
2132
2134
  if (C.length === 0)
2133
2135
  return b(x);
@@ -2143,11 +2145,11 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2143
2145
  })
2144
2146
  ),
2145
2147
  (x) => {
2146
- a = { acknowledgeable: ot(t) !== x, offset: x }, M(t, x), requestAnimationFrame(T);
2148
+ a = { acknowledgeable: lt(t) !== x, offset: x }, M(t, x), requestAnimationFrame(T);
2147
2149
  }
2148
2150
  ), { deviation: t };
2149
2151
  },
2150
- it(It, pe, Kt, Lt, Gt, Ke)
2152
+ st(St, pe, Kt, Lt, Gt, Ke)
2151
2153
  ), ir = Z(
2152
2154
  ([
2153
2155
  t,
@@ -2174,7 +2176,7 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2174
2176
  ...d,
2175
2177
  ...f
2176
2178
  }),
2177
- it(
2179
+ st(
2178
2180
  Ze,
2179
2181
  Qo,
2180
2182
  At,
@@ -2203,15 +2205,15 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2203
2205
  sizes: f,
2204
2206
  statefulTotalCount: v,
2205
2207
  totalCount: m,
2206
- trackItemSizes: g
2208
+ trackItemSizes: h
2207
2209
  },
2208
2210
  { initialItemFinalLocationReached: y, initialTopMostItemIndex: R, scrolledToInitialItem: I },
2209
- h,
2211
+ g,
2210
2212
  a,
2211
2213
  T,
2212
2214
  x,
2213
2215
  { scrollToIndex: C },
2214
- k,
2216
+ B,
2215
2217
  { topItemCount: u },
2216
2218
  { groupCounts: p },
2217
2219
  b
@@ -2219,12 +2221,12 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2219
2221
  const { listState: z, minOverscanItemCount: F, topItemsIndexes: O, rangeChanged: V, ...U } = x;
2220
2222
  return L(V, b.scrollSeekRangeChanged), L(
2221
2223
  S(
2222
- dt(b.windowViewportRect, h.headerHeight, h.fixedHeaderHeight),
2224
+ at(b.windowViewportRect, g.headerHeight, g.fixedHeaderHeight),
2223
2225
  // Keep a measurement range active when a window-scrolling list starts below the viewport.
2224
2226
  // One content pixel beyond the headers is enough to render the probe item and estimate the full list height.
2225
- B(([q, $, j]) => Math.max($ + j + 1, q.visibleHeight))
2227
+ k(([q, $, j]) => Math.max($ + j + 1, q.visibleHeight))
2226
2228
  ),
2227
- h.viewportHeight
2229
+ g.viewportHeight
2228
2230
  ), {
2229
2231
  data: t,
2230
2232
  defaultItemHeight: e,
@@ -2250,21 +2252,21 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2250
2252
  scrollToIndex: C,
2251
2253
  // output
2252
2254
  statefulTotalCount: v,
2253
- trackItemSizes: g,
2255
+ trackItemSizes: h,
2254
2256
  // exported from stateFlagsSystem
2255
2257
  rangeChanged: V,
2256
2258
  ...U,
2257
2259
  // the bag of IO from featureGroup1System
2258
2260
  ...b,
2259
- ...h,
2261
+ ...g,
2260
2262
  sizes: f,
2261
2263
  ...a
2262
2264
  };
2263
2265
  },
2264
- it(
2266
+ st(
2265
2267
  Lt,
2266
2268
  me,
2267
- It,
2269
+ St,
2268
2270
  er,
2269
2271
  Jo,
2270
2272
  Kt,
@@ -2288,75 +2290,75 @@ function lr(t, e) {
2288
2290
  const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2289
2291
  function Je(t, e, n) {
2290
2292
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
2291
- function c(h, a) {
2292
- h.propsReady !== void 0 && M(h.propsReady, !1);
2293
+ function c(g, a) {
2294
+ g.propsReady !== void 0 && M(g.propsReady, !1);
2293
2295
  for (const T of o) {
2294
- const x = h[e.required[T]];
2296
+ const x = g[e.required[T]];
2295
2297
  M(x, a[T]);
2296
2298
  }
2297
2299
  for (const T of r)
2298
2300
  if (T in a) {
2299
- const x = h[e.optional[T]];
2301
+ const x = g[e.optional[T]];
2300
2302
  M(x, a[T]);
2301
2303
  }
2302
- h.propsReady !== void 0 && M(h.propsReady, !0);
2304
+ g.propsReady !== void 0 && M(g.propsReady, !0);
2303
2305
  }
2304
- function d(h) {
2306
+ function d(g) {
2305
2307
  return s.reduce((a, T) => (a[T] = (x) => {
2306
- const C = h[e.methods[T]];
2308
+ const C = g[e.methods[T]];
2307
2309
  M(C, x);
2308
2310
  }, a), {});
2309
2311
  }
2310
- function f(h) {
2311
- return i.reduce((a, T) => (a[T] = Co(h[e.events[T]]), a), {});
2312
+ function f(g) {
2313
+ return i.reduce((a, T) => (a[T] = Co(g[e.events[T]]), a), {});
2312
2314
  }
2313
2315
  const v = E.forwardRef(function(a, T) {
2314
- const { children: x, ...C } = a, [k] = E.useState(() => ye(bo(t), (b) => {
2316
+ const { children: x, ...C } = a, [B] = E.useState(() => ye(bo(t), (b) => {
2315
2317
  c(b, C);
2316
- })), [u] = E.useState(pn(f, k));
2318
+ })), [u] = E.useState(pn(f, B));
2317
2319
  Ie(() => {
2318
2320
  for (const b of i)
2319
- b in C && J(u[b], C[b]);
2321
+ b in C && X(u[b], C[b]);
2320
2322
  return () => {
2321
2323
  Object.values(u).map(De);
2322
2324
  };
2323
- }, [C, u, k]), Ie(() => {
2324
- c(k, C);
2325
- }), E.useImperativeHandle(T, mn(d(k)));
2325
+ }, [C, u, B]), Ie(() => {
2326
+ c(B, C);
2327
+ }), E.useImperativeHandle(T, mn(d(B)));
2326
2328
  const p = n;
2327
- return /* @__PURE__ */ G(l.Provider, { value: k, children: n === void 0 ? x : /* @__PURE__ */ G(p, { ...lr([...o, ...r, ...i], C), children: x }) });
2328
- }), m = (h) => {
2329
+ return /* @__PURE__ */ G(l.Provider, { value: B, children: n === void 0 ? x : /* @__PURE__ */ G(p, { ...lr([...o, ...r, ...i], C), children: x }) });
2330
+ }), m = (g) => {
2329
2331
  const a = E.useContext(l);
2330
2332
  return E.useCallback(
2331
2333
  (T) => {
2332
- M(a[h], T);
2334
+ M(a[g], T);
2333
2335
  },
2334
- [a, h]
2336
+ [a, g]
2335
2337
  );
2336
- }, g = (h) => {
2337
- const T = E.useContext(l)[h], x = E.useCallback(
2338
- (C) => J(T, C),
2338
+ }, h = (g) => {
2339
+ const T = E.useContext(l)[g], x = E.useCallback(
2340
+ (C) => X(T, C),
2339
2341
  [T]
2340
2342
  );
2341
2343
  return E.useSyncExternalStore(
2342
2344
  x,
2343
- () => ot(T),
2344
- () => ot(T)
2345
+ () => lt(T),
2346
+ () => lt(T)
2345
2347
  );
2346
- }, y = (h) => {
2347
- const T = E.useContext(l)[h], [x, C] = E.useState(pn(ot, T));
2348
+ }, y = (g) => {
2349
+ const T = E.useContext(l)[g], [x, C] = E.useState(pn(lt, T));
2348
2350
  return Ie(
2349
- () => J(T, (k) => {
2350
- k !== x && C(mn(k));
2351
+ () => X(T, (B) => {
2352
+ B !== x && C(mn(B));
2351
2353
  }),
2352
2354
  [T, x]
2353
2355
  ), x;
2354
- }, R = parseInt(E.version, 10) >= 18 ? g : y;
2356
+ }, R = parseInt(E.version, 10) >= 18 ? h : y;
2355
2357
  return {
2356
2358
  Component: v,
2357
- useEmitter: (h, a) => {
2358
- const x = E.useContext(l)[h];
2359
- Ie(() => J(x, a), [a, x]);
2359
+ useEmitter: (g, a) => {
2360
+ const x = E.useContext(l)[g];
2361
+ Ie(() => X(x, a), [a, x]);
2360
2362
  },
2361
2363
  useEmitterValue: R,
2362
2364
  usePublisher: m
@@ -2377,21 +2379,21 @@ function cr(t) {
2377
2379
  function io(t, e, n, o = Jt, r, s) {
2378
2380
  const i = E.useRef(null), l = E.useRef(null), c = E.useRef(null), d = E.useCallback(
2379
2381
  (m) => {
2380
- let g, y, R;
2382
+ let h, y, R;
2381
2383
  const I = m.target;
2382
2384
  if (cr(I) || ze(I)) {
2383
2385
  const a = ze(I) ? I : I.defaultView;
2384
- R = s === !0 ? _t(a, a.scrollX) : a.scrollY, g = s === !0 ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, y = s === !0 ? a.innerWidth : a.innerHeight;
2386
+ R = s === !0 ? _t(a, a.scrollX) : a.scrollY, h = s === !0 ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, y = s === !0 ? a.innerWidth : a.innerHeight;
2385
2387
  } else
2386
- R = s === !0 ? _t(I, I.scrollLeft) : I.scrollTop, g = s === !0 ? I.scrollWidth : I.scrollHeight, y = s === !0 ? I.offsetWidth : I.offsetHeight;
2387
- const h = () => {
2388
+ R = s === !0 ? _t(I, I.scrollLeft) : I.scrollTop, h = s === !0 ? I.scrollWidth : I.scrollHeight, y = s === !0 ? I.offsetWidth : I.offsetHeight;
2389
+ const g = () => {
2388
2390
  t({
2389
- scrollHeight: g,
2391
+ scrollHeight: h,
2390
2392
  scrollTop: Math.max(R, 0),
2391
2393
  viewportHeight: y
2392
2394
  });
2393
2395
  };
2394
- m.suppressFlushSync === !0 ? h() : go.flushSync(h), l.current !== null && (R === l.current || R <= 0 || R === g - y) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2396
+ m.suppressFlushSync === !0 ? g() : go.flushSync(g), l.current !== null && (R === l.current || R <= 0 || R === h - y) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2395
2397
  },
2396
2398
  [t, e, s]
2397
2399
  );
@@ -2402,31 +2404,31 @@ function io(t, e, n, o = Jt, r, s) {
2402
2404
  };
2403
2405
  }, [i, d, n, o, r]);
2404
2406
  function f(m) {
2405
- const g = i.current;
2406
- if (!g || (s === !0 ? "offsetWidth" in g && g.offsetWidth === 0 : "offsetHeight" in g && g.offsetHeight === 0))
2407
+ const h = i.current;
2408
+ if (!h || (s === !0 ? "offsetWidth" in h && h.offsetWidth === 0 : "offsetHeight" in h && h.offsetHeight === 0))
2407
2409
  return;
2408
2410
  const y = m.behavior === "smooth";
2409
- let R, I, h;
2410
- ze(g) ? (I = Math.max(
2411
- Ht(g.document.documentElement, s === !0 ? "width" : "height"),
2412
- s === !0 ? g.document.documentElement.scrollWidth : g.document.documentElement.scrollHeight
2413
- ), R = s === !0 ? g.innerWidth : g.innerHeight, h = s === !0 ? _t(g, g.scrollX) : g.scrollY) : (I = g[s === !0 ? "scrollWidth" : "scrollHeight"], R = Ht(g, s === !0 ? "width" : "height"), h = s === !0 ? _t(g, g.scrollLeft) : g.scrollTop);
2411
+ let R, I, g;
2412
+ ze(h) ? (I = Math.max(
2413
+ Ht(h.document.documentElement, s === !0 ? "width" : "height"),
2414
+ s === !0 ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight
2415
+ ), R = s === !0 ? h.innerWidth : h.innerHeight, g = s === !0 ? _t(h, h.scrollX) : h.scrollY) : (I = h[s === !0 ? "scrollWidth" : "scrollHeight"], R = Ht(h, s === !0 ? "width" : "height"), g = s === !0 ? _t(h, h.scrollLeft) : h.scrollTop);
2414
2416
  const a = I - R;
2415
2417
  if (m.top === void 0) {
2416
- g.scrollTo(m);
2418
+ h.scrollTo(m);
2417
2419
  return;
2418
2420
  }
2419
2421
  const T = Math.ceil(Math.max(Math.min(a, m.top), 0));
2420
- if (m.top = T, Xn(R, I) || T === h) {
2421
- t({ scrollHeight: I, scrollTop: h, viewportHeight: R }), y && e(!0);
2422
+ if (m.top = T, Xn(R, I) || T === g) {
2423
+ t({ scrollHeight: I, scrollTop: g, viewportHeight: R }), y && e(!0);
2422
2424
  return;
2423
2425
  }
2424
2426
  y ? (l.current = T, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2425
2427
  c.current = null, l.current = null, e(!0);
2426
2428
  }, 1e3)) : l.current = null, s === !0 && (m = {
2427
2429
  ...m.behavior === void 0 ? {} : { behavior: m.behavior },
2428
- left: gn(g, T)
2429
- }), g.scrollTo(m);
2430
+ left: gn(h, T)
2431
+ }), h.scrollTo(m);
2430
2432
  }
2431
2433
  return { scrollByCallback: E.useCallback(
2432
2434
  (m) => {
@@ -2442,11 +2444,11 @@ function tn(t) {
2442
2444
  return t;
2443
2445
  }
2444
2446
  const ur = /* @__PURE__ */ Z(() => {
2445
- const t = w((l) => `Item ${l}`), e = w((l) => `Group ${l}`), n = w({}), o = w(tn), r = w("div"), s = w(Jt), i = (l, c = null) => ht(
2447
+ const t = w((l) => `Item ${l}`), e = w((l) => `Group ${l}`), n = w({}), o = w(tn), r = w("div"), s = w(Jt), i = (l, c = null) => gt(
2446
2448
  S(
2447
2449
  n,
2448
- B((d) => d[l]),
2449
- rt()
2450
+ k((d) => d[l]),
2451
+ ot()
2450
2452
  ),
2451
2453
  c
2452
2454
  );
@@ -2469,11 +2471,11 @@ const ur = /* @__PURE__ */ Z(() => {
2469
2471
  };
2470
2472
  }), ar = /* @__PURE__ */ Z(
2471
2473
  ([t, e]) => ({ ...t, ...e }),
2472
- it(ro, ur)
2474
+ st(ro, ur)
2473
2475
  ), dr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), fr = { overflowAnchor: "none", position: Qe(), zIndex: 1 }, lo = { overflowAnchor: "none" }, mr = { ...lo, display: "inline-block", height: "100%" }, Hn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2474
- const n = A("listState"), o = Tt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), f = A("context"), v = A("groupContent"), m = A("trackItemSizes"), g = A("itemSize"), y = A("log"), R = Tt("gap"), I = A("horizontalDirection"), { callbackRef: h } = An(
2476
+ const n = A("listState"), o = Tt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), f = A("context"), v = A("groupContent"), m = A("trackItemSizes"), h = A("itemSize"), y = A("log"), R = Tt("gap"), I = A("horizontalDirection"), { callbackRef: g } = An(
2475
2477
  o,
2476
- g,
2478
+ h,
2477
2479
  m,
2478
2480
  e ? Jt : c,
2479
2481
  y,
@@ -2489,7 +2491,7 @@ const ur = /* @__PURE__ */ Z(() => {
2489
2491
  be(() => {
2490
2492
  x(a);
2491
2493
  }, [a, x]);
2492
- const C = A("EmptyPlaceholder"), k = A("ScrollSeekPlaceholder") ?? dr, u = A("ListComponent"), p = A("ItemComponent"), b = A("GroupComponent"), z = A("computeItemKey"), F = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), U = A("initialItemFinalLocationReached"), q = e ? {} : {
2494
+ const C = A("EmptyPlaceholder"), B = A("ScrollSeekPlaceholder") ?? dr, u = A("ListComponent"), p = A("ItemComponent"), b = A("GroupComponent"), z = A("computeItemKey"), F = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), U = A("initialItemFinalLocationReached"), q = e ? {} : {
2493
2495
  boxSizing: "border-box",
2494
2496
  ...I ? {
2495
2497
  display: "inline-block",
@@ -2505,46 +2507,46 @@ const ur = /* @__PURE__ */ Z(() => {
2505
2507
  },
2506
2508
  ...U ? {} : { visibility: "hidden" }
2507
2509
  };
2508
- return !e && n.totalCount === 0 && C !== null && C !== void 0 ? /* @__PURE__ */ G(C, { ...st(C, f) }) : /* @__PURE__ */ G(
2510
+ return !e && n.totalCount === 0 && C !== null && C !== void 0 ? /* @__PURE__ */ G(C, { ...rt(C, f) }) : /* @__PURE__ */ G(
2509
2511
  u,
2510
2512
  {
2511
- ...st(u, f),
2513
+ ...rt(u, f),
2512
2514
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2513
- ref: h,
2515
+ ref: g,
2514
2516
  style: q,
2515
2517
  children: (e ? n.topItems : n.items).map(($) => {
2516
- const j = $.originalIndex, X = z(j + n.firstItemIndex, $.data, f);
2518
+ const j = $.originalIndex, J = z(j + n.firstItemIndex, $.data, f);
2517
2519
  return F ? /* @__PURE__ */ Dt(
2518
- k,
2520
+ B,
2519
2521
  {
2520
- ...st(k, f),
2522
+ ...rt(B, f),
2521
2523
  height: $.size,
2522
2524
  index: $.index,
2523
- key: X,
2525
+ key: J,
2524
2526
  type: $.type || "item",
2525
2527
  ...$.type === "group" ? {} : { groupIndex: $.groupIndex }
2526
2528
  }
2527
2529
  ) : $.type === "group" ? /* @__PURE__ */ Dt(
2528
2530
  b,
2529
2531
  {
2530
- ...st(b, f),
2532
+ ...rt(b, f),
2531
2533
  "data-index": j,
2532
2534
  "data-item-index": $.index,
2533
2535
  "data-known-size": $.size,
2534
- key: X,
2536
+ key: J,
2535
2537
  style: fr
2536
2538
  },
2537
2539
  v($.index, f)
2538
2540
  ) : /* @__PURE__ */ Dt(
2539
2541
  p,
2540
2542
  {
2541
- ...st(p, f),
2543
+ ...rt(p, f),
2542
2544
  ...co(p, $.data),
2543
2545
  "data-index": j,
2544
2546
  "data-item-group-index": $.groupIndex,
2545
2547
  "data-item-index": $.index,
2546
2548
  "data-known-size": $.size,
2547
- key: X,
2549
+ key: J,
2548
2550
  style: I ? mr : lo
2549
2551
  },
2550
2552
  O ? d($.index, $.groupIndex, $.data, f) : d($.index, $.data, f)
@@ -2578,7 +2580,7 @@ const ur = /* @__PURE__ */ Z(() => {
2578
2580
  width: "100%",
2579
2581
  zIndex: 1
2580
2582
  };
2581
- function st(t, e) {
2583
+ function rt(t, e) {
2582
2584
  if (typeof t != "string")
2583
2585
  return { context: e };
2584
2586
  }
@@ -2596,7 +2598,7 @@ const Ir = /* @__PURE__ */ E.memo(function() {
2596
2598
  !0,
2597
2599
  A("skipAnimationFrameInResizeObserver")
2598
2600
  ), s = A("context");
2599
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...st(e, s) }) }) : null;
2601
+ return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
2600
2602
  }), Sr = /* @__PURE__ */ E.memo(function() {
2601
2603
  const e = A("FooterComponent"), n = Tt("footerHeight"), o = A("HeaderFooterTag"), r = Ot(
2602
2604
  E.useMemo(
@@ -2608,17 +2610,17 @@ const Ir = /* @__PURE__ */ E.memo(function() {
2608
2610
  !0,
2609
2611
  A("skipAnimationFrameInResizeObserver")
2610
2612
  ), s = A("context");
2611
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...st(e, s) }) }) : null;
2613
+ return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
2612
2614
  });
2613
2615
  function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2614
2616
  return E.memo(function({ children: s, style: i, context: l, ...c }) {
2615
- const d = n("scrollContainerState"), f = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), m = e("scrollerRef"), g = e("horizontalDirection") || !1, { scrollByCallback: y, scrollerRef: R, scrollToCallback: I } = io(
2617
+ const d = n("scrollContainerState"), f = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), m = e("scrollerRef"), h = e("horizontalDirection") || !1, { scrollByCallback: y, scrollerRef: R, scrollToCallback: I } = io(
2616
2618
  d,
2617
2619
  v,
2618
2620
  f,
2619
2621
  m,
2620
2622
  void 0,
2621
- g
2623
+ h
2622
2624
  );
2623
2625
  return t("scrollTo", I), t("scrollBy", y), /* @__PURE__ */ G(
2624
2626
  f,
@@ -2626,10 +2628,10 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2626
2628
  "data-testid": "virtuoso-scroller",
2627
2629
  "data-virtuoso-scroller": !0,
2628
2630
  ref: R,
2629
- style: { ...g ? hr : pr, ...i },
2631
+ style: { ...h ? hr : pr, ...i },
2630
2632
  tabIndex: 0,
2631
2633
  ...c,
2632
- ...st(f, l),
2634
+ ...rt(f, l),
2633
2635
  children: s
2634
2636
  }
2635
2637
  );
@@ -2637,7 +2639,7 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2637
2639
  }
2638
2640
  function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2639
2641
  return E.memo(function({ children: s, style: i, context: l, ...c }) {
2640
- const d = n("windowScrollContainerState"), f = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), m = e("totalListHeight"), g = e("deviation"), y = e("customScrollParent"), R = E.useRef(null), I = e("scrollerRef"), { scrollByCallback: h, scrollerRef: a, scrollToCallback: T } = io(
2642
+ const d = n("windowScrollContainerState"), f = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), m = e("totalListHeight"), h = e("deviation"), y = e("customScrollParent"), R = E.useRef(null), I = e("scrollerRef"), { scrollByCallback: g, scrollerRef: a, scrollToCallback: T } = io(
2641
2643
  d,
2642
2644
  v,
2643
2645
  f,
@@ -2646,14 +2648,14 @@ function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2646
2648
  );
2647
2649
  return be(() => (a.current = y ?? R.current?.ownerDocument.defaultView, () => {
2648
2650
  a.current = null;
2649
- }), [a, y]), t("windowScrollTo", T), t("scrollBy", h), /* @__PURE__ */ G(
2651
+ }), [a, y]), t("windowScrollTo", T), t("scrollBy", g), /* @__PURE__ */ G(
2650
2652
  f,
2651
2653
  {
2652
2654
  ref: R,
2653
2655
  "data-virtuoso-scroller": !0,
2654
- style: { position: "relative", ...i, ...m === 0 ? void 0 : { height: m + g } },
2656
+ style: { position: "relative", ...i, ...m === 0 ? void 0 : { height: m + h } },
2655
2657
  ...c,
2656
- ...st(f, l),
2658
+ ...rt(f, l),
2657
2659
  children: s
2658
2660
  }
2659
2661
  );
@@ -2678,7 +2680,7 @@ const xr = ({ children: t }) => {
2678
2680
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: en(c, s, i), children: t });
2679
2681
  }, Tr = ({ children: t }) => {
2680
2682
  const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...gr, marginTop: `${n}px` }, r = A("context");
2681
- return /* @__PURE__ */ G(e, { style: o, ...st(e, r), children: t });
2683
+ return /* @__PURE__ */ G(e, { style: o, ...rt(e, r), children: t });
2682
2684
  }, Cr = /* @__PURE__ */ E.memo(function(e) {
2683
2685
  const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
2684
2686
  return /* @__PURE__ */ $t(r || n ? yr : wr, { ...e, context: s, children: [
@@ -2763,11 +2765,11 @@ const xr = ({ children: t }) => {
2763
2765
  ] })), e = w(null), n = w((d) => /* @__PURE__ */ $t("td", { colSpan: 1e3, children: [
2764
2766
  "Group ",
2765
2767
  d
2766
- ] })), o = w(null), r = w(null), s = w({}), i = w(tn), l = w(Jt), c = (d, f = null) => ht(
2768
+ ] })), o = w(null), r = w(null), s = w({}), i = w(tn), l = w(Jt), c = (d, f = null) => gt(
2767
2769
  S(
2768
2770
  s,
2769
- B((v) => v[d]),
2770
- rt()
2771
+ k((v) => v[d]),
2772
+ ot()
2771
2773
  ),
2772
2774
  f
2773
2775
  );
@@ -2793,15 +2795,15 @@ const xr = ({ children: t }) => {
2793
2795
  };
2794
2796
  }), Rr = /* @__PURE__ */ Z(
2795
2797
  ([t, e]) => ({ ...t, ...e }),
2796
- it(ro, br)
2797
- ), Hr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Er = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), Br = { overflowAnchor: "none" }, En = { position: Qe(), zIndex: 2, overflowAnchor: "none" }, Bn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2798
- const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), f = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Hr, m = _("GroupComponent"), g = _("TableRowComponent"), y = (e ? n.topItems : []).reduce((I, h, a) => (a === 0 ? I.push(h.size) : I.push(I[a - 1] + h.size), I), []);
2798
+ st(ro, br)
2799
+ ), Hr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Er = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, En = { position: Qe(), zIndex: 2, overflowAnchor: "none" }, kn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2800
+ const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), f = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Hr, m = _("GroupComponent"), h = _("TableRowComponent"), y = (e ? n.topItems : []).reduce((I, g, a) => (a === 0 ? I.push(g.size) : I.push(I[a - 1] + g.size), I), []);
2799
2801
  return (e ? n.topItems : n.items).map((I) => {
2800
- const h = I.originalIndex, a = o(h + r, I.data, s), T = e ? h === 0 ? 0 : y[h - 1] : 0;
2802
+ const g = I.originalIndex, a = o(g + r, I.data, s), T = e ? g === 0 ? 0 : y[g - 1] : 0;
2801
2803
  return i ? /* @__PURE__ */ Dt(
2802
2804
  v,
2803
2805
  {
2804
- ...st(v, s),
2806
+ ...rt(v, s),
2805
2807
  height: I.size,
2806
2808
  index: I.index,
2807
2809
  key: a,
@@ -2810,8 +2812,8 @@ const xr = ({ children: t }) => {
2810
2812
  ) : I.type === "group" ? /* @__PURE__ */ Dt(
2811
2813
  m,
2812
2814
  {
2813
- ...st(m, s),
2814
- "data-index": h,
2815
+ ...rt(m, s),
2816
+ "data-index": g,
2815
2817
  "data-item-index": I.index,
2816
2818
  "data-known-size": I.size,
2817
2819
  key: a,
@@ -2822,22 +2824,22 @@ const xr = ({ children: t }) => {
2822
2824
  },
2823
2825
  f(I.index, s)
2824
2826
  ) : /* @__PURE__ */ Dt(
2825
- g,
2827
+ h,
2826
2828
  {
2827
- ...st(g, s),
2828
- ...co(g, I.data),
2829
- "data-index": h,
2829
+ ...rt(h, s),
2830
+ ...co(h, I.data),
2831
+ "data-index": g,
2830
2832
  "data-item-index": I.index,
2831
2833
  "data-known-size": I.size,
2832
2834
  "data-item-group-index": I.groupIndex,
2833
2835
  key: a,
2834
- style: e ? { ...En, top: l + T } : Br
2836
+ style: e ? { ...En, top: l + T } : kr
2835
2837
  },
2836
2838
  c ? d(I.index, I.groupIndex, I.data, s) : d(I.index, I.data, s)
2837
2839
  );
2838
2840
  });
2839
- }), kr = /* @__PURE__ */ E.memo(function() {
2840
- const e = _("listState"), n = _("topItemsIndexes").length > 0, o = wt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = wt("windowScrollContainerState"), l = wt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), f = _("itemSize"), v = _("log"), { callbackRef: m, ref: g } = An(
2841
+ }), Br = /* @__PURE__ */ E.memo(function() {
2842
+ const e = _("listState"), n = _("topItemsIndexes").length > 0, o = wt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = wt("windowScrollContainerState"), l = wt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), f = _("itemSize"), v = _("log"), { callbackRef: m, ref: h } = An(
2841
2843
  o,
2842
2844
  f,
2843
2845
  d,
@@ -2849,20 +2851,20 @@ const xr = ({ children: t }) => {
2849
2851
  _("skipAnimationFrameInResizeObserver")
2850
2852
  ), [y, R] = E.useState(0);
2851
2853
  sn("deviation", (O) => {
2852
- y !== O && (g.current.style.marginTop = `${O}px`, R(O));
2854
+ y !== O && (h.current.style.marginTop = `${O}px`, R(O));
2853
2855
  });
2854
2856
  const I = wt("deviationCommitted");
2855
2857
  be(() => {
2856
2858
  I(y);
2857
2859
  }, [y, I]);
2858
- const h = _("EmptyPlaceholder"), a = _("FillerRow") ?? Er, T = _("TableBodyComponent"), x = _("paddingTopAddition"), C = _("statefulTotalCount"), k = _("context");
2859
- if (C === 0 && h !== null && h !== void 0)
2860
- return /* @__PURE__ */ G(h, { ...st(h, k) });
2861
- const u = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), p = e.offsetTop + x + y - u, b = e.offsetBottom, z = p > 0 ? /* @__PURE__ */ G(a, { context: k, height: p }, "padding-top") : null, F = b > 0 ? /* @__PURE__ */ G(a, { context: k, height: b }, "padding-bottom") : null;
2862
- return /* @__PURE__ */ $t(T, { "data-testid": "virtuoso-item-list", ref: m, ...st(T, k), children: [
2860
+ const g = _("EmptyPlaceholder"), a = _("FillerRow") ?? Er, T = _("TableBodyComponent"), x = _("paddingTopAddition"), C = _("statefulTotalCount"), B = _("context");
2861
+ if (C === 0 && g !== null && g !== void 0)
2862
+ return /* @__PURE__ */ G(g, { ...rt(g, B) });
2863
+ const u = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), p = e.offsetTop + x + y - u, b = e.offsetBottom, z = p > 0 ? /* @__PURE__ */ G(a, { context: B, height: p }, "padding-top") : null, F = b > 0 ? /* @__PURE__ */ G(a, { context: B, height: b }, "padding-bottom") : null;
2864
+ return /* @__PURE__ */ $t(T, { "data-testid": "virtuoso-item-list", ref: m, ...rt(T, B), children: [
2863
2865
  z,
2864
- n && /* @__PURE__ */ G(Bn, { showTopList: !0 }),
2865
- /* @__PURE__ */ G(Bn, {}),
2866
+ n && /* @__PURE__ */ G(kn, { showTopList: !0 }),
2867
+ /* @__PURE__ */ G(kn, {}),
2866
2868
  F
2867
2869
  ] });
2868
2870
  }), Or = ({ children: t }) => {
@@ -2892,29 +2894,29 @@ const xr = ({ children: t }) => {
2892
2894
  E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
2893
2895
  !0,
2894
2896
  _("skipAnimationFrameInResizeObserver")
2895
- ), v = o || n ? Vr : Fr, m = o || n ? Lr : Or, g = _("TableComponent"), y = _("TableHeadComponent"), R = _("TableFooterComponent"), I = i ? /* @__PURE__ */ G(
2897
+ ), v = o || n ? Vr : Fr, m = o || n ? Lr : Or, h = _("TableComponent"), y = _("TableHeadComponent"), R = _("TableFooterComponent"), I = i ? /* @__PURE__ */ G(
2896
2898
  y,
2897
2899
  {
2898
2900
  ref: d,
2899
2901
  style: { position: "sticky", top: 0, zIndex: 2 },
2900
- ...st(y, c),
2902
+ ...rt(y, c),
2901
2903
  children: i()
2902
2904
  },
2903
2905
  "TableHead"
2904
- ) : null, h = l ? /* @__PURE__ */ G(
2906
+ ) : null, g = l ? /* @__PURE__ */ G(
2905
2907
  R,
2906
2908
  {
2907
2909
  ref: f,
2908
2910
  style: { bottom: 0, position: "sticky", zIndex: 1 },
2909
- ...st(R, c),
2911
+ ...rt(R, c),
2910
2912
  children: l()
2911
2913
  },
2912
2914
  "TableFoot"
2913
2915
  ) : null;
2914
- return /* @__PURE__ */ G(v, { ...e, ...st(v, c), children: /* @__PURE__ */ G(m, { children: /* @__PURE__ */ $t(g, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...st(g, c), children: [
2916
+ return /* @__PURE__ */ G(v, { ...e, ...rt(v, c), children: /* @__PURE__ */ G(m, { children: /* @__PURE__ */ $t(h, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...rt(h, c), children: [
2915
2917
  I,
2916
- /* @__PURE__ */ G(kr, {}, "TableBody"),
2917
- h
2918
+ /* @__PURE__ */ G(Br, {}, "TableBody"),
2919
+ g
2918
2920
  ] }) }) });
2919
2921
  }), {
2920
2922
  Component: ao,
@@ -2957,7 +2959,8 @@ const xr = ({ children: t }) => {
2957
2959
  useWindowScroll: "useWindowScroll",
2958
2960
  customScrollParent: "customScrollParent",
2959
2961
  scrollerRef: "scrollerRef",
2960
- logLevel: "logLevel"
2962
+ logLevel: "logLevel",
2963
+ skipAnimationFrameInResizeObserver: "skipAnimationFrameInResizeObserver"
2961
2964
  },
2962
2965
  methods: {
2963
2966
  scrollToIndex: "scrollToIndex",
@@ -2979,7 +2982,7 @@ const xr = ({ children: t }) => {
2979
2982
  }
2980
2983
  },
2981
2984
  zr
2982
- ), Fr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), Vr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), os = ao, rs = ao, kn = {
2985
+ ), Fr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), Vr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), os = ao, rs = ao, Bn = {
2983
2986
  bottom: 0,
2984
2987
  itemHeight: 0,
2985
2988
  items: [],
@@ -3016,117 +3019,117 @@ const Ar = /* @__PURE__ */ Z(
3016
3019
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
3017
3020
  { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: f, viewportHeight: v },
3018
3021
  m,
3019
- g,
3022
+ h,
3020
3023
  { didMount: y, propsReady: R },
3021
- { customScrollParent: I, useWindowScroll: h, windowScrollContainerState: a, windowScrollTo: T, windowViewportRect: x },
3024
+ { customScrollParent: I, useWindowScroll: g, windowScrollContainerState: a, windowScrollTo: T, windowViewportRect: x },
3022
3025
  C
3023
3026
  ]) => {
3024
- const k = w(0), u = w(0), p = w(kn), b = w({ height: 0, width: 0 }), z = w({ height: 0, width: 0 }), F = K(), O = K(), V = w(0), U = w(null), q = w({ column: 0, row: 0 }), $ = K(), j = K(), X = w(!1), gt = w(0), ct = w(!0), St = w(!1), Ft = w(!1);
3025
- J(
3027
+ const B = w(0), u = w(0), p = w(Bn), b = w({ height: 0, width: 0 }), z = w({ height: 0, width: 0 }), F = K(), O = K(), V = w(0), U = w(null), q = w({ column: 0, row: 0 }), $ = K(), j = K(), J = w(!1), dt = w(0), pt = w(!0), It = w(!1), Ft = w(!1);
3028
+ X(
3026
3029
  S(
3027
3030
  y,
3028
- D(gt),
3031
+ D(dt),
3029
3032
  W(([H, N]) => !Me(N))
3030
3033
  ),
3031
3034
  () => {
3032
- M(ct, !1);
3035
+ M(pt, !1);
3033
3036
  }
3034
- ), J(
3037
+ ), X(
3035
3038
  S(
3036
- dt(y, ct, z, b, gt, St),
3037
- W(([H, N, Y, lt, , et]) => H && !N && Y.height !== 0 && lt.height !== 0 && !et)
3039
+ at(y, pt, z, b, dt, It),
3040
+ W(([H, N, Y, it, , et]) => H && !N && Y.height !== 0 && it.height !== 0 && !et)
3038
3041
  ),
3039
3042
  ([, , , , H]) => {
3040
3043
  if (H === void 0) {
3041
- M(ct, !0);
3044
+ M(pt, !0);
3042
3045
  return;
3043
3046
  }
3044
- M(St, !0), qe(1, () => {
3047
+ M(It, !0), qe(1, () => {
3045
3048
  M(F, H);
3046
3049
  }), bt(S(d), () => {
3047
- M(e, [0, 0]), M(ct, !0);
3050
+ M(e, [0, 0]), M(pt, !0);
3048
3051
  });
3049
3052
  }
3050
3053
  ), L(
3051
3054
  S(
3052
3055
  j,
3053
3056
  W((H) => H != null && H.scrollTop > 0),
3054
- Bt(0)
3057
+ kt(0)
3055
3058
  ),
3056
3059
  u
3057
- ), J(
3060
+ ), X(
3058
3061
  S(
3059
3062
  y,
3060
3063
  D(j),
3061
3064
  W(([, H]) => H != null)
3062
3065
  ),
3063
3066
  ([, H]) => {
3064
- H && (M(b, H.viewport), M(z, H.item), M(q, H.gap), H.scrollTop > 0 && (M(X, !0), bt(S(d, Ut(1)), (N) => {
3065
- M(X, !1);
3067
+ H && (M(b, H.viewport), M(z, H.item), M(q, H.gap), H.scrollTop > 0 && (M(J, !0), bt(S(d, Ut(1)), (N) => {
3068
+ M(J, !1);
3066
3069
  }), M(c, { top: H.scrollTop })));
3067
3070
  }
3068
3071
  ), L(
3069
3072
  S(
3070
3073
  b,
3071
- B(({ height: H }) => H)
3074
+ k(({ height: H }) => H)
3072
3075
  ),
3073
3076
  v
3074
3077
  ), L(
3075
3078
  S(
3076
- dt(
3079
+ at(
3077
3080
  P(b, Se),
3078
3081
  P(z, Se),
3079
3082
  P(q, (H, N) => H !== void 0 && H.column === N.column && H.row === N.row),
3080
3083
  P(d)
3081
3084
  ),
3082
- B(([H, N, Y, lt]) => ({
3085
+ k(([H, N, Y, it]) => ({
3083
3086
  gap: Y,
3084
3087
  item: N,
3085
- scrollTop: lt,
3088
+ scrollTop: it,
3086
3089
  viewport: H
3087
3090
  }))
3088
3091
  ),
3089
3092
  $
3090
3093
  ), L(
3091
3094
  S(
3092
- dt(
3093
- P(k),
3095
+ at(
3096
+ P(B),
3094
3097
  o,
3095
3098
  P(q, Gr),
3096
3099
  P(z, Se),
3097
3100
  P(b, Se),
3098
3101
  P(U),
3099
3102
  P(u),
3100
- P(X),
3101
- P(ct),
3102
- P(gt)
3103
+ P(J),
3104
+ P(pt),
3105
+ P(dt)
3103
3106
  ),
3104
3107
  W(([, , , , , , , H]) => !H),
3105
- B(
3108
+ k(
3106
3109
  ([
3107
3110
  H,
3108
3111
  [N, Y],
3109
- lt,
3112
+ it,
3110
3113
  et,
3111
3114
  Q,
3112
- ut,
3115
+ ct,
3113
3116
  xt,
3114
3117
  ,
3115
- at,
3118
+ ut,
3116
3119
  Vt
3117
3120
  ]) => {
3118
- const { column: Pt, row: ee } = lt, { height: he, width: Be } = et, { width: ln } = Q;
3121
+ const { column: Pt, row: ee } = it, { height: he, width: ke } = et, { width: ln } = Q;
3119
3122
  if (xt === 0 && (H === 0 || ln === 0))
3120
- return kn;
3121
- if (Be === 0) {
3123
+ return Bn;
3124
+ if (ke === 0) {
3122
3125
  const fn = Ye(Vt, H), ho = fn + Math.max(xt - 1, 0);
3123
- return Wr(zn(fn, ho, ut));
3126
+ return Wr(zn(fn, ho, ct));
3124
3127
  }
3125
- const ge = fo(ln, Be, Pt);
3128
+ const ge = fo(ln, ke, Pt);
3126
3129
  let qt, Mt;
3127
- at ? N === 0 && Y === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((N + ee) / (he + ee)), Mt = ge * On((Y + ee) / (he + ee)) - 1, Mt = Fe(H - 1, oe(Mt, ge - 1)), qt = Fe(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
3128
- const cn = zn(qt, Mt, ut), { bottom: un, top: an } = Fn(Q, lt, et, cn), dn = On(H / ge), po = dn * he + (dn - 1) * ee - un;
3129
- return { bottom: un, itemHeight: he, items: cn, itemWidth: Be, offsetBottom: po, offsetTop: an, top: an };
3130
+ ut ? N === 0 && Y === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((N + ee) / (he + ee)), Mt = ge * On((Y + ee) / (he + ee)) - 1, Mt = Fe(H - 1, oe(Mt, ge - 1)), qt = Fe(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
3131
+ const cn = zn(qt, Mt, ct), { bottom: un, top: an } = Fn(Q, it, et, cn), dn = On(H / ge), po = dn * he + (dn - 1) * ee - un;
3132
+ return { bottom: un, itemHeight: he, items: cn, itemWidth: ke, offsetBottom: po, offsetTop: an, top: an };
3130
3133
  }
3131
3134
  )
3132
3135
  ),
@@ -3135,87 +3138,87 @@ const Ar = /* @__PURE__ */ Z(
3135
3138
  S(
3136
3139
  U,
3137
3140
  W((H) => H !== null),
3138
- B((H) => H.length)
3141
+ k((H) => H.length)
3139
3142
  ),
3140
- k
3143
+ B
3141
3144
  ), L(
3142
3145
  S(
3143
- dt(b, z, p, q),
3146
+ at(b, z, p, q),
3144
3147
  W(([H, N, { items: Y }]) => Y.length > 0 && N.height !== 0 && H.height !== 0),
3145
- B(([H, N, { items: Y }, lt]) => {
3146
- const { bottom: et, top: Q } = Fn(H, lt, N, Y);
3148
+ k(([H, N, { items: Y }, it]) => {
3149
+ const { bottom: et, top: Q } = Fn(H, it, N, Y);
3147
3150
  return [Q, et];
3148
3151
  }),
3149
- rt(le)
3152
+ ot(le)
3150
3153
  ),
3151
3154
  e
3152
3155
  );
3153
- const pt = w(!1);
3156
+ const ht = w(!1);
3154
3157
  L(
3155
3158
  S(
3156
3159
  d,
3157
- D(pt),
3158
- B(([H, N]) => N || H !== 0)
3160
+ D(ht),
3161
+ k(([H, N]) => N || H !== 0)
3159
3162
  ),
3160
- pt
3163
+ ht
3161
3164
  );
3162
3165
  const jt = Ct(
3163
3166
  S(
3164
- dt(p, k),
3167
+ at(p, B),
3165
3168
  W(([{ items: H }]) => H.length > 0),
3166
- D(pt),
3169
+ D(ht),
3167
3170
  W(([[H, N], Y]) => {
3168
3171
  const et = H.items[H.items.length - 1].index === N - 1;
3169
3172
  return (Y || H.bottom > 0 && H.itemHeight > 0 && H.offsetBottom === 0 && H.items.length === N) && et;
3170
3173
  }),
3171
- B(([[, H]]) => H - 1),
3172
- rt()
3174
+ k(([[, H]]) => H - 1),
3175
+ ot()
3173
3176
  )
3174
3177
  ), Qt = Ct(
3175
3178
  S(
3176
3179
  P(p),
3177
3180
  W(({ items: H }) => H.length > 0 && H[0].index === 0),
3178
- Bt(0),
3179
- rt()
3181
+ kt(0),
3182
+ ot()
3180
3183
  )
3181
3184
  ), Et = Ct(
3182
3185
  S(
3183
3186
  P(p),
3184
- D(X),
3187
+ D(J),
3185
3188
  W(([{ items: H }, N]) => H.length > 0 && !N),
3186
- B(([{ items: H }]) => ({
3189
+ k(([{ items: H }]) => ({
3187
3190
  endIndex: H[H.length - 1].index,
3188
3191
  startIndex: H[0].index
3189
3192
  })),
3190
- rt(Un),
3193
+ ot(Un),
3191
3194
  zt(0)
3192
3195
  )
3193
3196
  );
3194
- L(Et, g.scrollSeekRangeChanged), L(
3197
+ L(Et, h.scrollSeekRangeChanged), L(
3195
3198
  S(
3196
3199
  F,
3197
- D(b, z, k, q),
3198
- B(([H, N, Y, lt, et]) => {
3199
- const Q = Zn(H), { align: ut, behavior: xt, offset: at } = Q;
3200
+ D(b, z, B, q),
3201
+ k(([H, N, Y, it, et]) => {
3202
+ const Q = Zn(H), { align: ct, behavior: xt, offset: ut } = Q;
3200
3203
  let Vt = Q.index;
3201
- Vt === "LAST" && (Vt = lt - 1), Vt = oe(0, Vt, Fe(lt - 1, Vt));
3204
+ Vt === "LAST" && (Vt = it - 1), Vt = oe(0, Vt, Fe(it - 1, Vt));
3202
3205
  let Pt = _e(N, et, Y, Vt);
3203
- return ut === "end" ? Pt = Ln(Pt - N.height + Y.height) : ut === "center" && (Pt = Ln(Pt - N.height / 2 + Y.height / 2)), at !== void 0 && at !== 0 && (Pt += at), { behavior: xt, top: Pt };
3206
+ return ct === "end" ? Pt = Ln(Pt - N.height + Y.height) : ct === "center" && (Pt = Ln(Pt - N.height / 2 + Y.height / 2)), ut !== void 0 && ut !== 0 && (Pt += ut), { behavior: xt, top: Pt };
3204
3207
  })
3205
3208
  ),
3206
3209
  c
3207
3210
  );
3208
- const te = ht(
3211
+ const te = gt(
3209
3212
  S(
3210
3213
  p,
3211
- B((H) => H.offsetBottom + H.bottom)
3214
+ k((H) => H.offsetBottom + H.bottom)
3212
3215
  ),
3213
3216
  0
3214
3217
  );
3215
3218
  return L(
3216
3219
  S(
3217
3220
  x,
3218
- B((H) => ({ height: H.visibleHeight, width: H.visibleWidth }))
3221
+ k((H) => ({ height: H.visibleHeight, width: H.visibleWidth }))
3219
3222
  ),
3220
3223
  b
3221
3224
  ), {
@@ -3238,17 +3241,17 @@ const Ar = /* @__PURE__ */ Z(
3238
3241
  scrollToIndex: F,
3239
3242
  scrollTop: d,
3240
3243
  smoothScrollTargetReached: f,
3241
- totalCount: k,
3242
- useWindowScroll: h,
3244
+ totalCount: B,
3245
+ useWindowScroll: g,
3243
3246
  viewportDimensions: b,
3244
3247
  windowScrollContainerState: a,
3245
3248
  windowScrollTo: T,
3246
3249
  windowViewportRect: x,
3247
- ...g,
3250
+ ...h,
3248
3251
  // output
3249
3252
  gridState: p,
3250
3253
  horizontalDirection: Ft,
3251
- initialTopMostItemIndex: gt,
3254
+ initialTopMostItemIndex: dt,
3252
3255
  totalListHeight: te,
3253
3256
  ...m,
3254
3257
  endReached: jt,
@@ -3256,11 +3259,11 @@ const Ar = /* @__PURE__ */ Z(
3256
3259
  rangeChanged: Et,
3257
3260
  startReached: Qt,
3258
3261
  stateChanged: $,
3259
- stateRestoreInProgress: X,
3262
+ stateRestoreInProgress: J,
3260
3263
  ...C
3261
3264
  };
3262
3265
  },
3263
- it(Ze, It, pe, no, At, Xe, Gt)
3266
+ st(Ze, St, pe, no, At, Xe, Gt)
3264
3267
  );
3265
3268
  function fo(t, e, n) {
3266
3269
  return oe(1, Ce((t + n) / (Ce(e) + n)));
@@ -3277,11 +3280,11 @@ function _e(t, e, n, o) {
3277
3280
  return i > 0 ? i + e.row : i;
3278
3281
  }
3279
3282
  const Mr = /* @__PURE__ */ Z(() => {
3280
- const t = w((v) => `Item ${v}`), e = w({}), n = w(null), o = w("virtuoso-grid-item"), r = w("virtuoso-grid-list"), s = w(tn), i = w("div"), l = w(Jt), c = (v, m = null) => ht(
3283
+ const t = w((v) => `Item ${v}`), e = w({}), n = w(null), o = w("virtuoso-grid-item"), r = w("virtuoso-grid-list"), s = w(tn), i = w("div"), l = w(Jt), c = (v, m = null) => gt(
3281
3284
  S(
3282
3285
  e,
3283
- B((g) => g[v]),
3284
- rt()
3286
+ k((h) => h[v]),
3287
+ ot()
3285
3288
  ),
3286
3289
  m
3287
3290
  ), d = w(!1), f = w(!1);
@@ -3305,24 +3308,24 @@ const Mr = /* @__PURE__ */ Z(() => {
3305
3308
  };
3306
3309
  }), _r = /* @__PURE__ */ Z(
3307
3310
  ([t, e]) => ({ ...t, ...e }),
3308
- it(Ar, Mr)
3311
+ st(Ar, Mr)
3309
3312
  ), Nr = /* @__PURE__ */ E.memo(function() {
3310
- const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = yt("scrollHeight"), c = nt("ItemComponent"), d = nt("ListComponent"), f = nt("ScrollSeekPlaceholder"), v = nt("context"), m = yt("itemDimensions"), g = yt("gap"), y = nt("log"), R = nt("stateRestoreInProgress"), I = yt("reportReadyState"), h = Ot(
3313
+ const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = yt("scrollHeight"), c = nt("ItemComponent"), d = nt("ListComponent"), f = nt("ScrollSeekPlaceholder"), v = nt("context"), m = yt("itemDimensions"), h = yt("gap"), y = nt("log"), R = nt("stateRestoreInProgress"), I = yt("reportReadyState"), g = Ot(
3311
3314
  E.useMemo(
3312
3315
  () => (a) => {
3313
3316
  const T = a.parentElement.parentElement.scrollHeight;
3314
3317
  l(T);
3315
3318
  const x = a.firstChild;
3316
3319
  if (x !== null) {
3317
- const { height: C, width: k } = x.getBoundingClientRect();
3318
- m({ height: C, width: k });
3320
+ const { height: C, width: B } = x.getBoundingClientRect();
3321
+ m({ height: C, width: B });
3319
3322
  }
3320
- g({
3323
+ h({
3321
3324
  column: Vn("column-gap", getComputedStyle(a).columnGap, y),
3322
3325
  row: Vn("row-gap", getComputedStyle(a).rowGap, y)
3323
3326
  });
3324
3327
  },
3325
- [l, m, g, y]
3328
+ [l, m, h, y]
3326
3329
  ),
3327
3330
  !0,
3328
3331
  !1
@@ -3333,8 +3336,8 @@ const Mr = /* @__PURE__ */ Z(() => {
3333
3336
  d,
3334
3337
  {
3335
3338
  className: n,
3336
- ref: h,
3337
- ...st(d, v),
3339
+ ref: g,
3340
+ ...rt(d, v),
3338
3341
  "data-testid": "virtuoso-item-list",
3339
3342
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3340
3343
  children: e.items.map((a) => {
@@ -3342,7 +3345,7 @@ const Mr = /* @__PURE__ */ Z(() => {
3342
3345
  return i ? /* @__PURE__ */ G(
3343
3346
  f,
3344
3347
  {
3345
- ...st(f, v),
3348
+ ...rt(f, v),
3346
3349
  height: e.itemHeight,
3347
3350
  index: a.index,
3348
3351
  width: e.itemWidth
@@ -3351,7 +3354,7 @@ const Mr = /* @__PURE__ */ Z(() => {
3351
3354
  ) : /* @__PURE__ */ Dt(
3352
3355
  c,
3353
3356
  {
3354
- ...st(c, v),
3357
+ ...rt(c, v),
3355
3358
  className: o,
3356
3359
  "data-index": a.index,
3357
3360
  key: T
@@ -3372,7 +3375,7 @@ const Mr = /* @__PURE__ */ Z(() => {
3372
3375
  !0,
3373
3376
  !1
3374
3377
  ), s = nt("context");
3375
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...st(e, s) }) }) : null;
3378
+ return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
3376
3379
  }), $r = E.memo(function() {
3377
3380
  const e = nt("FooterComponent"), n = yt("footerHeight"), o = nt("headerFooterTag"), r = Ot(
3378
3381
  E.useMemo(
@@ -3384,7 +3387,7 @@ const Mr = /* @__PURE__ */ Z(() => {
3384
3387
  !0,
3385
3388
  !1
3386
3389
  ), s = nt("context");
3387
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...st(e, s) }) }) : null;
3390
+ return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
3388
3391
  }), Ur = ({ children: t }) => {
3389
3392
  const e = E.useContext(so), n = yt("itemDimensions"), o = yt("viewportDimensions"), r = Ot(
3390
3393
  E.useMemo(
@@ -3406,7 +3409,7 @@ const Mr = /* @__PURE__ */ Z(() => {
3406
3409
  }, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: en(!1, s), children: t });
3407
3410
  }, jr = /* @__PURE__ */ E.memo(function({ ...e }) {
3408
3411
  const n = nt("useWindowScroll"), o = nt("customScrollParent"), r = o || n ? Zr : Yr, s = o || n ? Kr : Ur, i = nt("context");
3409
- return /* @__PURE__ */ G(r, { ...e, ...st(r, i), children: /* @__PURE__ */ $t(s, { children: [
3412
+ return /* @__PURE__ */ G(r, { ...e, ...rt(r, i), children: /* @__PURE__ */ $t(s, { children: [
3410
3413
  /* @__PURE__ */ G(Dr, {}),
3411
3414
  /* @__PURE__ */ G(Nr, {}),
3412
3415
  /* @__PURE__ */ G($r, {})