react-virtuoso 4.15.0 → 4.17.0

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,58 +1,58 @@
1
- import { jsx as P, jsxs as Nt, Fragment as uo } from "react/jsx-runtime";
2
- import E, { createElement as _t } from "react";
3
- import ao from "react-dom";
4
- const we = 0, Lt = 1, qt = 2, kn = 4;
1
+ import { jsx as G, jsxs as Ut, Fragment as ao } from "react/jsx-runtime";
2
+ import E, { createElement as $t } from "react";
3
+ import fo from "react-dom";
4
+ const ve = 0, At = 1, Jt = 2, zn = 4;
5
5
  function un(t) {
6
6
  return () => t;
7
7
  }
8
- function fo(t) {
8
+ function mo(t) {
9
9
  t();
10
10
  }
11
- function ne(t, e) {
11
+ function se(t, e) {
12
12
  return (n) => t(e(n));
13
13
  }
14
14
  function an(t, e) {
15
15
  return () => t(e);
16
16
  }
17
- function mo(t, e) {
17
+ function po(t, e) {
18
18
  return (n) => t(e, n);
19
19
  }
20
- function Me(t) {
20
+ function Ae(t) {
21
21
  return t !== void 0;
22
22
  }
23
- function po(...t) {
23
+ function ho(...t) {
24
24
  return () => {
25
- t.map(fo);
25
+ t.map(mo);
26
26
  };
27
27
  }
28
- function Yt() {
28
+ function Qt() {
29
29
  }
30
- function ve(t, e) {
30
+ function ye(t, e) {
31
31
  return e(t), t;
32
32
  }
33
- function ho(t, e) {
33
+ function go(t, e) {
34
34
  return e(t);
35
35
  }
36
- function Q(...t) {
36
+ function tt(...t) {
37
37
  return t;
38
38
  }
39
- function q(t, e) {
40
- return t(Lt, e);
39
+ function Y(t, e) {
40
+ return t(At, e);
41
41
  }
42
- function _(t, e) {
43
- t(we, e);
42
+ function D(t, e) {
43
+ t(ve, e);
44
44
  }
45
45
  function We(t) {
46
- t(qt);
46
+ t(Jt);
47
47
  }
48
48
  function rt(t) {
49
- return t(kn);
49
+ return t(zn);
50
50
  }
51
51
  function F(t, e) {
52
- return q(t, mo(e, we));
52
+ return Y(t, po(e, ve));
53
53
  }
54
- function Tt(t, e) {
55
- const n = t(Lt, (o) => {
54
+ function Et(t, e) {
55
+ const n = t(At, (o) => {
56
56
  n(), e(o);
57
57
  });
58
58
  return n;
@@ -65,51 +65,51 @@ function dn(t) {
65
65
  }, t);
66
66
  };
67
67
  }
68
- function Fn(t, e) {
68
+ function On(t, e) {
69
69
  return t === e;
70
70
  }
71
- function X(t = Fn) {
71
+ function J(t = On) {
72
72
  let e;
73
73
  return (n) => (o) => {
74
74
  t(e, o) || (e = o, n(o));
75
75
  };
76
76
  }
77
- function V(t) {
77
+ function P(t) {
78
78
  return (e) => (n) => {
79
79
  t(n) && e(n);
80
80
  };
81
81
  }
82
- function B(t) {
83
- return (e) => ne(e, t);
82
+ function k(t) {
83
+ return (e) => se(e, t);
84
84
  }
85
- function Rt(t) {
85
+ function Ft(t) {
86
86
  return (e) => () => {
87
87
  e(t);
88
88
  };
89
89
  }
90
- function S(t, ...e) {
91
- const n = go(...e);
90
+ function x(t, ...e) {
91
+ const n = Io(...e);
92
92
  return (o, r) => {
93
93
  switch (o) {
94
- case qt:
94
+ case Jt:
95
95
  We(t);
96
96
  return;
97
- case Lt:
98
- return q(t, n(r));
97
+ case At:
98
+ return Y(t, n(r));
99
99
  }
100
100
  };
101
101
  }
102
- function bt(t, e) {
102
+ function Lt(t, e) {
103
103
  return (n) => (o) => {
104
104
  n(e = t(e, o));
105
105
  };
106
106
  }
107
- function Dt(t) {
107
+ function Kt(t) {
108
108
  return (e) => (n) => {
109
109
  t > 0 ? t-- : e(n);
110
110
  };
111
111
  }
112
- function kt(t) {
112
+ function Gt(t) {
113
113
  let e = null, n;
114
114
  return (o) => (r) => {
115
115
  e = r, !n && (n = setTimeout(() => {
@@ -117,15 +117,15 @@ function kt(t) {
117
117
  }, t));
118
118
  };
119
119
  }
120
- function N(...t) {
120
+ function $(...t) {
121
121
  const e = new Array(t.length);
122
122
  let n = 0, o = null;
123
123
  const r = Math.pow(2, t.length) - 1;
124
124
  return t.forEach((s, i) => {
125
125
  const l = Math.pow(2, i);
126
- q(s, (u) => {
126
+ Y(s, (c) => {
127
127
  const d = n;
128
- n = n | l, e[i] = u, d !== r && n === r && o && (o(), o = null);
128
+ n = n | l, e[i] = c, d !== r && n === r && o && (o(), o = null);
129
129
  });
130
130
  }), (s) => (i) => {
131
131
  const l = () => {
@@ -134,56 +134,56 @@ function N(...t) {
134
134
  n === r ? l() : o = l;
135
135
  };
136
136
  }
137
- function go(...t) {
138
- return (e) => t.reduceRight(ho, e);
137
+ function Io(...t) {
138
+ return (e) => t.reduceRight(go, e);
139
139
  }
140
- function Io(t) {
140
+ function xo(t) {
141
141
  let e, n;
142
142
  const o = () => e == null ? void 0 : e();
143
143
  return function(r, s) {
144
144
  switch (r) {
145
- case Lt:
146
- return s ? n === s ? void 0 : (o(), n = s, e = q(t, s), e) : (o(), Yt);
147
- case qt:
145
+ case At:
146
+ return s ? n === s ? void 0 : (o(), n = s, e = Y(t, s), e) : (o(), Qt);
147
+ case Jt:
148
148
  o(), n = null;
149
149
  return;
150
150
  }
151
151
  };
152
152
  }
153
- function w(t) {
153
+ function C(t) {
154
154
  let e = t;
155
- const n = $();
155
+ const n = U();
156
156
  return (o, r) => {
157
157
  switch (o) {
158
- case we:
158
+ case ve:
159
159
  e = r;
160
160
  break;
161
- case Lt: {
161
+ case At: {
162
162
  r(e);
163
163
  break;
164
164
  }
165
- case kn:
165
+ case zn:
166
166
  return e;
167
167
  }
168
168
  return n(o, r);
169
169
  };
170
170
  }
171
- function ct(t, e) {
172
- return ve(w(e), (n) => F(t, n));
171
+ function ht(t, e) {
172
+ return ye(C(e), (n) => F(t, n));
173
173
  }
174
- function $() {
174
+ function U() {
175
175
  const t = [];
176
176
  return (e, n) => {
177
177
  switch (e) {
178
- case we:
178
+ case ve:
179
179
  t.slice().forEach((o) => {
180
180
  o(n);
181
181
  });
182
182
  return;
183
- case qt:
183
+ case Jt:
184
184
  t.splice(0, t.length);
185
185
  return;
186
- case Lt:
186
+ case At:
187
187
  return t.push(n), () => {
188
188
  const o = t.indexOf(n);
189
189
  o > -1 && t.splice(o, 1);
@@ -191,8 +191,8 @@ function $() {
191
191
  }
192
192
  };
193
193
  }
194
- function gt(t) {
195
- return ve($(), (e) => F(t, e));
194
+ function bt(t) {
195
+ return ye(U(), (e) => F(t, e));
196
196
  }
197
197
  function K(t, e = [], { singleton: n } = { singleton: !0 }) {
198
198
  return {
@@ -203,65 +203,65 @@ function K(t, e = [], { singleton: n } = { singleton: !0 }) {
203
203
  };
204
204
  }
205
205
  const So = () => Symbol();
206
- function xo(t) {
206
+ function To(t) {
207
207
  const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
208
208
  if (i && e.has(s))
209
209
  return e.get(s);
210
- const l = o(r.map((u) => n(u)));
210
+ const l = o(r.map((c) => n(c)));
211
211
  return i && e.set(s, l), l;
212
212
  };
213
213
  return n(t);
214
214
  }
215
- function st(...t) {
216
- const e = $(), n = new Array(t.length);
215
+ function ut(...t) {
216
+ const e = U(), n = new Array(t.length);
217
217
  let o = 0;
218
218
  const r = Math.pow(2, t.length) - 1;
219
219
  return t.forEach((s, i) => {
220
220
  const l = Math.pow(2, i);
221
- q(s, (u) => {
222
- n[i] = u, o = o | l, o === r && _(e, n);
221
+ Y(s, (c) => {
222
+ n[i] = c, o = o | l, o === r && D(e, n);
223
223
  });
224
224
  }), function(s, i) {
225
225
  switch (s) {
226
- case qt: {
226
+ case Jt: {
227
227
  We(e);
228
228
  return;
229
229
  }
230
- case Lt:
231
- return o === r && i(n), q(e, i);
230
+ case At:
231
+ return o === r && i(n), Y(e, i);
232
232
  }
233
233
  };
234
234
  }
235
- function L(t, e = Fn) {
236
- return S(t, X(e));
235
+ function V(t, e = On) {
236
+ return x(t, J(e));
237
237
  }
238
- function ze(...t) {
238
+ function Fe(...t) {
239
239
  return function(e, n) {
240
240
  switch (e) {
241
- case qt:
241
+ case Jt:
242
242
  return;
243
- case Lt:
244
- return po(...t.map((o) => q(o, n)));
243
+ case At:
244
+ return ho(...t.map((o) => Y(o, n)));
245
245
  }
246
246
  };
247
247
  }
248
- var pt = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t))(pt || {});
249
- const To = {
248
+ var Ct = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t))(Ct || {});
249
+ const Co = {
250
250
  0: "debug",
251
251
  3: "error",
252
252
  1: "log",
253
253
  2: "warn"
254
- }, Co = () => typeof globalThis > "u" ? window : globalThis, Vt = K(
254
+ }, wo = () => typeof globalThis > "u" ? window : globalThis, Wt = K(
255
255
  () => {
256
- const t = w(
256
+ const t = C(
257
257
  3
258
258
  /* ERROR */
259
259
  );
260
260
  return {
261
- log: w((n, o, r = 1) => {
261
+ log: C((n, o, r = 1) => {
262
262
  var i;
263
- const s = (i = Co().VIRTUOSO_LOG_LEVEL) != null ? i : rt(t);
264
- r >= s && console[To[r]](
263
+ const s = (i = wo().VIRTUOSO_LOG_LEVEL) != null ? i : rt(t);
264
+ r >= s && console[Co[r]](
265
265
  "%creact-virtuoso: %c%s %o",
266
266
  "color: #0253b3; font-weight: bold",
267
267
  "color: initial",
@@ -275,7 +275,7 @@ const To = {
275
275
  [],
276
276
  { singleton: !0 }
277
277
  );
278
- function Ht(t, e, n) {
278
+ function Vt(t, e, n) {
279
279
  return _e(t, e, n).callbackRef;
280
280
  }
281
281
  function _e(t, e, n) {
@@ -284,8 +284,8 @@ function _e(t, e, n) {
284
284
  };
285
285
  const s = E.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((i) => {
286
286
  const l = () => {
287
- const u = i[0].target;
288
- u.offsetParent !== null && t(u);
287
+ const c = i[0].target;
288
+ c.offsetParent !== null && t(c);
289
289
  };
290
290
  n ? l() : requestAnimationFrame(l);
291
291
  }) : null, [t, n]);
@@ -293,30 +293,30 @@ function _e(t, e, n) {
293
293
  i && e ? (s == null || s.observe(i), o.current = i) : (o.current && (s == null || s.unobserve(o.current)), o.current = null);
294
294
  }, { callbackRef: r, ref: o };
295
295
  }
296
- function On(t, e, n, o, r, s, i, l, u) {
296
+ function Fn(t, e, n, o, r, s, i, l, c) {
297
297
  const d = E.useCallback(
298
- (f) => {
299
- const I = wo(f.children, e, l ? "offsetWidth" : "offsetHeight", r);
300
- let g = f.parentElement;
301
- for (; !g.dataset.virtuosoScroller; )
302
- g = g.parentElement;
303
- const x = g.lastElementChild.dataset.viewportType === "window";
304
- let C;
305
- x && (C = g.ownerDocument.defaultView);
306
- const H = i ? l ? i.scrollLeft : i.scrollTop : x ? l ? C.scrollX || C.document.documentElement.scrollLeft : C.scrollY || C.document.documentElement.scrollTop : l ? g.scrollLeft : g.scrollTop, m = i ? l ? i.scrollWidth : i.scrollHeight : x ? l ? C.document.documentElement.scrollWidth : C.document.documentElement.scrollHeight : l ? g.scrollWidth : g.scrollHeight, p = i ? l ? i.offsetWidth : i.offsetHeight : x ? l ? C.innerWidth : C.innerHeight : l ? g.offsetWidth : g.offsetHeight;
298
+ (m) => {
299
+ const S = vo(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
300
+ let h = m.parentElement;
301
+ for (; !h.dataset.virtuosoScroller; )
302
+ h = h.parentElement;
303
+ const T = h.lastElementChild.dataset.viewportType === "window";
304
+ let w;
305
+ T && (w = h.ownerDocument.defaultView);
306
+ const R = i ? l ? i.scrollLeft : i.scrollTop : T ? l ? w.scrollX || w.document.documentElement.scrollLeft : w.scrollY || w.document.documentElement.scrollTop : l ? h.scrollLeft : h.scrollTop, g = i ? l ? i.scrollWidth : i.scrollHeight : T ? l ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight : l ? h.scrollWidth : h.scrollHeight, f = i ? l ? i.offsetWidth : i.offsetHeight : T ? l ? w.innerWidth : w.innerHeight : l ? h.offsetWidth : h.offsetHeight;
307
307
  o({
308
- scrollHeight: m,
309
- scrollTop: Math.max(H, 0),
310
- viewportHeight: p
308
+ scrollHeight: g,
309
+ scrollTop: Math.max(R, 0),
310
+ viewportHeight: f
311
311
  }), s == null || s(
312
- l ? fn("column-gap", getComputedStyle(f).columnGap, r) : fn("row-gap", getComputedStyle(f).rowGap, r)
313
- ), I !== null && t(I);
312
+ l ? fn("column-gap", getComputedStyle(m).columnGap, r) : fn("row-gap", getComputedStyle(m).rowGap, r)
313
+ ), S !== null && t(S);
314
314
  },
315
315
  [t, e, r, s, i, o, l]
316
316
  );
317
- return _e(d, n, u);
317
+ return _e(d, n, c);
318
318
  }
319
- function wo(t, e, n, o) {
319
+ function vo(t, e, n, o) {
320
320
  const r = t.length;
321
321
  if (r === 0)
322
322
  return null;
@@ -325,35 +325,35 @@ function wo(t, e, n, o) {
325
325
  const l = t.item(i);
326
326
  if (l.dataset.index === void 0)
327
327
  continue;
328
- const u = parseInt(l.dataset.index), d = parseFloat(l.dataset.knownSize), f = e(l, n);
329
- if (f === 0 && o("Zero-sized element, this should not happen", { child: l }, pt.ERROR), f === d)
328
+ const c = parseInt(l.dataset.index), d = parseFloat(l.dataset.knownSize), m = e(l, n);
329
+ if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, Ct.ERROR), m === d)
330
330
  continue;
331
- const I = s[s.length - 1];
332
- s.length === 0 || I.size !== f || I.endIndex !== u - 1 ? s.push({ endIndex: u, size: f, startIndex: u }) : s[s.length - 1].endIndex++;
331
+ const S = s[s.length - 1];
332
+ s.length === 0 || S.size !== m || S.endIndex !== c - 1 ? s.push({ endIndex: c, size: m, startIndex: c }) : s[s.length - 1].endIndex++;
333
333
  }
334
334
  return s;
335
335
  }
336
336
  function fn(t, e, n) {
337
- return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, pt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
337
+ return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, Ct.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
338
338
  }
339
339
  function Ne(t, e, n) {
340
340
  const o = E.useRef(null), r = E.useCallback(
341
- (u) => {
342
- if (!(u != null && u.offsetParent))
341
+ (c) => {
342
+ if (!(c != null && c.offsetParent))
343
343
  return;
344
- const d = u.getBoundingClientRect(), f = d.width;
345
- let I, g;
344
+ const d = c.getBoundingClientRect(), m = d.width;
345
+ let S, h;
346
346
  if (e) {
347
- const x = e.getBoundingClientRect(), C = d.top - x.top;
348
- g = x.height - Math.max(0, C), I = C + e.scrollTop;
347
+ const T = e.getBoundingClientRect(), w = d.top - T.top;
348
+ h = T.height - Math.max(0, w), S = w + e.scrollTop;
349
349
  } else {
350
- const x = i.current.ownerDocument.defaultView;
351
- g = x.innerHeight - Math.max(0, d.top), I = d.top + x.scrollY;
350
+ const T = i.current.ownerDocument.defaultView;
351
+ h = T.innerHeight - Math.max(0, d.top), S = d.top + T.scrollY;
352
352
  }
353
353
  o.current = {
354
- offsetTop: I,
355
- visibleHeight: g,
356
- visibleWidth: f
354
+ offsetTop: S,
355
+ visibleHeight: h,
356
+ visibleWidth: m
357
357
  }, t(o.current);
358
358
  },
359
359
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -362,7 +362,7 @@ function Ne(t, e, n) {
362
362
  r(i.current);
363
363
  }, [r, i]);
364
364
  return E.useEffect(() => {
365
- var u;
365
+ var c;
366
366
  if (e) {
367
367
  e.addEventListener("scroll", l);
368
368
  const d = new ResizeObserver(() => {
@@ -372,44 +372,44 @@ function Ne(t, e, n) {
372
372
  e.removeEventListener("scroll", l), d.unobserve(e);
373
373
  };
374
374
  } else {
375
- const d = (u = i.current) == null ? void 0 : u.ownerDocument.defaultView;
375
+ const d = (c = i.current) == null ? void 0 : c.ownerDocument.defaultView;
376
376
  return d == null || d.addEventListener("scroll", l), d == null || d.addEventListener("resize", l), () => {
377
377
  d == null || d.removeEventListener("scroll", l), d == null || d.removeEventListener("resize", l);
378
378
  };
379
379
  }
380
380
  }, [l, e, i]), s;
381
381
  }
382
- const dt = K(
382
+ const It = K(
383
383
  () => {
384
- const t = $(), e = $(), n = w(0), o = $(), r = w(0), s = $(), i = $(), l = w(0), u = w(0), d = w(0), f = w(0), I = $(), g = $(), x = w(!1), C = w(!1), H = w(!1);
384
+ const t = U(), e = U(), n = C(0), o = U(), r = C(0), s = U(), i = U(), l = C(0), c = C(0), d = C(0), m = C(0), S = U(), h = U(), T = C(!1), w = C(!1), R = C(!1);
385
385
  return F(
386
- S(
386
+ x(
387
387
  t,
388
- B(({ scrollTop: m }) => m)
388
+ k(({ scrollTop: g }) => g)
389
389
  ),
390
390
  e
391
391
  ), F(
392
- S(
392
+ x(
393
393
  t,
394
- B(({ scrollHeight: m }) => m)
394
+ k(({ scrollHeight: g }) => g)
395
395
  ),
396
396
  i
397
397
  ), F(e, r), {
398
398
  deviation: n,
399
399
  fixedFooterHeight: d,
400
- fixedHeaderHeight: u,
401
- footerHeight: f,
400
+ fixedHeaderHeight: c,
401
+ footerHeight: m,
402
402
  headerHeight: l,
403
- horizontalDirection: C,
404
- scrollBy: g,
403
+ horizontalDirection: w,
404
+ scrollBy: h,
405
405
  // input
406
406
  scrollContainerState: t,
407
407
  scrollHeight: i,
408
- scrollingInProgress: x,
408
+ scrollingInProgress: T,
409
409
  // signals
410
- scrollTo: I,
410
+ scrollTo: S,
411
411
  scrollTop: e,
412
- skipAnimationFrameInResizeObserver: H,
412
+ skipAnimationFrameInResizeObserver: R,
413
413
  smoothScrollTargetReached: o,
414
414
  // state
415
415
  statefulScrollTop: r,
@@ -418,85 +418,85 @@ const dt = K(
418
418
  },
419
419
  [],
420
420
  { singleton: !0 }
421
- ), oe = { lvl: 0 };
422
- function zn(t, e) {
421
+ ), ie = { lvl: 0 };
422
+ function Ln(t, e) {
423
423
  const n = t.length;
424
424
  if (n === 0)
425
425
  return [];
426
426
  let { index: o, value: r } = e(t[0]);
427
427
  const s = [];
428
428
  for (let i = 1; i < n; i++) {
429
- const { index: l, value: u } = e(t[i]);
430
- s.push({ end: l - 1, start: o, value: r }), o = l, r = u;
429
+ const { index: l, value: c } = e(t[i]);
430
+ s.push({ end: l - 1, start: o, value: r }), o = l, r = c;
431
431
  }
432
432
  return s.push({ end: 1 / 0, start: o, value: r }), s;
433
433
  }
434
- function Z(t) {
435
- return t === oe;
434
+ function X(t) {
435
+ return t === ie;
436
436
  }
437
- function re(t, e) {
438
- if (!Z(t))
439
- return e === t.k ? t.v : e < t.k ? re(t.l, e) : re(t.r, e);
437
+ function le(t, e) {
438
+ if (!X(t))
439
+ return e === t.k ? t.v : e < t.k ? le(t.l, e) : le(t.r, e);
440
440
  }
441
- function wt(t, e, n = "k") {
442
- if (Z(t))
441
+ function kt(t, e, n = "k") {
442
+ if (X(t))
443
443
  return [-1 / 0, void 0];
444
444
  if (Number(t[n]) === e)
445
445
  return [t.k, t.v];
446
446
  if (Number(t[n]) < e) {
447
- const o = wt(t.r, e, n);
447
+ const o = kt(t.r, e, n);
448
448
  return o[0] === -1 / 0 ? [t.k, t.v] : o;
449
449
  }
450
- return wt(t.l, e, n);
450
+ return kt(t.l, e, n);
451
451
  }
452
- function ht(t, e, n) {
453
- return Z(t) ? Pn(e, n, 1) : e === t.k ? it(t, { k: e, v: n }) : e < t.k ? mn(it(t, { l: ht(t.l, e, n) })) : mn(it(t, { r: ht(t.r, e, n) }));
452
+ function yt(t, e, n) {
453
+ return X(t) ? Gn(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? mn(dt(t, { l: yt(t.l, e, n) })) : mn(dt(t, { r: yt(t.r, e, n) }));
454
454
  }
455
- function jt() {
456
- return oe;
455
+ function Zt() {
456
+ return ie;
457
457
  }
458
- function ye(t, e, n) {
459
- if (Z(t))
458
+ function Xt(t, e, n) {
459
+ if (X(t))
460
460
  return [];
461
- const o = wt(t, e)[0];
462
- return vo(Ve(t, o, n));
461
+ const o = kt(t, e)[0];
462
+ return yo(Ve(t, o, n));
463
463
  }
464
464
  function Le(t, e) {
465
- if (Z(t)) return oe;
465
+ if (X(t)) return ie;
466
466
  const { k: n, l: o, r } = t;
467
467
  if (e === n) {
468
- if (Z(o))
468
+ if (X(o))
469
469
  return r;
470
- if (Z(r))
470
+ if (X(r))
471
471
  return o;
472
472
  {
473
- const [s, i] = Vn(o);
474
- return ge(it(t, { k: s, l: Ln(o), v: i }));
473
+ const [s, i] = Pn(o);
474
+ return Se(dt(t, { k: s, l: Vn(o), v: i }));
475
475
  }
476
- } else return e < n ? ge(it(t, { l: Le(o, e) })) : ge(it(t, { r: Le(r, e) }));
476
+ } else return e < n ? Se(dt(t, { l: Le(o, e) })) : Se(dt(t, { r: Le(r, e) }));
477
477
  }
478
- function Wt(t) {
479
- return Z(t) ? [] : [...Wt(t.l), { k: t.k, v: t.v }, ...Wt(t.r)];
478
+ function Dt(t) {
479
+ return X(t) ? [] : [...Dt(t.l), { k: t.k, v: t.v }, ...Dt(t.r)];
480
480
  }
481
481
  function Ve(t, e, n) {
482
- if (Z(t))
482
+ if (X(t))
483
483
  return [];
484
484
  const { k: o, l: r, r: s, v: i } = t;
485
485
  let l = [];
486
486
  return o > e && (l = l.concat(Ve(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(Ve(s, e, n))), l;
487
487
  }
488
- function ge(t) {
488
+ function Se(t) {
489
489
  const { l: e, lvl: n, r: o } = t;
490
490
  if (o.lvl >= n - 1 && e.lvl >= n - 1)
491
491
  return t;
492
492
  if (n > o.lvl + 1) {
493
493
  if (Ee(e))
494
- return Gn(it(t, { lvl: n - 1 }));
495
- if (!Z(e) && !Z(e.r))
496
- return it(e.r, {
497
- l: it(e, { r: e.r.l }),
494
+ return Mn(dt(t, { lvl: n - 1 }));
495
+ if (!X(e) && !X(e.r))
496
+ return dt(e.r, {
497
+ l: dt(e, { r: e.r.l }),
498
498
  lvl: n,
499
- r: it(t, {
499
+ r: dt(t, {
500
500
  l: e.r.r,
501
501
  lvl: n - 1
502
502
  })
@@ -504,23 +504,23 @@ function ge(t) {
504
504
  throw new Error("Unexpected empty nodes");
505
505
  } else {
506
506
  if (Ee(t))
507
- return Pe(it(t, { lvl: n - 1 }));
508
- if (!Z(o) && !Z(o.l)) {
507
+ return Pe(dt(t, { lvl: n - 1 }));
508
+ if (!X(o) && !X(o.l)) {
509
509
  const r = o.l, s = Ee(r) ? o.lvl - 1 : o.lvl;
510
- return it(r, {
511
- l: it(t, {
510
+ return dt(r, {
511
+ l: dt(t, {
512
512
  lvl: n - 1,
513
513
  r: r.l
514
514
  }),
515
515
  lvl: r.lvl + 1,
516
- r: Pe(it(o, { l: r.r, lvl: s }))
516
+ r: Pe(dt(o, { l: r.r, lvl: s }))
517
517
  });
518
518
  } else
519
519
  throw new Error("Unexpected empty nodes");
520
520
  }
521
521
  }
522
- function it(t, e) {
523
- return Pn(
522
+ function dt(t, e) {
523
+ return Gn(
524
524
  e.k !== void 0 ? e.k : t.k,
525
525
  e.v !== void 0 ? e.v : t.v,
526
526
  e.lvl !== void 0 ? e.lvl : t.lvl,
@@ -528,47 +528,47 @@ function it(t, e) {
528
528
  e.r !== void 0 ? e.r : t.r
529
529
  );
530
530
  }
531
- function Ln(t) {
532
- return Z(t.r) ? t.l : ge(it(t, { r: Ln(t.r) }));
531
+ function Vn(t) {
532
+ return X(t.r) ? t.l : Se(dt(t, { r: Vn(t.r) }));
533
533
  }
534
534
  function Ee(t) {
535
- return Z(t) || t.lvl > t.r.lvl;
535
+ return X(t) || t.lvl > t.r.lvl;
536
536
  }
537
- function Vn(t) {
538
- return Z(t.r) ? [t.k, t.v] : Vn(t.r);
537
+ function Pn(t) {
538
+ return X(t.r) ? [t.k, t.v] : Pn(t.r);
539
539
  }
540
- function Pn(t, e, n, o = oe, r = oe) {
540
+ function Gn(t, e, n, o = ie, r = ie) {
541
541
  return { k: t, l: o, lvl: n, r, v: e };
542
542
  }
543
543
  function mn(t) {
544
- return Pe(Gn(t));
544
+ return Pe(Mn(t));
545
545
  }
546
- function Gn(t) {
546
+ function Mn(t) {
547
547
  const { l: e } = t;
548
- return !Z(e) && e.lvl === t.lvl ? it(e, { r: it(t, { l: e.r }) }) : t;
548
+ return !X(e) && e.lvl === t.lvl ? dt(e, { r: dt(t, { l: e.r }) }) : t;
549
549
  }
550
550
  function Pe(t) {
551
551
  const { lvl: e, r: n } = t;
552
- return !Z(n) && !Z(n.r) && n.lvl === e && n.r.lvl === e ? it(n, { l: it(t, { r: n.l }), lvl: e + 1 }) : t;
552
+ return !X(n) && !X(n.r) && n.lvl === e && n.r.lvl === e ? dt(n, { l: dt(t, { r: n.l }), lvl: e + 1 }) : t;
553
553
  }
554
- function vo(t) {
555
- return zn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
554
+ function yo(t) {
555
+ return Ln(t, ({ k: e, v: n }) => ({ index: e, value: n }));
556
556
  }
557
557
  function An(t, e) {
558
558
  return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
559
559
  }
560
- function se(t, e) {
560
+ function ce(t, e) {
561
561
  return !!(t && t[0] === e[0] && t[1] === e[1]);
562
562
  }
563
563
  const De = K(
564
- () => ({ recalcInProgress: w(!1) }),
564
+ () => ({ recalcInProgress: C(!1) }),
565
565
  [],
566
566
  { singleton: !0 }
567
567
  );
568
- function Mn(t, e, n) {
569
- return t[Se(t, e, n)];
568
+ function Wn(t, e, n) {
569
+ return t[Ce(t, e, n)];
570
570
  }
571
- function Se(t, e, n, o = 0) {
571
+ function Ce(t, e, n, o = 0) {
572
572
  let r = t.length - 1;
573
573
  for (; o <= r; ) {
574
574
  const s = Math.floor((o + r) / 2), i = t[s], l = n(i, e);
@@ -586,15 +586,15 @@ function Se(t, e, n, o = 0) {
586
586
  }
587
587
  throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
588
588
  }
589
- function yo(t, e, n, o) {
590
- const r = Se(t, e, o), s = Se(t, n, o, r);
589
+ function bo(t, e, n, o) {
590
+ const r = Ce(t, e, o), s = Ce(t, n, o, r);
591
591
  return t.slice(r, s + 1);
592
592
  }
593
- function vt(t, e) {
593
+ function zt(t, e) {
594
594
  return Math.round(t.getBoundingClientRect()[e]);
595
595
  }
596
- function Re(t) {
597
- return !Z(t.groupOffsetTree);
596
+ function be(t) {
597
+ return !X(t.groupOffsetTree);
598
598
  }
599
599
  function $e({ index: t }, e) {
600
600
  return e === t ? 0 : e < t ? -1 : 1;
@@ -602,88 +602,88 @@ function $e({ index: t }, e) {
602
602
  function Ro() {
603
603
  return {
604
604
  groupIndices: [],
605
- groupOffsetTree: jt(),
605
+ groupOffsetTree: Zt(),
606
606
  lastIndex: 0,
607
607
  lastOffset: 0,
608
608
  lastSize: 0,
609
609
  offsetTree: [],
610
- sizeTree: jt()
610
+ sizeTree: Zt()
611
611
  };
612
612
  }
613
- function bo(t, e) {
614
- let n = Z(t) ? 0 : 1 / 0;
613
+ function Ho(t, e) {
614
+ let n = X(t) ? 0 : 1 / 0;
615
615
  for (const o of e) {
616
616
  const { endIndex: r, size: s, startIndex: i } = o;
617
- if (n = Math.min(n, i), Z(t)) {
618
- t = ht(t, 0, s);
617
+ if (n = Math.min(n, i), X(t)) {
618
+ t = yt(t, 0, s);
619
619
  continue;
620
620
  }
621
- const l = ye(t, i - 1, r + 1);
622
- if (l.some(zo(o)))
621
+ const l = Xt(t, i - 1, r + 1);
622
+ if (l.some(Lo(o)))
623
623
  continue;
624
- let u = !1, d = !1;
625
- for (const { end: f, start: I, value: g } of l)
626
- u ? (r >= I || s === g) && (t = Le(t, I)) : (d = g !== s, u = !0), f > r && r >= I && g !== s && (t = ht(t, r + 1, g));
627
- d && (t = ht(t, i, s));
624
+ let c = !1, d = !1;
625
+ for (const { end: m, start: S, value: h } of l)
626
+ c ? (r >= S || s === h) && (t = Le(t, S)) : (d = h !== s, c = !0), m > r && r >= S && h !== s && (t = yt(t, r + 1, h));
627
+ d && (t = yt(t, i, s));
628
628
  }
629
629
  return [t, n];
630
630
  }
631
- function Ho(t) {
631
+ function Eo(t) {
632
632
  return typeof t.groupIndex < "u";
633
633
  }
634
- function Eo({ offset: t }, e) {
634
+ function Bo({ offset: t }, e) {
635
635
  return e === t ? 0 : e < t ? -1 : 1;
636
636
  }
637
- function ie(t, e, n) {
637
+ function ue(t, e, n) {
638
638
  if (e.length === 0)
639
639
  return 0;
640
- const { index: o, offset: r, size: s } = Mn(e, t, $e), i = t - o, l = s * i + (i - 1) * n + r;
640
+ const { index: o, offset: r, size: s } = Wn(e, t, $e), i = t - o, l = s * i + (i - 1) * n + r;
641
641
  return l > 0 ? l + n : l;
642
642
  }
643
- function Wn(t, e) {
644
- if (!Re(e))
643
+ function _n(t, e) {
644
+ if (!be(e))
645
645
  return t;
646
646
  let n = 0;
647
647
  for (; e.groupIndices[n] <= t + n; )
648
648
  n++;
649
649
  return t + n;
650
650
  }
651
- function _n(t, e, n) {
652
- if (Ho(t))
651
+ function Nn(t, e, n) {
652
+ if (Eo(t))
653
653
  return e.groupIndices[t.groupIndex] + 1;
654
654
  {
655
655
  const o = t.index === "LAST" ? n : t.index;
656
- let r = Wn(o, e);
656
+ let r = _n(o, e);
657
657
  return r = Math.max(0, r, Math.min(n, r)), r;
658
658
  }
659
659
  }
660
- function Bo(t, e, n, o = 0) {
661
- return o > 0 && (e = Math.max(e, Mn(t, o, $e).offset)), zn(yo(t, e, n, Eo), Oo);
660
+ function ko(t, e, n, o = 0) {
661
+ return o > 0 && (e = Math.max(e, Wn(t, o, $e).offset)), Ln(bo(t, e, n, Bo), Fo);
662
662
  }
663
- function ko(t, [e, n, o, r]) {
664
- e.length > 0 && o("received item sizes", e, pt.DEBUG);
663
+ function zo(t, [e, n, o, r]) {
664
+ e.length > 0 && o("received item sizes", e, Ct.DEBUG);
665
665
  const s = t.sizeTree;
666
666
  let i = s, l = 0;
667
- if (n.length > 0 && Z(s) && e.length === 2) {
668
- const g = e[0].size, x = e[1].size;
669
- i = n.reduce((C, H) => ht(ht(C, H, g), H + 1, x), i);
667
+ if (n.length > 0 && X(s) && e.length === 2) {
668
+ const h = e[0].size, T = e[1].size;
669
+ i = n.reduce((w, R) => yt(yt(w, R, h), R + 1, T), i);
670
670
  } else
671
- [i, l] = bo(i, e);
671
+ [i, l] = Ho(i, e);
672
672
  if (i === s)
673
673
  return t;
674
- const { lastIndex: u, lastOffset: d, lastSize: f, offsetTree: I } = Ge(t.offsetTree, l, i, r);
674
+ const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: S } = Ge(t.offsetTree, l, i, r);
675
675
  return {
676
676
  groupIndices: n,
677
- groupOffsetTree: n.reduce((g, x) => ht(g, x, ie(x, I, r)), jt()),
678
- lastIndex: u,
677
+ groupOffsetTree: n.reduce((h, T) => yt(h, T, ue(T, S, r)), Zt()),
678
+ lastIndex: c,
679
679
  lastOffset: d,
680
- lastSize: f,
681
- offsetTree: I,
680
+ lastSize: m,
681
+ offsetTree: S,
682
682
  sizeTree: i
683
683
  };
684
684
  }
685
- function Fo(t) {
686
- return Wt(t).map(({ k: e, v: n }, o, r) => {
685
+ function Oo(t) {
686
+ return Dt(t).map(({ k: e, v: n }, o, r) => {
687
687
  const s = r[o + 1];
688
688
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: e };
689
689
  });
@@ -695,20 +695,20 @@ function pn(t, e) {
695
695
  return o - (n === t ? 0 : 1);
696
696
  }
697
697
  function Ge(t, e, n, o) {
698
- let r = t, s = 0, i = 0, l = 0, u = 0;
698
+ let r = t, s = 0, i = 0, l = 0, c = 0;
699
699
  if (e !== 0) {
700
- u = Se(r, e - 1, $e), l = r[u].offset;
701
- const f = wt(n, e - 1);
702
- s = f[0], i = f[1], r.length && r[u].size === wt(n, e)[1] && (u -= 1), r = r.slice(0, u + 1);
700
+ c = Ce(r, e - 1, $e), l = r[c].offset;
701
+ const m = kt(n, e - 1);
702
+ s = m[0], i = m[1], r.length && r[c].size === kt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
703
703
  } else
704
704
  r = [];
705
- for (const { start: d, value: f } of ye(n, e, 1 / 0)) {
706
- const I = d - s, g = I * i + l + I * o;
705
+ for (const { start: d, value: m } of Xt(n, e, 1 / 0)) {
706
+ const S = d - s, h = S * i + l + S * o;
707
707
  r.push({
708
708
  index: d,
709
- offset: g,
710
- size: f
711
- }), s = d, l = g, i = f;
709
+ offset: h,
710
+ size: m
711
+ }), s = d, l = h, i = m;
712
712
  }
713
713
  return {
714
714
  lastIndex: s,
@@ -717,100 +717,123 @@ function Ge(t, e, n, o) {
717
717
  offsetTree: r
718
718
  };
719
719
  }
720
- function Oo(t) {
720
+ function Fo(t) {
721
721
  return { index: t.index, value: t };
722
722
  }
723
- function zo(t) {
723
+ function Lo(t) {
724
724
  const { endIndex: e, size: n, startIndex: o } = t;
725
725
  return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
726
726
  }
727
- const Lo = {
727
+ const Vo = {
728
728
  offsetHeight: "height",
729
729
  offsetWidth: "width"
730
- }, Et = K(
730
+ }, Pt = K(
731
731
  ([{ log: t }, { recalcInProgress: e }]) => {
732
- const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = w(0), u = w([]), d = w(void 0), f = w(void 0), I = w(void 0), g = w((c, h) => vt(c, Lo[h])), x = w(void 0), C = w(0), H = Ro(), m = ct(
733
- S(n, N(u, t, C), bt(ko, H), X()),
734
- H
735
- ), p = ct(
736
- S(
737
- u,
738
- X(),
739
- bt((c, h) => ({ current: h, prev: c.current }), {
732
+ const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = C(0), c = C([]), d = C(void 0), m = C(void 0), S = C(void 0), h = C(void 0), T = C((u, p) => zt(u, Vo[p])), w = C(void 0), R = C(0), g = Ro(), f = ht(
733
+ x(n, $(c, t, R), Lt(zo, g), J()),
734
+ g
735
+ ), a = ht(
736
+ x(
737
+ c,
738
+ J(),
739
+ Lt((u, p) => ({ current: p, prev: u.current }), {
740
740
  current: [],
741
741
  prev: []
742
742
  }),
743
- B(({ prev: c }) => c)
743
+ k(({ prev: u }) => u)
744
744
  ),
745
745
  []
746
746
  );
747
747
  F(
748
- S(
749
- u,
750
- V((c) => c.length > 0),
751
- N(m, C),
752
- B(([c, h, b]) => {
753
- const O = c.reduce((k, z, A) => ht(k, z, ie(z, h.offsetTree, b) || A), jt());
748
+ x(
749
+ c,
750
+ P((u) => u.length > 0),
751
+ $(f, R),
752
+ k(([u, p, v]) => {
753
+ const O = u.reduce((B, W, _) => yt(B, W, ue(W, p.offsetTree, v) || _), Zt());
754
754
  return {
755
- ...h,
756
- groupIndices: c,
755
+ ...p,
756
+ groupIndices: u,
757
757
  groupOffsetTree: O
758
758
  };
759
759
  })
760
760
  ),
761
- m
761
+ f
762
762
  ), F(
763
- S(
763
+ x(
764
764
  o,
765
- N(m),
766
- V(([c, { lastIndex: h }]) => c < h),
767
- B(([c, { lastIndex: h, lastSize: b }]) => [
765
+ $(f),
766
+ P(([u, { lastIndex: p }]) => u < p),
767
+ k(([u, { lastIndex: p, lastSize: v }]) => [
768
768
  {
769
- endIndex: h,
770
- size: b,
771
- startIndex: c
769
+ endIndex: p,
770
+ size: v,
771
+ startIndex: u
772
772
  }
773
773
  ])
774
774
  ),
775
775
  n
776
- ), F(d, f);
777
- const a = ct(
778
- S(
776
+ ), F(d, m);
777
+ const I = ht(
778
+ x(
779
779
  d,
780
- B((c) => c === void 0)
780
+ k((u) => u === void 0)
781
781
  ),
782
782
  !0
783
783
  );
784
784
  F(
785
- S(
786
- f,
787
- V((c) => c !== void 0 && Z(rt(m).sizeTree)),
788
- B((c) => {
789
- const h = rt(I), b = rt(u).length > 0;
790
- return h ? b ? [
791
- { endIndex: 0, size: h, startIndex: 0 },
792
- { endIndex: 1, size: c, startIndex: 1 }
793
- ] : [] : [{ endIndex: 0, size: c, startIndex: 0 }];
785
+ x(
786
+ m,
787
+ P((u) => u !== void 0 && X(rt(f).sizeTree)),
788
+ k((u) => {
789
+ const p = rt(S), v = rt(c).length > 0;
790
+ return p ? v ? [
791
+ { endIndex: 0, size: p, startIndex: 0 },
792
+ { endIndex: 1, size: u, startIndex: 1 }
793
+ ] : [] : [{ endIndex: 0, size: u, startIndex: 0 }];
794
794
  })
795
795
  ),
796
796
  n
797
797
  ), F(
798
- S(
799
- u,
800
- N(I, f),
801
- V(([, c, h]) => c !== void 0 && h !== void 0),
802
- B(([c, h, b]) => {
798
+ x(
799
+ h,
800
+ P((u) => u !== void 0 && u.length > 0 && X(rt(f).sizeTree)),
801
+ k((u) => {
802
+ const p = [];
803
+ let v = u[0], O = 0;
804
+ for (let B = 1; B < u.length; B++) {
805
+ const W = u[B];
806
+ W !== v && (p.push({
807
+ endIndex: B - 1,
808
+ size: v,
809
+ startIndex: O
810
+ }), v = W, O = B);
811
+ }
812
+ return p.push({
813
+ endIndex: u.length - 1,
814
+ size: v,
815
+ startIndex: O
816
+ }), p;
817
+ })
818
+ ),
819
+ n
820
+ ), F(
821
+ x(
822
+ c,
823
+ $(S, m),
824
+ P(([, u, p]) => u !== void 0 && p !== void 0),
825
+ k(([u, p, v]) => {
803
826
  const O = [];
804
- for (let k = 0; k < c.length; k++) {
805
- const z = c[k], A = c[k + 1];
827
+ for (let B = 0; B < u.length; B++) {
828
+ const W = u[B], _ = u[B + 1];
806
829
  O.push({
807
- startIndex: z,
808
- endIndex: z,
809
- size: h
810
- }), A !== void 0 && O.push({
811
- startIndex: z + 1,
812
- endIndex: A - 1,
813
- size: b
830
+ startIndex: W,
831
+ endIndex: W,
832
+ size: p
833
+ }), _ !== void 0 && O.push({
834
+ startIndex: W + 1,
835
+ endIndex: _ - 1,
836
+ size: v
814
837
  });
815
838
  }
816
839
  return O;
@@ -818,100 +841,100 @@ const Lo = {
818
841
  ),
819
842
  n
820
843
  );
821
- const T = gt(
822
- S(
844
+ const b = bt(
845
+ x(
823
846
  n,
824
- N(m),
825
- bt(
826
- ({ sizes: c }, [h, b]) => ({
827
- changed: b !== c,
828
- sizes: b
847
+ $(f),
848
+ Lt(
849
+ ({ sizes: u }, [p, v]) => ({
850
+ changed: v !== u,
851
+ sizes: v
829
852
  }),
830
- { changed: !1, sizes: H }
853
+ { changed: !1, sizes: g }
831
854
  ),
832
- B((c) => c.changed)
855
+ k((u) => u.changed)
833
856
  )
834
857
  );
835
- q(
836
- S(
858
+ Y(
859
+ x(
837
860
  l,
838
- bt(
839
- (c, h) => ({ diff: c.prev - h, prev: h }),
861
+ Lt(
862
+ (u, p) => ({ diff: u.prev - p, prev: p }),
840
863
  { diff: 0, prev: 0 }
841
864
  ),
842
- B((c) => c.diff)
865
+ k((u) => u.diff)
843
866
  ),
844
- (c) => {
845
- const { groupIndices: h } = rt(m);
846
- if (c > 0)
847
- _(e, !0), _(s, c + pn(c, h));
848
- else if (c < 0) {
849
- const b = rt(p);
850
- b.length > 0 && (c -= pn(-c, b)), _(i, c);
867
+ (u) => {
868
+ const { groupIndices: p } = rt(f);
869
+ if (u > 0)
870
+ D(e, !0), D(s, u + pn(u, p));
871
+ else if (u < 0) {
872
+ const v = rt(a);
873
+ v.length > 0 && (u -= pn(-u, v)), D(i, u);
851
874
  }
852
875
  }
853
- ), q(S(l, N(t)), ([c, h]) => {
854
- c < 0 && h(
876
+ ), Y(x(l, $(t)), ([u, p]) => {
877
+ u < 0 && p(
855
878
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
856
879
  { firstItemIndex: l },
857
- pt.ERROR
880
+ Ct.ERROR
858
881
  );
859
882
  });
860
- const R = gt(s);
883
+ const y = bt(s);
861
884
  F(
862
- S(
885
+ x(
863
886
  s,
864
- N(m),
865
- B(([c, h]) => {
866
- const b = h.groupIndices.length > 0, O = [], k = h.lastSize;
867
- if (b) {
868
- const z = re(h.sizeTree, 0);
869
- let A = 0, j = 0;
870
- for (; A < c; ) {
871
- const U = h.groupIndices[j], ot = h.groupIndices.length === j + 1 ? 1 / 0 : h.groupIndices[j + 1] - U - 1;
887
+ $(f),
888
+ k(([u, p]) => {
889
+ const v = p.groupIndices.length > 0, O = [], B = p.lastSize;
890
+ if (v) {
891
+ const W = le(p.sizeTree, 0);
892
+ let _ = 0, j = 0;
893
+ for (; _ < u; ) {
894
+ const M = p.groupIndices[j], et = p.groupIndices.length === j + 1 ? 1 / 0 : p.groupIndices[j + 1] - M - 1;
872
895
  O.push({
873
- endIndex: U,
874
- size: z,
875
- startIndex: U
896
+ endIndex: M,
897
+ size: W,
898
+ startIndex: M
876
899
  }), O.push({
877
- endIndex: U + 1 + ot - 1,
878
- size: k,
879
- startIndex: U + 1
880
- }), j++, A += ot + 1;
900
+ endIndex: M + 1 + et - 1,
901
+ size: B,
902
+ startIndex: M + 1
903
+ }), j++, _ += et + 1;
881
904
  }
882
- const Y = Wt(h.sizeTree);
883
- return A !== c && Y.shift(), Y.reduce(
884
- (U, { k: ot, v: ut }) => {
885
- let ft = U.ranges;
886
- return U.prevSize !== 0 && (ft = [
887
- ...U.ranges,
905
+ const L = Dt(p.sizeTree);
906
+ return _ !== u && L.shift(), L.reduce(
907
+ (M, { k: et, v: wt }) => {
908
+ let ft = M.ranges;
909
+ return M.prevSize !== 0 && (ft = [
910
+ ...M.ranges,
888
911
  {
889
- endIndex: ot + c - 1,
890
- size: U.prevSize,
891
- startIndex: U.prevIndex
912
+ endIndex: et + u - 1,
913
+ size: M.prevSize,
914
+ startIndex: M.prevIndex
892
915
  }
893
916
  ]), {
894
- prevIndex: ot + c,
895
- prevSize: ut,
917
+ prevIndex: et + u,
918
+ prevSize: wt,
896
919
  ranges: ft
897
920
  };
898
921
  },
899
922
  {
900
- prevIndex: c,
923
+ prevIndex: u,
901
924
  prevSize: 0,
902
925
  ranges: O
903
926
  }
904
927
  ).ranges;
905
928
  }
906
- return Wt(h.sizeTree).reduce(
907
- (z, { k: A, v: j }) => ({
908
- prevIndex: A + c,
929
+ return Dt(p.sizeTree).reduce(
930
+ (W, { k: _, v: j }) => ({
931
+ prevIndex: _ + u,
909
932
  prevSize: j,
910
- ranges: [...z.ranges, { endIndex: A + c - 1, size: z.prevSize, startIndex: z.prevIndex }]
933
+ ranges: [...W.ranges, { endIndex: _ + u - 1, size: W.prevSize, startIndex: W.prevIndex }]
911
934
  }),
912
935
  {
913
936
  prevIndex: 0,
914
- prevSize: k,
937
+ prevSize: B,
915
938
  ranges: []
916
939
  }
917
940
  ).ranges;
@@ -919,81 +942,82 @@ const Lo = {
919
942
  ),
920
943
  n
921
944
  );
922
- const v = gt(
923
- S(
945
+ const z = bt(
946
+ x(
924
947
  i,
925
- N(m, C),
926
- B(([c, { offsetTree: h }, b]) => {
927
- const O = -c;
928
- return ie(O, h, b);
948
+ $(f, R),
949
+ k(([u, { offsetTree: p }, v]) => {
950
+ const O = -u;
951
+ return ue(O, p, v);
929
952
  })
930
953
  )
931
954
  );
932
955
  return F(
933
- S(
956
+ x(
934
957
  i,
935
- N(m, C),
936
- B(([c, h, b]) => {
937
- if (h.groupIndices.length > 0) {
938
- if (Z(h.sizeTree))
939
- return h;
940
- let k = jt();
941
- const z = rt(p);
942
- let A = 0, j = 0, Y = 0;
943
- for (; A < -c; ) {
944
- Y = z[j];
945
- const U = z[j + 1] - Y - 1;
946
- j++, A += U + 1;
958
+ $(f, R),
959
+ k(([u, p, v]) => {
960
+ if (p.groupIndices.length > 0) {
961
+ if (X(p.sizeTree))
962
+ return p;
963
+ let B = Zt();
964
+ const W = rt(a);
965
+ let _ = 0, j = 0, L = 0;
966
+ for (; _ < -u; ) {
967
+ L = W[j];
968
+ const M = W[j + 1] - L - 1;
969
+ j++, _ += M + 1;
947
970
  }
948
- if (k = Wt(h.sizeTree).reduce((U, { k: ot, v: ut }) => ht(U, Math.max(0, ot + c), ut), k), A !== -c) {
949
- const U = re(h.sizeTree, Y);
950
- k = ht(k, 0, U);
951
- const ot = wt(h.sizeTree, -c + 1)[1];
952
- k = ht(k, 1, ot);
971
+ if (B = Dt(p.sizeTree).reduce((M, { k: et, v: wt }) => yt(M, Math.max(0, et + u), wt), B), _ !== -u) {
972
+ const M = le(p.sizeTree, L);
973
+ B = yt(B, 0, M);
974
+ const et = kt(p.sizeTree, -u + 1)[1];
975
+ B = yt(B, 1, et);
953
976
  }
954
977
  return {
955
- ...h,
956
- sizeTree: k,
957
- ...Ge(h.offsetTree, 0, k, b)
978
+ ...p,
979
+ sizeTree: B,
980
+ ...Ge(p.offsetTree, 0, B, v)
958
981
  };
959
982
  } else {
960
- const k = Wt(h.sizeTree).reduce((z, { k: A, v: j }) => ht(z, Math.max(0, A + c), j), jt());
983
+ const B = Dt(p.sizeTree).reduce((W, { k: _, v: j }) => yt(W, Math.max(0, _ + u), j), Zt());
961
984
  return {
962
- ...h,
963
- sizeTree: k,
964
- ...Ge(h.offsetTree, 0, k, b)
985
+ ...p,
986
+ sizeTree: B,
987
+ ...Ge(p.offsetTree, 0, B, v)
965
988
  };
966
989
  }
967
990
  })
968
991
  ),
969
- m
992
+ f
970
993
  ), {
971
- beforeUnshiftWith: R,
994
+ beforeUnshiftWith: y,
972
995
  // input
973
- data: x,
974
- defaultItemSize: f,
996
+ data: w,
997
+ defaultItemSize: m,
975
998
  firstItemIndex: l,
976
999
  fixedItemSize: d,
977
- fixedGroupSize: I,
978
- gap: C,
979
- groupIndices: u,
980
- itemSize: g,
981
- listRefresh: T,
1000
+ fixedGroupSize: S,
1001
+ gap: R,
1002
+ groupIndices: c,
1003
+ heightEstimates: h,
1004
+ itemSize: T,
1005
+ listRefresh: b,
982
1006
  shiftWith: i,
983
- shiftWithOffset: v,
1007
+ shiftWithOffset: z,
984
1008
  sizeRanges: n,
985
1009
  // output
986
- sizes: m,
1010
+ sizes: f,
987
1011
  statefulTotalCount: r,
988
1012
  totalCount: o,
989
- trackItemSizes: a,
1013
+ trackItemSizes: I,
990
1014
  unshiftWith: s
991
1015
  };
992
1016
  },
993
- Q(Vt, De),
1017
+ tt(Wt, De),
994
1018
  { singleton: !0 }
995
1019
  );
996
- function Vo(t) {
1020
+ function Po(t) {
997
1021
  return t.reduce(
998
1022
  (e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
999
1023
  {
@@ -1002,54 +1026,54 @@ function Vo(t) {
1002
1026
  }
1003
1027
  );
1004
1028
  }
1005
- const Nn = K(
1029
+ const Dn = K(
1006
1030
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
1007
- const s = $(), i = $(), l = gt(S(s, B(Vo)));
1031
+ const s = U(), i = U(), l = bt(x(s, k(Po)));
1008
1032
  return F(
1009
- S(
1033
+ x(
1010
1034
  l,
1011
- B((u) => u.totalCount)
1035
+ k((c) => c.totalCount)
1012
1036
  ),
1013
1037
  n
1014
1038
  ), F(
1015
- S(
1039
+ x(
1016
1040
  l,
1017
- B((u) => u.groupIndices)
1041
+ k((c) => c.groupIndices)
1018
1042
  ),
1019
1043
  t
1020
1044
  ), F(
1021
- S(
1022
- st(r, e, o),
1023
- V(([u, d]) => Re(d)),
1024
- B(([u, d, f]) => wt(d.groupOffsetTree, Math.max(u - f, 0), "v")[0]),
1025
- X(),
1026
- B((u) => [u])
1045
+ x(
1046
+ ut(r, e, o),
1047
+ P(([c, d]) => be(d)),
1048
+ k(([c, d, m]) => kt(d.groupOffsetTree, Math.max(c - m, 0), "v")[0]),
1049
+ J(),
1050
+ k((c) => [c])
1027
1051
  ),
1028
1052
  i
1029
1053
  ), { groupCounts: s, topItemsIndexes: i };
1030
1054
  },
1031
- Q(Et, dt)
1032
- ), Pt = K(
1055
+ tt(Pt, It)
1056
+ ), _t = K(
1033
1057
  ([{ log: t }]) => {
1034
- const e = w(!1), n = gt(
1035
- S(
1058
+ const e = C(!1), n = bt(
1059
+ x(
1036
1060
  e,
1037
- V((o) => o),
1038
- X()
1061
+ P((o) => o),
1062
+ J()
1039
1063
  )
1040
1064
  );
1041
- return q(e, (o) => {
1042
- o && rt(t)("props updated", {}, pt.DEBUG);
1065
+ return Y(e, (o) => {
1066
+ o && rt(t)("props updated", {}, Ct.DEBUG);
1043
1067
  }), { didMount: n, propsReady: e };
1044
1068
  },
1045
- Q(Vt),
1069
+ tt(Wt),
1046
1070
  { singleton: !0 }
1047
- ), Po = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1048
- function Dn(t) {
1071
+ ), Go = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1072
+ function $n(t) {
1049
1073
  const e = typeof t == "number" ? { index: t } : t;
1050
- return e.align || (e.align = "start"), (!e.behavior || !Po) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1074
+ return e.align || (e.align = "start"), (!e.behavior || !Go) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1051
1075
  }
1052
- const ce = K(
1076
+ const me = K(
1053
1077
  ([
1054
1078
  { gap: t, listRefresh: e, sizes: n, totalCount: o },
1055
1079
  {
@@ -1057,62 +1081,62 @@ const ce = K(
1057
1081
  fixedHeaderHeight: s,
1058
1082
  footerHeight: i,
1059
1083
  headerHeight: l,
1060
- scrollingInProgress: u,
1084
+ scrollingInProgress: c,
1061
1085
  scrollTo: d,
1062
- smoothScrollTargetReached: f,
1063
- viewportHeight: I
1086
+ smoothScrollTargetReached: m,
1087
+ viewportHeight: S
1064
1088
  },
1065
- { log: g }
1089
+ { log: h }
1066
1090
  ]) => {
1067
- const x = $(), C = $(), H = w(0);
1068
- let m = null, p = null, a = null;
1069
- function T() {
1070
- m && (m(), m = null), a && (a(), a = null), p && (clearTimeout(p), p = null), _(u, !1);
1091
+ const T = U(), w = U(), R = C(0);
1092
+ let g = null, f = null, a = null;
1093
+ function I() {
1094
+ g && (g(), g = null), a && (a(), a = null), f && (clearTimeout(f), f = null), D(c, !1);
1071
1095
  }
1072
1096
  return F(
1073
- S(
1074
- x,
1075
- N(n, I, o, H, l, i, g),
1076
- N(t, s, r),
1077
- B(
1097
+ x(
1098
+ T,
1099
+ $(n, S, o, R, l, i, h),
1100
+ $(t, s, r),
1101
+ k(
1078
1102
  ([
1079
- [R, v, c, h, b, O, k, z],
1080
- A,
1081
- j,
1082
- Y
1103
+ [b, y, z, u, p, v, O, B],
1104
+ W,
1105
+ _,
1106
+ j
1083
1107
  ]) => {
1084
- const G = Dn(R), { align: U, behavior: ot, offset: ut } = G, ft = h - 1, mt = _n(G, v, ft);
1085
- let at = ie(mt, v.offsetTree, A) + O;
1086
- U === "end" ? (at += j + wt(v.sizeTree, mt)[1] - c + Y, mt === ft && (at += k)) : U === "center" ? at += (j + wt(v.sizeTree, mt)[1] - c + Y) / 2 : at -= b, ut && (at += ut);
1087
- const Gt = (xt) => {
1088
- T(), xt ? (z("retrying to scroll to", { location: R }, pt.DEBUG), _(x, R)) : (_(C, !0), z("list did not change, scroll successful", {}, pt.DEBUG));
1108
+ const L = $n(b), { align: xt, behavior: M, offset: et } = L, wt = u - 1, ft = Nn(L, y, wt);
1109
+ let St = ue(ft, y.offsetTree, W) + v;
1110
+ xt === "end" ? (St += _ + kt(y.sizeTree, ft)[1] - z + j, ft === wt && (St += O)) : xt === "center" ? St += (_ + kt(y.sizeTree, ft)[1] - z + j) / 2 : St -= p, et && (St += et);
1111
+ const Mt = (pt) => {
1112
+ I(), pt ? (B("retrying to scroll to", { location: b }, Ct.DEBUG), D(T, b)) : (D(w, !0), B("list did not change, scroll successful", {}, Ct.DEBUG));
1089
1113
  };
1090
- if (T(), ot === "smooth") {
1091
- let xt = !1;
1092
- a = q(e, (Xt) => {
1093
- xt = xt || Xt;
1094
- }), m = Tt(f, () => {
1095
- Gt(xt);
1114
+ if (I(), M === "smooth") {
1115
+ let pt = !1;
1116
+ a = Y(e, (qt) => {
1117
+ pt = pt || qt;
1118
+ }), g = Et(m, () => {
1119
+ Mt(pt);
1096
1120
  });
1097
1121
  } else
1098
- m = Tt(S(e, Go(150)), Gt);
1099
- return p = setTimeout(() => {
1100
- T();
1101
- }, 1200), _(u, !0), z("scrolling from index to", { behavior: ot, index: mt, top: at }, pt.DEBUG), { behavior: ot, top: at };
1122
+ g = Et(x(e, Mo(150)), Mt);
1123
+ return f = setTimeout(() => {
1124
+ I();
1125
+ }, 1200), D(c, !0), B("scrolling from index to", { behavior: M, index: ft, top: St }, Ct.DEBUG), { behavior: M, top: St };
1102
1126
  }
1103
1127
  )
1104
1128
  ),
1105
1129
  d
1106
1130
  ), {
1107
- scrollTargetReached: C,
1108
- scrollToIndex: x,
1109
- topListHeight: H
1131
+ scrollTargetReached: w,
1132
+ scrollToIndex: T,
1133
+ topListHeight: R
1110
1134
  };
1111
1135
  },
1112
- Q(Et, dt, Vt),
1136
+ tt(Pt, It, Wt),
1113
1137
  { singleton: !0 }
1114
1138
  );
1115
- function Go(t) {
1139
+ function Mo(t) {
1116
1140
  return (e) => {
1117
1141
  const n = setTimeout(() => {
1118
1142
  e(!1);
@@ -1131,54 +1155,54 @@ function Ke(t, e) {
1131
1155
  const n = e - 1;
1132
1156
  return typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
1133
1157
  }
1134
- const ue = K(
1158
+ const pe = K(
1135
1159
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
1136
- const l = w(!0), u = w(0), d = w(!0);
1160
+ const l = C(!0), c = C(0), d = C(!0);
1137
1161
  return F(
1138
- S(
1162
+ x(
1139
1163
  i,
1140
- N(u),
1141
- V(([f, I]) => !!I),
1142
- Rt(!1)
1164
+ $(c),
1165
+ P(([m, S]) => !!S),
1166
+ Ft(!1)
1143
1167
  ),
1144
1168
  l
1145
1169
  ), F(
1146
- S(
1170
+ x(
1147
1171
  i,
1148
- N(u),
1149
- V(([f, I]) => !!I),
1150
- Rt(!1)
1172
+ $(c),
1173
+ P(([m, S]) => !!S),
1174
+ Ft(!1)
1151
1175
  ),
1152
1176
  d
1153
- ), q(
1154
- S(
1155
- st(e, i),
1156
- N(l, n, t, d),
1157
- V(([[, f], I, { sizeTree: g }, x, C]) => f && (!Z(g) || Me(x)) && !I && !C),
1158
- N(u)
1177
+ ), Y(
1178
+ x(
1179
+ ut(e, i),
1180
+ $(l, n, t, d),
1181
+ P(([[, m], S, { sizeTree: h }, T, w]) => m && (!X(h) || Ae(T)) && !S && !w),
1182
+ $(c)
1159
1183
  ),
1160
- ([, f]) => {
1161
- Tt(r, () => {
1162
- _(d, !0);
1184
+ ([, m]) => {
1185
+ Et(r, () => {
1186
+ D(d, !0);
1163
1187
  }), Ue(4, () => {
1164
- Tt(o, () => {
1165
- _(l, !0);
1166
- }), _(s, f);
1188
+ Et(o, () => {
1189
+ D(l, !0);
1190
+ }), D(s, m);
1167
1191
  });
1168
1192
  }
1169
1193
  ), {
1170
1194
  initialItemFinalLocationReached: d,
1171
- initialTopMostItemIndex: u,
1195
+ initialTopMostItemIndex: c,
1172
1196
  scrolledToInitialItem: l
1173
1197
  };
1174
1198
  },
1175
- Q(Et, dt, ce, Pt),
1199
+ tt(Pt, It, me, _t),
1176
1200
  { singleton: !0 }
1177
1201
  );
1178
- function $n(t, e) {
1202
+ function Un(t, e) {
1179
1203
  return Math.abs(t - e) < 1.01;
1180
1204
  }
1181
- const le = "up", te = "down", Ao = "none", Mo = {
1205
+ const ae = "up", oe = "down", Ao = "none", Wo = {
1182
1206
  atBottom: !1,
1183
1207
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
1184
1208
  state: {
@@ -1187,141 +1211,141 @@ const le = "up", te = "down", Ao = "none", Mo = {
1187
1211
  scrollTop: 0,
1188
1212
  viewportHeight: 0
1189
1213
  }
1190
- }, Wo = 0, ae = K(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1191
- const i = w(!1), l = w(!0), u = $(), d = $(), f = w(4), I = w(Wo), g = ct(
1192
- S(
1193
- ze(S(L(r), Dt(1), Rt(!0)), S(L(r), Dt(1), Rt(!1), dn(100))),
1194
- X()
1214
+ }, _o = 0, he = K(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1215
+ const i = C(!1), l = C(!0), c = U(), d = U(), m = C(4), S = C(_o), h = ht(
1216
+ x(
1217
+ Fe(x(V(r), Kt(1), Ft(!0)), x(V(r), Kt(1), Ft(!1), dn(100))),
1218
+ J()
1195
1219
  ),
1196
1220
  !1
1197
- ), x = ct(
1198
- S(ze(S(n, Rt(!0)), S(n, Rt(!1), dn(200))), X()),
1221
+ ), T = ht(
1222
+ x(Fe(x(n, Ft(!0)), x(n, Ft(!1), dn(200))), J()),
1199
1223
  !1
1200
1224
  );
1201
1225
  F(
1202
- S(
1203
- st(L(r), L(I)),
1204
- B(([a, T]) => a <= T),
1205
- X()
1226
+ x(
1227
+ ut(V(r), V(S)),
1228
+ k(([a, I]) => a <= I),
1229
+ J()
1206
1230
  ),
1207
1231
  l
1208
- ), F(S(l, kt(50)), d);
1209
- const C = gt(
1210
- S(
1211
- st(o, L(s), L(e), L(t), L(f)),
1212
- bt((a, [{ scrollHeight: T, scrollTop: R }, v, c, h, b]) => {
1213
- const O = R + v - T > -b, k = {
1214
- scrollHeight: T,
1215
- scrollTop: R,
1216
- viewportHeight: v
1232
+ ), F(x(l, Gt(50)), d);
1233
+ const w = bt(
1234
+ x(
1235
+ ut(o, V(s), V(e), V(t), V(m)),
1236
+ Lt((a, [{ scrollHeight: I, scrollTop: b }, y, z, u, p]) => {
1237
+ const v = b + y - I > -p, O = {
1238
+ scrollHeight: I,
1239
+ scrollTop: b,
1240
+ viewportHeight: y
1217
1241
  };
1218
- if (O) {
1219
- let A, j;
1220
- return R > a.state.scrollTop ? (A = "SCROLLED_DOWN", j = a.state.scrollTop - R) : (A = "SIZE_DECREASED", j = a.state.scrollTop - R || a.scrollTopDelta), {
1242
+ if (v) {
1243
+ let W, _;
1244
+ return b > a.state.scrollTop ? (W = "SCROLLED_DOWN", _ = a.state.scrollTop - b) : (W = "SIZE_DECREASED", _ = a.state.scrollTop - b || a.scrollTopDelta), {
1221
1245
  atBottom: !0,
1222
- atBottomBecause: A,
1223
- scrollTopDelta: j,
1224
- state: k
1246
+ atBottomBecause: W,
1247
+ scrollTopDelta: _,
1248
+ state: O
1225
1249
  };
1226
1250
  }
1227
- let z;
1228
- return k.scrollHeight > a.state.scrollHeight ? z = "SIZE_INCREASED" : v < a.state.viewportHeight ? z = "VIEWPORT_HEIGHT_DECREASING" : R < a.state.scrollTop ? z = "SCROLLING_UPWARDS" : z = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1251
+ let B;
1252
+ return O.scrollHeight > a.state.scrollHeight ? B = "SIZE_INCREASED" : y < a.state.viewportHeight ? B = "VIEWPORT_HEIGHT_DECREASING" : b < a.state.scrollTop ? B = "SCROLLING_UPWARDS" : B = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1229
1253
  atBottom: !1,
1230
- notAtBottomBecause: z,
1231
- state: k
1254
+ notAtBottomBecause: B,
1255
+ state: O
1232
1256
  };
1233
- }, Mo),
1234
- X((a, T) => a && a.atBottom === T.atBottom)
1257
+ }, Wo),
1258
+ J((a, I) => a && a.atBottom === I.atBottom)
1235
1259
  )
1236
- ), H = ct(
1237
- S(
1260
+ ), R = ht(
1261
+ x(
1238
1262
  o,
1239
- bt(
1240
- (a, { scrollHeight: T, scrollTop: R, viewportHeight: v }) => {
1241
- if ($n(a.scrollHeight, T))
1263
+ Lt(
1264
+ (a, { scrollHeight: I, scrollTop: b, viewportHeight: y }) => {
1265
+ if (Un(a.scrollHeight, I))
1242
1266
  return {
1243
1267
  changed: !1,
1244
1268
  jump: 0,
1245
- scrollHeight: T,
1246
- scrollTop: R
1269
+ scrollHeight: I,
1270
+ scrollTop: b
1247
1271
  };
1248
1272
  {
1249
- const c = T - (R + v) < 1;
1250
- return a.scrollTop !== R && c ? {
1273
+ const z = I - (b + y) < 1;
1274
+ return a.scrollTop !== b && z ? {
1251
1275
  changed: !0,
1252
- jump: a.scrollTop - R,
1253
- scrollHeight: T,
1254
- scrollTop: R
1276
+ jump: a.scrollTop - b,
1277
+ scrollHeight: I,
1278
+ scrollTop: b
1255
1279
  } : {
1256
1280
  changed: !0,
1257
1281
  jump: 0,
1258
- scrollHeight: T,
1259
- scrollTop: R
1282
+ scrollHeight: I,
1283
+ scrollTop: b
1260
1284
  };
1261
1285
  }
1262
1286
  },
1263
1287
  { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
1264
1288
  ),
1265
- V((a) => a.changed),
1266
- B((a) => a.jump)
1289
+ P((a) => a.changed),
1290
+ k((a) => a.jump)
1267
1291
  ),
1268
1292
  0
1269
1293
  );
1270
1294
  F(
1271
- S(
1272
- C,
1273
- B((a) => a.atBottom)
1295
+ x(
1296
+ w,
1297
+ k((a) => a.atBottom)
1274
1298
  ),
1275
1299
  i
1276
- ), F(S(i, kt(50)), u);
1277
- const m = w(te);
1300
+ ), F(x(i, Gt(50)), c);
1301
+ const g = C(oe);
1278
1302
  F(
1279
- S(
1303
+ x(
1280
1304
  o,
1281
- B(({ scrollTop: a }) => a),
1282
- X(),
1283
- bt(
1284
- (a, T) => rt(x) ? { direction: a.direction, prevScrollTop: T } : { direction: T < a.prevScrollTop ? le : te, prevScrollTop: T },
1285
- { direction: te, prevScrollTop: 0 }
1305
+ k(({ scrollTop: a }) => a),
1306
+ J(),
1307
+ Lt(
1308
+ (a, I) => rt(T) ? { direction: a.direction, prevScrollTop: I } : { direction: I < a.prevScrollTop ? ae : oe, prevScrollTop: I },
1309
+ { direction: oe, prevScrollTop: 0 }
1286
1310
  ),
1287
- B((a) => a.direction)
1311
+ k((a) => a.direction)
1288
1312
  ),
1289
- m
1290
- ), F(S(o, kt(50), Rt(Ao)), m);
1291
- const p = w(0);
1313
+ g
1314
+ ), F(x(o, Gt(50), Ft(Ao)), g);
1315
+ const f = C(0);
1292
1316
  return F(
1293
- S(
1294
- g,
1295
- V((a) => !a),
1296
- Rt(0)
1317
+ x(
1318
+ h,
1319
+ P((a) => !a),
1320
+ Ft(0)
1297
1321
  ),
1298
- p
1322
+ f
1299
1323
  ), F(
1300
- S(
1324
+ x(
1301
1325
  r,
1302
- kt(100),
1303
- N(g),
1304
- V(([a, T]) => !!T),
1305
- bt(([a, T], [R]) => [T, R], [0, 0]),
1306
- B(([a, T]) => T - a)
1326
+ Gt(100),
1327
+ $(h),
1328
+ P(([a, I]) => !!I),
1329
+ Lt(([a, I], [b]) => [I, b], [0, 0]),
1330
+ k(([a, I]) => I - a)
1307
1331
  ),
1308
- p
1332
+ f
1309
1333
  ), {
1310
- atBottomState: C,
1311
- atBottomStateChange: u,
1312
- atBottomThreshold: f,
1334
+ atBottomState: w,
1335
+ atBottomStateChange: c,
1336
+ atBottomThreshold: m,
1313
1337
  atTopStateChange: d,
1314
- atTopThreshold: I,
1338
+ atTopThreshold: S,
1315
1339
  isAtBottom: i,
1316
1340
  isAtTop: l,
1317
- isScrolling: g,
1318
- lastJumpDueToItemResize: H,
1319
- scrollDirection: m,
1320
- scrollVelocity: p
1341
+ isScrolling: h,
1342
+ lastJumpDueToItemResize: R,
1343
+ scrollDirection: g,
1344
+ scrollVelocity: f
1321
1345
  };
1322
- }, Q(dt)), xe = "top", Te = "bottom", hn = "none";
1346
+ }, tt(It)), de = "top", fe = "bottom", hn = "none";
1323
1347
  function gn(t, e, n) {
1324
- return typeof t == "number" ? n === le && e === xe || n === te && e === Te ? t : 0 : n === le ? e === xe ? t.main : t.reverse : e === Te ? t.main : t.reverse;
1348
+ return typeof t == "number" ? n === ae && e === de || n === oe && e === fe ? t : 0 : n === ae ? e === de ? t.main : t.reverse : e === fe ? t.main : t.reverse;
1325
1349
  }
1326
1350
  function In(t, e) {
1327
1351
  var n;
@@ -1329,42 +1353,42 @@ function In(t, e) {
1329
1353
  }
1330
1354
  const je = K(
1331
1355
  ([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
1332
- const s = $(), i = w(0), l = w(0), u = w(0), d = ct(
1333
- S(
1334
- st(
1335
- L(o),
1336
- L(r),
1337
- L(n),
1338
- L(s, se),
1339
- L(u),
1340
- L(i),
1341
- L(e),
1342
- L(t),
1343
- L(l)
1356
+ const s = U(), i = C(0), l = C(0), c = C(0), d = ht(
1357
+ x(
1358
+ ut(
1359
+ V(o),
1360
+ V(r),
1361
+ V(n),
1362
+ V(s, ce),
1363
+ V(c),
1364
+ V(i),
1365
+ V(e),
1366
+ V(t),
1367
+ V(l)
1344
1368
  ),
1345
- B(
1369
+ k(
1346
1370
  ([
1347
- f,
1348
- I,
1349
- g,
1350
- [x, C],
1351
- H,
1352
1371
  m,
1353
- p,
1372
+ S,
1373
+ h,
1374
+ [T, w],
1375
+ R,
1376
+ g,
1377
+ f,
1354
1378
  a,
1355
- T
1379
+ I
1356
1380
  ]) => {
1357
- const R = f - a, v = m + p, c = Math.max(g - R, 0);
1358
- let h = hn;
1359
- const b = In(T, xe), O = In(T, Te);
1360
- return x -= a, x += g + p, C += g + p, C -= a, x > f + v - b && (h = le), C < f - c + I + O && (h = te), h !== hn ? [
1361
- Math.max(R - g - gn(H, xe, h) - b, 0),
1362
- R - c - p + I + gn(H, Te, h) + O
1381
+ const b = m - a, y = g + f, z = Math.max(h - b, 0);
1382
+ let u = hn;
1383
+ const p = In(I, de), v = In(I, fe);
1384
+ return T -= a, T += h + f, w += h + f, w -= a, T > m + y - p && (u = ae), w < m - z + S + v && (u = oe), u !== hn ? [
1385
+ Math.max(b - h - gn(R, de, u) - p, 0),
1386
+ b - z - f + S + gn(R, fe, u) + v
1363
1387
  ] : null;
1364
1388
  }
1365
1389
  ),
1366
- V((f) => f != null),
1367
- X(se)
1390
+ P((m) => m != null),
1391
+ J(ce)
1368
1392
  ),
1369
1393
  [0, 0]
1370
1394
  );
@@ -1372,20 +1396,20 @@ const je = K(
1372
1396
  increaseViewportBy: l,
1373
1397
  // input
1374
1398
  listBoundary: s,
1375
- overscan: u,
1399
+ overscan: c,
1376
1400
  topListHeight: i,
1377
1401
  // output
1378
1402
  visibleRange: d
1379
1403
  };
1380
1404
  },
1381
- Q(dt),
1405
+ tt(It),
1382
1406
  { singleton: !0 }
1383
1407
  );
1384
- function _o(t, e, n) {
1385
- if (Re(e)) {
1386
- const o = Wn(t, e);
1408
+ function No(t, e, n) {
1409
+ if (be(e)) {
1410
+ const o = _n(t, e);
1387
1411
  return [
1388
- { index: wt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1412
+ { index: kt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1389
1413
  { data: n == null ? void 0 : n[0], index: o, offset: 0, size: 0 }
1390
1414
  ];
1391
1415
  }
@@ -1402,61 +1426,61 @@ const Be = {
1402
1426
  topListHeight: 0,
1403
1427
  totalCount: 0
1404
1428
  };
1405
- function Ie(t, e, n, o, r, s) {
1406
- const { lastIndex: i, lastOffset: l, lastSize: u } = r;
1407
- let d = 0, f = 0;
1429
+ function Te(t, e, n, o, r, s) {
1430
+ const { lastIndex: i, lastOffset: l, lastSize: c } = r;
1431
+ let d = 0, m = 0;
1408
1432
  if (t.length > 0) {
1409
1433
  d = t[0].offset;
1410
- const H = t[t.length - 1];
1411
- f = H.offset + H.size;
1434
+ const R = t[t.length - 1];
1435
+ m = R.offset + R.size;
1412
1436
  }
1413
- const I = n - i, g = l + I * u + (I - 1) * o, x = d, C = g - f;
1437
+ const S = n - i, h = l + S * c + (S - 1) * o, T = d, w = h - m;
1414
1438
  return {
1415
- bottom: f,
1439
+ bottom: m,
1416
1440
  firstItemIndex: s,
1417
- items: Sn(t, r, s),
1418
- offsetBottom: C,
1441
+ items: xn(t, r, s),
1442
+ offsetBottom: w,
1419
1443
  offsetTop: d,
1420
- top: x,
1421
- topItems: Sn(e, r, s),
1422
- topListHeight: e.reduce((H, m) => m.size + H, 0),
1444
+ top: T,
1445
+ topItems: xn(e, r, s),
1446
+ topListHeight: e.reduce((R, g) => g.size + R, 0),
1423
1447
  totalCount: n
1424
1448
  };
1425
1449
  }
1426
- function Un(t, e, n, o, r, s) {
1450
+ function Kn(t, e, n, o, r, s) {
1427
1451
  let i = 0;
1428
1452
  if (n.groupIndices.length > 0)
1429
- for (const f of n.groupIndices) {
1430
- if (f - i >= t)
1453
+ for (const m of n.groupIndices) {
1454
+ if (m - i >= t)
1431
1455
  break;
1432
1456
  i++;
1433
1457
  }
1434
- const l = t + i, u = Ke(e, l), d = Array.from({ length: l }).map((f, I) => ({
1435
- data: s[I + u],
1436
- index: I + u,
1458
+ const l = t + i, c = Ke(e, l), d = Array.from({ length: l }).map((m, S) => ({
1459
+ data: s[S + c],
1460
+ index: S + c,
1437
1461
  offset: 0,
1438
1462
  size: 0
1439
1463
  }));
1440
- return Ie(d, [], l, r, n, o);
1464
+ return Te(d, [], l, r, n, o);
1441
1465
  }
1442
- function Sn(t, e, n) {
1466
+ function xn(t, e, n) {
1443
1467
  if (t.length === 0)
1444
1468
  return [];
1445
- if (!Re(e))
1469
+ if (!be(e))
1446
1470
  return t.map((d) => ({ ...d, index: d.index + n, originalIndex: d.index }));
1447
- const o = t[0].index, r = t[t.length - 1].index, s = [], i = ye(e.groupOffsetTree, o, r);
1448
- let l, u = 0;
1471
+ const o = t[0].index, r = t[t.length - 1].index, s = [], i = Xt(e.groupOffsetTree, o, r);
1472
+ let l, c = 0;
1449
1473
  for (const d of t) {
1450
- (!l || l.end < d.index) && (l = i.shift(), u = e.groupIndices.indexOf(l.start));
1451
- let f;
1452
- d.index === l.start ? f = {
1453
- index: u,
1474
+ (!l || l.end < d.index) && (l = i.shift(), c = e.groupIndices.indexOf(l.start));
1475
+ let m;
1476
+ d.index === l.start ? m = {
1477
+ index: c,
1454
1478
  type: "group"
1455
- } : f = {
1456
- groupIndex: u,
1457
- index: d.index - (u + 1) + n
1479
+ } : m = {
1480
+ groupIndex: c,
1481
+ index: d.index - (c + 1) + n
1458
1482
  }, s.push({
1459
- ...f,
1483
+ ...m,
1460
1484
  data: d.data,
1461
1485
  offset: d.offset,
1462
1486
  originalIndex: d.index,
@@ -1465,400 +1489,437 @@ function Sn(t, e, n) {
1465
1489
  }
1466
1490
  return s;
1467
1491
  }
1468
- const $t = K(
1492
+ function Sn(t, e) {
1493
+ var n;
1494
+ return t === void 0 ? 0 : typeof t == "number" ? t : (n = t[e]) != null ? n : 0;
1495
+ }
1496
+ const jt = K(
1469
1497
  ([
1470
1498
  { data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
1471
1499
  s,
1472
- { listBoundary: i, topListHeight: l, visibleRange: u },
1473
- { initialTopMostItemIndex: d, scrolledToInitialItem: f },
1474
- { topListHeight: I },
1475
- g,
1476
- { didMount: x },
1477
- { recalcInProgress: C }
1500
+ { listBoundary: i, topListHeight: l, visibleRange: c },
1501
+ { initialTopMostItemIndex: d, scrolledToInitialItem: m },
1502
+ { topListHeight: S },
1503
+ h,
1504
+ { didMount: T },
1505
+ { recalcInProgress: w }
1478
1506
  ]) => {
1479
- const H = w([]), m = w(0), p = $();
1480
- F(s.topItemsIndexes, H);
1481
- const a = ct(
1482
- S(
1483
- st(
1484
- x,
1485
- C,
1486
- L(u, se),
1487
- L(r),
1488
- L(o),
1489
- L(d),
1490
- f,
1491
- L(H),
1492
- L(e),
1493
- L(n),
1507
+ const R = C([]), g = C(0), f = U(), a = C(0);
1508
+ F(s.topItemsIndexes, R);
1509
+ const I = ht(
1510
+ x(
1511
+ ut(
1512
+ T,
1513
+ w,
1514
+ V(c, ce),
1515
+ V(r),
1516
+ V(o),
1517
+ V(d),
1518
+ m,
1519
+ V(R),
1520
+ V(e),
1521
+ V(n),
1522
+ V(a),
1494
1523
  t
1495
1524
  ),
1496
- V(([c, h, , b, , , , , , , O]) => {
1497
- const k = O && O.length !== b;
1498
- return c && !h && !k;
1525
+ P(([u, p, , v, , , , , , , , O]) => {
1526
+ const B = O && O.length !== v;
1527
+ return u && !p && !B;
1499
1528
  }),
1500
- B(
1529
+ k(
1501
1530
  ([
1502
1531
  ,
1503
1532
  ,
1504
- [c, h],
1505
- b,
1533
+ [u, p],
1534
+ v,
1506
1535
  O,
1507
- k,
1508
- z,
1509
- A,
1536
+ B,
1537
+ W,
1538
+ _,
1510
1539
  j,
1511
- Y,
1512
- G
1540
+ L,
1541
+ xt,
1542
+ M
1513
1543
  ]) => {
1514
- const U = O, { offsetTree: ot, sizeTree: ut } = U, ft = rt(m);
1515
- if (b === 0)
1516
- return { ...Be, totalCount: b };
1517
- if (c === 0 && h === 0)
1518
- return ft === 0 ? { ...Be, totalCount: b } : Un(ft, k, O, j, Y, G || []);
1519
- if (Z(ut))
1520
- return ft > 0 ? null : Ie(
1521
- _o(Ke(k, b), U, G),
1544
+ var q, at, gt, Tt;
1545
+ const et = O, { offsetTree: wt, sizeTree: ft } = et, St = rt(g);
1546
+ if (v === 0)
1547
+ return { ...Be, totalCount: v };
1548
+ if (u === 0 && p === 0)
1549
+ return St === 0 ? { ...Be, totalCount: v } : Kn(St, B, O, j, L, M || []);
1550
+ if (X(ft))
1551
+ return St > 0 ? null : Te(
1552
+ No(Ke(B, v), et, M),
1522
1553
  [],
1523
- b,
1524
- Y,
1525
- U,
1554
+ v,
1555
+ L,
1556
+ et,
1526
1557
  j
1527
1558
  );
1528
- const mt = [];
1529
- if (A.length > 0) {
1530
- const At = A[0], yt = A[A.length - 1];
1531
- let Bt = 0;
1532
- for (const y of ye(ut, At, yt)) {
1533
- const D = y.value, tt = Math.max(y.start, At), lt = Math.min(y.end, yt);
1534
- for (let et = tt; et <= lt; et++)
1535
- mt.push({ data: G == null ? void 0 : G[et], index: et, offset: Bt, size: D }), Bt += D;
1559
+ const Mt = [];
1560
+ if (_.length > 0) {
1561
+ const st = _[0], it = _[_.length - 1];
1562
+ let mt = 0;
1563
+ for (const lt of Xt(ft, st, it)) {
1564
+ const Z = lt.value, nt = Math.max(lt.start, st), vt = Math.min(lt.end, it);
1565
+ for (let ct = nt; ct <= vt; ct++)
1566
+ Mt.push({ data: M == null ? void 0 : M[ct], index: ct, offset: mt, size: Z }), mt += Z;
1536
1567
  }
1537
1568
  }
1538
- if (!z)
1539
- return Ie([], mt, b, Y, U, j);
1540
- const at = A.length > 0 ? A[A.length - 1] + 1 : 0, Gt = Bo(ot, c, h, at);
1541
- if (Gt.length === 0)
1569
+ if (!W)
1570
+ return Te([], Mt, v, L, et, j);
1571
+ const pt = _.length > 0 ? _[_.length - 1] + 1 : 0, qt = ko(wt, u, p, pt);
1572
+ if (qt.length === 0)
1542
1573
  return null;
1543
- const xt = b - 1, Xt = ve([], (At) => {
1544
- for (const yt of Gt) {
1545
- const Bt = yt.value;
1546
- let y = Bt.offset, D = yt.start;
1547
- const tt = Bt.size;
1548
- if (Bt.offset < c) {
1549
- D += Math.floor((c - Bt.offset + Y) / (tt + Y));
1550
- const et = D - yt.start;
1551
- y += et * tt + et * Y;
1574
+ const ee = v - 1, Ot = ye([], (st) => {
1575
+ for (const it of qt) {
1576
+ const mt = it.value;
1577
+ let lt = mt.offset, Z = it.start;
1578
+ const nt = mt.size;
1579
+ if (mt.offset < u) {
1580
+ Z += Math.floor((u - mt.offset + L) / (nt + L));
1581
+ const ct = Z - it.start;
1582
+ lt += ct * nt + ct * L;
1552
1583
  }
1553
- D < at && (y += (at - D) * tt, D = at);
1554
- const lt = Math.min(yt.end, xt);
1555
- for (let et = D; et <= lt && !(y >= h); et++)
1556
- At.push({ data: G == null ? void 0 : G[et], index: et, offset: y, size: tt }), y += tt + Y;
1584
+ Z < pt && (lt += (pt - Z) * nt, Z = pt);
1585
+ const vt = Math.min(it.end, ee);
1586
+ for (let ct = Z; ct <= vt && !(lt >= p); ct++)
1587
+ st.push({ data: M == null ? void 0 : M[ct], index: ct, offset: lt, size: nt }), lt += nt + L;
1557
1588
  }
1558
- });
1559
- return Ie(Xt, mt, b, Y, U, j);
1589
+ }), ne = Sn(xt, de), H = Sn(xt, fe);
1590
+ if (Ot.length > 0 && (ne > 0 || H > 0)) {
1591
+ const st = Ot[0], it = Ot[Ot.length - 1];
1592
+ if (ne > 0 && st.index > pt) {
1593
+ const mt = Math.min(ne, st.index - pt), lt = [];
1594
+ let Z = st.offset;
1595
+ for (let nt = st.index - 1; nt >= st.index - mt; nt--) {
1596
+ const ct = (at = (q = Xt(ft, nt, nt)[0]) == null ? void 0 : q.value) != null ? at : st.size;
1597
+ Z -= ct + L, lt.unshift({ data: M == null ? void 0 : M[nt], index: nt, offset: Z, size: ct });
1598
+ }
1599
+ Ot.unshift(...lt);
1600
+ }
1601
+ if (H > 0 && it.index < ee) {
1602
+ const mt = Math.min(H, ee - it.index);
1603
+ let lt = it.offset + it.size + L;
1604
+ for (let Z = it.index + 1; Z <= it.index + mt; Z++) {
1605
+ const vt = (Tt = (gt = Xt(ft, Z, Z)[0]) == null ? void 0 : gt.value) != null ? Tt : it.size;
1606
+ Ot.push({ data: M == null ? void 0 : M[Z], index: Z, offset: lt, size: vt }), lt += vt + L;
1607
+ }
1608
+ }
1609
+ }
1610
+ return Te(Ot, Mt, v, L, et, j);
1560
1611
  }
1561
1612
  ),
1562
1613
  //@ts-expect-error filter needs to be fixed
1563
- V((c) => c !== null),
1564
- X()
1614
+ P((u) => u !== null),
1615
+ J()
1565
1616
  ),
1566
1617
  Be
1567
1618
  );
1568
1619
  F(
1569
- S(
1620
+ x(
1570
1621
  t,
1571
- V(Me),
1572
- B((c) => c == null ? void 0 : c.length)
1622
+ P(Ae),
1623
+ k((u) => u == null ? void 0 : u.length)
1573
1624
  ),
1574
1625
  r
1575
1626
  ), F(
1576
- S(
1577
- a,
1578
- B((c) => c.topListHeight)
1627
+ x(
1628
+ I,
1629
+ k((u) => u.topListHeight)
1579
1630
  ),
1580
- I
1581
- ), F(I, l), F(
1582
- S(
1583
- a,
1584
- B((c) => [c.top, c.bottom])
1631
+ S
1632
+ ), F(S, l), F(
1633
+ x(
1634
+ I,
1635
+ k((u) => [u.top, u.bottom])
1585
1636
  ),
1586
1637
  i
1587
1638
  ), F(
1588
- S(
1589
- a,
1590
- B((c) => c.items)
1639
+ x(
1640
+ I,
1641
+ k((u) => u.items)
1591
1642
  ),
1592
- p
1643
+ f
1593
1644
  );
1594
- const T = gt(
1595
- S(
1596
- a,
1597
- V(({ items: c }) => c.length > 0),
1598
- N(r, t),
1599
- V(([{ items: c }, h]) => c[c.length - 1].originalIndex === h - 1),
1600
- B(([, c, h]) => [c - 1, h]),
1601
- X(se),
1602
- B(([c]) => c)
1645
+ const b = bt(
1646
+ x(
1647
+ I,
1648
+ P(({ items: u }) => u.length > 0),
1649
+ $(r, t),
1650
+ P(([{ items: u }, p]) => u[u.length - 1].originalIndex === p - 1),
1651
+ k(([, u, p]) => [u - 1, p]),
1652
+ J(ce),
1653
+ k(([u]) => u)
1603
1654
  )
1604
- ), R = gt(
1605
- S(
1606
- a,
1607
- kt(200),
1608
- V(({ items: c, topItems: h }) => c.length > 0 && c[0].originalIndex === h.length),
1609
- B(({ items: c }) => c[0].index),
1610
- X()
1655
+ ), y = bt(
1656
+ x(
1657
+ I,
1658
+ Gt(200),
1659
+ P(({ items: u, topItems: p }) => u.length > 0 && u[0].originalIndex === p.length),
1660
+ k(({ items: u }) => u[0].index),
1661
+ J()
1611
1662
  )
1612
- ), v = gt(
1613
- S(
1614
- a,
1615
- V(({ items: c }) => c.length > 0),
1616
- B(({ items: c }) => {
1617
- let h = 0, b = c.length - 1;
1618
- for (; c[h].type === "group" && h < b; )
1619
- h++;
1620
- for (; c[b].type === "group" && b > h; )
1621
- b--;
1663
+ ), z = bt(
1664
+ x(
1665
+ I,
1666
+ P(({ items: u }) => u.length > 0),
1667
+ k(({ items: u }) => {
1668
+ let p = 0, v = u.length - 1;
1669
+ for (; u[p].type === "group" && p < v; )
1670
+ p++;
1671
+ for (; u[v].type === "group" && v > p; )
1672
+ v--;
1622
1673
  return {
1623
- endIndex: c[b].index,
1624
- startIndex: c[h].index
1674
+ endIndex: u[v].index,
1675
+ startIndex: u[p].index
1625
1676
  };
1626
1677
  }),
1627
- X(An)
1678
+ J(An)
1628
1679
  )
1629
1680
  );
1630
- return { endReached: T, initialItemCount: m, itemsRendered: p, listState: a, rangeChanged: v, startReached: R, topItemsIndexes: H, ...g };
1681
+ return {
1682
+ endReached: b,
1683
+ initialItemCount: g,
1684
+ itemsRendered: f,
1685
+ listState: I,
1686
+ minOverscanItemCount: a,
1687
+ rangeChanged: z,
1688
+ startReached: y,
1689
+ topItemsIndexes: R,
1690
+ ...h
1691
+ };
1631
1692
  },
1632
- Q(
1633
- Et,
1634
- Nn,
1635
- je,
1636
- ue,
1637
- ce,
1638
- ae,
1693
+ tt(
1639
1694
  Pt,
1695
+ Dn,
1696
+ je,
1697
+ pe,
1698
+ me,
1699
+ he,
1700
+ _t,
1640
1701
  De
1641
1702
  ),
1642
1703
  { singleton: !0 }
1643
- ), Kn = K(
1704
+ ), jn = K(
1644
1705
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1645
- const s = $(), i = ct(
1646
- S(
1647
- st(n, t, o, e, r),
1648
- B(([l, u, d, f, I]) => l + u + d + f + I.offsetBottom + I.bottom)
1706
+ const s = U(), i = ht(
1707
+ x(
1708
+ ut(n, t, o, e, r),
1709
+ k(([l, c, d, m, S]) => l + c + d + m + S.offsetBottom + S.bottom)
1649
1710
  ),
1650
1711
  0
1651
1712
  );
1652
- return F(L(i), s), { totalListHeight: i, totalListHeightChanged: s };
1713
+ return F(V(i), s), { totalListHeight: i, totalListHeightChanged: s };
1653
1714
  },
1654
- Q(dt, $t),
1715
+ tt(It, jt),
1655
1716
  { singleton: !0 }
1656
- ), No = K(
1717
+ ), Do = K(
1657
1718
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1658
- const n = w(!1), o = ct(
1659
- S(
1660
- st(n, t, e),
1661
- V(([r]) => r),
1662
- B(([, r, s]) => Math.max(0, r - s)),
1663
- kt(0),
1664
- X()
1719
+ const n = C(!1), o = ht(
1720
+ x(
1721
+ ut(n, t, e),
1722
+ P(([r]) => r),
1723
+ k(([, r, s]) => Math.max(0, r - s)),
1724
+ Gt(0),
1725
+ J()
1665
1726
  ),
1666
1727
  0
1667
1728
  );
1668
1729
  return { alignToBottom: n, paddingTopAddition: o };
1669
1730
  },
1670
- Q(dt, Kn),
1731
+ tt(It, jn),
1671
1732
  { singleton: !0 }
1672
- ), jn = K(() => ({
1673
- context: w(null)
1674
- })), Do = ({
1733
+ ), qn = K(() => ({
1734
+ context: C(null)
1735
+ })), $o = ({
1675
1736
  itemBottom: t,
1676
1737
  itemTop: e,
1677
1738
  locationParams: { align: n, behavior: o, ...r },
1678
1739
  viewportBottom: s,
1679
1740
  viewportTop: i
1680
- }) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, qn = K(
1741
+ }) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, Yn = K(
1681
1742
  ([
1682
1743
  { gap: t, sizes: e, totalCount: n },
1683
- { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: u },
1744
+ { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
1684
1745
  { scrollToIndex: d }
1685
1746
  ]) => {
1686
- const f = $();
1747
+ const m = U();
1687
1748
  return F(
1688
- S(
1689
- f,
1690
- N(e, u, n, s, r, o, l),
1691
- N(t),
1692
- B(([[I, g, x, C, H, m, p, a], T]) => {
1693
- const { align: R, behavior: v, calculateViewLocation: c = Do, done: h, ...b } = I, O = _n(I, g, C - 1), k = ie(O, g.offsetTree, T) + H + m, z = k + wt(g.sizeTree, O)[1], A = a + m, j = a + x - p, Y = c({
1694
- itemBottom: z,
1695
- itemTop: k,
1696
- locationParams: { align: R, behavior: v, ...b },
1697
- viewportBottom: j,
1698
- viewportTop: A
1749
+ x(
1750
+ m,
1751
+ $(e, c, n, s, r, o, l),
1752
+ $(t),
1753
+ k(([[S, h, T, w, R, g, f, a], I]) => {
1754
+ const { align: b, behavior: y, calculateViewLocation: z = $o, done: u, ...p } = S, v = Nn(S, h, w - 1), O = ue(v, h.offsetTree, I) + R + g, B = O + kt(h.sizeTree, v)[1], W = a + g, _ = a + T - f, j = z({
1755
+ itemBottom: B,
1756
+ itemTop: O,
1757
+ locationParams: { align: b, behavior: y, ...p },
1758
+ viewportBottom: _,
1759
+ viewportTop: W
1699
1760
  });
1700
- return Y ? h && Tt(
1701
- S(
1761
+ return j ? u && Et(
1762
+ x(
1702
1763
  i,
1703
- V((G) => !G),
1764
+ P((L) => !L),
1704
1765
  // skips the initial publish of false, and the cleanup call.
1705
1766
  // but if scrollingInProgress is true, we skip the initial publish.
1706
- Dt(rt(i) ? 1 : 2)
1767
+ Kt(rt(i) ? 1 : 2)
1707
1768
  ),
1708
- h
1709
- ) : h && h(), Y;
1769
+ u
1770
+ ) : u && u(), j;
1710
1771
  }),
1711
- V((I) => I !== null)
1772
+ P((S) => S !== null)
1712
1773
  ),
1713
1774
  d
1714
1775
  ), {
1715
- scrollIntoView: f
1776
+ scrollIntoView: m
1716
1777
  };
1717
1778
  },
1718
- Q(Et, dt, ce, $t, Vt),
1779
+ tt(Pt, It, me, jt, Wt),
1719
1780
  { singleton: !0 }
1720
1781
  );
1721
- function xn(t) {
1782
+ function Tn(t) {
1722
1783
  return t ? t === "smooth" ? "smooth" : "auto" : !1;
1723
1784
  }
1724
- const $o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), Uo = K(
1785
+ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
1725
1786
  ([
1726
1787
  { listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
1727
1788
  { atBottomState: r, isAtBottom: s },
1728
1789
  { scrollToIndex: i },
1729
1790
  { scrolledToInitialItem: l },
1730
- { didMount: u, propsReady: d },
1731
- { log: f },
1732
- { scrollingInProgress: I },
1733
- { context: g },
1734
- { scrollIntoView: x }
1791
+ { didMount: c, propsReady: d },
1792
+ { log: m },
1793
+ { scrollingInProgress: S },
1794
+ { context: h },
1795
+ { scrollIntoView: T }
1735
1796
  ]) => {
1736
- const C = w(!1), H = $();
1737
- let m = null;
1738
- function p(v) {
1739
- _(i, {
1797
+ const w = C(!1), R = U();
1798
+ let g = null;
1799
+ function f(y) {
1800
+ D(i, {
1740
1801
  align: "end",
1741
- behavior: v,
1802
+ behavior: y,
1742
1803
  index: "LAST"
1743
1804
  });
1744
1805
  }
1745
- q(
1746
- S(
1747
- st(S(L(e), Dt(1)), u),
1748
- N(L(C), s, l, I),
1749
- B(([[v, c], h, b, O, k]) => {
1750
- let z = c && O, A = "auto";
1751
- return z && (A = $o(h, b || k), z = z && !!A), { followOutputBehavior: A, shouldFollow: z, totalCount: v };
1806
+ Y(
1807
+ x(
1808
+ ut(x(V(e), Kt(1)), c),
1809
+ $(V(w), s, l, S),
1810
+ k(([[y, z], u, p, v, O]) => {
1811
+ let B = z && v, W = "auto";
1812
+ return B && (W = Uo(u, p || O), B = B && !!W), { followOutputBehavior: W, shouldFollow: B, totalCount: y };
1752
1813
  }),
1753
- V(({ shouldFollow: v }) => v)
1814
+ P(({ shouldFollow: y }) => y)
1754
1815
  ),
1755
- ({ followOutputBehavior: v, totalCount: c }) => {
1756
- m && (m(), m = null), rt(n) ? requestAnimationFrame(() => {
1757
- rt(f)("following output to ", { totalCount: c }, pt.DEBUG), p(v);
1758
- }) : m = Tt(t, () => {
1759
- rt(f)("following output to ", { totalCount: c }, pt.DEBUG), p(v), m = null;
1816
+ ({ followOutputBehavior: y, totalCount: z }) => {
1817
+ g && (g(), g = null), rt(n) ? requestAnimationFrame(() => {
1818
+ rt(m)("following output to ", { totalCount: z }, Ct.DEBUG), f(y);
1819
+ }) : g = Et(t, () => {
1820
+ rt(m)("following output to ", { totalCount: z }, Ct.DEBUG), f(y), g = null;
1760
1821
  });
1761
1822
  }
1762
1823
  );
1763
- function a(v) {
1764
- const c = Tt(r, (h) => {
1765
- v && !h.atBottom && h.notAtBottomBecause === "SIZE_INCREASED" && !m && (rt(f)("scrolling to bottom due to increased size", {}, pt.DEBUG), p("auto"));
1824
+ function a(y) {
1825
+ const z = Et(r, (u) => {
1826
+ y && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && !g && (rt(m)("scrolling to bottom due to increased size", {}, Ct.DEBUG), f("auto"));
1766
1827
  });
1767
- setTimeout(c, 100);
1828
+ setTimeout(z, 100);
1768
1829
  }
1769
- q(
1770
- S(
1771
- st(L(C), e, d),
1772
- V(([v, , c]) => v && c),
1773
- bt(
1774
- ({ value: v }, [, c]) => ({ refreshed: v === c, value: c }),
1830
+ Y(
1831
+ x(
1832
+ ut(V(w), e, d),
1833
+ P(([y, , z]) => y && z),
1834
+ Lt(
1835
+ ({ value: y }, [, z]) => ({ refreshed: y === z, value: z }),
1775
1836
  { refreshed: !1, value: 0 }
1776
1837
  ),
1777
- V(({ refreshed: v }) => v),
1778
- N(C, e)
1838
+ P(({ refreshed: y }) => y),
1839
+ $(w, e)
1779
1840
  ),
1780
- ([, v]) => {
1781
- rt(l) && a(v !== !1);
1841
+ ([, y]) => {
1842
+ rt(l) && a(y !== !1);
1782
1843
  }
1783
- ), q(H, () => {
1784
- a(rt(C) !== !1);
1785
- }), q(st(L(C), r), ([v, c]) => {
1786
- v && !c.atBottom && c.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && p("auto");
1844
+ ), Y(R, () => {
1845
+ a(rt(w) !== !1);
1846
+ }), Y(ut(V(w), r), ([y, z]) => {
1847
+ y && !z.atBottom && z.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
1787
1848
  });
1788
- const T = w(null), R = $();
1849
+ const I = C(null), b = U();
1789
1850
  return F(
1790
- ze(
1791
- S(
1792
- L(o),
1793
- B((v) => {
1794
- var c;
1795
- return (c = v == null ? void 0 : v.length) != null ? c : 0;
1851
+ Fe(
1852
+ x(
1853
+ V(o),
1854
+ k((y) => {
1855
+ var z;
1856
+ return (z = y == null ? void 0 : y.length) != null ? z : 0;
1796
1857
  })
1797
1858
  ),
1798
- S(L(e))
1859
+ x(V(e))
1799
1860
  ),
1800
- R
1801
- ), q(
1802
- S(
1803
- st(S(R, Dt(1)), u),
1804
- N(L(T), l, I, g),
1805
- B(([[v, c], h, b, O, k]) => c && b && (h == null ? void 0 : h({ context: k, totalCount: v, scrollingInProgress: O }))),
1806
- V((v) => !!v),
1807
- kt(0)
1861
+ b
1862
+ ), Y(
1863
+ x(
1864
+ ut(x(b, Kt(1)), c),
1865
+ $(V(I), l, S, h),
1866
+ k(([[y, z], u, p, v, O]) => z && p && (u == null ? void 0 : u({ context: O, totalCount: y, scrollingInProgress: v }))),
1867
+ P((y) => !!y),
1868
+ Gt(0)
1808
1869
  ),
1809
- (v) => {
1810
- m && (m(), m = null), rt(n) ? requestAnimationFrame(() => {
1811
- rt(f)("scrolling into view", {}), _(x, v);
1812
- }) : m = Tt(t, () => {
1813
- rt(f)("scrolling into view", {}), _(x, v), m = null;
1870
+ (y) => {
1871
+ g && (g(), g = null), rt(n) ? requestAnimationFrame(() => {
1872
+ rt(m)("scrolling into view", {}), D(T, y);
1873
+ }) : g = Et(t, () => {
1874
+ rt(m)("scrolling into view", {}), D(T, y), g = null;
1814
1875
  });
1815
1876
  }
1816
- ), { autoscrollToBottom: H, followOutput: C, scrollIntoViewOnChange: T };
1877
+ ), { autoscrollToBottom: R, followOutput: w, scrollIntoViewOnChange: I };
1817
1878
  },
1818
- Q(
1819
- Et,
1820
- ae,
1821
- ce,
1822
- ue,
1879
+ tt(
1823
1880
  Pt,
1824
- Vt,
1825
- dt,
1826
- jn,
1827
- qn
1881
+ he,
1882
+ me,
1883
+ pe,
1884
+ _t,
1885
+ Wt,
1886
+ It,
1887
+ qn,
1888
+ Yn
1828
1889
  )
1829
- ), Ko = K(
1890
+ ), jo = K(
1830
1891
  ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (F(
1831
- S(
1892
+ x(
1832
1893
  l,
1833
- N(s),
1834
- V(([, u]) => u !== 0),
1835
- N(r, o, e, n, t),
1836
- B(([[, u], d, f, I, g, x = []]) => Un(u, d, f, I, g, x))
1894
+ $(s),
1895
+ P(([, c]) => c !== 0),
1896
+ $(r, o, e, n, t),
1897
+ k(([[, c], d, m, S, h, T = []]) => Kn(c, d, m, S, h, T))
1837
1898
  ),
1838
1899
  i
1839
1900
  ), {}),
1840
- Q(Et, ue, $t, Pt),
1901
+ tt(Pt, pe, jt, _t),
1841
1902
  { singleton: !0 }
1842
- ), jo = K(
1903
+ ), qo = K(
1843
1904
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1844
- const o = w(0);
1845
- return q(
1846
- S(
1905
+ const o = C(0);
1906
+ return Y(
1907
+ x(
1847
1908
  t,
1848
- N(o),
1849
- V(([, r]) => r !== 0),
1850
- B(([, r]) => ({ top: r }))
1909
+ $(o),
1910
+ P(([, r]) => r !== 0),
1911
+ k(([, r]) => ({ top: r }))
1851
1912
  ),
1852
1913
  (r) => {
1853
- Tt(
1854
- S(
1914
+ Et(
1915
+ x(
1855
1916
  n,
1856
- Dt(1),
1857
- V((s) => s.items.length > 1)
1917
+ Kt(1),
1918
+ P((s) => s.items.length > 1)
1858
1919
  ),
1859
1920
  () => {
1860
1921
  requestAnimationFrame(() => {
1861
- _(e, r);
1922
+ D(e, r);
1862
1923
  });
1863
1924
  }
1864
1925
  );
@@ -1867,56 +1928,56 @@ const $o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), Uo = K(
1867
1928
  initialScrollTop: o
1868
1929
  };
1869
1930
  },
1870
- Q(Pt, dt, $t),
1931
+ tt(_t, It, jt),
1871
1932
  { singleton: !0 }
1872
- ), Yn = K(
1933
+ ), Zn = K(
1873
1934
  ([{ scrollVelocity: t }]) => {
1874
- const e = w(!1), n = $(), o = w(!1);
1935
+ const e = C(!1), n = U(), o = C(!1);
1875
1936
  return F(
1876
- S(
1937
+ x(
1877
1938
  t,
1878
- N(o, e, n),
1879
- V(([r, s]) => !!s),
1880
- B(([r, s, i, l]) => {
1881
- const { enter: u, exit: d } = s;
1939
+ $(o, e, n),
1940
+ P(([r, s]) => !!s),
1941
+ k(([r, s, i, l]) => {
1942
+ const { enter: c, exit: d } = s;
1882
1943
  if (i) {
1883
1944
  if (d(r, l))
1884
1945
  return !1;
1885
- } else if (u(r, l))
1946
+ } else if (c(r, l))
1886
1947
  return !0;
1887
1948
  return i;
1888
1949
  }),
1889
- X()
1950
+ J()
1890
1951
  ),
1891
1952
  e
1892
- ), q(
1893
- S(st(e, t, n), N(o)),
1953
+ ), Y(
1954
+ x(ut(e, t, n), $(o)),
1894
1955
  ([[r, s, i], l]) => {
1895
1956
  r && l && l.change && l.change(s, i);
1896
1957
  }
1897
1958
  ), { isSeeking: e, scrollSeekConfiguration: o, scrollSeekRangeChanged: n, scrollVelocity: t };
1898
1959
  },
1899
- Q(ae),
1960
+ tt(he),
1900
1961
  { singleton: !0 }
1901
1962
  ), qe = K(([{ scrollContainerState: t, scrollTo: e }]) => {
1902
- const n = $(), o = $(), r = $(), s = w(!1), i = w(void 0);
1963
+ const n = U(), o = U(), r = U(), s = C(!1), i = C(void 0);
1903
1964
  return F(
1904
- S(
1905
- st(n, o),
1906
- B(([{ scrollHeight: l, scrollTop: u, viewportHeight: d }, { offsetTop: f }]) => ({
1965
+ x(
1966
+ ut(n, o),
1967
+ k(([{ scrollHeight: l, scrollTop: c, viewportHeight: d }, { offsetTop: m }]) => ({
1907
1968
  scrollHeight: l,
1908
- scrollTop: Math.max(0, u - f),
1969
+ scrollTop: Math.max(0, c - m),
1909
1970
  viewportHeight: d
1910
1971
  }))
1911
1972
  ),
1912
1973
  t
1913
1974
  ), F(
1914
- S(
1975
+ x(
1915
1976
  e,
1916
- N(o),
1917
- B(([l, { offsetTop: u }]) => ({
1977
+ $(o),
1978
+ k(([l, { offsetTop: c }]) => ({
1918
1979
  ...l,
1919
- top: l.top + u
1980
+ top: l.top + c
1920
1981
  }))
1921
1982
  ),
1922
1983
  r
@@ -1930,138 +1991,138 @@ const $o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), Uo = K(
1930
1991
  windowScrollTo: r,
1931
1992
  windowViewportRect: o
1932
1993
  };
1933
- }, Q(dt)), qo = K(
1994
+ }, tt(It)), Yo = K(
1934
1995
  ([
1935
1996
  { sizeRanges: t, sizes: e },
1936
1997
  { headerHeight: n, scrollTop: o },
1937
1998
  { initialTopMostItemIndex: r },
1938
1999
  { didMount: s },
1939
- { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: u }
2000
+ { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
1940
2001
  ]) => {
1941
- const d = $(), f = w(void 0), I = w(null), g = w(null);
1942
- return F(l, I), F(u, g), q(
1943
- S(
2002
+ const d = U(), m = C(void 0), S = C(null), h = C(null);
2003
+ return F(l, S), F(c, h), Y(
2004
+ x(
1944
2005
  d,
1945
- N(e, o, i, I, g, n)
2006
+ $(e, o, i, S, h, n)
1946
2007
  ),
1947
- ([x, C, H, m, p, a, T]) => {
1948
- const R = Fo(C.sizeTree);
1949
- m && p !== null && a !== null && (H = p.scrollTop - a.offsetTop), H -= T, x({ ranges: R, scrollTop: H });
2008
+ ([T, w, R, g, f, a, I]) => {
2009
+ const b = Oo(w.sizeTree);
2010
+ g && f !== null && a !== null && (R = f.scrollTop - a.offsetTop), R -= I, T({ ranges: b, scrollTop: R });
1950
2011
  }
1951
- ), F(S(f, V(Me), B(Yo)), r), F(
1952
- S(
2012
+ ), F(x(m, P(Ae), k(Zo)), r), F(
2013
+ x(
1953
2014
  s,
1954
- N(f),
1955
- V(([, x]) => x !== void 0),
1956
- X(),
1957
- B(([, x]) => x.ranges)
2015
+ $(m),
2016
+ P(([, T]) => T !== void 0),
2017
+ J(),
2018
+ k(([, T]) => T.ranges)
1958
2019
  ),
1959
2020
  t
1960
2021
  ), {
1961
2022
  getState: d,
1962
- restoreStateFrom: f
2023
+ restoreStateFrom: m
1963
2024
  };
1964
2025
  },
1965
- Q(Et, dt, ue, Pt, qe)
2026
+ tt(Pt, It, pe, _t, qe)
1966
2027
  );
1967
- function Yo(t) {
2028
+ function Zo(t) {
1968
2029
  return { align: "start", index: 0, offset: t.scrollTop };
1969
2030
  }
1970
- const Zo = K(([{ topItemsIndexes: t }]) => {
1971
- const e = w(0);
2031
+ const Xo = K(([{ topItemsIndexes: t }]) => {
2032
+ const e = C(0);
1972
2033
  return F(
1973
- S(
2034
+ x(
1974
2035
  e,
1975
- V((n) => n >= 0),
1976
- B((n) => Array.from({ length: n }).map((o, r) => r))
2036
+ P((n) => n >= 0),
2037
+ k((n) => Array.from({ length: n }).map((o, r) => r))
1977
2038
  ),
1978
2039
  t
1979
2040
  ), { topItemCount: e };
1980
- }, Q($t));
1981
- function Zn(t) {
2041
+ }, tt(jt));
2042
+ function Xn(t) {
1982
2043
  let e = !1, n;
1983
2044
  return () => (e || (e = !0, n = t()), n);
1984
2045
  }
1985
- const Xo = Zn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Jo = K(
2046
+ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Qo = K(
1986
2047
  ([
1987
2048
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
1988
2049
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
1989
- { listState: u },
1990
- { beforeUnshiftWith: d, gap: f, shiftWithOffset: I, sizes: g },
1991
- { log: x },
1992
- { recalcInProgress: C }
2050
+ { listState: c },
2051
+ { beforeUnshiftWith: d, gap: m, shiftWithOffset: S, sizes: h },
2052
+ { log: T },
2053
+ { recalcInProgress: w }
1993
2054
  ]) => {
1994
- const H = gt(
1995
- S(
1996
- u,
1997
- N(i),
1998
- bt(
1999
- ([, p, a, T], [{ bottom: R, items: v, offsetBottom: c, totalCount: h }, b]) => {
2000
- const O = R + c;
2001
- let k = 0;
2002
- return a === h && p.length > 0 && v.length > 0 && (v[0].originalIndex === 0 && p[0].originalIndex === 0 || (k = O - T, k !== 0 && (k += b))), [k, v, h, O];
2055
+ const R = bt(
2056
+ x(
2057
+ c,
2058
+ $(i),
2059
+ Lt(
2060
+ ([, f, a, I], [{ bottom: b, items: y, offsetBottom: z, totalCount: u }, p]) => {
2061
+ const v = b + z;
2062
+ let O = 0;
2063
+ return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (O = v - I, O !== 0 && (O += p))), [O, y, u, v];
2003
2064
  },
2004
2065
  [0, [], 0, 0]
2005
2066
  ),
2006
- V(([p]) => p !== 0),
2007
- N(o, l, n, r, x, C),
2008
- V(([, p, a, T, , , R]) => !R && !T && p !== 0 && a === le),
2009
- B(([[p], , , , , a]) => (a("Upward scrolling compensation", { amount: p }, pt.DEBUG), p))
2067
+ P(([f]) => f !== 0),
2068
+ $(o, l, n, r, T, w),
2069
+ P(([, f, a, I, , , b]) => !b && !I && f !== 0 && a === ae),
2070
+ k(([[f], , , , , a]) => (a("Upward scrolling compensation", { amount: f }, Ct.DEBUG), f))
2010
2071
  )
2011
2072
  );
2012
- function m(p) {
2013
- p > 0 ? (_(e, { behavior: "auto", top: -p }), _(t, 0)) : (_(t, 0), _(e, { behavior: "auto", top: -p }));
2073
+ function g(f) {
2074
+ f > 0 ? (D(e, { behavior: "auto", top: -f }), D(t, 0)) : (D(t, 0), D(e, { behavior: "auto", top: -f }));
2014
2075
  }
2015
- return q(S(H, N(t, s)), ([p, a, T]) => {
2016
- T && Xo() ? _(t, a - p) : m(-p);
2017
- }), q(
2018
- S(
2019
- st(ct(s, !1), t, C),
2020
- V(([p, a, T]) => !p && !T && a !== 0),
2021
- B(([p, a]) => a),
2022
- kt(1)
2076
+ return Y(x(R, $(t, s)), ([f, a, I]) => {
2077
+ I && Jo() ? D(t, a - f) : g(-f);
2078
+ }), Y(
2079
+ x(
2080
+ ut(ht(s, !1), t, w),
2081
+ P(([f, a, I]) => !f && !I && a !== 0),
2082
+ k(([f, a]) => a),
2083
+ Gt(1)
2023
2084
  ),
2024
- m
2085
+ g
2025
2086
  ), F(
2026
- S(
2027
- I,
2028
- B((p) => ({ top: -p }))
2087
+ x(
2088
+ S,
2089
+ k((f) => ({ top: -f }))
2029
2090
  ),
2030
2091
  e
2031
- ), q(
2032
- S(
2092
+ ), Y(
2093
+ x(
2033
2094
  d,
2034
- N(g, f),
2035
- B(([p, { groupIndices: a, lastSize: T, sizeTree: R }, v]) => {
2036
- function c(h) {
2037
- return h * (T + v);
2095
+ $(h, m),
2096
+ k(([f, { groupIndices: a, lastSize: I, sizeTree: b }, y]) => {
2097
+ function z(u) {
2098
+ return u * (I + y);
2038
2099
  }
2039
2100
  if (a.length === 0)
2040
- return c(p);
2101
+ return z(f);
2041
2102
  {
2042
- let h = 0;
2043
- const b = re(R, 0);
2044
- let O = 0, k = 0;
2045
- for (; O < p; ) {
2046
- O++, h += b;
2047
- let z = a.length === k + 1 ? 1 / 0 : a[k + 1] - a[k] - 1;
2048
- O + z > p && (h -= b, z = p - O + 1), O += z, h += c(z), k++;
2103
+ let u = 0;
2104
+ const p = le(b, 0);
2105
+ let v = 0, O = 0;
2106
+ for (; v < f; ) {
2107
+ v++, u += p;
2108
+ let B = a.length === O + 1 ? 1 / 0 : a[O + 1] - a[O] - 1;
2109
+ v + B > f && (u -= p, B = f - v + 1), v += B, u += z(B), O++;
2049
2110
  }
2050
- return h;
2111
+ return u;
2051
2112
  }
2052
2113
  })
2053
2114
  ),
2054
- (p) => {
2055
- _(t, p), requestAnimationFrame(() => {
2056
- _(e, { top: p }), requestAnimationFrame(() => {
2057
- _(t, 0), _(C, !1);
2115
+ (f) => {
2116
+ D(t, f), requestAnimationFrame(() => {
2117
+ D(e, { top: f }), requestAnimationFrame(() => {
2118
+ D(t, 0), D(w, !1);
2058
2119
  });
2059
2120
  });
2060
2121
  }
2061
2122
  ), { deviation: t };
2062
2123
  },
2063
- Q(dt, ae, $t, Et, Vt, De)
2064
- ), Qo = K(
2124
+ tt(It, he, jt, Pt, Wt, De)
2125
+ ), tr = K(
2065
2126
  ([
2066
2127
  t,
2067
2128
  e,
@@ -2071,9 +2132,9 @@ const Xo = Zn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2071
2132
  s,
2072
2133
  i,
2073
2134
  l,
2074
- u,
2135
+ c,
2075
2136
  d,
2076
- f
2137
+ m
2077
2138
  ]) => ({
2078
2139
  ...t,
2079
2140
  ...e,
@@ -2083,24 +2144,24 @@ const Xo = Zn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2083
2144
  ...s,
2084
2145
  ...i,
2085
2146
  ...l,
2086
- ...u,
2147
+ ...c,
2087
2148
  ...d,
2088
- ...f
2149
+ ...m
2089
2150
  }),
2090
- Q(
2151
+ tt(
2091
2152
  je,
2092
- Ko,
2093
- Pt,
2094
- Yn,
2095
- Kn,
2096
2153
  jo,
2097
- No,
2154
+ _t,
2155
+ Zn,
2156
+ jn,
2157
+ qo,
2158
+ Do,
2098
2159
  qe,
2099
- qn,
2100
- Vt,
2101
- jn
2160
+ Yn,
2161
+ Wt,
2162
+ qn
2102
2163
  )
2103
- ), Xn = K(
2164
+ ), Jn = K(
2104
2165
  ([
2105
2166
  {
2106
2167
  data: t,
@@ -2110,76 +2171,83 @@ const Xo = Zn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2110
2171
  fixedGroupSize: r,
2111
2172
  gap: s,
2112
2173
  groupIndices: i,
2113
- itemSize: l,
2114
- sizeRanges: u,
2115
- sizes: d,
2116
- statefulTotalCount: f,
2117
- totalCount: I,
2118
- trackItemSizes: g
2174
+ heightEstimates: l,
2175
+ itemSize: c,
2176
+ sizeRanges: d,
2177
+ sizes: m,
2178
+ statefulTotalCount: S,
2179
+ totalCount: h,
2180
+ trackItemSizes: T
2119
2181
  },
2120
- { initialItemFinalLocationReached: x, initialTopMostItemIndex: C, scrolledToInitialItem: H },
2121
- m,
2122
- p,
2182
+ { initialItemFinalLocationReached: w, initialTopMostItemIndex: R, scrolledToInitialItem: g },
2183
+ f,
2123
2184
  a,
2124
- { listState: T, topItemsIndexes: R, ...v },
2125
- { scrollToIndex: c },
2126
- h,
2127
- { topItemCount: b },
2128
- { groupCounts: O },
2129
- k
2130
- ]) => (F(v.rangeChanged, k.scrollSeekRangeChanged), F(
2131
- S(
2132
- k.windowViewportRect,
2133
- B((z) => z.visibleHeight)
2134
- ),
2135
- m.viewportHeight
2136
- ), {
2137
- data: t,
2138
- defaultItemHeight: e,
2139
- firstItemIndex: n,
2140
- fixedItemHeight: o,
2141
- fixedGroupHeight: r,
2142
- gap: s,
2143
- groupCounts: O,
2144
- initialItemFinalLocationReached: x,
2145
- initialTopMostItemIndex: C,
2146
- scrolledToInitialItem: H,
2147
- sizeRanges: u,
2148
- topItemCount: b,
2149
- topItemsIndexes: R,
2150
- // input
2151
- totalCount: I,
2152
- ...a,
2153
- groupIndices: i,
2154
- itemSize: l,
2155
- listState: T,
2156
- scrollToIndex: c,
2157
- // output
2158
- statefulTotalCount: f,
2159
- trackItemSizes: g,
2160
- // exported from stateFlagsSystem
2161
- ...v,
2162
- // the bag of IO from featureGroup1System
2163
- ...k,
2164
- ...m,
2165
- sizes: d,
2166
- ...p
2167
- }),
2168
- Q(
2169
- Et,
2170
- ue,
2171
- dt,
2172
- qo,
2173
- Uo,
2174
- $t,
2175
- ce,
2176
- Jo,
2177
- Zo,
2178
- Nn,
2179
- Qo
2185
+ I,
2186
+ b,
2187
+ { scrollToIndex: y },
2188
+ z,
2189
+ { topItemCount: u },
2190
+ { groupCounts: p },
2191
+ v
2192
+ ]) => {
2193
+ const { listState: O, minOverscanItemCount: B, topItemsIndexes: W, rangeChanged: _, ...j } = b;
2194
+ return F(_, v.scrollSeekRangeChanged), F(
2195
+ x(
2196
+ v.windowViewportRect,
2197
+ k((L) => L.visibleHeight)
2198
+ ),
2199
+ f.viewportHeight
2200
+ ), {
2201
+ data: t,
2202
+ defaultItemHeight: e,
2203
+ firstItemIndex: n,
2204
+ fixedItemHeight: o,
2205
+ fixedGroupHeight: r,
2206
+ gap: s,
2207
+ groupCounts: p,
2208
+ heightEstimates: l,
2209
+ initialItemFinalLocationReached: w,
2210
+ initialTopMostItemIndex: R,
2211
+ scrolledToInitialItem: g,
2212
+ sizeRanges: d,
2213
+ topItemCount: u,
2214
+ topItemsIndexes: W,
2215
+ // input
2216
+ totalCount: h,
2217
+ ...I,
2218
+ groupIndices: i,
2219
+ itemSize: c,
2220
+ listState: O,
2221
+ minOverscanItemCount: B,
2222
+ scrollToIndex: y,
2223
+ // output
2224
+ statefulTotalCount: S,
2225
+ trackItemSizes: T,
2226
+ // exported from stateFlagsSystem
2227
+ rangeChanged: _,
2228
+ ...j,
2229
+ // the bag of IO from featureGroup1System
2230
+ ...v,
2231
+ ...f,
2232
+ sizes: m,
2233
+ ...a
2234
+ };
2235
+ },
2236
+ tt(
2237
+ Pt,
2238
+ pe,
2239
+ It,
2240
+ Yo,
2241
+ Ko,
2242
+ jt,
2243
+ me,
2244
+ Qo,
2245
+ Xo,
2246
+ Dn,
2247
+ tr
2180
2248
  )
2181
2249
  );
2182
- function tr(t, e) {
2250
+ function er(t, e) {
2183
2251
  const n = {}, o = {};
2184
2252
  let r = 0;
2185
2253
  const s = t.length;
@@ -2189,158 +2257,158 @@ function tr(t, e) {
2189
2257
  Object.hasOwn(o, i) || (n[i] = e[i]);
2190
2258
  return n;
2191
2259
  }
2192
- const pe = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
2260
+ const Ie = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
2193
2261
  function Ye(t, e, n) {
2194
2262
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
2195
- function u(p, a) {
2196
- p.propsReady && _(p.propsReady, !1);
2197
- for (const T of o) {
2198
- const R = p[e.required[T]];
2199
- _(R, a[T]);
2263
+ function c(f, a) {
2264
+ f.propsReady && D(f.propsReady, !1);
2265
+ for (const I of o) {
2266
+ const b = f[e.required[I]];
2267
+ D(b, a[I]);
2200
2268
  }
2201
- for (const T of r)
2202
- if (T in a) {
2203
- const R = p[e.optional[T]];
2204
- _(R, a[T]);
2269
+ for (const I of r)
2270
+ if (I in a) {
2271
+ const b = f[e.optional[I]];
2272
+ D(b, a[I]);
2205
2273
  }
2206
- p.propsReady && _(p.propsReady, !0);
2274
+ f.propsReady && D(f.propsReady, !0);
2207
2275
  }
2208
- function d(p) {
2209
- return s.reduce((a, T) => (a[T] = (R) => {
2210
- const v = p[e.methods[T]];
2211
- _(v, R);
2276
+ function d(f) {
2277
+ return s.reduce((a, I) => (a[I] = (b) => {
2278
+ const y = f[e.methods[I]];
2279
+ D(y, b);
2212
2280
  }, a), {});
2213
2281
  }
2214
- function f(p) {
2215
- return i.reduce((a, T) => (a[T] = Io(p[e.events[T]]), a), {});
2282
+ function m(f) {
2283
+ return i.reduce((a, I) => (a[I] = xo(f[e.events[I]]), a), {});
2216
2284
  }
2217
- const I = E.forwardRef((p, a) => {
2218
- const { children: T, ...R } = p, [v] = E.useState(() => ve(xo(t), (b) => {
2219
- u(b, R);
2220
- })), [c] = E.useState(an(f, v));
2221
- pe(() => {
2222
- for (const b of i)
2223
- b in R && q(c[b], R[b]);
2285
+ const S = E.forwardRef((f, a) => {
2286
+ const { children: I, ...b } = f, [y] = E.useState(() => ye(To(t), (p) => {
2287
+ c(p, b);
2288
+ })), [z] = E.useState(an(m, y));
2289
+ Ie(() => {
2290
+ for (const p of i)
2291
+ p in b && Y(z[p], b[p]);
2224
2292
  return () => {
2225
- Object.values(c).map(We);
2293
+ Object.values(z).map(We);
2226
2294
  };
2227
- }, [R, c, v]), pe(() => {
2228
- u(v, R);
2229
- }), E.useImperativeHandle(a, un(d(v)));
2230
- const h = n;
2231
- return /* @__PURE__ */ P(l.Provider, { value: v, children: n ? /* @__PURE__ */ P(h, { ...tr([...o, ...r, ...i], R), children: T }) : T });
2232
- }), g = (p) => {
2295
+ }, [b, z, y]), Ie(() => {
2296
+ c(y, b);
2297
+ }), E.useImperativeHandle(a, un(d(y)));
2298
+ const u = n;
2299
+ return /* @__PURE__ */ G(l.Provider, { value: y, children: n ? /* @__PURE__ */ G(u, { ...er([...o, ...r, ...i], b), children: I }) : I });
2300
+ }), h = (f) => {
2233
2301
  const a = E.useContext(l);
2234
2302
  return E.useCallback(
2235
- (T) => {
2236
- _(a[p], T);
2303
+ (I) => {
2304
+ D(a[f], I);
2237
2305
  },
2238
- [a, p]
2306
+ [a, f]
2239
2307
  );
2240
- }, x = (p) => {
2241
- const T = E.useContext(l)[p], R = E.useCallback(
2242
- (v) => q(T, v),
2243
- [T]
2308
+ }, T = (f) => {
2309
+ const I = E.useContext(l)[f], b = E.useCallback(
2310
+ (y) => Y(I, y),
2311
+ [I]
2244
2312
  );
2245
2313
  return E.useSyncExternalStore(
2246
- R,
2247
- () => rt(T),
2248
- () => rt(T)
2314
+ b,
2315
+ () => rt(I),
2316
+ () => rt(I)
2249
2317
  );
2250
- }, C = (p) => {
2251
- const T = E.useContext(l)[p], [R, v] = E.useState(an(rt, T));
2252
- return pe(
2253
- () => q(T, (c) => {
2254
- c !== R && v(un(c));
2318
+ }, w = (f) => {
2319
+ const I = E.useContext(l)[f], [b, y] = E.useState(an(rt, I));
2320
+ return Ie(
2321
+ () => Y(I, (z) => {
2322
+ z !== b && y(un(z));
2255
2323
  }),
2256
- [T, R]
2257
- ), R;
2258
- }, H = E.version.startsWith("18") ? x : C;
2324
+ [I, b]
2325
+ ), b;
2326
+ }, R = E.version.startsWith("18") ? T : w;
2259
2327
  return {
2260
- Component: I,
2261
- useEmitter: (p, a) => {
2262
- const R = E.useContext(l)[p];
2263
- pe(() => q(R, a), [a, R]);
2328
+ Component: S,
2329
+ useEmitter: (f, a) => {
2330
+ const b = E.useContext(l)[f];
2331
+ Ie(() => Y(b, a), [a, b]);
2264
2332
  },
2265
- useEmitterValue: H,
2266
- usePublisher: g
2333
+ useEmitterValue: R,
2334
+ usePublisher: h
2267
2335
  };
2268
2336
  }
2269
- const be = E.createContext(void 0), Jn = E.createContext(void 0), Qn = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
2337
+ const Re = E.createContext(void 0), Qn = E.createContext(void 0), to = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
2270
2338
  function ke(t) {
2271
2339
  return "self" in t;
2272
2340
  }
2273
- function er(t) {
2341
+ function nr(t) {
2274
2342
  return "body" in t;
2275
2343
  }
2276
- function to(t, e, n, o = Yt, r, s) {
2277
- const i = E.useRef(null), l = E.useRef(null), u = E.useRef(null), d = E.useCallback(
2278
- (g) => {
2279
- let x, C, H;
2280
- const m = g.target;
2281
- if (er(m) || ke(m)) {
2282
- const a = ke(m) ? m : m.defaultView;
2283
- H = s ? a.scrollX : a.scrollY, x = s ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, C = s ? a.innerWidth : a.innerHeight;
2344
+ function eo(t, e, n, o = Qt, r, s) {
2345
+ const i = E.useRef(null), l = E.useRef(null), c = E.useRef(null), d = E.useCallback(
2346
+ (h) => {
2347
+ let T, w, R;
2348
+ const g = h.target;
2349
+ if (nr(g) || ke(g)) {
2350
+ const a = ke(g) ? g : g.defaultView;
2351
+ R = s ? a.scrollX : a.scrollY, T = s ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, w = s ? a.innerWidth : a.innerHeight;
2284
2352
  } else
2285
- H = s ? m.scrollLeft : m.scrollTop, x = s ? m.scrollWidth : m.scrollHeight, C = s ? m.offsetWidth : m.offsetHeight;
2286
- const p = () => {
2353
+ R = s ? g.scrollLeft : g.scrollTop, T = s ? g.scrollWidth : g.scrollHeight, w = s ? g.offsetWidth : g.offsetHeight;
2354
+ const f = () => {
2287
2355
  t({
2288
- scrollHeight: x,
2289
- scrollTop: Math.max(H, 0),
2290
- viewportHeight: C
2356
+ scrollHeight: T,
2357
+ scrollTop: Math.max(R, 0),
2358
+ viewportHeight: w
2291
2359
  });
2292
2360
  };
2293
- g.suppressFlushSync ? p() : ao.flushSync(p), l.current !== null && (H === l.current || H <= 0 || H === x - C) && (l.current = null, e(!0), u.current && (clearTimeout(u.current), u.current = null));
2361
+ h.suppressFlushSync ? f() : fo.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === T - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2294
2362
  },
2295
2363
  [t, e, s]
2296
2364
  );
2297
2365
  E.useEffect(() => {
2298
- const g = r || i.current;
2299
- return o(r || i.current), d({ suppressFlushSync: !0, target: g }), g.addEventListener("scroll", d, { passive: !0 }), () => {
2300
- o(null), g.removeEventListener("scroll", d);
2366
+ const h = r || i.current;
2367
+ return o(r || i.current), d({ suppressFlushSync: !0, target: h }), h.addEventListener("scroll", d, { passive: !0 }), () => {
2368
+ o(null), h.removeEventListener("scroll", d);
2301
2369
  };
2302
2370
  }, [i, d, n, o, r]);
2303
- function f(g) {
2304
- const x = i.current;
2305
- if (!x || (s ? "offsetWidth" in x && x.offsetWidth === 0 : "offsetHeight" in x && x.offsetHeight === 0))
2371
+ function m(h) {
2372
+ const T = i.current;
2373
+ if (!T || (s ? "offsetWidth" in T && T.offsetWidth === 0 : "offsetHeight" in T && T.offsetHeight === 0))
2306
2374
  return;
2307
- const C = g.behavior === "smooth";
2308
- let H, m, p;
2309
- ke(x) ? (m = Math.max(
2310
- vt(x.document.documentElement, s ? "width" : "height"),
2311
- s ? x.document.documentElement.scrollWidth : x.document.documentElement.scrollHeight
2312
- ), H = s ? x.innerWidth : x.innerHeight, p = s ? window.scrollX : window.scrollY) : (m = x[s ? "scrollWidth" : "scrollHeight"], H = vt(x, s ? "width" : "height"), p = x[s ? "scrollLeft" : "scrollTop"]);
2313
- const a = m - H;
2314
- if (g.top = Math.ceil(Math.max(Math.min(a, g.top), 0)), $n(H, m) || g.top === p) {
2315
- t({ scrollHeight: m, scrollTop: p, viewportHeight: H }), C && e(!0);
2375
+ const w = h.behavior === "smooth";
2376
+ let R, g, f;
2377
+ ke(T) ? (g = Math.max(
2378
+ zt(T.document.documentElement, s ? "width" : "height"),
2379
+ s ? T.document.documentElement.scrollWidth : T.document.documentElement.scrollHeight
2380
+ ), R = s ? T.innerWidth : T.innerHeight, f = s ? window.scrollX : window.scrollY) : (g = T[s ? "scrollWidth" : "scrollHeight"], R = zt(T, s ? "width" : "height"), f = T[s ? "scrollLeft" : "scrollTop"]);
2381
+ const a = g - R;
2382
+ if (h.top = Math.ceil(Math.max(Math.min(a, h.top), 0)), Un(R, g) || h.top === f) {
2383
+ t({ scrollHeight: g, scrollTop: f, viewportHeight: R }), w && e(!0);
2316
2384
  return;
2317
2385
  }
2318
- C ? (l.current = g.top, u.current && clearTimeout(u.current), u.current = setTimeout(() => {
2319
- u.current = null, l.current = null, e(!0);
2320
- }, 1e3)) : l.current = null, s && (g = { behavior: g.behavior, left: g.top }), x.scrollTo(g);
2386
+ w ? (l.current = h.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2387
+ c.current = null, l.current = null, e(!0);
2388
+ }, 1e3)) : l.current = null, s && (h = { behavior: h.behavior, left: h.top }), T.scrollTo(h);
2321
2389
  }
2322
- function I(g) {
2323
- s && (g = { behavior: g.behavior, left: g.top }), i.current.scrollBy(g);
2390
+ function S(h) {
2391
+ s && (h = { behavior: h.behavior, left: h.top }), i.current.scrollBy(h);
2324
2392
  }
2325
- return { scrollByCallback: I, scrollerRef: i, scrollToCallback: f };
2393
+ return { scrollByCallback: S, scrollerRef: i, scrollToCallback: m };
2326
2394
  }
2327
- const Fe = "-webkit-sticky", Tn = "sticky", Ze = Zn(() => {
2395
+ const ze = "-webkit-sticky", Cn = "sticky", Ze = Xn(() => {
2328
2396
  if (typeof document > "u")
2329
- return Tn;
2397
+ return Cn;
2330
2398
  const t = document.createElement("div");
2331
- return t.style.position = Fe, t.style.position === Fe ? Fe : Tn;
2399
+ return t.style.position = ze, t.style.position === ze ? ze : Cn;
2332
2400
  });
2333
2401
  function Xe(t) {
2334
2402
  return t;
2335
2403
  }
2336
- const nr = /* @__PURE__ */ K(() => {
2337
- const t = w((l) => `Item ${l}`), e = w((l) => `Group ${l}`), n = w({}), o = w(Xe), r = w("div"), s = w(Yt), i = (l, u = null) => ct(
2338
- S(
2404
+ const or = /* @__PURE__ */ K(() => {
2405
+ const t = C((l) => `Item ${l}`), e = C((l) => `Group ${l}`), n = C({}), o = C(Xe), r = C("div"), s = C(Qt), i = (l, c = null) => ht(
2406
+ x(
2339
2407
  n,
2340
- B((d) => d[l]),
2341
- X()
2408
+ k((d) => d[l]),
2409
+ J()
2342
2410
  ),
2343
- u
2411
+ c
2344
2412
  );
2345
2413
  return {
2346
2414
  components: n,
@@ -2359,230 +2427,230 @@ const nr = /* @__PURE__ */ K(() => {
2359
2427
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
2360
2428
  TopItemListComponent: i("TopItemList")
2361
2429
  };
2362
- }), or = /* @__PURE__ */ K(
2430
+ }), rr = /* @__PURE__ */ K(
2363
2431
  ([t, e]) => ({ ...t, ...e }),
2364
- Q(Xn, nr)
2365
- ), rr = ({ height: t }) => /* @__PURE__ */ P("div", { style: { height: t } }), sr = { overflowAnchor: "none", position: Ze(), zIndex: 1 }, eo = { overflowAnchor: "none" }, ir = { ...eo, display: "inline-block", height: "100%" }, Cn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2366
- const n = M("listState"), o = It("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = It("windowScrollContainerState"), l = It("scrollContainerState"), u = s || r ? i : l, d = M("itemContent"), f = M("context"), I = M("groupContent"), g = M("trackItemSizes"), x = M("itemSize"), C = M("log"), H = It("gap"), m = M("horizontalDirection"), { callbackRef: p } = On(
2432
+ tt(Jn, or)
2433
+ ), sr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), ir = { overflowAnchor: "none", position: Ze(), zIndex: 1 }, no = { overflowAnchor: "none" }, lr = { ...no, display: "inline-block", height: "100%" }, wn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2434
+ const n = A("listState"), o = Rt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Rt("windowScrollContainerState"), l = Rt("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), S = A("groupContent"), h = A("trackItemSizes"), T = A("itemSize"), w = A("log"), R = Rt("gap"), g = A("horizontalDirection"), { callbackRef: f } = Fn(
2367
2435
  o,
2368
- x,
2369
- g,
2370
- e ? Yt : u,
2371
- C,
2372
- H,
2436
+ T,
2437
+ h,
2438
+ e ? Qt : c,
2439
+ w,
2440
+ R,
2373
2441
  s,
2374
- m,
2375
- M("skipAnimationFrameInResizeObserver")
2376
- ), [a, T] = E.useState(0);
2377
- tn("deviation", (G) => {
2378
- a !== G && T(G);
2442
+ g,
2443
+ A("skipAnimationFrameInResizeObserver")
2444
+ ), [a, I] = E.useState(0);
2445
+ tn("deviation", (L) => {
2446
+ a !== L && I(L);
2379
2447
  });
2380
- const R = M("EmptyPlaceholder"), v = M("ScrollSeekPlaceholder") || rr, c = M("ListComponent"), h = M("ItemComponent"), b = M("GroupComponent"), O = M("computeItemKey"), k = M("isSeeking"), z = M("groupIndices").length > 0, A = M("alignToBottom"), j = M("initialItemFinalLocationReached"), Y = e ? {} : {
2448
+ const b = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") || sr, z = A("ListComponent"), u = A("ItemComponent"), p = A("GroupComponent"), v = A("computeItemKey"), O = A("isSeeking"), B = A("groupIndices").length > 0, W = A("alignToBottom"), _ = A("initialItemFinalLocationReached"), j = e ? {} : {
2381
2449
  boxSizing: "border-box",
2382
- ...m ? {
2450
+ ...g ? {
2383
2451
  display: "inline-block",
2384
2452
  height: "100%",
2385
- marginLeft: a !== 0 ? a : A ? "auto" : 0,
2453
+ marginLeft: a !== 0 ? a : W ? "auto" : 0,
2386
2454
  paddingLeft: n.offsetTop,
2387
2455
  paddingRight: n.offsetBottom,
2388
2456
  whiteSpace: "nowrap"
2389
2457
  } : {
2390
- marginTop: a !== 0 ? a : A ? "auto" : 0,
2458
+ marginTop: a !== 0 ? a : W ? "auto" : 0,
2391
2459
  paddingBottom: n.offsetBottom,
2392
2460
  paddingTop: n.offsetTop
2393
2461
  },
2394
- ...j ? {} : { visibility: "hidden" }
2462
+ ..._ ? {} : { visibility: "hidden" }
2395
2463
  };
2396
- return !e && n.totalCount === 0 && R ? /* @__PURE__ */ P(R, { ...J(R, f) }) : /* @__PURE__ */ P(
2397
- c,
2464
+ return !e && n.totalCount === 0 && b ? /* @__PURE__ */ G(b, { ...Q(b, m) }) : /* @__PURE__ */ G(
2465
+ z,
2398
2466
  {
2399
- ...J(c, f),
2467
+ ...Q(z, m),
2400
2468
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2401
- ref: p,
2402
- style: Y,
2403
- children: (e ? n.topItems : n.items).map((G) => {
2404
- const U = G.originalIndex, ot = O(U + n.firstItemIndex, G.data, f);
2405
- return k ? /* @__PURE__ */ _t(
2406
- v,
2469
+ ref: f,
2470
+ style: j,
2471
+ children: (e ? n.topItems : n.items).map((L) => {
2472
+ const xt = L.originalIndex, M = v(xt + n.firstItemIndex, L.data, m);
2473
+ return O ? /* @__PURE__ */ $t(
2474
+ y,
2407
2475
  {
2408
- ...J(v, f),
2409
- height: G.size,
2410
- index: G.index,
2411
- key: ot,
2412
- type: G.type || "item",
2413
- ...G.type === "group" ? {} : { groupIndex: G.groupIndex }
2476
+ ...Q(y, m),
2477
+ height: L.size,
2478
+ index: L.index,
2479
+ key: M,
2480
+ type: L.type || "item",
2481
+ ...L.type === "group" ? {} : { groupIndex: L.groupIndex }
2414
2482
  }
2415
- ) : G.type === "group" ? /* @__PURE__ */ _t(
2416
- b,
2483
+ ) : L.type === "group" ? /* @__PURE__ */ $t(
2484
+ p,
2417
2485
  {
2418
- ...J(b, f),
2419
- "data-index": U,
2420
- "data-item-index": G.index,
2421
- "data-known-size": G.size,
2422
- key: ot,
2423
- style: sr
2486
+ ...Q(p, m),
2487
+ "data-index": xt,
2488
+ "data-item-index": L.index,
2489
+ "data-known-size": L.size,
2490
+ key: M,
2491
+ style: ir
2424
2492
  },
2425
- I(G.index, f)
2426
- ) : /* @__PURE__ */ _t(
2427
- h,
2493
+ S(L.index, m)
2494
+ ) : /* @__PURE__ */ $t(
2495
+ u,
2428
2496
  {
2429
- ...J(h, f),
2430
- ...no(h, G.data),
2431
- "data-index": U,
2432
- "data-item-group-index": G.groupIndex,
2433
- "data-item-index": G.index,
2434
- "data-known-size": G.size,
2435
- key: ot,
2436
- style: m ? ir : eo
2497
+ ...Q(u, m),
2498
+ ...oo(u, L.data),
2499
+ "data-index": xt,
2500
+ "data-item-group-index": L.groupIndex,
2501
+ "data-item-index": L.index,
2502
+ "data-known-size": L.size,
2503
+ key: M,
2504
+ style: g ? lr : no
2437
2505
  },
2438
- z ? d(G.index, G.groupIndex, G.data, f) : d(G.index, G.data, f)
2506
+ B ? d(L.index, L.groupIndex, L.data, m) : d(L.index, L.data, m)
2439
2507
  );
2440
2508
  })
2441
2509
  }
2442
2510
  );
2443
- }), lr = {
2511
+ }), cr = {
2444
2512
  height: "100%",
2445
2513
  outline: "none",
2446
2514
  overflowY: "auto",
2447
2515
  position: "relative",
2448
2516
  WebkitOverflowScrolling: "touch"
2449
- }, cr = {
2517
+ }, ur = {
2450
2518
  outline: "none",
2451
2519
  overflowX: "auto",
2452
2520
  position: "relative"
2453
- }, Zt = (t) => ({
2521
+ }, te = (t) => ({
2454
2522
  height: "100%",
2455
2523
  position: "absolute",
2456
2524
  top: 0,
2457
2525
  width: "100%",
2458
2526
  ...t ? { display: "flex", flexDirection: "column" } : {}
2459
- }), ur = {
2527
+ }), ar = {
2460
2528
  position: Ze(),
2461
2529
  top: 0,
2462
2530
  width: "100%",
2463
2531
  zIndex: 1
2464
2532
  };
2465
- function J(t, e) {
2533
+ function Q(t, e) {
2466
2534
  if (typeof t != "string")
2467
2535
  return { context: e };
2468
2536
  }
2469
- function no(t, e) {
2537
+ function oo(t, e) {
2470
2538
  return { item: typeof t == "string" ? void 0 : e };
2471
2539
  }
2472
- const ar = /* @__PURE__ */ E.memo(function() {
2473
- const e = M("HeaderComponent"), n = It("headerHeight"), o = M("HeaderFooterTag"), r = Ht(
2540
+ const dr = /* @__PURE__ */ E.memo(function() {
2541
+ const e = A("HeaderComponent"), n = Rt("headerHeight"), o = A("HeaderFooterTag"), r = Vt(
2474
2542
  E.useMemo(
2475
2543
  () => (i) => {
2476
- n(vt(i, "height"));
2544
+ n(zt(i, "height"));
2477
2545
  },
2478
2546
  [n]
2479
2547
  ),
2480
2548
  !0,
2481
- M("skipAnimationFrameInResizeObserver")
2482
- ), s = M("context");
2483
- return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...J(e, s) }) }) : null;
2484
- }), dr = /* @__PURE__ */ E.memo(function() {
2485
- const e = M("FooterComponent"), n = It("footerHeight"), o = M("HeaderFooterTag"), r = Ht(
2549
+ A("skipAnimationFrameInResizeObserver")
2550
+ ), s = A("context");
2551
+ return e ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...Q(e, s) }) }) : null;
2552
+ }), fr = /* @__PURE__ */ E.memo(function() {
2553
+ const e = A("FooterComponent"), n = Rt("footerHeight"), o = A("HeaderFooterTag"), r = Vt(
2486
2554
  E.useMemo(
2487
2555
  () => (i) => {
2488
- n(vt(i, "height"));
2556
+ n(zt(i, "height"));
2489
2557
  },
2490
2558
  [n]
2491
2559
  ),
2492
2560
  !0,
2493
- M("skipAnimationFrameInResizeObserver")
2494
- ), s = M("context");
2495
- return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...J(e, s) }) }) : null;
2561
+ A("skipAnimationFrameInResizeObserver")
2562
+ ), s = A("context");
2563
+ return e ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...Q(e, s) }) }) : null;
2496
2564
  });
2497
2565
  function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2498
- return E.memo(function({ children: s, style: i, context: l, ...u }) {
2499
- const d = n("scrollContainerState"), f = e("ScrollerComponent"), I = n("smoothScrollTargetReached"), g = e("scrollerRef"), x = e("horizontalDirection") || !1, { scrollByCallback: C, scrollerRef: H, scrollToCallback: m } = to(
2566
+ return E.memo(function({ children: s, style: i, context: l, ...c }) {
2567
+ const d = n("scrollContainerState"), m = e("ScrollerComponent"), S = n("smoothScrollTargetReached"), h = e("scrollerRef"), T = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: g } = eo(
2500
2568
  d,
2501
- I,
2502
- f,
2503
- g,
2569
+ S,
2570
+ m,
2571
+ h,
2504
2572
  void 0,
2505
- x
2573
+ T
2506
2574
  );
2507
- return t("scrollTo", m), t("scrollBy", C), /* @__PURE__ */ P(
2508
- f,
2575
+ return t("scrollTo", g), t("scrollBy", w), /* @__PURE__ */ G(
2576
+ m,
2509
2577
  {
2510
2578
  "data-testid": "virtuoso-scroller",
2511
2579
  "data-virtuoso-scroller": !0,
2512
- ref: H,
2513
- style: { ...x ? cr : lr, ...i },
2580
+ ref: R,
2581
+ style: { ...T ? ur : cr, ...i },
2514
2582
  tabIndex: 0,
2515
- ...u,
2516
- ...J(f, l),
2583
+ ...c,
2584
+ ...Q(m, l),
2517
2585
  children: s
2518
2586
  }
2519
2587
  );
2520
2588
  });
2521
2589
  }
2522
2590
  function Qe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2523
- return E.memo(function({ children: s, style: i, context: l, ...u }) {
2524
- const d = n("windowScrollContainerState"), f = e("ScrollerComponent"), I = n("smoothScrollTargetReached"), g = e("totalListHeight"), x = e("deviation"), C = e("customScrollParent"), H = E.useRef(null), m = e("scrollerRef"), { scrollByCallback: p, scrollerRef: a, scrollToCallback: T } = to(
2591
+ return E.memo(function({ children: s, style: i, context: l, ...c }) {
2592
+ const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), S = n("smoothScrollTargetReached"), h = e("totalListHeight"), T = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), g = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: I } = eo(
2525
2593
  d,
2526
- I,
2527
- f,
2594
+ S,
2528
2595
  m,
2529
- C
2596
+ g,
2597
+ w
2530
2598
  );
2531
- return Qn(() => {
2532
- var R;
2533
- return a.current = C || ((R = H.current) == null ? void 0 : R.ownerDocument.defaultView), () => {
2599
+ return to(() => {
2600
+ var b;
2601
+ return a.current = w || ((b = R.current) == null ? void 0 : b.ownerDocument.defaultView), () => {
2534
2602
  a.current = null;
2535
2603
  };
2536
- }, [a, C]), t("windowScrollTo", T), t("scrollBy", p), /* @__PURE__ */ P(
2537
- f,
2604
+ }, [a, w]), t("windowScrollTo", I), t("scrollBy", f), /* @__PURE__ */ G(
2605
+ m,
2538
2606
  {
2539
- ref: H,
2607
+ ref: R,
2540
2608
  "data-virtuoso-scroller": !0,
2541
- style: { position: "relative", ...i, ...g !== 0 ? { height: g + x } : {} },
2542
- ...u,
2543
- ...J(f, l),
2609
+ style: { position: "relative", ...i, ...h !== 0 ? { height: h + T } : {} },
2610
+ ...c,
2611
+ ...Q(m, l),
2544
2612
  children: s
2545
2613
  }
2546
2614
  );
2547
2615
  });
2548
2616
  }
2549
- const fr = ({ children: t }) => {
2550
- const e = E.useContext(be), n = It("viewportHeight"), o = It("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = E.useMemo(
2551
- () => ne(n, (u) => vt(u, s ? "width" : "height")),
2617
+ const mr = ({ children: t }) => {
2618
+ const e = E.useContext(Re), n = Rt("viewportHeight"), o = Rt("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
2619
+ () => se(n, (c) => zt(c, s ? "width" : "height")),
2552
2620
  [n, s]
2553
- ), l = Ht(i, !0, M("skipAnimationFrameInResizeObserver"));
2621
+ ), l = Vt(i, !0, A("skipAnimationFrameInResizeObserver"));
2554
2622
  return E.useEffect(() => {
2555
2623
  e && (n(e.viewportHeight), o(e.itemHeight));
2556
- }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
2557
- }, mr = ({ children: t }) => {
2558
- const e = E.useContext(be), n = It("windowViewportRect"), o = It("fixedItemHeight"), r = M("customScrollParent"), s = Ne(
2624
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: te(r), children: t });
2625
+ }, pr = ({ children: t }) => {
2626
+ const e = E.useContext(Re), n = Rt("windowViewportRect"), o = Rt("fixedItemHeight"), r = A("customScrollParent"), s = Ne(
2559
2627
  n,
2560
2628
  r,
2561
- M("skipAnimationFrameInResizeObserver")
2562
- ), i = M("alignToBottom");
2629
+ A("skipAnimationFrameInResizeObserver")
2630
+ ), i = A("alignToBottom");
2563
2631
  return E.useEffect(() => {
2564
2632
  e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2565
- }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "window", ref: s, style: Zt(i), children: t });
2566
- }, pr = ({ children: t }) => {
2567
- const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...ur, marginTop: `${n}px` }, r = M("context");
2568
- return /* @__PURE__ */ P(e, { style: o, ...J(e, r), children: t });
2569
- }, hr = /* @__PURE__ */ E.memo(function(e) {
2570
- const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context");
2571
- return /* @__PURE__ */ Nt(r || n ? Ir : gr, { ...e, context: s, children: [
2572
- o && /* @__PURE__ */ P(pr, { children: /* @__PURE__ */ P(Cn, { showTopList: !0 }) }),
2573
- /* @__PURE__ */ Nt(r || n ? mr : fr, { children: [
2574
- /* @__PURE__ */ P(ar, {}),
2575
- /* @__PURE__ */ P(Cn, {}),
2576
- /* @__PURE__ */ P(dr, {})
2633
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: s, style: te(i), children: t });
2634
+ }, hr = ({ children: t }) => {
2635
+ const e = A("TopItemListComponent") || "div", n = A("headerHeight"), o = { ...ar, marginTop: `${n}px` }, r = A("context");
2636
+ return /* @__PURE__ */ G(e, { style: o, ...Q(e, r), children: t });
2637
+ }, gr = /* @__PURE__ */ E.memo(function(e) {
2638
+ const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
2639
+ return /* @__PURE__ */ Ut(r || n ? xr : Ir, { ...e, context: s, children: [
2640
+ o && /* @__PURE__ */ G(hr, { children: /* @__PURE__ */ G(wn, { showTopList: !0 }) }),
2641
+ /* @__PURE__ */ Ut(r || n ? pr : mr, { children: [
2642
+ /* @__PURE__ */ G(dr, {}),
2643
+ /* @__PURE__ */ G(wn, {}),
2644
+ /* @__PURE__ */ G(fr, {})
2577
2645
  ] })
2578
2646
  ] });
2579
2647
  }), {
2580
- Component: oo,
2648
+ Component: ro,
2581
2649
  useEmitter: tn,
2582
- useEmitterValue: M,
2583
- usePublisher: It
2650
+ useEmitterValue: A,
2651
+ usePublisher: Rt
2584
2652
  } = /* @__PURE__ */ Ye(
2585
- or,
2653
+ rr,
2586
2654
  {
2587
2655
  required: {},
2588
2656
  optional: {
@@ -2594,6 +2662,7 @@ const fr = ({ children: t }) => {
2594
2662
  groupContent: "groupContent",
2595
2663
  overscan: "overscan",
2596
2664
  increaseViewportBy: "increaseViewportBy",
2665
+ minOverscanItemCount: "minOverscanItemCount",
2597
2666
  totalCount: "totalCount",
2598
2667
  groupCounts: "groupCounts",
2599
2668
  topItemCount: "topItemCount",
@@ -2607,6 +2676,7 @@ const fr = ({ children: t }) => {
2607
2676
  fixedGroupHeight: "fixedGroupHeight",
2608
2677
  // Must be set above 'fixedItemHeight'
2609
2678
  fixedItemHeight: "fixedItemHeight",
2679
+ heightEstimates: "heightEstimates",
2610
2680
  itemSize: "itemSize",
2611
2681
  scrollSeekConfiguration: "scrollSeekConfiguration",
2612
2682
  headerFooterTag: "HeaderFooterTag",
@@ -2641,170 +2711,170 @@ const fr = ({ children: t }) => {
2641
2711
  groupIndices: "groupIndices"
2642
2712
  }
2643
2713
  },
2644
- hr
2645
- ), gr = /* @__PURE__ */ Je({ useEmitter: tn, useEmitterValue: M, usePublisher: It }), Ir = /* @__PURE__ */ Qe({ useEmitter: tn, useEmitterValue: M, usePublisher: It }), qr = oo, Yr = oo, Sr = /* @__PURE__ */ K(() => {
2646
- const t = w((d) => /* @__PURE__ */ Nt("td", { children: [
2714
+ gr
2715
+ ), Ir = /* @__PURE__ */ Je({ useEmitter: tn, useEmitterValue: A, usePublisher: Rt }), xr = /* @__PURE__ */ Qe({ useEmitter: tn, useEmitterValue: A, usePublisher: Rt }), Yr = ro, Zr = ro, Sr = /* @__PURE__ */ K(() => {
2716
+ const t = C((d) => /* @__PURE__ */ Ut("td", { children: [
2647
2717
  "Item $",
2648
2718
  d
2649
- ] })), e = w(null), n = w((d) => /* @__PURE__ */ Nt("td", { colSpan: 1e3, children: [
2719
+ ] })), e = C(null), n = C((d) => /* @__PURE__ */ Ut("td", { colSpan: 1e3, children: [
2650
2720
  "Group ",
2651
2721
  d
2652
- ] })), o = w(null), r = w(null), s = w({}), i = w(Xe), l = w(Yt), u = (d, f = null) => ct(
2653
- S(
2722
+ ] })), o = C(null), r = C(null), s = C({}), i = C(Xe), l = C(Qt), c = (d, m = null) => ht(
2723
+ x(
2654
2724
  s,
2655
- B((I) => I[d]),
2656
- X()
2725
+ k((S) => S[d]),
2726
+ J()
2657
2727
  ),
2658
- f
2728
+ m
2659
2729
  );
2660
2730
  return {
2661
2731
  components: s,
2662
2732
  computeItemKey: i,
2663
2733
  context: e,
2664
- EmptyPlaceholder: u("EmptyPlaceholder"),
2665
- FillerRow: u("FillerRow"),
2734
+ EmptyPlaceholder: c("EmptyPlaceholder"),
2735
+ FillerRow: c("FillerRow"),
2666
2736
  fixedFooterContent: r,
2667
2737
  fixedHeaderContent: o,
2668
2738
  itemContent: t,
2669
2739
  groupContent: n,
2670
- ScrollerComponent: u("Scroller", "div"),
2740
+ ScrollerComponent: c("Scroller", "div"),
2671
2741
  scrollerRef: l,
2672
- ScrollSeekPlaceholder: u("ScrollSeekPlaceholder"),
2673
- TableBodyComponent: u("TableBody", "tbody"),
2674
- TableComponent: u("Table", "table"),
2675
- TableFooterComponent: u("TableFoot", "tfoot"),
2676
- TableHeadComponent: u("TableHead", "thead"),
2677
- TableRowComponent: u("TableRow", "tr"),
2678
- GroupComponent: u("Group", "tr")
2742
+ ScrollSeekPlaceholder: c("ScrollSeekPlaceholder"),
2743
+ TableBodyComponent: c("TableBody", "tbody"),
2744
+ TableComponent: c("Table", "table"),
2745
+ TableFooterComponent: c("TableFoot", "tfoot"),
2746
+ TableHeadComponent: c("TableHead", "thead"),
2747
+ TableRowComponent: c("TableRow", "tr"),
2748
+ GroupComponent: c("Group", "tr")
2679
2749
  };
2680
- }), xr = /* @__PURE__ */ K(
2750
+ }), Tr = /* @__PURE__ */ K(
2681
2751
  ([t, e]) => ({ ...t, ...e }),
2682
- Q(Xn, Sr)
2683
- ), Tr = ({ height: t }) => /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", { style: { height: t } }) }), Cr = ({ height: t }) => /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", { style: { border: 0, height: t, padding: 0 } }) }), wr = { overflowAnchor: "none" }, wn = { position: Ze(), zIndex: 2, overflowAnchor: "none" }, vn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2684
- const n = W("listState"), o = W("computeItemKey"), r = W("firstItemIndex"), s = W("context"), i = W("isSeeking"), l = W("fixedHeaderHeight"), u = W("groupIndices").length > 0, d = W("itemContent"), f = W("groupContent"), I = W("ScrollSeekPlaceholder") || Tr, g = W("GroupComponent"), x = W("TableRowComponent"), C = (e ? n.topItems : []).reduce((m, p, a) => (a === 0 ? m.push(p.size) : m.push(m[a - 1] + p.size), m), []), H = (e ? n.topItems : n.items).map((m) => {
2685
- const p = m.originalIndex, a = o(p + r, m.data, s), T = e ? p === 0 ? 0 : C[p - 1] : 0;
2686
- return i ? /* @__PURE__ */ _t(
2687
- I,
2752
+ tt(Jn, Sr)
2753
+ ), Cr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), wr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), vr = { overflowAnchor: "none" }, vn = { position: Ze(), zIndex: 2, overflowAnchor: "none" }, yn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2754
+ const n = N("listState"), o = N("computeItemKey"), r = N("firstItemIndex"), s = N("context"), i = N("isSeeking"), l = N("fixedHeaderHeight"), c = N("groupIndices").length > 0, d = N("itemContent"), m = N("groupContent"), S = N("ScrollSeekPlaceholder") || Cr, h = N("GroupComponent"), T = N("TableRowComponent"), w = (e ? n.topItems : []).reduce((g, f, a) => (a === 0 ? g.push(f.size) : g.push(g[a - 1] + f.size), g), []), R = (e ? n.topItems : n.items).map((g) => {
2755
+ const f = g.originalIndex, a = o(f + r, g.data, s), I = e ? f === 0 ? 0 : w[f - 1] : 0;
2756
+ return i ? /* @__PURE__ */ $t(
2757
+ S,
2688
2758
  {
2689
- ...J(I, s),
2690
- height: m.size,
2691
- index: m.index,
2759
+ ...Q(S, s),
2760
+ height: g.size,
2761
+ index: g.index,
2692
2762
  key: a,
2693
- type: m.type || "item"
2763
+ type: g.type || "item"
2694
2764
  }
2695
- ) : m.type === "group" ? /* @__PURE__ */ _t(
2696
- g,
2765
+ ) : g.type === "group" ? /* @__PURE__ */ $t(
2766
+ h,
2697
2767
  {
2698
- ...J(g, s),
2699
- "data-index": p,
2700
- "data-item-index": m.index,
2701
- "data-known-size": m.size,
2768
+ ...Q(h, s),
2769
+ "data-index": f,
2770
+ "data-item-index": g.index,
2771
+ "data-known-size": g.size,
2702
2772
  key: a,
2703
2773
  style: {
2704
- ...wn,
2774
+ ...vn,
2705
2775
  top: l
2706
2776
  }
2707
2777
  },
2708
- f(m.index, s)
2709
- ) : /* @__PURE__ */ _t(
2710
- x,
2778
+ m(g.index, s)
2779
+ ) : /* @__PURE__ */ $t(
2780
+ T,
2711
2781
  {
2712
- ...J(x, s),
2713
- ...no(x, m.data),
2714
- "data-index": p,
2715
- "data-item-index": m.index,
2716
- "data-known-size": m.size,
2717
- "data-item-group-index": m.groupIndex,
2782
+ ...Q(T, s),
2783
+ ...oo(T, g.data),
2784
+ "data-index": f,
2785
+ "data-item-index": g.index,
2786
+ "data-known-size": g.size,
2787
+ "data-item-group-index": g.groupIndex,
2718
2788
  key: a,
2719
- style: e ? { ...wn, top: l + T } : wr
2789
+ style: e ? { ...vn, top: l + I } : vr
2720
2790
  },
2721
- u ? d(m.index, m.groupIndex, m.data, s) : d(m.index, m.data, s)
2791
+ c ? d(g.index, g.groupIndex, g.data, s) : d(g.index, g.data, s)
2722
2792
  );
2723
2793
  });
2724
- return /* @__PURE__ */ P(uo, { children: H });
2725
- }), vr = /* @__PURE__ */ E.memo(function() {
2726
- const e = W("listState"), n = W("topItemsIndexes").length > 0, o = Ct("sizeRanges"), r = W("useWindowScroll"), s = W("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), u = s || r ? i : l, d = W("trackItemSizes"), f = W("itemSize"), I = W("log"), { callbackRef: g, ref: x } = On(
2794
+ return /* @__PURE__ */ G(ao, { children: R });
2795
+ }), yr = /* @__PURE__ */ E.memo(function() {
2796
+ const e = N("listState"), n = N("topItemsIndexes").length > 0, o = Bt("sizeRanges"), r = N("useWindowScroll"), s = N("customScrollParent"), i = Bt("windowScrollContainerState"), l = Bt("scrollContainerState"), c = s || r ? i : l, d = N("trackItemSizes"), m = N("itemSize"), S = N("log"), { callbackRef: h, ref: T } = Fn(
2727
2797
  o,
2728
- f,
2798
+ m,
2729
2799
  d,
2730
- u,
2731
- I,
2800
+ c,
2801
+ S,
2732
2802
  void 0,
2733
2803
  s,
2734
2804
  !1,
2735
- W("skipAnimationFrameInResizeObserver")
2736
- ), [C, H] = E.useState(0);
2737
- en("deviation", (z) => {
2738
- C !== z && (x.current.style.marginTop = `${z}px`, H(z));
2805
+ N("skipAnimationFrameInResizeObserver")
2806
+ ), [w, R] = E.useState(0);
2807
+ en("deviation", (B) => {
2808
+ w !== B && (T.current.style.marginTop = `${B}px`, R(B));
2739
2809
  });
2740
- const m = W("EmptyPlaceholder"), p = W("FillerRow") || Cr, a = W("TableBodyComponent"), T = W("paddingTopAddition"), R = W("statefulTotalCount"), v = W("context");
2741
- if (R === 0 && m)
2742
- return /* @__PURE__ */ P(m, { ...J(m, v) });
2743
- const c = (n ? e.topItems : []).reduce((z, A) => z + A.size, 0), h = e.offsetTop + T + C - c, b = e.offsetBottom, O = h > 0 ? /* @__PURE__ */ P(p, { context: v, height: h }, "padding-top") : null, k = b > 0 ? /* @__PURE__ */ P(p, { context: v, height: b }, "padding-bottom") : null;
2744
- return /* @__PURE__ */ Nt(a, { "data-testid": "virtuoso-item-list", ref: g, ...J(a, v), children: [
2745
- O,
2746
- n && /* @__PURE__ */ P(vn, { showTopList: !0 }),
2747
- /* @__PURE__ */ P(vn, {}),
2748
- k
2810
+ const g = N("EmptyPlaceholder"), f = N("FillerRow") || wr, a = N("TableBodyComponent"), I = N("paddingTopAddition"), b = N("statefulTotalCount"), y = N("context");
2811
+ if (b === 0 && g)
2812
+ return /* @__PURE__ */ G(g, { ...Q(g, y) });
2813
+ const z = (n ? e.topItems : []).reduce((B, W) => B + W.size, 0), u = e.offsetTop + I + w - z, p = e.offsetBottom, v = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, O = p > 0 ? /* @__PURE__ */ G(f, { context: y, height: p }, "padding-bottom") : null;
2814
+ return /* @__PURE__ */ Ut(a, { "data-testid": "virtuoso-item-list", ref: h, ...Q(a, y), children: [
2815
+ v,
2816
+ n && /* @__PURE__ */ G(yn, { showTopList: !0 }),
2817
+ /* @__PURE__ */ G(yn, {}),
2818
+ O
2749
2819
  ] });
2750
- }), yr = ({ children: t }) => {
2751
- const e = E.useContext(be), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = Ht(
2752
- E.useMemo(() => ne(n, (s) => vt(s, "height")), [n]),
2820
+ }), br = ({ children: t }) => {
2821
+ const e = E.useContext(Re), n = Bt("viewportHeight"), o = Bt("fixedItemHeight"), r = Vt(
2822
+ E.useMemo(() => se(n, (s) => zt(s, "height")), [n]),
2753
2823
  !0,
2754
- W("skipAnimationFrameInResizeObserver")
2824
+ N("skipAnimationFrameInResizeObserver")
2755
2825
  );
2756
2826
  return E.useEffect(() => {
2757
2827
  e && (n(e.viewportHeight), o(e.itemHeight));
2758
- }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
2828
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: te(!1), children: t });
2759
2829
  }, Rr = ({ children: t }) => {
2760
- const e = E.useContext(be), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = W("customScrollParent"), s = Ne(
2830
+ const e = E.useContext(Re), n = Bt("windowViewportRect"), o = Bt("fixedItemHeight"), r = N("customScrollParent"), s = Ne(
2761
2831
  n,
2762
2832
  r,
2763
- W("skipAnimationFrameInResizeObserver")
2833
+ N("skipAnimationFrameInResizeObserver")
2764
2834
  );
2765
2835
  return E.useEffect(() => {
2766
2836
  e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2767
- }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
2768
- }, br = /* @__PURE__ */ E.memo(function(e) {
2769
- const n = W("useWindowScroll"), o = W("customScrollParent"), r = Ct("fixedHeaderHeight"), s = Ct("fixedFooterHeight"), i = W("fixedHeaderContent"), l = W("fixedFooterContent"), u = W("context"), d = Ht(
2770
- E.useMemo(() => ne(r, (a) => vt(a, "height")), [r]),
2837
+ }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: s, style: te(!1), children: t });
2838
+ }, Hr = /* @__PURE__ */ E.memo(function(e) {
2839
+ const n = N("useWindowScroll"), o = N("customScrollParent"), r = Bt("fixedHeaderHeight"), s = Bt("fixedFooterHeight"), i = N("fixedHeaderContent"), l = N("fixedFooterContent"), c = N("context"), d = Vt(
2840
+ E.useMemo(() => se(r, (a) => zt(a, "height")), [r]),
2771
2841
  !0,
2772
- W("skipAnimationFrameInResizeObserver")
2773
- ), f = Ht(
2774
- E.useMemo(() => ne(s, (a) => vt(a, "height")), [s]),
2842
+ N("skipAnimationFrameInResizeObserver")
2843
+ ), m = Vt(
2844
+ E.useMemo(() => se(s, (a) => zt(a, "height")), [s]),
2775
2845
  !0,
2776
- W("skipAnimationFrameInResizeObserver")
2777
- ), I = o || n ? Er : Hr, g = o || n ? Rr : yr, x = W("TableComponent"), C = W("TableHeadComponent"), H = W("TableFooterComponent"), m = i ? /* @__PURE__ */ P(
2778
- C,
2846
+ N("skipAnimationFrameInResizeObserver")
2847
+ ), S = o || n ? Br : Er, h = o || n ? Rr : br, T = N("TableComponent"), w = N("TableHeadComponent"), R = N("TableFooterComponent"), g = i ? /* @__PURE__ */ G(
2848
+ w,
2779
2849
  {
2780
2850
  ref: d,
2781
2851
  style: { position: "sticky", top: 0, zIndex: 2 },
2782
- ...J(C, u),
2852
+ ...Q(w, c),
2783
2853
  children: i()
2784
2854
  },
2785
2855
  "TableHead"
2786
- ) : null, p = l ? /* @__PURE__ */ P(
2787
- H,
2856
+ ) : null, f = l ? /* @__PURE__ */ G(
2857
+ R,
2788
2858
  {
2789
- ref: f,
2859
+ ref: m,
2790
2860
  style: { bottom: 0, position: "sticky", zIndex: 1 },
2791
- ...J(H, u),
2861
+ ...Q(R, c),
2792
2862
  children: l()
2793
2863
  },
2794
2864
  "TableFoot"
2795
2865
  ) : null;
2796
- return /* @__PURE__ */ P(I, { ...e, ...J(I, u), children: /* @__PURE__ */ P(g, { children: /* @__PURE__ */ Nt(x, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...J(x, u), children: [
2797
- m,
2798
- /* @__PURE__ */ P(vr, {}, "TableBody"),
2799
- p
2866
+ return /* @__PURE__ */ G(S, { ...e, ...Q(S, c), children: /* @__PURE__ */ G(h, { children: /* @__PURE__ */ Ut(T, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...Q(T, c), children: [
2867
+ g,
2868
+ /* @__PURE__ */ G(yr, {}, "TableBody"),
2869
+ f
2800
2870
  ] }) }) });
2801
2871
  }), {
2802
- Component: ro,
2872
+ Component: so,
2803
2873
  useEmitter: en,
2804
- useEmitterValue: W,
2805
- usePublisher: Ct
2874
+ useEmitterValue: N,
2875
+ usePublisher: Bt
2806
2876
  } = /* @__PURE__ */ Ye(
2807
- xr,
2877
+ Tr,
2808
2878
  {
2809
2879
  required: {},
2810
2880
  optional: {
@@ -2818,6 +2888,7 @@ const fr = ({ children: t }) => {
2818
2888
  fixedFooterContent: "fixedFooterContent",
2819
2889
  overscan: "overscan",
2820
2890
  increaseViewportBy: "increaseViewportBy",
2891
+ minOverscanItemCount: "minOverscanItemCount",
2821
2892
  totalCount: "totalCount",
2822
2893
  topItemCount: "topItemCount",
2823
2894
  initialTopMostItemIndex: "initialTopMostItemIndex",
@@ -2860,8 +2931,8 @@ const fr = ({ children: t }) => {
2860
2931
  groupIndices: "groupIndices"
2861
2932
  }
2862
2933
  },
2863
- br
2864
- ), Hr = /* @__PURE__ */ Je({ useEmitter: en, useEmitterValue: W, usePublisher: Ct }), Er = /* @__PURE__ */ Qe({ useEmitter: en, useEmitterValue: W, usePublisher: Ct }), Zr = ro, Xr = ro, yn = {
2934
+ Hr
2935
+ ), Er = /* @__PURE__ */ Je({ useEmitter: en, useEmitterValue: N, usePublisher: Bt }), Br = /* @__PURE__ */ Qe({ useEmitter: en, useEmitterValue: N, usePublisher: Bt }), Xr = so, Jr = so, bn = {
2865
2936
  bottom: 0,
2866
2937
  itemHeight: 0,
2867
2938
  items: [],
@@ -2869,7 +2940,7 @@ const fr = ({ children: t }) => {
2869
2940
  offsetBottom: 0,
2870
2941
  offsetTop: 0,
2871
2942
  top: 0
2872
- }, Br = {
2943
+ }, kr = {
2873
2944
  bottom: 0,
2874
2945
  itemHeight: 0,
2875
2946
  items: [{ index: 0 }],
@@ -2877,394 +2948,394 @@ const fr = ({ children: t }) => {
2877
2948
  offsetBottom: 0,
2878
2949
  offsetTop: 0,
2879
2950
  top: 0
2880
- }, { ceil: Rn, floor: Ce, max: ee, min: Oe, round: bn } = Math;
2881
- function Hn(t, e, n) {
2951
+ }, { ceil: Rn, floor: we, max: re, min: Oe, round: Hn } = Math;
2952
+ function En(t, e, n) {
2882
2953
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2883
2954
  }
2884
- function kr(t) {
2955
+ function zr(t) {
2885
2956
  return {
2886
- ...Br,
2957
+ ...kr,
2887
2958
  items: t
2888
2959
  };
2889
2960
  }
2890
- function he(t, e) {
2961
+ function xe(t, e) {
2891
2962
  return t && t.width === e.width && t.height === e.height;
2892
2963
  }
2893
- function Fr(t, e) {
2964
+ function Or(t, e) {
2894
2965
  return t && t.column === e.column && t.row === e.row;
2895
2966
  }
2896
- const Or = /* @__PURE__ */ K(
2967
+ const Fr = /* @__PURE__ */ K(
2897
2968
  ([
2898
2969
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
2899
- { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: u, scrollTop: d, smoothScrollTargetReached: f, viewportHeight: I },
2900
- g,
2901
- x,
2902
- { didMount: C, propsReady: H },
2903
- { customScrollParent: m, useWindowScroll: p, windowScrollContainerState: a, windowScrollTo: T, windowViewportRect: R },
2904
- v
2970
+ { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: S },
2971
+ h,
2972
+ T,
2973
+ { didMount: w, propsReady: R },
2974
+ { customScrollParent: g, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: I, windowViewportRect: b },
2975
+ y
2905
2976
  ]) => {
2906
- const c = w(0), h = w(0), b = w(yn), O = w({ height: 0, width: 0 }), k = w({ height: 0, width: 0 }), z = $(), A = $(), j = w(0), Y = w(null), G = w({ column: 0, row: 0 }), U = $(), ot = $(), ut = w(!1), ft = w(0), mt = w(!0), at = w(!1), Gt = w(!1);
2907
- q(
2908
- S(
2909
- C,
2910
- N(ft),
2911
- V(([y, D]) => !!D)
2977
+ const z = C(0), u = C(0), p = C(bn), v = C({ height: 0, width: 0 }), O = C({ height: 0, width: 0 }), B = U(), W = U(), _ = C(0), j = C(null), L = C({ column: 0, row: 0 }), xt = U(), M = U(), et = C(!1), wt = C(0), ft = C(!0), St = C(!1), Mt = C(!1);
2978
+ Y(
2979
+ x(
2980
+ w,
2981
+ $(wt),
2982
+ P(([H, q]) => !!q)
2912
2983
  ),
2913
2984
  () => {
2914
- _(mt, !1);
2985
+ D(ft, !1);
2915
2986
  }
2916
- ), q(
2917
- S(
2918
- st(C, mt, k, O, ft, at),
2919
- V(([y, D, tt, lt, , et]) => y && !D && tt.height !== 0 && lt.height !== 0 && !et)
2987
+ ), Y(
2988
+ x(
2989
+ ut(w, ft, O, v, wt, St),
2990
+ P(([H, q, at, gt, , Tt]) => H && !q && at.height !== 0 && gt.height !== 0 && !Tt)
2920
2991
  ),
2921
- ([, , , , y]) => {
2922
- _(at, !0), Ue(1, () => {
2923
- _(z, y);
2924
- }), Tt(S(d), () => {
2925
- _(e, [0, 0]), _(mt, !0);
2992
+ ([, , , , H]) => {
2993
+ D(St, !0), Ue(1, () => {
2994
+ D(B, H);
2995
+ }), Et(x(d), () => {
2996
+ D(e, [0, 0]), D(ft, !0);
2926
2997
  });
2927
2998
  }
2928
2999
  ), F(
2929
- S(
2930
- ot,
2931
- V((y) => y != null && y.scrollTop > 0),
2932
- Rt(0)
3000
+ x(
3001
+ M,
3002
+ P((H) => H != null && H.scrollTop > 0),
3003
+ Ft(0)
2933
3004
  ),
2934
- h
2935
- ), q(
2936
- S(
2937
- C,
2938
- N(ot),
2939
- V(([, y]) => y != null)
3005
+ u
3006
+ ), Y(
3007
+ x(
3008
+ w,
3009
+ $(M),
3010
+ P(([, H]) => H != null)
2940
3011
  ),
2941
- ([, y]) => {
2942
- y && (_(O, y.viewport), _(k, y.item), _(G, y.gap), y.scrollTop > 0 && (_(ut, !0), Tt(S(d, Dt(1)), (D) => {
2943
- _(ut, !1);
2944
- }), _(u, { top: y.scrollTop })));
3012
+ ([, H]) => {
3013
+ H && (D(v, H.viewport), D(O, H.item), D(L, H.gap), H.scrollTop > 0 && (D(et, !0), Et(x(d, Kt(1)), (q) => {
3014
+ D(et, !1);
3015
+ }), D(c, { top: H.scrollTop })));
2945
3016
  }
2946
3017
  ), F(
2947
- S(
2948
- O,
2949
- B(({ height: y }) => y)
3018
+ x(
3019
+ v,
3020
+ k(({ height: H }) => H)
2950
3021
  ),
2951
- I
3022
+ S
2952
3023
  ), F(
2953
- S(
2954
- st(
2955
- L(O, he),
2956
- L(k, he),
2957
- L(G, (y, D) => y && y.column === D.column && y.row === D.row),
2958
- L(d)
3024
+ x(
3025
+ ut(
3026
+ V(v, xe),
3027
+ V(O, xe),
3028
+ V(L, (H, q) => H && H.column === q.column && H.row === q.row),
3029
+ V(d)
2959
3030
  ),
2960
- B(([y, D, tt, lt]) => ({
2961
- gap: tt,
2962
- item: D,
2963
- scrollTop: lt,
2964
- viewport: y
3031
+ k(([H, q, at, gt]) => ({
3032
+ gap: at,
3033
+ item: q,
3034
+ scrollTop: gt,
3035
+ viewport: H
2965
3036
  }))
2966
3037
  ),
2967
- U
3038
+ xt
2968
3039
  ), F(
2969
- S(
2970
- st(
2971
- L(c),
3040
+ x(
3041
+ ut(
3042
+ V(z),
2972
3043
  o,
2973
- L(G, Fr),
2974
- L(k, he),
2975
- L(O, he),
2976
- L(Y),
2977
- L(h),
2978
- L(ut),
2979
- L(mt),
2980
- L(ft)
3044
+ V(L, Or),
3045
+ V(O, xe),
3046
+ V(v, xe),
3047
+ V(j),
3048
+ V(u),
3049
+ V(et),
3050
+ V(ft),
3051
+ V(wt)
2981
3052
  ),
2982
- V(([, , , , , , , y]) => !y),
2983
- B(
3053
+ P(([, , , , , , , H]) => !H),
3054
+ k(
2984
3055
  ([
2985
- y,
2986
- [D, tt],
2987
- lt,
2988
- et,
2989
- Ft,
2990
- Jt,
2991
- Ut,
3056
+ H,
3057
+ [q, at],
3058
+ gt,
3059
+ Tt,
3060
+ st,
3061
+ it,
3062
+ mt,
2992
3063
  ,
2993
- de,
2994
- Ot
3064
+ lt,
3065
+ Z
2995
3066
  ]) => {
2996
- const { column: zt, row: Qt } = lt, { height: fe, width: He } = et, { width: nn } = Ft;
2997
- if (Ut === 0 && (y === 0 || nn === 0))
2998
- return yn;
3067
+ const { column: nt, row: vt } = gt, { height: ct, width: He } = Tt, { width: nn } = st;
3068
+ if (mt === 0 && (H === 0 || nn === 0))
3069
+ return bn;
2999
3070
  if (He === 0) {
3000
- const cn = Ke(Ot, y), co = cn + Math.max(Ut - 1, 0);
3001
- return kr(Hn(cn, co, Jt));
3071
+ const cn = Ke(Z, H), uo = cn + Math.max(mt - 1, 0);
3072
+ return zr(En(cn, uo, it));
3002
3073
  }
3003
- const me = so(nn, He, zt);
3004
- let Kt, Mt;
3005
- de ? D === 0 && tt === 0 && Ut > 0 ? (Kt = 0, Mt = Ut - 1) : (Kt = me * Ce((D + Qt) / (fe + Qt)), Mt = me * Rn((tt + Qt) / (fe + Qt)) - 1, Mt = Oe(y - 1, ee(Mt, me - 1)), Kt = Oe(Mt, ee(0, Kt))) : (Kt = 0, Mt = -1);
3006
- const on = Hn(Kt, Mt, Jt), { bottom: rn, top: sn } = En(Ft, lt, et, on), ln = Rn(y / me), lo = ln * fe + (ln - 1) * Qt - rn;
3007
- return { bottom: rn, itemHeight: fe, items: on, itemWidth: He, offsetBottom: lo, offsetTop: sn, top: sn };
3074
+ const ge = io(nn, He, nt);
3075
+ let Yt, Nt;
3076
+ lt ? q === 0 && at === 0 && mt > 0 ? (Yt = 0, Nt = mt - 1) : (Yt = ge * we((q + vt) / (ct + vt)), Nt = ge * Rn((at + vt) / (ct + vt)) - 1, Nt = Oe(H - 1, re(Nt, ge - 1)), Yt = Oe(Nt, re(0, Yt))) : (Yt = 0, Nt = -1);
3077
+ const on = En(Yt, Nt, it), { bottom: rn, top: sn } = Bn(st, gt, Tt, on), ln = Rn(H / ge), co = ln * ct + (ln - 1) * vt - rn;
3078
+ return { bottom: rn, itemHeight: ct, items: on, itemWidth: He, offsetBottom: co, offsetTop: sn, top: sn };
3008
3079
  }
3009
3080
  )
3010
3081
  ),
3011
- b
3082
+ p
3012
3083
  ), F(
3013
- S(
3014
- Y,
3015
- V((y) => y !== null),
3016
- B((y) => y.length)
3084
+ x(
3085
+ j,
3086
+ P((H) => H !== null),
3087
+ k((H) => H.length)
3017
3088
  ),
3018
- c
3089
+ z
3019
3090
  ), F(
3020
- S(
3021
- st(O, k, b, G),
3022
- V(([y, D, { items: tt }]) => tt.length > 0 && D.height !== 0 && y.height !== 0),
3023
- B(([y, D, { items: tt }, lt]) => {
3024
- const { bottom: et, top: Ft } = En(y, lt, D, tt);
3025
- return [Ft, et];
3091
+ x(
3092
+ ut(v, O, p, L),
3093
+ P(([H, q, { items: at }]) => at.length > 0 && q.height !== 0 && H.height !== 0),
3094
+ k(([H, q, { items: at }, gt]) => {
3095
+ const { bottom: Tt, top: st } = Bn(H, gt, q, at);
3096
+ return [st, Tt];
3026
3097
  }),
3027
- X(se)
3098
+ J(ce)
3028
3099
  ),
3029
3100
  e
3030
3101
  );
3031
- const xt = w(!1);
3102
+ const pt = C(!1);
3032
3103
  F(
3033
- S(
3104
+ x(
3034
3105
  d,
3035
- N(xt),
3036
- B(([y, D]) => D || y !== 0)
3106
+ $(pt),
3107
+ k(([H, q]) => q || H !== 0)
3037
3108
  ),
3038
- xt
3109
+ pt
3039
3110
  );
3040
- const Xt = gt(
3041
- S(
3042
- st(b, c),
3043
- V(([{ items: y }]) => y.length > 0),
3044
- N(xt),
3045
- V(([[y, D], tt]) => {
3046
- const et = y.items[y.items.length - 1].index === D - 1;
3047
- return (tt || y.bottom > 0 && y.itemHeight > 0 && y.offsetBottom === 0 && y.items.length === D) && et;
3111
+ const qt = bt(
3112
+ x(
3113
+ ut(p, z),
3114
+ P(([{ items: H }]) => H.length > 0),
3115
+ $(pt),
3116
+ P(([[H, q], at]) => {
3117
+ const Tt = H.items[H.items.length - 1].index === q - 1;
3118
+ return (at || H.bottom > 0 && H.itemHeight > 0 && H.offsetBottom === 0 && H.items.length === q) && Tt;
3048
3119
  }),
3049
- B(([[, y]]) => y - 1),
3050
- X()
3120
+ k(([[, H]]) => H - 1),
3121
+ J()
3051
3122
  )
3052
- ), At = gt(
3053
- S(
3054
- L(b),
3055
- V(({ items: y }) => y.length > 0 && y[0].index === 0),
3056
- Rt(0),
3057
- X()
3123
+ ), ee = bt(
3124
+ x(
3125
+ V(p),
3126
+ P(({ items: H }) => H.length > 0 && H[0].index === 0),
3127
+ Ft(0),
3128
+ J()
3058
3129
  )
3059
- ), yt = gt(
3060
- S(
3061
- L(b),
3062
- N(ut),
3063
- V(([{ items: y }, D]) => y.length > 0 && !D),
3064
- B(([{ items: y }]) => ({
3065
- endIndex: y[y.length - 1].index,
3066
- startIndex: y[0].index
3130
+ ), Ot = bt(
3131
+ x(
3132
+ V(p),
3133
+ $(et),
3134
+ P(([{ items: H }, q]) => H.length > 0 && !q),
3135
+ k(([{ items: H }]) => ({
3136
+ endIndex: H[H.length - 1].index,
3137
+ startIndex: H[0].index
3067
3138
  })),
3068
- X(An),
3069
- kt(0)
3139
+ J(An),
3140
+ Gt(0)
3070
3141
  )
3071
3142
  );
3072
- F(yt, x.scrollSeekRangeChanged), F(
3073
- S(
3074
- z,
3075
- N(O, k, c, G),
3076
- B(([y, D, tt, lt, et]) => {
3077
- const Ft = Dn(y), { align: Jt, behavior: Ut, offset: de } = Ft;
3078
- let Ot = Ft.index;
3079
- Ot === "LAST" && (Ot = lt - 1), Ot = ee(0, Ot, Oe(lt - 1, Ot));
3080
- let zt = Ae(D, et, tt, Ot);
3081
- return Jt === "end" ? zt = bn(zt - D.height + tt.height) : Jt === "center" && (zt = bn(zt - D.height / 2 + tt.height / 2)), de && (zt += de), { behavior: Ut, top: zt };
3143
+ F(Ot, T.scrollSeekRangeChanged), F(
3144
+ x(
3145
+ B,
3146
+ $(v, O, z, L),
3147
+ k(([H, q, at, gt, Tt]) => {
3148
+ const st = $n(H), { align: it, behavior: mt, offset: lt } = st;
3149
+ let Z = st.index;
3150
+ Z === "LAST" && (Z = gt - 1), Z = re(0, Z, Oe(gt - 1, Z));
3151
+ let nt = Me(q, Tt, at, Z);
3152
+ return it === "end" ? nt = Hn(nt - q.height + at.height) : it === "center" && (nt = Hn(nt - q.height / 2 + at.height / 2)), lt && (nt += lt), { behavior: mt, top: nt };
3082
3153
  })
3083
3154
  ),
3084
- u
3155
+ c
3085
3156
  );
3086
- const Bt = ct(
3087
- S(
3088
- b,
3089
- B((y) => y.offsetBottom + y.bottom)
3157
+ const ne = ht(
3158
+ x(
3159
+ p,
3160
+ k((H) => H.offsetBottom + H.bottom)
3090
3161
  ),
3091
3162
  0
3092
3163
  );
3093
3164
  return F(
3094
- S(
3095
- R,
3096
- B((y) => ({ height: y.visibleHeight, width: y.visibleWidth }))
3165
+ x(
3166
+ b,
3167
+ k((H) => ({ height: H.visibleHeight, width: H.visibleWidth }))
3097
3168
  ),
3098
- O
3169
+ v
3099
3170
  ), {
3100
- customScrollParent: m,
3171
+ customScrollParent: g,
3101
3172
  // input
3102
- data: Y,
3103
- deviation: j,
3173
+ data: j,
3174
+ deviation: _,
3104
3175
  footerHeight: r,
3105
- gap: G,
3176
+ gap: L,
3106
3177
  headerHeight: s,
3107
3178
  increaseViewportBy: t,
3108
- initialItemCount: h,
3109
- itemDimensions: k,
3179
+ initialItemCount: u,
3180
+ itemDimensions: O,
3110
3181
  overscan: n,
3111
- restoreStateFrom: ot,
3182
+ restoreStateFrom: M,
3112
3183
  scrollBy: i,
3113
3184
  scrollContainerState: l,
3114
- scrollHeight: A,
3115
- scrollTo: u,
3116
- scrollToIndex: z,
3185
+ scrollHeight: W,
3186
+ scrollTo: c,
3187
+ scrollToIndex: B,
3117
3188
  scrollTop: d,
3118
- smoothScrollTargetReached: f,
3119
- totalCount: c,
3120
- useWindowScroll: p,
3121
- viewportDimensions: O,
3189
+ smoothScrollTargetReached: m,
3190
+ totalCount: z,
3191
+ useWindowScroll: f,
3192
+ viewportDimensions: v,
3122
3193
  windowScrollContainerState: a,
3123
- windowScrollTo: T,
3124
- windowViewportRect: R,
3125
- ...x,
3194
+ windowScrollTo: I,
3195
+ windowViewportRect: b,
3196
+ ...T,
3126
3197
  // output
3127
- gridState: b,
3128
- horizontalDirection: Gt,
3129
- initialTopMostItemIndex: ft,
3130
- totalListHeight: Bt,
3131
- ...g,
3132
- endReached: Xt,
3133
- propsReady: H,
3134
- rangeChanged: yt,
3135
- startReached: At,
3136
- stateChanged: U,
3137
- stateRestoreInProgress: ut,
3138
- ...v
3198
+ gridState: p,
3199
+ horizontalDirection: Mt,
3200
+ initialTopMostItemIndex: wt,
3201
+ totalListHeight: ne,
3202
+ ...h,
3203
+ endReached: qt,
3204
+ propsReady: R,
3205
+ rangeChanged: Ot,
3206
+ startReached: ee,
3207
+ stateChanged: xt,
3208
+ stateRestoreInProgress: et,
3209
+ ...y
3139
3210
  };
3140
3211
  },
3141
- Q(je, dt, ae, Yn, Pt, qe, Vt)
3212
+ tt(je, It, he, Zn, _t, qe, Wt)
3142
3213
  );
3143
- function so(t, e, n) {
3144
- return ee(1, Ce((t + n) / (Ce(e) + n)));
3214
+ function io(t, e, n) {
3215
+ return re(1, we((t + n) / (we(e) + n)));
3145
3216
  }
3146
- function En(t, e, n, o) {
3217
+ function Bn(t, e, n, o) {
3147
3218
  const { height: r } = n;
3148
3219
  if (r === void 0 || o.length === 0)
3149
3220
  return { bottom: 0, top: 0 };
3150
- const s = Ae(t, e, n, o[0].index);
3151
- return { bottom: Ae(t, e, n, o[o.length - 1].index) + r, top: s };
3221
+ const s = Me(t, e, n, o[0].index);
3222
+ return { bottom: Me(t, e, n, o[o.length - 1].index) + r, top: s };
3152
3223
  }
3153
- function Ae(t, e, n, o) {
3154
- const r = so(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
3224
+ function Me(t, e, n, o) {
3225
+ const r = io(t.width, n.width, e.column), s = we(o / r), i = s * n.height + re(0, s - 1) * e.row;
3155
3226
  return i > 0 ? i + e.row : i;
3156
3227
  }
3157
- const zr = /* @__PURE__ */ K(() => {
3158
- const t = w((I) => `Item ${I}`), e = w({}), n = w(null), o = w("virtuoso-grid-item"), r = w("virtuoso-grid-list"), s = w(Xe), i = w("div"), l = w(Yt), u = (I, g = null) => ct(
3159
- S(
3228
+ const Lr = /* @__PURE__ */ K(() => {
3229
+ const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(Xe), i = C("div"), l = C(Qt), c = (S, h = null) => ht(
3230
+ x(
3160
3231
  e,
3161
- B((x) => x[I]),
3162
- X()
3232
+ k((T) => T[S]),
3233
+ J()
3163
3234
  ),
3164
- g
3165
- ), d = w(!1), f = w(!1);
3166
- return F(L(f), d), {
3235
+ h
3236
+ ), d = C(!1), m = C(!1);
3237
+ return F(V(m), d), {
3167
3238
  components: e,
3168
3239
  computeItemKey: s,
3169
3240
  context: n,
3170
- FooterComponent: u("Footer"),
3171
- HeaderComponent: u("Header"),
3241
+ FooterComponent: c("Footer"),
3242
+ HeaderComponent: c("Header"),
3172
3243
  headerFooterTag: i,
3173
3244
  itemClassName: o,
3174
- ItemComponent: u("Item", "div"),
3245
+ ItemComponent: c("Item", "div"),
3175
3246
  itemContent: t,
3176
3247
  listClassName: r,
3177
- ListComponent: u("List", "div"),
3248
+ ListComponent: c("List", "div"),
3178
3249
  readyStateChanged: d,
3179
- reportReadyState: f,
3180
- ScrollerComponent: u("Scroller", "div"),
3250
+ reportReadyState: m,
3251
+ ScrollerComponent: c("Scroller", "div"),
3181
3252
  scrollerRef: l,
3182
- ScrollSeekPlaceholder: u("ScrollSeekPlaceholder", "div")
3253
+ ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
3183
3254
  };
3184
- }), Lr = /* @__PURE__ */ K(
3255
+ }), Vr = /* @__PURE__ */ K(
3185
3256
  ([t, e]) => ({ ...t, ...e }),
3186
- Q(Or, zr)
3187
- ), Vr = /* @__PURE__ */ E.memo(function() {
3188
- const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = St("scrollHeight"), u = nt("ItemComponent"), d = nt("ListComponent"), f = nt("ScrollSeekPlaceholder"), I = nt("context"), g = St("itemDimensions"), x = St("gap"), C = nt("log"), H = nt("stateRestoreInProgress"), m = St("reportReadyState"), p = Ht(
3257
+ tt(Fr, Lr)
3258
+ ), Pr = /* @__PURE__ */ E.memo(function() {
3259
+ const e = ot("gridState"), n = ot("listClassName"), o = ot("itemClassName"), r = ot("itemContent"), s = ot("computeItemKey"), i = ot("isSeeking"), l = Ht("scrollHeight"), c = ot("ItemComponent"), d = ot("ListComponent"), m = ot("ScrollSeekPlaceholder"), S = ot("context"), h = Ht("itemDimensions"), T = Ht("gap"), w = ot("log"), R = ot("stateRestoreInProgress"), g = Ht("reportReadyState"), f = Vt(
3189
3260
  E.useMemo(
3190
3261
  () => (a) => {
3191
- const T = a.parentElement.parentElement.scrollHeight;
3192
- l(T);
3193
- const R = a.firstChild;
3194
- if (R) {
3195
- const { height: v, width: c } = R.getBoundingClientRect();
3196
- g({ height: v, width: c });
3262
+ const I = a.parentElement.parentElement.scrollHeight;
3263
+ l(I);
3264
+ const b = a.firstChild;
3265
+ if (b) {
3266
+ const { height: y, width: z } = b.getBoundingClientRect();
3267
+ h({ height: y, width: z });
3197
3268
  }
3198
- x({
3199
- column: Bn("column-gap", getComputedStyle(a).columnGap, C),
3200
- row: Bn("row-gap", getComputedStyle(a).rowGap, C)
3269
+ T({
3270
+ column: kn("column-gap", getComputedStyle(a).columnGap, w),
3271
+ row: kn("row-gap", getComputedStyle(a).rowGap, w)
3201
3272
  });
3202
3273
  },
3203
- [l, g, x, C]
3274
+ [l, h, T, w]
3204
3275
  ),
3205
3276
  !0,
3206
3277
  !1
3207
3278
  );
3208
- return Qn(() => {
3209
- e.itemHeight > 0 && e.itemWidth > 0 && m(!0);
3210
- }, [e]), H ? null : /* @__PURE__ */ P(
3279
+ return to(() => {
3280
+ e.itemHeight > 0 && e.itemWidth > 0 && g(!0);
3281
+ }, [e]), R ? null : /* @__PURE__ */ G(
3211
3282
  d,
3212
3283
  {
3213
3284
  className: n,
3214
- ref: p,
3215
- ...J(d, I),
3285
+ ref: f,
3286
+ ...Q(d, S),
3216
3287
  "data-testid": "virtuoso-item-list",
3217
3288
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3218
3289
  children: e.items.map((a) => {
3219
- const T = s(a.index, a.data, I);
3220
- return i ? /* @__PURE__ */ P(
3221
- f,
3290
+ const I = s(a.index, a.data, S);
3291
+ return i ? /* @__PURE__ */ G(
3292
+ m,
3222
3293
  {
3223
- ...J(f, I),
3294
+ ...Q(m, S),
3224
3295
  height: e.itemHeight,
3225
3296
  index: a.index,
3226
3297
  width: e.itemWidth
3227
3298
  },
3228
- T
3229
- ) : /* @__PURE__ */ _t(
3230
- u,
3299
+ I
3300
+ ) : /* @__PURE__ */ $t(
3301
+ c,
3231
3302
  {
3232
- ...J(u, I),
3303
+ ...Q(c, S),
3233
3304
  className: o,
3234
3305
  "data-index": a.index,
3235
- key: T
3306
+ key: I
3236
3307
  },
3237
- r(a.index, a.data, I)
3308
+ r(a.index, a.data, S)
3238
3309
  );
3239
3310
  })
3240
3311
  }
3241
3312
  );
3242
- }), Pr = E.memo(function() {
3243
- const e = nt("HeaderComponent"), n = St("headerHeight"), o = nt("headerFooterTag"), r = Ht(
3313
+ }), Gr = E.memo(function() {
3314
+ const e = ot("HeaderComponent"), n = Ht("headerHeight"), o = ot("headerFooterTag"), r = Vt(
3244
3315
  E.useMemo(
3245
3316
  () => (i) => {
3246
- n(vt(i, "height"));
3317
+ n(zt(i, "height"));
3247
3318
  },
3248
3319
  [n]
3249
3320
  ),
3250
3321
  !0,
3251
3322
  !1
3252
- ), s = nt("context");
3253
- return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...J(e, s) }) }) : null;
3254
- }), Gr = E.memo(function() {
3255
- const e = nt("FooterComponent"), n = St("footerHeight"), o = nt("headerFooterTag"), r = Ht(
3323
+ ), s = ot("context");
3324
+ return e ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...Q(e, s) }) }) : null;
3325
+ }), Mr = E.memo(function() {
3326
+ const e = ot("FooterComponent"), n = Ht("footerHeight"), o = ot("headerFooterTag"), r = Vt(
3256
3327
  E.useMemo(
3257
3328
  () => (i) => {
3258
- n(vt(i, "height"));
3329
+ n(zt(i, "height"));
3259
3330
  },
3260
3331
  [n]
3261
3332
  ),
3262
3333
  !0,
3263
3334
  !1
3264
- ), s = nt("context");
3265
- return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...J(e, s) }) }) : null;
3335
+ ), s = ot("context");
3336
+ return e ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...Q(e, s) }) }) : null;
3266
3337
  }), Ar = ({ children: t }) => {
3267
- const e = E.useContext(Jn), n = St("itemDimensions"), o = St("viewportDimensions"), r = Ht(
3338
+ const e = E.useContext(Qn), n = Ht("itemDimensions"), o = Ht("viewportDimensions"), r = Vt(
3268
3339
  E.useMemo(
3269
3340
  () => (s) => {
3270
3341
  o(s.getBoundingClientRect());
@@ -3276,26 +3347,26 @@ const zr = /* @__PURE__ */ K(() => {
3276
3347
  );
3277
3348
  return E.useEffect(() => {
3278
3349
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3279
- }, [e, o, n]), /* @__PURE__ */ P("div", { ref: r, style: Zt(!1), children: t });
3280
- }, Mr = ({ children: t }) => {
3281
- const e = E.useContext(Jn), n = St("windowViewportRect"), o = St("itemDimensions"), r = nt("customScrollParent"), s = Ne(n, r, !1);
3350
+ }, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: te(!1), children: t });
3351
+ }, Wr = ({ children: t }) => {
3352
+ const e = E.useContext(Qn), n = Ht("windowViewportRect"), o = Ht("itemDimensions"), r = ot("customScrollParent"), s = Ne(n, r, !1);
3282
3353
  return E.useEffect(() => {
3283
3354
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3284
- }, [e, n, o]), /* @__PURE__ */ P("div", { ref: s, style: Zt(!1), children: t });
3285
- }, Wr = /* @__PURE__ */ E.memo(function({ ...e }) {
3286
- const n = nt("useWindowScroll"), o = nt("customScrollParent"), r = o || n ? Dr : Nr, s = o || n ? Mr : Ar, i = nt("context");
3287
- return /* @__PURE__ */ P(r, { ...e, ...J(r, i), children: /* @__PURE__ */ Nt(s, { children: [
3288
- /* @__PURE__ */ P(Pr, {}),
3289
- /* @__PURE__ */ P(Vr, {}),
3290
- /* @__PURE__ */ P(Gr, {})
3355
+ }, [e, n, o]), /* @__PURE__ */ G("div", { ref: s, style: te(!1), children: t });
3356
+ }, _r = /* @__PURE__ */ E.memo(function({ ...e }) {
3357
+ const n = ot("useWindowScroll"), o = ot("customScrollParent"), r = o || n ? $r : Dr, s = o || n ? Wr : Ar, i = ot("context");
3358
+ return /* @__PURE__ */ G(r, { ...e, ...Q(r, i), children: /* @__PURE__ */ Ut(s, { children: [
3359
+ /* @__PURE__ */ G(Gr, {}),
3360
+ /* @__PURE__ */ G(Pr, {}),
3361
+ /* @__PURE__ */ G(Mr, {})
3291
3362
  ] }) });
3292
3363
  }), {
3293
- Component: _r,
3294
- useEmitter: io,
3295
- useEmitterValue: nt,
3296
- usePublisher: St
3364
+ Component: Nr,
3365
+ useEmitter: lo,
3366
+ useEmitterValue: ot,
3367
+ usePublisher: Ht
3297
3368
  } = /* @__PURE__ */ Ye(
3298
- Lr,
3369
+ Vr,
3299
3370
  {
3300
3371
  optional: {
3301
3372
  context: "context",
@@ -3334,19 +3405,19 @@ const zr = /* @__PURE__ */ K(() => {
3334
3405
  readyStateChanged: "readyStateChanged"
3335
3406
  }
3336
3407
  },
3337
- Wr
3338
- ), Nr = /* @__PURE__ */ Je({ useEmitter: io, useEmitterValue: nt, usePublisher: St }), Dr = /* @__PURE__ */ Qe({ useEmitter: io, useEmitterValue: nt, usePublisher: St });
3339
- function Bn(t, e, n) {
3340
- return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, pt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
3408
+ _r
3409
+ ), Dr = /* @__PURE__ */ Je({ useEmitter: lo, useEmitterValue: ot, usePublisher: Ht }), $r = /* @__PURE__ */ Qe({ useEmitter: lo, useEmitterValue: ot, usePublisher: Ht });
3410
+ function kn(t, e, n) {
3411
+ return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, Ct.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
3341
3412
  }
3342
- const Jr = _r;
3413
+ const Qr = Nr;
3343
3414
  export {
3344
- Xr as GroupedTableVirtuoso,
3345
- Yr as GroupedVirtuoso,
3346
- pt as LogLevel,
3347
- Zr as TableVirtuoso,
3348
- qr as Virtuoso,
3349
- Jr as VirtuosoGrid,
3350
- Jn as VirtuosoGridMockContext,
3351
- be as VirtuosoMockContext
3415
+ Jr as GroupedTableVirtuoso,
3416
+ Zr as GroupedVirtuoso,
3417
+ Ct as LogLevel,
3418
+ Xr as TableVirtuoso,
3419
+ Yr as Virtuoso,
3420
+ Qr as VirtuosoGrid,
3421
+ Qn as VirtuosoGridMockContext,
3422
+ Re as VirtuosoMockContext
3352
3423
  };