@streamlayer/react 1.11.1 → 1.11.3-rc.3
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.
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +78 -90
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +78 -90
- package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/es/advertisement.js +704 -605
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/index.js +11 -14
- package/lib/classic/es/insight.js +34 -35
- package/lib/classic/es/notification.js +452 -378
- package/lib/classic/es/points.js +67 -44
- package/lib/classic/es/provider.js +13981 -15916
- package/lib/classic/es/useStreamLayerApp2.js +3253 -2969
- package/lib/classic/index.d.ts +1 -10
- package/lib/classic/style.css +455 -1
- package/lib/es/advertisement.js +704 -605
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/index.js +11 -14
- package/lib/es/insight.js +34 -35
- package/lib/es/notification.js +452 -378
- package/lib/es/points.js +67 -44
- package/lib/es/provider.js +13979 -15910
- package/lib/es/useStreamLayerApp2.js +3253 -2969
- package/lib/index.d.ts +1 -10
- package/lib/style.css +1 -1
- package/package.json +16 -22
- package/lib/app/masters.d.ts +0 -28
- package/lib/cjs/gamification-feature2.js +0 -1
- package/lib/cjs/masters.js +0 -1
- package/lib/cjs/masters2.js +0 -9
- package/lib/classic/app/masters.d.ts +0 -28
- package/lib/classic/cjs/gamification-feature2.js +0 -1
- package/lib/classic/cjs/masters.js +0 -1
- package/lib/classic/cjs/masters2.js +0 -9
- package/lib/classic/es/gamification-feature2.js +0 -4
- package/lib/classic/es/masters.js +0 -8
- package/lib/classic/es/masters2.js +0 -1066
- package/lib/classic/masters.d.ts +0 -5
- package/lib/dist/cjs/gamification-feature.js +0 -1
- package/lib/dist/cjs/gamification-feature2.js +0 -1
- package/lib/dist/cjs/index.js +0 -1
- package/lib/dist/cjs/masters.js +0 -219
- package/lib/dist/cjs/package.json +0 -1
- package/lib/dist/es/gamification-feature.js +0 -4
- package/lib/dist/es/gamification-feature2.js +0 -123
- package/lib/dist/es/index.js +0 -9
- package/lib/dist/es/masters.js +0 -42696
- package/lib/dist/es/package.json +0 -1
- package/lib/dist/style.css +0 -1
- package/lib/es/gamification-feature2.js +0 -4
- package/lib/es/masters.js +0 -8
- package/lib/es/masters2.js +0 -1066
- package/lib/masters.d.ts +0 -5
package/lib/es/notification.js
CHANGED
|
@@ -1,468 +1,542 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as p,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const h = /* @__PURE__ */
|
|
6
|
-
name: "
|
|
7
|
-
class: "
|
|
8
|
-
propsAsIs: !1
|
|
9
|
-
}),
|
|
10
|
-
name: "
|
|
11
|
-
class: "
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { e as D, i as M, N as q, p as u, s, P as L, X as R, Z as P, j as U, n as V, B as Q, f as F, u as K, d as W, c as B, h as G } from "./provider.js";
|
|
3
|
+
import { useState as E, useMemo as H, useEffect as _ } from "react";
|
|
4
|
+
import { S as Y, Q as f, f as d, g as Z } from "./useStreamLayerApp2.js";
|
|
5
|
+
const $ = () => h, X = () => h, J = () => h, ee = () => h, se = () => h, h = /* @__PURE__ */ s("div")({
|
|
6
|
+
name: "g",
|
|
7
|
+
class: "g1mxl69i",
|
|
8
|
+
propsAsIs: !1
|
|
9
|
+
}), te = /* @__PURE__ */ s($())({
|
|
10
|
+
name: "V",
|
|
11
|
+
class: "v1jt3w2c",
|
|
12
12
|
propsAsIs: !0
|
|
13
|
-
}),
|
|
14
|
-
name: "
|
|
15
|
-
class: "
|
|
13
|
+
}), w = /* @__PURE__ */ s(X())({
|
|
14
|
+
name: "I",
|
|
15
|
+
class: "i178msgc",
|
|
16
16
|
propsAsIs: !0
|
|
17
|
-
}),
|
|
18
|
-
name: "
|
|
19
|
-
class: "
|
|
17
|
+
}), ne = /* @__PURE__ */ s(J())({
|
|
18
|
+
name: "W",
|
|
19
|
+
class: "witns0f",
|
|
20
20
|
propsAsIs: !0
|
|
21
|
-
}),
|
|
22
|
-
name: "
|
|
23
|
-
class: "
|
|
21
|
+
}), ae = /* @__PURE__ */ s(ee())({
|
|
22
|
+
name: "G",
|
|
23
|
+
class: "gw2eqv8",
|
|
24
24
|
propsAsIs: !0
|
|
25
|
-
}),
|
|
26
|
-
name: "
|
|
27
|
-
class: "
|
|
25
|
+
}), ie = /* @__PURE__ */ s(se())({
|
|
26
|
+
name: "H",
|
|
27
|
+
class: "h8e6tlf",
|
|
28
28
|
propsAsIs: !0
|
|
29
|
-
}),
|
|
30
|
-
name: "
|
|
31
|
-
class: "
|
|
32
|
-
propsAsIs: !1
|
|
33
|
-
}),
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
29
|
+
}), oe = /* @__PURE__ */ s("div")({
|
|
30
|
+
name: "K",
|
|
31
|
+
class: "k1d4kk25",
|
|
32
|
+
propsAsIs: !1
|
|
33
|
+
}), le = {
|
|
34
|
+
[d.UNSET]: w,
|
|
35
|
+
[d.NONE]: w,
|
|
36
|
+
[d.ROUNDED]: ne,
|
|
37
|
+
[d.CENTERED]: ae,
|
|
38
|
+
[d.TRANSPARENT]: te
|
|
39
39
|
}, N = ({
|
|
40
|
-
src:
|
|
41
|
-
imageMode:
|
|
40
|
+
src: n,
|
|
41
|
+
imageMode: a = d.UNSET,
|
|
42
42
|
withVideo: i,
|
|
43
|
-
fromInsight:
|
|
43
|
+
fromInsight: o
|
|
44
44
|
}) => {
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
src: t,
|
|
45
|
+
if (a === d.NONE) return null;
|
|
46
|
+
const t = o ? ie : le[a];
|
|
47
|
+
return /* @__PURE__ */ l(t, {
|
|
48
|
+
children: [/* @__PURE__ */ e("img", {
|
|
49
|
+
src: n,
|
|
51
50
|
alt: ""
|
|
52
|
-
}), i && /* @__PURE__ */
|
|
53
|
-
children: /* @__PURE__ */
|
|
51
|
+
}), i && /* @__PURE__ */ e(oe, {
|
|
52
|
+
children: /* @__PURE__ */ e(u, {
|
|
54
53
|
name: "icon-play"
|
|
55
54
|
})
|
|
56
55
|
})]
|
|
57
56
|
});
|
|
58
|
-
},
|
|
59
|
-
name: "
|
|
60
|
-
class: "
|
|
57
|
+
}, re = () => u, ce = () => u, pe = () => U, de = () => u, ue = () => u, me = () => g, fe = () => g, he = () => g, ve = () => u, Ie = () => u, Ae = () => C, ge = () => u, ye = /* @__PURE__ */ s("div")({
|
|
58
|
+
name: "Z",
|
|
59
|
+
class: "z1qm1hyz",
|
|
61
60
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
63
|
-
name: "
|
|
64
|
-
class: "
|
|
61
|
+
}), Te = /* @__PURE__ */ s("div")({
|
|
62
|
+
name: "tt",
|
|
63
|
+
class: "t27jvdr",
|
|
65
64
|
propsAsIs: !1
|
|
66
|
-
}), j = /* @__PURE__ */
|
|
67
|
-
name: "
|
|
68
|
-
class: "
|
|
65
|
+
}), j = /* @__PURE__ */ s("div")({
|
|
66
|
+
name: "L",
|
|
67
|
+
class: "l1jox3sj",
|
|
69
68
|
propsAsIs: !1
|
|
70
|
-
}),
|
|
71
|
-
name: "
|
|
72
|
-
class: "
|
|
69
|
+
}), qe = /* @__PURE__ */ s("div")({
|
|
70
|
+
name: "et",
|
|
71
|
+
class: "e19jnjng",
|
|
73
72
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
75
|
-
name: "
|
|
76
|
-
class: "
|
|
73
|
+
}), we = /* @__PURE__ */ s("button")({
|
|
74
|
+
name: "it",
|
|
75
|
+
class: "ir43pdl",
|
|
77
76
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
79
|
-
name: "
|
|
80
|
-
class: "
|
|
77
|
+
}), Ne = /* @__PURE__ */ s(re())({
|
|
78
|
+
name: "nt",
|
|
79
|
+
class: "nbnqqq5",
|
|
81
80
|
propsAsIs: !0
|
|
82
|
-
}),
|
|
83
|
-
name: "
|
|
84
|
-
class: "
|
|
85
|
-
propsAsIs: !1
|
|
86
|
-
}),
|
|
87
|
-
name: "
|
|
88
|
-
class: "
|
|
89
|
-
propsAsIs: !1
|
|
90
|
-
}),
|
|
91
|
-
name: "
|
|
92
|
-
class: "
|
|
93
|
-
propsAsIs: !1
|
|
94
|
-
}),
|
|
95
|
-
name: "
|
|
96
|
-
class: "
|
|
97
|
-
propsAsIs: !1
|
|
98
|
-
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
81
|
+
}), ke = /* @__PURE__ */ s("div")({
|
|
82
|
+
name: "ot",
|
|
83
|
+
class: "o1bhnjnl",
|
|
84
|
+
propsAsIs: !1
|
|
85
|
+
}), xe = /* @__PURE__ */ s("blockquote")({
|
|
86
|
+
name: "rt",
|
|
87
|
+
class: "r13lqzum",
|
|
88
|
+
propsAsIs: !1
|
|
89
|
+
}), Se = /* @__PURE__ */ s("div")({
|
|
90
|
+
name: "at",
|
|
91
|
+
class: "a167n9j1",
|
|
92
|
+
propsAsIs: !1
|
|
93
|
+
}), be = /* @__PURE__ */ s("div")({
|
|
94
|
+
name: "ct",
|
|
95
|
+
class: "c55pgud",
|
|
96
|
+
propsAsIs: !1
|
|
97
|
+
}), Ee = ({
|
|
98
|
+
image: n,
|
|
99
|
+
tweet: a,
|
|
100
|
+
account: i,
|
|
101
|
+
accountVerified: o,
|
|
102
|
+
body: t,
|
|
103
|
+
title: c
|
|
104
|
+
}) => {
|
|
105
|
+
var p;
|
|
106
|
+
return /* @__PURE__ */ l(be, {
|
|
107
|
+
children: [c && /* @__PURE__ */ e(ke, {
|
|
108
|
+
children: /* @__PURE__ */ e(xe, {
|
|
109
|
+
children: c
|
|
110
|
+
})
|
|
111
|
+
}), /* @__PURE__ */ e(V, {
|
|
112
|
+
image: n,
|
|
113
|
+
name: (p = a == null ? void 0 : a.meta) == null ? void 0 : p.accountName,
|
|
114
|
+
userName: i,
|
|
115
|
+
verified: o,
|
|
116
|
+
createdTweet: a == null ? void 0 : a.date
|
|
117
|
+
}), /* @__PURE__ */ e(Se, {
|
|
118
|
+
children: Q(t)
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
}, _e = ({
|
|
122
|
+
title: n,
|
|
123
|
+
questionType: a,
|
|
124
|
+
questionTypeData: i
|
|
125
|
+
}) => /* @__PURE__ */ l(j, {
|
|
126
|
+
children: [/* @__PURE__ */ e(L, {
|
|
127
|
+
questionTypeData: i,
|
|
128
|
+
questionType: a,
|
|
129
|
+
questionStatus: Z.UNSET
|
|
130
|
+
}), n && /* @__PURE__ */ e(qe, {
|
|
131
|
+
children: n
|
|
132
|
+
})]
|
|
133
|
+
}), je = ({
|
|
134
|
+
tweet: n
|
|
135
|
+
}) => n ? /* @__PURE__ */ e(j, {
|
|
136
|
+
children: /* @__PURE__ */ e(Ee, {
|
|
137
|
+
...n,
|
|
138
|
+
controlVideo: () => {
|
|
121
139
|
}
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
})
|
|
141
|
+
}) : null, ze = ({
|
|
142
|
+
action: n,
|
|
143
|
+
questionType: a,
|
|
144
|
+
inApp: i,
|
|
145
|
+
insight: o,
|
|
146
|
+
tweet: t
|
|
147
|
+
}) => {
|
|
148
|
+
var c;
|
|
149
|
+
const p = R[a], r = P[a];
|
|
150
|
+
if (!p || !i || !i.notification) return null;
|
|
151
|
+
const {
|
|
152
|
+
title: v,
|
|
153
|
+
image: I,
|
|
154
|
+
imageMode: y
|
|
155
|
+
} = i.notification;
|
|
156
|
+
let m = I;
|
|
157
|
+
a === f.TWEET && t != null && t.tweetMedia && (m = t.tweetMedia.image), y === d.NONE && (m = "");
|
|
158
|
+
const A = i.useMediaFromContent && (o == null ? void 0 : o.image), T = a === f.TWEET && ((c = t == null ? void 0 : t.tweetMedia) == null ? void 0 : c.video) || a === f.FACTOID && (o == null ? void 0 : o.video);
|
|
159
|
+
return /* @__PURE__ */ e(Te, {
|
|
160
|
+
className: "SL_InApp",
|
|
161
|
+
onClick: n,
|
|
162
|
+
children: /* @__PURE__ */ l(ye, {
|
|
163
|
+
style: m ? {} : {
|
|
164
|
+
paddingLeft: "1.5rem"
|
|
165
|
+
},
|
|
166
|
+
children: [m && !A && /* @__PURE__ */ e(N, {
|
|
167
|
+
src: m,
|
|
168
|
+
imageMode: y,
|
|
169
|
+
withVideo: !!T
|
|
170
|
+
}), A && /* @__PURE__ */ e(N, {
|
|
171
|
+
src: A,
|
|
172
|
+
fromInsight: !0,
|
|
173
|
+
withVideo: !!T
|
|
174
|
+
}), a === f.TWEET ? /* @__PURE__ */ e(je, {
|
|
175
|
+
tweet: t
|
|
176
|
+
}) : /* @__PURE__ */ e(_e, {
|
|
177
|
+
questionTypeData: p,
|
|
178
|
+
questionType: a,
|
|
179
|
+
title: v
|
|
180
|
+
}), /* @__PURE__ */ e(we, {
|
|
181
|
+
name: "inapp-button",
|
|
182
|
+
children: r || "Open"
|
|
183
|
+
}), /* @__PURE__ */ e(Ne, {
|
|
184
|
+
name: "chevronRight"
|
|
185
|
+
})]
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
}, Oe = /* @__PURE__ */ s("div")({
|
|
189
|
+
name: "ht",
|
|
190
|
+
class: "hjq7nef",
|
|
191
|
+
propsAsIs: !1
|
|
192
|
+
}), k = /* @__PURE__ */ s("img")({
|
|
193
|
+
name: "S",
|
|
194
|
+
class: "s1wpz4bk",
|
|
195
|
+
propsAsIs: !1
|
|
196
|
+
}), Ce = /* @__PURE__ */ s("div")({
|
|
197
|
+
name: "mt",
|
|
198
|
+
class: "m9a4mjd",
|
|
199
|
+
propsAsIs: !1
|
|
200
|
+
}), De = /* @__PURE__ */ s(ce())({
|
|
201
|
+
name: "ft",
|
|
202
|
+
class: "f1hieehz",
|
|
156
203
|
propsAsIs: !0
|
|
157
|
-
}),
|
|
158
|
-
name: "
|
|
159
|
-
class: "
|
|
204
|
+
}), Me = /* @__PURE__ */ s(pe())({
|
|
205
|
+
name: "ut",
|
|
206
|
+
class: "u1ourn5d",
|
|
160
207
|
propsAsIs: !0
|
|
161
|
-
}),
|
|
162
|
-
name: "
|
|
163
|
-
class: "
|
|
208
|
+
}), Le = /* @__PURE__ */ s("div")({
|
|
209
|
+
name: "gt",
|
|
210
|
+
class: "g1evqivf",
|
|
164
211
|
propsAsIs: !1
|
|
165
|
-
}),
|
|
166
|
-
name: "
|
|
167
|
-
class: "
|
|
212
|
+
}), Re = /* @__PURE__ */ s("div")({
|
|
213
|
+
name: "xt",
|
|
214
|
+
class: "x1fon3ii",
|
|
168
215
|
propsAsIs: !1
|
|
169
|
-
}),
|
|
170
|
-
name: "
|
|
171
|
-
class: "
|
|
216
|
+
}), Pe = /* @__PURE__ */ s("div")({
|
|
217
|
+
name: "wt",
|
|
218
|
+
class: "w14r8hqz",
|
|
172
219
|
propsAsIs: !1
|
|
173
|
-
}),
|
|
174
|
-
name: "
|
|
175
|
-
class: "
|
|
220
|
+
}), Ue = /* @__PURE__ */ s("button")({
|
|
221
|
+
name: "yt",
|
|
222
|
+
class: "yxk4apw",
|
|
176
223
|
propsAsIs: !1
|
|
177
|
-
}),
|
|
178
|
-
open:
|
|
179
|
-
close:
|
|
224
|
+
}), Ve = ({
|
|
225
|
+
open: n,
|
|
226
|
+
close: a,
|
|
180
227
|
...i
|
|
181
228
|
}) => {
|
|
182
|
-
var
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}, xs = /* @__PURE__ */ e("div")({
|
|
222
|
-
name: "Container",
|
|
223
|
-
class: "cef8huz",
|
|
224
|
-
propsAsIs: !1
|
|
225
|
-
}), Ds = () => m, Ls = /* @__PURE__ */ e(Ds())({
|
|
226
|
-
name: "CheckIcon",
|
|
227
|
-
class: "c1mo15kk",
|
|
229
|
+
var o, t;
|
|
230
|
+
return /* @__PURE__ */ l(Oe, {
|
|
231
|
+
onClick: () => {
|
|
232
|
+
n == null || n(), i && (i.instantOpen = !0);
|
|
233
|
+
},
|
|
234
|
+
children: [/* @__PURE__ */ l(Ce, {
|
|
235
|
+
children: [/* @__PURE__ */ e(k, {
|
|
236
|
+
className: "on-light",
|
|
237
|
+
src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png"
|
|
238
|
+
}), /* @__PURE__ */ e(k, {
|
|
239
|
+
className: "on-dark",
|
|
240
|
+
src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
|
|
241
|
+
})]
|
|
242
|
+
}), /* @__PURE__ */ l(Le, {
|
|
243
|
+
children: [/* @__PURE__ */ l(Re, {
|
|
244
|
+
children: [/* @__PURE__ */ e(De, {
|
|
245
|
+
name: "icon-trophy-solid"
|
|
246
|
+
}), (o = i == null ? void 0 : i.titleCard) == null ? void 0 : o.title]
|
|
247
|
+
}), /* @__PURE__ */ l(Pe, {
|
|
248
|
+
children: [/* @__PURE__ */ e("span", {
|
|
249
|
+
children: (t = i == null ? void 0 : i.titleCard) == null ? void 0 : t.subtitle
|
|
250
|
+
}), /* @__PURE__ */ e(Ue, {
|
|
251
|
+
name: "inapp-button",
|
|
252
|
+
children: "Play Now"
|
|
253
|
+
})]
|
|
254
|
+
})]
|
|
255
|
+
}), /* @__PURE__ */ e(Me, {
|
|
256
|
+
close: (c) => {
|
|
257
|
+
c == null || c.stopPropagation(), a == null || a();
|
|
258
|
+
}
|
|
259
|
+
})]
|
|
260
|
+
});
|
|
261
|
+
}, Qe = /* @__PURE__ */ s("div")({
|
|
262
|
+
name: "bt",
|
|
263
|
+
class: "bfwt6f4",
|
|
264
|
+
propsAsIs: !1
|
|
265
|
+
}), Fe = /* @__PURE__ */ s(de())({
|
|
266
|
+
name: "kt",
|
|
267
|
+
class: "kyg779c",
|
|
228
268
|
propsAsIs: !0
|
|
229
|
-
}),
|
|
230
|
-
name: "
|
|
231
|
-
class: "
|
|
269
|
+
}), Ke = /* @__PURE__ */ s(ue())({
|
|
270
|
+
name: "It",
|
|
271
|
+
class: "i1evrlv8",
|
|
232
272
|
propsAsIs: !0
|
|
233
|
-
}),
|
|
234
|
-
name: "
|
|
235
|
-
class: "
|
|
273
|
+
}), We = /* @__PURE__ */ s("div")({
|
|
274
|
+
name: "Ct",
|
|
275
|
+
class: "c1ikdq9p",
|
|
236
276
|
propsAsIs: !1
|
|
237
|
-
}),
|
|
238
|
-
name: "
|
|
239
|
-
class: "
|
|
277
|
+
}), Be = /* @__PURE__ */ s("div")({
|
|
278
|
+
name: "St",
|
|
279
|
+
class: "sa973kf",
|
|
240
280
|
propsAsIs: !1
|
|
241
|
-
}),
|
|
242
|
-
name: "
|
|
243
|
-
class: "
|
|
281
|
+
}), Ge = /* @__PURE__ */ s("div")({
|
|
282
|
+
name: "Nt",
|
|
283
|
+
class: "n1f8vz8k",
|
|
244
284
|
propsAsIs: !1
|
|
245
|
-
}),
|
|
246
|
-
name: "
|
|
247
|
-
class: "
|
|
285
|
+
}), He = /* @__PURE__ */ s("div")({
|
|
286
|
+
name: "Tt",
|
|
287
|
+
class: "t2aop6q",
|
|
248
288
|
propsAsIs: !1
|
|
249
|
-
}),
|
|
250
|
-
step:
|
|
251
|
-
children:
|
|
289
|
+
}), Ye = ({
|
|
290
|
+
step: n,
|
|
291
|
+
children: a,
|
|
252
292
|
answer: i,
|
|
253
|
-
state:
|
|
254
|
-
}) => /* @__PURE__ */
|
|
255
|
-
children: [/* @__PURE__ */
|
|
256
|
-
children: /* @__PURE__ */
|
|
293
|
+
state: o = "pending"
|
|
294
|
+
}) => /* @__PURE__ */ l(Qe, {
|
|
295
|
+
children: [/* @__PURE__ */ e(We, {
|
|
296
|
+
children: /* @__PURE__ */ e(Ke, {
|
|
257
297
|
name: "icon-prediction"
|
|
258
298
|
})
|
|
259
|
-
}), /* @__PURE__ */
|
|
260
|
-
children: /* @__PURE__ */
|
|
261
|
-
children:
|
|
262
|
-
},
|
|
263
|
-
}), /* @__PURE__ */
|
|
264
|
-
className:
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
children: [/* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ e(Be, {
|
|
300
|
+
children: /* @__PURE__ */ e(Ge, {
|
|
301
|
+
children: a
|
|
302
|
+
}, n)
|
|
303
|
+
}), /* @__PURE__ */ e(He, {
|
|
304
|
+
className: o,
|
|
305
|
+
children: /* @__PURE__ */ l("div", {
|
|
306
|
+
children: [/* @__PURE__ */ e(Fe, {
|
|
267
307
|
name: "icon-check"
|
|
268
308
|
}), "Your Pick: ", i]
|
|
269
309
|
})
|
|
270
310
|
})]
|
|
271
|
-
}),
|
|
272
|
-
name: "
|
|
273
|
-
class: "
|
|
311
|
+
}), Ze = /* @__PURE__ */ s("div")({
|
|
312
|
+
name: "Et",
|
|
313
|
+
class: "e1rehgb5",
|
|
274
314
|
propsAsIs: !1
|
|
275
|
-
}),
|
|
276
|
-
name: "
|
|
277
|
-
class: "
|
|
315
|
+
}), g = /* @__PURE__ */ s("div")({
|
|
316
|
+
name: "y",
|
|
317
|
+
class: "ylp5m3t",
|
|
278
318
|
propsAsIs: !1
|
|
279
|
-
}),
|
|
280
|
-
name: "
|
|
281
|
-
class: "
|
|
319
|
+
}), $e = /* @__PURE__ */ s(me())({
|
|
320
|
+
name: "$t",
|
|
321
|
+
class: "_o9k3m4",
|
|
282
322
|
propsAsIs: !0
|
|
283
|
-
}),
|
|
284
|
-
name: "
|
|
285
|
-
class: "
|
|
323
|
+
}), Xe = /* @__PURE__ */ s(fe())({
|
|
324
|
+
name: "Lt",
|
|
325
|
+
class: "l1f41dxb",
|
|
286
326
|
propsAsIs: !0
|
|
287
|
-
}),
|
|
288
|
-
name: "
|
|
289
|
-
class: "
|
|
327
|
+
}), Je = /* @__PURE__ */ s(he())({
|
|
328
|
+
name: "zt",
|
|
329
|
+
class: "z1vokrte",
|
|
290
330
|
propsAsIs: !0
|
|
291
|
-
}),
|
|
292
|
-
children: [/* @__PURE__ */
|
|
293
|
-
children: /* @__PURE__ */
|
|
294
|
-
}), /* @__PURE__ */
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
-
children: /* @__PURE__ */
|
|
331
|
+
}), es = () => /* @__PURE__ */ l(Ze, {
|
|
332
|
+
children: [/* @__PURE__ */ e($e, {
|
|
333
|
+
children: /* @__PURE__ */ e("div", {})
|
|
334
|
+
}), /* @__PURE__ */ e(Xe, {
|
|
335
|
+
children: /* @__PURE__ */ e("div", {})
|
|
336
|
+
}), /* @__PURE__ */ e(Je, {
|
|
337
|
+
children: /* @__PURE__ */ e("div", {})
|
|
298
338
|
})]
|
|
299
|
-
}),
|
|
300
|
-
name: "
|
|
301
|
-
class: "
|
|
339
|
+
}), ss = /* @__PURE__ */ s("div")({
|
|
340
|
+
name: "qt",
|
|
341
|
+
class: "q1ftib8q",
|
|
302
342
|
propsAsIs: !1
|
|
303
|
-
}),
|
|
304
|
-
name: "
|
|
305
|
-
class: "
|
|
343
|
+
}), ts = /* @__PURE__ */ s(ve())({
|
|
344
|
+
name: "Rt",
|
|
345
|
+
class: "r1m9yg5p",
|
|
306
346
|
propsAsIs: !0
|
|
307
|
-
}),
|
|
308
|
-
children: [/* @__PURE__ */
|
|
347
|
+
}), ns = () => /* @__PURE__ */ l(ss, {
|
|
348
|
+
children: [/* @__PURE__ */ e(ts, {
|
|
309
349
|
name: "icon-check"
|
|
310
350
|
}), " Prediction results are in!"]
|
|
311
|
-
}),
|
|
312
|
-
name: "
|
|
313
|
-
class: "
|
|
314
|
-
propsAsIs: !1
|
|
315
|
-
}),
|
|
316
|
-
name: "
|
|
317
|
-
class: "
|
|
318
|
-
propsAsIs: !1
|
|
319
|
-
}),
|
|
320
|
-
name: "
|
|
321
|
-
class: "
|
|
322
|
-
propsAsIs: !1
|
|
323
|
-
}),
|
|
324
|
-
title:
|
|
325
|
-
}) => /* @__PURE__ */
|
|
326
|
-
children: [/* @__PURE__ */
|
|
351
|
+
}), as = /* @__PURE__ */ s("div")({
|
|
352
|
+
name: "Ot",
|
|
353
|
+
class: "oa7jasz",
|
|
354
|
+
propsAsIs: !1
|
|
355
|
+
}), is = /* @__PURE__ */ s("div")({
|
|
356
|
+
name: "Qt",
|
|
357
|
+
class: "q13bebf9",
|
|
358
|
+
propsAsIs: !1
|
|
359
|
+
}), os = /* @__PURE__ */ s("div")({
|
|
360
|
+
name: "Pt",
|
|
361
|
+
class: "p1o3s78d",
|
|
362
|
+
propsAsIs: !1
|
|
363
|
+
}), ls = ({
|
|
364
|
+
title: n
|
|
365
|
+
}) => /* @__PURE__ */ l(as, {
|
|
366
|
+
children: [/* @__PURE__ */ e(is, {
|
|
327
367
|
children: "Results for"
|
|
328
|
-
}), /* @__PURE__ */
|
|
329
|
-
children:
|
|
368
|
+
}), /* @__PURE__ */ e(os, {
|
|
369
|
+
children: n
|
|
330
370
|
})]
|
|
331
|
-
}),
|
|
332
|
-
name: "
|
|
333
|
-
class: "
|
|
371
|
+
}), z = /* @__PURE__ */ s("div")({
|
|
372
|
+
name: "z",
|
|
373
|
+
class: "z19uba88",
|
|
334
374
|
propsAsIs: !1
|
|
335
|
-
}),
|
|
336
|
-
name: "
|
|
337
|
-
class: "
|
|
375
|
+
}), O = /* @__PURE__ */ s("div")({
|
|
376
|
+
name: "M",
|
|
377
|
+
class: "me3836e",
|
|
338
378
|
propsAsIs: !1
|
|
339
|
-
}),
|
|
340
|
-
name: "
|
|
341
|
-
class: "
|
|
379
|
+
}), C = /* @__PURE__ */ s(Ie())({
|
|
380
|
+
name: "q",
|
|
381
|
+
class: "q12u443i",
|
|
342
382
|
propsAsIs: !0
|
|
343
|
-
}),
|
|
344
|
-
name: "
|
|
345
|
-
class: "
|
|
383
|
+
}), rs = /* @__PURE__ */ s(Ae())({
|
|
384
|
+
name: "At",
|
|
385
|
+
class: "andaq1w",
|
|
346
386
|
propsAsIs: !0
|
|
347
|
-
}),
|
|
348
|
-
children: [/* @__PURE__ */
|
|
349
|
-
children: ["Congratulations!", /* @__PURE__ */
|
|
350
|
-
}), /* @__PURE__ */
|
|
387
|
+
}), cs = () => /* @__PURE__ */ l(z, {
|
|
388
|
+
children: [/* @__PURE__ */ l(O, {
|
|
389
|
+
children: ["Congratulations!", /* @__PURE__ */ e("br", {}), "You answered correctly."]
|
|
390
|
+
}), /* @__PURE__ */ e(C, {
|
|
351
391
|
name: "icon-check"
|
|
352
392
|
})]
|
|
353
|
-
}),
|
|
354
|
-
title:
|
|
355
|
-
}) => /* @__PURE__ */
|
|
356
|
-
children: [/* @__PURE__ */
|
|
357
|
-
children: ["Better luck next time!", /* @__PURE__ */
|
|
358
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), ps = ({
|
|
394
|
+
title: n
|
|
395
|
+
}) => /* @__PURE__ */ l(z, {
|
|
396
|
+
children: [/* @__PURE__ */ l(O, {
|
|
397
|
+
children: ["Better luck next time!", /* @__PURE__ */ e("br", {}), "Correct: ", n]
|
|
398
|
+
}), /* @__PURE__ */ e(rs, {
|
|
359
399
|
name: "icon-cross"
|
|
360
400
|
})]
|
|
361
|
-
}),
|
|
362
|
-
name: "
|
|
363
|
-
class: "
|
|
401
|
+
}), ds = /* @__PURE__ */ s("div")({
|
|
402
|
+
name: "_t",
|
|
403
|
+
class: "_1tv8lyn",
|
|
364
404
|
propsAsIs: !1
|
|
365
|
-
}),
|
|
366
|
-
name: "
|
|
367
|
-
class: "
|
|
405
|
+
}), us = /* @__PURE__ */ s("div")({
|
|
406
|
+
name: "Ft",
|
|
407
|
+
class: "f15gn2pe",
|
|
368
408
|
propsAsIs: !1
|
|
369
|
-
}),
|
|
370
|
-
name: "
|
|
371
|
-
class: "
|
|
409
|
+
}), ms = /* @__PURE__ */ s(ge())({
|
|
410
|
+
name: "Ut",
|
|
411
|
+
class: "uz0guqg",
|
|
372
412
|
propsAsIs: !0
|
|
373
|
-
}),
|
|
374
|
-
points:
|
|
375
|
-
}) => /* @__PURE__ */
|
|
376
|
-
children: [/* @__PURE__ */
|
|
377
|
-
children: ["You won ", /* @__PURE__ */
|
|
413
|
+
}), fs = ({
|
|
414
|
+
points: n
|
|
415
|
+
}) => /* @__PURE__ */ l(ds, {
|
|
416
|
+
children: [/* @__PURE__ */ l(us, {
|
|
417
|
+
children: ["You won ", /* @__PURE__ */ e(F, {
|
|
378
418
|
delay: 0.5,
|
|
379
419
|
prefix: "+",
|
|
380
420
|
suffix: " points",
|
|
381
|
-
value:
|
|
421
|
+
value: n
|
|
382
422
|
})]
|
|
383
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ e(ms, {
|
|
384
424
|
name: "icon-trophy-solid"
|
|
385
425
|
})]
|
|
386
|
-
}),
|
|
387
|
-
name: "
|
|
388
|
-
class: "
|
|
426
|
+
}), x = /* @__PURE__ */ s("div")({
|
|
427
|
+
name: "N",
|
|
428
|
+
class: "nfeou2w",
|
|
389
429
|
propsAsIs: !1
|
|
390
|
-
}),
|
|
391
|
-
name: "
|
|
392
|
-
class: "
|
|
430
|
+
}), S = /* @__PURE__ */ s("div")({
|
|
431
|
+
name: "T",
|
|
432
|
+
class: "tyhpuaw",
|
|
393
433
|
propsAsIs: !1
|
|
394
|
-
}),
|
|
434
|
+
}), b = {
|
|
395
435
|
1: 3e3,
|
|
396
436
|
2: 4e3,
|
|
397
437
|
3: 4e3,
|
|
398
438
|
4: 4e3
|
|
399
|
-
},
|
|
400
|
-
|
|
439
|
+
}, hs = ({
|
|
440
|
+
close: n,
|
|
441
|
+
action: a,
|
|
442
|
+
setStep: i,
|
|
443
|
+
votedAnswer: o,
|
|
444
|
+
correct: t,
|
|
445
|
+
correctAnswerTitle: c,
|
|
446
|
+
questionTitle: p,
|
|
447
|
+
step: r
|
|
448
|
+
}) => {
|
|
449
|
+
if (_(() => {
|
|
401
450
|
if (i) {
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
},
|
|
451
|
+
const I = setTimeout(() => {
|
|
452
|
+
b[r + 1] && (t || r < 3) ? i(r + 1) : n == null || n();
|
|
453
|
+
}, b[r]);
|
|
405
454
|
return () => {
|
|
406
|
-
|
|
455
|
+
I && clearTimeout(I);
|
|
407
456
|
};
|
|
408
457
|
}
|
|
409
458
|
return () => {
|
|
410
459
|
};
|
|
411
|
-
}, [i, r,
|
|
412
|
-
|
|
460
|
+
}, [i, r, n, t]), r === 1) return /* @__PURE__ */ e(x, {
|
|
461
|
+
children: /* @__PURE__ */ e(S, {
|
|
462
|
+
children: /* @__PURE__ */ e(ns, {})
|
|
463
|
+
})
|
|
464
|
+
});
|
|
413
465
|
let v = "pending";
|
|
414
|
-
return (r === 3 || r === 4) && (v =
|
|
415
|
-
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
r
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
},
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
466
|
+
return (r === 3 || r === 4) && (v = t ? "correct" : "incorrect"), /* @__PURE__ */ e(x, {
|
|
467
|
+
onClick: () => a == null ? void 0 : a(),
|
|
468
|
+
children: /* @__PURE__ */ l(S, {
|
|
469
|
+
children: [r !== 1 && /* @__PURE__ */ e(es, {}, r), /* @__PURE__ */ l(Ye, {
|
|
470
|
+
state: v,
|
|
471
|
+
step: r,
|
|
472
|
+
answer: (o == null ? void 0 : o.title) || "unknown",
|
|
473
|
+
children: [r === 2 && /* @__PURE__ */ e(ls, {
|
|
474
|
+
title: p || "unknown"
|
|
475
|
+
}), r === 3 && t && /* @__PURE__ */ e(cs, {}), r === 3 && !t && /* @__PURE__ */ e(ps, {
|
|
476
|
+
title: c || "unknown"
|
|
477
|
+
}), r === 4 && /* @__PURE__ */ e(fs, {
|
|
478
|
+
points: (o == null ? void 0 : o.points) || 0
|
|
479
|
+
})]
|
|
480
|
+
})]
|
|
481
|
+
})
|
|
482
|
+
});
|
|
483
|
+
}, vs = ({
|
|
484
|
+
close: n,
|
|
485
|
+
action: a,
|
|
486
|
+
votedAnswer: i,
|
|
487
|
+
correct: o,
|
|
488
|
+
correctAnswerTitle: t,
|
|
489
|
+
questionTitle: c
|
|
490
|
+
}) => {
|
|
491
|
+
const [p, r] = E(1);
|
|
492
|
+
return /* @__PURE__ */ e(hs, {
|
|
493
|
+
close: n,
|
|
494
|
+
action: a,
|
|
495
|
+
votedAnswer: i,
|
|
496
|
+
correct: o,
|
|
497
|
+
correctAnswerTitle: t,
|
|
498
|
+
questionTitle: c,
|
|
499
|
+
setStep: r,
|
|
500
|
+
step: p,
|
|
501
|
+
title: ""
|
|
502
|
+
});
|
|
503
|
+
}, Is = /* @__PURE__ */ s("div")({
|
|
504
|
+
name: "Ht",
|
|
505
|
+
class: "hvynqnf",
|
|
506
|
+
propsAsIs: !1
|
|
507
|
+
}), As = (n) => /* @__PURE__ */ e(Is, {
|
|
508
|
+
children: /* @__PURE__ */ e(vs, {
|
|
509
|
+
...n
|
|
510
|
+
})
|
|
511
|
+
}), gs = ({
|
|
512
|
+
sdk: n
|
|
513
|
+
}) => {
|
|
514
|
+
const [a] = E(n.getNotificationsStore()), i = D(a), o = n.getFeature(Y.GAMES), t = H(() => n.getActiveNotification(), [n, i]);
|
|
515
|
+
return _(() => {
|
|
516
|
+
t && M.emit("notification", {
|
|
447
517
|
action: "rendered",
|
|
448
518
|
payload: {
|
|
449
|
-
questionId:
|
|
450
|
-
questionType:
|
|
519
|
+
questionId: t.data.questionId,
|
|
520
|
+
questionType: t.data.questionType
|
|
451
521
|
}
|
|
452
522
|
});
|
|
453
|
-
}, [
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
523
|
+
}, [t]), t && t.type === q.QUESTION_RESOLVED ? t.data.question && t.data.questionType === f.PREDICTION ? /* @__PURE__ */ e(As, {
|
|
524
|
+
action: t.action,
|
|
525
|
+
close: t.close,
|
|
526
|
+
...t.data.question
|
|
527
|
+
}) : null : t && t.type === q.ONBOARDING ? t.data.onboarding ? /* @__PURE__ */ e(Ve, {
|
|
528
|
+
open: o == null ? void 0 : o.openFeature,
|
|
529
|
+
close: t.close,
|
|
530
|
+
...t.data.onboarding
|
|
531
|
+
}) : null : t && /* @__PURE__ */ e(ze, {
|
|
532
|
+
...t.data,
|
|
533
|
+
action: t.action
|
|
534
|
+
});
|
|
535
|
+
}, Ns = ({ theme: n }) => {
|
|
536
|
+
const a = K(), i = W(), o = B();
|
|
537
|
+
return a && o.appNotification ? o.app ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(G, { customTheme: n ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(gs, { sdk: a }) }) }) : null;
|
|
464
538
|
};
|
|
465
539
|
export {
|
|
466
|
-
|
|
467
|
-
|
|
540
|
+
Ns as StreamLayerSDKNotification,
|
|
541
|
+
gs as StreamLayerSDKNotificationUI
|
|
468
542
|
};
|