@streamlayer/react 1.24.6 → 1.24.7

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 (160) hide show
  1. package/lib/cjs/advertisement.js +19607 -203
  2. package/lib/cjs/auth.js +4459 -1
  3. package/lib/cjs/bet-pack.js +15691 -1
  4. package/lib/cjs/index.js +19411 -1
  5. package/lib/cjs/insight.js +13509 -1
  6. package/lib/cjs/masters.js +20696 -1
  7. package/lib/cjs/notification.js +13087 -1
  8. package/lib/cjs/package.json +1 -0
  9. package/lib/cjs/pause-ad.js +8390 -1
  10. package/lib/cjs/points.js +7189 -1
  11. package/lib/cjs/polyfills.js +69 -0
  12. package/lib/cjs/polymarket.js +16394 -14
  13. package/lib/cjs/style.css +1 -0
  14. package/lib/cjs/useStreamLayerApp.js +4711 -1
  15. package/lib/dist/cjs/index.js +20696 -1
  16. package/lib/dist/es/index.js +20669 -10
  17. package/lib/dist/es/polyfills.js +92 -0
  18. package/lib/es/advertisement.js +2821 -2746
  19. package/lib/es/analytics.js +1 -1
  20. package/lib/es/feature.js +60 -56
  21. package/lib/es/index.js +1 -1
  22. package/lib/es/index10.js +181 -7
  23. package/lib/es/index11.js +371 -181
  24. package/lib/es/index12.js +3 -3
  25. package/lib/es/index13.js +4 -4
  26. package/lib/es/index14.js +2 -2
  27. package/lib/es/index15.js +384 -414
  28. package/lib/es/index16.js +45 -46
  29. package/lib/es/index2.js +11 -13
  30. package/lib/es/index3.js +34 -4
  31. package/lib/es/index4.js +3 -3
  32. package/lib/es/index5.js +3 -19
  33. package/lib/es/index6.js +7 -4
  34. package/lib/es/index7.js +284 -5
  35. package/lib/es/index8.js +236 -281
  36. package/lib/es/index9.js +8 -179
  37. package/lib/es/insight.js +1 -1
  38. package/lib/es/masters2.js +9 -10
  39. package/lib/es/notification.js +5 -5
  40. package/lib/es/pause-ad.js +1 -1
  41. package/lib/es/points.js +3 -3
  42. package/lib/es/polymarket.js +2 -2
  43. package/lib/es/storage.js +3 -3
  44. package/lib/es/style.css +1 -0
  45. package/lib/es/useStreamLayerApp2.js +5654 -4604
  46. package/lib/source.css +1 -120
  47. package/package.json +99 -83
  48. package/lib/cjs/Question.js +0 -1
  49. package/lib/cjs/analytics.js +0 -1
  50. package/lib/cjs/feature.js +0 -1
  51. package/lib/cjs/gamification-feature.js +0 -1
  52. package/lib/cjs/gamification-feature2.js +0 -1
  53. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  54. package/lib/cjs/index-CfSdnrfA.js +0 -5
  55. package/lib/cjs/index10.js +0 -1
  56. package/lib/cjs/index11.js +0 -1
  57. package/lib/cjs/index12.js +0 -1
  58. package/lib/cjs/index13.js +0 -4
  59. package/lib/cjs/index14.js +0 -1
  60. package/lib/cjs/index15.js +0 -1
  61. package/lib/cjs/index16.js +0 -5
  62. package/lib/cjs/index2.js +0 -1
  63. package/lib/cjs/index3.js +0 -1
  64. package/lib/cjs/index4.js +0 -5
  65. package/lib/cjs/index5.js +0 -1
  66. package/lib/cjs/index6.js +0 -1
  67. package/lib/cjs/index7.js +0 -1
  68. package/lib/cjs/index8.js +0 -1
  69. package/lib/cjs/index9.js +0 -7
  70. package/lib/cjs/masters2.js +0 -8
  71. package/lib/cjs/storage.js +0 -1
  72. package/lib/cjs/theme.js +0 -1
  73. package/lib/cjs/useStreamLayerApp2.js +0 -17
  74. package/lib/cjs/utils.js +0 -47
  75. package/lib/classic/app/advertisement.d.ts +0 -19
  76. package/lib/classic/app/app.d.ts +0 -23
  77. package/lib/classic/app/auth.d.ts +0 -4
  78. package/lib/classic/app/bet-pack.d.ts +0 -10
  79. package/lib/classic/app/insight.d.ts +0 -13
  80. package/lib/classic/app/masters.d.ts +0 -19
  81. package/lib/classic/app/notification.d.ts +0 -5
  82. package/lib/classic/app/pause-ad.d.ts +0 -27
  83. package/lib/classic/app/points.d.ts +0 -3
  84. package/lib/classic/app/polymarket.d.ts +0 -7
  85. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  86. package/lib/classic/cjs/Question.js +0 -1
  87. package/lib/classic/cjs/advertisement.js +0 -203
  88. package/lib/classic/cjs/analytics.js +0 -1
  89. package/lib/classic/cjs/auth.js +0 -1
  90. package/lib/classic/cjs/bet-pack.js +0 -5
  91. package/lib/classic/cjs/feature.js +0 -1
  92. package/lib/classic/cjs/gamification-feature.js +0 -1
  93. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  94. package/lib/classic/cjs/index-CfSdnrfA.js +0 -5
  95. package/lib/classic/cjs/index.js +0 -1
  96. package/lib/classic/cjs/index10.js +0 -1
  97. package/lib/classic/cjs/index11.js +0 -1
  98. package/lib/classic/cjs/index12.js +0 -1
  99. package/lib/classic/cjs/index13.js +0 -4
  100. package/lib/classic/cjs/index2.js +0 -5
  101. package/lib/classic/cjs/index3.js +0 -1
  102. package/lib/classic/cjs/index4.js +0 -1
  103. package/lib/classic/cjs/index5.js +0 -1
  104. package/lib/classic/cjs/index6.js +0 -1
  105. package/lib/classic/cjs/index7.js +0 -7
  106. package/lib/classic/cjs/index8.js +0 -1
  107. package/lib/classic/cjs/index9.js +0 -1
  108. package/lib/classic/cjs/insight.js +0 -1
  109. package/lib/classic/cjs/notification.js +0 -1
  110. package/lib/classic/cjs/notification2.js +0 -1
  111. package/lib/classic/cjs/pause-ad.js +0 -1
  112. package/lib/classic/cjs/points.js +0 -1
  113. package/lib/classic/cjs/polymarket.js +0 -14
  114. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  115. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  116. package/lib/classic/cjs/utils.js +0 -47
  117. package/lib/classic/es/Question.js +0 -503
  118. package/lib/classic/es/advertisement.js +0 -38792
  119. package/lib/classic/es/analytics.js +0 -84
  120. package/lib/classic/es/auth.js +0 -11
  121. package/lib/classic/es/bet-pack.js +0 -3418
  122. package/lib/classic/es/feature.js +0 -210
  123. package/lib/classic/es/gamification-feature.js +0 -4
  124. package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
  125. package/lib/classic/es/index.js +0 -15
  126. package/lib/classic/es/index10.js +0 -321
  127. package/lib/classic/es/index11.js +0 -2592
  128. package/lib/classic/es/index12.js +0 -185
  129. package/lib/classic/es/index13.js +0 -820
  130. package/lib/classic/es/index2.js +0 -2605
  131. package/lib/classic/es/index3.js +0 -19
  132. package/lib/classic/es/index4.js +0 -6
  133. package/lib/classic/es/index5.js +0 -4
  134. package/lib/classic/es/index6.js +0 -285
  135. package/lib/classic/es/index7.js +0 -181
  136. package/lib/classic/es/index8.js +0 -7
  137. package/lib/classic/es/index9.js +0 -11
  138. package/lib/classic/es/insight.js +0 -79
  139. package/lib/classic/es/notification.js +0 -9
  140. package/lib/classic/es/notification2.js +0 -1126
  141. package/lib/classic/es/pause-ad.js +0 -232
  142. package/lib/classic/es/points.js +0 -76
  143. package/lib/classic/es/polymarket.js +0 -6617
  144. package/lib/classic/es/useStreamLayerApp.js +0 -4
  145. package/lib/classic/es/useStreamLayerApp2.js +0 -11627
  146. package/lib/classic/es/utils.js +0 -76
  147. package/lib/classic/index.d.ts +0 -6
  148. package/lib/classic/masters.d.ts +0 -8
  149. package/lib/classic/source.css +0 -110
  150. package/lib/dist/cjs/gamification-feature.js +0 -1
  151. package/lib/dist/cjs/index-CfSdnrfA.js +0 -5
  152. package/lib/dist/cjs/masters.js +0 -69
  153. package/lib/dist/es/gamification-feature.js +0 -4
  154. package/lib/dist/es/index-CfSdnrfA.js +0 -3775
  155. package/lib/dist/es/masters.js +0 -22387
  156. package/lib/dist/index.d.ts +0 -1357
  157. package/lib/dist/source.css +0 -64
  158. package/lib/es/index-CfSdnrfA.js +0 -3775
  159. package/lib/style.css +0 -1
  160. /package/lib/{classic/es/index-CfSdnrfA.js → es/index-D8wyDNJD.js} +0 -0
