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