react-virtuoso 4.18.15 → 4.18.17
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.cjs +1 -1
- package/dist/index.mjs +408 -401
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ function st(...t) {
|
|
|
39
39
|
function X(t, e) {
|
|
40
40
|
return t(Wt, e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function M(t, e) {
|
|
43
43
|
t(we, e);
|
|
44
44
|
}
|
|
45
45
|
function De(t) {
|
|
@@ -48,7 +48,7 @@ function De(t) {
|
|
|
48
48
|
function lt(t) {
|
|
49
49
|
return t(Pn);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function z(t, e) {
|
|
52
52
|
return X(t, So(e, we));
|
|
53
53
|
}
|
|
54
54
|
function bt(t, e) {
|
|
@@ -79,10 +79,10 @@ function W(t) {
|
|
|
79
79
|
t(n) && e(n);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function k(t) {
|
|
83
83
|
return (e) => re(e, t);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function kt(t) {
|
|
86
86
|
return (e) => () => {
|
|
87
87
|
e(t);
|
|
88
88
|
};
|
|
@@ -99,7 +99,7 @@ function S(t, ...e) {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Bt(t, e) {
|
|
103
103
|
return (n) => (o) => {
|
|
104
104
|
n(e = t(e, o));
|
|
105
105
|
};
|
|
@@ -169,7 +169,7 @@ function w(t) {
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
function gt(t, e) {
|
|
172
|
-
return ye(w(e), (n) =>
|
|
172
|
+
return ye(w(e), (n) => z(t, n));
|
|
173
173
|
}
|
|
174
174
|
function K() {
|
|
175
175
|
const t = [];
|
|
@@ -192,7 +192,7 @@ function K() {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
function Ct(t) {
|
|
195
|
-
return ye(K(), (e) =>
|
|
195
|
+
return ye(K(), (e) => z(t, e));
|
|
196
196
|
}
|
|
197
197
|
const wo = { singleton: !0 };
|
|
198
198
|
function Z(t, e = [], n = wo) {
|
|
@@ -221,7 +221,7 @@ function at(...t) {
|
|
|
221
221
|
return t.forEach((s, i) => {
|
|
222
222
|
const l = 2 ** i;
|
|
223
223
|
X(s, (c) => {
|
|
224
|
-
n[i] = c, o |= l, o === r &&
|
|
224
|
+
n[i] = c, o |= l, o === r && M(e, n);
|
|
225
225
|
});
|
|
226
226
|
}), function(s, i) {
|
|
227
227
|
switch (s) {
|
|
@@ -294,7 +294,7 @@ function _t(t, e) {
|
|
|
294
294
|
function gn(t, e) {
|
|
295
295
|
return Gn(t) ? -e : e;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Ot(t, e, n) {
|
|
298
298
|
return $e(t, e, n).callbackRef;
|
|
299
299
|
}
|
|
300
300
|
function $e(t, e, n) {
|
|
@@ -312,10 +312,10 @@ function $e(t, e, n) {
|
|
|
312
312
|
i && e ? (s?.observe(i), o.current = i) : (o.current && s?.unobserve(o.current), o.current = null);
|
|
313
313
|
}, { callbackRef: r, ref: o };
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function An(t, e, n, o, r, s, i, l, c) {
|
|
316
316
|
const d = E.useCallback(
|
|
317
317
|
(f) => {
|
|
318
|
-
const v =
|
|
318
|
+
const v = ko(f.children, e, l ? "offsetWidth" : "offsetHeight", r);
|
|
319
319
|
let m = f.parentElement;
|
|
320
320
|
for (; m.dataset.virtuosoScroller === void 0; )
|
|
321
321
|
m = m.parentElement;
|
|
@@ -335,7 +335,7 @@ function Mn(t, e, n, o, r, s, i, l, c) {
|
|
|
335
335
|
);
|
|
336
336
|
return $e(d, n, c);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ko(t, e, n, o) {
|
|
339
339
|
const r = t.length;
|
|
340
340
|
if (r === 0)
|
|
341
341
|
return null;
|
|
@@ -401,19 +401,19 @@ function Ue(t, e, n) {
|
|
|
401
401
|
const St = Z(
|
|
402
402
|
() => {
|
|
403
403
|
const t = K(), e = K(), n = w(0), o = K(), r = K(), s = w(0), i = K(), l = K(), c = w(0), d = w(0), f = w(0), v = w(0), m = K(), h = K(), y = w(!1), R = w(!1), I = w(!1);
|
|
404
|
-
return
|
|
404
|
+
return z(
|
|
405
405
|
S(
|
|
406
406
|
t,
|
|
407
|
-
|
|
407
|
+
k(({ scrollTop: g }) => g)
|
|
408
408
|
),
|
|
409
409
|
e
|
|
410
|
-
),
|
|
410
|
+
), z(
|
|
411
411
|
S(
|
|
412
412
|
t,
|
|
413
|
-
|
|
413
|
+
k(({ scrollHeight: g }) => g)
|
|
414
414
|
),
|
|
415
415
|
l
|
|
416
|
-
),
|
|
416
|
+
), z(e, s), {
|
|
417
417
|
deviation: n,
|
|
418
418
|
deviationCommitted: o,
|
|
419
419
|
fixedFooterHeight: f,
|
|
@@ -439,7 +439,7 @@ const St = Z(
|
|
|
439
439
|
[],
|
|
440
440
|
{ singleton: !0 }
|
|
441
441
|
), se = { lvl: 0 };
|
|
442
|
-
function
|
|
442
|
+
function Mn(t, e) {
|
|
443
443
|
const n = t.length;
|
|
444
444
|
if (n === 0)
|
|
445
445
|
return [];
|
|
@@ -479,7 +479,7 @@ function Zt(t, e, n) {
|
|
|
479
479
|
if (tt(t))
|
|
480
480
|
return [];
|
|
481
481
|
const o = Rt(t, e)[0];
|
|
482
|
-
return
|
|
482
|
+
return Bo(We(t, o, n));
|
|
483
483
|
}
|
|
484
484
|
function Pe(t, e) {
|
|
485
485
|
if (tt(t))
|
|
@@ -510,7 +510,7 @@ function xe(t) {
|
|
|
510
510
|
if (o.lvl >= n - 1 && e.lvl >= n - 1)
|
|
511
511
|
return t;
|
|
512
512
|
if (n > o.lvl + 1) {
|
|
513
|
-
if (
|
|
513
|
+
if (Be(e))
|
|
514
514
|
return $n(ft(t, { lvl: n - 1 }));
|
|
515
515
|
if (!tt(e) && !tt(e.r))
|
|
516
516
|
return ft(e.r, {
|
|
@@ -523,10 +523,10 @@ function xe(t) {
|
|
|
523
523
|
});
|
|
524
524
|
throw new Error("Unexpected empty nodes");
|
|
525
525
|
}
|
|
526
|
-
if (
|
|
526
|
+
if (Be(t))
|
|
527
527
|
return Ge(ft(t, { lvl: n - 1 }));
|
|
528
528
|
if (!tt(o) && !tt(o.l)) {
|
|
529
|
-
const r = o.l, s =
|
|
529
|
+
const r = o.l, s = Be(r) ? o.lvl - 1 : o.lvl;
|
|
530
530
|
return ft(r, {
|
|
531
531
|
l: ft(t, {
|
|
532
532
|
lvl: n - 1,
|
|
@@ -550,7 +550,7 @@ function ft(t, e) {
|
|
|
550
550
|
function _n(t) {
|
|
551
551
|
return tt(t.r) ? t.l : xe(ft(t, { r: _n(t.r) }));
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Be(t) {
|
|
554
554
|
return tt(t) || t.lvl > t.r.lvl;
|
|
555
555
|
}
|
|
556
556
|
function Nn(t) {
|
|
@@ -570,8 +570,8 @@ function Ge(t) {
|
|
|
570
570
|
const { lvl: e, r: n } = t;
|
|
571
571
|
return !tt(n) && !tt(n.r) && n.lvl === e && n.r.lvl === e ? ft(n, { l: ft(t, { r: n.l }), lvl: e + 1 }) : t;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
return
|
|
573
|
+
function Bo(t) {
|
|
574
|
+
return Mn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
|
|
575
575
|
}
|
|
576
576
|
function Un(t, e) {
|
|
577
577
|
return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
|
|
@@ -605,7 +605,7 @@ function Te(t, e, n, o = 0) {
|
|
|
605
605
|
}
|
|
606
606
|
throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function Oo(t, e, n, o) {
|
|
609
609
|
const r = Te(t, e, o), s = Te(t, n, o, r);
|
|
610
610
|
return t.slice(r, s + 1);
|
|
611
611
|
}
|
|
@@ -618,7 +618,7 @@ function Re(t) {
|
|
|
618
618
|
function je({ index: t }, e) {
|
|
619
619
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function Lo() {
|
|
622
622
|
return {
|
|
623
623
|
groupIndices: [],
|
|
624
624
|
groupOffsetTree: Yt(),
|
|
@@ -638,7 +638,7 @@ function zo(t, e) {
|
|
|
638
638
|
continue;
|
|
639
639
|
}
|
|
640
640
|
const l = Zt(t, i - 1, r + 1);
|
|
641
|
-
if (l.some(
|
|
641
|
+
if (l.some(Mo(o)))
|
|
642
642
|
continue;
|
|
643
643
|
let c = !1, d = !1;
|
|
644
644
|
for (const { end: f, start: v, value: m } of l)
|
|
@@ -675,7 +675,7 @@ function qn(t, e, n) {
|
|
|
675
675
|
return r = Math.max(0, Math.min(n, r)), r;
|
|
676
676
|
}
|
|
677
677
|
function Po(t, e, n, o = 0) {
|
|
678
|
-
return o > 0 && (e = Math.max(e, Kn(t, o, je).offset)),
|
|
678
|
+
return o > 0 && (e = Math.max(e, Kn(t, o, je).offset)), Mn(Oo(t, e, n, Vo), Ao);
|
|
679
679
|
}
|
|
680
680
|
function Wo(t, [e, n, o, r]) {
|
|
681
681
|
e.length > 0 && o("received item sizes", e, mt.DEBUG);
|
|
@@ -688,7 +688,7 @@ function Wo(t, [e, n, o, r]) {
|
|
|
688
688
|
[i, l] = zo(i, e);
|
|
689
689
|
if (i === s)
|
|
690
690
|
return t;
|
|
691
|
-
const { lastIndex: c, lastOffset: d, lastSize: f, offsetTree: v } =
|
|
691
|
+
const { lastIndex: c, lastOffset: d, lastSize: f, offsetTree: v } = Ae(t.offsetTree, l, i, r);
|
|
692
692
|
return {
|
|
693
693
|
groupIndices: n,
|
|
694
694
|
groupOffsetTree: n.reduce((m, h) => vt(m, h, ce(h, v, r)), Yt()),
|
|
@@ -711,7 +711,7 @@ function xn(t, e) {
|
|
|
711
711
|
n += e[o + 1] - e[o] - 1, o++;
|
|
712
712
|
return o - (n === t ? 0 : 1);
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Ae(t, e, n, o) {
|
|
715
715
|
let r = t, s = 0, i = 0, l = 0, c = 0;
|
|
716
716
|
if (e === 0)
|
|
717
717
|
r = [];
|
|
@@ -735,54 +735,54 @@ function Me(t, e, n, o) {
|
|
|
735
735
|
offsetTree: r
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Ao(t) {
|
|
739
739
|
return { index: t.index, value: t };
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Mo(t) {
|
|
742
742
|
const { endIndex: e, size: n, startIndex: o } = t;
|
|
743
743
|
return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
|
|
744
744
|
}
|
|
745
745
|
const _o = {
|
|
746
746
|
offsetHeight: "height",
|
|
747
747
|
offsetWidth: "width"
|
|
748
|
-
},
|
|
748
|
+
}, Lt = Z(
|
|
749
749
|
([{ log: t }, { recalcInProgress: e }]) => {
|
|
750
|
-
const n = K(), o = K(), r = gt(o, 0), s = K(), i = K(), l = w(0), c = w([]), d = w(void 0), f = w(void 0), v = w(void 0), m = w(void 0), h = w((u, p) => Ht(u, _o[p])), y = w(void 0), R = w(0), I =
|
|
751
|
-
S(n, D(c, t, R),
|
|
750
|
+
const n = K(), o = K(), r = gt(o, 0), s = K(), i = K(), l = w(0), c = w([]), d = w(void 0), f = w(void 0), v = w(void 0), m = w(void 0), h = w((u, p) => Ht(u, _o[p])), y = w(void 0), R = w(0), I = Lo(), g = gt(
|
|
751
|
+
S(n, D(c, t, R), Bt(Wo, I), ot()),
|
|
752
752
|
I
|
|
753
753
|
), a = gt(
|
|
754
754
|
S(
|
|
755
755
|
c,
|
|
756
756
|
ot(),
|
|
757
|
-
|
|
757
|
+
Bt((u, p) => ({ current: p, prev: u.current }), {
|
|
758
758
|
current: [],
|
|
759
759
|
prev: []
|
|
760
760
|
}),
|
|
761
|
-
|
|
761
|
+
k(({ prev: u }) => u)
|
|
762
762
|
),
|
|
763
763
|
[]
|
|
764
764
|
);
|
|
765
|
-
|
|
765
|
+
z(
|
|
766
766
|
S(
|
|
767
767
|
c,
|
|
768
768
|
W((u) => u.length > 0),
|
|
769
769
|
D(g, R),
|
|
770
|
-
|
|
771
|
-
const
|
|
770
|
+
k(([u, p, b]) => {
|
|
771
|
+
const L = u.reduce((F, O, V) => vt(F, O, ce(O, p.offsetTree, b) || V), Yt());
|
|
772
772
|
return {
|
|
773
773
|
...p,
|
|
774
774
|
groupIndices: u,
|
|
775
|
-
groupOffsetTree:
|
|
775
|
+
groupOffsetTree: L
|
|
776
776
|
};
|
|
777
777
|
})
|
|
778
778
|
),
|
|
779
779
|
g
|
|
780
|
-
),
|
|
780
|
+
), z(
|
|
781
781
|
S(
|
|
782
782
|
o,
|
|
783
783
|
D(g),
|
|
784
784
|
W(([u, { lastIndex: p }]) => u < p),
|
|
785
|
-
|
|
785
|
+
k(([u, { lastIndex: p, lastSize: b }]) => [
|
|
786
786
|
{
|
|
787
787
|
endIndex: p,
|
|
788
788
|
size: b,
|
|
@@ -791,19 +791,19 @@ const _o = {
|
|
|
791
791
|
])
|
|
792
792
|
),
|
|
793
793
|
n
|
|
794
|
-
),
|
|
794
|
+
), z(d, f);
|
|
795
795
|
const T = gt(
|
|
796
796
|
S(
|
|
797
797
|
d,
|
|
798
|
-
|
|
798
|
+
k((u) => u === void 0)
|
|
799
799
|
),
|
|
800
800
|
!0
|
|
801
801
|
);
|
|
802
|
-
|
|
802
|
+
z(
|
|
803
803
|
S(
|
|
804
804
|
f,
|
|
805
805
|
W((u) => u !== void 0 && tt(lt(g).sizeTree)),
|
|
806
|
-
|
|
806
|
+
k((u) => {
|
|
807
807
|
const p = lt(v), b = lt(c).length > 0;
|
|
808
808
|
return p !== void 0 && p !== 0 ? b ? [
|
|
809
809
|
{ endIndex: 0, size: p, startIndex: 0 },
|
|
@@ -812,49 +812,49 @@ const _o = {
|
|
|
812
812
|
})
|
|
813
813
|
),
|
|
814
814
|
n
|
|
815
|
-
),
|
|
815
|
+
), z(
|
|
816
816
|
S(
|
|
817
817
|
m,
|
|
818
818
|
W((u) => u !== void 0 && u.length > 0 && tt(lt(g).sizeTree)),
|
|
819
|
-
|
|
819
|
+
k((u) => {
|
|
820
820
|
const p = [];
|
|
821
|
-
let b = u[0],
|
|
821
|
+
let b = u[0], L = 0;
|
|
822
822
|
for (let F = 1; F < u.length; F++) {
|
|
823
|
-
const
|
|
824
|
-
|
|
823
|
+
const O = u[F];
|
|
824
|
+
O !== b && (p.push({
|
|
825
825
|
endIndex: F - 1,
|
|
826
826
|
size: b,
|
|
827
|
-
startIndex:
|
|
828
|
-
}), b =
|
|
827
|
+
startIndex: L
|
|
828
|
+
}), b = O, L = F);
|
|
829
829
|
}
|
|
830
830
|
return p.push({
|
|
831
831
|
endIndex: u.length - 1,
|
|
832
832
|
size: b,
|
|
833
|
-
startIndex:
|
|
833
|
+
startIndex: L
|
|
834
834
|
}), p;
|
|
835
835
|
})
|
|
836
836
|
),
|
|
837
837
|
n
|
|
838
|
-
),
|
|
838
|
+
), z(
|
|
839
839
|
S(
|
|
840
840
|
c,
|
|
841
841
|
D(v, f),
|
|
842
842
|
W(([, u, p]) => u !== void 0 && p !== void 0),
|
|
843
|
-
|
|
844
|
-
const
|
|
843
|
+
k(([u, p, b]) => {
|
|
844
|
+
const L = [];
|
|
845
845
|
for (let F = 0; F < u.length; F++) {
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
startIndex:
|
|
849
|
-
endIndex:
|
|
846
|
+
const O = u[F], V = u[F + 1];
|
|
847
|
+
L.push({
|
|
848
|
+
startIndex: O,
|
|
849
|
+
endIndex: O,
|
|
850
850
|
size: p
|
|
851
|
-
}), V !== void 0 &&
|
|
852
|
-
startIndex:
|
|
851
|
+
}), V !== void 0 && L.push({
|
|
852
|
+
startIndex: O + 1,
|
|
853
853
|
endIndex: V - 1,
|
|
854
854
|
size: b
|
|
855
855
|
});
|
|
856
856
|
}
|
|
857
|
-
return
|
|
857
|
+
return L;
|
|
858
858
|
})
|
|
859
859
|
),
|
|
860
860
|
n
|
|
@@ -863,32 +863,32 @@ const _o = {
|
|
|
863
863
|
S(
|
|
864
864
|
n,
|
|
865
865
|
D(g),
|
|
866
|
-
|
|
866
|
+
Bt(
|
|
867
867
|
({ sizes: u }, [p, b]) => ({
|
|
868
868
|
changed: b !== u,
|
|
869
869
|
sizes: b
|
|
870
870
|
}),
|
|
871
871
|
{ changed: !1, sizes: I }
|
|
872
872
|
),
|
|
873
|
-
|
|
873
|
+
k((u) => u.changed)
|
|
874
874
|
)
|
|
875
875
|
);
|
|
876
876
|
X(
|
|
877
877
|
S(
|
|
878
878
|
l,
|
|
879
|
-
|
|
879
|
+
Bt(
|
|
880
880
|
(u, p) => ({ diff: u.prev - p, prev: p }),
|
|
881
881
|
{ diff: 0, prev: 0 }
|
|
882
882
|
),
|
|
883
|
-
|
|
883
|
+
k((u) => u.diff)
|
|
884
884
|
),
|
|
885
885
|
(u) => {
|
|
886
886
|
const { groupIndices: p } = lt(g);
|
|
887
887
|
if (u > 0)
|
|
888
|
-
|
|
888
|
+
M(e, !0), M(s, u + xn(u, p));
|
|
889
889
|
else if (u < 0) {
|
|
890
890
|
const b = lt(a);
|
|
891
|
-
b.length > 0 && (u -= xn(-u, b)),
|
|
891
|
+
b.length > 0 && (u -= xn(-u, b)), M(i, u);
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
894
|
), X(S(l, D(t)), ([u, p]) => {
|
|
@@ -899,22 +899,22 @@ const _o = {
|
|
|
899
899
|
);
|
|
900
900
|
});
|
|
901
901
|
const C = Ct(s);
|
|
902
|
-
|
|
902
|
+
z(
|
|
903
903
|
S(
|
|
904
904
|
s,
|
|
905
905
|
D(g),
|
|
906
|
-
|
|
907
|
-
const b = p.groupIndices.length > 0,
|
|
906
|
+
k(([u, p]) => {
|
|
907
|
+
const b = p.groupIndices.length > 0, L = [], F = p.lastSize;
|
|
908
908
|
if (b) {
|
|
909
|
-
const
|
|
909
|
+
const O = ie(p.sizeTree, 0);
|
|
910
910
|
let V = 0, U = 0;
|
|
911
911
|
for (; V < u; ) {
|
|
912
912
|
const j = p.groupIndices[U], J = p.groupIndices.length === U + 1 ? 1 / 0 : p.groupIndices[U + 1] - j - 1;
|
|
913
|
-
|
|
913
|
+
L.push({
|
|
914
914
|
endIndex: j,
|
|
915
|
-
size:
|
|
915
|
+
size: O,
|
|
916
916
|
startIndex: j
|
|
917
|
-
}),
|
|
917
|
+
}), L.push({
|
|
918
918
|
endIndex: j + 1 + J - 1,
|
|
919
919
|
size: F,
|
|
920
920
|
startIndex: j + 1
|
|
@@ -940,15 +940,15 @@ const _o = {
|
|
|
940
940
|
{
|
|
941
941
|
prevIndex: u,
|
|
942
942
|
prevSize: 0,
|
|
943
|
-
ranges:
|
|
943
|
+
ranges: L
|
|
944
944
|
}
|
|
945
945
|
).ranges;
|
|
946
946
|
}
|
|
947
947
|
return Nt(p.sizeTree).reduce(
|
|
948
|
-
(
|
|
948
|
+
(O, { k: V, v: U }) => ({
|
|
949
949
|
prevIndex: V + u,
|
|
950
950
|
prevSize: U,
|
|
951
|
-
ranges: [...
|
|
951
|
+
ranges: [...O.ranges, { endIndex: V + u - 1, size: O.prevSize, startIndex: O.prevIndex }]
|
|
952
952
|
}),
|
|
953
953
|
{
|
|
954
954
|
prevIndex: 0,
|
|
@@ -960,25 +960,25 @@ const _o = {
|
|
|
960
960
|
),
|
|
961
961
|
n
|
|
962
962
|
);
|
|
963
|
-
const
|
|
963
|
+
const B = Ct(
|
|
964
964
|
S(
|
|
965
965
|
i,
|
|
966
966
|
D(g, R),
|
|
967
|
-
|
|
968
|
-
const
|
|
969
|
-
return ce(
|
|
967
|
+
k(([u, { offsetTree: p }, b]) => {
|
|
968
|
+
const L = -u;
|
|
969
|
+
return ce(L, p, b);
|
|
970
970
|
})
|
|
971
971
|
)
|
|
972
972
|
);
|
|
973
|
-
return
|
|
973
|
+
return z(
|
|
974
974
|
S(
|
|
975
975
|
i,
|
|
976
976
|
D(g, R),
|
|
977
|
-
|
|
977
|
+
k(([u, p, b]) => {
|
|
978
978
|
if (p.groupIndices.length > 0) {
|
|
979
979
|
if (tt(p.sizeTree))
|
|
980
980
|
return p;
|
|
981
|
-
let
|
|
981
|
+
let O = Yt();
|
|
982
982
|
const V = lt(a);
|
|
983
983
|
let U = 0, q = 0, $ = 0;
|
|
984
984
|
for (; U < -u; ) {
|
|
@@ -986,23 +986,23 @@ const _o = {
|
|
|
986
986
|
const J = V[q + 1] - $ - 1;
|
|
987
987
|
q++, U += J + 1;
|
|
988
988
|
}
|
|
989
|
-
if (
|
|
989
|
+
if (O = Nt(p.sizeTree).reduce((J, { k: dt, v: pt }) => vt(J, Math.max(0, dt + u), pt), O), U !== -u) {
|
|
990
990
|
const J = ie(p.sizeTree, $);
|
|
991
|
-
|
|
991
|
+
O = vt(O, 0, J);
|
|
992
992
|
const dt = Rt(p.sizeTree, -u + 1)[1];
|
|
993
|
-
|
|
993
|
+
O = vt(O, 1, dt);
|
|
994
994
|
}
|
|
995
995
|
return {
|
|
996
996
|
...p,
|
|
997
|
-
sizeTree:
|
|
998
|
-
...
|
|
997
|
+
sizeTree: O,
|
|
998
|
+
...Ae(p.offsetTree, 0, O, b)
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
const F = Nt(p.sizeTree).reduce((
|
|
1001
|
+
const F = Nt(p.sizeTree).reduce((O, { k: V, v: U }) => vt(O, Math.max(0, V + u), U), Yt());
|
|
1002
1002
|
return {
|
|
1003
1003
|
...p,
|
|
1004
1004
|
sizeTree: F,
|
|
1005
|
-
...
|
|
1005
|
+
...Ae(p.offsetTree, 0, F, b)
|
|
1006
1006
|
};
|
|
1007
1007
|
})
|
|
1008
1008
|
),
|
|
@@ -1021,7 +1021,7 @@ const _o = {
|
|
|
1021
1021
|
itemSize: h,
|
|
1022
1022
|
listRefresh: x,
|
|
1023
1023
|
shiftWith: i,
|
|
1024
|
-
shiftWithOffset:
|
|
1024
|
+
shiftWithOffset: B,
|
|
1025
1025
|
sizeRanges: n,
|
|
1026
1026
|
// output
|
|
1027
1027
|
sizes: g,
|
|
@@ -1045,32 +1045,32 @@ function No(t) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
const Yn = Z(
|
|
1047
1047
|
([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
|
|
1048
|
-
const s = K(), i = K(), l = Ct(S(s,
|
|
1049
|
-
return
|
|
1048
|
+
const s = K(), i = K(), l = Ct(S(s, k(No)));
|
|
1049
|
+
return z(
|
|
1050
1050
|
S(
|
|
1051
1051
|
l,
|
|
1052
|
-
|
|
1052
|
+
k((c) => c.totalCount)
|
|
1053
1053
|
),
|
|
1054
1054
|
n
|
|
1055
|
-
),
|
|
1055
|
+
), z(
|
|
1056
1056
|
S(
|
|
1057
1057
|
l,
|
|
1058
|
-
|
|
1058
|
+
k((c) => c.groupIndices)
|
|
1059
1059
|
),
|
|
1060
1060
|
t
|
|
1061
|
-
),
|
|
1061
|
+
), z(
|
|
1062
1062
|
S(
|
|
1063
1063
|
at(r, e, o),
|
|
1064
1064
|
W(([c, d]) => Re(d)),
|
|
1065
|
-
|
|
1065
|
+
k(([c, d, f]) => Rt(d.groupOffsetTree, Math.max(c - f, 0), "v")[0]),
|
|
1066
1066
|
ot(),
|
|
1067
|
-
|
|
1067
|
+
k((c) => [c])
|
|
1068
1068
|
),
|
|
1069
1069
|
i
|
|
1070
1070
|
), { groupCounts: s, topItemsIndexes: i };
|
|
1071
1071
|
},
|
|
1072
|
-
st(
|
|
1073
|
-
),
|
|
1072
|
+
st(Lt, St)
|
|
1073
|
+
), At = Z(
|
|
1074
1074
|
([{ log: t }]) => {
|
|
1075
1075
|
const e = w(!1), n = Ct(
|
|
1076
1076
|
S(
|
|
@@ -1108,25 +1108,25 @@ const fe = Z(
|
|
|
1108
1108
|
const h = K(), y = K(), R = w(0);
|
|
1109
1109
|
let I = null, g = null, a = null;
|
|
1110
1110
|
function T() {
|
|
1111
|
-
I !== null && (I(), I = null), a !== null && (a(), a = null), g && (clearTimeout(g), g = null),
|
|
1111
|
+
I !== null && (I(), I = null), a !== null && (a(), a = null), g && (clearTimeout(g), g = null), M(c, !1);
|
|
1112
1112
|
}
|
|
1113
|
-
return
|
|
1113
|
+
return z(
|
|
1114
1114
|
S(
|
|
1115
1115
|
h,
|
|
1116
1116
|
D(n, v, o, R, l, i, m),
|
|
1117
1117
|
D(t, s, r),
|
|
1118
|
-
|
|
1118
|
+
k(
|
|
1119
1119
|
([
|
|
1120
|
-
[x, C,
|
|
1121
|
-
|
|
1120
|
+
[x, C, B, u, p, b, L, F],
|
|
1121
|
+
O,
|
|
1122
1122
|
V,
|
|
1123
1123
|
U
|
|
1124
1124
|
]) => {
|
|
1125
1125
|
const q = Zn(x), { align: $, behavior: j, offset: J } = q, dt = u - 1, pt = qn(q, C, dt);
|
|
1126
|
-
let It = ce(pt, C.offsetTree,
|
|
1127
|
-
$ === "end" ? (It += V + Rt(C.sizeTree, pt)[1] -
|
|
1126
|
+
let It = ce(pt, C.offsetTree, O) + b;
|
|
1127
|
+
$ === "end" ? (It += V + Rt(C.sizeTree, pt)[1] - B + U, pt === dt && (It += L)) : $ === "center" ? It += (V + Rt(C.sizeTree, pt)[1] - B + U) / 2 : It -= p, J !== void 0 && J !== 0 && (It += J);
|
|
1128
1128
|
const Ft = (ht) => {
|
|
1129
|
-
T(), ht ? (F("retrying to scroll to", { location: x }, mt.DEBUG),
|
|
1129
|
+
T(), ht ? (F("retrying to scroll to", { location: x }, mt.DEBUG), M(h, x)) : (M(y, !0), F("list did not change, scroll successful", {}, mt.DEBUG));
|
|
1130
1130
|
};
|
|
1131
1131
|
if (T(), j === "smooth") {
|
|
1132
1132
|
let ht = !1;
|
|
@@ -1139,7 +1139,7 @@ const fe = Z(
|
|
|
1139
1139
|
I = bt(S(e, $o(150)), Ft);
|
|
1140
1140
|
return g = setTimeout(() => {
|
|
1141
1141
|
T();
|
|
1142
|
-
}, 1200),
|
|
1142
|
+
}, 1200), M(c, !0), F("scrolling from index to", { behavior: j, index: pt, top: It }, mt.DEBUG), { behavior: j, top: It };
|
|
1143
1143
|
}
|
|
1144
1144
|
)
|
|
1145
1145
|
),
|
|
@@ -1150,7 +1150,7 @@ const fe = Z(
|
|
|
1150
1150
|
topListHeight: R
|
|
1151
1151
|
};
|
|
1152
1152
|
},
|
|
1153
|
-
st(
|
|
1153
|
+
st(Lt, St, Gt),
|
|
1154
1154
|
{ singleton: !0 }
|
|
1155
1155
|
);
|
|
1156
1156
|
function $o(t) {
|
|
@@ -1174,26 +1174,26 @@ function Ye(t, e) {
|
|
|
1174
1174
|
const n = e - 1, o = typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
|
|
1175
1175
|
return Math.max(0, Math.min(o, n));
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1177
|
+
function Me(t) {
|
|
1178
1178
|
return t === void 0 ? !0 : typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
|
|
1179
1179
|
}
|
|
1180
1180
|
const me = Z(
|
|
1181
1181
|
([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
|
|
1182
1182
|
const l = w(!0), c = w(0), d = w(!0);
|
|
1183
|
-
return
|
|
1183
|
+
return z(
|
|
1184
1184
|
S(
|
|
1185
1185
|
i,
|
|
1186
1186
|
D(c),
|
|
1187
|
-
W(([f, v]) => !
|
|
1188
|
-
|
|
1187
|
+
W(([f, v]) => !Me(v)),
|
|
1188
|
+
kt(!1)
|
|
1189
1189
|
),
|
|
1190
1190
|
l
|
|
1191
|
-
),
|
|
1191
|
+
), z(
|
|
1192
1192
|
S(
|
|
1193
1193
|
i,
|
|
1194
1194
|
D(c),
|
|
1195
|
-
W(([f, v]) => !
|
|
1196
|
-
|
|
1195
|
+
W(([f, v]) => !Me(v)),
|
|
1196
|
+
kt(!1)
|
|
1197
1197
|
),
|
|
1198
1198
|
d
|
|
1199
1199
|
), X(
|
|
@@ -1205,15 +1205,15 @@ const me = Z(
|
|
|
1205
1205
|
),
|
|
1206
1206
|
([, f]) => {
|
|
1207
1207
|
if (f === void 0) {
|
|
1208
|
-
|
|
1208
|
+
M(l, !0), M(d, !0);
|
|
1209
1209
|
return;
|
|
1210
1210
|
}
|
|
1211
1211
|
bt(r, () => {
|
|
1212
|
-
|
|
1212
|
+
M(d, !0);
|
|
1213
1213
|
}), qe(4, () => {
|
|
1214
1214
|
bt(o, () => {
|
|
1215
|
-
|
|
1216
|
-
}),
|
|
1215
|
+
M(l, !0);
|
|
1216
|
+
}), M(s, f);
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
1219
|
), {
|
|
@@ -1222,7 +1222,7 @@ const me = Z(
|
|
|
1222
1222
|
scrolledToInitialItem: l
|
|
1223
1223
|
};
|
|
1224
1224
|
},
|
|
1225
|
-
st(
|
|
1225
|
+
st(Lt, St, fe, At),
|
|
1226
1226
|
{ singleton: !0 }
|
|
1227
1227
|
);
|
|
1228
1228
|
function Xn(t, e) {
|
|
@@ -1240,45 +1240,45 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
|
|
|
1240
1240
|
}, jo = 0, pe = Z(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
|
|
1241
1241
|
const i = w(!1), l = w(!0), c = K(), d = K(), f = w(4), v = w(jo), m = gt(
|
|
1242
1242
|
S(
|
|
1243
|
-
Ve(S(P(r), Ut(1),
|
|
1243
|
+
Ve(S(P(r), Ut(1), kt(!0)), S(P(r), Ut(1), kt(!1), hn(100))),
|
|
1244
1244
|
ot()
|
|
1245
1245
|
),
|
|
1246
1246
|
!1
|
|
1247
1247
|
), h = gt(
|
|
1248
|
-
S(Ve(S(n,
|
|
1248
|
+
S(Ve(S(n, kt(!0)), S(n, kt(!1), hn(200))), ot()),
|
|
1249
1249
|
!1
|
|
1250
1250
|
);
|
|
1251
|
-
|
|
1251
|
+
z(
|
|
1252
1252
|
S(
|
|
1253
1253
|
at(P(r), P(v)),
|
|
1254
|
-
|
|
1254
|
+
k(([a, T]) => a <= T),
|
|
1255
1255
|
ot()
|
|
1256
1256
|
),
|
|
1257
1257
|
l
|
|
1258
|
-
),
|
|
1258
|
+
), z(S(l, zt(50)), d);
|
|
1259
1259
|
const y = Ct(
|
|
1260
1260
|
S(
|
|
1261
1261
|
at(o, P(s), P(e), P(t), P(f)),
|
|
1262
|
-
|
|
1263
|
-
const b = x + C - T > -p,
|
|
1262
|
+
Bt((a, [{ scrollHeight: T, scrollTop: x }, C, B, u, p]) => {
|
|
1263
|
+
const b = x + C - T > -p, L = {
|
|
1264
1264
|
scrollHeight: T,
|
|
1265
1265
|
scrollTop: x,
|
|
1266
1266
|
viewportHeight: C
|
|
1267
1267
|
};
|
|
1268
1268
|
if (b) {
|
|
1269
|
-
let
|
|
1270
|
-
return x > a.state.scrollTop ? (
|
|
1269
|
+
let O, V;
|
|
1270
|
+
return x > a.state.scrollTop ? (O = "SCROLLED_DOWN", V = a.state.scrollTop - x) : (O = "SIZE_DECREASED", V = a.state.scrollTop - x || a.scrollTopDelta), {
|
|
1271
1271
|
atBottom: !0,
|
|
1272
|
-
atBottomBecause:
|
|
1272
|
+
atBottomBecause: O,
|
|
1273
1273
|
scrollTopDelta: V,
|
|
1274
|
-
state:
|
|
1274
|
+
state: L
|
|
1275
1275
|
};
|
|
1276
1276
|
}
|
|
1277
1277
|
let F;
|
|
1278
|
-
return
|
|
1278
|
+
return L.scrollHeight > a.state.scrollHeight ? F = "SIZE_INCREASED" : C < a.state.viewportHeight ? F = "VIEWPORT_HEIGHT_DECREASING" : x < a.state.scrollTop ? F = "SCROLLING_UPWARDS" : F = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1279
1279
|
atBottom: !1,
|
|
1280
1280
|
notAtBottomBecause: F,
|
|
1281
|
-
state:
|
|
1281
|
+
state: L
|
|
1282
1282
|
};
|
|
1283
1283
|
}, Ko),
|
|
1284
1284
|
ot((a, T) => a !== void 0 && a.atBottom === T.atBottom)
|
|
@@ -1286,11 +1286,11 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
|
|
|
1286
1286
|
), R = gt(
|
|
1287
1287
|
S(
|
|
1288
1288
|
o,
|
|
1289
|
-
|
|
1289
|
+
Bt(
|
|
1290
1290
|
(a, { scrollHeight: T, scrollTop: x, viewportHeight: C }) => {
|
|
1291
1291
|
if (!Xn(a.scrollHeight, T)) {
|
|
1292
|
-
const
|
|
1293
|
-
return a.scrollTop !== x &&
|
|
1292
|
+
const B = T - (x + C) < 1;
|
|
1293
|
+
return a.scrollTop !== x && B ? {
|
|
1294
1294
|
changed: !0,
|
|
1295
1295
|
jump: a.scrollTop - x,
|
|
1296
1296
|
scrollHeight: T,
|
|
@@ -1312,47 +1312,47 @@ const ue = "up", ne = "down", Uo = "none", Ko = {
|
|
|
1312
1312
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
1313
1313
|
),
|
|
1314
1314
|
W((a) => a.changed),
|
|
1315
|
-
|
|
1315
|
+
k((a) => a.jump)
|
|
1316
1316
|
),
|
|
1317
1317
|
0
|
|
1318
1318
|
);
|
|
1319
|
-
|
|
1319
|
+
z(
|
|
1320
1320
|
S(
|
|
1321
1321
|
y,
|
|
1322
|
-
|
|
1322
|
+
k((a) => a.atBottom)
|
|
1323
1323
|
),
|
|
1324
1324
|
i
|
|
1325
|
-
),
|
|
1325
|
+
), z(S(i, zt(50)), c);
|
|
1326
1326
|
const I = w(ne);
|
|
1327
|
-
|
|
1327
|
+
z(
|
|
1328
1328
|
S(
|
|
1329
1329
|
o,
|
|
1330
|
-
|
|
1330
|
+
k(({ scrollTop: a }) => a),
|
|
1331
1331
|
ot(),
|
|
1332
|
-
|
|
1332
|
+
Bt(
|
|
1333
1333
|
(a, T) => lt(h) ? { direction: a.direction, prevScrollTop: T } : { direction: T < a.prevScrollTop ? ue : ne, prevScrollTop: T },
|
|
1334
1334
|
{ direction: ne, prevScrollTop: 0 }
|
|
1335
1335
|
),
|
|
1336
|
-
|
|
1336
|
+
k((a) => a.direction)
|
|
1337
1337
|
),
|
|
1338
1338
|
I
|
|
1339
|
-
),
|
|
1339
|
+
), z(S(o, zt(50), kt(Uo)), I);
|
|
1340
1340
|
const g = w(0);
|
|
1341
|
-
return
|
|
1341
|
+
return z(
|
|
1342
1342
|
S(
|
|
1343
1343
|
m,
|
|
1344
1344
|
W((a) => !a),
|
|
1345
|
-
|
|
1345
|
+
kt(0)
|
|
1346
1346
|
),
|
|
1347
1347
|
g
|
|
1348
|
-
),
|
|
1348
|
+
), z(
|
|
1349
1349
|
S(
|
|
1350
1350
|
r,
|
|
1351
1351
|
zt(100),
|
|
1352
1352
|
D(m),
|
|
1353
1353
|
W(([a, T]) => T),
|
|
1354
|
-
|
|
1355
|
-
|
|
1354
|
+
Bt(([a, T], [x]) => [T, x], [0, 0]),
|
|
1355
|
+
k(([a, T]) => T - a)
|
|
1356
1356
|
),
|
|
1357
1357
|
g
|
|
1358
1358
|
), {
|
|
@@ -1390,7 +1390,7 @@ const Ze = Z(
|
|
|
1390
1390
|
P(t),
|
|
1391
1391
|
P(l)
|
|
1392
1392
|
),
|
|
1393
|
-
|
|
1393
|
+
k(
|
|
1394
1394
|
([
|
|
1395
1395
|
f,
|
|
1396
1396
|
v,
|
|
@@ -1402,12 +1402,12 @@ const Ze = Z(
|
|
|
1402
1402
|
a,
|
|
1403
1403
|
T
|
|
1404
1404
|
]) => {
|
|
1405
|
-
const x = f - a, C = I + g,
|
|
1405
|
+
const x = f - a, C = I + g, B = Math.max(m - x, 0);
|
|
1406
1406
|
let u = vn;
|
|
1407
1407
|
const p = Cn(T, ae), b = Cn(T, de);
|
|
1408
|
-
return h -= a, h += m + g, y += m + g, y -= a, h > f + C - p && (u = ue), y < f -
|
|
1408
|
+
return h -= a, h += m + g, y += m + g, y -= a, h > f + C - p && (u = ue), y < f - B + v + b && (u = ne), u !== vn ? [
|
|
1409
1409
|
Math.max(x - m - Tn(R, ae, u) - p, 0),
|
|
1410
|
-
x -
|
|
1410
|
+
x - B - g + v + Tn(R, de, u) + b
|
|
1411
1411
|
] : null;
|
|
1412
1412
|
}
|
|
1413
1413
|
),
|
|
@@ -1439,7 +1439,7 @@ function qo(t, e, n) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
return [{ data: n?.[0], index: t, offset: 0, size: 0 }];
|
|
1441
1441
|
}
|
|
1442
|
-
const
|
|
1442
|
+
const Oe = {
|
|
1443
1443
|
bottom: 0,
|
|
1444
1444
|
firstItemIndex: 0,
|
|
1445
1445
|
items: [],
|
|
@@ -1528,7 +1528,7 @@ const Kt = Z(
|
|
|
1528
1528
|
{ recalcInProgress: y }
|
|
1529
1529
|
]) => {
|
|
1530
1530
|
const R = w([]), I = w(0), g = K(), a = w(0);
|
|
1531
|
-
|
|
1531
|
+
z(s.topItemsIndexes, R);
|
|
1532
1532
|
const T = gt(
|
|
1533
1533
|
S(
|
|
1534
1534
|
at(
|
|
@@ -1546,19 +1546,19 @@ const Kt = Z(
|
|
|
1546
1546
|
t,
|
|
1547
1547
|
P(I)
|
|
1548
1548
|
),
|
|
1549
|
-
W(([u, p, , b, , , , , , , ,
|
|
1550
|
-
const F =
|
|
1549
|
+
W(([u, p, , b, , , , , , , , L]) => {
|
|
1550
|
+
const F = L !== void 0 && L.length !== b;
|
|
1551
1551
|
return u && !p && !F;
|
|
1552
1552
|
}),
|
|
1553
|
-
|
|
1553
|
+
k(
|
|
1554
1554
|
([
|
|
1555
1555
|
,
|
|
1556
1556
|
,
|
|
1557
1557
|
[u, p],
|
|
1558
1558
|
b,
|
|
1559
|
-
z,
|
|
1560
|
-
F,
|
|
1561
1559
|
L,
|
|
1560
|
+
F,
|
|
1561
|
+
O,
|
|
1562
1562
|
V,
|
|
1563
1563
|
U,
|
|
1564
1564
|
q,
|
|
@@ -1566,11 +1566,11 @@ const Kt = Z(
|
|
|
1566
1566
|
j,
|
|
1567
1567
|
J
|
|
1568
1568
|
]) => {
|
|
1569
|
-
const dt =
|
|
1569
|
+
const dt = L, { offsetTree: pt, sizeTree: It } = dt;
|
|
1570
1570
|
if (b === 0)
|
|
1571
|
-
return { ...
|
|
1571
|
+
return { ...Oe, totalCount: b };
|
|
1572
1572
|
if (u === 0 && p === 0)
|
|
1573
|
-
return J === 0 ? { ...
|
|
1573
|
+
return J === 0 ? { ...Oe, totalCount: b } : Jn(J, F, L, U, q, j);
|
|
1574
1574
|
if (tt(It))
|
|
1575
1575
|
return J > 0 ? null : ve(
|
|
1576
1576
|
qo(Ye(F, b), dt, j),
|
|
@@ -1590,7 +1590,7 @@ const Kt = Z(
|
|
|
1590
1590
|
Ft.push({ data: j?.[ut], index: ut, offset: it, size: Q }), it += Q;
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
-
if (!
|
|
1593
|
+
if (!O)
|
|
1594
1594
|
return ve([], Ft, b, q, dt, U);
|
|
1595
1595
|
const ht = V.length > 0 ? V[V.length - 1] + 1 : 0, jt = Po(pt, u, p, ht);
|
|
1596
1596
|
if (jt.length === 0)
|
|
@@ -1638,31 +1638,31 @@ const Kt = Z(
|
|
|
1638
1638
|
W((u) => u !== null),
|
|
1639
1639
|
ot()
|
|
1640
1640
|
),
|
|
1641
|
-
|
|
1641
|
+
Oe
|
|
1642
1642
|
);
|
|
1643
|
-
|
|
1643
|
+
z(
|
|
1644
1644
|
S(
|
|
1645
1645
|
t,
|
|
1646
1646
|
W(Ne),
|
|
1647
|
-
|
|
1647
|
+
k((u) => u?.length)
|
|
1648
1648
|
),
|
|
1649
1649
|
r
|
|
1650
|
-
),
|
|
1650
|
+
), z(
|
|
1651
1651
|
S(
|
|
1652
1652
|
T,
|
|
1653
|
-
|
|
1653
|
+
k((u) => u.topListHeight)
|
|
1654
1654
|
),
|
|
1655
1655
|
v
|
|
1656
|
-
),
|
|
1656
|
+
), z(v, l), z(
|
|
1657
1657
|
S(
|
|
1658
1658
|
T,
|
|
1659
|
-
|
|
1659
|
+
k((u) => [u.top, u.bottom])
|
|
1660
1660
|
),
|
|
1661
1661
|
i
|
|
1662
|
-
),
|
|
1662
|
+
), z(
|
|
1663
1663
|
S(
|
|
1664
1664
|
T,
|
|
1665
|
-
|
|
1665
|
+
k((u) => u.items)
|
|
1666
1666
|
),
|
|
1667
1667
|
g
|
|
1668
1668
|
);
|
|
@@ -1672,24 +1672,30 @@ const Kt = Z(
|
|
|
1672
1672
|
W(({ items: u }) => u.length > 0),
|
|
1673
1673
|
D(r, t),
|
|
1674
1674
|
W(([{ items: u }, p]) => u[u.length - 1].originalIndex === p - 1),
|
|
1675
|
-
|
|
1675
|
+
k(([{ items: u }, p, b]) => {
|
|
1676
|
+
const L = u[u.length - 1], F = L.type === "group" ? L.index + 1 : (L.groupIndex ?? -1) + 1;
|
|
1677
|
+
return [p - 1 - F, b];
|
|
1678
|
+
}),
|
|
1676
1679
|
ot(le),
|
|
1677
|
-
|
|
1680
|
+
// when every group is empty, only headers render and there is no item index to report.
|
|
1681
|
+
// Filter after the distinct check, so that the same index fires again once an item returns.
|
|
1682
|
+
W(([u]) => u >= 0),
|
|
1683
|
+
k(([u]) => u)
|
|
1678
1684
|
)
|
|
1679
1685
|
), C = Ct(
|
|
1680
1686
|
S(
|
|
1681
1687
|
T,
|
|
1682
1688
|
zt(200),
|
|
1683
1689
|
W(({ items: u, topItems: p }) => u.length > 0 && u[0].originalIndex === p.length),
|
|
1684
|
-
|
|
1690
|
+
k(({ items: u }) => u[0].index),
|
|
1685
1691
|
ot()
|
|
1686
1692
|
)
|
|
1687
|
-
),
|
|
1693
|
+
), B = Ct(
|
|
1688
1694
|
S(
|
|
1689
1695
|
T,
|
|
1690
1696
|
W(({ items: u }) => u.length > 0),
|
|
1691
1697
|
// oxlint-disable-next-line array-callback-return -- callback always returns after trimming group sentinels
|
|
1692
|
-
|
|
1698
|
+
k(({ items: u }) => {
|
|
1693
1699
|
let p = 0, b = u.length - 1;
|
|
1694
1700
|
for (; u[p].type === "group" && p < b; )
|
|
1695
1701
|
p++;
|
|
@@ -1709,20 +1715,20 @@ const Kt = Z(
|
|
|
1709
1715
|
itemsRendered: g,
|
|
1710
1716
|
listState: T,
|
|
1711
1717
|
minOverscanItemCount: a,
|
|
1712
|
-
rangeChanged:
|
|
1718
|
+
rangeChanged: B,
|
|
1713
1719
|
startReached: C,
|
|
1714
1720
|
topItemsIndexes: R,
|
|
1715
1721
|
...m
|
|
1716
1722
|
};
|
|
1717
1723
|
},
|
|
1718
1724
|
st(
|
|
1719
|
-
|
|
1725
|
+
Lt,
|
|
1720
1726
|
Yn,
|
|
1721
1727
|
Ze,
|
|
1722
1728
|
me,
|
|
1723
1729
|
fe,
|
|
1724
1730
|
pe,
|
|
1725
|
-
|
|
1731
|
+
At,
|
|
1726
1732
|
Ke
|
|
1727
1733
|
),
|
|
1728
1734
|
{ singleton: !0 }
|
|
@@ -1731,11 +1737,11 @@ const Kt = Z(
|
|
|
1731
1737
|
const s = K(), i = gt(
|
|
1732
1738
|
S(
|
|
1733
1739
|
at(n, t, o, e, r),
|
|
1734
|
-
|
|
1740
|
+
k(([l, c, d, f, v]) => l + c + d + f + v.offsetBottom + v.bottom)
|
|
1735
1741
|
),
|
|
1736
1742
|
0
|
|
1737
1743
|
);
|
|
1738
|
-
return
|
|
1744
|
+
return z(P(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
1739
1745
|
},
|
|
1740
1746
|
st(St, Kt),
|
|
1741
1747
|
{ singleton: !0 }
|
|
@@ -1745,7 +1751,7 @@ const Kt = Z(
|
|
|
1745
1751
|
S(
|
|
1746
1752
|
at(n, t, e),
|
|
1747
1753
|
W(([r]) => r),
|
|
1748
|
-
|
|
1754
|
+
k(([, r, s]) => Math.max(0, r - s)),
|
|
1749
1755
|
zt(0),
|
|
1750
1756
|
ot()
|
|
1751
1757
|
),
|
|
@@ -1770,20 +1776,20 @@ const Kt = Z(
|
|
|
1770
1776
|
{ scrollToIndex: d }
|
|
1771
1777
|
]) => {
|
|
1772
1778
|
const f = K();
|
|
1773
|
-
return
|
|
1779
|
+
return z(
|
|
1774
1780
|
S(
|
|
1775
1781
|
f,
|
|
1776
1782
|
D(e, c, n, s, r, o, l),
|
|
1777
1783
|
D(t),
|
|
1778
|
-
|
|
1779
|
-
const { calculateViewLocation: x = Zo, done: C, ...
|
|
1784
|
+
k(([[v, m, h, y, R, I, g, a], T]) => {
|
|
1785
|
+
const { calculateViewLocation: x = Zo, done: C, ...B } = v, u = qn(v, m, y - 1), p = ce(u, m.offsetTree, T) + R + I, b = p + Rt(m.sizeTree, u)[1], L = a + I, F = a + h - g, O = x({
|
|
1780
1786
|
itemBottom: b,
|
|
1781
1787
|
itemTop: p,
|
|
1782
|
-
locationParams:
|
|
1788
|
+
locationParams: B,
|
|
1783
1789
|
viewportBottom: F,
|
|
1784
|
-
viewportTop:
|
|
1790
|
+
viewportTop: L
|
|
1785
1791
|
});
|
|
1786
|
-
return
|
|
1792
|
+
return O === null ? C?.() : C && bt(
|
|
1787
1793
|
S(
|
|
1788
1794
|
i,
|
|
1789
1795
|
W((V) => !V),
|
|
@@ -1792,7 +1798,7 @@ const Kt = Z(
|
|
|
1792
1798
|
Ut(lt(i) ? 1 : 2)
|
|
1793
1799
|
),
|
|
1794
1800
|
C
|
|
1795
|
-
),
|
|
1801
|
+
), O;
|
|
1796
1802
|
}),
|
|
1797
1803
|
W((v) => v !== null)
|
|
1798
1804
|
),
|
|
@@ -1801,7 +1807,7 @@ const Kt = Z(
|
|
|
1801
1807
|
scrollIntoView: f
|
|
1802
1808
|
};
|
|
1803
1809
|
},
|
|
1804
|
-
st(
|
|
1810
|
+
st(Lt, St, fe, Kt, Gt),
|
|
1805
1811
|
{ singleton: !0 }
|
|
1806
1812
|
);
|
|
1807
1813
|
function bn(t) {
|
|
@@ -1822,7 +1828,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1822
1828
|
const y = w(!1), R = K();
|
|
1823
1829
|
let I = null;
|
|
1824
1830
|
function g(C) {
|
|
1825
|
-
|
|
1831
|
+
M(i, {
|
|
1826
1832
|
align: "end",
|
|
1827
1833
|
behavior: C,
|
|
1828
1834
|
index: "LAST"
|
|
@@ -1832,32 +1838,32 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1832
1838
|
S(
|
|
1833
1839
|
at(S(P(e), Ut(1)), c),
|
|
1834
1840
|
D(P(y), s, l, v),
|
|
1835
|
-
|
|
1836
|
-
let F =
|
|
1837
|
-
return F && (
|
|
1841
|
+
k(([[C, B], u, p, b, L]) => {
|
|
1842
|
+
let F = B && b, O = "auto";
|
|
1843
|
+
return F && (O = Xo(u, p || L), F = F && O !== !1), { followOutputBehavior: O, shouldFollow: F, totalCount: C };
|
|
1838
1844
|
}),
|
|
1839
1845
|
W(({ shouldFollow: C }) => C)
|
|
1840
1846
|
),
|
|
1841
|
-
({ followOutputBehavior: C, totalCount:
|
|
1847
|
+
({ followOutputBehavior: C, totalCount: B }) => {
|
|
1842
1848
|
I !== null && (I(), I = null), lt(n) === void 0 ? I = bt(t, () => {
|
|
1843
|
-
lt(f)("following output to ", { totalCount:
|
|
1849
|
+
lt(f)("following output to ", { totalCount: B }, mt.DEBUG), g(C), I = null;
|
|
1844
1850
|
}) : requestAnimationFrame(() => {
|
|
1845
|
-
lt(f)("following output to ", { totalCount:
|
|
1851
|
+
lt(f)("following output to ", { totalCount: B }, mt.DEBUG), g(C);
|
|
1846
1852
|
});
|
|
1847
1853
|
}
|
|
1848
1854
|
);
|
|
1849
1855
|
function a(C) {
|
|
1850
|
-
const
|
|
1856
|
+
const B = bt(r, (u) => {
|
|
1851
1857
|
C && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && I === null && (lt(f)("scrolling to bottom due to increased size", {}, mt.DEBUG), g("auto"));
|
|
1852
1858
|
});
|
|
1853
|
-
setTimeout(
|
|
1859
|
+
setTimeout(B, 100);
|
|
1854
1860
|
}
|
|
1855
1861
|
X(
|
|
1856
1862
|
S(
|
|
1857
1863
|
at(P(y), e, d),
|
|
1858
|
-
W(([C, ,
|
|
1859
|
-
|
|
1860
|
-
({ value: C }, [,
|
|
1864
|
+
W(([C, , B]) => C !== !1 && B),
|
|
1865
|
+
Bt(
|
|
1866
|
+
({ value: C }, [, B]) => ({ refreshed: C === B, value: B }),
|
|
1861
1867
|
{ refreshed: !1, value: 0 }
|
|
1862
1868
|
),
|
|
1863
1869
|
W(({ refreshed: C }) => C),
|
|
@@ -1868,15 +1874,15 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1868
1874
|
}
|
|
1869
1875
|
), X(R, () => {
|
|
1870
1876
|
a(lt(y) !== !1);
|
|
1871
|
-
}), X(at(P(y), r), ([C,
|
|
1872
|
-
C !== !1 && !
|
|
1877
|
+
}), X(at(P(y), r), ([C, B]) => {
|
|
1878
|
+
C !== !1 && !B.atBottom && B.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && g("auto");
|
|
1873
1879
|
});
|
|
1874
1880
|
const T = w(null), x = K();
|
|
1875
|
-
return
|
|
1881
|
+
return z(
|
|
1876
1882
|
Ve(
|
|
1877
1883
|
S(
|
|
1878
1884
|
P(o),
|
|
1879
|
-
|
|
1885
|
+
k((C) => C?.length ?? 0)
|
|
1880
1886
|
),
|
|
1881
1887
|
S(P(e))
|
|
1882
1888
|
),
|
|
@@ -1885,42 +1891,42 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1885
1891
|
S(
|
|
1886
1892
|
at(S(x, Ut(1)), c),
|
|
1887
1893
|
D(P(T), l, v, m),
|
|
1888
|
-
|
|
1894
|
+
k(([[C, B], u, p, b, L]) => B && p && u?.({ context: L, totalCount: C, scrollingInProgress: b })),
|
|
1889
1895
|
W((C) => !!C),
|
|
1890
1896
|
zt(0)
|
|
1891
1897
|
),
|
|
1892
1898
|
(C) => {
|
|
1893
1899
|
I !== null && (I(), I = null), lt(n) === void 0 ? I = bt(t, () => {
|
|
1894
|
-
lt(f)("scrolling into view", {}),
|
|
1900
|
+
lt(f)("scrolling into view", {}), M(h, C), I = null;
|
|
1895
1901
|
}) : requestAnimationFrame(() => {
|
|
1896
|
-
lt(f)("scrolling into view", {}),
|
|
1902
|
+
lt(f)("scrolling into view", {}), M(h, C);
|
|
1897
1903
|
});
|
|
1898
1904
|
}
|
|
1899
1905
|
), { autoscrollToBottom: R, followOutput: y, scrollIntoViewOnChange: T };
|
|
1900
1906
|
},
|
|
1901
1907
|
st(
|
|
1902
|
-
|
|
1908
|
+
Lt,
|
|
1903
1909
|
pe,
|
|
1904
1910
|
fe,
|
|
1905
1911
|
me,
|
|
1906
|
-
|
|
1912
|
+
At,
|
|
1907
1913
|
Gt,
|
|
1908
1914
|
St,
|
|
1909
1915
|
to,
|
|
1910
1916
|
eo
|
|
1911
1917
|
)
|
|
1912
1918
|
), Qo = Z(
|
|
1913
|
-
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (
|
|
1919
|
+
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (z(
|
|
1914
1920
|
S(
|
|
1915
1921
|
l,
|
|
1916
1922
|
D(s),
|
|
1917
1923
|
W(([, c]) => c !== 0),
|
|
1918
1924
|
D(r, o, e, n, t),
|
|
1919
|
-
|
|
1925
|
+
k(([[, c], d, f, v, m, h]) => Jn(c, d, f, v, m, h))
|
|
1920
1926
|
),
|
|
1921
1927
|
i
|
|
1922
1928
|
), {}),
|
|
1923
|
-
st(
|
|
1929
|
+
st(Lt, me, Kt, At),
|
|
1924
1930
|
{ singleton: !0 }
|
|
1925
1931
|
), tr = Z(
|
|
1926
1932
|
([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
|
|
@@ -1930,7 +1936,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1930
1936
|
t,
|
|
1931
1937
|
D(o),
|
|
1932
1938
|
W(([, r]) => r !== 0),
|
|
1933
|
-
|
|
1939
|
+
k(([, r]) => ({ top: r }))
|
|
1934
1940
|
),
|
|
1935
1941
|
(r) => {
|
|
1936
1942
|
bt(
|
|
@@ -1941,7 +1947,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1941
1947
|
),
|
|
1942
1948
|
() => {
|
|
1943
1949
|
requestAnimationFrame(() => {
|
|
1944
|
-
|
|
1950
|
+
M(e, r);
|
|
1945
1951
|
});
|
|
1946
1952
|
}
|
|
1947
1953
|
);
|
|
@@ -1950,17 +1956,17 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1950
1956
|
initialScrollTop: o
|
|
1951
1957
|
};
|
|
1952
1958
|
},
|
|
1953
|
-
st(
|
|
1959
|
+
st(At, St, Kt),
|
|
1954
1960
|
{ singleton: !0 }
|
|
1955
1961
|
), no = Z(
|
|
1956
1962
|
([{ scrollVelocity: t }]) => {
|
|
1957
1963
|
const e = w(!1), n = K(), o = w(!1);
|
|
1958
|
-
return
|
|
1964
|
+
return z(
|
|
1959
1965
|
S(
|
|
1960
1966
|
t,
|
|
1961
1967
|
D(o, e, n),
|
|
1962
1968
|
W(([r, s]) => s !== !1 && s !== void 0),
|
|
1963
|
-
|
|
1969
|
+
k(([r, s, i, l]) => {
|
|
1964
1970
|
const { enter: c, exit: d } = s;
|
|
1965
1971
|
if (i) {
|
|
1966
1972
|
if (d(r, l))
|
|
@@ -1983,21 +1989,21 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
1983
1989
|
{ singleton: !0 }
|
|
1984
1990
|
), Xe = Z(([{ scrollContainerState: t, scrollTo: e }]) => {
|
|
1985
1991
|
const n = K(), o = K(), r = K(), s = w(!1), i = w(void 0);
|
|
1986
|
-
return
|
|
1992
|
+
return z(
|
|
1987
1993
|
S(
|
|
1988
1994
|
at(n, o),
|
|
1989
|
-
|
|
1995
|
+
k(([{ scrollTop: l, viewportHeight: c }, { offsetTop: d, listHeight: f }]) => ({
|
|
1990
1996
|
scrollHeight: f,
|
|
1991
1997
|
scrollTop: Math.max(0, l - d),
|
|
1992
1998
|
viewportHeight: c
|
|
1993
1999
|
}))
|
|
1994
2000
|
),
|
|
1995
2001
|
t
|
|
1996
|
-
),
|
|
2002
|
+
), z(
|
|
1997
2003
|
S(
|
|
1998
2004
|
e,
|
|
1999
2005
|
D(o),
|
|
2000
|
-
|
|
2006
|
+
k(([l, { offsetTop: c }]) => ({
|
|
2001
2007
|
...l,
|
|
2002
2008
|
top: l.top + c
|
|
2003
2009
|
}))
|
|
@@ -2022,7 +2028,7 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
2022
2028
|
{ useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
|
|
2023
2029
|
]) => {
|
|
2024
2030
|
const d = K(), f = w(void 0), v = w(null), m = w(null);
|
|
2025
|
-
return
|
|
2031
|
+
return z(l, v), z(c, m), X(
|
|
2026
2032
|
S(
|
|
2027
2033
|
d,
|
|
2028
2034
|
D(e, o, i, v, m, n)
|
|
@@ -2031,13 +2037,13 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
2031
2037
|
const x = Go(y.sizeTree);
|
|
2032
2038
|
I && g !== null && a !== null && (R = g.scrollTop - a.offsetTop), R -= T, h({ ranges: x, scrollTop: R });
|
|
2033
2039
|
}
|
|
2034
|
-
),
|
|
2040
|
+
), z(S(f, W(Ne), k(nr)), r), z(
|
|
2035
2041
|
S(
|
|
2036
2042
|
s,
|
|
2037
2043
|
D(f),
|
|
2038
2044
|
W(([, h]) => h !== void 0),
|
|
2039
2045
|
ot(),
|
|
2040
|
-
|
|
2046
|
+
k(([, h]) => h.ranges)
|
|
2041
2047
|
),
|
|
2042
2048
|
t
|
|
2043
2049
|
), {
|
|
@@ -2045,18 +2051,18 @@ const Xo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Jo = Z(
|
|
|
2045
2051
|
restoreStateFrom: f
|
|
2046
2052
|
};
|
|
2047
2053
|
},
|
|
2048
|
-
st(
|
|
2054
|
+
st(Lt, St, me, At, Xe)
|
|
2049
2055
|
);
|
|
2050
2056
|
function nr(t) {
|
|
2051
2057
|
return { align: "start", index: 0, offset: t.scrollTop };
|
|
2052
2058
|
}
|
|
2053
2059
|
const or = Z(([{ topItemsIndexes: t }]) => {
|
|
2054
2060
|
const e = w(0);
|
|
2055
|
-
return
|
|
2061
|
+
return z(
|
|
2056
2062
|
S(
|
|
2057
2063
|
e,
|
|
2058
2064
|
W((n) => n >= 0),
|
|
2059
|
-
|
|
2065
|
+
k((n) => Array.from({ length: n }).map((o, r) => r))
|
|
2060
2066
|
),
|
|
2061
2067
|
t
|
|
2062
2068
|
), { topItemCount: e };
|
|
@@ -2078,37 +2084,37 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2078
2084
|
S(
|
|
2079
2085
|
d,
|
|
2080
2086
|
D(l),
|
|
2081
|
-
|
|
2082
|
-
([, x, C,
|
|
2083
|
-
const
|
|
2087
|
+
Bt(
|
|
2088
|
+
([, x, C, B], [{ bottom: u, items: p, offsetBottom: b, totalCount: L }, F]) => {
|
|
2089
|
+
const O = u + b;
|
|
2084
2090
|
let V = 0;
|
|
2085
|
-
return C ===
|
|
2091
|
+
return C === L && x.length > 0 && p.length > 0 && (p[0].originalIndex === 0 && x[0].originalIndex === 0 || (V = O - B, V !== 0 && (V += F))), [V, p, L, O];
|
|
2086
2092
|
},
|
|
2087
2093
|
[0, [], 0, 0]
|
|
2088
2094
|
),
|
|
2089
2095
|
W(([x]) => x !== 0),
|
|
2090
2096
|
D(r, c, o, s, y, R),
|
|
2091
|
-
W(([, x, C,
|
|
2092
|
-
|
|
2097
|
+
W(([, x, C, B, , , u]) => !u && !B && x !== 0 && C === ue),
|
|
2098
|
+
k(([[x], , , , , C]) => (C("Upward scrolling compensation", { amount: x }, mt.DEBUG), x))
|
|
2093
2099
|
)
|
|
2094
2100
|
);
|
|
2095
2101
|
function g(x) {
|
|
2096
|
-
x > 0 ? (
|
|
2102
|
+
x > 0 ? (M(n, { behavior: "auto", top: -x }), M(t, 0)) : (M(t, 0), M(n, { behavior: "auto", top: -x }));
|
|
2097
2103
|
}
|
|
2098
|
-
X(S(I, D(t, i)), ([x, C,
|
|
2099
|
-
|
|
2104
|
+
X(S(I, D(t, i)), ([x, C, B]) => {
|
|
2105
|
+
B && rr() ? M(t, C - x) : g(-x);
|
|
2100
2106
|
}), X(
|
|
2101
2107
|
S(
|
|
2102
2108
|
at(gt(i, !1), t, R),
|
|
2103
|
-
W(([x, C,
|
|
2104
|
-
|
|
2109
|
+
W(([x, C, B]) => !x && !B && C !== 0),
|
|
2110
|
+
k(([x, C]) => C),
|
|
2105
2111
|
zt(1)
|
|
2106
2112
|
),
|
|
2107
2113
|
g
|
|
2108
|
-
),
|
|
2114
|
+
), z(
|
|
2109
2115
|
S(
|
|
2110
2116
|
m,
|
|
2111
|
-
|
|
2117
|
+
k((x) => ({ top: -x }))
|
|
2112
2118
|
),
|
|
2113
2119
|
n
|
|
2114
2120
|
);
|
|
@@ -2117,8 +2123,8 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2117
2123
|
if (a === null)
|
|
2118
2124
|
return;
|
|
2119
2125
|
const { offset: x } = a;
|
|
2120
|
-
a = null,
|
|
2121
|
-
|
|
2126
|
+
a = null, M(n, { top: x }), requestAnimationFrame(() => {
|
|
2127
|
+
M(t, 0), M(R, !1);
|
|
2122
2128
|
});
|
|
2123
2129
|
}
|
|
2124
2130
|
return X(e, (x) => {
|
|
@@ -2127,29 +2133,29 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2127
2133
|
S(
|
|
2128
2134
|
f,
|
|
2129
2135
|
D(h, v),
|
|
2130
|
-
|
|
2136
|
+
k(([x, { groupIndices: C, lastSize: B, sizeTree: u }, p]) => {
|
|
2131
2137
|
function b(U) {
|
|
2132
|
-
return U * (
|
|
2138
|
+
return U * (B + p);
|
|
2133
2139
|
}
|
|
2134
2140
|
if (C.length === 0)
|
|
2135
2141
|
return b(x);
|
|
2136
|
-
let
|
|
2142
|
+
let L = 0;
|
|
2137
2143
|
const F = ie(u, 0);
|
|
2138
|
-
let
|
|
2139
|
-
for (;
|
|
2140
|
-
|
|
2144
|
+
let O = 0, V = 0;
|
|
2145
|
+
for (; O < x; ) {
|
|
2146
|
+
O++, L += F;
|
|
2141
2147
|
let U = C.length === V + 1 ? 1 / 0 : C[V + 1] - C[V] - 1;
|
|
2142
|
-
|
|
2148
|
+
O + U > x && (L -= F, U = x - O + 1), O += U, L += b(U), V++;
|
|
2143
2149
|
}
|
|
2144
|
-
return
|
|
2150
|
+
return L;
|
|
2145
2151
|
})
|
|
2146
2152
|
),
|
|
2147
2153
|
(x) => {
|
|
2148
|
-
a = { acknowledgeable: lt(t) !== x, offset: x },
|
|
2154
|
+
a = { acknowledgeable: lt(t) !== x, offset: x }, M(t, x), requestAnimationFrame(T);
|
|
2149
2155
|
}
|
|
2150
2156
|
), { deviation: t };
|
|
2151
2157
|
},
|
|
2152
|
-
st(St, pe, Kt,
|
|
2158
|
+
st(St, pe, Kt, Lt, Gt, Ke)
|
|
2153
2159
|
), ir = Z(
|
|
2154
2160
|
([
|
|
2155
2161
|
t,
|
|
@@ -2179,7 +2185,7 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2179
2185
|
st(
|
|
2180
2186
|
Ze,
|
|
2181
2187
|
Qo,
|
|
2182
|
-
|
|
2188
|
+
At,
|
|
2183
2189
|
no,
|
|
2184
2190
|
Qn,
|
|
2185
2191
|
tr,
|
|
@@ -2213,18 +2219,18 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2213
2219
|
T,
|
|
2214
2220
|
x,
|
|
2215
2221
|
{ scrollToIndex: C },
|
|
2216
|
-
|
|
2222
|
+
B,
|
|
2217
2223
|
{ topItemCount: u },
|
|
2218
2224
|
{ groupCounts: p },
|
|
2219
2225
|
b
|
|
2220
2226
|
]) => {
|
|
2221
|
-
const { listState:
|
|
2222
|
-
return
|
|
2227
|
+
const { listState: L, minOverscanItemCount: F, topItemsIndexes: O, rangeChanged: V, ...U } = x;
|
|
2228
|
+
return z(V, b.scrollSeekRangeChanged), z(
|
|
2223
2229
|
S(
|
|
2224
2230
|
at(b.windowViewportRect, g.headerHeight, g.fixedHeaderHeight),
|
|
2225
2231
|
// Keep a measurement range active when a window-scrolling list starts below the viewport.
|
|
2226
2232
|
// One content pixel beyond the headers is enough to render the probe item and estimate the full list height.
|
|
2227
|
-
|
|
2233
|
+
k(([q, $, j]) => Math.max($ + j + 1, q.visibleHeight))
|
|
2228
2234
|
),
|
|
2229
2235
|
g.viewportHeight
|
|
2230
2236
|
), {
|
|
@@ -2241,13 +2247,13 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2241
2247
|
scrolledToInitialItem: I,
|
|
2242
2248
|
sizeRanges: d,
|
|
2243
2249
|
topItemCount: u,
|
|
2244
|
-
topItemsIndexes:
|
|
2250
|
+
topItemsIndexes: O,
|
|
2245
2251
|
// input
|
|
2246
2252
|
totalCount: m,
|
|
2247
2253
|
...T,
|
|
2248
2254
|
groupIndices: i,
|
|
2249
2255
|
itemSize: c,
|
|
2250
|
-
listState:
|
|
2256
|
+
listState: L,
|
|
2251
2257
|
minOverscanItemCount: F,
|
|
2252
2258
|
scrollToIndex: C,
|
|
2253
2259
|
// output
|
|
@@ -2264,7 +2270,7 @@ const rr = oo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2264
2270
|
};
|
|
2265
2271
|
},
|
|
2266
2272
|
st(
|
|
2267
|
-
|
|
2273
|
+
Lt,
|
|
2268
2274
|
me,
|
|
2269
2275
|
St,
|
|
2270
2276
|
er,
|
|
@@ -2291,47 +2297,47 @@ const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
|
|
|
2291
2297
|
function Je(t, e, n) {
|
|
2292
2298
|
const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
|
|
2293
2299
|
function c(g, a) {
|
|
2294
|
-
g.propsReady !== void 0 &&
|
|
2300
|
+
g.propsReady !== void 0 && M(g.propsReady, !1);
|
|
2295
2301
|
for (const T of o) {
|
|
2296
2302
|
const x = g[e.required[T]];
|
|
2297
|
-
|
|
2303
|
+
M(x, a[T]);
|
|
2298
2304
|
}
|
|
2299
2305
|
for (const T of r)
|
|
2300
2306
|
if (T in a) {
|
|
2301
2307
|
const x = g[e.optional[T]];
|
|
2302
|
-
|
|
2308
|
+
M(x, a[T]);
|
|
2303
2309
|
}
|
|
2304
|
-
g.propsReady !== void 0 &&
|
|
2310
|
+
g.propsReady !== void 0 && M(g.propsReady, !0);
|
|
2305
2311
|
}
|
|
2306
2312
|
function d(g) {
|
|
2307
2313
|
return s.reduce((a, T) => (a[T] = (x) => {
|
|
2308
2314
|
const C = g[e.methods[T]];
|
|
2309
|
-
|
|
2315
|
+
M(C, x);
|
|
2310
2316
|
}, a), {});
|
|
2311
2317
|
}
|
|
2312
2318
|
function f(g) {
|
|
2313
2319
|
return i.reduce((a, T) => (a[T] = Co(g[e.events[T]]), a), {});
|
|
2314
2320
|
}
|
|
2315
2321
|
const v = E.forwardRef(function(a, T) {
|
|
2316
|
-
const { children: x, ...C } = a, [
|
|
2322
|
+
const { children: x, ...C } = a, [B] = E.useState(() => ye(bo(t), (b) => {
|
|
2317
2323
|
c(b, C);
|
|
2318
|
-
})), [u] = E.useState(pn(f,
|
|
2324
|
+
})), [u] = E.useState(pn(f, B));
|
|
2319
2325
|
Ie(() => {
|
|
2320
2326
|
for (const b of i)
|
|
2321
2327
|
b in C && X(u[b], C[b]);
|
|
2322
2328
|
return () => {
|
|
2323
2329
|
Object.values(u).map(De);
|
|
2324
2330
|
};
|
|
2325
|
-
}, [C, u,
|
|
2326
|
-
c(
|
|
2327
|
-
}), E.useImperativeHandle(T, mn(d(
|
|
2331
|
+
}, [C, u, B]), Ie(() => {
|
|
2332
|
+
c(B, C);
|
|
2333
|
+
}), E.useImperativeHandle(T, mn(d(B)));
|
|
2328
2334
|
const p = n;
|
|
2329
|
-
return /* @__PURE__ */ G(l.Provider, { value:
|
|
2335
|
+
return /* @__PURE__ */ G(l.Provider, { value: B, children: n === void 0 ? x : /* @__PURE__ */ G(p, { ...lr([...o, ...r, ...i], C), children: x }) });
|
|
2330
2336
|
}), m = (g) => {
|
|
2331
2337
|
const a = E.useContext(l);
|
|
2332
2338
|
return E.useCallback(
|
|
2333
2339
|
(T) => {
|
|
2334
|
-
|
|
2340
|
+
M(a[g], T);
|
|
2335
2341
|
},
|
|
2336
2342
|
[a, g]
|
|
2337
2343
|
);
|
|
@@ -2348,8 +2354,8 @@ function Je(t, e, n) {
|
|
|
2348
2354
|
}, y = (g) => {
|
|
2349
2355
|
const T = E.useContext(l)[g], [x, C] = E.useState(pn(lt, T));
|
|
2350
2356
|
return Ie(
|
|
2351
|
-
() => X(T, (
|
|
2352
|
-
|
|
2357
|
+
() => X(T, (B) => {
|
|
2358
|
+
B !== x && C(mn(B));
|
|
2353
2359
|
}),
|
|
2354
2360
|
[T, x]
|
|
2355
2361
|
), x;
|
|
@@ -2364,11 +2370,11 @@ function Je(t, e, n) {
|
|
|
2364
2370
|
usePublisher: m
|
|
2365
2371
|
};
|
|
2366
2372
|
}
|
|
2367
|
-
const He = E.createContext(void 0), so = E.createContext(void 0),
|
|
2373
|
+
const He = E.createContext(void 0), so = E.createContext(void 0), Le = "-webkit-sticky", Rn = "sticky", Qe = oo(() => {
|
|
2368
2374
|
if (typeof document > "u")
|
|
2369
2375
|
return Rn;
|
|
2370
2376
|
const t = document.createElement("div");
|
|
2371
|
-
return t.style.position =
|
|
2377
|
+
return t.style.position = Le, t.style.position === Le ? Le : Rn;
|
|
2372
2378
|
});
|
|
2373
2379
|
function ze(t) {
|
|
2374
2380
|
return "self" in t;
|
|
@@ -2447,7 +2453,7 @@ const ur = /* @__PURE__ */ Z(() => {
|
|
|
2447
2453
|
const t = w((l) => `Item ${l}`), e = w((l) => `Group ${l}`), n = w({}), o = w(tn), r = w("div"), s = w(Jt), i = (l, c = null) => gt(
|
|
2448
2454
|
S(
|
|
2449
2455
|
n,
|
|
2450
|
-
|
|
2456
|
+
k((d) => d[l]),
|
|
2451
2457
|
ot()
|
|
2452
2458
|
),
|
|
2453
2459
|
c
|
|
@@ -2473,7 +2479,7 @@ const ur = /* @__PURE__ */ Z(() => {
|
|
|
2473
2479
|
([t, e]) => ({ ...t, ...e }),
|
|
2474
2480
|
st(ro, ur)
|
|
2475
2481
|
), dr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), fr = { overflowAnchor: "none", position: Qe(), zIndex: 1 }, lo = { overflowAnchor: "none" }, mr = { ...lo, display: "inline-block", height: "100%" }, Hn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2476
|
-
const n =
|
|
2482
|
+
const n = A("listState"), o = Tt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), f = A("context"), v = A("groupContent"), m = A("trackItemSizes"), h = A("itemSize"), y = A("log"), R = Tt("gap"), I = A("horizontalDirection"), { callbackRef: g } = An(
|
|
2477
2483
|
o,
|
|
2478
2484
|
h,
|
|
2479
2485
|
m,
|
|
@@ -2482,7 +2488,7 @@ const ur = /* @__PURE__ */ Z(() => {
|
|
|
2482
2488
|
R,
|
|
2483
2489
|
s,
|
|
2484
2490
|
I,
|
|
2485
|
-
|
|
2491
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2486
2492
|
), [a, T] = E.useState(0);
|
|
2487
2493
|
rn("deviation", ($) => {
|
|
2488
2494
|
a !== $ && T($);
|
|
@@ -2491,7 +2497,7 @@ const ur = /* @__PURE__ */ Z(() => {
|
|
|
2491
2497
|
be(() => {
|
|
2492
2498
|
x(a);
|
|
2493
2499
|
}, [a, x]);
|
|
2494
|
-
const C =
|
|
2500
|
+
const C = A("EmptyPlaceholder"), B = A("ScrollSeekPlaceholder") ?? dr, u = A("ListComponent"), p = A("ItemComponent"), b = A("GroupComponent"), L = A("computeItemKey"), F = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), U = A("initialItemFinalLocationReached"), q = e ? {} : {
|
|
2495
2501
|
boxSizing: "border-box",
|
|
2496
2502
|
...I ? {
|
|
2497
2503
|
display: "inline-block",
|
|
@@ -2515,11 +2521,11 @@ const ur = /* @__PURE__ */ Z(() => {
|
|
|
2515
2521
|
ref: g,
|
|
2516
2522
|
style: q,
|
|
2517
2523
|
children: (e ? n.topItems : n.items).map(($) => {
|
|
2518
|
-
const j = $.originalIndex, J =
|
|
2524
|
+
const j = $.originalIndex, J = L(j + n.firstItemIndex, $.data, f);
|
|
2519
2525
|
return F ? /* @__PURE__ */ Dt(
|
|
2520
|
-
|
|
2526
|
+
B,
|
|
2521
2527
|
{
|
|
2522
|
-
...rt(
|
|
2528
|
+
...rt(B, f),
|
|
2523
2529
|
height: $.size,
|
|
2524
2530
|
index: $.index,
|
|
2525
2531
|
key: J,
|
|
@@ -2549,7 +2555,7 @@ const ur = /* @__PURE__ */ Z(() => {
|
|
|
2549
2555
|
key: J,
|
|
2550
2556
|
style: I ? mr : lo
|
|
2551
2557
|
},
|
|
2552
|
-
|
|
2558
|
+
O ? d($.index, $.groupIndex, $.data, f) : d($.index, $.data, f)
|
|
2553
2559
|
);
|
|
2554
2560
|
})
|
|
2555
2561
|
}
|
|
@@ -2588,7 +2594,7 @@ function co(t, e) {
|
|
|
2588
2594
|
return { item: typeof t == "string" ? void 0 : e };
|
|
2589
2595
|
}
|
|
2590
2596
|
const Ir = /* @__PURE__ */ E.memo(function() {
|
|
2591
|
-
const e =
|
|
2597
|
+
const e = A("HeaderComponent"), n = Tt("headerHeight"), o = A("HeaderFooterTag"), r = Ot(
|
|
2592
2598
|
E.useMemo(
|
|
2593
2599
|
() => (i) => {
|
|
2594
2600
|
n(Ht(i, "height"));
|
|
@@ -2596,11 +2602,11 @@ const Ir = /* @__PURE__ */ E.memo(function() {
|
|
|
2596
2602
|
[n]
|
|
2597
2603
|
),
|
|
2598
2604
|
!0,
|
|
2599
|
-
|
|
2600
|
-
), s =
|
|
2605
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2606
|
+
), s = A("context");
|
|
2601
2607
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
|
|
2602
2608
|
}), Sr = /* @__PURE__ */ E.memo(function() {
|
|
2603
|
-
const e =
|
|
2609
|
+
const e = A("FooterComponent"), n = Tt("footerHeight"), o = A("HeaderFooterTag"), r = Ot(
|
|
2604
2610
|
E.useMemo(
|
|
2605
2611
|
() => (i) => {
|
|
2606
2612
|
n(Ht(i, "height"));
|
|
@@ -2608,8 +2614,8 @@ const Ir = /* @__PURE__ */ E.memo(function() {
|
|
|
2608
2614
|
[n]
|
|
2609
2615
|
),
|
|
2610
2616
|
!0,
|
|
2611
|
-
|
|
2612
|
-
), s =
|
|
2617
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2618
|
+
), s = A("context");
|
|
2613
2619
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
|
|
2614
2620
|
});
|
|
2615
2621
|
function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
@@ -2662,27 +2668,27 @@ function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2662
2668
|
});
|
|
2663
2669
|
}
|
|
2664
2670
|
const xr = ({ children: t }) => {
|
|
2665
|
-
const e = E.useContext(He), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r =
|
|
2671
|
+
const e = E.useContext(He), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
|
|
2666
2672
|
() => re(n, (c) => Ht(c, s ? "width" : "height")),
|
|
2667
2673
|
[n, s]
|
|
2668
|
-
), l =
|
|
2674
|
+
), l = Ot(i, !0, A("skipAnimationFrameInResizeObserver"));
|
|
2669
2675
|
return E.useEffect(() => {
|
|
2670
2676
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2671
2677
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: Ee(r), children: t });
|
|
2672
2678
|
}, vr = ({ children: t }) => {
|
|
2673
|
-
const e = E.useContext(He), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r =
|
|
2679
|
+
const e = E.useContext(He), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = Ue(
|
|
2674
2680
|
n,
|
|
2675
2681
|
r,
|
|
2676
|
-
|
|
2677
|
-
), c =
|
|
2682
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2683
|
+
), c = A("alignToBottom");
|
|
2678
2684
|
return E.useEffect(() => {
|
|
2679
2685
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2680
2686
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: en(c, s, i), children: t });
|
|
2681
2687
|
}, Tr = ({ children: t }) => {
|
|
2682
|
-
const e =
|
|
2688
|
+
const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...gr, marginTop: `${n}px` }, r = A("context");
|
|
2683
2689
|
return /* @__PURE__ */ G(e, { style: o, ...rt(e, r), children: t });
|
|
2684
2690
|
}, Cr = /* @__PURE__ */ E.memo(function(e) {
|
|
2685
|
-
const n =
|
|
2691
|
+
const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
|
|
2686
2692
|
return /* @__PURE__ */ $t(r || n ? yr : wr, { ...e, context: s, children: [
|
|
2687
2693
|
o && /* @__PURE__ */ G(Tr, { children: /* @__PURE__ */ G(Hn, { showTopList: !0 }) }),
|
|
2688
2694
|
/* @__PURE__ */ $t(r || n ? vr : xr, { children: [
|
|
@@ -2694,7 +2700,7 @@ const xr = ({ children: t }) => {
|
|
|
2694
2700
|
}), {
|
|
2695
2701
|
Component: uo,
|
|
2696
2702
|
useEmitter: rn,
|
|
2697
|
-
useEmitterValue:
|
|
2703
|
+
useEmitterValue: A,
|
|
2698
2704
|
usePublisher: Tt
|
|
2699
2705
|
} = /* @__PURE__ */ Je(
|
|
2700
2706
|
ar,
|
|
@@ -2758,7 +2764,7 @@ const xr = ({ children: t }) => {
|
|
|
2758
2764
|
}
|
|
2759
2765
|
},
|
|
2760
2766
|
Cr
|
|
2761
|
-
), wr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue:
|
|
2767
|
+
), wr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: A, usePublisher: Tt }), yr = /* @__PURE__ */ on({ useEmitter: rn, useEmitterValue: A, usePublisher: Tt }), es = uo, ns = uo, br = /* @__PURE__ */ Z(() => {
|
|
2762
2768
|
const t = w((d) => /* @__PURE__ */ $t("td", { children: [
|
|
2763
2769
|
"Item $",
|
|
2764
2770
|
d
|
|
@@ -2768,7 +2774,7 @@ const xr = ({ children: t }) => {
|
|
|
2768
2774
|
] })), o = w(null), r = w(null), s = w({}), i = w(tn), l = w(Jt), c = (d, f = null) => gt(
|
|
2769
2775
|
S(
|
|
2770
2776
|
s,
|
|
2771
|
-
|
|
2777
|
+
k((v) => v[d]),
|
|
2772
2778
|
ot()
|
|
2773
2779
|
),
|
|
2774
2780
|
f
|
|
@@ -2796,7 +2802,7 @@ const xr = ({ children: t }) => {
|
|
|
2796
2802
|
}), Rr = /* @__PURE__ */ Z(
|
|
2797
2803
|
([t, e]) => ({ ...t, ...e }),
|
|
2798
2804
|
st(ro, br)
|
|
2799
|
-
), Hr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Er = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }),
|
|
2805
|
+
), Hr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Er = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, En = { position: Qe(), zIndex: 2, overflowAnchor: "none" }, kn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2800
2806
|
const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), f = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Hr, m = _("GroupComponent"), h = _("TableRowComponent"), y = (e ? n.topItems : []).reduce((I, g, a) => (a === 0 ? I.push(g.size) : I.push(I[a - 1] + g.size), I), []);
|
|
2801
2807
|
return (e ? n.topItems : n.items).map((I) => {
|
|
2802
2808
|
const g = I.originalIndex, a = o(g + r, I.data, s), T = e ? g === 0 ? 0 : y[g - 1] : 0;
|
|
@@ -2833,13 +2839,13 @@ const xr = ({ children: t }) => {
|
|
|
2833
2839
|
"data-known-size": I.size,
|
|
2834
2840
|
"data-item-group-index": I.groupIndex,
|
|
2835
2841
|
key: a,
|
|
2836
|
-
style: e ? { ...En, top: l + T } :
|
|
2842
|
+
style: e ? { ...En, top: l + T } : kr
|
|
2837
2843
|
},
|
|
2838
2844
|
c ? d(I.index, I.groupIndex, I.data, s) : d(I.index, I.data, s)
|
|
2839
2845
|
);
|
|
2840
2846
|
});
|
|
2841
|
-
}),
|
|
2842
|
-
const e = _("listState"), n = _("topItemsIndexes").length > 0, o = wt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = wt("windowScrollContainerState"), l = wt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), f = _("itemSize"), v = _("log"), { callbackRef: m, ref: h } =
|
|
2847
|
+
}), Br = /* @__PURE__ */ E.memo(function() {
|
|
2848
|
+
const e = _("listState"), n = _("topItemsIndexes").length > 0, o = wt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = wt("windowScrollContainerState"), l = wt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), f = _("itemSize"), v = _("log"), { callbackRef: m, ref: h } = An(
|
|
2843
2849
|
o,
|
|
2844
2850
|
f,
|
|
2845
2851
|
d,
|
|
@@ -2850,25 +2856,25 @@ const xr = ({ children: t }) => {
|
|
|
2850
2856
|
!1,
|
|
2851
2857
|
_("skipAnimationFrameInResizeObserver")
|
|
2852
2858
|
), [y, R] = E.useState(0);
|
|
2853
|
-
sn("deviation", (
|
|
2854
|
-
y !==
|
|
2859
|
+
sn("deviation", (O) => {
|
|
2860
|
+
y !== O && (h.current.style.marginTop = `${O}px`, R(O));
|
|
2855
2861
|
});
|
|
2856
2862
|
const I = wt("deviationCommitted");
|
|
2857
2863
|
be(() => {
|
|
2858
2864
|
I(y);
|
|
2859
2865
|
}, [y, I]);
|
|
2860
|
-
const g = _("EmptyPlaceholder"), a = _("FillerRow") ?? Er, T = _("TableBodyComponent"), x = _("paddingTopAddition"), C = _("statefulTotalCount"),
|
|
2866
|
+
const g = _("EmptyPlaceholder"), a = _("FillerRow") ?? Er, T = _("TableBodyComponent"), x = _("paddingTopAddition"), C = _("statefulTotalCount"), B = _("context");
|
|
2861
2867
|
if (C === 0 && g !== null && g !== void 0)
|
|
2862
|
-
return /* @__PURE__ */ G(g, { ...rt(g,
|
|
2863
|
-
const u = (n ? e.topItems : []).reduce((
|
|
2864
|
-
return /* @__PURE__ */ $t(T, { "data-testid": "virtuoso-item-list", ref: m, ...rt(T,
|
|
2865
|
-
|
|
2866
|
-
n && /* @__PURE__ */ G(
|
|
2867
|
-
/* @__PURE__ */ G(
|
|
2868
|
+
return /* @__PURE__ */ G(g, { ...rt(g, B) });
|
|
2869
|
+
const u = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), p = e.offsetTop + x + y - u, b = e.offsetBottom, L = p > 0 ? /* @__PURE__ */ G(a, { context: B, height: p }, "padding-top") : null, F = b > 0 ? /* @__PURE__ */ G(a, { context: B, height: b }, "padding-bottom") : null;
|
|
2870
|
+
return /* @__PURE__ */ $t(T, { "data-testid": "virtuoso-item-list", ref: m, ...rt(T, B), children: [
|
|
2871
|
+
L,
|
|
2872
|
+
n && /* @__PURE__ */ G(kn, { showTopList: !0 }),
|
|
2873
|
+
/* @__PURE__ */ G(kn, {}),
|
|
2868
2874
|
F
|
|
2869
2875
|
] });
|
|
2870
|
-
}),
|
|
2871
|
-
const e = E.useContext(He), n = wt("viewportHeight"), o = wt("fixedItemHeight"), r =
|
|
2876
|
+
}), Or = ({ children: t }) => {
|
|
2877
|
+
const e = E.useContext(He), n = wt("viewportHeight"), o = wt("fixedItemHeight"), r = Ot(
|
|
2872
2878
|
E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
|
|
2873
2879
|
!0,
|
|
2874
2880
|
_("skipAnimationFrameInResizeObserver")
|
|
@@ -2876,7 +2882,7 @@ const xr = ({ children: t }) => {
|
|
|
2876
2882
|
return E.useEffect(() => {
|
|
2877
2883
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2878
2884
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: Ee(!1), children: t });
|
|
2879
|
-
},
|
|
2885
|
+
}, Lr = ({ children: t }) => {
|
|
2880
2886
|
const e = E.useContext(He), n = wt("windowViewportRect"), o = wt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = Ue(
|
|
2881
2887
|
n,
|
|
2882
2888
|
r,
|
|
@@ -2886,15 +2892,15 @@ const xr = ({ children: t }) => {
|
|
|
2886
2892
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2887
2893
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: en(!1, s), children: t });
|
|
2888
2894
|
}, zr = /* @__PURE__ */ E.memo(function(e) {
|
|
2889
|
-
const n = _("useWindowScroll"), o = _("customScrollParent"), r = wt("fixedHeaderHeight"), s = wt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d =
|
|
2895
|
+
const n = _("useWindowScroll"), o = _("customScrollParent"), r = wt("fixedHeaderHeight"), s = wt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = Ot(
|
|
2890
2896
|
E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
|
|
2891
2897
|
!0,
|
|
2892
2898
|
_("skipAnimationFrameInResizeObserver")
|
|
2893
|
-
), f =
|
|
2899
|
+
), f = Ot(
|
|
2894
2900
|
E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
|
|
2895
2901
|
!0,
|
|
2896
2902
|
_("skipAnimationFrameInResizeObserver")
|
|
2897
|
-
), v = o || n ? Vr : Fr, m = o || n ?
|
|
2903
|
+
), v = o || n ? Vr : Fr, m = o || n ? Lr : Or, h = _("TableComponent"), y = _("TableHeadComponent"), R = _("TableFooterComponent"), I = i ? /* @__PURE__ */ G(
|
|
2898
2904
|
y,
|
|
2899
2905
|
{
|
|
2900
2906
|
ref: d,
|
|
@@ -2915,7 +2921,7 @@ const xr = ({ children: t }) => {
|
|
|
2915
2921
|
) : null;
|
|
2916
2922
|
return /* @__PURE__ */ G(v, { ...e, ...rt(v, c), children: /* @__PURE__ */ G(m, { children: /* @__PURE__ */ $t(h, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...rt(h, c), children: [
|
|
2917
2923
|
I,
|
|
2918
|
-
/* @__PURE__ */ G(
|
|
2924
|
+
/* @__PURE__ */ G(Br, {}, "TableBody"),
|
|
2919
2925
|
g
|
|
2920
2926
|
] }) }) });
|
|
2921
2927
|
}), {
|
|
@@ -2959,7 +2965,8 @@ const xr = ({ children: t }) => {
|
|
|
2959
2965
|
useWindowScroll: "useWindowScroll",
|
|
2960
2966
|
customScrollParent: "customScrollParent",
|
|
2961
2967
|
scrollerRef: "scrollerRef",
|
|
2962
|
-
logLevel: "logLevel"
|
|
2968
|
+
logLevel: "logLevel",
|
|
2969
|
+
skipAnimationFrameInResizeObserver: "skipAnimationFrameInResizeObserver"
|
|
2963
2970
|
},
|
|
2964
2971
|
methods: {
|
|
2965
2972
|
scrollToIndex: "scrollToIndex",
|
|
@@ -2981,7 +2988,7 @@ const xr = ({ children: t }) => {
|
|
|
2981
2988
|
}
|
|
2982
2989
|
},
|
|
2983
2990
|
zr
|
|
2984
|
-
), Fr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), Vr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), os = ao, rs = ao,
|
|
2991
|
+
), Fr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), Vr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: wt }), os = ao, rs = ao, Bn = {
|
|
2985
2992
|
bottom: 0,
|
|
2986
2993
|
itemHeight: 0,
|
|
2987
2994
|
items: [],
|
|
@@ -2997,7 +3004,7 @@ const xr = ({ children: t }) => {
|
|
|
2997
3004
|
offsetBottom: 0,
|
|
2998
3005
|
offsetTop: 0,
|
|
2999
3006
|
top: 0
|
|
3000
|
-
}, { ceil:
|
|
3007
|
+
}, { ceil: On, floor: Ce, max: oe, min: Fe, round: Ln } = Math;
|
|
3001
3008
|
function zn(t, e, n) {
|
|
3002
3009
|
return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
|
|
3003
3010
|
}
|
|
@@ -3013,7 +3020,7 @@ function Se(t, e) {
|
|
|
3013
3020
|
function Gr(t, e) {
|
|
3014
3021
|
return t !== void 0 && t.column === e.column && t.row === e.row;
|
|
3015
3022
|
}
|
|
3016
|
-
const
|
|
3023
|
+
const Ar = /* @__PURE__ */ Z(
|
|
3017
3024
|
([
|
|
3018
3025
|
{ increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
|
|
3019
3026
|
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: f, viewportHeight: v },
|
|
@@ -3023,37 +3030,37 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3023
3030
|
{ customScrollParent: I, useWindowScroll: g, windowScrollContainerState: a, windowScrollTo: T, windowViewportRect: x },
|
|
3024
3031
|
C
|
|
3025
3032
|
]) => {
|
|
3026
|
-
const
|
|
3033
|
+
const B = w(0), u = w(0), p = w(Bn), b = w({ height: 0, width: 0 }), L = w({ height: 0, width: 0 }), F = K(), O = K(), V = w(0), U = w(null), q = w({ column: 0, row: 0 }), $ = K(), j = K(), J = w(!1), dt = w(0), pt = w(!0), It = w(!1), Ft = w(!1);
|
|
3027
3034
|
X(
|
|
3028
3035
|
S(
|
|
3029
3036
|
y,
|
|
3030
3037
|
D(dt),
|
|
3031
|
-
W(([H, N]) => !
|
|
3038
|
+
W(([H, N]) => !Me(N))
|
|
3032
3039
|
),
|
|
3033
3040
|
() => {
|
|
3034
|
-
|
|
3041
|
+
M(pt, !1);
|
|
3035
3042
|
}
|
|
3036
3043
|
), X(
|
|
3037
3044
|
S(
|
|
3038
|
-
at(y, pt,
|
|
3045
|
+
at(y, pt, L, b, dt, It),
|
|
3039
3046
|
W(([H, N, Y, it, , et]) => H && !N && Y.height !== 0 && it.height !== 0 && !et)
|
|
3040
3047
|
),
|
|
3041
3048
|
([, , , , H]) => {
|
|
3042
3049
|
if (H === void 0) {
|
|
3043
|
-
|
|
3050
|
+
M(pt, !0);
|
|
3044
3051
|
return;
|
|
3045
3052
|
}
|
|
3046
|
-
|
|
3047
|
-
|
|
3053
|
+
M(It, !0), qe(1, () => {
|
|
3054
|
+
M(F, H);
|
|
3048
3055
|
}), bt(S(d), () => {
|
|
3049
|
-
|
|
3056
|
+
M(e, [0, 0]), M(pt, !0);
|
|
3050
3057
|
});
|
|
3051
3058
|
}
|
|
3052
|
-
),
|
|
3059
|
+
), z(
|
|
3053
3060
|
S(
|
|
3054
3061
|
j,
|
|
3055
3062
|
W((H) => H != null && H.scrollTop > 0),
|
|
3056
|
-
|
|
3063
|
+
kt(0)
|
|
3057
3064
|
),
|
|
3058
3065
|
u
|
|
3059
3066
|
), X(
|
|
@@ -3063,25 +3070,25 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3063
3070
|
W(([, H]) => H != null)
|
|
3064
3071
|
),
|
|
3065
3072
|
([, H]) => {
|
|
3066
|
-
H && (
|
|
3067
|
-
|
|
3068
|
-
}),
|
|
3073
|
+
H && (M(b, H.viewport), M(L, H.item), M(q, H.gap), H.scrollTop > 0 && (M(J, !0), bt(S(d, Ut(1)), (N) => {
|
|
3074
|
+
M(J, !1);
|
|
3075
|
+
}), M(c, { top: H.scrollTop })));
|
|
3069
3076
|
}
|
|
3070
|
-
),
|
|
3077
|
+
), z(
|
|
3071
3078
|
S(
|
|
3072
3079
|
b,
|
|
3073
|
-
|
|
3080
|
+
k(({ height: H }) => H)
|
|
3074
3081
|
),
|
|
3075
3082
|
v
|
|
3076
|
-
),
|
|
3083
|
+
), z(
|
|
3077
3084
|
S(
|
|
3078
3085
|
at(
|
|
3079
3086
|
P(b, Se),
|
|
3080
|
-
P(
|
|
3087
|
+
P(L, Se),
|
|
3081
3088
|
P(q, (H, N) => H !== void 0 && H.column === N.column && H.row === N.row),
|
|
3082
3089
|
P(d)
|
|
3083
3090
|
),
|
|
3084
|
-
|
|
3091
|
+
k(([H, N, Y, it]) => ({
|
|
3085
3092
|
gap: Y,
|
|
3086
3093
|
item: N,
|
|
3087
3094
|
scrollTop: it,
|
|
@@ -3089,13 +3096,13 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3089
3096
|
}))
|
|
3090
3097
|
),
|
|
3091
3098
|
$
|
|
3092
|
-
),
|
|
3099
|
+
), z(
|
|
3093
3100
|
S(
|
|
3094
3101
|
at(
|
|
3095
|
-
P(
|
|
3102
|
+
P(B),
|
|
3096
3103
|
o,
|
|
3097
3104
|
P(q, Gr),
|
|
3098
|
-
P(
|
|
3105
|
+
P(L, Se),
|
|
3099
3106
|
P(b, Se),
|
|
3100
3107
|
P(U),
|
|
3101
3108
|
P(u),
|
|
@@ -3104,7 +3111,7 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3104
3111
|
P(dt)
|
|
3105
3112
|
),
|
|
3106
3113
|
W(([, , , , , , , H]) => !H),
|
|
3107
|
-
|
|
3114
|
+
k(
|
|
3108
3115
|
([
|
|
3109
3116
|
H,
|
|
3110
3117
|
[N, Y],
|
|
@@ -3117,34 +3124,34 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3117
3124
|
ut,
|
|
3118
3125
|
Vt
|
|
3119
3126
|
]) => {
|
|
3120
|
-
const { column: Pt, row: ee } = it, { height: he, width:
|
|
3127
|
+
const { column: Pt, row: ee } = it, { height: he, width: ke } = et, { width: ln } = Q;
|
|
3121
3128
|
if (xt === 0 && (H === 0 || ln === 0))
|
|
3122
|
-
return
|
|
3123
|
-
if (
|
|
3129
|
+
return Bn;
|
|
3130
|
+
if (ke === 0) {
|
|
3124
3131
|
const fn = Ye(Vt, H), ho = fn + Math.max(xt - 1, 0);
|
|
3125
3132
|
return Wr(zn(fn, ho, ct));
|
|
3126
3133
|
}
|
|
3127
|
-
const ge = fo(ln,
|
|
3128
|
-
let qt,
|
|
3129
|
-
ut ? N === 0 && Y === 0 && xt > 0 ? (qt = 0,
|
|
3130
|
-
const cn = zn(qt,
|
|
3131
|
-
return { bottom: un, itemHeight: he, items: cn, itemWidth:
|
|
3134
|
+
const ge = fo(ln, ke, Pt);
|
|
3135
|
+
let qt, Mt;
|
|
3136
|
+
ut ? N === 0 && Y === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((N + ee) / (he + ee)), Mt = ge * On((Y + ee) / (he + ee)) - 1, Mt = Fe(H - 1, oe(Mt, ge - 1)), qt = Fe(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
|
|
3137
|
+
const cn = zn(qt, Mt, ct), { bottom: un, top: an } = Fn(Q, it, et, cn), dn = On(H / ge), po = dn * he + (dn - 1) * ee - un;
|
|
3138
|
+
return { bottom: un, itemHeight: he, items: cn, itemWidth: ke, offsetBottom: po, offsetTop: an, top: an };
|
|
3132
3139
|
}
|
|
3133
3140
|
)
|
|
3134
3141
|
),
|
|
3135
3142
|
p
|
|
3136
|
-
),
|
|
3143
|
+
), z(
|
|
3137
3144
|
S(
|
|
3138
3145
|
U,
|
|
3139
3146
|
W((H) => H !== null),
|
|
3140
|
-
|
|
3147
|
+
k((H) => H.length)
|
|
3141
3148
|
),
|
|
3142
|
-
|
|
3143
|
-
),
|
|
3149
|
+
B
|
|
3150
|
+
), z(
|
|
3144
3151
|
S(
|
|
3145
|
-
at(b,
|
|
3152
|
+
at(b, L, p, q),
|
|
3146
3153
|
W(([H, N, { items: Y }]) => Y.length > 0 && N.height !== 0 && H.height !== 0),
|
|
3147
|
-
|
|
3154
|
+
k(([H, N, { items: Y }, it]) => {
|
|
3148
3155
|
const { bottom: et, top: Q } = Fn(H, it, N, Y);
|
|
3149
3156
|
return [Q, et];
|
|
3150
3157
|
}),
|
|
@@ -3153,31 +3160,31 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3153
3160
|
e
|
|
3154
3161
|
);
|
|
3155
3162
|
const ht = w(!1);
|
|
3156
|
-
|
|
3163
|
+
z(
|
|
3157
3164
|
S(
|
|
3158
3165
|
d,
|
|
3159
3166
|
D(ht),
|
|
3160
|
-
|
|
3167
|
+
k(([H, N]) => N || H !== 0)
|
|
3161
3168
|
),
|
|
3162
3169
|
ht
|
|
3163
3170
|
);
|
|
3164
3171
|
const jt = Ct(
|
|
3165
3172
|
S(
|
|
3166
|
-
at(p,
|
|
3173
|
+
at(p, B),
|
|
3167
3174
|
W(([{ items: H }]) => H.length > 0),
|
|
3168
3175
|
D(ht),
|
|
3169
3176
|
W(([[H, N], Y]) => {
|
|
3170
3177
|
const et = H.items[H.items.length - 1].index === N - 1;
|
|
3171
3178
|
return (Y || H.bottom > 0 && H.itemHeight > 0 && H.offsetBottom === 0 && H.items.length === N) && et;
|
|
3172
3179
|
}),
|
|
3173
|
-
|
|
3180
|
+
k(([[, H]]) => H - 1),
|
|
3174
3181
|
ot()
|
|
3175
3182
|
)
|
|
3176
3183
|
), Qt = Ct(
|
|
3177
3184
|
S(
|
|
3178
3185
|
P(p),
|
|
3179
3186
|
W(({ items: H }) => H.length > 0 && H[0].index === 0),
|
|
3180
|
-
|
|
3187
|
+
kt(0),
|
|
3181
3188
|
ot()
|
|
3182
3189
|
)
|
|
3183
3190
|
), Et = Ct(
|
|
@@ -3185,7 +3192,7 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3185
3192
|
P(p),
|
|
3186
3193
|
D(J),
|
|
3187
3194
|
W(([{ items: H }, N]) => H.length > 0 && !N),
|
|
3188
|
-
|
|
3195
|
+
k(([{ items: H }]) => ({
|
|
3189
3196
|
endIndex: H[H.length - 1].index,
|
|
3190
3197
|
startIndex: H[0].index
|
|
3191
3198
|
})),
|
|
@@ -3193,16 +3200,16 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3193
3200
|
zt(0)
|
|
3194
3201
|
)
|
|
3195
3202
|
);
|
|
3196
|
-
|
|
3203
|
+
z(Et, h.scrollSeekRangeChanged), z(
|
|
3197
3204
|
S(
|
|
3198
3205
|
F,
|
|
3199
|
-
D(b,
|
|
3200
|
-
|
|
3206
|
+
D(b, L, B, q),
|
|
3207
|
+
k(([H, N, Y, it, et]) => {
|
|
3201
3208
|
const Q = Zn(H), { align: ct, behavior: xt, offset: ut } = Q;
|
|
3202
3209
|
let Vt = Q.index;
|
|
3203
3210
|
Vt === "LAST" && (Vt = it - 1), Vt = oe(0, Vt, Fe(it - 1, Vt));
|
|
3204
3211
|
let Pt = _e(N, et, Y, Vt);
|
|
3205
|
-
return ct === "end" ? Pt =
|
|
3212
|
+
return ct === "end" ? Pt = Ln(Pt - N.height + Y.height) : ct === "center" && (Pt = Ln(Pt - N.height / 2 + Y.height / 2)), ut !== void 0 && ut !== 0 && (Pt += ut), { behavior: xt, top: Pt };
|
|
3206
3213
|
})
|
|
3207
3214
|
),
|
|
3208
3215
|
c
|
|
@@ -3210,14 +3217,14 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3210
3217
|
const te = gt(
|
|
3211
3218
|
S(
|
|
3212
3219
|
p,
|
|
3213
|
-
|
|
3220
|
+
k((H) => H.offsetBottom + H.bottom)
|
|
3214
3221
|
),
|
|
3215
3222
|
0
|
|
3216
3223
|
);
|
|
3217
|
-
return
|
|
3224
|
+
return z(
|
|
3218
3225
|
S(
|
|
3219
3226
|
x,
|
|
3220
|
-
|
|
3227
|
+
k((H) => ({ height: H.visibleHeight, width: H.visibleWidth }))
|
|
3221
3228
|
),
|
|
3222
3229
|
b
|
|
3223
3230
|
), {
|
|
@@ -3230,17 +3237,17 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3230
3237
|
headerHeight: s,
|
|
3231
3238
|
increaseViewportBy: t,
|
|
3232
3239
|
initialItemCount: u,
|
|
3233
|
-
itemDimensions:
|
|
3240
|
+
itemDimensions: L,
|
|
3234
3241
|
overscan: n,
|
|
3235
3242
|
restoreStateFrom: j,
|
|
3236
3243
|
scrollBy: i,
|
|
3237
3244
|
scrollContainerState: l,
|
|
3238
|
-
scrollHeight:
|
|
3245
|
+
scrollHeight: O,
|
|
3239
3246
|
scrollTo: c,
|
|
3240
3247
|
scrollToIndex: F,
|
|
3241
3248
|
scrollTop: d,
|
|
3242
3249
|
smoothScrollTargetReached: f,
|
|
3243
|
-
totalCount:
|
|
3250
|
+
totalCount: B,
|
|
3244
3251
|
useWindowScroll: g,
|
|
3245
3252
|
viewportDimensions: b,
|
|
3246
3253
|
windowScrollContainerState: a,
|
|
@@ -3262,7 +3269,7 @@ const Mr = /* @__PURE__ */ Z(
|
|
|
3262
3269
|
...C
|
|
3263
3270
|
};
|
|
3264
3271
|
},
|
|
3265
|
-
st(Ze, St, pe, no,
|
|
3272
|
+
st(Ze, St, pe, no, At, Xe, Gt)
|
|
3266
3273
|
);
|
|
3267
3274
|
function fo(t, e, n) {
|
|
3268
3275
|
return oe(1, Ce((t + n) / (Ce(e) + n)));
|
|
@@ -3278,16 +3285,16 @@ function _e(t, e, n, o) {
|
|
|
3278
3285
|
const r = fo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
|
|
3279
3286
|
return i > 0 ? i + e.row : i;
|
|
3280
3287
|
}
|
|
3281
|
-
const
|
|
3288
|
+
const Mr = /* @__PURE__ */ Z(() => {
|
|
3282
3289
|
const t = w((v) => `Item ${v}`), e = w({}), n = w(null), o = w("virtuoso-grid-item"), r = w("virtuoso-grid-list"), s = w(tn), i = w("div"), l = w(Jt), c = (v, m = null) => gt(
|
|
3283
3290
|
S(
|
|
3284
3291
|
e,
|
|
3285
|
-
|
|
3292
|
+
k((h) => h[v]),
|
|
3286
3293
|
ot()
|
|
3287
3294
|
),
|
|
3288
3295
|
m
|
|
3289
3296
|
), d = w(!1), f = w(!1);
|
|
3290
|
-
return
|
|
3297
|
+
return z(P(f), d), {
|
|
3291
3298
|
components: e,
|
|
3292
3299
|
computeItemKey: s,
|
|
3293
3300
|
context: n,
|
|
@@ -3307,17 +3314,17 @@ const Ar = /* @__PURE__ */ Z(() => {
|
|
|
3307
3314
|
};
|
|
3308
3315
|
}), _r = /* @__PURE__ */ Z(
|
|
3309
3316
|
([t, e]) => ({ ...t, ...e }),
|
|
3310
|
-
st(
|
|
3317
|
+
st(Ar, Mr)
|
|
3311
3318
|
), Nr = /* @__PURE__ */ E.memo(function() {
|
|
3312
|
-
const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = yt("scrollHeight"), c = nt("ItemComponent"), d = nt("ListComponent"), f = nt("ScrollSeekPlaceholder"), v = nt("context"), m = yt("itemDimensions"), h = yt("gap"), y = nt("log"), R = nt("stateRestoreInProgress"), I = yt("reportReadyState"), g =
|
|
3319
|
+
const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = yt("scrollHeight"), c = nt("ItemComponent"), d = nt("ListComponent"), f = nt("ScrollSeekPlaceholder"), v = nt("context"), m = yt("itemDimensions"), h = yt("gap"), y = nt("log"), R = nt("stateRestoreInProgress"), I = yt("reportReadyState"), g = Ot(
|
|
3313
3320
|
E.useMemo(
|
|
3314
3321
|
() => (a) => {
|
|
3315
3322
|
const T = a.parentElement.parentElement.scrollHeight;
|
|
3316
3323
|
l(T);
|
|
3317
3324
|
const x = a.firstChild;
|
|
3318
3325
|
if (x !== null) {
|
|
3319
|
-
const { height: C, width:
|
|
3320
|
-
m({ height: C, width:
|
|
3326
|
+
const { height: C, width: B } = x.getBoundingClientRect();
|
|
3327
|
+
m({ height: C, width: B });
|
|
3321
3328
|
}
|
|
3322
3329
|
h({
|
|
3323
3330
|
column: Vn("column-gap", getComputedStyle(a).columnGap, y),
|
|
@@ -3364,7 +3371,7 @@ const Ar = /* @__PURE__ */ Z(() => {
|
|
|
3364
3371
|
}
|
|
3365
3372
|
);
|
|
3366
3373
|
}), Dr = E.memo(function() {
|
|
3367
|
-
const e = nt("HeaderComponent"), n = yt("headerHeight"), o = nt("headerFooterTag"), r =
|
|
3374
|
+
const e = nt("HeaderComponent"), n = yt("headerHeight"), o = nt("headerFooterTag"), r = Ot(
|
|
3368
3375
|
E.useMemo(
|
|
3369
3376
|
() => (i) => {
|
|
3370
3377
|
n(Ht(i, "height"));
|
|
@@ -3376,7 +3383,7 @@ const Ar = /* @__PURE__ */ Z(() => {
|
|
|
3376
3383
|
), s = nt("context");
|
|
3377
3384
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
|
|
3378
3385
|
}), $r = E.memo(function() {
|
|
3379
|
-
const e = nt("FooterComponent"), n = yt("footerHeight"), o = nt("headerFooterTag"), r =
|
|
3386
|
+
const e = nt("FooterComponent"), n = yt("footerHeight"), o = nt("headerFooterTag"), r = Ot(
|
|
3380
3387
|
E.useMemo(
|
|
3381
3388
|
() => (i) => {
|
|
3382
3389
|
n(Ht(i, "height"));
|
|
@@ -3388,7 +3395,7 @@ const Ar = /* @__PURE__ */ Z(() => {
|
|
|
3388
3395
|
), s = nt("context");
|
|
3389
3396
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
|
|
3390
3397
|
}), Ur = ({ children: t }) => {
|
|
3391
|
-
const e = E.useContext(so), n = yt("itemDimensions"), o = yt("viewportDimensions"), r =
|
|
3398
|
+
const e = E.useContext(so), n = yt("itemDimensions"), o = yt("viewportDimensions"), r = Ot(
|
|
3392
3399
|
E.useMemo(
|
|
3393
3400
|
() => (s) => {
|
|
3394
3401
|
o(s.getBoundingClientRect());
|