@streamlayer/react 1.24.5 → 1.24.7
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/cjs/advertisement.js +19607 -203
- package/lib/cjs/auth.js +4459 -1
- package/lib/cjs/bet-pack.js +15691 -1
- package/lib/cjs/index.js +19411 -1
- package/lib/cjs/insight.js +13509 -1
- package/lib/cjs/masters.js +20696 -1
- package/lib/cjs/notification.js +13087 -1
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/pause-ad.js +8390 -1
- package/lib/cjs/points.js +7189 -1
- package/lib/cjs/polyfills.js +69 -0
- package/lib/cjs/polymarket.js +16394 -14
- package/lib/cjs/style.css +1 -0
- package/lib/cjs/useStreamLayerApp.js +4711 -1
- package/lib/dist/cjs/index.js +20696 -1
- package/lib/dist/es/index.js +20669 -10
- package/lib/dist/es/polyfills.js +92 -0
- package/lib/es/Question.js +66 -65
- package/lib/es/advertisement.js +3402 -3294
- package/lib/es/analytics.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/feature.js +192 -37
- package/lib/es/{index-DvqmgCor.js → index-D8wyDNJD.js} +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/index10.js +181 -7
- package/lib/es/index11.js +371 -181
- package/lib/es/index12.js +366 -2579
- package/lib/es/index13.js +789 -234
- package/lib/es/index14.js +293 -792
- package/lib/es/index15.js +2550 -305
- package/lib/es/index16.js +64 -66
- package/lib/es/index2.js +285 -279
- package/lib/es/index3.js +34 -4
- package/lib/es/index4.js +16 -17
- package/lib/es/index5.js +3 -19
- package/lib/es/index6.js +7 -5
- package/lib/es/index7.js +284 -5
- package/lib/es/index8.js +236 -281
- package/lib/es/index9.js +8 -179
- package/lib/es/insight.js +2 -2
- package/lib/es/masters2.js +199 -189
- package/lib/es/notification.js +27 -28
- package/lib/es/pause-ad.js +124 -149
- package/lib/es/points.js +23 -24
- package/lib/es/polymarket.js +3 -3
- package/lib/es/storage.js +4 -4
- package/lib/es/style.css +1 -0
- package/lib/es/useStreamLayerApp2.js +5579 -4475
- package/lib/source.css +1 -120
- package/package.json +126 -91
- package/lib/cjs/Question.js +0 -1
- package/lib/cjs/analytics.js +0 -1
- package/lib/cjs/feature.js +0 -1
- package/lib/cjs/gamification-feature.js +0 -1
- package/lib/cjs/gamification-feature2.js +0 -1
- package/lib/cjs/hooks-n9ax4LRT.js +0 -1
- package/lib/cjs/index-DvqmgCor.js +0 -5
- package/lib/cjs/index10.js +0 -1
- package/lib/cjs/index11.js +0 -1
- package/lib/cjs/index12.js +0 -1
- package/lib/cjs/index13.js +0 -1
- package/lib/cjs/index14.js +0 -4
- package/lib/cjs/index15.js +0 -1
- package/lib/cjs/index16.js +0 -5
- package/lib/cjs/index2.js +0 -1
- package/lib/cjs/index3.js +0 -1
- package/lib/cjs/index4.js +0 -5
- package/lib/cjs/index5.js +0 -1
- package/lib/cjs/index6.js +0 -1
- package/lib/cjs/index7.js +0 -1
- package/lib/cjs/index8.js +0 -1
- package/lib/cjs/index9.js +0 -7
- package/lib/cjs/masters2.js +0 -8
- package/lib/cjs/sl-types.js +0 -1
- package/lib/cjs/storage.js +0 -1
- package/lib/cjs/theme.js +0 -1
- package/lib/cjs/useStreamLayerApp2.js +0 -17
- package/lib/cjs/utils.js +0 -47
- package/lib/classic/app/advertisement.d.ts +0 -19
- package/lib/classic/app/app.d.ts +0 -23
- package/lib/classic/app/auth.d.ts +0 -4
- package/lib/classic/app/bet-pack.d.ts +0 -10
- package/lib/classic/app/insight.d.ts +0 -13
- package/lib/classic/app/masters.d.ts +0 -19
- package/lib/classic/app/notification.d.ts +0 -5
- package/lib/classic/app/pause-ad.d.ts +0 -27
- package/lib/classic/app/points.d.ts +0 -3
- package/lib/classic/app/polymarket.d.ts +0 -7
- package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
- package/lib/classic/cjs/Question.js +0 -1
- package/lib/classic/cjs/advertisement.js +0 -203
- package/lib/classic/cjs/analytics.js +0 -1
- package/lib/classic/cjs/auth.js +0 -1
- package/lib/classic/cjs/bet-pack.js +0 -5
- package/lib/classic/cjs/feature.js +0 -1
- package/lib/classic/cjs/gamification-feature.js +0 -1
- package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
- package/lib/classic/cjs/index-DvqmgCor.js +0 -5
- package/lib/classic/cjs/index.js +0 -1
- package/lib/classic/cjs/index10.js +0 -1
- package/lib/classic/cjs/index11.js +0 -1
- package/lib/classic/cjs/index12.js +0 -1
- package/lib/classic/cjs/index13.js +0 -4
- package/lib/classic/cjs/index2.js +0 -5
- package/lib/classic/cjs/index3.js +0 -1
- package/lib/classic/cjs/index4.js +0 -1
- package/lib/classic/cjs/index5.js +0 -1
- package/lib/classic/cjs/index6.js +0 -1
- package/lib/classic/cjs/index7.js +0 -7
- package/lib/classic/cjs/index8.js +0 -1
- package/lib/classic/cjs/index9.js +0 -1
- package/lib/classic/cjs/insight.js +0 -1
- package/lib/classic/cjs/notification.js +0 -1
- package/lib/classic/cjs/notification2.js +0 -1
- package/lib/classic/cjs/pause-ad.js +0 -1
- package/lib/classic/cjs/points.js +0 -1
- package/lib/classic/cjs/polymarket.js +0 -14
- package/lib/classic/cjs/sl-types.js +0 -1
- package/lib/classic/cjs/useStreamLayerApp.js +0 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
- package/lib/classic/cjs/utils.js +0 -47
- package/lib/classic/es/Question.js +0 -388
- package/lib/classic/es/advertisement.js +0 -38759
- package/lib/classic/es/analytics.js +0 -84
- package/lib/classic/es/auth.js +0 -11
- package/lib/classic/es/bet-pack.js +0 -3419
- package/lib/classic/es/feature.js +0 -59
- package/lib/classic/es/gamification-feature.js +0 -4
- package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
- package/lib/classic/es/index-DvqmgCor.js +0 -3775
- package/lib/classic/es/index.js +0 -15
- package/lib/classic/es/index10.js +0 -2592
- package/lib/classic/es/index11.js +0 -317
- package/lib/classic/es/index12.js +0 -185
- package/lib/classic/es/index13.js +0 -820
- package/lib/classic/es/index2.js +0 -2597
- package/lib/classic/es/index3.js +0 -19
- package/lib/classic/es/index4.js +0 -6
- package/lib/classic/es/index5.js +0 -5
- package/lib/classic/es/index6.js +0 -285
- package/lib/classic/es/index7.js +0 -181
- package/lib/classic/es/index8.js +0 -7
- package/lib/classic/es/index9.js +0 -11
- package/lib/classic/es/insight.js +0 -79
- package/lib/classic/es/notification.js +0 -9
- package/lib/classic/es/notification2.js +0 -1127
- package/lib/classic/es/pause-ad.js +0 -257
- package/lib/classic/es/points.js +0 -77
- package/lib/classic/es/polymarket.js +0 -6617
- package/lib/classic/es/sl-types.js +0 -156
- package/lib/classic/es/useStreamLayerApp.js +0 -4
- package/lib/classic/es/useStreamLayerApp2.js +0 -11573
- package/lib/classic/es/utils.js +0 -76
- package/lib/classic/index.d.ts +0 -6
- package/lib/classic/masters.d.ts +0 -8
- package/lib/classic/source.css +0 -110
- package/lib/dist/cjs/gamification-feature.js +0 -1
- package/lib/dist/cjs/index-DvqmgCor.js +0 -5
- package/lib/dist/cjs/masters.js +0 -69
- package/lib/dist/es/gamification-feature.js +0 -4
- package/lib/dist/es/index-DvqmgCor.js +0 -3775
- package/lib/dist/es/masters.js +0 -22204
- package/lib/dist/index.d.ts +0 -1355
- package/lib/dist/source.css +0 -64
- package/lib/es/sl-types.js +0 -156
- package/lib/style.css +0 -1
package/lib/es/notification.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { h as us } from "./
|
|
2
|
+
import { h as us } from "./index6.js";
|
|
3
3
|
import { useState as I, useRef as Q, useEffect as $, useCallback as As, useMemo as fs } from "react";
|
|
4
|
-
import { s as e, c as hs, u as Is, N as M } from "./
|
|
4
|
+
import { s as e, c as hs, u as Is, N as M } from "./feature.js";
|
|
5
5
|
import { e as $s } from "./index3.js";
|
|
6
|
-
import "./feature.js";
|
|
7
6
|
import { x as W } from "./storage.js";
|
|
8
|
-
import { D as vs, j as gs, e as K, o as ws } from "./
|
|
9
|
-
import { B as A } from "./
|
|
7
|
+
import { D as vs, j as gs, e as K, o as ws } from "./index10.js";
|
|
8
|
+
import { B as A } from "./index7.js";
|
|
10
9
|
import { d, Q as f, a as G, N as x, S as bs, A as R } from "./useStreamLayerApp2.js";
|
|
11
|
-
import { b as S } from "./
|
|
12
|
-
import {
|
|
13
|
-
import { p as Cs } from "./
|
|
10
|
+
import { b as S } from "./index8.js";
|
|
11
|
+
import { V as Ts, y as ys } from "./index14.js";
|
|
12
|
+
import { p as Cs } from "./index11.js";
|
|
14
13
|
import { Y as Ns, _ as ks, q as qs } from "./hooks-n9ax4LRT.js";
|
|
15
14
|
const w = /* @__PURE__ */ e("div")({
|
|
16
15
|
name: "Media",
|
|
@@ -78,11 +77,11 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
78
77
|
name: "Body",
|
|
79
78
|
class: "b1j59nzs",
|
|
80
79
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
80
|
+
}), Vs = /* @__PURE__ */ e("div")({
|
|
82
81
|
name: "Title",
|
|
83
82
|
class: "t9vmnpp",
|
|
84
83
|
propsAsIs: !1
|
|
85
|
-
}),
|
|
84
|
+
}), Fs = /* @__PURE__ */ e("button")({
|
|
86
85
|
name: "Button",
|
|
87
86
|
class: "b14ivj5k",
|
|
88
87
|
propsAsIs: !1
|
|
@@ -128,7 +127,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
128
127
|
questionStatus: G.UNSET
|
|
129
128
|
}
|
|
130
129
|
),
|
|
131
|
-
n && /* @__PURE__ */ s(
|
|
130
|
+
n && /* @__PURE__ */ s(Vs, { children: n })
|
|
132
131
|
] }), Hs = ({ tweet: n }) => n ? /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(Xs, { ...n, controlVideo: () => {
|
|
133
132
|
} }) }) : null, Js = ({ action: n, questionType: o, inApp: i, insight: a, tweet: r }) => {
|
|
134
133
|
const t = K[o], p = ws[o];
|
|
@@ -142,7 +141,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
142
141
|
h && !g && /* @__PURE__ */ s(j, { src: h, imageMode: u, withVideo: !!b }),
|
|
143
142
|
g && /* @__PURE__ */ s(j, { src: g, fromInsight: !0, withVideo: !!b }),
|
|
144
143
|
o === f.TWEET ? /* @__PURE__ */ s(Hs, { tweet: r }) : /* @__PURE__ */ s(Zs, { questionTypeData: t, questionType: o, title: c }),
|
|
145
|
-
/* @__PURE__ */ s(
|
|
144
|
+
/* @__PURE__ */ s(Fs, { name: "inapp-button", children: p || "Open" }),
|
|
146
145
|
/* @__PURE__ */ s(_s, { name: "chevronRight" })
|
|
147
146
|
] }) });
|
|
148
147
|
}, se = () => ({
|
|
@@ -320,7 +319,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
320
319
|
),
|
|
321
320
|
n && /* @__PURE__ */ s(qe, { webos: t, children: n }),
|
|
322
321
|
a && /* @__PURE__ */ s(xe, { children: a })
|
|
323
|
-
] }), Pe = S(De), ze = S(Re), Ue = S(Oe),
|
|
322
|
+
] }), Pe = S(De), ze = S(Re), Ue = S(Oe), Ve = ({
|
|
324
323
|
className: n,
|
|
325
324
|
sponsorLogo: o,
|
|
326
325
|
onClick: i,
|
|
@@ -335,7 +334,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
335
334
|
"data-webos": a,
|
|
336
335
|
children: /* @__PURE__ */ s(Z, { withoutPadding: !0, children: /* @__PURE__ */ s(J, { src: o }) })
|
|
337
336
|
}
|
|
338
|
-
),
|
|
337
|
+
), Fe = ({
|
|
339
338
|
action: n,
|
|
340
339
|
close: o,
|
|
341
340
|
questionType: i,
|
|
@@ -354,7 +353,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
354
353
|
return null;
|
|
355
354
|
const { title: b, image: ls, imageMode: y, useContentMedia: C } = a.notification, ps = i === f.FACTOID ? r?.heading : b, ds = i === f.FACTOID ? r?.body : "", ms = ls, N = i === f.FACTOID && r?.video?.url && a?.isVideo && C === x.ENABLED, k = C === x.ENABLED ? N ? r?.video?.url : r?.image : "";
|
|
356
355
|
return a?.sponsorLogo && m ? /* @__PURE__ */ s(
|
|
357
|
-
|
|
356
|
+
Ve,
|
|
358
357
|
{
|
|
359
358
|
className: c,
|
|
360
359
|
sponsorLogo: a?.sponsorLogo,
|
|
@@ -684,7 +683,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
684
683
|
name: "Body",
|
|
685
684
|
class: "b16qj0do",
|
|
686
685
|
propsAsIs: !1
|
|
687
|
-
}),
|
|
686
|
+
}), V = {
|
|
688
687
|
1: 3e3,
|
|
689
688
|
2: 4e3,
|
|
690
689
|
3: 4e3,
|
|
@@ -693,8 +692,8 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
693
692
|
if ($(() => {
|
|
694
693
|
if (i) {
|
|
695
694
|
const u = setTimeout(() => {
|
|
696
|
-
|
|
697
|
-
},
|
|
695
|
+
V[c + 1] && (r || c < 3) ? i(c + 1) : n?.();
|
|
696
|
+
}, V[c]);
|
|
698
697
|
return () => {
|
|
699
698
|
u && clearTimeout(u);
|
|
700
699
|
};
|
|
@@ -733,11 +732,11 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
733
732
|
name: "NotificationContainer",
|
|
734
733
|
class: "n1i4h28u",
|
|
735
734
|
propsAsIs: !1
|
|
736
|
-
}), Un = ({ className: n, ...o }) => /* @__PURE__ */ s(zn, { className: n, children: /* @__PURE__ */ s(Pn, { ...o }) }),
|
|
735
|
+
}), Un = ({ className: n, ...o }) => /* @__PURE__ */ s(zn, { className: n, children: /* @__PURE__ */ s(Pn, { ...o }) }), Vn = /* @__PURE__ */ e("div")({
|
|
737
736
|
name: "Container",
|
|
738
737
|
class: "cwa9tgs",
|
|
739
738
|
propsAsIs: !1
|
|
740
|
-
}),
|
|
739
|
+
}), Fn = /* @__PURE__ */ e("div")({
|
|
741
740
|
name: "BodyContainer",
|
|
742
741
|
class: "b1xx7swj",
|
|
743
742
|
propsAsIs: !1
|
|
@@ -761,11 +760,11 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
761
760
|
return () => {
|
|
762
761
|
t.disconnect();
|
|
763
762
|
};
|
|
764
|
-
}, []), /* @__PURE__ */ s(
|
|
763
|
+
}, []), /* @__PURE__ */ s(Vn, {
|
|
765
764
|
style: {
|
|
766
765
|
padding: `${n === 3 && i === "incorrect" || n === 1 ? "5px 100px" : "5px 40px"}`
|
|
767
766
|
},
|
|
768
|
-
children: /* @__PURE__ */ s(
|
|
767
|
+
children: /* @__PURE__ */ s(Fn, {
|
|
769
768
|
style: {
|
|
770
769
|
minWidth: `${a}px`
|
|
771
770
|
},
|
|
@@ -876,7 +875,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
876
875
|
}), /* @__PURE__ */ l(is, {
|
|
877
876
|
children: ["Your Pick: ", o]
|
|
878
877
|
})]
|
|
879
|
-
}),
|
|
878
|
+
}), F = /* @__PURE__ */ e("div")({
|
|
880
879
|
name: "Container",
|
|
881
880
|
class: "cmox3ot",
|
|
882
881
|
propsAsIs: !1
|
|
@@ -901,9 +900,9 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
901
900
|
return () => {
|
|
902
901
|
};
|
|
903
902
|
}, [i, c, n, r]), c === 1)
|
|
904
|
-
return /* @__PURE__ */ s(
|
|
903
|
+
return /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(Y, { children: /* @__PURE__ */ s(oo, {}) }) });
|
|
905
904
|
let m = "pending";
|
|
906
|
-
return c === 3 && (m = r ? "correct" : "incorrect"), /* @__PURE__ */ s(
|
|
905
|
+
return c === 3 && (m = r ? "correct" : "incorrect"), /* @__PURE__ */ s(F, { "data-a": "intr", onClick: () => o?.(), children: /* @__PURE__ */ l(Y, { children: [
|
|
907
906
|
c !== 1 && /* @__PURE__ */ s(Jn, {}, c),
|
|
908
907
|
/* @__PURE__ */ l(_n, { state: m, step: c, children: [
|
|
909
908
|
c === 2 && /* @__PURE__ */ s(lo, { title: p || "unknown", answer: a?.title || "unknown" }),
|
|
@@ -1004,7 +1003,7 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
1004
1003
|
...t.data.onboarding
|
|
1005
1004
|
}
|
|
1006
1005
|
) : null : t && t.data.inApp?.adUnit === R.STANDART ? /* @__PURE__ */ s(
|
|
1007
|
-
|
|
1006
|
+
Fe,
|
|
1008
1007
|
{
|
|
1009
1008
|
...t.data,
|
|
1010
1009
|
action: t.action,
|
|
@@ -1013,11 +1012,11 @@ const w = /* @__PURE__ */ e("div")({
|
|
|
1013
1012
|
webos: o
|
|
1014
1013
|
}
|
|
1015
1014
|
) : t && /* @__PURE__ */ s(Js, { ...t.data, action: t.action });
|
|
1016
|
-
},
|
|
1015
|
+
}, Bo = ({ theme: n }) => {
|
|
1017
1016
|
const o = Ns(), i = ks(), a = qs();
|
|
1018
1017
|
return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(us, { customTheme: n ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ s(yo, { sdk: o }) }) }) : null;
|
|
1019
1018
|
};
|
|
1020
1019
|
export {
|
|
1021
|
-
|
|
1020
|
+
Bo as StreamLayerSDKNotification,
|
|
1022
1021
|
yo as StreamLayerSDKNotificationUI
|
|
1023
1022
|
};
|
package/lib/es/pause-ad.js
CHANGED
|
@@ -1,71 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { h as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Y as
|
|
8
|
-
const
|
|
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")({
|
|
9
9
|
name: "PauseAdOverlay",
|
|
10
10
|
class: "pw9gih8",
|
|
11
11
|
propsAsIs: !1
|
|
12
|
-
}),
|
|
12
|
+
}), H = /* @__PURE__ */ h("div")({
|
|
13
13
|
name: "PauseAdContent",
|
|
14
14
|
class: "p8lpomy",
|
|
15
15
|
propsAsIs: !1
|
|
16
|
-
}),
|
|
17
|
-
name: "PauseAdTopLeft",
|
|
18
|
-
class: "pv7u167",
|
|
19
|
-
propsAsIs: !1
|
|
20
|
-
}), Y = /* @__PURE__ */ d("h2")({
|
|
21
|
-
name: "PauseAdTitle",
|
|
22
|
-
class: "p1kh2yb0",
|
|
23
|
-
propsAsIs: !1
|
|
24
|
-
}), H = /* @__PURE__ */ d("p")({
|
|
25
|
-
name: "PauseAdCaption",
|
|
26
|
-
class: "pl8f94x",
|
|
27
|
-
propsAsIs: !1
|
|
28
|
-
}), J = /* @__PURE__ */ d("div")({
|
|
16
|
+
}), O = /* @__PURE__ */ h("div")({
|
|
29
17
|
name: "PauseAdBottomLeft",
|
|
30
|
-
class: "
|
|
18
|
+
class: "pv7u167",
|
|
31
19
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
20
|
+
}), Y = /* @__PURE__ */ h("button")({
|
|
33
21
|
name: "PauseAdPlayButton",
|
|
34
|
-
class: "
|
|
22
|
+
class: "p1kh2yb0",
|
|
35
23
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
24
|
+
}), q = /* @__PURE__ */ h("div")({
|
|
37
25
|
name: "PauseAdSidebarGradient",
|
|
38
|
-
class: "
|
|
26
|
+
class: "pl8f94x",
|
|
39
27
|
propsAsIs: !1
|
|
40
|
-
}),
|
|
28
|
+
}), J = /* @__PURE__ */ h("div")({
|
|
41
29
|
name: "PauseAdSidebar",
|
|
42
|
-
class: "
|
|
43
|
-
propsAsIs: !1
|
|
44
|
-
}), ee = /* @__PURE__ */ d("span")({
|
|
45
|
-
name: "PauseAdTitleDescription",
|
|
46
|
-
class: "p14estxv",
|
|
30
|
+
class: "p1m6zmrt",
|
|
47
31
|
propsAsIs: !1
|
|
48
|
-
}),
|
|
32
|
+
}), U = /* @__PURE__ */ h("img")({
|
|
49
33
|
name: "ExternalAdContainer",
|
|
50
|
-
class: "
|
|
34
|
+
class: "em3vwfa",
|
|
51
35
|
propsAsIs: !1
|
|
52
|
-
}),
|
|
53
|
-
vastUrl:
|
|
54
|
-
isDesktop:
|
|
36
|
+
}), Q = ({
|
|
37
|
+
vastUrl: d,
|
|
38
|
+
isDesktop: n,
|
|
55
39
|
content: e
|
|
56
|
-
}) => (
|
|
57
|
-
e.imageSrc && e.id &&
|
|
40
|
+
}) => (i(() => {
|
|
41
|
+
e.imageSrc && e.id && k.emit("exposedPauseAd", {
|
|
58
42
|
action: "rendered",
|
|
59
43
|
payload: {
|
|
60
44
|
id: e.id,
|
|
61
45
|
parentId: e.parentId
|
|
62
46
|
}
|
|
63
47
|
});
|
|
64
|
-
}, [e,
|
|
48
|
+
}, [e, d]), e?.imageSrc ? !e.adUrl || !n ? /* @__PURE__ */ a(U, { src: e.imageSrc }) : /* @__PURE__ */ a(
|
|
65
49
|
"a",
|
|
66
50
|
{
|
|
67
51
|
onClick: () => {
|
|
68
|
-
|
|
52
|
+
k.emit("exposedPauseAd", {
|
|
69
53
|
action: "navigated",
|
|
70
54
|
payload: {
|
|
71
55
|
id: e.id,
|
|
@@ -76,182 +60,173 @@ const O = /* @__PURE__ */ d("div")({
|
|
|
76
60
|
href: e.adUrl,
|
|
77
61
|
target: "_blank",
|
|
78
62
|
rel: "noopener noreferrer",
|
|
79
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ a(U, { src: e.imageSrc })
|
|
80
64
|
}
|
|
81
|
-
) : null),
|
|
82
|
-
const
|
|
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({
|
|
83
67
|
focusKey: "sl-pause-ad-play",
|
|
84
68
|
onEnterRelease: l,
|
|
85
69
|
isFocusBoundary: !0,
|
|
86
70
|
forceFocus: !0
|
|
87
71
|
});
|
|
88
|
-
return
|
|
72
|
+
return i(() => () => {
|
|
89
73
|
e.revalidate();
|
|
90
|
-
}, [e]),
|
|
91
|
-
|
|
92
|
-
}, [
|
|
74
|
+
}, [e]), i(() => {
|
|
75
|
+
t.current && y();
|
|
76
|
+
}, [t, y]), i(() => {
|
|
93
77
|
if (!u)
|
|
94
78
|
return () => {
|
|
95
79
|
};
|
|
96
|
-
const
|
|
97
|
-
const s =
|
|
80
|
+
const b = (f) => {
|
|
81
|
+
const s = f.keyCode;
|
|
98
82
|
if (s === 461 || s === 10009 || s === 27 || s === 8) {
|
|
99
|
-
|
|
83
|
+
f.preventDefault(), f.stopPropagation(), f.stopImmediatePropagation(), u();
|
|
100
84
|
return;
|
|
101
85
|
}
|
|
102
86
|
};
|
|
103
|
-
return window.addEventListener("keydown",
|
|
104
|
-
}, [u]), /* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
|
|
107
|
-
/* @__PURE__ */ r(H, { children: f })
|
|
108
|
-
] }),
|
|
109
|
-
b && /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(
|
|
110
|
-
Q,
|
|
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,
|
|
111
91
|
{
|
|
112
|
-
ref:
|
|
92
|
+
ref: t,
|
|
113
93
|
onClick: l,
|
|
114
|
-
onMouseEnter: () =>
|
|
94
|
+
onMouseEnter: () => t.current.focus(),
|
|
115
95
|
"aria-label": "Resume playback"
|
|
116
96
|
}
|
|
117
97
|
) }),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
t && /* @__PURE__ */ r(re, { content: a, isDesktop: n, vastUrl: t }),
|
|
120
|
-
/* @__PURE__ */ r(ee, { children: "ADVERTISEMENT" })
|
|
121
|
-
] }) })
|
|
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 }) }) })
|
|
122
99
|
] }) });
|
|
123
|
-
},
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
const [
|
|
127
|
-
refetchInterval:
|
|
128
|
-
$enabled:
|
|
129
|
-
prefetch:
|
|
130
|
-
}),
|
|
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(() => {
|
|
131
108
|
if (l) {
|
|
132
|
-
|
|
133
|
-
const o =
|
|
134
|
-
|
|
109
|
+
I.current = A.current;
|
|
110
|
+
const o = p.get().data;
|
|
111
|
+
k.emit("exposedPauseAd", {
|
|
135
112
|
action: "closed",
|
|
136
|
-
payload: o?.url ===
|
|
113
|
+
payload: o?.url === I.current ? {
|
|
137
114
|
id: o?.id,
|
|
138
115
|
parentId: o?.parentId
|
|
139
116
|
} : {}
|
|
140
117
|
}), l();
|
|
141
118
|
}
|
|
142
|
-
}, [l,
|
|
143
|
-
|
|
144
|
-
}, [
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
}, [
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
const o =
|
|
151
|
-
|
|
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", {
|
|
152
129
|
action: "enabled",
|
|
153
|
-
payload: o?.url ===
|
|
130
|
+
payload: o?.url === S.current ? {
|
|
154
131
|
id: o?.id,
|
|
155
132
|
parentId: o?.parentId
|
|
156
133
|
} : {}
|
|
157
134
|
});
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
(!
|
|
161
|
-
|
|
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();
|
|
162
139
|
}, 200)));
|
|
163
140
|
};
|
|
164
141
|
clearTimeout(s.current), s.current = setTimeout(() => {
|
|
165
|
-
|
|
166
|
-
},
|
|
142
|
+
T();
|
|
143
|
+
}, r);
|
|
167
144
|
} else {
|
|
168
|
-
if (
|
|
169
|
-
const o =
|
|
170
|
-
|
|
145
|
+
if (I.current !== A.current) {
|
|
146
|
+
const o = p.get().data;
|
|
147
|
+
I.current = "", S.current !== "" && (k.emit("exposedPauseAd", {
|
|
171
148
|
action: "disabled",
|
|
172
|
-
payload:
|
|
149
|
+
payload: S.current === o?.url ? {
|
|
173
150
|
id: o?.id,
|
|
174
151
|
parentId: o?.parentId
|
|
175
152
|
} : {}
|
|
176
|
-
}),
|
|
153
|
+
}), S.current = "");
|
|
177
154
|
}
|
|
178
|
-
|
|
179
|
-
|
|
155
|
+
f(!0), s.current = setTimeout(() => {
|
|
156
|
+
y(!1);
|
|
180
157
|
}, 400);
|
|
181
158
|
}
|
|
182
159
|
return () => {
|
|
183
160
|
s.current && clearTimeout(s.current);
|
|
184
161
|
};
|
|
185
|
-
}, [
|
|
186
|
-
u?.({ rendered:
|
|
187
|
-
}, [
|
|
162
|
+
}, [p, C, r, d, P]), i(() => {
|
|
163
|
+
u?.({ rendered: t });
|
|
164
|
+
}, [t, u]), i(() => () => {
|
|
188
165
|
u?.({ rendered: !1 });
|
|
189
|
-
}, [u]), !
|
|
190
|
-
|
|
166
|
+
}, [u]), !t || !x.data ? null : /* @__PURE__ */ a(
|
|
167
|
+
W,
|
|
191
168
|
{
|
|
192
|
-
onClose:
|
|
193
|
-
isClosing:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
externalPauseAdStore: m,
|
|
201
|
-
content: k.data
|
|
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
|
|
202
177
|
}
|
|
203
178
|
);
|
|
204
|
-
},
|
|
205
|
-
showPauseAd:
|
|
206
|
-
pauseAdVastUrl:
|
|
179
|
+
}, Z = ({
|
|
180
|
+
showPauseAd: d,
|
|
181
|
+
pauseAdVastUrl: n,
|
|
207
182
|
videoPlayerController: e,
|
|
208
|
-
onRenderPauseAd:
|
|
209
|
-
onClosePauseAd:
|
|
210
|
-
children:
|
|
211
|
-
options:
|
|
183
|
+
onRenderPauseAd: l,
|
|
184
|
+
onClosePauseAd: u,
|
|
185
|
+
children: c,
|
|
186
|
+
options: v
|
|
212
187
|
}) => {
|
|
213
|
-
const
|
|
214
|
-
return
|
|
215
|
-
|
|
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);
|
|
216
191
|
}) : () => {
|
|
217
|
-
}, [
|
|
218
|
-
|
|
192
|
+
}, [r, e]), r ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ B(
|
|
193
|
+
F,
|
|
219
194
|
{
|
|
220
|
-
style:
|
|
221
|
-
customTheme:
|
|
222
|
-
themeMode:
|
|
195
|
+
style: c ? { position: "relative" } : {},
|
|
196
|
+
customTheme: m.theme,
|
|
197
|
+
themeMode: m.themeMode,
|
|
223
198
|
children: [
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
199
|
+
c,
|
|
200
|
+
n && /* @__PURE__ */ a(
|
|
201
|
+
X,
|
|
227
202
|
{
|
|
228
|
-
sdk:
|
|
229
|
-
showPauseAd:
|
|
230
|
-
vastUrls:
|
|
231
|
-
onClose:
|
|
232
|
-
onRender:
|
|
233
|
-
options:
|
|
203
|
+
sdk: r,
|
|
204
|
+
showPauseAd: d,
|
|
205
|
+
vastUrls: n,
|
|
206
|
+
onClose: u,
|
|
207
|
+
onRender: l,
|
|
208
|
+
options: v,
|
|
234
209
|
isDesktop: !0
|
|
235
210
|
}
|
|
236
211
|
)
|
|
237
212
|
]
|
|
238
213
|
}
|
|
239
|
-
) }) :
|
|
214
|
+
) }) : c;
|
|
240
215
|
};
|
|
241
|
-
class
|
|
242
|
-
constructor(
|
|
243
|
-
super(
|
|
216
|
+
class oe extends M {
|
|
217
|
+
constructor(n) {
|
|
218
|
+
super(n), this.state = { hasError: !1 };
|
|
244
219
|
}
|
|
245
220
|
static getDerivedStateFromError() {
|
|
246
221
|
return { hasError: !0 };
|
|
247
222
|
}
|
|
248
|
-
componentDidCatch(
|
|
249
|
-
console.error(
|
|
223
|
+
componentDidCatch(n, e) {
|
|
224
|
+
console.error(n, e.componentStack);
|
|
250
225
|
}
|
|
251
226
|
render() {
|
|
252
|
-
return this.state.hasError ? this.props.children : /* @__PURE__ */
|
|
227
|
+
return this.state.hasError ? this.props.children : /* @__PURE__ */ a(Z, { ...this.props });
|
|
253
228
|
}
|
|
254
229
|
}
|
|
255
230
|
export {
|
|
256
|
-
|
|
231
|
+
oe as StreamLayerPauseAd
|
|
257
232
|
};
|
package/lib/es/points.js
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { h as c } from "./
|
|
1
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { h as c } from "./index6.js";
|
|
3
3
|
import { useState as u, useEffect as d } from "react";
|
|
4
|
-
import { s as
|
|
4
|
+
import { s as o, u as f, F as m } from "./feature.js";
|
|
5
5
|
import { e as n } from "./index3.js";
|
|
6
|
-
import { p as h } from "./
|
|
6
|
+
import { p as h } from "./index11.js";
|
|
7
7
|
import { m as y } from "./theme.js";
|
|
8
|
-
import { B as S } from "./
|
|
9
|
-
import { F as p } from "./feature.js";
|
|
8
|
+
import { B as S } from "./index7.js";
|
|
10
9
|
import { S as v } from "./useStreamLayerApp2.js";
|
|
11
10
|
import { Y as g, _ as A } from "./hooks-n9ax4LRT.js";
|
|
12
|
-
const I = /* @__PURE__ */
|
|
11
|
+
const I = /* @__PURE__ */ o("div")({
|
|
13
12
|
name: "PointsContainer",
|
|
14
13
|
class: "psiob9b",
|
|
15
14
|
propsAsIs: !1
|
|
16
|
-
}), P = /* @__PURE__ */
|
|
15
|
+
}), P = /* @__PURE__ */ o("div")({
|
|
17
16
|
name: "PointsIcon",
|
|
18
17
|
class: "p1gqe4lh",
|
|
19
18
|
propsAsIs: !1
|
|
20
|
-
}), b = () => S, k = /* @__PURE__ */
|
|
19
|
+
}), b = () => S, k = /* @__PURE__ */ o(b())({
|
|
21
20
|
name: "PointsSvg",
|
|
22
21
|
class: "p15syg2y",
|
|
23
22
|
propsAsIs: !0
|
|
24
|
-
}), F = /* @__PURE__ */
|
|
23
|
+
}), F = /* @__PURE__ */ o("div")({
|
|
25
24
|
name: "PointsBody",
|
|
26
25
|
class: "p12n4f2h",
|
|
27
26
|
propsAsIs: !1
|
|
28
|
-
}), T = /* @__PURE__ */
|
|
27
|
+
}), T = /* @__PURE__ */ o("div")({
|
|
29
28
|
name: "PointsTitle",
|
|
30
29
|
class: "poqmx89",
|
|
31
30
|
propsAsIs: !1
|
|
32
|
-
}), x = /* @__PURE__ */
|
|
31
|
+
}), x = /* @__PURE__ */ o("div")({
|
|
33
32
|
name: "PointsValue",
|
|
34
33
|
class: "prj9b3v",
|
|
35
34
|
propsAsIs: !1
|
|
36
|
-
}), B = ({ points: s, onClick: e }) => /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
35
|
+
}), B = ({ points: s, onClick: e }) => /* @__PURE__ */ p(I, { className: y, onClick: e, children: [
|
|
36
|
+
/* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { name: "icon-trophy-solid" }) }),
|
|
37
|
+
/* @__PURE__ */ p(F, { children: [
|
|
38
|
+
/* @__PURE__ */ t(T, { children: "Total points" }),
|
|
39
|
+
/* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(h, { value: s }) })
|
|
41
40
|
] })
|
|
42
41
|
] }), C = ({ gamification: s }) => {
|
|
43
42
|
const e = s.userSummary.$store, [a, l] = u(0);
|
|
@@ -48,15 +47,15 @@ const I = /* @__PURE__ */ t("div")({
|
|
|
48
47
|
return () => {
|
|
49
48
|
r();
|
|
50
49
|
};
|
|
51
|
-
}, [e]), /* @__PURE__ */
|
|
50
|
+
}, [e]), /* @__PURE__ */ t(B, { points: a, onClick: () => {
|
|
52
51
|
const r = s.status.get();
|
|
53
|
-
r ===
|
|
52
|
+
r === m.Suspended ? (s.openFeature(), n.emit("app", {
|
|
54
53
|
action: "open",
|
|
55
54
|
payload: {}
|
|
56
55
|
}), n.emit("interactions", {
|
|
57
56
|
action: "tap",
|
|
58
57
|
payload: {}
|
|
59
|
-
})) : r ===
|
|
58
|
+
})) : r === m.Ready && (s.closeFeature(!1), n.emit("app", {
|
|
60
59
|
action: "close",
|
|
61
60
|
payload: {}
|
|
62
61
|
}), n.emit("interactions", {
|
|
@@ -68,11 +67,11 @@ const I = /* @__PURE__ */ t("div")({
|
|
|
68
67
|
if (!f(s.featuresList.getStore()))
|
|
69
68
|
return null;
|
|
70
69
|
const e = s.getFeature(v.GAMES);
|
|
71
|
-
return e ? /* @__PURE__ */
|
|
72
|
-
},
|
|
70
|
+
return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
|
|
71
|
+
}, O = ({ theme: s }) => {
|
|
73
72
|
const e = g(), a = A();
|
|
74
|
-
return e ? /* @__PURE__ */
|
|
73
|
+
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(c, { customTheme: s ?? a.theme, themeMode: a.themeMode, children: /* @__PURE__ */ t($, { sdk: e }) }) }) : null;
|
|
75
74
|
};
|
|
76
75
|
export {
|
|
77
|
-
|
|
76
|
+
O as StreamLayerSDKPoints
|
|
78
77
|
};
|