@streamlayer/react 1.3.2 → 1.3.4
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/app/provider.d.ts +14 -2
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +7 -7
- package/lib/dist/cjs/masters.js +42 -42
- package/lib/dist/es/masters.js +1135 -1140
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +107 -104
- package/lib/es/useStreamLayerApp2.js +787 -792
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -13
package/lib/es/advertisement.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as Q, useRef as J, useMemo as V } from "react";
|
|
3
|
-
import { c as f, s as n, a as
|
|
3
|
+
import { c as f, s as n, a as K, Q as X, e as $, u as N, L as Y } from "./provider.js";
|
|
4
4
|
import { F as Z, u as oo, d as eo } from "./index2.js";
|
|
5
|
-
import { N as
|
|
5
|
+
import { N as h, a as no, b as so, P as g, c as I, S as io } from "./useStreamLayerApp2.js";
|
|
6
6
|
const ao = /* @__PURE__ */ n("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c5b6wdg",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}), to = "a1rlj479", ro = "s35f1di", lo = "sj4471g", co = "b12050d8",
|
|
10
|
+
}), to = "a1rlj479", ro = "s35f1di", lo = "sj4471g", co = "b12050d8", mo = "b1d5ybek", po = (o) => o === "left" || o === "right" ? ro : co, uo = (o) => o === "left" || o === "right" ? lo : mo, vo = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", k = ({
|
|
11
11
|
children: o,
|
|
12
12
|
style: s,
|
|
13
13
|
className: r,
|
|
@@ -17,18 +17,18 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
17
17
|
onAnimationEnd: t
|
|
18
18
|
}) => /* @__PURE__ */ e(ao, {
|
|
19
19
|
style: s,
|
|
20
|
-
className: f(r, to, vo(l), i && !a &&
|
|
20
|
+
className: f(r, to, vo(l), i && !a && po(l), i && a && uo(l)),
|
|
21
21
|
onAnimationEnd: t,
|
|
22
22
|
children: o
|
|
23
|
-
}),
|
|
23
|
+
}), go = /* @__PURE__ */ n("a")({
|
|
24
24
|
name: "Link",
|
|
25
25
|
class: "l1sgte8c",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
27
|
+
}), ho = /* @__PURE__ */ n("div")({
|
|
28
28
|
name: "BannerContainer",
|
|
29
29
|
class: "b7yfc72",
|
|
30
30
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
31
|
+
}), Io = () => go, bo = /* @__PURE__ */ n(Io())({
|
|
32
32
|
name: "BannerLink",
|
|
33
33
|
class: "bejjq94",
|
|
34
34
|
propsAsIs: !0
|
|
@@ -38,7 +38,7 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
38
38
|
propsAsIs: !1
|
|
39
39
|
}), yo = ({ promotion: o, promotionId: s, hiding: r, direction: i = "bottom" }) => {
|
|
40
40
|
var a;
|
|
41
|
-
return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */ e(
|
|
41
|
+
return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */ e(k, { direction: i, hiding: r, children: /* @__PURE__ */ e(ho, { className: "BannerContainer", children: /* @__PURE__ */ e(
|
|
42
42
|
bo,
|
|
43
43
|
{
|
|
44
44
|
className: "BannerLink",
|
|
@@ -63,43 +63,43 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
63
63
|
name: "Body",
|
|
64
64
|
class: "b1gu3eml",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
66
|
+
}), ko = /* @__PURE__ */ n("div")({
|
|
67
67
|
name: "Title",
|
|
68
68
|
class: "t1u17zva",
|
|
69
69
|
propsAsIs: !1
|
|
70
|
-
}),
|
|
70
|
+
}), Co = /* @__PURE__ */ n("div")({
|
|
71
71
|
name: "Text",
|
|
72
72
|
class: "t10ko1g",
|
|
73
73
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
74
|
+
}), b = /* @__PURE__ */ n("div")({
|
|
75
75
|
name: "Media",
|
|
76
76
|
class: "mntc42e",
|
|
77
77
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
78
|
+
}), So = () => b, w = /* @__PURE__ */ n(So())({
|
|
79
79
|
name: "MediaImgFit",
|
|
80
80
|
class: "ml060eo",
|
|
81
81
|
propsAsIs: !0
|
|
82
|
-
}), Mo = () =>
|
|
82
|
+
}), Mo = () => b, W = /* @__PURE__ */ n(Mo())({
|
|
83
83
|
name: "MediaImgCentered",
|
|
84
84
|
class: "m1vqlvig",
|
|
85
85
|
propsAsIs: !0
|
|
86
|
-
}), To = () =>
|
|
86
|
+
}), To = () => W, Bo = /* @__PURE__ */ n(To())({
|
|
87
87
|
name: "MediaImgBottom",
|
|
88
88
|
class: "m1e7tvi5",
|
|
89
89
|
propsAsIs: !0
|
|
90
|
-
}), Eo = () =>
|
|
90
|
+
}), Eo = () => b, Lo = /* @__PURE__ */ n(Eo())({
|
|
91
91
|
name: "MediaImgSolid",
|
|
92
92
|
class: "mqvntt2",
|
|
93
93
|
propsAsIs: !0
|
|
94
|
-
}), xo = () =>
|
|
94
|
+
}), xo = () => b, Oo = /* @__PURE__ */ n(xo())({
|
|
95
95
|
name: "MediaImgMiddle",
|
|
96
96
|
class: "m12jtj3u",
|
|
97
97
|
propsAsIs: !0
|
|
98
|
-
}),
|
|
98
|
+
}), Po = /* @__PURE__ */ n("button")({
|
|
99
99
|
name: "Button",
|
|
100
100
|
class: "bkq1frv",
|
|
101
101
|
propsAsIs: !1
|
|
102
|
-
}),
|
|
102
|
+
}), _o = () => K, jo = /* @__PURE__ */ n(_o())({
|
|
103
103
|
name: "StyledChevronRight",
|
|
104
104
|
class: "sis90pl",
|
|
105
105
|
propsAsIs: !0
|
|
@@ -108,136 +108,139 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
108
108
|
class: "l9mjmz3",
|
|
109
109
|
propsAsIs: !1
|
|
110
110
|
}), Ro = {
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
116
|
-
[
|
|
117
|
-
}, Fo = ({
|
|
111
|
+
[h.UNSET]: w,
|
|
112
|
+
[h.FIT]: w,
|
|
113
|
+
[h.CENTERED]: W,
|
|
114
|
+
[h.BOTTOM]: Bo,
|
|
115
|
+
[h.SOLID]: Lo,
|
|
116
|
+
[h.MIDDLE]: Oo
|
|
117
|
+
}, Fo = ({ src: o, imagePosition: s }) => {
|
|
118
|
+
const r = Ro[s];
|
|
119
|
+
return /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
|
|
120
|
+
}, qo = ({ notification: o, promotionId: s, hiding: r, direction: i = "left" }) => {
|
|
118
121
|
if (!o || !o.promotion || o.enabled !== no.NOTIFICATION_ENABLED)
|
|
119
122
|
return null;
|
|
120
|
-
const { title: a, body: l, image: t, promotion:
|
|
121
|
-
return /* @__PURE__ */ e(
|
|
123
|
+
const { title: a, body: l, image: t, promotion: p } = o, { sponsorLogo: u, sponsorLogoMode: v, imagePosition: m, ctaButton: d } = p;
|
|
124
|
+
return /* @__PURE__ */ e(k, { direction: i, hiding: r, children: /* @__PURE__ */ c($o, { children: [
|
|
122
125
|
v !== so.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(Do, { children: /* @__PURE__ */ e("img", { src: u, alt: a }) }),
|
|
123
126
|
/* @__PURE__ */ c(fo, { children: [
|
|
124
|
-
/* @__PURE__ */ e(
|
|
127
|
+
/* @__PURE__ */ e(Fo, { src: t, imagePosition: m }),
|
|
125
128
|
/* @__PURE__ */ c(No, { children: [
|
|
126
|
-
a && /* @__PURE__ */ e(
|
|
127
|
-
l && /* @__PURE__ */ e(
|
|
129
|
+
a && /* @__PURE__ */ e(ko, { children: a }),
|
|
130
|
+
l && /* @__PURE__ */ e(Co, { children: l })
|
|
128
131
|
] }),
|
|
129
|
-
/* @__PURE__ */ e(
|
|
132
|
+
/* @__PURE__ */ e(Po, { name: "promo-button", style: { color: d == null ? void 0 : d.textColor, backgroundColor: d == null ? void 0 : d.color }, children: (d == null ? void 0 : d.label) || "Open" }),
|
|
130
133
|
/* @__PURE__ */ e(jo, { name: "chevronRight" })
|
|
131
134
|
] })
|
|
132
135
|
] }) });
|
|
133
|
-
},
|
|
136
|
+
}, Uo = /* @__PURE__ */ n("div")({
|
|
134
137
|
name: "OverlayContainer",
|
|
135
138
|
class: "okzhq2w",
|
|
136
139
|
propsAsIs: !1
|
|
137
|
-
}),
|
|
140
|
+
}), wo = /* @__PURE__ */ n("div")({
|
|
138
141
|
name: "PromoOverlay",
|
|
139
142
|
class: "pmgz5i",
|
|
140
143
|
propsAsIs: !1
|
|
141
|
-
}),
|
|
144
|
+
}), Go = /* @__PURE__ */ n("div")({
|
|
142
145
|
name: "Header",
|
|
143
146
|
class: "hyxi3jt",
|
|
144
147
|
propsAsIs: !1
|
|
145
|
-
}),
|
|
148
|
+
}), zo = /* @__PURE__ */ n("div")({
|
|
146
149
|
name: "HeaderContent",
|
|
147
150
|
class: "h149e3gp",
|
|
148
151
|
propsAsIs: !1
|
|
149
|
-
}),
|
|
152
|
+
}), Ho = "h10toh7", G = /* @__PURE__ */ n("img")({
|
|
150
153
|
name: "SponsorLogo",
|
|
151
154
|
class: "s1jyea6t",
|
|
152
155
|
propsAsIs: !1
|
|
153
|
-
}),
|
|
156
|
+
}), Ko = /* @__PURE__ */ n("div")({
|
|
154
157
|
name: "SponsorName",
|
|
155
158
|
class: "szpfa3h",
|
|
156
159
|
propsAsIs: !1
|
|
157
|
-
}),
|
|
160
|
+
}), Wo = /* @__PURE__ */ n("div")({
|
|
158
161
|
name: "Media",
|
|
159
162
|
class: "m1crmu01",
|
|
160
163
|
propsAsIs: !1
|
|
161
|
-
}),
|
|
164
|
+
}), Qo = /* @__PURE__ */ n("img")({
|
|
162
165
|
name: "PromoImg",
|
|
163
166
|
class: "p1l37r8s",
|
|
164
167
|
propsAsIs: !1
|
|
165
|
-
}),
|
|
168
|
+
}), Jo = "s1nmch9k", z = /* @__PURE__ */ n("div")({
|
|
166
169
|
name: "Content",
|
|
167
170
|
class: "c1er0ljd",
|
|
168
171
|
propsAsIs: !1
|
|
169
|
-
}),
|
|
172
|
+
}), Vo = /* @__PURE__ */ n("div")({
|
|
170
173
|
name: "Description",
|
|
171
174
|
class: "dydopmr",
|
|
172
175
|
propsAsIs: !1
|
|
173
|
-
}),
|
|
176
|
+
}), Xo = /* @__PURE__ */ n("div")({
|
|
174
177
|
name: "Sponsor",
|
|
175
178
|
class: "s1w6nt04",
|
|
176
179
|
propsAsIs: !1
|
|
177
|
-
}),
|
|
180
|
+
}), Yo = /* @__PURE__ */ n("div")({
|
|
178
181
|
name: "SponsorText",
|
|
179
182
|
class: "s1evcmtq",
|
|
180
183
|
propsAsIs: !1
|
|
181
|
-
}),
|
|
184
|
+
}), Zo = /* @__PURE__ */ n("div")({
|
|
182
185
|
name: "ADLogo",
|
|
183
186
|
class: "awodx0x",
|
|
184
187
|
propsAsIs: !1
|
|
185
|
-
}),
|
|
188
|
+
}), oe = /* @__PURE__ */ n("span")({
|
|
186
189
|
name: "SponsoredText",
|
|
187
190
|
class: "s1q3n6oi",
|
|
188
191
|
propsAsIs: !1
|
|
189
|
-
}),
|
|
192
|
+
}), ee = /* @__PURE__ */ n("div")({
|
|
190
193
|
name: "CloseIconWrap",
|
|
191
194
|
class: "c8d4xfk",
|
|
192
195
|
propsAsIs: !1
|
|
193
|
-
}),
|
|
196
|
+
}), ne = () => K, se = /* @__PURE__ */ n(ne())({
|
|
194
197
|
name: "CloseIcon",
|
|
195
198
|
class: "ct6oobh",
|
|
196
199
|
propsAsIs: !0
|
|
197
|
-
}),
|
|
200
|
+
}), ie = /* @__PURE__ */ n("div")({
|
|
198
201
|
name: "ActionBtnWrap",
|
|
199
202
|
class: "a1gyg7tt",
|
|
200
203
|
propsAsIs: !1
|
|
201
|
-
}),
|
|
204
|
+
}), ae = /* @__PURE__ */ n("a")({
|
|
202
205
|
name: "ActionButton",
|
|
203
206
|
class: "a17rwbtk",
|
|
204
207
|
propsAsIs: !1
|
|
205
|
-
}),
|
|
208
|
+
}), te = /* @__PURE__ */ n("div")({
|
|
206
209
|
name: "Title",
|
|
207
210
|
class: "t3vxzaw",
|
|
208
211
|
propsAsIs: !1
|
|
209
|
-
}),
|
|
210
|
-
var i, a, l, t,
|
|
211
|
-
const A = o.type ===
|
|
212
|
-
return /* @__PURE__ */ c(
|
|
213
|
-
/* @__PURE__ */ c(
|
|
214
|
-
/* @__PURE__ */ c(
|
|
215
|
-
((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode ===
|
|
212
|
+
}), re = "h10f3u0j", H = ({ promotion: o, promotionId: s, onClose: r }) => {
|
|
213
|
+
var i, a, l, t, p, u, v, m, d, C, S, M, T, B, E, L, x, O, P, _, j, D, R, F, q, U;
|
|
214
|
+
const A = o.type === g.INGAME_IAB11_LBAR || o.type === g.INGAME_IAB11, y = ((i = o.sponsor) == null ? void 0 : i.logo) && o.logoMode === I.CENTER;
|
|
215
|
+
return /* @__PURE__ */ c(wo, { className: "PromoOverlay", children: [
|
|
216
|
+
/* @__PURE__ */ c(Go, { children: [
|
|
217
|
+
/* @__PURE__ */ c(zo, { className: f(!y && Ho), children: [
|
|
218
|
+
((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === I.LEFT && /* @__PURE__ */ e(G, { src: (l = o.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
|
|
216
219
|
/* @__PURE__ */ c(
|
|
217
|
-
|
|
220
|
+
Xo,
|
|
218
221
|
{
|
|
219
222
|
style: {
|
|
220
|
-
paddingLeft: (t = o.sponsor) != null && t.logo && o.logoMode ===
|
|
223
|
+
paddingLeft: (t = o.sponsor) != null && t.logo && o.logoMode === I.LEFT ? "0px" : "8px"
|
|
221
224
|
},
|
|
222
225
|
children: [
|
|
223
|
-
((
|
|
224
|
-
/* @__PURE__ */ c(
|
|
225
|
-
/* @__PURE__ */ e(
|
|
226
|
-
/* @__PURE__ */ e(
|
|
226
|
+
((p = o.sponsor) == null ? void 0 : p.logo) && o.logoMode === I.LEFT && /* @__PURE__ */ e(Ko, { children: (u = o.sponsor) == null ? void 0 : u.name }),
|
|
227
|
+
/* @__PURE__ */ c(Yo, { className: "SponsorText", children: [
|
|
228
|
+
/* @__PURE__ */ e(Zo, { children: "AD" }),
|
|
229
|
+
/* @__PURE__ */ e(oe, { children: "SPONSORED" })
|
|
227
230
|
] })
|
|
228
231
|
]
|
|
229
232
|
}
|
|
230
233
|
)
|
|
231
234
|
] }),
|
|
232
|
-
/* @__PURE__ */ e(
|
|
235
|
+
/* @__PURE__ */ e(ee, { className: "ClosePromoIcon", onClick: r, children: /* @__PURE__ */ e(se, { name: "icon-cross" }) })
|
|
233
236
|
] }),
|
|
234
|
-
/* @__PURE__ */ c(
|
|
235
|
-
y && /* @__PURE__ */ e(
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
+
/* @__PURE__ */ c(Wo, { children: [
|
|
238
|
+
y && /* @__PURE__ */ e(G, { className: Jo, src: (v = o.sponsor) == null ? void 0 : v.logo, alt: "promo" }),
|
|
239
|
+
/* @__PURE__ */ e(z, { children: (d = (m = o.banner) == null ? void 0 : m.video) != null && d.url ? /* @__PURE__ */ e(
|
|
237
240
|
X,
|
|
238
241
|
{
|
|
239
|
-
source: (
|
|
240
|
-
poster: (
|
|
242
|
+
source: (S = (C = o.banner) == null ? void 0 : C.video) == null ? void 0 : S.url,
|
|
243
|
+
poster: (T = (M = o.banner) == null ? void 0 : M.video) == null ? void 0 : T.thumbnailUrl,
|
|
241
244
|
aspectRatio: A ? "1/1" : "16/9",
|
|
242
245
|
onPlay: () => {
|
|
243
246
|
$.emit("advertisement", {
|
|
@@ -249,52 +252,52 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
249
252
|
});
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
|
-
) : (
|
|
253
|
-
!A && /* @__PURE__ */ c(
|
|
254
|
-
((
|
|
255
|
-
((
|
|
255
|
+
) : (B = o.banner) != null && B.imageUrl ? /* @__PURE__ */ e(Qo, { style: A ? { aspectRatio: "1/1" } : {}, src: (E = o.banner) == null ? void 0 : E.imageUrl, alt: "promo" }) : null }),
|
|
256
|
+
!A && /* @__PURE__ */ c(z, { children: [
|
|
257
|
+
((L = o.banner) == null ? void 0 : L.title) && /* @__PURE__ */ e(te, { className: f("AdvTitle", y && re), children: (x = o.banner) == null ? void 0 : x.title }),
|
|
258
|
+
((O = o.banner) == null ? void 0 : O.body) && /* @__PURE__ */ e(Vo, { className: "AdvDescription", children: (P = o.banner) == null ? void 0 : P.body })
|
|
256
259
|
] })
|
|
257
260
|
] }),
|
|
258
|
-
/* @__PURE__ */ e(
|
|
259
|
-
|
|
261
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(
|
|
262
|
+
ae,
|
|
260
263
|
{
|
|
261
|
-
href: (
|
|
264
|
+
href: (_ = o.banner) == null ? void 0 : _.url,
|
|
262
265
|
style: {
|
|
263
|
-
backgroundColor: ((
|
|
264
|
-
color: ((
|
|
266
|
+
backgroundColor: ((D = (j = o.banner) == null ? void 0 : j.ctaButton) == null ? void 0 : D.color) || "#009dc4",
|
|
267
|
+
color: ((F = (R = o.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : F.textColor) || "#fff"
|
|
265
268
|
},
|
|
266
269
|
"data-analytics": "button",
|
|
267
270
|
"data-promo-id": s,
|
|
268
271
|
"data-promo-type": o.type,
|
|
269
272
|
target: "_blank",
|
|
270
|
-
children: (
|
|
273
|
+
children: (U = (q = o.banner) == null ? void 0 : q.ctaButton) == null ? void 0 : U.label
|
|
271
274
|
}
|
|
272
275
|
) })
|
|
273
276
|
] });
|
|
274
|
-
},
|
|
277
|
+
}, le = /* @__PURE__ */ n("div")({
|
|
275
278
|
name: "SidebarContainer",
|
|
276
279
|
class: "s1abskp8",
|
|
277
280
|
propsAsIs: !1
|
|
278
|
-
}),
|
|
281
|
+
}), de = ({
|
|
279
282
|
children: o,
|
|
280
283
|
direction: s,
|
|
281
284
|
style: r,
|
|
282
285
|
className: i,
|
|
283
286
|
hiding: a
|
|
284
|
-
}) => /* @__PURE__ */ e(
|
|
287
|
+
}) => /* @__PURE__ */ e(k, {
|
|
285
288
|
direction: s,
|
|
286
289
|
style: r,
|
|
287
290
|
hiding: a,
|
|
288
291
|
className: i,
|
|
289
|
-
children: /* @__PURE__ */ e(
|
|
292
|
+
children: /* @__PURE__ */ e(le, {
|
|
290
293
|
children: o
|
|
291
294
|
})
|
|
292
|
-
}),
|
|
295
|
+
}), ce = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === g.INGAME_IAB21_LBAR, me = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11 || (o == null ? void 0 : o.type) === g.INGAME_IAB21, pe = ({ advertisement: o, skipTypeCheck: s, layoutMode: r = "side-by-side", sidebar: i, isNotification: a, banner: l }) => {
|
|
293
296
|
const t = N(o.data);
|
|
294
297
|
return !t.data && t.loading ? null : t.error ? /* @__PURE__ */ c("div", { children: [
|
|
295
298
|
"error ",
|
|
296
299
|
/* @__PURE__ */ e("button", { onClick: o.close, children: "close" })
|
|
297
|
-
] }) : t.data ? a ? /* @__PURE__ */ e(
|
|
300
|
+
] }) : t.data ? a ? /* @__PURE__ */ e(qo, { notification: t.data.notification, promotionId: o.id }) : !i && !l && (s || me(t.data.promotions)) ? /* @__PURE__ */ e(Uo, { className: "PromoOverlayContainer", children: /* @__PURE__ */ e(H, { promotionId: o.id, promotion: t.data.promotions, onClose: o.close }) }) : i && (s || ce(t.data.promotions)) ? /* @__PURE__ */ e(de, { className: "PromoSidebarContainer", direction: i, hiding: o.hiding, children: /* @__PURE__ */ e(H, { promotionId: o.id, promotion: t.data.promotions, onClose: o.close }) }) : l ? /* @__PURE__ */ e(
|
|
298
301
|
yo,
|
|
299
302
|
{
|
|
300
303
|
promotionId: o.id,
|
|
@@ -306,14 +309,14 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
306
309
|
"empty promo ",
|
|
307
310
|
/* @__PURE__ */ e("button", { onClick: o.close, children: "close" })
|
|
308
311
|
] });
|
|
309
|
-
},
|
|
312
|
+
}, ue = /* @__PURE__ */ n("div")({
|
|
310
313
|
name: "AdvertisementUIWrap",
|
|
311
314
|
class: "aa6pjif",
|
|
312
315
|
propsAsIs: !1
|
|
313
|
-
}),
|
|
316
|
+
}), ve = (o) => {
|
|
314
317
|
const s = o.target;
|
|
315
318
|
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
316
|
-
const r = s.getAttribute("data-promo-id") || "", i = s.getAttribute("data-promo-type") ||
|
|
319
|
+
const r = s.getAttribute("data-promo-id") || "", i = s.getAttribute("data-promo-type") || g.UNSET;
|
|
317
320
|
s.getAttribute("data-analytics") === "button" && $.emit("advertisement", {
|
|
318
321
|
action: "buttonSelect",
|
|
319
322
|
payload: {
|
|
@@ -328,7 +331,7 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
328
331
|
}
|
|
329
332
|
});
|
|
330
333
|
}
|
|
331
|
-
},
|
|
334
|
+
}, ge = ({
|
|
332
335
|
gamification: o,
|
|
333
336
|
layoutMode: s,
|
|
334
337
|
skipTypeCheck: r,
|
|
@@ -336,19 +339,19 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
336
339
|
banner: a,
|
|
337
340
|
notification: l,
|
|
338
341
|
isMobileScreen: t,
|
|
339
|
-
persistent:
|
|
342
|
+
persistent: p
|
|
340
343
|
}) => {
|
|
341
|
-
const u = J(null), v = N(o.advertisement.$list),
|
|
342
|
-
() => o.advertisement.getActiveAdvertisement(
|
|
344
|
+
const u = J(null), v = N(o.advertisement.$list), m = V(
|
|
345
|
+
() => o.advertisement.getActiveAdvertisement(p),
|
|
343
346
|
// fire getActiveNotification when notifications were updated
|
|
344
347
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
345
|
-
[v,
|
|
348
|
+
[v, p]
|
|
346
349
|
);
|
|
347
350
|
return Y(u, {
|
|
348
|
-
enabled: !!
|
|
351
|
+
enabled: !!m,
|
|
349
352
|
event: "click",
|
|
350
|
-
listener:
|
|
351
|
-
}),
|
|
353
|
+
listener: ve
|
|
354
|
+
}), m ? /* @__PURE__ */ e(ue, {
|
|
352
355
|
ref: u,
|
|
353
356
|
style: {
|
|
354
357
|
height: !a && !i ? "auto" : "100%"
|
|
@@ -358,7 +361,7 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
358
361
|
skipTypeCheck: r,
|
|
359
362
|
sidebar: i,
|
|
360
363
|
banner: a,
|
|
361
|
-
advertisement:
|
|
364
|
+
advertisement: m,
|
|
362
365
|
layoutMode: s,
|
|
363
366
|
isNotification: l
|
|
364
367
|
})
|
|
@@ -371,7 +374,7 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
371
374
|
event: a,
|
|
372
375
|
layoutMode: l,
|
|
373
376
|
isMobileScreen: t,
|
|
374
|
-
persistent:
|
|
377
|
+
persistent: p,
|
|
375
378
|
notification: u
|
|
376
379
|
}) => {
|
|
377
380
|
const {
|
|
@@ -380,7 +383,7 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
380
383
|
Q(() => {
|
|
381
384
|
a ? o.createEventSession(a) : v();
|
|
382
385
|
}, [a, v, o]);
|
|
383
|
-
const
|
|
386
|
+
const m = N(o.featuresList.getStore());
|
|
384
387
|
if (s && r)
|
|
385
388
|
return /* @__PURE__ */ e("div", {
|
|
386
389
|
style: {
|
|
@@ -388,20 +391,20 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
388
391
|
},
|
|
389
392
|
children: "define either sidebar or banner, not both."
|
|
390
393
|
});
|
|
391
|
-
if (!
|
|
394
|
+
if (!m)
|
|
392
395
|
return null;
|
|
393
396
|
const d = o.getFeature(io.GAMES);
|
|
394
|
-
return d ? /* @__PURE__ */ e(
|
|
397
|
+
return d ? /* @__PURE__ */ e(ge, {
|
|
395
398
|
gamification: d,
|
|
396
399
|
sidebar: s,
|
|
397
400
|
banner: r,
|
|
398
401
|
layoutMode: l,
|
|
399
402
|
isMobileScreen: t,
|
|
400
|
-
persistent:
|
|
403
|
+
persistent: p,
|
|
401
404
|
notification: u,
|
|
402
405
|
skipTypeCheck: i
|
|
403
406
|
}) : null;
|
|
404
|
-
},
|
|
407
|
+
}, $e = ({
|
|
405
408
|
event: o,
|
|
406
409
|
sidebar: s,
|
|
407
410
|
banner: r,
|
|
@@ -425,6 +428,6 @@ const ao = /* @__PURE__ */ n("div")({
|
|
|
425
428
|
) }) }) : null;
|
|
426
429
|
};
|
|
427
430
|
export {
|
|
428
|
-
|
|
431
|
+
$e as StreamLayerSDKAdvertisement,
|
|
429
432
|
he as StreamLayerSDKAdvertisementUI
|
|
430
433
|
};
|