@streamlayer/react 1.23.1 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/lib/app/masters.d.ts +0 -1
  2. package/lib/cjs/Question.js +1 -1
  3. package/lib/cjs/advertisement.js +33 -53
  4. package/lib/cjs/analytics.js +1 -1
  5. package/lib/cjs/auth.js +1 -1
  6. package/lib/cjs/bet-pack.js +1 -1
  7. package/lib/cjs/feature.js +1 -1
  8. package/lib/cjs/hooks-n9ax4LRT.js +1 -0
  9. package/lib/cjs/index-ByUNFvMk.js +5 -0
  10. package/lib/cjs/index.js +1 -1
  11. package/lib/cjs/index10.js +1 -1
  12. package/lib/cjs/index11.js +1 -4
  13. package/lib/cjs/index12.js +1 -1
  14. package/lib/cjs/index13.js +1 -1
  15. package/lib/cjs/index14.js +4 -1
  16. package/lib/cjs/index15.js +1 -1
  17. package/lib/cjs/index16.js +2 -2
  18. package/lib/cjs/index2.js +1 -1
  19. package/lib/cjs/index4.js +3 -3
  20. package/lib/cjs/index5.js +1 -1
  21. package/lib/cjs/index6.js +1 -1
  22. package/lib/cjs/index7.js +1 -1
  23. package/lib/cjs/index8.js +1 -1
  24. package/lib/cjs/index9.js +7 -1
  25. package/lib/cjs/insight.js +1 -1
  26. package/lib/cjs/masters.js +1 -1
  27. package/lib/cjs/masters2.js +5 -10
  28. package/lib/cjs/notification.js +1 -1
  29. package/lib/cjs/pause-ad.js +1 -1
  30. package/lib/cjs/points.js +1 -1
  31. package/lib/cjs/polymarket.js +4 -9
  32. package/lib/cjs/sl-types.js +1 -15
  33. package/lib/cjs/storage.js +1 -1
  34. package/lib/cjs/theme.js +1 -17
  35. package/lib/cjs/useStreamLayerApp.js +1 -1
  36. package/lib/cjs/useStreamLayerApp2.js +15 -15
  37. package/lib/cjs/utils.js +8 -8
  38. package/lib/classic/app/masters.d.ts +0 -1
  39. package/lib/classic/cjs/Question.js +1 -1
  40. package/lib/classic/cjs/advertisement.js +33 -53
  41. package/lib/classic/cjs/analytics.js +1 -1
  42. package/lib/classic/cjs/auth.js +1 -1
  43. package/lib/classic/cjs/bet-pack.js +3 -3
  44. package/lib/classic/cjs/feature.js +1 -1
  45. package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
  46. package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
  47. package/lib/classic/cjs/index.js +1 -1
  48. package/lib/classic/cjs/index10.js +1 -1
  49. package/lib/classic/cjs/index11.js +1 -1
  50. package/lib/classic/cjs/index12.js +1 -1
  51. package/lib/classic/cjs/index13.js +3 -3
  52. package/lib/classic/cjs/index2.js +2 -2
  53. package/lib/classic/cjs/index3.js +1 -1
  54. package/lib/classic/cjs/index4.js +1 -1
  55. package/lib/classic/cjs/index5.js +1 -1
  56. package/lib/classic/cjs/index6.js +1 -1
  57. package/lib/classic/cjs/index7.js +7 -1
  58. package/lib/classic/cjs/index8.js +1 -1
  59. package/lib/classic/cjs/index9.js +1 -1
  60. package/lib/classic/cjs/insight.js +1 -1
  61. package/lib/classic/cjs/notification.js +1 -1
  62. package/lib/classic/cjs/notification2.js +1 -1
  63. package/lib/classic/cjs/pause-ad.js +1 -1
  64. package/lib/classic/cjs/points.js +1 -1
  65. package/lib/classic/cjs/polymarket.js +4 -9
  66. package/lib/classic/cjs/sl-types.js +1 -15
  67. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  68. package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
  69. package/lib/classic/cjs/utils.js +8 -8
  70. package/lib/classic/es/Question.js +216 -220
  71. package/lib/classic/es/advertisement.js +14665 -15122
  72. package/lib/classic/es/analytics.js +9 -9
  73. package/lib/classic/es/auth.js +1 -1
  74. package/lib/classic/es/bet-pack.js +637 -650
  75. package/lib/classic/es/feature.js +29 -33
  76. package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
  77. package/lib/classic/es/index-ByUNFvMk.js +3775 -0
  78. package/lib/classic/es/index.js +13 -16
  79. package/lib/classic/es/index10.js +2587 -82
  80. package/lib/classic/es/index11.js +306 -2344
  81. package/lib/classic/es/index12.js +103 -101
  82. package/lib/classic/es/index13.js +449 -464
  83. package/lib/classic/es/index2.js +1244 -1268
  84. package/lib/classic/es/index3.js +10 -10
  85. package/lib/classic/es/index4.js +4 -283
  86. package/lib/classic/es/index5.js +4 -5
  87. package/lib/classic/es/index6.js +285 -5
  88. package/lib/classic/es/index7.js +179 -5
  89. package/lib/classic/es/index8.js +5 -9
  90. package/lib/classic/es/index9.js +7 -315
  91. package/lib/classic/es/insight.js +39 -41
  92. package/lib/classic/es/notification.js +3 -3
  93. package/lib/classic/es/notification2.js +513 -528
  94. package/lib/classic/es/pause-ad.js +116 -116
  95. package/lib/classic/es/points.js +33 -34
  96. package/lib/classic/es/polymarket.js +1049 -1102
  97. package/lib/classic/es/sl-types.js +115 -217
  98. package/lib/classic/es/useStreamLayerApp.js +1 -1
  99. package/lib/classic/es/useStreamLayerApp2.js +6485 -6405
  100. package/lib/classic/es/utils.js +6 -6
  101. package/lib/classic/source.css +110 -0
  102. package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
  103. package/lib/dist/cjs/index.js +1 -1
  104. package/lib/dist/cjs/masters.js +34 -42
  105. package/lib/dist/es/index-ByUNFvMk.js +3775 -0
  106. package/lib/dist/es/index.js +7 -11
  107. package/lib/dist/es/masters.js +13506 -12760
  108. package/lib/dist/index.d.ts +5 -5
  109. package/lib/dist/source.css +64 -0
  110. package/lib/es/Question.js +99 -101
  111. package/lib/es/advertisement.js +14665 -15122
  112. package/lib/es/analytics.js +29 -29
  113. package/lib/es/auth.js +1 -1
  114. package/lib/es/bet-pack.js +12 -11
  115. package/lib/es/feature.js +29 -33
  116. package/lib/es/hooks-n9ax4LRT.js +97 -0
  117. package/lib/es/index-ByUNFvMk.js +3775 -0
  118. package/lib/es/index.js +13 -16
  119. package/lib/es/index10.js +7 -263
  120. package/lib/es/index11.js +172 -822
  121. package/lib/es/index12.js +2587 -178
  122. package/lib/es/index13.js +248 -302
  123. package/lib/es/index14.js +815 -82
  124. package/lib/es/index15.js +306 -2344
  125. package/lib/es/index16.js +451 -454
  126. package/lib/es/index2.js +737 -757
  127. package/lib/es/index4.js +626 -639
  128. package/lib/es/index5.js +10 -10
  129. package/lib/es/index6.js +5 -285
  130. package/lib/es/index7.js +7 -5
  131. package/lib/es/index8.js +283 -5
  132. package/lib/es/index9.js +179 -8
  133. package/lib/es/insight.js +39 -41
  134. package/lib/es/masters.js +4 -5
  135. package/lib/es/masters2.js +408 -441
  136. package/lib/es/notification.js +469 -484
  137. package/lib/es/pause-ad.js +116 -116
  138. package/lib/es/points.js +42 -43
  139. package/lib/es/polymarket.js +1049 -1102
  140. package/lib/es/sl-types.js +114 -235
  141. package/lib/es/storage.js +22 -22
  142. package/lib/es/theme.js +3 -44
  143. package/lib/es/useStreamLayerApp.js +1 -1
  144. package/lib/es/useStreamLayerApp2.js +6485 -6405
  145. package/lib/es/utils.js +6 -6
  146. package/lib/source.css +120 -0
  147. package/lib/style.css +1 -1
  148. package/package.json +15 -15
  149. package/lib/cjs/hooks-WfHlJH12.js +0 -1
  150. package/lib/cjs/index-eShKGO10.js +0 -5
  151. package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
  152. package/lib/classic/cjs/index-eShKGO10.js +0 -5
  153. package/lib/classic/es/hooks-WfHlJH12.js +0 -98
  154. package/lib/classic/es/index-eShKGO10.js +0 -3757
  155. package/lib/dist/cjs/index-eShKGO10.js +0 -5
  156. package/lib/dist/es/index-eShKGO10.js +0 -3757
  157. package/lib/dist/style.css +0 -1
  158. package/lib/es/hooks-WfHlJH12.js +0 -98
  159. package/lib/es/index-eShKGO10.js +0 -3757
