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