@streamlayer/react 1.23.0 → 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 +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.js +1 -1
- package/lib/cjs/index10.js +1 -4
- package/lib/cjs/index11.js +4 -1
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -1
- package/lib/cjs/index14.js +1 -1
- package/lib/cjs/index15.js +1 -5
- package/lib/cjs/index16.js +5 -0
- 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 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +4 -4
- 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/storage.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +5 -5
- 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 +1 -1
- 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.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 -4
- package/lib/classic/cjs/index13.js +4 -0
- package/lib/classic/cjs/index2.js +2 -2
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +1 -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 +19 -0
- package/lib/classic/cjs/useStreamLayerApp2.js +5 -5
- package/lib/classic/es/Question.js +4 -4
- package/lib/classic/es/advertisement.js +6 -6
- package/lib/classic/es/analytics.js +1 -1
- package/lib/classic/es/auth.js +1 -1
- package/lib/classic/es/bet-pack.js +18 -17
- package/lib/classic/es/feature.js +63 -0
- package/lib/classic/es/hooks-WfHlJH12.js +98 -0
- package/lib/classic/es/index.js +2 -2
- package/lib/classic/es/index10.js +82 -2295
- package/lib/classic/es/index11.js +2351 -179
- package/lib/classic/es/index12.js +170 -822
- package/lib/classic/es/index13.js +835 -0
- package/lib/classic/es/index2.js +127 -126
- package/lib/classic/es/index5.js +4 -5
- package/lib/classic/es/index6.js +5 -11
- package/lib/classic/es/index7.js +5 -62
- package/lib/classic/es/index8.js +7 -315
- package/lib/classic/es/index9.js +313 -81
- package/lib/classic/es/insight.js +2 -2
- package/lib/classic/es/notification.js +2 -2
- package/lib/classic/es/notification2.js +14 -13
- package/lib/classic/es/pause-ad.js +20 -20
- package/lib/classic/es/points.js +15 -14
- package/lib/classic/es/polymarket.js +6670 -0
- package/lib/classic/es/useStreamLayerApp2.js +143 -119
- package/lib/dist/cjs/masters.js +23 -23
- package/lib/dist/es/masters.js +189 -165
- package/lib/dist/index.d.ts +17 -6
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +2 -2
- package/lib/es/advertisement.js +5 -5
- 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.js +2 -2
- package/lib/es/index10.js +236 -804
- package/lib/es/index11.js +822 -170
- package/lib/es/index12.js +166 -302
- package/lib/es/index13.js +313 -81
- package/lib/es/index14.js +82 -2350
- package/lib/es/index15.js +2330 -1229
- package/lib/es/index16.js +1254 -0
- package/lib/es/index2.js +118 -117
- package/lib/es/index3.js +3 -61
- package/lib/es/index4.js +3 -3
- package/lib/es/index7.js +5 -7
- package/lib/es/index8.js +5 -9
- package/lib/es/index9.js +7 -263
- package/lib/es/insight.js +2 -2
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +25 -24
- package/lib/es/notification.js +8 -7
- package/lib/es/pause-ad.js +20 -20
- package/lib/es/points.js +6 -5
- package/lib/es/polymarket.js +6670 -0
- package/lib/es/storage.js +2 -2
- package/lib/es/useStreamLayerApp2.js +143 -119
- package/lib/style.css +1 -1
- package/package.json +24 -14
- package/lib/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/es/hooks-B0Qttldg.js +0 -98
- package/lib/es/hooks-B0Qttldg.js +0 -98
package/lib/es/index12.js
CHANGED
|
@@ -1,319 +1,183 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { s } from "./sl-types.js";
|
|
2
|
+
import { Q as n } from "./useStreamLayerApp2.js";
|
|
3
|
+
import { jsxs as a, jsx as i, Fragment as O } from "react/jsx-runtime";
|
|
4
|
+
import { memo as b, useMemo as x } from "react";
|
|
5
|
+
import { E as C } from "./index13.js";
|
|
6
|
+
import { B as H } from "./index6.js";
|
|
7
|
+
const ae = {
|
|
8
|
+
[n.TWEET]: { label: "Insight", iconName: "icon-insight" },
|
|
9
|
+
[n.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
|
|
10
|
+
[n.UNSET]: void 0,
|
|
11
|
+
[n.FACTOID]: { label: "Insight", iconName: "icon-insight" },
|
|
12
|
+
[n.POLL]: { label: "Poll", iconName: "icon-poll" },
|
|
13
|
+
[n.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
|
|
14
|
+
[n.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
|
|
15
|
+
}, ne = {
|
|
16
|
+
[n.TWEET]: "Learn more",
|
|
17
|
+
[n.FACTOID]: "Learn more",
|
|
18
|
+
[n.POLL]: "Answer",
|
|
19
|
+
[n.TRIVIA]: "Answer",
|
|
20
|
+
[n.PREDICTION]: "Answer",
|
|
21
|
+
[n.PROMOTION]: "",
|
|
22
|
+
[n.UNSET]: ""
|
|
23
|
+
}, le = (t) => t.split(/\s+/).map((l) => l[0]).join("").toUpperCase(), oe = (t) => t ? t.toLocaleString("en-US") : "0", P = (t) => {
|
|
24
|
+
const l = new Date(t);
|
|
25
|
+
if (!l)
|
|
26
|
+
return "";
|
|
27
|
+
const m = /* @__PURE__ */ new Date(), o = Math.floor(m.getTime() - l.getTime());
|
|
28
|
+
return o < 6e4 ? `${Math.floor(o / 1e3)}s` : o < 36e5 ? `${Math.floor(o / 6e4)}m` : o < 864e5 ? `${Math.floor(o / 36e5)}h` : l.getFullYear() === m.getFullYear() ? `${l.toLocaleDateString("en-US", {
|
|
29
|
+
month: "short",
|
|
30
|
+
day: "numeric"
|
|
31
|
+
})}` : `${l.toLocaleDateString("en-US", {
|
|
32
|
+
month: "2-digit",
|
|
33
|
+
day: "2-digit",
|
|
34
|
+
year: "2-digit"
|
|
35
|
+
})}`;
|
|
36
|
+
}, M = /* @__PURE__ */ s("div")({
|
|
37
|
+
name: "Container",
|
|
38
|
+
class: "cjq447q",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
}), R = /* @__PURE__ */ s("div")({
|
|
41
|
+
name: "ImageContainer",
|
|
42
|
+
class: "i14egogb",
|
|
10
43
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
12
|
-
name: "
|
|
13
|
-
class: "
|
|
44
|
+
}), F = /* @__PURE__ */ s("img")({
|
|
45
|
+
name: "Image",
|
|
46
|
+
class: "i2g9g4l",
|
|
14
47
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
16
|
-
name: "
|
|
17
|
-
class: "
|
|
48
|
+
}), j = () => H, V = /* @__PURE__ */ s(j())({
|
|
49
|
+
name: "TwitterIcon",
|
|
50
|
+
class: "t1c454nm",
|
|
18
51
|
propsAsIs: !0
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
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")({
|
|
58
|
-
name: "Container",
|
|
59
|
-
class: "c1bgb86j",
|
|
52
|
+
}), _ = /* @__PURE__ */ s("div")({
|
|
53
|
+
name: "Details",
|
|
54
|
+
class: "d11nigc3",
|
|
60
55
|
propsAsIs: !1
|
|
61
|
-
}),
|
|
62
|
-
name: "
|
|
63
|
-
class: "
|
|
56
|
+
}), z = /* @__PURE__ */ s("div")({
|
|
57
|
+
name: "Name",
|
|
58
|
+
class: "nrxa4k8",
|
|
64
59
|
propsAsIs: !1
|
|
65
|
-
}),
|
|
66
|
-
name: "
|
|
67
|
-
class: "
|
|
60
|
+
}), B = /* @__PURE__ */ s("div")({
|
|
61
|
+
name: "UserNameAndDate",
|
|
62
|
+
class: "u1p051g3",
|
|
68
63
|
propsAsIs: !1
|
|
69
|
-
}),
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
}), k = ({ image: t, name: l, userName: m, verified: o, createdTweet: p }) => {
|
|
65
|
+
const r = p && P(p);
|
|
66
|
+
return /* @__PURE__ */ a(M, { children: [
|
|
67
|
+
t && /* @__PURE__ */ a(R, { children: [
|
|
68
|
+
/* @__PURE__ */ i(F, { className: "SL_AccountImage", src: t }),
|
|
69
|
+
/* @__PURE__ */ i(V, { name: "twitter" })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ a(_, { children: [
|
|
72
|
+
l && /* @__PURE__ */ a(z, { className: "SL_TweetAccountName", children: [
|
|
73
|
+
l,
|
|
74
|
+
" ",
|
|
75
|
+
o && /* @__PURE__ */ i(H, { name: "icon-twitter-verified" })
|
|
76
|
+
] }),
|
|
77
|
+
m && /* @__PURE__ */ a(B, { className: "SL_TweetAccountUserName", children: [
|
|
78
|
+
"@",
|
|
79
|
+
m,
|
|
80
|
+
" ",
|
|
81
|
+
r && `・ ${r}`
|
|
82
|
+
] })
|
|
83
|
+
] })
|
|
84
|
+
] });
|
|
85
|
+
}, q = /* @__PURE__ */ s("div")({
|
|
86
|
+
name: "Container",
|
|
87
|
+
class: "c1kzqw87",
|
|
72
88
|
propsAsIs: !1
|
|
73
|
-
}),
|
|
74
|
-
name: "
|
|
75
|
-
class: "
|
|
89
|
+
}), Q = /* @__PURE__ */ s("div")({
|
|
90
|
+
name: "Details",
|
|
91
|
+
class: "d9r1hf9",
|
|
76
92
|
propsAsIs: !1
|
|
77
|
-
}),
|
|
78
|
-
name: "
|
|
79
|
-
class: "
|
|
93
|
+
}), W = /* @__PURE__ */ s("div")({
|
|
94
|
+
name: "Body",
|
|
95
|
+
class: "bezygt5",
|
|
80
96
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
82
|
-
name: "
|
|
83
|
-
class: "
|
|
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",
|
|
97
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
98
|
+
name: "ImagesContainer",
|
|
99
|
+
class: "i1y8f7ym",
|
|
96
100
|
propsAsIs: !1
|
|
97
|
-
}),
|
|
98
|
-
name: "
|
|
99
|
-
class: "
|
|
100
|
-
propsAsIs: !
|
|
101
|
-
}),
|
|
102
|
-
name: "
|
|
103
|
-
class: "
|
|
104
|
-
propsAsIs: !
|
|
105
|
-
}),
|
|
106
|
-
name: "
|
|
107
|
-
class: "
|
|
108
|
-
propsAsIs: !0
|
|
109
|
-
}), Le = () => T, Re = /* @__PURE__ */ o(Le())({
|
|
110
|
-
name: "WebOSIconButtonMute",
|
|
111
|
-
class: "w8h4h7",
|
|
101
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
102
|
+
name: "ImagesBlock",
|
|
103
|
+
class: "i18gwonx",
|
|
104
|
+
propsAsIs: !1
|
|
105
|
+
}), L = /* @__PURE__ */ s("img")({
|
|
106
|
+
name: "Image",
|
|
107
|
+
class: "i3g0xjd",
|
|
108
|
+
propsAsIs: !1
|
|
109
|
+
}), Y = () => L, c = /* @__PURE__ */ s(Y())({
|
|
110
|
+
name: "ImageFullSize",
|
|
111
|
+
class: "io8rt7p",
|
|
112
112
|
propsAsIs: !0
|
|
113
|
-
}),
|
|
114
|
-
name: "
|
|
115
|
-
class: "
|
|
113
|
+
}), G = () => L, I = /* @__PURE__ */ s(G())({
|
|
114
|
+
name: "ImageHalfSize",
|
|
115
|
+
class: "i4hn3ox",
|
|
116
116
|
propsAsIs: !0
|
|
117
|
-
}),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
] })
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
] }),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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);
|
|
117
|
+
}), J = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), K = (t) => t == null ? void 0 : t.replace(J, ""), re = b(
|
|
118
|
+
({ image: t, body: l, muted: m, account: o, accountVerified: p, tweet: r, isDetail: h, controlVideo: S }) => {
|
|
119
|
+
var A, f, T, N, U;
|
|
120
|
+
const e = (f = (A = r == null ? void 0 : r.meta) == null ? void 0 : A.extendedEntities) == null ? void 0 : f.media, g = e == null ? void 0 : e.find(({ type: u }) => u === "photo"), $ = x(() => {
|
|
121
|
+
var u, w, D, y;
|
|
122
|
+
return (y = (D = (w = (u = e == null ? void 0 : e[0]) == null ? void 0 : u.videoInfo) == null ? void 0 : w.variants) == null ? void 0 : D.findLast(({ contentType: E }) => E === "video/mp4")) == null ? void 0 : y.url;
|
|
123
|
+
}, [e]);
|
|
124
|
+
return /* @__PURE__ */ a(q, { children: [
|
|
125
|
+
/* @__PURE__ */ a(Q, { children: [
|
|
126
|
+
/* @__PURE__ */ i(
|
|
127
|
+
k,
|
|
128
|
+
{
|
|
129
|
+
image: t,
|
|
130
|
+
name: (T = r == null ? void 0 : r.meta) == null ? void 0 : T.accountName,
|
|
131
|
+
userName: o,
|
|
132
|
+
verified: p,
|
|
133
|
+
createdTweet: r == null ? void 0 : r.date
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ i(W, { children: K(l) }),
|
|
137
|
+
!h && g && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(c, { src: e == null ? void 0 : e[0].mediaUrlHttps }) }),
|
|
138
|
+
h && g && /* @__PURE__ */ a(O, { children: [
|
|
139
|
+
(e == null ? void 0 : e.length) === 1 && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(c, { src: e[0].mediaUrlHttps }) }),
|
|
140
|
+
(e == null ? void 0 : e.length) === 2 && /* @__PURE__ */ a(d, { children: [
|
|
141
|
+
/* @__PURE__ */ i(I, { src: e[0].mediaUrlHttps }),
|
|
142
|
+
/* @__PURE__ */ i(I, { src: e[1].mediaUrlHttps })
|
|
143
|
+
] }),
|
|
144
|
+
(e == null ? void 0 : e.length) === 3 && /* @__PURE__ */ a(d, { children: [
|
|
145
|
+
/* @__PURE__ */ i(I, { src: e[0].mediaUrlHttps }),
|
|
146
|
+
/* @__PURE__ */ a(v, { children: [
|
|
147
|
+
/* @__PURE__ */ i(c, { src: e[1].mediaUrlHttps }),
|
|
148
|
+
/* @__PURE__ */ i(c, { src: e[2].mediaUrlHttps })
|
|
149
|
+
] })
|
|
150
|
+
] }),
|
|
151
|
+
(e == null ? void 0 : e.length) === 4 && /* @__PURE__ */ a(d, { children: [
|
|
152
|
+
/* @__PURE__ */ a(v, { children: [
|
|
153
|
+
/* @__PURE__ */ i(c, { src: e[0].mediaUrlHttps }),
|
|
154
|
+
/* @__PURE__ */ i(c, { src: e[1].mediaUrlHttps })
|
|
155
|
+
] }),
|
|
156
|
+
/* @__PURE__ */ a(v, { children: [
|
|
157
|
+
/* @__PURE__ */ i(c, { src: e[2].mediaUrlHttps }),
|
|
158
|
+
/* @__PURE__ */ i(c, { src: e[3].mediaUrlHttps })
|
|
159
|
+
] })
|
|
160
|
+
] })
|
|
161
|
+
] })
|
|
162
|
+
] }),
|
|
163
|
+
!g && (((N = e == null ? void 0 : e[0]) == null ? void 0 : N.type) === "video" || ((U = e == null ? void 0 : e[0]) == null ? void 0 : U.type) === "animated_gif") && $ && /* @__PURE__ */ i(
|
|
164
|
+
C,
|
|
165
|
+
{
|
|
166
|
+
muted: m,
|
|
167
|
+
source: $,
|
|
168
|
+
poster: e[0].mediaUrlHttps,
|
|
169
|
+
controlVideo: S
|
|
208
170
|
}
|
|
209
|
-
|
|
210
|
-
|
|
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
|
-
);
|
|
171
|
+
)
|
|
172
|
+
] });
|
|
313
173
|
}
|
|
314
174
|
);
|
|
315
175
|
export {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
176
|
+
k as D,
|
|
177
|
+
le as I,
|
|
178
|
+
K as a,
|
|
179
|
+
re as b,
|
|
180
|
+
ae as e,
|
|
181
|
+
ne as o,
|
|
182
|
+
oe as s
|
|
319
183
|
};
|