@streamlayer/react 1.24.7 → 1.24.8-pre.84ab1b9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/lib/app/advertisement.d.ts +4 -0
  2. package/lib/app/pause-ad.d.ts +17 -0
  3. package/lib/cjs/advertisement.js +1491 -1441
  4. package/lib/cjs/auth.js +80 -80
  5. package/lib/cjs/bet-pack.js +279 -242
  6. package/lib/cjs/index.js +1828 -1770
  7. package/lib/cjs/insight.js +682 -620
  8. package/lib/cjs/masters.js +1401 -1362
  9. package/lib/cjs/notification.js +292 -261
  10. package/lib/cjs/pause-ad.js +592 -362
  11. package/lib/cjs/points.js +179 -148
  12. package/lib/cjs/polymarket.js +153 -152
  13. package/lib/cjs/style.css +1 -1
  14. package/lib/cjs/useStreamLayerApp.js +142 -148
  15. package/lib/dist/cjs/index.js +1401 -1362
  16. package/lib/dist/es/index.js +1401 -1362
  17. package/lib/es/Question.js +75 -72
  18. package/lib/es/advertisement.js +9236 -8213
  19. package/lib/es/analytics.js +35 -31
  20. package/lib/es/auth.js +1 -1
  21. package/lib/es/bet-pack.js +1 -1
  22. package/lib/es/{hooks-n9ax4LRT.js → hooks-DHRXtbBc.js} +35 -33
  23. package/lib/es/{index-D8wyDNJD.js → index-BW1YFKTb.js} +35 -35
  24. package/lib/es/index.js +2 -2
  25. package/lib/es/index10.js +6 -6
  26. package/lib/es/index12.js +116 -128
  27. package/lib/es/index13.js +100 -96
  28. package/lib/es/index14.js +15 -15
  29. package/lib/es/index16.js +382 -383
  30. package/lib/es/index2.js +55 -56
  31. package/lib/es/index4.js +3 -3
  32. package/lib/es/index5.js +275 -3
  33. package/lib/es/index6.js +4 -7
  34. package/lib/es/index7.js +5 -284
  35. package/lib/es/index8.js +8 -237
  36. package/lib/es/index9.js +237 -8
  37. package/lib/es/insight.js +3 -3
  38. package/lib/es/masters.js +1 -1
  39. package/lib/es/masters2.js +29 -29
  40. package/lib/es/notification.js +28 -28
  41. package/lib/es/pause-ad.js +362 -153
  42. package/lib/es/points.js +9 -9
  43. package/lib/es/polymarket.js +40 -40
  44. package/lib/es/storage.js +18 -18
  45. package/lib/es/style.css +1 -1
  46. package/lib/es/useStreamLayerApp.js +1 -1
  47. package/lib/es/useStreamLayerApp2.js +5169 -4933
  48. package/lib/es/utils.js +86 -41
  49. package/lib/source.css +1 -1
  50. package/package.json +14 -14