package/lib/es/index2.js CHANGED
@@ -1,160 +1,154 @@
1
- var Ce = Object.defineProperty;
2
- var Ee = (e, t, n) => t in e ? Ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var k = (e, t, n) => Ee(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { useState as S, useEffect as y, useRef as x, PureComponent as Re, useCallback as j, lazy as xe, useMemo as w, Suspense as Le, forwardRef as be, useLayoutEffect as De, useContext as Y } from "react";
5
- import { i as Z, F as Te, z as Oe, Y as X } from "./hooks-WfHlJH12.js";
6
- import { jsx as i, jsxs as f, Fragment as L } from "react/jsx-runtime";
7
- import { I as _e, S as N, f as R, h as ee, Q as V } from "./useStreamLayerApp2.js";
8
- import { h as Me } from "./index8.js";
9
- import { A as T, u as v, s as u, b as Ue, c as C, a as z } from "./sl-types.js";
10
- import { l as Be, a as Fe, m as ze, d as Pe, n as Ve, C as qe, S as je, b as Ke, f as G, p as Qe, c as Ge } from "./index11.js";
11
- import { M as We, a as He, k as Je, z as ke, c as ye, T as Ne, I as Ye, t as Ze, f as Xe, w as te, D as et, p as tt } from "./index16.js";
12
- import K from "lodash.throttle";
13
- import { f as Se, a as nt, b as st, A as ot } from "./analytics.js";
14
- import { m as B } from "./theme.js";
15
- import { F as it, c as M } from "./feature.js";
1
+ import { h as ye } from "./index7.js";
2
+ import { jsx as n, jsxs as v, Fragment as R } from "react/jsx-runtime";
3
+ import { u as f, s as p, a as Ne, c as $, N as M } from "./sl-types.js";
4
+ import { l as Se, S as $e, m as we, d as Ae, n as Ce, C as Ee, y as Re, a as xe, f as V, p as Le, c as De } from "./index14.js";
5
+ import { M as Te, b as Oe, Q as _e, z as me, c as he, T as fe, I as Me, n as Be, f as Ue, w as Q, a as Fe, p as Pe } from "./index16.js";
6
+ import P from "lodash.throttle";
7
+ import { useState as N, useEffect as b, useRef as E, PureComponent as ze, useCallback as z, useMemo as w, Suspense as Ve, lazy as qe, forwardRef as ve, useLayoutEffect as je, useContext as K } from "react";
8
+ import { A as L } from "./index9.js";
9
+ import { f as ge, u as Qe, A as Ke, a as We } from "./analytics.js";
10
+ import { m as O } from "./theme.js";
11
+ import { F as Ge, c as T } from "./feature.js";
16
12
  import "nanostores";
17
- import { p as W, h as at, e as rt } from "./Question.js";
18
- import { y as lt } from "./index10.js";
19
- import { B as D } from "./index6.js";
20
- import dt from "react-infinite-scroller";
21
- import { I as ct, s as pt, e as ut } from "./index12.js";
13
+ import { p as q, _ as He, e as Je } from "./Question.js";
14
+ import { O as Ze } from "./index13.js";
15
+ import { B as x } from "./index8.js";
16
+ import { I as Xe, S as y, f as C, h as W, Q as U } from "./useStreamLayerApp2.js";
17
+ import Ye from "react-infinite-scroller";
18
+ import { I as et, s as tt, e as st } from "./index11.js";
22
19
  import "uuid";
23
20
  import "@nanostores/query";
24
21
  import "./storage.js";
25
- import "./index7.js";
26
- import { createPortal as mt } from "react-dom";
27
- import { e as ht } from "./index3.js";
22
+ import "./index6.js";
23
+ import { createPortal as nt } from "react-dom";
24
+ import { e as ot } from "./index3.js";
25
+ import { i as G, q as at, _ as rt, j as H } from "./hooks-n9ax4LRT.js";
28
26
  import "./notification.js";
29
- const ne = Object.keys(T), se = () => {
27
+ const J = Object.keys(L), Z = () => {
30
28
  const e = window.innerWidth;
31
29
  let t = "sm";
32
- for (let n = ne.length - 1; n > 0; n--) {
33
- const o = ne[n];
34
- if (!(e < T[o]) && e >= T[o]) {
35
- t = o;
30
+ for (let s = J.length - 1; s > 0; s--) {
31
+ const a = J[s];
32
+ if (!(e < L[a]) && e >= L[a]) {
33
+ t = a;
36
34
  break;
37
35
  }
38
36
  }
39
37
  return {
40
38
  name: t,
41
- size: T[t]
39
+ size: L[t]
42
40
  };
43
- }, oe = (e) => {
44
- var t;
45
- return (((t = e.current) == null ? void 0 : t.getBoundingClientRect().y) || 0) < -68;
46
- }, P = () => window.matchMedia("(orientation: landscape)").matches, vt = (e) => {
47
- const [t] = S(() => Se({
48
- screen: se(),
49
- sdkInView: oe(e),
50
- sdkInDesktopView: P()
41
+ }, X = (e) => (e.current?.getBoundingClientRect().y || 0) < -68, B = () => window.matchMedia("(orientation: landscape)").matches, it = (e) => {
42
+ const [t] = N(() => ge({
43
+ screen: Z(),
44
+ sdkInView: X(e),
45
+ sdkInDesktopView: B()
51
46
  }));
52
- return y(() => {
53
- const n = K(() => {
54
- t.setKey("sdkInView", oe(e));
55
- }, 200), o = K(() => {
56
- const s = se();
57
- t.setKey("screen", s), t.setKey("sdkInDesktopView", P());
47
+ return b(() => {
48
+ const s = P(() => {
49
+ t.setKey("sdkInView", X(e));
50
+ }, 200), a = P(() => {
51
+ const o = Z();
52
+ t.setKey("screen", o), t.setKey("sdkInDesktopView", B());
58
53
  }, 200);
59
- return window.addEventListener("scroll", n), window.addEventListener("resize", o), () => {
60
- window.removeEventListener("scroll", n), window.removeEventListener("resize", o);
54
+ return window.addEventListener("scroll", s), window.addEventListener("resize", a), () => {
55
+ window.removeEventListener("scroll", s), window.removeEventListener("resize", a);
61
56
  };
62
57
  }, [t, e]), [t];
63
- }, H = (e, t, n) => {
64
- const o = t >= T.lg && t < T.xl ? 75 : 52;
58
+ }, j = (e, t, s) => {
59
+ const a = t >= L.lg && t < L.xl ? 75 : 52;
65
60
  e.current && window.scrollTo({
66
- top: e.current.offsetTop - o,
67
- ...n
61
+ top: e.current.offsetTop - a,
62
+ ...s
68
63
  });
69
- }, ft = 15, gt = (e, t) => {
70
- const n = x(null), o = x(0), [s] = S(
71
- Se({
64
+ }, lt = 15, dt = (e, t) => {
65
+ const s = E(null), a = E(0), [o] = N(
66
+ ge({
72
67
  scrollPosition: 0,
73
68
  tabsShown: !0,
74
69
  scrollDirection: "forward"
75
70
  })
76
- ), r = v(t);
77
- return y(() => {
78
- const l = P() ? n.current : window;
79
- if (!l)
71
+ ), r = f(t);
72
+ return b(() => {
73
+ const d = B() ? s.current : window;
74
+ if (!d)
80
75
  return () => {
81
76
  };
82
- const d = K((a) => {
83
- var c;
84
- const m = a.target;
85
- if (!m)
77
+ const l = P((i) => {
78
+ const c = i.target;
79
+ if (!c)
86
80
  return;
87
- let p = 0;
88
- P() ? p = m.scrollTop : p = ((c = e.current) == null ? void 0 : c.getBoundingClientRect().y) || 0;
89
- const h = o.current - p;
90
- if (ft > Math.abs(h))
81
+ let u = 0;
82
+ B() ? u = c.scrollTop : u = e.current?.getBoundingClientRect().y || 0;
83
+ const m = a.current - u;
84
+ if (lt > Math.abs(m))
91
85
  return;
92
- const g = o.current < p ? "forward" : "backward";
93
- o.current = p, s.set({
94
- scrollPosition: Math.round(p),
95
- scrollDirection: g,
96
- tabsShown: s.get().tabsShown
86
+ const h = a.current < u ? "forward" : "backward";
87
+ a.current = u, o.set({
88
+ scrollPosition: Math.round(u),
89
+ scrollDirection: h,
90
+ tabsShown: o.get().tabsShown
97
91
  });
98
92
  }, 200);
99
- return l.addEventListener("scroll", d), () => {
100
- l.removeEventListener("scroll", d);
93
+ return d.addEventListener("scroll", l), () => {
94
+ d.removeEventListener("scroll", l);
101
95
  };
102
- }, [s, e, r.screen]), [n, s];
103
- }, q = /* @__PURE__ */ u("div")({
96
+ }, [o, e, r.screen]), [s, o];
97
+ }, F = /* @__PURE__ */ p("div")({
104
98
  name: "LoadingContainer",
105
99
  class: "lclc0ej",
106
100
  propsAsIs: !1
107
- }), It = ({
101
+ }), ct = ({
108
102
  feature: e,
109
103
  sdk: t,
110
- children: n,
111
- className: o,
112
- noWait: s
104
+ children: s,
105
+ className: a,
106
+ noWait: o
113
107
  }) => {
114
- const r = v(e.status), l = v(t.sdkStore.slStreamId);
115
- if (!s) {
116
- if (l != null && l.loading && !l.data)
117
- return /* @__PURE__ */ i(q, {
118
- className: o,
108
+ const r = f(e.status), d = f(t.sdkStore.slStreamId);
109
+ if (!o) {
110
+ if (d?.loading && !d.data)
111
+ return /* @__PURE__ */ n(F, {
112
+ className: a,
119
113
  children: "Event is loading..."
120
114
  });
121
- if (!(l != null && l.data))
122
- return /* @__PURE__ */ i(q, {
123
- className: o,
115
+ if (!d?.data)
116
+ return /* @__PURE__ */ n(F, {
117
+ className: a,
124
118
  children: "Event is forbidden..."
125
119
  });
126
- if (r !== it.Ready)
127
- return /* @__PURE__ */ i(q, {
128
- className: o,
120
+ if (r !== Ge.Ready)
121
+ return /* @__PURE__ */ n(F, {
122
+ className: a,
129
123
  children: "Wait feature..."
130
124
  });
131
125
  }
132
- return n;
133
- }, bt = /* @__PURE__ */ u("div")({
126
+ return s;
127
+ }, pt = /* @__PURE__ */ p("div")({
134
128
  name: "Container",
135
129
  class: "c115qtkr",
136
130
  propsAsIs: !1
137
- }), kt = /* @__PURE__ */ u("div")({
131
+ }), ut = /* @__PURE__ */ p("div")({
138
132
  name: "STabs",
139
133
  class: "sxnslc8",
140
134
  propsAsIs: !1
141
- }), yt = /* @__PURE__ */ u("button")({
135
+ }), mt = /* @__PURE__ */ p("button")({
142
136
  name: "Button",
143
137
  class: "b1umzux0",
144
138
  propsAsIs: !1
145
- }), Nt = /* @__PURE__ */ u("span")({
139
+ }), ht = /* @__PURE__ */ p("span")({
146
140
  name: "Title",
147
141
  class: "tspsaas",
148
142
  propsAsIs: !1
149
143
  });
150
- var _ = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(_ || {});
151
- const ie = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ i(yt, { "data-a": "intr", onClick: n, "data-selected": t, children: /* @__PURE__ */ i(Nt, { "data-a": "intr", children: e }) }), St = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ i(bt, { children: /* @__PURE__ */ f(kt, { "data-position": e === "home" ? "left" : "right", children: [
152
- /* @__PURE__ */ i(ie, { title: "Home", active: e === "home", onClick: () => t(
144
+ var D = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(D || {});
145
+ const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(mt, { "data-a": "intr", onClick: s, "data-selected": t, children: /* @__PURE__ */ n(ht, { "data-a": "intr", children: e }) }), ft = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(pt, { children: /* @__PURE__ */ v(ut, { "data-position": e === "home" ? "left" : "right", children: [
146
+ /* @__PURE__ */ n(Y, { title: "Home", active: e === "home", onClick: () => t(
153
147
  "home"
154
148
  /* HOME */
155
149
  ) }),
156
- /* @__PURE__ */ i(
157
- ie,
150
+ /* @__PURE__ */ n(
151
+ Y,
158
152
  {
159
153
  title: "Friends",
160
154
  active: e === "leaderboard",
@@ -164,85 +158,85 @@ const ie = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ i(yt, { "dat
164
158
  )
165
159
  }
166
160
  )
167
- ] }) }), $t = /* @__PURE__ */ u("div")({
161
+ ] }) }), vt = /* @__PURE__ */ p("div")({
168
162
  name: "Container",
169
163
  class: "c1ux29ft",
170
164
  propsAsIs: !1
171
- }), At = () => D, wt = /* @__PURE__ */ u(At())({
165
+ }), gt = () => x, It = /* @__PURE__ */ p(gt())({
172
166
  name: "FriendsIcon",
173
167
  class: "f10ncfg2",
174
168
  propsAsIs: !0
175
- }), Ct = /* @__PURE__ */ u("div")({
169
+ }), bt = /* @__PURE__ */ p("div")({
176
170
  name: "Content",
177
171
  class: "c1yc07bd",
178
172
  propsAsIs: !1
179
- }), Et = /* @__PURE__ */ u("div")({
173
+ }), kt = /* @__PURE__ */ p("div")({
180
174
  name: "Title",
181
175
  class: "tj6cq7w",
182
176
  propsAsIs: !1
183
- }), Rt = /* @__PURE__ */ u("div")({
177
+ }), yt = /* @__PURE__ */ p("div")({
184
178
  name: "Description",
185
179
  class: "d1ag78xo",
186
180
  propsAsIs: !1
187
- }), xt = () => D, Lt = /* @__PURE__ */ u(xt())({
181
+ }), Nt = () => x, St = /* @__PURE__ */ p(Nt())({
188
182
  name: "ArrowInviteIcon",
189
183
  class: "awohrz6",
190
184
  propsAsIs: !0
191
- }), Dt = ({ title: e, description: t, onClick: n, className: o }) => {
192
- const [s] = nt({
185
+ }), $t = ({ title: e, description: t, onClick: s, className: a }) => {
186
+ const [o] = Qe({
193
187
  type: "invitation",
194
188
  action: "sent",
195
189
  payload: {
196
- from: _e.TITLE_CARD
190
+ from: Xe.TITLE_CARD
197
191
  }
198
192
  });
199
- return /* @__PURE__ */ f($t, { "data-a": "intr", onClick: s(n), className: o, children: [
200
- /* @__PURE__ */ i(wt, { name: "icon-friends" }),
201
- /* @__PURE__ */ f(Ct, { children: [
202
- /* @__PURE__ */ i(Et, { children: e }),
203
- /* @__PURE__ */ i(Rt, { children: t })
193
+ return /* @__PURE__ */ v(vt, { "data-a": "intr", onClick: o(s), className: a, children: [
194
+ /* @__PURE__ */ n(It, { name: "icon-friends" }),
195
+ /* @__PURE__ */ v(bt, { children: [
196
+ /* @__PURE__ */ n(kt, { children: e }),
197
+ /* @__PURE__ */ n(yt, { children: t })
204
198
  ] }),
205
- /* @__PURE__ */ i(Lt, { name: "icon-copy" })
199
+ /* @__PURE__ */ n(St, { name: "icon-copy" })
206
200
  ] });
207
201
  };
208
- function Tt(e) {
209
- var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, o = e.startIndex, s = e.stopIndex;
210
- return !(o > n || s < t);
202
+ function wt(e) {
203
+ var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, a = e.startIndex, o = e.stopIndex;
204
+ return !(a > s || o < t);
211
205
  }
212
- function Ot(e) {
213
- for (var t = e.isItemLoaded, n = e.itemCount, o = e.minimumBatchSize, s = e.startIndex, r = e.stopIndex, l = [], d = null, a = null, c = s; c <= r; c++) {
214
- var m = t(c);
215
- m ? a !== null && (l.push(d, a), d = a = null) : (a = c, d === null && (d = c));
206
+ function At(e) {
207
+ for (var t = e.isItemLoaded, s = e.itemCount, a = e.minimumBatchSize, o = e.startIndex, r = e.stopIndex, d = [], l = null, i = null, c = o; c <= r; c++) {
208
+ var u = t(c);
209
+ u ? i !== null && (d.push(l, i), l = i = null) : (i = c, l === null && (l = c));
216
210
  }
217
- if (a !== null) {
218
- for (var p = Math.min(Math.max(a, d + o - 1), n - 1), h = a + 1; h <= p && !t(h); h++)
219
- a = h;
220
- l.push(d, a);
211
+ if (i !== null) {
212
+ for (var m = Math.min(Math.max(i, l + a - 1), s - 1), h = i + 1; h <= m && !t(h); h++)
213
+ i = h;
214
+ d.push(l, i);
221
215
  }
222
- if (l.length)
223
- for (; l[1] - l[0] + 1 < o && l[0] > 0; ) {
224
- var g = l[0] - 1;
216
+ if (d.length)
217
+ for (; d[1] - d[0] + 1 < a && d[0] > 0; ) {
218
+ var g = d[0] - 1;
225
219
  if (!t(g))
226
- l[0] = g;
220
+ d[0] = g;
227
221
  else
228
222
  break;
229
223
  }
230
- return l;
224
+ return d;
231
225
  }
232
- var _t = function(e, t) {
226
+ var Ct = function(e, t) {
233
227
  if (!(e instanceof t))
234
228
  throw new TypeError("Cannot call a class as a function");
235
- }, Mt = /* @__PURE__ */ function() {
236
- function e(t, n) {
237
- for (var o = 0; o < n.length; o++) {
238
- var s = n[o];
239
- s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(t, s.key, s);
229
+ }, Et = /* @__PURE__ */ (function() {
230
+ function e(t, s) {
231
+ for (var a = 0; a < s.length; a++) {
232
+ var o = s[a];
233
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
240
234
  }
241
235
  }
242
- return function(t, n, o) {
243
- return n && e(t.prototype, n), o && e(t, o), t;
236
+ return function(t, s, a) {
237
+ return s && e(t.prototype, s), a && e(t, a), t;
244
238
  };
245
- }(), Ut = function(e, t) {
239
+ })(), Rt = function(e, t) {
246
240
  if (typeof t != "function" && t !== null)
247
241
  throw new TypeError("Super expression must either be null or a function, not " + typeof t);
248
242
  e.prototype = Object.create(t && t.prototype, {
@@ -253,30 +247,30 @@ var _t = function(e, t) {
253
247
  configurable: !0
254
248
  }
255
249
  }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
256
- }, ae = function(e, t) {
250
+ }, ee = function(e, t) {
257
251
  if (!e)
258
252
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
259
253
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
260
254
  };
261
255
  (function(e) {
262
- Ut(t, e);
256
+ Rt(t, e);
263
257
  function t() {
264
- var n, o, s, r;
265
- _t(this, t);
266
- for (var l = arguments.length, d = Array(l), a = 0; a < l; a++)
267
- d[a] = arguments[a];
268
- return r = (o = (s = ae(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(d))), s), s._lastRenderedStartIndex = -1, s._lastRenderedStopIndex = -1, s._memoizedUnloadedRanges = [], s._onItemsRendered = function(c) {
269
- var m = c.visibleStartIndex, p = c.visibleStopIndex;
270
- s._lastRenderedStartIndex = m, s._lastRenderedStopIndex = p, s._ensureRowsLoaded(m, p);
271
- }, s._setRef = function(c) {
272
- s._listRef = c;
273
- }, o), ae(s, r);
258
+ var s, a, o, r;
259
+ Ct(this, t);
260
+ for (var d = arguments.length, l = Array(d), i = 0; i < d; i++)
261
+ l[i] = arguments[i];
262
+ return r = (a = (o = ee(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(l))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(c) {
263
+ var u = c.visibleStartIndex, m = c.visibleStopIndex;
264
+ o._lastRenderedStartIndex = u, o._lastRenderedStopIndex = m, o._ensureRowsLoaded(u, m);
265
+ }, o._setRef = function(c) {
266
+ o._listRef = c;
267
+ }, a), ee(o, r);
274
268
  }
275
- return Mt(t, [{
269
+ return Et(t, [{
276
270
  key: "resetloadMoreItemsCache",
277
271
  value: function() {
278
- var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
279
- this._memoizedUnloadedRanges = [], o && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
272
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
273
+ this._memoizedUnloadedRanges = [], a && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
280
274
  }
281
275
  }, {
282
276
  key: "componentDidMount",
@@ -285,346 +279,344 @@ var _t = function(e, t) {
285
279
  }, {
286
280
  key: "render",
287
281
  value: function() {
288
- var o = this.props.children;
289
- return o({
282
+ var a = this.props.children;
283
+ return a({
290
284
  onItemsRendered: this._onItemsRendered,
291
285
  ref: this._setRef
292
286
  });
293
287
  }
294
288
  }, {
295
289
  key: "_ensureRowsLoaded",
296
- value: function(o, s) {
297
- var r = this.props, l = r.isItemLoaded, d = r.itemCount, a = r.minimumBatchSize, c = a === void 0 ? 10 : a, m = r.threshold, p = m === void 0 ? 15 : m, h = Ot({
298
- isItemLoaded: l,
299
- itemCount: d,
290
+ value: function(a, o) {
291
+ var r = this.props, d = r.isItemLoaded, l = r.itemCount, i = r.minimumBatchSize, c = i === void 0 ? 10 : i, u = r.threshold, m = u === void 0 ? 15 : u, h = At({
292
+ isItemLoaded: d,
293
+ itemCount: l,
300
294
  minimumBatchSize: c,
301
- startIndex: Math.max(0, o - p),
302
- stopIndex: Math.min(d - 1, s + p)
295
+ startIndex: Math.max(0, a - m),
296
+ stopIndex: Math.min(l - 1, o + m)
303
297
  });
304
- (this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(g, b) {
305
- return h[b] !== g;
298
+ (this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(g, I) {
299
+ return h[I] !== g;
306
300
  })) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
307
301
  }
308
302
  }, {
309
303
  key: "_loadUnloadedRanges",
310
- value: function(o) {
311
- for (var s = this, r = this.props.loadMoreItems || this.props.loadMoreRows, l = function(c) {
312
- var m = o[c], p = o[c + 1], h = r(m, p);
313
- h != null && h.then(function() {
314
- if (Tt({
315
- lastRenderedStartIndex: s._lastRenderedStartIndex,
316
- lastRenderedStopIndex: s._lastRenderedStopIndex,
317
- startIndex: m,
318
- stopIndex: p
304
+ value: function(a) {
305
+ for (var o = this, r = this.props.loadMoreItems || this.props.loadMoreRows, d = function(c) {
306
+ var u = a[c], m = a[c + 1], h = r(u, m);
307
+ h?.then(function() {
308
+ if (wt({
309
+ lastRenderedStartIndex: o._lastRenderedStartIndex,
310
+ lastRenderedStopIndex: o._lastRenderedStopIndex,
311
+ startIndex: u,
312
+ stopIndex: m
319
313
  })) {
320
- if (s._listRef == null)
314
+ if (o._listRef == null)
321
315
  return;
322
- typeof s._listRef.resetAfterIndex == "function" ? s._listRef.resetAfterIndex(m, !0) : (typeof s._listRef._getItemStyleCache == "function" && s._listRef._getItemStyleCache(-1), s._listRef.forceUpdate());
316
+ typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(u, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
323
317
  }
324
318
  });
325
- }, d = 0; d < o.length; d += 2)
326
- l(d);
319
+ }, l = 0; l < a.length; l += 2)
320
+ d(l);
327
321
  }
328
322
  }]), t;
329
- })(Re);
330
- const Bt = /* @__PURE__ */ u("div")({
323
+ })(ze);
324
+ const xt = /* @__PURE__ */ p("div")({
331
325
  name: "Container",
332
326
  class: "culdu4a",
333
327
  propsAsIs: !1
334
- }), Ft = /* @__PURE__ */ u("div")({
328
+ }), Lt = /* @__PURE__ */ p("div")({
335
329
  name: "Position",
336
330
  class: "pwf8e69",
337
331
  propsAsIs: !1
338
- }), zt = /* @__PURE__ */ u("img")({
332
+ }), Dt = /* @__PURE__ */ p("img")({
339
333
  name: "Avatar",
340
334
  class: "atf4yh4",
341
335
  propsAsIs: !1
342
- }), Pt = /* @__PURE__ */ u("div")({
336
+ }), Tt = /* @__PURE__ */ p("div")({
343
337
  name: "AvatarPlaceholder",
344
338
  class: "a1dg29ja",
345
339
  propsAsIs: !1
346
- }), Vt = /* @__PURE__ */ u("div")({
340
+ }), Ot = /* @__PURE__ */ p("div")({
347
341
  name: "Content",
348
342
  class: "c10a68rc",
349
343
  propsAsIs: !1
350
- }), qt = /* @__PURE__ */ u("div")({
344
+ }), _t = /* @__PURE__ */ p("div")({
351
345
  name: "NameContainer",
352
346
  class: "nc4kck5",
353
347
  propsAsIs: !1
354
- }), jt = /* @__PURE__ */ u("span")({
348
+ }), Mt = /* @__PURE__ */ p("span")({
355
349
  name: "Name",
356
350
  class: "njsrqgr",
357
351
  propsAsIs: !1
358
- }), Kt = () => D, Qt = /* @__PURE__ */ u(Kt())({
352
+ }), Bt = () => x, Ut = /* @__PURE__ */ p(Bt())({
359
353
  name: "CurrentUserBadge",
360
354
  class: "c17uc4zr",
361
355
  propsAsIs: !0
362
- }), Gt = ({
356
+ }), Ft = ({
363
357
  friendsRank: e,
364
358
  avatar: t,
365
- name: n,
366
- userId: o,
367
- points: s,
359
+ name: s,
360
+ userId: a,
361
+ points: o,
368
362
  isCurrentUser: r,
369
- style: l
370
- }) => /* @__PURE__ */ f(Bt, { "data-name": o, style: l, children: [
371
- /* @__PURE__ */ i(Ft, { children: e || 0 }),
372
- /* @__PURE__ */ f(Vt, { children: [
373
- t ? /* @__PURE__ */ i(zt, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ i(Pt, { children: ct(n || "") }),
374
- /* @__PURE__ */ f(qt, { children: [
375
- /* @__PURE__ */ i(jt, { children: n || "" }),
376
- r && /* @__PURE__ */ i(Qt, { name: "icon-star" })
363
+ style: d
364
+ }) => /* @__PURE__ */ v(xt, { "data-name": a, style: d, children: [
365
+ /* @__PURE__ */ n(Lt, { children: e || 0 }),
366
+ /* @__PURE__ */ v(Ot, { children: [
367
+ t ? /* @__PURE__ */ n(Dt, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(Tt, { children: et(s || "") }),
368
+ /* @__PURE__ */ v(_t, { children: [
369
+ /* @__PURE__ */ n(Mt, { children: s || "" }),
370
+ r && /* @__PURE__ */ n(Ut, { name: "icon-star" })
377
371
  ] })
378
372
  ] }),
379
- /* @__PURE__ */ i("div", { children: pt(s) })
380
- ] }), Wt = /* @__PURE__ */ u("div")({
373
+ /* @__PURE__ */ n("div", { children: tt(o) })
374
+ ] }), Pt = /* @__PURE__ */ p("div")({
381
375
  name: "Container",
382
376
  class: "c16btbfp",
383
377
  propsAsIs: !1
384
- }), Ht = ({
378
+ }), zt = ({
385
379
  items: e,
386
380
  currentUserId: t,
387
- openItemDetail: n,
388
- fetchMore: o,
389
- scrollNode: s,
381
+ openItemDetail: s,
382
+ fetchMore: a,
383
+ scrollNode: o,
390
384
  hasMore: r
391
385
  }) => {
392
- const l = j((d) => {
393
- const a = d.target.getAttribute("data-name");
394
- a && n(a);
395
- }, [n]);
396
- return /* @__PURE__ */ i(dt, {
397
- loadMore: o,
386
+ const d = z((l) => {
387
+ const i = l.target.getAttribute("data-name");
388
+ i && s(i);
389
+ }, [s]);
390
+ return /* @__PURE__ */ n(Ye, {
391
+ loadMore: a,
398
392
  initialLoad: !1,
399
393
  hasMore: r,
400
394
  useWindow: !1,
401
- getScrollParent: () => s.current,
402
- children: /* @__PURE__ */ i(Wt, {
395
+ getScrollParent: () => o.current,
396
+ children: /* @__PURE__ */ n(Pt, {
403
397
  "data-a": "intr",
404
- onClick: l,
405
- children: e.map((d) => /* @__PURE__ */ i(Gt, {
406
- ...d,
407
- isCurrentUser: !!t && t === d.userId
408
- }, d.userId))
398
+ onClick: d,
399
+ children: e.map((l) => /* @__PURE__ */ n(Ft, {
400
+ ...l,
401
+ isCurrentUser: !!t && t === l.userId
402
+ }, l.userId))
409
403
  })
410
404
  });
411
- }, Jt = /* @__PURE__ */ u("div")({
405
+ }, Vt = /* @__PURE__ */ p("div")({
412
406
  name: "InviteFriendsContainer",
413
407
  class: "i1c9dygq",
414
408
  propsAsIs: !1
415
- }), Yt = ({
409
+ }), qt = ({
416
410
  deepLink: e
417
- }) => /* @__PURE__ */ i(Jt, {
418
- children: /* @__PURE__ */ i(We, {
411
+ }) => /* @__PURE__ */ n(Vt, {
412
+ children: /* @__PURE__ */ n(Te, {
419
413
  inviteLink: e,
420
414
  inviteCardTitle: "It’s More Fun With Friends",
421
415
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
422
416
  })
423
- }), Zt = /* @__PURE__ */ u("div")({
417
+ }), jt = /* @__PURE__ */ p("div")({
424
418
  name: "InviteLinkContainer",
425
419
  class: "i1odbhm4",
426
420
  propsAsIs: !1
427
- }), Xt = ({
421
+ }), Qt = ({
428
422
  gamification: e,
429
423
  scrollNode: t,
430
- scrollStore: n,
431
- leaderboardList: o
424
+ scrollStore: s,
425
+ leaderboardList: a
432
426
  }) => {
433
- const s = x(null), {
427
+ const o = E(null), {
434
428
  data: r,
435
- hasMore: l,
436
- loading: d,
437
- key: a
438
- } = v(o.$store), {
429
+ hasMore: d,
430
+ loading: l,
431
+ key: i
432
+ } = f(a.$store), {
439
433
  data: c
440
- } = v(e.deepLink.$store), [m, p] = He(s);
441
- return !r.length && !d ? /* @__PURE__ */ i(Yt, {
434
+ } = f(e.deepLink.$store), [u, m] = Oe(o);
435
+ return !r.length && !l ? /* @__PURE__ */ n(qt, {
442
436
  deepLink: c
443
- }) : /* @__PURE__ */ f(L, {
444
- children: [/* @__PURE__ */ i(Ht, {
437
+ }) : /* @__PURE__ */ v(R, {
438
+ children: [/* @__PURE__ */ n(zt, {
445
439
  items: r,
446
440
  scrollNode: t,
447
- scrollStore: n,
448
- fetchMore: o.fetchMore,
449
- hasMore: l,
441
+ scrollStore: s,
442
+ fetchMore: a.fetchMore,
443
+ hasMore: d,
450
444
  openItemDetail: e.openUser,
451
445
  currentUserId: e.currentUserId.get()
452
- }, a), c && /* @__PURE__ */ i(Zt, {
453
- ref: s,
454
- children: /* @__PURE__ */ i(Dt, {
446
+ }, i), c && /* @__PURE__ */ n(jt, {
447
+ ref: o,
448
+ children: /* @__PURE__ */ n($t, {
455
449
  "data-a": "intr",
456
- onClick: () => m(c),
450
+ onClick: () => u(c),
457
451
  title: "Invite Friends",
458
452
  description: "Challenge them now!"
459
453
  })
460
- }), p]
454
+ }), m]
461
455
  });
462
- }, en = ({
456
+ }, Kt = ({
463
457
  gamification: e,
464
458
  scrollNode: t,
465
- scrollStore: n
466
- }) => e.leaderboardList ? /* @__PURE__ */ i(Xt, {
459
+ scrollStore: s
460
+ }) => e.leaderboardList ? /* @__PURE__ */ n(Qt, {
467
461
  leaderboardList: e.leaderboardList,
468
462
  gamification: e,
469
463
  scrollNode: t,
470
- scrollStore: n
471
- }) : null, tn = ({ store: e, openQuestion: t }) => {
472
- const { sdk: n } = W(), o = v(e);
473
- return /* @__PURE__ */ i(Je, { openQuestion: t, questions: o.data, controlVideo: n == null ? void 0 : n.controlVideoPlayer });
474
- }, nn = ({ userSummary: e }) => {
475
- var t;
476
- const [n, o] = S(void 0);
477
- return y(() => {
478
- const s = e.$store.subscribe((r) => {
479
- r && o(r);
464
+ scrollStore: s
465
+ }) : null, Wt = ({ store: e, openQuestion: t }) => {
466
+ const { sdk: s } = q(), a = f(e);
467
+ return /* @__PURE__ */ n(_e, { openQuestion: t, questions: a.data, controlVideo: s?.controlVideoPlayer });
468
+ }, Gt = ({ userSummary: e }) => {
469
+ const [t, s] = N(void 0);
470
+ return b(() => {
471
+ const a = e.$store.subscribe((o) => {
472
+ o && s(o);
480
473
  });
481
474
  return () => {
482
- s();
475
+ a();
483
476
  };
484
- }, [e]), /* @__PURE__ */ i(ke, { loading: !(n != null && n.summary), ...n == null ? void 0 : n.summary, successRate: (t = n == null ? void 0 : n.percentage) == null ? void 0 : t.correct });
485
- }, sn = ({ gamification: e, className: t, scrollStore: n, scrollNode: o, appNode: s, style: r, responsiveStore: l }) => {
486
- const { tabsShown: d } = v(n, { keys: ["tabsShown"] }), a = v(e.friendsTabEnabled), [c, m] = S(_.HOME), [, p] = Ue(), { sdkInDesktopView: h, screen: g } = v(l, { keys: ["sdkInDesktopView"] }), b = (I) => {
487
- p(() => {
488
- var U;
489
- m(I), h === !1 && (((U = s.current) == null ? void 0 : U.getBoundingClientRect().y) || 0) < 0 && H(s, g.size, { behavior: "instant" });
477
+ }, [e]), /* @__PURE__ */ n(me, { loading: !t?.summary, ...t?.summary, successRate: t?.percentage?.correct });
478
+ }, Ht = ({ gamification: e, className: t, scrollStore: s, scrollNode: a, appNode: o, style: r, responsiveStore: d }) => {
479
+ const { tabsShown: l } = f(s, { keys: ["tabsShown"] }), i = f(e.friendsTabEnabled), [c, u] = N(D.HOME), [, m] = Ne(), { sdkInDesktopView: h, screen: g } = f(d, { keys: ["sdkInDesktopView"] }), I = (k) => {
480
+ m(() => {
481
+ u(k), h === !1 && (o.current?.getBoundingClientRect().y || 0) < 0 && j(o, g.size, { behavior: "instant" });
490
482
  });
491
483
  };
492
- y(() => n.subscribe((I) => {
493
- if (I.scrollPosition === 0) {
494
- n.setKey("tabsShown", !0);
484
+ b(() => s.subscribe((k) => {
485
+ if (k.scrollPosition === 0) {
486
+ s.setKey("tabsShown", !0);
495
487
  return;
496
488
  }
497
- l.get().sdkInDesktopView ? n.setKey("tabsShown", I.scrollDirection === "backward") : n.setKey("tabsShown", I.scrollDirection === "forward");
498
- }), [n, l]), y(() => {
499
- a || m(_.HOME);
500
- }, [a]);
501
- let $ = "0px";
502
- return h ? $ = d ? "0px" : "calc(0px - var(--header-height))" : $ = d ? "var(--header-height)" : "0px", /* @__PURE__ */ f(Be, { className: C(t, "SL-Tabs", "sl-hide-on-modal"), style: r, children: [
503
- a && /* @__PURE__ */ i(
504
- Fe,
489
+ d.get().sdkInDesktopView ? s.setKey("tabsShown", k.scrollDirection === "backward") : s.setKey("tabsShown", k.scrollDirection === "forward");
490
+ }), [s, d]), b(() => {
491
+ i || u(D.HOME);
492
+ }, [i]);
493
+ let A = "0px";
494
+ return h ? A = l ? "0px" : "calc(0px - var(--header-height))" : A = l ? "var(--header-height)" : "0px", /* @__PURE__ */ v(Se, { className: $(t, "SL-Tabs", "sl-hide-on-modal"), style: r, children: [
495
+ i && /* @__PURE__ */ n(
496
+ $e,
505
497
  {
506
498
  style: {
507
- top: $
499
+ top: A
508
500
  },
509
- children: /* @__PURE__ */ i(St, { activePage: c, toggleActivePage: b })
501
+ children: /* @__PURE__ */ n(ft, { activePage: c, toggleActivePage: I })
510
502
  }
511
503
  ),
512
- c === _.HOME && /* @__PURE__ */ f(L, { children: [
513
- /* @__PURE__ */ i(ze, { children: /* @__PURE__ */ i(Pe, { children: /* @__PURE__ */ i(nn, { userSummary: e.userSummary }) }) }),
514
- /* @__PURE__ */ i(Ve, { style: { flex: 1 }, children: /* @__PURE__ */ i(tn, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
504
+ c === D.HOME && /* @__PURE__ */ v(R, { children: [
505
+ /* @__PURE__ */ n(we, { children: /* @__PURE__ */ n(Ae, { children: /* @__PURE__ */ n(Gt, { userSummary: e.userSummary }) }) }),
506
+ /* @__PURE__ */ n(Ce, { style: { flex: 1 }, children: /* @__PURE__ */ n(Wt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
515
507
  ] }),
516
- c === _.LEADERBOARD && /* @__PURE__ */ i(qe, { children: /* @__PURE__ */ i(en, { scrollStore: n, scrollNode: o, gamification: e }) })
508
+ c === D.LEADERBOARD && /* @__PURE__ */ n(Ee, { children: /* @__PURE__ */ n(Kt, { scrollStore: s, scrollNode: a, gamification: e }) })
517
509
  ] });
518
- }, on = () => G, re = /* @__PURE__ */ u(on())({
510
+ }, Jt = () => V, te = /* @__PURE__ */ p(Jt())({
519
511
  name: "OpenedContainer",
520
512
  class: "ouvguos",
521
513
  propsAsIs: !0
522
- }), le = "t1eu4lbg", an = /* @__PURE__ */ u("div")({
514
+ }), se = "t1eu4lbg", Zt = /* @__PURE__ */ p("div")({
523
515
  name: "UserContainer",
524
516
  class: "uuv2xqo",
525
517
  propsAsIs: !1
526
- }), rn = ({
518
+ }), Xt = ({
527
519
  correct: e,
528
520
  incorrect: t
529
521
  }) => {
530
- const n = e + t;
531
- return n === 0 ? 0 : Math.round(e / n * 100);
532
- }, Ps = ({
522
+ const s = e + t;
523
+ return s === 0 ? 0 : Math.round(e / s * 100);
524
+ }, Tn = ({
533
525
  gamification: e,
534
526
  scrollStore: t,
535
- className: n,
536
- appNode: o,
537
- scrollNode: s,
527
+ className: s,
528
+ appNode: a,
529
+ scrollNode: o,
538
530
  responsiveStore: r
539
- }) => /* @__PURE__ */ i(sn, {
540
- appNode: o,
531
+ }) => /* @__PURE__ */ n(Ht, {
532
+ appNode: a,
541
533
  scrollStore: t,
542
- scrollNode: s,
543
- className: n,
534
+ scrollNode: o,
535
+ className: s,
544
536
  gamification: e,
545
537
  responsiveStore: r
546
- }), ln = ({
538
+ }), Yt = ({
547
539
  gamification: e,
548
540
  muted: t,
549
- sdk: n,
550
- className: o,
551
- appNode: s,
541
+ sdk: s,
542
+ className: a,
543
+ appNode: o,
552
544
  responsiveStore: r
553
545
  }) => {
554
546
  const {
555
- topNavigation: l
556
- } = W(), d = v(e.openedQuestionId), a = v(e.openedQuestion.$store), c = v(e.openedUser || ye(void 0)), {
557
- sdkInDesktopView: m
558
- } = v(r, {
547
+ topNavigation: d
548
+ } = q(), l = f(e.openedQuestionId), i = f(e.openedQuestion.$store), c = f(e.openedUser || he(void 0)), {
549
+ sdkInDesktopView: u
550
+ } = f(r, {
559
551
  keys: ["sdkInDesktopView"]
560
552
  }), {
561
- hiding: p,
553
+ hiding: m,
562
554
  onAnimationEnd: h
563
- } = je();
564
- if (!d && !c)
555
+ } = Re();
556
+ if (!l && !c)
565
557
  return null;
566
- const g = a ? /* @__PURE__ */ i(re, {
567
- className: C(o, !l && le),
568
- hiding: p,
558
+ const g = i ? /* @__PURE__ */ n(te, {
559
+ className: $(a, !d && se),
560
+ hiding: m,
569
561
  onAnimationEnd: h,
570
- children: /* @__PURE__ */ i(at, {
562
+ children: /* @__PURE__ */ n(He, {
571
563
  muted: t,
572
- sdk: n,
564
+ sdk: s,
573
565
  gamification: e
574
566
  })
575
- }) : c ? /* @__PURE__ */ i(re, {
576
- className: C(o, !l && le),
577
- hiding: p,
567
+ }) : c ? /* @__PURE__ */ n(te, {
568
+ className: $(a, !d && se),
569
+ hiding: m,
578
570
  onAnimationEnd: h,
579
- children: /* @__PURE__ */ f(an, {
580
- children: [/* @__PURE__ */ i(lt, {
571
+ children: /* @__PURE__ */ v(Zt, {
572
+ children: [/* @__PURE__ */ n(Ze, {
581
573
  label: "Friend's Rank",
582
574
  close: e.closeUser
583
- }), /* @__PURE__ */ i(Ke, {
584
- children: /* @__PURE__ */ i(ke, {
575
+ }), /* @__PURE__ */ n(xe, {
576
+ children: /* @__PURE__ */ n(me, {
585
577
  ...c,
586
- successRate: rn(c)
578
+ successRate: Xt(c)
587
579
  })
588
580
  })]
589
581
  })
590
582
  }) : null;
591
- return /* @__PURE__ */ i(Ne, {
592
- container: s,
593
- useContainer: !m,
583
+ return /* @__PURE__ */ n(fe, {
584
+ container: o,
585
+ useContainer: !u,
594
586
  children: g
595
587
  });
596
- }, dn = xe(() => import("./gamification-feature.js")), cn = ({ sdk: e, feature: t, className: n, scrollStore: o, appNode: s, scrollNode: r, responsiveStore: l }) => {
597
- const d = w(() => t && t.featureConfig.get().type === N.GAMES ? /* @__PURE__ */ i(It, { className: n, sdk: e, feature: t, children: /* @__PURE__ */ i(
598
- dn,
588
+ }, es = qe(() => import("./gamification-feature.js")), ts = ({ sdk: e, feature: t, className: s, scrollStore: a, appNode: o, scrollNode: r, responsiveStore: d }) => {
589
+ const l = w(() => t && t.featureConfig.get().type === y.GAMES ? /* @__PURE__ */ n(ct, { className: s, sdk: e, feature: t, children: /* @__PURE__ */ n(
590
+ es,
599
591
  {
600
- appNode: s,
601
- scrollStore: o,
592
+ appNode: o,
593
+ scrollStore: a,
602
594
  scrollNode: r,
603
- className: n,
604
- responsiveStore: l,
595
+ className: s,
596
+ responsiveStore: d,
605
597
  gamification: t
606
598
  }
607
- ) }) : null, [e, t, n, l, o, r, s]);
608
- return /* @__PURE__ */ i(
609
- Le,
599
+ ) }) : null, [e, t, s, d, a, r, o]);
600
+ return /* @__PURE__ */ n(
601
+ Ve,
610
602
  {
611
- fallback: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
612
- children: d
603
+ fallback: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
604
+ children: l
613
605
  }
614
606
  );
615
- }, pn = ({ feature: e, sdk: t, muted: n, className: o, appNode: s, responsiveStore: r }) => e && e.featureConfig.get().type === N.GAMES ? /* @__PURE__ */ i(
616
- ln,
607
+ }, ss = ({ feature: e, sdk: t, muted: s, className: a, appNode: o, responsiveStore: r }) => e && e.featureConfig.get().type === y.GAMES ? /* @__PURE__ */ n(
608
+ Yt,
617
609
  {
618
- className: o,
619
- appNode: s,
620
- muted: n,
610
+ className: a,
611
+ appNode: o,
612
+ muted: s,
621
613
  sdk: t,
622
614
  responsiveStore: r,
623
615
  gamification: e
624
616
  }
625
617
  ) : null;
626
618
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
627
- function un(e) {
619
+ function ns(e) {
628
620
  return e instanceof DOMException && // everything except Firefox
629
621
  (e.code === 22 || // Firefox
630
622
  e.code === 1014 || // test name field too, because code might not be present
@@ -632,303 +624,300 @@ function un(e) {
632
624
  e.name === "QuotaExceededError" || // Firefox
633
625
  e.name === "NS_ERROR_DOM_QUOTA_REACHED");
634
626
  }
635
- class mn {
636
- constructor(t = "main", n = window.localStorage) {
637
- k(this, "delimiter", ":");
638
- k(this, "prefix");
639
- k(this, "storage");
640
- k(this, "clear", () => {
641
- for (const t in window.localStorage)
642
- t.startsWith(this.prefix) && this.storage.removeItem(t);
643
- });
644
- k(this, "generateKey", (t) => `${this.prefix}${this.delimiter}${t.join(this.delimiter)}`);
645
- k(this, "write", (...t) => {
646
- const n = t.pop() || "", o = this.generateKey(t);
647
- try {
648
- this.storage.setItem(o, n);
649
- } catch (s) {
650
- un(s) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(o, n));
651
- }
652
- });
653
- k(this, "read", (...t) => {
654
- const n = this.storage.getItem(this.generateKey(t));
655
- return n === null ? void 0 : n;
656
- });
657
- k(this, "remove", (...t) => {
658
- this.storage.removeItem(this.generateKey(t));
659
- });
660
- this.prefix = `sl-sdk${this.delimiter}${t}`, this.storage = n;
627
+ class os {
628
+ delimiter = ":";
629
+ prefix;
630
+ storage;
631
+ constructor(t = "main", s = window.localStorage) {
632
+ this.prefix = `sl-sdk${this.delimiter}${t}`, this.storage = s;
661
633
  }
634
+ clear = () => {
635
+ for (const t in window.localStorage)
636
+ t.startsWith(this.prefix) && this.storage.removeItem(t);
637
+ };
638
+ generateKey = (t) => `${this.prefix}${this.delimiter}${t.join(this.delimiter)}`;
639
+ write = (...t) => {
640
+ const s = t.pop() || "", a = this.generateKey(t);
641
+ try {
642
+ this.storage.setItem(a, s);
643
+ } catch (o) {
644
+ ns(o) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(a, s));
645
+ }
646
+ };
647
+ read = (...t) => {
648
+ const s = this.storage.getItem(this.generateKey(t));
649
+ return s === null ? void 0 : s;
650
+ };
651
+ remove = (...t) => {
652
+ this.storage.removeItem(this.generateKey(t));
653
+ };
662
654
  }
663
- var de;
655
+ var ne;
664
656
  (function(e) {
665
657
  e.Init = "init", e.Ready = "ready", e.Connecting = "connecting", e.Connected = "connected", e.Disconnected = "disconnected", e.Failed = "failed", e.Reconnect = "reconnect", e.Reconnecting = "reconnecting";
666
- })(de || (de = {}));
667
- M("grpc:stream");
668
- R.Unknown, R.Internal, R.DeadlineExceeded, R.ResourceExhausted, R.FailedPrecondition, R.Unavailable, R.DataLoss;
669
- M("grpc:retry");
670
- ee(10, { description: "Number of attempts to retry" }), ee(3e4, { description: "Max delay between retries in milliseconds" });
671
- var A;
658
+ })(ne || (ne = {}));
659
+ T("grpc:stream");
660
+ C.Unknown, C.Internal, C.DeadlineExceeded, C.ResourceExhausted, C.FailedPrecondition, C.Unavailable, C.DataLoss;
661
+ T("grpc:retry");
662
+ W(10, { description: "Number of attempts to retry" }), W(3e4, { description: "Max delay between retries in milliseconds" });
663
+ var S;
672
664
  (function(e) {
673
665
  e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
674
- })(A || (A = {}));
675
- class hn extends mn {
666
+ })(S || (S = {}));
667
+ class as extends os {
676
668
  constructor() {
677
669
  super("user");
678
- // Schema
679
- k(this, "setSchema", (n) => {
680
- this.write(A.SCHEMA, n);
681
- });
682
- k(this, "getSchema", () => this.read(A.SCHEMA));
683
- // Token
684
- k(this, "setToken", (n) => {
685
- this.write(A.TOKEN, n);
686
- });
687
- k(this, "getToken", () => this.read(A.TOKEN));
688
- // External Token
689
- k(this, "setExternalToken", (n) => {
690
- this.write(A.EXTERNAL_TOKEN, n);
691
- });
692
- k(this, "getExternalToken", () => this.read(A.EXTERNAL_TOKEN));
693
- k(this, "removeToken", () => {
694
- this.remove(A.TOKEN);
695
- });
696
670
  }
671
+ // Schema
672
+ setSchema = (t) => {
673
+ this.write(S.SCHEMA, t);
674
+ };
675
+ getSchema = () => this.read(S.SCHEMA);
676
+ // Token
677
+ setToken = (t) => {
678
+ this.write(S.TOKEN, t);
679
+ };
680
+ getToken = () => this.read(S.TOKEN);
681
+ // External Token
682
+ setExternalToken = (t) => {
683
+ this.write(S.EXTERNAL_TOKEN, t);
684
+ };
685
+ getExternalToken = () => this.read(S.EXTERNAL_TOKEN);
686
+ removeToken = () => {
687
+ this.remove(S.TOKEN);
688
+ };
697
689
  }
698
- var ce;
690
+ var oe;
699
691
  (function(e) {
700
692
  e.DISABLED = "disabled", e.INITIALIZATION = "initialization", e.READY = "ready", e.FAILED = "failed", e.SUSPENDED = "suspended";
701
- })(ce || (ce = {}));
702
- var pe;
693
+ })(oe || (oe = {}));
694
+ var ae;
703
695
  (function(e) {
704
696
  e.SHOWED = "showed", e.EVENT = "ev";
705
- })(pe || (pe = {}));
706
- var ue;
697
+ })(ae || (ae = {}));
698
+ var re;
707
699
  (function(e) {
708
700
  e.ONBOARDING = "onboarding", e.ONBOARDING_IO = "onboarding_io", e.QUESTION_RECEIVED = "q-received", e.QUESTION_OPENED = "q-opened";
709
- })(ue || (ue = {}));
710
- var me;
701
+ })(re || (re = {}));
702
+ var ie;
711
703
  (function(e) {
712
704
  e.ALLOWED = "allowed", e.DISALLOWED = "disallowed";
713
- })(me || (me = {}));
714
- var he;
705
+ })(ie || (ie = {}));
706
+ var le;
715
707
  (function(e) {
716
708
  e.UNKNOWN = "unknown", e.ALREADY_VOTED = "already_voted";
717
- })(he || (he = {}));
718
- M("deep_link");
719
- M("bypass");
720
- new hn();
721
- M("video_player");
722
- var ve;
709
+ })(le || (le = {}));
710
+ T("deep_link");
711
+ T("bypass");
712
+ new as();
713
+ T("video_player");
714
+ var de;
723
715
  (function(e) {
724
716
  e.Unset = "unset", e.Required = "required", e.Optional = "optional", e.Completed = "completed", e.Disabled = "disabled", e.Unavailable = "unavailable";
725
- })(ve || (ve = {}));
726
- V.POLL, V.PREDICTION, V.TRIVIA;
727
- const vn = {
728
- [N.GAMES]: !0
729
- }, fn = /* @__PURE__ */ u("div")({
717
+ })(de || (de = {}));
718
+ U.POLL, U.PREDICTION, U.TRIVIA;
719
+ const rs = {
720
+ [y.GAMES]: !0
721
+ }, is = /* @__PURE__ */ p("div")({
730
722
  name: "Buttons",
731
723
  class: "b5o8qbl",
732
724
  propsAsIs: !1
733
- }), gn = ({
725
+ }), ls = ({
734
726
  children: e,
735
727
  className: t
736
- }) => /* @__PURE__ */ i(fn, {
728
+ }) => /* @__PURE__ */ n(is, {
737
729
  className: t,
738
730
  children: e
739
- }), $e = /* @__PURE__ */ u("div")({
731
+ }), Ie = /* @__PURE__ */ p("div")({
740
732
  name: "Navigation",
741
733
  class: "n6tbwuy",
742
734
  propsAsIs: !1
743
- }), In = () => gn, fe = /* @__PURE__ */ u(In())({
735
+ }), ds = () => ls, ce = /* @__PURE__ */ p(ds())({
744
736
  name: "NavigationItems",
745
737
  class: "n1up4z7v",
746
738
  propsAsIs: !0
747
- }), bn = /* @__PURE__ */ u("button")({
739
+ }), cs = /* @__PURE__ */ p("button")({
748
740
  name: "SButton",
749
741
  class: "sxxa0c",
750
742
  propsAsIs: !1
751
- }), kn = /* @__PURE__ */ u("span")({
743
+ }), ps = /* @__PURE__ */ p("span")({
752
744
  name: "ButtonIcon",
753
745
  class: "b193dcyu",
754
746
  propsAsIs: !1
755
- }), yn = /* @__PURE__ */ u("span")({
747
+ }), us = /* @__PURE__ */ p("span")({
756
748
  name: "ButtonLabel",
757
749
  class: "b40tuix",
758
750
  propsAsIs: !1
759
- }), Nn = "s14xk0af", Sn = "ha3mg7c", $n = "h103yr45", F = ({ disabled: e, active: t, onClick: n, label: o, icon: s, id: r }) => /* @__PURE__ */ i(
760
- bn,
751
+ }), ms = "s14xk0af", hs = "ha3mg7c", fs = "h103yr45", _ = ({ disabled: e, active: t, onClick: s, label: a, icon: o, id: r }) => /* @__PURE__ */ n(
752
+ cs,
761
753
  {
762
- onClick: n,
754
+ onClick: s,
763
755
  "data-a": "intr",
764
756
  disabled: e,
765
- className: C(
766
- t && Nn,
767
- !t && (r === "channels" || r === "featuredGroups") && Sn,
768
- !t && r === "leaderboard" && $n
757
+ className: $(
758
+ t && ms,
759
+ !t && (r === "channels" || r === "featuredGroups") && hs,
760
+ !t && r === "leaderboard" && fs
769
761
  ),
770
- children: /* @__PURE__ */ f(L, { children: [
771
- s && /* @__PURE__ */ i(kn, { children: s }),
772
- /* @__PURE__ */ i(yn, { children: o })
762
+ children: /* @__PURE__ */ v(R, { children: [
763
+ o && /* @__PURE__ */ n(ps, { children: o }),
764
+ /* @__PURE__ */ n(us, { children: a })
773
765
  ] })
774
766
  }
775
- ), An = () => D, wn = /* @__PURE__ */ u(An())({
767
+ ), vs = () => x, gs = /* @__PURE__ */ p(vs())({
776
768
  name: "ButtonIcon",
777
769
  class: "b11wpe79",
778
770
  propsAsIs: !0
779
- }), Cn = /* @__PURE__ */ u("div")({
771
+ }), Is = /* @__PURE__ */ p("div")({
780
772
  name: "Container",
781
773
  class: "calnblm",
782
774
  propsAsIs: !1
783
- }), En = /* @__PURE__ */ u("div")({
775
+ }), bs = /* @__PURE__ */ p("div")({
784
776
  name: "Title",
785
777
  class: "t1438p52",
786
778
  propsAsIs: !1
787
- }), Rn = /* @__PURE__ */ u("div")({
779
+ }), ks = /* @__PURE__ */ p("div")({
788
780
  name: "CloseIconWrap",
789
781
  class: "c17srj38",
790
782
  propsAsIs: !1
791
- }), xn = () => D, Ln = /* @__PURE__ */ u(xn())({
783
+ }), ys = () => x, Ns = /* @__PURE__ */ p(ys())({
792
784
  name: "CloseIcon",
793
785
  class: "clqia8k",
794
786
  propsAsIs: !0
795
- }), Dn = () => D, Tn = /* @__PURE__ */ u(Dn())({
787
+ }), Ss = () => x, $s = /* @__PURE__ */ p(Ss())({
796
788
  name: "DashboardIcon",
797
789
  class: "df5w958",
798
790
  propsAsIs: !0
799
- }), On = "h12x6aiv", _n = be(({
791
+ }), ws = "h12x6aiv", As = ve(({
800
792
  sdk: e,
801
793
  className: t
802
- }, n) => {
803
- const o = () => {
794
+ }, s) => {
795
+ const a = () => {
804
796
  e.closeFeature();
805
797
  };
806
- return /* @__PURE__ */ f($e, {
807
- className: C(t, On),
808
- children: [/* @__PURE__ */ f(Cn, {
809
- children: [/* @__PURE__ */ f(En, {
810
- children: [/* @__PURE__ */ i(Tn, {
798
+ return /* @__PURE__ */ v(Ie, {
799
+ className: $(t, ws),
800
+ children: [/* @__PURE__ */ v(Is, {
801
+ children: [/* @__PURE__ */ v(bs, {
802
+ children: [/* @__PURE__ */ n($s, {
811
803
  name: "dashboard"
812
804
  }), "Dashboard"]
813
- }), /* @__PURE__ */ i(Rn, {
805
+ }), /* @__PURE__ */ n(ks, {
814
806
  "data-a": "intr",
815
- onClick: o,
816
- children: /* @__PURE__ */ i(Ln, {
807
+ onClick: a,
808
+ children: /* @__PURE__ */ n(Ns, {
817
809
  name: "icon-cross"
818
810
  })
819
811
  })]
820
- }), /* @__PURE__ */ i("div", {
821
- ref: n
812
+ }), /* @__PURE__ */ n("div", {
813
+ ref: s
822
814
  })]
823
815
  });
824
- }), Mn = be(({
816
+ }), Cs = ve(({
825
817
  sdk: e,
826
818
  className: t
827
- }, n) => {
828
- const o = v(e.sdkStore.organizationSettings), s = v(e.sdkStore.streamSettings), r = v(e.getActiveFeature()), l = w(() => {
829
- const a = (s == null ? void 0 : s.data) || (o == null ? void 0 : o.data);
830
- return a != null && a.overlays ? a.overlays : [];
831
- }, [o, s]), d = w(() => [...l.filter(({
832
- enableSdkButton: a,
819
+ }, s) => {
820
+ const a = f(e.sdkStore.organizationSettings), o = f(e.sdkStore.streamSettings), r = f(e.getActiveFeature()), d = w(() => {
821
+ const i = o?.data || a?.data;
822
+ return i?.overlays ? i.overlays : [];
823
+ }, [a, o]), l = w(() => [...d.filter(({
824
+ enableSdkButton: i,
833
825
  type: c
834
- }) => c === N.GAMES || a).map((a) => ({
835
- id: a.type,
836
- onClick: () => e.openFeature(a.type),
837
- disabled: !(a.type in vn),
838
- label: a.name,
839
- icon: /* @__PURE__ */ i("img", {
840
- src: a.icon,
826
+ }) => c === y.GAMES || i).map((i) => ({
827
+ id: i.type,
828
+ onClick: () => e.openFeature(i.type),
829
+ disabled: !(i.type in rs),
830
+ label: i.name,
831
+ icon: /* @__PURE__ */ n("img", {
832
+ src: i.icon,
841
833
  alt: ""
842
834
  }),
843
835
  /** multiplied by 10 to add the ability to insert custom buttons between our buttons */
844
- position: a.position * 10
845
- }))].sort((a, c) => a.position - c.position), [l, e]);
846
- return /* @__PURE__ */ f($e, {
836
+ position: i.position * 10
837
+ }))].sort((i, c) => i.position - c.position), [d, e]);
838
+ return /* @__PURE__ */ v(Ie, {
847
839
  className: t,
848
- children: [d.length !== 0 && /* @__PURE__ */ i(fe, {
849
- children: [/* @__PURE__ */ i(F, {
840
+ children: [l.length !== 0 && /* @__PURE__ */ n(ce, {
841
+ children: [/* @__PURE__ */ n(_, {
850
842
  id: "Channels",
851
843
  onClick: () => e.closeFeature(),
852
844
  label: "Channels",
853
845
  active: r === 0
854
- }, "Channels"), ...d.map((a) => a.id === N.GAMES ? /* @__PURE__ */ i(F, {
855
- ...a,
856
- active: a.id === r,
846
+ }, "Channels"), ...l.map((i) => i.id === y.GAMES ? /* @__PURE__ */ n(_, {
847
+ ...i,
848
+ active: i.id === r,
857
849
  label: "StreamLayer +",
858
850
  id: "featuredGroups",
859
- icon: /* @__PURE__ */ i(wn, {
851
+ icon: /* @__PURE__ */ n(gs, {
860
852
  name: "icon-btn-feature-groups",
861
- "data-selected": a.id === r
853
+ "data-selected": i.id === r
862
854
  })
863
- }, a.id) : /* @__PURE__ */ i(F, {
864
- ...a,
855
+ }, i.id) : /* @__PURE__ */ n(_, {
856
+ ...i,
865
857
  icon: void 0,
866
- active: a.id === r
867
- }, a.id))]
868
- }), !d.length && /* @__PURE__ */ i(fe, {
869
- children: [/* @__PURE__ */ i(F, {
858
+ active: i.id === r
859
+ }, i.id))]
860
+ }), !l.length && /* @__PURE__ */ n(ce, {
861
+ children: [/* @__PURE__ */ n(_, {
870
862
  id: "empty",
871
863
  label: "No Features...",
872
864
  active: !1,
873
865
  disabled: !0
874
866
  }, "empty")]
875
- }), /* @__PURE__ */ i("div", {
876
- ref: n
867
+ }), /* @__PURE__ */ n("div", {
868
+ ref: s
877
869
  })]
878
870
  });
879
- }), Un = /* @__PURE__ */ u("div")({
871
+ }), Es = /* @__PURE__ */ p("div")({
880
872
  name: "Container",
881
873
  class: "c1qjj4d4",
882
874
  propsAsIs: !1
883
- }), Bn = /* @__PURE__ */ u("div")({
875
+ }), Rs = /* @__PURE__ */ p("div")({
884
876
  name: "CloseIconWrap",
885
877
  class: "c1lg6b8a",
886
878
  propsAsIs: !1
887
- }), Fn = () => D, zn = /* @__PURE__ */ u(Fn())({
879
+ }), xs = () => x, Ls = /* @__PURE__ */ p(xs())({
888
880
  name: "CloseIcon",
889
881
  class: "c159el66",
890
882
  propsAsIs: !0
891
- }), Pn = /* @__PURE__ */ u("div")({
883
+ }), Ds = /* @__PURE__ */ p("div")({
892
884
  name: "Title",
893
885
  class: "t16xmufv",
894
886
  propsAsIs: !1
895
- }), Vn = /* @__PURE__ */ u("img")({
887
+ }), Ts = /* @__PURE__ */ p("img")({
896
888
  name: "SponsorLogo",
897
889
  class: "s83lc21",
898
890
  propsAsIs: !1
899
- }), qn = /* @__PURE__ */ u("div")({
891
+ }), Os = /* @__PURE__ */ p("div")({
900
892
  name: "PresentsTitle",
901
893
  class: "p1p7igia",
902
894
  propsAsIs: !1
903
- }), jn = /* @__PURE__ */ u("div")({
895
+ }), _s = /* @__PURE__ */ p("div")({
904
896
  name: "Subtitle",
905
897
  class: "s1eftsbu",
906
898
  propsAsIs: !1
907
- }), Kn = /* @__PURE__ */ u("div")({
899
+ }), Ms = /* @__PURE__ */ p("div")({
908
900
  name: "Description",
909
901
  class: "d8uezec",
910
902
  propsAsIs: !1
911
- }), Qn = /* @__PURE__ */ u("button")({
903
+ }), Bs = /* @__PURE__ */ p("button")({
912
904
  name: "ActionButton",
913
905
  class: "a1h1bk90",
914
906
  propsAsIs: !1
915
- }), ge = ({ close: e, action: t, onboarding: n }) => {
916
- var o, s, r, l, d, a, c, m;
917
- return /* @__PURE__ */ f(Un, { children: [
918
- /* @__PURE__ */ i(Bn, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ i(zn, { name: "icon-cross" }) }),
919
- ((s = (o = n == null ? void 0 : n.titleCard) == null ? void 0 : o.media) == null ? void 0 : s.sponsorLogo) && /* @__PURE__ */ f(Pn, { children: [
920
- /* @__PURE__ */ i(Vn, { alt: "sponsor-logo", src: (l = (r = n == null ? void 0 : n.titleCard) == null ? void 0 : r.media) == null ? void 0 : l.sponsorLogo }),
921
- /* @__PURE__ */ i(qn, { children: "PRESENTS" })
922
- ] }),
923
- ((d = n == null ? void 0 : n.titleCard) == null ? void 0 : d.title) && /* @__PURE__ */ i(jn, { children: (a = n == null ? void 0 : n.titleCard) == null ? void 0 : a.title }),
924
- ((c = n == null ? void 0 : n.titleCard) == null ? void 0 : c.subtitle) && /* @__PURE__ */ i(Kn, { children: (m = n == null ? void 0 : n.titleCard) == null ? void 0 : m.subtitle }),
925
- /* @__PURE__ */ i(Qn, { "data-a": "intr", onClick: t, children: "Play Now" })
926
- ] });
927
- }, Q = [{
907
+ }), pe = ({ close: e, action: t, onboarding: s }) => /* @__PURE__ */ v(Es, { children: [
908
+ /* @__PURE__ */ n(Rs, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ n(Ls, { name: "icon-cross" }) }),
909
+ s?.titleCard?.media?.sponsorLogo && /* @__PURE__ */ v(Ds, { children: [
910
+ /* @__PURE__ */ n(Ts, { alt: "sponsor-logo", src: s?.titleCard?.media?.sponsorLogo }),
911
+ /* @__PURE__ */ n(Os, { children: "PRESENTS" })
912
+ ] }),
913
+ s?.titleCard?.title && /* @__PURE__ */ n(_s, { children: s?.titleCard?.title }),
914
+ s?.titleCard?.subtitle && /* @__PURE__ */ n(Ms, { children: s?.titleCard?.subtitle }),
915
+ /* @__PURE__ */ n(Bs, { "data-a": "intr", onClick: t, children: "Play Now" })
916
+ ] }), be = [{
928
917
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
929
918
  tagline: "",
930
- headline: /* @__PURE__ */ f(L, {
931
- children: ["Welcome to ", /* @__PURE__ */ i("br", {}), " Live Challenge"]
919
+ headline: /* @__PURE__ */ v(R, {
920
+ children: ["Welcome to ", /* @__PURE__ */ n("br", {}), " Live Challenge"]
932
921
  })
933
922
  }, {
934
923
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
@@ -936,51 +925,49 @@ const vn = {
936
925
  }, {
937
926
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
938
927
  headline: "Win points and play against friends."
939
- }], Gn = /* @__PURE__ */ u("div")({
928
+ }], Us = /* @__PURE__ */ p("div")({
940
929
  name: "OnboardingContainer",
941
930
  class: "o1xni1kr",
942
931
  propsAsIs: !1
943
- }), Wn = () => G, Hn = /* @__PURE__ */ u(Wn())({
932
+ }), Fs = () => V, Ps = /* @__PURE__ */ p(Fs())({
944
933
  name: "OnboardingNotificationContainer",
945
934
  class: "o1vnouv7",
946
935
  propsAsIs: !0
947
- }), Ie = /* @__PURE__ */ u("div")({
936
+ }), ue = /* @__PURE__ */ p("div")({
948
937
  name: "InnerContainer",
949
938
  class: "i59uefw",
950
939
  propsAsIs: !1
951
- }), Jn = /* @__PURE__ */ u("div")({
940
+ }), zs = /* @__PURE__ */ p("div")({
952
941
  name: "OnboardingOverlap",
953
942
  class: "ovnr8ov",
954
943
  propsAsIs: !1
955
- }), Yn = ({
944
+ }), Vs = ({
956
945
  deepLink: e,
957
946
  onboardingOpts: t,
958
- notification: n,
959
- gamification: o,
960
- loading: s,
947
+ notification: s,
948
+ gamification: a,
949
+ loading: o,
961
950
  sdk: r,
962
- throttled: l
951
+ throttled: d
963
952
  }) => {
964
- var d, a, c, m, p, h, g;
965
- const b = v(o.friends ? o.friends.getStore() : ye({
953
+ const l = f(a.friends ? a.friends.getStore() : he({
966
954
  data: []
967
- })), [$, I] = S(void 0), U = w(() => {
968
- var E, O;
969
- const J = r.getInviter();
970
- return J ? (O = (E = b.data) == null ? void 0 : E.find(({
971
- slId: we
972
- }) => we === J)) == null ? void 0 : O.name : "";
973
- }, [b.data, r]);
974
- return y(() => {
975
- const E = e.$store.subscribe((O) => {
976
- O && I(O.data);
955
+ })), [i, c] = N(void 0), u = w(() => {
956
+ const m = r.getInviter();
957
+ return m ? l.data?.find(({
958
+ slId: h
959
+ }) => h === m)?.name : "";
960
+ }, [l.data, r]);
961
+ return b(() => {
962
+ const m = e.$store.subscribe((h) => {
963
+ h && c(h.data);
977
964
  });
978
965
  return () => {
979
- E();
966
+ m();
980
967
  };
981
- }, [e.$store]), /* @__PURE__ */ f(Gn, {
982
- children: [/* @__PURE__ */ i(Ze, {
983
- loading: s,
968
+ }, [e.$store]), /* @__PURE__ */ v(Us, {
969
+ children: [/* @__PURE__ */ n(Be, {
970
+ loading: o,
984
971
  rules: [{
985
972
  label: "Answer as many questions as you like.",
986
973
  icon: "icon-btn-feature-groups"
@@ -991,392 +978,385 @@ const vn = {
991
978
  label: "Top the leader board and best your friends.",
992
979
  icon: "icon-trophy"
993
980
  }],
994
- rulesBtnLabel: (d = t.rules) == null ? void 0 : d.buttonLabel,
995
- rulesTitle: (a = t.rules) == null ? void 0 : a.heading,
981
+ rulesBtnLabel: t.rules?.buttonLabel,
982
+ rulesTitle: t.rules?.heading,
996
983
  termsTitle: "Terms and Conditions",
997
- termsText: (c = t.rules) == null ? void 0 : c.terms,
998
- steps: Q,
999
- primaryColor: (m = t.inviteCard) == null ? void 0 : m.iconColor,
1000
- inviteLink: $,
1001
- inviteCardTitle: (p = t.inviteCard) == null ? void 0 : p.heading,
1002
- inviteCardSubtext: (h = t.inviteCard) == null ? void 0 : h.subtext,
1003
- inviteCardBtnLabel: (g = t.inviteCard) == null ? void 0 : g.buttonLabel,
984
+ termsText: t.rules?.terms,
985
+ steps: be,
986
+ primaryColor: t.inviteCard?.iconColor,
987
+ inviteLink: i,
988
+ inviteCardTitle: t.inviteCard?.heading,
989
+ inviteCardSubtext: t.inviteCard?.subtext,
990
+ inviteCardBtnLabel: t.inviteCard?.buttonLabel,
1004
991
  onClose: () => {
1005
- var E;
1006
- (E = n.close) == null || E.call(n);
992
+ s.close?.();
1007
993
  },
1008
- gamification: o,
994
+ gamification: a,
1009
995
  sdk: r,
1010
- inviterName: U
1011
- }), l && /* @__PURE__ */ i(Jn, {})]
996
+ inviterName: u
997
+ }), d && /* @__PURE__ */ n(zs, {})]
1012
998
  });
1013
- }, Zn = ({
999
+ }, qs = ({
1014
1000
  sdk: e,
1015
1001
  notification: t,
1016
- saveHeight: n,
1017
- style: o,
1018
- appNode: s,
1002
+ saveHeight: s,
1003
+ style: a,
1004
+ appNode: o,
1019
1005
  sdkInDesktopView: r,
1020
- responsiveStore: l
1006
+ responsiveStore: d
1021
1007
  }) => {
1022
- const d = x(null), a = t.data.onboarding, [c, m] = S(a == null ? void 0 : a.instantOpen), p = e.getFeature(N.GAMES), h = w(() => Q == null ? void 0 : Q.map(({
1023
- graphicSrc: I
1024
- }) => I), []), {
1008
+ const l = E(null), i = t.data.onboarding, [c, u] = N(i?.instantOpen), m = e.getFeature(y.GAMES), h = w(() => be?.map(({
1009
+ graphicSrc: k
1010
+ }) => k), []), {
1025
1011
  screen: g
1026
- } = v(l, {
1012
+ } = f(d, {
1027
1013
  keys: ["screen"]
1028
1014
  });
1029
- De(() => {
1030
- var I;
1031
- n(((I = d.current) == null ? void 0 : I.getBoundingClientRect().height) || 0);
1032
- }, [n]);
1015
+ je(() => {
1016
+ s(l.current?.getBoundingClientRect().height || 0);
1017
+ }, [s]);
1033
1018
  const {
1034
- loading: b,
1035
- throttled: $
1036
- } = Ye(h);
1037
- return c && p && a && s.current ? /* @__PURE__ */ i(Ne, {
1038
- container: s,
1019
+ loading: I,
1020
+ throttled: A
1021
+ } = Me(h);
1022
+ return c && m && i && o.current ? /* @__PURE__ */ n(fe, {
1023
+ container: o,
1039
1024
  useContainer: !r,
1040
- children: /* @__PURE__ */ i(Yn, {
1041
- throttled: $,
1025
+ children: /* @__PURE__ */ n(Vs, {
1026
+ throttled: A,
1042
1027
  notification: t,
1043
- setOpened: m,
1044
- gamification: p,
1045
- onboardingOpts: a,
1046
- deepLink: p.deepLink,
1047
- loading: b,
1048
- renderToNode: s,
1028
+ setOpened: u,
1029
+ gamification: m,
1030
+ onboardingOpts: i,
1031
+ deepLink: m.deepLink,
1032
+ loading: I,
1033
+ renderToNode: o,
1049
1034
  sdk: e
1050
1035
  })
1051
- }) : /* @__PURE__ */ f(L, {
1052
- children: [/* @__PURE__ */ i(Ie, {
1053
- ref: d,
1036
+ }) : /* @__PURE__ */ v(R, {
1037
+ children: [/* @__PURE__ */ n(ue, {
1038
+ ref: l,
1054
1039
  style: {
1055
1040
  position: "absolute",
1056
1041
  visibility: "hidden"
1057
1042
  },
1058
- children: /* @__PURE__ */ i(ge, {
1043
+ children: /* @__PURE__ */ n(pe, {
1059
1044
  close: () => {
1060
1045
  },
1061
1046
  action: () => {
1062
1047
  },
1063
- onboarding: a
1048
+ onboarding: i
1064
1049
  })
1065
- }), /* @__PURE__ */ i(Hn, {
1066
- style: o,
1050
+ }), /* @__PURE__ */ n(Ps, {
1051
+ style: a,
1067
1052
  hiding: t.hiding,
1068
- children: /* @__PURE__ */ i(Ie, {
1069
- children: /* @__PURE__ */ i(ge, {
1053
+ children: /* @__PURE__ */ n(ue, {
1054
+ children: /* @__PURE__ */ n(pe, {
1070
1055
  close: t.close,
1071
1056
  action: () => {
1072
- var I;
1073
- m(!0), (((I = s.current) == null ? void 0 : I.getBoundingClientRect().y) || 0) < 0 && H(s, g.size, {
1057
+ u(!0), (o.current?.getBoundingClientRect().y || 0) < 0 && j(o, g.size, {
1074
1058
  behavior: "smooth"
1075
1059
  });
1076
1060
  },
1077
- onboarding: a
1061
+ onboarding: i
1078
1062
  })
1079
1063
  })
1080
1064
  })]
1081
1065
  });
1082
- }, Xn = () => G, es = /* @__PURE__ */ u(Xn())({
1066
+ }, js = () => V, Qs = /* @__PURE__ */ p(js())({
1083
1067
  name: "Container",
1084
1068
  class: "c8ol1ve",
1085
1069
  propsAsIs: !0
1086
- }), Ae = /* @__PURE__ */ u("div")({
1070
+ }), ke = /* @__PURE__ */ p("div")({
1087
1071
  name: "InnerContainer",
1088
1072
  class: "iqfywam",
1089
1073
  propsAsIs: !1
1090
- }), ts = () => Ae, ns = /* @__PURE__ */ u(ts())({
1074
+ }), Ks = () => ke, Ws = /* @__PURE__ */ p(Ks())({
1091
1075
  name: "HiddenContainer",
1092
1076
  class: "hokmtod",
1093
1077
  propsAsIs: !0
1094
- }), ss = /* @__PURE__ */ u("div")({
1078
+ }), Gs = /* @__PURE__ */ p("div")({
1095
1079
  name: "NotificationRefreshing",
1096
1080
  class: "n192d1q8",
1097
1081
  propsAsIs: !1
1098
- }), os = () => Xe, is = /* @__PURE__ */ u(os())({
1082
+ }), Hs = () => Ue, Js = /* @__PURE__ */ p(Hs())({
1099
1083
  name: "Pill",
1100
1084
  class: "p1lha68t",
1101
1085
  propsAsIs: !0
1102
- }), as = (e) => {
1103
- const [t, n] = S(0), o = x(null), s = w(() => new ResizeObserver((d) => {
1086
+ }), Zs = (e) => {
1087
+ const [t, s] = N(0), a = E(null), o = w(() => new ResizeObserver((l) => {
1104
1088
  window.requestAnimationFrame(() => {
1105
- var a;
1106
- if (Array.isArray(d)) {
1107
- for (const c of d)
1108
- if (c.contentBoxSize) {
1109
- const m = (a = o.current) == null ? void 0 : a.getBoundingClientRect();
1110
- m && n(m.height);
1089
+ if (Array.isArray(l)) {
1090
+ for (const i of l)
1091
+ if (i.contentBoxSize) {
1092
+ const c = a.current?.getBoundingClientRect();
1093
+ c && s(c.height);
1111
1094
  }
1112
1095
  }
1113
1096
  });
1114
- }), []), r = j((d) => {
1115
- o.current = d;
1116
- }, []), l = j((d) => {
1117
- n(d);
1097
+ }), []), r = z((l) => {
1098
+ a.current = l;
1099
+ }, []), d = z((l) => {
1100
+ s(l);
1118
1101
  }, []);
1119
- return y(() => {
1120
- const d = o.current;
1121
- return d ? (s.observe(d), () => {
1122
- s.unobserve(d);
1102
+ return b(() => {
1103
+ const l = a.current;
1104
+ return l ? (o.observe(l), () => {
1105
+ o.unobserve(l);
1123
1106
  }) : () => {
1124
1107
  };
1125
- }, [e]), y(() => () => {
1126
- s.disconnect();
1127
- }), [r, t, l];
1128
- }, rs = ({
1108
+ }, [e]), b(() => () => {
1109
+ o.disconnect();
1110
+ }), [r, t, d];
1111
+ }, Xs = ({
1129
1112
  sdk: e,
1130
1113
  notification: t,
1131
- appNode: n,
1132
- responsiveStore: o,
1133
- hasActiveFeature: s
1114
+ appNode: s,
1115
+ responsiveStore: a,
1116
+ hasActiveFeature: o
1134
1117
  }) => {
1135
- var r, l;
1136
1118
  const {
1137
- sdkInDesktopView: d
1138
- } = v(o, {
1119
+ sdkInDesktopView: r
1120
+ } = f(a, {
1139
1121
  keys: ["sdkInDesktopView"]
1140
1122
  }), {
1141
- sdk: a
1142
- } = W(), [c, m, p] = as(t.id);
1143
- let h = m;
1144
- return s || (h = "auto"), t.type === z.QUESTION ? /* @__PURE__ */ f(L, {
1145
- children: [/* @__PURE__ */ i(ns, {
1146
- ref: c,
1147
- children: /* @__PURE__ */ i(te, {
1123
+ sdk: d
1124
+ } = q(), [l, i, c] = Zs(t.id);
1125
+ let u = i;
1126
+ return o || (u = "auto"), t.type === M.QUESTION ? /* @__PURE__ */ v(R, {
1127
+ children: [/* @__PURE__ */ n(Ws, {
1128
+ ref: l,
1129
+ children: /* @__PURE__ */ n(Q, {
1148
1130
  ...t
1149
1131
  })
1150
- }), /* @__PURE__ */ f(es, {
1132
+ }), /* @__PURE__ */ v(Qs, {
1151
1133
  style: {
1152
- height: t.hiding ? 0 : h
1134
+ height: t.hiding ? 0 : u
1153
1135
  },
1154
1136
  hiding: t.hiding,
1155
- children: [/* @__PURE__ */ i(Ae, {
1137
+ children: [/* @__PURE__ */ n(ke, {
1156
1138
  style: {
1157
1139
  height: "100%"
1158
1140
  },
1159
- children: /* @__PURE__ */ i(te, {
1141
+ children: /* @__PURE__ */ n(Q, {
1160
1142
  ...t,
1161
- controlVideo: a == null ? void 0 : a.controlVideoPlayer
1143
+ controlVideo: d?.controlVideoPlayer
1162
1144
  })
1163
- }), /* @__PURE__ */ i(ss, {}, t.id)]
1145
+ }), /* @__PURE__ */ n(Gs, {}, t.id)]
1164
1146
  })]
1165
- }) : t.type === z.QUESTION_RESOLVED && (l = (r = t.data) == null ? void 0 : r.question) != null && l.predictionResult ? /* @__PURE__ */ i(et, {
1147
+ }) : t.type === M.QUESTION_RESOLVED && t.data?.question?.predictionResult ? /* @__PURE__ */ n(Fe, {
1166
1148
  style: {
1167
- height: t.hiding ? 0 : m
1149
+ height: t.hiding ? 0 : i
1168
1150
  },
1169
- saveHeight: p,
1151
+ saveHeight: c,
1170
1152
  close: t.close,
1171
1153
  hiding: t.hiding,
1172
1154
  ...t.data.question
1173
- }) : t.type === z.ONBOARDING ? /* @__PURE__ */ i(Zn, {
1155
+ }) : t.type === M.ONBOARDING ? /* @__PURE__ */ n(qs, {
1174
1156
  style: {
1175
- height: t.hiding ? 0 : h
1157
+ height: t.hiding ? 0 : u
1176
1158
  },
1177
- saveHeight: p,
1159
+ saveHeight: c,
1178
1160
  sdk: e,
1179
1161
  notification: t,
1180
- sdkInDesktopView: d,
1181
- appNode: n,
1182
- responsiveStore: o
1162
+ sdkInDesktopView: r,
1163
+ appNode: s,
1164
+ responsiveStore: a
1183
1165
  }) : null;
1184
- }, ls = "p7vfi6t", ds = ({
1166
+ }, Ys = "p7vfi6t", en = ({
1185
1167
  pill: e,
1186
1168
  setPill: t,
1187
- appNode: n,
1188
- headerNode: o,
1189
- scrollNode: s,
1169
+ appNode: s,
1170
+ headerNode: a,
1171
+ scrollNode: o,
1190
1172
  responsiveStore: r,
1191
- scrollStore: l
1173
+ scrollStore: d
1192
1174
  }) => {
1193
- var d, a;
1194
1175
  const {
1195
- screen: c
1196
- } = v(r, {
1176
+ screen: l
1177
+ } = f(r, {
1197
1178
  keys: ["screen"]
1198
1179
  }), {
1199
- tabsShown: m,
1200
- scrollPosition: p
1201
- } = v(l, {
1180
+ tabsShown: i,
1181
+ scrollPosition: c
1182
+ } = f(d, {
1202
1183
  keys: ["tabsShown", "scrollPosition"]
1203
1184
  });
1204
- y(() => {
1205
- r.get().sdkInDesktopView ? p < 50 && t(null) : p > -50 && t(null);
1206
- }, [p, r, t]);
1207
- const h = r.get().sdkInDesktopView ? n : o;
1208
- return !e || !h.current ? null : mt(/* @__PURE__ */ i(is, {
1209
- title: e.type === z.QUESTION_RESOLVED ? "Prediction result" : `New ${((a = ut[(d = e.data) == null ? void 0 : d.questionType]) == null ? void 0 : a.label) || "notification"}`,
1185
+ b(() => {
1186
+ r.get().sdkInDesktopView ? c < 50 && t(null) : c > -50 && t(null);
1187
+ }, [c, r, t]);
1188
+ const u = r.get().sdkInDesktopView ? s : a;
1189
+ return !e || !u.current ? null : nt(/* @__PURE__ */ n(Js, {
1190
+ title: e.type === M.QUESTION_RESOLVED ? "Prediction result" : `New ${st[e.data?.questionType]?.label || "notification"}`,
1210
1191
  "data-a": "intr",
1211
1192
  onClick: () => {
1212
- var g;
1213
- r.get().sdkInDesktopView ? (g = s.current) == null || g.scrollTo({
1193
+ r.get().sdkInDesktopView ? o.current?.scrollTo({
1214
1194
  top: 0,
1215
1195
  behavior: "smooth"
1216
- }) : H(n, c.size, {
1196
+ }) : j(s, l.size, {
1217
1197
  behavior: "smooth"
1218
1198
  }), t(null);
1219
1199
  },
1220
- className: C(m && ls, "sl-pill-button")
1221
- }), h.current);
1222
- }, cs = ({
1200
+ className: $(i && Ys, "sl-pill-button")
1201
+ }), u.current);
1202
+ }, tn = ({
1223
1203
  sdk: e,
1224
1204
  headerNode: t,
1225
- scrollNode: n,
1226
- responsiveStore: o,
1227
- appNode: s,
1205
+ scrollNode: s,
1206
+ responsiveStore: a,
1207
+ appNode: o,
1228
1208
  scrollStore: r,
1229
- hasActiveFeature: l
1209
+ hasActiveFeature: d
1230
1210
  }) => {
1231
- const [d] = S(e.getNotificationsStore()), a = v(d), [c, m] = S(null), p = w(() => e.getActiveNotification(), [e, a]);
1232
- return y(() => {
1233
- p && ht.emit("notification", {
1211
+ const [l] = N(e.getNotificationsStore()), i = f(l), [c, u] = N(null), m = w(() => e.getActiveNotification(), [e, i]);
1212
+ return b(() => {
1213
+ m && ot.emit("notification", {
1234
1214
  action: "rendered",
1235
1215
  payload: {
1236
- questionId: p.data.questionId,
1237
- questionType: p.data.questionType
1216
+ questionId: m.data.questionId,
1217
+ questionType: m.data.questionType
1238
1218
  }
1239
1219
  });
1240
- }, [p]), y(() => {
1220
+ }, [m]), b(() => {
1241
1221
  const {
1242
1222
  sdkInDesktopView: h,
1243
1223
  sdkInView: g
1244
- } = o.get();
1245
- p && (h || g) && (!h && g && m(p), h && window.requestAnimationFrame(() => {
1246
- r.get().scrollPosition !== 0 && m(p);
1224
+ } = a.get();
1225
+ m && (h || g) && (!h && g && u(m), h && window.requestAnimationFrame(() => {
1226
+ r.get().scrollPosition !== 0 && u(m);
1247
1227
  }));
1248
- }, [p]), y(() => {
1249
- p || m(null);
1250
- }, [p]), /* @__PURE__ */ f(L, {
1251
- children: [!c && p && /* @__PURE__ */ i(rs, {
1252
- appNode: s,
1228
+ }, [m]), b(() => {
1229
+ m || u(null);
1230
+ }, [m]), /* @__PURE__ */ v(R, {
1231
+ children: [!c && m && /* @__PURE__ */ n(Xs, {
1232
+ appNode: o,
1253
1233
  sdk: e,
1254
- hasActiveFeature: l,
1255
- notification: p,
1256
- responsiveStore: o
1257
- }), c && /* @__PURE__ */ i(ds, {
1234
+ hasActiveFeature: d,
1235
+ notification: m,
1236
+ responsiveStore: a
1237
+ }), c && /* @__PURE__ */ n(en, {
1258
1238
  pill: c,
1259
- setPill: m,
1260
- appNode: s,
1261
- notification: p,
1239
+ setPill: u,
1240
+ appNode: o,
1241
+ notification: m,
1262
1242
  headerNode: t,
1263
- scrollNode: n,
1243
+ scrollNode: s,
1264
1244
  scrollStore: r,
1265
- responsiveStore: o
1245
+ responsiveStore: a
1266
1246
  })]
1267
1247
  });
1268
- }, ps = (e) => {
1269
- const t = v(e.status), n = v(e.sdkStore.slStreamId), o = v(e.userId()), s = v(e.getActiveFeature()), r = t === "ready" && !!n.data;
1270
- return y(() => {
1271
- const l = e.getFeature(N.GAMES);
1272
- l && s !== N.GAMES && (l.closeQuestion(), l.closeUser()), l == null || l.openedQuestionId.subscribe((d) => {
1273
- d && s !== N.GAMES && e.openFeature(N.GAMES);
1248
+ }, sn = (e) => {
1249
+ const t = f(e.status), s = f(e.sdkStore.slStreamId), a = f(e.userId()), o = f(e.getActiveFeature()), r = t === "ready" && !!s.data;
1250
+ return b(() => {
1251
+ const d = e.getFeature(y.GAMES);
1252
+ d && o !== y.GAMES && (d.closeQuestion(), d.closeUser()), d?.openedQuestionId.subscribe((l) => {
1253
+ l && o !== y.GAMES && e.openFeature(y.GAMES);
1274
1254
  });
1275
- }, [s, e]), {
1255
+ }, [o, e]), {
1276
1256
  sdkReady: r,
1277
- activeFeature: s,
1278
- isLogged: !!o
1257
+ activeFeature: o,
1258
+ isLogged: !!a
1279
1259
  };
1280
- }, us = ({
1260
+ }, nn = ({
1281
1261
  sdk: e,
1282
1262
  className: t,
1283
- scrollStore: n,
1284
- appNode: o,
1285
- scrollNode: s,
1263
+ scrollStore: s,
1264
+ appNode: a,
1265
+ scrollNode: o,
1286
1266
  responsiveStore: r
1287
1267
  }) => {
1288
- const [, l] = tt(e);
1289
- return /* @__PURE__ */ i(cn, {
1268
+ const [, d] = Pe(e);
1269
+ return /* @__PURE__ */ n(ts, {
1290
1270
  className: t,
1291
- scrollNode: s,
1292
- appNode: o,
1293
- scrollStore: n,
1294
- feature: l,
1271
+ scrollNode: o,
1272
+ appNode: a,
1273
+ scrollStore: s,
1274
+ feature: d,
1295
1275
  responsiveStore: r,
1296
1276
  sdk: e
1297
1277
  });
1298
- }, ms = ({
1278
+ }, on = ({
1299
1279
  sdk: e,
1300
1280
  muted: t,
1301
- className: n,
1302
- appNode: o,
1303
- responsiveStore: s
1281
+ className: s,
1282
+ appNode: a,
1283
+ responsiveStore: o
1304
1284
  }) => {
1305
- const r = v(e.featuresList.getStore());
1306
- return r ? Array.from(r, (l) => {
1307
- const d = e.getFeature(l);
1308
- return d ? /* @__PURE__ */ i(pn, {
1309
- className: n,
1285
+ const r = f(e.featuresList.getStore());
1286
+ return r ? Array.from(r, (d) => {
1287
+ const l = e.getFeature(d);
1288
+ return l ? /* @__PURE__ */ n(ss, {
1289
+ className: s,
1310
1290
  muted: t,
1311
- appNode: o,
1312
- feature: d,
1313
- responsiveStore: s,
1291
+ appNode: a,
1292
+ feature: l,
1293
+ responsiveStore: o,
1314
1294
  sdk: e
1315
- }, l) : null;
1295
+ }, d) : null;
1316
1296
  }) : null;
1317
- }, hs = ({
1297
+ }, an = ({
1318
1298
  sdk: e,
1319
1299
  muted: t,
1320
- topNavigation: n
1300
+ topNavigation: s
1321
1301
  }) => {
1322
- const [o, s] = S(!0), r = x(null), l = v(e.uiState), d = x(null), [a] = vt(r), [c, m] = gt(r, a), {
1323
- sdkReady: p,
1302
+ const [a, o] = N(!0), r = E(null), d = f(e.uiState), l = E(null), [i] = it(r), [c, u] = dt(r, i), {
1303
+ sdkReady: m,
1324
1304
  activeFeature: h,
1325
1305
  isLogged: g
1326
- } = ps(e), b = !!p;
1327
- st(r, {
1328
- enabled: b,
1306
+ } = sn(e), I = !!m;
1307
+ Ke(r, {
1308
+ enabled: I,
1329
1309
  event: "click",
1330
- listener: ot
1310
+ listener: We
1331
1311
  });
1332
- const $ = w(() => ({
1312
+ const A = w(() => ({
1333
1313
  sdk: e,
1334
- topNavigation: n
1335
- }), [e, n]);
1336
- return y(() => {
1314
+ topNavigation: s
1315
+ }), [e, s]);
1316
+ return b(() => {
1337
1317
  import("./gamification-feature.js");
1338
- }, []), /* @__PURE__ */ i(rt.Provider, {
1339
- value: $,
1340
- children: /* @__PURE__ */ f(Qe, {
1341
- ref: (I) => {
1342
- r.current = I, s(!!I);
1318
+ }, []), /* @__PURE__ */ n(Je.Provider, {
1319
+ value: A,
1320
+ children: /* @__PURE__ */ v(Le, {
1321
+ ref: (k) => {
1322
+ r.current = k, o(!!k);
1343
1323
  },
1344
- className: n ? "" : "c10llmat",
1345
- children: [b && n && l.app && /* @__PURE__ */ i(Mn, {
1346
- className: C(B, "sl-hide-on-modal"),
1324
+ className: s ? "" : "c10llmat",
1325
+ children: [I && s && d.app && /* @__PURE__ */ n(Cs, {
1326
+ className: $(O, "sl-hide-on-modal"),
1347
1327
  sdk: e,
1348
- ref: d
1349
- }), b && !n && !!h && l.app && /* @__PURE__ */ i(_n, {
1350
- className: C(B, "sl-hide-on-modal"),
1328
+ ref: l
1329
+ }), I && !s && !!h && d.app && /* @__PURE__ */ n(As, {
1330
+ className: $(O, "sl-hide-on-modal"),
1351
1331
  sdk: e,
1352
- ref: d
1353
- }), /* @__PURE__ */ f(Ge, {
1332
+ ref: l
1333
+ }), /* @__PURE__ */ v(De, {
1354
1334
  className: "sl-hide-on-modal",
1355
1335
  ref: c,
1356
- "data-nav": (!!h && b).toString(),
1357
- children: [b && l.app && /* @__PURE__ */ i(cs, {
1336
+ "data-nav": (!!h && I).toString(),
1337
+ children: [I && d.app && /* @__PURE__ */ n(tn, {
1358
1338
  sdk: e,
1359
1339
  scrollNode: c,
1360
- headerNode: d,
1340
+ headerNode: l,
1361
1341
  appNode: r,
1362
- scrollStore: m,
1363
- responsiveStore: a,
1342
+ scrollStore: u,
1343
+ responsiveStore: i,
1364
1344
  hasActiveFeature: !!h
1365
- }), b && l.app && /* @__PURE__ */ i(us, {
1366
- scrollStore: m,
1367
- responsiveStore: a,
1345
+ }), I && d.app && /* @__PURE__ */ n(nn, {
1346
+ scrollStore: u,
1347
+ responsiveStore: i,
1368
1348
  scrollNode: c,
1369
1349
  appNode: r,
1370
- className: B,
1350
+ className: O,
1371
1351
  sdk: e
1372
- }), b && o && /* @__PURE__ */ i(ms, {
1352
+ }), I && a && /* @__PURE__ */ n(on, {
1373
1353
  muted: t,
1374
- responsiveStore: a,
1354
+ responsiveStore: i,
1375
1355
  appNode: r,
1376
- className: B,
1356
+ className: O,
1377
1357
  sdk: e
1378
1358
  })]
1379
- }), b && !g && o && l.app && /* @__PURE__ */ i("div", {
1359
+ }), I && !g && a && d.app && /* @__PURE__ */ n("div", {
1380
1360
  style: {
1381
1361
  display: "flex",
1382
1362
  alignItems: "center",
@@ -1388,13 +1368,13 @@ const vn = {
1388
1368
  })]
1389
1369
  })
1390
1370
  });
1391
- }, Vs = ({ event: e, topNavigation: t, theme: n, muted: o, withSidebarNotification: s = !0 }) => {
1392
- const { sdk: r, status: l } = Y(Z), d = Te(), a = Oe(), { event: c } = Y(Z);
1393
- if (l === X.UNSET)
1371
+ }, On = ({ event: e, topNavigation: t, theme: s, muted: a, withSidebarNotification: o = !0 }) => {
1372
+ const { sdk: r, status: d } = K(G), l = at(), i = rt(), { event: c } = K(G);
1373
+ if (d === H.UNSET)
1394
1374
  throw new Error("Wrap app in `StreamLayerProvider`");
1395
- return l === X.CONNECTED ? /* @__PURE__ */ i("div", { className: "StreamLayerSDK", children: "wait" }) : r === null ? /* @__PURE__ */ i("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !d.app && !d.appNotification && !d.appSidebar || !d.app && !d.appSidebar && d.appNotification && !s ? null : /* @__PURE__ */ i("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ i(Me, { customTheme: n ?? a.theme, themeMode: a.themeMode, children: /* @__PURE__ */ i(hs, { sdk: r, muted: o, event: (c == null ? void 0 : c.current) || e, topNavigation: t }) }) });
1375
+ return d === H.CONNECTED ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: "wait" }) : r === null ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !l.app && !l.appNotification && !l.appSidebar || !l.app && !l.appSidebar && l.appNotification && !o ? null : /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ n(ye, { customTheme: s ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ n(an, { sdk: r, muted: a, event: c?.current || e, topNavigation: t }) }) });
1396
1376
  };
1397
1377
  export {
1398
- Ps as B,
1399
- Vs as b
1378
+ Tn as B,
1379
+ On as D
1400
1380
  };