react-virtuoso 4.18.10 → 4.18.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,28 +1,28 @@
1
1
  import { jsx as G, jsxs as $t } from "react/jsx-runtime";
2
2
  import E, { createElement as Dt } from "react";
3
- import xo from "react-dom";
4
- const we = 0, Pt = 1, Xt = 2, Pn = 4;
5
- function mn(t) {
3
+ import go from "react-dom";
4
+ const we = 0, Pt = 1, Xt = 2, Vn = 4;
5
+ function fn(t) {
6
6
  return () => t;
7
7
  }
8
- function vo(t) {
8
+ function Io(t) {
9
9
  t();
10
10
  }
11
11
  function re(t, e) {
12
12
  return (n) => t(e(n));
13
13
  }
14
- function pn(t, e) {
14
+ function mn(t, e) {
15
15
  return () => t(e);
16
16
  }
17
- function To(t, e) {
17
+ function So(t, e) {
18
18
  return (n) => t(e, n);
19
19
  }
20
- function Ne(t) {
20
+ function _e(t) {
21
21
  return t !== void 0;
22
22
  }
23
- function Co(...t) {
23
+ function xo(...t) {
24
24
  return () => {
25
- t.map(vo);
25
+ t.map(Io);
26
26
  };
27
27
  }
28
28
  function Jt() {
@@ -30,7 +30,7 @@ function Jt() {
30
30
  function ye(t, e) {
31
31
  return e(t), t;
32
32
  }
33
- function wo(t, e) {
33
+ function vo(t, e) {
34
34
  return e(t);
35
35
  }
36
36
  function rt(...t) {
@@ -42,14 +42,14 @@ function Y(t, e) {
42
42
  function M(t, e) {
43
43
  t(we, e);
44
44
  }
45
- function De(t) {
45
+ function Ne(t) {
46
46
  t(Xt);
47
47
  }
48
48
  function it(t) {
49
- return t(Pn);
49
+ return t(Vn);
50
50
  }
51
51
  function z(t, e) {
52
- return Y(t, To(e, we));
52
+ return Y(t, So(e, we));
53
53
  }
54
54
  function yt(t, e) {
55
55
  const n = t(Pt, (o) => {
@@ -57,7 +57,7 @@ function yt(t, e) {
57
57
  });
58
58
  return n;
59
59
  }
60
- function hn(t) {
60
+ function pn(t) {
61
61
  let e, n;
62
62
  return (o) => (r) => {
63
63
  e = r, n && clearTimeout(n), n = setTimeout(() => {
@@ -65,10 +65,10 @@ function hn(t) {
65
65
  }, t);
66
66
  };
67
67
  }
68
- function Gn(t, e) {
68
+ function Wn(t, e) {
69
69
  return t === e;
70
70
  }
71
- function nt(t = Gn) {
71
+ function nt(t = Wn) {
72
72
  let e;
73
73
  return (n) => (o) => {
74
74
  t(e, o) || (e = o, n(o));
@@ -88,11 +88,11 @@ function Bt(t) {
88
88
  };
89
89
  }
90
90
  function x(t, ...e) {
91
- const n = yo(...e);
91
+ const n = To(...e);
92
92
  return ((o, r) => {
93
93
  switch (o) {
94
94
  case Xt:
95
- De(t);
95
+ Ne(t);
96
96
  return;
97
97
  case Pt:
98
98
  return Y(t, n(r));
@@ -134,10 +134,10 @@ function $(...t) {
134
134
  n === r ? l() : o = l;
135
135
  };
136
136
  }
137
- function yo(...t) {
138
- return (e) => t.reduceRight(wo, e);
137
+ function To(...t) {
138
+ return (e) => t.reduceRight(vo, e);
139
139
  }
140
- function bo(t) {
140
+ function Co(t) {
141
141
  let e, n;
142
142
  const o = () => e?.();
143
143
  return function(r, s) {
@@ -162,7 +162,7 @@ function T(t) {
162
162
  r(e);
163
163
  break;
164
164
  }
165
- case Pn:
165
+ case Vn:
166
166
  return e;
167
167
  }
168
168
  return n(o, r);
@@ -194,18 +194,18 @@ function U() {
194
194
  function Tt(t) {
195
195
  return ye(U(), (e) => z(t, e));
196
196
  }
197
- const Ro = { singleton: !0 };
198
- function j(t, e = [], n = Ro) {
197
+ const wo = { singleton: !0 };
198
+ function j(t, e = [], n = wo) {
199
199
  const { singleton: o } = n;
200
200
  return {
201
201
  constructor: t,
202
202
  dependencies: e,
203
- id: Ho(),
203
+ id: yo(),
204
204
  singleton: o
205
205
  };
206
206
  }
207
- const Ho = () => /* @__PURE__ */ Symbol("id");
208
- function Eo(t) {
207
+ const yo = () => /* @__PURE__ */ Symbol("id");
208
+ function bo(t) {
209
209
  const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
210
210
  if (i && e.has(s))
211
211
  return e.get(s);
@@ -226,7 +226,7 @@ function at(...t) {
226
226
  }), function(s, i) {
227
227
  switch (s) {
228
228
  case Xt: {
229
- De(e);
229
+ Ne(e);
230
230
  return;
231
231
  }
232
232
  case Pt:
@@ -234,7 +234,7 @@ function at(...t) {
234
234
  }
235
235
  };
236
236
  }
237
- function W(t, e = Gn) {
237
+ function W(t, e = Wn) {
238
238
  return x(t, nt(e));
239
239
  }
240
240
  function Fe(...t) {
@@ -243,7 +243,7 @@ function Fe(...t) {
243
243
  case Xt:
244
244
  return;
245
245
  case Pt:
246
- return Co(...t.map((o) => Y(o, n)));
246
+ return xo(...t.map((o) => Y(o, n)));
247
247
  }
248
248
  };
249
249
  }
@@ -256,18 +256,18 @@ const ft = {
256
256
  WARN: 2,
257
257
  /** Error messages for failures (default level) */
258
258
  ERROR: 3
259
- }, Bo = {
259
+ }, Ro = {
260
260
  [ft.DEBUG]: "debug",
261
261
  [ft.ERROR]: "error",
262
262
  [ft.INFO]: "log",
263
263
  [ft.WARN]: "warn"
264
- }, Oo = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
264
+ }, Ho = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
265
265
  () => {
266
266
  const t = T(ft.ERROR);
267
267
  return {
268
268
  log: T((n, o, r = ft.INFO) => {
269
- const s = Oo().VIRTUOSO_LOG_LEVEL ?? it(t);
270
- r >= s && console[Bo[r]](
269
+ const s = Ho().VIRTUOSO_LOG_LEVEL ?? it(t);
270
+ r >= s && console[Ro[r]](
271
271
  "%creact-virtuoso: %c%s %o",
272
272
  "color: #0253b3; font-weight: bold",
273
273
  "color: initial",
@@ -280,31 +280,24 @@ const ft = {
280
280
  },
281
281
  [],
282
282
  { singleton: !0 }
283
- ), Ve = /* @__PURE__ */ new WeakMap();
284
- function An(t) {
283
+ );
284
+ function Eo(t) {
285
285
  return "self" in t ? t.document.documentElement : t;
286
286
  }
287
- function Lo(t) {
288
- const e = An(t), n = Ve.get(e);
289
- if (n !== void 0)
290
- return n;
291
- const o = e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
292
- return Ve.set(e, o), o;
293
- }
294
- function gn(t) {
295
- Ve.delete(An(t));
287
+ function Pn(t) {
288
+ const e = Eo(t);
289
+ return e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
296
290
  }
297
- function Mn(t, e) {
298
- return Lo(t) ? -e : e;
291
+ function _t(t, e) {
292
+ return Pn(t) ? -e : e;
299
293
  }
300
- const _t = Mn;
301
- function In(t, e) {
302
- return Mn(t, e);
294
+ function hn(t, e) {
295
+ return Pn(t) ? -e : e;
303
296
  }
304
- function Lt(t, e, n) {
305
- return $e(t, e, n).callbackRef;
297
+ function kt(t, e, n) {
298
+ return De(t, e, n).callbackRef;
306
299
  }
307
- function $e(t, e, n) {
300
+ function De(t, e, n) {
308
301
  const o = E.useRef(null);
309
302
  let r = (i) => {
310
303
  };
@@ -319,10 +312,10 @@ function $e(t, e, n) {
319
312
  i && e ? (s?.observe(i), o.current = i) : (o.current && s?.unobserve(o.current), o.current = null);
320
313
  }, { callbackRef: r, ref: o };
321
314
  }
322
- function _n(t, e, n, o, r, s, i, l, c) {
315
+ function Gn(t, e, n, o, r, s, i, l, c) {
323
316
  const d = E.useCallback(
324
317
  (m) => {
325
- const v = ko(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
318
+ const v = Bo(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
326
319
  let p = m.parentElement;
327
320
  for (; p.dataset.virtuosoScroller === void 0; )
328
321
  p = p.parentElement;
@@ -335,14 +328,14 @@ function _n(t, e, n, o, r, s, i, l, c) {
335
328
  scrollTop: Math.max(f, 0),
336
329
  viewportHeight: h
337
330
  }), s?.(
338
- l ? Sn("column-gap", getComputedStyle(m).columnGap, r) : Sn("row-gap", getComputedStyle(m).rowGap, r)
331
+ l ? gn("column-gap", getComputedStyle(m).columnGap, r) : gn("row-gap", getComputedStyle(m).rowGap, r)
339
332
  ), v !== null && t(v);
340
333
  },
341
334
  [t, e, r, s, i, o, l]
342
335
  );
343
- return $e(d, n, c);
336
+ return De(d, n, c);
344
337
  }
345
- function ko(t, e, n, o) {
338
+ function Bo(t, e, n, o) {
346
339
  const r = t.length;
347
340
  if (r === 0)
348
341
  return null;
@@ -359,10 +352,10 @@ function ko(t, e, n, o) {
359
352
  }
360
353
  return s;
361
354
  }
362
- function Sn(t, e, n) {
355
+ function gn(t, e, n) {
363
356
  return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
364
357
  }
365
- function Ue(t, e, n) {
358
+ function $e(t, e, n) {
366
359
  const o = E.useRef(null), r = E.useCallback(
367
360
  (c) => {
368
361
  if (!c?.offsetParent)
@@ -385,7 +378,7 @@ function Ue(t, e, n) {
385
378
  },
386
379
  // oxlint-disable-next-line exhaustive-deps
387
380
  [t, e]
388
- ), { callbackRef: s, ref: i } = $e(r, !0, n), l = E.useCallback(() => {
381
+ ), { callbackRef: s, ref: i } = De(r, !0, n), l = E.useCallback(() => {
389
382
  r(i.current);
390
383
  }, [r, i]);
391
384
  return E.useEffect(() => {
@@ -444,7 +437,7 @@ const It = j(
444
437
  [],
445
438
  { singleton: !0 }
446
439
  ), se = { lvl: 0 };
447
- function Nn(t, e) {
440
+ function An(t, e) {
448
441
  const n = t.length;
449
442
  if (n === 0)
450
443
  return [];
@@ -475,7 +468,7 @@ function Rt(t, e, n = "k") {
475
468
  return Rt(t.l, e, n);
476
469
  }
477
470
  function vt(t, e, n) {
478
- return J(t) ? Un(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? xn(dt(t, { l: vt(t.l, e, n) })) : xn(dt(t, { r: vt(t.r, e, n) }));
471
+ return J(t) ? Nn(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? In(dt(t, { l: vt(t.l, e, n) })) : In(dt(t, { r: vt(t.r, e, n) }));
479
472
  }
480
473
  function Yt() {
481
474
  return se;
@@ -484,9 +477,9 @@ function Zt(t, e, n) {
484
477
  if (J(t))
485
478
  return [];
486
479
  const o = Rt(t, e)[0];
487
- return zo(Pe(t, o, n));
480
+ return Oo(We(t, o, n));
488
481
  }
489
- function We(t, e) {
482
+ function Ve(t, e) {
490
483
  if (J(t))
491
484
  return se;
492
485
  const { k: n, l: o, r } = t;
@@ -495,20 +488,20 @@ function We(t, e) {
495
488
  return r;
496
489
  if (J(r))
497
490
  return o;
498
- const [s, i] = $n(o);
499
- return xe(dt(t, { k: s, l: Dn(o), v: i }));
491
+ const [s, i] = _n(o);
492
+ return xe(dt(t, { k: s, l: Mn(o), v: i }));
500
493
  }
501
- return e < n ? xe(dt(t, { l: We(o, e) })) : xe(dt(t, { r: We(r, e) }));
494
+ return e < n ? xe(dt(t, { l: Ve(o, e) })) : xe(dt(t, { r: Ve(r, e) }));
502
495
  }
503
496
  function Nt(t) {
504
497
  return J(t) ? [] : [...Nt(t.l), { k: t.k, v: t.v }, ...Nt(t.r)];
505
498
  }
506
- function Pe(t, e, n) {
499
+ function We(t, e, n) {
507
500
  if (J(t))
508
501
  return [];
509
502
  const { k: o, l: r, r: s, v: i } = t;
510
503
  let l = [];
511
- return o > e && (l = l.concat(Pe(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(Pe(s, e, n))), l;
504
+ return o > e && (l = l.concat(We(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(We(s, e, n))), l;
512
505
  }
513
506
  function xe(t) {
514
507
  const { l: e, lvl: n, r: o } = t;
@@ -516,7 +509,7 @@ function xe(t) {
516
509
  return t;
517
510
  if (n > o.lvl + 1) {
518
511
  if (Be(e))
519
- return Kn(dt(t, { lvl: n - 1 }));
512
+ return Dn(dt(t, { lvl: n - 1 }));
520
513
  if (!J(e) && !J(e.r))
521
514
  return dt(e.r, {
522
515
  l: dt(e, { r: e.r.l }),
@@ -529,7 +522,7 @@ function xe(t) {
529
522
  throw new Error("Unexpected empty nodes");
530
523
  }
531
524
  if (Be(t))
532
- return Ge(dt(t, { lvl: n - 1 }));
525
+ return Pe(dt(t, { lvl: n - 1 }));
533
526
  if (!J(o) && !J(o.l)) {
534
527
  const r = o.l, s = Be(r) ? o.lvl - 1 : o.lvl;
535
528
  return dt(r, {
@@ -538,13 +531,13 @@ function xe(t) {
538
531
  r: r.l
539
532
  }),
540
533
  lvl: r.lvl + 1,
541
- r: Ge(dt(o, { l: r.r, lvl: s }))
534
+ r: Pe(dt(o, { l: r.r, lvl: s }))
542
535
  });
543
536
  }
544
537
  throw new Error("Unexpected empty nodes");
545
538
  }
546
539
  function dt(t, e) {
547
- return Un(
540
+ return Nn(
548
541
  e.k === void 0 ? t.k : e.k,
549
542
  e.v === void 0 ? t.v : e.v,
550
543
  e.lvl === void 0 ? t.lvl : e.lvl,
@@ -552,44 +545,44 @@ function dt(t, e) {
552
545
  e.r === void 0 ? t.r : e.r
553
546
  );
554
547
  }
555
- function Dn(t) {
556
- return J(t.r) ? t.l : xe(dt(t, { r: Dn(t.r) }));
548
+ function Mn(t) {
549
+ return J(t.r) ? t.l : xe(dt(t, { r: Mn(t.r) }));
557
550
  }
558
551
  function Be(t) {
559
552
  return J(t) || t.lvl > t.r.lvl;
560
553
  }
561
- function $n(t) {
562
- return J(t.r) ? [t.k, t.v] : $n(t.r);
554
+ function _n(t) {
555
+ return J(t.r) ? [t.k, t.v] : _n(t.r);
563
556
  }
564
- function Un(t, e, n, o = se, r = se) {
557
+ function Nn(t, e, n, o = se, r = se) {
565
558
  return { k: t, l: o, lvl: n, r, v: e };
566
559
  }
567
- function xn(t) {
568
- return Ge(Kn(t));
560
+ function In(t) {
561
+ return Pe(Dn(t));
569
562
  }
570
- function Kn(t) {
563
+ function Dn(t) {
571
564
  const { l: e } = t;
572
565
  return !J(e) && e.lvl === t.lvl ? dt(e, { r: dt(t, { l: e.r }) }) : t;
573
566
  }
574
- function Ge(t) {
567
+ function Pe(t) {
575
568
  const { lvl: e, r: n } = t;
576
569
  return !J(n) && !J(n.r) && n.lvl === e && n.r.lvl === e ? dt(n, { l: dt(t, { r: n.l }), lvl: e + 1 }) : t;
577
570
  }
578
- function zo(t) {
579
- return Nn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
571
+ function Oo(t) {
572
+ return An(t, ({ k: e, v: n }) => ({ index: e, value: n }));
580
573
  }
581
- function jn(t, e) {
574
+ function $n(t, e) {
582
575
  return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
583
576
  }
584
577
  function le(t, e) {
585
578
  return !!(t && t[0] === e[0] && t[1] === e[1]);
586
579
  }
587
- const Ke = j(
580
+ const Ue = j(
588
581
  () => ({ recalcInProgress: T(!1) }),
589
582
  [],
590
583
  { singleton: !0 }
591
584
  );
592
- function qn(t, e, n) {
585
+ function Un(t, e, n) {
593
586
  return t[Te(t, e, n)];
594
587
  }
595
588
  function Te(t, e, n, o = 0) {
@@ -610,7 +603,7 @@ function Te(t, e, n, o = 0) {
610
603
  }
611
604
  throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
612
605
  }
613
- function Fo(t, e, n, o) {
606
+ function ko(t, e, n, o) {
614
607
  const r = Te(t, e, o), s = Te(t, n, o, r);
615
608
  return t.slice(r, s + 1);
616
609
  }
@@ -620,10 +613,10 @@ function Ht(t, e) {
620
613
  function be(t) {
621
614
  return !J(t.groupOffsetTree);
622
615
  }
623
- function je({ index: t }, e) {
616
+ function Ke({ index: t }, e) {
624
617
  return e === t ? 0 : e < t ? -1 : 1;
625
618
  }
626
- function Vo() {
619
+ function Lo() {
627
620
  return {
628
621
  groupIndices: [],
629
622
  groupOffsetTree: Yt(),
@@ -634,7 +627,7 @@ function Vo() {
634
627
  sizeTree: Yt()
635
628
  };
636
629
  }
637
- function Wo(t, e) {
630
+ function zo(t, e) {
638
631
  let n = J(t) ? 0 : 1 / 0;
639
632
  for (const o of e) {
640
633
  const { endIndex: r, size: s, startIndex: i } = o;
@@ -643,28 +636,28 @@ function Wo(t, e) {
643
636
  continue;
644
637
  }
645
638
  const l = Zt(t, i - 1, r + 1);
646
- if (l.some(Do(o)))
639
+ if (l.some(Mo(o)))
647
640
  continue;
648
641
  let c = !1, d = !1;
649
642
  for (const { end: m, start: v, value: p } of l)
650
- c ? (r >= v || s === p) && (t = We(t, v)) : (d = p !== s, c = !0), m > r && r >= v && p !== s && (t = vt(t, r + 1, p));
643
+ c ? (r >= v || s === p) && (t = Ve(t, v)) : (d = p !== s, c = !0), m > r && r >= v && p !== s && (t = vt(t, r + 1, p));
651
644
  d && (t = vt(t, i, s));
652
645
  }
653
646
  return [t, n];
654
647
  }
655
- function Po(t) {
648
+ function Fo(t) {
656
649
  return t.groupIndex !== void 0;
657
650
  }
658
- function Go({ offset: t }, e) {
651
+ function Vo({ offset: t }, e) {
659
652
  return e === t ? 0 : e < t ? -1 : 1;
660
653
  }
661
654
  function ce(t, e, n) {
662
655
  if (e.length === 0)
663
656
  return 0;
664
- const { index: o, offset: r, size: s } = qn(e, t, je), i = t - o, l = s * i + (i - 1) * n + r;
657
+ const { index: o, offset: r, size: s } = Un(e, t, Ke), i = t - o, l = s * i + (i - 1) * n + r;
665
658
  return l > 0 ? l + n : l;
666
659
  }
667
- function Yn(t, e) {
660
+ function Kn(t, e) {
668
661
  if (!be(e))
669
662
  return t;
670
663
  let n = 0;
@@ -672,17 +665,17 @@ function Yn(t, e) {
672
665
  n++;
673
666
  return t + n;
674
667
  }
675
- function Zn(t, e, n) {
676
- if (Po(t))
668
+ function jn(t, e, n) {
669
+ if (Fo(t))
677
670
  return e.groupIndices[t.groupIndex] + 1;
678
671
  const o = t.index === "LAST" ? n : t.index;
679
- let r = Yn(o, e);
672
+ let r = Kn(o, e);
680
673
  return r = Math.max(0, Math.min(n, r)), r;
681
674
  }
682
- function Ao(t, e, n, o = 0) {
683
- return o > 0 && (e = Math.max(e, qn(t, o, je).offset)), Nn(Fo(t, e, n, Go), No);
675
+ function Wo(t, e, n, o = 0) {
676
+ return o > 0 && (e = Math.max(e, Un(t, o, Ke).offset)), An(ko(t, e, n, Vo), Ao);
684
677
  }
685
- function Mo(t, [e, n, o, r]) {
678
+ function Po(t, [e, n, o, r]) {
686
679
  e.length > 0 && o("received item sizes", e, ft.DEBUG);
687
680
  const s = t.sizeTree;
688
681
  let i = s, l = 0;
@@ -690,10 +683,10 @@ function Mo(t, [e, n, o, r]) {
690
683
  const p = e[0].size, I = e[1].size;
691
684
  i = n.reduce((w, R) => vt(vt(w, R, p), R + 1, I), i);
692
685
  } else
693
- [i, l] = Wo(i, e);
686
+ [i, l] = zo(i, e);
694
687
  if (i === s)
695
688
  return t;
696
- const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Ae(t.offsetTree, l, i, r);
689
+ const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Ge(t.offsetTree, l, i, r);
697
690
  return {
698
691
  groupIndices: n,
699
692
  groupOffsetTree: n.reduce((p, I) => vt(p, I, ce(I, v, r)), Yt()),
@@ -704,24 +697,24 @@ function Mo(t, [e, n, o, r]) {
704
697
  sizeTree: i
705
698
  };
706
699
  }
707
- function _o(t) {
700
+ function Go(t) {
708
701
  return Nt(t).map(({ k: e, v: n }, o, r) => {
709
702
  const s = r[o + 1];
710
703
  return { endIndex: s === void 0 ? 1 / 0 : s.k - 1, size: n, startIndex: e };
711
704
  });
712
705
  }
713
- function vn(t, e) {
706
+ function Sn(t, e) {
714
707
  let n = 0, o = 0;
715
708
  for (; n < t; )
716
709
  n += e[o + 1] - e[o] - 1, o++;
717
710
  return o - (n === t ? 0 : 1);
718
711
  }
719
- function Ae(t, e, n, o) {
712
+ function Ge(t, e, n, o) {
720
713
  let r = t, s = 0, i = 0, l = 0, c = 0;
721
714
  if (e === 0)
722
715
  r = [];
723
716
  else {
724
- c = Te(r, e - 1, je), l = r[c].offset;
717
+ c = Te(r, e - 1, Ke), l = r[c].offset;
725
718
  const m = Rt(n, e - 1);
726
719
  s = m[0], i = m[1], r.length && r[c].size === Rt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
727
720
  }
@@ -740,20 +733,20 @@ function Ae(t, e, n, o) {
740
733
  offsetTree: r
741
734
  };
742
735
  }
743
- function No(t) {
736
+ function Ao(t) {
744
737
  return { index: t.index, value: t };
745
738
  }
746
- function Do(t) {
739
+ function Mo(t) {
747
740
  const { endIndex: e, size: n, startIndex: o } = t;
748
741
  return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
749
742
  }
750
- const $o = {
743
+ const _o = {
751
744
  offsetHeight: "height",
752
745
  offsetWidth: "width"
753
- }, kt = j(
746
+ }, Lt = j(
754
747
  ([{ log: t }, { recalcInProgress: e }]) => {
755
- const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, $o[g])), w = T(void 0), R = T(0), h = Vo(), f = ht(
756
- x(n, $(c, t, R), Ot(Mo, h), nt()),
748
+ const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, _o[g])), w = T(void 0), R = T(0), h = Lo(), f = ht(
749
+ x(n, $(c, t, R), Ot(Po, h), nt()),
757
750
  h
758
751
  ), a = ht(
759
752
  x(
@@ -773,11 +766,11 @@ const $o = {
773
766
  P((u) => u.length > 0),
774
767
  $(f, R),
775
768
  B(([u, g, C]) => {
776
- const k = u.reduce((O, V, N) => vt(O, V, ce(V, g.offsetTree, C) || N), Yt());
769
+ const L = u.reduce((O, V, N) => vt(O, V, ce(V, g.offsetTree, C) || N), Yt());
777
770
  return {
778
771
  ...g,
779
772
  groupIndices: u,
780
- groupOffsetTree: k
773
+ groupOffsetTree: L
781
774
  };
782
775
  })
783
776
  ),
@@ -823,19 +816,19 @@ const $o = {
823
816
  P((u) => u !== void 0 && u.length > 0 && J(it(f).sizeTree)),
824
817
  B((u) => {
825
818
  const g = [];
826
- let C = u[0], k = 0;
819
+ let C = u[0], L = 0;
827
820
  for (let O = 1; O < u.length; O++) {
828
821
  const V = u[O];
829
822
  V !== C && (g.push({
830
823
  endIndex: O - 1,
831
824
  size: C,
832
- startIndex: k
833
- }), C = V, k = O);
825
+ startIndex: L
826
+ }), C = V, L = O);
834
827
  }
835
828
  return g.push({
836
829
  endIndex: u.length - 1,
837
830
  size: C,
838
- startIndex: k
831
+ startIndex: L
839
832
  }), g;
840
833
  })
841
834
  ),
@@ -846,20 +839,20 @@ const $o = {
846
839
  $(v, m),
847
840
  P(([, u, g]) => u !== void 0 && g !== void 0),
848
841
  B(([u, g, C]) => {
849
- const k = [];
842
+ const L = [];
850
843
  for (let O = 0; O < u.length; O++) {
851
844
  const V = u[O], N = u[O + 1];
852
- k.push({
845
+ L.push({
853
846
  startIndex: V,
854
847
  endIndex: V,
855
848
  size: g
856
- }), N !== void 0 && k.push({
849
+ }), N !== void 0 && L.push({
857
850
  startIndex: V + 1,
858
851
  endIndex: N - 1,
859
852
  size: C
860
853
  });
861
854
  }
862
- return k;
855
+ return L;
863
856
  })
864
857
  ),
865
858
  n
@@ -890,10 +883,10 @@ const $o = {
890
883
  (u) => {
891
884
  const { groupIndices: g } = it(f);
892
885
  if (u > 0)
893
- M(e, !0), M(s, u + vn(u, g));
886
+ M(e, !0), M(s, u + Sn(u, g));
894
887
  else if (u < 0) {
895
888
  const C = it(a);
896
- C.length > 0 && (u -= vn(-u, C)), M(i, u);
889
+ C.length > 0 && (u -= Sn(-u, C)), M(i, u);
897
890
  }
898
891
  }
899
892
  ), Y(x(l, $(t)), ([u, g]) => {
@@ -909,17 +902,17 @@ const $o = {
909
902
  s,
910
903
  $(f),
911
904
  B(([u, g]) => {
912
- const C = g.groupIndices.length > 0, k = [], O = g.lastSize;
905
+ const C = g.groupIndices.length > 0, L = [], O = g.lastSize;
913
906
  if (C) {
914
907
  const V = ie(g.sizeTree, 0);
915
908
  let N = 0, Z = 0;
916
909
  for (; N < u; ) {
917
910
  const q = g.groupIndices[Z], Q = g.groupIndices.length === Z + 1 ? 1 / 0 : g.groupIndices[Z + 1] - q - 1;
918
- k.push({
911
+ L.push({
919
912
  endIndex: q,
920
913
  size: V,
921
914
  startIndex: q
922
- }), k.push({
915
+ }), L.push({
923
916
  endIndex: q + 1 + Q - 1,
924
917
  size: O,
925
918
  startIndex: q + 1
@@ -945,7 +938,7 @@ const $o = {
945
938
  {
946
939
  prevIndex: u,
947
940
  prevSize: 0,
948
- ranges: k
941
+ ranges: L
949
942
  }
950
943
  ).ranges;
951
944
  }
@@ -965,13 +958,13 @@ const $o = {
965
958
  ),
966
959
  n
967
960
  );
968
- const L = Tt(
961
+ const k = Tt(
969
962
  x(
970
963
  i,
971
964
  $(f, R),
972
965
  B(([u, { offsetTree: g }, C]) => {
973
- const k = -u;
974
- return ce(k, g, C);
966
+ const L = -u;
967
+ return ce(L, g, C);
975
968
  })
976
969
  )
977
970
  );
@@ -1000,14 +993,14 @@ const $o = {
1000
993
  return {
1001
994
  ...g,
1002
995
  sizeTree: V,
1003
- ...Ae(g.offsetTree, 0, V, C)
996
+ ...Ge(g.offsetTree, 0, V, C)
1004
997
  };
1005
998
  }
1006
999
  const O = Nt(g.sizeTree).reduce((V, { k: N, v: Z }) => vt(V, Math.max(0, N + u), Z), Yt());
1007
1000
  return {
1008
1001
  ...g,
1009
1002
  sizeTree: O,
1010
- ...Ae(g.offsetTree, 0, O, C)
1003
+ ...Ge(g.offsetTree, 0, O, C)
1011
1004
  };
1012
1005
  })
1013
1006
  ),
@@ -1026,7 +1019,7 @@ const $o = {
1026
1019
  itemSize: I,
1027
1020
  listRefresh: H,
1028
1021
  shiftWith: i,
1029
- shiftWithOffset: L,
1022
+ shiftWithOffset: k,
1030
1023
  sizeRanges: n,
1031
1024
  // output
1032
1025
  sizes: f,
@@ -1036,10 +1029,10 @@ const $o = {
1036
1029
  unshiftWith: s
1037
1030
  };
1038
1031
  },
1039
- rt(Gt, Ke),
1032
+ rt(Gt, Ue),
1040
1033
  { singleton: !0 }
1041
1034
  );
1042
- function Uo(t) {
1035
+ function No(t) {
1043
1036
  return t.reduce(
1044
1037
  (e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
1045
1038
  {
@@ -1048,9 +1041,9 @@ function Uo(t) {
1048
1041
  }
1049
1042
  );
1050
1043
  }
1051
- const Xn = j(
1044
+ const qn = j(
1052
1045
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
1053
- const s = U(), i = U(), l = Tt(x(s, B(Uo)));
1046
+ const s = U(), i = U(), l = Tt(x(s, B(No)));
1054
1047
  return z(
1055
1048
  x(
1056
1049
  l,
@@ -1074,7 +1067,7 @@ const Xn = j(
1074
1067
  i
1075
1068
  ), { groupCounts: s, topItemsIndexes: i };
1076
1069
  },
1077
- rt(kt, It)
1070
+ rt(Lt, It)
1078
1071
  ), At = j(
1079
1072
  ([{ log: t }]) => {
1080
1073
  const e = T(!1), n = Tt(
@@ -1090,10 +1083,10 @@ const Xn = j(
1090
1083
  },
1091
1084
  rt(Gt),
1092
1085
  { singleton: !0 }
1093
- ), Ko = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1094
- function Jn(t) {
1086
+ ), Do = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1087
+ function Yn(t) {
1095
1088
  const e = typeof t == "number" ? { index: t } : { ...t };
1096
- return e.align || (e.align = "start"), (!e.behavior || !Ko) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
1089
+ return e.align || (e.align = "start"), (!e.behavior || !Do) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
1097
1090
  }
1098
1091
  const fe = j(
1099
1092
  ([
@@ -1122,14 +1115,14 @@ const fe = j(
1122
1115
  $(t, s, r),
1123
1116
  B(
1124
1117
  ([
1125
- [H, y, L, u, g, C, k, O],
1118
+ [H, y, k, u, g, C, L, O],
1126
1119
  V,
1127
1120
  N,
1128
1121
  Z
1129
1122
  ]) => {
1130
- const F = Jn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, lt = Zn(F, y, gt);
1123
+ const F = Yn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, lt = jn(F, y, gt);
1131
1124
  let St = ce(lt, y.offsetTree, V) + C;
1132
- mt === "end" ? (St += N + Rt(y.sizeTree, lt)[1] - L + Z, lt === gt && (St += k)) : mt === "center" ? St += (N + Rt(y.sizeTree, lt)[1] - L + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
1125
+ mt === "end" ? (St += N + Rt(y.sizeTree, lt)[1] - k + Z, lt === gt && (St += L)) : mt === "center" ? St += (N + Rt(y.sizeTree, lt)[1] - k + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
1133
1126
  const Ft = (pt) => {
1134
1127
  S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG), M(I, H)) : (M(w, !0), O("list did not change, scroll successful", {}, ft.DEBUG));
1135
1128
  };
@@ -1141,7 +1134,7 @@ const fe = j(
1141
1134
  Ft(pt);
1142
1135
  });
1143
1136
  } else
1144
- h = yt(x(e, jo(150)), Ft);
1137
+ h = yt(x(e, $o(150)), Ft);
1145
1138
  return f = setTimeout(() => {
1146
1139
  S();
1147
1140
  }, 1200), M(c, !0), O("scrolling from index to", { behavior: q, index: lt, top: St }, ft.DEBUG), { behavior: q, top: St };
@@ -1155,10 +1148,10 @@ const fe = j(
1155
1148
  topListHeight: R
1156
1149
  };
1157
1150
  },
1158
- rt(kt, It, Gt),
1151
+ rt(Lt, It, Gt),
1159
1152
  { singleton: !0 }
1160
1153
  );
1161
- function jo(t) {
1154
+ function $o(t) {
1162
1155
  return (e) => {
1163
1156
  const n = setTimeout(() => {
1164
1157
  e(!1);
@@ -1168,18 +1161,18 @@ function jo(t) {
1168
1161
  };
1169
1162
  };
1170
1163
  }
1171
- function qe(t, e) {
1164
+ function je(t, e) {
1172
1165
  t === 0 ? e() : requestAnimationFrame(() => {
1173
- qe(t - 1, e);
1166
+ je(t - 1, e);
1174
1167
  });
1175
1168
  }
1176
- function Ye(t, e) {
1169
+ function qe(t, e) {
1177
1170
  if (t === void 0)
1178
1171
  return 0;
1179
1172
  const n = e - 1, o = typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
1180
1173
  return Math.max(0, Math.min(o, n));
1181
1174
  }
1182
- function Me(t) {
1175
+ function Ae(t) {
1183
1176
  return t === void 0 ? !0 : typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
1184
1177
  }
1185
1178
  const me = j(
@@ -1189,7 +1182,7 @@ const me = j(
1189
1182
  x(
1190
1183
  i,
1191
1184
  $(c),
1192
- P(([m, v]) => !Me(v)),
1185
+ P(([m, v]) => !Ae(v)),
1193
1186
  Bt(!1)
1194
1187
  ),
1195
1188
  l
@@ -1197,7 +1190,7 @@ const me = j(
1197
1190
  x(
1198
1191
  i,
1199
1192
  $(c),
1200
- P(([m, v]) => !Me(v)),
1193
+ P(([m, v]) => !Ae(v)),
1201
1194
  Bt(!1)
1202
1195
  ),
1203
1196
  d
@@ -1205,7 +1198,7 @@ const me = j(
1205
1198
  x(
1206
1199
  at(e, i),
1207
1200
  $(l, n, t, d),
1208
- P(([[, m], v, { sizeTree: p }, I, w]) => m && (!J(p) || Ne(I)) && !v && !w),
1201
+ P(([[, m], v, { sizeTree: p }, I, w]) => m && (!J(p) || _e(I)) && !v && !w),
1209
1202
  $(c)
1210
1203
  ),
1211
1204
  ([, m]) => {
@@ -1215,7 +1208,7 @@ const me = j(
1215
1208
  }
1216
1209
  yt(r, () => {
1217
1210
  M(d, !0);
1218
- }), qe(4, () => {
1211
+ }), je(4, () => {
1219
1212
  yt(o, () => {
1220
1213
  M(l, !0);
1221
1214
  }), M(s, m);
@@ -1227,13 +1220,13 @@ const me = j(
1227
1220
  scrolledToInitialItem: l
1228
1221
  };
1229
1222
  },
1230
- rt(kt, It, fe, At),
1223
+ rt(Lt, It, fe, At),
1231
1224
  { singleton: !0 }
1232
1225
  );
1233
- function Qn(t, e) {
1226
+ function Zn(t, e) {
1234
1227
  return Math.abs(t - e) < 1.01;
1235
1228
  }
1236
- const ue = "up", ne = "down", qo = "none", Yo = {
1229
+ const ue = "up", ne = "down", Uo = "none", Ko = {
1237
1230
  atBottom: !1,
1238
1231
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
1239
1232
  state: {
@@ -1242,15 +1235,15 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1242
1235
  scrollTop: 0,
1243
1236
  viewportHeight: 0
1244
1237
  }
1245
- }, Zo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1246
- const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(Zo), p = ht(
1238
+ }, jo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1239
+ const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(jo), p = ht(
1247
1240
  x(
1248
- Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1), hn(100))),
1241
+ Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1), pn(100))),
1249
1242
  nt()
1250
1243
  ),
1251
1244
  !1
1252
1245
  ), I = ht(
1253
- x(Fe(x(n, Bt(!0)), x(n, Bt(!1), hn(200))), nt()),
1246
+ x(Fe(x(n, Bt(!0)), x(n, Bt(!1), pn(200))), nt()),
1254
1247
  !1
1255
1248
  );
1256
1249
  z(
@@ -1264,8 +1257,8 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1264
1257
  const w = Tt(
1265
1258
  x(
1266
1259
  at(o, W(s), W(e), W(t), W(m)),
1267
- Ot((a, [{ scrollHeight: S, scrollTop: H }, y, L, u, g]) => {
1268
- const C = H + y - S > -g, k = {
1260
+ Ot((a, [{ scrollHeight: S, scrollTop: H }, y, k, u, g]) => {
1261
+ const C = H + y - S > -g, L = {
1269
1262
  scrollHeight: S,
1270
1263
  scrollTop: H,
1271
1264
  viewportHeight: y
@@ -1276,16 +1269,16 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1276
1269
  atBottom: !0,
1277
1270
  atBottomBecause: V,
1278
1271
  scrollTopDelta: N,
1279
- state: k
1272
+ state: L
1280
1273
  };
1281
1274
  }
1282
1275
  let O;
1283
- return k.scrollHeight > a.state.scrollHeight ? O = "SIZE_INCREASED" : y < a.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : H < a.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1276
+ return L.scrollHeight > a.state.scrollHeight ? O = "SIZE_INCREASED" : y < a.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : H < a.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1284
1277
  atBottom: !1,
1285
1278
  notAtBottomBecause: O,
1286
- state: k
1279
+ state: L
1287
1280
  };
1288
- }, Yo),
1281
+ }, Ko),
1289
1282
  nt((a, S) => a !== void 0 && a.atBottom === S.atBottom)
1290
1283
  )
1291
1284
  ), R = ht(
@@ -1293,9 +1286,9 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1293
1286
  o,
1294
1287
  Ot(
1295
1288
  (a, { scrollHeight: S, scrollTop: H, viewportHeight: y }) => {
1296
- if (!Qn(a.scrollHeight, S)) {
1297
- const L = S - (H + y) < 1;
1298
- return a.scrollTop !== H && L ? {
1289
+ if (!Zn(a.scrollHeight, S)) {
1290
+ const k = S - (H + y) < 1;
1291
+ return a.scrollTop !== H && k ? {
1299
1292
  changed: !0,
1300
1293
  jump: a.scrollTop - H,
1301
1294
  scrollHeight: S,
@@ -1341,7 +1334,7 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1341
1334
  B((a) => a.direction)
1342
1335
  ),
1343
1336
  h
1344
- ), z(x(o, zt(50), Bt(qo)), h);
1337
+ ), z(x(o, zt(50), Bt(Uo)), h);
1345
1338
  const f = T(0);
1346
1339
  return z(
1347
1340
  x(
@@ -1373,14 +1366,14 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1373
1366
  scrollDirection: h,
1374
1367
  scrollVelocity: f
1375
1368
  };
1376
- }, rt(It)), ae = "top", de = "bottom", Tn = "none";
1377
- function Cn(t, e, n) {
1369
+ }, rt(It)), ae = "top", de = "bottom", xn = "none";
1370
+ function vn(t, e, n) {
1378
1371
  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;
1379
1372
  }
1380
- function wn(t, e) {
1373
+ function Tn(t, e) {
1381
1374
  return typeof t == "number" ? t : t[e] ?? 0;
1382
1375
  }
1383
- const Ze = j(
1376
+ const Ye = j(
1384
1377
  ([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
1385
1378
  const s = U(), i = T(0), l = T(0), c = T(0), d = ht(
1386
1379
  x(
@@ -1407,12 +1400,12 @@ const Ze = j(
1407
1400
  a,
1408
1401
  S
1409
1402
  ]) => {
1410
- const H = m - a, y = h + f, L = Math.max(p - H, 0);
1411
- let u = Tn;
1412
- const g = wn(S, ae), C = wn(S, de);
1413
- return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - L + v + C && (u = ne), u !== Tn ? [
1414
- Math.max(H - p - Cn(R, ae, u) - g, 0),
1415
- H - L - f + v + Cn(R, de, u) + C
1403
+ const H = m - a, y = h + f, k = Math.max(p - H, 0);
1404
+ let u = xn;
1405
+ const g = Tn(S, ae), C = Tn(S, de);
1406
+ return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - k + v + C && (u = ne), u !== xn ? [
1407
+ Math.max(H - p - vn(R, ae, u) - g, 0),
1408
+ H - k - f + v + vn(R, de, u) + C
1416
1409
  ] : null;
1417
1410
  }
1418
1411
  ),
@@ -1434,9 +1427,9 @@ const Ze = j(
1434
1427
  rt(It),
1435
1428
  { singleton: !0 }
1436
1429
  );
1437
- function Xo(t, e, n) {
1430
+ function qo(t, e, n) {
1438
1431
  if (be(e)) {
1439
- const o = Yn(t, e);
1432
+ const o = Kn(t, e);
1440
1433
  return [
1441
1434
  { index: Rt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1442
1435
  { data: n?.[0], index: o, offset: 0, size: 0 }
@@ -1467,16 +1460,16 @@ function ve(t, e, n, o, r, s) {
1467
1460
  return {
1468
1461
  bottom: m,
1469
1462
  firstItemIndex: s,
1470
- items: yn(t, r, s),
1463
+ items: Cn(t, r, s),
1471
1464
  offsetBottom: w,
1472
1465
  offsetTop: d,
1473
1466
  top: I,
1474
- topItems: yn(e, r, s),
1467
+ topItems: Cn(e, r, s),
1475
1468
  topListHeight: e.reduce((R, h) => h.size + R, 0),
1476
1469
  totalCount: n
1477
1470
  };
1478
1471
  }
1479
- function to(t, e, n, o, r, s) {
1472
+ function Xn(t, e, n, o, r, s) {
1480
1473
  let i = 0;
1481
1474
  if (n.groupIndices.length > 0)
1482
1475
  for (const m of n.groupIndices) {
@@ -1484,7 +1477,7 @@ function to(t, e, n, o, r, s) {
1484
1477
  break;
1485
1478
  i++;
1486
1479
  }
1487
- const l = t + i, c = Ye(e, l), d = Array.from({ length: l }).map((m, v) => ({
1480
+ const l = t + i, c = qe(e, l), d = Array.from({ length: l }).map((m, v) => ({
1488
1481
  data: s[v + c],
1489
1482
  index: v + c,
1490
1483
  offset: 0,
@@ -1492,7 +1485,7 @@ function to(t, e, n, o, r, s) {
1492
1485
  }));
1493
1486
  return ve(d, [], l, r, n, o);
1494
1487
  }
1495
- function yn(t, e, n) {
1488
+ function Cn(t, e, n) {
1496
1489
  if (t.length === 0)
1497
1490
  return [];
1498
1491
  if (!be(e))
@@ -1518,7 +1511,7 @@ function yn(t, e, n) {
1518
1511
  }
1519
1512
  return s;
1520
1513
  }
1521
- function bn(t, e) {
1514
+ function wn(t, e) {
1522
1515
  return t === void 0 ? 0 : typeof t == "number" ? t : t[e] ?? 0;
1523
1516
  }
1524
1517
  const Kt = j(
@@ -1550,8 +1543,8 @@ const Kt = j(
1550
1543
  W(a),
1551
1544
  t
1552
1545
  ),
1553
- P(([u, g, , C, , , , , , , , k]) => {
1554
- const O = k !== void 0 && k.length !== C;
1546
+ P(([u, g, , C, , , , , , , , L]) => {
1547
+ const O = L !== void 0 && L.length !== C;
1555
1548
  return u && !g && !O;
1556
1549
  }),
1557
1550
  B(
@@ -1560,7 +1553,7 @@ const Kt = j(
1560
1553
  ,
1561
1554
  [u, g],
1562
1555
  C,
1563
- k,
1556
+ L,
1564
1557
  O,
1565
1558
  V,
1566
1559
  N,
@@ -1569,14 +1562,14 @@ const Kt = j(
1569
1562
  mt,
1570
1563
  q
1571
1564
  ]) => {
1572
- const Q = k, { offsetTree: gt, sizeTree: lt } = Q, St = it(h);
1565
+ const Q = L, { offsetTree: gt, sizeTree: lt } = Q, St = it(h);
1573
1566
  if (C === 0)
1574
1567
  return { ...Oe, totalCount: C };
1575
1568
  if (u === 0 && g === 0)
1576
- return St === 0 ? { ...Oe, totalCount: C } : to(St, O, k, Z, F, q || []);
1569
+ return St === 0 ? { ...Oe, totalCount: C } : Xn(St, O, L, Z, F, q || []);
1577
1570
  if (J(lt))
1578
1571
  return St > 0 ? null : ve(
1579
- Xo(Ye(O, C), Q, q),
1572
+ qo(qe(O, C), Q, q),
1580
1573
  [],
1581
1574
  C,
1582
1575
  F,
@@ -1595,7 +1588,7 @@ const Kt = j(
1595
1588
  }
1596
1589
  if (!V)
1597
1590
  return ve([], Ft, C, F, Q, Z);
1598
- const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Ao(gt, u, g, pt);
1591
+ const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Wo(gt, u, g, pt);
1599
1592
  if (jt.length === 0)
1600
1593
  return null;
1601
1594
  const Qt = C - 1, Et = ye([], (D) => {
@@ -1613,7 +1606,7 @@ const Kt = j(
1613
1606
  for (let ut = X; ut <= xt && !(tt >= g); ut++)
1614
1607
  D.push({ data: q?.[ut], index: ut, offset: tt, size: ct }), tt += ct + F;
1615
1608
  }
1616
- }), te = bn(mt, ae), b = bn(mt, de);
1609
+ }), te = wn(mt, ae), b = wn(mt, de);
1617
1610
  if (Et.length > 0 && (te > 0 || b > 0)) {
1618
1611
  const D = Et[0], K = Et[Et.length - 1];
1619
1612
  if (te > 0 && D.index > pt) {
@@ -1646,7 +1639,7 @@ const Kt = j(
1646
1639
  z(
1647
1640
  x(
1648
1641
  t,
1649
- P(Ne),
1642
+ P(_e),
1650
1643
  B((u) => u?.length)
1651
1644
  ),
1652
1645
  r
@@ -1687,7 +1680,7 @@ const Kt = j(
1687
1680
  B(({ items: u }) => u[0].index),
1688
1681
  nt()
1689
1682
  )
1690
- ), L = Tt(
1683
+ ), k = Tt(
1691
1684
  x(
1692
1685
  S,
1693
1686
  P(({ items: u }) => u.length > 0),
@@ -1703,7 +1696,7 @@ const Kt = j(
1703
1696
  startIndex: u[g].index
1704
1697
  };
1705
1698
  }),
1706
- nt(jn)
1699
+ nt($n)
1707
1700
  )
1708
1701
  );
1709
1702
  return {
@@ -1712,24 +1705,24 @@ const Kt = j(
1712
1705
  itemsRendered: f,
1713
1706
  listState: S,
1714
1707
  minOverscanItemCount: a,
1715
- rangeChanged: L,
1708
+ rangeChanged: k,
1716
1709
  startReached: y,
1717
1710
  topItemsIndexes: R,
1718
1711
  ...p
1719
1712
  };
1720
1713
  },
1721
1714
  rt(
1722
- kt,
1723
- Xn,
1724
- Ze,
1715
+ Lt,
1716
+ qn,
1717
+ Ye,
1725
1718
  me,
1726
1719
  fe,
1727
1720
  pe,
1728
1721
  At,
1729
- Ke
1722
+ Ue
1730
1723
  ),
1731
1724
  { singleton: !0 }
1732
- ), eo = j(
1725
+ ), Jn = j(
1733
1726
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1734
1727
  const s = U(), i = ht(
1735
1728
  x(
@@ -1742,7 +1735,7 @@ const Kt = j(
1742
1735
  },
1743
1736
  rt(It, Kt),
1744
1737
  { singleton: !0 }
1745
- ), Jo = j(
1738
+ ), Yo = j(
1746
1739
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1747
1740
  const n = T(!1), o = ht(
1748
1741
  x(
@@ -1756,17 +1749,17 @@ const Kt = j(
1756
1749
  );
1757
1750
  return { alignToBottom: n, paddingTopAddition: o };
1758
1751
  },
1759
- rt(It, eo),
1752
+ rt(It, Jn),
1760
1753
  { singleton: !0 }
1761
- ), no = j(() => ({
1754
+ ), Qn = j(() => ({
1762
1755
  context: T(null)
1763
- })), Qo = ({
1756
+ })), Zo = ({
1764
1757
  itemBottom: t,
1765
1758
  itemTop: e,
1766
1759
  locationParams: { align: n, behavior: o, ...r },
1767
1760
  viewportBottom: s,
1768
1761
  viewportTop: i
1769
- }) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, oo = j(
1762
+ }) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, to = j(
1770
1763
  ([
1771
1764
  { gap: t, sizes: e, totalCount: n },
1772
1765
  { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
@@ -1779,12 +1772,12 @@ const Kt = j(
1779
1772
  $(e, c, n, s, r, o, l),
1780
1773
  $(t),
1781
1774
  B(([[v, p, I, w, R, h, f, a], S]) => {
1782
- const { calculateViewLocation: H = Qo, done: y, ...L } = v, u = Zn(v, p, w - 1), g = ce(u, p.offsetTree, S) + R + h, C = g + Rt(p.sizeTree, u)[1], k = a + h, O = a + I - f, V = H({
1775
+ const { calculateViewLocation: H = Zo, done: y, ...k } = v, u = jn(v, p, w - 1), g = ce(u, p.offsetTree, S) + R + h, C = g + Rt(p.sizeTree, u)[1], L = a + h, O = a + I - f, V = H({
1783
1776
  itemBottom: C,
1784
1777
  itemTop: g,
1785
- locationParams: L,
1778
+ locationParams: k,
1786
1779
  viewportBottom: O,
1787
- viewportTop: k
1780
+ viewportTop: L
1788
1781
  });
1789
1782
  return V === null ? y?.() : y && yt(
1790
1783
  x(
@@ -1804,13 +1797,13 @@ const Kt = j(
1804
1797
  scrollIntoView: m
1805
1798
  };
1806
1799
  },
1807
- rt(kt, It, fe, Kt, Gt),
1800
+ rt(Lt, It, fe, Kt, Gt),
1808
1801
  { singleton: !0 }
1809
1802
  );
1810
- function Rn(t) {
1803
+ function yn(t) {
1811
1804
  return t === !1 ? !1 : t === "smooth" ? "smooth" : "auto";
1812
1805
  }
1813
- const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1806
+ const Xo = (t, e) => typeof t == "function" ? yn(t(e)) : e && yn(t), Jo = j(
1814
1807
  ([
1815
1808
  { listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
1816
1809
  { atBottomState: r, isAtBottom: s },
@@ -1835,32 +1828,32 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1835
1828
  x(
1836
1829
  at(x(W(e), Ut(1)), c),
1837
1830
  $(W(w), s, l, v),
1838
- B(([[y, L], u, g, C, k]) => {
1839
- let O = L && C, V = "auto";
1840
- return O && (V = tr(u, g || k), O = O && V !== !1), { followOutputBehavior: V, shouldFollow: O, totalCount: y };
1831
+ B(([[y, k], u, g, C, L]) => {
1832
+ let O = k && C, V = "auto";
1833
+ return O && (V = Xo(u, g || L), O = O && V !== !1), { followOutputBehavior: V, shouldFollow: O, totalCount: y };
1841
1834
  }),
1842
1835
  P(({ shouldFollow: y }) => y)
1843
1836
  ),
1844
- ({ followOutputBehavior: y, totalCount: L }) => {
1837
+ ({ followOutputBehavior: y, totalCount: k }) => {
1845
1838
  h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
1846
- it(m)("following output to ", { totalCount: L }, ft.DEBUG), f(y), h = null;
1839
+ it(m)("following output to ", { totalCount: k }, ft.DEBUG), f(y), h = null;
1847
1840
  }) : requestAnimationFrame(() => {
1848
- it(m)("following output to ", { totalCount: L }, ft.DEBUG), f(y);
1841
+ it(m)("following output to ", { totalCount: k }, ft.DEBUG), f(y);
1849
1842
  });
1850
1843
  }
1851
1844
  );
1852
1845
  function a(y) {
1853
- const L = yt(r, (u) => {
1846
+ const k = yt(r, (u) => {
1854
1847
  y && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && h === null && (it(m)("scrolling to bottom due to increased size", {}, ft.DEBUG), f("auto"));
1855
1848
  });
1856
- setTimeout(L, 100);
1849
+ setTimeout(k, 100);
1857
1850
  }
1858
1851
  Y(
1859
1852
  x(
1860
1853
  at(W(w), e, d),
1861
- P(([y, , L]) => y !== !1 && L),
1854
+ P(([y, , k]) => y !== !1 && k),
1862
1855
  Ot(
1863
- ({ value: y }, [, L]) => ({ refreshed: y === L, value: L }),
1856
+ ({ value: y }, [, k]) => ({ refreshed: y === k, value: k }),
1864
1857
  { refreshed: !1, value: 0 }
1865
1858
  ),
1866
1859
  P(({ refreshed: y }) => y),
@@ -1871,8 +1864,8 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1871
1864
  }
1872
1865
  ), Y(R, () => {
1873
1866
  a(it(w) !== !1);
1874
- }), Y(at(W(w), r), ([y, L]) => {
1875
- y !== !1 && !L.atBottom && L.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
1867
+ }), Y(at(W(w), r), ([y, k]) => {
1868
+ y !== !1 && !k.atBottom && k.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
1876
1869
  });
1877
1870
  const S = T(null), H = U();
1878
1871
  return z(
@@ -1888,7 +1881,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1888
1881
  x(
1889
1882
  at(x(H, Ut(1)), c),
1890
1883
  $(W(S), l, v, p),
1891
- B(([[y, L], u, g, C, k]) => L && g && u?.({ context: k, totalCount: y, scrollingInProgress: C })),
1884
+ B(([[y, k], u, g, C, L]) => k && g && u?.({ context: L, totalCount: y, scrollingInProgress: C })),
1892
1885
  P((y) => !!y),
1893
1886
  zt(0)
1894
1887
  ),
@@ -1902,30 +1895,30 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1902
1895
  ), { autoscrollToBottom: R, followOutput: w, scrollIntoViewOnChange: S };
1903
1896
  },
1904
1897
  rt(
1905
- kt,
1898
+ Lt,
1906
1899
  pe,
1907
1900
  fe,
1908
1901
  me,
1909
1902
  At,
1910
1903
  Gt,
1911
1904
  It,
1912
- no,
1913
- oo
1905
+ Qn,
1906
+ to
1914
1907
  )
1915
- ), nr = j(
1908
+ ), Qo = j(
1916
1909
  ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (z(
1917
1910
  x(
1918
1911
  l,
1919
1912
  $(s),
1920
1913
  P(([, c]) => c !== 0),
1921
1914
  $(r, o, e, n, t),
1922
- B(([[, c], d, m, v, p, I = []]) => to(c, d, m, v, p, I))
1915
+ B(([[, c], d, m, v, p, I = []]) => Xn(c, d, m, v, p, I))
1923
1916
  ),
1924
1917
  i
1925
1918
  ), {}),
1926
- rt(kt, me, Kt, At),
1919
+ rt(Lt, me, Kt, At),
1927
1920
  { singleton: !0 }
1928
- ), or = j(
1921
+ ), tr = j(
1929
1922
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1930
1923
  const o = T(0);
1931
1924
  return Y(
@@ -1955,7 +1948,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1955
1948
  },
1956
1949
  rt(At, It, Kt),
1957
1950
  { singleton: !0 }
1958
- ), ro = j(
1951
+ ), eo = j(
1959
1952
  ([{ scrollVelocity: t }]) => {
1960
1953
  const e = T(!1), n = U(), o = T(!1);
1961
1954
  return z(
@@ -1984,7 +1977,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1984
1977
  },
1985
1978
  rt(pe),
1986
1979
  { singleton: !0 }
1987
- ), Xe = j(([{ scrollContainerState: t, scrollTo: e }]) => {
1980
+ ), Ze = j(([{ scrollContainerState: t, scrollTo: e }]) => {
1988
1981
  const n = U(), o = U(), r = U(), s = T(!1), i = T(void 0);
1989
1982
  return z(
1990
1983
  x(
@@ -2016,7 +2009,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
2016
2009
  windowScrollTo: r,
2017
2010
  windowViewportRect: o
2018
2011
  };
2019
- }, rt(It)), rr = j(
2012
+ }, rt(It)), er = j(
2020
2013
  ([
2021
2014
  { sizeRanges: t, sizes: e },
2022
2015
  { headerHeight: n, scrollTop: o },
@@ -2031,10 +2024,10 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
2031
2024
  $(e, o, i, v, p, n)
2032
2025
  ),
2033
2026
  ([I, w, R, h, f, a, S]) => {
2034
- const H = _o(w.sizeTree);
2027
+ const H = Go(w.sizeTree);
2035
2028
  h && f !== null && a !== null && (R = f.scrollTop - a.offsetTop), R -= S, I({ ranges: H, scrollTop: R });
2036
2029
  }
2037
- ), z(x(m, P(Ne), B(sr)), r), z(
2030
+ ), z(x(m, P(_e), B(nr)), r), z(
2038
2031
  x(
2039
2032
  s,
2040
2033
  $(m),
@@ -2048,12 +2041,12 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
2048
2041
  restoreStateFrom: m
2049
2042
  };
2050
2043
  },
2051
- rt(kt, It, me, At, Xe)
2044
+ rt(Lt, It, me, At, Ze)
2052
2045
  );
2053
- function sr(t) {
2046
+ function nr(t) {
2054
2047
  return { align: "start", index: 0, offset: t.scrollTop };
2055
2048
  }
2056
- const ir = j(([{ topItemsIndexes: t }]) => {
2049
+ const or = j(([{ topItemsIndexes: t }]) => {
2057
2050
  const e = T(0);
2058
2051
  return z(
2059
2052
  x(
@@ -2064,11 +2057,11 @@ const ir = j(([{ topItemsIndexes: t }]) => {
2064
2057
  t
2065
2058
  ), { topItemCount: e };
2066
2059
  }, rt(Kt));
2067
- function so(t) {
2060
+ function no(t) {
2068
2061
  let e = !1, n;
2069
2062
  return (() => (e || (e = !0, n = t()), n));
2070
2063
  }
2071
- const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), cr = j(
2064
+ const rr = no(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), sr = j(
2072
2065
  ([
2073
2066
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
2074
2067
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
@@ -2082,10 +2075,10 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2082
2075
  c,
2083
2076
  $(i),
2084
2077
  Ot(
2085
- ([, f, a, S], [{ bottom: H, items: y, offsetBottom: L, totalCount: u }, g]) => {
2086
- const C = H + L;
2087
- let k = 0;
2088
- return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (k = C - S, k !== 0 && (k += g))), [k, y, u, C];
2078
+ ([, f, a, S], [{ bottom: H, items: y, offsetBottom: k, totalCount: u }, g]) => {
2079
+ const C = H + k;
2080
+ let L = 0;
2081
+ return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (L = C - S, L !== 0 && (L += g))), [L, y, u, C];
2089
2082
  },
2090
2083
  [0, [], 0, 0]
2091
2084
  ),
@@ -2099,7 +2092,7 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2099
2092
  f > 0 ? (M(e, { behavior: "auto", top: -f }), M(t, 0)) : (M(t, 0), M(e, { behavior: "auto", top: -f }));
2100
2093
  }
2101
2094
  return Y(x(R, $(t, s)), ([f, a, S]) => {
2102
- S && lr() ? M(t, a - f) : h(-f);
2095
+ S && rr() ? M(t, a - f) : h(-f);
2103
2096
  }), Y(
2104
2097
  x(
2105
2098
  at(ht(s, !1), t, w),
@@ -2119,18 +2112,18 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2119
2112
  d,
2120
2113
  $(p, m),
2121
2114
  B(([f, { groupIndices: a, lastSize: S, sizeTree: H }, y]) => {
2122
- function L(O) {
2115
+ function k(O) {
2123
2116
  return O * (S + y);
2124
2117
  }
2125
2118
  if (a.length === 0)
2126
- return L(f);
2119
+ return k(f);
2127
2120
  let u = 0;
2128
2121
  const g = ie(H, 0);
2129
- let C = 0, k = 0;
2122
+ let C = 0, L = 0;
2130
2123
  for (; C < f; ) {
2131
2124
  C++, u += g;
2132
- let O = a.length === k + 1 ? 1 / 0 : a[k + 1] - a[k] - 1;
2133
- C + O > f && (u -= g, O = f - C + 1), C += O, u += L(O), k++;
2125
+ let O = a.length === L + 1 ? 1 / 0 : a[L + 1] - a[L] - 1;
2126
+ C + O > f && (u -= g, O = f - C + 1), C += O, u += k(O), L++;
2134
2127
  }
2135
2128
  return u;
2136
2129
  })
@@ -2144,8 +2137,8 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2144
2137
  }
2145
2138
  ), { deviation: t };
2146
2139
  },
2147
- rt(It, pe, Kt, kt, Gt, Ke)
2148
- ), ur = j(
2140
+ rt(It, pe, Kt, Lt, Gt, Ue)
2141
+ ), ir = j(
2149
2142
  ([
2150
2143
  t,
2151
2144
  e,
@@ -2172,19 +2165,19 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2172
2165
  ...m
2173
2166
  }),
2174
2167
  rt(
2175
- Ze,
2176
- nr,
2168
+ Ye,
2169
+ Qo,
2177
2170
  At,
2178
- ro,
2179
2171
  eo,
2180
- or,
2181
- Jo,
2182
- Xe,
2183
- oo,
2172
+ Jn,
2173
+ tr,
2174
+ Yo,
2175
+ Ze,
2176
+ to,
2184
2177
  Gt,
2185
- no
2178
+ Qn
2186
2179
  )
2187
- ), io = j(
2180
+ ), oo = j(
2188
2181
  ([
2189
2182
  {
2190
2183
  data: t,
@@ -2208,12 +2201,12 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2208
2201
  S,
2209
2202
  H,
2210
2203
  { scrollToIndex: y },
2211
- L,
2204
+ k,
2212
2205
  { topItemCount: u },
2213
2206
  { groupCounts: g },
2214
2207
  C
2215
2208
  ]) => {
2216
- const { listState: k, minOverscanItemCount: O, topItemsIndexes: V, rangeChanged: N, ...Z } = H;
2209
+ const { listState: L, minOverscanItemCount: O, topItemsIndexes: V, rangeChanged: N, ...Z } = H;
2217
2210
  return z(N, C.scrollSeekRangeChanged), z(
2218
2211
  x(
2219
2212
  C.windowViewportRect,
@@ -2240,7 +2233,7 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2240
2233
  ...S,
2241
2234
  groupIndices: i,
2242
2235
  itemSize: c,
2243
- listState: k,
2236
+ listState: L,
2244
2237
  minOverscanItemCount: O,
2245
2238
  scrollToIndex: y,
2246
2239
  // output
@@ -2257,20 +2250,20 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2257
2250
  };
2258
2251
  },
2259
2252
  rt(
2260
- kt,
2253
+ Lt,
2261
2254
  me,
2262
2255
  It,
2263
- rr,
2264
2256
  er,
2257
+ Jo,
2265
2258
  Kt,
2266
2259
  fe,
2267
- cr,
2268
- ir,
2269
- Xn,
2270
- ur
2260
+ sr,
2261
+ or,
2262
+ qn,
2263
+ ir
2271
2264
  )
2272
2265
  );
2273
- function ar(t, e) {
2266
+ function lr(t, e) {
2274
2267
  const n = {}, o = {};
2275
2268
  let r = 0;
2276
2269
  const s = t.length;
@@ -2281,7 +2274,7 @@ function ar(t, e) {
2281
2274
  return n;
2282
2275
  }
2283
2276
  const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2284
- function Je(t, e, n) {
2277
+ function Xe(t, e, n) {
2285
2278
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
2286
2279
  function c(f, a) {
2287
2280
  f.propsReady !== void 0 && M(f.propsReady, !1);
@@ -2303,23 +2296,23 @@ function Je(t, e, n) {
2303
2296
  }, a), {});
2304
2297
  }
2305
2298
  function m(f) {
2306
- return i.reduce((a, S) => (a[S] = bo(f[e.events[S]]), a), {});
2299
+ return i.reduce((a, S) => (a[S] = Co(f[e.events[S]]), a), {});
2307
2300
  }
2308
2301
  const v = E.forwardRef(function(a, S) {
2309
- const { children: H, ...y } = a, [L] = E.useState(() => ye(Eo(t), (C) => {
2302
+ const { children: H, ...y } = a, [k] = E.useState(() => ye(bo(t), (C) => {
2310
2303
  c(C, y);
2311
- })), [u] = E.useState(pn(m, L));
2304
+ })), [u] = E.useState(mn(m, k));
2312
2305
  Ie(() => {
2313
2306
  for (const C of i)
2314
2307
  C in y && Y(u[C], y[C]);
2315
2308
  return () => {
2316
- Object.values(u).map(De);
2309
+ Object.values(u).map(Ne);
2317
2310
  };
2318
- }, [y, u, L]), Ie(() => {
2319
- c(L, y);
2320
- }), E.useImperativeHandle(S, mn(d(L)));
2311
+ }, [y, u, k]), Ie(() => {
2312
+ c(k, y);
2313
+ }), E.useImperativeHandle(S, fn(d(k)));
2321
2314
  const g = n;
2322
- return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...ar([...o, ...r, ...i], y), children: H }) });
2315
+ return /* @__PURE__ */ G(l.Provider, { value: k, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...lr([...o, ...r, ...i], y), children: H }) });
2323
2316
  }), p = (f) => {
2324
2317
  const a = E.useContext(l);
2325
2318
  return E.useCallback(
@@ -2339,10 +2332,10 @@ function Je(t, e, n) {
2339
2332
  () => it(S)
2340
2333
  );
2341
2334
  }, w = (f) => {
2342
- const S = E.useContext(l)[f], [H, y] = E.useState(pn(it, S));
2335
+ const S = E.useContext(l)[f], [H, y] = E.useState(mn(it, S));
2343
2336
  return Ie(
2344
- () => Y(S, (L) => {
2345
- L !== H && y(mn(L));
2337
+ () => Y(S, (k) => {
2338
+ k !== H && y(fn(k));
2346
2339
  }),
2347
2340
  [S, H]
2348
2341
  ), H;
@@ -2357,25 +2350,25 @@ function Je(t, e, n) {
2357
2350
  usePublisher: p
2358
2351
  };
2359
2352
  }
2360
- const Re = E.createContext(void 0), lo = E.createContext(void 0), Le = "-webkit-sticky", Hn = "sticky", Qe = so(() => {
2353
+ const Re = E.createContext(void 0), ro = E.createContext(void 0), ke = "-webkit-sticky", bn = "sticky", Je = no(() => {
2361
2354
  if (typeof document > "u")
2362
- return Hn;
2355
+ return bn;
2363
2356
  const t = document.createElement("div");
2364
- return t.style.position = Le, t.style.position === Le ? Le : Hn;
2365
- }), co = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2366
- function ke(t) {
2357
+ return t.style.position = ke, t.style.position === ke ? ke : bn;
2358
+ }), so = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2359
+ function Le(t) {
2367
2360
  return "self" in t;
2368
2361
  }
2369
- function dr(t) {
2362
+ function cr(t) {
2370
2363
  return "body" in t;
2371
2364
  }
2372
- function uo(t, e, n, o = Jt, r, s) {
2365
+ function io(t, e, n, o = Jt, r, s) {
2373
2366
  const i = E.useRef(null), l = E.useRef(null), c = E.useRef(null), d = E.useCallback(
2374
2367
  (p) => {
2375
2368
  let I, w, R;
2376
2369
  const h = p.target;
2377
- if (dr(h) || ke(h)) {
2378
- const a = ke(h) ? h : h.defaultView;
2370
+ if (cr(h) || Le(h)) {
2371
+ const a = Le(h) ? h : h.defaultView;
2379
2372
  R = s === !0 ? _t(a, a.scrollX) : a.scrollY, I = s === !0 ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, w = s === !0 ? a.innerWidth : a.innerHeight;
2380
2373
  } else
2381
2374
  R = s === !0 ? _t(h, h.scrollLeft) : h.scrollTop, I = s === !0 ? h.scrollWidth : h.scrollHeight, w = s === !0 ? h.offsetWidth : h.offsetHeight;
@@ -2386,14 +2379,14 @@ function uo(t, e, n, o = Jt, r, s) {
2386
2379
  viewportHeight: w
2387
2380
  });
2388
2381
  };
2389
- p.suppressFlushSync === !0 ? f() : xo.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === I - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2382
+ p.suppressFlushSync === !0 ? f() : go.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === I - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2390
2383
  },
2391
2384
  [t, e, s]
2392
2385
  );
2393
2386
  E.useEffect(() => {
2394
2387
  const p = r ?? i.current;
2395
- return gn(p), o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
2396
- gn(p), o(null), p.removeEventListener("scroll", d);
2388
+ return o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
2389
+ o(null), p.removeEventListener("scroll", d);
2397
2390
  };
2398
2391
  }, [i, d, n, o, r]);
2399
2392
  function m(p) {
@@ -2402,7 +2395,7 @@ function uo(t, e, n, o = Jt, r, s) {
2402
2395
  return;
2403
2396
  const w = p.behavior === "smooth";
2404
2397
  let R, h, f;
2405
- ke(I) ? (h = Math.max(
2398
+ Le(I) ? (h = Math.max(
2406
2399
  Ht(I.document.documentElement, s === !0 ? "width" : "height"),
2407
2400
  s === !0 ? I.document.documentElement.scrollWidth : I.document.documentElement.scrollHeight
2408
2401
  ), R = s === !0 ? I.innerWidth : I.innerHeight, f = s === !0 ? _t(I, I.scrollX) : I.scrollY) : (h = I[s === !0 ? "scrollWidth" : "scrollHeight"], R = Ht(I, s === !0 ? "width" : "height"), f = s === !0 ? _t(I, I.scrollLeft) : I.scrollTop);
@@ -2412,7 +2405,7 @@ function uo(t, e, n, o = Jt, r, s) {
2412
2405
  return;
2413
2406
  }
2414
2407
  const S = Math.ceil(Math.max(Math.min(a, p.top), 0));
2415
- if (p.top = S, Qn(R, h) || S === f) {
2408
+ if (p.top = S, Zn(R, h) || S === f) {
2416
2409
  t({ scrollHeight: h, scrollTop: f, viewportHeight: R }), w && e(!0);
2417
2410
  return;
2418
2411
  }
@@ -2420,22 +2413,22 @@ function uo(t, e, n, o = Jt, r, s) {
2420
2413
  c.current = null, l.current = null, e(!0);
2421
2414
  }, 1e3)) : l.current = null, s === !0 && (p = {
2422
2415
  ...p.behavior === void 0 ? {} : { behavior: p.behavior },
2423
- left: In(I, S)
2416
+ left: hn(I, S)
2424
2417
  }), I.scrollTo(p);
2425
2418
  }
2426
2419
  function v(p) {
2427
2420
  s === !0 && (p = {
2428
2421
  ...p.behavior === void 0 ? {} : { behavior: p.behavior },
2429
- ...p.top === void 0 ? {} : { left: In(i.current, p.top) }
2422
+ ...p.top === void 0 ? {} : { left: hn(i.current, p.top) }
2430
2423
  }), i.current.scrollBy(p);
2431
2424
  }
2432
2425
  return { scrollByCallback: v, scrollerRef: i, scrollToCallback: m };
2433
2426
  }
2434
- function tn(t) {
2427
+ function Qe(t) {
2435
2428
  return t;
2436
2429
  }
2437
- const fr = /* @__PURE__ */ j(() => {
2438
- const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(tn), r = T("div"), s = T(Jt), i = (l, c = null) => ht(
2430
+ const ur = /* @__PURE__ */ j(() => {
2431
+ const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(Qe), r = T("div"), s = T(Jt), i = (l, c = null) => ht(
2439
2432
  x(
2440
2433
  n,
2441
2434
  B((d) => d[l]),
@@ -2460,11 +2453,11 @@ const fr = /* @__PURE__ */ j(() => {
2460
2453
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
2461
2454
  TopItemListComponent: i("TopItemList")
2462
2455
  };
2463
- }), mr = /* @__PURE__ */ j(
2456
+ }), ar = /* @__PURE__ */ j(
2464
2457
  ([t, e]) => ({ ...t, ...e }),
2465
- rt(io, fr)
2466
- ), pr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), hr = { overflowAnchor: "none", position: Qe(), zIndex: 1 }, ao = { overflowAnchor: "none" }, gr = { ...ao, display: "inline-block", height: "100%" }, En = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2467
- const n = A("listState"), o = Ct("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), v = A("groupContent"), p = A("trackItemSizes"), I = A("itemSize"), w = A("log"), R = Ct("gap"), h = A("horizontalDirection"), { callbackRef: f } = _n(
2458
+ rt(oo, ur)
2459
+ ), dr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), fr = { overflowAnchor: "none", position: Je(), zIndex: 1 }, lo = { overflowAnchor: "none" }, mr = { ...lo, display: "inline-block", height: "100%" }, Rn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2460
+ const n = A("listState"), o = Ct("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), v = A("groupContent"), p = A("trackItemSizes"), I = A("itemSize"), w = A("log"), R = Ct("gap"), h = A("horizontalDirection"), { callbackRef: f } = Gn(
2468
2461
  o,
2469
2462
  I,
2470
2463
  p,
@@ -2475,10 +2468,10 @@ const fr = /* @__PURE__ */ j(() => {
2475
2468
  h,
2476
2469
  A("skipAnimationFrameInResizeObserver")
2477
2470
  ), [a, S] = E.useState(0);
2478
- rn("deviation", (F) => {
2471
+ on("deviation", (F) => {
2479
2472
  a !== F && S(F);
2480
2473
  });
2481
- const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ?? pr, L = A("ListComponent"), u = A("ItemComponent"), g = A("GroupComponent"), C = A("computeItemKey"), k = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), N = A("initialItemFinalLocationReached"), Z = e ? {} : {
2474
+ const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ?? dr, k = A("ListComponent"), u = A("ItemComponent"), g = A("GroupComponent"), C = A("computeItemKey"), L = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), N = A("initialItemFinalLocationReached"), Z = e ? {} : {
2482
2475
  boxSizing: "border-box",
2483
2476
  ...h ? {
2484
2477
  display: "inline-block",
@@ -2495,15 +2488,15 @@ const fr = /* @__PURE__ */ j(() => {
2495
2488
  ...N ? {} : { visibility: "hidden" }
2496
2489
  };
2497
2490
  return !e && n.totalCount === 0 && H !== null && H !== void 0 ? /* @__PURE__ */ G(H, { ...ot(H, m) }) : /* @__PURE__ */ G(
2498
- L,
2491
+ k,
2499
2492
  {
2500
- ...ot(L, m),
2493
+ ...ot(k, m),
2501
2494
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2502
2495
  ref: f,
2503
2496
  style: Z,
2504
2497
  children: (e ? n.topItems : n.items).map((F) => {
2505
2498
  const mt = F.originalIndex, q = C(mt + n.firstItemIndex, F.data, m);
2506
- return k ? /* @__PURE__ */ Dt(
2499
+ return L ? /* @__PURE__ */ Dt(
2507
2500
  y,
2508
2501
  {
2509
2502
  ...ot(y, m),
@@ -2521,33 +2514,33 @@ const fr = /* @__PURE__ */ j(() => {
2521
2514
  "data-item-index": F.index,
2522
2515
  "data-known-size": F.size,
2523
2516
  key: q,
2524
- style: hr
2517
+ style: fr
2525
2518
  },
2526
2519
  v(F.index, m)
2527
2520
  ) : /* @__PURE__ */ Dt(
2528
2521
  u,
2529
2522
  {
2530
2523
  ...ot(u, m),
2531
- ...fo(u, F.data),
2524
+ ...co(u, F.data),
2532
2525
  "data-index": mt,
2533
2526
  "data-item-group-index": F.groupIndex,
2534
2527
  "data-item-index": F.index,
2535
2528
  "data-known-size": F.size,
2536
2529
  key: q,
2537
- style: h ? gr : ao
2530
+ style: h ? mr : lo
2538
2531
  },
2539
2532
  O ? d(F.index, F.groupIndex, F.data, m) : d(F.index, F.data, m)
2540
2533
  );
2541
2534
  })
2542
2535
  }
2543
2536
  );
2544
- }), Ir = {
2537
+ }), pr = {
2545
2538
  height: "100%",
2546
2539
  outline: "none",
2547
2540
  overflowY: "auto",
2548
2541
  position: "relative",
2549
2542
  WebkitOverflowScrolling: "touch"
2550
- }, Sr = {
2543
+ }, hr = {
2551
2544
  outline: "none",
2552
2545
  overflowX: "auto",
2553
2546
  position: "relative"
@@ -2557,12 +2550,12 @@ const fr = /* @__PURE__ */ j(() => {
2557
2550
  top: 0,
2558
2551
  width: "100%",
2559
2552
  ...t ? { display: "flex", flexDirection: "column" } : void 0
2560
- }), en = (t, e, n = 0) => ({
2553
+ }), tn = (t, e, n = 0) => ({
2561
2554
  ...He(t),
2562
2555
  position: e ? "relative" : "absolute",
2563
2556
  top: e ? -n : 0
2564
- }), xr = {
2565
- position: Qe(),
2557
+ }), gr = {
2558
+ position: Je(),
2566
2559
  top: 0,
2567
2560
  width: "100%",
2568
2561
  zIndex: 1
@@ -2571,11 +2564,11 @@ function ot(t, e) {
2571
2564
  if (typeof t != "string")
2572
2565
  return { context: e };
2573
2566
  }
2574
- function fo(t, e) {
2567
+ function co(t, e) {
2575
2568
  return { item: typeof t == "string" ? void 0 : e };
2576
2569
  }
2577
- const vr = /* @__PURE__ */ E.memo(function() {
2578
- const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = Lt(
2570
+ const Ir = /* @__PURE__ */ E.memo(function() {
2571
+ const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = kt(
2579
2572
  E.useMemo(
2580
2573
  () => (i) => {
2581
2574
  n(Ht(i, "height"));
@@ -2586,8 +2579,8 @@ const vr = /* @__PURE__ */ E.memo(function() {
2586
2579
  A("skipAnimationFrameInResizeObserver")
2587
2580
  ), s = A("context");
2588
2581
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
2589
- }), Tr = /* @__PURE__ */ E.memo(function() {
2590
- const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = Lt(
2582
+ }), Sr = /* @__PURE__ */ E.memo(function() {
2583
+ const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = kt(
2591
2584
  E.useMemo(
2592
2585
  () => (i) => {
2593
2586
  n(Ht(i, "height"));
@@ -2599,9 +2592,9 @@ const vr = /* @__PURE__ */ E.memo(function() {
2599
2592
  ), s = A("context");
2600
2593
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
2601
2594
  });
2602
- function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2595
+ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2603
2596
  return E.memo(function({ children: s, style: i, context: l, ...c }) {
2604
- const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } = uo(
2597
+ const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } = io(
2605
2598
  d,
2606
2599
  v,
2607
2600
  m,
@@ -2615,7 +2608,7 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2615
2608
  "data-testid": "virtuoso-scroller",
2616
2609
  "data-virtuoso-scroller": !0,
2617
2610
  ref: R,
2618
- style: { ...I ? Sr : Ir, ...i },
2611
+ style: { ...I ? hr : pr, ...i },
2619
2612
  tabIndex: 0,
2620
2613
  ...c,
2621
2614
  ...ot(m, l),
@@ -2624,16 +2617,16 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2624
2617
  );
2625
2618
  });
2626
2619
  }
2627
- function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2620
+ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2628
2621
  return E.memo(function({ children: s, style: i, context: l, ...c }) {
2629
- const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } = uo(
2622
+ const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } = io(
2630
2623
  d,
2631
2624
  v,
2632
2625
  m,
2633
2626
  h,
2634
2627
  w
2635
2628
  );
2636
- return co(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
2629
+ return so(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
2637
2630
  a.current = null;
2638
2631
  }), [a, w]), t("windowScrollTo", S), t("scrollBy", f), /* @__PURE__ */ G(
2639
2632
  m,
@@ -2648,43 +2641,43 @@ function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2648
2641
  );
2649
2642
  });
2650
2643
  }
2651
- const Cr = ({ children: t }) => {
2644
+ const xr = ({ children: t }) => {
2652
2645
  const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
2653
2646
  () => re(n, (c) => Ht(c, s ? "width" : "height")),
2654
2647
  [n, s]
2655
- ), l = Lt(i, !0, A("skipAnimationFrameInResizeObserver"));
2648
+ ), l = kt(i, !0, A("skipAnimationFrameInResizeObserver"));
2656
2649
  return E.useEffect(() => {
2657
2650
  e && (n(e.viewportHeight), o(e.itemHeight));
2658
2651
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: He(r), children: t });
2659
- }, wr = ({ children: t }) => {
2660
- const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = Ue(
2652
+ }, vr = ({ children: t }) => {
2653
+ const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = $e(
2661
2654
  n,
2662
2655
  r,
2663
2656
  A("skipAnimationFrameInResizeObserver")
2664
2657
  ), c = A("alignToBottom");
2665
2658
  return E.useEffect(() => {
2666
2659
  e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2667
- }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: en(c, s, i), children: t });
2668
- }, yr = ({ children: t }) => {
2669
- const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...xr, marginTop: `${n}px` }, r = A("context");
2660
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: tn(c, s, i), children: t });
2661
+ }, Tr = ({ children: t }) => {
2662
+ const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...gr, marginTop: `${n}px` }, r = A("context");
2670
2663
  return /* @__PURE__ */ G(e, { style: o, ...ot(e, r), children: t });
2671
- }, br = /* @__PURE__ */ E.memo(function(e) {
2664
+ }, Cr = /* @__PURE__ */ E.memo(function(e) {
2672
2665
  const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
2673
- return /* @__PURE__ */ $t(r || n ? Hr : Rr, { ...e, context: s, children: [
2674
- o && /* @__PURE__ */ G(yr, { children: /* @__PURE__ */ G(En, { showTopList: !0 }) }),
2675
- /* @__PURE__ */ $t(r || n ? wr : Cr, { children: [
2676
- /* @__PURE__ */ G(vr, {}),
2677
- /* @__PURE__ */ G(En, {}),
2678
- /* @__PURE__ */ G(Tr, {})
2666
+ return /* @__PURE__ */ $t(r || n ? yr : wr, { ...e, context: s, children: [
2667
+ o && /* @__PURE__ */ G(Tr, { children: /* @__PURE__ */ G(Rn, { showTopList: !0 }) }),
2668
+ /* @__PURE__ */ $t(r || n ? vr : xr, { children: [
2669
+ /* @__PURE__ */ G(Ir, {}),
2670
+ /* @__PURE__ */ G(Rn, {}),
2671
+ /* @__PURE__ */ G(Sr, {})
2679
2672
  ] })
2680
2673
  ] });
2681
2674
  }), {
2682
- Component: mo,
2683
- useEmitter: rn,
2675
+ Component: uo,
2676
+ useEmitter: on,
2684
2677
  useEmitterValue: A,
2685
2678
  usePublisher: Ct
2686
- } = /* @__PURE__ */ Je(
2687
- mr,
2679
+ } = /* @__PURE__ */ Xe(
2680
+ ar,
2688
2681
  {
2689
2682
  optional: {
2690
2683
  restoreStateFrom: "restoreStateFrom",
@@ -2744,15 +2737,15 @@ const Cr = ({ children: t }) => {
2744
2737
  groupIndices: "groupIndices"
2745
2738
  }
2746
2739
  },
2747
- br
2748
- ), Rr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: A, usePublisher: Ct }), Hr = /* @__PURE__ */ on({ useEmitter: rn, useEmitterValue: A, usePublisher: Ct }), rs = mo, ss = mo, Er = /* @__PURE__ */ j(() => {
2740
+ Cr
2741
+ ), wr = /* @__PURE__ */ en({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), yr = /* @__PURE__ */ nn({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), es = uo, ns = uo, br = /* @__PURE__ */ j(() => {
2749
2742
  const t = T((d) => /* @__PURE__ */ $t("td", { children: [
2750
2743
  "Item $",
2751
2744
  d
2752
2745
  ] })), e = T(null), n = T((d) => /* @__PURE__ */ $t("td", { colSpan: 1e3, children: [
2753
2746
  "Group ",
2754
2747
  d
2755
- ] })), o = T(null), r = T(null), s = T({}), i = T(tn), l = T(Jt), c = (d, m = null) => ht(
2748
+ ] })), o = T(null), r = T(null), s = T({}), i = T(Qe), l = T(Jt), c = (d, m = null) => ht(
2756
2749
  x(
2757
2750
  s,
2758
2751
  B((v) => v[d]),
@@ -2780,11 +2773,11 @@ const Cr = ({ children: t }) => {
2780
2773
  TableRowComponent: c("TableRow", "tr"),
2781
2774
  GroupComponent: c("Group", "tr")
2782
2775
  };
2783
- }), Br = /* @__PURE__ */ j(
2776
+ }), Rr = /* @__PURE__ */ j(
2784
2777
  ([t, e]) => ({ ...t, ...e }),
2785
- rt(io, Er)
2786
- ), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Lr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, Bn = { position: Qe(), zIndex: 2, overflowAnchor: "none" }, On = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2787
- const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), m = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Or, p = _("GroupComponent"), I = _("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
2778
+ rt(oo, br)
2779
+ ), 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" }, Hn = { position: Je(), zIndex: 2, overflowAnchor: "none" }, En = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2780
+ const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), m = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Hr, p = _("GroupComponent"), I = _("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
2788
2781
  return (e ? n.topItems : n.items).map((h) => {
2789
2782
  const f = h.originalIndex, a = o(f + r, h.data, s), S = e ? f === 0 ? 0 : w[f - 1] : 0;
2790
2783
  return i ? /* @__PURE__ */ Dt(
@@ -2805,7 +2798,7 @@ const Cr = ({ children: t }) => {
2805
2798
  "data-known-size": h.size,
2806
2799
  key: a,
2807
2800
  style: {
2808
- ...Bn,
2801
+ ...Hn,
2809
2802
  top: l
2810
2803
  }
2811
2804
  },
@@ -2814,19 +2807,19 @@ const Cr = ({ children: t }) => {
2814
2807
  I,
2815
2808
  {
2816
2809
  ...ot(I, s),
2817
- ...fo(I, h.data),
2810
+ ...co(I, h.data),
2818
2811
  "data-index": f,
2819
2812
  "data-item-index": h.index,
2820
2813
  "data-known-size": h.size,
2821
2814
  "data-item-group-index": h.groupIndex,
2822
2815
  key: a,
2823
- style: e ? { ...Bn, top: l + S } : kr
2816
+ style: e ? { ...Hn, top: l + S } : Br
2824
2817
  },
2825
2818
  c ? d(h.index, h.groupIndex, h.data, s) : d(h.index, h.data, s)
2826
2819
  );
2827
2820
  });
2828
- }), zr = /* @__PURE__ */ E.memo(function() {
2829
- const e = _("listState"), n = _("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), m = _("itemSize"), v = _("log"), { callbackRef: p, ref: I } = _n(
2821
+ }), Or = /* @__PURE__ */ E.memo(function() {
2822
+ const e = _("listState"), n = _("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), m = _("itemSize"), v = _("log"), { callbackRef: p, ref: I } = Gn(
2830
2823
  o,
2831
2824
  m,
2832
2825
  d,
@@ -2837,21 +2830,21 @@ const Cr = ({ children: t }) => {
2837
2830
  !1,
2838
2831
  _("skipAnimationFrameInResizeObserver")
2839
2832
  ), [w, R] = E.useState(0);
2840
- sn("deviation", (O) => {
2833
+ rn("deviation", (O) => {
2841
2834
  w !== O && (I.current.style.marginTop = `${O}px`, R(O));
2842
2835
  });
2843
- const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Lr, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
2836
+ const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Er, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
2844
2837
  if (H === 0 && h !== null && h !== void 0)
2845
2838
  return /* @__PURE__ */ G(h, { ...ot(h, y) });
2846
- const L = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), u = e.offsetTop + S + w - L, g = e.offsetBottom, C = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, k = g > 0 ? /* @__PURE__ */ G(f, { context: y, height: g }, "padding-bottom") : null;
2839
+ const k = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), u = e.offsetTop + S + w - k, g = e.offsetBottom, C = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, L = g > 0 ? /* @__PURE__ */ G(f, { context: y, height: g }, "padding-bottom") : null;
2847
2840
  return /* @__PURE__ */ $t(a, { "data-testid": "virtuoso-item-list", ref: p, ...ot(a, y), children: [
2848
2841
  C,
2849
- n && /* @__PURE__ */ G(On, { showTopList: !0 }),
2850
- /* @__PURE__ */ G(On, {}),
2851
- k
2842
+ n && /* @__PURE__ */ G(En, { showTopList: !0 }),
2843
+ /* @__PURE__ */ G(En, {}),
2844
+ L
2852
2845
  ] });
2853
- }), Fr = ({ children: t }) => {
2854
- const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = Lt(
2846
+ }), kr = ({ children: t }) => {
2847
+ const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = kt(
2855
2848
  E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
2856
2849
  !0,
2857
2850
  _("skipAnimationFrameInResizeObserver")
@@ -2859,25 +2852,25 @@ const Cr = ({ children: t }) => {
2859
2852
  return E.useEffect(() => {
2860
2853
  e && (n(e.viewportHeight), o(e.itemHeight));
2861
2854
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: He(!1), children: t });
2862
- }, Vr = ({ children: t }) => {
2863
- const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = Ue(
2855
+ }, Lr = ({ children: t }) => {
2856
+ const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = $e(
2864
2857
  n,
2865
2858
  r,
2866
2859
  _("skipAnimationFrameInResizeObserver")
2867
2860
  );
2868
2861
  return E.useEffect(() => {
2869
2862
  e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2870
- }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: en(!1, s), children: t });
2871
- }, Wr = /* @__PURE__ */ E.memo(function(e) {
2872
- const n = _("useWindowScroll"), o = _("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = Lt(
2863
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: tn(!1, s), children: t });
2864
+ }, zr = /* @__PURE__ */ E.memo(function(e) {
2865
+ const n = _("useWindowScroll"), o = _("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = kt(
2873
2866
  E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
2874
2867
  !0,
2875
2868
  _("skipAnimationFrameInResizeObserver")
2876
- ), m = Lt(
2869
+ ), m = kt(
2877
2870
  E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
2878
2871
  !0,
2879
2872
  _("skipAnimationFrameInResizeObserver")
2880
- ), v = o || n ? Gr : Pr, p = o || n ? Vr : Fr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
2873
+ ), v = o || n ? Vr : Fr, p = o || n ? Lr : kr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
2881
2874
  w,
2882
2875
  {
2883
2876
  ref: d,
@@ -2898,16 +2891,16 @@ const Cr = ({ children: t }) => {
2898
2891
  ) : null;
2899
2892
  return /* @__PURE__ */ G(v, { ...e, ...ot(v, c), children: /* @__PURE__ */ G(p, { children: /* @__PURE__ */ $t(I, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...ot(I, c), children: [
2900
2893
  h,
2901
- /* @__PURE__ */ G(zr, {}, "TableBody"),
2894
+ /* @__PURE__ */ G(Or, {}, "TableBody"),
2902
2895
  f
2903
2896
  ] }) }) });
2904
2897
  }), {
2905
- Component: po,
2906
- useEmitter: sn,
2898
+ Component: ao,
2899
+ useEmitter: rn,
2907
2900
  useEmitterValue: _,
2908
2901
  usePublisher: bt
2909
- } = /* @__PURE__ */ Je(
2910
- Br,
2902
+ } = /* @__PURE__ */ Xe(
2903
+ Rr,
2911
2904
  {
2912
2905
  optional: {
2913
2906
  restoreStateFrom: "restoreStateFrom",
@@ -2963,8 +2956,8 @@ const Cr = ({ children: t }) => {
2963
2956
  groupIndices: "groupIndices"
2964
2957
  }
2965
2958
  },
2966
- Wr
2967
- ), Pr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), Gr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), is = po, ls = po, Ln = {
2959
+ zr
2960
+ ), Fr = /* @__PURE__ */ en({ useEmitter: rn, useEmitterValue: _, usePublisher: bt }), Vr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: _, usePublisher: bt }), os = ao, rs = ao, Bn = {
2968
2961
  bottom: 0,
2969
2962
  itemHeight: 0,
2970
2963
  items: [],
@@ -2972,7 +2965,7 @@ const Cr = ({ children: t }) => {
2972
2965
  offsetBottom: 0,
2973
2966
  offsetTop: 0,
2974
2967
  top: 0
2975
- }, Ar = {
2968
+ }, Wr = {
2976
2969
  bottom: 0,
2977
2970
  itemHeight: 0,
2978
2971
  items: [{ index: 0 }],
@@ -2980,23 +2973,23 @@ const Cr = ({ children: t }) => {
2980
2973
  offsetBottom: 0,
2981
2974
  offsetTop: 0,
2982
2975
  top: 0
2983
- }, { ceil: kn, floor: Ce, max: oe, min: ze, round: zn } = Math;
2984
- function Fn(t, e, n) {
2976
+ }, { ceil: On, floor: Ce, max: oe, min: ze, round: kn } = Math;
2977
+ function Ln(t, e, n) {
2985
2978
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2986
2979
  }
2987
- function Mr(t) {
2980
+ function Pr(t) {
2988
2981
  return {
2989
- ...Ar,
2982
+ ...Wr,
2990
2983
  items: t
2991
2984
  };
2992
2985
  }
2993
2986
  function Se(t, e) {
2994
2987
  return t !== void 0 && t.width === e.width && t.height === e.height;
2995
2988
  }
2996
- function _r(t, e) {
2989
+ function Gr(t, e) {
2997
2990
  return t !== void 0 && t.column === e.column && t.row === e.row;
2998
2991
  }
2999
- const Nr = /* @__PURE__ */ j(
2992
+ const Ar = /* @__PURE__ */ j(
3000
2993
  ([
3001
2994
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
3002
2995
  { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: v },
@@ -3006,19 +2999,19 @@ const Nr = /* @__PURE__ */ j(
3006
2999
  { customScrollParent: h, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: S, windowViewportRect: H },
3007
3000
  y
3008
3001
  ]) => {
3009
- const L = T(0), u = T(0), g = T(Ln), C = T({ height: 0, width: 0 }), k = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), lt = T(!0), St = T(!1), Ft = T(!1);
3002
+ const k = T(0), u = T(0), g = T(Bn), C = T({ height: 0, width: 0 }), L = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), lt = T(!0), St = T(!1), Ft = T(!1);
3010
3003
  Y(
3011
3004
  x(
3012
3005
  w,
3013
3006
  $(gt),
3014
- P(([b, D]) => !Me(D))
3007
+ P(([b, D]) => !Ae(D))
3015
3008
  ),
3016
3009
  () => {
3017
3010
  M(lt, !1);
3018
3011
  }
3019
3012
  ), Y(
3020
3013
  x(
3021
- at(w, lt, k, C, gt, St),
3014
+ at(w, lt, L, C, gt, St),
3022
3015
  P(([b, D, K, st, , tt]) => b && !D && K.height !== 0 && st.height !== 0 && !tt)
3023
3016
  ),
3024
3017
  ([, , , , b]) => {
@@ -3026,7 +3019,7 @@ const Nr = /* @__PURE__ */ j(
3026
3019
  M(lt, !0);
3027
3020
  return;
3028
3021
  }
3029
- M(St, !0), qe(1, () => {
3022
+ M(St, !0), je(1, () => {
3030
3023
  M(O, b);
3031
3024
  }), yt(x(d), () => {
3032
3025
  M(e, [0, 0]), M(lt, !0);
@@ -3046,7 +3039,7 @@ const Nr = /* @__PURE__ */ j(
3046
3039
  P(([, b]) => b != null)
3047
3040
  ),
3048
3041
  ([, b]) => {
3049
- b && (M(C, b.viewport), M(k, b.item), M(F, b.gap), b.scrollTop > 0 && (M(Q, !0), yt(x(d, Ut(1)), (D) => {
3042
+ b && (M(C, b.viewport), M(L, b.item), M(F, b.gap), b.scrollTop > 0 && (M(Q, !0), yt(x(d, Ut(1)), (D) => {
3050
3043
  M(Q, !1);
3051
3044
  }), M(c, { top: b.scrollTop })));
3052
3045
  }
@@ -3060,7 +3053,7 @@ const Nr = /* @__PURE__ */ j(
3060
3053
  x(
3061
3054
  at(
3062
3055
  W(C, Se),
3063
- W(k, Se),
3056
+ W(L, Se),
3064
3057
  W(F, (b, D) => b !== void 0 && b.column === D.column && b.row === D.row),
3065
3058
  W(d)
3066
3059
  ),
@@ -3075,10 +3068,10 @@ const Nr = /* @__PURE__ */ j(
3075
3068
  ), z(
3076
3069
  x(
3077
3070
  at(
3078
- W(L),
3071
+ W(k),
3079
3072
  o,
3080
- W(F, _r),
3081
- W(k, Se),
3073
+ W(F, Gr),
3074
+ W(L, Se),
3082
3075
  W(C, Se),
3083
3076
  W(Z),
3084
3077
  W(u),
@@ -3100,18 +3093,18 @@ const Nr = /* @__PURE__ */ j(
3100
3093
  ut,
3101
3094
  Vt
3102
3095
  ]) => {
3103
- const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: ln } = X;
3104
- if (xt === 0 && (b === 0 || ln === 0))
3105
- return Ln;
3096
+ const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: sn } = X;
3097
+ if (xt === 0 && (b === 0 || sn === 0))
3098
+ return Bn;
3106
3099
  if (Ee === 0) {
3107
- const fn = Ye(Vt, b), So = fn + Math.max(xt - 1, 0);
3108
- return Mr(Fn(fn, So, ct));
3100
+ const dn = qe(Vt, b), ho = dn + Math.max(xt - 1, 0);
3101
+ return Pr(Ln(dn, ho, ct));
3109
3102
  }
3110
- const ge = ho(ln, Ee, Wt);
3103
+ const ge = fo(sn, Ee, Wt);
3111
3104
  let qt, Mt;
3112
- ut ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * kn((K + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
3113
- const cn = Fn(qt, Mt, ct), { bottom: un, top: an } = Vn(X, st, tt, cn), dn = kn(b / ge), Io = dn * he + (dn - 1) * ee - un;
3114
- return { bottom: un, itemHeight: he, items: cn, itemWidth: Ee, offsetBottom: Io, offsetTop: an, top: an };
3105
+ ut ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * On((K + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
3106
+ const ln = Ln(qt, Mt, ct), { bottom: cn, top: un } = zn(X, st, tt, ln), an = On(b / ge), po = an * he + (an - 1) * ee - cn;
3107
+ return { bottom: cn, itemHeight: he, items: ln, itemWidth: Ee, offsetBottom: po, offsetTop: un, top: un };
3115
3108
  }
3116
3109
  )
3117
3110
  ),
@@ -3122,13 +3115,13 @@ const Nr = /* @__PURE__ */ j(
3122
3115
  P((b) => b !== null),
3123
3116
  B((b) => b.length)
3124
3117
  ),
3125
- L
3118
+ k
3126
3119
  ), z(
3127
3120
  x(
3128
- at(C, k, g, F),
3121
+ at(C, L, g, F),
3129
3122
  P(([b, D, { items: K }]) => K.length > 0 && D.height !== 0 && b.height !== 0),
3130
3123
  B(([b, D, { items: K }, st]) => {
3131
- const { bottom: tt, top: X } = Vn(b, st, D, K);
3124
+ const { bottom: tt, top: X } = zn(b, st, D, K);
3132
3125
  return [X, tt];
3133
3126
  }),
3134
3127
  nt(le)
@@ -3146,7 +3139,7 @@ const Nr = /* @__PURE__ */ j(
3146
3139
  );
3147
3140
  const jt = Tt(
3148
3141
  x(
3149
- at(g, L),
3142
+ at(g, k),
3150
3143
  P(([{ items: b }]) => b.length > 0),
3151
3144
  $(pt),
3152
3145
  P(([[b, D], K]) => {
@@ -3172,20 +3165,20 @@ const Nr = /* @__PURE__ */ j(
3172
3165
  endIndex: b[b.length - 1].index,
3173
3166
  startIndex: b[0].index
3174
3167
  })),
3175
- nt(jn),
3168
+ nt($n),
3176
3169
  zt(0)
3177
3170
  )
3178
3171
  );
3179
3172
  z(Et, I.scrollSeekRangeChanged), z(
3180
3173
  x(
3181
3174
  O,
3182
- $(C, k, L, F),
3175
+ $(C, L, k, F),
3183
3176
  B(([b, D, K, st, tt]) => {
3184
- const X = Jn(b), { align: ct, behavior: xt, offset: ut } = X;
3177
+ const X = Yn(b), { align: ct, behavior: xt, offset: ut } = X;
3185
3178
  let Vt = X.index;
3186
3179
  Vt === "LAST" && (Vt = st - 1), Vt = oe(0, Vt, ze(st - 1, Vt));
3187
- let Wt = _e(D, tt, K, Vt);
3188
- return ct === "end" ? Wt = zn(Wt - D.height + K.height) : ct === "center" && (Wt = zn(Wt - D.height / 2 + K.height / 2)), ut !== void 0 && ut !== 0 && (Wt += ut), { behavior: xt, top: Wt };
3180
+ let Wt = Me(D, tt, K, Vt);
3181
+ return ct === "end" ? Wt = kn(Wt - D.height + K.height) : ct === "center" && (Wt = kn(Wt - D.height / 2 + K.height / 2)), ut !== void 0 && ut !== 0 && (Wt += ut), { behavior: xt, top: Wt };
3189
3182
  })
3190
3183
  ),
3191
3184
  c
@@ -3213,7 +3206,7 @@ const Nr = /* @__PURE__ */ j(
3213
3206
  headerHeight: s,
3214
3207
  increaseViewportBy: t,
3215
3208
  initialItemCount: u,
3216
- itemDimensions: k,
3209
+ itemDimensions: L,
3217
3210
  overscan: n,
3218
3211
  restoreStateFrom: q,
3219
3212
  scrollBy: i,
@@ -3223,7 +3216,7 @@ const Nr = /* @__PURE__ */ j(
3223
3216
  scrollToIndex: O,
3224
3217
  scrollTop: d,
3225
3218
  smoothScrollTargetReached: m,
3226
- totalCount: L,
3219
+ totalCount: k,
3227
3220
  useWindowScroll: f,
3228
3221
  viewportDimensions: C,
3229
3222
  windowScrollContainerState: a,
@@ -3245,24 +3238,24 @@ const Nr = /* @__PURE__ */ j(
3245
3238
  ...y
3246
3239
  };
3247
3240
  },
3248
- rt(Ze, It, pe, ro, At, Xe, Gt)
3241
+ rt(Ye, It, pe, eo, At, Ze, Gt)
3249
3242
  );
3250
- function ho(t, e, n) {
3243
+ function fo(t, e, n) {
3251
3244
  return oe(1, Ce((t + n) / (Ce(e) + n)));
3252
3245
  }
3253
- function Vn(t, e, n, o) {
3246
+ function zn(t, e, n, o) {
3254
3247
  const { height: r } = n;
3255
3248
  if (r === void 0 || o.length === 0)
3256
3249
  return { bottom: 0, top: 0 };
3257
- const s = _e(t, e, n, o[0].index);
3258
- return { bottom: _e(t, e, n, o[o.length - 1].index) + r, top: s };
3250
+ const s = Me(t, e, n, o[0].index);
3251
+ return { bottom: Me(t, e, n, o[o.length - 1].index) + r, top: s };
3259
3252
  }
3260
- function _e(t, e, n, o) {
3261
- const r = ho(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
3253
+ function Me(t, e, n, o) {
3254
+ const r = fo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
3262
3255
  return i > 0 ? i + e.row : i;
3263
3256
  }
3264
- const Dr = /* @__PURE__ */ j(() => {
3265
- const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(tn), i = T("div"), l = T(Jt), c = (v, p = null) => ht(
3257
+ const Mr = /* @__PURE__ */ j(() => {
3258
+ const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(Qe), i = T("div"), l = T(Jt), c = (v, p = null) => ht(
3266
3259
  x(
3267
3260
  e,
3268
3261
  B((I) => I[v]),
@@ -3288,23 +3281,23 @@ const Dr = /* @__PURE__ */ j(() => {
3288
3281
  scrollerRef: l,
3289
3282
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
3290
3283
  };
3291
- }), $r = /* @__PURE__ */ j(
3284
+ }), _r = /* @__PURE__ */ j(
3292
3285
  ([t, e]) => ({ ...t, ...e }),
3293
- rt(Nr, Dr)
3294
- ), Ur = /* @__PURE__ */ E.memo(function() {
3295
- const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f = Lt(
3286
+ rt(Ar, Mr)
3287
+ ), Nr = /* @__PURE__ */ E.memo(function() {
3288
+ const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f = kt(
3296
3289
  E.useMemo(
3297
3290
  () => (a) => {
3298
3291
  const S = a.parentElement.parentElement.scrollHeight;
3299
3292
  l(S);
3300
3293
  const H = a.firstChild;
3301
3294
  if (H !== null) {
3302
- const { height: y, width: L } = H.getBoundingClientRect();
3303
- p({ height: y, width: L });
3295
+ const { height: y, width: k } = H.getBoundingClientRect();
3296
+ p({ height: y, width: k });
3304
3297
  }
3305
3298
  I({
3306
- column: Wn("column-gap", getComputedStyle(a).columnGap, w),
3307
- row: Wn("row-gap", getComputedStyle(a).rowGap, w)
3299
+ column: Fn("column-gap", getComputedStyle(a).columnGap, w),
3300
+ row: Fn("row-gap", getComputedStyle(a).rowGap, w)
3308
3301
  });
3309
3302
  },
3310
3303
  [l, p, I, w]
@@ -3312,7 +3305,7 @@ const Dr = /* @__PURE__ */ j(() => {
3312
3305
  !0,
3313
3306
  !1
3314
3307
  );
3315
- return co(() => {
3308
+ return so(() => {
3316
3309
  e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
3317
3310
  }, [e]), R ? null : /* @__PURE__ */ G(
3318
3311
  d,
@@ -3346,8 +3339,8 @@ const Dr = /* @__PURE__ */ j(() => {
3346
3339
  })
3347
3340
  }
3348
3341
  );
3349
- }), Kr = E.memo(function() {
3350
- const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = Lt(
3342
+ }), Dr = E.memo(function() {
3343
+ const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = kt(
3351
3344
  E.useMemo(
3352
3345
  () => (i) => {
3353
3346
  n(Ht(i, "height"));
@@ -3358,8 +3351,8 @@ const Dr = /* @__PURE__ */ j(() => {
3358
3351
  !1
3359
3352
  ), s = et("context");
3360
3353
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
3361
- }), jr = E.memo(function() {
3362
- const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = Lt(
3354
+ }), $r = E.memo(function() {
3355
+ const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = kt(
3363
3356
  E.useMemo(
3364
3357
  () => (i) => {
3365
3358
  n(Ht(i, "height"));
@@ -3370,8 +3363,8 @@ const Dr = /* @__PURE__ */ j(() => {
3370
3363
  !1
3371
3364
  ), s = et("context");
3372
3365
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
3373
- }), qr = ({ children: t }) => {
3374
- const e = E.useContext(lo), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = Lt(
3366
+ }), Ur = ({ children: t }) => {
3367
+ const e = E.useContext(ro), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = kt(
3375
3368
  E.useMemo(
3376
3369
  () => (s) => {
3377
3370
  o(s.getBoundingClientRect());
@@ -3384,25 +3377,25 @@ const Dr = /* @__PURE__ */ j(() => {
3384
3377
  return E.useEffect(() => {
3385
3378
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3386
3379
  }, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: He(!1), children: t });
3387
- }, Yr = ({ children: t }) => {
3388
- const e = E.useContext(lo), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = Ue(n, r, !1);
3380
+ }, Kr = ({ children: t }) => {
3381
+ const e = E.useContext(ro), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = $e(n, r, !1);
3389
3382
  return E.useEffect(() => {
3390
3383
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3391
- }, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: en(!1, s), children: t });
3392
- }, Zr = /* @__PURE__ */ E.memo(function({ ...e }) {
3393
- const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Qr : Jr, s = o || n ? Yr : qr, i = et("context");
3384
+ }, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: tn(!1, s), children: t });
3385
+ }, jr = /* @__PURE__ */ E.memo(function({ ...e }) {
3386
+ const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Zr : Yr, s = o || n ? Kr : Ur, i = et("context");
3394
3387
  return /* @__PURE__ */ G(r, { ...e, ...ot(r, i), children: /* @__PURE__ */ $t(s, { children: [
3395
- /* @__PURE__ */ G(Kr, {}),
3396
- /* @__PURE__ */ G(Ur, {}),
3397
- /* @__PURE__ */ G(jr, {})
3388
+ /* @__PURE__ */ G(Dr, {}),
3389
+ /* @__PURE__ */ G(Nr, {}),
3390
+ /* @__PURE__ */ G($r, {})
3398
3391
  ] }) });
3399
3392
  }), {
3400
- Component: Xr,
3401
- useEmitter: go,
3393
+ Component: qr,
3394
+ useEmitter: mo,
3402
3395
  useEmitterValue: et,
3403
3396
  usePublisher: wt
3404
- } = /* @__PURE__ */ Je(
3405
- $r,
3397
+ } = /* @__PURE__ */ Xe(
3398
+ _r,
3406
3399
  {
3407
3400
  optional: {
3408
3401
  context: "context",
@@ -3441,19 +3434,19 @@ const Dr = /* @__PURE__ */ j(() => {
3441
3434
  readyStateChanged: "readyStateChanged"
3442
3435
  }
3443
3436
  },
3444
- Zr
3445
- ), Jr = /* @__PURE__ */ nn({ useEmitter: go, useEmitterValue: et, usePublisher: wt }), Qr = /* @__PURE__ */ on({ useEmitter: go, useEmitterValue: et, usePublisher: wt });
3446
- function Wn(t, e, n) {
3437
+ jr
3438
+ ), Yr = /* @__PURE__ */ en({ useEmitter: mo, useEmitterValue: et, usePublisher: wt }), Zr = /* @__PURE__ */ nn({ useEmitter: mo, useEmitterValue: et, usePublisher: wt });
3439
+ function Fn(t, e, n) {
3447
3440
  return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
3448
3441
  }
3449
- const cs = Xr;
3442
+ const ss = qr;
3450
3443
  export {
3451
- ls as GroupedTableVirtuoso,
3452
- ss as GroupedVirtuoso,
3444
+ rs as GroupedTableVirtuoso,
3445
+ ns as GroupedVirtuoso,
3453
3446
  ft as LogLevel,
3454
- is as TableVirtuoso,
3455
- rs as Virtuoso,
3456
- cs as VirtuosoGrid,
3457
- lo as VirtuosoGridMockContext,
3447
+ os as TableVirtuoso,
3448
+ es as Virtuoso,
3449
+ ss as VirtuosoGrid,
3450
+ ro as VirtuosoGridMockContext,
3458
3451
  Re as VirtuosoMockContext
3459
3452
  };