@streamlayer/react 1.1.3 → 1.1.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.
@@ -1,295 +1,328 @@
1
- import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
- import { useEffect as R, useRef as w, useMemo as D } from "react";
3
- import { a as U, s, c as q, K as F, u as v, L as K, e as O } from "./index2.js";
4
- import { F as z, u as H, i as W } from "./app.js";
5
- import { P as c, a as m, S as J } from "./useStreamLayerApp2.js";
6
- const Q = /* @__PURE__ */ s("div")({
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { useEffect as F, useRef as z, useMemo as H } from "react";
3
+ import { a as y, s, c as W, Q as K, e as g, u as A, L as Q } from "./index2.js";
4
+ import { F as J, u as V, d as X } from "./app.js";
5
+ import { P as m, a as v, S as Y } from "./useStreamLayerApp2.js";
6
+ const Z = /* @__PURE__ */ s("div")({
7
7
  name: "Container",
8
8
  class: "c5b6wdg",
9
9
  propsAsIs: !1
10
- }), V = "a1rlj479", X = "s35f1di", Y = "sj4471g", Z = "b12050d8", oo = "b1d5ybek", no = (o) => o === "left" || o === "right" ? X : Z, eo = (o) => o === "left" || o === "right" ? Y : oo, so = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", G = ({
11
- children: o,
12
- style: a,
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, le = (e) => e === "left" ? "avdxyl3" : e === "right" ? "a1bisd08" : e === "top" ? "a1u9y2aj" : "a1qqaks", D = ({
11
+ children: e,
12
+ style: t,
13
13
  className: i,
14
- enabled: e = !0,
15
- hiding: l,
16
- direction: r = "left",
17
- onAnimationEnd: t
18
- }) => /* @__PURE__ */ n(Q, {
19
- style: a,
20
- className: U(i, V, so(r), e && !l && no(r), e && l && eo(r)),
21
- onAnimationEnd: t,
22
- children: o
23
- }), lo = /* @__PURE__ */ s("div")({
14
+ enabled: a = !0,
15
+ hiding: n,
16
+ direction: l = "left",
17
+ onAnimationEnd: r
18
+ }) => /* @__PURE__ */ o(Z, {
19
+ style: t,
20
+ className: y(i, ee, le(l), a && !n && te(l), a && n && ie(l)),
21
+ onAnimationEnd: r,
22
+ children: e
23
+ }), re = /* @__PURE__ */ s("a")({
24
+ name: "Link",
25
+ class: "l1sgte8c",
26
+ propsAsIs: !1
27
+ }), de = /* @__PURE__ */ s("div")({
24
28
  name: "BannerContainer",
25
- class: "bipmch2",
29
+ class: "b7yfc72",
26
30
  propsAsIs: !1
27
- }), ao = /* @__PURE__ */ s("img")({
31
+ }), ce = () => re, pe = /* @__PURE__ */ s(ce())({
32
+ name: "BannerLink",
33
+ class: "bejjq94",
34
+ propsAsIs: !0
35
+ }), me = /* @__PURE__ */ s("img")({
28
36
  name: "BannerImg",
29
- class: "bpkcihp",
37
+ class: "b1j94hdr",
30
38
  propsAsIs: !1
31
- }), io = ({
32
- promotion: o,
33
- hiding: a,
34
- direction: i = "bottom"
35
- }) => {
36
- var e;
37
- return (e = o.additionalBanner) != null && e.imageUrl ? /* @__PURE__ */ n(G, {
38
- direction: i,
39
- hiding: a,
40
- children: /* @__PURE__ */ n(lo, {
41
- children: /* @__PURE__ */ n(ao, {
42
- src: o.additionalBanner.imageUrl,
43
- alt: "promo"
44
- })
45
- })
46
- }) : null;
47
- }, ro = /* @__PURE__ */ s("div")({
39
+ }), ue = ({ promotion: e, promotionId: t, hiding: i, direction: a = "bottom" }) => {
40
+ var n;
41
+ return (n = e.additionalBanner) != null && n.imageUrl ? /* @__PURE__ */ o(D, { direction: a, hiding: i, children: /* @__PURE__ */ o(de, { children: /* @__PURE__ */ o(
42
+ pe,
43
+ {
44
+ href: e.additionalBanner.url,
45
+ "data-promo-id": t,
46
+ "data-promo-type": e.type,
47
+ "data-analytics": "banner",
48
+ target: "_blank",
49
+ children: /* @__PURE__ */ o(me, { src: e.additionalBanner.imageUrl, alt: "promo" })
50
+ }
51
+ ) }) }) : null;
52
+ }, ve = /* @__PURE__ */ s("div")({
53
+ name: "OverlayContainer",
54
+ class: "okzhq2w",
55
+ propsAsIs: !1
56
+ }), be = /* @__PURE__ */ s("div")({
57
+ name: "PromoOverlay",
58
+ class: "pmgz5i",
59
+ propsAsIs: !1
60
+ }), he = /* @__PURE__ */ s("div")({
48
61
  name: "Header",
49
- class: "hkzhq2w",
62
+ class: "hyxi3jt",
50
63
  propsAsIs: !1
51
- }), to = /* @__PURE__ */ s("div")({
64
+ }), ye = /* @__PURE__ */ s("div")({
52
65
  name: "HeaderContent",
53
- class: "hmgz5i",
66
+ class: "h149e3gp",
54
67
  propsAsIs: !1
55
- }), j = /* @__PURE__ */ s("img")({
68
+ }), ge = "h10toh7", G = /* @__PURE__ */ s("img")({
56
69
  name: "SponsorLogo",
57
- class: "syxi3jt",
70
+ class: "s1jyea6t",
58
71
  propsAsIs: !1
59
- }), co = /* @__PURE__ */ s("div")({
72
+ }), Ae = /* @__PURE__ */ s("div")({
60
73
  name: "SponsorName",
61
- class: "s149e3gp",
74
+ class: "szpfa3h",
62
75
  propsAsIs: !1
63
- }), po = /* @__PURE__ */ s("div")({
64
- name: "PromoOverlay",
65
- class: "p10toh7",
66
- propsAsIs: !1
67
- }), mo = /* @__PURE__ */ s("div")({
76
+ }), Ie = /* @__PURE__ */ s("div")({
68
77
  name: "Media",
69
- class: "m1jyea6t",
78
+ class: "m1crmu01",
70
79
  propsAsIs: !1
71
- }), uo = /* @__PURE__ */ s("div")({
72
- name: "Text",
73
- class: "tzpfa3h",
80
+ }), fe = /* @__PURE__ */ s("img")({
81
+ name: "PromoImg",
82
+ class: "p1l37r8s",
74
83
  propsAsIs: !1
75
- }), vo = /* @__PURE__ */ s("div")({
84
+ }), $e = "s1nmch9k", U = /* @__PURE__ */ s("div")({
85
+ name: "Content",
86
+ class: "c1er0ljd",
87
+ propsAsIs: !1
88
+ }), Se = /* @__PURE__ */ s("div")({
76
89
  name: "Description",
77
- class: "d1crmu01",
90
+ class: "dydopmr",
78
91
  propsAsIs: !1
79
- }), ho = /* @__PURE__ */ s("div")({
92
+ }), Me = /* @__PURE__ */ s("div")({
93
+ name: "Sponsor",
94
+ class: "s1w6nt04",
95
+ propsAsIs: !1
96
+ }), Be = /* @__PURE__ */ s("div")({
80
97
  name: "SponsorText",
81
- class: "s1l37r8s",
98
+ class: "s1evcmtq",
82
99
  propsAsIs: !1
83
- }), go = /* @__PURE__ */ s("div")({
100
+ }), Ee = /* @__PURE__ */ s("div")({
84
101
  name: "ADLogo",
85
- class: "a1nmch9k",
102
+ class: "awodx0x",
86
103
  propsAsIs: !1
87
- }), bo = /* @__PURE__ */ s("span")({
104
+ }), ke = /* @__PURE__ */ s("span")({
88
105
  name: "SponsoredText",
89
- class: "s1er0ljd",
106
+ class: "s1q3n6oi",
90
107
  propsAsIs: !1
91
- }), Ao = /* @__PURE__ */ s("div")({
108
+ }), Le = /* @__PURE__ */ s("div")({
92
109
  name: "CloseIconWrap",
93
- class: "cydopmr",
110
+ class: "c8d4xfk",
94
111
  propsAsIs: !1
95
- }), yo = () => q, Io = /* @__PURE__ */ s(yo())({
112
+ }), Ne = () => W, Ce = /* @__PURE__ */ s(Ne())({
96
113
  name: "CloseIcon",
97
- class: "c1w6nt04",
114
+ class: "ct6oobh",
98
115
  propsAsIs: !0
99
- }), fo = /* @__PURE__ */ s("div")({
100
- name: "Content",
101
- class: "c1evcmtq",
102
- propsAsIs: !1
103
- }), $o = /* @__PURE__ */ s("div")({
116
+ }), xe = /* @__PURE__ */ s("div")({
104
117
  name: "ActionBtnWrap",
105
- class: "awodx0x",
118
+ class: "a1gyg7tt",
106
119
  propsAsIs: !1
107
- }), Mo = /* @__PURE__ */ s("a")({
120
+ }), Te = /* @__PURE__ */ s("a")({
108
121
  name: "ActionButton",
109
- class: "a1q3n6oi",
110
- propsAsIs: !1
111
- }), So = /* @__PURE__ */ s("img")({
112
- name: "PromoImg",
113
- class: "p8d4xfk",
122
+ class: "a17rwbtk",
114
123
  propsAsIs: !1
115
- }), ko = /* @__PURE__ */ s("div")({
124
+ }), _e = /* @__PURE__ */ s("div")({
116
125
  name: "Title",
117
- class: "tt6oobh",
126
+ class: "t3vxzaw",
118
127
  propsAsIs: !1
119
- }), P = ({
120
- promotion: o,
121
- onClose: a,
122
- inSidebar: i
123
- }) => {
124
- var e, l, r, t, p, h, g, b, A, y, I, f, $, M, S, k, B, C, E, x, L, N, T, _;
125
- const u = o.type === c.INGAME_IAB11_LBAR || o.type === c.INGAME_IAB11;
126
- return /* @__PURE__ */ d(po, { className: "PromoOverlay", style: { ...i ? {} : { backgroundColor: "#1E3344" } }, children: [
127
- /* @__PURE__ */ d(ro, { children: [
128
- /* @__PURE__ */ d(to, { children: [
129
- ((e = o.sponsor) == null ? void 0 : e.logo) && o.logoMode === m.LEFT && /* @__PURE__ */ n(j, { src: (l = o.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
128
+ }), je = "h10f3u0j", q = ({ promotion: e, promotionId: t, onClose: i }) => {
129
+ var a, n, l, r, p, c, u, I, f, $, S, M, B, E, k, L, N, C, x, T, _, j, P, O, w, R;
130
+ const b = e.type === m.INGAME_IAB11_LBAR || e.type === m.INGAME_IAB11, h = ((a = e.sponsor) == null ? void 0 : a.logo) && e.logoMode === v.CENTER;
131
+ return /* @__PURE__ */ d(be, { className: "PromoOverlay", children: [
132
+ /* @__PURE__ */ d(he, { children: [
133
+ /* @__PURE__ */ d(ye, { className: y(!h && ge), children: [
134
+ ((n = e.sponsor) == null ? void 0 : n.logo) && e.logoMode === v.LEFT && /* @__PURE__ */ o(G, { src: (l = e.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
130
135
  /* @__PURE__ */ d(
131
- "div",
136
+ Me,
132
137
  {
133
138
  style: {
134
- paddingLeft: (r = o.sponsor) != null && r.logo && o.logoMode === m.LEFT ? "0px" : "8px"
139
+ paddingLeft: (r = e.sponsor) != null && r.logo && e.logoMode === v.LEFT ? "0px" : "8px"
135
140
  },
136
141
  children: [
137
- ((t = o.sponsor) == null ? void 0 : t.logo) && o.logoMode === m.LEFT && /* @__PURE__ */ n(co, { children: (p = o.sponsor) == null ? void 0 : p.name }),
138
- /* @__PURE__ */ d(ho, { children: [
139
- /* @__PURE__ */ n(go, { children: "AD" }),
140
- /* @__PURE__ */ n(bo, { children: "SPONSORED" })
142
+ ((p = e.sponsor) == null ? void 0 : p.logo) && e.logoMode === v.LEFT && /* @__PURE__ */ o(Ae, { children: (c = e.sponsor) == null ? void 0 : c.name }),
143
+ /* @__PURE__ */ d(Be, { children: [
144
+ /* @__PURE__ */ o(Ee, { children: "AD" }),
145
+ /* @__PURE__ */ o(ke, { children: "SPONSORED" })
141
146
  ] })
142
147
  ]
143
148
  }
144
149
  )
145
150
  ] }),
146
- /* @__PURE__ */ n(Ao, { onClick: a, children: /* @__PURE__ */ n(Io, { name: "icon-cross" }) })
151
+ /* @__PURE__ */ o(Le, { onClick: i, children: /* @__PURE__ */ o(Ce, { name: "icon-cross" }) })
147
152
  ] }),
148
- /* @__PURE__ */ d(mo, { children: [
149
- ((h = o.sponsor) == null ? void 0 : h.logo) && o.logoMode === m.CENTER && /* @__PURE__ */ n(j, { src: (g = o.sponsor) == null ? void 0 : g.logo, alt: "promo" }),
150
- /* @__PURE__ */ d(fo, { children: [
151
- (A = (b = o.banner) == null ? void 0 : b.video) != null && A.url ? /* @__PURE__ */ n(
152
- F,
153
- {
154
- source: (I = (y = o.banner) == null ? void 0 : y.video) == null ? void 0 : I.url,
155
- poster: ($ = (f = o.banner) == null ? void 0 : f.video) == null ? void 0 : $.thumbnailUrl,
156
- aspectRatio: u ? "1/1" : "16/9"
157
- }
158
- ) : (M = o.banner) != null && M.imageUrl ? /* @__PURE__ */ n(
159
- So,
160
- {
161
- style: u ? { width: "268px", height: "268px" } : {},
162
- src: (S = o.banner) == null ? void 0 : S.imageUrl,
163
- alt: "promo"
164
- }
165
- ) : null,
166
- !u && /* @__PURE__ */ d(uo, { children: [
167
- /* @__PURE__ */ n(ko, { children: (k = o.banner) == null ? void 0 : k.title }),
168
- /* @__PURE__ */ n(vo, { children: (B = o.banner) == null ? void 0 : B.body })
169
- ] })
170
- ] }),
171
- /* @__PURE__ */ n($o, { children: /* @__PURE__ */ n(
172
- Mo,
153
+ /* @__PURE__ */ d(Ie, { children: [
154
+ h && /* @__PURE__ */ o(G, { className: $e, src: (u = e.sponsor) == null ? void 0 : u.logo, alt: "promo" }),
155
+ /* @__PURE__ */ o(U, { children: (f = (I = e.banner) == null ? void 0 : I.video) != null && f.url ? /* @__PURE__ */ o(
156
+ K,
173
157
  {
174
- href: (C = o.banner) == null ? void 0 : C.url,
175
- style: {
176
- backgroundColor: ((x = (E = o.banner) == null ? void 0 : E.ctaButton) == null ? void 0 : x.color) || "#009dc4",
177
- color: ((N = (L = o.banner) == null ? void 0 : L.ctaButton) == null ? void 0 : N.textColor) || "#fff"
178
- },
179
- target: "_blank",
180
- children: (_ = (T = o.banner) == null ? void 0 : T.ctaButton) == null ? void 0 : _.label
158
+ source: (S = ($ = e.banner) == null ? void 0 : $.video) == null ? void 0 : S.url,
159
+ poster: (B = (M = e.banner) == null ? void 0 : M.video) == null ? void 0 : B.thumbnailUrl,
160
+ aspectRatio: b ? "1/1" : "16/9",
161
+ onPlay: () => {
162
+ g.emit("advertisement", {
163
+ action: "videoPlay",
164
+ payload: {
165
+ advertisementId: t,
166
+ advertisementType: e.type
167
+ }
168
+ });
169
+ }
181
170
  }
182
- ) })
183
- ] })
171
+ ) : (E = e.banner) != null && E.imageUrl ? /* @__PURE__ */ o(fe, { style: b ? { aspectRatio: "1/1" } : {}, src: (k = e.banner) == null ? void 0 : k.imageUrl, alt: "promo" }) : null }),
172
+ !b && /* @__PURE__ */ d(U, { children: [
173
+ ((L = e.banner) == null ? void 0 : L.title) && /* @__PURE__ */ o(_e, { className: y(h && je), children: (N = e.banner) == null ? void 0 : N.title }),
174
+ ((C = e.banner) == null ? void 0 : C.body) && /* @__PURE__ */ o(Se, { children: (x = e.banner) == null ? void 0 : x.body })
175
+ ] })
176
+ ] }),
177
+ /* @__PURE__ */ o(xe, { children: /* @__PURE__ */ o(
178
+ Te,
179
+ {
180
+ href: (T = e.banner) == null ? void 0 : T.url,
181
+ style: {
182
+ backgroundColor: ((j = (_ = e.banner) == null ? void 0 : _.ctaButton) == null ? void 0 : j.color) || "#009dc4",
183
+ color: ((O = (P = e.banner) == null ? void 0 : P.ctaButton) == null ? void 0 : O.textColor) || "#fff"
184
+ },
185
+ "data-analytics": "button",
186
+ "data-promo-id": t,
187
+ "data-promo-type": e.type,
188
+ target: "_blank",
189
+ children: (R = (w = e.banner) == null ? void 0 : w.ctaButton) == null ? void 0 : R.label
190
+ }
191
+ ) })
184
192
  ] });
185
- }, Bo = /* @__PURE__ */ s("div")({
193
+ }, Pe = /* @__PURE__ */ s("div")({
186
194
  name: "SidebarContainer",
187
195
  class: "s1abskp8",
188
196
  propsAsIs: !1
189
- }), Co = ({
190
- children: o,
191
- direction: a,
197
+ }), Oe = ({
198
+ children: e,
199
+ direction: t,
192
200
  style: i,
193
- className: e,
194
- hiding: l
195
- }) => /* @__PURE__ */ n(G, {
196
- direction: a,
201
+ className: a,
202
+ hiding: n
203
+ }) => /* @__PURE__ */ o(D, {
204
+ direction: t,
197
205
  style: i,
198
- hiding: l,
199
- className: e,
200
- children: /* @__PURE__ */ n(Bo, {
201
- children: o
206
+ hiding: n,
207
+ className: a,
208
+ children: /* @__PURE__ */ o(Pe, {
209
+ children: e
202
210
  })
203
- }), Eo = (o) => (o == null ? void 0 : o.type) === c.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === c.INGAME_IAB21_LBAR, xo = (o) => (o == null ? void 0 : o.type) === c.INGAME_IAB11 || (o == null ? void 0 : o.type) === c.INGAME_IAB21, Lo = ({ advertisement: o, layoutMode: a = "side-by-side", sidebar: i, banner: e }) => {
204
- const l = v(o.data);
205
- return !l.data && l.loading ? null : l.error ? /* @__PURE__ */ d("div", { children: [
211
+ }), we = (e) => (e == null ? void 0 : e.type) === m.INGAME_IAB11_LBAR || (e == null ? void 0 : e.type) === m.INGAME_IAB21_LBAR, Re = (e) => (e == null ? void 0 : e.type) === m.INGAME_IAB11 || (e == null ? void 0 : e.type) === m.INGAME_IAB21, Ge = ({ advertisement: e, layoutMode: t = "side-by-side", sidebar: i, banner: a }) => {
212
+ const n = A(e.data);
213
+ return !n.data && n.loading ? null : n.error ? /* @__PURE__ */ d("div", { children: [
206
214
  "error ",
207
- /* @__PURE__ */ n("button", { onClick: o.close, children: "close" })
208
- ] }) : l.data ? !i && !e && xo(l.data) ? /* @__PURE__ */ n(P, { promotion: l.data, onClose: o.close }) : i && Eo(l.data) ? /* @__PURE__ */ n(Co, { direction: i, hiding: o.hiding, children: /* @__PURE__ */ n(P, { promotion: l.data, onClose: o.close, inSidebar: !0 }) }) : e ? /* @__PURE__ */ n(io, { hiding: o.hiding, promotion: l.data, direction: e }) : null : /* @__PURE__ */ d("div", { children: [
215
+ /* @__PURE__ */ o("button", { onClick: e.close, children: "close" })
216
+ ] }) : n.data ? !i && !a && Re(n.data) ? /* @__PURE__ */ o(ve, { children: /* @__PURE__ */ o(q, { promotionId: e.id, promotion: n.data, onClose: e.close }) }) : i && we(n.data) ? /* @__PURE__ */ o(Oe, { direction: i, hiding: e.hiding, children: /* @__PURE__ */ o(q, { promotionId: e.id, promotion: n.data, onClose: e.close }) }) : a ? /* @__PURE__ */ o(ue, { promotionId: e.id, hiding: e.hiding, promotion: n.data, direction: a }) : null : /* @__PURE__ */ d("div", { children: [
209
217
  "empty promo ",
210
- /* @__PURE__ */ n("button", { onClick: o.close, children: "close" })
218
+ /* @__PURE__ */ o("button", { onClick: e.close, children: "close" })
211
219
  ] });
212
- }, No = /* @__PURE__ */ s("div")({
220
+ }, Ue = /* @__PURE__ */ s("div")({
213
221
  name: "AdvertisementUIWrap",
214
222
  class: "aa6pjif",
215
223
  propsAsIs: !1
216
- }), To = (o) => {
217
- const a = o.target;
218
- a instanceof HTMLAnchorElement && a.target === "_blank" && a.getAttribute("data-analytics") === "web-link" && O.emit("poll", {
219
- action: "navigated",
220
- payload: {}
221
- });
222
- }, _o = ({
223
- gamification: o,
224
- layoutMode: a,
224
+ }), qe = (e) => {
225
+ const t = e.target;
226
+ if (t instanceof HTMLAnchorElement && t.target === "_blank") {
227
+ const i = t.getAttribute("data-promo-id") || "", a = t.getAttribute("data-promo-type") || m.UNSET;
228
+ t.getAttribute("data-analytics") === "button" && g.emit("advertisement", {
229
+ action: "buttonSelect",
230
+ payload: {
231
+ advertisementId: i,
232
+ advertisementType: a
233
+ }
234
+ }), t.getAttribute("data-analytics") === "banner" && g.emit("advertisement", {
235
+ action: "bannerSelect",
236
+ payload: {
237
+ advertisementId: i,
238
+ advertisementType: a
239
+ }
240
+ });
241
+ }
242
+ }, De = ({
243
+ gamification: e,
244
+ layoutMode: t,
225
245
  sidebar: i,
226
- banner: e
246
+ banner: a,
247
+ isMobileScreen: n,
248
+ persistent: l
227
249
  }) => {
228
- const l = w(null), r = v(o.advertisement.$list), t = D(
229
- () => o.advertisement.getActiveAdvertisement(),
250
+ const r = z(null), p = A(e.advertisement.$list), c = H(
251
+ () => e.advertisement.getActiveAdvertisement(l),
230
252
  // fire getActiveNotification when notifications were updated
231
253
  // eslint-disable-next-line react-hooks/exhaustive-deps
232
- [r]
254
+ [p, l]
233
255
  );
234
- return K(l, {
235
- enabled: !!t,
256
+ return Q(r, {
257
+ enabled: !!c,
236
258
  event: "click",
237
- listener: To
238
- }), t ? /* @__PURE__ */ n(No, {
239
- ref: l,
259
+ listener: qe
260
+ }), c ? /* @__PURE__ */ o(Ue, {
261
+ ref: r,
240
262
  style: {
241
- height: !e && !i ? "auto" : "100%"
263
+ height: !a && !i ? "auto" : "100%"
242
264
  },
243
- children: /* @__PURE__ */ n(Lo, {
265
+ className: n ? "mobile-view" : "",
266
+ children: /* @__PURE__ */ o(Ge, {
244
267
  sidebar: i,
245
- banner: e,
246
- advertisement: t,
247
- layoutMode: a
268
+ banner: a,
269
+ advertisement: c,
270
+ layoutMode: t
248
271
  })
249
272
  }) : null;
250
- }, jo = ({
251
- sdk: o,
252
- sidebar: a,
273
+ }, Fe = ({
274
+ sdk: e,
275
+ sidebar: t,
253
276
  banner: i,
254
- event: e,
255
- layoutMode: l
277
+ event: a,
278
+ layoutMode: n,
279
+ isMobileScreen: l,
280
+ persistent: r
256
281
  }) => {
257
282
  const {
258
- deactivate: r
259
- } = z(o);
260
- R(() => {
261
- e ? o.createEventSession(e) : r();
262
- }, [e, r, o]);
263
- const t = v(o.featuresList.getStore());
264
- if (a && i)
265
- return /* @__PURE__ */ n("div", {
283
+ deactivate: p
284
+ } = J(e);
285
+ F(() => {
286
+ a ? e.createEventSession(a) : p();
287
+ }, [a, p, e]);
288
+ const c = A(e.featuresList.getStore());
289
+ if (t && i)
290
+ return /* @__PURE__ */ o("div", {
266
291
  style: {
267
292
  color: "red"
268
293
  },
269
294
  children: "define either sidebar or banner, not both."
270
295
  });
271
- if (!t)
296
+ if (!c)
272
297
  return null;
273
- const p = o.getFeature(J.GAMES);
274
- return p ? /* @__PURE__ */ n(_o, {
275
- gamification: p,
276
- sidebar: a,
298
+ const u = e.getFeature(Y.GAMES);
299
+ return u ? /* @__PURE__ */ o(De, {
300
+ gamification: u,
301
+ sidebar: t,
277
302
  banner: i,
278
- layoutMode: l
303
+ layoutMode: n,
304
+ isMobileScreen: l,
305
+ persistent: r
279
306
  }) : null;
280
- }, Uo = ({ event: o, sidebar: a, banner: i }) => {
281
- const e = H();
282
- return e ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ n(W, { children: /* @__PURE__ */ n(
283
- jo,
307
+ }, Je = ({
308
+ event: e,
309
+ sidebar: t,
310
+ banner: i,
311
+ isMobileScreen: a
312
+ }) => {
313
+ const n = V();
314
+ return n ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(
315
+ Fe,
284
316
  {
285
- sdk: e,
286
- event: o,
287
- sidebar: a,
317
+ sdk: n,
318
+ event: e,
319
+ sidebar: t,
288
320
  banner: i,
321
+ isMobileScreen: a,
289
322
  layoutMode: "side-by-side"
290
323
  }
291
324
  ) }) }) : null;
292
325
  };
293
326
  export {
294
- Uo as StreamLayerSDKAdvertisement
327
+ Je as StreamLayerSDKAdvertisement
295
328
  };