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