@streamlayer/react 0.29.9 → 0.29.10
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/lib/cjs/masters.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/index-5d2b7e7a.cjs +1 -0
- package/lib/dist/{index-44ddc69c.js → index-b48a730f.js} +257 -250
- package/lib/dist/index.d.ts +2 -0
- package/lib/dist/{masters-63e8a172.js → masters-187c9707.js} +4 -2
- package/lib/dist/{masters-759c16c9.cjs → masters-9e88aaec.cjs} +2 -2
- package/lib/es/masters.js +1 -1
- package/lib/{index-3ce72dff.cjs → index-3f5c6152.cjs} +2 -2
- package/lib/{index-8774a3f9.js → index-66ccd267.js} +159 -152
- package/lib/{masters-0649c872.cjs → masters-1b02c80d.cjs} +1 -1
- package/lib/{masters-8f8cf5ae.js → masters-5752c805.js} +1 -1
- package/package.json +6 -6
- package/lib/dist/index-cf0d1d15.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, jsx as p, Fragment as ye } from "react/jsx-runtime";
|
|
2
2
|
import { s as g, C as Q } from "./index-616b0bcd.js";
|
|
3
3
|
import { useStore as re } from "@nanostores/react";
|
|
4
|
-
import { o as Et, r as Tt, w as Wt, e as We, n as Vt, f as Ht } from "./masters-
|
|
4
|
+
import { o as Et, r as Tt, w as Wt, e as We, n as Vt, f as Ht } from "./masters-5752c805.js";
|
|
5
5
|
import { useState as xe, useCallback as Ve, useMemo as Se, Component as Gt, createElement as ze, PureComponent as vt } from "react";
|
|
6
6
|
import { QuestionType as q, QuestionStatus as we, QuestionImages as ue, PickHistoryStatus as Ne } from "@streamlayer/sdk-web-types";
|
|
7
7
|
import { o as Nt, i as _t, r as Zt, a as Jt, n as Kt } from "./common-2d2a3ba3.js";
|
|
@@ -155,7 +155,7 @@ const fr = /* @__PURE__ */ g("div")({
|
|
|
155
155
|
correct: m,
|
|
156
156
|
incorrect: o,
|
|
157
157
|
inTop: y,
|
|
158
|
-
successRate:
|
|
158
|
+
successRate: E
|
|
159
159
|
}) => /* @__PURE__ */ v(fr, { children: [
|
|
160
160
|
/* @__PURE__ */ p(mr, { children: /* @__PURE__ */ v(Ir, { children: [
|
|
161
161
|
/* @__PURE__ */ v(Dr, { children: [
|
|
@@ -190,7 +190,7 @@ const fr = /* @__PURE__ */ g("div")({
|
|
|
190
190
|
/* @__PURE__ */ p(_e, { indicator: I || 0, title: "Win streak" }),
|
|
191
191
|
/* @__PURE__ */ p(_e, { indicator: m || 0, title: "Correct" }),
|
|
192
192
|
/* @__PURE__ */ p(_e, { indicator: o || 0, title: "Incorrect" }),
|
|
193
|
-
/* @__PURE__ */ p(_e, { indicator: `${
|
|
193
|
+
/* @__PURE__ */ p(_e, { indicator: `${E || 0}%`, title: "Succ. rate" })
|
|
194
194
|
] })
|
|
195
195
|
] })
|
|
196
196
|
] });
|
|
@@ -214,7 +214,7 @@ const Or = () => Q, Cr = /* @__PURE__ */ g("div")({
|
|
|
214
214
|
name: "l",
|
|
215
215
|
class: "l4a8aw",
|
|
216
216
|
propsAsIs: !1
|
|
217
|
-
}),
|
|
217
|
+
}), je = /* @__PURE__ */ g("span")({
|
|
218
218
|
name: "g",
|
|
219
219
|
class: "gzdx7pk",
|
|
220
220
|
propsAsIs: !1
|
|
@@ -233,33 +233,33 @@ const Or = () => Q, Cr = /* @__PURE__ */ g("div")({
|
|
|
233
233
|
const m = a && (c === q.TRIVIA || c === q.PREDICTION);
|
|
234
234
|
if (!m && I !== we.RESOLVED)
|
|
235
235
|
return null;
|
|
236
|
-
const o = c === q.PREDICTION && !u, y = n ? "correct" : "incorrect",
|
|
236
|
+
const o = c === q.PREDICTION && !u, y = n ? "correct" : "incorrect", E = n ? i.correctFeedback : i.incorrectFeedback;
|
|
237
237
|
return /* @__PURE__ */ v(Cr, { "data-isPrediction": o, children: [
|
|
238
238
|
I === we.RESOLVED && c === q.TRIVIA && !a && /* @__PURE__ */ v(ye, { children: [
|
|
239
239
|
/* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(Q, { name: "questionExpired" }) }),
|
|
240
240
|
/* @__PURE__ */ v("div", { children: [
|
|
241
|
-
/* @__PURE__ */ p(lt, { children: /* @__PURE__ */ p(
|
|
241
|
+
/* @__PURE__ */ p(lt, { children: /* @__PURE__ */ p(je, { children: "Question Expired" }) }),
|
|
242
242
|
/* @__PURE__ */ p(Br, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
243
243
|
] })
|
|
244
244
|
] }),
|
|
245
245
|
m && o && /* @__PURE__ */ v(ye, { children: [
|
|
246
246
|
/* @__PURE__ */ p(Lr, { name: "icon-prediction" }),
|
|
247
|
-
/* @__PURE__ */ p(
|
|
247
|
+
/* @__PURE__ */ p(je, { children: "Stay tuned to see if your prediction was correct." })
|
|
248
248
|
] }),
|
|
249
249
|
m && u && /* @__PURE__ */ v(ye, { children: [
|
|
250
250
|
/* @__PURE__ */ p(at, { "data-feedbackType": y, children: /* @__PURE__ */ p(Q, { name: y }) }),
|
|
251
251
|
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ v(lt, { children: [
|
|
252
|
-
/* @__PURE__ */ p(kr, { "data-feedbackType": y, children:
|
|
253
|
-
/* @__PURE__ */ p(
|
|
252
|
+
/* @__PURE__ */ p(kr, { "data-feedbackType": y, children: E == null ? void 0 : E.title }),
|
|
253
|
+
/* @__PURE__ */ p(je, { children: E == null ? void 0 : E.description })
|
|
254
254
|
] }) })
|
|
255
255
|
] })
|
|
256
256
|
] });
|
|
257
257
|
};
|
|
258
|
-
const
|
|
258
|
+
const Ur = /* @__PURE__ */ g("div")({
|
|
259
259
|
name: "o",
|
|
260
260
|
class: "olc1eph",
|
|
261
261
|
propsAsIs: !1
|
|
262
|
-
}),
|
|
262
|
+
}), jr = /* @__PURE__ */ g("div")({
|
|
263
263
|
name: "n",
|
|
264
264
|
class: "n1yoh29a",
|
|
265
265
|
propsAsIs: !1
|
|
@@ -355,14 +355,14 @@ const Qr = () => Dt, Pr = () => Dt, qr = () => Q, Yr = /* @__PURE__ */ g("button
|
|
|
355
355
|
youSelected: o,
|
|
356
356
|
questionVoted: y,
|
|
357
357
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
358
|
-
imageMode:
|
|
358
|
+
imageMode: E = ue.ROUNDED,
|
|
359
359
|
answerTimeExpired: _,
|
|
360
360
|
questionStatus: S,
|
|
361
361
|
isLoading: x,
|
|
362
|
-
questionType:
|
|
362
|
+
questionType: T,
|
|
363
363
|
correct: N,
|
|
364
364
|
hasCorrectAnswer: h
|
|
365
|
-
} = i, M = ri(i), w = ii({ questionType:
|
|
365
|
+
} = i, M = ri(i), w = ii({ questionType: T, questionVoted: y, correct: N, hasCorrectAnswer: h, questionStatus: S }), A = y || S === we.RESOLVED && T === q.PREDICTION;
|
|
366
366
|
return /* @__PURE__ */ v(
|
|
367
367
|
Yr,
|
|
368
368
|
{
|
|
@@ -374,7 +374,7 @@ const Qr = () => Dt, Pr = () => Dt, qr = () => Q, Yr = /* @__PURE__ */ g("button
|
|
|
374
374
|
children: [
|
|
375
375
|
A && /* @__PURE__ */ p(Wr, { "data-answerState": M, style: { width: `${I}%` } }),
|
|
376
376
|
/* @__PURE__ */ v(Vr, { children: [
|
|
377
|
-
c && ((n = ct[
|
|
377
|
+
c && ((n = ct[E]) == null ? void 0 : n.call(ct, c)),
|
|
378
378
|
/* @__PURE__ */ p(Kr, { children: u }),
|
|
379
379
|
A && /* @__PURE__ */ v(Xr, { children: [
|
|
380
380
|
w && /* @__PURE__ */ p(ti, { name: "selected" }),
|
|
@@ -462,11 +462,11 @@ const di = () => Q, hi = /* @__PURE__ */ g("div")({
|
|
|
462
462
|
c && /* @__PURE__ */ p(ui, { isPlaying: a, onTimerExpired: u })
|
|
463
463
|
] }), wi = ({ openedQuestion: i, vote: n }) => {
|
|
464
464
|
var a;
|
|
465
|
-
const c = i.subject, u = i.type, I = (a = i.options) == null ? void 0 : a.options, [m, o] = xe(!1), [y,
|
|
465
|
+
const c = i.subject, u = i.type, I = (a = i.options) == null ? void 0 : a.options, [m, o] = xe(!1), [y, E] = xe(!1), [_, S] = xe(""), x = i == null ? void 0 : i.id, T = Ve(
|
|
466
466
|
async (A) => {
|
|
467
467
|
if (x) {
|
|
468
468
|
const z = A.currentTarget.value;
|
|
469
|
-
S(z),
|
|
469
|
+
S(z), E(!0), await n(x, z), E(!1);
|
|
470
470
|
}
|
|
471
471
|
},
|
|
472
472
|
[x, S, n]
|
|
@@ -486,9 +486,9 @@ const di = () => Q, hi = /* @__PURE__ */ g("div")({
|
|
|
486
486
|
answerTimeExpired: m,
|
|
487
487
|
questionStatus: i.status,
|
|
488
488
|
// ToDo: Figure out why imageMode is not in the response
|
|
489
|
-
onVote:
|
|
490
|
-
})) : [], [h, m, y, i, N,
|
|
491
|
-
return /* @__PURE__ */ p(Tt, { "data-question-header": "true", children: /* @__PURE__ */ p(
|
|
489
|
+
onVote: T
|
|
490
|
+
})) : [], [h, m, y, i, N, T, _]), w = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0;
|
|
491
|
+
return /* @__PURE__ */ p(Tt, { "data-question-header": "true", children: /* @__PURE__ */ p(Ur, { children: /* @__PURE__ */ v(jr, { children: [
|
|
492
492
|
w && /* @__PURE__ */ p(
|
|
493
493
|
Rr,
|
|
494
494
|
{
|
|
@@ -656,8 +656,8 @@ var Ot = {}, Ct = {}, be = {};
|
|
|
656
656
|
be.byteLength = Fi;
|
|
657
657
|
be.toByteArray = Qi;
|
|
658
658
|
be.fromByteArray = Yi;
|
|
659
|
-
var J = [], P = [],
|
|
660
|
-
for (var le = 0,
|
|
659
|
+
var J = [], P = [], Ui = typeof Uint8Array < "u" ? Uint8Array : Array, Fe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
660
|
+
for (var le = 0, ji = Fe.length; le < ji; ++le)
|
|
661
661
|
J[le] = Fe[le], P[Fe.charCodeAt(le)] = le;
|
|
662
662
|
P["-".charCodeAt(0)] = 62;
|
|
663
663
|
P["_".charCodeAt(0)] = 63;
|
|
@@ -678,7 +678,7 @@ function $i(i, n, a) {
|
|
|
678
678
|
return (n + a) * 3 / 4 - a;
|
|
679
679
|
}
|
|
680
680
|
function Qi(i) {
|
|
681
|
-
var n, a = Lt(i), c = a[0], u = a[1], I = new
|
|
681
|
+
var n, a = Lt(i), c = a[0], u = a[1], I = new Ui($i(i, c, u)), m = 0, o = u > 0 ? c - 4 : c, y;
|
|
682
682
|
for (y = 0; y < o; y += 4)
|
|
683
683
|
n = P[i.charCodeAt(y)] << 18 | P[i.charCodeAt(y + 1)] << 12 | P[i.charCodeAt(y + 2)] << 6 | P[i.charCodeAt(y + 3)], I[m++] = n >> 16 & 255, I[m++] = n >> 8 & 255, I[m++] = n & 255;
|
|
684
684
|
return u === 2 && (n = P[i.charCodeAt(y)] << 2 | P[i.charCodeAt(y + 1)] >> 4, I[m++] = n & 255), u === 1 && (n = P[i.charCodeAt(y)] << 10 | P[i.charCodeAt(y + 1)] << 4 | P[i.charCodeAt(y + 2)] >> 2, I[m++] = n >> 8 & 255, I[m++] = n & 255), I;
|
|
@@ -703,27 +703,27 @@ function Yi(i) {
|
|
|
703
703
|
var et = {};
|
|
704
704
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
705
705
|
et.read = function(i, n, a, c, u) {
|
|
706
|
-
var I, m, o = u * 8 - c - 1, y = (1 << o) - 1,
|
|
707
|
-
for (S += x, I =
|
|
706
|
+
var I, m, o = u * 8 - c - 1, y = (1 << o) - 1, E = y >> 1, _ = -7, S = a ? u - 1 : 0, x = a ? -1 : 1, T = i[n + S];
|
|
707
|
+
for (S += x, I = T & (1 << -_) - 1, T >>= -_, _ += o; _ > 0; I = I * 256 + i[n + S], S += x, _ -= 8)
|
|
708
708
|
;
|
|
709
709
|
for (m = I & (1 << -_) - 1, I >>= -_, _ += c; _ > 0; m = m * 256 + i[n + S], S += x, _ -= 8)
|
|
710
710
|
;
|
|
711
711
|
if (I === 0)
|
|
712
|
-
I = 1 -
|
|
712
|
+
I = 1 - E;
|
|
713
713
|
else {
|
|
714
714
|
if (I === y)
|
|
715
|
-
return m ? NaN : (
|
|
716
|
-
m = m + Math.pow(2, c), I = I -
|
|
715
|
+
return m ? NaN : (T ? -1 : 1) * (1 / 0);
|
|
716
|
+
m = m + Math.pow(2, c), I = I - E;
|
|
717
717
|
}
|
|
718
|
-
return (
|
|
718
|
+
return (T ? -1 : 1) * m * Math.pow(2, I - c);
|
|
719
719
|
};
|
|
720
720
|
et.write = function(i, n, a, c, u, I) {
|
|
721
|
-
var m, o, y,
|
|
722
|
-
for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0, m = _) : (m = Math.floor(Math.log(n) / Math.LN2), n * (y = Math.pow(2, -m)) < 1 && (m--, y *= 2), m + S >= 1 ? n += x / y : n += x * Math.pow(2, 1 - S), n * y >= 2 && (m++, y /= 2), m + S >= _ ? (o = 0, m = _) : m + S >= 1 ? (o = (n * y - 1) * Math.pow(2, u), m = m + S) : (o = n * Math.pow(2, S - 1) * Math.pow(2, u), m = 0)); u >= 8; i[a +
|
|
721
|
+
var m, o, y, E = I * 8 - u - 1, _ = (1 << E) - 1, S = _ >> 1, x = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, T = c ? 0 : I - 1, N = c ? 1 : -1, h = n < 0 || n === 0 && 1 / n < 0 ? 1 : 0;
|
|
722
|
+
for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0, m = _) : (m = Math.floor(Math.log(n) / Math.LN2), n * (y = Math.pow(2, -m)) < 1 && (m--, y *= 2), m + S >= 1 ? n += x / y : n += x * Math.pow(2, 1 - S), n * y >= 2 && (m++, y /= 2), m + S >= _ ? (o = 0, m = _) : m + S >= 1 ? (o = (n * y - 1) * Math.pow(2, u), m = m + S) : (o = n * Math.pow(2, S - 1) * Math.pow(2, u), m = 0)); u >= 8; i[a + T] = o & 255, T += N, o /= 256, u -= 8)
|
|
723
723
|
;
|
|
724
|
-
for (m = m << u | o,
|
|
724
|
+
for (m = m << u | o, E += u; E > 0; i[a + T] = m & 255, T += N, m /= 256, E -= 8)
|
|
725
725
|
;
|
|
726
|
-
i[a +
|
|
726
|
+
i[a + T - N] |= h * 128;
|
|
727
727
|
};
|
|
728
728
|
/*!
|
|
729
729
|
* The buffer module from node.js, for the browser.
|
|
@@ -808,20 +808,20 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
808
808
|
o.from = function(r, e, t) {
|
|
809
809
|
return y(r, e, t);
|
|
810
810
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
811
|
-
function
|
|
811
|
+
function E(r) {
|
|
812
812
|
if (typeof r != "number")
|
|
813
813
|
throw new TypeError('"size" argument must be of type number');
|
|
814
814
|
if (r < 0)
|
|
815
815
|
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
816
816
|
}
|
|
817
817
|
function _(r, e, t) {
|
|
818
|
-
return
|
|
818
|
+
return E(r), r <= 0 ? m(r) : e !== void 0 ? typeof t == "string" ? m(r).fill(e, t) : m(r).fill(e) : m(r);
|
|
819
819
|
}
|
|
820
820
|
o.alloc = function(r, e, t) {
|
|
821
821
|
return _(r, e, t);
|
|
822
822
|
};
|
|
823
823
|
function S(r) {
|
|
824
|
-
return
|
|
824
|
+
return E(r), m(r < 0 ? 0 : w(r) | 0);
|
|
825
825
|
}
|
|
826
826
|
o.allocUnsafe = function(r) {
|
|
827
827
|
return S(r);
|
|
@@ -836,7 +836,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
836
836
|
const l = s.write(r, e);
|
|
837
837
|
return l !== t && (s = s.slice(0, l)), s;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function T(r) {
|
|
840
840
|
const e = r.length < 0 ? 0 : w(r.length) | 0, t = m(e);
|
|
841
841
|
for (let s = 0; s < e; s += 1)
|
|
842
842
|
t[s] = r[s] & 255;
|
|
@@ -847,7 +847,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
847
847
|
const e = new Uint8Array(r);
|
|
848
848
|
return h(e.buffer, e.byteOffset, e.byteLength);
|
|
849
849
|
}
|
|
850
|
-
return
|
|
850
|
+
return T(r);
|
|
851
851
|
}
|
|
852
852
|
function h(r, e, t) {
|
|
853
853
|
if (e < 0 || r.byteLength < e)
|
|
@@ -863,9 +863,9 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
863
863
|
return t.length === 0 || r.copy(t, 0, 0, e), t;
|
|
864
864
|
}
|
|
865
865
|
if (r.length !== void 0)
|
|
866
|
-
return typeof r.length != "number" ||
|
|
866
|
+
return typeof r.length != "number" || Ue(r.length) ? m(0) : T(r);
|
|
867
867
|
if (r.type === "Buffer" && Array.isArray(r.data))
|
|
868
|
-
return
|
|
868
|
+
return T(r.data);
|
|
869
869
|
}
|
|
870
870
|
function w(r) {
|
|
871
871
|
if (r >= u)
|
|
@@ -1066,7 +1066,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1066
1066
|
function L(r, e, t, s, l) {
|
|
1067
1067
|
if (r.length === 0)
|
|
1068
1068
|
return -1;
|
|
1069
|
-
if (typeof t == "string" ? (s = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t,
|
|
1069
|
+
if (typeof t == "string" ? (s = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, Ue(t) && (t = l ? 0 : r.length - 1), t < 0 && (t = r.length + t), t >= r.length) {
|
|
1070
1070
|
if (l)
|
|
1071
1071
|
return -1;
|
|
1072
1072
|
t = r.length - 1;
|
|
@@ -1076,12 +1076,12 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1076
1076
|
else
|
|
1077
1077
|
return -1;
|
|
1078
1078
|
if (typeof e == "string" && (e = o.from(e, s)), o.isBuffer(e))
|
|
1079
|
-
return e.length === 0 ? -1 :
|
|
1079
|
+
return e.length === 0 ? -1 : j(r, e, t, s, l);
|
|
1080
1080
|
if (typeof e == "number")
|
|
1081
|
-
return e = e & 255, typeof Uint8Array.prototype.indexOf == "function" ? l ? Uint8Array.prototype.indexOf.call(r, e, t) : Uint8Array.prototype.lastIndexOf.call(r, e, t) :
|
|
1081
|
+
return e = e & 255, typeof Uint8Array.prototype.indexOf == "function" ? l ? Uint8Array.prototype.indexOf.call(r, e, t) : Uint8Array.prototype.lastIndexOf.call(r, e, t) : j(r, [e], t, s, l);
|
|
1082
1082
|
throw new TypeError("val must be string, number or Buffer");
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function j(r, e, t, s, l) {
|
|
1085
1085
|
let d = 1, f = r.length, b = e.length;
|
|
1086
1086
|
if (s !== void 0 && (s = String(s).toLowerCase(), s === "ucs2" || s === "ucs-2" || s === "utf16le" || s === "utf-16le")) {
|
|
1087
1087
|
if (r.length < 2 || e.length < 2)
|
|
@@ -1129,7 +1129,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1129
1129
|
let f;
|
|
1130
1130
|
for (f = 0; f < s; ++f) {
|
|
1131
1131
|
const b = parseInt(e.substr(f * 2, 2), 16);
|
|
1132
|
-
if (
|
|
1132
|
+
if (Ue(b))
|
|
1133
1133
|
return f;
|
|
1134
1134
|
r[t + f] = b;
|
|
1135
1135
|
}
|
|
@@ -1568,7 +1568,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1568
1568
|
e = `_${r.slice(t - 3, t)}${e}`;
|
|
1569
1569
|
return `${r.slice(0, t)}${e}`;
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function jt(r, e, t) {
|
|
1572
1572
|
ae(e, "offset"), (r[e] === void 0 || r[e + t] === void 0) && ge(e, r.length - (t + 1));
|
|
1573
1573
|
}
|
|
1574
1574
|
function nt(r, e, t, s, l, d) {
|
|
@@ -1577,7 +1577,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1577
1577
|
let b;
|
|
1578
1578
|
throw d > 3 ? e === 0 || e === BigInt(0) ? b = `>= 0${f} and < 2${f} ** ${(d + 1) * 8}${f}` : b = `>= -(2${f} ** ${(d + 1) * 8 - 1}${f}) and < 2 ** ${(d + 1) * 8 - 1}${f}` : b = `>= ${e}${f} and <= ${t}${f}`, new oe.ERR_OUT_OF_RANGE("value", b, r);
|
|
1579
1579
|
}
|
|
1580
|
-
|
|
1580
|
+
jt(s, l, d);
|
|
1581
1581
|
}
|
|
1582
1582
|
function ae(r, e) {
|
|
1583
1583
|
if (typeof r != "number")
|
|
@@ -1682,7 +1682,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1682
1682
|
function H(r, e) {
|
|
1683
1683
|
return r instanceof e || r != null && r.constructor != null && r.constructor.name != null && r.constructor.name === e.name;
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function Ue(r) {
|
|
1686
1686
|
return r !== r;
|
|
1687
1687
|
}
|
|
1688
1688
|
const qt = function() {
|
|
@@ -1701,7 +1701,7 @@ et.write = function(i, n, a, c, u, I) {
|
|
|
1701
1701
|
throw new Error("BigInt not supported");
|
|
1702
1702
|
}
|
|
1703
1703
|
})(Ct);
|
|
1704
|
-
var kt = { exports: {} },
|
|
1704
|
+
var kt = { exports: {} }, U = kt.exports = {}, G, Z;
|
|
1705
1705
|
function He() {
|
|
1706
1706
|
throw new Error("setTimeout has not been defined");
|
|
1707
1707
|
}
|
|
@@ -1766,49 +1766,49 @@ function Rt() {
|
|
|
1766
1766
|
ie = null, he = !1, Wi(i);
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
|
-
|
|
1769
|
+
U.nextTick = function(i) {
|
|
1770
1770
|
var n = new Array(arguments.length - 1);
|
|
1771
1771
|
if (arguments.length > 1)
|
|
1772
1772
|
for (var a = 1; a < arguments.length; a++)
|
|
1773
1773
|
n[a - 1] = arguments[a];
|
|
1774
|
-
K.push(new
|
|
1774
|
+
K.push(new Ut(i, n)), K.length === 1 && !he && Bt(Rt);
|
|
1775
1775
|
};
|
|
1776
|
-
function
|
|
1776
|
+
function Ut(i, n) {
|
|
1777
1777
|
this.fun = i, this.array = n;
|
|
1778
1778
|
}
|
|
1779
|
-
|
|
1779
|
+
Ut.prototype.run = function() {
|
|
1780
1780
|
this.fun.apply(null, this.array);
|
|
1781
1781
|
};
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1782
|
+
U.title = "browser";
|
|
1783
|
+
U.browser = !0;
|
|
1784
|
+
U.env = {};
|
|
1785
|
+
U.argv = [];
|
|
1786
|
+
U.version = "";
|
|
1787
|
+
U.versions = {};
|
|
1788
1788
|
function X() {
|
|
1789
1789
|
}
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1790
|
+
U.on = X;
|
|
1791
|
+
U.addListener = X;
|
|
1792
|
+
U.once = X;
|
|
1793
|
+
U.off = X;
|
|
1794
|
+
U.removeListener = X;
|
|
1795
|
+
U.removeAllListeners = X;
|
|
1796
|
+
U.emit = X;
|
|
1797
|
+
U.prependListener = X;
|
|
1798
|
+
U.prependOnceListener = X;
|
|
1799
|
+
U.listeners = function(i) {
|
|
1800
1800
|
return [];
|
|
1801
1801
|
};
|
|
1802
|
-
|
|
1802
|
+
U.binding = function(i) {
|
|
1803
1803
|
throw new Error("process.binding is not supported");
|
|
1804
1804
|
};
|
|
1805
|
-
|
|
1805
|
+
U.cwd = function() {
|
|
1806
1806
|
return "/";
|
|
1807
1807
|
};
|
|
1808
|
-
|
|
1808
|
+
U.chdir = function(i) {
|
|
1809
1809
|
throw new Error("process.chdir is not supported");
|
|
1810
1810
|
};
|
|
1811
|
-
|
|
1811
|
+
U.umask = function() {
|
|
1812
1812
|
return 0;
|
|
1813
1813
|
};
|
|
1814
1814
|
var Hi = kt.exports;
|
|
@@ -1852,7 +1852,7 @@ function Gi(i) {
|
|
|
1852
1852
|
}));
|
|
1853
1853
|
});
|
|
1854
1854
|
};
|
|
1855
|
-
let x = !1,
|
|
1855
|
+
let x = !1, T = "";
|
|
1856
1856
|
c = "animationstart";
|
|
1857
1857
|
const N = "Webkit Moz O ms".split(" ");
|
|
1858
1858
|
let h = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), M = "";
|
|
@@ -1861,27 +1861,27 @@ function Gi(i) {
|
|
|
1861
1861
|
if (w.style.animationName !== void 0 && (x = !0), x === !1) {
|
|
1862
1862
|
for (let A = 0; A < N.length; A++)
|
|
1863
1863
|
if (w.style[N[A] + "AnimationName"] !== void 0) {
|
|
1864
|
-
M = N[A],
|
|
1864
|
+
M = N[A], T = "-" + M.toLowerCase() + "-", c = h[A], x = !0;
|
|
1865
1865
|
break;
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
a = "resizeanim", n = "@" +
|
|
1869
|
+
a = "resizeanim", n = "@" + T + "keyframes " + a + " { from { opacity: 0; } to { opacity: 0; } } ", u = T + "animation: 1ms " + a + "; ";
|
|
1870
1870
|
}
|
|
1871
|
-
const
|
|
1871
|
+
const E = function(x) {
|
|
1872
1872
|
if (!x.getElementById("detectElementResize")) {
|
|
1873
|
-
const
|
|
1874
|
-
h.id = "detectElementResize", h.type = "text/css", i != null && h.setAttribute("nonce", i), h.styleSheet ? h.styleSheet.cssText =
|
|
1873
|
+
const T = (n || "") + ".resize-triggers { " + (u || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', N = x.head || x.getElementsByTagName("head")[0], h = x.createElement("style");
|
|
1874
|
+
h.id = "detectElementResize", h.type = "text/css", i != null && h.setAttribute("nonce", i), h.styleSheet ? h.styleSheet.cssText = T : h.appendChild(x.createTextNode(T)), N.appendChild(h);
|
|
1875
1875
|
}
|
|
1876
1876
|
};
|
|
1877
1877
|
return {
|
|
1878
|
-
addResizeListener: function(x,
|
|
1878
|
+
addResizeListener: function(x, T) {
|
|
1879
1879
|
if (y)
|
|
1880
|
-
x.attachEvent("onresize",
|
|
1880
|
+
x.attachEvent("onresize", T);
|
|
1881
1881
|
else {
|
|
1882
1882
|
if (!x.__resizeTriggers__) {
|
|
1883
1883
|
const N = x.ownerDocument, h = Y.getComputedStyle(x);
|
|
1884
|
-
h && h.position === "static" && (x.style.position = "relative"),
|
|
1884
|
+
h && h.position === "static" && (x.style.position = "relative"), E(N), x.__resizeLast__ = {}, x.__resizeListeners__ = [], (x.__resizeTriggers__ = N.createElement("div")).className = "resize-triggers";
|
|
1885
1885
|
const M = N.createElement("div");
|
|
1886
1886
|
M.className = "expand-trigger", M.appendChild(N.createElement("div"));
|
|
1887
1887
|
const w = N.createElement("div");
|
|
@@ -1889,13 +1889,13 @@ function Gi(i) {
|
|
|
1889
1889
|
z.animationName === a && m(x);
|
|
1890
1890
|
}, x.__resizeTriggers__.addEventListener(c, x.__resizeTriggers__.__animationListener__));
|
|
1891
1891
|
}
|
|
1892
|
-
x.__resizeListeners__.push(
|
|
1892
|
+
x.__resizeListeners__.push(T);
|
|
1893
1893
|
}
|
|
1894
1894
|
},
|
|
1895
|
-
removeResizeListener: function(x,
|
|
1895
|
+
removeResizeListener: function(x, T) {
|
|
1896
1896
|
if (y)
|
|
1897
|
-
x.detachEvent("onresize",
|
|
1898
|
-
else if (x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(
|
|
1897
|
+
x.detachEvent("onresize", T);
|
|
1898
|
+
else if (x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(T), 1), !x.__resizeListeners__.length) {
|
|
1899
1899
|
x.removeEventListener("scroll", o, !0), x.__resizeTriggers__.__animationListener__ && (x.__resizeTriggers__.removeEventListener(c, x.__resizeTriggers__.__animationListener__), x.__resizeTriggers__.__animationListener__ = null);
|
|
1900
1900
|
try {
|
|
1901
1901
|
x.__resizeTriggers__ = !x.removeChild(x.__resizeTriggers__);
|
|
@@ -1921,7 +1921,7 @@ class Zi extends Gt {
|
|
|
1921
1921
|
} = this.props;
|
|
1922
1922
|
if (this._parentNode) {
|
|
1923
1923
|
var I, m, o, y;
|
|
1924
|
-
const
|
|
1924
|
+
const E = window.getComputedStyle(this._parentNode) || {}, _ = parseFloat((I = E.paddingLeft) !== null && I !== void 0 ? I : "0"), S = parseFloat((m = E.paddingRight) !== null && m !== void 0 ? m : "0"), x = parseFloat((o = E.paddingTop) !== null && o !== void 0 ? o : "0"), T = parseFloat((y = E.paddingBottom) !== null && y !== void 0 ? y : "0"), N = this._parentNode.getBoundingClientRect(), h = N.height - x - T, M = N.width - _ - S, w = this._parentNode.offsetHeight - x - T, A = this._parentNode.offsetWidth - _ - S;
|
|
1925
1925
|
(!a && (this.state.height !== w || this.state.scaledHeight !== h) || !c && (this.state.width !== A || this.state.scaledWidth !== M)) && (this.setState({
|
|
1926
1926
|
height: w,
|
|
1927
1927
|
width: A,
|
|
@@ -1959,18 +1959,18 @@ class Zi extends Gt {
|
|
|
1959
1959
|
nonce: m,
|
|
1960
1960
|
onResize: o,
|
|
1961
1961
|
style: y = {},
|
|
1962
|
-
tagName:
|
|
1962
|
+
tagName: E = "div",
|
|
1963
1963
|
..._
|
|
1964
1964
|
} = this.props, {
|
|
1965
1965
|
height: S,
|
|
1966
1966
|
scaledHeight: x,
|
|
1967
|
-
scaledWidth:
|
|
1967
|
+
scaledWidth: T,
|
|
1968
1968
|
width: N
|
|
1969
1969
|
} = this.state, h = {
|
|
1970
1970
|
overflow: "visible"
|
|
1971
1971
|
}, M = {};
|
|
1972
1972
|
let w = !1;
|
|
1973
|
-
return u || (S === 0 && (w = !0), h.height = 0, M.height = S, M.scaledHeight = x), I || (N === 0 && (w = !0), h.width = 0, M.width = N, M.scaledWidth =
|
|
1973
|
+
return u || (S === 0 && (w = !0), h.height = 0, M.height = S, M.scaledHeight = x), I || (N === 0 && (w = !0), h.width = 0, M.width = N, M.scaledWidth = T), ze(E, {
|
|
1974
1974
|
ref: this._setRef,
|
|
1975
1975
|
style: {
|
|
1976
1976
|
...h,
|
|
@@ -2067,7 +2067,7 @@ var rn = 150, nn = function(n, a) {
|
|
|
2067
2067
|
return n;
|
|
2068
2068
|
};
|
|
2069
2069
|
function sn(i) {
|
|
2070
|
-
var n, a = i.getItemOffset, c = i.getEstimatedTotalSize, u = i.getItemSize, I = i.getOffsetForIndexAndAlignment, m = i.getStartIndexForOffset, o = i.getStopIndexForStartIndex, y = i.initInstanceProps,
|
|
2070
|
+
var n, a = i.getItemOffset, c = i.getEstimatedTotalSize, u = i.getItemSize, I = i.getOffsetForIndexAndAlignment, m = i.getStartIndexForOffset, o = i.getStopIndexForStartIndex, y = i.initInstanceProps, E = i.shouldResetStyleCacheOnItemSizeChange, _ = i.validateProps;
|
|
2071
2071
|
return n = /* @__PURE__ */ function(S) {
|
|
2072
2072
|
Ji(x, S);
|
|
2073
2073
|
function x(N) {
|
|
@@ -2092,16 +2092,16 @@ function sn(i) {
|
|
|
2092
2092
|
scrollUpdateWasRequested: A
|
|
2093
2093
|
});
|
|
2094
2094
|
}), h._getItemStyle = void 0, h._getItemStyle = function(M) {
|
|
2095
|
-
var w = h.props, A = w.direction, z = w.itemSize, O = w.layout, D = h._getItemStyleCache(
|
|
2095
|
+
var w = h.props, A = w.direction, z = w.itemSize, O = w.layout, D = h._getItemStyleCache(E && z, E && O, E && A), L;
|
|
2096
2096
|
if (D.hasOwnProperty(M))
|
|
2097
2097
|
L = D[M];
|
|
2098
2098
|
else {
|
|
2099
|
-
var
|
|
2099
|
+
var j = a(h.props, M, h._instanceProps), W = u(h.props, M, h._instanceProps), V = A === "horizontal" || O === "horizontal", ne = A === "rtl", se = V ? j : 0;
|
|
2100
2100
|
D[M] = L = {
|
|
2101
2101
|
position: "absolute",
|
|
2102
2102
|
left: ne ? void 0 : se,
|
|
2103
2103
|
right: ne ? se : void 0,
|
|
2104
|
-
top: V ? 0 :
|
|
2104
|
+
top: V ? 0 : j,
|
|
2105
2105
|
height: V ? "100%" : W,
|
|
2106
2106
|
width: V ? W : "100%"
|
|
2107
2107
|
};
|
|
@@ -2114,20 +2114,20 @@ function sn(i) {
|
|
|
2114
2114
|
h.setState(function(D) {
|
|
2115
2115
|
if (D.scrollOffset === z)
|
|
2116
2116
|
return null;
|
|
2117
|
-
var L = h.props.direction,
|
|
2117
|
+
var L = h.props.direction, j = z;
|
|
2118
2118
|
if (L === "rtl")
|
|
2119
2119
|
switch (wt()) {
|
|
2120
2120
|
case "negative":
|
|
2121
|
-
|
|
2121
|
+
j = -z;
|
|
2122
2122
|
break;
|
|
2123
2123
|
case "positive-descending":
|
|
2124
|
-
|
|
2124
|
+
j = O - A - z;
|
|
2125
2125
|
break;
|
|
2126
2126
|
}
|
|
2127
|
-
return
|
|
2127
|
+
return j = Math.max(0, Math.min(j, O - A)), {
|
|
2128
2128
|
isScrolling: !0,
|
|
2129
2129
|
scrollDirection: D.scrollOffset < z ? "forward" : "backward",
|
|
2130
|
-
scrollOffset:
|
|
2130
|
+
scrollOffset: j,
|
|
2131
2131
|
scrollUpdateWasRequested: !1
|
|
2132
2132
|
};
|
|
2133
2133
|
}, h._resetIsScrollingDebounced);
|
|
@@ -2160,8 +2160,8 @@ function sn(i) {
|
|
|
2160
2160
|
x.getDerivedStateFromProps = function(h, M) {
|
|
2161
2161
|
return on(h, M), _(h), null;
|
|
2162
2162
|
};
|
|
2163
|
-
var
|
|
2164
|
-
return
|
|
2163
|
+
var T = x.prototype;
|
|
2164
|
+
return T.scrollTo = function(h) {
|
|
2165
2165
|
h = Math.max(0, h), this.setState(function(M) {
|
|
2166
2166
|
return M.scrollOffset === h ? null : {
|
|
2167
2167
|
scrollDirection: M.scrollOffset < h ? "forward" : "backward",
|
|
@@ -2169,7 +2169,7 @@ function sn(i) {
|
|
|
2169
2169
|
scrollUpdateWasRequested: !0
|
|
2170
2170
|
};
|
|
2171
2171
|
}, this._resetIsScrollingDebounced);
|
|
2172
|
-
},
|
|
2172
|
+
}, T.scrollToItem = function(h, M) {
|
|
2173
2173
|
M === void 0 && (M = "auto");
|
|
2174
2174
|
var w = this.props, A = w.itemCount, z = w.layout, O = this.state.scrollOffset;
|
|
2175
2175
|
h = Math.max(0, Math.min(h, A - 1));
|
|
@@ -2179,14 +2179,14 @@ function sn(i) {
|
|
|
2179
2179
|
z === "vertical" ? D = L.scrollWidth > L.clientWidth ? xt() : 0 : D = L.scrollHeight > L.clientHeight ? xt() : 0;
|
|
2180
2180
|
}
|
|
2181
2181
|
this.scrollTo(I(this.props, h, M, O, this._instanceProps, D));
|
|
2182
|
-
},
|
|
2182
|
+
}, T.componentDidMount = function() {
|
|
2183
2183
|
var h = this.props, M = h.direction, w = h.initialScrollOffset, A = h.layout;
|
|
2184
2184
|
if (typeof w == "number" && this._outerRef != null) {
|
|
2185
2185
|
var z = this._outerRef;
|
|
2186
2186
|
M === "horizontal" || A === "horizontal" ? z.scrollLeft = w : z.scrollTop = w;
|
|
2187
2187
|
}
|
|
2188
2188
|
this._callPropsCallbacks();
|
|
2189
|
-
},
|
|
2189
|
+
}, T.componentDidUpdate = function() {
|
|
2190
2190
|
var h = this.props, M = h.direction, w = h.layout, A = this.state, z = A.scrollOffset, O = A.scrollUpdateWasRequested;
|
|
2191
2191
|
if (O && this._outerRef != null) {
|
|
2192
2192
|
var D = this._outerRef;
|
|
@@ -2200,8 +2200,8 @@ function sn(i) {
|
|
|
2200
2200
|
D.scrollLeft = z;
|
|
2201
2201
|
break;
|
|
2202
2202
|
default:
|
|
2203
|
-
var L = D.clientWidth,
|
|
2204
|
-
D.scrollLeft =
|
|
2203
|
+
var L = D.clientWidth, j = D.scrollWidth;
|
|
2204
|
+
D.scrollLeft = j - L - z;
|
|
2205
2205
|
break;
|
|
2206
2206
|
}
|
|
2207
2207
|
else
|
|
@@ -2210,11 +2210,11 @@ function sn(i) {
|
|
|
2210
2210
|
D.scrollTop = z;
|
|
2211
2211
|
}
|
|
2212
2212
|
this._callPropsCallbacks();
|
|
2213
|
-
},
|
|
2213
|
+
}, T.componentWillUnmount = function() {
|
|
2214
2214
|
this._resetIsScrollingTimeoutId !== null && yt(this._resetIsScrollingTimeoutId);
|
|
2215
|
-
},
|
|
2216
|
-
var h = this.props, M = h.children, w = h.className, A = h.direction, z = h.height, O = h.innerRef, D = h.innerElementType, L = h.innerTagName,
|
|
2217
|
-
if (
|
|
2215
|
+
}, T.render = function() {
|
|
2216
|
+
var h = this.props, M = h.children, w = h.className, A = h.direction, z = h.height, O = h.innerRef, D = h.innerElementType, L = h.innerTagName, j = h.itemCount, W = h.itemData, V = h.itemKey, ne = V === void 0 ? nn : V, se = h.layout, Oe = h.outerElementType, Ce = h.outerTagName, Me = h.style, Ae = h.useIsScrolling, Le = h.width, Ee = this.state.isScrolling, pe = A === "horizontal" || se === "horizontal", ke = pe ? this._onScrollHorizontal : this._onScrollVertical, Te = this._getRangeToRender(), F = Te[0], $ = Te[1], fe = [];
|
|
2217
|
+
if (j > 0)
|
|
2218
2218
|
for (var ee = F; ee <= $; ee++)
|
|
2219
2219
|
fe.push(ze(M, {
|
|
2220
2220
|
data: W,
|
|
@@ -2246,7 +2246,7 @@ function sn(i) {
|
|
|
2246
2246
|
width: pe ? me : "100%"
|
|
2247
2247
|
}
|
|
2248
2248
|
}));
|
|
2249
|
-
},
|
|
2249
|
+
}, T._callPropsCallbacks = function() {
|
|
2250
2250
|
if (typeof this.props.onItemsRendered == "function") {
|
|
2251
2251
|
var h = this.props.itemCount;
|
|
2252
2252
|
if (h > 0) {
|
|
@@ -2255,15 +2255,15 @@ function sn(i) {
|
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
2257
|
if (typeof this.props.onScroll == "function") {
|
|
2258
|
-
var D = this.state, L = D.scrollDirection,
|
|
2259
|
-
this._callOnScroll(L,
|
|
2258
|
+
var D = this.state, L = D.scrollDirection, j = D.scrollOffset, W = D.scrollUpdateWasRequested;
|
|
2259
|
+
this._callOnScroll(L, j, W);
|
|
2260
2260
|
}
|
|
2261
|
-
},
|
|
2261
|
+
}, T._getRangeToRender = function() {
|
|
2262
2262
|
var h = this.props, M = h.itemCount, w = h.overscanCount, A = this.state, z = A.isScrolling, O = A.scrollDirection, D = A.scrollOffset;
|
|
2263
2263
|
if (M === 0)
|
|
2264
2264
|
return [0, 0, 0, 0];
|
|
2265
|
-
var L = m(this.props, D, this._instanceProps),
|
|
2266
|
-
return [Math.max(0, L - W), Math.max(0, Math.min(M - 1,
|
|
2265
|
+
var L = m(this.props, D, this._instanceProps), j = o(this.props, L, D, this._instanceProps), W = !z || O === "backward" ? Math.max(1, w) : 1, V = !z || O === "forward" ? Math.max(1, w) : 1;
|
|
2266
|
+
return [Math.max(0, L - W), Math.max(0, Math.min(M - 1, j + V)), L, j];
|
|
2267
2267
|
}, x;
|
|
2268
2268
|
}(vt), n.defaultProps = {
|
|
2269
2269
|
direction: "ltr",
|
|
@@ -2289,7 +2289,7 @@ var on = function(n, a) {
|
|
|
2289
2289
|
return c * a;
|
|
2290
2290
|
},
|
|
2291
2291
|
getOffsetForIndexAndAlignment: function(n, a, c, u, I, m) {
|
|
2292
|
-
var o = n.direction, y = n.height,
|
|
2292
|
+
var o = n.direction, y = n.height, E = n.itemCount, _ = n.itemSize, S = n.layout, x = n.width, T = o === "horizontal" || S === "horizontal", N = T ? x : y, h = Math.max(0, E * _ - N), M = Math.min(h, a * _), w = Math.max(0, a * _ - N + _ + m);
|
|
2293
2293
|
switch (c === "smart" && (u >= w - N && u <= M + N ? c = "auto" : c = "center"), c) {
|
|
2294
2294
|
case "start":
|
|
2295
2295
|
return M;
|
|
@@ -2309,10 +2309,10 @@ var on = function(n, a) {
|
|
|
2309
2309
|
return Math.max(0, Math.min(c - 1, Math.floor(a / u)));
|
|
2310
2310
|
},
|
|
2311
2311
|
getStopIndexForStartIndex: function(n, a, c) {
|
|
2312
|
-
var u = n.direction, I = n.height, m = n.itemCount, o = n.itemSize, y = n.layout,
|
|
2312
|
+
var u = n.direction, I = n.height, m = n.itemCount, o = n.itemSize, y = n.layout, E = n.width, _ = u === "horizontal" || y === "horizontal", S = a * o, x = _ ? E : I, T = Math.ceil((x + c - S) / o);
|
|
2313
2313
|
return Math.max(0, Math.min(
|
|
2314
2314
|
m - 1,
|
|
2315
|
-
a +
|
|
2315
|
+
a + T - 1
|
|
2316
2316
|
// -1 is because stop index is inclusive
|
|
2317
2317
|
));
|
|
2318
2318
|
},
|
|
@@ -2328,9 +2328,9 @@ function ln(i) {
|
|
|
2328
2328
|
return !(c > a || u < n);
|
|
2329
2329
|
}
|
|
2330
2330
|
function cn(i) {
|
|
2331
|
-
for (var n = i.isItemLoaded, a = i.itemCount, c = i.minimumBatchSize, u = i.startIndex, I = i.stopIndex, m = [], o = null, y = null,
|
|
2332
|
-
var _ = n(
|
|
2333
|
-
_ ? y !== null && (m.push(o, y), o = y = null) : (y =
|
|
2331
|
+
for (var n = i.isItemLoaded, a = i.itemCount, c = i.minimumBatchSize, u = i.startIndex, I = i.stopIndex, m = [], o = null, y = null, E = u; E <= I; E++) {
|
|
2332
|
+
var _ = n(E);
|
|
2333
|
+
_ ? y !== null && (m.push(o, y), o = y = null) : (y = E, o === null && (o = E));
|
|
2334
2334
|
}
|
|
2335
2335
|
if (y !== null) {
|
|
2336
2336
|
for (var S = Math.min(Math.max(y, o + c - 1), a - 1), x = y + 1; x <= S && !n(x); x++)
|
|
@@ -2339,9 +2339,9 @@ function cn(i) {
|
|
|
2339
2339
|
}
|
|
2340
2340
|
if (m.length)
|
|
2341
2341
|
for (; m[1] - m[0] + 1 < c && m[0] > 0; ) {
|
|
2342
|
-
var
|
|
2343
|
-
if (!n(
|
|
2344
|
-
m[0] =
|
|
2342
|
+
var T = m[0] - 1;
|
|
2343
|
+
if (!n(T))
|
|
2344
|
+
m[0] = T;
|
|
2345
2345
|
else
|
|
2346
2346
|
break;
|
|
2347
2347
|
}
|
|
@@ -2382,11 +2382,11 @@ var un = function(i, n) {
|
|
|
2382
2382
|
un(this, n);
|
|
2383
2383
|
for (var m = arguments.length, o = Array(m), y = 0; y < m; y++)
|
|
2384
2384
|
o[y] = arguments[y];
|
|
2385
|
-
return I = (c = (u = Mt(this, (a = n.__proto__ || Object.getPrototypeOf(n)).call.apply(a, [this].concat(o))), u), u._lastRenderedStartIndex = -1, u._lastRenderedStopIndex = -1, u._memoizedUnloadedRanges = [], u._onItemsRendered = function(
|
|
2386
|
-
var _ =
|
|
2385
|
+
return I = (c = (u = Mt(this, (a = n.__proto__ || Object.getPrototypeOf(n)).call.apply(a, [this].concat(o))), u), u._lastRenderedStartIndex = -1, u._lastRenderedStopIndex = -1, u._memoizedUnloadedRanges = [], u._onItemsRendered = function(E) {
|
|
2386
|
+
var _ = E.visibleStartIndex, S = E.visibleStopIndex;
|
|
2387
2387
|
u._lastRenderedStartIndex = _, u._lastRenderedStopIndex = S, u._ensureRowsLoaded(_, S);
|
|
2388
|
-
}, u._setRef = function(
|
|
2389
|
-
u._listRef =
|
|
2388
|
+
}, u._setRef = function(E) {
|
|
2389
|
+
u._listRef = E;
|
|
2390
2390
|
}, c), Mt(u, I);
|
|
2391
2391
|
}
|
|
2392
2392
|
return dn(n, [{
|
|
@@ -2411,22 +2411,22 @@ var un = function(i, n) {
|
|
|
2411
2411
|
}, {
|
|
2412
2412
|
key: "_ensureRowsLoaded",
|
|
2413
2413
|
value: function(c, u) {
|
|
2414
|
-
var I = this.props, m = I.isItemLoaded, o = I.itemCount, y = I.minimumBatchSize,
|
|
2414
|
+
var I = this.props, m = I.isItemLoaded, o = I.itemCount, y = I.minimumBatchSize, E = y === void 0 ? 10 : y, _ = I.threshold, S = _ === void 0 ? 15 : _, x = cn({
|
|
2415
2415
|
isItemLoaded: m,
|
|
2416
2416
|
itemCount: o,
|
|
2417
|
-
minimumBatchSize:
|
|
2417
|
+
minimumBatchSize: E,
|
|
2418
2418
|
startIndex: Math.max(0, c - S),
|
|
2419
2419
|
stopIndex: Math.min(o - 1, u + S)
|
|
2420
2420
|
});
|
|
2421
|
-
(this._memoizedUnloadedRanges.length !== x.length || this._memoizedUnloadedRanges.some(function(
|
|
2422
|
-
return x[N] !==
|
|
2421
|
+
(this._memoizedUnloadedRanges.length !== x.length || this._memoizedUnloadedRanges.some(function(T, N) {
|
|
2422
|
+
return x[N] !== T;
|
|
2423
2423
|
})) && (this._memoizedUnloadedRanges = x, this._loadUnloadedRanges(x));
|
|
2424
2424
|
}
|
|
2425
2425
|
}, {
|
|
2426
2426
|
key: "_loadUnloadedRanges",
|
|
2427
2427
|
value: function(c) {
|
|
2428
|
-
for (var u = this, I = this.props.loadMoreItems || this.props.loadMoreRows, m = function(
|
|
2429
|
-
var _ = c[
|
|
2428
|
+
for (var u = this, I = this.props.loadMoreItems || this.props.loadMoreRows, m = function(E) {
|
|
2429
|
+
var _ = c[E], S = c[E + 1], x = I(_, S);
|
|
2430
2430
|
x != null && x.then(function() {
|
|
2431
2431
|
if (ln({
|
|
2432
2432
|
lastRenderedStartIndex: u._lastRenderedStartIndex,
|
|
@@ -2494,29 +2494,35 @@ const fn = () => Q, mn = /* @__PURE__ */ g("div")({
|
|
|
2494
2494
|
] })
|
|
2495
2495
|
] }),
|
|
2496
2496
|
/* @__PURE__ */ p("div", { children: _t(c) })
|
|
2497
|
-
] }), Tn = ({
|
|
2497
|
+
] }), Tn = ({
|
|
2498
|
+
items: i,
|
|
2499
|
+
currentUserId: n,
|
|
2500
|
+
openItemDetail: a,
|
|
2501
|
+
fetchMore: c
|
|
2502
|
+
}) => /* @__PURE__ */ p(Zi, { children: ({ width: u, height: I }) => /* @__PURE__ */ p(
|
|
2498
2503
|
pn,
|
|
2499
2504
|
{
|
|
2500
|
-
isItemLoaded: (
|
|
2505
|
+
isItemLoaded: (m) => m < i.length,
|
|
2501
2506
|
itemCount: i.length + 1,
|
|
2502
|
-
loadMoreItems:
|
|
2503
|
-
children: ({ onItemsRendered:
|
|
2507
|
+
loadMoreItems: c,
|
|
2508
|
+
children: ({ onItemsRendered: m, ref: o }) => /* @__PURE__ */ p(
|
|
2504
2509
|
an,
|
|
2505
2510
|
{
|
|
2506
2511
|
itemSize: 56,
|
|
2507
|
-
onItemsRendered:
|
|
2508
|
-
ref:
|
|
2512
|
+
onItemsRendered: m,
|
|
2513
|
+
ref: o,
|
|
2509
2514
|
itemCount: i.length,
|
|
2510
|
-
width:
|
|
2511
|
-
height:
|
|
2512
|
-
children: ({ index:
|
|
2515
|
+
width: u,
|
|
2516
|
+
height: I,
|
|
2517
|
+
children: ({ index: y, style: E }) => /* @__PURE__ */ p(
|
|
2513
2518
|
En,
|
|
2514
2519
|
{
|
|
2515
|
-
style: { ...
|
|
2516
|
-
...i[
|
|
2517
|
-
openItemDetail: () =>
|
|
2520
|
+
style: { ...E, maxHeight: 48 },
|
|
2521
|
+
...i[y],
|
|
2522
|
+
openItemDetail: () => a(i[y].userId),
|
|
2523
|
+
isCurrentUser: !!n && n === i[y].userId
|
|
2518
2524
|
},
|
|
2519
|
-
i[
|
|
2525
|
+
i[y].userId
|
|
2520
2526
|
)
|
|
2521
2527
|
}
|
|
2522
2528
|
)
|
|
@@ -2566,11 +2572,11 @@ const vn = () => Q, Nn = () => Q, _n = /* @__PURE__ */ g("div")({
|
|
|
2566
2572
|
name: "m",
|
|
2567
2573
|
class: "mmvjfuo",
|
|
2568
2574
|
propsAsIs: !0
|
|
2569
|
-
}),
|
|
2575
|
+
}), Un = /* @__PURE__ */ g("div")({
|
|
2570
2576
|
name: "v",
|
|
2571
2577
|
class: "v1oi1553",
|
|
2572
2578
|
propsAsIs: !1
|
|
2573
|
-
}),
|
|
2579
|
+
}), jn = /* @__PURE__ */ g("a")({
|
|
2574
2580
|
name: "w",
|
|
2575
2581
|
class: "w1vwcogq",
|
|
2576
2582
|
propsAsIs: !1
|
|
@@ -2605,7 +2611,7 @@ const vn = () => Q, Nn = () => Q, _n = /* @__PURE__ */ g("div")({
|
|
|
2605
2611
|
] }),
|
|
2606
2612
|
/* @__PURE__ */ p(Rn, { name: "icon-copy" })
|
|
2607
2613
|
] }),
|
|
2608
|
-
n && n.length > 0 && /* @__PURE__ */ p(
|
|
2614
|
+
n && n.length > 0 && /* @__PURE__ */ p(Un, { children: n.map(({ icon: m, link: o, label: y }) => /* @__PURE__ */ v(jn, { href: o, target: "_blank", children: [
|
|
2609
2615
|
/* @__PURE__ */ p(Q, { name: m }),
|
|
2610
2616
|
/* @__PURE__ */ p(Fn, { children: y })
|
|
2611
2617
|
] }, o)) })
|
|
@@ -2638,7 +2644,8 @@ const vn = () => Q, Nn = () => Q, _n = /* @__PURE__ */ g("div")({
|
|
|
2638
2644
|
{
|
|
2639
2645
|
fetchMore: i.leaderboardList.fetchMore,
|
|
2640
2646
|
items: n,
|
|
2641
|
-
openItemDetail: i.openUser
|
|
2647
|
+
openItemDetail: i.openUser,
|
|
2648
|
+
currentUserId: i.currentUserId.get()
|
|
2642
2649
|
}
|
|
2643
2650
|
) : /* @__PURE__ */ p(Qn, { deepLink: i.deepLink });
|
|
2644
2651
|
};
|