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