@streamlayer/react 1.21.4 → 1.22.1
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/masters.d.ts +2 -5
- package/lib/app/pause-ad.d.ts +1 -10
- package/lib/app/useStreamLayerApp.d.ts +1 -23
- package/lib/cjs/Question.js +1 -0
- package/lib/cjs/advertisement.js +40 -40
- package/lib/cjs/analytics.js +1 -0
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/hooks-B0Qttldg.js +1 -0
- package/lib/cjs/index-DSi8Qgfs.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -0
- package/lib/cjs/index11.js +4 -0
- package/lib/cjs/index12.js +1 -0
- package/lib/cjs/index13.js +1 -0
- package/lib/cjs/index14.js +1 -0
- package/lib/cjs/index15.js +1 -0
- package/lib/cjs/index16.js +5 -0
- package/lib/cjs/index2.js +1 -5
- package/lib/cjs/index3.js +1 -0
- package/lib/cjs/index4.js +5 -0
- package/lib/cjs/index5.js +1 -0
- package/lib/cjs/index6.js +1 -0
- package/lib/cjs/index7.js +5 -0
- package/lib/cjs/index8.js +1 -0
- package/lib/cjs/index9.js +1 -0
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +6 -6
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/sl-types.js +15 -0
- package/lib/cjs/storage.js +1 -0
- package/lib/cjs/theme.js +17 -0
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +9 -9
- package/lib/cjs/utils.js +47 -0
- package/lib/cjs/vast-client.min.js +1 -0
- package/lib/classic/app/masters.d.ts +2 -5
- package/lib/classic/app/pause-ad.d.ts +1 -10
- package/lib/classic/app/useStreamLayerApp.d.ts +1 -23
- package/lib/classic/cjs/Question.js +1 -0
- package/lib/classic/cjs/advertisement.js +40 -40
- package/lib/classic/cjs/analytics.js +1 -0
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +4 -4
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +1 -0
- package/lib/classic/cjs/index-DSi8Qgfs.js +1 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -0
- package/lib/classic/cjs/index11.js +1 -0
- package/lib/classic/cjs/index12.js +1 -0
- package/lib/classic/cjs/index13.js +4 -0
- package/lib/classic/cjs/index2.js +5 -0
- package/lib/classic/cjs/index3.js +1 -0
- package/lib/classic/cjs/index4.js +1 -0
- package/lib/classic/cjs/index5.js +1 -0
- package/lib/classic/cjs/index6.js +5 -0
- package/lib/classic/cjs/index7.js +1 -0
- package/lib/classic/cjs/index8.js +1 -0
- package/lib/classic/cjs/index9.js +1 -0
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -0
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/sl-types.js +15 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/cjs/utils.js +47 -0
- package/lib/classic/cjs/vast-client.min.js +1 -0
- package/lib/classic/es/Question.js +392 -0
- package/lib/classic/es/advertisement.js +10375 -10374
- package/lib/classic/es/analytics.js +28 -0
- package/lib/classic/es/auth.js +4 -4
- package/lib/classic/es/bet-pack.js +56 -51
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/hooks-B0Qttldg.js +98 -0
- package/lib/classic/es/index-DSi8Qgfs.js +65 -0
- package/lib/classic/es/index.js +14 -15
- package/lib/classic/es/index10.js +87 -0
- package/lib/classic/es/index11.js +2355 -0
- package/lib/classic/es/index12.js +183 -0
- package/lib/classic/es/index13.js +835 -0
- package/lib/classic/es/index2.js +2621 -0
- package/lib/classic/es/index3.js +64 -0
- package/lib/classic/es/index4.js +19 -0
- package/lib/classic/es/index5.js +285 -0
- package/lib/classic/es/{index-l-eyvmpL.js → index6.js} +937 -937
- package/lib/classic/es/index7.js +7 -0
- package/lib/classic/es/index8.js +11 -0
- package/lib/classic/es/index9.js +319 -0
- package/lib/classic/es/insight.js +31 -32
- package/lib/classic/es/notification.js +7 -1006
- package/lib/classic/es/notification2.js +1117 -0
- package/lib/classic/es/pause-ad.js +139 -138
- package/lib/classic/es/points.js +39 -38
- package/lib/classic/es/sl-types.js +258 -0
- package/lib/classic/es/useStreamLayerApp.js +1 -2
- package/lib/classic/es/useStreamLayerApp2.js +2400 -2283
- package/lib/classic/es/utils.js +76 -0
- package/lib/{es/vast-client.min-B0NUra1B.js → classic/es/vast-client.min.js} +338 -338
- package/lib/classic/index.d.ts +5 -13
- package/lib/classic/masters.d.ts +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +30 -30
- package/lib/dist/es/index.js +2 -2
- package/lib/dist/es/masters.js +5813 -6063
- package/lib/dist/index.d.ts +1332 -0
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +136 -0
- package/lib/es/advertisement.js +10375 -10374
- package/lib/es/analytics.js +28 -0
- package/lib/es/auth.js +4 -4
- package/lib/es/bet-pack.js +7 -6
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/hooks-B0Qttldg.js +98 -0
- package/lib/es/index-DSi8Qgfs.js +65 -0
- package/lib/es/index.js +13 -14
- package/lib/es/index10.js +267 -0
- package/lib/es/index11.js +835 -0
- package/lib/es/index12.js +183 -0
- package/lib/es/index13.js +319 -0
- package/lib/es/index14.js +87 -0
- package/lib/es/index15.js +2355 -0
- package/lib/es/index16.js +1254 -0
- package/lib/es/index2.js +1349 -3363
- package/lib/es/index3.js +64 -0
- package/lib/es/index4.js +3418 -0
- package/lib/es/index5.js +19 -0
- package/lib/es/index6.js +285 -0
- package/lib/es/{index-l-eyvmpL.js → index7.js} +937 -937
- package/lib/es/index8.js +7 -0
- package/lib/es/index9.js +11 -0
- package/lib/es/insight.js +31 -32
- package/lib/es/masters.js +6 -5
- package/lib/es/masters2.js +189 -176
- package/lib/es/notification.js +124 -119
- package/lib/es/pause-ad.js +140 -139
- package/lib/es/points.js +40 -38
- package/lib/es/sl-types.js +277 -0
- package/lib/es/storage.js +113 -0
- package/lib/es/theme.js +47 -0
- package/lib/es/useStreamLayerApp.js +1 -2
- package/lib/es/useStreamLayerApp2.js +2399 -2282
- package/lib/es/utils.js +76 -0
- package/lib/{classic/es/vast-client.min-B0NUra1B.js → es/vast-client.min.js} +338 -338
- package/lib/index.d.ts +5 -13
- package/lib/masters.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -48
- package/lib/app/event.d.ts +0 -6
- package/lib/app/provider.d.ts +0 -49
- package/lib/cjs/index-l-eyvmpL.js +0 -5
- package/lib/cjs/provider.js +0 -84
- package/lib/cjs/vast-client.min-B0NUra1B.js +0 -1
- package/lib/classic/app/event.d.ts +0 -6
- package/lib/classic/app/provider.d.ts +0 -49
- package/lib/classic/cjs/index-l-eyvmpL.js +0 -5
- package/lib/classic/cjs/provider.js +0 -68
- package/lib/classic/cjs/vast-client.min-B0NUra1B.js +0 -1
- package/lib/classic/es/provider.js +0 -7617
- package/lib/dist/cjs/gamification-feature2.js +0 -1
- package/lib/dist/es/gamification-feature2.js +0 -285
- package/lib/es/provider.js +0 -7693
|
@@ -1,130 +1,131 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as l, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { h as F } from "./index7.js";
|
|
3
|
+
import { s as v, c as V, u as M } from "./sl-types.js";
|
|
4
|
+
import { d as N } from "./index11.js";
|
|
5
|
+
import { useRef as x, useCallback as L, useState as U, useEffect as k, Component as j } from "react";
|
|
6
|
+
import { c as q, e as S } from "./index3.js";
|
|
7
|
+
import { _ as $ } from "./vast-client.min.js";
|
|
8
|
+
import { i as z } from "./index-DSi8Qgfs.js";
|
|
9
|
+
import { B as O, z as G } from "./hooks-B0Qttldg.js";
|
|
10
|
+
const Q = {}, W = new $(), w = z(Q), E = q("ui:gam-static"), B = (e) => new Promise((s, t) => {
|
|
11
|
+
const n = new Image();
|
|
12
|
+
n.onload = () => s(e), n.onerror = () => t(), n.src = e;
|
|
13
|
+
}), _ = () => {
|
|
14
|
+
const e = x(0);
|
|
15
|
+
return [L(async (s) => {
|
|
16
|
+
var t, n, r, u, c, a, h, i, y, P, A;
|
|
16
17
|
if ((t = w.get()[s]) != null && t.imageSrc)
|
|
17
18
|
return { success: !0 };
|
|
18
|
-
const
|
|
19
|
-
e.current =
|
|
19
|
+
const f = Date.now();
|
|
20
|
+
e.current = f, w.setKey(s, { id: "", url: s });
|
|
20
21
|
try {
|
|
21
|
-
|
|
22
|
+
S.emit("exposedPauseAd", {
|
|
22
23
|
action: "load",
|
|
23
24
|
payload: {}
|
|
24
25
|
});
|
|
25
|
-
const
|
|
26
|
-
if (E.debug(
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
E.debug(
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
E.debug(
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
return await
|
|
36
|
-
id:
|
|
26
|
+
const p = await W.get(s);
|
|
27
|
+
if (E.debug(p, "parsedVAST"), e.current === f && w.get()[s].url) {
|
|
28
|
+
const o = p.ads.find((m) => m.creatives.length > 0);
|
|
29
|
+
if (o) {
|
|
30
|
+
E.debug(o, "validAd");
|
|
31
|
+
const m = o.creatives.find((d) => d.type === "nonlinear");
|
|
32
|
+
if (m) {
|
|
33
|
+
E.debug(m, "nonlinear");
|
|
34
|
+
const d = (r = (n = m.variations) == null ? void 0 : n[0]) == null ? void 0 : r.staticResource, I = (c = (u = m.variations) == null ? void 0 : u[0]) == null ? void 0 : c.nonlinearClickThroughURLTemplate;
|
|
35
|
+
if (d)
|
|
36
|
+
return await B(d), w.setKey(s, {
|
|
37
|
+
id: o.id || "",
|
|
37
38
|
url: s,
|
|
38
|
-
imageSrc:
|
|
39
|
-
adUrl:
|
|
40
|
-
}),
|
|
39
|
+
imageSrc: d,
|
|
40
|
+
adUrl: I
|
|
41
|
+
}), S.emit("exposedPauseAd", {
|
|
41
42
|
action: "loaded",
|
|
42
43
|
payload: {
|
|
43
|
-
id:
|
|
44
|
+
id: o.id || ""
|
|
44
45
|
}
|
|
45
46
|
}), { success: !0 };
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
-
E.debug(
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return await
|
|
52
|
-
id:
|
|
48
|
+
const g = o.creatives.find((d) => d.type === "companion");
|
|
49
|
+
E.debug(g, "companion");
|
|
50
|
+
const T = (y = (i = (h = (a = g == null ? void 0 : g.variations) == null ? void 0 : a[0]) == null ? void 0 : h.staticResources) == null ? void 0 : i[0]) == null ? void 0 : y.url, C = (A = (P = g == null ? void 0 : g.variations) == null ? void 0 : P[0]) == null ? void 0 : A.companionClickThroughURLTemplate;
|
|
51
|
+
if (T)
|
|
52
|
+
return await B(T), w.setKey(s, {
|
|
53
|
+
id: o.id || "",
|
|
53
54
|
url: s,
|
|
54
|
-
imageSrc:
|
|
55
|
-
adUrl:
|
|
56
|
-
}),
|
|
55
|
+
imageSrc: T,
|
|
56
|
+
adUrl: C
|
|
57
|
+
}), S.emit("exposedPauseAd", {
|
|
57
58
|
action: "loaded",
|
|
58
59
|
payload: {
|
|
59
|
-
id:
|
|
60
|
+
id: o.id || ""
|
|
60
61
|
}
|
|
61
62
|
}), { success: !0 };
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
} catch (
|
|
65
|
-
console.error("Error parsing VAST",
|
|
65
|
+
} catch (p) {
|
|
66
|
+
console.error("Error parsing VAST", p);
|
|
66
67
|
}
|
|
67
68
|
return { success: !1 };
|
|
68
69
|
}, []), w];
|
|
69
|
-
},
|
|
70
|
+
}, H = /* @__PURE__ */ v("div")({
|
|
70
71
|
name: "PauseAdOverlay",
|
|
71
72
|
class: "pw9gih8",
|
|
72
73
|
propsAsIs: !1
|
|
73
|
-
}),
|
|
74
|
+
}), J = /* @__PURE__ */ v("div")({
|
|
74
75
|
name: "PauseAdContent",
|
|
75
76
|
class: "p8lpomy",
|
|
76
77
|
propsAsIs: !1
|
|
77
|
-
}),
|
|
78
|
+
}), X = /* @__PURE__ */ v("div")({
|
|
78
79
|
name: "PauseAdTopLeft",
|
|
79
80
|
class: "pv7u167",
|
|
80
81
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
82
|
+
}), Y = /* @__PURE__ */ v("h2")({
|
|
82
83
|
name: "PauseAdTitle",
|
|
83
84
|
class: "p1kh2yb0",
|
|
84
85
|
propsAsIs: !1
|
|
85
|
-
}),
|
|
86
|
+
}), Z = /* @__PURE__ */ v("p")({
|
|
86
87
|
name: "PauseAdCaption",
|
|
87
88
|
class: "pl8f94x",
|
|
88
89
|
propsAsIs: !1
|
|
89
|
-
}),
|
|
90
|
+
}), ee = /* @__PURE__ */ v("div")({
|
|
90
91
|
name: "PauseAdBottomLeft",
|
|
91
92
|
class: "p1m6zmrt",
|
|
92
93
|
propsAsIs: !1
|
|
93
|
-
}),
|
|
94
|
+
}), se = /* @__PURE__ */ v("button")({
|
|
94
95
|
name: "PauseAdPlayButton",
|
|
95
96
|
class: "pm3vwfa",
|
|
96
97
|
propsAsIs: !1
|
|
97
|
-
}),
|
|
98
|
+
}), re = /* @__PURE__ */ v("div")({
|
|
98
99
|
name: "PauseAdSidebarGradient",
|
|
99
100
|
class: "p1tibuhw",
|
|
100
101
|
propsAsIs: !1
|
|
101
|
-
}),
|
|
102
|
+
}), te = /* @__PURE__ */ v("div")({
|
|
102
103
|
name: "PauseAdSidebar",
|
|
103
104
|
class: "ptqqrqd",
|
|
104
105
|
propsAsIs: !1
|
|
105
|
-
}),
|
|
106
|
+
}), oe = /* @__PURE__ */ v("span")({
|
|
106
107
|
name: "PauseAdTitleDescription",
|
|
107
108
|
class: "p14estxv",
|
|
108
109
|
propsAsIs: !1
|
|
109
|
-
}),
|
|
110
|
+
}), K = /* @__PURE__ */ v("img")({
|
|
110
111
|
name: "ExternalAdContainer",
|
|
111
112
|
class: "e1dpvfl1",
|
|
112
113
|
propsAsIs: !1
|
|
113
|
-
}),
|
|
114
|
+
}), ne = ({ vastUrl: e, isDesktop: s }) => {
|
|
114
115
|
var t;
|
|
115
|
-
const [,
|
|
116
|
-
return
|
|
117
|
-
r && r[e] && r[e].imageSrc && r[e].id &&
|
|
116
|
+
const [, n] = _(), r = M(n, { keys: [e] });
|
|
117
|
+
return k(() => {
|
|
118
|
+
r && r[e] && r[e].imageSrc && r[e].id && S.emit("exposedPauseAd", {
|
|
118
119
|
action: "rendered",
|
|
119
120
|
payload: {
|
|
120
121
|
id: r[e].id
|
|
121
122
|
}
|
|
122
123
|
});
|
|
123
|
-
}, [r, e]), (t = r == null ? void 0 : r[e]) != null && t.imageSrc ? !r[e].adUrl || !s ? /* @__PURE__ */ l(
|
|
124
|
+
}, [r, e]), (t = r == null ? void 0 : r[e]) != null && t.imageSrc ? !r[e].adUrl || !s ? /* @__PURE__ */ l(K, { src: r[e].imageSrc }) : /* @__PURE__ */ l(
|
|
124
125
|
"a",
|
|
125
126
|
{
|
|
126
127
|
onClick: () => {
|
|
127
|
-
|
|
128
|
+
S.emit("exposedPauseAd", {
|
|
128
129
|
action: "navigated",
|
|
129
130
|
payload: {
|
|
130
131
|
id: r[e].id
|
|
@@ -134,144 +135,144 @@ const G = {}, J = new z(), w = M(G), E = K("ui:gam-static"), U = (e) => new Prom
|
|
|
134
135
|
href: r[e].adUrl,
|
|
135
136
|
target: "_blank",
|
|
136
137
|
rel: "noopener noreferrer",
|
|
137
|
-
children: /* @__PURE__ */ l(
|
|
138
|
+
children: /* @__PURE__ */ l(K, { src: r[e].imageSrc })
|
|
138
139
|
}
|
|
139
140
|
) : null;
|
|
140
|
-
},
|
|
141
|
-
const h = (
|
|
141
|
+
}, ae = ({ isClosing: e, title: s, caption: t, onPlay: n, onClose: r, vastUrl: u, options: c, isDesktop: a }) => {
|
|
142
|
+
const h = (c == null ? void 0 : c.showPauseButton) ?? !0, { ref: i, focusSelf: y } = N.useFocusable({
|
|
142
143
|
focusKey: "sl-pause-ad-play",
|
|
143
|
-
onEnterRelease:
|
|
144
|
+
onEnterRelease: n,
|
|
144
145
|
isFocusBoundary: !0,
|
|
145
146
|
forceFocus: !0
|
|
146
147
|
});
|
|
147
|
-
return
|
|
148
|
+
return k(() => {
|
|
148
149
|
i.current && y();
|
|
149
|
-
}, [i, y]),
|
|
150
|
+
}, [i, y]), k(() => {
|
|
150
151
|
if (!r)
|
|
151
152
|
return () => {
|
|
152
153
|
};
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
|
|
154
|
+
const P = (A) => {
|
|
155
|
+
const f = A.keyCode;
|
|
156
|
+
if (f === 461 || f === 10009 || f === 27 || f === 8) {
|
|
157
|
+
A.preventDefault(), A.stopPropagation(), A.stopImmediatePropagation(), r();
|
|
157
158
|
return;
|
|
158
159
|
}
|
|
159
160
|
};
|
|
160
|
-
return window.addEventListener("keydown",
|
|
161
|
-
}, [r]), /* @__PURE__ */ l(
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */ l(
|
|
164
|
-
/* @__PURE__ */ l(
|
|
161
|
+
return window.addEventListener("keydown", P, { capture: !0 }), () => window.removeEventListener("keydown", P, { capture: !0 });
|
|
162
|
+
}, [r]), /* @__PURE__ */ l(H, { className: V("SL_PauseAdOverlay", e && "pause-ad-closing"), children: /* @__PURE__ */ D(J, { children: [
|
|
163
|
+
/* @__PURE__ */ D(X, { children: [
|
|
164
|
+
/* @__PURE__ */ l(Y, { children: s }),
|
|
165
|
+
/* @__PURE__ */ l(Z, { children: t })
|
|
165
166
|
] }),
|
|
166
|
-
h && /* @__PURE__ */ l(
|
|
167
|
-
|
|
167
|
+
h && /* @__PURE__ */ l(ee, { children: /* @__PURE__ */ l(
|
|
168
|
+
se,
|
|
168
169
|
{
|
|
169
170
|
ref: i,
|
|
170
|
-
onClick:
|
|
171
|
+
onClick: n,
|
|
171
172
|
onMouseEnter: () => i.current.focus(),
|
|
172
173
|
"aria-label": "Resume playback"
|
|
173
174
|
}
|
|
174
175
|
) }),
|
|
175
|
-
/* @__PURE__ */ l(
|
|
176
|
-
|
|
177
|
-
/* @__PURE__ */ l(
|
|
176
|
+
/* @__PURE__ */ l(re, { className: "SL_PauseAdSidebar", children: /* @__PURE__ */ D(te, { children: [
|
|
177
|
+
u && /* @__PURE__ */ l(ne, { isDesktop: a, vastUrl: u }),
|
|
178
|
+
/* @__PURE__ */ l(oe, { children: "ADVERTISEMENT" })
|
|
178
179
|
] }) })
|
|
179
180
|
] }) });
|
|
180
|
-
},
|
|
181
|
-
const i = (
|
|
182
|
-
|
|
183
|
-
const [
|
|
184
|
-
|
|
181
|
+
}, ie = ({ showPauseAd: e, vastUrls: s, title: t, caption: n, sdk: r, onClose: u, onRender: c, options: a, isDesktop: h }) => {
|
|
182
|
+
const i = (a == null ? void 0 : a.pauseAdDelay) ?? 5e3, [y, P] = U(!1), [A, f] = U(!1), p = x(), o = s == null ? void 0 : s[0].url, m = x(o), g = x("");
|
|
183
|
+
m.current = o;
|
|
184
|
+
const [T, C] = _(), d = L(() => {
|
|
185
|
+
u && (g.current = m.current, S.emit("exposedPauseAd", {
|
|
185
186
|
action: "closed",
|
|
186
187
|
payload: {}
|
|
187
|
-
}),
|
|
188
|
-
}, [
|
|
188
|
+
}), u());
|
|
189
|
+
}, [u]), I = L(() => {
|
|
189
190
|
r.controlVideoPlayer({ play: !0 });
|
|
190
191
|
}, [r]);
|
|
191
|
-
return
|
|
192
|
-
if (e &&
|
|
193
|
-
|
|
192
|
+
return k(() => {
|
|
193
|
+
if (e && o) {
|
|
194
|
+
S.emit("exposedPauseAd", {
|
|
194
195
|
action: "enabled",
|
|
195
196
|
payload: {}
|
|
196
|
-
}),
|
|
197
|
-
|
|
197
|
+
}), T(o).then((b) => {
|
|
198
|
+
m.current === o && (b == null ? void 0 : b.success) !== !0 && (clearTimeout(p.current), d == null || d());
|
|
198
199
|
}).catch(() => {
|
|
199
|
-
|
|
200
|
+
m.current === o && (clearTimeout(p.current), d == null || d());
|
|
200
201
|
});
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
const R = () => {
|
|
203
|
+
const b = C.get()[m.current];
|
|
204
|
+
b != null && b.imageSrc ? (clearTimeout(p.current), f(!1), P(!0)) : p.current = setTimeout(() => {
|
|
205
|
+
R();
|
|
205
206
|
}, 200);
|
|
206
207
|
};
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
p.current = setTimeout(() => {
|
|
209
|
+
R();
|
|
209
210
|
}, i);
|
|
210
211
|
} else
|
|
211
|
-
|
|
212
|
+
g.current !== m.current && (g.current = "", S.emit("exposedPauseAd", {
|
|
212
213
|
action: "disabled",
|
|
213
214
|
payload: {}
|
|
214
|
-
}),
|
|
215
|
-
|
|
215
|
+
})), f(!0), p.current = setTimeout(() => {
|
|
216
|
+
P(!1);
|
|
216
217
|
}, 400);
|
|
217
218
|
return () => {
|
|
218
|
-
|
|
219
|
+
p.current && clearTimeout(p.current);
|
|
219
220
|
};
|
|
220
|
-
}, [
|
|
221
|
-
|
|
222
|
-
}, [y,
|
|
223
|
-
|
|
224
|
-
}, [
|
|
225
|
-
|
|
221
|
+
}, [C, T, d, i, e, o]), k(() => {
|
|
222
|
+
c == null || c({ rendered: y });
|
|
223
|
+
}, [y, c]), k(() => () => {
|
|
224
|
+
c == null || c({ rendered: !1 });
|
|
225
|
+
}, [c]), y ? /* @__PURE__ */ l(
|
|
226
|
+
ae,
|
|
226
227
|
{
|
|
227
|
-
onClose:
|
|
228
|
-
isClosing:
|
|
228
|
+
onClose: d,
|
|
229
|
+
isClosing: A,
|
|
229
230
|
title: t,
|
|
230
|
-
caption:
|
|
231
|
-
onPlay:
|
|
232
|
-
vastUrl:
|
|
233
|
-
options:
|
|
231
|
+
caption: n,
|
|
232
|
+
onPlay: I,
|
|
233
|
+
vastUrl: o,
|
|
234
|
+
options: a,
|
|
234
235
|
isDesktop: h
|
|
235
236
|
}
|
|
236
237
|
) : null;
|
|
237
|
-
},
|
|
238
|
+
}, le = ({
|
|
238
239
|
showPauseAd: e,
|
|
239
240
|
pauseAdVastUrl: s,
|
|
240
241
|
videoPlayerController: t,
|
|
241
|
-
onRenderPauseAd:
|
|
242
|
+
onRenderPauseAd: n,
|
|
242
243
|
onClosePauseAd: r,
|
|
243
|
-
children:
|
|
244
|
-
options:
|
|
244
|
+
children: u,
|
|
245
|
+
options: c
|
|
245
246
|
}) => {
|
|
246
|
-
const
|
|
247
|
-
return
|
|
248
|
-
i.current &&
|
|
247
|
+
const a = O(), h = G(), i = x();
|
|
248
|
+
return k(() => a ? (t && (i.current = t, a.addVideoPlayerController(i.current)), () => {
|
|
249
|
+
i.current && a.removeVideoPlayerController(i.current);
|
|
249
250
|
}) : () => {
|
|
250
|
-
}, [
|
|
251
|
-
|
|
251
|
+
}, [a, t]), a ? /* @__PURE__ */ l("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ D(
|
|
252
|
+
F,
|
|
252
253
|
{
|
|
253
|
-
style:
|
|
254
|
+
style: u ? { position: "relative" } : {},
|
|
254
255
|
customTheme: h.theme,
|
|
255
256
|
themeMode: h.themeMode,
|
|
256
257
|
children: [
|
|
257
|
-
|
|
258
|
+
u,
|
|
258
259
|
s && /* @__PURE__ */ l(
|
|
259
|
-
|
|
260
|
+
ie,
|
|
260
261
|
{
|
|
261
|
-
sdk:
|
|
262
|
+
sdk: a,
|
|
262
263
|
showPauseAd: e,
|
|
263
264
|
vastUrls: s,
|
|
264
265
|
onClose: r,
|
|
265
|
-
onRender:
|
|
266
|
-
options:
|
|
266
|
+
onRender: n,
|
|
267
|
+
options: c,
|
|
267
268
|
isDesktop: !0
|
|
268
269
|
}
|
|
269
270
|
)
|
|
270
271
|
]
|
|
271
272
|
}
|
|
272
|
-
) }) :
|
|
273
|
+
) }) : u;
|
|
273
274
|
};
|
|
274
|
-
class
|
|
275
|
+
class Ae extends j {
|
|
275
276
|
constructor(s) {
|
|
276
277
|
super(s), this.state = { hasError: !1 };
|
|
277
278
|
}
|
|
@@ -282,9 +283,9 @@ class ye extends O {
|
|
|
282
283
|
console.error(s, t.componentStack);
|
|
283
284
|
}
|
|
284
285
|
render() {
|
|
285
|
-
return this.state.hasError ? this.props.children : /* @__PURE__ */ l(
|
|
286
|
+
return this.state.hasError ? this.props.children : /* @__PURE__ */ l(le, { ...this.props });
|
|
286
287
|
}
|
|
287
288
|
}
|
|
288
289
|
export {
|
|
289
|
-
|
|
290
|
+
Ae as StreamLayerPauseAd
|
|
290
291
|
};
|
package/lib/classic/es/points.js
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import { S as
|
|
9
|
-
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { m as u, h as d } from "./index7.js";
|
|
3
|
+
import { useState as f, useEffect as y } from "react";
|
|
4
|
+
import { s as o, u as h } from "./sl-types.js";
|
|
5
|
+
import { F as c, e as a } from "./index3.js";
|
|
6
|
+
import { d as S } from "./index4.js";
|
|
7
|
+
import { B as v } from "./index5.js";
|
|
8
|
+
import { S as g } from "./useStreamLayerApp2.js";
|
|
9
|
+
import { B as k, z as A } from "./hooks-B0Qttldg.js";
|
|
10
|
+
const I = /* @__PURE__ */ o("div")({
|
|
10
11
|
name: "PointsContainer",
|
|
11
12
|
class: "psiob9b",
|
|
12
13
|
propsAsIs: !1
|
|
13
|
-
}), P = /* @__PURE__ */
|
|
14
|
+
}), P = /* @__PURE__ */ o("div")({
|
|
14
15
|
name: "PointsIcon",
|
|
15
16
|
class: "p1gqe4lh",
|
|
16
17
|
propsAsIs: !1
|
|
17
|
-
}), b = () =>
|
|
18
|
+
}), b = () => v, B = /* @__PURE__ */ o(b())({
|
|
18
19
|
name: "PointsSvg",
|
|
19
20
|
class: "p15syg2y",
|
|
20
21
|
propsAsIs: !0
|
|
21
|
-
}), F = /* @__PURE__ */
|
|
22
|
+
}), F = /* @__PURE__ */ o("div")({
|
|
22
23
|
name: "PointsBody",
|
|
23
24
|
class: "p12n4f2h",
|
|
24
25
|
propsAsIs: !1
|
|
25
|
-
}),
|
|
26
|
+
}), T = /* @__PURE__ */ o("div")({
|
|
26
27
|
name: "PointsTitle",
|
|
27
28
|
class: "poqmx89",
|
|
28
29
|
propsAsIs: !1
|
|
29
|
-
}), x = /* @__PURE__ */
|
|
30
|
+
}), x = /* @__PURE__ */ o("div")({
|
|
30
31
|
name: "PointsValue",
|
|
31
32
|
class: "prj9b3v",
|
|
32
33
|
propsAsIs: !1
|
|
33
|
-
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
34
|
+
}), C = ({ points: s, onClick: t }) => /* @__PURE__ */ p(I, { className: u, onClick: t, children: [
|
|
35
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(B, { name: "icon-trophy-solid" }) }),
|
|
36
|
+
/* @__PURE__ */ p(F, { children: [
|
|
37
|
+
/* @__PURE__ */ e(T, { children: "Total points" }),
|
|
38
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(S, { value: s }) })
|
|
38
39
|
] })
|
|
39
|
-
] }),
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
const
|
|
43
|
-
var
|
|
44
|
-
(
|
|
40
|
+
] }), j = ({ gamification: s }) => {
|
|
41
|
+
const t = s.userSummary.$store, [n, l] = f(0);
|
|
42
|
+
return y(() => {
|
|
43
|
+
const r = t.subscribe((i) => {
|
|
44
|
+
var m;
|
|
45
|
+
(m = i == null ? void 0 : i.summary) != null && m.points && l(i.summary.points);
|
|
45
46
|
});
|
|
46
47
|
return () => {
|
|
47
|
-
|
|
48
|
+
r();
|
|
48
49
|
};
|
|
49
|
-
}, [
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
}, [t]), /* @__PURE__ */ e(C, { points: n, onClick: () => {
|
|
51
|
+
const r = s.status.get();
|
|
52
|
+
r === c.Suspended ? (s.openFeature(), a.emit("app", {
|
|
52
53
|
action: "open",
|
|
53
54
|
payload: {}
|
|
54
|
-
}),
|
|
55
|
+
}), a.emit("interactions", {
|
|
55
56
|
action: "tap",
|
|
56
57
|
payload: {}
|
|
57
|
-
})) :
|
|
58
|
+
})) : r === c.Ready && (s.closeFeature(!1), a.emit("app", {
|
|
58
59
|
action: "close",
|
|
59
60
|
payload: {}
|
|
60
|
-
}),
|
|
61
|
+
}), a.emit("interactions", {
|
|
61
62
|
action: "tap",
|
|
62
63
|
payload: {}
|
|
63
64
|
}));
|
|
64
65
|
} });
|
|
65
|
-
},
|
|
66
|
-
if (!
|
|
66
|
+
}, L = ({ sdk: s }) => {
|
|
67
|
+
if (!h(s.featuresList.getStore()))
|
|
67
68
|
return null;
|
|
68
|
-
const
|
|
69
|
-
return
|
|
69
|
+
const t = s.getFeature(g.GAMES);
|
|
70
|
+
return t ? /* @__PURE__ */ e(j, { gamification: t }) : null;
|
|
70
71
|
}, R = ({ theme: s }) => {
|
|
71
|
-
const
|
|
72
|
-
return
|
|
72
|
+
const t = k(), n = A();
|
|
73
|
+
return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(d, { customTheme: s ?? n.theme, themeMode: n.themeMode, children: /* @__PURE__ */ e(L, { sdk: t }) }) }) : null;
|
|
73
74
|
};
|
|
74
75
|
export {
|
|
75
76
|
R as StreamLayerSDKPoints
|