@streamlayer/react 1.23.0 → 1.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/lib/app/pause-ad.d.ts +2 -4
  2. package/lib/app/polymarket.d.ts +7 -0
  3. package/lib/cjs/Question.js +1 -1
  4. package/lib/cjs/advertisement.js +28 -223
  5. package/lib/cjs/analytics.js +1 -1
  6. package/lib/cjs/auth.js +1 -1
  7. package/lib/cjs/bet-pack.js +1 -1
  8. package/lib/cjs/feature.js +1 -0
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/gamification-feature2.js +1 -1
  11. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  12. package/lib/cjs/index-eShKGO10.js +1 -5
  13. package/lib/cjs/index.js +1 -1
  14. package/lib/cjs/index10.js +1 -4
  15. package/lib/cjs/index11.js +3 -1
  16. package/lib/cjs/index12.js +1 -1
  17. package/lib/cjs/index13.js +3 -1
  18. package/lib/cjs/index14.js +1 -1
  19. package/lib/cjs/index15.js +1 -5
  20. package/lib/cjs/index16.js +3 -0
  21. package/lib/cjs/index2.js +1 -1
  22. package/lib/cjs/index3.js +1 -1
  23. package/lib/cjs/index4.js +3 -5
  24. package/lib/cjs/index5.js +1 -1
  25. package/lib/cjs/index6.js +1 -1
  26. package/lib/cjs/index7.js +1 -1
  27. package/lib/cjs/index8.js +1 -1
  28. package/lib/cjs/index9.js +1 -1
  29. package/lib/cjs/insight.js +1 -1
  30. package/lib/cjs/masters.js +1 -1
  31. package/lib/cjs/masters2.js +1 -13
  32. package/lib/cjs/notification.js +1 -1
  33. package/lib/cjs/pause-ad.js +1 -1
  34. package/lib/cjs/points.js +1 -1
  35. package/lib/cjs/polymarket.js +9 -0
  36. package/lib/cjs/sl-types.js +1 -15
  37. package/lib/cjs/storage.js +1 -1
  38. package/lib/cjs/style.css +1 -0
  39. package/lib/cjs/theme.js +1 -17
  40. package/lib/cjs/useStreamLayerApp.js +1 -1
  41. package/lib/cjs/useStreamLayerApp2.js +3 -17
  42. package/lib/cjs/utils.js +1 -47
  43. package/lib/classic/app/pause-ad.d.ts +2 -4
  44. package/lib/classic/app/polymarket.d.ts +7 -0
  45. package/lib/classic/cjs/Question.js +1 -1
  46. package/lib/classic/cjs/advertisement.js +28 -223
  47. package/lib/classic/cjs/analytics.js +1 -1
  48. package/lib/classic/cjs/auth.js +1 -1
  49. package/lib/classic/cjs/bet-pack.js +3 -5
  50. package/lib/classic/cjs/feature.js +1 -0
  51. package/lib/classic/cjs/gamification-feature.js +1 -1
  52. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  53. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  54. package/lib/classic/cjs/index.js +1 -1
  55. package/lib/classic/cjs/index10.js +1 -1
  56. package/lib/classic/cjs/index11.js +1 -1
  57. package/lib/classic/cjs/index12.js +1 -4
  58. package/lib/classic/cjs/index13.js +3 -0
  59. package/lib/classic/cjs/index2.js +3 -5
  60. package/lib/classic/cjs/index3.js +1 -1
  61. package/lib/classic/cjs/index4.js +1 -1
  62. package/lib/classic/cjs/index5.js +1 -1
  63. package/lib/classic/cjs/index6.js +1 -1
  64. package/lib/classic/cjs/index7.js +1 -1
  65. package/lib/classic/cjs/index8.js +1 -1
  66. package/lib/classic/cjs/index9.js +3 -1
  67. package/lib/classic/cjs/insight.js +1 -1
  68. package/lib/classic/cjs/notification.js +1 -1
  69. package/lib/classic/cjs/notification2.js +1 -1
  70. package/lib/classic/cjs/pause-ad.js +1 -1
  71. package/lib/classic/cjs/points.js +1 -1
  72. package/lib/classic/cjs/polymarket.js +9 -0
  73. package/lib/classic/cjs/sl-types.js +1 -15
  74. package/lib/classic/cjs/style.css +1 -0
  75. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  76. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  77. package/lib/classic/cjs/utils.js +1 -47
  78. package/lib/classic/es/Question.js +277 -264
  79. package/lib/classic/es/advertisement.js +34990 -18881
  80. package/lib/classic/es/analytics.js +58 -56
  81. package/lib/classic/es/auth.js +14 -8
  82. package/lib/classic/es/bet-pack.js +2448 -2418
  83. package/lib/classic/es/feature.js +108 -0
  84. package/lib/classic/es/gamification-feature.js +2 -2
  85. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  86. package/lib/classic/es/index-eShKGO10.js +948 -948
  87. package/lib/classic/es/index.js +13 -13
  88. package/lib/classic/es/index10.js +83 -2295
  89. package/lib/classic/es/index11.js +3095 -179
  90. package/lib/classic/es/index12.js +174 -821
  91. package/lib/classic/es/index13.js +850 -0
  92. package/lib/classic/es/index2.js +2099 -1763
  93. package/lib/classic/es/index3.js +11 -11
  94. package/lib/classic/es/index4.js +127 -127
  95. package/lib/classic/es/index5.js +3 -5
  96. package/lib/classic/es/index6.js +10 -11
  97. package/lib/classic/es/index7.js +6 -62
  98. package/lib/classic/es/index8.js +9 -316
  99. package/lib/classic/es/index9.js +316 -82
  100. package/lib/classic/es/insight.js +58 -53
  101. package/lib/classic/es/notification.js +5 -5
  102. package/lib/classic/es/notification2.js +765 -722
  103. package/lib/classic/es/pause-ad.js +190 -167
  104. package/lib/classic/es/points.js +55 -47
  105. package/lib/classic/es/polymarket.js +6848 -0
  106. package/lib/classic/es/sl-types.js +193 -125
  107. package/lib/classic/es/useStreamLayerApp.js +2 -2
  108. package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
  109. package/lib/classic/es/utils.js +28 -28
  110. package/lib/classic/index.d.ts +1 -0
  111. package/lib/classic/style.css +1 -0
  112. package/lib/dist/cjs/gamification-feature.js +1 -1
  113. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  114. package/lib/dist/cjs/index.js +1 -1
  115. package/lib/dist/cjs/masters.js +3 -77
  116. package/lib/dist/es/gamification-feature.js +2 -2
  117. package/lib/dist/es/index-eShKGO10.js +948 -948
  118. package/lib/dist/es/index.js +7 -8
  119. package/lib/dist/es/masters.js +18212 -14741
  120. package/lib/dist/index.d.ts +29 -8
  121. package/lib/dist/style.css +1 -1
  122. package/lib/es/Question.js +108 -106
  123. package/lib/es/advertisement.js +34990 -18881
  124. package/lib/es/analytics.js +58 -56
  125. package/lib/es/auth.js +14 -8
  126. package/lib/es/bet-pack.js +29 -17
  127. package/lib/es/feature.js +108 -0
  128. package/lib/es/gamification-feature.js +2 -2
  129. package/lib/es/gamification-feature2.js +2 -2
  130. package/lib/es/hooks-WfHlJH12.js +98 -0
  131. package/lib/es/index-eShKGO10.js +948 -948
  132. package/lib/es/index.js +14 -13
  133. package/lib/es/index10.js +258 -816
  134. package/lib/es/index11.js +837 -170
  135. package/lib/es/index12.js +181 -312
  136. package/lib/es/index13.js +316 -82
  137. package/lib/es/index14.js +83 -2350
  138. package/lib/es/index15.js +3069 -1224
  139. package/lib/es/index16.js +1453 -0
  140. package/lib/es/index2.js +1118 -984
  141. package/lib/es/index3.js +3 -62
  142. package/lib/es/index4.js +2424 -2407
  143. package/lib/es/index5.js +11 -11
  144. package/lib/es/index6.js +127 -127
  145. package/lib/es/index7.js +10 -7
  146. package/lib/es/index8.js +5 -9
  147. package/lib/es/index9.js +10 -265
  148. package/lib/es/insight.js +58 -53
  149. package/lib/es/masters.js +6 -5
  150. package/lib/es/masters2.js +696 -558
  151. package/lib/es/notification.js +697 -655
  152. package/lib/es/pause-ad.js +190 -167
  153. package/lib/es/points.js +56 -48
  154. package/lib/es/polymarket.js +6848 -0
  155. package/lib/es/sl-types.js +200 -132
  156. package/lib/es/storage.js +75 -74
  157. package/lib/es/theme.js +177 -31
  158. package/lib/es/useStreamLayerApp.js +2 -2
  159. package/lib/es/useStreamLayerApp2.js +9727 -7592
  160. package/lib/es/utils.js +28 -28
  161. package/lib/index.d.ts +1 -0
  162. package/lib/style.css +1 -1
  163. package/package.json +33 -20
  164. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  165. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  166. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  167. package/lib/es/hooks-B0Qttldg.js +0 -98
