@streamlayer/react 1.17.0 → 1.18.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 (77) hide show
  1. package/lib/app/advertisement.d.ts +1 -0
  2. package/lib/app/app.d.ts +3 -0
  3. package/lib/app/provider.d.ts +4 -1
  4. package/lib/app/useStreamLayerApp.d.ts +2 -1
  5. package/lib/cjs/advertisement.js +40 -40
  6. package/lib/cjs/gamification-feature.js +1 -1
  7. package/lib/cjs/index.js +1 -1
  8. package/lib/cjs/index2.js +2 -2
  9. package/lib/cjs/insight.js +1 -1
  10. package/lib/cjs/masters2.js +4 -4
  11. package/lib/cjs/notification.js +1 -1
  12. package/lib/cjs/points.js +1 -1
  13. package/lib/cjs/provider.js +62 -19
  14. package/lib/cjs/useStreamLayerApp2.js +15 -15
  15. package/lib/classic/app/advertisement.d.ts +1 -0
  16. package/lib/classic/app/app.d.ts +3 -0
  17. package/lib/classic/app/provider.d.ts +4 -1
  18. package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
  19. package/lib/classic/cjs/advertisement.js +40 -40
  20. package/lib/classic/cjs/bet-pack.js +5 -1
  21. package/lib/classic/cjs/gamification-feature.js +1 -1
  22. package/lib/classic/cjs/index.js +1 -1
  23. package/lib/classic/cjs/insight.js +1 -1
  24. package/lib/classic/cjs/notification.js +1 -1
  25. package/lib/classic/cjs/points.js +1 -1
  26. package/lib/classic/cjs/provider.js +57 -30
  27. package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
  28. package/lib/classic/es/advertisement.js +6989 -6764
  29. package/lib/classic/es/bet-pack.js +3431 -12
  30. package/lib/classic/es/gamification-feature.js +1 -1
  31. package/lib/classic/es/index.js +4 -6
  32. package/lib/classic/es/insight.js +44 -41
  33. package/lib/classic/es/notification.js +739 -230
  34. package/lib/classic/es/points.js +13 -13
  35. package/lib/classic/es/provider.js +7109 -4730
  36. package/lib/classic/es/useStreamLayerApp.js +1 -1
  37. package/lib/classic/es/useStreamLayerApp2.js +4044 -3824
  38. package/lib/classic/index.d.ts +1 -2
  39. package/lib/dist/cjs/gamification-feature2.js +1 -1
  40. package/lib/dist/cjs/masters.js +48 -44
  41. package/lib/dist/es/gamification-feature2.js +15 -15
  42. package/lib/dist/es/index.js +3 -3
  43. package/lib/dist/es/masters.js +12653 -10178
  44. package/lib/dist/style.css +1 -1
  45. package/lib/es/advertisement.js +6989 -6764
  46. package/lib/es/gamification-feature.js +1 -1
  47. package/lib/es/index.js +3 -5
  48. package/lib/es/index2.js +380 -380
  49. package/lib/es/insight.js +44 -41
  50. package/lib/es/masters2.js +22 -20
  51. package/lib/es/notification.js +739 -230
  52. package/lib/es/points.js +13 -13
  53. package/lib/es/provider.js +7162 -4706
  54. package/lib/es/useStreamLayerApp.js +1 -1
  55. package/lib/es/useStreamLayerApp2.js +4044 -3824
  56. package/lib/index.d.ts +1 -2
  57. package/lib/style.css +1 -1
  58. package/package.json +16 -26
  59. package/lib/app/tvos.d.ts +0 -5
  60. package/lib/cjs/index3.js +0 -1
  61. package/lib/cjs/tvos.js +0 -1
  62. package/lib/classic/app/tvos.d.ts +0 -5
  63. package/lib/classic/cjs/gamification-feature2.js +0 -1
  64. package/lib/classic/cjs/index2.js +0 -5
  65. package/lib/classic/cjs/index3.js +0 -1
  66. package/lib/classic/cjs/masters.js +0 -1
  67. package/lib/classic/cjs/masters2.js +0 -13
  68. package/lib/classic/cjs/tvos.js +0 -1
  69. package/lib/classic/es/gamification-feature2.js +0 -4
  70. package/lib/classic/es/index2.js +0 -3426
  71. package/lib/classic/es/index3.js +0 -76
  72. package/lib/classic/es/masters.js +0 -9
  73. package/lib/classic/es/masters2.js +0 -868
  74. package/lib/classic/es/tvos.js +0 -1352
  75. package/lib/classic/style.css +0 -1
  76. package/lib/es/index3.js +0 -76
  77. package/lib/es/tvos.js +0 -1352
