@streamlayer/react 0.33.4 → 0.34.0

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.
@@ -1,192 +1,193 @@
1
- import { jsxs as p, jsx as s, Fragment as L } from "react/jsx-runtime";
2
- import { s as o, r as w } from "./index4.js";
3
- import { useStore as _ } from "@nanostores/react";
4
- import { o as Ee, r as Ie, w as We, u as Le, A as Fe, O as Be, c as He, a as de, n as Ge, f as Ze } from "./masters2.js";
5
- import { QuestionType as y, QuestionStatus as R, QuestionImages as B, PickHistoryStatus as X } from "@streamlayer/sdk-web-types";
6
- import { useState as $, useCallback as q, useEffect as fe, useMemo as E, createElement as oe, PureComponent as $e, useRef as ue, useTransition as Je } from "react";
7
- import { d as pe } from "./index3.js";
1
+ import { jsxs as a, jsx as s, Fragment as k } from "react/jsx-runtime";
2
+ import { s as i, r as A } from "./index4.js";
3
+ import { useStore as w } from "@nanostores/react";
4
+ import { o as Ie, r as je, w as ke, u as me, O as ze, c as Ee, a as Z, n as Se, P as re, x as Oe } from "./masters2.js";
5
+ import { QuestionType as p, QuestionStatus as S, QuestionImages as Y, PickHistoryStatus as B } from "@streamlayer/sdk-web-types";
6
+ import { useState as E, useCallback as V, useEffect as ee, useMemo as j, PureComponent as Ce, useTransition as be } from "react";
7
+ import { d as X } from "./index3.js";
8
8
  import "react-countup";
9
- import { CountdownCircleTimer as Ke } from "react-countdown-circle-timer";
10
- import { E as P } from "./index2.js";
11
- import Re from "lodash.throttle";
9
+ import { CountdownCircleTimer as Le } from "react-countdown-circle-timer";
10
+ import { E as L } from "./index2.js";
11
+ import we from "react-infinite-scroller";
12
12
  import "@streamlayer/sdk-web-interfaces";
13
13
  import "@streamlayer/sdk-web-notifications";
14
+ import "lodash.throttle";
14
15
  import "./useStreamLayerApp.js";
15
16
  import "@streamlayer/sdk-web";
