@streamlayer/react 1.23.1 → 1.24.0
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 +0 -1
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +33 -53
- 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 -1
- package/lib/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/cjs/index-ByUNFvMk.js +5 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -1
- package/lib/cjs/index11.js +1 -4
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -1
- package/lib/cjs/index14.js +4 -1
- package/lib/cjs/index15.js +1 -1
- package/lib/cjs/index16.js +2 -2
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index4.js +3 -3
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +7 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +5 -10
- 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 +4 -9
- package/lib/cjs/sl-types.js +1 -15
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/theme.js +1 -17
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/cjs/utils.js +8 -8
- package/lib/classic/app/masters.d.ts +0 -1
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +33 -53
- 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 -1
- package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/classic/cjs/index-ByUNFvMk.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 +3 -3
- 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 -1
- package/lib/classic/cjs/index7.js +7 -1
- package/lib/classic/cjs/index8.js +1 -1
- 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 +4 -9
- package/lib/classic/cjs/sl-types.js +1 -15
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/cjs/utils.js +8 -8
- package/lib/classic/es/Question.js +216 -220
- package/lib/classic/es/advertisement.js +14665 -15122
- package/lib/classic/es/analytics.js +9 -9
- package/lib/classic/es/auth.js +1 -1
- package/lib/classic/es/bet-pack.js +637 -650
- package/lib/classic/es/feature.js +29 -33
- package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
- package/lib/classic/es/index-ByUNFvMk.js +3775 -0
- package/lib/classic/es/index.js +13 -16
- package/lib/classic/es/index10.js +2587 -82
- package/lib/classic/es/index11.js +306 -2344
- package/lib/classic/es/index12.js +103 -101
- package/lib/classic/es/index13.js +449 -464
- package/lib/classic/es/index2.js +1244 -1268
- package/lib/classic/es/index3.js +10 -10
- package/lib/classic/es/index4.js +4 -283
- package/lib/classic/es/index5.js +4 -5
- package/lib/classic/es/index6.js +285 -5
- package/lib/classic/es/index7.js +179 -5
- package/lib/classic/es/index8.js +5 -9
- package/lib/classic/es/index9.js +7 -315
- package/lib/classic/es/insight.js +39 -41
- package/lib/classic/es/notification.js +3 -3
- package/lib/classic/es/notification2.js +513 -528
- package/lib/classic/es/pause-ad.js +116 -116
- package/lib/classic/es/points.js +33 -34
- package/lib/classic/es/polymarket.js +1049 -1102
- package/lib/classic/es/sl-types.js +115 -217
- package/lib/classic/es/useStreamLayerApp.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +6485 -6405
- package/lib/classic/es/utils.js +6 -6
- package/lib/classic/source.css +110 -0
- package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +34 -42
- package/lib/dist/es/index-ByUNFvMk.js +3775 -0
- package/lib/dist/es/index.js +7 -11
- package/lib/dist/es/masters.js +13506 -12760
- package/lib/dist/index.d.ts +5 -5
- package/lib/dist/source.css +64 -0
- package/lib/es/Question.js +99 -101
- package/lib/es/advertisement.js +14665 -15122
- package/lib/es/analytics.js +29 -29
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +12 -11
- package/lib/es/feature.js +29 -33
- package/lib/es/hooks-n9ax4LRT.js +97 -0
- package/lib/es/index-ByUNFvMk.js +3775 -0
- package/lib/es/index.js +13 -16
- package/lib/es/index10.js +7 -263
- package/lib/es/index11.js +172 -822
- package/lib/es/index12.js +2587 -178
- package/lib/es/index13.js +248 -302
- package/lib/es/index14.js +815 -82
- package/lib/es/index15.js +306 -2344
- package/lib/es/index16.js +451 -454
- package/lib/es/index2.js +737 -757
- package/lib/es/index4.js +626 -639
- package/lib/es/index5.js +10 -10
- package/lib/es/index6.js +5 -285
- package/lib/es/index7.js +7 -5
- package/lib/es/index8.js +283 -5
- package/lib/es/index9.js +179 -8
- package/lib/es/insight.js +39 -41
- package/lib/es/masters.js +4 -5
- package/lib/es/masters2.js +408 -441
- package/lib/es/notification.js +469 -484
- package/lib/es/pause-ad.js +116 -116
- package/lib/es/points.js +42 -43
- package/lib/es/polymarket.js +1049 -1102
- package/lib/es/sl-types.js +114 -235
- package/lib/es/storage.js +22 -22
- package/lib/es/theme.js +3 -44
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +6485 -6405
- package/lib/es/utils.js +6 -6
- package/lib/source.css +120 -0
- package/lib/style.css +1 -1
- package/package.json +15 -15
- package/lib/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/cjs/index-eShKGO10.js +0 -5
- package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/classic/cjs/index-eShKGO10.js +0 -5
- package/lib/classic/es/hooks-WfHlJH12.js +0 -98
- package/lib/classic/es/index-eShKGO10.js +0 -3757
- package/lib/dist/cjs/index-eShKGO10.js +0 -5
- package/lib/dist/es/index-eShKGO10.js +0 -3757
- package/lib/dist/style.css +0 -1
- package/lib/es/hooks-WfHlJH12.js +0 -98
- package/lib/es/index-eShKGO10.js +0 -3757
package/lib/classic/es/index7.js
CHANGED
|
@@ -1,7 +1,181 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { jsx as F } from "react/jsx-runtime";
|
|
2
|
+
import { d as n } from "./index10.js";
|
|
3
|
+
import { useEffect as D, useState as S, useCallback as C } from "react";
|
|
4
|
+
import { s as I } from "./sl-types.js";
|
|
5
|
+
import { CountdownCircleTimer as t } from "react-countdown-circle-timer";
|
|
6
|
+
import { B as a } from "./index6.js";
|
|
7
|
+
const f = {
|
|
8
|
+
BLUE_QUESTION_ACTION_BTN: "#1589ee",
|
|
9
|
+
WHITE: "#FFFFFF",
|
|
10
|
+
BLUE: "#2d6ffd",
|
|
11
|
+
GREY_PRIMARY: "#909395",
|
|
12
|
+
GREY_PRIMARY_ONBOARDING_INAPP: "#B5B7B8",
|
|
13
|
+
PRIMARY_1: "#1D7BFF",
|
|
14
|
+
// main
|
|
15
|
+
PRIMARY_2: "#095CD1",
|
|
16
|
+
// hover, active, ...etc (darken 10%)
|
|
17
|
+
PRIMARY_TEXT: "#090E13",
|
|
18
|
+
SECONDARY_TEXT: "rgba(10, 14, 19, 0.70)",
|
|
19
|
+
QUESTION_TYPE_ICON: "#1D7BFF",
|
|
20
|
+
QUESTION_BODY_TEXT: "#090E13",
|
|
21
|
+
PRESENTED_BY_TEXT: "#090E13",
|
|
22
|
+
SUCCESS: "#107D57",
|
|
23
|
+
UNSUCCESS: "#DF2F3B",
|
|
24
|
+
SECONDARY_RED1: "#DF2F3B",
|
|
25
|
+
NEUTRALS_WHITE: "#FFFFFF",
|
|
26
|
+
NEUTRALS_WHITE1: "#FFFFFF",
|
|
27
|
+
NEUTRALS_GRAY1: "#F7F7F7",
|
|
28
|
+
NEUTRALS_GRAY2: "#F2F2F1",
|
|
29
|
+
NEUTRALS_GRAY3: "#E8E8E8",
|
|
30
|
+
NEUTRALS_GRAY4: "#D9D9D6",
|
|
31
|
+
NEUTRALS_GRAY5: "#B1B3B3",
|
|
32
|
+
NEUTRALS_GRAY6: "#888B8D",
|
|
33
|
+
NEUTRALS_GRAY7: "#6B6F73",
|
|
34
|
+
NEUTRALS_GRAY9: "#25282A",
|
|
35
|
+
SDK_CONTAINER_BG: "#F7F7F7",
|
|
36
|
+
SDK_WHITE_CONTAINER_BG: "#fff",
|
|
37
|
+
SDK_DARK_CONTAINER_BG: "#fff",
|
|
38
|
+
SDK_PREDICTION_RESULT_SUCCESS_BG: "#fff",
|
|
39
|
+
SDK_PREDICTION_RESULT_INCORRECT_BG: "#fff",
|
|
40
|
+
SDK_PREDICTION_RESULT_SUCCESS_TEXT: "#107D57",
|
|
41
|
+
SDK_PREDICTION_RESULT_ERROR_TITLE: "#090E13",
|
|
42
|
+
SDK_PREDICTION_RESULT_ERROR_SUBTITLE: "#DF2F3B",
|
|
43
|
+
SDK_PREDICTION_RESULT_CLOSE_ICON: "#6B6F73",
|
|
44
|
+
SDK_PREDICTION_FEEDBACK_SUCCESS_ICON: "#107D57",
|
|
45
|
+
SDK_PREDICTION_FEEDBACK_INCORRECT_RECT1: "#CD2525",
|
|
46
|
+
SDK_PREDICTION_FEEDBACK_INCORRECT_RECT2: "#fff",
|
|
47
|
+
PREDICTION_BG_LINES_CORRECT: "#01AB58",
|
|
48
|
+
PREDICTION_BG_LINES_INCORRECT: "#888B8D",
|
|
49
|
+
SKELETON_COLOR_1: "#f1efef",
|
|
50
|
+
SKELETON_COLOR_2: "#f9f8f8",
|
|
51
|
+
TABS_CONTAINER_BG: "#F2F2F1",
|
|
52
|
+
TABS_ACTIVE_BG: "#FFFFFF",
|
|
53
|
+
TABS_COLOR: "#6B6F73",
|
|
54
|
+
TABS_ACTIVE_COLOR: "#1D7BFF",
|
|
55
|
+
CARD_BG: "#FFFFFF",
|
|
56
|
+
CARD_BORDER: "#fff",
|
|
57
|
+
BORDER: "#E8E8E8",
|
|
58
|
+
VOTE_BTN_BG: "#F7F7F7",
|
|
59
|
+
VOTE_BTN_BORDER: "rgb(232, 232, 232)",
|
|
60
|
+
VOTE_BTN_DISABLED_BORDER: "#B1B3B3",
|
|
61
|
+
VOTE_BTN_SELECTED_BORDER: "#25282A",
|
|
62
|
+
VOTE_BTN_NOT_SELECTED_BORDER: "#E8E8E8",
|
|
63
|
+
VOTE_BTN_SELECTED_BG: "#FFFFFF",
|
|
64
|
+
VOTE_BTN_SELECTED_BG_AD_UNIT: "#FFFFFF",
|
|
65
|
+
VOTE_BTN_NOT_SELECTED_BG: "#FFFFFF",
|
|
66
|
+
VOTE_BTN_NOT_SELECTED_BG_UNSET: "rgb(196, 196, 196)",
|
|
67
|
+
VOTED_ANSWER_BG: "#FFFFFF",
|
|
68
|
+
VOTED_BTN_RCT_BG: "#2d5694",
|
|
69
|
+
IN_APP_BG: "rgba(255, 255, 255, 0.90)",
|
|
70
|
+
IN_APP_QUESTION_TYPE_ICON: "#1D7BFF",
|
|
71
|
+
IN_APP_QUESTION_TYPE_LABEL: "#82899E",
|
|
72
|
+
IN_APP_QUESTION_QUOTE: "rgba(10, 14, 19, 0.70)",
|
|
73
|
+
IN_APP_QUESTION_RESULT_SUBTITLE_BG: "#1D7BFF",
|
|
74
|
+
IN_APP_QUESTION_RESULT_LINE: "#babfc5",
|
|
75
|
+
QUOTE_BORDER: "#E8E8E8",
|
|
76
|
+
QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
|
|
77
|
+
}, c = {
|
|
78
|
+
BG_PRIMARY: "#13212b",
|
|
79
|
+
BG_SECONDARY: "#152430",
|
|
80
|
+
BG_SECONDARY1: "#435059",
|
|
81
|
+
BORDER_PRIMARY: "rgba(255, 255, 255, 0.1)",
|
|
82
|
+
TEXT_PRIMARY: "#f9f9f9",
|
|
83
|
+
TEXT_PRIMARY1: "#f9f9f9",
|
|
84
|
+
TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
|
|
85
|
+
TEXT_SECONDARY1: "#878787",
|
|
86
|
+
WHITE: "#fff"
|
|
87
|
+
}, l = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], L = "#cee5de", P = "#f9d6d8", U = "#E8E8E8", x = {
|
|
88
|
+
xs: 324,
|
|
89
|
+
sm: 576,
|
|
90
|
+
md: 768,
|
|
91
|
+
lg: 992,
|
|
92
|
+
xl: 1200,
|
|
93
|
+
xxl: 1440
|
|
94
|
+
};
|
|
95
|
+
Object.entries(f).reduce((_, [E, T]) => `
|
|
96
|
+
${_}
|
|
97
|
+
--color-${E.toLowerCase().replaceAll("_", "-")}: ${T};
|
|
98
|
+
`, "");
|
|
99
|
+
Object.entries(c).reduce((_, [E, T]) => `
|
|
100
|
+
${_}
|
|
101
|
+
--color-adv-${E.toLowerCase().replaceAll("_", "-")}: ${T};
|
|
102
|
+
`, "");
|
|
103
|
+
const d = (_) => {
|
|
104
|
+
const { Component: E, options: T, customOptions: e, autoFocus: R, ...O } = _, N = n.useFocusable({
|
|
105
|
+
...T,
|
|
106
|
+
...e,
|
|
107
|
+
onEnterPress: () => _.onClick?.({ currentTarget: N.ref.current, stopPropagation: () => {
|
|
108
|
+
} })
|
|
109
|
+
});
|
|
110
|
+
return D(() => {
|
|
111
|
+
R && N.focusSelf();
|
|
112
|
+
}, []), /* @__PURE__ */ F(E, { ...O, ...N, "data-is-with-focus": "true" });
|
|
113
|
+
};
|
|
114
|
+
function Q(_, E) {
|
|
115
|
+
return ({ webos: T, options: e, ...R }) => T ? /* @__PURE__ */ F(d, { Component: _, options: E, customOptions: e, ...R }) : /* @__PURE__ */ F(_, { ...R });
|
|
116
|
+
}
|
|
117
|
+
const m = [10, 10, 1, 0], G = /* @__PURE__ */ I("div")({
|
|
118
|
+
name: "RemainingTimeCircle",
|
|
119
|
+
class: "r165427",
|
|
120
|
+
propsAsIs: !1
|
|
121
|
+
}), p = /* @__PURE__ */ I("div")({
|
|
122
|
+
name: "RemainingTime",
|
|
123
|
+
class: "r17garf3",
|
|
124
|
+
propsAsIs: !1
|
|
125
|
+
}), Y = L, B = P, o = U, X = ({
|
|
126
|
+
className: _,
|
|
127
|
+
duration: E = 30,
|
|
128
|
+
onTimerExpired: T,
|
|
129
|
+
isPlaying: e = !0
|
|
130
|
+
}) => /* @__PURE__ */ F(t, {
|
|
131
|
+
isPlaying: e,
|
|
132
|
+
strokeWidth: 0,
|
|
133
|
+
duration: E,
|
|
134
|
+
colors: B,
|
|
135
|
+
size: 24,
|
|
136
|
+
onComplete: T,
|
|
137
|
+
children: ({
|
|
138
|
+
remainingTime: R
|
|
139
|
+
}) => /* @__PURE__ */ F(p, {
|
|
140
|
+
className: _,
|
|
141
|
+
children: E === 0 ? 0 : R
|
|
142
|
+
})
|
|
143
|
+
}), M = ({
|
|
144
|
+
isPlaying: _ = !0,
|
|
145
|
+
duration: E = 30,
|
|
146
|
+
onTimerExpired: T
|
|
147
|
+
}) => {
|
|
148
|
+
const [e, R] = S(E > 10 ? Y : B), [O, N] = S(2);
|
|
149
|
+
D(() => {
|
|
150
|
+
E === 0 && (N(0), R(o));
|
|
151
|
+
}, [E]);
|
|
152
|
+
const i = ({
|
|
153
|
+
remainingTime: r
|
|
154
|
+
}) => /* @__PURE__ */ F(G, {
|
|
155
|
+
children: E === 0 ? 0 : r
|
|
156
|
+
}), s = C(() => {
|
|
157
|
+
T?.(), R(o);
|
|
158
|
+
}, [T, R]), A = C((r) => {
|
|
159
|
+
r === 10 && R(B);
|
|
160
|
+
}, [R]);
|
|
161
|
+
return /* @__PURE__ */ F(t, {
|
|
162
|
+
isPlaying: _,
|
|
163
|
+
duration: E,
|
|
164
|
+
colors: l,
|
|
165
|
+
colorsTime: m,
|
|
166
|
+
size: 32,
|
|
167
|
+
strokeWidth: O,
|
|
168
|
+
trailStrokeWidth: 2,
|
|
169
|
+
trailColor: e,
|
|
170
|
+
onComplete: s,
|
|
171
|
+
onUpdate: A,
|
|
172
|
+
children: i
|
|
173
|
+
});
|
|
174
|
+
}, W = ({ height: _ = "37px", width: E = "37px" }) => /* @__PURE__ */ F("div", { style: { height: _, width: E }, children: /* @__PURE__ */ F(a, { name: "loader" }) });
|
|
4
175
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
176
|
+
x as A,
|
|
177
|
+
X as G,
|
|
178
|
+
M as L,
|
|
179
|
+
Q as b,
|
|
180
|
+
W as d
|
|
7
181
|
};
|
package/lib/classic/es/index8.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
const l = /* @__PURE__ */
|
|
4
|
-
name: "Container",
|
|
5
|
-
class: "cqg02m",
|
|
6
|
-
propsAsIs: !1
|
|
7
|
-
}), a = ({ children: s, style: e, loading: o }) => o ? /* @__PURE__ */ t(l, { style: e, children: s }) : s;
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { c as a } from "./sl-types.js";
|
|
3
|
+
const l = "StreamLayerCSSReset", c = "ttkj0ah", d = ({ children: t, customTheme: m, themeMode: r, style: s }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a(c, r, m), style: s, children: t }) });
|
|
8
4
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
d as h,
|
|
6
|
+
l as m
|
|
11
7
|
};
|
package/lib/classic/es/index9.js
CHANGED
|
@@ -1,319 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as
|
|
3
|
-
|
|
4
|
-
import { B as f } from "./index4.js";
|
|
5
|
-
import { G as ie, d as ue, O as de } from "./index10.js";
|
|
6
|
-
import { C as pe } from "./useStreamLayerApp2.js";
|
|
7
|
-
const me = /* @__PURE__ */ o("div")({
|
|
8
|
-
name: "CloseIconWrap",
|
|
9
|
-
class: "c3v6bv6",
|
|
10
|
-
propsAsIs: !1
|
|
11
|
-
}), ye = /* @__PURE__ */ o("div")({
|
|
12
|
-
name: "TimerWrap",
|
|
13
|
-
class: "teuhmro",
|
|
14
|
-
propsAsIs: !1
|
|
15
|
-
}), he = () => f, fe = /* @__PURE__ */ o(he())({
|
|
16
|
-
name: "Icon",
|
|
17
|
-
class: "i17rfxv5",
|
|
18
|
-
propsAsIs: !0
|
|
19
|
-
}), Ye = ({
|
|
20
|
-
close: n,
|
|
21
|
-
className: a,
|
|
22
|
-
timerClassName: s,
|
|
23
|
-
skipIcon: l,
|
|
24
|
-
isPlaying: u = !0,
|
|
25
|
-
duration: i = 0,
|
|
26
|
-
autoClose: d
|
|
27
|
-
}) => {
|
|
28
|
-
const [p, m] = I(i === 0);
|
|
29
|
-
b(() => {
|
|
30
|
-
m(!i);
|
|
31
|
-
}, [i]);
|
|
32
|
-
const P = w(() => {
|
|
33
|
-
d === pe.ENABLED ? n == null || n() : m(!0);
|
|
34
|
-
}, [d, n]);
|
|
35
|
-
return p ? /* @__PURE__ */ S(me, {
|
|
36
|
-
"data-a": "intr",
|
|
37
|
-
onClick: n,
|
|
38
|
-
className: a,
|
|
39
|
-
style: l ? {
|
|
40
|
-
width: "auto"
|
|
41
|
-
} : {},
|
|
42
|
-
children: [l && /* @__PURE__ */ e("span", {
|
|
43
|
-
"data-a": "intr",
|
|
44
|
-
children: "Skip"
|
|
45
|
-
}), /* @__PURE__ */ e(fe, {
|
|
46
|
-
"data-a": "intr",
|
|
47
|
-
name: l ? "iconSkip" : "icon-cross"
|
|
48
|
-
})]
|
|
49
|
-
}) : /* @__PURE__ */ e(ye, {
|
|
50
|
-
children: /* @__PURE__ */ e(ie, {
|
|
51
|
-
className: s,
|
|
52
|
-
isPlaying: u,
|
|
53
|
-
duration: i,
|
|
54
|
-
onTimerExpired: P
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}, ge = /* @__PURE__ */ o("div")({
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s as l } from "./sl-types.js";
|
|
3
|
+
const i = /* @__PURE__ */ l("div")({
|
|
58
4
|
name: "Container",
|
|
59
|
-
class: "
|
|
60
|
-
propsAsIs: !1
|
|
61
|
-
}), Ie = /* @__PURE__ */ o("video")({
|
|
62
|
-
name: "Player",
|
|
63
|
-
class: "p6703cq",
|
|
64
|
-
propsAsIs: !1
|
|
65
|
-
}), be = /* @__PURE__ */ o("img")({
|
|
66
|
-
name: "Poster",
|
|
67
|
-
class: "p12ow7zo",
|
|
68
|
-
propsAsIs: !1
|
|
69
|
-
}), R = /* @__PURE__ */ o("div")({
|
|
70
|
-
name: "Control",
|
|
71
|
-
class: "cdpal9o",
|
|
5
|
+
class: "cqg02m",
|
|
72
6
|
propsAsIs: !1
|
|
73
|
-
}),
|
|
74
|
-
name: "VideoControls",
|
|
75
|
-
class: "vxo8xch",
|
|
76
|
-
propsAsIs: !1
|
|
77
|
-
}), $ = /* @__PURE__ */ o("button")({
|
|
78
|
-
name: "ControlBtn",
|
|
79
|
-
class: "coyuzu0",
|
|
80
|
-
propsAsIs: !1
|
|
81
|
-
}), Ce = () => $, we = /* @__PURE__ */ o(Ce())({
|
|
82
|
-
name: "MuteIcon",
|
|
83
|
-
class: "musmi9a",
|
|
84
|
-
propsAsIs: !0
|
|
85
|
-
}), Me = () => $, ke = /* @__PURE__ */ o(Me())({
|
|
86
|
-
name: "PauseIcon",
|
|
87
|
-
class: "p1qe7rum",
|
|
88
|
-
propsAsIs: !0
|
|
89
|
-
}), Ee = () => $, xe = /* @__PURE__ */ o(Ee())({
|
|
90
|
-
name: "PlayIcon",
|
|
91
|
-
class: "psevery",
|
|
92
|
-
propsAsIs: !0
|
|
93
|
-
}), Y = /* @__PURE__ */ o("button")({
|
|
94
|
-
name: "WebOSIconButton",
|
|
95
|
-
class: "w1q3u7py",
|
|
96
|
-
propsAsIs: !1
|
|
97
|
-
}), Be = () => Y, T = /* @__PURE__ */ o(Be())({
|
|
98
|
-
name: "WebOSIconButtonAnimation",
|
|
99
|
-
class: "wdlqvum",
|
|
100
|
-
propsAsIs: !0
|
|
101
|
-
}), Oe = () => T, We = /* @__PURE__ */ o(Oe())({
|
|
102
|
-
name: "WebOSIconButtonPlay",
|
|
103
|
-
class: "w1ylz9ea",
|
|
104
|
-
propsAsIs: !0
|
|
105
|
-
}), Ne = () => T, Ve = /* @__PURE__ */ o(Ne())({
|
|
106
|
-
name: "WebOSIconButtonPause",
|
|
107
|
-
class: "w1iylt55",
|
|
108
|
-
propsAsIs: !0
|
|
109
|
-
}), Le = () => T, Re = /* @__PURE__ */ o(Le())({
|
|
110
|
-
name: "WebOSIconButtonMute",
|
|
111
|
-
class: "w8h4h7",
|
|
112
|
-
propsAsIs: !0
|
|
113
|
-
}), Se = () => T, Te = /* @__PURE__ */ o(Se())({
|
|
114
|
-
name: "WebOSIconButtonUnmute",
|
|
115
|
-
class: "w12l12kt",
|
|
116
|
-
propsAsIs: !0
|
|
117
|
-
}), Ue = (n) => {
|
|
118
|
-
for (const a of n)
|
|
119
|
-
a.isIntersecting ? a.target instanceof HTMLVideoElement && a.target.autoplay && a.target.play() : a.target instanceof HTMLVideoElement && !a.target.paused && a.target.pause();
|
|
120
|
-
}, Z = new IntersectionObserver(Ue, { threshold: 0.5 }), D = /* @__PURE__ */ new Set(), je = (n) => {
|
|
121
|
-
Z.observe(n), D.add(n);
|
|
122
|
-
}, qe = (n) => {
|
|
123
|
-
Z.unobserve(n), D.delete(n);
|
|
124
|
-
}, ze = () => {
|
|
125
|
-
for (const n of D)
|
|
126
|
-
n instanceof HTMLVideoElement && !n.paused && n.pause();
|
|
127
|
-
};
|
|
128
|
-
function He(...n) {
|
|
129
|
-
return w(
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
131
|
-
(a) => {
|
|
132
|
-
for (const s of n)
|
|
133
|
-
s !== null && (typeof s == "function" ? s(a) : s && (s.current = a));
|
|
134
|
-
},
|
|
135
|
-
// Re-run the callback if the array of refs changes
|
|
136
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
137
|
-
[...n]
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
const $e = de(ge), De = ({ loading: n, autoPlay: a, played: s, playing: l, isMuted: u, unmute: i, mute: d, togglePlaying: p }) => !n && !a && !s ? /* @__PURE__ */ e(R, { children: l ? /* @__PURE__ */ e(f, { name: "icon-pause" }) : /* @__PURE__ */ e(f, { name: "icon-play" }) }) : s ? /* @__PURE__ */ S(Ae, { children: [
|
|
141
|
-
l ? /* @__PURE__ */ e(ke, { onClick: p }) : /* @__PURE__ */ e(xe, { onClick: p }),
|
|
142
|
-
/* @__PURE__ */ e(we, { className: X(!u && "muted"), onClick: u ? i : d })
|
|
143
|
-
] }) : null, Fe = ({
|
|
144
|
-
loading: n,
|
|
145
|
-
autoPlay: a,
|
|
146
|
-
playMuted: s,
|
|
147
|
-
playing: l,
|
|
148
|
-
played: u,
|
|
149
|
-
unmute: i,
|
|
150
|
-
mute: d,
|
|
151
|
-
isMuted: p,
|
|
152
|
-
hasNotPausedVideo: m,
|
|
153
|
-
hasInteractedWithAudio: P
|
|
154
|
-
}) => /* @__PURE__ */ S(re, { children: [
|
|
155
|
-
!n && !(a && s) && /* @__PURE__ */ e(R, { "data-control-btn": "true", children: l ? m ? null : /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) : u ? /* @__PURE__ */ e(Ve, { children: /* @__PURE__ */ e(f, { name: "icon-pause" }) }) : /* @__PURE__ */ e(Y, { "data-control-icon": "true", children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) }),
|
|
156
|
-
!n && a && s && P && /* @__PURE__ */ e(R, { children: p ? /* @__PURE__ */ e(Re, { onClick: i, children: /* @__PURE__ */ e(f, { name: "iconMute" }) }) : /* @__PURE__ */ e(Te, { onClick: d, children: /* @__PURE__ */ e(f, { name: "iconUnMute" }) }) })
|
|
157
|
-
] }), Ze = ce(
|
|
158
|
-
({
|
|
159
|
-
poster: n,
|
|
160
|
-
source: a,
|
|
161
|
-
aspectRatio: s,
|
|
162
|
-
controlVideo: l,
|
|
163
|
-
onReplay: u,
|
|
164
|
-
onPlay: i,
|
|
165
|
-
onPause: d,
|
|
166
|
-
onEnd: p,
|
|
167
|
-
onRender: m,
|
|
168
|
-
onMute: P,
|
|
169
|
-
onQuartile: v,
|
|
170
|
-
autoPlay: M,
|
|
171
|
-
playMuted: k,
|
|
172
|
-
className: ee,
|
|
173
|
-
muted: E,
|
|
174
|
-
webos: B,
|
|
175
|
-
hasNotPausedVideo: ne
|
|
176
|
-
}, te) => {
|
|
177
|
-
const c = L(null), ae = He(c, te), U = L(!1), j = L(!1), y = L(/* @__PURE__ */ new Set()), [F, G] = I(!1), [O, W] = I(!1), [q, Q] = I(!1), [_, N] = I(!0), [z, V] = I(k), [H, oe] = I(!1);
|
|
178
|
-
b(() => {
|
|
179
|
-
a && (V(k), G(!1));
|
|
180
|
-
}, [a]);
|
|
181
|
-
const A = w(() => {
|
|
182
|
-
l == null || l({ muted: !1 });
|
|
183
|
-
}, [l]), J = w(() => {
|
|
184
|
-
l == null || l({ muted: !0 });
|
|
185
|
-
}, [l]), C = w((t) => {
|
|
186
|
-
t == null || t.stopPropagation(), c.current && (c.current.muted = !0), V(!0);
|
|
187
|
-
}, []), x = w(
|
|
188
|
-
(t) => {
|
|
189
|
-
t == null || t.stopPropagation(), c.current && (c.current.muted = !1), V(!1), H || oe(!0);
|
|
190
|
-
},
|
|
191
|
-
[H]
|
|
192
|
-
);
|
|
193
|
-
b(() => {
|
|
194
|
-
E !== void 0 && (E ? C() : x());
|
|
195
|
-
}, [C, E, x]);
|
|
196
|
-
const K = (t) => {
|
|
197
|
-
var r;
|
|
198
|
-
(r = t.stopPropagation) == null || r.call(t);
|
|
199
|
-
const g = c == null ? void 0 : c.current;
|
|
200
|
-
if (g)
|
|
201
|
-
if (O)
|
|
202
|
-
g.pause();
|
|
203
|
-
else {
|
|
204
|
-
const h = c == null ? void 0 : c.current;
|
|
205
|
-
if (!h)
|
|
206
|
-
return;
|
|
207
|
-
ze(), h.play().catch((le) => console.log(le)), N(!1);
|
|
208
|
-
}
|
|
209
|
-
}, se = () => {
|
|
210
|
-
var t;
|
|
211
|
-
(t = c == null ? void 0 : c.current) == null || t.load(), N(!0);
|
|
212
|
-
};
|
|
213
|
-
return b(() => () => {
|
|
214
|
-
A();
|
|
215
|
-
}, [A]), b(() => {
|
|
216
|
-
const t = c.current;
|
|
217
|
-
return t ? (j.current = t.muted, V(t.muted), je(t), () => {
|
|
218
|
-
qe(t);
|
|
219
|
-
}) : () => {
|
|
220
|
-
};
|
|
221
|
-
}, []), b(() => {
|
|
222
|
-
m == null || m();
|
|
223
|
-
}, [m]), b(() => {
|
|
224
|
-
y.current.clear(), U.current = !1;
|
|
225
|
-
}, [a]), /* @__PURE__ */ S(
|
|
226
|
-
$e,
|
|
227
|
-
{
|
|
228
|
-
webos: B,
|
|
229
|
-
onClick: M && k ? z ? x : C : K,
|
|
230
|
-
"data-a": "intr",
|
|
231
|
-
autoFocus: !0,
|
|
232
|
-
options: { focusKey: "video-play-btn" },
|
|
233
|
-
className: X(O && !B && Pe, M && ve, ee),
|
|
234
|
-
style: s ? { aspectRatio: s } : {},
|
|
235
|
-
children: [
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
-
Ie,
|
|
238
|
-
{
|
|
239
|
-
ref: ae,
|
|
240
|
-
src: a,
|
|
241
|
-
autoPlay: M,
|
|
242
|
-
onPlay: () => {
|
|
243
|
-
G(!0), U.current && (u == null || u(), y.current.clear()), W(!0), N(!1), i == null || i(), k ? C() : J();
|
|
244
|
-
},
|
|
245
|
-
onTimeUpdate: (t) => {
|
|
246
|
-
const r = t.target.duration, g = t.target.currentTime;
|
|
247
|
-
if (r && g) {
|
|
248
|
-
const h = Math.floor(g / r * 100);
|
|
249
|
-
h >= 25 && h < 50 && !y.current.has(25) ? (v == null || v(25), y.current.add(25)) : h >= 50 && h < 75 && !y.current.has(50) ? (v == null || v(50), y.current.add(50)) : h >= 75 && !y.current.has(75) && (v == null || v(75), y.current.add(75));
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
onVolumeChange: (t) => {
|
|
253
|
-
const r = t.target.muted;
|
|
254
|
-
j.current !== r && (P == null || P(r), j.current = r, (r !== E || E === void 0) && (r ? A() : J()));
|
|
255
|
-
},
|
|
256
|
-
onError: async (t) => {
|
|
257
|
-
try {
|
|
258
|
-
if (t.target instanceof HTMLVideoElement) {
|
|
259
|
-
Q(!0);
|
|
260
|
-
const r = await (await fetch(t.target.src)).blob(), g = URL.createObjectURL(r);
|
|
261
|
-
t.target.src = g;
|
|
262
|
-
}
|
|
263
|
-
} catch (r) {
|
|
264
|
-
console.error("video fallback fetch failed", r), W(!0), N(!0);
|
|
265
|
-
} finally {
|
|
266
|
-
Q(!1), A();
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
onPause: () => {
|
|
270
|
-
W(!1), d == null || d(), A();
|
|
271
|
-
},
|
|
272
|
-
onEnded: () => {
|
|
273
|
-
W(!1), U.current = !0, se(), p == null || p(), A();
|
|
274
|
-
},
|
|
275
|
-
style: { visibility: _ ? "hidden" : "visible" },
|
|
276
|
-
controls: !1,
|
|
277
|
-
playsInline: !0
|
|
278
|
-
}
|
|
279
|
-
),
|
|
280
|
-
/* @__PURE__ */ e(be, { src: n, style: { visibility: _ ? "visible" : "hidden" } }),
|
|
281
|
-
!B && /* @__PURE__ */ e(
|
|
282
|
-
De,
|
|
283
|
-
{
|
|
284
|
-
loading: q,
|
|
285
|
-
autoPlay: M,
|
|
286
|
-
played: F,
|
|
287
|
-
playing: O,
|
|
288
|
-
isMuted: z,
|
|
289
|
-
unmute: x,
|
|
290
|
-
mute: C,
|
|
291
|
-
togglePlaying: K
|
|
292
|
-
}
|
|
293
|
-
),
|
|
294
|
-
B && /* @__PURE__ */ e(
|
|
295
|
-
Fe,
|
|
296
|
-
{
|
|
297
|
-
loading: q,
|
|
298
|
-
autoPlay: M,
|
|
299
|
-
playMuted: k,
|
|
300
|
-
playing: O,
|
|
301
|
-
played: F,
|
|
302
|
-
unmute: x,
|
|
303
|
-
mute: C,
|
|
304
|
-
isMuted: z,
|
|
305
|
-
hasNotPausedVideo: ne,
|
|
306
|
-
hasInteractedWithAudio: H
|
|
307
|
-
}
|
|
308
|
-
),
|
|
309
|
-
q && /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(ue, {}) })
|
|
310
|
-
]
|
|
311
|
-
}
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
);
|
|
7
|
+
}), a = ({ children: s, style: e, loading: o }) => o ? /* @__PURE__ */ t(i, { style: e, children: s }) : s;
|
|
315
8
|
export {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
Ye as y
|
|
9
|
+
i as e,
|
|
10
|
+
a as i
|
|
319
11
|
};
|
|
@@ -1,81 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { h as p } from "./
|
|
3
|
-
import { u as
|
|
4
|
-
import { useRef as f, useEffect as
|
|
5
|
-
import {
|
|
6
|
-
import { S } from "./useStreamLayerApp2.js";
|
|
7
|
-
import {
|
|
8
|
-
const y = () =>
|
|
1
|
+
import { jsx as u, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { h as p } from "./index8.js";
|
|
3
|
+
import { u as a, s as h } from "./sl-types.js";
|
|
4
|
+
import { useRef as f, useEffect as l } from "react";
|
|
5
|
+
import { _ as I } from "./Question.js";
|
|
6
|
+
import { S as g } from "./useStreamLayerApp2.js";
|
|
7
|
+
import { Y as S, _ as k, g as Q } from "./hooks-n9ax4LRT.js";
|
|
8
|
+
const y = () => I, A = /* @__PURE__ */ h(y())({
|
|
9
9
|
name: "QuestionWrap",
|
|
10
10
|
class: "q10hhsxv",
|
|
11
11
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
12
|
+
}), b = ({
|
|
13
13
|
gamification: e,
|
|
14
|
-
sdk:
|
|
14
|
+
sdk: o,
|
|
15
15
|
persistent: i,
|
|
16
|
-
skipAutoClose:
|
|
16
|
+
skipAutoClose: n,
|
|
17
17
|
hideHeader: d,
|
|
18
18
|
insightId: t
|
|
19
19
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
s.current === t && ((u = r == null ? void 0 : r.attributes) == null ? void 0 : u.attributes.case) === "insight" && e.openQuestion(t, r);
|
|
20
|
+
const r = f(""), m = a(e.openedQuestion.$store);
|
|
21
|
+
return l(() => t ? (!i || e.isOpenedQuestion(t) || (r.current = t, e.getFeedItem(t).then((s) => {
|
|
22
|
+
r.current === t && s?.attributes?.attributes.case === "insight" && e.openQuestion(t, s);
|
|
24
23
|
})), () => {
|
|
25
|
-
|
|
24
|
+
r.current = "";
|
|
26
25
|
}) : (e.activeQuestionId.subscribe(({
|
|
27
|
-
data:
|
|
26
|
+
data: s
|
|
28
27
|
}) => {
|
|
29
|
-
|
|
30
|
-
r && ((u = r.feedItem) == null ? void 0 : u.type) === "insight" && (!i || e.isOpenedQuestion(r.feedItem.id) || (s.current = r.feedItem.id, e.openQuestion(r.feedItem.id, r.feedItem))), !r && s.current && (e.closeQuestion(s.current), s.current = "");
|
|
28
|
+
s && s.feedItem?.type === "insight" && (!i || e.isOpenedQuestion(s.feedItem.id) || (r.current = s.feedItem.id, e.openQuestion(s.feedItem.id, s.feedItem))), !s && r.current && (e.closeQuestion(r.current), r.current = "");
|
|
31
29
|
}), () => {
|
|
32
|
-
}), [e, i, t]),
|
|
33
|
-
sdk:
|
|
34
|
-
skipAutoClose:
|
|
30
|
+
}), [e, i, t]), m ? /* @__PURE__ */ u(A, {
|
|
31
|
+
sdk: o,
|
|
32
|
+
skipAutoClose: n,
|
|
35
33
|
hideHeader: d,
|
|
36
34
|
gamification: e,
|
|
37
35
|
hideSponsor: !0
|
|
38
36
|
}) : null;
|
|
39
|
-
},
|
|
37
|
+
}, v = ({
|
|
40
38
|
sdk: e,
|
|
41
|
-
persistent:
|
|
39
|
+
persistent: o,
|
|
42
40
|
skipAutoClose: i,
|
|
43
|
-
insightId:
|
|
41
|
+
insightId: n,
|
|
44
42
|
hideHeader: d
|
|
45
43
|
}) => {
|
|
46
|
-
if (!
|
|
44
|
+
if (!a(e.featuresList.getStore()))
|
|
47
45
|
return null;
|
|
48
|
-
const t = e.getFeature(
|
|
49
|
-
return t ? /* @__PURE__ */
|
|
50
|
-
insightId:
|
|
46
|
+
const t = e.getFeature(g.GAMES);
|
|
47
|
+
return t ? /* @__PURE__ */ u(b, {
|
|
48
|
+
insightId: n,
|
|
51
49
|
sdk: e,
|
|
52
|
-
persistent:
|
|
50
|
+
persistent: o,
|
|
53
51
|
hideHeader: d,
|
|
54
52
|
gamification: t,
|
|
55
53
|
skipAutoClose: i
|
|
56
54
|
}) : null;
|
|
57
|
-
},
|
|
55
|
+
}, M = ({
|
|
58
56
|
event: e,
|
|
59
|
-
theme:
|
|
57
|
+
theme: o,
|
|
60
58
|
hideHeader: i,
|
|
61
|
-
skipAutoClose:
|
|
59
|
+
skipAutoClose: n,
|
|
62
60
|
persistent: d
|
|
63
61
|
}) => {
|
|
64
|
-
const t =
|
|
65
|
-
return t ? /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
62
|
+
const t = S(), r = k();
|
|
63
|
+
return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
|
|
64
|
+
/* @__PURE__ */ u(p, { customTheme: o ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ u(
|
|
65
|
+
v,
|
|
68
66
|
{
|
|
69
|
-
skipAutoClose:
|
|
67
|
+
skipAutoClose: n,
|
|
70
68
|
sdk: t,
|
|
71
69
|
hideHeader: i,
|
|
72
70
|
persistent: d
|
|
73
71
|
}
|
|
74
72
|
) }),
|
|
75
|
-
e !== void 0 && /* @__PURE__ */
|
|
73
|
+
e !== void 0 && /* @__PURE__ */ u(Q, { event: e })
|
|
76
74
|
] }) : null;
|
|
77
75
|
};
|
|
78
76
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
M as StreamLayerSDKInsight,
|
|
78
|
+
v as StreamLayerSDKInsightUI
|
|
81
79
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "./
|
|
3
|
-
import { a as e,
|
|
2
|
+
import "./index8.js";
|
|
3
|
+
import { a as e, x as p } from "./notification2.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./hooks-
|
|
5
|
+
import "./hooks-n9ax4LRT.js";
|
|
6
6
|
export {
|
|
7
7
|
e as StreamLayerSDKNotification,
|
|
8
8
|
p as StreamLayerSDKNotificationUI
|