@@ -1,232 +1,441 @@
1
- import { jsx as a, jsxs as B } from "react/jsx-runtime";
2
- import { h as F } from "./index6.js";
3
- import { useEffect as i, useState as _, useRef as g, useCallback as R, Component as M } from "react";
4
- import { s as h, c as w, u as j } from "./feature.js";
5
- import { e as k } from "./index3.js";
6
- import { d as K } from "./index15.js";
7
- import { Y as V, _ as z } from "./hooks-n9ax4LRT.js";
8
- const G = /* @__PURE__ */ h("div")({
1
+ import { jsx as c, jsxs as N } from "react/jsx-runtime";
2
+ import { h as Q } from "./index7.js";
3
+ import { useEffect as w, useState as j, useRef as _, useMemo as J, useCallback as H, Component as X } from "react";
4
+ import { s as G, u as V, c as K } from "./feature.js";
5
+ import { e as D } from "./index3.js";
6
+ import { d as Y } from "./index15.js";
7
+ import { w as Z, q as $ } from "./hooks-DHRXtbBc.js";
8
+ const ee = /* @__PURE__ */ G("div")({
9
9
  name: "PauseAdOverlay",
10
10
  class: "pw9gih8",
11
11
  propsAsIs: !1
12
- }), H = /* @__PURE__ */ h("div")({
12
+ }), te = /* @__PURE__ */ G("div")({
13
13
  name: "PauseAdContent",
14
14
  class: "p8lpomy",
15
15
  propsAsIs: !1
16
- }), O = /* @__PURE__ */ h("div")({
16
+ }), re = /* @__PURE__ */ G("div")({
17
17
  name: "PauseAdBottomLeft",
18
18
  class: "pv7u167",
19
19
  propsAsIs: !1
20
- }), Y = /* @__PURE__ */ h("button")({
20
+ }), ae = /* @__PURE__ */ G("button")({
21
21
  name: "PauseAdPlayButton",
22
22
  class: "p1kh2yb0",
23
23
  propsAsIs: !1
24
- }), q = /* @__PURE__ */ h("div")({
24
+ }), se = /* @__PURE__ */ G("div")({
25
25
  name: "PauseAdSidebarGradient",
26
26
  class: "pl8f94x",
27
27
  propsAsIs: !1
28
- }), J = /* @__PURE__ */ h("div")({
28
+ }), ne = /* @__PURE__ */ G("div")({
29
29
  name: "PauseAdSidebar",
30
30
  class: "p1m6zmrt",
31
31
  propsAsIs: !1
32
- }), U = /* @__PURE__ */ h("img")({
32
+ }), z = /* @__PURE__ */ G("img")({
33
33
  name: "ExternalAdContainer",
34
34
  class: "em3vwfa",
35
35
  propsAsIs: !1
36
- }), Q = ({
37
- vastUrl: d,
38
- isDesktop: n,
39
- content: e
40
- }) => (i(() => {
41
- e.imageSrc && e.id && k.emit("exposedPauseAd", {
36
+ }), de = /* @__PURE__ */ G("iframe")({
37
+ name: "GptAdIframe",
38
+ class: "g1tibuhw",
39
+ propsAsIs: !1
40
+ }), oe = ({
41
+ vastUrl: s,
42
+ isDesktop: p,
43
+ content: t
44
+ }) => (w(() => {
45
+ t.imageSrc && t.id && D.emit("exposedPauseAd", {
42
46
  action: "rendered",
43
47
  payload: {
44
- id: e.id,
45
- parentId: e.parentId
48
+ id: t.id,
49
+ parentId: t.parentId
46
50
  }
47
51
  });
48
- }, [e, d]), e?.imageSrc ? !e.adUrl || !n ? /* @__PURE__ */ a(U, { src: e.imageSrc }) : /* @__PURE__ */ a(
52
+ }, [t, s]), t?.imageSrc ? !t.adUrl || !p ? /* @__PURE__ */ c(z, { src: t.imageSrc }) : /* @__PURE__ */ c(
49
53
  "a",
50
54
  {
51
55
  onClick: () => {
52
- k.emit("exposedPauseAd", {
56
+ D.emit("exposedPauseAd", {
53
57
  action: "navigated",
54
58
  payload: {
55
- id: e.id,
56
- parentId: e.parentId
59
+ id: t.id,
60
+ parentId: t.parentId
57
61
  }
58
62
  });
59
63
  },
60
- href: e.adUrl,
64
+ href: t.adUrl,
61
65
  target: "_blank",
62
66
  rel: "noopener noreferrer",
63
- children: /* @__PURE__ */ a(U, { src: e.imageSrc })
67
+ children: /* @__PURE__ */ c(z, { src: t.imageSrc })
64
68
  }
65
- ) : null), W = ({ isClosing: d, content: n, externalPauseAdStore: e, onPlay: l, onClose: u, vastUrl: c, options: v, isDesktop: r }) => {
66
- const m = v?.showPauseButton ?? !0, { ref: t, focusSelf: y } = K.useFocusable({
69
+ ) : null), ie = ({
70
+ vastUrl: s,
71
+ sdk: p,
72
+ onLoaded: t,
73
+ onReady: u,
74
+ product: v,
75
+ platform: m,
76
+ platformtype: y,
77
+ pagetype: x,
78
+ content: A,
79
+ adWidth: n,
80
+ adHeight: S,
81
+ rdid: i,
82
+ idtype: R,
83
+ npa: W,
84
+ isLat: C,
85
+ targeting: b,
86
+ containerRef: M
87
+ }) => {
88
+ const { production: d } = V(p.options), T = V(p.deviceId), [l, h] = j(!1), [r, L] = j({ width: 0, height: 0 }), [f, U] = j({ width: 0, height: 0 }), g = _(null), P = J(() => {
89
+ const e = new URLSearchParams();
90
+ return v && e.set("product", v), m && e.set("platform", m), y && e.set("platformtype", y), x && e.set("pagetype", x), A && e.set("content", A), n && e.set("width", n.toString()), S && e.set("height", S.toString()), W != null && e.set("npa", W.toString()), C != null && e.set("is_lat", C.toString()), b && e.set("targeting", new URLSearchParams(b).toString()), T && (e.set("rdid", T), e.set("idtype", "uuid")), i && e.set("rdid", i), R && e.set("idtype", R), s.startsWith("http") ? e.set("url", s) : e.set("slot", s), `https://${d ? "bell-ad.streamlayer.io" : "bell-ad-test.streamlayer.io"}?${e.toString()}`;
91
+ }, [
92
+ s,
93
+ v,
94
+ m,
95
+ y,
96
+ x,
97
+ A,
98
+ n,
99
+ S,
100
+ W,
101
+ C,
102
+ i,
103
+ R,
104
+ b,
105
+ T,
106
+ d
107
+ ]);
108
+ w(() => {
109
+ const e = M.current;
110
+ if (!e) return;
111
+ const a = new ResizeObserver(([k]) => {
112
+ const { width: I, height: O } = k.contentRect;
113
+ L({ width: Math.round(I), height: Math.round(O) });
114
+ });
115
+ return a.observe(e), () => a.disconnect();
116
+ }, [M]), w(() => {
117
+ const e = (a) => {
118
+ const k = d ? "https://bell-ad.streamlayer.io" : "https://bell-ad-test.streamlayer.io";
119
+ a.origin === k && a.data.id === "slGptAdCb" && (g.current && a.source !== g.current.contentWindow || (a.data?.type === "slGptAdLoaded" && (h(!0), t?.({
120
+ id: a.data.creativeId,
121
+ parentId: a.data.advertiserId,
122
+ width: a.data.width,
123
+ height: a.data.height
124
+ }), U({ width: a.data.width, height: a.data.height })), a.data?.type === "slGptAdReady" && u?.({
125
+ id: a.data.creativeId,
126
+ parentId: a.data.advertiserId
127
+ })));
128
+ };
129
+ return window.addEventListener("message", e), () => window.removeEventListener("message", e);
130
+ }, [t, u, d]);
131
+ const E = f.width > 0 && f.height > 0 ? Math.min(r.width / f.width, r.height / f.height) : 1;
132
+ return /* @__PURE__ */ c("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ c(
133
+ de,
134
+ {
135
+ ref: g,
136
+ src: P,
137
+ scrolling: "no",
138
+ allow: "attribution-reporting",
139
+ allowTransparency: !0,
140
+ style: {
141
+ opacity: l ? 1 : 0,
142
+ width: f.width,
143
+ height: f.height,
144
+ transformOrigin: "0 0",
145
+ transform: `scale(${E})`
146
+ }
147
+ }
148
+ ) });
149
+ }, le = ({
150
+ sdk: s,
151
+ isClosing: p,
152
+ adContent: t,
153
+ externalPauseAdStore: u,
154
+ onPlay: v,
155
+ onClose: m,
156
+ onGptAdLoaded: y,
157
+ onGptAdReady: x,
158
+ vastUrl: A,
159
+ product: n,
160
+ platform: S,
161
+ platformtype: i,
162
+ pagetype: R,
163
+ content: W,
164
+ adWidth: C,
165
+ adHeight: b,
166
+ npa: M,
167
+ isLat: d,
168
+ targeting: T,
169
+ options: l,
170
+ isDesktop: h,
171
+ isGptAd: r,
172
+ rdid: L,
173
+ idtype: f,
174
+ gptAdLoaded: U
175
+ }) => {
176
+ const g = l?.showPauseButton ?? !0, P = _(null), { ref: E, focusSelf: e } = Y.useFocusable({
67
177
  focusKey: "sl-pause-ad-play",
68
- onEnterRelease: l,
178
+ onEnterRelease: v,
69
179
  isFocusBoundary: !0,
70
180
  forceFocus: !0
71
181
  });
72
- return i(() => () => {
73
- e.revalidate();
74
- }, [e]), i(() => {
75
- t.current && y();
76
- }, [t, y]), i(() => {
77
- if (!u)
182
+ return w(() => () => {
183
+ u.revalidate();
184
+ }, [u]), w(() => {
185
+ E.current && e();
186
+ }, [E, e]), w(() => {
187
+ if (!m)
78
188
  return () => {
79
189
  };
80
- const b = (f) => {
81
- const s = f.keyCode;
82
- if (s === 461 || s === 10009 || s === 27 || s === 8) {
83
- f.preventDefault(), f.stopPropagation(), f.stopImmediatePropagation(), u();
190
+ const a = (k) => {
191
+ const I = k.keyCode;
192
+ if (I === 461 || I === 10009 || I === 27 || I === 8) {
193
+ k.preventDefault(), k.stopPropagation(), k.stopImmediatePropagation(), m();
84
194
  return;
85
195
  }
86
196
  };
87
- return window.addEventListener("keydown", b, { capture: !0 }), () => window.removeEventListener("keydown", b, { capture: !0 });
88
- }, [u]), /* @__PURE__ */ a(G, { className: w("SL_PauseAd", d && "pause-ad-closing"), children: /* @__PURE__ */ B(H, { children: [
89
- m && /* @__PURE__ */ a(O, { children: /* @__PURE__ */ a(
90
- Y,
91
- {
92
- ref: t,
93
- onClick: l,
94
- onMouseEnter: () => t.current.focus(),
95
- "aria-label": "Resume playback"
197
+ return window.addEventListener("keydown", a, { capture: !0 }), () => window.removeEventListener("keydown", a, { capture: !0 });
198
+ }, [m]), /* @__PURE__ */ c(
199
+ ee,
200
+ {
201
+ className: K("SL_PauseAd", p && "pause-ad-closing", r && !U && "pause-ad-preloading"),
202
+ children: /* @__PURE__ */ N(te, { children: [
203
+ g && /* @__PURE__ */ c(re, { children: /* @__PURE__ */ c(
204
+ ae,
205
+ {
206
+ ref: E,
207
+ onClick: v,
208
+ onMouseEnter: () => E.current.focus(),
209
+ "aria-label": "Resume playback"
210
+ }
211
+ ) }),
212
+ /* @__PURE__ */ c(se, { className: K("SL_PauseAdSidebar", h && "SL_PauseAdSidebar--desktop"), children: /* @__PURE__ */ N(ne, { ref: P, className: K(h && "SL_PauseAdSidebar__content--desktop"), children: [
213
+ r && A && /* @__PURE__ */ c(
214
+ ie,
215
+ {
216
+ vastUrl: A,
217
+ isDesktop: h,
218
+ product: n,
219
+ platform: S,
220
+ platformtype: i,
221
+ pagetype: R,
222
+ content: W,
223
+ adWidth: C,
224
+ adHeight: b,
225
+ npa: M,
226
+ isLat: d,
227
+ rdid: L,
228
+ idtype: f,
229
+ targeting: T,
230
+ containerRef: P,
231
+ onLoaded: y,
232
+ onReady: x,
233
+ sdk: s
234
+ }
235
+ ),
236
+ !r && A && t && /* @__PURE__ */ c(oe, { content: t, isDesktop: h, vastUrl: A })
237
+ ] }) })
238
+ ] })
239
+ }
240
+ );
241
+ }, ce = (s) => {
242
+ if (!s) return !1;
243
+ try {
244
+ return s.startsWith("http") ? new URL(s).searchParams.get("output") === "ldjh" : !0;
245
+ } catch {
246
+ return !1;
247
+ }
248
+ }, pe = ({ showPauseAd: s, externalUrls: p, vastUrls: t, sdk: u, onClose: v, onRender: m, options: y, isDesktop: x }) => {
249
+ const A = p ?? t, n = y?.pauseAdDelay ?? 0, S = y?.pauseAdRefetchInterval ?? 1e3 * 60 * 50, [i, R] = j(!1), [W, C] = j(!1), [b, M] = j(!1), d = _(), T = _(), l = A?.[0], h = l?.url, r = ce(h), L = _(h), f = _(""), U = _(""), g = _(null);
250
+ L.current = h;
251
+ const [P, E] = u.advertisement.getExternalPauseAd(r ? "" : h, {
252
+ refetchInterval: S,
253
+ $enabled: !r && (n === 0 || !!s),
254
+ prefetch: !r && n === 0 && S > 0
255
+ }), e = V(P), a = H((o) => {
256
+ g.current = { id: o.id, parentId: o.parentId }, M(!0);
257
+ }, []), k = H((o) => {
258
+ D.emit("exposedPauseAd", {
259
+ action: "rendered",
260
+ payload: {
261
+ id: o.id,
262
+ parentId: o.parentId
96
263
  }
97
- ) }),
98
- /* @__PURE__ */ a(q, { className: w("SL_PauseAdSidebar", r && "SL_PauseAdSidebar--desktop"), children: /* @__PURE__ */ a(J, { className: w(r && "SL_PauseAdSidebar__content--desktop"), children: c && /* @__PURE__ */ a(Q, { content: n, isDesktop: r, vastUrl: c }) }) })
99
- ] }) });
100
- }, X = ({ showPauseAd: d, vastUrls: n, sdk: e, onClose: l, onRender: u, options: c, isDesktop: v }) => {
101
- const r = c?.pauseAdDelay ?? 0, m = c?.pauseAdRefetchInterval ?? 1e3 * 60 * 50, [t, y] = _(!1), [b, f] = _(!1), s = g(), P = n?.[0].url, A = g(P), S = g(""), I = g("");
102
- A.current = P;
103
- const [p, L] = e.advertisement.getExternalPauseAd(P, {
104
- refetchInterval: m,
105
- $enabled: r === 0 || !!d,
106
- prefetch: r === 0 && m > 0
107
- }), x = j(p), C = R(() => {
108
- if (l) {
109
- I.current = A.current;
110
- const o = p.get().data;
111
- k.emit("exposedPauseAd", {
112
- action: "closed",
113
- payload: o?.url === I.current ? {
114
- id: o?.id,
115
- parentId: o?.parentId
116
- } : {}
117
- }), l();
264
+ });
265
+ }, []), I = H(() => {
266
+ if (v) {
267
+ if (U.current = L.current, r)
268
+ D.emit("exposedPauseAd", {
269
+ action: "closed",
270
+ payload: g.current ? {
271
+ id: g.current.id,
272
+ parentId: g.current.parentId
273
+ } : {}
274
+ });
275
+ else {
276
+ const o = P.get().data;
277
+ D.emit("exposedPauseAd", {
278
+ action: "closed",
279
+ payload: o?.url === U.current ? {
280
+ id: o?.id,
281
+ parentId: o?.parentId
282
+ } : {}
283
+ });
284
+ }
285
+ v();
118
286
  }
119
- }, [l, p]), N = R(() => {
120
- e.controlVideoPlayer({ play: !0 });
121
- }, [e]);
122
- return i(() => {
123
- L === A.current && x.error && (clearTimeout(s.current), C?.());
124
- }, [x, C, L]), i(() => {
125
- if (d && P) {
126
- S.current = A.current, I.current = "";
127
- const o = p.get().data;
128
- k.emit("exposedPauseAd", {
129
- action: "enabled",
130
- payload: o?.url === S.current ? {
131
- id: o?.id,
132
- parentId: o?.parentId
133
- } : {}
134
- });
135
- const T = () => {
136
- const E = p.get(), D = E.data;
137
- (!D || D?.url === A.current) && (!E.loading && D?.imageSrc ? (clearTimeout(s.current), f(!1), y(!0)) : E.loading && (s.current = setTimeout(() => {
138
- T();
287
+ }, [v, P, r]), O = H(() => {
288
+ u.controlVideoPlayer({ play: !0 });
289
+ }, [u]);
290
+ w(() => {
291
+ !r && E === L.current && e.error && (clearTimeout(d.current), I?.());
292
+ }, [e, r, I, E]), w(() => {
293
+ if (s && h) {
294
+ if (f.current = L.current, U.current = "", r)
295
+ g.current = null, M(!1), D.emit("exposedPauseAd", {
296
+ action: "enabled",
297
+ payload: {}
298
+ });
299
+ else {
300
+ const B = P.get().data;
301
+ D.emit("exposedPauseAd", {
302
+ action: "enabled",
303
+ payload: B?.url === f.current ? {
304
+ id: B?.id,
305
+ parentId: B?.parentId
306
+ } : {}
307
+ });
308
+ }
309
+ const o = () => {
310
+ if (r) {
311
+ clearTimeout(d.current), C(!1), R(!0);
312
+ return;
313
+ }
314
+ const B = P.get(), F = B.data;
315
+ (!F || F?.url === L.current) && (!B.loading && F?.imageSrc ? (clearTimeout(d.current), C(!1), R(!0)) : B.loading && (d.current = setTimeout(() => {
316
+ o();
139
317
  }, 200)));
140
318
  };
141
- clearTimeout(s.current), s.current = setTimeout(() => {
142
- T();
143
- }, r);
319
+ clearTimeout(d.current), d.current = setTimeout(() => {
320
+ o();
321
+ }, n);
144
322
  } else {
145
- if (I.current !== A.current) {
146
- const o = p.get().data;
147
- I.current = "", S.current !== "" && (k.emit("exposedPauseAd", {
148
- action: "disabled",
149
- payload: S.current === o?.url ? {
150
- id: o?.id,
151
- parentId: o?.parentId
152
- } : {}
153
- }), S.current = "");
323
+ if (U.current !== L.current && (U.current = "", f.current !== "")) {
324
+ if (r)
325
+ D.emit("exposedPauseAd", {
326
+ action: "disabled",
327
+ payload: g.current ? {
328
+ id: g.current.id,
329
+ parentId: g.current.parentId
330
+ } : {}
331
+ });
332
+ else {
333
+ const o = P.get().data;
334
+ D.emit("exposedPauseAd", {
335
+ action: "disabled",
336
+ payload: f.current === o?.url ? {
337
+ id: o?.id,
338
+ parentId: o?.parentId
339
+ } : {}
340
+ });
341
+ }
342
+ f.current = "";
154
343
  }
155
- f(!0), s.current = setTimeout(() => {
156
- y(!1);
344
+ C(!0), d.current = setTimeout(() => {
345
+ R(!1);
157
346
  }, 400);
158
347
  }
159
348
  return () => {
160
- s.current && clearTimeout(s.current);
349
+ d.current && clearTimeout(d.current);
161
350
  };
162
- }, [p, C, r, d, P]), i(() => {
163
- u?.({ rendered: t });
164
- }, [t, u]), i(() => () => {
165
- u?.({ rendered: !1 });
166
- }, [u]), !t || !x.data ? null : /* @__PURE__ */ a(
167
- W,
351
+ }, [P, r, I, n, s, h]), w(() => (i && r && !b ? T.current = setTimeout(() => {
352
+ I?.();
353
+ }, 1e4) : clearTimeout(T.current), () => clearTimeout(T.current)), [i, r, b, I]);
354
+ const q = i && (!r || b);
355
+ return w(() => {
356
+ m?.({ rendered: q });
357
+ }, [q, m]), w(() => () => {
358
+ m?.({ rendered: !1 });
359
+ }, [m]), !i || !r && !e.data ? null : /* @__PURE__ */ c(
360
+ le,
168
361
  {
169
- onClose: C,
170
- isClosing: b,
171
- onPlay: N,
172
- vastUrl: P,
173
- options: c,
174
- isDesktop: v,
175
- externalPauseAdStore: p,
176
- content: x.data
362
+ onClose: I,
363
+ isClosing: W,
364
+ onPlay: O,
365
+ vastUrl: h,
366
+ product: l?.product,
367
+ platform: l?.platform,
368
+ platformtype: l?.platformtype,
369
+ pagetype: l?.pagetype,
370
+ content: l?.content,
371
+ adWidth: l?.adWidth,
372
+ adHeight: l?.adHeight,
373
+ npa: l?.npa,
374
+ isLat: l?.is_lat,
375
+ targeting: l?.targeting,
376
+ options: y,
377
+ isDesktop: x,
378
+ isGptAd: r,
379
+ gptAdLoaded: b,
380
+ onGptAdLoaded: a,
381
+ onGptAdReady: k,
382
+ externalPauseAdStore: P,
383
+ adContent: e.data,
384
+ sdk: u
177
385
  }
178
386
  );
179
- }, Z = ({
180
- showPauseAd: d,
181
- pauseAdVastUrl: n,
182
- videoPlayerController: e,
183
- onRenderPauseAd: l,
184
- onClosePauseAd: u,
185
- children: c,
186
- options: v
387
+ }, ue = ({
388
+ showPauseAd: s,
389
+ pauseAdExternalUrls: p,
390
+ pauseAdVastUrl: t,
391
+ videoPlayerController: u,
392
+ onRenderPauseAd: v,
393
+ onClosePauseAd: m,
394
+ children: y,
395
+ options: x
187
396
  }) => {
188
- const r = V(), m = z(), t = g();
189
- return i(() => r ? (e && (t.current = e, r.addVideoPlayerController(t.current)), () => {
190
- t.current && r.removeVideoPlayerController(t.current);
397
+ const A = p ?? t, n = Z(), S = $(), i = _();
398
+ return w(() => n ? (u && (i.current = u, n.addVideoPlayerController(i.current)), () => {
399
+ i.current && n.removeVideoPlayerController(i.current);
191
400
  }) : () => {
192
- }, [r, e]), r ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ B(
193
- F,
401
+ }, [n, u]), n ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ N(
402
+ Q,
194
403
  {
195
- style: c ? { position: "relative" } : {},
196
- customTheme: m.theme,
197
- themeMode: m.themeMode,
404
+ style: y ? { position: "relative" } : {},
405
+ customTheme: S.theme,
406
+ themeMode: S.themeMode,
198
407
  children: [
199
- c,
200
- n && /* @__PURE__ */ a(
201
- X,
408
+ y,
409
+ A && /* @__PURE__ */ c(
410
+ pe,
202
411
  {
203
- sdk: r,
204
- showPauseAd: d,
205
- vastUrls: n,
206
- onClose: u,
207
- onRender: l,
208
- options: v,
412
+ sdk: n,
413
+ showPauseAd: s,
414
+ externalUrls: A,
415
+ onClose: m,
416
+ onRender: v,
417
+ options: x,
209
418
  isDesktop: !0
210
419
  }
211
420
  )
212
421
  ]
213
422
  }
214
- ) }) : c;
423
+ ) }) : y;
215
424
  };
216
- class oe extends M {
217
- constructor(n) {
218
- super(n), this.state = { hasError: !1 };
425
+ class Ie extends X {
426
+ constructor(p) {
427
+ super(p), this.state = { hasError: !1 };
219
428
  }
220
429
  static getDerivedStateFromError() {
221
430
  return { hasError: !0 };
222
431
  }
223
- componentDidCatch(n, e) {
224
- console.error(n, e.componentStack);
432
+ componentDidCatch(p, t) {
433
+ console.error(p, t.componentStack);
225
434
  }
226
435
  render() {
227
- return this.state.hasError ? this.props.children : /* @__PURE__ */ a(Z, { ...this.props });
436
+ return this.state.hasError ? this.props.children : /* @__PURE__ */ c(ue, { ...this.props });
228
437
  }
229
438
  }
230
439
  export {
231
- oe as StreamLayerPauseAd
440
+ Ie as StreamLayerPauseAd
232
441
  };
package/lib/es/points.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import { h as c } from "./index6.js";
2
+ import { h as c } from "./index7.js";
3
3
  import { useState as u, useEffect as d } from "react";
4
4
  import { s as o, u as f, F as m } from "./feature.js";
5
5
  import { e as n } from "./index3.js";
6
6
  import { p as h } from "./index11.js";
7
7
  import { m as y } from "./theme.js";
8
- import { B as S } from "./index7.js";
8
+ import { M as S } from "./index5.js";
9
9
  import { S as v } from "./useStreamLayerApp2.js";
10
- import { Y as g, _ as A } from "./hooks-n9ax4LRT.js";
10
+ import { w as g, q as A } from "./hooks-DHRXtbBc.js";
11
11
  const I = /* @__PURE__ */ o("div")({
12
12
  name: "PointsContainer",
13
13
  class: "psiob9b",
@@ -24,19 +24,19 @@ const I = /* @__PURE__ */ o("div")({
24
24
  name: "PointsBody",
25
25
  class: "p12n4f2h",
26
26
  propsAsIs: !1
27
- }), T = /* @__PURE__ */ o("div")({
27
+ }), M = /* @__PURE__ */ o("div")({
28
28
  name: "PointsTitle",
29
29
  class: "poqmx89",
30
30
  propsAsIs: !1
31
- }), x = /* @__PURE__ */ o("div")({
31
+ }), T = /* @__PURE__ */ o("div")({
32
32
  name: "PointsValue",
33
33
  class: "prj9b3v",
34
34
  propsAsIs: !1
35
- }), B = ({ points: s, onClick: e }) => /* @__PURE__ */ p(I, { className: y, onClick: e, children: [
35
+ }), x = ({ points: s, onClick: e }) => /* @__PURE__ */ p(I, { className: y, onClick: e, children: [
36
36
  /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { name: "icon-trophy-solid" }) }),
37
37
  /* @__PURE__ */ p(F, { children: [
38
- /* @__PURE__ */ t(T, { children: "Total points" }),
39
- /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(h, { value: s }) })
38
+ /* @__PURE__ */ t(M, { children: "Total points" }),
39
+ /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(h, { value: s }) })
40
40
  ] })
41
41
  ] }), C = ({ gamification: s }) => {
42
42
  const e = s.userSummary.$store, [a, l] = u(0);
@@ -47,7 +47,7 @@ const I = /* @__PURE__ */ o("div")({
47
47
  return () => {
48
48
  r();
49
49
  };
50
- }, [e]), /* @__PURE__ */ t(B, { points: a, onClick: () => {
50
+ }, [e]), /* @__PURE__ */ t(x, { points: a, onClick: () => {
51
51
  const r = s.status.get();
52
52
  r === m.Suspended ? (s.openFeature(), n.emit("app", {
53
53
  action: "open",