16
- const Xe = /* @__PURE__ */ o("div")({
17
+ const $e = /* @__PURE__ */ i("div")({
17
18
  name: "Container",
18
19
  class: "c1vwopgc",
19
20
  propsAsIs: !1
20
- }), et = /* @__PURE__ */ o("div")({
21
+ }), Qe = /* @__PURE__ */ i("div")({
21
22
  name: "QuestionTypeWrap",
22
23
  class: "qyktpt0",
23
24
  propsAsIs: !1
24
- }), tt = () => w, nt = /* @__PURE__ */ o(tt())({
25
+ }), Re = () => A, Ue = /* @__PURE__ */ i(Re())({
25
26
  name: "QuestionTypeIcon",
26
27
  class: "q951jdx",
27
28
  propsAsIs: !0
28
- }), st = /* @__PURE__ */ o("span")({
29
+ }), qe = /* @__PURE__ */ i("span")({
29
30
  name: "QuestionTypeTitle",
30
31
  class: "qss5f0e",
31
32
  propsAsIs: !1
32
- }), it = /* @__PURE__ */ o("button")({
33
+ }), Ye = /* @__PURE__ */ i("button")({
33
34
  name: "CloseButton",
34
35
  class: "c1ao1jtv",
35
36
  propsAsIs: !1
36
- }), rt = () => w, ot = /* @__PURE__ */ o(rt())({
37
+ }), Pe = () => A, Ve = /* @__PURE__ */ i(Pe())({
37
38
  name: "CloseIcon",
38
39
  class: "cvsl7l3",
39
40
  propsAsIs: !0
40
- }), Qe = ({ type: e, close: t, label: n }) => {
41
- const i = e ? Ee[e] : { label: n, iconName: void 0 };
42
- return /* @__PURE__ */ p(Xe, { children: [
43
- /* @__PURE__ */ p(et, { children: [
44
- (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
45
- nt,
41
+ }), Me = ({ type: e, close: n, label: t }) => {
42
+ const r = e ? Ie[e] : { label: t, iconName: void 0 };
43
+ return /* @__PURE__ */ a($e, { children: [
44
+ /* @__PURE__ */ a(Qe, { children: [
45
+ (r == null ? void 0 : r.iconName) && /* @__PURE__ */ s(
46
+ Ue,
46
47
  {
47
- "data-type-trivia": e === y.TRIVIA,
48
- "data-type-poll": e === y.POLL,
49
- name: i.iconName
48
+ "data-type-trivia": e === p.TRIVIA,
49
+ "data-type-poll": e === p.POLL,
50
+ name: r.iconName
50
51
  }
51
52
  ),
52
- (i == null ? void 0 : i.label) && /* @__PURE__ */ s(st, { children: i.label })
53
+ (r == null ? void 0 : r.label) && /* @__PURE__ */ s(qe, { children: r.label })
53
54
  ] }),
54
- /* @__PURE__ */ s(it, { onClick: t, children: /* @__PURE__ */ s(ot, { name: "icon-cross" }) })
55
+ /* @__PURE__ */ s(Ye, { onClick: n, children: /* @__PURE__ */ s(Ve, { name: "icon-cross" }) })
55
56
  ] });
56
- }, Ue = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Pe = (e) => e ? e.toLocaleString("en-US") : "0", ge = (e) => e.toLocaleDateString("en-US", {
57
+ }, he = (e) => e.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), Ne = (e) => e ? e.toLocaleString("en-US") : "0", se = (e) => e.toLocaleDateString("en-US", {
57
58
  weekday: "short",
58
59
  month: "short",
59
60
  day: "numeric"
60
- }), ve = (e) => e.toLocaleTimeString("en-US", {
61
+ }), ne = (e) => e.toLocaleTimeString("en-US", {
61
62
  hour: "2-digit",
62
63
  minute: "2-digit"
63
- }), Me = (e) => !isNaN(e.getTime()), at = /* @__PURE__ */ o("div")({
64
+ }), te = (e) => !isNaN(e.getTime()), _e = /* @__PURE__ */ i("div")({
64
65
  name: "Container",
65
66
  class: "c1zy8a",
66
67
  propsAsIs: !1
67
- }), lt = /* @__PURE__ */ o("div")({
68
+ }), Be = /* @__PURE__ */ i("div")({
68
69
  name: "Title",
69
70
  class: "t1vih9p5",
70
71
  propsAsIs: !1
71
- }), ct = /* @__PURE__ */ o("div")({
72
+ }), We = /* @__PURE__ */ i("div")({
72
73
  name: "Indicator",
73
74
  class: "i1fbnvpb",
74
75
  propsAsIs: !1
75
- }), Ae = ({ indicator: e, title: t }) => /* @__PURE__ */ p(at, { children: [
76
- /* @__PURE__ */ s(lt, { children: t }),
77
- /* @__PURE__ */ s(ct, { children: e })
78
- ] }), dt = /* @__PURE__ */ o("div")({
76
+ }), ae = ({ indicator: e, title: n }) => /* @__PURE__ */ a(_e, { children: [
77
+ /* @__PURE__ */ s(Be, { children: n }),
78
+ /* @__PURE__ */ s(We, { children: e })
79
+ ] }), Fe = /* @__PURE__ */ i("div")({
79
80
  name: "Container",
80
81
  class: "ctmhwyc",
81
82
  propsAsIs: !1
82
- }), ut = /* @__PURE__ */ o("div")({
83
+ }), Ge = /* @__PURE__ */ i("div")({
83
84
  name: "Indicator",
84
85
  class: "i1jri200",
85
86
  propsAsIs: !1
86
- }), pt = /* @__PURE__ */ o("div")({
87
+ }), Ze = /* @__PURE__ */ i("div")({
87
88
  name: "Title",
88
89
  class: "t8s05oq",
89
90
  propsAsIs: !1
90
- }), ee = ({ indicator: e, title: t }) => /* @__PURE__ */ p(dt, { children: [
91
- /* @__PURE__ */ s(ut, { children: e }),
92
- /* @__PURE__ */ s(pt, { children: t })
93
- ] }), mt = /* @__PURE__ */ o("div")({
91
+ }), W = ({ indicator: e, title: n }) => /* @__PURE__ */ a(Fe, { children: [
92
+ /* @__PURE__ */ s(Ge, { children: e }),
93
+ /* @__PURE__ */ s(Ze, { children: n })
94
+ ] }), He = /* @__PURE__ */ i("div")({
94
95
  name: "Container",
95
96
  class: "c1yrpn9o",
96
97
  propsAsIs: !1
97
- }), ht = /* @__PURE__ */ o("div")({
98
+ }), Je = /* @__PURE__ */ i("div")({
98
99
  name: "TopInfo",
99
100
  class: "t17fwahh",
100
101
  propsAsIs: !1
101
- }), It = /* @__PURE__ */ o("div")({
102
+ }), Ke = /* @__PURE__ */ i("div")({
102
103
  name: "BottomInfo",
103
104
  class: "by6w7e9",
104
105
  propsAsIs: !1
105
- }), ft = /* @__PURE__ */ o("div")({
106
+ }), Xe = /* @__PURE__ */ i("div")({
106
107
  name: "User",
107
108
  class: "u1g7arbm",
108
109
  propsAsIs: !1
109
- }), gt = /* @__PURE__ */ o("img")({
110
+ }), es = /* @__PURE__ */ i("img")({
110
111
  name: "Avatar",
111
112
  class: "a1ldeata",
112
113
  propsAsIs: !1
113
- }), vt = /* @__PURE__ */ o("div")({
114
+ }), ss = /* @__PURE__ */ i("div")({
114
115
  name: "UserInfo",
115
116
  class: "u10d4koz",
116
117
  propsAsIs: !1
117
- }), Mt = /* @__PURE__ */ o("div")({
118
+ }), ns = /* @__PURE__ */ i("div")({
118
119
  name: "UserName",
119
120
  class: "u1q6roj0",
120
121
  propsAsIs: !1
121
- }), Tt = /* @__PURE__ */ o("div")({
122
+ }), ts = /* @__PURE__ */ i("div")({
122
123
  name: "UserRating",
123
124
  class: "ui0m425",
124
125
  propsAsIs: !1
125
- }), Nt = /* @__PURE__ */ o("img")({
126
+ }), is = /* @__PURE__ */ i("img")({
126
127
  name: "TrophyIcon",
127
128
  class: "t1el3mrn",
128
129
  propsAsIs: !1
129
- }), At = /* @__PURE__ */ o("div")({
130
+ }), os = /* @__PURE__ */ i("div")({
130
131
  name: "Rts",
131
132
  class: "r2vgnxv",
132
133
  propsAsIs: !1
133
- }), yt = /* @__PURE__ */ o("div")({
134
+ }), rs = /* @__PURE__ */ i("div")({
134
135
  name: "RtsIndicator",
135
136
  class: "roqn06j",
136
137
  propsAsIs: !1
137
- }), Dt = /* @__PURE__ */ o("div")({
138
+ }), as = /* @__PURE__ */ i("div")({
138
139
  name: "RtsLabel",
139
140
  class: "r15adx7c",
140
141
  propsAsIs: !1
141
- }), St = /* @__PURE__ */ o("div")({
142
+ }), cs = /* @__PURE__ */ i("div")({
142
143
  name: "Divider",
143
144
  class: "dv59lta",
144
145
  propsAsIs: !1
145
- }), zt = /* @__PURE__ */ o("div")({
146
+ }), ls = /* @__PURE__ */ i("div")({
146
147
  name: "Ranks",
147
148
  class: "r55lotb",
148
149
  propsAsIs: !1
149
- }), xt = /* @__PURE__ */ o("div")({
150
+ }), ds = /* @__PURE__ */ i("div")({
150
151
  name: "Statistics",
151
152
  class: "s1knfgqt",
152
153
  propsAsIs: !1
153
- }), Ot = /* @__PURE__ */ o("div")({
154
+ }), us = /* @__PURE__ */ i("div")({
154
155
  name: "AvatarPlaceholder",
155
156
  class: "a1mqo824",
156
157
  propsAsIs: !1
157
- }), bt = /* @__PURE__ */ o("button")({
158
+ }), ps = /* @__PURE__ */ i("button")({
158
159
  name: "UserAccountBtn",
159
160
  class: "uxareh6",
160
161
  propsAsIs: !1
161
- }), Ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", qe = ({
162
+ }), Is = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Ae = ({
162
163
  avatar: e,
163
- name: t,
164
- points: n,
165
- friendsRank: i,
166
- rank: r,
167
- streak: c,
168
- correct: m,
164
+ name: n,
165
+ points: t,
166
+ friendsRank: r,
167
+ rank: o,
168
+ streak: u,
169
+ correct: c,
169
170
  incorrect: l,
170
171
  inTop: d,
171
172
  successRate: I
172
- }) => /* @__PURE__ */ p(mt, { children: [
173
- /* @__PURE__ */ s(ht, { children: /* @__PURE__ */ p(ft, { children: [
174
- /* @__PURE__ */ p(bt, { children: [
175
- e && /* @__PURE__ */ s(gt, { alt: "avatar", src: e }),
176
- !e && /* @__PURE__ */ s(Ot, { children: Ue(t || "") })
173
+ }) => /* @__PURE__ */ a(He, { children: [
174
+ /* @__PURE__ */ s(Je, { children: /* @__PURE__ */ a(Xe, { children: [
175
+ /* @__PURE__ */ a(ps, { children: [
176
+ e && /* @__PURE__ */ s(es, { alt: "avatar", src: e }),
177
+ !e && /* @__PURE__ */ s(us, { children: he(n || "") })
177
178
  ] }),
178
- /* @__PURE__ */ p(vt, { children: [
179
- /* @__PURE__ */ s(Mt, { children: t }),
180
- /* @__PURE__ */ p(Tt, { children: [
181
- /* @__PURE__ */ p(At, { children: [
182
- /* @__PURE__ */ s(Nt, { alt: "rank-icon", src: Ct }),
183
- /* @__PURE__ */ p(yt, { children: [
184
- Pe(n),
185
- /* @__PURE__ */ s(Dt, { children: "PTS" })
179
+ /* @__PURE__ */ a(ss, { children: [
180
+ /* @__PURE__ */ s(ns, { children: n }),
181
+ /* @__PURE__ */ a(ts, { children: [
182
+ /* @__PURE__ */ a(os, { children: [
183
+ /* @__PURE__ */ s(is, { alt: "rank-icon", src: Is }),
184
+ /* @__PURE__ */ a(rs, { children: [
185
+ Ne(t),
186
+ /* @__PURE__ */ s(as, { children: "PTS" })
186
187
  ] })
187
188
  ] }),
188
- /* @__PURE__ */ s(St, {}),
189
- /* @__PURE__ */ p("div", { children: [
189
+ /* @__PURE__ */ s(cs, {}),
190
+ /* @__PURE__ */ a("div", { children: [
190
191
  "TOP ",
191
192
  d || 0,
192
193
  "%"
@@ -194,1072 +195,731 @@ const Xe = /* @__PURE__ */ o("div")({
194
195
  ] })
195
196
  ] })
196
197
  ] }) }),
197
- /* @__PURE__ */ p(It, { children: [
198
- /* @__PURE__ */ p(zt, { children: [
199
- /* @__PURE__ */ s(Ae, { indicator: i || 0, title: "Friends rank" }),
200
- /* @__PURE__ */ s(Ae, { indicator: r || 0, title: "Global rank" })
198
+ /* @__PURE__ */ a(Ke, { children: [
199
+ /* @__PURE__ */ a(ls, { children: [
200
+ /* @__PURE__ */ s(ae, { indicator: r || 0, title: "Friends rank" }),
201
+ /* @__PURE__ */ s(ae, { indicator: o || 0, title: "Global rank" })
201
202
  ] }),
202
- /* @__PURE__ */ p(xt, { children: [
203
- /* @__PURE__ */ s(ee, { indicator: c || 0, title: "Win streak" }),
204
- /* @__PURE__ */ s(ee, { indicator: m || 0, title: "Correct" }),
205
- /* @__PURE__ */ s(ee, { indicator: l || 0, title: "Incorrect" }),
206
- /* @__PURE__ */ s(ee, { indicator: `${I || 0}%`, title: "Succ. rate" })
203
+ /* @__PURE__ */ a(ds, { children: [
204
+ /* @__PURE__ */ s(W, { indicator: u || 0, title: "Win streak" }),
205
+ /* @__PURE__ */ s(W, { indicator: c || 0, title: "Correct" }),
206
+ /* @__PURE__ */ s(W, { indicator: l || 0, title: "Incorrect" }),
207
+ /* @__PURE__ */ s(W, { indicator: `${I || 0}%`, title: "Succ. rate" })
207
208
  ] })
208
209
  ] })
209
- ] }), jt = /* @__PURE__ */ o("div")({
210
+ ] }), ms = /* @__PURE__ */ i("div")({
210
211
  name: "SponsorLogoWrap",
211
212
  class: "s8p5v5z",
212
213
  propsAsIs: !1
213
- }), wt = () => w, kt = /* @__PURE__ */ o(wt())({
214
+ }), Ms = () => A, hs = /* @__PURE__ */ i(Ms())({
214
215
  name: "SponsorLogo",
215
216
  class: "s755yti",
216
217
  propsAsIs: !0
217
- }), Et = () => /* @__PURE__ */ s(jt, {
218
- children: /* @__PURE__ */ s(kt, {
218
+ }), Ns = () => /* @__PURE__ */ s(ms, {
219
+ children: /* @__PURE__ */ s(hs, {
219
220
  name: "mastersLogo"
220
221
  })
221
- }), Lt = /* @__PURE__ */ o("div")({
222
+ }), As = /* @__PURE__ */ i("div")({
222
223
  name: "Container",
223
224
  class: "c38csyt",
224
225
  propsAsIs: !1
225
- }), $t = /* @__PURE__ */ o("div")({
226
+ }), Ds = /* @__PURE__ */ i("div")({
226
227
  name: "Title",
227
228
  class: "ty221rx",
228
229
  propsAsIs: !1
229
- }), Rt = /* @__PURE__ */ o("div")({
230
+ }), gs = /* @__PURE__ */ i("div")({
230
231
  name: "Description",
231
232
  class: "dlaj9xp",
232
233
  propsAsIs: !1
233
- }), Qt = ({ title: e, description: t }) => /* @__PURE__ */ p(Lt, { children: [
234
- /* @__PURE__ */ s(w, { name: "icon-check-circle" }),
235
- /* @__PURE__ */ s($t, { children: e }),
236
- /* @__PURE__ */ s(Rt, { children: t })
237
- ] }), Ut = /* @__PURE__ */ o("div")({
234
+ }), Ts = ({ title: e, description: n }) => /* @__PURE__ */ a(As, { children: [
235
+ /* @__PURE__ */ s(A, { name: "icon-check-circle" }),
236
+ /* @__PURE__ */ s(Ds, { children: e }),
237
+ /* @__PURE__ */ s(gs, { children: n })
238
+ ] }), vs = /* @__PURE__ */ i("div")({
238
239
  name: "Container",
239
240
  class: "c16sbdnm",
240
241
  propsAsIs: !1
241
- }), Pt = () => w, qt = /* @__PURE__ */ o(Pt())({
242
+ }), ys = () => A, fs = /* @__PURE__ */ i(ys())({
242
243
  name: "IconPrediction",
243
244
  class: "ibhorgl",
244
245
  propsAsIs: !0
245
- }), H = /* @__PURE__ */ o("div")({
246
+ }), P = /* @__PURE__ */ i("div")({
246
247
  name: "FeedbackIconWrap",
247
248
  class: "f1g20ja7",
248
249
  propsAsIs: !1
249
- }), te = /* @__PURE__ */ o("div")({
250
+ }), F = /* @__PURE__ */ i("div")({
250
251
  name: "FeedbackHeader",
251
252
  class: "f455ozj",
252
253
  propsAsIs: !1
253
- }), _t = /* @__PURE__ */ o("span")({
254
+ }), xs = /* @__PURE__ */ i("span")({
254
255
  name: "FeedbackTitle",
255
256
  class: "f1913njx",
256
257
  propsAsIs: !1
257
- }), Y = /* @__PURE__ */ o("span")({
258
+ }), U = /* @__PURE__ */ i("span")({
258
259
  name: "FeedbackDescription",
259
260
  class: "fzfk69z",
260
261
  propsAsIs: !1
261
- }), ae = /* @__PURE__ */ o("div")({
262
+ }), K = /* @__PURE__ */ i("div")({
262
263
  name: "FeedbackText",
263
264
  class: "fx87qaj",
264
265
  propsAsIs: !1
265
- }), Yt = ({
266
+ }), js = ({
266
267
  feedbackMessages: e,
267
- questionVotedCorrectly: t,
268
- questionVoted: n,
269
- questionType: i,
270
- hasCorrectAnswer: r,
271
- questionStatus: c,
272
- showExpiredNotification: m,
268
+ questionVotedCorrectly: n,
269
+ questionVoted: t,
270
+ questionType: r,
271
+ hasCorrectAnswer: o,
272
+ questionStatus: u,
273
+ showExpiredNotification: c,
273
274
  showClosedNotificationTrivia: l,
274
275
  votedInCurrentRender: d,
275
276
  votedAfterQuestionClosed: I,
276
- enteredAnActiveQuestion: g,
277
- marketClosed: S
277
+ enteredAnActiveQuestion: m,
278
+ marketClosed: M
278
279
  }) => {
279
- const v = n && (i === y.TRIVIA || i === y.PREDICTION) && d && c !== R.RESOLVED, N = i === y.PREDICTION && !r, z = S && i === y.PREDICTION && !n && !g || i === y.PREDICTION && I && d && g, a = v && N, h = v && r, u = i === y.PREDICTION && n && d && r, f = n && i === y.POLL && d;
280
- if (!m && !l && !a && !h && !z && !f && !u)
280
+ const N = t && (r === p.TRIVIA || r === p.PREDICTION) && d && u !== S.RESOLVED, D = r === p.PREDICTION && !o, O = M && r === p.PREDICTION && !t && !m || r === p.PREDICTION && I && d && m, v = N && D, C = N && o, y = r === p.PREDICTION && t && d && o, $ = t && r === p.POLL && d;
281
+ if (!c && !l && !v && !C && !O && !$ && !y)
281
282
  return null;
282
- const M = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
283
- return /* @__PURE__ */ p(Ut, { "data-isPrediction": N, children: [
284
- m && /* @__PURE__ */ p(L, { children: [
285
- /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
286
- /* @__PURE__ */ p("div", { children: [
287
- /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Expired" }) }),
288
- /* @__PURE__ */ s(ae, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
283
+ const z = n ? "correct" : "incorrect", x = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
284
+ return /* @__PURE__ */ a(vs, { "data-isPrediction": D, children: [
285
+ c && /* @__PURE__ */ a(k, { children: [
286
+ /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
287
+ /* @__PURE__ */ a("div", { children: [
288
+ /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(U, { children: "Question Expired" }) }),
289
+ /* @__PURE__ */ s(K, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
289
290
  ] })
290
291
  ] }),
291
- l && /* @__PURE__ */ p(L, { children: [
292
- /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
293
- /* @__PURE__ */ p("div", { children: [
294
- /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
295
- /* @__PURE__ */ s(ae, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
292
+ l && /* @__PURE__ */ a(k, { children: [
293
+ /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
294
+ /* @__PURE__ */ a("div", { children: [
295
+ /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(U, { children: "Question Closed" }) }),
296
+ /* @__PURE__ */ s(K, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
296
297
  ] })
297
298
  ] }),
298
- z && /* @__PURE__ */ p(L, { children: [
299
- /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
300
- /* @__PURE__ */ p("div", { children: [
301
- /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
302
- /* @__PURE__ */ s(ae, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
299
+ O && /* @__PURE__ */ a(k, { children: [
300
+ /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
301
+ /* @__PURE__ */ a("div", { children: [
302
+ /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(U, { children: "Question Closed" }) }),
303
+ /* @__PURE__ */ s(K, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
303
304
  ] })
304
305
  ] }),
305
- a && /* @__PURE__ */ p(L, { children: [
306
- /* @__PURE__ */ s(qt, { name: "icon-prediction" }),
307
- /* @__PURE__ */ s(Y, { children: "Stay tuned to see if your prediction was correct." })
306
+ v && /* @__PURE__ */ a(k, { children: [
307
+ /* @__PURE__ */ s(fs, { name: "icon-prediction" }),
308
+ /* @__PURE__ */ s(U, { children: "Stay tuned to see if your prediction was correct." })
308
309
  ] }),
309
- f && /* @__PURE__ */ p(L, { children: [
310
- /* @__PURE__ */ s(H, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(w, { name: "correct" }) }),
311
- /* @__PURE__ */ s(Y, { children: "That's for answering. Please stay tuned for the next question." })
310
+ $ && /* @__PURE__ */ a(k, { children: [
311
+ /* @__PURE__ */ s(P, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(A, { name: "correct" }) }),
312
+ /* @__PURE__ */ s(U, { children: "That's for answering. Please stay tuned for the next question." })
312
313
  ] }),
313
- (h || u) && /* @__PURE__ */ p(L, { children: [
314
- /* @__PURE__ */ s(H, { "data-feedbackType": M, children: /* @__PURE__ */ s(w, { name: M }) }),
315
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(te, { children: [
316
- /* @__PURE__ */ s(_t, { "data-feedbackType": M, children: D == null ? void 0 : D.title }),
317
- /* @__PURE__ */ s(Y, { children: D == null ? void 0 : D.description })
314
+ (C || y) && /* @__PURE__ */ a(k, { children: [
315
+ /* @__PURE__ */ s(P, { "data-feedbackType": z, children: /* @__PURE__ */ s(A, { name: z }) }),
316
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ a(F, { children: [
317
+ /* @__PURE__ */ s(xs, { "data-feedbackType": z, children: x == null ? void 0 : x.title }),
318
+ /* @__PURE__ */ s(U, { children: x == null ? void 0 : x.description })
318
319
  ] }) })
319
320
  ] })
320
321
  ] });
321
- }, Vt = /* @__PURE__ */ o("div")({
322
+ }, ks = /* @__PURE__ */ i("div")({
322
323
  name: "Container",
323
324
  class: "c14ielyq",
324
325
  propsAsIs: !1
325
- }), Wt = /* @__PURE__ */ o("div")({
326
+ }), zs = /* @__PURE__ */ i("div")({
326
327
  name: "Content",
327
328
  class: "c1tlqx57",
328
329
  propsAsIs: !1
329
- }), Ft = /* @__PURE__ */ o("div")({
330
+ }), Es = /* @__PURE__ */ i("div")({
330
331
  name: "Title",
331
332
  class: "t1hq58md",
332
333
  propsAsIs: !1
333
- }), Bt = /* @__PURE__ */ o("div")({
334
+ }), Ss = /* @__PURE__ */ i("div")({
334
335
  name: "Options",
335
336
  class: "o1c8nxcx",
336
337
  propsAsIs: !1
337
- }), Ht = /* @__PURE__ */ o("button")({
338
+ }), Os = /* @__PURE__ */ i("button")({
338
339
  name: "ButtonContainer",
339
340
  class: "b1b6dl8t",
340
341
  propsAsIs: !1
341
- }), Gt = /* @__PURE__ */ o("div")({
342
+ }), Cs = /* @__PURE__ */ i("div")({
342
343
  name: "ButtonPct",
343
344
  class: "b4iik8i",
344
345
  propsAsIs: !1
345
- }), Zt = /* @__PURE__ */ o("span")({
346
+ }), bs = /* @__PURE__ */ i("span")({
346
347
  name: "ButtonBody",
347
348
  class: "b1gq1lnf",
348
349
  propsAsIs: !1
349
- }), Jt = /* @__PURE__ */ o("div")({
350
+ }), Ls = /* @__PURE__ */ i("div")({
350
351
  name: "IconContainer",
351
352
  class: "i1j65z51",
352
353
  propsAsIs: !1
353
- }), Kt = /* @__PURE__ */ o("div")({
354
+ }), ws = /* @__PURE__ */ i("div")({
354
355
  name: "IconWrap",
355
356
  class: "i19tpfua",
356
357
  propsAsIs: !1
357
- }), _e = /* @__PURE__ */ o("img")({
358
+ }), De = /* @__PURE__ */ i("img")({
358
359
  name: "Icon",
359
360
  class: "i1tubmma",
360
361
  propsAsIs: !1
361
- }), Xt = () => _e, en = /* @__PURE__ */ o(Xt())({
362
+ }), $s = () => De, Qs = /* @__PURE__ */ i($s())({
362
363
  name: "IconDefault",
363
364
  class: "i1grrgwj",
364
365
  propsAsIs: !0
365
- }), tn = () => _e, nn = /* @__PURE__ */ o(tn())({
366
+ }), Rs = () => De, Us = /* @__PURE__ */ i(Rs())({
366
367
  name: "IconCircle",
367
368
  class: "ibemyq8",
368
369
  propsAsIs: !0
369
- }), sn = /* @__PURE__ */ o("span")({
370
+ }), qs = /* @__PURE__ */ i("span")({
370
371
  name: "Title",
371
372
  class: "t1dceht",
372
373
  propsAsIs: !1
373
- }), rn = /* @__PURE__ */ o("span")({
374
+ }), Ys = /* @__PURE__ */ i("span")({
374
375
  name: "Indicators",
375
376
  class: "i116q4vq",
376
377
  propsAsIs: !1
377
- }), on = /* @__PURE__ */ o("span")({
378
+ }), Ps = /* @__PURE__ */ i("span")({
378
379
  name: "Pts",
379
380
  class: "p17ajcu2",
380
381
  propsAsIs: !1
381
- }), an = /* @__PURE__ */ o("span")({
382
+ }), Vs = /* @__PURE__ */ i("span")({
382
383
  name: "Percentage",
383
384
  class: "pu9kmlb",
384
385
  propsAsIs: !1
385
- }), ln = () => w, cn = /* @__PURE__ */ o(ln())({
386
+ }), _s = () => A, Bs = /* @__PURE__ */ i(_s())({
386
387
  name: "CheckIcon",
387
388
  class: "c1j2j0s0",
388
389
  propsAsIs: !0
389
- }), ye = {
390
- [B.CENTERED]: (e) => /* @__PURE__ */ s(en, { alt: "option-icon", src: e }),
391
- [B.TRANSPARENT]: (e) => /* @__PURE__ */ s(Jt, { children: /* @__PURE__ */ s(Kt, { style: { backgroundImage: `url(${e})` } }) }),
392
- [B.ROUNDED]: (e) => /* @__PURE__ */ s(nn, { alt: "option-icon", src: e }),
393
- [B.NONE]: () => null,
394
- [B.UNSET]: () => null
395
- }, dn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
396
- if (e === y.POLL && i)
390
+ }), ce = {
391
+ [Y.CENTERED]: (e) => /* @__PURE__ */ s(Qs, { alt: "option-icon", src: e }),
392
+ [Y.TRANSPARENT]: (e) => /* @__PURE__ */ s(Ls, { children: /* @__PURE__ */ s(ws, { style: { backgroundImage: `url(${e})` } }) }),
393
+ [Y.ROUNDED]: (e) => /* @__PURE__ */ s(Us, { alt: "option-icon", src: e }),
394
+ [Y.NONE]: () => null,
395
+ [Y.UNSET]: () => null
396
+ }, Ws = ({ questionType: e, hasCorrectAnswer: n, correct: t, youVoted: r, questionVoted: o }) => {
397
+ if (e === p.POLL && r)
397
398
  return "correct";
398
- if (e === y.PREDICTION) {
399
- if (t && r)
400
- return i ? n ? "correct" : "incorrect" : "unset";
401
- if (i)
399
+ if (e === p.PREDICTION) {
400
+ if (n && o)
401
+ return r ? t ? "correct" : "incorrect" : "unset";
402
+ if (r)
402
403
  return "correct";
403
404
  }
404
- return e === y.TRIVIA && r && i ? n ? "correct" : "incorrect" : "unset";
405
- }, un = ({
405
+ return e === p.TRIVIA && o && r ? t ? "correct" : "incorrect" : "unset";
406
+ }, Fs = ({
406
407
  questionType: e,
407
- questionVoted: t,
408
- correct: n,
409
- hasCorrectAnswer: i,
410
- questionStatus: r
411
- }) => e === y.TRIVIA ? t && n : e === y.PREDICTION ? t && n && i || r === R.RESOLVED && n : !1, pn = (e) => {
412
- var t;
408
+ questionVoted: n,
409
+ correct: t,
410
+ hasCorrectAnswer: r,
411
+ questionStatus: o
412
+ }) => e === p.TRIVIA ? n && t : e === p.PREDICTION ? n && t && r || o === S.RESOLVED && t : !1, Gs = (e) => {
413
+ var n;
413
414
  const {
414
415
  // option props
415
- id: n,
416
- icon: i,
417
- text: r,
418
- percentageDecimal: c,
419
- points: m,
416
+ id: t,
417
+ icon: r,
418
+ text: o,
419
+ percentageDecimal: u,
420
+ points: c,
420
421
  // extra props
421
422
  onVote: l,
422
423
  markThatVoted: d,
423
424
  youSelected: I,
424
- questionVoted: g,
425
- imageMode: S,
426
- answerTimeExpired: v,
427
- questionStatus: N,
428
- isLoading: z,
429
- questionType: a,
430
- correct: h,
431
- hasCorrectAnswer: u,
432
- votedAfterQuestionClosed: f,
433
- enteredAnActiveQuestion: M,
434
- marketClosed: D
435
- } = e, T = dn(e), x = un({ questionType: a, questionVoted: g, correct: h, hasCorrectAnswer: u, questionStatus: N }), O = D && a === y.PREDICTION, k = g || O, A = a === y.PREDICTION && !g && N !== R.RESOLVED;
436
- return /* @__PURE__ */ p(
437
- Ht,
425
+ questionVoted: m,
426
+ imageMode: M,
427
+ answerTimeExpired: N,
428
+ questionStatus: D,
429
+ isLoading: O,
430
+ questionType: v,
431
+ correct: C,
432
+ hasCorrectAnswer: y,
433
+ votedAfterQuestionClosed: $,
434
+ enteredAnActiveQuestion: z,
435
+ marketClosed: x
436
+ } = e, b = Ws(e), J = Fs({ questionType: v, questionVoted: m, correct: C, hasCorrectAnswer: y, questionStatus: D }), Q = x && v === p.PREDICTION, _ = m || Q, h = v === p.PREDICTION && !m && D !== S.RESOLVED;
437
+ return /* @__PURE__ */ a(
438
+ Os,
438
439
  {
439
- value: n,
440
+ value: t,
440
441
  "data-selected": I,
441
- "data-answerState": T,
442
- disabled: g || z || v || O && !M || O && M && f,
443
- "data-isNotChecked": g && !I && T !== "incorrect",
444
- onClick: (b) => {
442
+ "data-answer-state": b,
443
+ disabled: m || O || N || Q && !z || Q && z && $,
444
+ "data-is-not-checked": m && !I && b !== "incorrect",
445
+ onClick: (T) => {
445
446
  d(
446
- a === y.PREDICTION ? D : N === R.RESOLVED
447
- ), l(b);
447
+ v === p.PREDICTION ? x : D === S.RESOLVED
448
+ ), l(T);
448
449
  },
449
450
  children: [
450
- /* @__PURE__ */ s(Gt, { "data-answerState": T, style: { width: `${k ? c : 0}%` } }),
451
- /* @__PURE__ */ p(Zt, { children: [
452
- i && S && ((t = ye[S]) == null ? void 0 : t.call(ye, i)),
453
- /* @__PURE__ */ s(sn, { children: r }),
454
- A && /* @__PURE__ */ p("div", { children: [
455
- /* @__PURE__ */ s(pe, { value: m }),
456
- /* @__PURE__ */ s(on, { children: "pts" })
451
+ /* @__PURE__ */ s(Cs, { "data-answer-state": b, style: { width: `${_ ? u : 0}%` } }),
452
+ /* @__PURE__ */ a(bs, { children: [
453
+ r && M && ((n = ce[M]) == null ? void 0 : n.call(ce, r)),
454
+ /* @__PURE__ */ s(qs, { children: o }),
455
+ h && /* @__PURE__ */ a("div", { children: [
456
+ /* @__PURE__ */ s(X, { value: c }),
457
+ /* @__PURE__ */ s(Ps, { children: "pts" })
457
458
  ] }),
458
- k && /* @__PURE__ */ p(rn, { children: [
459
- x && /* @__PURE__ */ s(cn, { name: "selected" }),
460
- /* @__PURE__ */ s(an, { children: /* @__PURE__ */ s(pe, { value: c, suffix: "%" }) })
459
+ _ && /* @__PURE__ */ a(Ys, { children: [
460
+ J && /* @__PURE__ */ s(Bs, { name: "selected" }),
461
+ /* @__PURE__ */ s(Vs, { children: /* @__PURE__ */ s(X, { value: u, suffix: "%" }) })
461
462
  ] })
462
463
  ] })
463
464
  ]
464
465
  }
465
466
  );
466
- }, mn = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], hn = [10, 10, 1, 0], In = /* @__PURE__ */ o("div")({
467
+ }, Zs = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1, L.NEUTRALS_GRAY3], Hs = [10, 10, 1, 0], Js = /* @__PURE__ */ i("div")({
467
468
  name: "RemainingTime",
468
469
  class: "r165427",
469
470
  propsAsIs: !1
470
- }), fn = P.SECONDARY_GREEN6, De = P.SECONDARY_RED3, gn = P.NEUTRALS_GRAY3, vn = ({
471
+ }), Ks = L.SECONDARY_GREEN6, le = L.SECONDARY_RED3, Xs = L.NEUTRALS_GRAY3, en = ({
471
472
  isPlaying: e = !0,
472
- duration: t = 30,
473
- onTimerExpired: n
473
+ duration: n = 30,
474
+ onTimerExpired: t
474
475
  }) => {
475
- const [i, r] = $(t > 10 ? fn : De), c = ({
476
+ const [r, o] = E(n > 10 ? Ks : le), u = ({
476
477
  remainingTime: d
477
- }) => /* @__PURE__ */ s(In, {
478
+ }) => /* @__PURE__ */ s(Js, {
478
479
  children: d
479
- }), m = q(() => {
480
- n == null || n(), r(gn);
481
- }, [n, r]), l = q((d) => {
482
- d === 10 && r(De);
483
- }, [r]);
484
- return /* @__PURE__ */ s(Ke, {
480
+ }), c = V(() => {
481
+ t == null || t(), o(Xs);
482
+ }, [t, o]), l = V((d) => {
483
+ d === 10 && o(le);
484
+ }, [o]);
485
+ return /* @__PURE__ */ s(Le, {
485
486
  isPlaying: e,
486
- duration: t,
487
- colors: mn,
488
- colorsTime: hn,
487
+ duration: n,
488
+ colors: Zs,
489
+ colorsTime: Hs,
489
490
  size: 32,
490
491
  strokeWidth: 2,
491
492
  trailStrokeWidth: 2,
492
- trailColor: i,
493
- onComplete: m,
493
+ trailColor: r,
494
+ onComplete: c,
494
495
  onUpdate: l,
495
- children: c
496
+ children: u
496
497
  });
497
- }, Mn = /* @__PURE__ */ o("div")({
498
+ }, sn = /* @__PURE__ */ i("div")({
498
499
  name: "WinBarContainer",
499
500
  class: "wie6cqo",
500
501
  propsAsIs: !1
501
- }), Tn = /* @__PURE__ */ o("div")({
502
+ }), nn = /* @__PURE__ */ i("div")({
502
503
  name: "Content",
503
504
  class: "cgizw4u",
504
505
  propsAsIs: !1
505
- }), Nn = /* @__PURE__ */ o("div")({
506
+ }), tn = /* @__PURE__ */ i("div")({
506
507
  name: "Title",
507
508
  class: "t1l3ucjp",
508
509
  propsAsIs: !1
509
- }), An = () => w, yn = /* @__PURE__ */ o(An())({
510
+ }), on = () => A, rn = /* @__PURE__ */ i(on())({
510
511
  name: "WinIcon",
511
512
  class: "wx7j799",
512
513
  propsAsIs: !0
513
- }), Dn = /* @__PURE__ */ o("div")({
514
+ }), an = /* @__PURE__ */ i("div")({
514
515
  name: "Points",
515
516
  class: "p4lwuj0",
516
517
  propsAsIs: !1
517
- }), Sn = /* @__PURE__ */ o("span")({
518
+ }), cn = /* @__PURE__ */ i("span")({
518
519
  name: "PointsCount",
519
520
  class: "po9i64o",
520
521
  propsAsIs: !1
521
- }), zn = /* @__PURE__ */ o("span")({
522
+ }), ln = /* @__PURE__ */ i("span")({
522
523
  name: "PointsUnits",
523
524
  class: "pe5g05h",
524
525
  propsAsIs: !1
525
- }), xn = ({
526
+ }), dn = ({
526
527
  title: e,
527
- points: t,
528
- isPlayingTimer: n,
529
- isTimer: i,
530
- questionType: r,
531
- timerDuration: c,
532
- onTimerExpired: m
533
- }) => /* @__PURE__ */ p(Mn, { "data-centeredItems": r === y.PREDICTION, children: [
534
- /* @__PURE__ */ p(Tn, { children: [
535
- e && /* @__PURE__ */ s(Nn, { children: e }),
536
- t !== void 0 && r !== y.POLL && /* @__PURE__ */ p(L, { children: [
537
- /* @__PURE__ */ s(yn, { name: "icon-trophy" }),
538
- /* @__PURE__ */ p(Dn, { children: [
539
- /* @__PURE__ */ s(Sn, { children: /* @__PURE__ */ s(pe, { value: t }) }),
540
- /* @__PURE__ */ s(zn, { children: "PTS" })
528
+ points: n,
529
+ isPlayingTimer: t,
530
+ isTimer: r,
531
+ questionType: o,
532
+ timerDuration: u,
533
+ onTimerExpired: c
534
+ }) => /* @__PURE__ */ a(sn, { style: { justifyContent: o === p.PREDICTION ? "center" : "space-between" }, children: [
535
+ /* @__PURE__ */ a(nn, { children: [
536
+ e && /* @__PURE__ */ s(tn, { children: e }),
537
+ n !== void 0 && o !== p.POLL && /* @__PURE__ */ a(k, { children: [
538
+ /* @__PURE__ */ s(rn, { name: "icon-trophy" }),
539
+ /* @__PURE__ */ a(an, { children: [
540
+ /* @__PURE__ */ s(cn, { children: /* @__PURE__ */ s(X, { value: n }) }),
541
+ /* @__PURE__ */ s(ln, { children: "PTS" })
541
542
  ] })
542
543
  ] })
543
544
  ] }),
544
- i && r !== y.PREDICTION && /* @__PURE__ */ s(vn, { isPlaying: n, onTimerExpired: m, duration: c })
545
- ] }), On = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
546
- var r, c;
547
- const m = e.subject, l = e.type, d = e.status, I = (r = e.options) == null ? void 0 : r.options, g = e.marketClosed, [S, v] = $(!1), [N, z] = $(!1), [a, h] = $(!0), [u, f] = $(!1), [M, D] = $(""), T = e == null ? void 0 : e.id;
548
- fe(() => {
549
- l === y.PREDICTION ? g && h(!1) : d === R.RESOLVED && h(!1);
545
+ r && o !== p.PREDICTION && /* @__PURE__ */ s(en, { isPlaying: t, onTimerExpired: c, duration: u })
546
+ ] }), un = ({ openedQuestion: e, isLoading: n, vote: t, close: r }) => {
547
+ var o, u;
548
+ const c = e.subject, l = e.type, d = e.status, I = (o = e.options) == null ? void 0 : o.options, m = e.marketClosed, [M, N] = E(!1), [D, O] = E(!1), [v, C] = E(!0), [y, $] = E(!1), [z, x] = E(""), b = e == null ? void 0 : e.id;
549
+ ee(() => {
550
+ l === p.PREDICTION ? m && C(!1) : d === S.RESOLVED && C(!1);
550
551
  }, []);
551
- const x = q((C) => {
552
- z(C), v(!0);
553
- }, []), O = q(
554
- async (C) => {
555
- if (T) {
556
- const U = C.currentTarget.value;
557
- D(U), await n(T, U);
552
+ const J = V((g) => {
553
+ O(g), N(!0);
554
+ }, []), Q = V(
555
+ async (g) => {
556
+ if (b) {
557
+ const q = g.currentTarget.value;
558
+ x(q), await t(b, q);
558
559
  }
559
560
  },
560
- [T, D, n]
561
- ), k = q(() => {
562
- f(!0), setTimeout(i, 3e3);
563
- }, [i]), A = E(
564
- () => e == null ? void 0 : e.answers.find((C) => C.youVoted === !0),
561
+ [b, x, t]
562
+ ), _ = V(() => {
563
+ $(!0), setTimeout(r, 3e3);
564
+ }, [r]), h = j(
565
+ () => e == null ? void 0 : e.answers.find((g) => g.youVoted === !0),
565
566
  [e]
566
- ), b = E(
567
- () => !!(e != null && e.answers.find((C) => C.correct === !0)),
567
+ ), T = j(
568
+ () => !!(e != null && e.answers.find((g) => g.correct === !0)),
568
569
  [e]
569
- ), j = E(
570
- () => e == null ? void 0 : e.answers.find((C) => C.correct === !0),
570
+ ), f = j(
571
+ () => e == null ? void 0 : e.answers.find((g) => g.correct === !0),
571
572
  [e]
572
- ), se = E(() => e ? e.answers.map((C) => {
573
- var U;
573
+ ), Te = j(() => e ? e.answers.map((g) => {
574
+ var q;
574
575
  return {
575
- ...C,
576
- questionVoted: !!A,
577
- youSelected: M === C.id,
578
- isLoading: t,
579
- hasCorrectAnswer: b,
576
+ ...g,
577
+ questionVoted: !!h,
578
+ youSelected: z === g.id,
579
+ isLoading: n,
580
+ hasCorrectAnswer: T,
580
581
  questionType: e.type,
581
- answerTimeExpired: u,
582
+ answerTimeExpired: y,
582
583
  questionStatus: d,
583
- imageMode: (U = e.appearance) == null ? void 0 : U.images,
584
- onVote: O
584
+ imageMode: (q = e.appearance) == null ? void 0 : q.images,
585
+ onVote: Q
585
586
  };
586
587
  }) : [], [
587
- b,
588
- u,
589
- t,
588
+ T,
589
+ y,
590
+ n,
590
591
  e,
591
- A,
592
+ h,
592
593
  d,
593
- O,
594
- M
595
- ]), ie = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, Q = d === R.RESOLVED && l === y.TRIVIA && !A && !a, Z = l === y.TRIVIA && N && S && a, J = E(() => l === y.PREDICTION ? !!(A && !b || A && b && j != null && j.youVoted) : !0, [l, A, b, j]), K = E(() => {
596
- if (l === y.PREDICTION && A && (!b || b && j != null && j.youVoted))
597
- return A.points;
598
- if (!(Q || u))
599
- return d === R.RESOLVED ? 0 : A ? A.correct ? A.points : 0 : j == null ? void 0 : j.points;
594
+ Q,
595
+ z
596
+ ]), ve = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, R = d === S.RESOLVED && l === p.TRIVIA && !h && !v, ie = l === p.TRIVIA && D && M && v, oe = j(() => l === p.PREDICTION ? !!(h && !T || h && T && f != null && f.youVoted) : !0, [l, h, T, f]), ye = j(() => {
597
+ if (l === p.PREDICTION && h && (!T || T && f != null && f.youVoted))
598
+ return h.points;
599
+ if (!(R || y))
600
+ return d === S.RESOLVED ? 0 : h ? h.correct ? h.points : 0 : f == null ? void 0 : f.points;
600
601
  }, [
601
- u,
602
- A,
603
- j,
602
+ y,
603
+ h,
604
+ f,
604
605
  d,
605
- Q,
606
+ R,
606
607
  l,
607
- b
608
- ]), W = E(() => l === y.PREDICTION && A ? b ? b && j != null && j.youVoted ? "You won" : "" : "To win" : Q || u ? "Time expired" : l === y.POLL ? "Time remaining" : A ? "You won" : "To win", [u, l, A, Q, b, j]), re = A || Q || Z || l === y.TRIVIA && d === R.RESOLVED && a;
609
- return /* @__PURE__ */ s(Ie, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ p(Wt, { children: [
608
+ T
609
+ ]), fe = j(() => l === p.PREDICTION && h ? T ? T && f != null && f.youVoted ? "You won" : "" : "To win" : R || y ? "Time expired" : l === p.POLL ? "Time remaining" : h ? "You won" : "To win", [y, l, h, R, T, f]), xe = h || R || ie || l === p.TRIVIA && d === S.RESOLVED && v;
610
+ return /* @__PURE__ */ s(je, { "data-question-header": "true", children: /* @__PURE__ */ s(ks, { children: /* @__PURE__ */ a(zs, { children: [
610
611
  /* @__PURE__ */ s(
611
- Yt,
612
+ js,
612
613
  {
613
- feedbackMessages: ie,
614
- questionVoted: !!A,
615
- questionVotedCorrectly: A == null ? void 0 : A.correct,
614
+ feedbackMessages: ve,
615
+ questionVoted: !!h,
616
+ questionVotedCorrectly: h == null ? void 0 : h.correct,
616
617
  questionType: l,
617
- hasCorrectAnswer: b,
618
+ hasCorrectAnswer: T,
618
619
  questionStatus: d,
619
- showExpiredNotification: Q,
620
- showClosedNotificationTrivia: Z,
621
- votedInCurrentRender: S,
622
- votedAfterQuestionClosed: N,
623
- enteredAnActiveQuestion: a,
624
- marketClosed: g
620
+ showExpiredNotification: R,
621
+ showClosedNotificationTrivia: ie,
622
+ votedInCurrentRender: M,
623
+ votedAfterQuestionClosed: D,
624
+ enteredAnActiveQuestion: v,
625
+ marketClosed: m
625
626
  }
626
627
  ),
627
- J && /* @__PURE__ */ s(
628
- xn,
628
+ oe && /* @__PURE__ */ s(
629
+ dn,
629
630
  {
630
- title: W,
631
- points: K,
632
- onTimerExpired: k,
631
+ title: fe,
632
+ points: ye,
633
+ onTimerExpired: _,
633
634
  questionType: e.type,
634
- isTimer: !t,
635
- isPlayingTimer: !A,
636
- timerDuration: re ? 0 : Number(((c = e == null ? void 0 : e.appearance) == null ? void 0 : c.autoHideInterval) || "30")
635
+ isTimer: !n,
636
+ isPlayingTimer: !h,
637
+ timerDuration: xe ? 0 : Number(((u = e == null ? void 0 : e.appearance) == null ? void 0 : u.autoHideInterval) || "30")
637
638
  }
638
639
  ),
639
- u ? /* @__PURE__ */ s(
640
- Qt,
640
+ y ? /* @__PURE__ */ s(
641
+ Ts,
641
642
  {
642
643
  title: "More to come...",
643
644
  description: "Watch for additional enhanced stream interactive experience."
644
645
  }
645
- ) : /* @__PURE__ */ p(L, { children: [
646
- /* @__PURE__ */ s(Ft, { "data-withoutWinBar": !J, children: m }),
647
- /* @__PURE__ */ s(Bt, { children: se.map((C) => /* @__PURE__ */ s(
648
- pn,
646
+ ) : /* @__PURE__ */ a(k, { children: [
647
+ /* @__PURE__ */ s(Es, { style: oe ? {} : { marginTop: 0 }, children: c }),
648
+ /* @__PURE__ */ s(Ss, { children: Te.map((g) => /* @__PURE__ */ s(
649
+ Gs,
649
650
  {
650
- ...C,
651
- markThatVoted: x,
652
- votedAfterQuestionClosed: N,
653
- enteredAnActiveQuestion: a,
654
- marketClosed: g
651
+ ...g,
652
+ markThatVoted: J,
653
+ votedAfterQuestionClosed: D,
654
+ enteredAnActiveQuestion: v,
655
+ marketClosed: m
655
656
  },
656
- C.id
657
+ g.id
657
658
  )) })
658
659
  ] })
659
660
  ] }) }) });
660
- }, bn = /* @__PURE__ */ o("div")({
661
+ }, pn = /* @__PURE__ */ i("div")({
661
662
  name: "Container",
662
663
  class: "cgn5uen",
663
664
  propsAsIs: !1
664
- }), Cn = /* @__PURE__ */ o("div")({
665
+ }), In = /* @__PURE__ */ i("div")({
665
666
  name: "Content",
666
667
  class: "c1px8nt6",
667
668
  propsAsIs: !1
668
- }), jn = /* @__PURE__ */ o("h3")({
669
+ }), mn = /* @__PURE__ */ i("h3")({
669
670
  name: "Title",
670
671
  class: "t5et2jt",
671
672
  propsAsIs: !1
672
- }), wn = /* @__PURE__ */ o("div")({
673
+ }), Mn = /* @__PURE__ */ i("div")({
673
674
  name: "Description",
674
675
  class: "d1i2kpk2",
675
676
  propsAsIs: !1
676
- }), kn = /* @__PURE__ */ o("div")({
677
+ }), hn = /* @__PURE__ */ i("div")({
677
678
  name: "DateWrap",
678
679
  class: "dd3lh3p",
679
680
  propsAsIs: !1
680
- }), En = /* @__PURE__ */ o("img")({
681
+ }), Nn = /* @__PURE__ */ i("img")({
681
682
  name: "Image",
682
683
  class: "i1gfjeu5",
683
684
  propsAsIs: !1
684
- }), Ye = ({
685
+ }), ge = ({
685
686
  created: e,
686
- image: t,
687
- title: n,
688
- isPickHistory: i,
689
- instantView: r
687
+ image: n,
688
+ title: t,
689
+ isPickHistory: r,
690
+ instantView: o,
691
+ notification: u
690
692
  }) => {
691
- const c = E(() => {
693
+ const c = j(() => {
692
694
  if (e) {
693
- const l = new Date(e);
694
- if (Me(l))
695
+ const d = new Date(e);
696
+ if (te(d))
695
697
  return {
696
- date: ge(l),
697
- time: ve(l)
698
+ date: se(d),
699
+ time: ne(d)
698
700
  };
699
701
  }
700
702
  return null;
701
- }, [e]), m = (r == null ? void 0 : r.image) || t;
702
- return /* @__PURE__ */ p(bn, { children: [
703
- c && /* @__PURE__ */ p(kn, { children: [
703
+ }, [e]), l = (o == null ? void 0 : o.image) || n;
704
+ return /* @__PURE__ */ a(pn, { children: [
705
+ c && /* @__PURE__ */ a(hn, { children: [
704
706
  c.date,
705
707
  " · ",
706
708
  c.time
707
709
  ] }),
708
- (r == null ? void 0 : r.video) && /* @__PURE__ */ s(We, { source: r.video.url, poster: r.video.thumbnailUrl }),
709
- m && !(r != null && r.video) && /* @__PURE__ */ s(En, { src: m }),
710
- /* @__PURE__ */ p(Cn, { children: [
711
- /* @__PURE__ */ s(jn, { children: i ? n : r == null ? void 0 : r.heading }),
712
- !i && /* @__PURE__ */ s(wn, { children: r == null ? void 0 : r.body })
710
+ (o == null ? void 0 : o.video) && /* @__PURE__ */ s(ke, { source: o.video.url, poster: o.video.thumbnailUrl }),
711
+ l && !(o != null && o.video) && /* @__PURE__ */ s(Nn, { src: l }),
712
+ /* @__PURE__ */ a(In, { children: [
713
+ /* @__PURE__ */ s(mn, { children: r ? t : o == null ? void 0 : o.heading }),
714
+ /* @__PURE__ */ s(Mn, { children: r ? u == null ? void 0 : u.body : o == null ? void 0 : o.body })
713
715
  ] })
714
716
  ] });
715
- }, Ln = /* @__PURE__ */ o("div")({
717
+ }, An = /* @__PURE__ */ i("div")({
716
718
  name: "Container",
717
719
  class: "c1euiow",
718
720
  propsAsIs: !1
719
- }), $n = /* @__PURE__ */ o("a")({
721
+ }), Dn = /* @__PURE__ */ i("a")({
720
722
  name: "WebLinkBtn",
721
723
  class: "w19zie3h",
722
724
  propsAsIs: !1
723
- }), Rn = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Ln, { children: [
724
- /* @__PURE__ */ s(Ye, { instantView: e, ...t }),
725
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p($n, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
725
+ }), gn = ({ instantView: e, ...n }) => /* @__PURE__ */ a(An, { children: [
726
+ /* @__PURE__ */ s(ge, { instantView: e, ...n }),
727
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ a(Dn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
726
728
  e == null ? void 0 : e.webLink.label,
727
- /* @__PURE__ */ s(w, { name: "icon-external-link" })
729
+ /* @__PURE__ */ s(A, { name: "icon-external-link" })
728
730
  ] })
729
- ] }), Qn = /* @__PURE__ */ o("div")({
731
+ ] }), Tn = /* @__PURE__ */ i("div")({
730
732
  name: "Container",
731
733
  class: "c1dcxmvf",
732
734
  propsAsIs: !1
733
- }), Un = /* @__PURE__ */ o("div")({
735
+ }), vn = /* @__PURE__ */ i("div")({
734
736
  name: "DateTime",
735
737
  class: "db4q22c",
736
738
  propsAsIs: !1
737
- }), Pn = /* @__PURE__ */ o("blockquote")({
739
+ }), yn = /* @__PURE__ */ i("blockquote")({
738
740
  name: "Quote",
739
741
  class: "q111mmic",
740
742
  propsAsIs: !1
741
- }), qn = ({ created: e, ...t }) => {
742
- const n = E(() => {
743
+ }), fn = ({ created: e, ...n }) => {
744
+ const t = j(() => {
743
745
  if (e) {
744
- const i = new Date(e);
745
- if (Me(i))
746
+ const r = new Date(e);
747
+ if (te(r))
746
748
  return {
747
- date: ge(i),
748
- time: ve(i)
749
+ date: se(r),
750
+ time: ne(r)
749
751
  };
750
752
  }
751
753
  return null;
752
754
  }, [e]);
753
- return /* @__PURE__ */ p(Qn, { children: [
754
- n && /* @__PURE__ */ p(Un, { children: [
755
- n.date,
755
+ return /* @__PURE__ */ a(Tn, { children: [
756
+ t && /* @__PURE__ */ a(vn, { children: [
757
+ t.date,
756
758
  " · ",
757
- n.time
759
+ t.time
758
760
  ] }),
759
- t.title && /* @__PURE__ */ s(Pn, { children: t.title }),
760
- /* @__PURE__ */ s(Le, { ...t })
761
+ n.title && /* @__PURE__ */ s(yn, { children: n.title }),
762
+ /* @__PURE__ */ s(me, { ...n })
761
763
  ] });
762
- }, _n = /* @__PURE__ */ o("div")({
764
+ }, xn = /* @__PURE__ */ i("div")({
763
765
  name: "QuestionContainer",
764
766
  class: "qdri6g3",
765
767
  propsAsIs: !1
766
- }), Yn = ({
768
+ }), jn = ({
767
769
  openedQuestion: e
768
770
  }) => {
769
- var t, n;
770
- return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(Rn, {
771
+ var n, t;
772
+ return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(gn, {
771
773
  created: e.attributes.created,
772
774
  ...e.attributes.attributes.value
773
- }) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(qn, {
775
+ }) : ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "tweet" ? /* @__PURE__ */ s(fn, {
774
776
  created: e.attributes.created,
775
777
  ...e.attributes.attributes.value
776
778
  }) : null;
777
- }, Vn = ({
779
+ }, kn = ({
778
780
  extendedQuestion: e,
779
- vote: t,
780
- close: n
781
+ vote: n,
782
+ close: t
781
783
  }) => {
782
784
  const {
783
- loading: i,
784
- data: r
785
+ loading: r,
786
+ data: o
785
787
  } = e;
786
- return r ? /* @__PURE__ */ s(On, {
787
- vote: t,
788
- close: n,
789
- openedQuestion: r,
790
- isLoading: !!i
788
+ return o ? /* @__PURE__ */ s(un, {
789
+ vote: n,
790
+ close: t,
791
+ openedQuestion: o,
792
+ isLoading: !!r
791
793
  }) : null;
792
- }, Wn = ({
794
+ }, zn = ({
793
795
  gamification: e
794
796
  }) => {
795
- var t;
796
- const n = _(e.openedQuestion.$store), i = _(e.openedQuestion.$extendedStore);
797
- if (!n)
797
+ var n;
798
+ const t = w(e.openedQuestion.$store), r = w(e.openedQuestion.$extendedStore);
799
+ if (!t)
798
800
  return null;
799
- const r = n.type;
800
- return /* @__PURE__ */ p(_n, {
801
- children: [/* @__PURE__ */ s(Qe, {
801
+ const o = t.type;
802
+ return /* @__PURE__ */ a(xn, {
803
+ children: [/* @__PURE__ */ s(Me, {
802
804
  close: e.closeQuestion,
803
- type: ((t = n.attributes) == null ? void 0 : t.type) || y.UNSET
804
- }), r === "question" && /* @__PURE__ */ s(Vn, {
805
+ type: ((n = t.attributes) == null ? void 0 : n.type) || p.UNSET
806
+ }), o === "question" && /* @__PURE__ */ s(kn, {
805
807
  vote: e.submitAnswer,
806
808
  close: e.closeQuestion,
807
- extendedQuestion: i
808
- }), r !== "question" && /* @__PURE__ */ s(Yn, {
809
- openedQuestion: n
810
- }), /* @__PURE__ */ s(Et, {
809
+ extendedQuestion: r
810
+ }), o !== "question" && /* @__PURE__ */ s(jn, {
811
+ openedQuestion: t
812
+ }), /* @__PURE__ */ s(Ns, {
811
813
  sponsorLogo: ""
812
814
  })]
813
815
  });
814
- }, Fn = /* @__PURE__ */ o("div")({
816
+ }, En = /* @__PURE__ */ i("div")({
815
817
  name: "Container",
816
818
  class: "c115qtkr",
817
819
  propsAsIs: !1
818
- }), Bn = /* @__PURE__ */ o("div")({
820
+ }), Sn = /* @__PURE__ */ i("div")({
819
821
  name: "STabs",
820
822
  class: "sxnslc8",
821
823
  propsAsIs: !1
822
- }), Hn = /* @__PURE__ */ o("button")({
824
+ }), On = /* @__PURE__ */ i("button")({
823
825
  name: "Button",
824
826
  class: "b1umzux0",
825
827
  propsAsIs: !1
826
- }), Gn = /* @__PURE__ */ o("span")({
828
+ }), Cn = /* @__PURE__ */ i("span")({
827
829
  name: "Title",
828
830
  class: "tspsaas",
829
831
  propsAsIs: !1
830
832
  });
831
- var G = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(G || {});
832
- const Se = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Hn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Gn, { children: e }) }), Zn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Fn, { children: /* @__PURE__ */ p(Bn, { "data-position": e === "home" ? "left" : "right", children: [
833
- /* @__PURE__ */ s(Se, { title: "Home", active: e === "home", onClick: () => t(
833
+ var H = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(H || {});
834
+ const de = ({ title: e, active: n, onClick: t }) => /* @__PURE__ */ s(On, { onClick: t, "data-selected": n, children: /* @__PURE__ */ s(Cn, { children: e }) }), bn = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(En, { children: /* @__PURE__ */ a(Sn, { "data-position": e === "home" ? "left" : "right", children: [
835
+ /* @__PURE__ */ s(de, { title: "Home", active: e === "home", onClick: () => n(
834
836
  "home"
835
837
  /* HOME */
836
838
  ) }),
837
839
  /* @__PURE__ */ s(
838
- Se,
840
+ de,
839
841
  {
840
842
  title: "Friends",
841
843
  active: e === "leaderboard",
842
- onClick: () => t(
844
+ onClick: () => n(
843
845
  "leaderboard"
844
846
  /* LEADERBOARD */
845
847
  )
846
848
  }
847
849
  )
848
850
  ] }) });
849
- function me() {
850
- return me = Object.assign ? Object.assign.bind() : function(e) {
851
- for (var t = 1; t < arguments.length; t++) {
852
- var n = arguments[t];
853
- for (var i in n)
854
- Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
855
- }
856
- return e;
857
- }, me.apply(this, arguments);
858
- }
859
- function ze(e) {
860
- if (e === void 0)
861
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
862
- return e;
863
- }
864
- function he(e, t) {
865
- return he = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
866
- return i.__proto__ = r, i;
867
- }, he(e, t);
868
- }
869
- function Jn(e, t) {
870
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, he(e, t);
871
- }
872
- var xe = Number.isNaN || function(t) {
873
- return typeof t == "number" && t !== t;
874
- };
875
- function Kn(e, t) {
876
- return !!(e === t || xe(e) && xe(t));
877
- }
878
- function Xn(e, t) {
879
- if (e.length !== t.length)
880
- return !1;
881
- for (var n = 0; n < e.length; n++)
882
- if (!Kn(e[n], t[n]))
883
- return !1;
884
- return !0;
885
- }
886
- function le(e, t) {
887
- t === void 0 && (t = Xn);
888
- var n, i = [], r, c = !1;
889
- function m() {
890
- for (var l = [], d = 0; d < arguments.length; d++)
891
- l[d] = arguments[d];
892
- return c && n === this && t(l, i) || (r = e.apply(this, l), c = !0, n = this, i = l), r;
893
- }
894
- return m;
895
- }
896
- var es = typeof performance == "object" && typeof performance.now == "function", Oe = es ? function() {
897
- return performance.now();
898
- } : function() {
899
- return Date.now();
900
- };
901
- function be(e) {
902
- cancelAnimationFrame(e.id);
903
- }
904
- function ts(e, t) {
905
- var n = Oe();
906
- function i() {
907
- Oe() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
908
- }
909
- var r = {
910
- id: requestAnimationFrame(i)
911
- };
912
- return r;
913
- }
914
- var ce = -1;
915
- function Ce(e) {
916
- if (e === void 0 && (e = !1), ce === -1 || e) {
917
- var t = document.createElement("div"), n = t.style;
918
- n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), ce = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
919
- }
920
- return ce;
921
- }
922
- var V = null;
923
- function je(e) {
924
- if (e === void 0 && (e = !1), V === null || e) {
925
- var t = document.createElement("div"), n = t.style;
926
- n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
927
- var i = document.createElement("div"), r = i.style;
928
- return r.width = "100px", r.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? V = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? V = "negative" : V = "positive-ascending"), document.body.removeChild(t), V;
929
- }
930
- return V;
931
- }
932
- var ns = 150, ss = function(t, n) {
933
- return t;
934
- };
935
- function is(e) {
936
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, c = e.getOffsetForIndexAndAlignment, m = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, d = e.initInstanceProps, I = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
937
- return t = /* @__PURE__ */ function(S) {
938
- Jn(v, S);
939
- function v(z) {
940
- var a;
941
- return a = S.call(this, z) || this, a._instanceProps = d(a.props, ze(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
942
- instance: ze(a),
943
- isScrolling: !1,
944
- scrollDirection: "forward",
945
- scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
946
- scrollUpdateWasRequested: !1
947
- }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = le(function(h, u, f, M) {
948
- return a.props.onItemsRendered({
949
- overscanStartIndex: h,
950
- overscanStopIndex: u,
951
- visibleStartIndex: f,
952
- visibleStopIndex: M
953
- });
954
- }), a._callOnScroll = void 0, a._callOnScroll = le(function(h, u, f) {
955
- return a.props.onScroll({
956
- scrollDirection: h,
957
- scrollOffset: u,
958
- scrollUpdateWasRequested: f
959
- });
960
- }), a._getItemStyle = void 0, a._getItemStyle = function(h) {
961
- var u = a.props, f = u.direction, M = u.itemSize, D = u.layout, T = a._getItemStyleCache(I && M, I && D, I && f), x;
962
- if (T.hasOwnProperty(h))
963
- x = T[h];
964
- else {
965
- var O = n(a.props, h, a._instanceProps), k = r(a.props, h, a._instanceProps), A = f === "horizontal" || D === "horizontal", b = f === "rtl", j = A ? O : 0;
966
- T[h] = x = {
967
- position: "absolute",
968
- left: b ? void 0 : j,
969
- right: b ? j : void 0,
970
- top: A ? 0 : O,
971
- height: A ? "100%" : k,
972
- width: A ? k : "100%"
973
- };
974
- }
975
- return x;
976
- }, a._getItemStyleCache = void 0, a._getItemStyleCache = le(function(h, u, f) {
977
- return {};
978
- }), a._onScrollHorizontal = function(h) {
979
- var u = h.currentTarget, f = u.clientWidth, M = u.scrollLeft, D = u.scrollWidth;
980
- a.setState(function(T) {
981
- if (T.scrollOffset === M)
982
- return null;
983
- var x = a.props.direction, O = M;
984
- if (x === "rtl")
985
- switch (je()) {
986
- case "negative":
987
- O = -M;
988
- break;
989
- case "positive-descending":
990
- O = D - f - M;
991
- break;
992
- }
993
- return O = Math.max(0, Math.min(O, D - f)), {
994
- isScrolling: !0,
995
- scrollDirection: T.scrollOffset < M ? "forward" : "backward",
996
- scrollOffset: O,
997
- scrollUpdateWasRequested: !1
998
- };
999
- }, a._resetIsScrollingDebounced);
1000
- }, a._onScrollVertical = function(h) {
1001
- var u = h.currentTarget, f = u.clientHeight, M = u.scrollHeight, D = u.scrollTop;
1002
- a.setState(function(T) {
1003
- if (T.scrollOffset === D)
1004
- return null;
1005
- var x = Math.max(0, Math.min(D, M - f));
1006
- return {
1007
- isScrolling: !0,
1008
- scrollDirection: T.scrollOffset < x ? "forward" : "backward",
1009
- scrollOffset: x,
1010
- scrollUpdateWasRequested: !1
1011
- };
1012
- }, a._resetIsScrollingDebounced);
1013
- }, a._outerRefSetter = function(h) {
1014
- var u = a.props.outerRef;
1015
- a._outerRef = h, typeof u == "function" ? u(h) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = h);
1016
- }, a._resetIsScrollingDebounced = function() {
1017
- a._resetIsScrollingTimeoutId !== null && be(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = ts(a._resetIsScrolling, ns);
1018
- }, a._resetIsScrolling = function() {
1019
- a._resetIsScrollingTimeoutId = null, a.setState({
1020
- isScrolling: !1
1021
- }, function() {
1022
- a._getItemStyleCache(-1, null);
1023
- });
1024
- }, a;
1025
- }
1026
- v.getDerivedStateFromProps = function(a, h) {
1027
- return rs(a, h), g(a), null;
1028
- };
1029
- var N = v.prototype;
1030
- return N.scrollTo = function(a) {
1031
- a = Math.max(0, a), this.setState(function(h) {
1032
- return h.scrollOffset === a ? null : {
1033
- scrollDirection: h.scrollOffset < a ? "forward" : "backward",
1034
- scrollOffset: a,
1035
- scrollUpdateWasRequested: !0
1036
- };
1037
- }, this._resetIsScrollingDebounced);
1038
- }, N.scrollToItem = function(a, h) {
1039
- h === void 0 && (h = "auto");
1040
- var u = this.props, f = u.itemCount, M = u.layout, D = this.state.scrollOffset;
1041
- a = Math.max(0, Math.min(a, f - 1));
1042
- var T = 0;
1043
- if (this._outerRef) {
1044
- var x = this._outerRef;
1045
- M === "vertical" ? T = x.scrollWidth > x.clientWidth ? Ce() : 0 : T = x.scrollHeight > x.clientHeight ? Ce() : 0;
1046
- }
1047
- this.scrollTo(c(this.props, a, h, D, this._instanceProps, T));
1048
- }, N.componentDidMount = function() {
1049
- var a = this.props, h = a.direction, u = a.initialScrollOffset, f = a.layout;
1050
- if (typeof u == "number" && this._outerRef != null) {
1051
- var M = this._outerRef;
1052
- h === "horizontal" || f === "horizontal" ? M.scrollLeft = u : M.scrollTop = u;
1053
- }
1054
- this._callPropsCallbacks();
1055
- }, N.componentDidUpdate = function() {
1056
- var a = this.props, h = a.direction, u = a.layout, f = this.state, M = f.scrollOffset, D = f.scrollUpdateWasRequested;
1057
- if (D && this._outerRef != null) {
1058
- var T = this._outerRef;
1059
- if (h === "horizontal" || u === "horizontal")
1060
- if (h === "rtl")
1061
- switch (je()) {
1062
- case "negative":
1063
- T.scrollLeft = -M;
1064
- break;
1065
- case "positive-ascending":
1066
- T.scrollLeft = M;
1067
- break;
1068
- default:
1069
- var x = T.clientWidth, O = T.scrollWidth;
1070
- T.scrollLeft = O - x - M;
1071
- break;
1072
- }
1073
- else
1074
- T.scrollLeft = M;
1075
- else
1076
- T.scrollTop = M;
1077
- }
1078
- this._callPropsCallbacks();
1079
- }, N.componentWillUnmount = function() {
1080
- this._resetIsScrollingTimeoutId !== null && be(this._resetIsScrollingTimeoutId);
1081
- }, N.render = function() {
1082
- var a = this.props, h = a.children, u = a.className, f = a.direction, M = a.height, D = a.innerRef, T = a.innerElementType, x = a.innerTagName, O = a.itemCount, k = a.itemData, A = a.itemKey, b = A === void 0 ? ss : A, j = a.layout, se = a.outerElementType, ie = a.outerTagName, Q = a.style, Z = a.useIsScrolling, J = a.width, K = this.state.isScrolling, W = f === "horizontal" || j === "horizontal", re = W ? this._onScrollHorizontal : this._onScrollVertical, C = this._getRangeToRender(), U = C[0], Ve = C[1], Te = [];
1083
- if (O > 0)
1084
- for (var F = U; F <= Ve; F++)
1085
- Te.push(oe(h, {
1086
- data: k,
1087
- key: b(F, k),
1088
- index: F,
1089
- isScrolling: Z ? K : void 0,
1090
- style: this._getItemStyle(F)
1091
- }));
1092
- var Ne = i(this.props, this._instanceProps);
1093
- return oe(se || ie || "div", {
1094
- className: u,
1095
- onScroll: re,
1096
- ref: this._outerRefSetter,
1097
- style: me({
1098
- position: "relative",
1099
- height: M,
1100
- width: J,
1101
- overflow: "auto",
1102
- WebkitOverflowScrolling: "touch",
1103
- willChange: "transform",
1104
- direction: f
1105
- }, Q)
1106
- }, oe(T || x || "div", {
1107
- children: Te,
1108
- ref: D,
1109
- style: {
1110
- height: W ? "100%" : Ne,
1111
- pointerEvents: K ? "none" : void 0,
1112
- width: W ? Ne : "100%"
1113
- }
1114
- }));
1115
- }, N._callPropsCallbacks = function() {
1116
- if (typeof this.props.onItemsRendered == "function") {
1117
- var a = this.props.itemCount;
1118
- if (a > 0) {
1119
- var h = this._getRangeToRender(), u = h[0], f = h[1], M = h[2], D = h[3];
1120
- this._callOnItemsRendered(u, f, M, D);
1121
- }
1122
- }
1123
- if (typeof this.props.onScroll == "function") {
1124
- var T = this.state, x = T.scrollDirection, O = T.scrollOffset, k = T.scrollUpdateWasRequested;
1125
- this._callOnScroll(x, O, k);
1126
- }
1127
- }, N._getRangeToRender = function() {
1128
- var a = this.props, h = a.itemCount, u = a.overscanCount, f = this.state, M = f.isScrolling, D = f.scrollDirection, T = f.scrollOffset;
1129
- if (h === 0)
1130
- return [0, 0, 0, 0];
1131
- var x = m(this.props, T, this._instanceProps), O = l(this.props, x, T, this._instanceProps), k = !M || D === "backward" ? Math.max(1, u) : 1, A = !M || D === "forward" ? Math.max(1, u) : 1;
1132
- return [Math.max(0, x - k), Math.max(0, Math.min(h - 1, O + A)), x, O];
1133
- }, v;
1134
- }($e), t.defaultProps = {
1135
- direction: "ltr",
1136
- itemData: void 0,
1137
- layout: "vertical",
1138
- overscanCount: 2,
1139
- useIsScrolling: !1
1140
- }, t;
1141
- }
1142
- var rs = function(t, n) {
1143
- t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
1144
- }, os = /* @__PURE__ */ is({
1145
- getItemOffset: function(t, n) {
1146
- var i = t.itemSize;
1147
- return n * i;
1148
- },
1149
- getItemSize: function(t, n) {
1150
- var i = t.itemSize;
1151
- return i;
1152
- },
1153
- getEstimatedTotalSize: function(t) {
1154
- var n = t.itemCount, i = t.itemSize;
1155
- return i * n;
1156
- },
1157
- getOffsetForIndexAndAlignment: function(t, n, i, r, c, m) {
1158
- var l = t.direction, d = t.height, I = t.itemCount, g = t.itemSize, S = t.layout, v = t.width, N = l === "horizontal" || S === "horizontal", z = N ? v : d, a = Math.max(0, I * g - z), h = Math.min(a, n * g), u = Math.max(0, n * g - z + g + m);
1159
- switch (i === "smart" && (r >= u - z && r <= h + z ? i = "auto" : i = "center"), i) {
1160
- case "start":
1161
- return h;
1162
- case "end":
1163
- return u;
1164
- case "center": {
1165
- var f = Math.round(u + (h - u) / 2);
1166
- return f < Math.ceil(z / 2) ? 0 : f > a + Math.floor(z / 2) ? a : f;
1167
- }
1168
- case "auto":
1169
- default:
1170
- return r >= u && r <= h ? r : r < u ? u : h;
1171
- }
1172
- },
1173
- getStartIndexForOffset: function(t, n) {
1174
- var i = t.itemCount, r = t.itemSize;
1175
- return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
1176
- },
1177
- getStopIndexForStartIndex: function(t, n, i) {
1178
- var r = t.direction, c = t.height, m = t.itemCount, l = t.itemSize, d = t.layout, I = t.width, g = r === "horizontal" || d === "horizontal", S = n * l, v = g ? I : c, N = Math.ceil((v + i - S) / l);
1179
- return Math.max(0, Math.min(
1180
- m - 1,
1181
- n + N - 1
1182
- // -1 is because stop index is inclusive
1183
- ));
1184
- },
1185
- initInstanceProps: function(t) {
1186
- },
1187
- shouldResetStyleCacheOnItemSizeChange: !0,
1188
- validateProps: function(t) {
1189
- t.itemSize;
1190
- }
1191
- });
1192
- function as(e) {
1193
- var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
1194
- return !(i > n || r < t);
851
+ function Ln(e) {
852
+ var n = e.lastRenderedStartIndex, t = e.lastRenderedStopIndex, r = e.startIndex, o = e.stopIndex;
853
+ return !(r > t || o < n);
1195
854
  }
1196
- function ls(e) {
1197
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, c = e.stopIndex, m = [], l = null, d = null, I = r; I <= c; I++) {
1198
- var g = t(I);
1199
- g ? d !== null && (m.push(l, d), l = d = null) : (d = I, l === null && (l = I));
855
+ function wn(e) {
856
+ for (var n = e.isItemLoaded, t = e.itemCount, r = e.minimumBatchSize, o = e.startIndex, u = e.stopIndex, c = [], l = null, d = null, I = o; I <= u; I++) {
857
+ var m = n(I);
858
+ m ? d !== null && (c.push(l, d), l = d = null) : (d = I, l === null && (l = I));
1200
859
  }
1201
860
  if (d !== null) {
1202
- for (var S = Math.min(Math.max(d, l + i - 1), n - 1), v = d + 1; v <= S && !t(v); v++)
1203
- d = v;
1204
- m.push(l, d);
861
+ for (var M = Math.min(Math.max(d, l + r - 1), t - 1), N = d + 1; N <= M && !n(N); N++)
862
+ d = N;
863
+ c.push(l, d);
1205
864
  }
1206
- if (m.length)
1207
- for (; m[1] - m[0] + 1 < i && m[0] > 0; ) {
1208
- var N = m[0] - 1;
1209
- if (!t(N))
1210
- m[0] = N;
865
+ if (c.length)
866
+ for (; c[1] - c[0] + 1 < r && c[0] > 0; ) {
867
+ var D = c[0] - 1;
868
+ if (!n(D))
869
+ c[0] = D;
1211
870
  else
1212
871
  break;
1213
872
  }
1214
- return m;
873
+ return c;
1215
874
  }
1216
- var cs = function(e, t) {
1217
- if (!(e instanceof t))
875
+ var $n = function(e, n) {
876
+ if (!(e instanceof n))
1218
877
  throw new TypeError("Cannot call a class as a function");
1219
- }, ds = function() {
1220
- function e(t, n) {
1221
- for (var i = 0; i < n.length; i++) {
1222
- var r = n[i];
1223
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
878
+ }, Qn = function() {
879
+ function e(n, t) {
880
+ for (var r = 0; r < t.length; r++) {
881
+ var o = t[r];
882
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(n, o.key, o);
1224
883
  }
1225
884
  }
1226
- return function(t, n, i) {
1227
- return n && e(t.prototype, n), i && e(t, i), t;
885
+ return function(n, t, r) {
886
+ return t && e(n.prototype, t), r && e(n, r), n;
1228
887
  };
1229
- }(), us = function(e, t) {
1230
- if (typeof t != "function" && t !== null)
1231
- throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1232
- e.prototype = Object.create(t && t.prototype, {
888
+ }(), Rn = function(e, n) {
889
+ if (typeof n != "function" && n !== null)
890
+ throw new TypeError("Super expression must either be null or a function, not " + typeof n);
891
+ e.prototype = Object.create(n && n.prototype, {
1233
892
  constructor: {
1234
893
  value: e,
1235
894
  enumerable: !1,
1236
895
  writable: !0,
1237
896
  configurable: !0
1238
897
  }
1239
- }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1240
- }, we = function(e, t) {
898
+ }), n && (Object.setPrototypeOf ? Object.setPrototypeOf(e, n) : e.__proto__ = n);
899
+ }, ue = function(e, n) {
1241
900
  if (!e)
1242
901
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1243
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
1244
- }, ps = function(e) {
1245
- us(t, e);
1246
- function t() {
1247
- var n, i, r, c;
1248
- cs(this, t);
1249
- for (var m = arguments.length, l = Array(m), d = 0; d < m; d++)
902
+ return n && (typeof n == "object" || typeof n == "function") ? n : e;
903
+ };
904
+ (function(e) {
905
+ Rn(n, e);
906
+ function n() {
907
+ var t, r, o, u;
908
+ $n(this, n);
909
+ for (var c = arguments.length, l = Array(c), d = 0; d < c; d++)
1250
910
  l[d] = arguments[d];
1251
- return c = (i = (r = we(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(I) {
1252
- var g = I.visibleStartIndex, S = I.visibleStopIndex;
1253
- r._lastRenderedStartIndex = g, r._lastRenderedStopIndex = S, r._ensureRowsLoaded(g, S);
1254
- }, r._setRef = function(I) {
1255
- r._listRef = I;
1256
- }, i), we(r, c);
911
+ return u = (r = (o = ue(this, (t = n.__proto__ || Object.getPrototypeOf(n)).call.apply(t, [this].concat(l))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(I) {
912
+ var m = I.visibleStartIndex, M = I.visibleStopIndex;
913
+ o._lastRenderedStartIndex = m, o._lastRenderedStopIndex = M, o._ensureRowsLoaded(m, M);
914
+ }, o._setRef = function(I) {
915
+ o._listRef = I;
916
+ }, r), ue(o, u);
1257
917
  }
1258
- return ds(t, [{
918
+ return Qn(n, [{
1259
919
  key: "resetloadMoreItemsCache",
1260
920
  value: function() {
1261
- var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1262
- this._memoizedUnloadedRanges = [], i && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
921
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
922
+ this._memoizedUnloadedRanges = [], r && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1263
923
  }
1264
924
  }, {
1265
925
  key: "componentDidMount",
@@ -1268,143 +928,128 @@ var cs = function(e, t) {
1268
928
  }, {
1269
929
  key: "render",
1270
930
  value: function() {
1271
- var i = this.props.children;
1272
- return i({
931
+ var r = this.props.children;
932
+ return r({
1273
933
  onItemsRendered: this._onItemsRendered,
1274
934
  ref: this._setRef
1275
935
  });
1276
936
  }
1277
937
  }, {
1278
938
  key: "_ensureRowsLoaded",
1279
- value: function(i, r) {
1280
- var c = this.props, m = c.isItemLoaded, l = c.itemCount, d = c.minimumBatchSize, I = d === void 0 ? 10 : d, g = c.threshold, S = g === void 0 ? 15 : g, v = ls({
1281
- isItemLoaded: m,
939
+ value: function(r, o) {
940
+ var u = this.props, c = u.isItemLoaded, l = u.itemCount, d = u.minimumBatchSize, I = d === void 0 ? 10 : d, m = u.threshold, M = m === void 0 ? 15 : m, N = wn({
941
+ isItemLoaded: c,
1282
942
  itemCount: l,
1283
943
  minimumBatchSize: I,
1284
- startIndex: Math.max(0, i - S),
1285
- stopIndex: Math.min(l - 1, r + S)
944
+ startIndex: Math.max(0, r - M),
945
+ stopIndex: Math.min(l - 1, o + M)
1286
946
  });
1287
- (this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(N, z) {
1288
- return v[z] !== N;
1289
- })) && (this._memoizedUnloadedRanges = v, this._loadUnloadedRanges(v));
947
+ (this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(D, O) {
948
+ return N[O] !== D;
949
+ })) && (this._memoizedUnloadedRanges = N, this._loadUnloadedRanges(N));
1290
950
  }
1291
951
  }, {
1292
952
  key: "_loadUnloadedRanges",
1293
- value: function(i) {
1294
- for (var r = this, c = this.props.loadMoreItems || this.props.loadMoreRows, m = function(I) {
1295
- var g = i[I], S = i[I + 1], v = c(g, S);
1296
- v != null && v.then(function() {
1297
- if (as({
1298
- lastRenderedStartIndex: r._lastRenderedStartIndex,
1299
- lastRenderedStopIndex: r._lastRenderedStopIndex,
1300
- startIndex: g,
1301
- stopIndex: S
953
+ value: function(r) {
954
+ for (var o = this, u = this.props.loadMoreItems || this.props.loadMoreRows, c = function(I) {
955
+ var m = r[I], M = r[I + 1], N = u(m, M);
956
+ N != null && N.then(function() {
957
+ if (Ln({
958
+ lastRenderedStartIndex: o._lastRenderedStartIndex,
959
+ lastRenderedStopIndex: o._lastRenderedStopIndex,
960
+ startIndex: m,
961
+ stopIndex: M
1302
962
  })) {
1303
- if (r._listRef == null)
963
+ if (o._listRef == null)
1304
964
  return;
1305
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(g, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
965
+ typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(m, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
1306
966
  }
1307
967
  });
1308
- }, l = 0; l < i.length; l += 2)
1309
- m(l);
968
+ }, l = 0; l < r.length; l += 2)
969
+ c(l);
1310
970
  }
1311
- }]), t;
1312
- }($e);
1313
- const ms = /* @__PURE__ */ o("div")({
971
+ }]), n;
972
+ })(Ce);
973
+ const Un = /* @__PURE__ */ i("div")({
1314
974
  name: "Container",
1315
975
  class: "culdu4a",
1316
976
  propsAsIs: !1
1317
- }), hs = /* @__PURE__ */ o("div")({
977
+ }), qn = /* @__PURE__ */ i("div")({
1318
978
  name: "Position",
1319
979
  class: "pwf8e69",
1320
980
  propsAsIs: !1
1321
- }), Is = /* @__PURE__ */ o("img")({
981
+ }), Yn = /* @__PURE__ */ i("img")({
1322
982
  name: "Avatar",
1323
983
  class: "atf4yh4",
1324
984
  propsAsIs: !1
1325
- }), fs = /* @__PURE__ */ o("div")({
985
+ }), Pn = /* @__PURE__ */ i("div")({
1326
986
  name: "AvatarPlaceholder",
1327
987
  class: "a1dg29ja",
1328
988
  propsAsIs: !1
1329
- }), gs = /* @__PURE__ */ o("div")({
989
+ }), Vn = /* @__PURE__ */ i("div")({
1330
990
  name: "Content",
1331
991
  class: "c10a68rc",
1332
992
  propsAsIs: !1
1333
- }), vs = /* @__PURE__ */ o("div")({
993
+ }), _n = /* @__PURE__ */ i("div")({
1334
994
  name: "NameContainer",
1335
995
  class: "nc4kck5",
1336
996
  propsAsIs: !1
1337
- }), Ms = /* @__PURE__ */ o("span")({
997
+ }), Bn = /* @__PURE__ */ i("span")({
1338
998
  name: "Name",
1339
999
  class: "njsrqgr",
1340
1000
  propsAsIs: !1
1341
- }), Ts = () => w, Ns = /* @__PURE__ */ o(Ts())({
1001
+ }), Wn = () => A, Fn = /* @__PURE__ */ i(Wn())({
1342
1002
  name: "CurrentUserBadge",
1343
1003
  class: "c17uc4zr",
1344
1004
  propsAsIs: !0
1345
- }), As = ({
1005
+ }), Gn = ({
1346
1006
  rank: e,
1347
- avatar: t,
1348
- name: n,
1349
- points: i,
1350
- isCurrentUser: r,
1351
- openItemDetail: c,
1352
- style: m
1353
- }) => /* @__PURE__ */ p(ms, { onClick: c, style: m, children: [
1354
- /* @__PURE__ */ s(hs, { children: e || 0 }),
1355
- /* @__PURE__ */ p(gs, { children: [
1356
- t ? /* @__PURE__ */ s(Is, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(fs, { children: Ue(n || "") }),
1357
- /* @__PURE__ */ p(vs, { children: [
1358
- /* @__PURE__ */ s(Ms, { children: n || "" }),
1359
- r && /* @__PURE__ */ s(Ns, { name: "icon-star" })
1007
+ avatar: n,
1008
+ name: t,
1009
+ points: r,
1010
+ isCurrentUser: o,
1011
+ openItemDetail: u,
1012
+ style: c
1013
+ }) => /* @__PURE__ */ a(Un, { onClick: u, style: c, children: [
1014
+ /* @__PURE__ */ s(qn, { children: e || 0 }),
1015
+ /* @__PURE__ */ a(Vn, { children: [
1016
+ n ? /* @__PURE__ */ s(Yn, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(Pn, { children: he(t || "") }),
1017
+ /* @__PURE__ */ a(_n, { children: [
1018
+ /* @__PURE__ */ s(Bn, { children: t || "" }),
1019
+ o && /* @__PURE__ */ s(Fn, { name: "icon-star" })
1360
1020
  ] })
1361
1021
  ] }),
1362
- /* @__PURE__ */ s("div", { children: Pe(i) })
1363
- ] }), ys = /* @__PURE__ */ o("div")({
1364
- name: "ScrollContainer",
1365
- class: "s13d8sg6",
1022
+ /* @__PURE__ */ s("div", { children: Ne(r) })
1023
+ ] }), Zn = /* @__PURE__ */ i("div")({
1024
+ name: "Container",
1025
+ class: "c16btbfp",
1366
1026
  propsAsIs: !1
1367
- }), Ds = ({
1027
+ }), Hn = ({
1368
1028
  items: e,
1369
- currentUserId: t,
1370
- openItemDetail: n,
1371
- fetchMore: i,
1372
- onScroll: r
1373
- }) => /* @__PURE__ */ s(Fe, { children: ({ width: c, height: m }) => /* @__PURE__ */ s(
1374
- ps,
1375
- {
1376
- isItemLoaded: (l) => l < e.length,
1377
- itemCount: e.length + 1,
1378
- loadMoreItems: i,
1379
- children: ({ onItemsRendered: l, ref: d }) => /* @__PURE__ */ s(ys, { children: /* @__PURE__ */ s(
1380
- os,
1381
- {
1382
- itemSize: 56,
1383
- onScroll: r,
1384
- onItemsRendered: l,
1385
- ref: d,
1386
- itemCount: e.length,
1387
- width: c,
1388
- height: m,
1389
- children: ({ index: I, style: g }) => /* @__PURE__ */ s(
1390
- As,
1391
- {
1392
- style: { ...g, maxHeight: 48 },
1393
- ...e[I],
1394
- openItemDetail: () => n(e[I].userId),
1395
- isCurrentUser: !!t && t === e[I].userId
1396
- },
1397
- e[I].userId
1398
- )
1399
- }
1400
- ) })
1401
- }
1402
- ) }), Ss = ({ deepLink: e }) => {
1403
- const { data: t } = _(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
1029
+ currentUserId: n,
1030
+ openItemDetail: t,
1031
+ fetchMore: r,
1032
+ scrollNode: o,
1033
+ hasMore: u
1034
+ }) => /* @__PURE__ */ s(we, {
1035
+ loadMore: r,
1036
+ initialLoad: !1,
1037
+ hasMore: u,
1038
+ useWindow: !1,
1039
+ getScrollParent: () => o.current,
1040
+ children: /* @__PURE__ */ s(Zn, {
1041
+ children: e.map((c) => /* @__PURE__ */ s(Gn, {
1042
+ ...c,
1043
+ openItemDetail: () => t(c.userId),
1044
+ isCurrentUser: !!n && n === c.userId
1045
+ }, c.userId))
1046
+ })
1047
+ }), Jn = ({ deepLink: e }) => {
1048
+ const { data: n } = w(e.$store), t = n == null ? void 0 : n.url, r = e.desktopLink;
1404
1049
  return /* @__PURE__ */ s(
1405
- Be,
1050
+ ze,
1406
1051
  {
1407
- inviteLink: n || i,
1052
+ inviteLink: t || r,
1408
1053
  socialLinks: [
1409
1054
  {
1410
1055
  icon: "icon-facebook",
@@ -1421,300 +1066,261 @@ const ms = /* @__PURE__ */ o("div")({
1421
1066
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1422
1067
  }
1423
1068
  );
1424
- }, zs = ({ gamification: e, hideTabs: t }) => {
1425
- const { data: n } = _(e.leaderboardList.$store), i = ue(0), r = q(
1426
- Re((c) => {
1427
- Math.abs(i.current - c.scrollOffset) < 112 || (i.current = c.scrollOffset, t(c.scrollOffset !== 0 && c.scrollDirection === "forward"));
1428
- }, 200),
1429
- [t]
1430
- );
1431
- return n != null && n.length ? /* @__PURE__ */ s(
1432
- Ds,
1069
+ }, Kn = ({ gamification: e, scrollNode: n, scrollStore: t }) => {
1070
+ const { data: r, hasMore: o } = w(e.leaderboardList.$store);
1071
+ return r != null && r.length ? /* @__PURE__ */ s(
1072
+ Hn,
1433
1073
  {
1074
+ items: r,
1075
+ scrollNode: n,
1076
+ scrollStore: t,
1434
1077
  fetchMore: e.leaderboardList.fetchMore,
1435
- items: n,
1436
- onScroll: r,
1078
+ hasMore: o,
1437
1079
  openItemDetail: e.openUser,
1438
1080
  currentUserId: e.currentUserId.get()
1439
1081
  }
1440
- ) : /* @__PURE__ */ s(Ss, { deepLink: e.deepLink });
1441
- }, xs = /* @__PURE__ */ o("div")({
1082
+ ) : /* @__PURE__ */ s(Jn, { deepLink: e.deepLink });
1083
+ }, Xn = /* @__PURE__ */ i("div")({
1442
1084
  name: "QuestionItem",
1443
1085
  class: "q1w97g3p",
1444
1086
  propsAsIs: !1
1445
- }), Os = /* @__PURE__ */ o("div")({
1087
+ }), et = /* @__PURE__ */ i("div")({
1446
1088
  name: "QuestionCaption",
1447
1089
  class: "q2sl39u",
1448
1090
  propsAsIs: !1
1449
- }), bs = /* @__PURE__ */ o("div")({
1091
+ }), st = /* @__PURE__ */ i("div")({
1450
1092
  name: "QuestionBody",
1451
1093
  class: "qd5h0uc",
1452
1094
  propsAsIs: !1
1453
- }), Cs = /* @__PURE__ */ o("div")({
1095
+ }), nt = /* @__PURE__ */ i("div")({
1454
1096
  name: "QuestionAction",
1455
1097
  class: "q105uluy",
1456
1098
  propsAsIs: !1
1457
- }), js = () => w, ne = /* @__PURE__ */ o(js())({
1099
+ }), tt = () => A, G = /* @__PURE__ */ i(tt())({
1458
1100
  name: "QuestionActionIcon",
1459
1101
  class: "q1fa0b9h",
1460
1102
  propsAsIs: !0
1461
- }), ws = () => w, ks = /* @__PURE__ */ o(ws())({
1103
+ }), it = () => A, ot = /* @__PURE__ */ i(it())({
1462
1104
  name: "QuestionTypeIcon",
1463
1105
  class: "qxlt78s",
1464
1106
  propsAsIs: !0
1465
- }), Es = /* @__PURE__ */ o("div")({
1107
+ }), rt = /* @__PURE__ */ i("div")({
1466
1108
  name: "QuestionTypeLabel",
1467
1109
  class: "qmg0vkx",
1468
1110
  propsAsIs: !1
1469
- }), Ls = /* @__PURE__ */ o("div")({
1111
+ }), at = /* @__PURE__ */ i("div")({
1470
1112
  name: "QuestionContent",
1471
1113
  class: "q1uz5j1g",
1472
1114
  propsAsIs: !1
1473
- }), $s = /* @__PURE__ */ o("button")({
1115
+ }), ct = /* @__PURE__ */ i("button")({
1474
1116
  name: "PlayButton",
1475
1117
  class: "p1pba9p1",
1476
1118
  propsAsIs: !1
1477
- }), Rs = {
1478
- [X.LOST]: /* @__PURE__ */ s(ne, { name: "incorrectVoted" }),
1479
- [X.WON]: /* @__PURE__ */ s(ne, { name: "icon-check" }),
1480
- [X.UNSET]: /* @__PURE__ */ s(ne, { name: "icon-arrow" }),
1481
- [X.DNP]: /* @__PURE__ */ s(ne, { name: "icon-arrow" })
1482
- }, Qs = ({
1119
+ }), lt = {
1120
+ [B.LOST]: /* @__PURE__ */ s(G, { name: "incorrectVoted" }),
1121
+ [B.WON]: /* @__PURE__ */ s(G, { name: "icon-check" }),
1122
+ [B.UNSET]: /* @__PURE__ */ s(G, { name: "icon-arrow" }),
1123
+ [B.DNP]: /* @__PURE__ */ s(G, { name: "icon-arrow" })
1124
+ }, dt = ({
1483
1125
  questionId: e,
1484
- questionType: t,
1485
- questionStatus: n,
1486
- subject: i,
1487
- openForVoting: r,
1488
- openQuestion: c,
1489
- status: m
1126
+ questionType: n,
1127
+ questionStatus: t,
1128
+ subject: r,
1129
+ openForVoting: o,
1130
+ openQuestion: u,
1131
+ status: c
1490
1132
  }) => {
1491
- const l = Ee[t], d = Rs[m];
1492
- return l ? /* @__PURE__ */ p(xs, { onClick: () => c == null ? void 0 : c(e), children: [
1493
- /* @__PURE__ */ p(Ls, { children: [
1494
- /* @__PURE__ */ p(Os, { children: [
1133
+ const l = Ie[n], d = lt[c];
1134
+ return l ? /* @__PURE__ */ a(Xn, { onClick: () => u == null ? void 0 : u(e), children: [
1135
+ /* @__PURE__ */ a(at, { children: [
1136
+ /* @__PURE__ */ a(et, { children: [
1495
1137
  /* @__PURE__ */ s(
1496
- ks,
1138
+ ot,
1497
1139
  {
1498
- "data-type-trivia": t === y.TRIVIA,
1499
- "data-type-poll": t === y.POLL,
1140
+ "data-type-trivia": n === p.TRIVIA,
1141
+ "data-type-poll": n === p.POLL,
1500
1142
  name: l.iconName
1501
1143
  }
1502
1144
  ),
1503
- /* @__PURE__ */ p(Es, { children: [
1145
+ /* @__PURE__ */ a(rt, { children: [
1504
1146
  l.label,
1505
- t === y.TRIVIA && n === R.RESOLVED && " • Expired"
1147
+ n === p.TRIVIA && t === S.RESOLVED && " • Expired"
1506
1148
  ] })
1507
1149
  ] }),
1508
- /* @__PURE__ */ s(bs, { children: i || "" })
1150
+ /* @__PURE__ */ s(st, { children: r || "" })
1509
1151
  ] }),
1510
- /* @__PURE__ */ s(Cs, { children: r ? /* @__PURE__ */ s($s, { children: "Play" }) : d })
1152
+ /* @__PURE__ */ s(nt, { children: o ? /* @__PURE__ */ s(ct, { children: "Play" }) : d })
1511
1153
  ] }) : null;
1512
- }, Us = /* @__PURE__ */ o("div")({
1154
+ }, ut = /* @__PURE__ */ i("div")({
1513
1155
  name: "Container",
1514
1156
  class: "cll3md7",
1515
1157
  propsAsIs: !1
1516
- }), Ps = /* @__PURE__ */ o("button")({
1158
+ }), pt = /* @__PURE__ */ i("button")({
1517
1159
  name: "ActionBtn",
1518
1160
  class: "a10g1iik",
1519
1161
  propsAsIs: !1
1520
- }), qs = ({
1162
+ }), It = ({
1521
1163
  openInsight: e,
1522
- questionId: t,
1523
- ...n
1524
- }) => /* @__PURE__ */ p(Us, { children: [
1525
- /* @__PURE__ */ s(Ye, { questionId: t, ...n, isPickHistory: !0 }),
1526
- e && /* @__PURE__ */ s(Ps, { onClick: () => e(t), children: "View Insight" })
1527
- ] }), _s = /* @__PURE__ */ o("div")({
1164
+ questionId: n,
1165
+ ...t
1166
+ }) => /* @__PURE__ */ a(ut, { children: [
1167
+ /* @__PURE__ */ s(ge, { questionId: n, ...t, isPickHistory: !0 }),
1168
+ e && /* @__PURE__ */ s(pt, { onClick: () => e(n), children: "View Insight" })
1169
+ ] }), mt = /* @__PURE__ */ i("div")({
1528
1170
  name: "Container",
1529
1171
  class: "cl56x6b",
1530
1172
  propsAsIs: !1
1531
- }), Ys = () => He, Vs = /* @__PURE__ */ o(Ys())({
1173
+ }), Mt = () => Ee, ht = /* @__PURE__ */ i(Mt())({
1532
1174
  name: "ActionButton",
1533
1175
  class: "a11pzf92",
1534
1176
  propsAsIs: !0
1535
- }), Ws = /* @__PURE__ */ o("div")({
1177
+ }), Nt = /* @__PURE__ */ i("div")({
1536
1178
  name: "DateTime",
1537
1179
  class: "d1hbaleq",
1538
1180
  propsAsIs: !1
1539
- }), Fs = /* @__PURE__ */ o("blockquote")({
1181
+ }), At = /* @__PURE__ */ i("blockquote")({
1540
1182
  name: "Quote",
1541
1183
  class: "qvvgqjm",
1542
1184
  propsAsIs: !1
1543
- }), Bs = ({
1185
+ }), Dt = ({
1544
1186
  openTweet: e,
1545
- created: t,
1546
- ...n
1187
+ created: n,
1188
+ ...t
1547
1189
  }) => {
1548
- const i = E(() => {
1549
- if (t) {
1550
- const r = new Date(t);
1551
- if (Me(r))
1190
+ const r = j(() => {
1191
+ if (n) {
1192
+ const o = new Date(n);
1193
+ if (te(o))
1552
1194
  return {
1553
- date: ge(r),
1554
- time: ve(r)
1195
+ date: se(o),
1196
+ time: ne(o)
1555
1197
  };
1556
1198
  }
1557
1199
  return null;
1558
- }, [t]);
1559
- return /* @__PURE__ */ p(_s, { children: [
1560
- i && /* @__PURE__ */ p(Ws, { children: [
1561
- i.date,
1200
+ }, [n]);
1201
+ return /* @__PURE__ */ a(mt, { children: [
1202
+ r && /* @__PURE__ */ a(Nt, { children: [
1203
+ r.date,
1562
1204
  " · ",
1563
- i.time
1205
+ r.time
1564
1206
  ] }),
1565
- n.title && /* @__PURE__ */ s(Fs, { children: n.title }),
1566
- /* @__PURE__ */ s(Le, { ...n }),
1567
- e && /* @__PURE__ */ s(Vs, { onClick: () => e(n.tweetId), children: "View Insight" })
1207
+ t.title && /* @__PURE__ */ s(At, { children: t.title }),
1208
+ /* @__PURE__ */ s(me, { ...t }),
1209
+ e && /* @__PURE__ */ s(ht, { onClick: () => e(t.tweetId), children: "View Insight" })
1568
1210
  ] });
1569
- }, Hs = /* @__PURE__ */ o("div")({
1211
+ }, gt = /* @__PURE__ */ i("div")({
1570
1212
  name: "QuestionsContainer",
1571
1213
  class: "qvghv3l",
1572
1214
  propsAsIs: !1
1573
- }), Gs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Hs, { children: e == null ? void 0 : e.map((n) => {
1574
- var i, r, c;
1575
- if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1576
- const m = n.attributes.attributes.value;
1577
- return /* @__PURE__ */ s(Qs, { openQuestion: t, ...m }, m.questionId);
1215
+ }), Tt = ({ questions: e, openQuestion: n }) => /* @__PURE__ */ s(gt, { children: e == null ? void 0 : e.map((t) => {
1216
+ var r, o, u;
1217
+ if (t.type === "question" && ((r = t.attributes) == null ? void 0 : r.attributes.case) === "question") {
1218
+ const c = t.attributes.attributes.value;
1219
+ return /* @__PURE__ */ s(dt, { openQuestion: n, ...c }, c.questionId);
1578
1220
  }
1579
- if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1580
- const m = n.attributes.attributes.value, l = n.attributes.created;
1581
- return /* @__PURE__ */ s(qs, { openInsight: t, ...m, created: l }, m.questionId);
1221
+ if (t.type === "insight" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "insight") {
1222
+ const c = t.attributes.attributes.value, l = t.attributes.created;
1223
+ return /* @__PURE__ */ s(It, { openInsight: n, ...c, created: l }, c.questionId);
1582
1224
  }
1583
- if (n.type === "tweet" && ((c = n.attributes) == null ? void 0 : c.attributes.case) === "tweet") {
1584
- const m = n.attributes.attributes.value, l = n.attributes.id, d = n.attributes.created;
1585
- return /* @__PURE__ */ s(Bs, { openTweet: t, ...m, tweetId: l, created: d }, l);
1225
+ if (t.type === "tweet" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "tweet") {
1226
+ const c = t.attributes.attributes.value, l = t.attributes.id, d = t.attributes.created;
1227
+ return /* @__PURE__ */ s(Dt, { openTweet: n, ...c, tweetId: l, created: d }, l);
1586
1228
  }
1587
1229
  return null;
1588
- }) }), Zs = ({ store: e, openQuestion: t }) => {
1589
- const n = _(e);
1590
- return n != null && n.data ? /* @__PURE__ */ s(Gs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1591
- }, Js = ({ userSummary: e }) => {
1592
- var t;
1593
- const [n, i] = $(void 0);
1594
- return fe(() => {
1595
- const r = e.subscribe((c) => {
1596
- c != null && c.data && i(c.data);
1230
+ }) }), vt = ({ store: e, openQuestion: n }) => {
1231
+ const t = w(e);
1232
+ return t != null && t.data ? /* @__PURE__ */ s(Tt, { openQuestion: n, questions: t.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1233
+ }, yt = ({ userSummary: e }) => {
1234
+ var n;
1235
+ const [t, r] = E(void 0);
1236
+ return ee(() => {
1237
+ const o = e.subscribe((u) => {
1238
+ u != null && u.data && r(u.data);
1597
1239
  });
1598
1240
  return () => {
1599
- r();
1241
+ o();
1600
1242
  };
1601
- }, [e]), n != null && n.summary ? /* @__PURE__ */ s(qe, { ...n.summary, successRate: (t = n.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1602
- }, Ks = ({
1603
- gamification: e
1604
- }) => {
1605
- const [t, n] = $(!1), [i, r] = $(G.HOME), c = ue(null), m = ue(0), [l, d] = Je(), I = (v) => {
1606
- d(() => r(v));
1607
- }, g = (v) => {
1608
- d(() => n(v));
1609
- }, S = q(Re(() => {
1610
- const v = c.current;
1611
- if (!v)
1612
- return;
1613
- const {
1614
- scrollTop: N
1615
- } = v;
1616
- if (N === 0) {
1617
- m.current = 0, g(!1);
1243
+ }, [e]), t != null && t.summary ? /* @__PURE__ */ s(Ae, { ...t.summary, successRate: (n = t.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1244
+ }, ft = ({ gamification: e, className: n, scrollStore: t, scrollNode: r }) => {
1245
+ const [o, u] = E(!1), [c, l] = E(H.HOME), [, d] = be(), I = (M) => {
1246
+ d(() => l(M));
1247
+ }, m = (M) => {
1248
+ d(() => u(M));
1249
+ };
1250
+ return ee(() => t.listen((M) => {
1251
+ if (M.scrollPosition === 0) {
1252
+ m(!1), t.setKey("tabsShown", !1);
1618
1253
  return;
1619
1254
  }
1620
- if (Math.abs(m.current - N) < 112)
1621
- return;
1622
- const z = m.current < N ? "forward" : "backward";
1623
- m.current = N, g(z === "forward");
1624
- }, 200), []);
1625
- return fe(() => {
1626
- const v = c.current;
1627
- return v ? (i === G.HOME && v.addEventListener("scroll", S), () => {
1628
- v.removeEventListener("scroll", S);
1629
- }) : () => {
1630
- };
1631
- }, [i, S]), /* @__PURE__ */ p("div", {
1632
- style: {
1633
- height: "100%",
1634
- display: "flex",
1635
- flexDirection: "column",
1636
- overflow: "hidden"
1637
- },
1638
- children: [l, /* @__PURE__ */ s(de, {
1639
- style: {
1640
- paddingBottom: "4px",
1641
- transition: "margin-top 0.2s ease-in-out",
1642
- marginTop: t ? "-56px" : "0px"
1643
- },
1644
- children: /* @__PURE__ */ s(Zn, {
1645
- activePage: i,
1646
- toggleActivePage: I
1647
- })
1648
- }), i === G.HOME && /* @__PURE__ */ p(Ie, {
1649
- ref: c,
1650
- children: [/* @__PURE__ */ s(de, {
1255
+ m(M.scrollDirection === "forward"), t.setKey("tabsShown", M.scrollDirection !== "forward");
1256
+ }), [t]), /* @__PURE__ */ a("div", { className: n, children: [
1257
+ /* @__PURE__ */ s(
1258
+ Z,
1259
+ {
1651
1260
  style: {
1652
- paddingTop: "12px"
1261
+ paddingBottom: "8px",
1262
+ position: "sticky",
1263
+ transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
1264
+ top: o ? "-60px" : "0px"
1653
1265
  },
1654
- children: /* @__PURE__ */ s(Js, {
1655
- userSummary: e.userSummary
1656
- })
1657
- }), /* @__PURE__ */ s(Ge, {
1658
- children: /* @__PURE__ */ s(Zs, {
1659
- openQuestion: e.openQuestion,
1660
- store: e.feedList.getStore()
1661
- })
1662
- })]
1663
- }), i === G.LEADERBOARD && /* @__PURE__ */ s("div", {
1664
- className: "c1bp9dj2",
1665
- children: /* @__PURE__ */ s(zs, {
1666
- gamification: e,
1667
- hideTabs: g
1668
- })
1669
- })]
1670
- });
1671
- }, Xs = () => Ze, ke = /* @__PURE__ */ o(Xs())({
1266
+ children: /* @__PURE__ */ s(bn, { activePage: c, toggleActivePage: I })
1267
+ }
1268
+ ),
1269
+ c === H.HOME && /* @__PURE__ */ a(k, { children: [
1270
+ /* @__PURE__ */ s(Z, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(yt, { userSummary: e.userSummary }) }),
1271
+ /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(vt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1272
+ ] }),
1273
+ c === H.LEADERBOARD && /* @__PURE__ */ s(Z, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(Kn, { scrollStore: t, scrollNode: r, gamification: e }) })
1274
+ ] });
1275
+ }, xt = () => Oe, pe = /* @__PURE__ */ i(xt())({
1672
1276
  name: "OpenedContainer",
1673
1277
  class: "oar61gl",
1674
1278
  propsAsIs: !0
1675
- }), ei = /* @__PURE__ */ o("div")({
1279
+ }), jt = /* @__PURE__ */ i("div")({
1676
1280
  name: "UserContainer",
1677
1281
  class: "u14zaal4",
1678
1282
  propsAsIs: !1
1679
- }), ti = ({
1283
+ }), kt = ({
1680
1284
  correct: e,
1681
- incorrect: t
1285
+ incorrect: n
1682
1286
  }) => {
1683
- const n = e + t;
1684
- return n === 0 ? 0 : Math.round(e / n * 100);
1685
- }, gi = ({
1287
+ const t = e + n;
1288
+ return t === 0 ? 0 : Math.round(e / t * 100);
1289
+ }, _t = ({
1686
1290
  gamification: e,
1687
- className: t
1291
+ scrollStore: n,
1292
+ className: t,
1293
+ appNode: r,
1294
+ scrollNode: o
1688
1295
  }) => {
1689
- const n = _(e.openedQuestion.$store), i = _(e.openedUser);
1690
- return /* @__PURE__ */ p(L, {
1691
- children: [n && /* @__PURE__ */ s(ke, {
1296
+ const u = w(e.openedQuestion.$store), c = w(e.openedUser);
1297
+ return /* @__PURE__ */ a(k, {
1298
+ children: [u && r.current && re.createPortal(/* @__PURE__ */ s(pe, {
1692
1299
  className: t,
1693
- children: /* @__PURE__ */ s(Wn, {
1300
+ children: /* @__PURE__ */ s(zn, {
1694
1301
  gamification: e
1695
1302
  })
1696
- }), i && /* @__PURE__ */ s(ke, {
1303
+ }), r.current), c && r.current && re.createPortal(/* @__PURE__ */ s(pe, {
1697
1304
  className: t,
1698
- children: /* @__PURE__ */ p(ei, {
1699
- children: [/* @__PURE__ */ s(Qe, {
1305
+ children: /* @__PURE__ */ a(jt, {
1306
+ children: [/* @__PURE__ */ s(Me, {
1700
1307
  label: "Friend's Rank",
1701
1308
  close: e.closeUser
1702
- }), /* @__PURE__ */ s(de, {
1703
- children: /* @__PURE__ */ s(qe, {
1704
- ...i,
1705
- successRate: ti(i)
1309
+ }), /* @__PURE__ */ s(Z, {
1310
+ children: /* @__PURE__ */ s(Ae, {
1311
+ ...c,
1312
+ successRate: kt(c)
1706
1313
  })
1707
1314
  })]
1708
1315
  })
1709
- }), /* @__PURE__ */ s(Ie, {
1316
+ }), r.current), /* @__PURE__ */ s(ft, {
1317
+ scrollStore: n,
1318
+ scrollNode: o,
1710
1319
  className: t,
1711
- "data-nav": "true",
1712
- children: /* @__PURE__ */ s(Ks, {
1713
- gamification: e
1714
- })
1320
+ gamification: e
1715
1321
  })]
1716
1322
  });
1717
1323
  };
1718
1324
  export {
1719
- gi as default
1325
+ _t as default
1720
1326
  };