@streamlayer/react 1.24.8-pre.11da316 → 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.
- package/lib/app/advertisement.d.ts +0 -1
- package/lib/app/pause-ad.d.ts +17 -0
- package/lib/cjs/advertisement.js +655 -655
- package/lib/cjs/auth.js +67 -67
- package/lib/cjs/bet-pack.js +69 -69
- package/lib/cjs/index.js +141 -141
- package/lib/cjs/insight.js +78 -78
- package/lib/cjs/masters.js +132 -132
- package/lib/cjs/notification.js +80 -80
- package/lib/cjs/pause-ad.js +572 -342
- package/lib/cjs/points.js +72 -72
- package/lib/cjs/polymarket.js +76 -76
- package/lib/cjs/style.css +1 -1
- package/lib/cjs/useStreamLayerApp.js +100 -100
- package/lib/dist/cjs/index.js +132 -132
- package/lib/dist/es/index.js +132 -132
- package/lib/es/advertisement.js +4862 -4819
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/{hooks-42q2i9Iw.js → hooks-DHRXtbBc.js} +22 -22
- package/lib/es/{index-sWgEw6jy.js → index-BW1YFKTb.js} +35 -35
- package/lib/es/index.js +1 -1
- package/lib/es/index16.js +1 -1
- package/lib/es/index2.js +2 -2
- package/lib/es/insight.js +1 -1
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +1 -1
- package/lib/es/notification.js +1 -1
- package/lib/es/pause-ad.js +362 -153
- package/lib/es/points.js +1 -1
- package/lib/es/polymarket.js +1 -1
- package/lib/es/style.css +1 -1
- package/lib/es/useStreamLayerApp2.js +791 -791
- package/lib/source.css +1 -1
- package/package.json +5 -5
package/lib/es/pause-ad.js
CHANGED
|
@@ -1,232 +1,441 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { h as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { s as
|
|
5
|
-
import { e as
|
|
6
|
-
import { d as
|
|
7
|
-
import { w as
|
|
8
|
-
const
|
|
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
|
-
}),
|
|
12
|
+
}), te = /* @__PURE__ */ G("div")({
|
|
13
13
|
name: "PauseAdContent",
|
|
14
14
|
class: "p8lpomy",
|
|
15
15
|
propsAsIs: !1
|
|
16
|
-
}),
|
|
16
|
+
}), re = /* @__PURE__ */ G("div")({
|
|
17
17
|
name: "PauseAdBottomLeft",
|
|
18
18
|
class: "pv7u167",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
20
|
+
}), ae = /* @__PURE__ */ G("button")({
|
|
21
21
|
name: "PauseAdPlayButton",
|
|
22
22
|
class: "p1kh2yb0",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}),
|
|
24
|
+
}), se = /* @__PURE__ */ G("div")({
|
|
25
25
|
name: "PauseAdSidebarGradient",
|
|
26
26
|
class: "pl8f94x",
|
|
27
27
|
propsAsIs: !1
|
|
28
|
-
}),
|
|
28
|
+
}), ne = /* @__PURE__ */ G("div")({
|
|
29
29
|
name: "PauseAdSidebar",
|
|
30
30
|
class: "p1m6zmrt",
|
|
31
31
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
32
|
+
}), z = /* @__PURE__ */ G("img")({
|
|
33
33
|
name: "ExternalAdContainer",
|
|
34
34
|
class: "em3vwfa",
|
|
35
35
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
|
|
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:
|
|
45
|
-
parentId:
|
|
48
|
+
id: t.id,
|
|
49
|
+
parentId: t.parentId
|
|
46
50
|
}
|
|
47
51
|
});
|
|
48
|
-
}, [
|
|
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
|
-
|
|
56
|
+
D.emit("exposedPauseAd", {
|
|
53
57
|
action: "navigated",
|
|
54
58
|
payload: {
|
|
55
|
-
id:
|
|
56
|
-
parentId:
|
|
59
|
+
id: t.id,
|
|
60
|
+
parentId: t.parentId
|
|
57
61
|
}
|
|
58
62
|
});
|
|
59
63
|
},
|
|
60
|
-
href:
|
|
64
|
+
href: t.adUrl,
|
|
61
65
|
target: "_blank",
|
|
62
66
|
rel: "noopener noreferrer",
|
|
63
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ c(z, { src: t.imageSrc })
|
|
64
68
|
}
|
|
65
|
-
) : null),
|
|
66
|
-
|
|
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:
|
|
178
|
+
onEnterRelease: v,
|
|
69
179
|
isFocusBoundary: !0,
|
|
70
180
|
forceFocus: !0
|
|
71
181
|
});
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
if (!
|
|
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
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
|
|
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",
|
|
88
|
-
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
}
|
|
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
|
-
}, [
|
|
120
|
-
|
|
121
|
-
}, [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}, [
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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(
|
|
142
|
-
|
|
143
|
-
},
|
|
319
|
+
clearTimeout(d.current), d.current = setTimeout(() => {
|
|
320
|
+
o();
|
|
321
|
+
}, n);
|
|
144
322
|
} else {
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
156
|
-
|
|
344
|
+
C(!0), d.current = setTimeout(() => {
|
|
345
|
+
R(!1);
|
|
157
346
|
}, 400);
|
|
158
347
|
}
|
|
159
348
|
return () => {
|
|
160
|
-
|
|
349
|
+
d.current && clearTimeout(d.current);
|
|
161
350
|
};
|
|
162
|
-
}, [
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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:
|
|
170
|
-
isClosing:
|
|
171
|
-
onPlay:
|
|
172
|
-
vastUrl:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
},
|
|
180
|
-
showPauseAd:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
|
189
|
-
return
|
|
190
|
-
|
|
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
|
-
}, [
|
|
193
|
-
|
|
401
|
+
}, [n, u]), n ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ N(
|
|
402
|
+
Q,
|
|
194
403
|
{
|
|
195
|
-
style:
|
|
196
|
-
customTheme:
|
|
197
|
-
themeMode:
|
|
404
|
+
style: y ? { position: "relative" } : {},
|
|
405
|
+
customTheme: S.theme,
|
|
406
|
+
themeMode: S.themeMode,
|
|
198
407
|
children: [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
408
|
+
y,
|
|
409
|
+
A && /* @__PURE__ */ c(
|
|
410
|
+
pe,
|
|
202
411
|
{
|
|
203
|
-
sdk:
|
|
204
|
-
showPauseAd:
|
|
205
|
-
|
|
206
|
-
onClose:
|
|
207
|
-
onRender:
|
|
208
|
-
options:
|
|
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
|
-
) }) :
|
|
423
|
+
) }) : y;
|
|
215
424
|
};
|
|
216
|
-
class
|
|
217
|
-
constructor(
|
|
218
|
-
super(
|
|
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(
|
|
224
|
-
console.error(
|
|
432
|
+
componentDidCatch(p, t) {
|
|
433
|
+
console.error(p, t.componentStack);
|
|
225
434
|
}
|
|
226
435
|
render() {
|
|
227
|
-
return this.state.hasError ? this.props.children : /* @__PURE__ */
|
|
436
|
+
return this.state.hasError ? this.props.children : /* @__PURE__ */ c(ue, { ...this.props });
|
|
228
437
|
}
|
|
229
438
|
}
|
|
230
439
|
export {
|
|
231
|
-
|
|
440
|
+
Ie as StreamLayerPauseAd
|
|
232
441
|
};
|
package/lib/es/points.js
CHANGED
|
@@ -7,7 +7,7 @@ import { p as h } from "./index11.js";
|
|
|
7
7
|
import { m as y } from "./theme.js";
|
|
8
8
|
import { M as S } from "./index5.js";
|
|
9
9
|
import { S as v } from "./useStreamLayerApp2.js";
|
|
10
|
-
import { w as g, q as A } from "./hooks-
|
|
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",
|
package/lib/es/polymarket.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as K, jsx as E } from "react/jsx-runtime";
|
|
2
2
|
import { h as fs } from "./index7.js";
|
|
3
3
|
import { s as k, u as js, c as Vs } from "./feature.js";
|
|
4
|
-
import { z as ds, w as ms, q as ps } from "./hooks-
|
|
4
|
+
import { z as ds, w as ms, q as ps } from "./hooks-DHRXtbBc.js";
|
|
5
5
|
import { useRef as Ds, useEffect as Ks } from "react";
|
|
6
6
|
import "./index6.js";
|
|
7
7
|
function _(h) {
|