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