@streamlayer/react 1.3.1 → 1.3.2

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