@@ -1,835 +1,188 @@
1
- import { jsx as e, jsxs as d, Fragment as z } from "react/jsx-runtime";
2
- import { useState as b, useRef as ee, useEffect as H, useCallback as j, useLayoutEffect as Ue, useMemo as _ } from "react";
3
- import { s as n, c as ue } from "./sl-types.js";
4
- import { i as le } from "./index6.js";
5
- import { B as w } from "./index4.js";
6
- import { Q as i, a as J, c as se, b as Ke } from "./useStreamLayerApp2.js";
7
- import { O as _e, L as He } from "./index9.js";
8
- import { d as Ee } from "./index3.js";
9
- const Qn = /* @__PURE__ */ n("div")({
10
- name: "SDKContainer",
11
- class: "sopqfe6",
12
- propsAsIs: !1
13
- }), Ge = /* @__PURE__ */ n("div")({
14
- name: "SDKScrollContainer",
15
- class: "s102vcph",
16
- propsAsIs: !1
17
- }), be = /* @__PURE__ */ n("div")({
18
- name: "SDKContentContainer",
19
- class: "s1meqjjv",
20
- propsAsIs: !1
21
- }), Je = () => be, we = /* @__PURE__ */ n(Je())({
22
- name: "SDKWhiteContainer",
23
- class: "s1burm22",
24
- propsAsIs: !0
25
- }), Xe = () => we, Fn = /* @__PURE__ */ n(Xe())({
26
- name: "SDKSummaryContainer",
27
- class: "sm5r3j5",
28
- propsAsIs: !0
29
- }), Wn = /* @__PURE__ */ n("div")({
30
- name: "TabsContainer",
31
- class: "tysxwr6",
32
- propsAsIs: !1
33
- }), Ze = () => be, Bn = /* @__PURE__ */ n(Ze())({
34
- name: "LeaderboardContainer",
35
- class: "l9er3b1",
36
- propsAsIs: !0
37
- }), es = () => we, Yn = /* @__PURE__ */ n(es())({
38
- name: "TabsNavContainer",
39
- class: "t19dtrb3",
40
- propsAsIs: !0
41
- }), zn = /* @__PURE__ */ n("div")({
42
- name: "UserSummaryContainer",
43
- class: "u1552n3j",
44
- propsAsIs: !1
45
- });
46
- var ss = Object.defineProperty, ns = (s, t, r) => t in s ? ss(s, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[t] = r, ts = (s, t, r) => ns(s, t + "", r);
47
- let is = class {
48
- constructor() {
49
- ts(this, "observers", /* @__PURE__ */ new Set());
50
- }
51
- subscribe(t) {
52
- this.observers.add(t);
53
- }
54
- unsubscribe(t) {
55
- this.observers.delete(t);
56
- }
57
- notify(t) {
58
- this.observers.forEach((r) => r(t));
59
- }
1
+ import { s as styled_default } from "./sl-types.js";
2
+ import { Q as QuestionType } from "./useStreamLayerApp2.js";
3
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
4
+ import { memo, useMemo } from "react";
5
+ import { E as Et } from "./index9.js";
6
+ import { B as B1 } from "./index4.js";
7
+ const e$1 = {
8
+ [QuestionType.TWEET]: { label: "Insight", iconName: "icon-insight" },
9
+ [QuestionType.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
10
+ [QuestionType.UNSET]: void 0,
11
+ [QuestionType.FACTOID]: { label: "Insight", iconName: "icon-insight" },
12
+ [QuestionType.POLL]: { label: "Poll", iconName: "icon-poll" },
13
+ [QuestionType.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
14
+ [QuestionType.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
15
+ }, o$1 = {
16
+ [QuestionType.TWEET]: "Learn more",
17
+ [QuestionType.FACTOID]: "Learn more",
18
+ [QuestionType.POLL]: "Answer",
19
+ [QuestionType.TRIVIA]: "Answer",
20
+ [QuestionType.PREDICTION]: "Answer",
21
+ [QuestionType.PROMOTION]: "",
22
+ [QuestionType.UNSET]: ""
60
23
  };
61
- const X = new is(), rs = { hiding: !1, finished: !1 }, os = () => {
62
- const [s, t] = b(rs), r = ee(null);
63
- H(() => {
64
- const p = (h) => {
65
- t(h);
66
- };
67
- return X.subscribe(p), () => {
68
- X.unsubscribe(p);
69
- };
70
- }, []);
71
- const l = j((p) => {
72
- const h = { hiding: !0, finished: !1 };
73
- r.current && clearTimeout(r.current), p != null && p.delay ? r.current = setTimeout(() => {
74
- X.notify(h);
75
- }, p == null ? void 0 : p.delay) : X.notify(h);
76
- }, []), o = j(() => {
77
- s.hiding && (r.current = null, X.notify({ hiding: !1, finished: !0 }));
78
- }, [s.hiding]);
79
- return {
80
- ...s,
81
- runAnimation: l,
82
- onAnimationEnd: o
83
- };
84
- }, as = /* @__PURE__ */ n("div")({
85
- name: "Container",
86
- class: "c1pgyo67",
87
- propsAsIs: !1
88
- }), cs = "sx17qu6", ds = "h1692c5m", ge = ({
89
- children: s,
90
- style: t,
91
- className: r,
92
- enabled: l = !0,
93
- hiding: o,
94
- onAnimationEnd: p
95
- }) => /* @__PURE__ */ e(as, {
96
- style: t,
97
- className: ue(r, l && cs, l && o && ds),
98
- onAnimationEnd: p,
99
- children: s
100
- }), ls = () => ge, ps = /* @__PURE__ */ n(ls())({
101
- name: "GrowingContainer",
102
- class: "gck55ev",
103
- propsAsIs: !0
104
- }), Pe = ({
105
- children: s,
106
- style: t,
107
- enabled: r,
108
- animate: l,
109
- ...o
110
- }) => {
111
- const p = ee(null);
112
- return /* @__PURE__ */ e(ps, {
113
- ...o,
114
- enabled: r && l,
115
- style: {
116
- ...t,
117
- ...(() => {
118
- const h = p == null ? void 0 : p.current, f = h && window.getComputedStyle(h), P = f == null ? void 0 : f.getPropertyValue("height");
119
- return r ? {
120
- height: l ? P : 0
121
- } : {};
122
- })()
123
- },
124
- children: /* @__PURE__ */ e("div", {
125
- ref: p,
126
- children: s
127
- })
128
- });
129
- }, us = /* @__PURE__ */ n("div")({
130
- name: "Container",
131
- class: "c1gcvmcj",
132
- propsAsIs: !1
133
- }), ms = /* @__PURE__ */ n("div")({
134
- name: "Title",
135
- class: "tnr592a",
136
- propsAsIs: !1
137
- }), hs = /* @__PURE__ */ n("div")({
138
- name: "Description",
139
- class: "d1e8jqpv",
140
- propsAsIs: !1
141
- }), Is = () => w, vs = /* @__PURE__ */ n(Is())({
142
- name: "Icon",
143
- class: "i1vs651k",
144
- propsAsIs: !0
145
- }), As = ({ icon: s, title: t, description: r }) => /* @__PURE__ */ d(us, { children: [
146
- /* @__PURE__ */ e(vs, { name: s }),
147
- /* @__PURE__ */ e(ms, { children: t }),
148
- /* @__PURE__ */ e(hs, { children: r })
149
- ] }), ys = () => Pe, fs = /* @__PURE__ */ n(ys())({
150
- name: "ShowInContainer",
151
- class: "s16sbdnm",
152
- propsAsIs: !0
153
- }), B = /* @__PURE__ */ n("div")({
154
- name: "FeedbackContainer",
155
- class: "fbhorgl",
156
- propsAsIs: !1
157
- }), ye = "s1g20ja7", Cs = /* @__PURE__ */ n("div")({
24
+ const I = (t2) => t2.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), s = (t2) => t2 ? t2.toLocaleString("en-US") : "0", L = (t2) => {
25
+ const o2 = new Date(t2);
26
+ if (!o2)
27
+ return "";
28
+ const r2 = /* @__PURE__ */ new Date(), e2 = Math.floor(r2.getTime() - o2.getTime());
29
+ return e2 < 6e4 ? `${Math.floor(e2 / 1e3)}s` : e2 < 36e5 ? `${Math.floor(e2 / 6e4)}m` : e2 < 864e5 ? `${Math.floor(e2 / 36e5)}h` : o2.getFullYear() === r2.getFullYear() ? `${o2.toLocaleDateString("en-US", {
30
+ month: "short",
31
+ day: "numeric"
32
+ })}` : `${o2.toLocaleDateString("en-US", {
33
+ month: "2-digit",
34
+ day: "2-digit",
35
+ year: "2-digit"
36
+ })}`;
37
+ };
38
+ const t$1 = /* @__PURE__ */ styled_default("div")({
158
39
  name: "Container",
159
- class: "c455ozj",
160
- propsAsIs: !1
161
- }), Ts = () => w, fe = /* @__PURE__ */ n(Ts())({
162
- name: "IconPrediction",
163
- class: "i1913njx",
164
- propsAsIs: !0
165
- }), Z = /* @__PURE__ */ n("div")({
166
- name: "FeedbackIconWrap",
167
- class: "fzfk69z",
168
- propsAsIs: !1
169
- }), ie = /* @__PURE__ */ n("div")({
170
- name: "FeedbackHeader",
171
- class: "fx87qaj",
172
- propsAsIs: !1
173
- }), $s = /* @__PURE__ */ n("span")({
174
- name: "FeedbackTitle",
175
- class: "fvek9ew",
176
- propsAsIs: !1
177
- }), Y = /* @__PURE__ */ n("span")({
178
- name: "FeedbackDescription",
179
- class: "f1kbtp09",
180
- propsAsIs: !1
181
- }), Es = /* @__PURE__ */ n("div")({
182
- name: "FeedbackTitleWrap",
183
- class: "f4i8rro",
184
- propsAsIs: !1
185
- }), bs = /* @__PURE__ */ n("div")({
186
- name: "FeedbackResultDescriptionWrap",
187
- class: "fqyssr",
188
- propsAsIs: !1
189
- }), ws = () => Y, gs = /* @__PURE__ */ n(ws())({
190
- name: "FeedbackDynamicDescription",
191
- class: "fyv794i",
192
- propsAsIs: !0
193
- }), Ps = () => Y, Rs = /* @__PURE__ */ n(Ps())({
194
- name: "FeedbackResultDescription",
195
- class: "f1jkj9vx",
196
- propsAsIs: !0
197
- }), pe = /* @__PURE__ */ n("div")({
198
- name: "FeedbackText",
199
- class: "f1pxh3a6",
200
- propsAsIs: !1
201
- }), Ds = /* @__PURE__ */ n("span")({
202
- name: "DynamicWrap",
203
- class: "d1afvufn",
204
- propsAsIs: !1
205
- }), qs = /* @__PURE__ */ n("div")({
206
- name: "EarlyFeedbackDescription",
207
- class: "eq8u24d",
208
- propsAsIs: !1
209
- }), Ce = ({
210
- feedbackMessages: s,
211
- questionVotedCorrectly: t,
212
- questionVoted: r,
213
- questionType: l,
214
- hasCorrectAnswer: o,
215
- showExpiredNotification: p,
216
- showClosedNotificationTrivia: h,
217
- votedInCurrentRender: f,
218
- votedAfterQuestionClosed: P,
219
- voteErrorMessage: I,
220
- enteredAnActiveQuestion: a,
221
- marketClosed: R,
222
- percentsAnimated: E,
223
- votedAnswer: y,
224
- isEarlyPrediction: m,
225
- correctAnswer: q,
226
- onAnimationEnd: x
227
- }) => {
228
- const g = r && (l === i.TRIVIA || l === i.PREDICTION), T = l === i.PREDICTION && !o, N = R && l === i.PREDICTION && !r || l === i.PREDICTION && P && f && a, k = g && T, S = g && o, D = l === i.PREDICTION && r && f && o, O = r && l === i.POLL && f, v = t ? "correct" : "incorrect", V = t ? s == null ? void 0 : s.correctFeedback : s == null ? void 0 : s.incorrectFeedback;
229
- return p || h || k || S || N || O || D || I ? /* @__PURE__ */ e(
230
- fs,
231
- {
232
- enabled: f,
233
- animate: !I && p ? !0 : E,
234
- onAnimationEnd: x,
235
- children: /* @__PURE__ */ d(Cs, { "data-prediction": T, children: [
236
- I && !N && /* @__PURE__ */ d(B, { children: [
237
- !m && /* @__PURE__ */ e(fe, { name: "questionExpired" }),
238
- /* @__PURE__ */ e(Y, { children: I })
239
- ] }),
240
- !I && p && /* @__PURE__ */ d(B, { children: [
241
- !m && /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(w, { name: "questionExpired" }) }),
242
- /* @__PURE__ */ d("div", { children: [
243
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Y, { children: "Question Expired" }) }),
244
- /* @__PURE__ */ e(pe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
245
- ] })
246
- ] }),
247
- !I && h && /* @__PURE__ */ d(B, { className: ue(ye), children: [
248
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(w, { name: "questionExpired" }) }),
249
- /* @__PURE__ */ d("div", { children: [
250
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Y, { children: "Question Closed" }) }),
251
- /* @__PURE__ */ e(pe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
252
- ] })
253
- ] }),
254
- N && /* @__PURE__ */ d(B, { children: [
255
- !m && /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(w, { name: "questionExpired" }) }),
256
- /* @__PURE__ */ d("div", { children: [
257
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Y, { children: m ? o ? "The results are already in!" : "Question is Closed" : "Question Closed" }) }),
258
- /* @__PURE__ */ e(pe, { children: m ? /* @__PURE__ */ e(qs, { children: o ? `Correct: ${q == null ? void 0 : q.text}` : "Event affecting the outcome has occurred." }) : "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
259
- ] })
260
- ] }),
261
- !I && k && /* @__PURE__ */ d(B, { children: [
262
- !m && /* @__PURE__ */ e(fe, { name: "icon-prediction" }),
263
- /* @__PURE__ */ d(gs, { children: [
264
- "Your pick has been recorded. ",
265
- /* @__PURE__ */ e(Ds, { children: "We’ll notify you of the result." })
266
- ] })
267
- ] }),
268
- !I && O && /* @__PURE__ */ d(B, { children: [
269
- !m && /* @__PURE__ */ e(Z, { "data-feedback-type": "correct", children: /* @__PURE__ */ e(w, { name: "correct" }) }),
270
- /* @__PURE__ */ e(Y, { children: "Thanks for answering. Please stay tuned for the next question." })
271
- ] }),
272
- !I && (S || D) && /* @__PURE__ */ d(B, { className: ue(h && ye), children: [
273
- !m && /* @__PURE__ */ e(Z, { "data-feedback-type": v, children: /* @__PURE__ */ e(w, { name: v }) }),
274
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ d(ie, { children: [
275
- m ? /* @__PURE__ */ e(Es, { children: v === "incorrect" ? /* @__PURE__ */ d(z, { children: [
276
- /* @__PURE__ */ e("div", { children: "So close!" }),
277
- /* @__PURE__ */ e("div", { children: "Better luck next time" })
278
- ] }) : /* @__PURE__ */ d(z, { children: [
279
- /* @__PURE__ */ e("div", { children: "That’s correct!" }),
280
- /* @__PURE__ */ e("div", { children: "You chose wisely." })
281
- ] }) }) : /* @__PURE__ */ e($s, { "data-feedback-type": v, children: V == null ? void 0 : V.title }),
282
- m ? /* @__PURE__ */ d(bs, { children: [
283
- /* @__PURE__ */ d("div", { children: [
284
- "Your pick: ",
285
- y == null ? void 0 : y.text
286
- ] }),
287
- /* @__PURE__ */ e("div", { children: v === "incorrect" ? `Correct: ${q == null ? void 0 : q.text}` : "" })
288
- ] }) : /* @__PURE__ */ e(Rs, { children: V == null ? void 0 : V.description })
289
- ] }) })
290
- ] })
40
+ class: "cjq447q",
41
+ propsAsIs: false
42
+ }), r$1 = /* @__PURE__ */ styled_default("div")({
43
+ name: "ImageContainer",
44
+ class: "i14egogb",
45
+ propsAsIs: false
46
+ }), c$1 = /* @__PURE__ */ styled_default("img")({
47
+ name: "Image",
48
+ class: "i2g9g4l",
49
+ propsAsIs: false
50
+ }), a$1 = () => B1, m$1 = /* @__PURE__ */ styled_default(a$1())({
51
+ name: "TwitterIcon",
52
+ class: "t1c454nm",
53
+ propsAsIs: true
54
+ }), i$1 = /* @__PURE__ */ styled_default("div")({
55
+ name: "Details",
56
+ class: "d11nigc3",
57
+ propsAsIs: false
58
+ }), p$1 = /* @__PURE__ */ styled_default("div")({
59
+ name: "Name",
60
+ class: "nrxa4k8",
61
+ propsAsIs: false
62
+ }), l$1 = /* @__PURE__ */ styled_default("div")({
63
+ name: "UserNameAndDate",
64
+ class: "u1p051g3",
65
+ propsAsIs: false
66
+ });
67
+ const D$1 = ({ image: r2, name: c2, userName: n, verified: a2, createdTweet: o2 }) => {
68
+ const i2 = o2 && L(o2);
69
+ return /* @__PURE__ */ jsxs(t$1, { children: [
70
+ r2 && /* @__PURE__ */ jsxs(r$1, { children: [
71
+ /* @__PURE__ */ jsx(c$1, { className: "SL_AccountImage", src: r2 }),
72
+ /* @__PURE__ */ jsx(m$1, { name: "twitter" })
73
+ ] }),
74
+ /* @__PURE__ */ jsxs(i$1, { children: [
75
+ c2 && /* @__PURE__ */ jsxs(p$1, { className: "SL_TweetAccountName", children: [
76
+ c2,
77
+ " ",
78
+ a2 && /* @__PURE__ */ jsx(B1, { name: "icon-twitter-verified" })
79
+ ] }),
80
+ n && /* @__PURE__ */ jsxs(l$1, { className: "SL_TweetAccountUserName", children: [
81
+ "@",
82
+ n,
83
+ " ",
84
+ i2 && `・ ${i2}`
291
85
  ] })
292
- }
293
- ) : null;
294
- }, xs = /* @__PURE__ */ n("div")({
295
- name: "Container",
296
- class: "c1hygj0s",
297
- propsAsIs: !1
298
- }), ks = /* @__PURE__ */ n("div")({
299
- name: "Title",
300
- class: "t1r84tez",
301
- propsAsIs: !1
302
- }), Os = /* @__PURE__ */ n("div")({
303
- name: "Description",
304
- class: "d1aj1a7k",
305
- propsAsIs: !1
306
- }), Ns = /* @__PURE__ */ n("div")({
307
- name: "AdditionalDescription",
308
- class: "ax09ezs",
309
- propsAsIs: !1
310
- }), Ss = () => w, Vs = /* @__PURE__ */ n(Ss())({
311
- name: "Icon",
312
- class: "inkrac",
313
- propsAsIs: !0
314
- }), js = ({ icon: s, title: t, description: r, additionalDescription: l }) => /* @__PURE__ */ d(xs, { children: [
315
- s && /* @__PURE__ */ e(Vs, { name: s }),
316
- /* @__PURE__ */ e(ks, { children: t }),
317
- /* @__PURE__ */ e(Os, { children: r }),
318
- l && /* @__PURE__ */ e(Ns, { children: l })
319
- ] }), Re = /* @__PURE__ */ n("div")({
86
+ ] })
87
+ ] });
88
+ };
89
+ const l = /* @__PURE__ */ styled_default("div")({
320
90
  name: "Container",
321
- class: "c14ielyq",
322
- propsAsIs: !1
323
- }), Ls = () => Ge, Qs = /* @__PURE__ */ n(Ls())({
324
- name: "QuestionScrollContainer",
325
- class: "q1tlqx57",
326
- propsAsIs: !0
327
- }), Fs = /* @__PURE__ */ n("div")({
328
- name: "TopShadow",
329
- class: "t1hq58md",
330
- propsAsIs: !1
331
- }), Ws = /* @__PURE__ */ n("div")({
332
- name: "BottomShadow",
333
- class: "b1c8nxcx",
334
- propsAsIs: !1
335
- }), Bs = /* @__PURE__ */ n("div")({
336
- name: "SponsorLogo",
337
- class: "siozuc3",
338
- propsAsIs: !1
339
- }), De = /* @__PURE__ */ n("div")({
340
- name: "Content",
341
- class: "cpnc44r",
342
- propsAsIs: !1
343
- }), Ys = /* @__PURE__ */ n("div")({
344
- name: "Title",
345
- class: "tq7p3w0",
346
- propsAsIs: !1
347
- }), zs = /* @__PURE__ */ n("div")({
348
- name: "OptionsWrap",
349
- class: "o1jlfj9g",
350
- propsAsIs: !1
351
- }), qe = /* @__PURE__ */ n("div")({
352
- name: "Options",
353
- class: "o84pmnd",
354
- propsAsIs: !1
355
- }), Ms = () => ge, Te = /* @__PURE__ */ n(Ms())({
356
- name: "AlertContainer",
357
- class: "a1dybjw9",
358
- propsAsIs: !0
359
- }), Us = /* @__PURE__ */ n("div")({
360
- name: "EarlyPrediction",
361
- class: "e1l05ict",
362
- propsAsIs: !1
363
- }), Ks = () => w, _s = /* @__PURE__ */ n(Ks())({
364
- name: "EarlyPredictionIcon",
365
- class: "ez9juex",
366
- propsAsIs: !0
367
- }), Hs = () => w, Gs = /* @__PURE__ */ n(Hs())({
368
- name: "SponsorIcon",
369
- class: "s8p4aob",
370
- propsAsIs: !0
371
- }), Js = /* @__PURE__ */ n("button")({
372
- name: "ButtonContainer",
373
- class: "b1b6dl8t",
374
- propsAsIs: !1
375
- }), Xs = /* @__PURE__ */ n("div")({
376
- name: "ButtonPctWrap",
377
- class: "b4iik8i",
378
- propsAsIs: !1
379
- }), Zs = /* @__PURE__ */ n("div")({
380
- name: "ButtonPct",
381
- class: "b1gq1lnf",
382
- propsAsIs: !1
383
- }), en = /* @__PURE__ */ n("span")({
384
- name: "ButtonBody",
385
- class: "b1j65z51",
386
- propsAsIs: !1
387
- }), sn = /* @__PURE__ */ n("div")({
388
- name: "IconContainer",
389
- class: "i19tpfua",
390
- propsAsIs: !1
391
- }), nn = /* @__PURE__ */ n("div")({
392
- name: "IconWrap",
393
- class: "i1tubmma",
394
- propsAsIs: !1
395
- }), xe = /* @__PURE__ */ n("img")({
396
- name: "Icon",
397
- class: "i1grrgwj",
398
- propsAsIs: !1
399
- }), tn = () => xe, rn = /* @__PURE__ */ n(tn())({
400
- name: "IconDefault",
401
- class: "ibemyq8",
402
- propsAsIs: !0
403
- }), on = () => xe, an = /* @__PURE__ */ n(on())({
404
- name: "IconCircle",
405
- class: "i1dceht",
406
- propsAsIs: !0
407
- }), cn = /* @__PURE__ */ n("span")({
408
- name: "Title",
409
- class: "t116q4vq",
410
- propsAsIs: !1
411
- }), dn = /* @__PURE__ */ n("span")({
412
- name: "Indicators",
413
- class: "i17ajcu2",
414
- propsAsIs: !1
415
- }), ln = /* @__PURE__ */ n("div")({
416
- name: "PtsWrap",
417
- class: "pu9kmlb",
418
- propsAsIs: !1
419
- }), pn = /* @__PURE__ */ n("span")({
420
- name: "Pts",
421
- class: "p1j2j0s0",
422
- propsAsIs: !1
423
- }), un = /* @__PURE__ */ n("span")({
424
- name: "Percentage",
425
- class: "p1mzj1sj",
426
- propsAsIs: !1
427
- }), mn = () => w, hn = /* @__PURE__ */ n(mn())({
428
- name: "CheckIcon",
429
- class: "cichgz8",
430
- propsAsIs: !0
431
- }), $e = {
432
- [J.CENTERED]: (s) => /* @__PURE__ */ e(rn, { "data-testid": "vote-icon", alt: "option-icon", src: s }),
433
- [J.TRANSPARENT]: (s) => /* @__PURE__ */ e(sn, { "data-testid": "vote-icon", children: /* @__PURE__ */ e(nn, { style: { backgroundImage: `url(${s})` } }) }),
434
- [J.ROUNDED]: (s) => /* @__PURE__ */ e(an, { "data-testid": "vote-icon", alt: "option-icon", src: s }),
435
- [J.NONE]: () => null,
436
- [J.UNSET]: () => null
437
- }, In = ({ questionType: s, hasCorrectAnswer: t, correct: r, youVoted: l, questionVoted: o }) => {
438
- if (s === i.POLL && l)
439
- return "voted";
440
- if (s === i.PREDICTION) {
441
- if (!t && o)
442
- return l ? "voted" : "unset";
443
- if (t && o)
444
- return l ? r ? "correct" : "incorrect" : "unset";
445
- if (l)
446
- return "correct";
447
- }
448
- return s === i.TRIVIA && o && l ? r ? "correct" : "incorrect" : "unset";
449
- }, vn = ({
450
- questionType: s,
451
- questionVoted: t,
452
- correct: r,
453
- hasCorrectAnswer: l,
454
- questionStatus: o
455
- }) => s === i.TRIVIA ? t && r : s === i.PREDICTION ? t && r && l || o === se.RESOLVED && r : !1, An = _e(Js), yn = (s) => {
456
- var t;
457
- const {
458
- // option props
459
- id: r,
460
- icon: l,
461
- text: o,
462
- percentageDecimal: p,
463
- points: h,
464
- // extra props
465
- onVote: f,
466
- markThatVoted: P,
467
- firstOption: I,
468
- onPercentsAnimated: a,
469
- youSelected: R,
470
- youVoted: E,
471
- questionVoted: y,
472
- imageMode: m,
473
- answerTimeExpired: q,
474
- questionStatus: x,
475
- isLoading: g,
476
- questionType: T,
477
- correct: N,
478
- hasCorrectAnswer: k,
479
- marketClosed: S,
480
- isEarlyPrediction: D,
481
- isAd: O,
482
- webos: v
483
- } = s, [V, M] = b(0), G = In(s), ne = vn({ questionType: T, questionVoted: y, correct: N, hasCorrectAnswer: k, questionStatus: x }), L = S && T === i.PREDICTION, Q = y || L, re = T === i.PREDICTION && !y && !S && !O, F = y && !R && G !== "incorrect" && !E;
484
- return Ue(() => {
485
- M(0), requestAnimationFrame(() => {
486
- M(p);
487
- });
488
- }, [p]), /* @__PURE__ */ d(
489
- An,
490
- {
491
- value: r,
492
- webos: v,
493
- autoFocus: I,
494
- "data-selected": R,
495
- "data-answer-state": G,
496
- disabled: y || g || q || L,
497
- "data-is-not-checked": F,
498
- "data-a": "intr",
499
- onClick: (te) => {
500
- P(
501
- T === i.PREDICTION ? S : x === se.RESOLVED
502
- ), f(te);
503
- },
504
- "data-is-ad": O,
505
- children: [
506
- /* @__PURE__ */ e(Xs, { children: /* @__PURE__ */ e(
507
- Zs,
91
+ class: "c1kzqw87",
92
+ propsAsIs: false
93
+ }), t = /* @__PURE__ */ styled_default("div")({
94
+ name: "Details",
95
+ class: "d9r1hf9",
96
+ propsAsIs: false
97
+ }), i = /* @__PURE__ */ styled_default("div")({
98
+ name: "Body",
99
+ class: "bezygt5",
100
+ propsAsIs: false
101
+ }), m = /* @__PURE__ */ styled_default("div")({
102
+ name: "ImagesContainer",
103
+ class: "i1y8f7ym",
104
+ propsAsIs: false
105
+ }), c = /* @__PURE__ */ styled_default("div")({
106
+ name: "ImagesBlock",
107
+ class: "i18gwonx",
108
+ propsAsIs: false
109
+ }), e = /* @__PURE__ */ styled_default("img")({
110
+ name: "Image",
111
+ class: "i3g0xjd",
112
+ propsAsIs: false
113
+ }), a = () => e, p = /* @__PURE__ */ styled_default(a())({
114
+ name: "ImageFullSize",
115
+ class: "io8rt7p",
116
+ propsAsIs: true
117
+ }), o = () => e, r = /* @__PURE__ */ styled_default(o())({
118
+ name: "ImageHalfSize",
119
+ class: "i4hn3ox",
120
+ propsAsIs: true
121
+ });
122
+ const A = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), D = (c2) => c2 == null ? void 0 : c2.replace(A, ""), b = memo(
123
+ ({ image: c$12, body: y, muted: C, account: z, accountVerified: F, tweet: n, isDetail: d, controlVideo: T }) => {
124
+ var h, g, H, U, f;
125
+ const r$12 = (g = (h = n == null ? void 0 : n.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, i$12 = r$12 == null ? void 0 : r$12.find(({ type: e2 }) => e2 === "photo"), m$12 = useMemo(() => {
126
+ var e2, u, v, I2;
127
+ return (I2 = (v = (u = (e2 = r$12 == null ? void 0 : r$12[0]) == null ? void 0 : e2.videoInfo) == null ? void 0 : u.variants) == null ? void 0 : v.findLast(({ contentType: j }) => j === "video/mp4")) == null ? void 0 : I2.url;
128
+ }, [r$12]);
129
+ return /* @__PURE__ */ jsxs(l, { children: [
130
+ /* @__PURE__ */ jsxs(t, { children: [
131
+ /* @__PURE__ */ jsx(
132
+ D$1,
508
133
  {
509
- "data-answer-state": G,
510
- "data-is-not-checked": F,
511
- style: { width: `${Q ? V : 0}%` },
512
- onTransitionEnd: () => {
513
- L || a == null || a();
514
- },
515
- "data-is-ad": O
134
+ image: c$12,
135
+ name: (H = n == null ? void 0 : n.meta) == null ? void 0 : H.accountName,
136
+ userName: z,
137
+ verified: F,
138
+ createdTweet: n == null ? void 0 : n.date
516
139
  }
517
- ) }),
518
- /* @__PURE__ */ d(en, { "data-a": "intr", children: [
519
- l && m && ((t = $e[m]) == null ? void 0 : t.call($e, l)),
520
- /* @__PURE__ */ e(cn, { "data-a": "intr", children: o }),
521
- re && /* @__PURE__ */ d(ln, { children: [
522
- h,
523
- /* @__PURE__ */ e(pn, { children: "pts" })
140
+ ),
141
+ /* @__PURE__ */ jsx(i, { children: D(y) }),
142
+ !d && i$12 && /* @__PURE__ */ jsx(m, { children: /* @__PURE__ */ jsx(p, { src: r$12 == null ? void 0 : r$12[0].mediaUrlHttps }) }),
143
+ d && i$12 && /* @__PURE__ */ jsxs(Fragment, { children: [
144
+ (r$12 == null ? void 0 : r$12.length) === 1 && /* @__PURE__ */ jsx(m, { children: /* @__PURE__ */ jsx(p, { src: r$12[0].mediaUrlHttps }) }),
145
+ (r$12 == null ? void 0 : r$12.length) === 2 && /* @__PURE__ */ jsxs(m, { children: [
146
+ /* @__PURE__ */ jsx(r, { src: r$12[0].mediaUrlHttps }),
147
+ /* @__PURE__ */ jsx(r, { src: r$12[1].mediaUrlHttps })
524
148
  ] }),
525
- Q && /* @__PURE__ */ d(dn, { children: [
526
- ne && /* @__PURE__ */ e(hn, { name: D ? "selectedBetPack" : "selected" }),
527
- /* @__PURE__ */ e(un, { children: /* @__PURE__ */ e(Ee, { value: p, suffix: "%" }) })
528
- ] })
529
- ] })
530
- ]
531
- }
532
- );
533
- }, fn = () => Pe, Cn = /* @__PURE__ */ n(fn())({
534
- name: "ShowInContainer",
535
- class: "sie6cqo",
536
- propsAsIs: !0
537
- }), Tn = /* @__PURE__ */ n("div")({
538
- name: "WinBarContainer",
539
- class: "wgizw4u",
540
- propsAsIs: !1
541
- }), $n = /* @__PURE__ */ n("div")({
542
- name: "Content",
543
- class: "c1l3ucjp",
544
- propsAsIs: !1
545
- }), En = /* @__PURE__ */ n("div")({
546
- name: "Title",
547
- class: "tx7j799",
548
- propsAsIs: !1
549
- }), bn = () => w, wn = /* @__PURE__ */ n(bn())({
550
- name: "WinIcon",
551
- class: "w4lwuj0",
552
- propsAsIs: !0
553
- }), gn = /* @__PURE__ */ n("div")({
554
- name: "Points",
555
- class: "po9i64o",
556
- propsAsIs: !1
557
- }), Pn = /* @__PURE__ */ n("span")({
558
- name: "PointsCount",
559
- class: "pe5g05h",
560
- propsAsIs: !1
561
- }), Rn = /* @__PURE__ */ n("span")({
562
- name: "PointsUnits",
563
- class: "p1hdtpmb",
564
- propsAsIs: !1
565
- }), Dn = ({
566
- title: s,
567
- points: t,
568
- isPlayingTimer: r,
569
- isTimer: l,
570
- animatePoints: o,
571
- questionType: p,
572
- timerDuration: h,
573
- votedInCurrentRender: f,
574
- percentsAnimated: P,
575
- onTimerExpired: I
576
- }) => /* @__PURE__ */ e(
577
- Cn,
578
- {
579
- enabled: p === i.PREDICTION && f,
580
- animate: P,
581
- children: /* @__PURE__ */ d(
582
- Tn,
583
- {
584
- style: {
585
- justifyContent: p === i.PREDICTION ? "center" : "space-between"
586
- },
587
- children: [
588
- /* @__PURE__ */ d($n, { children: [
589
- s && /* @__PURE__ */ e(En, { children: s }),
590
- t !== void 0 && p !== i.POLL && /* @__PURE__ */ d(z, { children: [
591
- /* @__PURE__ */ e(wn, { name: "icon-trophy" }),
592
- /* @__PURE__ */ d(gn, { children: [
593
- /* @__PURE__ */ e(Pn, { children: o ? /* @__PURE__ */ e(Ee, { value: t, delay: 0.3 }) : t }),
594
- /* @__PURE__ */ e(Rn, { children: "PTS" })
595
- ] })
149
+ (r$12 == null ? void 0 : r$12.length) === 3 && /* @__PURE__ */ jsxs(m, { children: [
150
+ /* @__PURE__ */ jsx(r, { src: r$12[0].mediaUrlHttps }),
151
+ /* @__PURE__ */ jsxs(c, { children: [
152
+ /* @__PURE__ */ jsx(p, { src: r$12[1].mediaUrlHttps }),
153
+ /* @__PURE__ */ jsx(p, { src: r$12[2].mediaUrlHttps })
596
154
  ] })
597
155
  ] }),
598
- l && p !== i.PREDICTION && /* @__PURE__ */ e(He, { isPlaying: r, onTimerExpired: I, duration: h })
599
- ]
600
- }
601
- )
602
- }
603
- ), qn = (s, t) => {
604
- switch (s) {
605
- case "already_voted":
606
- return t === i.POLL ? "You’ve already answered this question on another device." : "You’ve already answered this question on another device. So the points for this answer won't tally.";
607
- default:
608
- return "Something went wrong, please try again";
609
- }
610
- }, Un = () => /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ d(De, { children: [
611
- /* @__PURE__ */ e(le, { loading: !0, style: { height: "40px", borderRadius: "100px" } }),
612
- /* @__PURE__ */ e(le, { loading: !0, style: { height: "24px", margin: "16px 0" } }),
613
- /* @__PURE__ */ e(qe, { children: Array.from({ length: 5 }).map((s, t) => /* @__PURE__ */ e(le, { loading: !0, style: { height: "44px" } }, t)) })
614
- ] }) }), Kn = ({
615
- openedQuestion: s,
616
- isLoading: t,
617
- vote: r,
618
- close: l,
619
- isEarlyPrediction: o,
620
- mastersApp: p,
621
- webos: h
622
- }) => {
623
- var f, P;
624
- const I = s.subject, a = s.type, R = s.status, E = (f = s.options) == null ? void 0 : f.options, y = s.marketClosed, m = s.id, q = ee(), x = ee(), g = p ? !1 : (s == null ? void 0 : s.adUnit) === Ke.STANDART, [T, N] = b(!1), [k, S] = b(!1), [D, O] = b(!0), [v, V] = b(!1), [M, G] = b(!1), [ne, L] = b(""), [Q, re] = b(""), [F, te] = b(!1), [ke, Oe] = b(!1), [me, Ne] = b(!1), { runAnimation: U, finished: he } = os();
625
- H(() => {
626
- he && l(m);
627
- }, [l, he]), H(() => {
628
- a === i.PREDICTION ? y && O(!1) : R === se.RESOLVED && O(!1);
629
- }, []);
630
- const Se = j((u) => {
631
- S(u), N(!0);
632
- }, []), Ve = j(() => {
633
- o && N(!1);
634
- }, [o]), oe = ee(!1), Ie = j(() => {
635
- x.current && clearTimeout(x.current), x.current = setTimeout(() => {
636
- Ne(!0), U({ delay: 5500 });
637
- }, 4e3);
638
- }, [U]), ve = j(
639
- async (u) => {
640
- if (!oe.current && (oe.current = !0, m)) {
641
- const $ = u.currentTarget.value;
642
- L($);
643
- try {
644
- await r(m, $), g && Ie();
645
- } catch (K) {
646
- re(qn(K.message, a)), L(""), console.error("Error while voting", K), oe.current = !1;
647
- }
648
- }
649
- },
650
- [a, m, L, r, g, Ie]
651
- ), je = j(() => {
652
- V(!0), U({ delay: 3500 });
653
- }, [U]), Le = j(() => {
654
- G(!0), U({ delay: 3500 });
655
- }, [U]), c = s == null ? void 0 : s.answers.find((u) => u.youVoted === !0), C = _(
656
- () => !!(s != null && s.answers.find((u) => u.correct === !0)),
657
- [s]
658
- ), A = _(
659
- () => s == null ? void 0 : s.answers.find((u) => u.correct === !0),
660
- [s]
661
- );
662
- H(() => {
663
- c && T && !ke && (q.current = setTimeout(Le, 1e4), Oe(!0));
664
- }, [c]), H(() => () => {
665
- clearTimeout(q.current), clearTimeout(x.current);
666
- }, []);
667
- const ae = _(() => s ? s.answers.map((u) => {
668
- var $;
669
- return {
670
- ...u,
671
- questionVoted: !!c,
672
- youSelected: ne === u.id,
673
- isLoading: t,
674
- hasCorrectAnswer: C,
675
- questionType: s.type,
676
- answerTimeExpired: v,
677
- questionStatus: R,
678
- imageMode: ($ = s.appearance) == null ? void 0 : $.images,
679
- onVote: ve
680
- };
681
- }) : [], [
682
- C,
683
- v,
684
- t,
685
- s,
686
- c,
687
- R,
688
- ve,
689
- ne
690
- ]);
691
- H(() => {
692
- const u = ae.some(({ percentageDecimal: K }) => K !== 0), $ = c && a === i.PREDICTION;
693
- Q && (o || !u || y && $) && te(!0);
694
- }, [ae, Q, o, y, a, c]);
695
- const Ae = E && (E.case === "trivia" || E.case === "prediction") ? E.value : void 0, W = R === se.RESOLVED && a === i.TRIVIA && !c && !D, ce = a === i.TRIVIA && k, de = _(() => g ? !1 : a === i.PREDICTION ? o ? !1 : !!(c && !C || c && C && A != null && A.youVoted) : !0, [a, c, C, A, o, g]), Qe = _(() => {
696
- if (a === i.PREDICTION && c && (!C || C && A != null && A.youVoted))
697
- return c.points;
698
- if (!(W || v))
699
- return c ? c.correct ? c.pointsEarned : 0 : A == null ? void 0 : A.points;
700
- }, [v, c, A, W, a, C]), Fe = _(() => a === i.PREDICTION && c ? C ? C && A != null && A.youVoted ? "You won" : "" : "To win" : W || v ? "Time expired" : a === i.POLL ? "Time remaining" : c ? "You won" : "To win", [v, a, c, W, C, A]), We = !de || de && a === i.PREDICTION && T && !F, Be = (a === i.TRIVIA || a === i.PREDICTION) && c && C && (A == null ? void 0 : A.youVoted), Ye = c || W || ce || a === i.TRIVIA && R === se.RESOLVED && D, ze = !o && (v || M) || me, Me = () => {
701
- const u = () => a === i.TRIVIA ? c != null && c.correct ? `That's correct!
702
- You chose wisely.` : `So close!
703
- Better luck next time.` : a === i.POLL ? `Thanks for answering.
704
- Please stay tuned for the next question.` : a === i.PREDICTION ? "Stay tuned to see if your prediction was correct." : "", $ = () => a === i.TRIVIA ? `Your Pick: ${A == null ? void 0 : A.text}` : a === i.POLL || a === i.PREDICTION ? `Your Pick: ${c == null ? void 0 : c.text}` : "", K = () => a === i.TRIVIA && (E == null ? void 0 : E.case) === "trivia" ? E == null ? void 0 : E.value.explanation : a === i.PREDICTION ? I : "";
705
- return me ? /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(
706
- js,
707
- {
708
- title: u(),
709
- description: $(),
710
- ...c != null && c.correct || a === i.POLL || a === i.PREDICTION ? { icon: "icon-correct" } : {},
711
- ...a === i.TRIVIA || a === i.PREDICTION ? { additionalDescription: K() } : {}
712
- }
713
- ) }) : !o && (v || M) ? /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(
714
- As,
715
- {
716
- icon: "icon-check-circle",
717
- title: "More to come...",
718
- description: M ? /* @__PURE__ */ d(z, { children: [
719
- "Stay tuned for more questions ",
720
- /* @__PURE__ */ e("br", {}),
721
- " and insights."
722
- ] }) : /* @__PURE__ */ d(z, { children: [
723
- "Watch for additional enhanced stream ",
724
- /* @__PURE__ */ e("br", {}),
725
- " interactive experience."
156
+ (r$12 == null ? void 0 : r$12.length) === 4 && /* @__PURE__ */ jsxs(m, { children: [
157
+ /* @__PURE__ */ jsxs(c, { children: [
158
+ /* @__PURE__ */ jsx(p, { src: r$12[0].mediaUrlHttps }),
159
+ /* @__PURE__ */ jsx(p, { src: r$12[1].mediaUrlHttps })
160
+ ] }),
161
+ /* @__PURE__ */ jsxs(c, { children: [
162
+ /* @__PURE__ */ jsx(p, { src: r$12[2].mediaUrlHttps }),
163
+ /* @__PURE__ */ jsx(p, { src: r$12[3].mediaUrlHttps })
164
+ ] })
165
+ ] })
726
166
  ] })
727
- }
728
- ) }) : null;
729
- };
730
- return /* @__PURE__ */ d(Qs, { children: [
731
- o && /* @__PURE__ */ e(Fs, {}),
732
- /* @__PURE__ */ e(Re, { style: o ? { marginTop: "-40px" } : {}, children: /* @__PURE__ */ d(De, { children: [
733
- !o && !g && /* @__PURE__ */ e(
734
- Ce,
735
- {
736
- feedbackMessages: Ae,
737
- questionVoted: !!c,
738
- questionVotedCorrectly: c == null ? void 0 : c.correct,
739
- questionType: a,
740
- hasCorrectAnswer: C,
741
- showExpiredNotification: W,
742
- showClosedNotificationTrivia: ce,
743
- votedInCurrentRender: T,
744
- votedAfterQuestionClosed: k,
745
- enteredAnActiveQuestion: D,
746
- marketClosed: y,
747
- percentsAnimated: F,
748
- voteErrorMessage: Q,
749
- votedAnswer: c
750
- }
751
- ),
752
- de && /* @__PURE__ */ e(
753
- Dn,
167
+ ] }),
168
+ !i$12 && (((U = r$12 == null ? void 0 : r$12[0]) == null ? void 0 : U.type) === "video" || ((f = r$12 == null ? void 0 : r$12[0]) == null ? void 0 : f.type) === "animated_gif") && m$12 && /* @__PURE__ */ jsx(
169
+ Et,
754
170
  {
755
- title: Fe,
756
- points: Qe,
757
- onTimerExpired: je,
758
- questionType: s.type,
759
- isTimer: !t,
760
- isPlayingTimer: !c,
761
- animatePoints: Be,
762
- timerDuration: Ye ? 0 : Number(((P = s == null ? void 0 : s.appearance) == null ? void 0 : P.autoHideInterval) || "30"),
763
- votedInCurrentRender: T,
764
- percentsAnimated: F
171
+ muted: C,
172
+ source: m$12,
173
+ poster: r$12[0].mediaUrlHttps,
174
+ controlVideo: T
765
175
  }
766
- ),
767
- ze ? Me() : /* @__PURE__ */ d(z, { children: [
768
- o && /* @__PURE__ */ d(Us, { children: [
769
- /* @__PURE__ */ e(_s, { name: "iconEarlyPrediction" }),
770
- "EARLY PREDICTION"
771
- ] }),
772
- /* @__PURE__ */ e(Ys, { style: We ? { marginTop: 0 } : {}, children: I }),
773
- o && /* @__PURE__ */ e(
774
- Ce,
775
- {
776
- feedbackMessages: Ae,
777
- questionVoted: !!c,
778
- questionVotedCorrectly: c == null ? void 0 : c.correct,
779
- questionType: a,
780
- hasCorrectAnswer: C,
781
- showExpiredNotification: W,
782
- showClosedNotificationTrivia: ce,
783
- votedInCurrentRender: T,
784
- votedAfterQuestionClosed: k,
785
- enteredAnActiveQuestion: D,
786
- marketClosed: y,
787
- percentsAnimated: F,
788
- voteErrorMessage: Q,
789
- isEarlyPrediction: o,
790
- correctAnswer: A,
791
- votedAnswer: c,
792
- onAnimationEnd: Ve
793
- }
794
- ),
795
- /* @__PURE__ */ d(zs, { children: [
796
- /* @__PURE__ */ e(qe, { children: ae.sort((u, $) => u.id > $.id ? 1 : -1).map((u, $) => /* @__PURE__ */ e(
797
- yn,
798
- {
799
- ...u,
800
- firstOption: $ === 0,
801
- markThatVoted: Se,
802
- onPercentsAnimated: () => te(!0),
803
- votedAfterQuestionClosed: k,
804
- enteredAnActiveQuestion: D,
805
- marketClosed: y,
806
- isEarlyPrediction: o,
807
- isAd: g,
808
- webos: h
809
- },
810
- u.id
811
- )) }),
812
- o && /* @__PURE__ */ d(z, { children: [
813
- /* @__PURE__ */ e(Ws, {}),
814
- /* @__PURE__ */ e(Bs, { children: /* @__PURE__ */ e(Gs, { name: "mastersLogoWhite" }) })
815
- ] })
816
- ] })
817
- ] })
818
- ] }) })
819
- ] });
820
- };
176
+ )
177
+ ] });
178
+ }
179
+ );
821
180
  export {
822
- Bn as C,
823
- Yn as S,
824
- os as a,
825
- we as b,
826
- Ge as c,
827
- zn as d,
828
- Kn as e,
829
- ge as f,
830
- Wn as l,
831
- Fn as m,
832
- be as n,
833
- Qn as p,
834
- Un as t
181
+ D$1 as D,
182
+ I,
183
+ D as a,
184
+ b,
185
+ e$1 as e,
186
+ o$1 as o,
187
+ s
835
188
  };