@@ -1,485 +1,994 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { useState as y, useCallback as L, useMemo as E, useEffect as x } from "react";
3
- import { s, k as u, D as O, A as R, x as B, q as P, r as Q, y as U, g as V, f as F, e as W, N as k, u as G, d as K, c as Y, h as _ } from "./provider.js";
4
- import { Q as m, b as A, c as H, S as J } from "./useStreamLayerApp2.js";
5
- const $ = /* @__PURE__ */ s("div")({
1
+ import { s as n, B as A, D as As, q as hs, x as Y, r as _, t as Is, P as $s, O as E, y as gs, d as ws, a as ys, e as Ts, N as M, u as bs, b as Cs, p as fs, h as ks } from "./provider.js";
2
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
3
+ import { useState as w, useRef as K, useEffect as y, useCallback as Ns, useMemo as qs } from "react";
4
+ import { l as v, Q as I, m as G, r as L, S as Ls, A as O } from "./useStreamLayerApp2.js";
5
+ const b = /* @__PURE__ */ n("div")({
6
6
  name: "Media",
7
7
  class: "m1bcvojl",
8
8
  propsAsIs: !1
9
- }), X = () => $, Z = /* @__PURE__ */ s(X())({
9
+ }), Ss = () => b, Es = /* @__PURE__ */ n(Ss())({
10
10
  name: "MediaImgBottom",
11
11
  class: "m58gin0",
12
12
  propsAsIs: !0
13
- }), ee = () => $, N = /* @__PURE__ */ s(ee())({
13
+ }), xs = () => b, q = /* @__PURE__ */ n(xs())({
14
14
  name: "MediaImgSolid",
15
15
  class: "m1atm8do",
16
16
  propsAsIs: !0
17
- }), se = () => $, ne = /* @__PURE__ */ s(se())({
17
+ }), Ds = () => b, Ms = /* @__PURE__ */ n(Ds())({
18
18
  name: "MediaImgRounded",
19
19
  class: "myx3xoi",
20
20
  propsAsIs: !0
21
- }), te = () => $, ie = /* @__PURE__ */ s(te())({
21
+ }), Os = () => b, Rs = /* @__PURE__ */ n(Os())({
22
22
  name: "MediaImgCentered",
23
23
  class: "m1bwv0gx",
24
24
  propsAsIs: !0
25
- }), oe = () => $, ae = /* @__PURE__ */ s(oe())({
25
+ }), Bs = () => b, js = /* @__PURE__ */ n(Bs())({
26
26
  name: "MediaImgInsight",
27
27
  class: "mntjanp",
28
28
  propsAsIs: !0
29
- }), ce = /* @__PURE__ */ s("div")({
29
+ }), Ps = /* @__PURE__ */ n("div")({
30
30
  name: "VideoIcon",
31
31
  class: "v1kofb47",
32
32
  propsAsIs: !1
33
- }), re = {
34
- [m.UNSET]: N,
35
- [m.NONE]: N,
36
- [m.ROUNDED]: ne,
37
- [m.CENTERED]: ie,
38
- [m.TRANSPARENT]: Z
39
- }, b = ({
40
- src: t,
41
- imageMode: i = m.UNSET,
42
- withVideo: o,
43
- fromInsight: a
33
+ }), Us = {
34
+ [v.UNSET]: q,
35
+ [v.NONE]: q,
36
+ [v.ROUNDED]: Ms,
37
+ [v.CENTERED]: Rs,
38
+ [v.TRANSPARENT]: Es,
39
+ [v.SOLID]: q
40
+ }, R = ({
41
+ src: e,
42
+ imageMode: i = v.UNSET,
43
+ withVideo: t,
44
+ fromInsight: o
44
45
  }) => {
45
- if (i === m.NONE)
46
+ if (i === v.NONE)
46
47
  return null;
47
- const n = a ? ae : re[i];
48
- return /* @__PURE__ */ c(n, {
49
- children: [/* @__PURE__ */ e("img", {
50
- src: t,
48
+ const a = o ? js : Us[i];
49
+ return /* @__PURE__ */ l(a, {
50
+ children: [/* @__PURE__ */ s("img", {
51
+ src: e,
51
52
  alt: ""
52
- }), o && /* @__PURE__ */ e(ce, {
53
- children: /* @__PURE__ */ e(u, {
53
+ }), t && /* @__PURE__ */ s(Ps, {
54
+ children: /* @__PURE__ */ s(A, {
54
55
  name: "icon-play"
55
56
  })
56
57
  })]
57
58
  });
58
- }, le = /* @__PURE__ */ s("div")({
59
+ }, zs = /* @__PURE__ */ n("div")({
59
60
  name: "NotificationContent",
60
61
  class: "nuraq9m",
61
62
  propsAsIs: !1
62
- }), de = /* @__PURE__ */ s("div")({
63
+ }), Vs = /* @__PURE__ */ n("div")({
63
64
  name: "NotificationContainer",
64
65
  class: "ns1nzpg",
65
66
  propsAsIs: !1
66
- }), M = /* @__PURE__ */ s("div")({
67
+ }), H = /* @__PURE__ */ n("div")({
67
68
  name: "Body",
68
69
  class: "b1j59nzs",
69
70
  propsAsIs: !1
70
- }), pe = /* @__PURE__ */ s("div")({
71
+ }), Fs = /* @__PURE__ */ n("div")({
71
72
  name: "Title",
72
73
  class: "t9vmnpp",
73
74
  propsAsIs: !1
74
- }), me = /* @__PURE__ */ s("button")({
75
+ }), Qs = /* @__PURE__ */ n("button")({
75
76
  name: "Button",
76
77
  class: "b14ivj5k",
77
78
  propsAsIs: !1
78
- }), ue = () => u, Ie = /* @__PURE__ */ s(ue())({
79
+ }), Ws = () => A, Ys = /* @__PURE__ */ n(Ws())({
79
80
  name: "StyledChevronRight",
80
81
  class: "s1atci8n",
81
82
  propsAsIs: !0
82
- }), ve = /* @__PURE__ */ s("div")({
83
+ }), _s = /* @__PURE__ */ n("div")({
83
84
  name: "QuoteWrap",
84
85
  class: "q4w8jgs",
85
86
  propsAsIs: !1
86
- }), he = /* @__PURE__ */ s("blockquote")({
87
+ }), Ks = /* @__PURE__ */ n("blockquote")({
87
88
  name: "Quote",
88
89
  class: "qaa0kez",
89
90
  propsAsIs: !1
90
- }), Ae = /* @__PURE__ */ s("div")({
91
+ }), Gs = /* @__PURE__ */ n("div")({
91
92
  name: "Body",
92
93
  class: "b1wvd52w",
93
94
  propsAsIs: !1
94
- }), $e = /* @__PURE__ */ s("div")({
95
+ }), Hs = /* @__PURE__ */ n("div")({
95
96
  name: "Container",
96
97
  class: "ccvukea",
97
98
  propsAsIs: !1
98
- }), ye = ({ image: t, tweet: i, account: o, accountVerified: a, body: n, title: d }) => {
99
- var l;
100
- return /* @__PURE__ */ c($e, { children: [
101
- d && /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(he, { children: d }) }),
102
- /* @__PURE__ */ e(
103
- O,
99
+ }), Js = ({ image: e, tweet: i, account: t, accountVerified: o, body: a, title: p }) => {
100
+ var d;
101
+ return /* @__PURE__ */ l(Hs, { children: [
102
+ p && /* @__PURE__ */ s(_s, { children: /* @__PURE__ */ s(Ks, { children: p }) }),
103
+ /* @__PURE__ */ s(
104
+ As,
104
105
  {
105
- image: t,
106
- name: (l = i == null ? void 0 : i.meta) == null ? void 0 : l.accountName,
107
- userName: o,
108
- verified: a,
106
+ image: e,
107
+ name: (d = i == null ? void 0 : i.meta) == null ? void 0 : d.accountName,
108
+ userName: t,
109
+ verified: o,
109
110
  createdTweet: i == null ? void 0 : i.date
110
111
  }
111
112
  ),
112
- /* @__PURE__ */ e(Ae, { children: R(n) })
113
+ /* @__PURE__ */ s(Gs, { children: hs(a) })
113
114
  ] });
114
- }, fe = ({ title: t, questionType: i, questionTypeData: o }) => /* @__PURE__ */ c(M, { children: [
115
- /* @__PURE__ */ e(
116
- B,
115
+ }, Xs = ({ title: e, questionType: i, questionTypeData: t }) => /* @__PURE__ */ l(H, { children: [
116
+ /* @__PURE__ */ s(
117
+ Y,
117
118
  {
118
- questionTypeData: o,
119
+ questionTypeData: t,
119
120
  questionType: i,
120
- questionStatus: H.UNSET
121
+ questionStatus: G.UNSET
121
122
  }
122
123
  ),
123
- t && /* @__PURE__ */ e(pe, { children: t })
124
- ] }), ge = ({ tweet: t }) => t ? /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(ye, { ...t, controlVideo: () => {
125
- } }) }) : null, Te = ({ action: t, questionType: i, inApp: o, insight: a, tweet: n }) => {
126
- var d;
127
- const l = P[i], r = Q[i];
128
- if (!l || !o || !o.notification)
124
+ e && /* @__PURE__ */ s(Fs, { children: e })
125
+ ] }), Zs = ({ tweet: e }) => e ? /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(Js, { ...e, controlVideo: () => {
126
+ } }) }) : null, se = ({ action: e, questionType: i, inApp: t, insight: o, tweet: a }) => {
127
+ var p;
128
+ const d = _[i], r = Is[i];
129
+ if (!d || !t || !t.notification)
129
130
  return null;
130
- const { title: p, image: I, imageMode: v } = o.notification;
131
- let h = I;
132
- i === A.TWEET && n != null && n.tweetMedia && (h = n.tweetMedia.image), v === m.NONE && (h = "");
133
- const f = o.useMediaFromContent && (a == null ? void 0 : a.image), T = i === A.TWEET && ((d = n == null ? void 0 : n.tweetMedia) == null ? void 0 : d.video) || i === A.FACTOID && (a == null ? void 0 : a.video);
134
- return /* @__PURE__ */ e(de, { "data-a": "intr", className: "SL_InApp", onClick: t, children: /* @__PURE__ */ c(le, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
135
- h && !f && /* @__PURE__ */ e(b, { src: h, imageMode: v, withVideo: !!T }),
136
- f && /* @__PURE__ */ e(b, { src: f, fromInsight: !0, withVideo: !!T }),
137
- i === A.TWEET ? /* @__PURE__ */ e(ge, { tweet: n }) : /* @__PURE__ */ e(fe, { questionTypeData: l, questionType: i, title: p }),
138
- /* @__PURE__ */ e(me, { name: "inapp-button", children: r || "Open" }),
139
- /* @__PURE__ */ e(Ie, { name: "chevronRight" })
131
+ const { title: m, image: u, imageMode: $ } = t.notification;
132
+ let h = u;
133
+ i === I.TWEET && a != null && a.tweetMedia && (h = a.tweetMedia.image), $ === v.NONE && (h = "");
134
+ const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i === I.TWEET && ((p = a == null ? void 0 : a.tweetMedia) == null ? void 0 : p.video) || i === I.FACTOID && (o == null ? void 0 : o.video);
135
+ return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(zs, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
136
+ h && !g && /* @__PURE__ */ s(R, { src: h, imageMode: $, withVideo: !!c }),
137
+ g && /* @__PURE__ */ s(R, { src: g, fromInsight: !0, withVideo: !!c }),
138
+ i === I.TWEET ? /* @__PURE__ */ s(Zs, { tweet: a }) : /* @__PURE__ */ s(Xs, { questionTypeData: d, questionType: i, title: m }),
139
+ /* @__PURE__ */ s(Qs, { name: "inapp-button", children: r || "Open" }),
140
+ /* @__PURE__ */ s(Ys, { name: "chevronRight" })
140
141
  ] }) });
141
- }, ke = /* @__PURE__ */ s("div")({
142
+ }, ee = () => ({
143
+ color: e
144
+ }) => e, B = /* @__PURE__ */ n("div")({
145
+ name: "MediaComponentWrap",
146
+ class: "mek728j",
147
+ propsAsIs: !1,
148
+ vars: {
149
+ "mek728j-0": [ee()]
150
+ }
151
+ }), T = /* @__PURE__ */ n("div")({
152
+ name: "Media",
153
+ class: "m461t56",
154
+ propsAsIs: !1
155
+ }), ne = () => T, oe = /* @__PURE__ */ n(ne())({
156
+ name: "MediaImgBottom",
157
+ class: "m22bh04",
158
+ propsAsIs: !0
159
+ }), ie = () => T, te = /* @__PURE__ */ n(ie())({
160
+ name: "MediaVideo",
161
+ class: "m17u1e34",
162
+ propsAsIs: !0
163
+ }), ae = () => T, re = /* @__PURE__ */ n(ae())({
164
+ name: "MediaImgContentMedia",
165
+ class: "m4j3eds",
166
+ propsAsIs: !0
167
+ }), ce = () => T, le = /* @__PURE__ */ n(ce())({
168
+ name: "MediaImgSolid",
169
+ class: "m1lp3swr",
170
+ propsAsIs: !0
171
+ }), de = () => T, pe = /* @__PURE__ */ n(de())({
172
+ name: "MediaImgRounded",
173
+ class: "mc7lij",
174
+ propsAsIs: !0
175
+ }), me = () => T, ue = /* @__PURE__ */ n(me())({
176
+ name: "MediaImgCentered",
177
+ class: "mwwaw7o",
178
+ propsAsIs: !0
179
+ }), ve = () => T, S = /* @__PURE__ */ n(ve())({
180
+ name: "MediaNone",
181
+ class: "mqfzyyr",
182
+ propsAsIs: !0
183
+ }), Ae = "v170mtgf", he = {
184
+ [v.UNSET]: S,
185
+ [v.NONE]: S,
186
+ [v.ROUNDED]: pe,
187
+ [v.CENTERED]: ue,
188
+ [v.TRANSPARENT]: oe,
189
+ [v.SOLID]: le
190
+ }, j = ({
191
+ src: e,
192
+ imageMode: i = v.UNSET,
193
+ withVideo: t,
194
+ color: o,
195
+ useContentMedia: a,
196
+ thumbnailUrl: p
197
+ }) => {
198
+ if (!e)
199
+ return /* @__PURE__ */ s(B, {
200
+ color: o,
201
+ children: /* @__PURE__ */ s(S, {})
202
+ });
203
+ const d = a === L.ENABLED ? re : he[i];
204
+ return /* @__PURE__ */ s(B, {
205
+ color: o,
206
+ children: t ? /* @__PURE__ */ s(te, {
207
+ children: /* @__PURE__ */ s($s, {
208
+ className: Ae,
209
+ source: e,
210
+ poster: p || ""
211
+ })
212
+ }) : /* @__PURE__ */ s(d, {
213
+ children: /* @__PURE__ */ s("img", {
214
+ src: e,
215
+ alt: ""
216
+ })
217
+ })
218
+ });
219
+ }, Ie = () => ({
220
+ withoutPadding: e
221
+ }) => e ? "0px" : "1rem", J = /* @__PURE__ */ n("div")({
222
+ name: "NotificationContent",
223
+ class: "n1p3bk1c",
224
+ propsAsIs: !1,
225
+ vars: {
226
+ "n1p3bk1c-0": [Ie()]
227
+ }
228
+ }), $e = /* @__PURE__ */ n("div")({
229
+ name: "MainContent",
230
+ class: "m1g211mu",
231
+ propsAsIs: !1
232
+ }), ge = () => A, we = /* @__PURE__ */ n(ge())({
233
+ name: "StyledChevronRight",
234
+ class: "sx1hq4c",
235
+ propsAsIs: !0
236
+ }), X = /* @__PURE__ */ n("div")({
237
+ name: "NotificationContainer",
238
+ class: "n1fcriet",
239
+ propsAsIs: !1
240
+ }), ye = () => ({
241
+ questionType: e
242
+ }) => e === I.FACTOID ? "7.3rem" : "4.5rem", Te = () => ({
243
+ webos: e
244
+ }) => e ? "11px 0px 8px 0px" : "11px 0px", be = () => ({
245
+ imageMode: e,
246
+ webos: i
247
+ }) => i ? "330px" : e === v.SOLID ? "310px" : e === v.CENTERED || e === v.ROUNDED || e === v.TRANSPARENT ? "370px" : "430px", Ce = /* @__PURE__ */ n("div")({
248
+ name: "Body",
249
+ class: "b1byyovs",
250
+ propsAsIs: !1,
251
+ vars: {
252
+ "b1byyovs-0": [ye()],
253
+ "b1byyovs-1": [Te()],
254
+ "b1byyovs-2": [be()]
255
+ }
256
+ }), fe = () => ({
257
+ webos: e
258
+ }) => e ? "0.85rem" : "1.033rem", ke = () => ({
259
+ webos: e
260
+ }) => e ? "0.95rem" : "1.25rem", Ne = () => ({
261
+ webos: e
262
+ }) => e ? "4.7rem" : "2.25rem", qe = () => ({
263
+ webos: e
264
+ }) => e ? "pre-wrap" : "nowrap", Le = /* @__PURE__ */ n("div")({
265
+ name: "Title",
266
+ class: "t1y5k5id",
267
+ propsAsIs: !1,
268
+ vars: {
269
+ "t1y5k5id-0": [fe()],
270
+ "t1y5k5id-1": [ke()],
271
+ "t1y5k5id-2": [Ne()],
272
+ "t1y5k5id-3": [qe()]
273
+ }
274
+ }), Se = /* @__PURE__ */ n("div")({
275
+ name: "Description",
276
+ class: "dw9eb7l",
277
+ propsAsIs: !1
278
+ }), Ee = /* @__PURE__ */ n("div")({
279
+ name: "LogoImgContainer",
280
+ class: "ldu8wgy",
281
+ propsAsIs: !1
282
+ }), Z = /* @__PURE__ */ n("img")({
283
+ name: "LogoImg",
284
+ class: "ln4a3eh",
285
+ propsAsIs: !1
286
+ }), xe = () => X, De = /* @__PURE__ */ n(xe())({
287
+ name: "NotificationInterstitialContainer",
288
+ class: "no2k63v",
289
+ propsAsIs: !0
290
+ }), Me = /* @__PURE__ */ n("div")({
291
+ name: "TVButtons",
292
+ class: "th9nn6a",
293
+ propsAsIs: !1
294
+ }), ss = /* @__PURE__ */ n("button")({
295
+ name: "TVButton",
296
+ class: "t1eee77p",
297
+ propsAsIs: !1
298
+ }), Oe = () => ss, Re = /* @__PURE__ */ n(Oe())({
299
+ name: "DismissButton",
300
+ class: "ds000hw",
301
+ propsAsIs: !0
302
+ }), Be = () => ss, je = /* @__PURE__ */ n(Be())({
303
+ name: "AnswerButton",
304
+ class: "a1nz9hoe",
305
+ propsAsIs: !0
306
+ }), Pe = ({ title: e, questionType: i, questionTypeData: t, description: o, imageMode: a, webos: p }) => /* @__PURE__ */ l(Ce, { imageMode: a, questionType: i, webos: p, children: [
307
+ /* @__PURE__ */ s(
308
+ Y,
309
+ {
310
+ questionTypeData: t,
311
+ questionType: i,
312
+ questionStatus: G.UNSET
313
+ }
314
+ ),
315
+ e && /* @__PURE__ */ s(Le, { webos: p, children: e }),
316
+ o && /* @__PURE__ */ s(Se, { children: o })
317
+ ] }), Ue = E(De), ze = E(Re), Ve = E(je), Fe = ({
318
+ sponsorLogo: e,
319
+ onClick: i,
320
+ webos: t
321
+ }) => /* @__PURE__ */ s(Ue, { autoFocus: !0, webos: t, onClick: i, "data-webos": t, children: /* @__PURE__ */ s(J, { withoutPadding: !0, children: /* @__PURE__ */ s(Z, { src: e }) }) }), Qe = ({
322
+ action: e,
323
+ close: i,
324
+ questionType: t,
325
+ inApp: o,
326
+ insight: a,
327
+ color: p,
328
+ webos: d
329
+ }) => {
330
+ var r, m, u;
331
+ const [$, h] = w(!1), g = K();
332
+ y(() => (o != null && o.sponsorLogo && (h(!0), g.current = setTimeout(() => {
333
+ h(!1);
334
+ }, 5e3)), () => clearTimeout(g.current)), [o == null ? void 0 : o.sponsorLogo]);
335
+ const c = _[t];
336
+ if (!c || !o || !o.notification)
337
+ return null;
338
+ const { title: ls, image: ds, imageMode: C, useContentMedia: f } = o.notification, ps = t === I.FACTOID ? a == null ? void 0 : a.heading : ls, ms = t === I.FACTOID ? a == null ? void 0 : a.body : "", us = ds, k = t === I.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && f === L.ENABLED, N = f === L.ENABLED ? k ? (m = a == null ? void 0 : a.video) == null ? void 0 : m.url : a == null ? void 0 : a.image : "";
339
+ return o != null && o.sponsorLogo && $ ? /* @__PURE__ */ s(
340
+ Fe,
341
+ {
342
+ sponsorLogo: o == null ? void 0 : o.sponsorLogo,
343
+ webos: d,
344
+ onClick: () => h(!1)
345
+ }
346
+ ) : /* @__PURE__ */ l(
347
+ X,
348
+ {
349
+ "data-a": "intr",
350
+ className: "SL_InApp",
351
+ onClick: (vs) => {
352
+ d && (e == null || e(vs));
353
+ },
354
+ "data-is-insight": t === I.FACTOID,
355
+ "data-webos": d,
356
+ children: [
357
+ (o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(Ee, { children: /* @__PURE__ */ s(Z, { src: o == null ? void 0 : o.sponsorLogo }) }),
358
+ /* @__PURE__ */ l(J, { children: [
359
+ /* @__PURE__ */ l($e, { children: [
360
+ !N && /* @__PURE__ */ s(j, { src: us, imageMode: C, withVideo: !!k, color: p }),
361
+ N && /* @__PURE__ */ s(
362
+ j,
363
+ {
364
+ src: N,
365
+ imageMode: C,
366
+ withVideo: !!k,
367
+ color: p,
368
+ useContentMedia: f,
369
+ thumbnailUrl: (u = a == null ? void 0 : a.video) == null ? void 0 : u.thumbnailUrl
370
+ }
371
+ ),
372
+ /* @__PURE__ */ s(
373
+ Pe,
374
+ {
375
+ questionTypeData: c,
376
+ questionType: t,
377
+ title: ps,
378
+ description: ms,
379
+ imageMode: C,
380
+ webos: d
381
+ }
382
+ )
383
+ ] }),
384
+ !d && /* @__PURE__ */ s(we, { name: "chevronRight" }),
385
+ d && /* @__PURE__ */ l(Me, { children: [
386
+ /* @__PURE__ */ s(ze, { webos: !0, "data-close-btn": "true", onClick: i, children: "Dismiss" }),
387
+ /* @__PURE__ */ s(Ve, { webos: !0, autoFocus: !0, onClick: e, children: "Answer" })
388
+ ] })
389
+ ] })
390
+ ]
391
+ }
392
+ );
393
+ }, We = /* @__PURE__ */ n("div")({
142
394
  name: "NotificationContainer",
143
395
  class: "n11jcrxe",
144
396
  propsAsIs: !1
145
- }), C = /* @__PURE__ */ s("img")({
397
+ }), P = /* @__PURE__ */ n("img")({
146
398
  name: "Icon",
147
399
  class: "i1vmpt6u",
148
400
  propsAsIs: !1
149
- }), Ne = /* @__PURE__ */ s("div")({
401
+ }), Ye = /* @__PURE__ */ n("div")({
150
402
  name: "IconContainer",
151
403
  class: "i180665s",
152
404
  propsAsIs: !1
153
- }), be = () => u, Ce = /* @__PURE__ */ s(be())({
405
+ }), _e = () => A, Ke = /* @__PURE__ */ n(_e())({
154
406
  name: "TitleIcon",
155
407
  class: "t16zzzei",
156
408
  propsAsIs: !0
157
- }), we = () => U, qe = /* @__PURE__ */ s(we())({
409
+ }), Ge = () => gs, He = /* @__PURE__ */ n(Ge())({
158
410
  name: "Close",
159
411
  class: "c1sur0q2",
160
412
  propsAsIs: !0
161
- }), Se = /* @__PURE__ */ s("div")({
413
+ }), Je = /* @__PURE__ */ n("div")({
162
414
  name: "Body",
163
415
  class: "bai9j52",
164
416
  propsAsIs: !1
165
- }), Ee = /* @__PURE__ */ s("div")({
417
+ }), Xe = /* @__PURE__ */ n("div")({
166
418
  name: "Title",
167
419
  class: "t1bnt25p",
168
420
  propsAsIs: !1
169
- }), xe = /* @__PURE__ */ s("div")({
421
+ }), Ze = /* @__PURE__ */ n("div")({
170
422
  name: "Description",
171
423
  class: "dmixjec",
172
424
  propsAsIs: !1
173
- }), Me = /* @__PURE__ */ s("button")({
425
+ }), sn = /* @__PURE__ */ n("button")({
174
426
  name: "Button",
175
427
  class: "b1ubkw1q",
176
428
  propsAsIs: !1
177
- }), je = ({
178
- open: t,
429
+ }), en = ({
430
+ open: e,
179
431
  close: i,
180
- ...o
432
+ ...t
181
433
  }) => {
182
- var a, n;
183
- return /* @__PURE__ */ c(
184
- ke,
434
+ var o, a;
435
+ return /* @__PURE__ */ l(
436
+ We,
185
437
  {
186
438
  "data-a": "intr",
187
439
  onClick: () => {
188
- t == null || t(), o && (o.instantOpen = !0);
440
+ e == null || e(), t && t.markIstantOpen();
189
441
  },
190
442
  children: [
191
- /* @__PURE__ */ c(Ne, { children: [
192
- /* @__PURE__ */ e(C, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
193
- /* @__PURE__ */ e(
194
- C,
443
+ /* @__PURE__ */ l(Ye, { children: [
444
+ /* @__PURE__ */ s(P, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
445
+ /* @__PURE__ */ s(
446
+ P,
195
447
  {
196
448
  className: "on-dark",
197
449
  src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
198
450
  }
199
451
  )
200
452
  ] }),
201
- /* @__PURE__ */ c(Se, { children: [
202
- /* @__PURE__ */ c(Ee, { children: [
203
- /* @__PURE__ */ e(Ce, { name: "icon-trophy-solid" }),
204
- (a = o == null ? void 0 : o.titleCard) == null ? void 0 : a.title
453
+ /* @__PURE__ */ l(Je, { children: [
454
+ /* @__PURE__ */ l(Xe, { children: [
455
+ /* @__PURE__ */ s(Ke, { name: "icon-trophy-solid" }),
456
+ (o = t == null ? void 0 : t.titleCard) == null ? void 0 : o.title
205
457
  ] }),
206
- /* @__PURE__ */ c(xe, { children: [
207
- /* @__PURE__ */ e("span", { children: (n = o == null ? void 0 : o.titleCard) == null ? void 0 : n.subtitle }),
208
- /* @__PURE__ */ e(Me, { name: "inapp-button", children: "Play Now" })
458
+ /* @__PURE__ */ l(Ze, { children: [
459
+ /* @__PURE__ */ s("span", { children: (a = t == null ? void 0 : t.titleCard) == null ? void 0 : a.subtitle }),
460
+ /* @__PURE__ */ s(sn, { name: "inapp-button", children: "Play Now" })
209
461
  ] })
210
462
  ] }),
211
- /* @__PURE__ */ e(
212
- qe,
463
+ /* @__PURE__ */ s(
464
+ He,
213
465
  {
214
- close: (d) => {
215
- d == null || d.stopPropagation(), i == null || i();
466
+ close: (p) => {
467
+ p == null || p.stopPropagation(), i == null || i();
216
468
  }
217
469
  }
218
470
  )
219
471
  ]
220
472
  }
221
473
  );
222
- }, ze = /* @__PURE__ */ s("div")({
474
+ }, nn = /* @__PURE__ */ n("div")({
223
475
  name: "Container",
224
476
  class: "cef8huz",
225
477
  propsAsIs: !1
226
- }), De = () => u, Le = /* @__PURE__ */ s(De())({
478
+ }), on = () => A, tn = /* @__PURE__ */ n(on())({
227
479
  name: "CheckIcon",
228
480
  class: "c1mo15kk",
229
481
  propsAsIs: !0
230
- }), Oe = () => u, Re = /* @__PURE__ */ s(Oe())({
482
+ }), an = () => A, rn = /* @__PURE__ */ n(an())({
231
483
  name: "PredictionIcon",
232
484
  class: "p16zkqnm",
233
485
  propsAsIs: !0
234
- }), Be = /* @__PURE__ */ s("div")({
486
+ }), cn = /* @__PURE__ */ n("div")({
235
487
  name: "PredictionIconContainer",
236
488
  class: "pjszi7a",
237
489
  propsAsIs: !1
238
- }), Pe = /* @__PURE__ */ s("div")({
490
+ }), ln = /* @__PURE__ */ n("div")({
239
491
  name: "BodyContainer",
240
492
  class: "bftbmo3",
241
493
  propsAsIs: !1
242
- }), Qe = /* @__PURE__ */ s("div")({
494
+ }), dn = /* @__PURE__ */ n("div")({
243
495
  name: "Body",
244
496
  class: "barrbyu",
245
497
  propsAsIs: !1
246
- }), Ue = /* @__PURE__ */ s("div")({
498
+ }), pn = /* @__PURE__ */ n("div")({
247
499
  name: "Subtitle",
248
500
  class: "sz7237i",
249
501
  propsAsIs: !1
250
- }), Ve = ({
251
- step: t,
502
+ }), mn = ({
503
+ step: e,
252
504
  children: i,
253
- answer: o,
254
- state: a = "pending"
505
+ answer: t,
506
+ state: o = "pending"
255
507
  }) => {
256
- const [n, d] = y(0), [l] = y(() => new ResizeObserver((p) => {
508
+ const [a, p] = w(0), [d] = w(() => new ResizeObserver((m) => {
257
509
  window.requestAnimationFrame(() => {
258
- var I, v;
259
- d((v = (I = p == null ? void 0 : p[0]) == null ? void 0 : I.contentRect) == null ? void 0 : v.width);
510
+ var u, $;
511
+ p((($ = (u = m == null ? void 0 : m[0]) == null ? void 0 : u.contentRect) == null ? void 0 : $.width) ?? 0);
260
512
  });
261
- })), r = L((p) => {
262
- p || l.disconnect(), l.observe(p);
263
- }, [l]);
264
- return E(() => () => {
265
- l.disconnect();
266
- }, [l]), /* @__PURE__ */ c(ze, {
267
- children: [/* @__PURE__ */ e(Be, {
268
- children: /* @__PURE__ */ e(Re, {
513
+ })), r = Ns((m) => {
514
+ m ? d.observe(m) : d.disconnect();
515
+ }, [d]);
516
+ return y(() => () => {
517
+ d.disconnect();
518
+ }, [d]), /* @__PURE__ */ l(nn, {
519
+ children: [/* @__PURE__ */ s(cn, {
520
+ children: /* @__PURE__ */ s(rn, {
269
521
  name: "icon-prediction"
270
522
  })
271
- }), /* @__PURE__ */ e(Pe, {
523
+ }), /* @__PURE__ */ s(ln, {
272
524
  style: {
273
- minWidth: `${n}px`
525
+ minWidth: `${a}px`
274
526
  },
275
- children: /* @__PURE__ */ e(Qe, {
527
+ children: /* @__PURE__ */ s(dn, {
276
528
  children: i
277
- }, t)
278
- }), /* @__PURE__ */ e(Ue, {
529
+ }, e)
530
+ }), /* @__PURE__ */ s(pn, {
279
531
  ref: r,
280
- className: a,
281
- children: /* @__PURE__ */ c("div", {
282
- children: [/* @__PURE__ */ e(Le, {
532
+ className: o,
533
+ children: /* @__PURE__ */ l("div", {
534
+ children: [/* @__PURE__ */ s(tn, {
283
535
  name: "icon-check"
284
- }), "Your Pick: ", o]
536
+ }), "Your Pick: ", t]
285
537
  })
286
538
  })]
287
539
  });
288
- }, Fe = /* @__PURE__ */ s("div")({
540
+ }, un = /* @__PURE__ */ n("div")({
289
541
  name: "Container",
290
542
  class: "ckyzolp",
291
543
  propsAsIs: !1
292
- }), g = /* @__PURE__ */ s("div")({
544
+ }), x = /* @__PURE__ */ n("div")({
293
545
  name: "Line",
294
546
  class: "l16t1zr7",
295
547
  propsAsIs: !1
296
- }), We = () => g, Ge = /* @__PURE__ */ s(We())({
548
+ }), vn = () => x, An = /* @__PURE__ */ n(vn())({
297
549
  name: "Line1",
298
550
  class: "le78kvg",
299
551
  propsAsIs: !0
300
- }), Ke = () => g, Ye = /* @__PURE__ */ s(Ke())({
552
+ }), hn = () => x, In = /* @__PURE__ */ n(hn())({
301
553
  name: "Line2",
302
554
  class: "l1o7966d",
303
555
  propsAsIs: !0
304
- }), _e = () => g, He = /* @__PURE__ */ s(_e())({
556
+ }), $n = () => x, gn = /* @__PURE__ */ n($n())({
305
557
  name: "Line3",
306
558
  class: "lu9lyxq",
307
559
  propsAsIs: !0
308
- }), Je = () => /* @__PURE__ */ c(Fe, {
309
- children: [/* @__PURE__ */ e(Ge, {
310
- children: /* @__PURE__ */ e("div", {})
311
- }), /* @__PURE__ */ e(Ye, {
312
- children: /* @__PURE__ */ e("div", {})
313
- }), /* @__PURE__ */ e(He, {
314
- children: /* @__PURE__ */ e("div", {})
560
+ }), wn = () => /* @__PURE__ */ l(un, {
561
+ children: [/* @__PURE__ */ s(An, {
562
+ children: /* @__PURE__ */ s("div", {})
563
+ }), /* @__PURE__ */ s(In, {
564
+ children: /* @__PURE__ */ s("div", {})
565
+ }), /* @__PURE__ */ s(gn, {
566
+ children: /* @__PURE__ */ s("div", {})
315
567
  })]
316
- }), Xe = /* @__PURE__ */ s("div")({
568
+ }), yn = /* @__PURE__ */ n("div")({
317
569
  name: "Container",
318
570
  class: "c10jy6zf",
319
571
  propsAsIs: !1
320
- }), Ze = () => u, es = /* @__PURE__ */ s(Ze())({
572
+ }), Tn = () => A, bn = /* @__PURE__ */ n(Tn())({
321
573
  name: "CheckIcon",
322
574
  class: "c1c7scay",
323
575
  propsAsIs: !0
324
- }), ss = () => /* @__PURE__ */ c(Xe, {
325
- children: [/* @__PURE__ */ e(es, {
576
+ }), Cn = () => /* @__PURE__ */ l(yn, {
577
+ children: [/* @__PURE__ */ s(bn, {
326
578
  name: "icon-check"
327
579
  }), " Prediction results are in!"]
328
- }), ns = /* @__PURE__ */ s("div")({
580
+ }), fn = /* @__PURE__ */ n("div")({
329
581
  name: "Container",
330
582
  class: "cf6k2yy",
331
583
  propsAsIs: !1
332
- }), ts = /* @__PURE__ */ s("div")({
584
+ }), kn = /* @__PURE__ */ n("div")({
333
585
  name: "Caption",
334
586
  class: "c1c8xjus",
335
587
  propsAsIs: !1
336
- }), is = /* @__PURE__ */ s("div")({
588
+ }), Nn = /* @__PURE__ */ n("div")({
337
589
  name: "Title",
338
590
  class: "t1d1uekn",
339
591
  propsAsIs: !1
340
- }), os = ({
341
- title: t
342
- }) => /* @__PURE__ */ c(ns, {
343
- children: [/* @__PURE__ */ e(ts, {
592
+ }), qn = ({
593
+ title: e
594
+ }) => /* @__PURE__ */ l(fn, {
595
+ children: [/* @__PURE__ */ s(kn, {
344
596
  children: "Results for"
345
- }), /* @__PURE__ */ e(is, {
346
- children: t
597
+ }), /* @__PURE__ */ s(Nn, {
598
+ children: e
347
599
  })]
348
- }), j = /* @__PURE__ */ s("div")({
600
+ }), es = /* @__PURE__ */ n("div")({
349
601
  name: "Container",
350
602
  class: "c181a1as",
351
603
  propsAsIs: !1
352
- }), z = /* @__PURE__ */ s("div")({
604
+ }), ns = /* @__PURE__ */ n("div")({
353
605
  name: "Title",
354
606
  class: "t1cduox6",
355
607
  propsAsIs: !1
356
- }), as = () => u, D = /* @__PURE__ */ s(as())({
608
+ }), Ln = () => A, os = /* @__PURE__ */ n(Ln())({
357
609
  name: "CorrectIcon",
358
610
  class: "c1onrv6j",
359
611
  propsAsIs: !0
360
- }), cs = () => D, rs = /* @__PURE__ */ s(cs())({
612
+ }), Sn = () => os, En = /* @__PURE__ */ n(Sn())({
361
613
  name: "InCorrectIcon",
362
614
  class: "i17n9o7e",
363
615
  propsAsIs: !0
364
- }), ls = () => /* @__PURE__ */ c(j, {
365
- children: [/* @__PURE__ */ c(z, {
366
- children: ["Congratulations!", /* @__PURE__ */ e("br", {}), "You answered correctly."]
367
- }), /* @__PURE__ */ e(D, {
616
+ }), xn = () => /* @__PURE__ */ l(es, {
617
+ children: [/* @__PURE__ */ l(ns, {
618
+ children: ["Congratulations!", /* @__PURE__ */ s("br", {}), "You answered correctly."]
619
+ }), /* @__PURE__ */ s(os, {
368
620
  name: "icon-check"
369
621
  })]
370
- }), ds = ({
371
- title: t
372
- }) => /* @__PURE__ */ c(j, {
373
- children: [/* @__PURE__ */ c(z, {
374
- children: ["Better luck next time!", /* @__PURE__ */ e("br", {}), "Correct: ", t]
375
- }), /* @__PURE__ */ e(rs, {
622
+ }), Dn = ({
623
+ title: e
624
+ }) => /* @__PURE__ */ l(es, {
625
+ children: [/* @__PURE__ */ l(ns, {
626
+ children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", e]
627
+ }), /* @__PURE__ */ s(En, {
376
628
  name: "icon-cross"
377
629
  })]
378
- }), ps = /* @__PURE__ */ s("div")({
630
+ }), Mn = /* @__PURE__ */ n("div")({
379
631
  name: "Container",
380
632
  class: "cnxgcs2",
381
633
  propsAsIs: !1
382
- }), ms = /* @__PURE__ */ s("div")({
634
+ }), On = /* @__PURE__ */ n("div")({
383
635
  name: "Title",
384
636
  class: "t903f8n",
385
637
  propsAsIs: !1
386
- }), us = () => u, Is = /* @__PURE__ */ s(us())({
638
+ }), Rn = () => A, Bn = /* @__PURE__ */ n(Rn())({
387
639
  name: "CheckIcon",
388
640
  class: "ceyu3qj",
389
641
  propsAsIs: !0
390
- }), vs = ({
391
- points: t
392
- }) => /* @__PURE__ */ c(ps, {
393
- children: [/* @__PURE__ */ c(ms, {
394
- children: ["You won ", /* @__PURE__ */ e(V, {
642
+ }), jn = ({
643
+ points: e
644
+ }) => /* @__PURE__ */ l(Mn, {
645
+ children: [/* @__PURE__ */ l(On, {
646
+ children: ["You won ", /* @__PURE__ */ s(ws, {
395
647
  delay: 0.5,
396
648
  prefix: "+",
397
649
  suffix: " points",
398
- value: t
650
+ value: e
399
651
  })]
400
- }), /* @__PURE__ */ e(Is, {
652
+ }), /* @__PURE__ */ s(Bn, {
401
653
  name: "icon-trophy-solid"
402
654
  })]
403
- }), w = /* @__PURE__ */ s("div")({
655
+ }), U = /* @__PURE__ */ n("div")({
404
656
  name: "Container",
405
657
  class: "cq3agu2",
406
658
  propsAsIs: !1
407
- }), q = /* @__PURE__ */ s("div")({
659
+ }), z = /* @__PURE__ */ n("div")({
408
660
  name: "Body",
409
661
  class: "b16qj0do",
410
662
  propsAsIs: !1
411
- }), S = {
663
+ }), V = {
412
664
  1: 3e3,
413
665
  2: 4e3,
414
666
  3: 4e3,
415
667
  4: 4e3
416
- }, hs = ({ close: t, action: i, setStep: o, votedAnswer: a, correct: n, correctAnswerTitle: d, questionTitle: l, step: r }) => {
417
- if (x(() => {
418
- if (o) {
419
- const I = setTimeout(() => {
420
- S[r + 1] && (n || r < 3) ? o(r + 1) : t == null || t();
421
- }, S[r]);
668
+ }, Pn = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
669
+ if (y(() => {
670
+ if (t) {
671
+ const u = setTimeout(() => {
672
+ V[r + 1] && (a || r < 3) ? t(r + 1) : e == null || e();
673
+ }, V[r]);
422
674
  return () => {
423
- I && clearTimeout(I);
675
+ u && clearTimeout(u);
424
676
  };
425
677
  }
426
678
  return () => {
427
679
  };
428
- }, [o, r, t, n]), r === 1)
429
- return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(ss, {}) }) });
430
- let p = "pending";
431
- return (r === 3 || r === 4) && (p = n ? "correct" : "incorrect"), /* @__PURE__ */ e(w, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ c(q, { children: [
432
- r !== 1 && /* @__PURE__ */ e(Je, {}, r),
433
- /* @__PURE__ */ c(Ve, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
434
- r === 2 && /* @__PURE__ */ e(os, { title: l || "unknown" }),
435
- r === 3 && n && /* @__PURE__ */ e(ls, {}),
436
- r === 3 && !n && /* @__PURE__ */ e(ds, { title: d || "unknown" }),
437
- r === 4 && /* @__PURE__ */ e(vs, { points: (a == null ? void 0 : a.points) || 0 })
680
+ }, [t, r, e, a]), r === 1)
681
+ return /* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(z, { children: /* @__PURE__ */ s(Cn, {}) }) });
682
+ let m = "pending";
683
+ return (r === 3 || r === 4) && (m = a ? "correct" : "incorrect"), /* @__PURE__ */ s(U, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(z, { children: [
684
+ r !== 1 && /* @__PURE__ */ s(wn, {}, r),
685
+ /* @__PURE__ */ l(mn, { state: m, step: r, answer: (o == null ? void 0 : o.title) || "unknown", children: [
686
+ r === 2 && /* @__PURE__ */ s(qn, { title: d || "unknown" }),
687
+ r === 3 && a && /* @__PURE__ */ s(xn, {}),
688
+ r === 3 && !a && /* @__PURE__ */ s(Dn, { title: p || "unknown" }),
689
+ r === 4 && /* @__PURE__ */ s(jn, { points: (o == null ? void 0 : o.points) || 0 })
438
690
  ] })
439
691
  ] }) });
440
- }, As = ({ close: t, action: i, votedAnswer: o, correct: a, correctAnswerTitle: n, questionTitle: d }) => {
441
- const [l, r] = y(1);
442
- return /* @__PURE__ */ e(
443
- hs,
692
+ }, Un = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
693
+ const [d, r] = w(1);
694
+ return /* @__PURE__ */ s(
695
+ Pn,
444
696
  {
445
- close: t,
697
+ close: e,
446
698
  action: i,
447
- votedAnswer: o,
448
- correct: a,
449
- correctAnswerTitle: n,
450
- questionTitle: d,
699
+ votedAnswer: t,
700
+ correct: o,
701
+ correctAnswerTitle: a,
702
+ questionTitle: p,
451
703
  setStep: r,
452
- step: l,
704
+ step: d,
453
705
  title: ""
454
706
  }
455
707
  );
456
- }, $s = /* @__PURE__ */ s("div")({
708
+ }, zn = /* @__PURE__ */ n("div")({
457
709
  name: "NotificationContainer",
458
710
  class: "n1i4h28u",
459
711
  propsAsIs: !1
460
- }), ys = (t) => /* @__PURE__ */ e($s, { children: /* @__PURE__ */ e(As, { ...t }) }), fs = ({ sdk: t }) => {
461
- const [i] = y(t.getNotificationsStore()), o = F(i), a = t.getFeature(J.GAMES), n = E(() => t.getActiveNotification(), [t, o]);
462
- return x(() => {
463
- n && W.emit("notification", {
712
+ }), Vn = (e) => /* @__PURE__ */ s(zn, { children: /* @__PURE__ */ s(Un, { ...e }) }), Fn = /* @__PURE__ */ n("div")({
713
+ name: "Container",
714
+ class: "cwa9tgs",
715
+ propsAsIs: !1
716
+ }), Qn = /* @__PURE__ */ n("div")({
717
+ name: "BodyContainer",
718
+ class: "b1xx7swj",
719
+ propsAsIs: !1
720
+ }), Wn = /* @__PURE__ */ n("div")({
721
+ name: "Body",
722
+ class: "b1a21en",
723
+ propsAsIs: !1
724
+ }), Yn = ({
725
+ step: e,
726
+ children: i,
727
+ state: t = "pending"
728
+ }) => {
729
+ const [o, a] = w(0);
730
+ return y(() => {
731
+ const p = new ResizeObserver((d) => {
732
+ window.requestAnimationFrame(() => {
733
+ var r, m;
734
+ const u = ((m = (r = d == null ? void 0 : d[0]) == null ? void 0 : r.contentRect) == null ? void 0 : m.width) ?? 0;
735
+ a(u);
736
+ });
737
+ });
738
+ return () => {
739
+ p.disconnect();
740
+ };
741
+ }, []), /* @__PURE__ */ s(Fn, {
742
+ style: {
743
+ padding: `${e === 3 && t === "incorrect" || e === 1 ? "5px 100px" : "5px 40px"}`
744
+ },
745
+ children: /* @__PURE__ */ s(Qn, {
746
+ style: {
747
+ minWidth: `${o}px`
748
+ },
749
+ children: /* @__PURE__ */ s(Wn, {
750
+ children: i
751
+ }, e)
752
+ })
753
+ });
754
+ }, _n = /* @__PURE__ */ n("div")({
755
+ name: "Container",
756
+ class: "c1nd5cu8",
757
+ propsAsIs: !1
758
+ }), D = /* @__PURE__ */ n("div")({
759
+ name: "Line",
760
+ class: "lgbipw0",
761
+ propsAsIs: !1
762
+ }), Kn = () => D, Gn = /* @__PURE__ */ n(Kn())({
763
+ name: "Line1",
764
+ class: "l1anth16",
765
+ propsAsIs: !0
766
+ }), Hn = () => D, Jn = /* @__PURE__ */ n(Hn())({
767
+ name: "Line2",
768
+ class: "l193yd7v",
769
+ propsAsIs: !0
770
+ }), Xn = () => D, Zn = /* @__PURE__ */ n(Xn())({
771
+ name: "Line3",
772
+ class: "lhbflsp",
773
+ propsAsIs: !0
774
+ }), so = () => /* @__PURE__ */ l(_n, {
775
+ children: [/* @__PURE__ */ s(Gn, {
776
+ children: /* @__PURE__ */ s("div", {})
777
+ }), /* @__PURE__ */ s(Jn, {
778
+ children: /* @__PURE__ */ s("div", {})
779
+ }), /* @__PURE__ */ s(Zn, {
780
+ children: /* @__PURE__ */ s("div", {})
781
+ })]
782
+ }), eo = /* @__PURE__ */ n("div")({
783
+ name: "Container",
784
+ class: "c1lvd429",
785
+ propsAsIs: !1
786
+ }), no = () => A, oo = /* @__PURE__ */ n(no())({
787
+ name: "PredictionIcon",
788
+ class: "p1n4m87t",
789
+ propsAsIs: !0
790
+ }), io = () => /* @__PURE__ */ l(eo, {
791
+ children: [/* @__PURE__ */ s(oo, {
792
+ name: "icon-prediction"
793
+ }), " Prediction results are in!"]
794
+ }), to = () => A, ao = /* @__PURE__ */ n(to())({
795
+ name: "CheckIcon",
796
+ class: "c126r8f9",
797
+ propsAsIs: !0
798
+ }), ro = /* @__PURE__ */ n("div")({
799
+ name: "Answer",
800
+ class: "a1o2rpgl",
801
+ propsAsIs: !1
802
+ }), co = /* @__PURE__ */ n("div")({
803
+ name: "Container",
804
+ class: "cej6ci1",
805
+ propsAsIs: !1
806
+ }), lo = /* @__PURE__ */ n("div")({
807
+ name: "Title",
808
+ class: "tob24mr",
809
+ propsAsIs: !1
810
+ }), po = ({
811
+ title: e,
812
+ answer: i
813
+ }) => /* @__PURE__ */ l(co, {
814
+ children: [/* @__PURE__ */ s(lo, {
815
+ children: e
816
+ }), /* @__PURE__ */ l(ro, {
817
+ children: [/* @__PURE__ */ s(ao, {
818
+ name: "icon-prediction"
819
+ }), "Your Pick: ", i]
820
+ })]
821
+ }), is = /* @__PURE__ */ n("div")({
822
+ name: "Container",
823
+ class: "c1lesal4",
824
+ propsAsIs: !1
825
+ }), ts = /* @__PURE__ */ n("div")({
826
+ name: "Title",
827
+ class: "tv66n4w",
828
+ propsAsIs: !1
829
+ }), mo = () => A, uo = /* @__PURE__ */ n(mo())({
830
+ name: "CorrectIcon",
831
+ class: "cx0vlv2",
832
+ propsAsIs: !0
833
+ }), as = /* @__PURE__ */ n("div")({
834
+ name: "Answer",
835
+ class: "akfh4v5",
836
+ propsAsIs: !1
837
+ }), vo = ({
838
+ answer: e
839
+ }) => /* @__PURE__ */ l(is, {
840
+ children: [/* @__PURE__ */ s(ts, {
841
+ children: "Congratulations! You answered correctly."
842
+ }), /* @__PURE__ */ l(as, {
843
+ children: [/* @__PURE__ */ s(uo, {
844
+ name: "icon-correct"
845
+ }), "Your Pick: ", e]
846
+ })]
847
+ }), Ao = ({
848
+ title: e,
849
+ answer: i
850
+ }) => /* @__PURE__ */ l(is, {
851
+ children: [/* @__PURE__ */ l(ts, {
852
+ children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", e]
853
+ }), /* @__PURE__ */ l(as, {
854
+ children: ["Your Pick: ", i]
855
+ })]
856
+ }), F = /* @__PURE__ */ n("div")({
857
+ name: "Container",
858
+ class: "cmox3ot",
859
+ propsAsIs: !1
860
+ }), Q = /* @__PURE__ */ n("div")({
861
+ name: "Body",
862
+ class: "bqq1ix4",
863
+ propsAsIs: !1
864
+ }), W = {
865
+ 1: 3e3,
866
+ 2: 4e3,
867
+ 3: 4e3
868
+ }, ho = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
869
+ if (y(() => {
870
+ if (t) {
871
+ const u = setTimeout(() => {
872
+ W[r + 1] && (a || r < 3) ? t(r + 1) : e == null || e();
873
+ }, W[r]);
874
+ return () => {
875
+ u && clearTimeout(u);
876
+ };
877
+ }
878
+ return () => {
879
+ };
880
+ }, [t, r, e, a]), r === 1)
881
+ return /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(io, {}) }) });
882
+ let m = "pending";
883
+ return r === 3 && (m = a ? "correct" : "incorrect"), /* @__PURE__ */ s(F, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(Q, { children: [
884
+ r !== 1 && /* @__PURE__ */ s(so, {}, r),
885
+ /* @__PURE__ */ l(Yn, { state: m, step: r, children: [
886
+ r === 2 && /* @__PURE__ */ s(po, { title: d || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" }),
887
+ r === 3 && a && /* @__PURE__ */ s(vo, { answer: (o == null ? void 0 : o.title) || "unknown" }),
888
+ r === 3 && !a && /* @__PURE__ */ s(Ao, { title: p || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" })
889
+ ] })
890
+ ] }) });
891
+ }, Io = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
892
+ const [d, r] = w(1);
893
+ return /* @__PURE__ */ s(
894
+ ho,
895
+ {
896
+ close: e,
897
+ action: i,
898
+ votedAnswer: t,
899
+ correct: o,
900
+ correctAnswerTitle: a,
901
+ questionTitle: p,
902
+ setStep: r,
903
+ step: d,
904
+ title: ""
905
+ }
906
+ );
907
+ }, rs = /* @__PURE__ */ n("div")({
908
+ name: "NotificationContainer",
909
+ class: "nn0nqh6",
910
+ propsAsIs: !1
911
+ }), $o = () => ({
912
+ withoutPadding: e
913
+ }) => e ? "0px" : "1rem", go = /* @__PURE__ */ n("div")({
914
+ name: "NotificationContent",
915
+ class: "n1bcdf3j",
916
+ propsAsIs: !1,
917
+ vars: {
918
+ "n1bcdf3j-0": [$o()]
919
+ }
920
+ }), cs = /* @__PURE__ */ n("img")({
921
+ name: "LogoImg",
922
+ class: "l8jorbq",
923
+ propsAsIs: !1
924
+ }), wo = () => rs, yo = /* @__PURE__ */ n(wo())({
925
+ name: "NotificationInterstitialContainer",
926
+ class: "nf920y3",
927
+ propsAsIs: !0
928
+ }), To = /* @__PURE__ */ n("div")({
929
+ name: "LogoImgContainer",
930
+ class: "lzsmehn",
931
+ propsAsIs: !1
932
+ }), bo = ({ sponsorLogo: e, onClick: i }) => /* @__PURE__ */ s(yo, { onClick: i, children: /* @__PURE__ */ s(go, { withoutPadding: !0, children: /* @__PURE__ */ s(cs, { src: e }) }) }), Co = (e) => {
933
+ var i, t, o, a, p;
934
+ const [d, r] = w(!1), m = K();
935
+ return y(() => {
936
+ var u;
937
+ return (u = e == null ? void 0 : e.inApp) != null && u.sponsorLogo && (r(!0), m.current = setTimeout(() => {
938
+ r(!1);
939
+ }, 5e3)), () => clearTimeout(m.current);
940
+ }, [(i = e == null ? void 0 : e.inApp) == null ? void 0 : i.sponsorLogo]), (t = e == null ? void 0 : e.inApp) != null && t.sponsorLogo && d ? /* @__PURE__ */ s(bo, { sponsorLogo: (o = e.inApp) == null ? void 0 : o.sponsorLogo, onClick: () => r(!1) }) : /* @__PURE__ */ s(rs, { children: /* @__PURE__ */ l("div", { children: [
941
+ ((a = e == null ? void 0 : e.inApp) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ s(To, { children: /* @__PURE__ */ s(cs, { src: (p = e == null ? void 0 : e.inApp) == null ? void 0 : p.sponsorLogo }) }),
942
+ /* @__PURE__ */ s(Io, { ...e })
943
+ ] }) });
944
+ }, fo = ({ sdk: e, webos: i }) => {
945
+ var t, o, a, p, d, r, m, u;
946
+ const [$] = w(e.getNotificationsStore()), h = ys($), g = e.getFeature(Ls.GAMES), c = qs(() => e.getActiveNotification(), [e, h]);
947
+ return y(() => {
948
+ c && Ts.emit("notification", {
464
949
  action: "rendered",
465
950
  payload: {
466
- questionId: n.data.questionId,
467
- questionType: n.data.questionType
951
+ questionId: c.data.questionId,
952
+ questionType: c.data.questionType
468
953
  }
469
954
  });
470
- }, [n]), n && n.type === k.QUESTION_RESOLVED ? n.data.question && n.data.questionType === A.PREDICTION ? /* @__PURE__ */ e(
471
- ys,
955
+ }, [c]), c && c.type === M.QUESTION_RESOLVED ? c.data.question && c.data.questionType === I.PREDICTION ? c && ((t = c.data.inApp) == null ? void 0 : t.adUnit) === O.STANDART ? /* @__PURE__ */ s(
956
+ Co,
957
+ {
958
+ action: c.action,
959
+ close: c.close,
960
+ ...c.data.question,
961
+ inApp: c.data.inApp
962
+ }
963
+ ) : /* @__PURE__ */ s(
964
+ Vn,
965
+ {
966
+ action: c.action,
967
+ close: c.close,
968
+ ...c.data.question
969
+ }
970
+ ) : null : c && c.type === M.ONBOARDING ? c.data.onboarding ? /* @__PURE__ */ s(
971
+ en,
972
+ {
973
+ open: g == null ? void 0 : g.openOnboarding,
974
+ close: c.close,
975
+ ...c.data.onboarding
976
+ }
977
+ ) : null : c && ((o = c.data.inApp) == null ? void 0 : o.adUnit) === O.STANDART ? /* @__PURE__ */ s(
978
+ Qe,
472
979
  {
473
- action: n.action,
474
- close: n.close,
475
- ...n.data.question
980
+ ...c.data,
981
+ action: c.action,
982
+ close: c.close,
983
+ color: ((d = (p = (a = c == null ? void 0 : c.data) == null ? void 0 : a.inApp) == null ? void 0 : p.notification) == null ? void 0 : d.indicatorColor) || ((u = (m = (r = c == null ? void 0 : c.data) == null ? void 0 : r.inApp) == null ? void 0 : m.appearance) == null ? void 0 : u.primaryColor),
984
+ webos: i
476
985
  }
477
- ) : null : n && n.type === k.ONBOARDING ? n.data.onboarding ? /* @__PURE__ */ e(je, { open: a == null ? void 0 : a.openFeature, close: n.close, ...n.data.onboarding }) : null : n && /* @__PURE__ */ e(Te, { ...n.data, action: n.action });
478
- }, bs = ({ theme: t }) => {
479
- const i = G(), o = K(), a = Y();
480
- return i && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(_, { customTheme: t ?? o.theme, themeMode: o.themeMode, children: /* @__PURE__ */ e(fs, { sdk: i }) }) }) : null;
986
+ ) : c && /* @__PURE__ */ s(se, { ...c.data, action: c.action });
987
+ }, So = ({ theme: e }) => {
988
+ const i = bs(), t = Cs(), o = fs();
989
+ return i && (o.appNotification || o.onboardingNotification) ? o.app && !o.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(ks, { customTheme: e ?? t.theme, themeMode: t.themeMode, children: /* @__PURE__ */ s(fo, { sdk: i }) }) }) : null;
481
990
  };
482
991
  export {
483
- bs as StreamLayerSDKNotification,
484
- fs as StreamLayerSDKNotificationUI
992
+ So as StreamLayerSDKNotification,
993
+ fo as StreamLayerSDKNotificationUI
485
994
  };