@streamlayer/react 1.13.1 → 1.14.1

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 (54) hide show
  1. package/lib/app/provider.d.ts +1 -0
  2. package/lib/app/useStreamLayerApp.d.ts +2 -1
  3. package/lib/cjs/advertisement.js +223 -1
  4. package/lib/cjs/bet-pack.js +1 -1
  5. package/lib/cjs/gamification-feature2.js +1 -1
  6. package/lib/cjs/index2.js +5 -5
  7. package/lib/cjs/masters2.js +3 -8
  8. package/lib/cjs/notification.js +1 -1
  9. package/lib/cjs/points.js +1 -1
  10. package/lib/cjs/provider.js +16 -28
  11. package/lib/cjs/useStreamLayerApp2.js +11 -11
  12. package/lib/classic/app/provider.d.ts +1 -0
  13. package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
  14. package/lib/classic/cjs/advertisement.js +223 -1
  15. package/lib/classic/cjs/bet-pack.js +1 -1
  16. package/lib/classic/cjs/gamification-feature2.js +1 -1
  17. package/lib/classic/cjs/index2.js +5 -5
  18. package/lib/classic/cjs/masters2.js +3 -8
  19. package/lib/classic/cjs/notification.js +1 -1
  20. package/lib/classic/cjs/points.js +1 -1
  21. package/lib/classic/cjs/provider.js +16 -28
  22. package/lib/classic/cjs/useStreamLayerApp2.js +11 -11
  23. package/lib/classic/es/advertisement.js +40824 -557
  24. package/lib/classic/es/bet-pack.js +1 -1
  25. package/lib/classic/es/gamification-feature2.js +1 -1
  26. package/lib/classic/es/index.js +4 -4
  27. package/lib/classic/es/index2.js +1125 -1088
  28. package/lib/classic/es/masters2.js +385 -439
  29. package/lib/classic/es/notification.js +205 -191
  30. package/lib/classic/es/points.js +39 -32
  31. package/lib/classic/es/provider.js +3852 -3908
  32. package/lib/classic/es/useStreamLayerApp.js +1 -1
  33. package/lib/classic/es/useStreamLayerApp2.js +3422 -3355
  34. package/lib/classic/style.css +1 -1
  35. package/lib/dist/cjs/gamification-feature.js +1 -1
  36. package/lib/dist/cjs/gamification-feature2.js +1 -1
  37. package/lib/dist/cjs/masters.js +29 -46
  38. package/lib/dist/es/gamification-feature.js +1 -1
  39. package/lib/dist/es/gamification-feature2.js +46 -46
  40. package/lib/dist/es/masters.js +8856 -8843
  41. package/lib/dist/style.css +1 -1
  42. package/lib/es/advertisement.js +40824 -557
  43. package/lib/es/bet-pack.js +1 -1
  44. package/lib/es/gamification-feature2.js +1 -1
  45. package/lib/es/index.js +4 -4
  46. package/lib/es/index2.js +1125 -1088
  47. package/lib/es/masters2.js +385 -439
  48. package/lib/es/notification.js +205 -191
  49. package/lib/es/points.js +39 -32
  50. package/lib/es/provider.js +3955 -4011
  51. package/lib/es/useStreamLayerApp.js +1 -1
  52. package/lib/es/useStreamLayerApp2.js +3422 -3355
  53. package/lib/style.css +1 -1
  54. package/package.json +16 -16