@@ -1,2605 +0,0 @@
1
- import { m as G, h as ye } from "./index8.js";
2
- import { jsx as t, jsxs as h, Fragment as S } from "react/jsx-runtime";
3
- import { u as $, F as X, s as i, b as we, c as D, a as Z, N as e2 } from "./feature.js";
4
- import { l as ke, S as Le, m as _e, d as Ne, n as Se, C as Te, y as xe, a as Re, f as n2, p as Ee, c as Ve } from "./index13.js";
5
- import { useState as w, useEffect as y, useRef as E, useCallback as q, Component as He, createElement as ze, PureComponent as Me, useMemo as z, Suspense as Oe, lazy as De, forwardRef as te, useLayoutEffect as Fe, useContext as f2 } from "react";
6
- import { atom as Be } from "nanostores";
7
- import l2 from "lodash.throttle";
8
- import { A as O } from "./index7.js";
9
- import { f as ne, u as ie, A as qe, b as Pe } from "./analytics.js";
10
- import { $ as Ue, p as p2, _ as je, O as We, e as Ze } from "./Question.js";
11
- import { i as M } from "./index9.js";
12
- import { I as h2, s as ae, N as re, e as oe } from "./index12.js";
13
- import { createPortal as s2 } from "react-dom";
14
- import { u as Ge } from "./utils.js";
15
- import { B as L } from "./index6.js";
16
- import { I as le, l as Qe, S as V, e as F, p as C2, Q as R, a as Ke } from "./useStreamLayerApp2.js";
17
- import Ye from "react-infinite-scroller";
18
- import { r as ce, S as Je, R as Xe, D as e0 } from "./notification2.js";
19
- import { O as s0, V as t0 } from "./index10.js";
20
- import "uuid";
21
- import "@nanostores/query";
22
- import "./index5.js";
23
- import { e as n0 } from "./index4.js";
24
- import { p as i0 } from "./index3.js";
25
- import { i as g2, q as a0, _ as r0, j as v2 } from "./hooks-n9ax4LRT.js";
26
- const de = (e) => Be(e), o0 = (e) => {
27
- const s = $(e.getActiveFeature()), n = $(e.streamStore()), [a, r] = w(null);
28
- return y(() => {
29
- const o = e.getFeatures();
30
- if (!s)
31
- r(null);
32
- else
33
- for (const [l, c] of o)
34
- l === s ? (c.status.get() === X.Suspended && c.enable(), r(c)) : c.status.get() === X.Ready && c.disable();
35
- return () => {
36
- for (const [, l] of o)
37
- l.status.get() === X.Ready && l.disable();
38
- };
39
- }, [s, e, n]), [s, a];
40
- }, I2 = Object.keys(O), $2 = () => {
41
- const e = window.innerWidth;
42
- let s = "sm";
43
- for (let n = I2.length - 1; n > 0; n--) {
44
- const a = I2[n];
45
- if (!(e < O[a]) && e >= O[a]) {
46
- s = a;
47
- break;
48
- }
49
- }
50
- return {
51
- name: s,
52
- size: O[s]
53
- };
54
- }, b2 = (e) => (e.current?.getBoundingClientRect().y || 0) < -68, t2 = () => window.matchMedia("(orientation: landscape)").matches, l0 = (e) => {
55
- const [s] = w(() => ne({
56
- screen: $2(),
57
- sdkInView: b2(e),
58
- sdkInDesktopView: t2()
59
- }));
60
- return y(() => {
61
- const n = l2(() => {
62
- s.setKey("sdkInView", b2(e));
63
- }, 200), a = l2(() => {
64
- const r = $2();
65
- s.setKey("screen", r), s.setKey("sdkInDesktopView", t2());
66
- }, 200);
67
- return window.addEventListener("scroll", n), window.addEventListener("resize", a), () => {
68
- window.removeEventListener("scroll", n), window.removeEventListener("resize", a);
69
- };
70
- }, [s, e]), [s];
71
- }, m2 = (e, s, n) => {
72
- const a = s >= O.lg && s < O.xl ? 75 : 52;
73
- e.current && window.scrollTo({
74
- top: e.current.offsetTop - a,
75
- ...n
76
- });
77
- }, c0 = 15, d0 = (e, s) => {
78
- const n = E(null), a = E(0), [r] = w(
79
- ne({
80
- scrollPosition: 0,
81
- tabsShown: !0,
82
- scrollDirection: "forward"
83
- })
84
- ), o = $(s);
85
- return y(() => {
86
- const l = t2() ? n.current : window;
87
- if (!l)
88
- return () => {
89
- };
90
- const c = l2((d) => {
91
- const m = d.target;
92
- if (!m)
93
- return;
94
- let f = 0;
95
- t2() ? f = m.scrollTop : f = e.current?.getBoundingClientRect().y || 0;
96
- const u = a.current - f;
97
- if (c0 > Math.abs(u))
98
- return;
99
- const p = a.current < f ? "forward" : "backward";
100
- a.current = f, r.set({
101
- scrollPosition: Math.round(f),
102
- scrollDirection: p,
103
- tabsShown: r.get().tabsShown
104
- });
105
- }, 200);
106
- return l.addEventListener("scroll", c), () => {
107
- l.removeEventListener("scroll", c);
108
- };
109
- }, [r, e, o.screen]), [n, r];
110
- }, a2 = /* @__PURE__ */ i("div")({
111
- name: "LoadingContainer",
112
- class: "lclc0ej",
113
- propsAsIs: !1
114
- }), p0 = ({
115
- feature: e,
116
- sdk: s,
117
- children: n,
118
- className: a,
119
- noWait: r
120
- }) => {
121
- const o = $(e.status), l = $(s.sdkStore.slStreamId);
122
- if (!r) {
123
- if (l?.loading && !l.data)
124
- return /* @__PURE__ */ t(a2, {
125
- className: a,
126
- children: "Event is loading..."
127
- });
128
- if (!l?.data)
129
- return /* @__PURE__ */ t(a2, {
130
- className: a,
131
- children: "Event is forbidden..."
132
- });
133
- if (o !== X.Ready)
134
- return /* @__PURE__ */ t(a2, {
135
- className: a,
136
- children: "Wait feature..."
137
- });
138
- }
139
- return n;
140
- }, h0 = /* @__PURE__ */ i("div")({
141
- name: "Container",
142
- class: "c1zy8a",
143
- propsAsIs: !1
144
- }), m0 = /* @__PURE__ */ i("div")({
145
- name: "Title",
146
- class: "t1vih9p5",
147
- propsAsIs: !1
148
- }), u0 = /* @__PURE__ */ i("div")({
149
- name: "Indicator",
150
- class: "i1fbnvpb",
151
- propsAsIs: !1
152
- }), A2 = ({ indicator: e, title: s }) => /* @__PURE__ */ h(h0, { children: [
153
- /* @__PURE__ */ t(m0, { children: s }),
154
- /* @__PURE__ */ t(u0, { children: e })
155
- ] }), f0 = /* @__PURE__ */ i("div")({
156
- name: "Container",
157
- class: "ctmhwyc",
158
- propsAsIs: !1
159
- }), C0 = /* @__PURE__ */ i("div")({
160
- name: "Indicator",
161
- class: "i1jri200",
162
- propsAsIs: !1
163
- }), g0 = /* @__PURE__ */ i("div")({
164
- name: "Title",
165
- class: "t8s05oq",
166
- propsAsIs: !1
167
- }), Q = ({ indicator: e, title: s }) => /* @__PURE__ */ h(f0, { children: [
168
- /* @__PURE__ */ t(C0, { children: e }),
169
- /* @__PURE__ */ t(g0, { children: s })
170
- ] }), v0 = /* @__PURE__ */ i("div")({
171
- name: "Container",
172
- class: "c1yrpn9o",
173
- propsAsIs: !1
174
- }), I0 = /* @__PURE__ */ i("div")({
175
- name: "TopInfo",
176
- class: "t17fwahh",
177
- propsAsIs: !1
178
- }), $0 = /* @__PURE__ */ i("div")({
179
- name: "BottomInfo",
180
- class: "by6w7e9",
181
- propsAsIs: !1
182
- }), b0 = /* @__PURE__ */ i("div")({
183
- name: "User",
184
- class: "u1g7arbm",
185
- propsAsIs: !1
186
- }), A0 = /* @__PURE__ */ i("img")({
187
- name: "Avatar",
188
- class: "a1ldeata",
189
- propsAsIs: !1
190
- }), y0 = /* @__PURE__ */ i("div")({
191
- name: "UserInfo",
192
- class: "u10d4koz",
193
- propsAsIs: !1
194
- }), w0 = /* @__PURE__ */ i("div")({
195
- name: "UserName",
196
- class: "u1q6roj0",
197
- propsAsIs: !1
198
- }), k0 = /* @__PURE__ */ i("div")({
199
- name: "UserRating",
200
- class: "ui0m425",
201
- propsAsIs: !1
202
- }), L0 = /* @__PURE__ */ i("img")({
203
- name: "TrophyIcon",
204
- class: "t1el3mrn",
205
- propsAsIs: !1
206
- }), _0 = /* @__PURE__ */ i("div")({
207
- name: "RtsContainer",
208
- class: "r2vgnxv",
209
- propsAsIs: !1
210
- }), N0 = /* @__PURE__ */ i("div")({
211
- name: "RtsDivider",
212
- class: "roqn06j",
213
- propsAsIs: !1
214
- }), S0 = /* @__PURE__ */ i("div")({
215
- name: "Rts",
216
- class: "r15adx7c",
217
- propsAsIs: !1
218
- }), y2 = /* @__PURE__ */ i("div")({
219
- name: "RtsIndicator",
220
- class: "rv59lta",
221
- propsAsIs: !1
222
- }), w2 = /* @__PURE__ */ i("div")({
223
- name: "RtsLabel",
224
- class: "r55lotb",
225
- propsAsIs: !1
226
- }), T0 = /* @__PURE__ */ i("div")({
227
- name: "Divider",
228
- class: "d1knfgqt",
229
- propsAsIs: !1
230
- }), x0 = /* @__PURE__ */ i("div")({
231
- name: "Ranks",
232
- class: "r1mqo824",
233
- propsAsIs: !1
234
- }), R0 = /* @__PURE__ */ i("div")({
235
- name: "Statistics",
236
- class: "sxareh6",
237
- propsAsIs: !1
238
- }), E0 = /* @__PURE__ */ i("div")({
239
- name: "AvatarPlaceholder",
240
- class: "amcu48h",
241
- propsAsIs: !1
242
- }), V0 = /* @__PURE__ */ i("button")({
243
- name: "UserAccountBtn",
244
- class: "u32nfkp",
245
- propsAsIs: !1
246
- }), H0 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", pe = ({
247
- loading: e,
248
- hideFriendsRank: s,
249
- avatar: n,
250
- name: a,
251
- points: r,
252
- friendsRank: o,
253
- rank: l,
254
- streak: c,
255
- correct: d,
256
- incorrect: m,
257
- inTop: f,
258
- successRate: u
259
- }) => /* @__PURE__ */ h(v0, { "data-loading": e, children: [
260
- /* @__PURE__ */ t(I0, { children: /* @__PURE__ */ t(M, { loading: e, children: /* @__PURE__ */ h(b0, { children: [
261
- /* @__PURE__ */ h(V0, { children: [
262
- n && /* @__PURE__ */ t(A0, { alt: "avatar", src: n }),
263
- !n && /* @__PURE__ */ t(E0, { children: h2(a || "") })
264
- ] }),
265
- /* @__PURE__ */ h(y0, { children: [
266
- /* @__PURE__ */ t(w0, { children: a }),
267
- /* @__PURE__ */ h(k0, { children: [
268
- /* @__PURE__ */ h(_0, { children: [
269
- /* @__PURE__ */ h(S0, { children: [
270
- /* @__PURE__ */ t(L0, { alt: "rank-icon", src: H0 }),
271
- /* @__PURE__ */ h(y2, { children: [
272
- ae(r),
273
- /* @__PURE__ */ t(w2, { children: "PTS" })
274
- ] })
275
- ] }),
276
- s && /* @__PURE__ */ h(y2, { children: [
277
- /* @__PURE__ */ t(N0, {}),
278
- l || 0,
279
- /* @__PURE__ */ t(w2, { children: "global rank" })
280
- ] })
281
- ] }),
282
- !s && /* @__PURE__ */ h(S, { children: [
283
- /* @__PURE__ */ t(T0, {}),
284
- /* @__PURE__ */ h("div", { children: [
285
- "TOP ",
286
- f || 0,
287
- "%"
288
- ] })
289
- ] })
290
- ] })
291
- ] })
292
- ] }) }) }),
293
- /* @__PURE__ */ h($0, { children: [
294
- !s && /* @__PURE__ */ h(x0, { children: [
295
- /* @__PURE__ */ t(M, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ t(A2, { indicator: o || 0, title: "Friends rank" }) }),
296
- /* @__PURE__ */ t(M, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ t(A2, { indicator: l || 0, title: "Global rank" }) })
297
- ] }),
298
- /* @__PURE__ */ t(M, { loading: e, children: /* @__PURE__ */ h(R0, { children: [
299
- /* @__PURE__ */ t(Q, { indicator: c || 0, title: "Win streak" }),
300
- /* @__PURE__ */ t(Q, { indicator: d || 0, title: "Correct" }),
301
- /* @__PURE__ */ t(Q, { indicator: m || 0, title: "Incorrect" }),
302
- /* @__PURE__ */ t(Q, { indicator: `${u || 0}%`, title: "Succ. rate" })
303
- ] }) })
304
- ] })
305
- ] }), z0 = /* @__PURE__ */ i("div")({
306
- name: "StaticContainer",
307
- class: "svm502q",
308
- propsAsIs: !1
309
- }), M0 = `
310
- .sl-pill-button {
311
- display: none !important;
312
- }
313
- `, he = () => window.innerWidth >= O.md && window.innerWidth < O.lg ? 76 : 53, k2 = (e) => {
314
- const s = he();
315
- return Math.round((e.current?.getBoundingClientRect().y || 0) - s) <= 0;
316
- }, me = ({
317
- children: e,
318
- container: s,
319
- useContainer: n,
320
- staticStyles: a
321
- }) => {
322
- const [r] = w(() => k2(s)), [o, l] = w(!1);
323
- return y(() => {
324
- if (!s.current || !r)
325
- return l(!0), () => {
326
- };
327
- const c = window.scrollY;
328
- return l(!0), () => {
329
- k2(s) && window.scrollTo({
330
- top: c,
331
- behavior: "instant"
332
- });
333
- };
334
- }, []), y(() => {
335
- if (o && s.current && r) {
336
- const c = he();
337
- window.scrollTo({
338
- top: s.current.offsetTop - c,
339
- behavior: "instant"
340
- });
341
- }
342
- }, [o]), !s.current || !o ? null : n ? s2(/* @__PURE__ */ h(z0, {
343
- className: "StaticContainer",
344
- children: [e, /* @__PURE__ */ t("style", {
345
- children: Ge
346
- }), /* @__PURE__ */ t("style", {
347
- children: M0
348
- })]
349
- }), s.current, "modal-node") : s2(/* @__PURE__ */ h(S, {
350
- children: [e, /* @__PURE__ */ t("style", {
351
- children: a
352
- })]
353
- }), s.current, "modal-node");
354
- }, O0 = /* @__PURE__ */ i("div")({
355
- name: "Container",
356
- class: "c115qtkr",
357
- propsAsIs: !1
358
- }), D0 = /* @__PURE__ */ i("div")({
359
- name: "STabs",
360
- class: "sxnslc8",
361
- propsAsIs: !1
362
- }), F0 = /* @__PURE__ */ i("button")({
363
- name: "Button",
364
- class: "b1umzux0",
365
- propsAsIs: !1
366
- }), B0 = /* @__PURE__ */ i("span")({
367
- name: "Title",
368
- class: "tspsaas",
369
- propsAsIs: !1
370
- });
371
- var j = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(j || {});
372
- const L2 = ({ title: e, active: s, onClick: n }) => /* @__PURE__ */ t(F0, { "data-a": "intr", onClick: n, "data-selected": s, children: /* @__PURE__ */ t(B0, { "data-a": "intr", children: e }) }), q0 = ({ activePage: e = "home", toggleActivePage: s }) => /* @__PURE__ */ t(O0, { children: /* @__PURE__ */ h(D0, { "data-position": e === "home" ? "left" : "right", children: [
373
- /* @__PURE__ */ t(L2, { title: "Home", active: e === "home", onClick: () => s(
374
- "home"
375
- /* HOME */
376
- ) }),
377
- /* @__PURE__ */ t(
378
- L2,
379
- {
380
- title: "Friends",
381
- active: e === "leaderboard",
382
- onClick: () => s(
383
- "leaderboard"
384
- /* LEADERBOARD */
385
- )
386
- }
387
- )
388
- ] }) }), P0 = /* @__PURE__ */ i("button")({
389
- name: "Container",
390
- class: "cpjnajb",
391
- propsAsIs: !1
392
- }), U0 = /* @__PURE__ */ i("div")({
393
- name: "Content",
394
- class: "c4m6kaz",
395
- propsAsIs: !1
396
- }), j0 = /* @__PURE__ */ i("span")({
397
- name: "Title",
398
- class: "t1h8t9cc",
399
- propsAsIs: !1
400
- }), W0 = () => /* @__PURE__ */ t(P0, { children: /* @__PURE__ */ h(U0, { children: [
401
- /* @__PURE__ */ t(L, { name: "iconCopySuccess" }),
402
- /* @__PURE__ */ t(j0, { children: "Link Copied to Clipboard" })
403
- ] }) }), ue = (e) => {
404
- const s = E(), [n, a] = w(null), r = q(
405
- async (o) => {
406
- if (o && navigator?.clipboard?.writeText) {
407
- s.current && (clearTimeout(s.current), a(null));
408
- try {
409
- await navigator.clipboard.writeText(o), e.current && (a(s2(/* @__PURE__ */ t(W0, {}), e.current)), s.current = setTimeout(() => {
410
- a(null);
411
- }, 1e3));
412
- } catch (l) {
413
- console.error("Unable to copy to clipboard", l);
414
- }
415
- }
416
- },
417
- [e]
418
- );
419
- return y(() => () => {
420
- clearTimeout(s.current);
421
- }, []), [r, n];
422
- }, Z0 = /* @__PURE__ */ i("div")({
423
- name: "Container",
424
- class: "c1ux29ft",
425
- propsAsIs: !1
426
- }), G0 = () => L, Q0 = /* @__PURE__ */ i(G0())({
427
- name: "FriendsIcon",
428
- class: "f10ncfg2",
429
- propsAsIs: !0
430
- }), K0 = /* @__PURE__ */ i("div")({
431
- name: "Content",
432
- class: "c1yc07bd",
433
- propsAsIs: !1
434
- }), Y0 = /* @__PURE__ */ i("div")({
435
- name: "Title",
436
- class: "tj6cq7w",
437
- propsAsIs: !1
438
- }), J0 = /* @__PURE__ */ i("div")({
439
- name: "Description",
440
- class: "d1ag78xo",
441
- propsAsIs: !1
442
- }), X0 = () => L, es = /* @__PURE__ */ i(X0())({
443
- name: "ArrowInviteIcon",
444
- class: "awohrz6",
445
- propsAsIs: !0
446
- }), ss = ({ title: e, description: s, onClick: n, className: a }) => {
447
- const [r] = ie({
448
- type: "invitation",
449
- action: "sent",
450
- payload: {
451
- from: le.TITLE_CARD
452
- }
453
- });
454
- return /* @__PURE__ */ h(Z0, { "data-a": "intr", onClick: r(n), className: a, children: [
455
- /* @__PURE__ */ t(Q0, { name: "icon-friends" }),
456
- /* @__PURE__ */ h(K0, { children: [
457
- /* @__PURE__ */ t(Y0, { children: e }),
458
- /* @__PURE__ */ t(J0, { children: s })
459
- ] }),
460
- /* @__PURE__ */ t(es, { name: "icon-copy" })
461
- ] });
462
- };
463
- let T;
464
- typeof window < "u" ? T = window : typeof self < "u" ? T = self : T = Qe;
465
- let c2 = null, d2 = null;
466
- const _2 = 20, r2 = T.clearTimeout, N2 = T.setTimeout, o2 = T.cancelAnimationFrame || T.mozCancelAnimationFrame || T.webkitCancelAnimationFrame, S2 = T.requestAnimationFrame || T.mozRequestAnimationFrame || T.webkitRequestAnimationFrame;
467
- o2 == null || S2 == null ? (c2 = r2, d2 = function(s) {
468
- return N2(s, _2);
469
- }) : (c2 = function([s, n]) {
470
- o2(s), r2(n);
471
- }, d2 = function(s) {
472
- const n = S2(function() {
473
- r2(a), s();
474
- }), a = N2(function() {
475
- o2(n), s();
476
- }, _2);
477
- return [n, a];
478
- });
479
- function ts(e) {
480
- let s, n, a, r, o, l, c;
481
- const d = typeof document < "u" && document.attachEvent;
482
- if (!d) {
483
- l = function(A) {
484
- const b = A.__resizeTriggers__, N = b.firstElementChild, k = b.lastElementChild, x = N.firstElementChild;
485
- k.scrollLeft = k.scrollWidth, k.scrollTop = k.scrollHeight, x.style.width = N.offsetWidth + 1 + "px", x.style.height = N.offsetHeight + 1 + "px", N.scrollLeft = N.scrollWidth, N.scrollTop = N.scrollHeight;
486
- }, o = function(A) {
487
- return A.offsetWidth !== A.__resizeLast__.width || A.offsetHeight !== A.__resizeLast__.height;
488
- }, c = function(A) {
489
- if (A.target.className && typeof A.target.className.indexOf == "function" && A.target.className.indexOf("contract-trigger") < 0 && A.target.className.indexOf("expand-trigger") < 0)
490
- return;
491
- const b = this;
492
- l(this), this.__resizeRAF__ && c2(this.__resizeRAF__), this.__resizeRAF__ = d2(function() {
493
- o(b) && (b.__resizeLast__.width = b.offsetWidth, b.__resizeLast__.height = b.offsetHeight, b.__resizeListeners__.forEach(function(x) {
494
- x.call(b, A);
495
- }));
496
- });
497
- };
498
- let p = !1, C = "";
499
- a = "animationstart";
500
- const g = "Webkit Moz O ms".split(" ");
501
- let I = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
502
- {
503
- const A = document.createElement("fakeelement");
504
- if (A.style.animationName !== void 0 && (p = !0), p === !1) {
505
- for (let b = 0; b < g.length; b++)
506
- if (A.style[g[b] + "AnimationName"] !== void 0) {
507
- v = g[b], C = "-" + v.toLowerCase() + "-", a = I[b], p = !0;
508
- break;
509
- }
510
- }
511
- }
512
- n = "resizeanim", s = "@" + C + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = C + "animation: 1ms " + n + "; ";
513
- }
514
- const m = function(p) {
515
- if (!p.getElementById("detectElementResize")) {
516
- const C = (s || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', g = p.head || p.getElementsByTagName("head")[0], I = p.createElement("style");
517
- I.id = "detectElementResize", I.type = "text/css", e != null && I.setAttribute("nonce", e), I.styleSheet ? I.styleSheet.cssText = C : I.appendChild(p.createTextNode(C)), g.appendChild(I);
518
- }
519
- };
520
- return {
521
- addResizeListener: function(p, C) {
522
- if (d)
523
- p.attachEvent("onresize", C);
524
- else {
525
- if (!p.__resizeTriggers__) {
526
- const g = p.ownerDocument, I = T.getComputedStyle(p);
527
- I && I.position === "static" && (p.style.position = "relative"), m(g), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = g.createElement("div")).className = "resize-triggers";
528
- const v = g.createElement("div");
529
- v.className = "expand-trigger", v.appendChild(g.createElement("div"));
530
- const A = g.createElement("div");
531
- A.className = "contract-trigger", p.__resizeTriggers__.appendChild(v), p.__resizeTriggers__.appendChild(A), p.appendChild(p.__resizeTriggers__), l(p), p.addEventListener("scroll", c, !0), a && (p.__resizeTriggers__.__animationListener__ = function(N) {
532
- N.animationName === n && l(p);
533
- }, p.__resizeTriggers__.addEventListener(a, p.__resizeTriggers__.__animationListener__));
534
- }
535
- p.__resizeListeners__.push(C);
536
- }
537
- },
538
- removeResizeListener: function(p, C) {
539
- if (d)
540
- p.detachEvent("onresize", C);
541
- else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(C), 1), !p.__resizeListeners__.length) {
542
- p.removeEventListener("scroll", c, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(a, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
543
- try {
544
- p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
545
- } catch {
546
- }
547
- }
548
- }
549
- };
550
- }
551
- class ns extends He {
552
- constructor(...s) {
553
- super(...s), this.state = {
554
- height: this.props.defaultHeight || 0,
555
- scaledHeight: this.props.defaultHeight || 0,
556
- scaledWidth: this.props.defaultWidth || 0,
557
- width: this.props.defaultWidth || 0
558
- }, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
559
- this._timeoutId = null;
560
- const {
561
- disableHeight: n,
562
- disableWidth: a,
563
- onResize: r
564
- } = this.props;
565
- if (this._parentNode) {
566
- const o = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(o.paddingLeft || "0"), c = parseFloat(o.paddingRight || "0"), d = parseFloat(o.paddingTop || "0"), m = parseFloat(o.paddingBottom || "0"), f = this._parentNode.getBoundingClientRect(), u = f.height - d - m, p = f.width - l - c, C = this._parentNode.offsetHeight - d - m, g = this._parentNode.offsetWidth - l - c;
567
- (!n && (this.state.height !== C || this.state.scaledHeight !== u) || !a && (this.state.width !== g || this.state.scaledWidth !== p)) && (this.setState({
568
- height: C,
569
- width: g,
570
- scaledHeight: u,
571
- scaledWidth: p
572
- }), typeof r == "function" && r({
573
- height: C,
574
- scaledHeight: u,
575
- scaledWidth: p,
576
- width: g
577
- }));
578
- }
579
- }, this._setRef = (n) => {
580
- this._autoSizer = n;
581
- };
582
- }
583
- componentDidMount() {
584
- const {
585
- nonce: s
586
- } = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
587
- if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
588
- this._parentNode = n;
589
- const a = n.ownerDocument.defaultView.ResizeObserver;
590
- a != null ? (this._resizeObserver = new a(() => {
591
- this._timeoutId = setTimeout(this._onResize, 0);
592
- }), this._resizeObserver.observe(n)) : (this._detectElementResize = ts(s), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
593
- }
594
- }
595
- componentWillUnmount() {
596
- this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && this._resizeObserver.disconnect());
597
- }
598
- render() {
599
- const {
600
- children: s,
601
- defaultHeight: n,
602
- defaultWidth: a,
603
- disableHeight: r = !1,
604
- disableWidth: o = !1,
605
- doNotBailOutOnEmptyChildren: l = !1,
606
- nonce: c,
607
- onResize: d,
608
- style: m = {},
609
- tagName: f = "div",
610
- ...u
611
- } = this.props, {
612
- height: p,
613
- scaledHeight: C,
614
- scaledWidth: g,
615
- width: I
616
- } = this.state, v = {
617
- overflow: "visible"
618
- }, A = {};
619
- let b = !1;
620
- return r || (p === 0 && (b = !0), v.height = 0, A.height = p, A.scaledHeight = C), o || (I === 0 && (b = !0), v.width = 0, A.width = I, A.scaledWidth = g), l && (b = !1), ze(f, {
621
- ref: this._setRef,
622
- style: {
623
- ...v,
624
- ...m
625
- },
626
- ...u
627
- }, !b && s(A));
628
- }
629
- }
630
- function is(e) {
631
- var s = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, a = e.startIndex, r = e.stopIndex;
632
- return !(a > n || r < s);
633
- }
634
- function as(e) {
635
- for (var s = e.isItemLoaded, n = e.itemCount, a = e.minimumBatchSize, r = e.startIndex, o = e.stopIndex, l = [], c = null, d = null, m = r; m <= o; m++) {
636
- var f = s(m);
637
- f ? d !== null && (l.push(c, d), c = d = null) : (d = m, c === null && (c = m));
638
- }
639
- if (d !== null) {
640
- for (var u = Math.min(Math.max(d, c + a - 1), n - 1), p = d + 1; p <= u && !s(p); p++)
641
- d = p;
642
- l.push(c, d);
643
- }
644
- if (l.length)
645
- for (; l[1] - l[0] + 1 < a && l[0] > 0; ) {
646
- var C = l[0] - 1;
647
- if (!s(C))
648
- l[0] = C;
649
- else
650
- break;
651
- }
652
- return l;
653
- }
654
- var rs = function(e, s) {
655
- if (!(e instanceof s))
656
- throw new TypeError("Cannot call a class as a function");
657
- }, os = /* @__PURE__ */ (function() {
658
- function e(s, n) {
659
- for (var a = 0; a < n.length; a++) {
660
- var r = n[a];
661
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(s, r.key, r);
662
- }
663
- }
664
- return function(s, n, a) {
665
- return n && e(s.prototype, n), a && e(s, a), s;
666
- };
667
- })(), ls = function(e, s) {
668
- if (typeof s != "function" && s !== null)
669
- throw new TypeError("Super expression must either be null or a function, not " + typeof s);
670
- e.prototype = Object.create(s && s.prototype, {
671
- constructor: {
672
- value: e,
673
- enumerable: !1,
674
- writable: !0,
675
- configurable: !0
676
- }
677
- }), s && (Object.setPrototypeOf ? Object.setPrototypeOf(e, s) : e.__proto__ = s);
678
- }, T2 = function(e, s) {
679
- if (!e)
680
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
681
- return s && (typeof s == "object" || typeof s == "function") ? s : e;
682
- };
683
- (function(e) {
684
- ls(s, e);
685
- function s() {
686
- var n, a, r, o;
687
- rs(this, s);
688
- for (var l = arguments.length, c = Array(l), d = 0; d < l; d++)
689
- c[d] = arguments[d];
690
- return o = (a = (r = T2(this, (n = s.__proto__ || Object.getPrototypeOf(s)).call.apply(n, [this].concat(c))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(m) {
691
- var f = m.visibleStartIndex, u = m.visibleStopIndex;
692
- r._lastRenderedStartIndex = f, r._lastRenderedStopIndex = u, r._ensureRowsLoaded(f, u);
693
- }, r._setRef = function(m) {
694
- r._listRef = m;
695
- }, a), T2(r, o);
696
- }
697
- return os(s, [{
698
- key: "resetloadMoreItemsCache",
699
- value: function() {
700
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
701
- this._memoizedUnloadedRanges = [], a && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
702
- }
703
- }, {
704
- key: "componentDidMount",
705
- value: function() {
706
- }
707
- }, {
708
- key: "render",
709
- value: function() {
710
- var a = this.props.children;
711
- return a({
712
- onItemsRendered: this._onItemsRendered,
713
- ref: this._setRef
714
- });
715
- }
716
- }, {
717
- key: "_ensureRowsLoaded",
718
- value: function(a, r) {
719
- var o = this.props, l = o.isItemLoaded, c = o.itemCount, d = o.minimumBatchSize, m = d === void 0 ? 10 : d, f = o.threshold, u = f === void 0 ? 15 : f, p = as({
720
- isItemLoaded: l,
721
- itemCount: c,
722
- minimumBatchSize: m,
723
- startIndex: Math.max(0, a - u),
724
- stopIndex: Math.min(c - 1, r + u)
725
- });
726
- (this._memoizedUnloadedRanges.length !== p.length || this._memoizedUnloadedRanges.some(function(C, g) {
727
- return p[g] !== C;
728
- })) && (this._memoizedUnloadedRanges = p, this._loadUnloadedRanges(p));
729
- }
730
- }, {
731
- key: "_loadUnloadedRanges",
732
- value: function(a) {
733
- for (var r = this, o = this.props.loadMoreItems || this.props.loadMoreRows, l = function(m) {
734
- var f = a[m], u = a[m + 1], p = o(f, u);
735
- p?.then(function() {
736
- if (is({
737
- lastRenderedStartIndex: r._lastRenderedStartIndex,
738
- lastRenderedStopIndex: r._lastRenderedStopIndex,
739
- startIndex: f,
740
- stopIndex: u
741
- })) {
742
- if (r._listRef == null)
743
- return;
744
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(f, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
745
- }
746
- });
747
- }, c = 0; c < a.length; c += 2)
748
- l(c);
749
- }
750
- }]), s;
751
- })(Me);
752
- const cs = /* @__PURE__ */ i("div")({
753
- name: "Container",
754
- class: "culdu4a",
755
- propsAsIs: !1
756
- }), ds = /* @__PURE__ */ i("div")({
757
- name: "Position",
758
- class: "pwf8e69",
759
- propsAsIs: !1
760
- }), ps = /* @__PURE__ */ i("img")({
761
- name: "Avatar",
762
- class: "atf4yh4",
763
- propsAsIs: !1
764
- }), hs = /* @__PURE__ */ i("div")({
765
- name: "AvatarPlaceholder",
766
- class: "a1dg29ja",
767
- propsAsIs: !1
768
- }), ms = /* @__PURE__ */ i("div")({
769
- name: "Content",
770
- class: "c10a68rc",
771
- propsAsIs: !1
772
- }), us = /* @__PURE__ */ i("div")({
773
- name: "NameContainer",
774
- class: "nc4kck5",
775
- propsAsIs: !1
776
- }), fs = /* @__PURE__ */ i("span")({
777
- name: "Name",
778
- class: "njsrqgr",
779
- propsAsIs: !1
780
- }), Cs = () => L, gs = /* @__PURE__ */ i(Cs())({
781
- name: "CurrentUserBadge",
782
- class: "c17uc4zr",
783
- propsAsIs: !0
784
- }), vs = ({
785
- friendsRank: e,
786
- avatar: s,
787
- name: n,
788
- userId: a,
789
- points: r,
790
- isCurrentUser: o,
791
- style: l
792
- }) => /* @__PURE__ */ h(cs, { "data-name": a, style: l, children: [
793
- /* @__PURE__ */ t(ds, { children: e || 0 }),
794
- /* @__PURE__ */ h(ms, { children: [
795
- s ? /* @__PURE__ */ t(ps, { alt: "leaderboard-item-avatar", src: s }) : /* @__PURE__ */ t(hs, { children: h2(n || "") }),
796
- /* @__PURE__ */ h(us, { children: [
797
- /* @__PURE__ */ t(fs, { children: n || "" }),
798
- o && /* @__PURE__ */ t(gs, { name: "icon-star" })
799
- ] })
800
- ] }),
801
- /* @__PURE__ */ t("div", { children: ae(r) })
802
- ] }), Is = /* @__PURE__ */ i("div")({
803
- name: "Container",
804
- class: "c16btbfp",
805
- propsAsIs: !1
806
- }), $s = ({
807
- items: e,
808
- currentUserId: s,
809
- openItemDetail: n,
810
- fetchMore: a,
811
- scrollNode: r,
812
- hasMore: o
813
- }) => {
814
- const l = q((c) => {
815
- const d = c.target.getAttribute("data-name");
816
- d && n(d);
817
- }, [n]);
818
- return /* @__PURE__ */ t(Ye, {
819
- loadMore: a,
820
- initialLoad: !1,
821
- hasMore: o,
822
- useWindow: !1,
823
- getScrollParent: () => r.current,
824
- children: /* @__PURE__ */ t(Is, {
825
- "data-a": "intr",
826
- onClick: l,
827
- children: e.map((c) => /* @__PURE__ */ t(vs, {
828
- ...c,
829
- isCurrentUser: !!s && s === c.userId
830
- }, c.userId))
831
- })
832
- });
833
- }, bs = /* @__PURE__ */ i("div")({
834
- name: "Container",
835
- class: "c1itm4k7",
836
- propsAsIs: !1
837
- }), As = /* @__PURE__ */ i("div")({
838
- name: "IconContainer",
839
- class: "i1w4fsni",
840
- propsAsIs: !1
841
- }), ys = () => L, ws = /* @__PURE__ */ i(ys())({
842
- name: "InviteGameIcon",
843
- class: "i19m85r1",
844
- propsAsIs: !0
845
- }), ks = /* @__PURE__ */ i("div")({
846
- name: "Content",
847
- class: "c1mbu204",
848
- propsAsIs: !1
849
- }), Ls = /* @__PURE__ */ i("div")({
850
- name: "Heading",
851
- class: "h1amdqtv",
852
- propsAsIs: !1
853
- }), _s = /* @__PURE__ */ i("div")({
854
- name: "Subtext",
855
- class: "s1lhlj9j",
856
- propsAsIs: !1
857
- }), Ns = /* @__PURE__ */ i("div")({
858
- name: "LinkContainer",
859
- class: "l1wot35e",
860
- propsAsIs: !1
861
- }), Ss = /* @__PURE__ */ i("div")({
862
- name: "LinkInfo",
863
- class: "l1jdw39q",
864
- propsAsIs: !1
865
- }), Ts = /* @__PURE__ */ i("span")({
866
- name: "LinkTitle",
867
- class: "l1cr5mk",
868
- propsAsIs: !1
869
- }), xs = /* @__PURE__ */ i("span")({
870
- name: "LinkAddress",
871
- class: "lvi87q4",
872
- propsAsIs: !1
873
- }), Rs = () => L, Es = /* @__PURE__ */ i(Rs())({
874
- name: "LinkIcon",
875
- class: "l1pqlvw3",
876
- propsAsIs: !0
877
- }), fe = ({
878
- inviteLink: e,
879
- inviteCardTitle: s,
880
- inviteCardSubtext: n,
881
- primaryColor: a,
882
- className: r
883
- }) => {
884
- const o = E(null), [l, c] = ue(o), [d] = ie({
885
- type: "invitation",
886
- action: "sent",
887
- payload: {
888
- from: le.MENU
889
- }
890
- });
891
- return /* @__PURE__ */ h(bs, { className: r, children: [
892
- /* @__PURE__ */ t(As, { style: { backgroundColor: a }, children: /* @__PURE__ */ t(ws, { name: "invite-game-icon" }) }),
893
- /* @__PURE__ */ h(ks, { children: [
894
- /* @__PURE__ */ t(Ls, { children: s || "" }),
895
- /* @__PURE__ */ t(_s, { children: n || "" })
896
- ] }),
897
- e && /* @__PURE__ */ h(Ns, { ref: o, "data-a": "intr", onClick: d(() => l(e)), children: [
898
- /* @__PURE__ */ h(Ss, { children: [
899
- /* @__PURE__ */ t(Ts, { children: "Invite link" }),
900
- /* @__PURE__ */ t(xs, { children: e })
901
- ] }),
902
- /* @__PURE__ */ t(Es, { name: "icon-copy" })
903
- ] }),
904
- c
905
- ] });
906
- }, Vs = /* @__PURE__ */ i("div")({
907
- name: "InviteFriendsContainer",
908
- class: "i1c9dygq",
909
- propsAsIs: !1
910
- }), Hs = ({
911
- deepLink: e
912
- }) => /* @__PURE__ */ t(Vs, {
913
- children: /* @__PURE__ */ t(fe, {
914
- inviteLink: e,
915
- inviteCardTitle: "It’s More Fun With Friends",
916
- inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
917
- })
918
- }), zs = /* @__PURE__ */ i("div")({
919
- name: "InviteLinkContainer",
920
- class: "i1odbhm4",
921
- propsAsIs: !1
922
- }), Ms = ({
923
- gamification: e,
924
- scrollNode: s,
925
- scrollStore: n,
926
- leaderboardList: a
927
- }) => {
928
- const r = E(null), {
929
- data: o,
930
- hasMore: l,
931
- loading: c,
932
- key: d
933
- } = $(a.$store), {
934
- data: m
935
- } = $(e.deepLink.$store), [f, u] = ue(r);
936
- return !o.length && !c ? /* @__PURE__ */ t(Hs, {
937
- deepLink: m
938
- }) : /* @__PURE__ */ h(S, {
939
- children: [/* @__PURE__ */ t($s, {
940
- items: o,
941
- scrollNode: s,
942
- scrollStore: n,
943
- fetchMore: a.fetchMore,
944
- hasMore: l,
945
- openItemDetail: e.openUser,
946
- currentUserId: e.currentUserId.get()
947
- }, d), m && /* @__PURE__ */ t(zs, {
948
- ref: r,
949
- children: /* @__PURE__ */ t(ss, {
950
- "data-a": "intr",
951
- onClick: () => f(m),
952
- title: "Invite Friends",
953
- description: "Challenge them now!"
954
- })
955
- }), u]
956
- });
957
- }, Os = ({
958
- gamification: e,
959
- scrollNode: s,
960
- scrollStore: n
961
- }) => e.leaderboardList ? /* @__PURE__ */ t(Ms, {
962
- leaderboardList: e.leaderboardList,
963
- gamification: e,
964
- scrollNode: s,
965
- scrollStore: n
966
- }) : null, Ds = () => ce, Fs = /* @__PURE__ */ i(Ds())({
967
- name: "Container",
968
- class: "cll3md7",
969
- propsAsIs: !0
970
- }), Bs = () => Je, qs = /* @__PURE__ */ i(Bs())({
971
- name: "ActionBtn",
972
- class: "a10g1iik",
973
- propsAsIs: !0
974
- }), Ps = ({ questionId: e, ...s }) => /* @__PURE__ */ h(Fs, { "data-a": "intr", "data-name": e, children: [
975
- /* @__PURE__ */ t(Ue, { questionId: e, ...s }),
976
- /* @__PURE__ */ t(qs, { "data-a": "intr", "data-name": e, children: "View Insight" })
977
- ] }), Us = () => ce, js = /* @__PURE__ */ i(Us())({
978
- name: "Container",
979
- class: "cl56x6b",
980
- propsAsIs: !0
981
- }), Ws = /* @__PURE__ */ i("button")({
982
- name: "ActionButton",
983
- class: "a11pzf92",
984
- propsAsIs: !1
985
- }), Zs = /* @__PURE__ */ i("blockquote")({
986
- name: "Quote",
987
- class: "q1hbaleq",
988
- propsAsIs: !1
989
- }), Gs = ({ ...e }) => /* @__PURE__ */ h(js, { "data-a": "intr", "data-name": e.tweetId, children: [
990
- e.title && /* @__PURE__ */ t(Zs, { children: e.title }),
991
- /* @__PURE__ */ t(re, { ...e }),
992
- /* @__PURE__ */ t(Ws, { "data-a": "intr", "data-name": e.tweetId, children: "View Insight" })
993
- ] }), x2 = /* @__PURE__ */ i("div")({
994
- name: "QuestionsContainer",
995
- class: "qvghv3l",
996
- propsAsIs: !1
997
- }), Qs = ({ questions: e, openQuestion: s, controlVideo: n }) => e ? /* @__PURE__ */ t(x2, { "data-a": "intr", onClick: (r) => {
998
- const o = r.target.getAttribute("data-name");
999
- o && (s0(), s(o, { openedFrom: "list" }));
1000
- }, children: e?.map((r) => {
1001
- if (r.type === "question" && r.attributes?.attributes.case === "question") {
1002
- const o = r.attributes.attributes.value;
1003
- return /* @__PURE__ */ t(Xe, { ...o }, o.questionId);
1004
- }
1005
- if (r.type === "insight" && r.attributes?.attributes.case === "insight") {
1006
- const o = r.attributes.attributes.value;
1007
- return /* @__PURE__ */ t(Ps, { controlVideo: n, ...o }, o.questionId);
1008
- }
1009
- if (r.type === "tweet" && r.attributes?.attributes.case === "tweet") {
1010
- const o = r.attributes.attributes.value, l = r.attributes.id;
1011
- return /* @__PURE__ */ t(Gs, { controlVideo: n, ...o, tweetId: l }, l);
1012
- }
1013
- return null;
1014
- }) }) : /* @__PURE__ */ t(x2, { children: Array.from({ length: 5 }).map((r, o) => /* @__PURE__ */ t(e0, {}, o)) }), Ks = ({ store: e, openQuestion: s, withPickHistory: n }) => {
1015
- const { sdk: a } = p2(), r = $(e);
1016
- return y(() => {
1017
- n.set(!0);
1018
- }, [n]), /* @__PURE__ */ t(Qs, { openQuestion: s, questions: r.data, controlVideo: a?.controlVideoPlayer });
1019
- }, Ys = ({ userSummary: e }) => {
1020
- const [s, n] = w(void 0);
1021
- return y(() => {
1022
- const a = e.$store.subscribe((r) => {
1023
- r && n(r);
1024
- });
1025
- return () => {
1026
- a();
1027
- };
1028
- }, [e]), /* @__PURE__ */ t(pe, { loading: !s?.summary, ...s?.summary, successRate: s?.percentage?.correct });
1029
- }, Js = ({ gamification: e, className: s, scrollStore: n, scrollNode: a, appNode: r, style: o, responsiveStore: l }) => {
1030
- const { tabsShown: c } = $(n, { keys: ["tabsShown"] }), d = $(e.friendsTabEnabled), [m, f] = w(j.HOME), [, u] = we(), { sdkInDesktopView: p, screen: C } = $(l, { keys: ["sdkInDesktopView"] }), g = (v) => {
1031
- u(() => {
1032
- f(v), p === !1 && (r.current?.getBoundingClientRect().y || 0) < 0 && m2(r, C.size, { behavior: "instant" });
1033
- });
1034
- };
1035
- y(() => n.subscribe((v) => {
1036
- if (v.scrollPosition === 0) {
1037
- n.setKey("tabsShown", !0);
1038
- return;
1039
- }
1040
- l.get().sdkInDesktopView ? n.setKey("tabsShown", v.scrollDirection === "backward") : n.setKey("tabsShown", v.scrollDirection === "forward");
1041
- }), [n, l]), y(() => {
1042
- d || f(j.HOME);
1043
- }, [d]);
1044
- let I = "0px";
1045
- return p ? I = c ? "0px" : "calc(0px - var(--header-height))" : I = c ? "var(--header-height)" : "0px", /* @__PURE__ */ h(ke, { className: D(s, "SL-Tabs", "sl-hide-on-modal"), style: o, children: [
1046
- d && /* @__PURE__ */ t(
1047
- Le,
1048
- {
1049
- style: {
1050
- top: I
1051
- },
1052
- children: /* @__PURE__ */ t(q0, { activePage: m, toggleActivePage: g })
1053
- }
1054
- ),
1055
- m === j.HOME && /* @__PURE__ */ h(S, { children: [
1056
- /* @__PURE__ */ t(_e, { children: /* @__PURE__ */ t(Ne, { children: /* @__PURE__ */ t(Ys, { userSummary: e.userSummary }) }) }),
1057
- /* @__PURE__ */ t(Se, { style: { flex: 1 }, children: /* @__PURE__ */ t(
1058
- Ks,
1059
- {
1060
- openQuestion: e.openQuestion,
1061
- store: e.feedList.getStore(),
1062
- withPickHistory: e.withPickHistory
1063
- }
1064
- ) })
1065
- ] }),
1066
- m === j.LEADERBOARD && /* @__PURE__ */ t(Te, { children: /* @__PURE__ */ t(Os, { scrollStore: n, scrollNode: a, gamification: e }) })
1067
- ] });
1068
- }, Xs = () => n2, R2 = /* @__PURE__ */ i(Xs())({
1069
- name: "OpenedContainer",
1070
- class: "ouvguos",
1071
- propsAsIs: !0
1072
- }), E2 = "t1eu4lbg", et = /* @__PURE__ */ i("div")({
1073
- name: "UserContainer",
1074
- class: "uuv2xqo",
1075
- propsAsIs: !1
1076
- }), st = ({
1077
- correct: e,
1078
- incorrect: s
1079
- }) => {
1080
- const n = e + s;
1081
- return n === 0 ? 0 : Math.round(e / n * 100);
1082
- }, za = ({
1083
- gamification: e,
1084
- scrollStore: s,
1085
- className: n,
1086
- appNode: a,
1087
- scrollNode: r,
1088
- responsiveStore: o
1089
- }) => /* @__PURE__ */ t(Js, {
1090
- appNode: a,
1091
- scrollStore: s,
1092
- scrollNode: r,
1093
- className: n,
1094
- gamification: e,
1095
- responsiveStore: o
1096
- }), tt = ({
1097
- gamification: e,
1098
- muted: s,
1099
- sdk: n,
1100
- className: a,
1101
- appNode: r,
1102
- responsiveStore: o
1103
- }) => {
1104
- const {
1105
- topNavigation: l
1106
- } = p2(), c = $(e.openedQuestionId), d = $(e.openedQuestion.$store), m = $(e.openedUser || de(void 0)), {
1107
- sdkInDesktopView: f
1108
- } = $(o, {
1109
- keys: ["sdkInDesktopView"]
1110
- }), {
1111
- hiding: u,
1112
- onAnimationEnd: p
1113
- } = xe();
1114
- if (!c && !m)
1115
- return null;
1116
- const C = d ? /* @__PURE__ */ t(R2, {
1117
- className: D(a, !l && E2),
1118
- hiding: u,
1119
- onAnimationEnd: p,
1120
- children: /* @__PURE__ */ t(je, {
1121
- muted: s,
1122
- sdk: n,
1123
- gamification: e
1124
- })
1125
- }) : m ? /* @__PURE__ */ t(R2, {
1126
- className: D(a, !l && E2),
1127
- hiding: u,
1128
- onAnimationEnd: p,
1129
- children: /* @__PURE__ */ h(et, {
1130
- children: [/* @__PURE__ */ t(We, {
1131
- label: "Friend's Rank",
1132
- close: e.closeUser
1133
- }), /* @__PURE__ */ t(Re, {
1134
- children: /* @__PURE__ */ t(pe, {
1135
- ...m,
1136
- successRate: st(m)
1137
- })
1138
- })]
1139
- })
1140
- }) : null;
1141
- return /* @__PURE__ */ t(me, {
1142
- container: r,
1143
- useContainer: !f,
1144
- children: C
1145
- });
1146
- }, nt = De(() => import("./gamification-feature.js")), it = ({ sdk: e, feature: s, className: n, scrollStore: a, appNode: r, scrollNode: o, responsiveStore: l }) => {
1147
- const c = z(() => s && s.featureConfig.get().type === V.GAMES ? /* @__PURE__ */ t(p0, { className: n, sdk: e, feature: s, children: /* @__PURE__ */ t(
1148
- nt,
1149
- {
1150
- appNode: r,
1151
- scrollStore: a,
1152
- scrollNode: o,
1153
- className: n,
1154
- responsiveStore: l,
1155
- gamification: s
1156
- }
1157
- ) }) : null, [e, s, n, l, a, o, r]);
1158
- return /* @__PURE__ */ t(
1159
- Oe,
1160
- {
1161
- fallback: /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
1162
- children: c
1163
- }
1164
- );
1165
- }, at = ({ feature: e, sdk: s, muted: n, className: a, appNode: r, responsiveStore: o }) => e && e.featureConfig.get().type === V.GAMES ? /* @__PURE__ */ t(
1166
- tt,
1167
- {
1168
- className: a,
1169
- appNode: r,
1170
- muted: n,
1171
- sdk: s,
1172
- responsiveStore: o,
1173
- gamification: e
1174
- }
1175
- ) : null;
1176
- window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
1177
- function rt(e) {
1178
- return e instanceof DOMException && // everything except Firefox
1179
- (e.code === 22 || // Firefox
1180
- e.code === 1014 || // test name field too, because code might not be present
1181
- // everything except Firefox
1182
- e.name === "QuotaExceededError" || // Firefox
1183
- e.name === "NS_ERROR_DOM_QUOTA_REACHED");
1184
- }
1185
- class ot {
1186
- delimiter = ":";
1187
- prefix;
1188
- storage;
1189
- constructor(s = "main", n = window.localStorage) {
1190
- this.prefix = `sl-sdk${this.delimiter}${s}`, this.storage = n;
1191
- }
1192
- clear = () => {
1193
- for (const s in window.localStorage)
1194
- s.startsWith(this.prefix) && this.storage.removeItem(s);
1195
- };
1196
- generateKey = (s) => `${this.prefix}${this.delimiter}${s.join(this.delimiter)}`;
1197
- write = (...s) => {
1198
- const n = s.pop() || "", a = this.generateKey(s);
1199
- try {
1200
- this.storage.setItem(a, n);
1201
- } catch (r) {
1202
- rt(r) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(a, n));
1203
- }
1204
- };
1205
- read = (...s) => {
1206
- const n = this.storage.getItem(this.generateKey(s));
1207
- return n === null ? void 0 : n;
1208
- };
1209
- remove = (...s) => {
1210
- this.storage.removeItem(this.generateKey(s));
1211
- };
1212
- }
1213
- var V2;
1214
- (function(e) {
1215
- e.Init = "init", e.Ready = "ready", e.Connecting = "connecting", e.Connected = "connected", e.Disconnected = "disconnected", e.Failed = "failed", e.Reconnect = "reconnect", e.Reconnecting = "reconnecting";
1216
- })(V2 || (V2 = {}));
1217
- Z("grpc:stream");
1218
- F.Unknown, F.Internal, F.DeadlineExceeded, F.ResourceExhausted, F.FailedPrecondition, F.Unavailable, F.DataLoss;
1219
- Z("grpc:retry");
1220
- C2(10, { description: "Number of attempts to retry" }), C2(3e4, { description: "Max delay between retries in milliseconds" });
1221
- var H;
1222
- (function(e) {
1223
- e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
1224
- })(H || (H = {}));
1225
- class lt extends ot {
1226
- constructor() {
1227
- super("user");
1228
- }
1229
- // Schema
1230
- setSchema = (s) => {
1231
- this.write(H.SCHEMA, s);
1232
- };
1233
- getSchema = () => this.read(H.SCHEMA);
1234
- // Token
1235
- setToken = (s) => {
1236
- this.write(H.TOKEN, s);
1237
- };
1238
- getToken = () => this.read(H.TOKEN);
1239
- // External Token
1240
- setExternalToken = (s) => {
1241
- this.write(H.EXTERNAL_TOKEN, s);
1242
- };
1243
- getExternalToken = () => this.read(H.EXTERNAL_TOKEN);
1244
- removeToken = () => {
1245
- this.remove(H.TOKEN);
1246
- };
1247
- }
1248
- var H2;
1249
- (function(e) {
1250
- e.DISABLED = "disabled", e.INITIALIZATION = "initialization", e.READY = "ready", e.FAILED = "failed", e.SUSPENDED = "suspended";
1251
- })(H2 || (H2 = {}));
1252
- var z2;
1253
- (function(e) {
1254
- e.SHOWED = "showed", e.EVENT = "ev";
1255
- })(z2 || (z2 = {}));
1256
- var M2;
1257
- (function(e) {
1258
- e.ONBOARDING = "onboarding", e.ONBOARDING_IO = "onboarding_io", e.QUESTION_RECEIVED = "q-received", e.QUESTION_OPENED = "q-opened";
1259
- })(M2 || (M2 = {}));
1260
- var O2;
1261
- (function(e) {
1262
- e.ALLOWED = "allowed", e.DISALLOWED = "disallowed";
1263
- })(O2 || (O2 = {}));
1264
- var D2;
1265
- (function(e) {
1266
- e.UNKNOWN = "unknown", e.ALREADY_VOTED = "already_voted";
1267
- })(D2 || (D2 = {}));
1268
- Z("deep_link");
1269
- Z("bypass");
1270
- new lt();
1271
- Z("video_player");
1272
- var F2;
1273
- (function(e) {
1274
- e.Unset = "unset", e.Required = "required", e.Optional = "optional", e.Completed = "completed", e.Disabled = "disabled", e.Unavailable = "unavailable";
1275
- })(F2 || (F2 = {}));
1276
- R.POLL, R.PREDICTION, R.TRIVIA;
1277
- const ct = {
1278
- [V.GAMES]: !0
1279
- }, dt = /* @__PURE__ */ i("div")({
1280
- name: "Buttons",
1281
- class: "b5o8qbl",
1282
- propsAsIs: !1
1283
- }), pt = ({
1284
- children: e,
1285
- className: s
1286
- }) => /* @__PURE__ */ t(dt, {
1287
- className: s,
1288
- children: e
1289
- }), Ce = /* @__PURE__ */ i("div")({
1290
- name: "Navigation",
1291
- class: "n6tbwuy",
1292
- propsAsIs: !1
1293
- }), ht = () => pt, B2 = /* @__PURE__ */ i(ht())({
1294
- name: "NavigationItems",
1295
- class: "n1up4z7v",
1296
- propsAsIs: !0
1297
- }), mt = /* @__PURE__ */ i("button")({
1298
- name: "SButton",
1299
- class: "sxxa0c",
1300
- propsAsIs: !1
1301
- }), ut = /* @__PURE__ */ i("span")({
1302
- name: "ButtonIcon",
1303
- class: "b193dcyu",
1304
- propsAsIs: !1
1305
- }), ft = /* @__PURE__ */ i("span")({
1306
- name: "ButtonLabel",
1307
- class: "b40tuix",
1308
- propsAsIs: !1
1309
- }), Ct = "s14xk0af", gt = "ha3mg7c", vt = "h103yr45", K = ({ disabled: e, active: s, onClick: n, label: a, icon: r, id: o }) => /* @__PURE__ */ t(
1310
- mt,
1311
- {
1312
- onClick: n,
1313
- "data-a": "intr",
1314
- disabled: e,
1315
- className: D(
1316
- s && Ct,
1317
- !s && (o === "channels" || o === "featuredGroups") && gt,
1318
- !s && o === "leaderboard" && vt
1319
- ),
1320
- children: /* @__PURE__ */ h(S, { children: [
1321
- r && /* @__PURE__ */ t(ut, { children: r }),
1322
- /* @__PURE__ */ t(ft, { children: a })
1323
- ] })
1324
- }
1325
- ), It = () => L, $t = /* @__PURE__ */ i(It())({
1326
- name: "ButtonIcon",
1327
- class: "b11wpe79",
1328
- propsAsIs: !0
1329
- }), bt = /* @__PURE__ */ i("div")({
1330
- name: "Container",
1331
- class: "calnblm",
1332
- propsAsIs: !1
1333
- }), At = /* @__PURE__ */ i("div")({
1334
- name: "Title",
1335
- class: "t1438p52",
1336
- propsAsIs: !1
1337
- }), yt = /* @__PURE__ */ i("div")({
1338
- name: "CloseIconWrap",
1339
- class: "c17srj38",
1340
- propsAsIs: !1
1341
- }), wt = () => L, kt = /* @__PURE__ */ i(wt())({
1342
- name: "CloseIcon",
1343
- class: "clqia8k",
1344
- propsAsIs: !0
1345
- }), Lt = () => L, _t = /* @__PURE__ */ i(Lt())({
1346
- name: "DashboardIcon",
1347
- class: "df5w958",
1348
- propsAsIs: !0
1349
- }), Nt = "h12x6aiv", St = te(({
1350
- sdk: e,
1351
- className: s
1352
- }, n) => {
1353
- const a = () => {
1354
- e.closeFeature();
1355
- };
1356
- return /* @__PURE__ */ h(Ce, {
1357
- className: D(s, Nt),
1358
- children: [/* @__PURE__ */ h(bt, {
1359
- children: [/* @__PURE__ */ h(At, {
1360
- children: [/* @__PURE__ */ t(_t, {
1361
- name: "dashboard"
1362
- }), "Dashboard"]
1363
- }), /* @__PURE__ */ t(yt, {
1364
- "data-a": "intr",
1365
- onClick: a,
1366
- children: /* @__PURE__ */ t(kt, {
1367
- name: "icon-cross"
1368
- })
1369
- })]
1370
- }), /* @__PURE__ */ t("div", {
1371
- ref: n
1372
- })]
1373
- });
1374
- }), Tt = te(({
1375
- sdk: e,
1376
- className: s
1377
- }, n) => {
1378
- const a = $(e.sdkStore.organizationSettings), r = $(e.sdkStore.streamSettings), o = $(e.getActiveFeature()), l = z(() => {
1379
- const d = r?.data || a?.data;
1380
- return d?.overlays ? d.overlays : [];
1381
- }, [a, r]), c = z(() => [...l.filter(({
1382
- enableSdkButton: d,
1383
- type: m
1384
- }) => m === V.GAMES || d).map((d) => ({
1385
- id: d.type,
1386
- onClick: () => e.openFeature(d.type),
1387
- disabled: !(d.type in ct),
1388
- label: d.name,
1389
- icon: /* @__PURE__ */ t("img", {
1390
- src: d.icon,
1391
- alt: ""
1392
- }),
1393
- /** multiplied by 10 to add the ability to insert custom buttons between our buttons */
1394
- position: d.position * 10
1395
- }))].sort((d, m) => d.position - m.position), [l, e]);
1396
- return /* @__PURE__ */ h(Ce, {
1397
- className: s,
1398
- children: [c.length !== 0 && /* @__PURE__ */ t(B2, {
1399
- children: [/* @__PURE__ */ t(K, {
1400
- id: "Channels",
1401
- onClick: () => e.closeFeature(),
1402
- label: "Channels",
1403
- active: o === 0
1404
- }, "Channels"), ...c.map((d) => d.id === V.GAMES ? /* @__PURE__ */ t(K, {
1405
- ...d,
1406
- active: d.id === o,
1407
- label: "StreamLayer +",
1408
- id: "featuredGroups",
1409
- icon: /* @__PURE__ */ t($t, {
1410
- name: "icon-btn-feature-groups",
1411
- "data-selected": d.id === o
1412
- })
1413
- }, d.id) : /* @__PURE__ */ t(K, {
1414
- ...d,
1415
- icon: void 0,
1416
- active: d.id === o
1417
- }, d.id))]
1418
- }), !c.length && /* @__PURE__ */ t(B2, {
1419
- children: [/* @__PURE__ */ t(K, {
1420
- id: "empty",
1421
- label: "No Features...",
1422
- active: !1,
1423
- disabled: !0
1424
- }, "empty")]
1425
- }), /* @__PURE__ */ t("div", {
1426
- ref: n
1427
- })]
1428
- });
1429
- }), xt = /* @__PURE__ */ i("div")({
1430
- name: "InsightContainer",
1431
- class: "i1pqqgpo",
1432
- propsAsIs: !1
1433
- }), Rt = /* @__PURE__ */ i("img")({
1434
- name: "Image",
1435
- class: "igj7luu",
1436
- propsAsIs: !1
1437
- }), Et = /* @__PURE__ */ i("div")({
1438
- name: "ImageContainer",
1439
- class: "i1qne9g6",
1440
- propsAsIs: !1
1441
- }), Vt = /* @__PURE__ */ i("div")({
1442
- name: "InsightContent",
1443
- class: "itpr98r",
1444
- propsAsIs: !1
1445
- }), Ht = /* @__PURE__ */ i("h3")({
1446
- name: "Title",
1447
- class: "t17iaqp8",
1448
- propsAsIs: !1
1449
- }), zt = /* @__PURE__ */ i("div")({
1450
- name: "Description",
1451
- class: "d16t3y7s",
1452
- propsAsIs: !1
1453
- }), Mt = /* @__PURE__ */ i("button")({
1454
- name: "ActionBtn",
1455
- class: "a12495er",
1456
- propsAsIs: !1
1457
- }), Ot = ({ video: e, image: s, imageMode: n, heading: a, body: r, action: o, controlVideo: l }) => /* @__PURE__ */ h(xt, { children: [
1458
- e?.url && /* @__PURE__ */ t(t0, { source: e.url, poster: e.thumbnailUrl, controlVideo: l }),
1459
- s && !e?.url && /* @__PURE__ */ t(Et, { "data-rounded": n === Ke.ROUNDED, children: /* @__PURE__ */ t(Rt, { src: s, alt: a }) }),
1460
- /* @__PURE__ */ h(Vt, { children: [
1461
- /* @__PURE__ */ t(Ht, { children: a }),
1462
- /* @__PURE__ */ t(zt, { children: r }),
1463
- o && /* @__PURE__ */ t(Mt, { onClick: o, children: "View Insight" })
1464
- ] })
1465
- ] }), Dt = /* @__PURE__ */ i("div")({
1466
- name: "Container",
1467
- class: "c1eptrjd",
1468
- propsAsIs: !1
1469
- }), Ft = /* @__PURE__ */ i("div")({
1470
- name: "CloseIconWrap",
1471
- class: "crylm65",
1472
- propsAsIs: !1
1473
- }), Bt = () => L, qt = /* @__PURE__ */ i(Bt())({
1474
- name: "CloseIcon",
1475
- class: "c9mrcz7",
1476
- propsAsIs: !0
1477
- }), Pt = /* @__PURE__ */ i("div")({
1478
- name: "Header",
1479
- class: "hw3lzv4",
1480
- propsAsIs: !1
1481
- }), Ut = () => L, jt = /* @__PURE__ */ i(Ut())({
1482
- name: "TypeIcon",
1483
- class: "t1rrb3kf",
1484
- propsAsIs: !0
1485
- }), Wt = /* @__PURE__ */ i("span")({
1486
- name: "TypeName",
1487
- class: "t1ydnjov",
1488
- propsAsIs: !1
1489
- }), Zt = /* @__PURE__ */ i("div")({
1490
- name: "Question",
1491
- class: "qlf90cl",
1492
- propsAsIs: !1
1493
- }), Gt = /* @__PURE__ */ i("button")({
1494
- name: "AnswerButton",
1495
- class: "a1e0nhcl",
1496
- propsAsIs: !1
1497
- }), Qt = /* @__PURE__ */ i("div")({
1498
- name: "Container",
1499
- class: "c1t4f0x4",
1500
- propsAsIs: !1
1501
- }), Kt = /* @__PURE__ */ i("button")({
1502
- name: "ActionBtn",
1503
- class: "a16w1nl6",
1504
- propsAsIs: !1
1505
- }), Yt = /* @__PURE__ */ i("div")({
1506
- name: "QuoteWrap",
1507
- class: "q14u54rf",
1508
- propsAsIs: !1
1509
- }), Jt = /* @__PURE__ */ i("blockquote")({
1510
- name: "Quote",
1511
- class: "q1hxm6zo",
1512
- propsAsIs: !1
1513
- }), Xt = ({ action: e, ...s }) => /* @__PURE__ */ h(Qt, { children: [
1514
- s.title && /* @__PURE__ */ t(Yt, { children: /* @__PURE__ */ t(Jt, { children: s.title }) }),
1515
- /* @__PURE__ */ t(re, { ...s }),
1516
- e && /* @__PURE__ */ t(Kt, { onClick: e, children: "View Insight" })
1517
- ] }), q2 = ({
1518
- close: e,
1519
- action: s,
1520
- controlVideo: n,
1521
- data: { questionType: a, question: r, insight: o, tweet: l }
1522
- }) => {
1523
- const c = oe[a];
1524
- return c ? /* @__PURE__ */ h(Dt, { onClick: s, style: a === R.TWEET ? { paddingTop: "12px" } : {}, children: [
1525
- /* @__PURE__ */ t(
1526
- Ft,
1527
- {
1528
- "data-a": "intr",
1529
- onClick: (d) => {
1530
- d.stopPropagation(), e && e(d);
1531
- },
1532
- children: /* @__PURE__ */ t(qt, { name: "icon-cross" })
1533
- }
1534
- ),
1535
- a !== R.TWEET && /* @__PURE__ */ h(Pt, { children: [
1536
- /* @__PURE__ */ t(
1537
- jt,
1538
- {
1539
- "data-type-trivia": a === R.TRIVIA,
1540
- "data-type-poll": a === R.POLL,
1541
- name: c.iconName
1542
- }
1543
- ),
1544
- /* @__PURE__ */ t(Wt, { children: c.label })
1545
- ] }),
1546
- a === R.FACTOID && o && /* @__PURE__ */ t(Ot, { ...o, action: s, controlVideo: n }),
1547
- a === R.TWEET && l && /* @__PURE__ */ t(Xt, { ...l, action: s, controlVideo: n }),
1548
- a !== R.FACTOID && a !== R.TWEET && /* @__PURE__ */ h(S, { children: [
1549
- /* @__PURE__ */ t(Zt, { children: r?.title }),
1550
- /* @__PURE__ */ t(Gt, { children: "Answer" })
1551
- ] })
1552
- ] }) : null;
1553
- }, P = /* @__PURE__ */ i("div")({
1554
- name: "BGWrap",
1555
- class: "b1dqe0sz",
1556
- propsAsIs: !1
1557
- }), _ = /* @__PURE__ */ i("div")({
1558
- name: "BGLineBase",
1559
- class: "b1v6w7ni",
1560
- propsAsIs: !1
1561
- }), en = () => _, sn = /* @__PURE__ */ i(en())({
1562
- name: "BGOneLineOne",
1563
- class: "b2nqb1p",
1564
- propsAsIs: !0
1565
- }), tn = () => _, nn = /* @__PURE__ */ i(tn())({
1566
- name: "BGOneLineTwo",
1567
- class: "b1xxgmbk",
1568
- propsAsIs: !0
1569
- }), an = () => _, rn = /* @__PURE__ */ i(an())({
1570
- name: "BGOneLineThree",
1571
- class: "b63lwcb",
1572
- propsAsIs: !0
1573
- }), on = () => _, P2 = /* @__PURE__ */ i(on())({
1574
- name: "BGTwoLineOne",
1575
- class: "b2iah4",
1576
- propsAsIs: !0
1577
- }), ln = () => _, U2 = /* @__PURE__ */ i(ln())({
1578
- name: "BGTwoLineTwo",
1579
- class: "b1xezvf6",
1580
- propsAsIs: !0
1581
- }), cn = () => _, j2 = /* @__PURE__ */ i(cn())({
1582
- name: "BGTwoLineThree",
1583
- class: "b1jz1hg0",
1584
- propsAsIs: !0
1585
- }), dn = () => _, W2 = /* @__PURE__ */ i(dn())({
1586
- name: "BGThreeLineOne",
1587
- class: "b18ho1tk",
1588
- propsAsIs: !0
1589
- }), pn = () => _, Z2 = /* @__PURE__ */ i(pn())({
1590
- name: "BGThreeLineTwo",
1591
- class: "b14uvjfm",
1592
- propsAsIs: !0
1593
- }), hn = () => _, G2 = /* @__PURE__ */ i(hn())({
1594
- name: "BGThreeLineThree",
1595
- class: "b11c3ns7",
1596
- propsAsIs: !0
1597
- }), mn = () => _, Q2 = /* @__PURE__ */ i(mn())({
1598
- name: "BGThreeLineFour",
1599
- class: "b1bqhhet",
1600
- propsAsIs: !0
1601
- }), un = () => _, fn = /* @__PURE__ */ i(un())({
1602
- name: "BGFourLineOne",
1603
- class: "b1xyzi7o",
1604
- propsAsIs: !0
1605
- }), Cn = () => _, gn = /* @__PURE__ */ i(Cn())({
1606
- name: "BGFourLineTwo",
1607
- class: "byo0rup",
1608
- propsAsIs: !0
1609
- }), vn = () => _, In = /* @__PURE__ */ i(vn())({
1610
- name: "BGFourLineThree",
1611
- class: "b1oyiqgv",
1612
- propsAsIs: !0
1613
- }), $n = () => _, bn = /* @__PURE__ */ i($n())({
1614
- name: "BGFourLineFour",
1615
- class: "bx3ddqw",
1616
- propsAsIs: !0
1617
- }), An = ({ step: e, correct: s }) => /* @__PURE__ */ h(S, { children: [
1618
- /* @__PURE__ */ h(P, { "data-active": e === 1, "data-first-screen": "true", children: [
1619
- /* @__PURE__ */ t(sn, {}),
1620
- /* @__PURE__ */ t(nn, {}),
1621
- /* @__PURE__ */ t(rn, {})
1622
- ] }),
1623
- /* @__PURE__ */ h(P, { "data-active": e === 2, children: [
1624
- /* @__PURE__ */ t(P2, {}),
1625
- /* @__PURE__ */ t(U2, {}),
1626
- /* @__PURE__ */ t(j2, {})
1627
- ] }),
1628
- /* @__PURE__ */ h(P, { "data-active": e === 3, children: [
1629
- /* @__PURE__ */ t(P2, {}),
1630
- /* @__PURE__ */ t(U2, {}),
1631
- /* @__PURE__ */ t(j2, {})
1632
- ] }),
1633
- s ? /* @__PURE__ */ h(S, { children: [
1634
- /* @__PURE__ */ h(P, { "data-active": e === 4, "data-correct": "true", children: [
1635
- /* @__PURE__ */ t(W2, {}),
1636
- /* @__PURE__ */ t(Z2, {}),
1637
- /* @__PURE__ */ t(G2, {}),
1638
- /* @__PURE__ */ t(Q2, {})
1639
- ] }),
1640
- /* @__PURE__ */ h(P, { "data-active": e === 5, "data-correct": "true", children: [
1641
- /* @__PURE__ */ t(W2, {}),
1642
- /* @__PURE__ */ t(Z2, {}),
1643
- /* @__PURE__ */ t(G2, {}),
1644
- /* @__PURE__ */ t(Q2, {})
1645
- ] })
1646
- ] }) : /* @__PURE__ */ h(P, { "data-active": e === 4, "data-correct": "false", children: [
1647
- /* @__PURE__ */ t(fn, {}),
1648
- /* @__PURE__ */ t(gn, {}),
1649
- /* @__PURE__ */ t(In, {}),
1650
- /* @__PURE__ */ t(bn, {})
1651
- ] })
1652
- ] }), yn = 118, wn = () => n2, kn = /* @__PURE__ */ i(wn())({
1653
- name: "Container",
1654
- class: "c10131zw",
1655
- propsAsIs: !0
1656
- }), Ln = /* @__PURE__ */ i("div")({
1657
- name: "InnerContainer",
1658
- class: "ir6k2eo",
1659
- propsAsIs: !1
1660
- }), B = /* @__PURE__ */ i("div")({
1661
- name: "Content",
1662
- class: "c1hwoq9l",
1663
- propsAsIs: !1
1664
- }), W = /* @__PURE__ */ i("div")({
1665
- name: "Title",
1666
- class: "t4ujo4g",
1667
- propsAsIs: !1
1668
- }), _n = () => W, Nn = /* @__PURE__ */ i(_n())({
1669
- name: "PointsTitle",
1670
- class: "p1pjil1h",
1671
- propsAsIs: !0
1672
- }), Y = /* @__PURE__ */ i("div")({
1673
- name: "Subtitle",
1674
- class: "s1iorwr9",
1675
- propsAsIs: !1
1676
- }), K2 = /* @__PURE__ */ i("div")({
1677
- name: "SubtitleFG",
1678
- class: "s51sv9d",
1679
- propsAsIs: !1
1680
- }), J = /* @__PURE__ */ i("div")({
1681
- name: "AnswerText",
1682
- class: "a1lbk2ye",
1683
- propsAsIs: !1
1684
- }), Sn = () => L, ge = /* @__PURE__ */ i(Sn())({
1685
- name: "FeedbackIcon",
1686
- class: "frcvk3t",
1687
- propsAsIs: !0
1688
- }), Tn = () => ge, Y2 = /* @__PURE__ */ i(Tn())({
1689
- name: "FeedbackIconCorrect",
1690
- class: "f33p82r",
1691
- propsAsIs: !0
1692
- }), xn = () => ge, Rn = /* @__PURE__ */ i(xn())({
1693
- name: "FeedbackIconIncorrect",
1694
- class: "f12r9net",
1695
- propsAsIs: !0
1696
- }), J2 = /* @__PURE__ */ i("div")({
1697
- name: "CloseIconWrap",
1698
- class: "c1fw6699",
1699
- propsAsIs: !1
1700
- }), En = () => L, X2 = /* @__PURE__ */ i(En())({
1701
- name: "CloseIcon",
1702
- class: "c115o126",
1703
- propsAsIs: !0
1704
- }), Vn = "data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e", Hn = "data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", zn = (e, s, n) => e === s ? "translateY(0px)" : e > s ? `translateY(${n}px)` : "translateY(-100%)", Mn = ({ close: e, votedAnswer: s, mastersApp: n, correct: a, correctAnswerTitle: r, questionTitle: o, saveHeight: l, style: c, hiding: d }) => {
1705
- const [m, f] = w(1), u = E({});
1706
- y(() => {
1707
- const I = setInterval(() => {
1708
- f((v) => a && v > 4 || !a && v > 3 ? v : ++v);
1709
- }, 3e3);
1710
- return () => clearInterval(I);
1711
- }, [a]), y(() => {
1712
- u.current[m] && l(u.current[m]?.getBoundingClientRect()?.height || yn);
1713
- }, [m, l]);
1714
- const p = (I) => (v) => {
1715
- u.current && (u.current[I] = v);
1716
- }, C = (I) => ({ transform: zn(I, m, c.height) }), g = { ...c };
1717
- return n && g.height && typeof g.height == "number" && (g.height += 32), /* @__PURE__ */ t(kn, { style: c.height ? g : { ...c, paddingTop: 0, paddingBottom: 0 }, hiding: d, children: /* @__PURE__ */ h(
1718
- Ln,
1719
- {
1720
- style: {
1721
- height: c.height,
1722
- minHeight: c.height,
1723
- backgroundColor: m > 3 ? a ? "var(--color-sdk-prediction-result-success-bg)" : "var(--color-sdk-prediction-result-incorrect-bg)" : "var(--color-primary-1)"
1724
- },
1725
- children: [
1726
- /* @__PURE__ */ t(An, { step: m, correct: a }),
1727
- n && /* @__PURE__ */ h(B, { ref: p(1), style: C(1), children: [
1728
- /* @__PURE__ */ t("img", { alt: "sponsor-logo", src: Vn }),
1729
- /* @__PURE__ */ t(K2, { children: "Featured Groups +" })
1730
- ] }),
1731
- !n && /* @__PURE__ */ t(B, { ref: p(1), style: C(1), children: /* @__PURE__ */ t("img", { alt: "sponsor-logo", src: Hn }) }),
1732
- /* @__PURE__ */ h(B, { ref: p(2), style: C(2), children: [
1733
- /* @__PURE__ */ t(W, { children: "Prediction results are in!" }),
1734
- n && /* @__PURE__ */ t(K2, { children: "Featured Groups +" })
1735
- ] }),
1736
- /* @__PURE__ */ h(B, { ref: p(3), style: C(3), children: [
1737
- /* @__PURE__ */ t(W, { children: o }),
1738
- /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ h(J, { children: [
1739
- /* @__PURE__ */ t("span", { children: "Your Pick:" }),
1740
- " ",
1741
- s?.title
1742
- ] }) })
1743
- ] }),
1744
- a ? /* @__PURE__ */ h(S, { children: [
1745
- /* @__PURE__ */ h(
1746
- B,
1747
- {
1748
- ref: p(4),
1749
- style: { ...C(4), color: "var(--color-sdk-prediction-result-success-text)" },
1750
- children: [
1751
- /* @__PURE__ */ h(W, { children: [
1752
- "Congratulations!",
1753
- /* @__PURE__ */ t("br", {}),
1754
- "You answered correctly."
1755
- ] }),
1756
- /* @__PURE__ */ h(Y, { children: [
1757
- /* @__PURE__ */ t(Y2, { name: "selected" }),
1758
- /* @__PURE__ */ h(J, { children: [
1759
- /* @__PURE__ */ t("span", { children: "Your Pick:" }),
1760
- " ",
1761
- s?.title
1762
- ] })
1763
- ] })
1764
- ]
1765
- }
1766
- ),
1767
- /* @__PURE__ */ h(
1768
- B,
1769
- {
1770
- ref: p(5),
1771
- style: { ...C(5), color: "var(--color-sdk-prediction-result-success-text)" },
1772
- children: [
1773
- /* @__PURE__ */ t(Nn, { children: m === 5 && /* @__PURE__ */ t(i0, { delay: 0.5, prefix: "+", suffix: " points", value: s?.points }) }),
1774
- /* @__PURE__ */ h(Y, { children: [
1775
- /* @__PURE__ */ t(Y2, { name: "selected" }),
1776
- /* @__PURE__ */ h(J, { children: [
1777
- /* @__PURE__ */ t("span", { children: "Your Pick:" }),
1778
- " ",
1779
- s?.title
1780
- ] })
1781
- ] }),
1782
- /* @__PURE__ */ t(J2, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ t(X2, { name: "icon-cross" }) })
1783
- ]
1784
- }
1785
- )
1786
- ] }) : /* @__PURE__ */ h(B, { ref: p(4), style: C(4), children: [
1787
- /* @__PURE__ */ h(W, { style: { color: "var(--color-sdk-prediction-result-error-title)" }, children: [
1788
- "Better luck next time!",
1789
- /* @__PURE__ */ t("br", {}),
1790
- "Correct: ",
1791
- r,
1792
- "."
1793
- ] }),
1794
- /* @__PURE__ */ h(Y, { style: { color: "var(--color-sdk-prediction-result-error-subtitle)" }, children: [
1795
- /* @__PURE__ */ t(Rn, { name: "circleClose" }),
1796
- /* @__PURE__ */ h(J, { children: [
1797
- /* @__PURE__ */ t("span", { children: "Your Pick:" }),
1798
- " ",
1799
- s?.title
1800
- ] })
1801
- ] }),
1802
- /* @__PURE__ */ t(J2, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ t(X2, { name: "icon-cross" }) })
1803
- ] })
1804
- ]
1805
- }
1806
- ) });
1807
- }, On = (e) => {
1808
- const [s, n] = w(!1), [a, r] = w(!1), o = E(null), l = q(() => {
1809
- r(!0), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
1810
- r(!1);
1811
- }, 1e3);
1812
- }, []), c = q(async (d) => {
1813
- n(!0);
1814
- const m = d.map(
1815
- (f) => new Promise((u, p) => {
1816
- const C = new Image();
1817
- C.onload = () => u(f), C.onerror = () => p(), C.src = f;
1818
- })
1819
- );
1820
- await Promise.allSettled(m), n(!1);
1821
- }, []);
1822
- return y(() => {
1823
- e && (l(), c(e));
1824
- }, [e, l, c]), { loading: s, throttled: a };
1825
- }, Dn = /* @__PURE__ */ i("div")({
1826
- name: "Container",
1827
- class: "cl51m2q",
1828
- propsAsIs: !1
1829
- }), Fn = /* @__PURE__ */ i("img")({
1830
- name: "Avatar",
1831
- class: "a2yhhhr",
1832
- propsAsIs: !1
1833
- }), Bn = /* @__PURE__ */ i("div")({
1834
- name: "AvatarPlaceholder",
1835
- class: "a1dtxxlr",
1836
- propsAsIs: !1
1837
- }), qn = /* @__PURE__ */ i("div")({
1838
- name: "Content",
1839
- class: "c12clm3w",
1840
- propsAsIs: !1
1841
- }), Pn = /* @__PURE__ */ i("span")({
1842
- name: "Name",
1843
- class: "n14lctn7",
1844
- propsAsIs: !1
1845
- }), Un = ({ avatar: e, name: s }) => /* @__PURE__ */ h(Dn, { children: [
1846
- e && /* @__PURE__ */ t(Fn, { src: e }),
1847
- !e && /* @__PURE__ */ t(Bn, { children: h2(s || "") }),
1848
- /* @__PURE__ */ h(qn, { children: [
1849
- /* @__PURE__ */ h(Pn, { children: [
1850
- s,
1851
- " "
1852
- ] }),
1853
- "is waiting for you!"
1854
- ] })
1855
- ] }), jn = /* @__PURE__ */ i("div")({
1856
- name: "Container",
1857
- class: "c1htq1lb",
1858
- propsAsIs: !1
1859
- }), Wn = /* @__PURE__ */ i("div")({
1860
- name: "Graphic",
1861
- class: "gjyzpp7",
1862
- propsAsIs: !1
1863
- }), Zn = /* @__PURE__ */ i("img")({
1864
- name: "GraphicImage",
1865
- class: "g16mldgz",
1866
- propsAsIs: !1
1867
- }), Gn = /* @__PURE__ */ i("div")({
1868
- name: "Headline",
1869
- class: "h69js65",
1870
- propsAsIs: !1
1871
- }), Qn = /* @__PURE__ */ i("div")({
1872
- name: "TaglineContainer",
1873
- class: "tmm7qmo",
1874
- propsAsIs: !1
1875
- }), Kn = /* @__PURE__ */ i("div")({
1876
- name: "Tagline",
1877
- class: "t17knuw2",
1878
- propsAsIs: !1
1879
- }), Yn = /* @__PURE__ */ i("div")({
1880
- name: "Content",
1881
- class: "c1b74psg",
1882
- propsAsIs: !1
1883
- }), Jn = /* @__PURE__ */ i("div")({
1884
- name: "StepsContainer",
1885
- class: "s1y99ug7",
1886
- propsAsIs: !1
1887
- }), Xn = /* @__PURE__ */ i("span")({
1888
- name: "StepIndicator",
1889
- class: "sgf3v5n",
1890
- propsAsIs: !1
1891
- }), ei = /* @__PURE__ */ i("div")({
1892
- name: "InvitingUserWrap",
1893
- class: "i1sj6gn8",
1894
- propsAsIs: !1
1895
- }), si = ({
1896
- loading: e,
1897
- steps: s,
1898
- currentStep: n,
1899
- inviterName: a
1900
- }) => {
1901
- const { headline: r, tagline: o } = s[n];
1902
- return /* @__PURE__ */ h(jn, { children: [
1903
- o && /* @__PURE__ */ t(Qn, { children: /* @__PURE__ */ t(M, { loading: e, children: /* @__PURE__ */ t(Kn, { children: o }) }) }),
1904
- /* @__PURE__ */ h(Yn, { "data-welcome-screen": n === 0, children: [
1905
- /* @__PURE__ */ t(Wn, { children: /* @__PURE__ */ t(M, { loading: e, children: s.map(({ graphicSrc: l }, c) => /* @__PURE__ */ t(Zn, { src: l, "data-active": n === c })) }) }),
1906
- r && /* @__PURE__ */ t(M, { loading: e, children: /* @__PURE__ */ t(Gn, { children: r }) })
1907
- ] }),
1908
- a && n === 0 && /* @__PURE__ */ t(ei, { children: /* @__PURE__ */ t(Un, { name: a }) }),
1909
- /* @__PURE__ */ t(Jn, { style: e ? { visibility: "hidden" } : {}, children: Array.from({ length: s.length }).map((l, c) => /* @__PURE__ */ t(Xn, { "data-active": n === c }, c)) })
1910
- ] });
1911
- }, ti = /* @__PURE__ */ i("div")({
1912
- name: "Container",
1913
- class: "cm0bev",
1914
- propsAsIs: !1
1915
- }), ni = /* @__PURE__ */ i("div")({
1916
- name: "Content",
1917
- class: "ce7x737",
1918
- propsAsIs: !1
1919
- }), ii = /* @__PURE__ */ i("div")({
1920
- name: "Title",
1921
- class: "tc2tor6",
1922
- propsAsIs: !1
1923
- }), ai = /* @__PURE__ */ i("div")({
1924
- name: "RulesList",
1925
- class: "r1k5klql",
1926
- propsAsIs: !1
1927
- }), ri = /* @__PURE__ */ i("div")({
1928
- name: "RulesItem",
1929
- class: "r1tf3ft2",
1930
- propsAsIs: !1
1931
- }), oi = /* @__PURE__ */ i("div")({
1932
- name: "RuleIcon",
1933
- class: "rwpvg1k",
1934
- propsAsIs: !1
1935
- }), li = /* @__PURE__ */ i("div")({
1936
- name: "RuleText",
1937
- class: "rbxiag0",
1938
- propsAsIs: !1
1939
- }), ci = /* @__PURE__ */ i("button")({
1940
- name: "TermsButton",
1941
- class: "t6cyrry",
1942
- propsAsIs: !1
1943
- }), di = ({
1944
- rules: e,
1945
- rulesTitle: s,
1946
- termsText: n,
1947
- primaryColor: a,
1948
- openTerms: r
1949
- }) => /* @__PURE__ */ h(ti, { children: [
1950
- /* @__PURE__ */ h(ni, { children: [
1951
- /* @__PURE__ */ t(ii, { children: s }),
1952
- /* @__PURE__ */ t(ai, { children: e?.map(({ label: o, icon: l }, c) => /* @__PURE__ */ h(ri, { children: [
1953
- l && /* @__PURE__ */ t(oi, { style: { backgroundColor: a }, children: /* @__PURE__ */ t(L, { name: l, "data-icon": l }) }),
1954
- /* @__PURE__ */ t(li, { children: o })
1955
- ] }, c)) })
1956
- ] }),
1957
- n && /* @__PURE__ */ t(ci, { "data-a": "intr", onClick: r, children: "See Terms and Conditions" })
1958
- ] }), pi = /* @__PURE__ */ i("div")({
1959
- name: "Container",
1960
- class: "cj0g35h",
1961
- propsAsIs: !1
1962
- }), hi = /* @__PURE__ */ i("div")({
1963
- name: "Content",
1964
- class: "c1xkhrbn",
1965
- propsAsIs: !1
1966
- }), mi = /* @__PURE__ */ i("div")({
1967
- name: "Title",
1968
- class: "tifzb8b",
1969
- propsAsIs: !1
1970
- }), ui = /* @__PURE__ */ i("div")({
1971
- name: "ScrollingText",
1972
- class: "stduw5c",
1973
- propsAsIs: !1
1974
- }), fi = ({ termsTitle: e, termsText: s }) => /* @__PURE__ */ t(pi, { children: /* @__PURE__ */ h(hi, { children: [
1975
- /* @__PURE__ */ t(mi, { children: e }),
1976
- /* @__PURE__ */ t(ui, { children: s })
1977
- ] }) }), Ci = /* @__PURE__ */ i("button")({
1978
- name: "SButton",
1979
- class: "s1nve60q",
1980
- propsAsIs: !1
1981
- }), gi = /* @__PURE__ */ i("span")({
1982
- name: "ButtonLabel",
1983
- class: "b1xoswwx",
1984
- propsAsIs: !1
1985
- }), vi = ({ disabled: e, variant: s = "primary", onClick: n, children: a, ...r }) => /* @__PURE__ */ t(Ci, { "data-a": "intr", onClick: n, disabled: e, "data-variant": s, ...r, children: /* @__PURE__ */ t(gi, { children: a }) }), Ii = /* @__PURE__ */ i("div")({
1986
- name: "Container",
1987
- class: "c18uddbs",
1988
- propsAsIs: !1
1989
- }), $i = /* @__PURE__ */ i("div")({
1990
- name: "Content",
1991
- class: "cvcfjf6",
1992
- propsAsIs: !1
1993
- }), bi = /* @__PURE__ */ i("div")({
1994
- name: "OnboardingHeader",
1995
- class: "o1ie27lw",
1996
- propsAsIs: !1
1997
- }), Ai = /* @__PURE__ */ i("button")({
1998
- name: "CloseBtn",
1999
- class: "c15cjkwi",
2000
- propsAsIs: !1
2001
- }), yi = () => L, wi = /* @__PURE__ */ i(yi())({
2002
- name: "IconClose",
2003
- class: "i1mavjt2",
2004
- propsAsIs: !0
2005
- }), ki = /* @__PURE__ */ i("div")({
2006
- name: "OnboardingFooter",
2007
- class: "o1x0dyzv",
2008
- propsAsIs: !1
2009
- }), Li = () => vi, _i = /* @__PURE__ */ i(Li())({
2010
- name: "OnboardingActionBtn",
2011
- class: "o1jfi9c3",
2012
- propsAsIs: !0
2013
- }), U = {
2014
- steps: !1,
2015
- rules: !1,
2016
- inviteCard: !1
2017
- }, Ni = ({
2018
- gamification: e,
2019
- steps: s,
2020
- rules: n,
2021
- rulesBtnLabel: a,
2022
- rulesTitle: r,
2023
- termsTitle: o,
2024
- termsText: l,
2025
- primaryColor: c,
2026
- inviteLink: d,
2027
- inviteCardTitle: m,
2028
- inviteCardSubtext: f,
2029
- inviteCardBtnLabel: u,
2030
- loading: p,
2031
- inviterName: C,
2032
- sdk: g,
2033
- onClose: I
2034
- }) => {
2035
- const [v, A] = w(0), [b, N] = w(!1), [k, x] = w(U);
2036
- y(() => {
2037
- s?.length ? x({ ...U, steps: !0 }) : n?.length ? x({ ...U, rules: !0 }) : x({ ...U, inviteCard: !0 });
2038
- }, []);
2039
- const $e = z(() => k.steps && v === 0 ? "Continue" : k.rules ? b || !a ? "Got it" : a : k.inviteCard ? u || "Play Now" : "Next", [k, v, b, a, u]), be = q(() => {
2040
- s?.length && v < s.length - 1 ? A((i2) => ++i2) : n?.length && k.steps ? x({ ...U, rules: !0 }) : k.rules && x({ ...U, inviteCard: !0 });
2041
- }, [v, s?.length, n?.length, k, A, x]), Ae = async () => {
2042
- k.inviteCard ? await e.onboardingStatus.submitInplay() : k.rules && b ? N(!1) : be();
2043
- };
2044
- return y(() => {
2045
- !p && C && g.inviteDisplayed();
2046
- }, [p, C, g]), /* @__PURE__ */ t(ns, { children: ({ width: i2, height: u2 }) => /* @__PURE__ */ h(Ii, { style: { width: i2, height: u2, maxHeight: u2 }, children: [
2047
- /* @__PURE__ */ t(bi, { children: /* @__PURE__ */ t(Ai, { "data-a": "intr", onClick: I, children: /* @__PURE__ */ t(wi, { name: "icon-close-btn-gray" }) }) }),
2048
- /* @__PURE__ */ h($i, { children: [
2049
- k.steps && s?.length && /* @__PURE__ */ t(
2050
- si,
2051
- {
2052
- loading: p,
2053
- steps: s,
2054
- currentStep: v,
2055
- inviterName: C
2056
- }
2057
- ),
2058
- k.rules && !b && /* @__PURE__ */ t(
2059
- di,
2060
- {
2061
- rules: n,
2062
- rulesTitle: r,
2063
- termsText: l,
2064
- primaryColor: c,
2065
- openTerms: () => N(!0)
2066
- }
2067
- ),
2068
- k.rules && b && /* @__PURE__ */ t(fi, { termsTitle: o, termsText: l }),
2069
- k.inviteCard && /* @__PURE__ */ t(
2070
- fe,
2071
- {
2072
- inviteLink: d,
2073
- inviteCardTitle: m,
2074
- inviteCardSubtext: f,
2075
- primaryColor: c
2076
- }
2077
- )
2078
- ] }),
2079
- /* @__PURE__ */ t(ki, { children: /* @__PURE__ */ t(M, { loading: p, style: { width: "100%" }, children: /* @__PURE__ */ t(_i, { "data-a": "intr", onClick: Ae, children: $e }) }) })
2080
- ] }) });
2081
- }, Si = /* @__PURE__ */ i("div")({
2082
- name: "Container",
2083
- class: "c1qjj4d4",
2084
- propsAsIs: !1
2085
- }), Ti = /* @__PURE__ */ i("div")({
2086
- name: "CloseIconWrap",
2087
- class: "c1lg6b8a",
2088
- propsAsIs: !1
2089
- }), xi = () => L, Ri = /* @__PURE__ */ i(xi())({
2090
- name: "CloseIcon",
2091
- class: "c159el66",
2092
- propsAsIs: !0
2093
- }), Ei = /* @__PURE__ */ i("div")({
2094
- name: "Title",
2095
- class: "t16xmufv",
2096
- propsAsIs: !1
2097
- }), Vi = /* @__PURE__ */ i("img")({
2098
- name: "SponsorLogo",
2099
- class: "s83lc21",
2100
- propsAsIs: !1
2101
- }), Hi = /* @__PURE__ */ i("div")({
2102
- name: "PresentsTitle",
2103
- class: "p1p7igia",
2104
- propsAsIs: !1
2105
- }), zi = /* @__PURE__ */ i("div")({
2106
- name: "Subtitle",
2107
- class: "s1eftsbu",
2108
- propsAsIs: !1
2109
- }), Mi = /* @__PURE__ */ i("div")({
2110
- name: "Description",
2111
- class: "d8uezec",
2112
- propsAsIs: !1
2113
- }), Oi = /* @__PURE__ */ i("button")({
2114
- name: "ActionButton",
2115
- class: "a1h1bk90",
2116
- propsAsIs: !1
2117
- }), ee = ({ close: e, action: s, onboarding: n }) => /* @__PURE__ */ h(Si, { children: [
2118
- /* @__PURE__ */ t(Ti, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ t(Ri, { name: "icon-cross" }) }),
2119
- n?.titleCard?.media?.sponsorLogo && /* @__PURE__ */ h(Ei, { children: [
2120
- /* @__PURE__ */ t(Vi, { alt: "sponsor-logo", src: n?.titleCard?.media?.sponsorLogo }),
2121
- /* @__PURE__ */ t(Hi, { children: "PRESENTS" })
2122
- ] }),
2123
- n?.titleCard?.title && /* @__PURE__ */ t(zi, { children: n?.titleCard?.title }),
2124
- n?.titleCard?.subtitle && /* @__PURE__ */ t(Mi, { children: n?.titleCard?.subtitle }),
2125
- /* @__PURE__ */ t(Oi, { "data-a": "intr", onClick: s, children: "Play Now" })
2126
- ] }), ve = [{
2127
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
2128
- tagline: "",
2129
- headline: /* @__PURE__ */ h(S, {
2130
- children: ["Welcome to ", /* @__PURE__ */ t("br", {}), " Live Challenge"]
2131
- })
2132
- }, {
2133
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
2134
- headline: "Live insights, polls, trivia and predictions."
2135
- }, {
2136
- graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
2137
- headline: "Win points and play against friends."
2138
- }], Di = /* @__PURE__ */ i("div")({
2139
- name: "OnboardingContainer",
2140
- class: "o1xni1kr",
2141
- propsAsIs: !1
2142
- }), Fi = () => n2, Bi = /* @__PURE__ */ i(Fi())({
2143
- name: "OnboardingNotificationContainer",
2144
- class: "o1vnouv7",
2145
- propsAsIs: !0
2146
- }), se = /* @__PURE__ */ i("div")({
2147
- name: "InnerContainer",
2148
- class: "i59uefw",
2149
- propsAsIs: !1
2150
- }), qi = /* @__PURE__ */ i("div")({
2151
- name: "OnboardingOverlap",
2152
- class: "ovnr8ov",
2153
- propsAsIs: !1
2154
- }), Pi = ({
2155
- deepLink: e,
2156
- onboardingOpts: s,
2157
- notification: n,
2158
- gamification: a,
2159
- loading: r,
2160
- sdk: o,
2161
- throttled: l
2162
- }) => {
2163
- const c = $(a.friends ? a.friends.getStore() : de({
2164
- data: []
2165
- })), [d, m] = w(void 0), f = z(() => {
2166
- const u = o.getInviter();
2167
- return u ? c.data?.find(({
2168
- slId: p
2169
- }) => p === u)?.name : "";
2170
- }, [c.data, o]);
2171
- return y(() => {
2172
- const u = e.$store.subscribe((p) => {
2173
- p && m(p.data);
2174
- });
2175
- return () => {
2176
- u();
2177
- };
2178
- }, [e.$store]), /* @__PURE__ */ h(Di, {
2179
- children: [/* @__PURE__ */ t(Ni, {
2180
- loading: r,
2181
- rules: [{
2182
- label: "Answer as many questions as you like.",
2183
- icon: "icon-btn-feature-groups"
2184
- }, {
2185
- label: "Win points for each correct trivia or prediction answer.",
2186
- icon: "icon-thumb-up"
2187
- }, {
2188
- label: "Top the leader board and best your friends.",
2189
- icon: "icon-trophy"
2190
- }],
2191
- rulesBtnLabel: s.rules?.buttonLabel,
2192
- rulesTitle: s.rules?.heading,
2193
- termsTitle: "Terms and Conditions",
2194
- termsText: s.rules?.terms,
2195
- steps: ve,
2196
- primaryColor: s.inviteCard?.iconColor,
2197
- inviteLink: d,
2198
- inviteCardTitle: s.inviteCard?.heading,
2199
- inviteCardSubtext: s.inviteCard?.subtext,
2200
- inviteCardBtnLabel: s.inviteCard?.buttonLabel,
2201
- onClose: () => {
2202
- n.close?.();
2203
- },
2204
- gamification: a,
2205
- sdk: o,
2206
- inviterName: f
2207
- }), l && /* @__PURE__ */ t(qi, {})]
2208
- });
2209
- }, Ui = ({
2210
- sdk: e,
2211
- notification: s,
2212
- saveHeight: n,
2213
- style: a,
2214
- appNode: r,
2215
- sdkInDesktopView: o,
2216
- responsiveStore: l
2217
- }) => {
2218
- const c = E(null), d = s.data.onboarding, [m, f] = w(d?.instantOpen), u = e.getFeature(V.GAMES), p = z(() => ve?.map(({
2219
- graphicSrc: v
2220
- }) => v), []), {
2221
- screen: C
2222
- } = $(l, {
2223
- keys: ["screen"]
2224
- });
2225
- Fe(() => {
2226
- n(c.current?.getBoundingClientRect().height || 0);
2227
- }, [n]);
2228
- const {
2229
- loading: g,
2230
- throttled: I
2231
- } = On(p);
2232
- return m && u && d && r.current ? /* @__PURE__ */ t(me, {
2233
- container: r,
2234
- useContainer: !o,
2235
- children: /* @__PURE__ */ t(Pi, {
2236
- throttled: I,
2237
- notification: s,
2238
- setOpened: f,
2239
- gamification: u,
2240
- onboardingOpts: d,
2241
- deepLink: u.deepLink,
2242
- loading: g,
2243
- renderToNode: r,
2244
- sdk: e
2245
- })
2246
- }) : /* @__PURE__ */ h(S, {
2247
- children: [/* @__PURE__ */ t(se, {
2248
- ref: c,
2249
- style: {
2250
- position: "absolute",
2251
- visibility: "hidden"
2252
- },
2253
- children: /* @__PURE__ */ t(ee, {
2254
- close: () => {
2255
- },
2256
- action: () => {
2257
- },
2258
- onboarding: d
2259
- })
2260
- }), /* @__PURE__ */ t(Bi, {
2261
- style: a,
2262
- hiding: s.hiding,
2263
- children: /* @__PURE__ */ t(se, {
2264
- children: /* @__PURE__ */ t(ee, {
2265
- close: s.close,
2266
- action: () => {
2267
- f(!0), (r.current?.getBoundingClientRect().y || 0) < 0 && m2(r, C.size, {
2268
- behavior: "smooth"
2269
- });
2270
- },
2271
- onboarding: d
2272
- })
2273
- })
2274
- })]
2275
- });
2276
- }, ji = /* @__PURE__ */ i("button")({
2277
- name: "Container",
2278
- class: "crkmfw1",
2279
- propsAsIs: !1
2280
- }), Wi = /* @__PURE__ */ i("div")({
2281
- name: "Content",
2282
- class: "c11awpy4",
2283
- propsAsIs: !1
2284
- }), Zi = /* @__PURE__ */ i("span")({
2285
- name: "Title",
2286
- class: "t154z7mh",
2287
- propsAsIs: !1
2288
- }), Gi = ({ title: e, onClick: s, className: n, style: a }) => /* @__PURE__ */ t(ji, { "data-a": "intr", onClick: s, className: n, style: a, children: /* @__PURE__ */ h(Wi, { "data-a": "intr", children: [
2289
- /* @__PURE__ */ t(L, { "data-a": "intr", name: "iconUp" }),
2290
- e && /* @__PURE__ */ t(Zi, { "data-a": "intr", children: e })
2291
- ] }) }), Qi = () => n2, Ki = /* @__PURE__ */ i(Qi())({
2292
- name: "Container",
2293
- class: "c8ol1ve",
2294
- propsAsIs: !0
2295
- }), Ie = /* @__PURE__ */ i("div")({
2296
- name: "InnerContainer",
2297
- class: "iqfywam",
2298
- propsAsIs: !1
2299
- }), Yi = () => Ie, Ji = /* @__PURE__ */ i(Yi())({
2300
- name: "HiddenContainer",
2301
- class: "hokmtod",
2302
- propsAsIs: !0
2303
- }), Xi = /* @__PURE__ */ i("div")({
2304
- name: "NotificationRefreshing",
2305
- class: "n192d1q8",
2306
- propsAsIs: !1
2307
- }), ea = () => Gi, sa = /* @__PURE__ */ i(ea())({
2308
- name: "Pill",
2309
- class: "p1lha68t",
2310
- propsAsIs: !0
2311
- }), ta = (e) => {
2312
- const [s, n] = w(0), a = E(null), r = z(() => new ResizeObserver((c) => {
2313
- window.requestAnimationFrame(() => {
2314
- if (Array.isArray(c)) {
2315
- for (const d of c)
2316
- if (d.contentBoxSize) {
2317
- const m = a.current?.getBoundingClientRect();
2318
- m && n(m.height);
2319
- }
2320
- }
2321
- });
2322
- }), []), o = q((c) => {
2323
- a.current = c;
2324
- }, []), l = q((c) => {
2325
- n(c);
2326
- }, []);
2327
- return y(() => {
2328
- const c = a.current;
2329
- return c ? (r.observe(c), () => {
2330
- r.unobserve(c);
2331
- }) : () => {
2332
- };
2333
- }, [e]), y(() => () => {
2334
- r.disconnect();
2335
- }), [o, s, l];
2336
- }, na = ({
2337
- sdk: e,
2338
- notification: s,
2339
- appNode: n,
2340
- responsiveStore: a,
2341
- hasActiveFeature: r
2342
- }) => {
2343
- const {
2344
- sdkInDesktopView: o
2345
- } = $(a, {
2346
- keys: ["sdkInDesktopView"]
2347
- }), {
2348
- sdk: l
2349
- } = p2(), [c, d, m] = ta(s.id);
2350
- let f = d;
2351
- return r || (f = "auto"), s.type === e2.QUESTION ? /* @__PURE__ */ h(S, {
2352
- children: [/* @__PURE__ */ t(Ji, {
2353
- ref: c,
2354
- children: /* @__PURE__ */ t(q2, {
2355
- ...s
2356
- })
2357
- }), /* @__PURE__ */ h(Ki, {
2358
- style: {
2359
- height: s.hiding ? 0 : f
2360
- },
2361
- hiding: s.hiding,
2362
- children: [/* @__PURE__ */ t(Ie, {
2363
- style: {
2364
- height: "100%"
2365
- },
2366
- children: /* @__PURE__ */ t(q2, {
2367
- ...s,
2368
- controlVideo: l?.controlVideoPlayer
2369
- })
2370
- }), /* @__PURE__ */ t(Xi, {}, s.id)]
2371
- })]
2372
- }) : s.type === e2.QUESTION_RESOLVED && s.data?.question?.predictionResult ? /* @__PURE__ */ t(Mn, {
2373
- style: {
2374
- height: s.hiding ? 0 : d
2375
- },
2376
- saveHeight: m,
2377
- close: s.close,
2378
- hiding: s.hiding,
2379
- ...s.data.question
2380
- }) : s.type === e2.ONBOARDING ? /* @__PURE__ */ t(Ui, {
2381
- style: {
2382
- height: s.hiding ? 0 : f
2383
- },
2384
- saveHeight: m,
2385
- sdk: e,
2386
- notification: s,
2387
- sdkInDesktopView: o,
2388
- appNode: n,
2389
- responsiveStore: a
2390
- }) : null;
2391
- }, ia = "p7vfi6t", aa = ({
2392
- pill: e,
2393
- setPill: s,
2394
- appNode: n,
2395
- headerNode: a,
2396
- scrollNode: r,
2397
- responsiveStore: o,
2398
- scrollStore: l
2399
- }) => {
2400
- const {
2401
- screen: c
2402
- } = $(o, {
2403
- keys: ["screen"]
2404
- }), {
2405
- tabsShown: d,
2406
- scrollPosition: m
2407
- } = $(l, {
2408
- keys: ["tabsShown", "scrollPosition"]
2409
- });
2410
- y(() => {
2411
- o.get().sdkInDesktopView ? m < 50 && s(null) : m > -50 && s(null);
2412
- }, [m, o, s]);
2413
- const f = o.get().sdkInDesktopView ? n : a;
2414
- return !e || !f.current ? null : s2(/* @__PURE__ */ t(sa, {
2415
- title: e.type === e2.QUESTION_RESOLVED ? "Prediction result" : `New ${oe[e.data?.questionType]?.label || "notification"}`,
2416
- "data-a": "intr",
2417
- onClick: () => {
2418
- o.get().sdkInDesktopView ? r.current?.scrollTo({
2419
- top: 0,
2420
- behavior: "smooth"
2421
- }) : m2(n, c.size, {
2422
- behavior: "smooth"
2423
- }), s(null);
2424
- },
2425
- className: D(d && ia, "sl-pill-button")
2426
- }), f.current);
2427
- }, ra = ({
2428
- sdk: e,
2429
- headerNode: s,
2430
- scrollNode: n,
2431
- responsiveStore: a,
2432
- appNode: r,
2433
- scrollStore: o,
2434
- hasActiveFeature: l
2435
- }) => {
2436
- const [c] = w(e.getNotificationsStore()), d = $(c), [m, f] = w(null), u = z(() => e.getActiveNotification(), [e, d]);
2437
- return y(() => {
2438
- u && n0.emit("notification", {
2439
- action: "rendered",
2440
- payload: {
2441
- questionId: u.data.questionId,
2442
- questionType: u.data.questionType
2443
- }
2444
- });
2445
- }, [u]), y(() => {
2446
- const {
2447
- sdkInDesktopView: p,
2448
- sdkInView: C
2449
- } = a.get();
2450
- u && (p || C) && (!p && C && f(u), p && window.requestAnimationFrame(() => {
2451
- o.get().scrollPosition !== 0 && f(u);
2452
- }));
2453
- }, [u]), y(() => {
2454
- u || f(null);
2455
- }, [u]), /* @__PURE__ */ h(S, {
2456
- children: [!m && u && /* @__PURE__ */ t(na, {
2457
- appNode: r,
2458
- sdk: e,
2459
- hasActiveFeature: l,
2460
- notification: u,
2461
- responsiveStore: a
2462
- }), m && /* @__PURE__ */ t(aa, {
2463
- pill: m,
2464
- setPill: f,
2465
- appNode: r,
2466
- notification: u,
2467
- headerNode: s,
2468
- scrollNode: n,
2469
- scrollStore: o,
2470
- responsiveStore: a
2471
- })]
2472
- });
2473
- }, oa = (e) => {
2474
- const s = $(e.status), n = $(e.sdkStore.slStreamId), a = $(e.userId()), r = $(e.getActiveFeature()), o = s === "ready" && !!n.data;
2475
- return y(() => {
2476
- const l = e.getFeature(V.GAMES);
2477
- l && r !== V.GAMES && (l.closeQuestion(), l.closeUser()), l?.openedQuestionId.subscribe((c) => {
2478
- c && r !== V.GAMES && e.openFeature(V.GAMES);
2479
- });
2480
- }, [r, e]), {
2481
- sdkReady: o,
2482
- activeFeature: r,
2483
- isLogged: !!a
2484
- };
2485
- }, la = ({
2486
- sdk: e,
2487
- className: s,
2488
- scrollStore: n,
2489
- appNode: a,
2490
- scrollNode: r,
2491
- responsiveStore: o
2492
- }) => {
2493
- const [, l] = o0(e);
2494
- return /* @__PURE__ */ t(it, {
2495
- className: s,
2496
- scrollNode: r,
2497
- appNode: a,
2498
- scrollStore: n,
2499
- feature: l,
2500
- responsiveStore: o,
2501
- sdk: e
2502
- });
2503
- }, ca = ({
2504
- sdk: e,
2505
- muted: s,
2506
- className: n,
2507
- appNode: a,
2508
- responsiveStore: r
2509
- }) => {
2510
- const o = $(e.featuresList.getStore());
2511
- return o ? Array.from(o, (l) => {
2512
- const c = e.getFeature(l);
2513
- return c ? /* @__PURE__ */ t(at, {
2514
- className: n,
2515
- muted: s,
2516
- appNode: a,
2517
- feature: c,
2518
- responsiveStore: r,
2519
- sdk: e
2520
- }, l) : null;
2521
- }) : null;
2522
- }, da = ({
2523
- sdk: e,
2524
- muted: s,
2525
- topNavigation: n
2526
- }) => {
2527
- const [a, r] = w(!0), o = E(null), l = $(e.uiState), c = E(null), [d] = l0(o), [m, f] = d0(o, d), {
2528
- sdkReady: u,
2529
- activeFeature: p,
2530
- isLogged: C
2531
- } = oa(e), g = !!u;
2532
- qe(o, {
2533
- enabled: g,
2534
- event: "click",
2535
- listener: Pe
2536
- });
2537
- const I = z(() => ({
2538
- sdk: e,
2539
- topNavigation: n
2540
- }), [e, n]);
2541
- return y(() => {
2542
- import("./gamification-feature.js");
2543
- }, []), /* @__PURE__ */ t(Ze.Provider, {
2544
- value: I,
2545
- children: /* @__PURE__ */ h(Ee, {
2546
- ref: (v) => {
2547
- o.current = v, r(!!v);
2548
- },
2549
- className: n ? "" : "c10llmat",
2550
- children: [g && n && l.app && /* @__PURE__ */ t(Tt, {
2551
- className: D(G, "sl-hide-on-modal"),
2552
- sdk: e,
2553
- ref: c
2554
- }), g && !n && !!p && l.app && /* @__PURE__ */ t(St, {
2555
- className: D(G, "sl-hide-on-modal"),
2556
- sdk: e,
2557
- ref: c
2558
- }), /* @__PURE__ */ h(Ve, {
2559
- className: "sl-hide-on-modal",
2560
- ref: m,
2561
- "data-nav": (!!p && g).toString(),
2562
- children: [g && l.app && /* @__PURE__ */ t(ra, {
2563
- sdk: e,
2564
- scrollNode: m,
2565
- headerNode: c,
2566
- appNode: o,
2567
- scrollStore: f,
2568
- responsiveStore: d,
2569
- hasActiveFeature: !!p
2570
- }), g && l.app && /* @__PURE__ */ t(la, {
2571
- scrollStore: f,
2572
- responsiveStore: d,
2573
- scrollNode: m,
2574
- appNode: o,
2575
- className: G,
2576
- sdk: e
2577
- }), g && a && /* @__PURE__ */ t(ca, {
2578
- muted: s,
2579
- responsiveStore: d,
2580
- appNode: o,
2581
- className: G,
2582
- sdk: e
2583
- })]
2584
- }), g && !C && a && l.app && /* @__PURE__ */ t("div", {
2585
- style: {
2586
- display: "flex",
2587
- alignItems: "center",
2588
- justifyContent: "center",
2589
- width: "100%",
2590
- height: "100%"
2591
- },
2592
- children: "You are not logged in."
2593
- })]
2594
- })
2595
- });
2596
- }, Ma = ({ event: e, topNavigation: s, theme: n, muted: a, withSidebarNotification: r = !0 }) => {
2597
- const { sdk: o, status: l } = f2(g2), c = a0(), d = r0(), { event: m } = f2(g2);
2598
- if (l === v2.UNSET)
2599
- throw new Error("Wrap app in `StreamLayerProvider`");
2600
- return l === v2.CONNECTED ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: "wait" }) : o === null ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !c.app && !c.appNotification && !c.appSidebar || !c.app && !c.appSidebar && c.appNotification && !r ? null : /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(ye, { customTheme: n ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ t(da, { sdk: o, muted: a, event: m?.current || e, topNavigation: s }) }) });
2601
- };
2602
- export {
2603
- za as B,
2604
- Ma as D
2605
- };