react-virtuoso 4.18.10 → 4.18.12

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 q(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,11 +243,11 @@ 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
  }
250
- const ft = {
250
+ const mt = {
251
251
  /** Detailed debugging information including item measurements */
252
252
  DEBUG: 0,
253
253
  /** General informational messages */
@@ -256,18 +256,18 @@ const ft = {
256
256
  WARN: 2,
257
257
  /** Error messages for failures (default level) */
258
258
  ERROR: 3
259
- }, Bo = {
260
- [ft.DEBUG]: "debug",
261
- [ft.ERROR]: "error",
262
- [ft.INFO]: "log",
263
- [ft.WARN]: "warn"
264
- }, Oo = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
259
+ }, Ro = {
260
+ [mt.DEBUG]: "debug",
261
+ [mt.ERROR]: "error",
262
+ [mt.INFO]: "log",
263
+ [mt.WARN]: "warn"
264
+ }, Ho = () => typeof globalThis > "u" ? window : globalThis, Gt = q(
265
265
  () => {
266
- const t = T(ft.ERROR);
266
+ const t = T(mt.ERROR);
267
267
  return {
268
- log: T((n, o, r = ft.INFO) => {
269
- const s = Oo().VIRTUOSO_LOG_LEVEL ?? it(t);
270
- r >= s && console[Bo[r]](
268
+ log: T((n, o, r = mt.INFO) => {
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;
287
+ function Pn(t) {
288
+ const e = Eo(t);
289
+ return e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
293
290
  }
294
- function gn(t) {
295
- Ve.delete(An(t));
291
+ function _t(t, e) {
292
+ return Pn(t) ? -e : e;
296
293
  }
297
- function Mn(t, e) {
298
- return Lo(t) ? -e : e;
294
+ function hn(t, e) {
295
+ return Pn(t) ? -e : e;
299
296
  }
300
- const _t = Mn;
301
- function In(t, e) {
302
- return Mn(t, e);
297
+ function kt(t, e, n) {
298
+ return De(t, e, n).callbackRef;
303
299
  }
304
- function Lt(t, e, n) {
305
- return $e(t, e, n).callbackRef;
306
- }
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;
@@ -352,17 +345,17 @@ function ko(t, e, n, o) {
352
345
  if (l.dataset.index === void 0)
353
346
  continue;
354
347
  const c = parseInt(l.dataset.index, 10), d = parseFloat(l.dataset.knownSize), m = e(l, n);
355
- if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, ft.ERROR), m === d)
348
+ if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, mt.ERROR), m === d)
356
349
  continue;
357
350
  const v = s[s.length - 1];
358
351
  s.length === 0 || v.size !== m || v.endIndex !== c - 1 ? s.push({ endIndex: c, size: m, startIndex: c }) : s[s.length - 1].endIndex++;
359
352
  }
360
353
  return s;
361
354
  }
362
- function Sn(t, e, n) {
363
- 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);
355
+ function gn(t, e, n) {
356
+ return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, mt.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(() => {
@@ -404,7 +397,7 @@ function Ue(t, e, n) {
404
397
  };
405
398
  }, [l, e, i]), s;
406
399
  }
407
- const It = j(
400
+ const It = q(
408
401
  () => {
409
402
  const t = U(), e = U(), n = T(0), o = U(), r = T(0), s = U(), i = U(), l = T(0), c = T(0), d = T(0), m = T(0), v = U(), p = U(), I = T(!1), w = T(!1), R = T(!1);
410
403
  return z(
@@ -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 ? ft(t, { k: e, v: n }) : e < t.k ? In(ft(t, { l: vt(t.l, e, n) })) : In(ft(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(ft(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(ft(t, { l: Ve(o, e) })) : xe(ft(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,12 +509,12 @@ 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(ft(t, { lvl: n - 1 }));
520
513
  if (!J(e) && !J(e.r))
521
- return dt(e.r, {
522
- l: dt(e, { r: e.r.l }),
514
+ return ft(e.r, {
515
+ l: ft(e, { r: e.r.l }),
523
516
  lvl: n,
524
- r: dt(t, {
517
+ r: ft(t, {
525
518
  l: e.r.r,
526
519
  lvl: n - 1
527
520
  })
@@ -529,22 +522,22 @@ 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(ft(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
- return dt(r, {
536
- l: dt(t, {
528
+ return ft(r, {
529
+ l: ft(t, {
537
530
  lvl: n - 1,
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(ft(o, { l: r.r, lvl: s }))
542
535
  });
543
536
  }
544
537
  throw new Error("Unexpected empty nodes");
545
538
  }
546
- function dt(t, e) {
547
- return Un(
539
+ function ft(t, e) {
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(ft(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
- return !J(e) && e.lvl === t.lvl ? dt(e, { r: dt(t, { l: e.r }) }) : t;
565
+ return !J(e) && e.lvl === t.lvl ? ft(e, { r: ft(t, { l: e.r }) }) : t;
573
566
  }
574
- function Ge(t) {
567
+ function Pe(t) {
575
568
  const { lvl: e, r: n } = t;
576
- 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;
569
+ return !J(n) && !J(n.r) && n.lvl === e && n.r.lvl === e ? ft(n, { l: ft(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 = q(
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,28 +665,28 @@ 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]) {
686
- e.length > 0 && o("received item sizes", e, ft.DEBUG);
678
+ function Po(t, [e, n, o, r]) {
679
+ e.length > 0 && o("received item sizes", e, mt.DEBUG);
687
680
  const s = t.sizeTree;
688
681
  let i = s, l = 0;
689
682
  if (n.length > 0 && J(s) && e.length === 2) {
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 = q(
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,17 +883,17 @@ 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]) => {
900
893
  u < 0 && g(
901
894
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
902
895
  { firstItemIndex: l },
903
- ft.ERROR
896
+ mt.ERROR
904
897
  );
905
898
  });
906
899
  const y = Tt(s);
@@ -909,32 +902,32 @@ 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
- const q = g.groupIndices[Z], Q = g.groupIndices.length === Z + 1 ? 1 / 0 : g.groupIndices[Z + 1] - q - 1;
918
- k.push({
919
- endIndex: q,
910
+ const K = g.groupIndices[Z], Q = g.groupIndices.length === Z + 1 ? 1 / 0 : g.groupIndices[Z + 1] - K - 1;
911
+ L.push({
912
+ endIndex: K,
920
913
  size: V,
921
- startIndex: q
922
- }), k.push({
923
- endIndex: q + 1 + Q - 1,
914
+ startIndex: K
915
+ }), L.push({
916
+ endIndex: K + 1 + Q - 1,
924
917
  size: O,
925
- startIndex: q + 1
918
+ startIndex: K + 1
926
919
  }), Z++, N += Q + 1;
927
920
  }
928
921
  const F = Nt(g.sizeTree);
929
922
  return N !== u && F.shift(), F.reduce(
930
- (q, { k: Q, v: gt }) => {
931
- let lt = q.ranges;
932
- return q.prevSize !== 0 && (lt = [
933
- ...q.ranges,
923
+ (K, { k: Q, v: gt }) => {
924
+ let lt = K.ranges;
925
+ return K.prevSize !== 0 && (lt = [
926
+ ...K.ranges,
934
927
  {
935
928
  endIndex: Q + u - 1,
936
- size: q.prevSize,
937
- startIndex: q.prevIndex
929
+ size: K.prevSize,
930
+ startIndex: K.prevIndex
938
931
  }
939
932
  ]), {
940
933
  prevIndex: Q + u,
@@ -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
  );
@@ -985,14 +978,14 @@ const $o = {
985
978
  return g;
986
979
  let V = Yt();
987
980
  const N = it(a);
988
- let Z = 0, F = 0, mt = 0;
981
+ let Z = 0, F = 0, dt = 0;
989
982
  for (; Z < -u; ) {
990
- mt = N[F];
991
- const Q = N[F + 1] - mt - 1;
983
+ dt = N[F];
984
+ const Q = N[F + 1] - dt - 1;
992
985
  F++, Z += Q + 1;
993
986
  }
994
987
  if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v: lt }) => vt(Q, Math.max(0, gt + u), lt), V), Z !== -u) {
995
- const Q = ie(g.sizeTree, mt);
988
+ const Q = ie(g.sizeTree, dt);
996
989
  V = vt(V, 0, Q);
997
990
  const gt = Rt(g.sizeTree, -u + 1)[1];
998
991
  V = vt(V, 1, gt);
@@ -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 = q(
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,8 +1067,8 @@ const Xn = j(
1074
1067
  i
1075
1068
  ), { groupCounts: s, topItemsIndexes: i };
1076
1069
  },
1077
- rt(kt, It)
1078
- ), At = j(
1070
+ rt(Lt, It)
1071
+ ), At = q(
1079
1072
  ([{ log: t }]) => {
1080
1073
  const e = T(!1), n = Tt(
1081
1074
  x(
@@ -1085,17 +1078,17 @@ const Xn = j(
1085
1078
  )
1086
1079
  );
1087
1080
  return Y(e, (o) => {
1088
- o && it(t)("props updated", {}, ft.DEBUG);
1081
+ o && it(t)("props updated", {}, mt.DEBUG);
1089
1082
  }), { didMount: n, propsReady: e };
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
- const fe = j(
1091
+ const fe = q(
1099
1092
  ([
1100
1093
  { gap: t, listRefresh: e, sizes: n, totalCount: o },
1101
1094
  {
@@ -1122,18 +1115,18 @@ 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: dt, behavior: K, 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
+ dt === "end" ? (St += N + Rt(y.sizeTree, lt)[1] - k + Z, lt === gt && (St += L)) : dt === "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
- 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));
1127
+ S(), pt ? (O("retrying to scroll to", { location: H }, mt.DEBUG), M(I, H)) : (M(w, !0), O("list did not change, scroll successful", {}, mt.DEBUG));
1135
1128
  };
1136
- if (S(), q === "smooth") {
1129
+ if (S(), K === "smooth") {
1137
1130
  let pt = !1;
1138
1131
  a = Y(e, (jt) => {
1139
1132
  pt = pt || jt;
@@ -1141,10 +1134,10 @@ 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
- }, 1200), M(c, !0), O("scrolling from index to", { behavior: q, index: lt, top: St }, ft.DEBUG), { behavior: q, top: St };
1140
+ }, 1200), M(c, !0), O("scrolling from index to", { behavior: K, index: lt, top: St }, mt.DEBUG), { behavior: K, top: St };
1148
1141
  }
1149
1142
  )
1150
1143
  ),
@@ -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,28 +1161,28 @@ 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
- const me = j(
1178
+ const me = q(
1186
1179
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
1187
1180
  const l = T(!0), c = T(0), d = T(!0);
1188
1181
  return z(
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 = q(([{ 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 = q(
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,10 +1511,10 @@ 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
- const Kt = j(
1517
+ const Kt = q(
1525
1518
  ([
1526
1519
  { data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
1527
1520
  s,
@@ -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,23 +1553,23 @@ 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,
1567
1560
  Z,
1568
1561
  F,
1569
- mt,
1570
- q
1562
+ dt,
1563
+ K
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, K || []);
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, K),
1580
1573
  [],
1581
1574
  C,
1582
1575
  F,
@@ -1585,52 +1578,52 @@ const Kt = j(
1585
1578
  );
1586
1579
  const Ft = [];
1587
1580
  if (N.length > 0) {
1588
- const D = N[0], K = N[N.length - 1];
1581
+ const D = N[0], j = N[N.length - 1];
1589
1582
  let st = 0;
1590
- for (const tt of Zt(lt, D, K)) {
1591
- const X = tt.value, ct = Math.max(tt.start, D), xt = Math.min(tt.end, K);
1583
+ for (const tt of Zt(lt, D, j)) {
1584
+ const X = tt.value, ct = Math.max(tt.start, D), xt = Math.min(tt.end, j);
1592
1585
  for (let ut = ct; ut <= xt; ut++)
1593
- Ft.push({ data: q?.[ut], index: ut, offset: st, size: X }), st += X;
1586
+ Ft.push({ data: K?.[ut], index: ut, offset: st, size: X }), st += X;
1594
1587
  }
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) => {
1602
- for (const K of jt) {
1603
- const st = K.value;
1604
- let tt = st.offset, X = K.start;
1595
+ for (const j of jt) {
1596
+ const st = j.value;
1597
+ let tt = st.offset, X = j.start;
1605
1598
  const ct = st.size;
1606
1599
  if (st.offset < u) {
1607
1600
  X += Math.floor((u - st.offset + F) / (ct + F));
1608
- const ut = X - K.start;
1601
+ const ut = X - j.start;
1609
1602
  tt += ut * ct + ut * F;
1610
1603
  }
1611
1604
  X < pt && (tt += (pt - X) * ct, X = pt);
1612
- const xt = Math.min(K.end, Qt);
1605
+ const xt = Math.min(j.end, Qt);
1613
1606
  for (let ut = X; ut <= xt && !(tt >= g); ut++)
1614
- D.push({ data: q?.[ut], index: ut, offset: tt, size: ct }), tt += ct + F;
1607
+ D.push({ data: K?.[ut], index: ut, offset: tt, size: ct }), tt += ct + F;
1615
1608
  }
1616
- }), te = bn(mt, ae), b = bn(mt, de);
1609
+ }), te = wn(dt, ae), b = wn(dt, de);
1617
1610
  if (Et.length > 0 && (te > 0 || b > 0)) {
1618
- const D = Et[0], K = Et[Et.length - 1];
1611
+ const D = Et[0], j = Et[Et.length - 1];
1619
1612
  if (te > 0 && D.index > pt) {
1620
1613
  const st = Math.min(te, D.index - pt), tt = [];
1621
1614
  let X = D.offset;
1622
1615
  for (let ct = D.index - 1; ct >= D.index - st; ct--) {
1623
1616
  const ut = Zt(lt, ct, ct)[0]?.value ?? D.size;
1624
- X -= ut + F, tt.unshift({ data: q?.[ct], index: ct, offset: X, size: ut });
1617
+ X -= ut + F, tt.unshift({ data: K?.[ct], index: ct, offset: X, size: ut });
1625
1618
  }
1626
1619
  Et.unshift(...tt);
1627
1620
  }
1628
- if (b > 0 && K.index < Qt) {
1629
- const st = Math.min(b, Qt - K.index);
1630
- let tt = K.offset + K.size + F;
1631
- for (let X = K.index + 1; X <= K.index + st; X++) {
1632
- const xt = Zt(lt, X, X)[0]?.value ?? K.size;
1633
- Et.push({ data: q?.[X], index: X, offset: tt, size: xt }), tt += xt + F;
1621
+ if (b > 0 && j.index < Qt) {
1622
+ const st = Math.min(b, Qt - j.index);
1623
+ let tt = j.offset + j.size + F;
1624
+ for (let X = j.index + 1; X <= j.index + st; X++) {
1625
+ const xt = Zt(lt, X, X)[0]?.value ?? j.size;
1626
+ Et.push({ data: K?.[X], index: X, offset: tt, size: xt }), tt += xt + F;
1634
1627
  }
1635
1628
  }
1636
1629
  }
@@ -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 = q(
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 = q(
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 = q(() => ({
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 = q(
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 = q(
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 }, mt.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 }, mt.DEBUG), f(y);
1849
1842
  });
1850
1843
  }
1851
1844
  );
1852
1845
  function a(y) {
1853
- const L = yt(r, (u) => {
1854
- y && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && h === null && (it(m)("scrolling to bottom due to increased size", {}, ft.DEBUG), f("auto"));
1846
+ const k = yt(r, (u) => {
1847
+ y && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && h === null && (it(m)("scrolling to bottom due to increased size", {}, mt.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 = q(
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 = q(
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 = q(
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 = q(([{ 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 = q(
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 = q(([{ 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 = q(
2072
2065
  ([
2073
2066
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
2074
2067
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
@@ -2082,24 +2075,24 @@ 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
  ),
2092
2085
  P(([f]) => f !== 0),
2093
2086
  $(o, l, n, r, I, w),
2094
2087
  P(([, f, a, S, , , H]) => !H && !S && f !== 0 && a === ue),
2095
- B(([[f], , , , , a]) => (a("Upward scrolling compensation", { amount: f }, ft.DEBUG), f))
2088
+ B(([[f], , , , , a]) => (a("Upward scrolling compensation", { amount: f }, mt.DEBUG), f))
2096
2089
  )
2097
2090
  );
2098
2091
  function h(f) {
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 = q(
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 = q(
2188
2181
  ([
2189
2182
  {
2190
2183
  data: t,
@@ -2208,16 +2201,18 @@ 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
- C.windowViewportRect,
2220
- B((F) => F.visibleHeight)
2212
+ at(C.windowViewportRect, f.headerHeight, f.fixedHeaderHeight),
2213
+ // Keep a measurement range active when a window-scrolling list starts below the viewport.
2214
+ // One content pixel beyond the headers is enough to render the probe item and estimate the full list height.
2215
+ B(([F, dt, K]) => Math.max(dt + K + 1, F.visibleHeight))
2221
2216
  ),
2222
2217
  f.viewportHeight
2223
2218
  ), {
@@ -2240,7 +2235,7 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2240
2235
  ...S,
2241
2236
  groupIndices: i,
2242
2237
  itemSize: c,
2243
- listState: k,
2238
+ listState: L,
2244
2239
  minOverscanItemCount: O,
2245
2240
  scrollToIndex: y,
2246
2241
  // output
@@ -2257,20 +2252,20 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2257
2252
  };
2258
2253
  },
2259
2254
  rt(
2260
- kt,
2255
+ Lt,
2261
2256
  me,
2262
2257
  It,
2263
- rr,
2264
2258
  er,
2259
+ Jo,
2265
2260
  Kt,
2266
2261
  fe,
2267
- cr,
2268
- ir,
2269
- Xn,
2270
- ur
2262
+ sr,
2263
+ or,
2264
+ qn,
2265
+ ir
2271
2266
  )
2272
2267
  );
2273
- function ar(t, e) {
2268
+ function lr(t, e) {
2274
2269
  const n = {}, o = {};
2275
2270
  let r = 0;
2276
2271
  const s = t.length;
@@ -2281,7 +2276,7 @@ function ar(t, e) {
2281
2276
  return n;
2282
2277
  }
2283
2278
  const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2284
- function Je(t, e, n) {
2279
+ function Xe(t, e, n) {
2285
2280
  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
2281
  function c(f, a) {
2287
2282
  f.propsReady !== void 0 && M(f.propsReady, !1);
@@ -2303,23 +2298,23 @@ function Je(t, e, n) {
2303
2298
  }, a), {});
2304
2299
  }
2305
2300
  function m(f) {
2306
- return i.reduce((a, S) => (a[S] = bo(f[e.events[S]]), a), {});
2301
+ return i.reduce((a, S) => (a[S] = Co(f[e.events[S]]), a), {});
2307
2302
  }
2308
2303
  const v = E.forwardRef(function(a, S) {
2309
- const { children: H, ...y } = a, [L] = E.useState(() => ye(Eo(t), (C) => {
2304
+ const { children: H, ...y } = a, [k] = E.useState(() => ye(bo(t), (C) => {
2310
2305
  c(C, y);
2311
- })), [u] = E.useState(pn(m, L));
2306
+ })), [u] = E.useState(mn(m, k));
2312
2307
  Ie(() => {
2313
2308
  for (const C of i)
2314
2309
  C in y && Y(u[C], y[C]);
2315
2310
  return () => {
2316
- Object.values(u).map(De);
2311
+ Object.values(u).map(Ne);
2317
2312
  };
2318
- }, [y, u, L]), Ie(() => {
2319
- c(L, y);
2320
- }), E.useImperativeHandle(S, mn(d(L)));
2313
+ }, [y, u, k]), Ie(() => {
2314
+ c(k, y);
2315
+ }), E.useImperativeHandle(S, fn(d(k)));
2321
2316
  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 }) });
2317
+ return /* @__PURE__ */ G(l.Provider, { value: k, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...lr([...o, ...r, ...i], y), children: H }) });
2323
2318
  }), p = (f) => {
2324
2319
  const a = E.useContext(l);
2325
2320
  return E.useCallback(
@@ -2339,10 +2334,10 @@ function Je(t, e, n) {
2339
2334
  () => it(S)
2340
2335
  );
2341
2336
  }, w = (f) => {
2342
- const S = E.useContext(l)[f], [H, y] = E.useState(pn(it, S));
2337
+ const S = E.useContext(l)[f], [H, y] = E.useState(mn(it, S));
2343
2338
  return Ie(
2344
- () => Y(S, (L) => {
2345
- L !== H && y(mn(L));
2339
+ () => Y(S, (k) => {
2340
+ k !== H && y(fn(k));
2346
2341
  }),
2347
2342
  [S, H]
2348
2343
  ), H;
@@ -2357,25 +2352,25 @@ function Je(t, e, n) {
2357
2352
  usePublisher: p
2358
2353
  };
2359
2354
  }
2360
- const Re = E.createContext(void 0), lo = E.createContext(void 0), Le = "-webkit-sticky", Hn = "sticky", Qe = so(() => {
2355
+ const Re = E.createContext(void 0), ro = E.createContext(void 0), ke = "-webkit-sticky", bn = "sticky", Je = no(() => {
2361
2356
  if (typeof document > "u")
2362
- return Hn;
2357
+ return bn;
2363
2358
  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) {
2359
+ return t.style.position = ke, t.style.position === ke ? ke : bn;
2360
+ }), so = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2361
+ function Le(t) {
2367
2362
  return "self" in t;
2368
2363
  }
2369
- function dr(t) {
2364
+ function cr(t) {
2370
2365
  return "body" in t;
2371
2366
  }
2372
- function uo(t, e, n, o = Jt, r, s) {
2367
+ function io(t, e, n, o = Jt, r, s) {
2373
2368
  const i = E.useRef(null), l = E.useRef(null), c = E.useRef(null), d = E.useCallback(
2374
2369
  (p) => {
2375
2370
  let I, w, R;
2376
2371
  const h = p.target;
2377
- if (dr(h) || ke(h)) {
2378
- const a = ke(h) ? h : h.defaultView;
2372
+ if (cr(h) || Le(h)) {
2373
+ const a = Le(h) ? h : h.defaultView;
2379
2374
  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
2375
  } else
2381
2376
  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 +2381,14 @@ function uo(t, e, n, o = Jt, r, s) {
2386
2381
  viewportHeight: w
2387
2382
  });
2388
2383
  };
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));
2384
+ 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
2385
  },
2391
2386
  [t, e, s]
2392
2387
  );
2393
2388
  E.useEffect(() => {
2394
2389
  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);
2390
+ return o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
2391
+ o(null), p.removeEventListener("scroll", d);
2397
2392
  };
2398
2393
  }, [i, d, n, o, r]);
2399
2394
  function m(p) {
@@ -2402,7 +2397,7 @@ function uo(t, e, n, o = Jt, r, s) {
2402
2397
  return;
2403
2398
  const w = p.behavior === "smooth";
2404
2399
  let R, h, f;
2405
- ke(I) ? (h = Math.max(
2400
+ Le(I) ? (h = Math.max(
2406
2401
  Ht(I.document.documentElement, s === !0 ? "width" : "height"),
2407
2402
  s === !0 ? I.document.documentElement.scrollWidth : I.document.documentElement.scrollHeight
2408
2403
  ), 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 +2407,7 @@ function uo(t, e, n, o = Jt, r, s) {
2412
2407
  return;
2413
2408
  }
2414
2409
  const S = Math.ceil(Math.max(Math.min(a, p.top), 0));
2415
- if (p.top = S, Qn(R, h) || S === f) {
2410
+ if (p.top = S, Zn(R, h) || S === f) {
2416
2411
  t({ scrollHeight: h, scrollTop: f, viewportHeight: R }), w && e(!0);
2417
2412
  return;
2418
2413
  }
@@ -2420,22 +2415,22 @@ function uo(t, e, n, o = Jt, r, s) {
2420
2415
  c.current = null, l.current = null, e(!0);
2421
2416
  }, 1e3)) : l.current = null, s === !0 && (p = {
2422
2417
  ...p.behavior === void 0 ? {} : { behavior: p.behavior },
2423
- left: In(I, S)
2418
+ left: hn(I, S)
2424
2419
  }), I.scrollTo(p);
2425
2420
  }
2426
2421
  function v(p) {
2427
2422
  s === !0 && (p = {
2428
2423
  ...p.behavior === void 0 ? {} : { behavior: p.behavior },
2429
- ...p.top === void 0 ? {} : { left: In(i.current, p.top) }
2424
+ ...p.top === void 0 ? {} : { left: hn(i.current, p.top) }
2430
2425
  }), i.current.scrollBy(p);
2431
2426
  }
2432
2427
  return { scrollByCallback: v, scrollerRef: i, scrollToCallback: m };
2433
2428
  }
2434
- function tn(t) {
2429
+ function Qe(t) {
2435
2430
  return t;
2436
2431
  }
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(
2432
+ const ur = /* @__PURE__ */ q(() => {
2433
+ 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
2434
  x(
2440
2435
  n,
2441
2436
  B((d) => d[l]),
@@ -2460,11 +2455,11 @@ const fr = /* @__PURE__ */ j(() => {
2460
2455
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
2461
2456
  TopItemListComponent: i("TopItemList")
2462
2457
  };
2463
- }), mr = /* @__PURE__ */ j(
2458
+ }), ar = /* @__PURE__ */ q(
2464
2459
  ([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(
2460
+ rt(oo, ur)
2461
+ ), 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 }) {
2462
+ 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
2463
  o,
2469
2464
  I,
2470
2465
  p,
@@ -2475,10 +2470,10 @@ const fr = /* @__PURE__ */ j(() => {
2475
2470
  h,
2476
2471
  A("skipAnimationFrameInResizeObserver")
2477
2472
  ), [a, S] = E.useState(0);
2478
- rn("deviation", (F) => {
2473
+ on("deviation", (F) => {
2479
2474
  a !== F && S(F);
2480
2475
  });
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 ? {} : {
2476
+ 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
2477
  boxSizing: "border-box",
2483
2478
  ...h ? {
2484
2479
  display: "inline-block",
@@ -2495,21 +2490,21 @@ const fr = /* @__PURE__ */ j(() => {
2495
2490
  ...N ? {} : { visibility: "hidden" }
2496
2491
  };
2497
2492
  return !e && n.totalCount === 0 && H !== null && H !== void 0 ? /* @__PURE__ */ G(H, { ...ot(H, m) }) : /* @__PURE__ */ G(
2498
- L,
2493
+ k,
2499
2494
  {
2500
- ...ot(L, m),
2495
+ ...ot(k, m),
2501
2496
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2502
2497
  ref: f,
2503
2498
  style: Z,
2504
2499
  children: (e ? n.topItems : n.items).map((F) => {
2505
- const mt = F.originalIndex, q = C(mt + n.firstItemIndex, F.data, m);
2506
- return k ? /* @__PURE__ */ Dt(
2500
+ const dt = F.originalIndex, K = C(dt + n.firstItemIndex, F.data, m);
2501
+ return L ? /* @__PURE__ */ Dt(
2507
2502
  y,
2508
2503
  {
2509
2504
  ...ot(y, m),
2510
2505
  height: F.size,
2511
2506
  index: F.index,
2512
- key: q,
2507
+ key: K,
2513
2508
  type: F.type || "item",
2514
2509
  ...F.type === "group" ? {} : { groupIndex: F.groupIndex }
2515
2510
  }
@@ -2517,37 +2512,37 @@ const fr = /* @__PURE__ */ j(() => {
2517
2512
  g,
2518
2513
  {
2519
2514
  ...ot(g, m),
2520
- "data-index": mt,
2515
+ "data-index": dt,
2521
2516
  "data-item-index": F.index,
2522
2517
  "data-known-size": F.size,
2523
- key: q,
2524
- style: hr
2518
+ key: K,
2519
+ style: fr
2525
2520
  },
2526
2521
  v(F.index, m)
2527
2522
  ) : /* @__PURE__ */ Dt(
2528
2523
  u,
2529
2524
  {
2530
2525
  ...ot(u, m),
2531
- ...fo(u, F.data),
2532
- "data-index": mt,
2526
+ ...co(u, F.data),
2527
+ "data-index": dt,
2533
2528
  "data-item-group-index": F.groupIndex,
2534
2529
  "data-item-index": F.index,
2535
2530
  "data-known-size": F.size,
2536
- key: q,
2537
- style: h ? gr : ao
2531
+ key: K,
2532
+ style: h ? mr : lo
2538
2533
  },
2539
2534
  O ? d(F.index, F.groupIndex, F.data, m) : d(F.index, F.data, m)
2540
2535
  );
2541
2536
  })
2542
2537
  }
2543
2538
  );
2544
- }), Ir = {
2539
+ }), pr = {
2545
2540
  height: "100%",
2546
2541
  outline: "none",
2547
2542
  overflowY: "auto",
2548
2543
  position: "relative",
2549
2544
  WebkitOverflowScrolling: "touch"
2550
- }, Sr = {
2545
+ }, hr = {
2551
2546
  outline: "none",
2552
2547
  overflowX: "auto",
2553
2548
  position: "relative"
@@ -2557,12 +2552,12 @@ const fr = /* @__PURE__ */ j(() => {
2557
2552
  top: 0,
2558
2553
  width: "100%",
2559
2554
  ...t ? { display: "flex", flexDirection: "column" } : void 0
2560
- }), en = (t, e, n = 0) => ({
2555
+ }), tn = (t, e, n = 0) => ({
2561
2556
  ...He(t),
2562
2557
  position: e ? "relative" : "absolute",
2563
2558
  top: e ? -n : 0
2564
- }), xr = {
2565
- position: Qe(),
2559
+ }), gr = {
2560
+ position: Je(),
2566
2561
  top: 0,
2567
2562
  width: "100%",
2568
2563
  zIndex: 1
@@ -2571,11 +2566,11 @@ function ot(t, e) {
2571
2566
  if (typeof t != "string")
2572
2567
  return { context: e };
2573
2568
  }
2574
- function fo(t, e) {
2569
+ function co(t, e) {
2575
2570
  return { item: typeof t == "string" ? void 0 : e };
2576
2571
  }
2577
- const vr = /* @__PURE__ */ E.memo(function() {
2578
- const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = Lt(
2572
+ const Ir = /* @__PURE__ */ E.memo(function() {
2573
+ const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = kt(
2579
2574
  E.useMemo(
2580
2575
  () => (i) => {
2581
2576
  n(Ht(i, "height"));
@@ -2586,8 +2581,8 @@ const vr = /* @__PURE__ */ E.memo(function() {
2586
2581
  A("skipAnimationFrameInResizeObserver")
2587
2582
  ), s = A("context");
2588
2583
  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(
2584
+ }), Sr = /* @__PURE__ */ E.memo(function() {
2585
+ const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = kt(
2591
2586
  E.useMemo(
2592
2587
  () => (i) => {
2593
2588
  n(Ht(i, "height"));
@@ -2599,9 +2594,9 @@ const vr = /* @__PURE__ */ E.memo(function() {
2599
2594
  ), s = A("context");
2600
2595
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
2601
2596
  });
2602
- function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2597
+ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2603
2598
  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(
2599
+ 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
2600
  d,
2606
2601
  v,
2607
2602
  m,
@@ -2615,7 +2610,7 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2615
2610
  "data-testid": "virtuoso-scroller",
2616
2611
  "data-virtuoso-scroller": !0,
2617
2612
  ref: R,
2618
- style: { ...I ? Sr : Ir, ...i },
2613
+ style: { ...I ? hr : pr, ...i },
2619
2614
  tabIndex: 0,
2620
2615
  ...c,
2621
2616
  ...ot(m, l),
@@ -2624,16 +2619,16 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2624
2619
  );
2625
2620
  });
2626
2621
  }
2627
- function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2622
+ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2628
2623
  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(
2624
+ 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
2625
  d,
2631
2626
  v,
2632
2627
  m,
2633
2628
  h,
2634
2629
  w
2635
2630
  );
2636
- return co(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
2631
+ return so(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
2637
2632
  a.current = null;
2638
2633
  }), [a, w]), t("windowScrollTo", S), t("scrollBy", f), /* @__PURE__ */ G(
2639
2634
  m,
@@ -2648,43 +2643,43 @@ function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2648
2643
  );
2649
2644
  });
2650
2645
  }
2651
- const Cr = ({ children: t }) => {
2646
+ const xr = ({ children: t }) => {
2652
2647
  const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
2653
2648
  () => re(n, (c) => Ht(c, s ? "width" : "height")),
2654
2649
  [n, s]
2655
- ), l = Lt(i, !0, A("skipAnimationFrameInResizeObserver"));
2650
+ ), l = kt(i, !0, A("skipAnimationFrameInResizeObserver"));
2656
2651
  return E.useEffect(() => {
2657
2652
  e && (n(e.viewportHeight), o(e.itemHeight));
2658
2653
  }, [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(
2654
+ }, vr = ({ children: t }) => {
2655
+ const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = $e(
2661
2656
  n,
2662
2657
  r,
2663
2658
  A("skipAnimationFrameInResizeObserver")
2664
2659
  ), c = A("alignToBottom");
2665
2660
  return E.useEffect(() => {
2666
2661
  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");
2662
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: tn(c, s, i), children: t });
2663
+ }, Tr = ({ children: t }) => {
2664
+ const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...gr, marginTop: `${n}px` }, r = A("context");
2670
2665
  return /* @__PURE__ */ G(e, { style: o, ...ot(e, r), children: t });
2671
- }, br = /* @__PURE__ */ E.memo(function(e) {
2666
+ }, Cr = /* @__PURE__ */ E.memo(function(e) {
2672
2667
  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, {})
2668
+ return /* @__PURE__ */ $t(r || n ? yr : wr, { ...e, context: s, children: [
2669
+ o && /* @__PURE__ */ G(Tr, { children: /* @__PURE__ */ G(Rn, { showTopList: !0 }) }),
2670
+ /* @__PURE__ */ $t(r || n ? vr : xr, { children: [
2671
+ /* @__PURE__ */ G(Ir, {}),
2672
+ /* @__PURE__ */ G(Rn, {}),
2673
+ /* @__PURE__ */ G(Sr, {})
2679
2674
  ] })
2680
2675
  ] });
2681
2676
  }), {
2682
- Component: mo,
2683
- useEmitter: rn,
2677
+ Component: uo,
2678
+ useEmitter: on,
2684
2679
  useEmitterValue: A,
2685
2680
  usePublisher: Ct
2686
- } = /* @__PURE__ */ Je(
2687
- mr,
2681
+ } = /* @__PURE__ */ Xe(
2682
+ ar,
2688
2683
  {
2689
2684
  optional: {
2690
2685
  restoreStateFrom: "restoreStateFrom",
@@ -2744,15 +2739,15 @@ const Cr = ({ children: t }) => {
2744
2739
  groupIndices: "groupIndices"
2745
2740
  }
2746
2741
  },
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(() => {
2742
+ Cr
2743
+ ), wr = /* @__PURE__ */ en({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), yr = /* @__PURE__ */ nn({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), es = uo, ns = uo, br = /* @__PURE__ */ q(() => {
2749
2744
  const t = T((d) => /* @__PURE__ */ $t("td", { children: [
2750
2745
  "Item $",
2751
2746
  d
2752
2747
  ] })), e = T(null), n = T((d) => /* @__PURE__ */ $t("td", { colSpan: 1e3, children: [
2753
2748
  "Group ",
2754
2749
  d
2755
- ] })), o = T(null), r = T(null), s = T({}), i = T(tn), l = T(Jt), c = (d, m = null) => ht(
2750
+ ] })), o = T(null), r = T(null), s = T({}), i = T(Qe), l = T(Jt), c = (d, m = null) => ht(
2756
2751
  x(
2757
2752
  s,
2758
2753
  B((v) => v[d]),
@@ -2780,11 +2775,11 @@ const Cr = ({ children: t }) => {
2780
2775
  TableRowComponent: c("TableRow", "tr"),
2781
2776
  GroupComponent: c("Group", "tr")
2782
2777
  };
2783
- }), Br = /* @__PURE__ */ j(
2778
+ }), Rr = /* @__PURE__ */ q(
2784
2779
  ([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), []);
2780
+ rt(oo, br)
2781
+ ), 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 }) {
2782
+ 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
2783
  return (e ? n.topItems : n.items).map((h) => {
2789
2784
  const f = h.originalIndex, a = o(f + r, h.data, s), S = e ? f === 0 ? 0 : w[f - 1] : 0;
2790
2785
  return i ? /* @__PURE__ */ Dt(
@@ -2805,7 +2800,7 @@ const Cr = ({ children: t }) => {
2805
2800
  "data-known-size": h.size,
2806
2801
  key: a,
2807
2802
  style: {
2808
- ...Bn,
2803
+ ...Hn,
2809
2804
  top: l
2810
2805
  }
2811
2806
  },
@@ -2814,19 +2809,19 @@ const Cr = ({ children: t }) => {
2814
2809
  I,
2815
2810
  {
2816
2811
  ...ot(I, s),
2817
- ...fo(I, h.data),
2812
+ ...co(I, h.data),
2818
2813
  "data-index": f,
2819
2814
  "data-item-index": h.index,
2820
2815
  "data-known-size": h.size,
2821
2816
  "data-item-group-index": h.groupIndex,
2822
2817
  key: a,
2823
- style: e ? { ...Bn, top: l + S } : kr
2818
+ style: e ? { ...Hn, top: l + S } : Br
2824
2819
  },
2825
2820
  c ? d(h.index, h.groupIndex, h.data, s) : d(h.index, h.data, s)
2826
2821
  );
2827
2822
  });
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(
2823
+ }), Or = /* @__PURE__ */ E.memo(function() {
2824
+ 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
2825
  o,
2831
2826
  m,
2832
2827
  d,
@@ -2837,21 +2832,21 @@ const Cr = ({ children: t }) => {
2837
2832
  !1,
2838
2833
  _("skipAnimationFrameInResizeObserver")
2839
2834
  ), [w, R] = E.useState(0);
2840
- sn("deviation", (O) => {
2835
+ rn("deviation", (O) => {
2841
2836
  w !== O && (I.current.style.marginTop = `${O}px`, R(O));
2842
2837
  });
2843
- const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Lr, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
2838
+ const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Er, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
2844
2839
  if (H === 0 && h !== null && h !== void 0)
2845
2840
  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;
2841
+ 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
2842
  return /* @__PURE__ */ $t(a, { "data-testid": "virtuoso-item-list", ref: p, ...ot(a, y), children: [
2848
2843
  C,
2849
- n && /* @__PURE__ */ G(On, { showTopList: !0 }),
2850
- /* @__PURE__ */ G(On, {}),
2851
- k
2844
+ n && /* @__PURE__ */ G(En, { showTopList: !0 }),
2845
+ /* @__PURE__ */ G(En, {}),
2846
+ L
2852
2847
  ] });
2853
- }), Fr = ({ children: t }) => {
2854
- const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = Lt(
2848
+ }), kr = ({ children: t }) => {
2849
+ const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = kt(
2855
2850
  E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
2856
2851
  !0,
2857
2852
  _("skipAnimationFrameInResizeObserver")
@@ -2859,25 +2854,25 @@ const Cr = ({ children: t }) => {
2859
2854
  return E.useEffect(() => {
2860
2855
  e && (n(e.viewportHeight), o(e.itemHeight));
2861
2856
  }, [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(
2857
+ }, Lr = ({ children: t }) => {
2858
+ const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = $e(
2864
2859
  n,
2865
2860
  r,
2866
2861
  _("skipAnimationFrameInResizeObserver")
2867
2862
  );
2868
2863
  return E.useEffect(() => {
2869
2864
  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(
2865
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: tn(!1, s), children: t });
2866
+ }, zr = /* @__PURE__ */ E.memo(function(e) {
2867
+ const n = _("useWindowScroll"), o = _("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = kt(
2873
2868
  E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
2874
2869
  !0,
2875
2870
  _("skipAnimationFrameInResizeObserver")
2876
- ), m = Lt(
2871
+ ), m = kt(
2877
2872
  E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
2878
2873
  !0,
2879
2874
  _("skipAnimationFrameInResizeObserver")
2880
- ), v = o || n ? Gr : Pr, p = o || n ? Vr : Fr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
2875
+ ), v = o || n ? Vr : Fr, p = o || n ? Lr : kr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
2881
2876
  w,
2882
2877
  {
2883
2878
  ref: d,
@@ -2898,16 +2893,16 @@ const Cr = ({ children: t }) => {
2898
2893
  ) : null;
2899
2894
  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
2895
  h,
2901
- /* @__PURE__ */ G(zr, {}, "TableBody"),
2896
+ /* @__PURE__ */ G(Or, {}, "TableBody"),
2902
2897
  f
2903
2898
  ] }) }) });
2904
2899
  }), {
2905
- Component: po,
2906
- useEmitter: sn,
2900
+ Component: ao,
2901
+ useEmitter: rn,
2907
2902
  useEmitterValue: _,
2908
2903
  usePublisher: bt
2909
- } = /* @__PURE__ */ Je(
2910
- Br,
2904
+ } = /* @__PURE__ */ Xe(
2905
+ Rr,
2911
2906
  {
2912
2907
  optional: {
2913
2908
  restoreStateFrom: "restoreStateFrom",
@@ -2963,8 +2958,8 @@ const Cr = ({ children: t }) => {
2963
2958
  groupIndices: "groupIndices"
2964
2959
  }
2965
2960
  },
2966
- Wr
2967
- ), Pr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), Gr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), is = po, ls = po, Ln = {
2961
+ zr
2962
+ ), Fr = /* @__PURE__ */ en({ useEmitter: rn, useEmitterValue: _, usePublisher: bt }), Vr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: _, usePublisher: bt }), os = ao, rs = ao, Bn = {
2968
2963
  bottom: 0,
2969
2964
  itemHeight: 0,
2970
2965
  items: [],
@@ -2972,7 +2967,7 @@ const Cr = ({ children: t }) => {
2972
2967
  offsetBottom: 0,
2973
2968
  offsetTop: 0,
2974
2969
  top: 0
2975
- }, Ar = {
2970
+ }, Wr = {
2976
2971
  bottom: 0,
2977
2972
  itemHeight: 0,
2978
2973
  items: [{ index: 0 }],
@@ -2980,23 +2975,23 @@ const Cr = ({ children: t }) => {
2980
2975
  offsetBottom: 0,
2981
2976
  offsetTop: 0,
2982
2977
  top: 0
2983
- }, { ceil: kn, floor: Ce, max: oe, min: ze, round: zn } = Math;
2984
- function Fn(t, e, n) {
2978
+ }, { ceil: On, floor: Ce, max: oe, min: ze, round: kn } = Math;
2979
+ function Ln(t, e, n) {
2985
2980
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2986
2981
  }
2987
- function Mr(t) {
2982
+ function Pr(t) {
2988
2983
  return {
2989
- ...Ar,
2984
+ ...Wr,
2990
2985
  items: t
2991
2986
  };
2992
2987
  }
2993
2988
  function Se(t, e) {
2994
2989
  return t !== void 0 && t.width === e.width && t.height === e.height;
2995
2990
  }
2996
- function _r(t, e) {
2991
+ function Gr(t, e) {
2997
2992
  return t !== void 0 && t.column === e.column && t.row === e.row;
2998
2993
  }
2999
- const Nr = /* @__PURE__ */ j(
2994
+ const Ar = /* @__PURE__ */ q(
3000
2995
  ([
3001
2996
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
3002
2997
  { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: v },
@@ -3006,27 +3001,27 @@ const Nr = /* @__PURE__ */ j(
3006
3001
  { customScrollParent: h, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: S, windowViewportRect: H },
3007
3002
  y
3008
3003
  ]) => {
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);
3004
+ 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 }), dt = U(), K = U(), Q = T(!1), gt = T(0), lt = T(!0), St = T(!1), Ft = T(!1);
3010
3005
  Y(
3011
3006
  x(
3012
3007
  w,
3013
3008
  $(gt),
3014
- P(([b, D]) => !Me(D))
3009
+ P(([b, D]) => !Ae(D))
3015
3010
  ),
3016
3011
  () => {
3017
3012
  M(lt, !1);
3018
3013
  }
3019
3014
  ), Y(
3020
3015
  x(
3021
- at(w, lt, k, C, gt, St),
3022
- P(([b, D, K, st, , tt]) => b && !D && K.height !== 0 && st.height !== 0 && !tt)
3016
+ at(w, lt, L, C, gt, St),
3017
+ P(([b, D, j, st, , tt]) => b && !D && j.height !== 0 && st.height !== 0 && !tt)
3023
3018
  ),
3024
3019
  ([, , , , b]) => {
3025
3020
  if (b === void 0) {
3026
3021
  M(lt, !0);
3027
3022
  return;
3028
3023
  }
3029
- M(St, !0), qe(1, () => {
3024
+ M(St, !0), je(1, () => {
3030
3025
  M(O, b);
3031
3026
  }), yt(x(d), () => {
3032
3027
  M(e, [0, 0]), M(lt, !0);
@@ -3034,7 +3029,7 @@ const Nr = /* @__PURE__ */ j(
3034
3029
  }
3035
3030
  ), z(
3036
3031
  x(
3037
- q,
3032
+ K,
3038
3033
  P((b) => b != null && b.scrollTop > 0),
3039
3034
  Bt(0)
3040
3035
  ),
@@ -3042,11 +3037,11 @@ const Nr = /* @__PURE__ */ j(
3042
3037
  ), Y(
3043
3038
  x(
3044
3039
  w,
3045
- $(q),
3040
+ $(K),
3046
3041
  P(([, b]) => b != null)
3047
3042
  ),
3048
3043
  ([, 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) => {
3044
+ 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
3045
  M(Q, !1);
3051
3046
  }), M(c, { top: b.scrollTop })));
3052
3047
  }
@@ -3060,25 +3055,25 @@ const Nr = /* @__PURE__ */ j(
3060
3055
  x(
3061
3056
  at(
3062
3057
  W(C, Se),
3063
- W(k, Se),
3058
+ W(L, Se),
3064
3059
  W(F, (b, D) => b !== void 0 && b.column === D.column && b.row === D.row),
3065
3060
  W(d)
3066
3061
  ),
3067
- B(([b, D, K, st]) => ({
3068
- gap: K,
3062
+ B(([b, D, j, st]) => ({
3063
+ gap: j,
3069
3064
  item: D,
3070
3065
  scrollTop: st,
3071
3066
  viewport: b
3072
3067
  }))
3073
3068
  ),
3074
- mt
3069
+ dt
3075
3070
  ), z(
3076
3071
  x(
3077
3072
  at(
3078
- W(L),
3073
+ W(k),
3079
3074
  o,
3080
- W(F, _r),
3081
- W(k, Se),
3075
+ W(F, Gr),
3076
+ W(L, Se),
3082
3077
  W(C, Se),
3083
3078
  W(Z),
3084
3079
  W(u),
@@ -3090,7 +3085,7 @@ const Nr = /* @__PURE__ */ j(
3090
3085
  B(
3091
3086
  ([
3092
3087
  b,
3093
- [D, K],
3088
+ [D, j],
3094
3089
  st,
3095
3090
  tt,
3096
3091
  X,
@@ -3100,18 +3095,18 @@ const Nr = /* @__PURE__ */ j(
3100
3095
  ut,
3101
3096
  Vt
3102
3097
  ]) => {
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;
3098
+ const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: sn } = X;
3099
+ if (xt === 0 && (b === 0 || sn === 0))
3100
+ return Bn;
3106
3101
  if (Ee === 0) {
3107
- const fn = Ye(Vt, b), So = fn + Math.max(xt - 1, 0);
3108
- return Mr(Fn(fn, So, ct));
3102
+ const dn = qe(Vt, b), ho = dn + Math.max(xt - 1, 0);
3103
+ return Pr(Ln(dn, ho, ct));
3109
3104
  }
3110
- const ge = ho(ln, Ee, Wt);
3105
+ const ge = fo(sn, Ee, Wt);
3111
3106
  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 };
3107
+ ut ? D === 0 && j === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * On((j + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
3108
+ 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;
3109
+ return { bottom: cn, itemHeight: he, items: ln, itemWidth: Ee, offsetBottom: po, offsetTop: un, top: un };
3115
3110
  }
3116
3111
  )
3117
3112
  ),
@@ -3122,13 +3117,13 @@ const Nr = /* @__PURE__ */ j(
3122
3117
  P((b) => b !== null),
3123
3118
  B((b) => b.length)
3124
3119
  ),
3125
- L
3120
+ k
3126
3121
  ), z(
3127
3122
  x(
3128
- at(C, k, g, F),
3129
- P(([b, D, { items: K }]) => K.length > 0 && D.height !== 0 && b.height !== 0),
3130
- B(([b, D, { items: K }, st]) => {
3131
- const { bottom: tt, top: X } = Vn(b, st, D, K);
3123
+ at(C, L, g, F),
3124
+ P(([b, D, { items: j }]) => j.length > 0 && D.height !== 0 && b.height !== 0),
3125
+ B(([b, D, { items: j }, st]) => {
3126
+ const { bottom: tt, top: X } = zn(b, st, D, j);
3132
3127
  return [X, tt];
3133
3128
  }),
3134
3129
  nt(le)
@@ -3146,12 +3141,12 @@ const Nr = /* @__PURE__ */ j(
3146
3141
  );
3147
3142
  const jt = Tt(
3148
3143
  x(
3149
- at(g, L),
3144
+ at(g, k),
3150
3145
  P(([{ items: b }]) => b.length > 0),
3151
3146
  $(pt),
3152
- P(([[b, D], K]) => {
3147
+ P(([[b, D], j]) => {
3153
3148
  const tt = b.items[b.items.length - 1].index === D - 1;
3154
- return (K || b.bottom > 0 && b.itemHeight > 0 && b.offsetBottom === 0 && b.items.length === D) && tt;
3149
+ return (j || b.bottom > 0 && b.itemHeight > 0 && b.offsetBottom === 0 && b.items.length === D) && tt;
3155
3150
  }),
3156
3151
  B(([[, b]]) => b - 1),
3157
3152
  nt()
@@ -3172,20 +3167,20 @@ const Nr = /* @__PURE__ */ j(
3172
3167
  endIndex: b[b.length - 1].index,
3173
3168
  startIndex: b[0].index
3174
3169
  })),
3175
- nt(jn),
3170
+ nt($n),
3176
3171
  zt(0)
3177
3172
  )
3178
3173
  );
3179
3174
  z(Et, I.scrollSeekRangeChanged), z(
3180
3175
  x(
3181
3176
  O,
3182
- $(C, k, L, F),
3183
- B(([b, D, K, st, tt]) => {
3184
- const X = Jn(b), { align: ct, behavior: xt, offset: ut } = X;
3177
+ $(C, L, k, F),
3178
+ B(([b, D, j, st, tt]) => {
3179
+ const X = Yn(b), { align: ct, behavior: xt, offset: ut } = X;
3185
3180
  let Vt = X.index;
3186
3181
  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 };
3182
+ let Wt = Me(D, tt, j, Vt);
3183
+ return ct === "end" ? Wt = kn(Wt - D.height + j.height) : ct === "center" && (Wt = kn(Wt - D.height / 2 + j.height / 2)), ut !== void 0 && ut !== 0 && (Wt += ut), { behavior: xt, top: Wt };
3189
3184
  })
3190
3185
  ),
3191
3186
  c
@@ -3213,9 +3208,9 @@ const Nr = /* @__PURE__ */ j(
3213
3208
  headerHeight: s,
3214
3209
  increaseViewportBy: t,
3215
3210
  initialItemCount: u,
3216
- itemDimensions: k,
3211
+ itemDimensions: L,
3217
3212
  overscan: n,
3218
- restoreStateFrom: q,
3213
+ restoreStateFrom: K,
3219
3214
  scrollBy: i,
3220
3215
  scrollContainerState: l,
3221
3216
  scrollHeight: V,
@@ -3223,7 +3218,7 @@ const Nr = /* @__PURE__ */ j(
3223
3218
  scrollToIndex: O,
3224
3219
  scrollTop: d,
3225
3220
  smoothScrollTargetReached: m,
3226
- totalCount: L,
3221
+ totalCount: k,
3227
3222
  useWindowScroll: f,
3228
3223
  viewportDimensions: C,
3229
3224
  windowScrollContainerState: a,
@@ -3240,29 +3235,29 @@ const Nr = /* @__PURE__ */ j(
3240
3235
  propsReady: R,
3241
3236
  rangeChanged: Et,
3242
3237
  startReached: Qt,
3243
- stateChanged: mt,
3238
+ stateChanged: dt,
3244
3239
  stateRestoreInProgress: Q,
3245
3240
  ...y
3246
3241
  };
3247
3242
  },
3248
- rt(Ze, It, pe, ro, At, Xe, Gt)
3243
+ rt(Ye, It, pe, eo, At, Ze, Gt)
3249
3244
  );
3250
- function ho(t, e, n) {
3245
+ function fo(t, e, n) {
3251
3246
  return oe(1, Ce((t + n) / (Ce(e) + n)));
3252
3247
  }
3253
- function Vn(t, e, n, o) {
3248
+ function zn(t, e, n, o) {
3254
3249
  const { height: r } = n;
3255
3250
  if (r === void 0 || o.length === 0)
3256
3251
  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 };
3252
+ const s = Me(t, e, n, o[0].index);
3253
+ return { bottom: Me(t, e, n, o[o.length - 1].index) + r, top: s };
3259
3254
  }
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;
3255
+ function Me(t, e, n, o) {
3256
+ const r = fo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
3262
3257
  return i > 0 ? i + e.row : i;
3263
3258
  }
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(
3259
+ const Mr = /* @__PURE__ */ q(() => {
3260
+ 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
3261
  x(
3267
3262
  e,
3268
3263
  B((I) => I[v]),
@@ -3288,23 +3283,23 @@ const Dr = /* @__PURE__ */ j(() => {
3288
3283
  scrollerRef: l,
3289
3284
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
3290
3285
  };
3291
- }), $r = /* @__PURE__ */ j(
3286
+ }), _r = /* @__PURE__ */ q(
3292
3287
  ([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(
3288
+ rt(Ar, Mr)
3289
+ ), Nr = /* @__PURE__ */ E.memo(function() {
3290
+ 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
3291
  E.useMemo(
3297
3292
  () => (a) => {
3298
3293
  const S = a.parentElement.parentElement.scrollHeight;
3299
3294
  l(S);
3300
3295
  const H = a.firstChild;
3301
3296
  if (H !== null) {
3302
- const { height: y, width: L } = H.getBoundingClientRect();
3303
- p({ height: y, width: L });
3297
+ const { height: y, width: k } = H.getBoundingClientRect();
3298
+ p({ height: y, width: k });
3304
3299
  }
3305
3300
  I({
3306
- column: Wn("column-gap", getComputedStyle(a).columnGap, w),
3307
- row: Wn("row-gap", getComputedStyle(a).rowGap, w)
3301
+ column: Fn("column-gap", getComputedStyle(a).columnGap, w),
3302
+ row: Fn("row-gap", getComputedStyle(a).rowGap, w)
3308
3303
  });
3309
3304
  },
3310
3305
  [l, p, I, w]
@@ -3312,7 +3307,7 @@ const Dr = /* @__PURE__ */ j(() => {
3312
3307
  !0,
3313
3308
  !1
3314
3309
  );
3315
- return co(() => {
3310
+ return so(() => {
3316
3311
  e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
3317
3312
  }, [e]), R ? null : /* @__PURE__ */ G(
3318
3313
  d,
@@ -3346,8 +3341,8 @@ const Dr = /* @__PURE__ */ j(() => {
3346
3341
  })
3347
3342
  }
3348
3343
  );
3349
- }), Kr = E.memo(function() {
3350
- const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = Lt(
3344
+ }), Dr = E.memo(function() {
3345
+ const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = kt(
3351
3346
  E.useMemo(
3352
3347
  () => (i) => {
3353
3348
  n(Ht(i, "height"));
@@ -3358,8 +3353,8 @@ const Dr = /* @__PURE__ */ j(() => {
3358
3353
  !1
3359
3354
  ), s = et("context");
3360
3355
  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(
3356
+ }), $r = E.memo(function() {
3357
+ const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = kt(
3363
3358
  E.useMemo(
3364
3359
  () => (i) => {
3365
3360
  n(Ht(i, "height"));
@@ -3370,8 +3365,8 @@ const Dr = /* @__PURE__ */ j(() => {
3370
3365
  !1
3371
3366
  ), s = et("context");
3372
3367
  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(
3368
+ }), Ur = ({ children: t }) => {
3369
+ const e = E.useContext(ro), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = kt(
3375
3370
  E.useMemo(
3376
3371
  () => (s) => {
3377
3372
  o(s.getBoundingClientRect());
@@ -3384,25 +3379,25 @@ const Dr = /* @__PURE__ */ j(() => {
3384
3379
  return E.useEffect(() => {
3385
3380
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3386
3381
  }, [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);
3382
+ }, Kr = ({ children: t }) => {
3383
+ const e = E.useContext(ro), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = $e(n, r, !1);
3389
3384
  return E.useEffect(() => {
3390
3385
  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");
3386
+ }, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: tn(!1, s), children: t });
3387
+ }, jr = /* @__PURE__ */ E.memo(function({ ...e }) {
3388
+ const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Zr : Yr, s = o || n ? Kr : Ur, i = et("context");
3394
3389
  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, {})
3390
+ /* @__PURE__ */ G(Dr, {}),
3391
+ /* @__PURE__ */ G(Nr, {}),
3392
+ /* @__PURE__ */ G($r, {})
3398
3393
  ] }) });
3399
3394
  }), {
3400
- Component: Xr,
3401
- useEmitter: go,
3395
+ Component: qr,
3396
+ useEmitter: mo,
3402
3397
  useEmitterValue: et,
3403
3398
  usePublisher: wt
3404
- } = /* @__PURE__ */ Je(
3405
- $r,
3399
+ } = /* @__PURE__ */ Xe(
3400
+ _r,
3406
3401
  {
3407
3402
  optional: {
3408
3403
  context: "context",
@@ -3441,19 +3436,19 @@ const Dr = /* @__PURE__ */ j(() => {
3441
3436
  readyStateChanged: "readyStateChanged"
3442
3437
  }
3443
3438
  },
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) {
3447
- 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);
3439
+ jr
3440
+ ), Yr = /* @__PURE__ */ en({ useEmitter: mo, useEmitterValue: et, usePublisher: wt }), Zr = /* @__PURE__ */ nn({ useEmitter: mo, useEmitterValue: et, usePublisher: wt });
3441
+ function Fn(t, e, n) {
3442
+ return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
3448
3443
  }
3449
- const cs = Xr;
3444
+ const ss = qr;
3450
3445
  export {
3451
- ls as GroupedTableVirtuoso,
3452
- ss as GroupedVirtuoso,
3453
- ft as LogLevel,
3454
- is as TableVirtuoso,
3455
- rs as Virtuoso,
3456
- cs as VirtuosoGrid,
3457
- lo as VirtuosoGridMockContext,
3446
+ rs as GroupedTableVirtuoso,
3447
+ ns as GroupedVirtuoso,
3448
+ mt as LogLevel,
3449
+ os as TableVirtuoso,
3450
+ es as Virtuoso,
3451
+ ss as VirtuosoGrid,
3452
+ ro as VirtuosoGridMockContext,
3458
3453
  Re as VirtuosoMockContext
3459
3454
  };