@@ -1,468 +1,482 @@
1
- import { Z as m, s as e, a0 as L, a1 as z, a2 as B, E as O, a3 as R, f as P, d as Q, a as U, g as V, N as T, u as F, b as W, i as G, h as K } from "./provider.js";
2
- import { k as p, Q as I, l as Y, S as _ } from "./useStreamLayerApp2.js";
3
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
4
- import { useState as q, useEffect as E, useMemo as Z } from "react";
5
- const h = /* @__PURE__ */ e("div")({
1
+ import { c as u, s, X as L, Z as O, _ as R, C as B, $ as P, O as Q, e as U, a as V, f as F, N as C, u as W, b as _, Q as G, h as K } from "./provider.js";
2
+ import { k as m, Q as A, l as Y, S as X } from "./useStreamLayerApp2.js";
3
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
4
+ import { useState as y, useCallback as Z, useMemo as E, useEffect as x } from "react";
5
+ const $ = /* @__PURE__ */ s("div")({
6
6
  name: "Media",
7
7
  class: "m1bcvojl",
8
8
  propsAsIs: !1
9
- }), H = () => h, J = /* @__PURE__ */ e(H())({
9
+ }), H = () => $, J = /* @__PURE__ */ s(H())({
10
10
  name: "MediaImgBottom",
11
11
  class: "m58gin0",
12
12
  propsAsIs: !0
13
- }), X = () => h, N = /* @__PURE__ */ e(X())({
13
+ }), ee = () => $, N = /* @__PURE__ */ s(ee())({
14
14
  name: "MediaImgSolid",
15
15
  class: "m1atm8do",
16
16
  propsAsIs: !0
17
- }), ss = () => h, es = /* @__PURE__ */ e(ss())({
17
+ }), se = () => $, ne = /* @__PURE__ */ s(se())({
18
18
  name: "MediaImgRounded",
19
19
  class: "myx3xoi",
20
20
  propsAsIs: !0
21
- }), ns = () => h, ts = /* @__PURE__ */ e(ns())({
21
+ }), te = () => $, oe = /* @__PURE__ */ s(te())({
22
22
  name: "MediaImgCentered",
23
23
  class: "m1bwv0gx",
24
24
  propsAsIs: !0
25
- }), os = () => h, is = /* @__PURE__ */ e(os())({
25
+ }), ie = () => $, ae = /* @__PURE__ */ s(ie())({
26
26
  name: "MediaImgInsight",
27
27
  class: "mntjanp",
28
28
  propsAsIs: !0
29
- }), as = /* @__PURE__ */ e("div")({
29
+ }), ce = /* @__PURE__ */ s("div")({
30
30
  name: "VideoIcon",
31
31
  class: "v1kofb47",
32
32
  propsAsIs: !1
33
- }), cs = {
34
- [p.UNSET]: N,
35
- [p.NONE]: N,
36
- [p.ROUNDED]: es,
37
- [p.CENTERED]: ts,
38
- [p.TRANSPARENT]: J
39
- }, C = ({
33
+ }), re = {
34
+ [m.UNSET]: N,
35
+ [m.NONE]: N,
36
+ [m.ROUNDED]: ne,
37
+ [m.CENTERED]: oe,
38
+ [m.TRANSPARENT]: J
39
+ }, b = ({
40
40
  src: t,
41
- imageMode: o = p.UNSET,
41
+ imageMode: o = m.UNSET,
42
42
  withVideo: i,
43
43
  fromInsight: a
44
44
  }) => {
45
- if (o === p.NONE)
45
+ if (o === m.NONE)
46
46
  return null;
47
- const n = a ? is : cs[o];
47
+ const n = a ? ae : re[o];
48
48
  return /* @__PURE__ */ c(n, {
49
- children: [/* @__PURE__ */ s("img", {
49
+ children: [/* @__PURE__ */ e("img", {
50
50
  src: t,
51
51
  alt: ""
52
- }), i && /* @__PURE__ */ s(as, {
53
- children: /* @__PURE__ */ s(m, {
52
+ }), i && /* @__PURE__ */ e(ce, {
53
+ children: /* @__PURE__ */ e(u, {
54
54
  name: "icon-play"
55
55
  })
56
56
  })]
57
57
  });
58
- }, rs = /* @__PURE__ */ e("div")({
58
+ }, le = /* @__PURE__ */ s("div")({
59
59
  name: "NotificationContent",
60
60
  class: "nuraq9m",
61
61
  propsAsIs: !1
62
- }), ls = /* @__PURE__ */ e("div")({
62
+ }), de = /* @__PURE__ */ s("div")({
63
63
  name: "NotificationContainer",
64
64
  class: "ns1nzpg",
65
65
  propsAsIs: !1
66
- }), M = /* @__PURE__ */ e("div")({
66
+ }), M = /* @__PURE__ */ s("div")({
67
67
  name: "Body",
68
68
  class: "b1j59nzs",
69
69
  propsAsIs: !1
70
- }), ds = /* @__PURE__ */ e("div")({
70
+ }), pe = /* @__PURE__ */ s("div")({
71
71
  name: "Title",
72
72
  class: "t9vmnpp",
73
73
  propsAsIs: !1
74
- }), ps = /* @__PURE__ */ e("button")({
74
+ }), me = /* @__PURE__ */ s("button")({
75
75
  name: "Button",
76
76
  class: "b14ivj5k",
77
77
  propsAsIs: !1
78
- }), ms = () => m, us = /* @__PURE__ */ e(ms())({
78
+ }), ue = () => u, Ie = /* @__PURE__ */ s(ue())({
79
79
  name: "StyledChevronRight",
80
80
  class: "s1atci8n",
81
81
  propsAsIs: !0
82
- }), Is = /* @__PURE__ */ e("div")({
82
+ }), ve = /* @__PURE__ */ s("div")({
83
83
  name: "QuoteWrap",
84
84
  class: "q4w8jgs",
85
85
  propsAsIs: !1
86
- }), hs = /* @__PURE__ */ e("blockquote")({
86
+ }), he = /* @__PURE__ */ s("blockquote")({
87
87
  name: "Quote",
88
88
  class: "qaa0kez",
89
89
  propsAsIs: !1
90
- }), vs = /* @__PURE__ */ e("div")({
90
+ }), Ae = /* @__PURE__ */ s("div")({
91
91
  name: "Body",
92
92
  class: "b1wvd52w",
93
93
  propsAsIs: !1
94
- }), As = /* @__PURE__ */ e("div")({
94
+ }), $e = /* @__PURE__ */ s("div")({
95
95
  name: "Container",
96
96
  class: "ccvukea",
97
97
  propsAsIs: !1
98
- }), $s = ({ image: t, tweet: o, account: i, accountVerified: a, body: n, title: l }) => {
99
- var d;
100
- return /* @__PURE__ */ c(As, { children: [
101
- l && /* @__PURE__ */ s(Is, { children: /* @__PURE__ */ s(hs, { children: l }) }),
102
- /* @__PURE__ */ s(
98
+ }), ye = ({ image: t, tweet: o, account: i, 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
103
  L,
104
104
  {
105
105
  image: t,
106
- name: (d = o == null ? void 0 : o.meta) == null ? void 0 : d.accountName,
106
+ name: (l = o == null ? void 0 : o.meta) == null ? void 0 : l.accountName,
107
107
  userName: i,
108
108
  verified: a,
109
109
  createdTweet: o == null ? void 0 : o.date
110
110
  }
111
111
  ),
112
- /* @__PURE__ */ s(vs, { children: z(n) })
112
+ /* @__PURE__ */ e(Ae, { children: O(n) })
113
113
  ] });
114
- }, ys = ({ title: t, questionType: o, questionTypeData: i }) => /* @__PURE__ */ c(M, { children: [
115
- /* @__PURE__ */ s(
116
- B,
114
+ }, fe = ({ title: t, questionType: o, questionTypeData: i }) => /* @__PURE__ */ c(M, { children: [
115
+ /* @__PURE__ */ e(
116
+ R,
117
117
  {
118
118
  questionTypeData: i,
119
119
  questionType: o,
120
120
  questionStatus: Y.UNSET
121
121
  }
122
122
  ),
123
- t && /* @__PURE__ */ s(ds, { children: t })
124
- ] }), fs = ({ tweet: t }) => t ? /* @__PURE__ */ s(M, { children: /* @__PURE__ */ s($s, { ...t, controlVideo: () => {
125
- } }) }) : null, gs = ({ action: t, questionType: o, inApp: i, insight: a, tweet: n }) => {
126
- var l;
127
- const d = O[o], r = R[o];
128
- if (!d || !i || !i.notification)
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: o, inApp: i, insight: a, tweet: n }) => {
126
+ var d;
127
+ const l = B[o], r = P[o];
128
+ if (!l || !i || !i.notification)
129
129
  return null;
130
- const { title: v, image: A, imageMode: f } = i.notification;
131
- let u = A;
132
- o === I.TWEET && n != null && n.tweetMedia && (u = n.tweetMedia.image), f === p.NONE && (u = "");
133
- const $ = i.useMediaFromContent && (a == null ? void 0 : a.image), g = o === I.TWEET && ((l = n == null ? void 0 : n.tweetMedia) == null ? void 0 : l.video) || o === I.FACTOID && (a == null ? void 0 : a.video);
134
- return /* @__PURE__ */ s(ls, { className: "SL_InApp", onClick: t, children: /* @__PURE__ */ c(rs, { style: u ? {} : { paddingLeft: "1.5rem" }, children: [
135
- u && !$ && /* @__PURE__ */ s(C, { src: u, imageMode: f, withVideo: !!g }),
136
- $ && /* @__PURE__ */ s(C, { src: $, fromInsight: !0, withVideo: !!g }),
137
- o === I.TWEET ? /* @__PURE__ */ s(fs, { tweet: n }) : /* @__PURE__ */ s(ys, { questionTypeData: d, questionType: o, title: v }),
138
- /* @__PURE__ */ s(ps, { name: "inapp-button", children: r || "Open" }),
139
- /* @__PURE__ */ s(us, { name: "chevronRight" })
130
+ const { title: p, image: I, imageMode: v } = i.notification;
131
+ let h = I;
132
+ o === A.TWEET && n != null && n.tweetMedia && (h = n.tweetMedia.image), v === m.NONE && (h = "");
133
+ const f = i.useMediaFromContent && (a == null ? void 0 : a.image), T = o === A.TWEET && ((d = n == null ? void 0 : n.tweetMedia) == null ? void 0 : d.video) || o === A.FACTOID && (a == null ? void 0 : a.video);
134
+ return /* @__PURE__ */ e(de, { 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
+ o === A.TWEET ? /* @__PURE__ */ e(ge, { tweet: n }) : /* @__PURE__ */ e(fe, { questionTypeData: l, questionType: o, title: p }),
138
+ /* @__PURE__ */ e(me, { name: "inapp-button", children: r || "Open" }),
139
+ /* @__PURE__ */ e(Ie, { name: "chevronRight" })
140
140
  ] }) });
141
- }, Ts = /* @__PURE__ */ e("div")({
141
+ }, Ce = /* @__PURE__ */ s("div")({
142
142
  name: "NotificationContainer",
143
143
  class: "n11jcrxe",
144
144
  propsAsIs: !1
145
- }), b = /* @__PURE__ */ e("img")({
145
+ }), k = /* @__PURE__ */ s("img")({
146
146
  name: "Icon",
147
147
  class: "i1vmpt6u",
148
148
  propsAsIs: !1
149
- }), Ns = /* @__PURE__ */ e("div")({
149
+ }), Ne = /* @__PURE__ */ s("div")({
150
150
  name: "IconContainer",
151
151
  class: "i180665s",
152
152
  propsAsIs: !1
153
- }), Cs = () => m, bs = /* @__PURE__ */ e(Cs())({
153
+ }), be = () => u, ke = /* @__PURE__ */ s(be())({
154
154
  name: "TitleIcon",
155
155
  class: "t16zzzei",
156
156
  propsAsIs: !0
157
- }), ks = () => P, ws = /* @__PURE__ */ e(ks())({
157
+ }), we = () => Q, Se = /* @__PURE__ */ s(we())({
158
158
  name: "Close",
159
159
  class: "c1sur0q2",
160
160
  propsAsIs: !0
161
- }), Ss = /* @__PURE__ */ e("div")({
161
+ }), qe = /* @__PURE__ */ s("div")({
162
162
  name: "Body",
163
163
  class: "bai9j52",
164
164
  propsAsIs: !1
165
- }), qs = /* @__PURE__ */ e("div")({
165
+ }), Ee = /* @__PURE__ */ s("div")({
166
166
  name: "Title",
167
167
  class: "t1bnt25p",
168
168
  propsAsIs: !1
169
- }), Es = /* @__PURE__ */ e("div")({
169
+ }), xe = /* @__PURE__ */ s("div")({
170
170
  name: "Description",
171
171
  class: "dmixjec",
172
172
  propsAsIs: !1
173
- }), Ms = /* @__PURE__ */ e("button")({
173
+ }), Me = /* @__PURE__ */ s("button")({
174
174
  name: "Button",
175
175
  class: "b1ubkw1q",
176
176
  propsAsIs: !1
177
- }), xs = ({
177
+ }), je = ({
178
178
  open: t,
179
179
  close: o,
180
180
  ...i
181
181
  }) => {
182
182
  var a, n;
183
183
  return /* @__PURE__ */ c(
184
- Ts,
184
+ Ce,
185
185
  {
186
186
  onClick: () => {
187
187
  t == null || t(), i && (i.instantOpen = !0);
188
188
  },
189
189
  children: [
190
- /* @__PURE__ */ c(Ns, { children: [
191
- /* @__PURE__ */ s(b, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
192
- /* @__PURE__ */ s(
193
- b,
190
+ /* @__PURE__ */ c(Ne, { children: [
191
+ /* @__PURE__ */ e(k, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
192
+ /* @__PURE__ */ e(
193
+ k,
194
194
  {
195
195
  className: "on-dark",
196
196
  src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
197
197
  }
198
198
  )
199
199
  ] }),
200
- /* @__PURE__ */ c(Ss, { children: [
201
- /* @__PURE__ */ c(qs, { children: [
202
- /* @__PURE__ */ s(bs, { name: "icon-trophy-solid" }),
200
+ /* @__PURE__ */ c(qe, { children: [
201
+ /* @__PURE__ */ c(Ee, { children: [
202
+ /* @__PURE__ */ e(ke, { name: "icon-trophy-solid" }),
203
203
  (a = i == null ? void 0 : i.titleCard) == null ? void 0 : a.title
204
204
  ] }),
205
- /* @__PURE__ */ c(Es, { children: [
206
- /* @__PURE__ */ s("span", { children: (n = i == null ? void 0 : i.titleCard) == null ? void 0 : n.subtitle }),
207
- /* @__PURE__ */ s(Ms, { name: "inapp-button", children: "Play Now" })
205
+ /* @__PURE__ */ c(xe, { children: [
206
+ /* @__PURE__ */ e("span", { children: (n = i == null ? void 0 : i.titleCard) == null ? void 0 : n.subtitle }),
207
+ /* @__PURE__ */ e(Me, { name: "inapp-button", children: "Play Now" })
208
208
  ] })
209
209
  ] }),
210
- /* @__PURE__ */ s(
211
- ws,
210
+ /* @__PURE__ */ e(
211
+ Se,
212
212
  {
213
- close: (l) => {
214
- l == null || l.stopPropagation(), o == null || o();
213
+ close: (d) => {
214
+ d == null || d.stopPropagation(), o == null || o();
215
215
  }
216
216
  }
217
217
  )
218
218
  ]
219
219
  }
220
220
  );
221
- }, js = /* @__PURE__ */ e("div")({
221
+ }, ze = /* @__PURE__ */ s("div")({
222
222
  name: "Container",
223
223
  class: "cef8huz",
224
224
  propsAsIs: !1
225
- }), Ds = () => m, Ls = /* @__PURE__ */ e(Ds())({
225
+ }), De = () => u, Le = /* @__PURE__ */ s(De())({
226
226
  name: "CheckIcon",
227
227
  class: "c1mo15kk",
228
228
  propsAsIs: !0
229
- }), zs = () => m, Bs = /* @__PURE__ */ e(zs())({
229
+ }), Oe = () => u, Re = /* @__PURE__ */ s(Oe())({
230
230
  name: "PredictionIcon",
231
231
  class: "p16zkqnm",
232
232
  propsAsIs: !0
233
- }), Os = /* @__PURE__ */ e("div")({
233
+ }), Be = /* @__PURE__ */ s("div")({
234
234
  name: "PredictionIconContainer",
235
235
  class: "pjszi7a",
236
236
  propsAsIs: !1
237
- }), Rs = /* @__PURE__ */ e("div")({
237
+ }), Pe = /* @__PURE__ */ s("div")({
238
238
  name: "BodyContainer",
239
239
  class: "bftbmo3",
240
240
  propsAsIs: !1
241
- }), Ps = /* @__PURE__ */ e("div")({
241
+ }), Qe = /* @__PURE__ */ s("div")({
242
242
  name: "Body",
243
243
  class: "barrbyu",
244
244
  propsAsIs: !1
245
- }), Qs = /* @__PURE__ */ e("div")({
245
+ }), Ue = /* @__PURE__ */ s("div")({
246
246
  name: "Subtitle",
247
247
  class: "sz7237i",
248
248
  propsAsIs: !1
249
- }), Us = ({
249
+ }), Ve = ({
250
250
  step: t,
251
251
  children: o,
252
252
  answer: i,
253
253
  state: a = "pending"
254
- }) => /* @__PURE__ */ c(js, {
255
- children: [/* @__PURE__ */ s(Os, {
256
- children: /* @__PURE__ */ s(Bs, {
257
- name: "icon-prediction"
258
- })
259
- }), /* @__PURE__ */ s(Rs, {
260
- children: /* @__PURE__ */ s(Ps, {
261
- children: o
262
- }, t)
263
- }), /* @__PURE__ */ s(Qs, {
264
- className: a,
265
- children: /* @__PURE__ */ c("div", {
266
- children: [/* @__PURE__ */ s(Ls, {
267
- name: "icon-check"
268
- }), "Your Pick: ", i]
269
- })
270
- })]
271
- }), Vs = /* @__PURE__ */ e("div")({
254
+ }) => {
255
+ const [n, d] = y(0), [l] = y(() => new ResizeObserver((p) => {
256
+ var I, v;
257
+ d((v = (I = p == null ? void 0 : p[0]) == null ? void 0 : I.contentRect) == null ? void 0 : v.width);
258
+ })), r = Z((p) => {
259
+ p || l.disconnect(), l.observe(p);
260
+ }, [l]);
261
+ return E(() => () => {
262
+ l.disconnect();
263
+ }, [l]), /* @__PURE__ */ c(ze, {
264
+ children: [/* @__PURE__ */ e(Be, {
265
+ children: /* @__PURE__ */ e(Re, {
266
+ name: "icon-prediction"
267
+ })
268
+ }), /* @__PURE__ */ e(Pe, {
269
+ style: {
270
+ minWidth: `${n}px`
271
+ },
272
+ children: /* @__PURE__ */ e(Qe, {
273
+ children: o
274
+ }, t)
275
+ }), /* @__PURE__ */ e(Ue, {
276
+ ref: r,
277
+ className: a,
278
+ children: /* @__PURE__ */ c("div", {
279
+ children: [/* @__PURE__ */ e(Le, {
280
+ name: "icon-check"
281
+ }), "Your Pick: ", i]
282
+ })
283
+ })]
284
+ });
285
+ }, Fe = /* @__PURE__ */ s("div")({
272
286
  name: "Container",
273
287
  class: "ckyzolp",
274
288
  propsAsIs: !1
275
- }), y = /* @__PURE__ */ e("div")({
289
+ }), g = /* @__PURE__ */ s("div")({
276
290
  name: "Line",
277
291
  class: "l16t1zr7",
278
292
  propsAsIs: !1
279
- }), Fs = () => y, Ws = /* @__PURE__ */ e(Fs())({
293
+ }), We = () => g, _e = /* @__PURE__ */ s(We())({
280
294
  name: "Line1",
281
295
  class: "le78kvg",
282
296
  propsAsIs: !0
283
- }), Gs = () => y, Ks = /* @__PURE__ */ e(Gs())({
297
+ }), Ge = () => g, Ke = /* @__PURE__ */ s(Ge())({
284
298
  name: "Line2",
285
299
  class: "l1o7966d",
286
300
  propsAsIs: !0
287
- }), Ys = () => y, _s = /* @__PURE__ */ e(Ys())({
301
+ }), Ye = () => g, Xe = /* @__PURE__ */ s(Ye())({
288
302
  name: "Line3",
289
303
  class: "lu9lyxq",
290
304
  propsAsIs: !0
291
- }), Zs = () => /* @__PURE__ */ c(Vs, {
292
- children: [/* @__PURE__ */ s(Ws, {
293
- children: /* @__PURE__ */ s("div", {})
294
- }), /* @__PURE__ */ s(Ks, {
295
- children: /* @__PURE__ */ s("div", {})
296
- }), /* @__PURE__ */ s(_s, {
297
- children: /* @__PURE__ */ s("div", {})
305
+ }), Ze = () => /* @__PURE__ */ c(Fe, {
306
+ children: [/* @__PURE__ */ e(_e, {
307
+ children: /* @__PURE__ */ e("div", {})
308
+ }), /* @__PURE__ */ e(Ke, {
309
+ children: /* @__PURE__ */ e("div", {})
310
+ }), /* @__PURE__ */ e(Xe, {
311
+ children: /* @__PURE__ */ e("div", {})
298
312
  })]
299
- }), Hs = /* @__PURE__ */ e("div")({
313
+ }), He = /* @__PURE__ */ s("div")({
300
314
  name: "Container",
301
315
  class: "c10jy6zf",
302
316
  propsAsIs: !1
303
- }), Js = () => m, Xs = /* @__PURE__ */ e(Js())({
317
+ }), Je = () => u, es = /* @__PURE__ */ s(Je())({
304
318
  name: "CheckIcon",
305
319
  class: "c1c7scay",
306
320
  propsAsIs: !0
307
- }), se = () => /* @__PURE__ */ c(Hs, {
308
- children: [/* @__PURE__ */ s(Xs, {
321
+ }), ss = () => /* @__PURE__ */ c(He, {
322
+ children: [/* @__PURE__ */ e(es, {
309
323
  name: "icon-check"
310
324
  }), " Prediction results are in!"]
311
- }), ee = /* @__PURE__ */ e("div")({
325
+ }), ns = /* @__PURE__ */ s("div")({
312
326
  name: "Container",
313
327
  class: "cf6k2yy",
314
328
  propsAsIs: !1
315
- }), ne = /* @__PURE__ */ e("div")({
329
+ }), ts = /* @__PURE__ */ s("div")({
316
330
  name: "Caption",
317
331
  class: "c1c8xjus",
318
332
  propsAsIs: !1
319
- }), te = /* @__PURE__ */ e("div")({
333
+ }), os = /* @__PURE__ */ s("div")({
320
334
  name: "Title",
321
335
  class: "t1d1uekn",
322
336
  propsAsIs: !1
323
- }), oe = ({
337
+ }), is = ({
324
338
  title: t
325
- }) => /* @__PURE__ */ c(ee, {
326
- children: [/* @__PURE__ */ s(ne, {
339
+ }) => /* @__PURE__ */ c(ns, {
340
+ children: [/* @__PURE__ */ e(ts, {
327
341
  children: "Results for"
328
- }), /* @__PURE__ */ s(te, {
342
+ }), /* @__PURE__ */ e(os, {
329
343
  children: t
330
344
  })]
331
- }), x = /* @__PURE__ */ e("div")({
345
+ }), j = /* @__PURE__ */ s("div")({
332
346
  name: "Container",
333
347
  class: "c181a1as",
334
348
  propsAsIs: !1
335
- }), j = /* @__PURE__ */ e("div")({
349
+ }), z = /* @__PURE__ */ s("div")({
336
350
  name: "Title",
337
351
  class: "t1cduox6",
338
352
  propsAsIs: !1
339
- }), ie = () => m, D = /* @__PURE__ */ e(ie())({
353
+ }), as = () => u, D = /* @__PURE__ */ s(as())({
340
354
  name: "CorrectIcon",
341
355
  class: "c1onrv6j",
342
356
  propsAsIs: !0
343
- }), ae = () => D, ce = /* @__PURE__ */ e(ae())({
357
+ }), cs = () => D, rs = /* @__PURE__ */ s(cs())({
344
358
  name: "InCorrectIcon",
345
359
  class: "i17n9o7e",
346
360
  propsAsIs: !0
347
- }), re = () => /* @__PURE__ */ c(x, {
348
- children: [/* @__PURE__ */ c(j, {
349
- children: ["Congratulations!", /* @__PURE__ */ s("br", {}), "You answered correctly."]
350
- }), /* @__PURE__ */ s(D, {
361
+ }), ls = () => /* @__PURE__ */ c(j, {
362
+ children: [/* @__PURE__ */ c(z, {
363
+ children: ["Congratulations!", /* @__PURE__ */ e("br", {}), "You answered correctly."]
364
+ }), /* @__PURE__ */ e(D, {
351
365
  name: "icon-check"
352
366
  })]
353
- }), le = ({
367
+ }), ds = ({
354
368
  title: t
355
- }) => /* @__PURE__ */ c(x, {
356
- children: [/* @__PURE__ */ c(j, {
357
- children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", t]
358
- }), /* @__PURE__ */ s(ce, {
369
+ }) => /* @__PURE__ */ c(j, {
370
+ children: [/* @__PURE__ */ c(z, {
371
+ children: ["Better luck next time!", /* @__PURE__ */ e("br", {}), "Correct: ", t]
372
+ }), /* @__PURE__ */ e(rs, {
359
373
  name: "icon-cross"
360
374
  })]
361
- }), de = /* @__PURE__ */ e("div")({
375
+ }), ps = /* @__PURE__ */ s("div")({
362
376
  name: "Container",
363
377
  class: "cnxgcs2",
364
378
  propsAsIs: !1
365
- }), pe = /* @__PURE__ */ e("div")({
379
+ }), ms = /* @__PURE__ */ s("div")({
366
380
  name: "Title",
367
381
  class: "t903f8n",
368
382
  propsAsIs: !1
369
- }), me = () => m, ue = /* @__PURE__ */ e(me())({
383
+ }), us = () => u, Is = /* @__PURE__ */ s(us())({
370
384
  name: "CheckIcon",
371
385
  class: "ceyu3qj",
372
386
  propsAsIs: !0
373
- }), Ie = ({
387
+ }), vs = ({
374
388
  points: t
375
- }) => /* @__PURE__ */ c(de, {
376
- children: [/* @__PURE__ */ c(pe, {
377
- children: ["You won ", /* @__PURE__ */ s(Q, {
389
+ }) => /* @__PURE__ */ c(ps, {
390
+ children: [/* @__PURE__ */ c(ms, {
391
+ children: ["You won ", /* @__PURE__ */ e(U, {
378
392
  delay: 0.5,
379
393
  prefix: "+",
380
394
  suffix: " points",
381
395
  value: t
382
396
  })]
383
- }), /* @__PURE__ */ s(ue, {
397
+ }), /* @__PURE__ */ e(Is, {
384
398
  name: "icon-trophy-solid"
385
399
  })]
386
- }), k = /* @__PURE__ */ e("div")({
400
+ }), w = /* @__PURE__ */ s("div")({
387
401
  name: "Container",
388
402
  class: "cq3agu2",
389
403
  propsAsIs: !1
390
- }), w = /* @__PURE__ */ e("div")({
404
+ }), S = /* @__PURE__ */ s("div")({
391
405
  name: "Body",
392
406
  class: "b16qj0do",
393
407
  propsAsIs: !1
394
- }), S = {
408
+ }), q = {
395
409
  1: 3e3,
396
410
  2: 4e3,
397
411
  3: 4e3,
398
412
  4: 4e3
399
- }, he = ({ close: t, action: o, setStep: i, votedAnswer: a, correct: n, correctAnswerTitle: l, questionTitle: d, step: r }) => {
400
- if (E(() => {
413
+ }, hs = ({ close: t, action: o, setStep: i, votedAnswer: a, correct: n, correctAnswerTitle: d, questionTitle: l, step: r }) => {
414
+ if (x(() => {
401
415
  if (i) {
402
- const A = setTimeout(() => {
403
- S[r + 1] && (n || r < 3) ? i(r + 1) : t == null || t();
404
- }, S[r]);
416
+ const I = setTimeout(() => {
417
+ q[r + 1] && (n || r < 3) ? i(r + 1) : t == null || t();
418
+ }, q[r]);
405
419
  return () => {
406
- A && clearTimeout(A);
420
+ I && clearTimeout(I);
407
421
  };
408
422
  }
409
423
  return () => {
410
424
  };
411
425
  }, [i, r, t, n]), r === 1)
412
- return /* @__PURE__ */ s(k, { children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(se, {}) }) });
413
- let v = "pending";
414
- return (r === 3 || r === 4) && (v = n ? "correct" : "incorrect"), /* @__PURE__ */ s(k, { onClick: () => o == null ? void 0 : o(), children: /* @__PURE__ */ c(w, { children: [
415
- r !== 1 && /* @__PURE__ */ s(Zs, {}, r),
416
- /* @__PURE__ */ c(Us, { state: v, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
417
- r === 2 && /* @__PURE__ */ s(oe, { title: d || "unknown" }),
418
- r === 3 && n && /* @__PURE__ */ s(re, {}),
419
- r === 3 && !n && /* @__PURE__ */ s(le, { title: l || "unknown" }),
420
- r === 4 && /* @__PURE__ */ s(Ie, { points: (a == null ? void 0 : a.points) || 0 })
426
+ return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(ss, {}) }) });
427
+ let p = "pending";
428
+ return (r === 3 || r === 4) && (p = n ? "correct" : "incorrect"), /* @__PURE__ */ e(w, { onClick: () => o == null ? void 0 : o(), children: /* @__PURE__ */ c(S, { children: [
429
+ r !== 1 && /* @__PURE__ */ e(Ze, {}, r),
430
+ /* @__PURE__ */ c(Ve, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
431
+ r === 2 && /* @__PURE__ */ e(is, { title: l || "unknown" }),
432
+ r === 3 && n && /* @__PURE__ */ e(ls, {}),
433
+ r === 3 && !n && /* @__PURE__ */ e(ds, { title: d || "unknown" }),
434
+ r === 4 && /* @__PURE__ */ e(vs, { points: (a == null ? void 0 : a.points) || 0 })
421
435
  ] })
422
436
  ] }) });
423
- }, ve = ({ close: t, action: o, votedAnswer: i, correct: a, correctAnswerTitle: n, questionTitle: l }) => {
424
- const [d, r] = q(1);
425
- return /* @__PURE__ */ s(
426
- he,
437
+ }, As = ({ close: t, action: o, votedAnswer: i, correct: a, correctAnswerTitle: n, questionTitle: d }) => {
438
+ const [l, r] = y(1);
439
+ return /* @__PURE__ */ e(
440
+ hs,
427
441
  {
428
442
  close: t,
429
443
  action: o,
430
444
  votedAnswer: i,
431
445
  correct: a,
432
446
  correctAnswerTitle: n,
433
- questionTitle: l,
447
+ questionTitle: d,
434
448
  setStep: r,
435
- step: d,
449
+ step: l,
436
450
  title: ""
437
451
  }
438
452
  );
439
- }, Ae = /* @__PURE__ */ e("div")({
453
+ }, $s = /* @__PURE__ */ s("div")({
440
454
  name: "NotificationContainer",
441
455
  class: "n1i4h28u",
442
456
  propsAsIs: !1
443
- }), $e = (t) => /* @__PURE__ */ s(Ae, { children: /* @__PURE__ */ s(ve, { ...t }) }), ye = ({ sdk: t }) => {
444
- const [o] = q(t.getNotificationsStore()), i = U(o), a = t.getFeature(_.GAMES), n = Z(() => t.getActiveNotification(), [t, i]);
445
- return E(() => {
446
- n && V.emit("notification", {
457
+ }), ys = (t) => /* @__PURE__ */ e($s, { children: /* @__PURE__ */ e(As, { ...t }) }), fs = ({ sdk: t }) => {
458
+ const [o] = y(t.getNotificationsStore()), i = V(o), a = t.getFeature(X.GAMES), n = E(() => t.getActiveNotification(), [t, i]);
459
+ return x(() => {
460
+ n && F.emit("notification", {
447
461
  action: "rendered",
448
462
  payload: {
449
463
  questionId: n.data.questionId,
450
464
  questionType: n.data.questionType
451
465
  }
452
466
  });
453
- }, [n]), n && n.type === T.QUESTION_RESOLVED ? n.data.question && n.data.questionType === I.PREDICTION ? /* @__PURE__ */ s(
454
- $e,
467
+ }, [n]), n && n.type === C.QUESTION_RESOLVED ? n.data.question && n.data.questionType === A.PREDICTION ? /* @__PURE__ */ e(
468
+ ys,
455
469
  {
456
470
  action: n.action,
457
471
  close: n.close,
458
472
  ...n.data.question
459
473
  }
460
- ) : null : n && n.type === T.ONBOARDING ? n.data.onboarding ? /* @__PURE__ */ s(xs, { open: a == null ? void 0 : a.openFeature, close: n.close, ...n.data.onboarding }) : null : n && /* @__PURE__ */ s(gs, { ...n.data, action: n.action });
461
- }, Ce = ({ theme: t }) => {
462
- const o = F(), i = W(), a = G();
463
- return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(K, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ s(ye, { sdk: o }) }) }) : null;
474
+ ) : null : n && n.type === C.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 });
475
+ }, bs = ({ theme: t }) => {
476
+ const o = W(), i = _(), a = G();
477
+ return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(K, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(fs, { sdk: o }) }) }) : null;
464
478
  };
465
479
  export {
466
- Ce as StreamLayerSDKNotification,
467
- ye as StreamLayerSDKNotificationUI
480
+ bs as StreamLayerSDKNotification,
481
+ fs as StreamLayerSDKNotificationUI
468
482
  };