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