strataplayer 1.2.20 → 1.2.21
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/README.md +3 -2
- package/dist/core/StrataCore.d.ts +9 -2
- package/dist/strataplayer.cjs.js +16 -12
- package/dist/strataplayer.cjs.js.map +1 -1
- package/dist/strataplayer.es.js +1266 -1169
- package/dist/strataplayer.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/Icons.d.ts +6 -0
- package/package.json +1 -1
package/dist/strataplayer.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import { jsxs as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
class
|
|
1
|
+
var Si = Object.defineProperty;
|
|
2
|
+
var Ci = (s, t, i) => t in s ? Si(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
|
|
3
|
+
var F = (s, t, i) => Ci(s, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
import Me, { useState as M, useEffect as ee, useRef as W, useLayoutEffect as Be, useMemo as Ce, useSyncExternalStore as Ni, useCallback as Ve } from "react";
|
|
5
|
+
import { createRoot as Mi } from "react-dom/client";
|
|
6
|
+
import { jsxs as c, jsx as e, Fragment as Q } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as Ti } from "react-dom";
|
|
8
|
+
class zi {
|
|
9
9
|
constructor() {
|
|
10
|
-
|
|
10
|
+
F(this, "events");
|
|
11
11
|
this.events = /* @__PURE__ */ new Map();
|
|
12
12
|
}
|
|
13
13
|
on(t, i) {
|
|
@@ -18,21 +18,21 @@ class xi {
|
|
|
18
18
|
const o = this.events.get(t);
|
|
19
19
|
o && this.events.set(
|
|
20
20
|
t,
|
|
21
|
-
o.filter((
|
|
21
|
+
o.filter((a) => a !== i)
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
emit(t, i) {
|
|
25
25
|
const o = this.events.get(t);
|
|
26
|
-
o && o.forEach((
|
|
26
|
+
o && o.forEach((a) => a(i));
|
|
27
27
|
}
|
|
28
28
|
destroy() {
|
|
29
29
|
this.events.clear();
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
class
|
|
32
|
+
class Ii {
|
|
33
33
|
constructor(t) {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
F(this, "state");
|
|
35
|
+
F(this, "listeners");
|
|
36
36
|
this.state = t, this.listeners = /* @__PURE__ */ new Set();
|
|
37
37
|
}
|
|
38
38
|
get() {
|
|
@@ -40,7 +40,7 @@ class wi {
|
|
|
40
40
|
}
|
|
41
41
|
setState(t) {
|
|
42
42
|
const i = this.state, o = typeof t == "function" ? t(i) : t;
|
|
43
|
-
this.state = { ...i, ...o }, this.listeners.forEach((
|
|
43
|
+
this.state = { ...i, ...o }, this.listeners.forEach((a) => a(this.state, i));
|
|
44
44
|
}
|
|
45
45
|
subscribe(t) {
|
|
46
46
|
return this.listeners.add(t), () => this.listeners.delete(t);
|
|
@@ -49,13 +49,13 @@ class wi {
|
|
|
49
49
|
this.listeners.clear();
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
class
|
|
52
|
+
class Ri {
|
|
53
53
|
constructor(t) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
F(this, "context", null);
|
|
55
|
+
F(this, "source", null);
|
|
56
|
+
F(this, "gainNode", null);
|
|
57
|
+
F(this, "video");
|
|
58
|
+
F(this, "isInitialized", !1);
|
|
59
59
|
this.video = t;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -78,67 +78,67 @@ class yi {
|
|
|
78
78
|
this.context && this.context.close(), this.isInitialized = !1;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
if (isNaN(
|
|
83
|
-
const t = Math.floor(
|
|
81
|
+
const it = (s) => {
|
|
82
|
+
if (isNaN(s)) return "00:00";
|
|
83
|
+
const t = Math.floor(s / 3600), i = Math.floor(s % 3600 / 60), o = Math.floor(s % 60);
|
|
84
84
|
return t > 0 ? `${t}:${i.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}` : `${i}:${o.toString().padStart(2, "0")}`;
|
|
85
|
-
},
|
|
85
|
+
}, Pi = async (s, t = 3, i = 2e4) => {
|
|
86
86
|
for (let o = 0; o < t; o++) {
|
|
87
|
-
const
|
|
87
|
+
const a = new AbortController(), u = setTimeout(() => a.abort(), i);
|
|
88
88
|
try {
|
|
89
|
-
const
|
|
90
|
-
if (clearTimeout(
|
|
91
|
-
return await
|
|
92
|
-
} catch (
|
|
93
|
-
if (clearTimeout(
|
|
89
|
+
const h = await fetch(s, { signal: a.signal });
|
|
90
|
+
if (clearTimeout(u), !h.ok) throw new Error(`HTTP ${h.status}`);
|
|
91
|
+
return await h.text();
|
|
92
|
+
} catch (h) {
|
|
93
|
+
if (clearTimeout(u), o === t - 1) throw h;
|
|
94
94
|
await new Promise((f) => setTimeout(f, 1e3));
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
throw new Error("Failed");
|
|
98
|
-
},
|
|
98
|
+
}, Li = async (s, t, i = 2e4) => {
|
|
99
99
|
try {
|
|
100
|
-
const
|
|
101
|
-
`),
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
let
|
|
106
|
-
return
|
|
100
|
+
const a = (await Pi(s, 3, i)).split(`
|
|
101
|
+
`), u = [];
|
|
102
|
+
let h = null, f = null;
|
|
103
|
+
const x = s.substring(0, s.lastIndexOf("/") + 1), b = (m) => {
|
|
104
|
+
const v = m.split(":");
|
|
105
|
+
let p = 0;
|
|
106
|
+
return v.length === 3 ? (p += parseFloat(v[0]) * 3600, p += parseFloat(v[1]) * 60, p += parseFloat(v[2])) : (p += parseFloat(v[0]) * 60, p += parseFloat(v[1])), p;
|
|
107
107
|
};
|
|
108
|
-
for (let
|
|
109
|
-
if (
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
} else if (
|
|
113
|
-
let [
|
|
114
|
-
!
|
|
115
|
-
let
|
|
116
|
-
if (
|
|
117
|
-
const
|
|
118
|
-
|
|
108
|
+
for (let m of a)
|
|
109
|
+
if (m = m.trim(), m.includes("-->")) {
|
|
110
|
+
const v = m.split("-->");
|
|
111
|
+
h = b(v[0].trim()), f = b(v[1].trim());
|
|
112
|
+
} else if (h !== null && f !== null && m.length > 0) {
|
|
113
|
+
let [v, p] = m.split("#");
|
|
114
|
+
!v.match(/^https?:\/\//) && !v.startsWith("data:") && (v = x + v);
|
|
115
|
+
let S = 0, $ = 0, U = 0, H = 0;
|
|
116
|
+
if (p && p.startsWith("xywh=")) {
|
|
117
|
+
const q = p.replace("xywh=", "").split(",");
|
|
118
|
+
q.length === 4 && (S = parseInt(q[0]), $ = parseInt(q[1]), U = parseInt(q[2]), H = parseInt(q[3]));
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
U > 0 && H > 0 && u.push({ start: h, end: f, url: v, x: S, y: $, w: U, h: H }), h = null, f = null;
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return u;
|
|
123
123
|
} catch {
|
|
124
124
|
return t({ type: "warning", message: "Failed to load thumbnails", duration: 4e3 }), [];
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, Fi = () => {
|
|
127
127
|
if (!(typeof document > "u")) {
|
|
128
128
|
if (!document.getElementById("strata-fonts")) {
|
|
129
|
-
const
|
|
130
|
-
|
|
129
|
+
const s = document.createElement("link");
|
|
130
|
+
s.rel = "preconnect", s.href = "https://fonts.googleapis.com", document.head.appendChild(s);
|
|
131
131
|
const t = document.createElement("link");
|
|
132
132
|
t.rel = "preconnect", t.href = "https://fonts.gstatic.com", t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
133
133
|
const i = document.createElement("link");
|
|
134
134
|
i.id = "strata-fonts", i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Press+Start+2P&family=Cinzel:wght@400;600;700&display=swap", document.head.appendChild(i);
|
|
135
135
|
}
|
|
136
136
|
if (!document.querySelector('script[src*="cast_sender.js"]') && !window.cast) {
|
|
137
|
-
const
|
|
138
|
-
|
|
137
|
+
const s = document.createElement("script");
|
|
138
|
+
s.src = "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1", document.head.appendChild(s);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
},
|
|
141
|
+
}, rt = {
|
|
142
142
|
useNative: !1,
|
|
143
143
|
fixCapitalization: !1,
|
|
144
144
|
backgroundOpacity: 50,
|
|
@@ -149,7 +149,7 @@ const Je = (n) => {
|
|
|
149
149
|
isBold: !1,
|
|
150
150
|
textColor: "#ffffff",
|
|
151
151
|
verticalOffset: 40
|
|
152
|
-
},
|
|
152
|
+
}, Jt = "strata-settings", K = {
|
|
153
153
|
isPlaying: !1,
|
|
154
154
|
isBuffering: !1,
|
|
155
155
|
isLive: !1,
|
|
@@ -171,7 +171,7 @@ const Je = (n) => {
|
|
|
171
171
|
subtitleTracks: [],
|
|
172
172
|
currentSubtitle: -1,
|
|
173
173
|
subtitleOffset: 0,
|
|
174
|
-
subtitleSettings:
|
|
174
|
+
subtitleSettings: rt,
|
|
175
175
|
activeCues: [],
|
|
176
176
|
viewMode: "normal",
|
|
177
177
|
notifications: [],
|
|
@@ -185,92 +185,98 @@ const Je = (n) => {
|
|
|
185
185
|
isLocked: !1,
|
|
186
186
|
flipState: { horizontal: !1, vertical: !1 },
|
|
187
187
|
aspectRatio: "default",
|
|
188
|
+
videoFit: "contain",
|
|
189
|
+
brightness: 1,
|
|
188
190
|
isAutoSized: !1,
|
|
189
191
|
isLooping: !1,
|
|
190
192
|
controlsVisible: !0
|
|
191
|
-
},
|
|
193
|
+
}, Kt = (s = {}) => {
|
|
192
194
|
let t = {};
|
|
193
|
-
if (!
|
|
195
|
+
if (!s.disablePersistence && typeof window < "u")
|
|
194
196
|
try {
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
+
const a = localStorage.getItem(Jt);
|
|
198
|
+
a && (t = JSON.parse(a));
|
|
197
199
|
} catch {
|
|
198
200
|
}
|
|
199
201
|
const i = {
|
|
200
|
-
...
|
|
202
|
+
...rt,
|
|
201
203
|
...t.subtitleSettings || {},
|
|
202
|
-
...
|
|
203
|
-
};
|
|
204
|
+
...s.subtitleSettings || {}
|
|
205
|
+
}, o = s.videoFit ?? (s.autoSize ? "cover" : void 0) ?? t.videoFit ?? K.videoFit;
|
|
204
206
|
return {
|
|
205
|
-
...
|
|
207
|
+
...K,
|
|
206
208
|
...t,
|
|
207
209
|
// Load saved first
|
|
208
210
|
// Override with config if present (not undefined)
|
|
209
|
-
volume:
|
|
210
|
-
isMuted:
|
|
211
|
-
playbackRate:
|
|
212
|
-
audioGain:
|
|
213
|
-
theme:
|
|
214
|
-
themeColor:
|
|
215
|
-
iconSize:
|
|
211
|
+
volume: s.volume ?? t.volume ?? K.volume,
|
|
212
|
+
isMuted: s.muted ?? t.isMuted ?? K.isMuted,
|
|
213
|
+
playbackRate: s.playbackRate ?? t.playbackRate ?? K.playbackRate,
|
|
214
|
+
audioGain: s.audioGain ?? t.audioGain ?? K.audioGain,
|
|
215
|
+
theme: s.theme ?? t.theme ?? K.theme,
|
|
216
|
+
themeColor: s.themeColor ?? t.themeColor ?? K.themeColor,
|
|
217
|
+
iconSize: s.iconSize ?? t.iconSize ?? K.iconSize,
|
|
216
218
|
subtitleSettings: i,
|
|
217
219
|
// Config overrides state for these visual modes
|
|
218
|
-
isAutoSized:
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
isAutoSized: s.autoSize ?? K.isAutoSized,
|
|
221
|
+
videoFit: o,
|
|
222
|
+
brightness: s.brightness ?? t.brightness ?? K.brightness,
|
|
223
|
+
isLive: s.isLive ?? t.isLive ?? K.isLive,
|
|
224
|
+
isLooping: s.loop ?? t.isLooping ?? K.isLooping,
|
|
221
225
|
sourceStatuses: {}
|
|
222
226
|
// Never persist statuses
|
|
223
227
|
};
|
|
224
228
|
};
|
|
225
|
-
class
|
|
229
|
+
class $i {
|
|
226
230
|
constructor(t = {}, i) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
F(this, "video");
|
|
232
|
+
F(this, "container", null);
|
|
233
|
+
F(this, "events");
|
|
234
|
+
F(this, "store");
|
|
235
|
+
F(this, "plugins", /* @__PURE__ */ new Map());
|
|
236
|
+
F(this, "audioEngine");
|
|
237
|
+
F(this, "config");
|
|
238
|
+
F(this, "resizeObserver", null);
|
|
235
239
|
// Retry Logic
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
F(this, "retryCount", 0);
|
|
241
|
+
F(this, "maxRetries", 5);
|
|
242
|
+
F(this, "retryTimer", null);
|
|
243
|
+
F(this, "currentSource", null);
|
|
244
|
+
F(this, "currentSrc", "");
|
|
241
245
|
// Track configs from setSources are stored here to lazy load
|
|
242
|
-
|
|
246
|
+
F(this, "trackConfigs", []);
|
|
243
247
|
// Download Control
|
|
244
|
-
|
|
248
|
+
F(this, "activeDownloads", /* @__PURE__ */ new Map());
|
|
245
249
|
// Cast
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
const o =
|
|
251
|
-
this.store = new
|
|
252
|
-
const
|
|
253
|
-
if (this.store.setState({ isFullscreen:
|
|
254
|
-
const
|
|
250
|
+
F(this, "castInitialized", !1);
|
|
251
|
+
F(this, "boundCueChange");
|
|
252
|
+
F(this, "boundFullscreenChange");
|
|
253
|
+
Fi(), this.config = t, this.config.autoOrientation = this.config.autoOrientation ?? !0, this.config.fetchTimeout = this.config.fetchTimeout ?? 3e4, this.config.centerControls = this.config.centerControls ?? !0, this.config.gestureSeek = this.config.gestureSeek ?? !1, this.video = i || document.createElement("video"), this.video.crossOrigin = "anonymous", this.video.preload = "auto", t.playsInline !== !1 && (this.video.playsInline = !0), this.events = new zi();
|
|
254
|
+
const o = Kt(t);
|
|
255
|
+
this.store = new Ii(o), this.audioEngine = new Ri(this.video), this.boundCueChange = this.handleCueChange.bind(this), this.boundFullscreenChange = () => {
|
|
256
|
+
const a = !!document.fullscreenElement;
|
|
257
|
+
if (this.store.setState({ isFullscreen: a }), this.emit("resize"), this.emit(a ? "fullscreen" : "fullscreen_exit"), a && this.config.autoOrientation && screen.orientation && "lock" in screen.orientation) {
|
|
258
|
+
const h = this.video.videoWidth > this.video.videoHeight ? "landscape" : "portrait";
|
|
255
259
|
try {
|
|
256
|
-
screen.orientation.lock(
|
|
260
|
+
screen.orientation.lock(h).catch(() => {
|
|
257
261
|
});
|
|
258
262
|
} catch {
|
|
259
263
|
}
|
|
260
|
-
} else !
|
|
261
|
-
}, this.video.volume = o.volume, this.video.muted = o.isMuted, this.video.playbackRate = o.playbackRate, this.video.loop = o.isLooping, o.audioGain > 1 && this.audioEngine.setGain(o.audioGain),
|
|
262
|
-
const
|
|
263
|
-
volume:
|
|
264
|
-
isMuted:
|
|
265
|
-
playbackRate:
|
|
266
|
-
subtitleSettings:
|
|
267
|
-
iconSize:
|
|
268
|
-
themeColor:
|
|
269
|
-
theme:
|
|
270
|
-
isLive:
|
|
271
|
-
isLooping:
|
|
264
|
+
} else !a && screen.orientation && "unlock" in screen.orientation && screen.orientation.unlock();
|
|
265
|
+
}, this.video.volume = o.volume, this.video.muted = o.isMuted, this.video.playbackRate = o.playbackRate, this.video.loop = o.isLooping, this.video.style.filter = `brightness(${o.brightness})`, o.audioGain > 1 && this.audioEngine.setGain(o.audioGain), this.video.style.objectFit = o.videoFit, this.initVideoListeners(), this.initMediaSession(), this.initCast(), t.disablePersistence || this.store.subscribe((a) => {
|
|
266
|
+
const u = {
|
|
267
|
+
volume: a.volume,
|
|
268
|
+
isMuted: a.isMuted,
|
|
269
|
+
playbackRate: a.playbackRate,
|
|
270
|
+
subtitleSettings: a.subtitleSettings,
|
|
271
|
+
iconSize: a.iconSize,
|
|
272
|
+
themeColor: a.themeColor,
|
|
273
|
+
theme: a.theme,
|
|
274
|
+
isLive: a.isLive,
|
|
275
|
+
isLooping: a.isLooping,
|
|
276
|
+
brightness: a.brightness,
|
|
277
|
+
videoFit: a.videoFit
|
|
272
278
|
};
|
|
273
|
-
localStorage.setItem(
|
|
279
|
+
localStorage.setItem(Jt, JSON.stringify(u));
|
|
274
280
|
});
|
|
275
281
|
}
|
|
276
282
|
// --- Instance Properties ---
|
|
@@ -356,8 +362,8 @@ class Ni {
|
|
|
356
362
|
"volumechange",
|
|
357
363
|
"waiting"
|
|
358
364
|
].forEach((o) => {
|
|
359
|
-
this.video.addEventListener(o, (
|
|
360
|
-
switch (this.emit(`video:${o}`,
|
|
365
|
+
this.video.addEventListener(o, (a) => {
|
|
366
|
+
switch (this.emit(`video:${o}`, a), o === "play" && this.emit("play"), o === "pause" && this.emit("pause"), o === "ended" && this.emit("ended"), o === "error" && this.emit("error", this.video.error), o === "seeked" && this.emit("seek"), o) {
|
|
361
367
|
case "play":
|
|
362
368
|
t({ isPlaying: !0 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "playing"), this.updateMediaSessionPosition();
|
|
363
369
|
break;
|
|
@@ -440,9 +446,9 @@ class Ni {
|
|
|
440
446
|
});
|
|
441
447
|
}
|
|
442
448
|
updateMediaSessionMetadata() {
|
|
443
|
-
var o,
|
|
449
|
+
var o, a;
|
|
444
450
|
if (!("mediaSession" in navigator)) return;
|
|
445
|
-
const t = ((o = this.currentSource) == null ? void 0 : o.name) || ((
|
|
451
|
+
const t = ((o = this.currentSource) == null ? void 0 : o.name) || ((a = this.currentSource) == null ? void 0 : a.url.split("/").pop()) || "Video", i = [];
|
|
446
452
|
this.config.poster && i.push({ src: this.config.poster, sizes: "512x512", type: "image/jpeg" }), i.push({ src: "logo.png", sizes: "512x512", type: "image/png" }), navigator.mediaSession.metadata = new MediaMetadata({
|
|
447
453
|
title: t,
|
|
448
454
|
artist: "StrataPlayer",
|
|
@@ -460,8 +466,8 @@ class Ni {
|
|
|
460
466
|
position: Math.max(0, Math.min(i, t))
|
|
461
467
|
// Ensure within [0, duration]
|
|
462
468
|
});
|
|
463
|
-
} catch (
|
|
464
|
-
console.warn("MediaSession Position Error:",
|
|
469
|
+
} catch (a) {
|
|
470
|
+
console.warn("MediaSession Position Error:", a);
|
|
465
471
|
}
|
|
466
472
|
}
|
|
467
473
|
triggerError(t, i = !1) {
|
|
@@ -471,29 +477,29 @@ class Ni {
|
|
|
471
477
|
const i = this.video.error, o = t || (i == null ? void 0 : i.message) || (i ? `Code ${i.code}` : "Unknown Error");
|
|
472
478
|
if (this.removeNotification("retry"), this.emit("video:error", i), this.retryCount < this.maxRetries) {
|
|
473
479
|
this.retryCount++;
|
|
474
|
-
const
|
|
480
|
+
const a = Math.pow(2, this.retryCount - 1) * 1500;
|
|
475
481
|
this.notify({
|
|
476
482
|
id: "retry",
|
|
477
483
|
type: "loading",
|
|
478
484
|
// Cleaned up formatting with newline
|
|
479
485
|
message: `Error: ${o}.
|
|
480
486
|
Retrying (${this.retryCount}/${this.maxRetries})`
|
|
481
|
-
}), console.warn(`[StrataPlayer] Error: ${o}. Retrying in ${
|
|
487
|
+
}), console.warn(`[StrataPlayer] Error: ${o}. Retrying in ${a}ms...`), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = setTimeout(() => {
|
|
482
488
|
if (this.currentSource) {
|
|
483
489
|
this.load(this.currentSource, this.trackConfigs, !0);
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
this.video.currentTime =
|
|
490
|
+
const u = this.store.get().currentTime;
|
|
491
|
+
if (u > 0) {
|
|
492
|
+
const h = () => {
|
|
493
|
+
this.video.currentTime = u, this.video.removeEventListener("canplay", h);
|
|
488
494
|
};
|
|
489
|
-
this.video.addEventListener("canplay",
|
|
495
|
+
this.video.addEventListener("canplay", h);
|
|
490
496
|
}
|
|
491
497
|
}
|
|
492
|
-
},
|
|
498
|
+
}, a);
|
|
493
499
|
} else {
|
|
494
500
|
this.removeNotification("retry");
|
|
495
|
-
const
|
|
496
|
-
this.store.setState({ error:
|
|
501
|
+
const a = `Failed to play after ${this.maxRetries} attempts: ${o}`;
|
|
502
|
+
this.store.setState({ error: a }), this.emit("error", a), this.updateSourceStatus("error");
|
|
497
503
|
}
|
|
498
504
|
}
|
|
499
505
|
updateBuffer() {
|
|
@@ -507,27 +513,27 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
507
513
|
}
|
|
508
514
|
updateSubtitleTrackState(t, i) {
|
|
509
515
|
this.store.setState((o) => {
|
|
510
|
-
const
|
|
511
|
-
return
|
|
516
|
+
const a = [...o.subtitleTracks];
|
|
517
|
+
return a[t] && (a[t] = { ...a[t], ...i }), { subtitleTracks: a };
|
|
512
518
|
});
|
|
513
519
|
}
|
|
514
520
|
// --- Utility ---
|
|
515
|
-
async fetchWithRetry(t, i = 3, o,
|
|
516
|
-
const
|
|
517
|
-
for (let
|
|
518
|
-
const f =
|
|
521
|
+
async fetchWithRetry(t, i = 3, o, a) {
|
|
522
|
+
const u = o ?? this.config.fetchTimeout ?? 3e4;
|
|
523
|
+
for (let h = 0; h < i; h++) {
|
|
524
|
+
const f = a ? null : new AbortController(), x = a || (f == null ? void 0 : f.signal), b = setTimeout(() => f == null ? void 0 : f.abort(), u);
|
|
519
525
|
try {
|
|
520
|
-
const
|
|
521
|
-
if (clearTimeout(
|
|
522
|
-
return
|
|
523
|
-
} catch (
|
|
524
|
-
if (clearTimeout(
|
|
525
|
-
if (
|
|
526
|
-
if (
|
|
527
|
-
if (
|
|
528
|
-
console.warn(`Fetch timeout (${
|
|
526
|
+
const m = await fetch(t, { signal: x });
|
|
527
|
+
if (clearTimeout(b), !m.ok) throw new Error(`HTTP ${m.status}`);
|
|
528
|
+
return m;
|
|
529
|
+
} catch (m) {
|
|
530
|
+
if (clearTimeout(b), a != null && a.aborted) throw new Error("Aborted");
|
|
531
|
+
if (h === i - 1) throw m;
|
|
532
|
+
if (m.name === "AbortError") {
|
|
533
|
+
if (a != null && a.aborted) throw m;
|
|
534
|
+
console.warn(`Fetch timeout (${u}ms) for ${t}`);
|
|
529
535
|
}
|
|
530
|
-
await new Promise((
|
|
536
|
+
await new Promise((v) => setTimeout(v, 1e3 * Math.pow(2, h)));
|
|
531
537
|
}
|
|
532
538
|
}
|
|
533
539
|
throw new Error("Fetch failed");
|
|
@@ -546,12 +552,12 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
546
552
|
// Enhanced Format Duration: Days, Hours, Minutes, Seconds
|
|
547
553
|
formatDuration(t) {
|
|
548
554
|
if (!isFinite(t) || t <= 0) return "";
|
|
549
|
-
const i = Math.floor(t / 1e3), o = Math.floor(i / (3600 * 24)),
|
|
550
|
-
return o > 0 && f.push(`${o}d`),
|
|
555
|
+
const i = Math.floor(t / 1e3), o = Math.floor(i / (3600 * 24)), a = Math.floor(i % (3600 * 24) / 3600), u = Math.floor(i % 3600 / 60), h = i % 60, f = [];
|
|
556
|
+
return o > 0 && f.push(`${o}d`), a > 0 && f.push(`${a}h`), u > 0 && f.push(`${u}m`), f.push(`${h}s`), f.join(" ");
|
|
551
557
|
}
|
|
552
558
|
// --- Core Methods ---
|
|
553
559
|
attach(t) {
|
|
554
|
-
this.resizeObserver && this.resizeObserver.disconnect(), this.container = t, this.container.appendChild(this.video), this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = this.store.get().
|
|
560
|
+
this.resizeObserver && this.resizeObserver.disconnect(), this.container = t, this.container.appendChild(this.video), this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = this.store.get().videoFit, this.video.style.backgroundColor = "black", this.updateAspectRatio(), this.resizeObserver = new ResizeObserver((i) => {
|
|
555
561
|
for (const o of i)
|
|
556
562
|
this.emit("resize", { width: o.contentRect.width, height: o.contentRect.height }), this.updateAspectRatio();
|
|
557
563
|
}), this.resizeObserver.observe(this.container), this.emit("ready");
|
|
@@ -565,23 +571,23 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
565
571
|
switchSource(t) {
|
|
566
572
|
const i = this.store.get().sources;
|
|
567
573
|
if (t >= 0 && t < i.length) {
|
|
568
|
-
const o = this.video.currentTime,
|
|
574
|
+
const o = this.video.currentTime, a = !this.video.paused;
|
|
569
575
|
this.load(i[t], this.trackConfigs);
|
|
570
|
-
const
|
|
571
|
-
this.video.currentTime = o,
|
|
576
|
+
const u = () => {
|
|
577
|
+
this.video.currentTime = o, a && this.video.play(), this.video.removeEventListener("canplay", u);
|
|
572
578
|
};
|
|
573
|
-
this.video.addEventListener("canplay",
|
|
579
|
+
this.video.addEventListener("canplay", u);
|
|
574
580
|
}
|
|
575
581
|
}
|
|
576
582
|
load(t, i = [], o = !1) {
|
|
577
583
|
this.retryTimer && clearTimeout(this.retryTimer);
|
|
578
|
-
const
|
|
579
|
-
o || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc =
|
|
580
|
-
const
|
|
581
|
-
...
|
|
582
|
-
index:
|
|
584
|
+
const a = typeof t == "string" ? { url: t, type: "auto" } : t;
|
|
585
|
+
o || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc = a.url, this.currentSource = a, this.trackConfigs = i;
|
|
586
|
+
const h = this.store.get().sources.findIndex((v) => v.url === a.url), f = i.map((v, p) => ({
|
|
587
|
+
...v,
|
|
588
|
+
index: p,
|
|
583
589
|
status: "idle",
|
|
584
|
-
isDefault: !!
|
|
590
|
+
isDefault: !!v.default
|
|
585
591
|
}));
|
|
586
592
|
this.store.setState({
|
|
587
593
|
isBuffering: !0,
|
|
@@ -593,19 +599,19 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
593
599
|
// Reset audio track
|
|
594
600
|
subtitleTracks: f,
|
|
595
601
|
currentSubtitle: -1,
|
|
596
|
-
currentSourceIndex:
|
|
602
|
+
currentSourceIndex: h
|
|
597
603
|
}), this.updateMediaSessionMetadata();
|
|
598
|
-
let
|
|
599
|
-
|
|
600
|
-
const
|
|
601
|
-
for (;
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
604
|
+
let x = a.type || "auto";
|
|
605
|
+
x === "auto" && (a.url.includes(".m3u8") ? x = "hls" : a.url.includes(".mpd") ? x = "dash" : a.url.includes(".flv") || a.url.includes(".ts") ? x = "mpegts" : a.url.startsWith("magnet:") || a.url.includes(".torrent") ? x = "webtorrent" : x = "mp4"), this.events.emit("load", { url: a.url, type: x });
|
|
606
|
+
const b = this.video.getElementsByTagName("track");
|
|
607
|
+
for (; b.length > 0; )
|
|
608
|
+
b[0].remove();
|
|
609
|
+
const m = f.findIndex((v) => v.default);
|
|
610
|
+
m !== -1 && this.setSubtitle(m), (x === "mp4" || x === "webm" || x === "ogg") && (this.video.src = a.url);
|
|
605
611
|
}
|
|
606
612
|
// Wrapper for external subtitle API
|
|
607
613
|
loadSubtitle(t, i = "Subtitle") {
|
|
608
|
-
const o = this.store.get().subtitleTracks.length,
|
|
614
|
+
const o = this.store.get().subtitleTracks.length, a = {
|
|
609
615
|
src: t,
|
|
610
616
|
label: i,
|
|
611
617
|
srcLang: "user",
|
|
@@ -615,26 +621,26 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
615
621
|
status: "idle",
|
|
616
622
|
isDefault: !0
|
|
617
623
|
};
|
|
618
|
-
this.store.setState((
|
|
619
|
-
subtitleTracks: [...
|
|
624
|
+
this.store.setState((u) => ({
|
|
625
|
+
subtitleTracks: [...u.subtitleTracks, a]
|
|
620
626
|
})), this.setSubtitle(o);
|
|
621
627
|
}
|
|
622
628
|
addTextTrack(t, i) {
|
|
623
629
|
const o = new FileReader();
|
|
624
|
-
o.onload = (
|
|
625
|
-
var
|
|
626
|
-
if (!((
|
|
627
|
-
let
|
|
628
|
-
|
|
629
|
-
const
|
|
630
|
+
o.onload = (a) => {
|
|
631
|
+
var x;
|
|
632
|
+
if (!((x = a.target) != null && x.result)) return;
|
|
633
|
+
let u = a.target.result;
|
|
634
|
+
u = this.convertToVTT(u);
|
|
635
|
+
const h = new Blob([u], { type: "text/vtt" }), f = URL.createObjectURL(h);
|
|
630
636
|
this.loadSubtitle(f, i), this.notify({ type: "success", message: "Subtitle uploaded", duration: 3e3 });
|
|
631
637
|
}, o.onerror = () => {
|
|
632
638
|
this.notify({ type: "error", message: "Failed to read file", duration: 3e3 });
|
|
633
639
|
}, o.readAsText(t);
|
|
634
640
|
}
|
|
635
|
-
addTextTrackInternal(t, i, o = "",
|
|
636
|
-
const
|
|
637
|
-
|
|
641
|
+
addTextTrackInternal(t, i, o = "", a = !1) {
|
|
642
|
+
const u = document.createElement("track");
|
|
643
|
+
u.kind = "subtitles", u.label = i, u.src = t, u.srclang = o, a && (u.default = !0), this.video.appendChild(u);
|
|
638
644
|
}
|
|
639
645
|
play() {
|
|
640
646
|
return this.video.play();
|
|
@@ -707,8 +713,8 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
707
713
|
if (i) {
|
|
708
714
|
i.drawImage(this.video, 0, 0, t.width, t.height);
|
|
709
715
|
try {
|
|
710
|
-
const o = t.toDataURL("image/png"),
|
|
711
|
-
|
|
716
|
+
const o = t.toDataURL("image/png"), a = document.createElement("a");
|
|
717
|
+
a.download = `screenshot-${(/* @__PURE__ */ new Date()).toISOString()}.png`, a.href = o, a.click(), this.notify({ type: "success", message: "Screenshot saved", duration: 2e3 });
|
|
712
718
|
} catch {
|
|
713
719
|
this.notify({ type: "error", message: "Failed to take screenshot", duration: 3e3 });
|
|
714
720
|
}
|
|
@@ -726,26 +732,33 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
726
732
|
[t]: !i[t]
|
|
727
733
|
};
|
|
728
734
|
this.store.setState({ flipState: o });
|
|
729
|
-
const
|
|
730
|
-
this.video.style.transform = `scale(${
|
|
735
|
+
const a = o.horizontal ? -1 : 1, u = o.vertical ? -1 : 1;
|
|
736
|
+
this.video.style.transform = `scale(${a}, ${u})`;
|
|
731
737
|
}
|
|
732
738
|
setAspectRatio(t) {
|
|
733
739
|
this.store.setState({ aspectRatio: t }), this.updateAspectRatio(), t !== "default" && this.notify({ type: "info", message: `Aspect Ratio: ${t}`, duration: 2e3 });
|
|
734
740
|
}
|
|
741
|
+
setVideoFit(t) {
|
|
742
|
+
this.store.setState({ videoFit: t }), this.video.style.objectFit = t, this.updateAspectRatio();
|
|
743
|
+
}
|
|
744
|
+
setBrightness(t) {
|
|
745
|
+
const i = Math.max(0, Math.min(t, 2));
|
|
746
|
+
this.store.setState({ brightness: i }), this.video.style.filter = `brightness(${i})`;
|
|
747
|
+
}
|
|
735
748
|
updateAspectRatio() {
|
|
736
749
|
if (!this.container) return;
|
|
737
|
-
const { aspectRatio: t,
|
|
750
|
+
const { aspectRatio: t, videoFit: i } = this.store.get();
|
|
738
751
|
if (t === "default") {
|
|
739
|
-
this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = i
|
|
752
|
+
this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = i;
|
|
740
753
|
return;
|
|
741
754
|
}
|
|
742
|
-
const [o,
|
|
743
|
-
if (!o || !
|
|
744
|
-
const
|
|
745
|
-
if (
|
|
746
|
-
const f =
|
|
747
|
-
let
|
|
748
|
-
f >
|
|
755
|
+
const [o, a] = t.split(":").map(Number);
|
|
756
|
+
if (!o || !a) return;
|
|
757
|
+
const u = o / a, h = this.container.getBoundingClientRect();
|
|
758
|
+
if (h.width === 0 || h.height === 0) return;
|
|
759
|
+
const f = h.width / h.height;
|
|
760
|
+
let x, b;
|
|
761
|
+
f > u ? (b = h.height, x = b * u) : (x = h.width, b = x / u), this.video.style.width = `${x}px`, this.video.style.height = `${b}px`, this.video.style.objectFit = "fill";
|
|
749
762
|
}
|
|
750
763
|
initCast() {
|
|
751
764
|
const t = window, i = () => {
|
|
@@ -783,10 +796,10 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
783
796
|
try {
|
|
784
797
|
const i = t.cast.framework.CastContext.getInstance().getCurrentSession();
|
|
785
798
|
if (!i) return;
|
|
786
|
-
const o = new t.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"),
|
|
787
|
-
i.loadMedia(
|
|
799
|
+
const o = new t.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"), a = new t.chrome.cast.media.LoadRequest(o);
|
|
800
|
+
i.loadMedia(a).then(() => {
|
|
788
801
|
this.notify({ type: "success", message: "Casting...", duration: 3e3 });
|
|
789
|
-
}).catch((
|
|
802
|
+
}).catch((u) => console.error("Cast load error", u));
|
|
790
803
|
} catch (i) {
|
|
791
804
|
console.error("Failed to load media into Cast session", i);
|
|
792
805
|
}
|
|
@@ -796,66 +809,67 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
796
809
|
this.store.setState({ activeCues: [] });
|
|
797
810
|
return;
|
|
798
811
|
}
|
|
799
|
-
const o = Array.from(this.video.textTracks).filter((
|
|
812
|
+
const o = Array.from(this.video.textTracks).filter((a) => a.kind === "subtitles" || a.kind === "captions").find((a) => a.mode === "showing" || a.mode === "hidden");
|
|
800
813
|
if (o && o.activeCues) {
|
|
801
|
-
const
|
|
802
|
-
this.store.setState({ activeCues:
|
|
814
|
+
const a = Array.from(o.activeCues).map((u) => u.text);
|
|
815
|
+
this.store.setState({ activeCues: a });
|
|
803
816
|
} else
|
|
804
817
|
this.store.setState({ activeCues: [] });
|
|
805
818
|
}
|
|
806
819
|
async setSubtitle(t) {
|
|
807
820
|
const o = this.store.get().subtitleTracks[t];
|
|
808
|
-
if (Array.from(this.video.textTracks).forEach((
|
|
809
|
-
|
|
821
|
+
if (Array.from(this.video.textTracks).forEach((h) => {
|
|
822
|
+
h.removeEventListener("cuechange", this.boundCueChange), h.mode = "disabled";
|
|
810
823
|
}), this.store.setState({ currentSubtitle: t, subtitleOffset: 0, activeCues: [] }), t === -1 || !o) return;
|
|
811
824
|
if (o.status === "idle" || o.status === "error") {
|
|
812
825
|
this.updateSubtitleTrackState(t, { status: "loading" });
|
|
813
826
|
try {
|
|
814
827
|
let f = await (await this.fetchWithRetry(o.src)).text();
|
|
815
828
|
f = this.convertToVTT(f);
|
|
816
|
-
const
|
|
817
|
-
this.addTextTrackInternal(
|
|
818
|
-
} catch (
|
|
819
|
-
this.updateSubtitleTrackState(t, { status: "error" }), console.error("Failed to load subtitle",
|
|
829
|
+
const x = new Blob([f], { type: "text/vtt" }), b = URL.createObjectURL(x);
|
|
830
|
+
this.addTextTrackInternal(b, o.label, o.srcLang, !1), this.updateSubtitleTrackState(t, { status: "success" });
|
|
831
|
+
} catch (h) {
|
|
832
|
+
this.updateSubtitleTrackState(t, { status: "error" }), console.error("Failed to load subtitle", h);
|
|
820
833
|
return;
|
|
821
834
|
}
|
|
822
835
|
}
|
|
823
|
-
const
|
|
824
|
-
let
|
|
825
|
-
if (
|
|
826
|
-
const
|
|
827
|
-
|
|
836
|
+
const a = Array.from(this.video.textTracks);
|
|
837
|
+
let u = a.find((h) => h.label === o.label && h.language === o.srcLang);
|
|
838
|
+
if (u || (u = a.find((h) => h.label === o.label)), u) {
|
|
839
|
+
const h = this.store.get().subtitleSettings;
|
|
840
|
+
u.mode = h.useNative ? "showing" : "hidden", u.addEventListener("cuechange", this.boundCueChange), this.handleCueChange();
|
|
828
841
|
}
|
|
829
842
|
}
|
|
830
843
|
updateSubtitleSettings(t) {
|
|
831
844
|
const o = { ...this.store.get().subtitleSettings, ...t };
|
|
832
845
|
if (this.store.setState({ subtitleSettings: o }), t.useNative !== void 0) {
|
|
833
|
-
const
|
|
834
|
-
if (
|
|
835
|
-
const
|
|
846
|
+
const a = this.store.get().currentSubtitle;
|
|
847
|
+
if (a !== -1) {
|
|
848
|
+
const h = this.store.get().subtitleTracks[a], f = Array.from(this.video.textTracks).find((x) => x.label === h.label && x.language === h.srcLang);
|
|
836
849
|
f && (f.mode = t.useNative ? "showing" : "hidden");
|
|
837
850
|
}
|
|
838
851
|
}
|
|
839
852
|
}
|
|
840
853
|
resetSubtitleSettings() {
|
|
841
|
-
this.store.setState({ subtitleSettings:
|
|
854
|
+
this.store.setState({ subtitleSettings: rt }), this.updateSubtitleSettings({ useNative: !1 });
|
|
842
855
|
}
|
|
843
856
|
setSubtitleOffset(t) {
|
|
844
857
|
const i = this.store.get().subtitleOffset, o = t - i;
|
|
845
|
-
Math.abs(o) < 1e-3 || (Array.from(this.video.textTracks).forEach((
|
|
846
|
-
(
|
|
847
|
-
|
|
858
|
+
Math.abs(o) < 1e-3 || (Array.from(this.video.textTracks).forEach((a) => {
|
|
859
|
+
(a.mode === "showing" || a.mode === "hidden") && a.cues && Array.from(a.cues).forEach((u) => {
|
|
860
|
+
u.startTime += o, u.endTime += o;
|
|
848
861
|
});
|
|
849
862
|
}), this.store.setState({ subtitleOffset: t }), this.notify({ type: "info", message: `Subtitle Offset: ${t > 0 ? "+" : ""}${t.toFixed(1)}s`, duration: 1500 }));
|
|
850
863
|
}
|
|
851
|
-
cancelDownload() {
|
|
852
|
-
|
|
864
|
+
cancelDownload(t) {
|
|
865
|
+
var i;
|
|
866
|
+
t && this.activeDownloads.has(t) ? ((i = this.activeDownloads.get(t)) == null || i.abort(), this.activeDownloads.delete(t), this.notify({ type: "info", message: "Download cancelled", duration: 2e3 }), this.removeNotification(t)) : t || this.activeDownloads.size > 0 && (this.activeDownloads.forEach((o) => o.abort()), this.activeDownloads.clear(), this.notify({ type: "info", message: "All downloads cancelled", duration: 2e3 }));
|
|
853
867
|
}
|
|
854
868
|
async download(t = {}) {
|
|
855
|
-
var h,
|
|
869
|
+
var h, f, x;
|
|
856
870
|
const i = ((h = this.currentSource) == null ? void 0 : h.url) || this.video.src;
|
|
857
871
|
if (!i) return;
|
|
858
|
-
if (i.includes(".m3u8") || ((
|
|
872
|
+
if (i.includes(".m3u8") || ((f = this.currentSource) == null ? void 0 : f.type) === "hls") {
|
|
859
873
|
this.downloadHls(i, t.format || "ts");
|
|
860
874
|
return;
|
|
861
875
|
}
|
|
@@ -863,172 +877,186 @@ Retrying (${this.retryCount}/${this.maxRetries})`
|
|
|
863
877
|
this.notify({ type: "warning", message: "Stream download not supported in browser.", duration: 4e3 });
|
|
864
878
|
return;
|
|
865
879
|
}
|
|
866
|
-
|
|
867
|
-
|
|
880
|
+
const o = Math.random().toString(36).substr(2, 9), a = new AbortController();
|
|
881
|
+
this.activeDownloads.set(o, a);
|
|
882
|
+
const u = a.signal;
|
|
883
|
+
this.notify({
|
|
884
|
+
id: o,
|
|
868
885
|
type: "loading",
|
|
869
886
|
message: "Preparing download",
|
|
870
|
-
// Removed ...
|
|
871
887
|
progress: 0,
|
|
872
888
|
action: {
|
|
873
889
|
label: "Cancel",
|
|
874
|
-
onClick: () => this.cancelDownload()
|
|
890
|
+
onClick: () => this.cancelDownload(o)
|
|
875
891
|
}
|
|
876
892
|
});
|
|
877
893
|
try {
|
|
878
|
-
const
|
|
879
|
-
if (!
|
|
880
|
-
const
|
|
881
|
-
let
|
|
882
|
-
const
|
|
894
|
+
const b = await this.fetchWithRetry(i, 3, void 0, u);
|
|
895
|
+
if (!b.body) throw new Error("No body");
|
|
896
|
+
const m = b.body.getReader(), v = b.headers.get("Content-Length"), p = v ? parseInt(v, 10) : 0;
|
|
897
|
+
let S = 0;
|
|
898
|
+
const $ = [], U = Date.now(), H = [];
|
|
899
|
+
let q = 0;
|
|
883
900
|
for (; ; ) {
|
|
884
|
-
const { done:
|
|
885
|
-
if (
|
|
886
|
-
if (
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
j = `
|
|
901
|
-
${this.formatDuration(s)} remaining`;
|
|
902
|
-
}
|
|
903
|
-
this.notify({
|
|
904
|
-
id: r,
|
|
905
|
-
type: "loading",
|
|
906
|
-
// Cleaned string
|
|
907
|
-
message: `${j}`,
|
|
908
|
-
progress: $,
|
|
909
|
-
action: {
|
|
910
|
-
label: "Cancel",
|
|
911
|
-
onClick: () => this.cancelDownload()
|
|
901
|
+
const { done: fe, value: k } = await m.read();
|
|
902
|
+
if (fe) break;
|
|
903
|
+
if ($.push(k), S += k.length, p) {
|
|
904
|
+
const j = Date.now();
|
|
905
|
+
if (j - q > 800 || S === p) {
|
|
906
|
+
q = j;
|
|
907
|
+
const D = Math.round(S / p * 100);
|
|
908
|
+
for (H.push({ time: j, loaded: S }); H.length > 0 && j - H[0].time > 5e3; )
|
|
909
|
+
H.shift();
|
|
910
|
+
let T = "", n = 0;
|
|
911
|
+
if (H.length > 1) {
|
|
912
|
+
const X = H[0], _ = H[H.length - 1], ne = _.time - X.time, re = _.loaded - X.loaded;
|
|
913
|
+
ne > 0 && (n = re / ne);
|
|
914
|
+
} else {
|
|
915
|
+
const X = j - U;
|
|
916
|
+
X > 0 && (n = S / X);
|
|
912
917
|
}
|
|
913
|
-
|
|
918
|
+
if (n > 0) {
|
|
919
|
+
const _ = (p - S) / n;
|
|
920
|
+
T = `
|
|
921
|
+
${this.formatDuration(_)} remaining`;
|
|
922
|
+
}
|
|
923
|
+
this.notify({
|
|
924
|
+
id: o,
|
|
925
|
+
type: "loading",
|
|
926
|
+
// Cleaned string
|
|
927
|
+
message: `${T}`,
|
|
928
|
+
progress: D,
|
|
929
|
+
action: {
|
|
930
|
+
label: "Cancel",
|
|
931
|
+
onClick: () => this.cancelDownload(o)
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
}
|
|
914
935
|
}
|
|
915
936
|
}
|
|
916
|
-
const
|
|
917
|
-
|
|
937
|
+
const g = new Blob($), Y = window.URL.createObjectURL(g), G = document.createElement("a");
|
|
938
|
+
G.style.display = "none", G.href = Y, G.download = ((x = i.split("/").pop()) == null ? void 0 : x.split("?")[0]) || "video.mp4", document.body.appendChild(G), G.click(), window.URL.revokeObjectURL(Y), document.body.removeChild(G), this.notify({ id: o, type: "success", message: "Saved!", duration: 3e3 });
|
|
918
939
|
} catch {
|
|
919
|
-
|
|
940
|
+
u.aborted ? this.removeNotification(o) : (this.notify({ id: o, type: "error", message: "Download failed.", duration: 4e3 }), window.open(i, "_blank"));
|
|
920
941
|
} finally {
|
|
921
|
-
this.
|
|
942
|
+
this.activeDownloads.delete(o);
|
|
922
943
|
}
|
|
923
944
|
}
|
|
924
945
|
async downloadHls(t, i) {
|
|
925
946
|
var h;
|
|
926
|
-
|
|
927
|
-
|
|
947
|
+
const o = Math.random().toString(36).substr(2, 9), a = new AbortController();
|
|
948
|
+
this.activeDownloads.set(o, a);
|
|
949
|
+
const u = a.signal;
|
|
950
|
+
this.notify({
|
|
951
|
+
id: o,
|
|
928
952
|
type: "loading",
|
|
929
953
|
message: "Analyzing HLS stream",
|
|
930
|
-
// Removed ...
|
|
931
954
|
progress: 0,
|
|
932
|
-
action: { label: "Cancel", onClick: () => this.cancelDownload() }
|
|
955
|
+
action: { label: "Cancel", onClick: () => this.cancelDownload(o) }
|
|
933
956
|
});
|
|
934
957
|
try {
|
|
935
|
-
let
|
|
936
|
-
if (
|
|
937
|
-
this.notify({ id:
|
|
938
|
-
const k =
|
|
958
|
+
let f = await this.fetchWithRetry(t, 3, void 0, u), x = await f.text(), b = t.substring(0, t.lastIndexOf("/") + 1);
|
|
959
|
+
if (x.includes("#EXT-X-STREAM-INF")) {
|
|
960
|
+
this.notify({ id: o, type: "loading", message: "Selecting best quality", progress: 0 });
|
|
961
|
+
const k = x.split(`
|
|
939
962
|
`);
|
|
940
|
-
let
|
|
941
|
-
for (let
|
|
942
|
-
if (k[
|
|
943
|
-
const
|
|
944
|
-
if (
|
|
945
|
-
const
|
|
946
|
-
let
|
|
947
|
-
|
|
963
|
+
let j = 0, D = "";
|
|
964
|
+
for (let T = 0; T < k.length; T++)
|
|
965
|
+
if (k[T].includes("#EXT-X-STREAM-INF")) {
|
|
966
|
+
const n = k[T].match(/BANDWIDTH=(\d+)/);
|
|
967
|
+
if (n) {
|
|
968
|
+
const X = parseInt(n[1]);
|
|
969
|
+
let _ = (h = k[T + 1]) == null ? void 0 : h.trim();
|
|
970
|
+
_ && !_.startsWith("#") && X > j && (j = X, D = _);
|
|
948
971
|
}
|
|
949
972
|
}
|
|
950
|
-
|
|
973
|
+
D && (D.startsWith("http") || (D = b + D), f = await this.fetchWithRetry(D, 3, void 0, u), x = await f.text(), b = D.substring(0, D.lastIndexOf("/") + 1));
|
|
951
974
|
}
|
|
952
|
-
if (
|
|
975
|
+
if (x.includes("#EXT-X-KEY"))
|
|
953
976
|
throw new Error("Encrypted HLS streams are not supported for download.");
|
|
954
|
-
const
|
|
955
|
-
`),
|
|
956
|
-
for (let k of
|
|
957
|
-
k = k.trim(), k && !k.startsWith("#") && (k.startsWith("http") ?
|
|
958
|
-
if (
|
|
959
|
-
let
|
|
977
|
+
const m = x.split(`
|
|
978
|
+
`), v = [];
|
|
979
|
+
for (let k of m)
|
|
980
|
+
k = k.trim(), k && !k.startsWith("#") && (k.startsWith("http") ? v.push(k) : v.push(b + k));
|
|
981
|
+
if (v.length === 0) throw new Error("No segments found.");
|
|
982
|
+
let p = i === "mp4" ? "mp4" : "ts", S = i === "mp4" ? "video/mp4" : "video/mp2t", $ = null, U = null, H = [];
|
|
960
983
|
if ("showSaveFilePicker" in window)
|
|
961
984
|
try {
|
|
962
|
-
|
|
963
|
-
suggestedName: `video.${
|
|
985
|
+
$ = await window.showSaveFilePicker({
|
|
986
|
+
suggestedName: `video.${p}`,
|
|
964
987
|
types: [{
|
|
965
988
|
description: i === "mp4" ? "MPEG-4 Video" : "MPEG Transport Stream",
|
|
966
|
-
accept: { [
|
|
989
|
+
accept: { [S]: [`.${p}`] }
|
|
967
990
|
}]
|
|
968
|
-
}),
|
|
991
|
+
}), U = await $.createWritable();
|
|
969
992
|
} catch (k) {
|
|
970
993
|
if (k.name === "AbortError") {
|
|
971
|
-
this.removeNotification(
|
|
994
|
+
this.removeNotification(o), this.notify({ type: "info", message: "Download cancelled", duration: 2e3 }), this.activeDownloads.delete(o);
|
|
972
995
|
return;
|
|
973
996
|
}
|
|
974
997
|
console.warn("File System API cancelled or failed, falling back to memory", k);
|
|
975
998
|
}
|
|
976
|
-
let
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
999
|
+
let g = !1;
|
|
1000
|
+
const Y = Date.now(), G = [];
|
|
1001
|
+
let fe = 0;
|
|
1002
|
+
for (let k = 0; k < v.length && !u.aborted; k++) {
|
|
1003
|
+
const j = Date.now();
|
|
1004
|
+
if (j - fe > 800 || k === 0 || k === v.length - 1) {
|
|
1005
|
+
fe = j;
|
|
1006
|
+
const X = Math.round((k + 1) / v.length * 100);
|
|
1007
|
+
for (G.push({ time: j, count: k + 1 }); G.length > 0 && j - G[0].time > 5e3; )
|
|
1008
|
+
G.shift();
|
|
1009
|
+
let _ = "";
|
|
1010
|
+
if (G.length > 1) {
|
|
1011
|
+
const ne = G[0], re = G[G.length - 1], be = re.time - ne.time, ge = re.count - ne.count;
|
|
1012
|
+
if (be > 0 && ge > 0) {
|
|
1013
|
+
const Te = be / ge, je = (v.length - (k + 1)) * Te;
|
|
1014
|
+
_ = `
|
|
1015
|
+
${this.formatDuration(je)} remaining`;
|
|
1016
|
+
}
|
|
1017
|
+
} else if (k > 0) {
|
|
1018
|
+
const re = (j - Y) / k, ge = (v.length - k) * re;
|
|
1019
|
+
_ = `
|
|
1020
|
+
${this.formatDuration(ge)} remaining`;
|
|
989
1021
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1022
|
+
this.notify({
|
|
1023
|
+
id: o,
|
|
1024
|
+
type: "loading",
|
|
1025
|
+
// Cleaned string
|
|
1026
|
+
message: `Downloading segment ${k + 1}/${v.length}${_}`,
|
|
1027
|
+
progress: X,
|
|
1028
|
+
action: { label: "Cancel", onClick: () => this.cancelDownload(o) }
|
|
1029
|
+
});
|
|
994
1030
|
}
|
|
995
|
-
this.
|
|
996
|
-
|
|
997
|
-
type: "loading",
|
|
998
|
-
// Cleaned string
|
|
999
|
-
message: `Downloading segment ${k + 1}/${p.length}${j}`,
|
|
1000
|
-
progress: q,
|
|
1001
|
-
action: { label: "Cancel", onClick: () => this.cancelDownload() }
|
|
1002
|
-
});
|
|
1003
|
-
const P = await (await this.fetchWithRetry(p[k], 3, void 0, o)).arrayBuffer();
|
|
1004
|
-
k === 0 && new Uint8Array(P.slice(0, 4))[0] === 71 && (W = !0, i === "mp4" && (this.notify({
|
|
1031
|
+
const T = await (await this.fetchWithRetry(v[k], 3, void 0, u)).arrayBuffer();
|
|
1032
|
+
k === 0 && new Uint8Array(T.slice(0, 4))[0] === 71 && (g = !0, i === "mp4" && (this.notify({
|
|
1005
1033
|
type: "info",
|
|
1006
1034
|
message: "Stream is MPEG-TS. Downloading as .ts to prevent corruption.",
|
|
1007
1035
|
duration: 5e3
|
|
1008
|
-
}),
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1036
|
+
}), p = "ts", S = "video/mp2t"));
|
|
1037
|
+
const n = new Blob([T]);
|
|
1038
|
+
U ? await U.write(n) : H.push(n);
|
|
1011
1039
|
}
|
|
1012
|
-
if (
|
|
1013
|
-
throw
|
|
1014
|
-
if (
|
|
1015
|
-
await
|
|
1040
|
+
if (u.aborted)
|
|
1041
|
+
throw U && await U.abort(), new Error("Aborted");
|
|
1042
|
+
if (U)
|
|
1043
|
+
await U.close(), this.notify({ id: o, type: "success", message: "Download complete!", duration: 3e3 });
|
|
1016
1044
|
else {
|
|
1017
|
-
this.notify({ id:
|
|
1018
|
-
const k = new Blob(
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1045
|
+
this.notify({ id: o, type: "loading", message: "Stitching video", progress: 100 });
|
|
1046
|
+
const k = new Blob(H, { type: S }), j = window.URL.createObjectURL(k), D = document.createElement("a");
|
|
1047
|
+
D.style.display = "none", D.href = j;
|
|
1048
|
+
const T = i === "mp4" && g ? "ts" : p;
|
|
1049
|
+
D.download = `video.${T}`, document.body.appendChild(D), D.click(), window.URL.revokeObjectURL(j), document.body.removeChild(D), this.notify({ id: o, type: "success", message: "Saved!", duration: 3e3 });
|
|
1022
1050
|
}
|
|
1023
|
-
} catch (
|
|
1024
|
-
|
|
1051
|
+
} catch (f) {
|
|
1052
|
+
u.aborted ? this.removeNotification(o) : this.notify({ id: o, type: "error", message: `Download failed: ${f.message}`, duration: 4e3 });
|
|
1025
1053
|
} finally {
|
|
1026
|
-
this.
|
|
1054
|
+
this.activeDownloads.delete(o);
|
|
1027
1055
|
}
|
|
1028
1056
|
}
|
|
1029
1057
|
notify(t) {
|
|
1030
1058
|
const i = t.id || Math.random().toString(36).substr(2, 9), o = { ...t, id: i };
|
|
1031
|
-
return this.store.setState((
|
|
1059
|
+
return this.store.setState((a) => a.notifications.find((h) => h.id === i) ? { notifications: a.notifications.map((h) => h.id === i ? o : h) } : { notifications: [...a.notifications, o] }), t.duration && setTimeout(() => this.removeNotification(i), t.duration), i;
|
|
1032
1060
|
}
|
|
1033
1061
|
removeNotification(t) {
|
|
1034
1062
|
const i = this.store.get().notifications;
|
|
@@ -1041,112 +1069,112 @@ ${this.formatDuration(ce)} remaining`;
|
|
|
1041
1069
|
}));
|
|
1042
1070
|
}
|
|
1043
1071
|
destroy() {
|
|
1044
|
-
this.retryTimer && clearTimeout(this.retryTimer), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.
|
|
1072
|
+
this.retryTimer && clearTimeout(this.retryTimer), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.activeDownloads.forEach((i) => i.abort()), this.activeDownloads.clear(), this.store.get().isWebFullscreen && typeof document < "u" && (document.body.style.overflow = ""), document.removeEventListener("fullscreenchange", this.boundFullscreenChange), this.video.pause(), this.video.src = "";
|
|
1045
1073
|
const t = this.video.getElementsByTagName("track");
|
|
1046
1074
|
for (; t.length > 0; ) t[0].remove();
|
|
1047
1075
|
this.emit("destroy"), this.events.destroy(), this.store.destroy(), this.plugins.forEach((i) => i.destroy && i.destroy()), this.plugins.clear(), this.video.remove(), this.audioEngine.destroy();
|
|
1048
1076
|
}
|
|
1049
1077
|
}
|
|
1050
|
-
const
|
|
1051
|
-
const [i, o] =
|
|
1052
|
-
return
|
|
1053
|
-
if (
|
|
1078
|
+
const st = (s, t = 200) => {
|
|
1079
|
+
const [i, o] = M(s), [a, u] = M(!1);
|
|
1080
|
+
return ee(() => {
|
|
1081
|
+
if (s)
|
|
1054
1082
|
o(!0), requestAnimationFrame(() => {
|
|
1055
1083
|
requestAnimationFrame(() => {
|
|
1056
|
-
|
|
1084
|
+
u(!0);
|
|
1057
1085
|
});
|
|
1058
1086
|
});
|
|
1059
1087
|
else {
|
|
1060
|
-
|
|
1061
|
-
const
|
|
1088
|
+
u(!1);
|
|
1089
|
+
const h = setTimeout(() => {
|
|
1062
1090
|
o(!1);
|
|
1063
1091
|
}, t);
|
|
1064
|
-
return () => clearTimeout(
|
|
1092
|
+
return () => clearTimeout(h);
|
|
1065
1093
|
}
|
|
1066
|
-
}, [
|
|
1094
|
+
}, [s, t]), { isMounted: i, isVisible: a };
|
|
1067
1095
|
}, y = ({
|
|
1068
|
-
className:
|
|
1096
|
+
className: s,
|
|
1069
1097
|
children: t,
|
|
1070
1098
|
fill: i = "none",
|
|
1071
1099
|
strokeWidth: o = 2,
|
|
1072
|
-
viewBox:
|
|
1100
|
+
viewBox: a = "0 0 24 24"
|
|
1073
1101
|
}) => /* @__PURE__ */ e(
|
|
1074
1102
|
"svg",
|
|
1075
1103
|
{
|
|
1076
1104
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1077
|
-
viewBox:
|
|
1105
|
+
viewBox: a,
|
|
1078
1106
|
fill: i,
|
|
1079
1107
|
stroke: "currentColor",
|
|
1080
1108
|
strokeWidth: o,
|
|
1081
1109
|
strokeLinecap: "round",
|
|
1082
1110
|
strokeLinejoin: "round",
|
|
1083
|
-
className:
|
|
1111
|
+
className: s,
|
|
1084
1112
|
children: t
|
|
1085
1113
|
}
|
|
1086
|
-
),
|
|
1114
|
+
), Ht = ({ className: s }) => /* @__PURE__ */ e(y, { className: s, children: /* @__PURE__ */ e("polygon", { points: "5 3 19 12 5 21 5 3" }) }), Wt = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1087
1115
|
/* @__PURE__ */ e("rect", { width: "4", height: "16", x: "6", y: "4", rx: "1" }),
|
|
1088
1116
|
/* @__PURE__ */ e("rect", { width: "4", height: "16", x: "14", y: "4", rx: "1" })
|
|
1089
|
-
] }),
|
|
1117
|
+
] }), jt = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1090
1118
|
/* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
1091
1119
|
/* @__PURE__ */ e("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
|
|
1092
1120
|
/* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
1093
|
-
] }),
|
|
1121
|
+
] }), Ei = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1094
1122
|
/* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
1095
1123
|
/* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
1096
|
-
] }),
|
|
1124
|
+
] }), Ut = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1097
1125
|
/* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
1098
1126
|
/* @__PURE__ */ e("line", { x1: "23", x2: "17", y1: "9", y2: "15" }),
|
|
1099
1127
|
/* @__PURE__ */ e("line", { x1: "17", x2: "23", y1: "9", y2: "15" })
|
|
1100
|
-
] }),
|
|
1128
|
+
] }), Ai = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1101
1129
|
/* @__PURE__ */ e("path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }),
|
|
1102
1130
|
/* @__PURE__ */ e("path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }),
|
|
1103
1131
|
/* @__PURE__ */ e("path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }),
|
|
1104
1132
|
/* @__PURE__ */ e("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
1105
|
-
] }),
|
|
1133
|
+
] }), Vi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1106
1134
|
/* @__PURE__ */ e("path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }),
|
|
1107
1135
|
/* @__PURE__ */ e("path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }),
|
|
1108
1136
|
/* @__PURE__ */ e("path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }),
|
|
1109
1137
|
/* @__PURE__ */ e("path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" })
|
|
1110
|
-
] }),
|
|
1138
|
+
] }), Bi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1111
1139
|
/* @__PURE__ */ e("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.47a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
|
|
1112
1140
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
1113
|
-
] }),
|
|
1141
|
+
] }), He = ({ className: s }) => /* @__PURE__ */ e(y, { className: s, children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" }) }), Di = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1114
1142
|
/* @__PURE__ */ e("path", { d: "M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" }),
|
|
1115
1143
|
/* @__PURE__ */ e("rect", { x: "12", y: "13", width: "10", height: "7", rx: "2" })
|
|
1116
|
-
] }),
|
|
1144
|
+
] }), Oi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1117
1145
|
/* @__PURE__ */ e("rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2" }),
|
|
1118
1146
|
/* @__PURE__ */ e("path", { d: "M7 15h4" }),
|
|
1119
1147
|
/* @__PURE__ */ e("path", { d: "M15 15h2" }),
|
|
1120
1148
|
/* @__PURE__ */ e("path", { d: "M7 11h2" }),
|
|
1121
1149
|
/* @__PURE__ */ e("path", { d: "M13 11h4" })
|
|
1122
|
-
] }),
|
|
1150
|
+
] }), ot = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1123
1151
|
/* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
1124
1152
|
/* @__PURE__ */ e("polyline", { points: "7 10 12 15 17 10" }),
|
|
1125
1153
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "15", y2: "3" })
|
|
1126
|
-
] }),
|
|
1154
|
+
] }), Hi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1127
1155
|
/* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
1128
1156
|
/* @__PURE__ */ e("polyline", { points: "17 8 12 3 7 8" }),
|
|
1129
1157
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
1130
|
-
] }),
|
|
1158
|
+
] }), Wi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1131
1159
|
/* @__PURE__ */ e("path", { d: "m12 19-7-7 7-7" }),
|
|
1132
1160
|
/* @__PURE__ */ e("path", { d: "M19 12H5" })
|
|
1133
|
-
] }),
|
|
1161
|
+
] }), De = ({ className: s }) => /* @__PURE__ */ e(y, { className: s, children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }), ji = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1134
1162
|
/* @__PURE__ */ e("path", { d: "M2 16.1A5 5 0 0 1 5.9 20" }),
|
|
1135
1163
|
/* @__PURE__ */ e("path", { d: "M2 12.05A9 9 0 0 1 9.95 20" }),
|
|
1136
1164
|
/* @__PURE__ */ e("path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }),
|
|
1137
1165
|
/* @__PURE__ */ e("line", { x1: "2", x2: "2.01", y1: "20", y2: "20" })
|
|
1138
|
-
] }),
|
|
1166
|
+
] }), Ui = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1139
1167
|
/* @__PURE__ */ e("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
1140
1168
|
/* @__PURE__ */ e("circle", { cx: "9", cy: "7", r: "4" }),
|
|
1141
1169
|
/* @__PURE__ */ e("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
1142
1170
|
/* @__PURE__ */ e("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
1143
|
-
] }),
|
|
1171
|
+
] }), Gi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1144
1172
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1145
1173
|
/* @__PURE__ */ e("polyline", { points: "12 6 12 12 16 14" })
|
|
1146
|
-
] }),
|
|
1174
|
+
] }), _i = ({ className: s }) => /* @__PURE__ */ e(y, { className: s, children: /* @__PURE__ */ e("path", { d: "M5 12h14" }) }), qi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1147
1175
|
/* @__PURE__ */ e("path", { d: "M5 12h14" }),
|
|
1148
1176
|
/* @__PURE__ */ e("path", { d: "M12 5v14" })
|
|
1149
|
-
] }),
|
|
1177
|
+
] }), Zt = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1150
1178
|
/* @__PURE__ */ e("path", { d: "M4 21v-7" }),
|
|
1151
1179
|
/* @__PURE__ */ e("path", { d: "M4 10V3" }),
|
|
1152
1180
|
/* @__PURE__ */ e("path", { d: "M12 21v-9" }),
|
|
@@ -1156,122 +1184,136 @@ const Ke = (n, t = 200) => {
|
|
|
1156
1184
|
/* @__PURE__ */ e("path", { d: "M1 14h6" }),
|
|
1157
1185
|
/* @__PURE__ */ e("path", { d: "M9 8h6" }),
|
|
1158
1186
|
/* @__PURE__ */ e("path", { d: "M17 16h6" })
|
|
1159
|
-
] }),
|
|
1187
|
+
] }), Xi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1160
1188
|
/* @__PURE__ */ e("polyline", { points: "4 7 4 4 20 4 20 7" }),
|
|
1161
1189
|
/* @__PURE__ */ e("line", { x1: "9", x2: "15", y1: "20", y2: "20" }),
|
|
1162
1190
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "4", y2: "20" })
|
|
1163
|
-
] }),
|
|
1191
|
+
] }), ei = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1164
1192
|
/* @__PURE__ */ e("circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor" }),
|
|
1165
1193
|
/* @__PURE__ */ e("circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor" }),
|
|
1166
1194
|
/* @__PURE__ */ e("circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor" }),
|
|
1167
1195
|
/* @__PURE__ */ e("circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor" }),
|
|
1168
1196
|
/* @__PURE__ */ e("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z" })
|
|
1169
|
-
] }),
|
|
1197
|
+
] }), Qi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1170
1198
|
/* @__PURE__ */ e("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
1171
1199
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
1172
|
-
] }),
|
|
1200
|
+
] }), Yi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1173
1201
|
/* @__PURE__ */ e("polyline", { points: "8 18 12 22 16 18" }),
|
|
1174
1202
|
/* @__PURE__ */ e("polyline", { points: "8 6 12 2 16 6" }),
|
|
1175
1203
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "2", y2: "22" })
|
|
1176
|
-
] }),
|
|
1204
|
+
] }), Ji = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1177
1205
|
/* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
1178
1206
|
/* @__PURE__ */ e("path", { d: "M3 3v5h5" })
|
|
1179
|
-
] }),
|
|
1207
|
+
] }), Ki = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1180
1208
|
/* @__PURE__ */ e("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
|
|
1181
1209
|
/* @__PURE__ */ e("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
|
|
1182
|
-
] }),
|
|
1210
|
+
] }), Zi = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1183
1211
|
/* @__PURE__ */ e("path", { d: "m3 17 4-10 4 10" }),
|
|
1184
1212
|
/* @__PURE__ */ e("path", { d: "M4 13h6" }),
|
|
1185
1213
|
/* @__PURE__ */ e("path", { d: "M15 12h4.5a2.5 2.5 0 0 1 0 5H15V7h4a2.5 2.5 0 0 1 0 5h-4" })
|
|
1186
|
-
] }),
|
|
1214
|
+
] }), es = ({ className: s }) => /* @__PURE__ */ e(y, { className: s, children: /* @__PURE__ */ e("path", { d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z" }) }), ts = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1187
1215
|
/* @__PURE__ */ e("path", { d: "M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z" }),
|
|
1188
1216
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "13", r: "3" })
|
|
1189
|
-
] }),
|
|
1217
|
+
] }), is = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1190
1218
|
/* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
1191
1219
|
/* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
1192
|
-
] }),
|
|
1220
|
+
] }), ss = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1193
1221
|
/* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
1194
1222
|
/* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
1195
|
-
] }),
|
|
1223
|
+
] }), ns = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1196
1224
|
/* @__PURE__ */ e("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
1197
1225
|
/* @__PURE__ */ e("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
1198
1226
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
1199
|
-
] }),
|
|
1227
|
+
] }), os = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1200
1228
|
/* @__PURE__ */ e("polygon", { points: "13 19 22 12 13 5 13 19" }),
|
|
1201
1229
|
/* @__PURE__ */ e("polygon", { points: "2 19 11 12 2 5 2 19" })
|
|
1202
|
-
] }),
|
|
1230
|
+
] }), ti = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1203
1231
|
/* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
|
|
1204
1232
|
/* @__PURE__ */ e("path", { d: "m6 6 12 12" })
|
|
1205
|
-
] }),
|
|
1233
|
+
] }), as = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1206
1234
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1207
1235
|
/* @__PURE__ */ e("path", { d: "M12 16v-4" }),
|
|
1208
1236
|
/* @__PURE__ */ e("path", { d: "M12 8h.01" })
|
|
1209
|
-
] }),
|
|
1237
|
+
] }), rs = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1210
1238
|
/* @__PURE__ */ e("rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2" }),
|
|
1211
1239
|
/* @__PURE__ */ e("rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2" }),
|
|
1212
1240
|
/* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }),
|
|
1213
1241
|
/* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "18", y2: "18" })
|
|
1214
|
-
] }),
|
|
1242
|
+
] }), ls = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1215
1243
|
/* @__PURE__ */ e("path", { d: "M6 2v14a2 2 0 0 0 2 2h14" }),
|
|
1216
1244
|
/* @__PURE__ */ e("path", { d: "M18 22V8a2 2 0 0 0-2-2H2" })
|
|
1217
|
-
] }),
|
|
1245
|
+
] }), cs = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1218
1246
|
/* @__PURE__ */ e("rect", { width: "16", height: "20", x: "4", y: "2", rx: "2" }),
|
|
1219
1247
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "14", r: "4" }),
|
|
1220
1248
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12.01", y1: "6", y2: "6" })
|
|
1221
|
-
] }),
|
|
1249
|
+
] }), ds = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1222
1250
|
/* @__PURE__ */ e("path", { d: "m12 14 4-4" }),
|
|
1223
1251
|
/* @__PURE__ */ e("path", { d: "M3.34 19a10 10 0 1 1 17.32 0" })
|
|
1224
|
-
] }),
|
|
1252
|
+
] }), us = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1225
1253
|
/* @__PURE__ */ e("path", { d: "M9 18V5l12-2v13" }),
|
|
1226
1254
|
/* @__PURE__ */ e("circle", { cx: "6", cy: "18", r: "3" }),
|
|
1227
1255
|
/* @__PURE__ */ e("circle", { cx: "18", cy: "16", r: "3" })
|
|
1228
|
-
] }),
|
|
1256
|
+
] }), hs = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1229
1257
|
/* @__PURE__ */ e("path", { d: "M5 12.55a11 11 0 0 1 14.08 0" }),
|
|
1230
1258
|
/* @__PURE__ */ e("path", { d: "M1.42 9a16 16 0 0 1 21.16 0" }),
|
|
1231
1259
|
/* @__PURE__ */ e("path", { d: "M8.53 16.11a6 6 0 0 1 6.95 0" }),
|
|
1232
1260
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12.01", y1: "20", y2: "20" })
|
|
1233
|
-
] }),
|
|
1261
|
+
] }), at = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1234
1262
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1235
1263
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
|
|
1236
1264
|
/* @__PURE__ */ e("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
|
|
1237
|
-
] }),
|
|
1265
|
+
] }), ms = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1238
1266
|
/* @__PURE__ */ e("path", { d: "M2 20h.01" }),
|
|
1239
1267
|
/* @__PURE__ */ e("path", { d: "M7 20v-4" }),
|
|
1240
1268
|
/* @__PURE__ */ e("path", { d: "M12 20v-8" }),
|
|
1241
1269
|
/* @__PURE__ */ e("path", { d: "M17 20V8" }),
|
|
1242
1270
|
/* @__PURE__ */ e("path", { d: "M22 20V4" })
|
|
1243
|
-
] }),
|
|
1271
|
+
] }), ps = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1244
1272
|
/* @__PURE__ */ e("path", { d: "M21 7v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
1245
1273
|
/* @__PURE__ */ e("path", { d: "M16 2v4" }),
|
|
1246
1274
|
/* @__PURE__ */ e("path", { d: "M8 2v4" }),
|
|
1247
1275
|
/* @__PURE__ */ e("path", { d: "M3 12h18" })
|
|
1248
|
-
] }),
|
|
1276
|
+
] }), fs = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1249
1277
|
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "8" }),
|
|
1250
1278
|
/* @__PURE__ */ e("path", { d: "m21 21-4.3-4.3" })
|
|
1251
|
-
] }),
|
|
1279
|
+
] }), ii = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1252
1280
|
/* @__PURE__ */ e("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
1253
1281
|
/* @__PURE__ */ e("polyline", { points: "14 2 14 8 20 8" }),
|
|
1254
1282
|
/* @__PURE__ */ e("path", { d: "m9 15 2 2 4-4" })
|
|
1255
|
-
] }),
|
|
1283
|
+
] }), bs = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1256
1284
|
/* @__PURE__ */ e("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
1257
1285
|
/* @__PURE__ */ e("polyline", { points: "14 2 14 8 20 8" }),
|
|
1258
1286
|
/* @__PURE__ */ e("path", { d: "M12 18h.01" }),
|
|
1259
1287
|
/* @__PURE__ */ e("path", { d: "M12 12v4" })
|
|
1260
|
-
] }),
|
|
1261
|
-
/* @__PURE__ */
|
|
1288
|
+
] }), Gt = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1289
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "5" }),
|
|
1290
|
+
/* @__PURE__ */ e("path", { d: "M12 1v2" }),
|
|
1291
|
+
/* @__PURE__ */ e("path", { d: "M12 21v2" }),
|
|
1292
|
+
/* @__PURE__ */ e("path", { d: "M4.22 4.22l1.42 1.42" }),
|
|
1293
|
+
/* @__PURE__ */ e("path", { d: "M18.36 18.36l1.42 1.42" }),
|
|
1294
|
+
/* @__PURE__ */ e("path", { d: "M1 12h2" }),
|
|
1295
|
+
/* @__PURE__ */ e("path", { d: "M21 12h2" }),
|
|
1296
|
+
/* @__PURE__ */ e("path", { d: "M4.22 19.78l1.42-1.42" }),
|
|
1297
|
+
/* @__PURE__ */ e("path", { d: "M18.36 5.64l1.42-1.42" })
|
|
1298
|
+
] }), gs = ({ className: s }) => /* @__PURE__ */ c(y, { className: s, children: [
|
|
1299
|
+
/* @__PURE__ */ e("rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }),
|
|
1300
|
+
/* @__PURE__ */ e("rect", { width: "9", height: "7", x: "3", y: "14", rx: "1" }),
|
|
1301
|
+
/* @__PURE__ */ e("rect", { width: "5", height: "7", x: "16", y: "14", rx: "1" })
|
|
1302
|
+
] }), _t = ({ className: s }) => /* @__PURE__ */ c("div", { className: `relative flex items-center justify-center ${s}`, children: [
|
|
1303
|
+
/* @__PURE__ */ c(y, { className: "w-full h-full", children: [
|
|
1262
1304
|
/* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
1263
1305
|
/* @__PURE__ */ e("path", { d: "M3 3v5h5" })
|
|
1264
1306
|
] }),
|
|
1265
1307
|
/* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
1266
|
-
] }),
|
|
1267
|
-
/* @__PURE__ */
|
|
1308
|
+
] }), qt = ({ className: s }) => /* @__PURE__ */ c("div", { className: `relative flex items-center justify-center ${s}`, children: [
|
|
1309
|
+
/* @__PURE__ */ c(y, { className: "w-full h-full", children: [
|
|
1268
1310
|
/* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
1269
1311
|
/* @__PURE__ */ e("path", { d: "M21 3v5h-5" })
|
|
1270
1312
|
] }),
|
|
1271
1313
|
/* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
1272
|
-
] }),
|
|
1273
|
-
notifications:
|
|
1274
|
-
}) => /* @__PURE__ */ e("div", { className: "absolute top-4 left-4 z-[100] flex flex-col gap-2 pointer-events-none font-sans max-w-[85%] md:max-w-[280px]", children:
|
|
1314
|
+
] }), vs = ({
|
|
1315
|
+
notifications: s
|
|
1316
|
+
}) => /* @__PURE__ */ e("div", { className: "absolute top-4 left-4 z-[100] flex flex-col gap-2 pointer-events-none font-sans max-w-[85%] md:max-w-[280px]", children: s.map((t) => {
|
|
1275
1317
|
const i = typeof t.progress == "number";
|
|
1276
1318
|
return /* @__PURE__ */ e(
|
|
1277
1319
|
"div",
|
|
@@ -1282,12 +1324,12 @@ const Ke = (n, t = 200) => {
|
|
|
1282
1324
|
${i ? "w-64" : "w-auto max-w-full px-3 py-2.5"}
|
|
1283
1325
|
`,
|
|
1284
1326
|
style: { borderRadius: "var(--radius)" },
|
|
1285
|
-
children: i ? /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */ e("div", { className: "w-7 h-7 rounded-full bg-white/10 flex items-center justify-center text-[var(--accent)] shrink-0", children: /* @__PURE__ */ e(
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1327
|
+
children: i ? /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-3", children: [
|
|
1328
|
+
/* @__PURE__ */ e("div", { className: "w-7 h-7 rounded-full bg-white/10 flex items-center justify-center text-[var(--accent)] shrink-0", children: /* @__PURE__ */ e(ot, { className: "w-3.5 h-3.5" }) }),
|
|
1329
|
+
/* @__PURE__ */ c("div", { className: "flex-1 min-w-0 pt-0.5", children: [
|
|
1330
|
+
/* @__PURE__ */ c("div", { className: "flex justify-between items-baseline mb-1", children: [
|
|
1289
1331
|
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-white tracking-tight", children: "Downloading" }),
|
|
1290
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ c("span", { className: "text-[10px] font-mono text-zinc-400", children: [
|
|
1291
1333
|
t.progress,
|
|
1292
1334
|
"%"
|
|
1293
1335
|
] })
|
|
@@ -1305,28 +1347,28 @@ const Ke = (n, t = 200) => {
|
|
|
1305
1347
|
"button",
|
|
1306
1348
|
{
|
|
1307
1349
|
onClick: (o) => {
|
|
1308
|
-
var
|
|
1309
|
-
o.stopPropagation(), (
|
|
1350
|
+
var a;
|
|
1351
|
+
o.stopPropagation(), (a = t.action) == null || a.onClick();
|
|
1310
1352
|
},
|
|
1311
1353
|
className: "text-zinc-500 hover:text-zinc-200 transition-colors p-1 -mt-1.5 -mr-1.5",
|
|
1312
1354
|
title: t.action.label,
|
|
1313
|
-
children: /* @__PURE__ */ e(
|
|
1355
|
+
children: /* @__PURE__ */ e(ti, { className: "w-3.5 h-3.5" })
|
|
1314
1356
|
}
|
|
1315
1357
|
)
|
|
1316
|
-
] }) }) : /* @__PURE__ */
|
|
1317
|
-
t.type === "loading" && /* @__PURE__ */ e(
|
|
1318
|
-
t.type === "success" && /* @__PURE__ */ e(
|
|
1319
|
-
t.type === "error" && /* @__PURE__ */ e(
|
|
1320
|
-
t.type === "warning" && /* @__PURE__ */ e(
|
|
1358
|
+
] }) }) : /* @__PURE__ */ c("div", { className: "flex items-start gap-2.5", children: [
|
|
1359
|
+
t.type === "loading" && /* @__PURE__ */ e(De, { className: "w-3.5 h-3.5 animate-spin text-[var(--accent)] shrink-0 mt-0.5" }),
|
|
1360
|
+
t.type === "success" && /* @__PURE__ */ e(He, { className: "w-3.5 h-3.5 text-emerald-500 shrink-0 mt-0.5" }),
|
|
1361
|
+
t.type === "error" && /* @__PURE__ */ e(at, { className: "w-3.5 h-3.5 text-red-500 shrink-0 mt-0.5" }),
|
|
1362
|
+
t.type === "warning" && /* @__PURE__ */ e(at, { className: "w-3.5 h-3.5 text-amber-500 shrink-0 mt-0.5" }),
|
|
1321
1363
|
t.type === "info" && /* @__PURE__ */ e("div", { className: "w-1.5 h-1.5 rounded-full bg-[var(--accent)] mt-1.5 shrink-0" }),
|
|
1322
|
-
/* @__PURE__ */
|
|
1364
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
1323
1365
|
/* @__PURE__ */ e("span", { className: "text-xs font-medium leading-snug break-words text-zinc-200 whitespace-pre-wrap", children: t.message }),
|
|
1324
1366
|
t.action && /* @__PURE__ */ e(
|
|
1325
1367
|
"button",
|
|
1326
1368
|
{
|
|
1327
1369
|
onClick: (o) => {
|
|
1328
|
-
var
|
|
1329
|
-
o.stopPropagation(), (
|
|
1370
|
+
var a;
|
|
1371
|
+
o.stopPropagation(), (a = t.action) == null || a.onClick();
|
|
1330
1372
|
},
|
|
1331
1373
|
className: "mt-1 self-start text-[10px] font-bold text-[var(--accent)] hover:text-white transition-colors uppercase tracking-wider",
|
|
1332
1374
|
children: t.action.label
|
|
@@ -1337,11 +1379,11 @@ const Ke = (n, t = 200) => {
|
|
|
1337
1379
|
},
|
|
1338
1380
|
t.id
|
|
1339
1381
|
);
|
|
1340
|
-
}) }),
|
|
1341
|
-
cues:
|
|
1382
|
+
}) }), xs = ({
|
|
1383
|
+
cues: s,
|
|
1342
1384
|
settings: t
|
|
1343
1385
|
}) => {
|
|
1344
|
-
if (t.useNative ||
|
|
1386
|
+
if (t.useNative || s.length === 0) return null;
|
|
1345
1387
|
const i = () => {
|
|
1346
1388
|
switch (t.textStyle) {
|
|
1347
1389
|
case "outline":
|
|
@@ -1359,11 +1401,11 @@ const Ke = (n, t = 200) => {
|
|
|
1359
1401
|
return /* @__PURE__ */ e(
|
|
1360
1402
|
"div",
|
|
1361
1403
|
{
|
|
1362
|
-
className: "absolute inset-x-0 flex flex-col items-center justify-end text-center z-10 pointer-events-none transition-all duration-200",
|
|
1404
|
+
className: "absolute inset-x-0 flex flex-col items-center justify-end text-center z-10 pointer-events-none transition-all duration-200 strata-subtitle-overlay",
|
|
1363
1405
|
style: {
|
|
1364
1406
|
bottom: `${t.verticalOffset}px`
|
|
1365
1407
|
},
|
|
1366
|
-
children:
|
|
1408
|
+
children: s.map((o, a) => /* @__PURE__ */ e(
|
|
1367
1409
|
"div",
|
|
1368
1410
|
{
|
|
1369
1411
|
className: "mb-1 inline-block max-w-[80%]",
|
|
@@ -1388,21 +1430,21 @@ const Ke = (n, t = 200) => {
|
|
|
1388
1430
|
}
|
|
1389
1431
|
)
|
|
1390
1432
|
},
|
|
1391
|
-
|
|
1433
|
+
a
|
|
1392
1434
|
))
|
|
1393
1435
|
}
|
|
1394
1436
|
);
|
|
1395
|
-
},
|
|
1437
|
+
}, Oe = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(Q, { children: s }), le = ({ label: s, checked: t, onChange: i, icon: o, tooltip: a }) => /* @__PURE__ */ c(
|
|
1396
1438
|
"div",
|
|
1397
1439
|
{
|
|
1398
1440
|
className: "flex items-center justify-between py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
1399
1441
|
style: { borderRadius: "var(--radius)" },
|
|
1400
1442
|
children: [
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
o && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors flex items-center", children: /* @__PURE__ */ e(
|
|
1405
|
-
|
|
1443
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-3", children: [
|
|
1444
|
+
o && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(Oe, { content: o }) }),
|
|
1445
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col", children: [
|
|
1446
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors flex items-center", children: /* @__PURE__ */ e(Oe, { content: s }) }),
|
|
1447
|
+
a && /* @__PURE__ */ e("span", { className: "text-[10px] text-zinc-500", children: a })
|
|
1406
1448
|
] })
|
|
1407
1449
|
] }),
|
|
1408
1450
|
/* @__PURE__ */ e(
|
|
@@ -1430,36 +1472,36 @@ const Ke = (n, t = 200) => {
|
|
|
1430
1472
|
)
|
|
1431
1473
|
]
|
|
1432
1474
|
}
|
|
1433
|
-
),
|
|
1475
|
+
), xe = ({ label: s, value: t, min: i, max: o, step: a, onChange: u, formatValue: h, icon: f }) => /* @__PURE__ */ c(
|
|
1434
1476
|
"div",
|
|
1435
1477
|
{
|
|
1436
1478
|
className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
1437
1479
|
style: { borderRadius: "var(--radius)" },
|
|
1438
1480
|
children: [
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
f && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(
|
|
1442
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children:
|
|
1481
|
+
/* @__PURE__ */ c("div", { className: "flex justify-between items-center mb-2", children: [
|
|
1482
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-3", children: [
|
|
1483
|
+
f && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(Oe, { content: f }) }),
|
|
1484
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
|
|
1443
1485
|
] }),
|
|
1444
1486
|
/* @__PURE__ */ e(
|
|
1445
1487
|
"span",
|
|
1446
1488
|
{
|
|
1447
1489
|
className: "text-[10px] font-mono font-medium text-zinc-300 bg-white/10 px-1.5 py-0.5 tabular-nums",
|
|
1448
1490
|
style: { borderRadius: "var(--radius-sm)" },
|
|
1449
|
-
children:
|
|
1491
|
+
children: h ? h(t) : t
|
|
1450
1492
|
}
|
|
1451
1493
|
)
|
|
1452
1494
|
] }),
|
|
1453
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ c("div", { className: "relative h-4 flex items-center px-1", children: [
|
|
1454
1496
|
/* @__PURE__ */ e(
|
|
1455
1497
|
"input",
|
|
1456
1498
|
{
|
|
1457
1499
|
type: "range",
|
|
1458
1500
|
min: i,
|
|
1459
1501
|
max: o,
|
|
1460
|
-
step:
|
|
1502
|
+
step: a,
|
|
1461
1503
|
value: t,
|
|
1462
|
-
onChange: (
|
|
1504
|
+
onChange: (x) => u(parseFloat(x.target.value)),
|
|
1463
1505
|
className: "w-full h-1.5 appearance-none cursor-pointer focus:outline-none focus:ring-2 strata-range-input",
|
|
1464
1506
|
style: {
|
|
1465
1507
|
borderRadius: "var(--radius-full)",
|
|
@@ -1488,50 +1530,50 @@ const Ke = (n, t = 200) => {
|
|
|
1488
1530
|
] })
|
|
1489
1531
|
]
|
|
1490
1532
|
}
|
|
1491
|
-
),
|
|
1533
|
+
), ws = ({ label: s, value: t, options: i, onChange: o, icon: a }) => /* @__PURE__ */ c(
|
|
1492
1534
|
"div",
|
|
1493
1535
|
{
|
|
1494
1536
|
className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
1495
1537
|
style: { borderRadius: "var(--radius)" },
|
|
1496
1538
|
children: [
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
|
|
1499
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children:
|
|
1539
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
1540
|
+
a && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(Oe, { content: a }) }),
|
|
1541
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
|
|
1500
1542
|
] }),
|
|
1501
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
1502
1544
|
/* @__PURE__ */ e(
|
|
1503
1545
|
"select",
|
|
1504
1546
|
{
|
|
1505
1547
|
value: t,
|
|
1506
|
-
onChange: (
|
|
1548
|
+
onChange: (u) => o(u.target.value),
|
|
1507
1549
|
className: "w-full bg-zinc-800 border-[length:var(--border-width)] border-white/10 px-3 py-2 text-sm text-zinc-200 focus:outline-none focus:ring-2 appearance-none hover:bg-zinc-700 transition-colors cursor-pointer",
|
|
1508
1550
|
style: { "--tw-ring-color": "var(--accent)", borderRadius: "var(--radius)" },
|
|
1509
|
-
children: i.map((
|
|
1551
|
+
children: i.map((u) => /* @__PURE__ */ e("option", { value: u.value, children: u.label }, u.value))
|
|
1510
1552
|
}
|
|
1511
1553
|
),
|
|
1512
1554
|
/* @__PURE__ */ e("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-zinc-400", children: /* @__PURE__ */ e("svg", { width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M1 1L5 5L9 1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
1513
1555
|
] })
|
|
1514
1556
|
]
|
|
1515
1557
|
}
|
|
1516
|
-
),
|
|
1517
|
-
|
|
1558
|
+
), pe = ({ title: s, children: t }) => /* @__PURE__ */ c("div", { className: "py-2", children: [
|
|
1559
|
+
s && /* @__PURE__ */ e("h4", { className: "px-3 text-[10px] font-bold text-[var(--accent)] uppercase tracking-wider mb-1 mt-2", children: s }),
|
|
1518
1560
|
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t })
|
|
1519
|
-
] }),
|
|
1520
|
-
children:
|
|
1561
|
+
] }), lt = ({
|
|
1562
|
+
children: s,
|
|
1521
1563
|
onClose: t,
|
|
1522
1564
|
align: i = "right",
|
|
1523
1565
|
maxHeight: o,
|
|
1524
|
-
className:
|
|
1566
|
+
className: a
|
|
1525
1567
|
}) => {
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1528
|
-
if (!
|
|
1529
|
-
const
|
|
1530
|
-
|
|
1531
|
-
},
|
|
1532
|
-
return
|
|
1568
|
+
const u = W(null), h = W(null), [f, x] = M("auto"), b = i === "center" ? "left-1/2 -translate-x-1/2 origin-bottom" : "right-0 origin-bottom-right";
|
|
1569
|
+
Be(() => {
|
|
1570
|
+
if (!h.current) return;
|
|
1571
|
+
const v = () => {
|
|
1572
|
+
h.current && x(h.current.offsetHeight);
|
|
1573
|
+
}, p = new ResizeObserver(v);
|
|
1574
|
+
return p.observe(h.current), v(), () => p.disconnect();
|
|
1533
1575
|
}, []);
|
|
1534
|
-
const
|
|
1576
|
+
const m = {
|
|
1535
1577
|
height: f === "auto" ? "auto" : `${f + 14}px`,
|
|
1536
1578
|
// + padding
|
|
1537
1579
|
maxHeight: o ? `${o}px` : void 0
|
|
@@ -1539,110 +1581,110 @@ const Ke = (n, t = 200) => {
|
|
|
1539
1581
|
return /* @__PURE__ */ e(
|
|
1540
1582
|
"div",
|
|
1541
1583
|
{
|
|
1542
|
-
ref:
|
|
1543
|
-
className: `absolute bottom-full mb-4 ${
|
|
1544
|
-
style: { ...
|
|
1545
|
-
onClick: (
|
|
1546
|
-
onMouseDown: (
|
|
1547
|
-
onTouchStart: (
|
|
1584
|
+
ref: u,
|
|
1585
|
+
className: `absolute bottom-full mb-4 ${b} bg-[var(--bg-panel)] backdrop-blur-xl border-[length:var(--border-width)] border-white/10 shadow-2xl overflow-hidden w-[300px] max-w-[calc(100vw-32px)] text-sm z-50 ring-1 ring-white/5 font-[family-name:var(--font-main)] flex flex-col p-1.5 transition-[height,opacity,transform] duration-300 ease-out ${a}`,
|
|
1586
|
+
style: { ...m, borderRadius: "var(--radius-lg)" },
|
|
1587
|
+
onClick: (v) => v.stopPropagation(),
|
|
1588
|
+
onMouseDown: (v) => v.stopPropagation(),
|
|
1589
|
+
onTouchStart: (v) => v.stopPropagation(),
|
|
1548
1590
|
children: /* @__PURE__ */ e(
|
|
1549
1591
|
"div",
|
|
1550
1592
|
{
|
|
1551
1593
|
className: "overflow-y-auto hide-scrollbar flex-1",
|
|
1552
1594
|
style: { borderRadius: "var(--radius)" },
|
|
1553
|
-
children: /* @__PURE__ */ e("div", { ref:
|
|
1595
|
+
children: /* @__PURE__ */ e("div", { ref: h, children: s })
|
|
1554
1596
|
}
|
|
1555
1597
|
)
|
|
1556
1598
|
}
|
|
1557
1599
|
);
|
|
1558
|
-
},
|
|
1559
|
-
content:
|
|
1600
|
+
}, Ne = ({
|
|
1601
|
+
content: s,
|
|
1560
1602
|
className: t
|
|
1561
|
-
}) => typeof
|
|
1603
|
+
}) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e(
|
|
1562
1604
|
"span",
|
|
1563
1605
|
{
|
|
1564
1606
|
className: t,
|
|
1565
|
-
dangerouslySetInnerHTML: { __html:
|
|
1607
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
1566
1608
|
}
|
|
1567
|
-
) : /* @__PURE__ */ e("span", { className: t, children:
|
|
1568
|
-
label:
|
|
1609
|
+
) : /* @__PURE__ */ e("span", { className: t, children: s }) : /* @__PURE__ */ e("span", { className: t, children: s }), L = ({
|
|
1610
|
+
label: s,
|
|
1569
1611
|
value: t,
|
|
1570
1612
|
active: i,
|
|
1571
1613
|
onClick: o,
|
|
1572
|
-
hasSubmenu:
|
|
1573
|
-
icon:
|
|
1574
|
-
rightIcon:
|
|
1575
|
-
}) => /* @__PURE__ */
|
|
1614
|
+
hasSubmenu: a,
|
|
1615
|
+
icon: u,
|
|
1616
|
+
rightIcon: h
|
|
1617
|
+
}) => /* @__PURE__ */ c(
|
|
1576
1618
|
"button",
|
|
1577
1619
|
{
|
|
1578
1620
|
onClick: o,
|
|
1579
1621
|
className: "w-full flex items-center justify-between px-3 py-2.5 hover:bg-white/10 transition-colors text-left text-zinc-200 active:bg-white/5 focus:outline-none focus:bg-white/10 group overflow-hidden my-0.5",
|
|
1580
1622
|
style: { borderRadius: "var(--radius)" },
|
|
1581
1623
|
children: [
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
-
|
|
1624
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
1625
|
+
u && /* @__PURE__ */ e("span", { className: "text-zinc-400 shrink-0 group-hover:text-zinc-300 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(Ne, { content: u }) }),
|
|
1584
1626
|
/* @__PURE__ */ e(
|
|
1585
1627
|
"span",
|
|
1586
1628
|
{
|
|
1587
1629
|
className: `font-medium truncate text-sm flex items-center ${i ? "text-[var(--accent)]" : ""}`,
|
|
1588
|
-
title: typeof
|
|
1589
|
-
children: /* @__PURE__ */ e(
|
|
1630
|
+
title: typeof s == "string" ? s : void 0,
|
|
1631
|
+
children: /* @__PURE__ */ e(Ne, { content: s })
|
|
1590
1632
|
}
|
|
1591
1633
|
)
|
|
1592
1634
|
] }),
|
|
1593
|
-
/* @__PURE__ */
|
|
1635
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-zinc-400 shrink-0", children: [
|
|
1594
1636
|
t && /* @__PURE__ */ e(
|
|
1595
1637
|
"span",
|
|
1596
1638
|
{
|
|
1597
1639
|
className: "text-xs font-medium truncate max-w-[60px]",
|
|
1598
1640
|
title: t,
|
|
1599
|
-
children: /* @__PURE__ */ e(
|
|
1641
|
+
children: /* @__PURE__ */ e(Ne, { content: t })
|
|
1600
1642
|
}
|
|
1601
1643
|
),
|
|
1602
|
-
|
|
1603
|
-
i && /* @__PURE__ */ e(
|
|
1604
|
-
|
|
1644
|
+
h,
|
|
1645
|
+
i && /* @__PURE__ */ e(He, { className: "w-4 h-4 text-[var(--accent)] shrink-0" }),
|
|
1646
|
+
a && /* @__PURE__ */ e("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
|
|
1605
1647
|
] })
|
|
1606
1648
|
]
|
|
1607
1649
|
}
|
|
1608
|
-
),
|
|
1609
|
-
label:
|
|
1650
|
+
), Z = ({
|
|
1651
|
+
label: s,
|
|
1610
1652
|
onBack: t,
|
|
1611
1653
|
rightAction: i
|
|
1612
|
-
}) => /* @__PURE__ */
|
|
1654
|
+
}) => /* @__PURE__ */ c(
|
|
1613
1655
|
"div",
|
|
1614
1656
|
{
|
|
1615
1657
|
className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md",
|
|
1616
1658
|
style: { borderRadius: "var(--radius)" },
|
|
1617
1659
|
children: [
|
|
1618
|
-
/* @__PURE__ */
|
|
1660
|
+
/* @__PURE__ */ c(
|
|
1619
1661
|
"button",
|
|
1620
1662
|
{
|
|
1621
1663
|
className: "flex items-center gap-2 hover:text-white transition-colors focus:outline-none",
|
|
1622
1664
|
onClick: t,
|
|
1623
1665
|
children: [
|
|
1624
|
-
/* @__PURE__ */ e(
|
|
1625
|
-
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
1666
|
+
/* @__PURE__ */ e(Wi, { className: "w-3 h-3" }),
|
|
1667
|
+
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(Ne, { content: s }) })
|
|
1626
1668
|
]
|
|
1627
1669
|
}
|
|
1628
1670
|
),
|
|
1629
1671
|
i
|
|
1630
1672
|
]
|
|
1631
1673
|
}
|
|
1632
|
-
),
|
|
1633
|
-
items:
|
|
1674
|
+
), me = () => /* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }), Xt = ({
|
|
1675
|
+
items: s,
|
|
1634
1676
|
onClose: t,
|
|
1635
1677
|
title: i,
|
|
1636
1678
|
maxHeight: o,
|
|
1637
|
-
className:
|
|
1679
|
+
className: a
|
|
1638
1680
|
}) => {
|
|
1639
|
-
const [
|
|
1640
|
-
|
|
1641
|
-
},
|
|
1642
|
-
|
|
1681
|
+
const [u, h] = M([]), f = u.length > 0 ? u[u.length - 1] : null, x = f ? f.children || [] : s, b = f ? f.html : i || "Menu", m = () => {
|
|
1682
|
+
h((p) => p.slice(0, -1));
|
|
1683
|
+
}, v = (p) => {
|
|
1684
|
+
p.children && h((S) => [...S, p]);
|
|
1643
1685
|
};
|
|
1644
|
-
return /* @__PURE__ */ e(
|
|
1645
|
-
|
|
1686
|
+
return /* @__PURE__ */ e(lt, { onClose: t, maxHeight: o, className: a, children: /* @__PURE__ */ c("div", { className: "animate-in fade-in slide-in-from-right-4 duration-200", children: [
|
|
1687
|
+
u.length > 0 ? /* @__PURE__ */ e(Z, { label: b || "Menu", onBack: m }) : i && /* @__PURE__ */ e(
|
|
1646
1688
|
"div",
|
|
1647
1689
|
{
|
|
1648
1690
|
className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md",
|
|
@@ -1650,74 +1692,74 @@ const Ke = (n, t = 200) => {
|
|
|
1650
1692
|
children: /* @__PURE__ */ e("span", { children: i })
|
|
1651
1693
|
}
|
|
1652
1694
|
),
|
|
1653
|
-
/* @__PURE__ */ e("div", { className: "pb-1", children:
|
|
1695
|
+
/* @__PURE__ */ e("div", { className: "pb-1", children: x.map((p, S) => p.separator ? /* @__PURE__ */ e(me, {}, S) : p.isLabel ? /* @__PURE__ */ e(
|
|
1654
1696
|
"div",
|
|
1655
1697
|
{
|
|
1656
1698
|
className: "px-3 py-1.5 text-[10px] font-bold text-zinc-500 uppercase tracking-wider select-none",
|
|
1657
|
-
children: /* @__PURE__ */ e(
|
|
1699
|
+
children: /* @__PURE__ */ e(Ne, { content: p.html || "" })
|
|
1658
1700
|
},
|
|
1659
|
-
|
|
1660
|
-
) :
|
|
1661
|
-
|
|
1701
|
+
S
|
|
1702
|
+
) : p.range ? /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(
|
|
1703
|
+
xe,
|
|
1662
1704
|
{
|
|
1663
|
-
label:
|
|
1664
|
-
icon:
|
|
1665
|
-
value:
|
|
1666
|
-
min:
|
|
1667
|
-
max:
|
|
1668
|
-
step:
|
|
1669
|
-
onChange: (
|
|
1670
|
-
formatValue:
|
|
1705
|
+
label: p.html,
|
|
1706
|
+
icon: p.icon,
|
|
1707
|
+
value: p.value ?? p.min ?? 0,
|
|
1708
|
+
min: p.min ?? 0,
|
|
1709
|
+
max: p.max ?? 100,
|
|
1710
|
+
step: p.step ?? 1,
|
|
1711
|
+
onChange: ($) => p.onRange && p.onRange($),
|
|
1712
|
+
formatValue: p.formatValue
|
|
1671
1713
|
}
|
|
1672
|
-
) },
|
|
1673
|
-
|
|
1714
|
+
) }, S) : p.switch !== void 0 ? /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(
|
|
1715
|
+
le,
|
|
1674
1716
|
{
|
|
1675
|
-
label:
|
|
1676
|
-
icon:
|
|
1677
|
-
checked:
|
|
1678
|
-
tooltip:
|
|
1679
|
-
onChange: (
|
|
1717
|
+
label: p.html,
|
|
1718
|
+
icon: p.icon,
|
|
1719
|
+
checked: p.switch,
|
|
1720
|
+
tooltip: p.tooltip,
|
|
1721
|
+
onChange: ($) => p.onSwitch && p.onSwitch(p, $)
|
|
1680
1722
|
}
|
|
1681
|
-
) },
|
|
1682
|
-
|
|
1723
|
+
) }, S) : /* @__PURE__ */ e(Me.Fragment, { children: /* @__PURE__ */ e(
|
|
1724
|
+
L,
|
|
1683
1725
|
{
|
|
1684
|
-
label:
|
|
1685
|
-
icon:
|
|
1686
|
-
value:
|
|
1687
|
-
active:
|
|
1688
|
-
hasSubmenu: !!
|
|
1726
|
+
label: p.html,
|
|
1727
|
+
icon: p.icon,
|
|
1728
|
+
value: p.currentLabel || p.value,
|
|
1729
|
+
active: p.active,
|
|
1730
|
+
hasSubmenu: !!p.children,
|
|
1689
1731
|
onClick: () => {
|
|
1690
|
-
|
|
1732
|
+
p.children ? v(p) : p.onClick ? (p.onClick(p), !p.switch && !p.range && t()) : p.click && (p.click(p), t());
|
|
1691
1733
|
}
|
|
1692
1734
|
}
|
|
1693
|
-
) },
|
|
1735
|
+
) }, S)) })
|
|
1694
1736
|
] }) });
|
|
1695
|
-
},
|
|
1696
|
-
tracks:
|
|
1737
|
+
}, ys = ({
|
|
1738
|
+
tracks: s,
|
|
1697
1739
|
current: t,
|
|
1698
1740
|
onSelect: i,
|
|
1699
1741
|
onUpload: o,
|
|
1700
|
-
onClose:
|
|
1701
|
-
settings:
|
|
1702
|
-
onSettingsChange:
|
|
1742
|
+
onClose: a,
|
|
1743
|
+
settings: u,
|
|
1744
|
+
onSettingsChange: h,
|
|
1703
1745
|
onReset: f,
|
|
1704
|
-
offset:
|
|
1705
|
-
onOffsetChange:
|
|
1706
|
-
maxHeight:
|
|
1707
|
-
animationClass:
|
|
1746
|
+
offset: x,
|
|
1747
|
+
onOffsetChange: b,
|
|
1748
|
+
maxHeight: m,
|
|
1749
|
+
animationClass: v
|
|
1708
1750
|
}) => {
|
|
1709
|
-
const [
|
|
1710
|
-
(
|
|
1711
|
-
) :
|
|
1712
|
-
return /* @__PURE__ */
|
|
1713
|
-
|
|
1751
|
+
const [p, S] = M("main"), [$, U] = M(""), H = W(null), q = Ce(() => $ ? s.filter(
|
|
1752
|
+
(g) => g.label.toLowerCase().includes($.toLowerCase()) || g.srcLang && g.srcLang.toLowerCase().includes($.toLowerCase())
|
|
1753
|
+
) : s, [s, $]);
|
|
1754
|
+
return /* @__PURE__ */ c(
|
|
1755
|
+
lt,
|
|
1714
1756
|
{
|
|
1715
|
-
onClose:
|
|
1757
|
+
onClose: a,
|
|
1716
1758
|
align: "right",
|
|
1717
|
-
maxHeight:
|
|
1718
|
-
className:
|
|
1759
|
+
maxHeight: m,
|
|
1760
|
+
className: v,
|
|
1719
1761
|
children: [
|
|
1720
|
-
|
|
1762
|
+
p === "main" && /* @__PURE__ */ c("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200 flex flex-col h-full", children: [
|
|
1721
1763
|
/* @__PURE__ */ e(
|
|
1722
1764
|
"div",
|
|
1723
1765
|
{
|
|
@@ -1726,15 +1768,15 @@ const Ke = (n, t = 200) => {
|
|
|
1726
1768
|
children: /* @__PURE__ */ e("span", { children: "Subtitles" })
|
|
1727
1769
|
}
|
|
1728
1770
|
),
|
|
1729
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ c("div", { className: "px-1.5 pb-2 shrink-0", children: [
|
|
1730
1772
|
/* @__PURE__ */ e(
|
|
1731
|
-
|
|
1773
|
+
L,
|
|
1732
1774
|
{
|
|
1733
1775
|
label: "Upload Subtitle",
|
|
1734
|
-
icon: /* @__PURE__ */ e(
|
|
1776
|
+
icon: /* @__PURE__ */ e(Hi, { className: "w-4 h-4" }),
|
|
1735
1777
|
onClick: () => {
|
|
1736
|
-
var
|
|
1737
|
-
return (
|
|
1778
|
+
var g;
|
|
1779
|
+
return (g = H.current) == null ? void 0 : g.click();
|
|
1738
1780
|
}
|
|
1739
1781
|
}
|
|
1740
1782
|
),
|
|
@@ -1743,159 +1785,159 @@ const Ke = (n, t = 200) => {
|
|
|
1743
1785
|
{
|
|
1744
1786
|
type: "file",
|
|
1745
1787
|
accept: ".vtt,.srt",
|
|
1746
|
-
ref:
|
|
1788
|
+
ref: H,
|
|
1747
1789
|
className: "hidden",
|
|
1748
|
-
onChange: (
|
|
1749
|
-
var
|
|
1750
|
-
(
|
|
1790
|
+
onChange: (g) => {
|
|
1791
|
+
var Y;
|
|
1792
|
+
(Y = g.target.files) != null && Y[0] && o(g.target.files[0]);
|
|
1751
1793
|
}
|
|
1752
1794
|
}
|
|
1753
1795
|
),
|
|
1754
1796
|
/* @__PURE__ */ e(
|
|
1755
|
-
|
|
1797
|
+
L,
|
|
1756
1798
|
{
|
|
1757
1799
|
label: "Customize",
|
|
1758
|
-
icon: /* @__PURE__ */ e(
|
|
1759
|
-
onClick: () =>
|
|
1800
|
+
icon: /* @__PURE__ */ e(Zt, { className: "w-4 h-4" }),
|
|
1801
|
+
onClick: () => S("customize"),
|
|
1760
1802
|
hasSubmenu: !0
|
|
1761
1803
|
}
|
|
1762
1804
|
),
|
|
1763
1805
|
/* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }),
|
|
1764
1806
|
/* @__PURE__ */ e(
|
|
1765
|
-
|
|
1807
|
+
L,
|
|
1766
1808
|
{
|
|
1767
1809
|
label: "Off",
|
|
1768
1810
|
active: t === -1,
|
|
1769
1811
|
onClick: () => {
|
|
1770
|
-
i(-1),
|
|
1812
|
+
i(-1), a();
|
|
1771
1813
|
}
|
|
1772
1814
|
}
|
|
1773
1815
|
),
|
|
1774
|
-
/* @__PURE__ */
|
|
1816
|
+
/* @__PURE__ */ c("div", { className: "relative mt-2", children: [
|
|
1775
1817
|
/* @__PURE__ */ e(
|
|
1776
1818
|
"input",
|
|
1777
1819
|
{
|
|
1778
1820
|
type: "text",
|
|
1779
1821
|
placeholder: "Search subtitles...",
|
|
1780
|
-
value:
|
|
1781
|
-
onChange: (
|
|
1822
|
+
value: $,
|
|
1823
|
+
onChange: (g) => U(g.target.value),
|
|
1782
1824
|
className: "w-full bg-zinc-800/50 border border-white/10 rounded-md py-1.5 pl-8 pr-3 text-xs text-zinc-200 focus:outline-none focus:border-white/20 transition-colors"
|
|
1783
1825
|
}
|
|
1784
1826
|
),
|
|
1785
|
-
/* @__PURE__ */ e(
|
|
1827
|
+
/* @__PURE__ */ e(fs, { className: "w-3.5 h-3.5 text-zinc-500 absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
1786
1828
|
] })
|
|
1787
1829
|
] }),
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
|
|
1790
|
-
let
|
|
1791
|
-
return
|
|
1792
|
-
|
|
1830
|
+
/* @__PURE__ */ c("div", { className: "overflow-y-auto hide-scrollbar flex-1", children: [
|
|
1831
|
+
q.map((g) => {
|
|
1832
|
+
let Y = null;
|
|
1833
|
+
return g.status === "loading" ? Y = /* @__PURE__ */ e(De, { className: "w-3.5 h-3.5 animate-spin text-[var(--accent)]" }) : g.status === "error" ? Y = /* @__PURE__ */ e(bs, { className: "w-3.5 h-3.5 text-red-500" }) : g.status === "success" && (Y = /* @__PURE__ */ e(ii, { className: "w-3.5 h-3.5 text-emerald-500" })), /* @__PURE__ */ e(
|
|
1834
|
+
L,
|
|
1793
1835
|
{
|
|
1794
|
-
label:
|
|
1795
|
-
value:
|
|
1796
|
-
active: t ===
|
|
1797
|
-
rightIcon:
|
|
1836
|
+
label: g.label,
|
|
1837
|
+
value: g.srcLang,
|
|
1838
|
+
active: t === g.index,
|
|
1839
|
+
rightIcon: Y,
|
|
1798
1840
|
onClick: () => {
|
|
1799
|
-
i(
|
|
1841
|
+
i(g.index), a();
|
|
1800
1842
|
}
|
|
1801
1843
|
},
|
|
1802
|
-
|
|
1844
|
+
g.index
|
|
1803
1845
|
);
|
|
1804
1846
|
}),
|
|
1805
|
-
|
|
1847
|
+
q.length === 0 && $ && /* @__PURE__ */ e("div", { className: "px-4 py-3 text-center text-xs text-zinc-500", children: "No results found" })
|
|
1806
1848
|
] })
|
|
1807
1849
|
] }),
|
|
1808
|
-
|
|
1850
|
+
p === "customize" && /* @__PURE__ */ c("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
1809
1851
|
/* @__PURE__ */ e(
|
|
1810
|
-
|
|
1852
|
+
Z,
|
|
1811
1853
|
{
|
|
1812
1854
|
label: "Customize",
|
|
1813
|
-
onBack: () =>
|
|
1855
|
+
onBack: () => S("main"),
|
|
1814
1856
|
rightAction: /* @__PURE__ */ e(
|
|
1815
1857
|
"button",
|
|
1816
1858
|
{
|
|
1817
1859
|
onClick: f,
|
|
1818
1860
|
className: "p-1.5 text-zinc-400 hover:text-white transition-colors rounded-md hover:bg-white/10",
|
|
1819
1861
|
title: "Reset All",
|
|
1820
|
-
children: /* @__PURE__ */ e(
|
|
1862
|
+
children: /* @__PURE__ */ e(Ji, { className: "w-4 h-4" })
|
|
1821
1863
|
}
|
|
1822
1864
|
)
|
|
1823
1865
|
}
|
|
1824
1866
|
),
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */ e(
|
|
1827
|
-
|
|
1867
|
+
/* @__PURE__ */ c("div", { className: "pb-1", children: [
|
|
1868
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(
|
|
1869
|
+
le,
|
|
1828
1870
|
{
|
|
1829
1871
|
label: "Native Video Subtitle",
|
|
1830
|
-
checked:
|
|
1831
|
-
onChange: (
|
|
1872
|
+
checked: u.useNative,
|
|
1873
|
+
onChange: (g) => h({ useNative: g })
|
|
1832
1874
|
}
|
|
1833
1875
|
) }),
|
|
1834
|
-
!
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */ e("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */ e(
|
|
1876
|
+
!u.useNative && /* @__PURE__ */ c(Q, { children: [
|
|
1877
|
+
/* @__PURE__ */ c(pe, { title: "Sync & Position", children: [
|
|
1878
|
+
/* @__PURE__ */ c("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
|
|
1879
|
+
/* @__PURE__ */ e("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-3", children: [
|
|
1880
|
+
/* @__PURE__ */ e(Gi, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
|
|
1839
1881
|
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Sync Offset" })
|
|
1840
1882
|
] }) }),
|
|
1841
|
-
/* @__PURE__ */
|
|
1883
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
1842
1884
|
/* @__PURE__ */ e(
|
|
1843
1885
|
"button",
|
|
1844
1886
|
{
|
|
1845
|
-
onClick: () =>
|
|
1887
|
+
onClick: () => b(Math.round((x - 0.1) * 10) / 10),
|
|
1846
1888
|
className: "w-8 h-8 flex items-center justify-center bg-zinc-800 rounded-lg hover:bg-zinc-700 text-zinc-300 transition-colors active:scale-95",
|
|
1847
|
-
children: /* @__PURE__ */ e(
|
|
1889
|
+
children: /* @__PURE__ */ e(_i, { className: "w-4 h-4" })
|
|
1848
1890
|
}
|
|
1849
1891
|
),
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
|
|
1852
|
-
(
|
|
1892
|
+
/* @__PURE__ */ c("div", { className: "flex-1 bg-zinc-900 border border-white/5 rounded-lg h-8 flex items-center justify-center text-xs font-mono font-medium text-[var(--accent)]", children: [
|
|
1893
|
+
x > 0 ? "+" : "",
|
|
1894
|
+
(x == null ? void 0 : x.toFixed(1)) || "0.0",
|
|
1853
1895
|
"s"
|
|
1854
1896
|
] }),
|
|
1855
1897
|
/* @__PURE__ */ e(
|
|
1856
1898
|
"button",
|
|
1857
1899
|
{
|
|
1858
|
-
onClick: () =>
|
|
1900
|
+
onClick: () => b(Math.round((x + 0.1) * 10) / 10),
|
|
1859
1901
|
className: "w-8 h-8 flex items-center justify-center bg-zinc-800 rounded-lg hover:bg-zinc-700 text-zinc-300 transition-colors active:scale-95",
|
|
1860
|
-
children: /* @__PURE__ */ e(
|
|
1902
|
+
children: /* @__PURE__ */ e(qi, { className: "w-4 h-4" })
|
|
1861
1903
|
}
|
|
1862
1904
|
)
|
|
1863
1905
|
] })
|
|
1864
1906
|
] }),
|
|
1865
1907
|
/* @__PURE__ */ e(
|
|
1866
|
-
|
|
1908
|
+
xe,
|
|
1867
1909
|
{
|
|
1868
1910
|
label: "Vertical Position",
|
|
1869
|
-
icon: /* @__PURE__ */ e(
|
|
1870
|
-
value:
|
|
1911
|
+
icon: /* @__PURE__ */ e(Yi, { className: "w-4 h-4" }),
|
|
1912
|
+
value: u.verticalOffset,
|
|
1871
1913
|
min: 0,
|
|
1872
1914
|
max: 200,
|
|
1873
1915
|
step: 5,
|
|
1874
|
-
onChange: (
|
|
1875
|
-
formatValue: (
|
|
1916
|
+
onChange: (g) => h({ verticalOffset: g }),
|
|
1917
|
+
formatValue: (g) => `${g}px`
|
|
1876
1918
|
}
|
|
1877
1919
|
)
|
|
1878
1920
|
] }),
|
|
1879
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ c(pe, { title: "Appearance", children: [
|
|
1880
1922
|
/* @__PURE__ */ e(
|
|
1881
|
-
|
|
1923
|
+
xe,
|
|
1882
1924
|
{
|
|
1883
1925
|
label: "Text Size",
|
|
1884
|
-
icon: /* @__PURE__ */ e(
|
|
1885
|
-
value:
|
|
1926
|
+
icon: /* @__PURE__ */ e(Xi, { className: "w-4 h-4" }),
|
|
1927
|
+
value: u.textSize,
|
|
1886
1928
|
min: 50,
|
|
1887
1929
|
max: 200,
|
|
1888
1930
|
step: 10,
|
|
1889
|
-
onChange: (
|
|
1890
|
-
formatValue: (
|
|
1931
|
+
onChange: (g) => h({ textSize: g }),
|
|
1932
|
+
formatValue: (g) => `${g}%`
|
|
1891
1933
|
}
|
|
1892
1934
|
),
|
|
1893
|
-
/* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */ e(
|
|
1935
|
+
/* @__PURE__ */ c("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
|
|
1936
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
1937
|
+
/* @__PURE__ */ e(ei, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
|
|
1896
1938
|
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Text Color" })
|
|
1897
1939
|
] }),
|
|
1898
|
-
/* @__PURE__ */
|
|
1940
|
+
/* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-2 p-1 bg-zinc-800/50 rounded-lg", children: [
|
|
1899
1941
|
[
|
|
1900
1942
|
"#ffffff",
|
|
1901
1943
|
"#ffff00",
|
|
@@ -1903,35 +1945,35 @@ const Ke = (n, t = 200) => {
|
|
|
1903
1945
|
"#ff00ff",
|
|
1904
1946
|
"#ff0000",
|
|
1905
1947
|
"#00ff00"
|
|
1906
|
-
].map((
|
|
1948
|
+
].map((g) => /* @__PURE__ */ e(
|
|
1907
1949
|
"button",
|
|
1908
1950
|
{
|
|
1909
|
-
onClick: () =>
|
|
1910
|
-
className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${
|
|
1951
|
+
onClick: () => h({ textColor: g }),
|
|
1952
|
+
className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${u.textColor === g ? "ring-2 scale-110" : ""}`,
|
|
1911
1953
|
style: {
|
|
1912
|
-
backgroundColor:
|
|
1954
|
+
backgroundColor: g,
|
|
1913
1955
|
"--tw-ring-color": "var(--accent)"
|
|
1914
1956
|
}
|
|
1915
1957
|
},
|
|
1916
|
-
|
|
1958
|
+
g
|
|
1917
1959
|
)),
|
|
1918
1960
|
/* @__PURE__ */ e("div", { className: "w-px h-6 bg-white/10 mx-1" }),
|
|
1919
1961
|
/* @__PURE__ */ e("div", { className: "relative w-6 h-6 rounded-full overflow-hidden ring-1 ring-white/20 cursor-pointer", children: /* @__PURE__ */ e(
|
|
1920
1962
|
"input",
|
|
1921
1963
|
{
|
|
1922
1964
|
type: "color",
|
|
1923
|
-
value:
|
|
1924
|
-
onChange: (
|
|
1965
|
+
value: u.textColor,
|
|
1966
|
+
onChange: (g) => h({ textColor: g.target.value }),
|
|
1925
1967
|
className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0"
|
|
1926
1968
|
}
|
|
1927
1969
|
) })
|
|
1928
1970
|
] })
|
|
1929
1971
|
] }),
|
|
1930
1972
|
/* @__PURE__ */ e(
|
|
1931
|
-
|
|
1973
|
+
ws,
|
|
1932
1974
|
{
|
|
1933
1975
|
label: "Text Style",
|
|
1934
|
-
value:
|
|
1976
|
+
value: u.textStyle,
|
|
1935
1977
|
options: [
|
|
1936
1978
|
{ label: "None", value: "none" },
|
|
1937
1979
|
{ label: "Outline", value: "outline" },
|
|
@@ -1939,65 +1981,65 @@ const Ke = (n, t = 200) => {
|
|
|
1939
1981
|
{ label: "Depressed", value: "depressed" },
|
|
1940
1982
|
{ label: "Drop Shadow", value: "shadow" }
|
|
1941
1983
|
],
|
|
1942
|
-
onChange: (
|
|
1943
|
-
textStyle:
|
|
1984
|
+
onChange: (g) => h({
|
|
1985
|
+
textStyle: g
|
|
1944
1986
|
})
|
|
1945
1987
|
}
|
|
1946
1988
|
),
|
|
1947
|
-
/* @__PURE__ */
|
|
1989
|
+
/* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-2 mt-1 px-1", children: [
|
|
1948
1990
|
/* @__PURE__ */ e(
|
|
1949
|
-
|
|
1991
|
+
le,
|
|
1950
1992
|
{
|
|
1951
1993
|
label: "Bold",
|
|
1952
|
-
icon: /* @__PURE__ */ e(
|
|
1953
|
-
checked:
|
|
1954
|
-
onChange: (
|
|
1994
|
+
icon: /* @__PURE__ */ e(Ki, { className: "w-4 h-4" }),
|
|
1995
|
+
checked: u.isBold,
|
|
1996
|
+
onChange: (g) => h({ isBold: g })
|
|
1955
1997
|
}
|
|
1956
1998
|
),
|
|
1957
1999
|
/* @__PURE__ */ e(
|
|
1958
|
-
|
|
2000
|
+
le,
|
|
1959
2001
|
{
|
|
1960
2002
|
label: "Fix Caps",
|
|
1961
|
-
icon: /* @__PURE__ */ e(
|
|
1962
|
-
checked:
|
|
1963
|
-
onChange: (
|
|
2003
|
+
icon: /* @__PURE__ */ e(Zi, { className: "w-4 h-4" }),
|
|
2004
|
+
checked: u.fixCapitalization,
|
|
2005
|
+
onChange: (g) => h({ fixCapitalization: g })
|
|
1964
2006
|
}
|
|
1965
2007
|
)
|
|
1966
2008
|
] })
|
|
1967
2009
|
] }),
|
|
1968
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ c(pe, { title: "Background", children: [
|
|
1969
2011
|
/* @__PURE__ */ e(
|
|
1970
|
-
|
|
2012
|
+
xe,
|
|
1971
2013
|
{
|
|
1972
2014
|
label: "Opacity",
|
|
1973
|
-
icon: /* @__PURE__ */ e(
|
|
1974
|
-
value:
|
|
2015
|
+
icon: /* @__PURE__ */ e(Qi, { className: "w-4 h-4" }),
|
|
2016
|
+
value: u.backgroundOpacity,
|
|
1975
2017
|
min: 0,
|
|
1976
2018
|
max: 100,
|
|
1977
2019
|
step: 5,
|
|
1978
|
-
onChange: (
|
|
1979
|
-
formatValue: (
|
|
2020
|
+
onChange: (g) => h({ backgroundOpacity: g }),
|
|
2021
|
+
formatValue: (g) => `${g}%`
|
|
1980
2022
|
}
|
|
1981
2023
|
),
|
|
1982
2024
|
/* @__PURE__ */ e(
|
|
1983
|
-
|
|
2025
|
+
le,
|
|
1984
2026
|
{
|
|
1985
2027
|
label: "Blur Background",
|
|
1986
|
-
icon: /* @__PURE__ */ e(
|
|
1987
|
-
checked:
|
|
1988
|
-
onChange: (
|
|
2028
|
+
icon: /* @__PURE__ */ e(es, { className: "w-4 h-4" }),
|
|
2029
|
+
checked: u.backgroundBlur,
|
|
2030
|
+
onChange: (g) => h({ backgroundBlur: g })
|
|
1989
2031
|
}
|
|
1990
2032
|
),
|
|
1991
|
-
|
|
1992
|
-
|
|
2033
|
+
u.backgroundBlur && /* @__PURE__ */ e(
|
|
2034
|
+
xe,
|
|
1993
2035
|
{
|
|
1994
2036
|
label: "Blur Intensity",
|
|
1995
|
-
value:
|
|
2037
|
+
value: u.backgroundBlurAmount,
|
|
1996
2038
|
min: 0,
|
|
1997
2039
|
max: 20,
|
|
1998
2040
|
step: 1,
|
|
1999
|
-
onChange: (
|
|
2000
|
-
formatValue: (
|
|
2041
|
+
onChange: (g) => h({ backgroundBlurAmount: g }),
|
|
2042
|
+
formatValue: (g) => `${g}px`
|
|
2001
2043
|
}
|
|
2002
2044
|
)
|
|
2003
2045
|
] })
|
|
@@ -2007,33 +2049,33 @@ const Ke = (n, t = 200) => {
|
|
|
2007
2049
|
]
|
|
2008
2050
|
}
|
|
2009
2051
|
);
|
|
2010
|
-
},
|
|
2011
|
-
const
|
|
2052
|
+
}, nt = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(Q, { children: s }), ks = ({ x: s, y: t, items: i, onClose: o, containerWidth: a, containerHeight: u }) => {
|
|
2053
|
+
const h = W(null), [f, x] = M({
|
|
2012
2054
|
top: t,
|
|
2013
|
-
left:
|
|
2055
|
+
left: s,
|
|
2014
2056
|
opacity: 0
|
|
2015
2057
|
});
|
|
2016
|
-
return
|
|
2017
|
-
if (!
|
|
2018
|
-
const
|
|
2019
|
-
let
|
|
2020
|
-
|
|
2021
|
-
let
|
|
2022
|
-
|
|
2023
|
-
top:
|
|
2024
|
-
left:
|
|
2025
|
-
maxHeight:
|
|
2058
|
+
return Be(() => {
|
|
2059
|
+
if (!h.current) return;
|
|
2060
|
+
const b = h.current.getBoundingClientRect(), m = b.width, v = b.height;
|
|
2061
|
+
let p = s, S = t;
|
|
2062
|
+
s + m > a - 10 && (p = s - m), p < 10 && (p = 10), p + m > a && (p = Math.max(10, a - m - 10)), t + v > u - 10 && (S = t - v);
|
|
2063
|
+
let $ = u - 20;
|
|
2064
|
+
S < 10 && (S = 10), S + v > u - 10 && (S = Math.max(10, u - v - 10)), x({
|
|
2065
|
+
top: S,
|
|
2066
|
+
left: p,
|
|
2067
|
+
maxHeight: $,
|
|
2026
2068
|
opacity: 1
|
|
2027
2069
|
});
|
|
2028
|
-
}, [
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2070
|
+
}, [s, t, i, a, u]), ee(() => {
|
|
2071
|
+
const b = (m) => {
|
|
2072
|
+
h.current && !h.current.contains(m.target) && o();
|
|
2031
2073
|
};
|
|
2032
|
-
return document.addEventListener("mousedown",
|
|
2074
|
+
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
2033
2075
|
}, [o]), /* @__PURE__ */ e(
|
|
2034
2076
|
"div",
|
|
2035
2077
|
{
|
|
2036
|
-
ref:
|
|
2078
|
+
ref: h,
|
|
2037
2079
|
className: "absolute z-50 min-w-[200px] bg-[var(--bg-panel)] backdrop-blur-xl border-[length:var(--border-width)] border-white/10 shadow-2xl p-1.5 font-[family-name:var(--font-main)] overflow-y-auto hide-scrollbar flex flex-col",
|
|
2038
2080
|
style: {
|
|
2039
2081
|
top: f.top,
|
|
@@ -2042,301 +2084,310 @@ const Ke = (n, t = 200) => {
|
|
|
2042
2084
|
opacity: f.opacity,
|
|
2043
2085
|
borderRadius: "var(--radius-lg)"
|
|
2044
2086
|
},
|
|
2045
|
-
onClick: (
|
|
2046
|
-
onMouseDown: (
|
|
2047
|
-
onTouchStart: (
|
|
2048
|
-
children: i.map((
|
|
2049
|
-
/* @__PURE__ */
|
|
2087
|
+
onClick: (b) => b.stopPropagation(),
|
|
2088
|
+
onMouseDown: (b) => b.stopPropagation(),
|
|
2089
|
+
onTouchStart: (b) => b.stopPropagation(),
|
|
2090
|
+
children: i.map((b, m) => b.separator ? /* @__PURE__ */ e("div", { className: "h-0 border-t border-white/10 mx-2 my-1.5" }, m) : b.isLabel ? /* @__PURE__ */ e("div", { className: "px-3 py-1.5 text-[10px] font-bold text-zinc-500 uppercase tracking-wider select-none", children: /* @__PURE__ */ e(nt, { content: b.html || "" }) }, m) : /* @__PURE__ */ c(Me.Fragment, { children: [
|
|
2091
|
+
/* @__PURE__ */ c(
|
|
2050
2092
|
"button",
|
|
2051
2093
|
{
|
|
2052
2094
|
onClick: () => {
|
|
2053
|
-
|
|
2095
|
+
b.disabled || (b.click ? b.click(o) : b.onClick && b.onClick(o));
|
|
2054
2096
|
},
|
|
2055
|
-
disabled:
|
|
2097
|
+
disabled: b.disabled,
|
|
2056
2098
|
className: "w-full text-left px-3 py-2.5 flex items-center justify-between hover:bg-white/10 focus:bg-white/10 focus:outline-none transition-colors text-sm text-zinc-200 disabled:opacity-50 disabled:cursor-not-allowed group my-0.5",
|
|
2057
2099
|
style: { borderRadius: "var(--radius)" },
|
|
2058
2100
|
children: [
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
|
|
2061
|
-
/* @__PURE__ */ e("span", { className: `flex items-center font-medium truncate ${
|
|
2101
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
2102
|
+
b.icon && /* @__PURE__ */ e("span", { className: "text-zinc-400 w-4 h-4 flex items-center justify-center shrink-0 group-hover:text-zinc-300 transition-colors", children: /* @__PURE__ */ e(nt, { content: b.icon }) }),
|
|
2103
|
+
/* @__PURE__ */ e("span", { className: `flex items-center font-medium truncate ${b.checked ? "text-[var(--accent)]" : ""}`, children: /* @__PURE__ */ e(nt, { content: b.html || "" }) })
|
|
2062
2104
|
] }),
|
|
2063
|
-
|
|
2105
|
+
b.checked && /* @__PURE__ */ e(He, { className: "w-4 h-4 text-[var(--accent)] shrink-0 ml-2" })
|
|
2064
2106
|
]
|
|
2065
2107
|
}
|
|
2066
2108
|
),
|
|
2067
|
-
|
|
2068
|
-
] },
|
|
2109
|
+
b.showBorder && /* @__PURE__ */ e("div", { className: "h-0 border-t border-white/10 mx-2 my-1" })
|
|
2110
|
+
] }, m))
|
|
2069
2111
|
}
|
|
2070
2112
|
);
|
|
2071
|
-
},
|
|
2072
|
-
const [i, o] =
|
|
2073
|
-
return
|
|
2074
|
-
const
|
|
2075
|
-
var
|
|
2076
|
-
if (!
|
|
2077
|
-
const
|
|
2113
|
+
}, Ss = ({ player: s, onClose: t }) => {
|
|
2114
|
+
const [i, o] = M({});
|
|
2115
|
+
return ee(() => {
|
|
2116
|
+
const a = () => {
|
|
2117
|
+
var x;
|
|
2118
|
+
if (!s.video) return;
|
|
2119
|
+
const h = s.video, f = h.getVideoPlaybackQuality ? h.getVideoPlaybackQuality() : null;
|
|
2078
2120
|
o({
|
|
2079
|
-
"Player Size": `${
|
|
2080
|
-
"Video Resolution": `${
|
|
2081
|
-
"Current Time": `${
|
|
2082
|
-
Duration: `${
|
|
2083
|
-
Volume: `${Math.round(
|
|
2121
|
+
"Player Size": `${h.offsetWidth} x ${h.offsetHeight}`,
|
|
2122
|
+
"Video Resolution": `${h.videoWidth} x ${h.videoHeight}`,
|
|
2123
|
+
"Current Time": `${h.currentTime.toFixed(3)}s`,
|
|
2124
|
+
Duration: `${h.duration.toFixed(3)}s`,
|
|
2125
|
+
Volume: `${Math.round(h.volume * 100)}%`,
|
|
2084
2126
|
"Dropped Frames": f ? f.droppedVideoFrames : "N/A",
|
|
2085
|
-
Buffer:
|
|
2086
|
-
Engine: ((
|
|
2087
|
-
URL:
|
|
2127
|
+
Buffer: h.buffered.length > 0 ? `${(h.buffered.end(h.buffered.length - 1) - h.currentTime).toFixed(2)}s` : "0s",
|
|
2128
|
+
Engine: ((x = s.store.get().sources[s.store.get().currentSourceIndex]) == null ? void 0 : x.type) || "native",
|
|
2129
|
+
URL: h.currentSrc
|
|
2088
2130
|
});
|
|
2089
2131
|
};
|
|
2090
|
-
|
|
2091
|
-
const
|
|
2092
|
-
return () => clearInterval(
|
|
2093
|
-
}, [
|
|
2132
|
+
a();
|
|
2133
|
+
const u = setInterval(a, 1e3);
|
|
2134
|
+
return () => clearInterval(u);
|
|
2135
|
+
}, [s]), /* @__PURE__ */ e("div", { className: "absolute inset-0 z-[60] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200", children: /* @__PURE__ */ c(
|
|
2094
2136
|
"div",
|
|
2095
2137
|
{
|
|
2096
2138
|
className: "bg-[var(--bg-panel)] border border-white/10 rounded-xl w-full max-w-md shadow-2xl relative font-mono text-xs text-zinc-300 flex flex-col",
|
|
2097
2139
|
style: { borderRadius: "var(--radius)", maxHeight: "90%" },
|
|
2098
2140
|
children: [
|
|
2099
|
-
/* @__PURE__ */
|
|
2141
|
+
/* @__PURE__ */ c("div", { className: "p-5 pb-0 flex-shrink-0 relative", children: [
|
|
2100
2142
|
/* @__PURE__ */ e(
|
|
2101
2143
|
"button",
|
|
2102
2144
|
{
|
|
2103
|
-
onClick: (
|
|
2104
|
-
|
|
2145
|
+
onClick: (a) => {
|
|
2146
|
+
a.stopPropagation(), t();
|
|
2105
2147
|
},
|
|
2106
2148
|
className: "absolute top-3 right-3 p-1.5 text-zinc-400 hover:text-white hover:bg-white/10 rounded-full transition-colors",
|
|
2107
|
-
children: /* @__PURE__ */ e(
|
|
2149
|
+
children: /* @__PURE__ */ e(ti, { className: "w-4 h-4" })
|
|
2108
2150
|
}
|
|
2109
2151
|
),
|
|
2110
2152
|
/* @__PURE__ */ e("h3", { className: "text-sm font-bold text-white mb-4 uppercase tracking-wider border-b border-white/10 pb-2", children: "Video Statistics" })
|
|
2111
2153
|
] }),
|
|
2112
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto hide-scrollbar p-5 pt-0 space-y-2.5 flex-1 min-h-0", children: Object.entries(i).map(([
|
|
2113
|
-
/* @__PURE__ */ e("span", { className: "text-zinc-500 font-bold shrink-0", children:
|
|
2114
|
-
/* @__PURE__ */ e("span", { className: "text-zinc-200 truncate select-all font-medium bg-white/5 px-1.5 py-0.5 rounded break-all text-right", title: String(
|
|
2115
|
-
] },
|
|
2154
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto hide-scrollbar p-5 pt-0 space-y-2.5 flex-1 min-h-0", children: Object.entries(i).map(([a, u]) => /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-1", children: [
|
|
2155
|
+
/* @__PURE__ */ e("span", { className: "text-zinc-500 font-bold shrink-0", children: a }),
|
|
2156
|
+
/* @__PURE__ */ e("span", { className: "text-zinc-200 truncate select-all font-medium bg-white/5 px-1.5 py-0.5 rounded break-all text-right", title: String(u), children: String(u) })
|
|
2157
|
+
] }, a)) })
|
|
2116
2158
|
]
|
|
2117
2159
|
}
|
|
2118
2160
|
) });
|
|
2119
2161
|
};
|
|
2120
|
-
function
|
|
2121
|
-
if (!
|
|
2122
|
-
|
|
2123
|
-
const t = parseInt(
|
|
2162
|
+
function Cs(s) {
|
|
2163
|
+
if (!s) return "#ffffff";
|
|
2164
|
+
s = s.replace("#", ""), s.length === 3 && (s = s.split("").map((u) => u + u).join(""));
|
|
2165
|
+
const t = parseInt(s.substring(0, 2), 16), i = parseInt(s.substring(2, 4), 16), o = parseInt(s.substring(4, 6), 16);
|
|
2124
2166
|
return (t * 299 + i * 587 + o * 114) / 1e3 >= 128 ? "#000000" : "#ffffff";
|
|
2125
2167
|
}
|
|
2126
|
-
const
|
|
2168
|
+
const Ns = [
|
|
2127
2169
|
{ label: "Strata", value: "#6366f1" },
|
|
2128
2170
|
{ label: "Emerald", value: "#10b981" },
|
|
2129
2171
|
{ label: "Rose", value: "#f43f5e" },
|
|
2130
2172
|
{ label: "Amber", value: "#f59e0b" },
|
|
2131
2173
|
{ label: "Sky", value: "#0ea5e9" },
|
|
2132
2174
|
{ label: "Violet", value: "#8b5cf6" }
|
|
2133
|
-
],
|
|
2175
|
+
], Ms = [
|
|
2134
2176
|
{ label: "Default", value: "default", color: "#6366f1" },
|
|
2135
2177
|
{ label: "Pixel", value: "pixel", color: "#ef4444" },
|
|
2136
2178
|
{ label: "Game", value: "game", color: "#eab308" },
|
|
2137
2179
|
{ label: "Hacker", value: "hacker", color: "#22c55e" }
|
|
2138
|
-
],
|
|
2139
|
-
var
|
|
2140
|
-
const { src: t, type: i, sources: o, poster:
|
|
2141
|
-
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2144
|
-
}, [
|
|
2145
|
-
() =>
|
|
2146
|
-
() =>
|
|
2147
|
-
),
|
|
2148
|
-
E && (
|
|
2149
|
-
const [
|
|
2150
|
-
(
|
|
2151
|
-
}, [
|
|
2152
|
-
|
|
2153
|
-
const
|
|
2154
|
-
(
|
|
2180
|
+
], Qt = ({ content: s, className: t, style: i }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("div", { className: t, style: i, dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("div", { className: t, style: i, children: s }) : /* @__PURE__ */ e("div", { className: t, style: i, children: s }), Yt = (s) => {
|
|
2181
|
+
var Dt, Ot;
|
|
2182
|
+
const { src: t, type: i, sources: o, poster: a, autoPlay: u, thumbnails: h, textTracks: f, plugins: x, onGetInstance: b, ...m } = s, v = m.screenshot ?? !1, p = m.pip ?? !0, S = m.setting ?? !0, $ = m.fullscreen ?? !0, U = m.fullscreenWeb ?? !1, H = m.lock ?? !1, q = m.fastForward ?? !0, g = m.flip ?? !0, Y = m.aspectRatio ?? !0, G = m.hotKey ?? !0, fe = m.backdrop ?? !0, k = m.gestureSeek ?? !1, j = m.centerControls ?? !0, D = m.fetchTimeout ?? 3e4;
|
|
2183
|
+
m.autoOrientation;
|
|
2184
|
+
const T = W(null), [n, X] = M(null), [_, ne] = M(!1), [re, be] = M(0), [ge, Te] = M(0), [We, je] = M(!1), ct = Ce(() => Kt(m), []), r = Ni(
|
|
2185
|
+
Ve((d) => n ? n.store.subscribe(d) : () => {
|
|
2186
|
+
}, [n]),
|
|
2187
|
+
() => n ? n.store.get() : ct,
|
|
2188
|
+
() => ct
|
|
2189
|
+
), si = Ce(() => Cs(r.themeColor), [r.themeColor]), [V, dt] = M(!1), [B, ut] = M(!1), [J, A] = M("main"), [E, Ue] = M(null), Ge = W(null);
|
|
2190
|
+
E && (Ge.current = E);
|
|
2191
|
+
const [oe, ht] = M({ x: 0, y: 0, visible: !1 }), [ni, mt] = M(!1), pt = st(V, 300), ft = st(B, 300), ze = st(!!E, 300), z = Ve(() => {
|
|
2192
|
+
(V || B || E || oe.visible) && (dt(!1), ut(!1), Ue(null), ht((d) => ({ ...d, visible: !1 })));
|
|
2193
|
+
}, [V, B, E, oe.visible]);
|
|
2194
|
+
ee(() => {
|
|
2195
|
+
const d = (w) => {
|
|
2196
|
+
(V || B || E || oe.visible) && z();
|
|
2155
2197
|
};
|
|
2156
|
-
return (
|
|
2157
|
-
document.removeEventListener("click",
|
|
2198
|
+
return (V || B || E || oe.visible) && (document.addEventListener("click", d), document.addEventListener("touchstart", d)), () => {
|
|
2199
|
+
document.removeEventListener("click", d), document.removeEventListener("touchstart", d);
|
|
2158
2200
|
};
|
|
2159
|
-
}, [
|
|
2160
|
-
const [
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
}, [
|
|
2164
|
-
if (!
|
|
2201
|
+
}, [V, B, E, oe.visible, z]);
|
|
2202
|
+
const [_e, Ie] = M(!1), [Re, qe] = M(0), [oi, bt] = M(!1), [ai, gt] = M(!1), [Pe, ve] = M(!1), [vt, Xe] = M(!1), [xt, wt] = M([]), [yt, kt] = M(null), [ri, li] = M(0), [ce, St] = M(null), [ue, Le] = M(null), [Ts, Ct] = M(null), [Qe, Nt] = M(!1), Ye = W(null), Mt = W(1), we = W(null), Fe = W(null), Tt = W(0), zt = W(0), It = W(0), te = W(null), ye = W(!1), ke = W(null), de = W(null), Je = W(null), Ke = W(null), Se = W(null);
|
|
2203
|
+
Be(() => {
|
|
2204
|
+
n && T.current && n.attach(T.current);
|
|
2205
|
+
}, [n, r.isWebFullscreen]), Be(() => {
|
|
2206
|
+
if (!T.current) return;
|
|
2165
2207
|
(() => {
|
|
2166
|
-
|
|
2208
|
+
T.current && (be(T.current.clientHeight), Te(T.current.clientWidth));
|
|
2167
2209
|
})();
|
|
2168
|
-
const
|
|
2169
|
-
for (const
|
|
2170
|
-
|
|
2210
|
+
const w = new ResizeObserver((C) => {
|
|
2211
|
+
for (const N of C)
|
|
2212
|
+
be(N.contentRect.height), Te(N.contentRect.width);
|
|
2171
2213
|
});
|
|
2172
|
-
return
|
|
2173
|
-
|
|
2214
|
+
return w.observe(T.current), () => {
|
|
2215
|
+
w.disconnect();
|
|
2174
2216
|
};
|
|
2175
|
-
}, [
|
|
2176
|
-
if (
|
|
2177
|
-
const
|
|
2178
|
-
return
|
|
2179
|
-
|
|
2217
|
+
}, [r.isWebFullscreen]), ee(() => {
|
|
2218
|
+
if (je("ontouchstart" in window || navigator.maxTouchPoints > 0), !T.current) return;
|
|
2219
|
+
const d = new $i({ ...m, poster: a });
|
|
2220
|
+
return x && x.length > 0 && x.forEach((w) => d.use(w)), d.attach(T.current), X(d), b && b(d), () => {
|
|
2221
|
+
d.destroy(), X(null);
|
|
2180
2222
|
};
|
|
2181
|
-
}, []),
|
|
2182
|
-
if (!
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2185
|
-
}, [
|
|
2186
|
-
if (!
|
|
2187
|
-
const
|
|
2188
|
-
o && o.length > 0 ? (
|
|
2189
|
-
}, [t, i, o, f,
|
|
2190
|
-
|
|
2191
|
-
|
|
2223
|
+
}, []), ee(() => {
|
|
2224
|
+
if (!n) return;
|
|
2225
|
+
const d = {};
|
|
2226
|
+
m.theme !== void 0 && m.theme !== r.theme && (d.theme = m.theme), m.themeColor !== void 0 && m.themeColor !== r.themeColor && (d.themeColor = m.themeColor), m.iconSize !== void 0 && m.iconSize !== r.iconSize && (d.iconSize = m.iconSize), m.brightness !== void 0 && Math.abs(m.brightness - r.brightness) > 0.05 && n.setBrightness(m.brightness), m.videoFit !== void 0 && m.videoFit !== r.videoFit && n.setVideoFit(m.videoFit), Object.keys(d).length > 0 && n.setAppearance(d), m.volume !== void 0 && Math.abs(m.volume - r.volume) > 0.01 && n.setVolume(m.volume), m.muted !== void 0 && m.muted !== r.isMuted && (m.muted ? n.video.muted = !0 : n.video.muted = !1);
|
|
2227
|
+
}, [n, m.theme, m.themeColor, m.iconSize, m.volume, m.muted, m.brightness, m.videoFit]), ee(() => {
|
|
2228
|
+
if (!n) return;
|
|
2229
|
+
const d = f || [];
|
|
2230
|
+
o && o.length > 0 ? (ne(!1), n.setSources(o, d)) : t && (ne(!1), n.setSources([{ url: t, type: i || "auto" }], d));
|
|
2231
|
+
}, [t, i, o, f, n]), ee(() => {
|
|
2232
|
+
n && u && n.play().catch(() => {
|
|
2233
|
+
n.pause(), n.store.setState({ isPlaying: !1, isBuffering: !1 }), n.notify({ type: "warning", message: "Autoplay blocked by browser. Click play to start.", duration: 5e3 });
|
|
2192
2234
|
});
|
|
2193
|
-
}, [
|
|
2194
|
-
|
|
2195
|
-
}, [
|
|
2196
|
-
|
|
2197
|
-
}, [
|
|
2198
|
-
|
|
2235
|
+
}, [n, u]), ee(() => {
|
|
2236
|
+
r.isPlaying && !_ && ne(!0);
|
|
2237
|
+
}, [r.isPlaying, _]), ee(() => {
|
|
2238
|
+
h && n ? Li(h, n.notify.bind(n), D).then((d) => wt(d)) : wt([]);
|
|
2239
|
+
}, [h, n, D]), ee(() => (ue && (Se.current && clearTimeout(Se.current), Se.current = setTimeout(() => {
|
|
2240
|
+
Le(null);
|
|
2199
2241
|
}, 600)), () => {
|
|
2200
|
-
|
|
2201
|
-
}), [
|
|
2202
|
-
const
|
|
2203
|
-
var
|
|
2204
|
-
if (!
|
|
2205
|
-
switch (
|
|
2242
|
+
Se.current && clearTimeout(Se.current);
|
|
2243
|
+
}), [ue]), ee(() => {
|
|
2244
|
+
const d = (w) => {
|
|
2245
|
+
var N;
|
|
2246
|
+
if (!n || !G || ((N = document.activeElement) == null ? void 0 : N.tagName) === "INPUT") return;
|
|
2247
|
+
switch (w.key.toLowerCase()) {
|
|
2206
2248
|
case " ":
|
|
2207
2249
|
case "k":
|
|
2208
|
-
|
|
2250
|
+
w.preventDefault(), n.togglePlay();
|
|
2209
2251
|
break;
|
|
2210
2252
|
case "arrowright":
|
|
2211
|
-
|
|
2253
|
+
w.preventDefault(), n.skip(5);
|
|
2212
2254
|
break;
|
|
2213
2255
|
case "arrowleft":
|
|
2214
|
-
|
|
2256
|
+
w.preventDefault(), n.skip(-5);
|
|
2215
2257
|
break;
|
|
2216
2258
|
case "arrowup":
|
|
2217
|
-
|
|
2259
|
+
w.preventDefault(), n.setVolume(n.video.volume + 0.1);
|
|
2218
2260
|
break;
|
|
2219
2261
|
case "arrowdown":
|
|
2220
|
-
|
|
2262
|
+
w.preventDefault(), n.setVolume(n.video.volume - 0.1);
|
|
2221
2263
|
break;
|
|
2222
2264
|
case "f":
|
|
2223
|
-
|
|
2265
|
+
w.preventDefault(), n.toggleFullscreen();
|
|
2224
2266
|
break;
|
|
2225
2267
|
case "m":
|
|
2226
|
-
|
|
2268
|
+
w.preventDefault(), n.toggleMute();
|
|
2227
2269
|
break;
|
|
2228
2270
|
case "escape":
|
|
2229
|
-
|
|
2271
|
+
n.store.get().isWebFullscreen && (w.preventDefault(), n.toggleWebFullscreen());
|
|
2230
2272
|
break;
|
|
2231
2273
|
}
|
|
2232
2274
|
};
|
|
2233
|
-
return window.addEventListener("keydown",
|
|
2234
|
-
}, [
|
|
2235
|
-
const
|
|
2236
|
-
|
|
2237
|
-
!
|
|
2275
|
+
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2276
|
+
}, [n, G]);
|
|
2277
|
+
const Rt = () => {
|
|
2278
|
+
n && (n.setControlsVisible(!0), de.current && clearTimeout(de.current), !(V || B || E) && (de.current = setTimeout(() => {
|
|
2279
|
+
!r.isPlaying || V || B || E || n.setControlsVisible(!1);
|
|
2238
2280
|
}, 2500)));
|
|
2239
2281
|
};
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
}, [
|
|
2243
|
-
const
|
|
2244
|
-
if (!(!
|
|
2245
|
-
if (
|
|
2246
|
-
|
|
2282
|
+
ee(() => {
|
|
2283
|
+
n && (!V && !B && !E && r.isPlaying ? Rt() : (V || B || E) && (n.setControlsVisible(!0), de.current && clearTimeout(de.current)));
|
|
2284
|
+
}, [V, B, E, r.isPlaying, n]);
|
|
2285
|
+
const Pt = Ve(() => {
|
|
2286
|
+
if (!(!q || !n || !r.isPlaying || r.isLocked)) {
|
|
2287
|
+
if (V || B || E) {
|
|
2288
|
+
z();
|
|
2247
2289
|
return;
|
|
2248
2290
|
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2291
|
+
Mt.current = n.video.playbackRate, Ye.current = setTimeout(() => {
|
|
2292
|
+
n.video.playbackRate = 2, Nt(!0);
|
|
2251
2293
|
}, 500);
|
|
2252
2294
|
}
|
|
2253
|
-
}, [
|
|
2254
|
-
|
|
2255
|
-
}, [
|
|
2256
|
-
if (
|
|
2257
|
-
|
|
2295
|
+
}, [q, n, r.isPlaying, r.isLocked, V, B, E]), Ze = Ve(() => {
|
|
2296
|
+
Ye.current && clearTimeout(Ye.current), Qe && n && (n.video.playbackRate = Mt.current, Nt(!1));
|
|
2297
|
+
}, [Qe, n]), ci = (d) => {
|
|
2298
|
+
if (Pt(), V || B || E) {
|
|
2299
|
+
z();
|
|
2258
2300
|
return;
|
|
2259
2301
|
}
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2302
|
+
r.isLocked || (we.current = d.touches[0].clientX, Fe.current = d.touches[0].clientY, Tt.current = r.currentTime, zt.current = r.volume, It.current = r.brightness, ye.current = !1, te.current = null);
|
|
2303
|
+
}, di = (d) => {
|
|
2304
|
+
var ae, l;
|
|
2305
|
+
if (r.isLocked || !n || we.current === null || Fe.current === null) return;
|
|
2306
|
+
const w = d.touches[0].clientX, C = d.touches[0].clientY, N = w - we.current, P = C - Fe.current;
|
|
2307
|
+
if (!te.current && (Math.abs(N) > 10 || Math.abs(P) > 10))
|
|
2308
|
+
if (ye.current = !0, Ze(), Math.abs(N) > Math.abs(P))
|
|
2309
|
+
k && (te.current = "seek", Ie(!0));
|
|
2310
|
+
else {
|
|
2311
|
+
const R = T.current ? T.current.clientWidth / 2 : window.innerWidth / 2;
|
|
2312
|
+
we.current < R ? (te.current = "brightness", Xe(!0)) : (te.current = "volume", ve(!0));
|
|
2267
2313
|
}
|
|
2314
|
+
if (te.current === "seek" && T.current && r.duration) {
|
|
2315
|
+
const R = T.current.getBoundingClientRect(), O = N / R.width, I = Math.max(0, Math.min(r.duration, Tt.current + O * r.duration));
|
|
2316
|
+
qe(I);
|
|
2317
|
+
} else if (te.current === "volume") {
|
|
2318
|
+
const O = -(P / (((ae = T.current) == null ? void 0 : ae.clientHeight) || 300)) * 1.5;
|
|
2319
|
+
n.setVolume(Math.max(0, Math.min(1, zt.current + O)));
|
|
2320
|
+
} else if (te.current === "brightness") {
|
|
2321
|
+
const O = -(P / (((l = T.current) == null ? void 0 : l.clientHeight) || 300)) * 1.5;
|
|
2322
|
+
n.setBrightness(Math.max(0, Math.min(2, It.current + O)));
|
|
2268
2323
|
}
|
|
2269
|
-
},
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
},
|
|
2276
|
-
if (
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
if (c.stopPropagation(), a.isLocked) return;
|
|
2281
|
-
(B || V || E) && C(), Me(!0), He(Xe(c));
|
|
2282
|
-
const v = (M) => He(Xe(M)), S = (M) => {
|
|
2283
|
-
s == null || s.seek(Xe(M)), Me(!1), document.removeEventListener("mousemove", v), document.removeEventListener("touchmove", v), document.removeEventListener("mouseup", S), document.removeEventListener("touchend", S);
|
|
2324
|
+
}, ui = (d) => {
|
|
2325
|
+
Ze(), te.current === "seek" ? (n == null || n.seek(Re), Ie(!1)) : te.current === "volume" ? ve(!1) : te.current === "brightness" && Xe(!1), ye.current = !1, te.current = null, we.current = null, Fe.current = null;
|
|
2326
|
+
}, et = (d) => {
|
|
2327
|
+
if (!Je.current || !r.duration) return 0;
|
|
2328
|
+
const w = Je.current.getBoundingClientRect(), C = "touches" in d ? d.touches[0].clientX : d.clientX;
|
|
2329
|
+
return Math.max(0, Math.min(1, (C - w.left) / w.width)) * r.duration;
|
|
2330
|
+
}, Lt = (d) => {
|
|
2331
|
+
if (d.stopPropagation(), r.isLocked) return;
|
|
2332
|
+
(V || B || E) && z(), Ie(!0), qe(et(d));
|
|
2333
|
+
const w = (N) => qe(et(N)), C = (N) => {
|
|
2334
|
+
n == null || n.seek(et(N)), Ie(!1), document.removeEventListener("mousemove", w), document.removeEventListener("touchmove", w), document.removeEventListener("mouseup", C), document.removeEventListener("touchend", C);
|
|
2284
2335
|
};
|
|
2285
|
-
document.addEventListener("mousemove",
|
|
2286
|
-
},
|
|
2287
|
-
if (!
|
|
2288
|
-
const
|
|
2289
|
-
return Math.max(0, Math.min(1, (
|
|
2290
|
-
},
|
|
2291
|
-
if (
|
|
2292
|
-
|
|
2293
|
-
const
|
|
2294
|
-
|
|
2336
|
+
document.addEventListener("mousemove", w), document.addEventListener("touchmove", w), document.addEventListener("mouseup", C), document.addEventListener("touchend", C);
|
|
2337
|
+
}, Ft = (d) => {
|
|
2338
|
+
if (!Ke.current) return 0;
|
|
2339
|
+
const w = Ke.current.getBoundingClientRect(), C = "touches" in d ? d.touches[0].clientX : d.clientX;
|
|
2340
|
+
return Math.max(0, Math.min(1, (C - w.left) / w.width));
|
|
2341
|
+
}, $t = (d) => {
|
|
2342
|
+
if (d.stopPropagation(), !n || r.isLocked) return;
|
|
2343
|
+
bt(!0), n.setVolume(Ft(d));
|
|
2344
|
+
const w = (N) => n.setVolume(Ft(N)), C = () => {
|
|
2345
|
+
bt(!1), document.removeEventListener("mousemove", w), document.removeEventListener("touchmove", w), document.removeEventListener("mouseup", C), document.removeEventListener("touchend", C);
|
|
2295
2346
|
};
|
|
2296
|
-
document.addEventListener("mousemove",
|
|
2297
|
-
},
|
|
2298
|
-
if (!
|
|
2299
|
-
const
|
|
2300
|
-
|
|
2301
|
-
},
|
|
2302
|
-
!
|
|
2303
|
-
},
|
|
2304
|
-
if (!
|
|
2305
|
-
if (
|
|
2306
|
-
|
|
2347
|
+
document.addEventListener("mousemove", w), document.addEventListener("touchmove", w), document.addEventListener("mouseup", C), document.addEventListener("touchend", C);
|
|
2348
|
+
}, hi = (d) => {
|
|
2349
|
+
if (!r.duration || r.isLive) return;
|
|
2350
|
+
const w = d.currentTarget.getBoundingClientRect(), C = (d.clientX - w.left) / w.width, N = C * r.duration;
|
|
2351
|
+
li(C * 100), kt(N), xt.length > 0 && St(xt.find((P) => N >= P.start && N < P.end) || null);
|
|
2352
|
+
}, $e = (d) => {
|
|
2353
|
+
!n || r.isLocked || (n.skip(d === "forward" ? 10 : -10), Ct(d), setTimeout(() => Ct(null), 300));
|
|
2354
|
+
}, mi = (d) => {
|
|
2355
|
+
if (!n) return;
|
|
2356
|
+
if (ye.current) {
|
|
2357
|
+
ye.current = !1;
|
|
2307
2358
|
return;
|
|
2308
2359
|
}
|
|
2309
|
-
if (
|
|
2310
|
-
|
|
2360
|
+
if (V || B || E || oe.visible) {
|
|
2361
|
+
z();
|
|
2311
2362
|
return;
|
|
2312
2363
|
}
|
|
2313
|
-
if (
|
|
2314
|
-
!
|
|
2315
|
-
}, 2500),
|
|
2316
|
-
const
|
|
2317
|
-
|
|
2318
|
-
|
|
2364
|
+
if (Pe && ve(!1), vt && Xe(!1), n.setControlsVisible(!0), de.current && clearTimeout(de.current), de.current = setTimeout(() => {
|
|
2365
|
+
!r.isPlaying || V || B || E || n.setControlsVisible(!1);
|
|
2366
|
+
}, 2500), r.isLocked) return;
|
|
2367
|
+
const w = d.currentTarget.getBoundingClientRect(), C = d.clientX - w.left, N = w.width, P = Date.now();
|
|
2368
|
+
ke.current ? (clearTimeout(ke.current), ke.current = null, C < N * 0.35 ? ($e("rewind"), Le({ type: "rewind", id: P })) : C > N * 0.65 ? ($e("forward"), Le({ type: "forward", id: P })) : n.toggleFullscreen()) : ke.current = setTimeout(() => {
|
|
2369
|
+
n.togglePlay(), ke.current = null;
|
|
2319
2370
|
}, 250);
|
|
2320
|
-
},
|
|
2321
|
-
var
|
|
2322
|
-
if (
|
|
2323
|
-
|
|
2324
|
-
const
|
|
2325
|
-
|
|
2326
|
-
|
|
2371
|
+
}, pi = (d) => {
|
|
2372
|
+
var C;
|
|
2373
|
+
if (d.preventDefault(), d.stopPropagation(), r.isLocked) return;
|
|
2374
|
+
z();
|
|
2375
|
+
const w = (C = T.current) == null ? void 0 : C.getBoundingClientRect();
|
|
2376
|
+
w && requestAnimationFrame(() => {
|
|
2377
|
+
ht({
|
|
2327
2378
|
visible: !0,
|
|
2328
|
-
x:
|
|
2329
|
-
y:
|
|
2379
|
+
x: d.clientX - w.left,
|
|
2380
|
+
y: d.clientY - w.top
|
|
2330
2381
|
});
|
|
2331
2382
|
});
|
|
2332
|
-
},
|
|
2333
|
-
if (
|
|
2334
|
-
|
|
2383
|
+
}, fi = (d) => {
|
|
2384
|
+
if (d.stopPropagation(), z(), Pe) {
|
|
2385
|
+
ve(!1);
|
|
2335
2386
|
return;
|
|
2336
2387
|
}
|
|
2337
|
-
|
|
2338
|
-
},
|
|
2339
|
-
switch (
|
|
2388
|
+
We ? ve(!0) : n == null || n.toggleMute();
|
|
2389
|
+
}, bi = r.isMuted || r.volume === 0 ? Ut : r.volume < 0.5 ? Ei : jt, Ee = Math.max(100, re - 120), gi = () => {
|
|
2390
|
+
switch (r.iconSize) {
|
|
2340
2391
|
case "small":
|
|
2341
2392
|
return "w-4 h-4";
|
|
2342
2393
|
case "large":
|
|
@@ -2344,8 +2395,8 @@ const vn = [
|
|
|
2344
2395
|
default:
|
|
2345
2396
|
return "w-5 h-5";
|
|
2346
2397
|
}
|
|
2347
|
-
},
|
|
2348
|
-
switch (
|
|
2398
|
+
}, vi = () => {
|
|
2399
|
+
switch (r.iconSize) {
|
|
2349
2400
|
case "small":
|
|
2350
2401
|
return "p-2 min-w-[32px] min-h-[32px]";
|
|
2351
2402
|
case "large":
|
|
@@ -2353,8 +2404,8 @@ const vn = [
|
|
|
2353
2404
|
default:
|
|
2354
2405
|
return "p-2.5 min-w-[36px] min-h-[36px]";
|
|
2355
2406
|
}
|
|
2356
|
-
},
|
|
2357
|
-
switch (
|
|
2407
|
+
}, ie = gi(), se = vi(), he = (() => {
|
|
2408
|
+
switch (r.iconSize) {
|
|
2358
2409
|
case "small":
|
|
2359
2410
|
return {
|
|
2360
2411
|
playBtn: "w-14 h-14",
|
|
@@ -2377,8 +2428,8 @@ const vn = [
|
|
|
2377
2428
|
skipIcon: "w-6 h-6"
|
|
2378
2429
|
};
|
|
2379
2430
|
}
|
|
2380
|
-
})(),
|
|
2381
|
-
const
|
|
2431
|
+
})(), xi = !r.isLocked && (r.controlsVisible || !r.isPlaying || V || B || E || oe.visible), Et = ai || oi || Pe, Ae = fe ? "backdrop-blur-xl bg-black/80" : "bg-black/95", At = Ce(() => {
|
|
2432
|
+
const d = [
|
|
2382
2433
|
{ id: "play", position: "left", index: 10, isBuiltIn: !0 },
|
|
2383
2434
|
{ id: "volume", position: "left", index: 20, isBuiltIn: !0 },
|
|
2384
2435
|
{ id: "time", position: "left", index: 30, isBuiltIn: !0 },
|
|
@@ -2390,304 +2441,325 @@ const vn = [
|
|
|
2390
2441
|
{ id: "fullscreenWeb", position: "right", index: 110, isBuiltIn: !0 },
|
|
2391
2442
|
{ id: "fullscreen", position: "right", index: 120, isBuiltIn: !0 }
|
|
2392
2443
|
];
|
|
2393
|
-
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2444
|
+
m.controls && m.controls.forEach((P) => {
|
|
2445
|
+
const ae = d.find((l) => l.id === P.id);
|
|
2446
|
+
ae ? Object.assign(ae, P) : d.push(P);
|
|
2396
2447
|
});
|
|
2397
|
-
const
|
|
2398
|
-
return
|
|
2448
|
+
const w = r.sources[r.currentSourceIndex] || { url: t || "", type: i || "auto" }, C = w.type === "hls" || w.url.includes(".m3u8"), N = d.find((P) => P.id === "download");
|
|
2449
|
+
return N && (C ? (N.children = [
|
|
2399
2450
|
{ html: "Download Format", isLabel: !0 },
|
|
2400
2451
|
{
|
|
2401
2452
|
html: "MPEG-TS",
|
|
2402
2453
|
value: "Original Stream",
|
|
2403
|
-
icon: /* @__PURE__ */ e(
|
|
2404
|
-
onClick: () =>
|
|
2454
|
+
icon: /* @__PURE__ */ e(ii, { className: "w-3.5 h-3.5" }),
|
|
2455
|
+
onClick: () => n == null ? void 0 : n.download({ format: "ts" })
|
|
2405
2456
|
},
|
|
2406
2457
|
{
|
|
2407
2458
|
html: "MP4",
|
|
2408
2459
|
value: "Converted",
|
|
2409
|
-
icon: /* @__PURE__ */ e(
|
|
2410
|
-
onClick: () =>
|
|
2460
|
+
icon: /* @__PURE__ */ e(Zt, { className: "w-3.5 h-3.5" }),
|
|
2461
|
+
onClick: () => n == null ? void 0 : n.download({ format: "mp4" })
|
|
2411
2462
|
}
|
|
2412
|
-
],
|
|
2413
|
-
}, [
|
|
2414
|
-
var
|
|
2415
|
-
if (!
|
|
2416
|
-
const l =
|
|
2417
|
-
return /* @__PURE__ */
|
|
2463
|
+
], N.onClick = void 0) : (N.children = void 0, N.onClick = (P) => P.download())), d.filter((P) => !(P.id === "screenshot" && !v || P.id === "pip" && !p || P.id === "settings" && !S || P.id === "fullscreen" && !$ || P.id === "fullscreenWeb" && !U)).sort((P, ae) => P.index - ae.index);
|
|
2464
|
+
}, [m.controls, v, p, S, $, U, r.currentSourceIndex, r.sources, t, i]), Vt = (d) => {
|
|
2465
|
+
var w, C, N, P, ae;
|
|
2466
|
+
if (!d.isBuiltIn) {
|
|
2467
|
+
const l = d.id || `ctrl-${d.index}`, R = E === l, O = R || ze.isMounted && Ge.current === l;
|
|
2468
|
+
return /* @__PURE__ */ c("div", { className: "relative", children: [
|
|
2418
2469
|
/* @__PURE__ */ e(
|
|
2419
2470
|
"button",
|
|
2420
2471
|
{
|
|
2421
|
-
onMouseDown: (
|
|
2422
|
-
onTouchStart: (
|
|
2423
|
-
onClick: (
|
|
2424
|
-
if (
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2472
|
+
onMouseDown: (I) => I.stopPropagation(),
|
|
2473
|
+
onTouchStart: (I) => I.stopPropagation(),
|
|
2474
|
+
onClick: (I) => {
|
|
2475
|
+
if (I.stopPropagation(), d.children) {
|
|
2476
|
+
const tt = R;
|
|
2477
|
+
z(), tt || Ue(l);
|
|
2427
2478
|
} else
|
|
2428
|
-
|
|
2479
|
+
z(), d.click ? d.click(n) : d.onClick && d.onClick(n);
|
|
2429
2480
|
},
|
|
2430
|
-
className: `strata-control-btn transition-colors focus:outline-none flex items-center justify-center ${
|
|
2431
|
-
style: { borderRadius: "var(--radius)", ...
|
|
2432
|
-
title:
|
|
2433
|
-
children: /* @__PURE__ */ e(
|
|
2481
|
+
className: `strata-control-btn transition-colors focus:outline-none flex items-center justify-center ${se} ${R ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"} ${d.className || ""}`,
|
|
2482
|
+
style: { borderRadius: "var(--radius)", ...d.style },
|
|
2483
|
+
title: d.tooltip,
|
|
2484
|
+
children: /* @__PURE__ */ e(Qt, { content: d.html || "" })
|
|
2434
2485
|
}
|
|
2435
2486
|
),
|
|
2436
|
-
|
|
2437
|
-
|
|
2487
|
+
d.children && O && /* @__PURE__ */ e(
|
|
2488
|
+
Xt,
|
|
2438
2489
|
{
|
|
2439
|
-
items:
|
|
2440
|
-
onClose:
|
|
2441
|
-
maxHeight:
|
|
2442
|
-
className: `strata-backdrop ${
|
|
2490
|
+
items: d.children,
|
|
2491
|
+
onClose: z,
|
|
2492
|
+
maxHeight: Ee,
|
|
2493
|
+
className: `strata-backdrop ${Ae} ${ze.isVisible ? "opacity-100 translate-y-0 scale-100 animate-in fade-in zoom-in-95 duration-300" : "opacity-0 translate-y-2 scale-95 duration-300"}`
|
|
2443
2494
|
}
|
|
2444
2495
|
)
|
|
2445
|
-
] },
|
|
2496
|
+
] }, d.index);
|
|
2446
2497
|
}
|
|
2447
|
-
switch (
|
|
2498
|
+
switch (d.id) {
|
|
2448
2499
|
case "play":
|
|
2449
2500
|
return /* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2450
|
-
l.stopPropagation(),
|
|
2451
|
-
}, className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none ${
|
|
2501
|
+
l.stopPropagation(), z(), n == null || n.togglePlay();
|
|
2502
|
+
}, className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none ${se}`, style: { borderRadius: "var(--radius)" }, children: r.isPlaying ? /* @__PURE__ */ e(Wt, { className: `${ie} fill-current` }) : /* @__PURE__ */ e(Ht, { className: `${ie} fill-current` }) }, "play");
|
|
2452
2503
|
case "volume":
|
|
2453
|
-
return /* @__PURE__ */
|
|
2504
|
+
return /* @__PURE__ */ c(
|
|
2454
2505
|
"div",
|
|
2455
2506
|
{
|
|
2456
2507
|
className: "flex items-center gap-2 group/vol relative",
|
|
2457
2508
|
onMouseEnter: () => {
|
|
2458
|
-
window.matchMedia("(hover: hover)").matches &&
|
|
2509
|
+
window.matchMedia("(hover: hover)").matches && gt(!0);
|
|
2459
2510
|
},
|
|
2460
2511
|
onMouseLeave: () => {
|
|
2461
|
-
window.matchMedia("(hover: hover)").matches &&
|
|
2512
|
+
window.matchMedia("(hover: hover)").matches && gt(!1);
|
|
2462
2513
|
},
|
|
2463
2514
|
children: [
|
|
2464
|
-
/* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick:
|
|
2465
|
-
/* @__PURE__ */ e("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${
|
|
2466
|
-
/* @__PURE__ */ e("div", { className: "w-full h-1 bg-white/20 overflow-hidden", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ e("div", { className: "h-full bg-white", style: { width: `${(
|
|
2467
|
-
/* @__PURE__ */ e("div", { className: "absolute h-3 w-3 bg-white shadow-md top-1/2 -translate-y-1/2 pointer-events-none", style: { left: `calc(${(
|
|
2515
|
+
/* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: fi, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 focus:outline-none ${se}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(bi, { className: ie }) }),
|
|
2516
|
+
/* @__PURE__ */ e("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${Et ? "w-28 opacity-100 ml-1" : "w-0 opacity-0"}`, children: /* @__PURE__ */ c("div", { ref: Ke, className: "relative w-full h-full flex items-center cursor-pointer px-2", onMouseDown: $t, onTouchStart: $t, children: [
|
|
2517
|
+
/* @__PURE__ */ e("div", { className: "w-full h-1 bg-white/20 overflow-hidden", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ e("div", { className: "h-full bg-white", style: { width: `${(r.isMuted ? 0 : r.volume) * 100}%`, borderRadius: "var(--radius-full)" } }) }),
|
|
2518
|
+
/* @__PURE__ */ e("div", { className: "absolute h-3 w-3 bg-white shadow-md top-1/2 -translate-y-1/2 pointer-events-none", style: { left: `calc(${(r.isMuted ? 0 : r.volume) * 100}% * 0.85 + 4px)`, borderRadius: "var(--radius-full)" } })
|
|
2468
2519
|
] }) }),
|
|
2469
|
-
|
|
2520
|
+
Et && /* @__PURE__ */ e("div", { className: "strata-tooltip absolute bottom-full mb-2 px-1.5 py-0.5 rounded text-[10px] font-bold font-mono shadow-lg pointer-events-none whitespace-nowrap z-50 transform -translate-x-1/2", style: { left: `calc(52px + ${(r.isMuted ? 0 : r.volume) * 80}px)` }, children: r.isMuted ? "0%" : `${Math.round(r.volume * 100)}%` })
|
|
2470
2521
|
]
|
|
2471
2522
|
},
|
|
2472
2523
|
"volume"
|
|
2473
2524
|
);
|
|
2474
2525
|
case "time":
|
|
2475
|
-
return
|
|
2476
|
-
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full animate-pulse", style: { backgroundColor:
|
|
2477
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] font-bold tracking-wider", style: { color:
|
|
2478
|
-
] }, "live") : /* @__PURE__ */
|
|
2479
|
-
|
|
2526
|
+
return m.isLive ? /* @__PURE__ */ c("div", { className: "flex items-center gap-2 px-2 py-0.5 rounded-md border border-white/10", style: { backgroundColor: `${r.themeColor}1a`, borderColor: `${r.themeColor}33` }, children: [
|
|
2527
|
+
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full animate-pulse", style: { backgroundColor: r.themeColor } }),
|
|
2528
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-bold tracking-wider", style: { color: r.themeColor }, children: "LIVE" })
|
|
2529
|
+
] }, "live") : /* @__PURE__ */ c("div", { className: "text-xs font-medium text-zinc-400 font-mono select-none hidden sm:block tabular-nums", children: [
|
|
2530
|
+
it(_e ? Re : r.currentTime),
|
|
2480
2531
|
" ",
|
|
2481
2532
|
/* @__PURE__ */ e("span", { className: "text-zinc-600", children: "/" }),
|
|
2482
2533
|
" ",
|
|
2483
|
-
|
|
2534
|
+
it(r.duration)
|
|
2484
2535
|
] }, "time");
|
|
2485
2536
|
case "subtitle":
|
|
2486
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ c("div", { className: "relative", children: [
|
|
2487
2538
|
/* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2488
2539
|
l.stopPropagation();
|
|
2489
|
-
const
|
|
2490
|
-
|
|
2491
|
-
}, className: `strata-control-btn transition-colors focus:outline-none ${
|
|
2492
|
-
|
|
2493
|
-
|
|
2540
|
+
const R = B;
|
|
2541
|
+
z(), R || ut(!0);
|
|
2542
|
+
}, className: `strata-control-btn transition-colors focus:outline-none ${se} ${B ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(Oi, { className: ie }) }),
|
|
2543
|
+
ft.isMounted && /* @__PURE__ */ e(
|
|
2544
|
+
ys,
|
|
2494
2545
|
{
|
|
2495
|
-
tracks:
|
|
2496
|
-
current:
|
|
2497
|
-
onSelect: (l) =>
|
|
2498
|
-
onUpload: (l) =>
|
|
2499
|
-
onClose:
|
|
2500
|
-
settings:
|
|
2501
|
-
onSettingsChange: (l) =>
|
|
2502
|
-
onReset: () =>
|
|
2503
|
-
offset:
|
|
2504
|
-
onOffsetChange: (l) =>
|
|
2505
|
-
maxHeight:
|
|
2506
|
-
animationClass: `strata-backdrop ${
|
|
2546
|
+
tracks: r.subtitleTracks,
|
|
2547
|
+
current: r.currentSubtitle,
|
|
2548
|
+
onSelect: (l) => n == null ? void 0 : n.setSubtitle(l),
|
|
2549
|
+
onUpload: (l) => n == null ? void 0 : n.addTextTrack(l, l.name),
|
|
2550
|
+
onClose: z,
|
|
2551
|
+
settings: r.subtitleSettings,
|
|
2552
|
+
onSettingsChange: (l) => n == null ? void 0 : n.updateSubtitleSettings(l),
|
|
2553
|
+
onReset: () => n == null ? void 0 : n.resetSubtitleSettings(),
|
|
2554
|
+
offset: r.subtitleOffset,
|
|
2555
|
+
onOffsetChange: (l) => n == null ? void 0 : n.setSubtitleOffset(l),
|
|
2556
|
+
maxHeight: Ee,
|
|
2557
|
+
animationClass: `strata-backdrop ${Ae} ${ft.isVisible ? "opacity-100 translate-y-0 scale-100 animate-in fade-in zoom-in-95 duration-300" : "opacity-0 translate-y-2 scale-95 duration-300"}`
|
|
2507
2558
|
}
|
|
2508
2559
|
)
|
|
2509
2560
|
] }, "subtitle");
|
|
2510
2561
|
case "screenshot":
|
|
2511
2562
|
return /* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2512
|
-
l.stopPropagation(),
|
|
2513
|
-
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${
|
|
2563
|
+
l.stopPropagation(), z(), n == null || n.screenshot();
|
|
2564
|
+
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${se}`, style: { borderRadius: "var(--radius)" }, title: "Screenshot", children: /* @__PURE__ */ e(ts, { className: ie }) }, "ss");
|
|
2514
2565
|
case "pip":
|
|
2515
2566
|
return /* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2516
|
-
l.stopPropagation(),
|
|
2517
|
-
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${
|
|
2567
|
+
l.stopPropagation(), z(), n == null || n.togglePip();
|
|
2568
|
+
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${se}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(Di, { className: ie }) }, "pip");
|
|
2518
2569
|
case "download":
|
|
2519
|
-
if (
|
|
2520
|
-
const l = E === "download-menu",
|
|
2521
|
-
return /* @__PURE__ */
|
|
2522
|
-
/* @__PURE__ */ e("button", { onMouseDown: (
|
|
2523
|
-
|
|
2524
|
-
const
|
|
2525
|
-
|
|
2526
|
-
}, className: `strata-control-btn transition-colors hidden sm:block focus:outline-none ${
|
|
2527
|
-
|
|
2528
|
-
|
|
2570
|
+
if (d.children) {
|
|
2571
|
+
const l = E === "download-menu", R = l || ze.isMounted && Ge.current === "download-menu";
|
|
2572
|
+
return /* @__PURE__ */ c("div", { className: "relative", children: [
|
|
2573
|
+
/* @__PURE__ */ e("button", { onMouseDown: (O) => O.stopPropagation(), onTouchStart: (O) => O.stopPropagation(), onClick: (O) => {
|
|
2574
|
+
O.stopPropagation();
|
|
2575
|
+
const I = l;
|
|
2576
|
+
z(), I || Ue("download-menu");
|
|
2577
|
+
}, className: `strata-control-btn transition-colors hidden sm:block focus:outline-none ${se} ${l ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(ot, { className: ie }) }),
|
|
2578
|
+
R && /* @__PURE__ */ e(
|
|
2579
|
+
Xt,
|
|
2529
2580
|
{
|
|
2530
|
-
items:
|
|
2531
|
-
onClose:
|
|
2532
|
-
maxHeight:
|
|
2533
|
-
className: `strata-backdrop ${
|
|
2581
|
+
items: d.children,
|
|
2582
|
+
onClose: z,
|
|
2583
|
+
maxHeight: Ee,
|
|
2584
|
+
className: `strata-backdrop ${Ae} ${ze.isVisible ? "opacity-100 translate-y-0 scale-100 animate-in fade-in zoom-in-95 duration-300" : "opacity-0 translate-y-2 scale-95 duration-300"}`
|
|
2534
2585
|
}
|
|
2535
2586
|
)
|
|
2536
2587
|
] }, "dl");
|
|
2537
2588
|
}
|
|
2538
2589
|
return /* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2539
|
-
l.stopPropagation(),
|
|
2540
|
-
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${
|
|
2590
|
+
l.stopPropagation(), z(), n == null || n.download();
|
|
2591
|
+
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${se}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(ot, { className: ie }) }, "dl");
|
|
2541
2592
|
case "fullscreen":
|
|
2542
2593
|
return /* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2543
|
-
l.stopPropagation(),
|
|
2544
|
-
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 rounded-lg transition-transform focus:outline-none ${
|
|
2594
|
+
l.stopPropagation(), z(), n == null || n.toggleFullscreen();
|
|
2595
|
+
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 rounded-lg transition-transform focus:outline-none ${se}`, style: { borderRadius: "var(--radius)" }, children: r.isFullscreen || r.isWebFullscreen ? /* @__PURE__ */ e(Vi, { className: ie }) : /* @__PURE__ */ e(Ai, { className: ie }) }, "fs");
|
|
2545
2596
|
case "fullscreenWeb":
|
|
2546
2597
|
return /* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2547
|
-
l.stopPropagation(),
|
|
2548
|
-
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 hidden sm:block focus:outline-none ${
|
|
2598
|
+
l.stopPropagation(), z(), n == null || n.toggleWebFullscreen();
|
|
2599
|
+
}, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 hidden sm:block focus:outline-none ${se} ${r.isWebFullscreen ? "text-[var(--accent)]" : ""}`, style: { borderRadius: "var(--radius)" }, title: "Web Fullscreen", children: /* @__PURE__ */ e(ns, { className: ie }) }, "fsw");
|
|
2549
2600
|
case "settings":
|
|
2550
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ c("div", { className: "relative", children: [
|
|
2551
2602
|
/* @__PURE__ */ e("button", { onMouseDown: (l) => l.stopPropagation(), onTouchStart: (l) => l.stopPropagation(), onClick: (l) => {
|
|
2552
2603
|
l.stopPropagation();
|
|
2553
|
-
const
|
|
2554
|
-
|
|
2555
|
-
}, className: `strata-control-btn transition-all duration-300 focus:outline-none ${
|
|
2556
|
-
|
|
2557
|
-
|
|
2604
|
+
const R = V;
|
|
2605
|
+
z(), R || (dt(!0), A("main"));
|
|
2606
|
+
}, className: `strata-control-btn transition-all duration-300 focus:outline-none ${se} ${V ? "rotate-90 text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(Bi, { className: ie }) }),
|
|
2607
|
+
pt.isMounted && /* @__PURE__ */ e(lt, { onClose: z, align: "right", maxHeight: Ee, className: `strata-backdrop ${Ae} ${pt.isVisible ? "opacity-100 translate-y-0 scale-100 animate-in fade-in zoom-in-95 duration-300" : "opacity-0 translate-y-2 scale-95 duration-300"}`, children: /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
2608
|
+
J === "main" && /* @__PURE__ */ c("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
|
|
2558
2609
|
/* @__PURE__ */ e("div", { className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("span", { children: "Settings" }) }),
|
|
2559
|
-
|
|
2560
|
-
/* @__PURE__ */ e(
|
|
2561
|
-
/* @__PURE__ */ e(
|
|
2610
|
+
r.sources.length > 1 && /* @__PURE__ */ c(Q, { children: [
|
|
2611
|
+
/* @__PURE__ */ e(L, { label: "Source", icon: /* @__PURE__ */ e(rs, { className: "w-4 h-4" }), value: ((w = r.sources[r.currentSourceIndex]) == null ? void 0 : w.name) || `Source ${r.currentSourceIndex + 1}`, onClick: () => A("sources"), hasSubmenu: !0 }),
|
|
2612
|
+
/* @__PURE__ */ e(me, {})
|
|
2562
2613
|
] }),
|
|
2563
|
-
/* @__PURE__ */ e(
|
|
2564
|
-
/* @__PURE__ */ e(
|
|
2565
|
-
/* @__PURE__ */ e(
|
|
2566
|
-
/* @__PURE__ */ e(
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
/* @__PURE__ */ e(
|
|
2570
|
-
/* @__PURE__ */ e(
|
|
2571
|
-
/* @__PURE__ */ e(
|
|
2572
|
-
/* @__PURE__ */ e(
|
|
2573
|
-
|
|
2614
|
+
/* @__PURE__ */ e(L, { label: "Quality", icon: /* @__PURE__ */ e(ms, { className: "w-4 h-4" }), value: r.currentQuality === -1 ? "Auto" : `${(C = r.qualityLevels[r.currentQuality]) == null ? void 0 : C.height}p`, onClick: () => A("quality"), hasSubmenu: !0 }),
|
|
2615
|
+
/* @__PURE__ */ e(L, { label: "Speed", icon: /* @__PURE__ */ e(ds, { className: "w-4 h-4" }), value: `${r.playbackRate}x`, onClick: () => A("speed"), hasSubmenu: !0 }),
|
|
2616
|
+
/* @__PURE__ */ e(L, { label: "Audio", icon: /* @__PURE__ */ e(us, { className: "w-4 h-4" }), value: ((N = r.audioTracks[r.currentAudioTrack]) == null ? void 0 : N.label) || "Default", onClick: () => A("audio"), hasSubmenu: !0 }),
|
|
2617
|
+
/* @__PURE__ */ e(me, {}),
|
|
2618
|
+
/* @__PURE__ */ e(L, { label: "Video Fit", icon: /* @__PURE__ */ e(gs, { className: "w-4 h-4" }), value: r.videoFit === "none" ? "Default" : r.videoFit.charAt(0).toUpperCase() + r.videoFit.slice(1), onClick: () => A("videofit"), hasSubmenu: !0 }),
|
|
2619
|
+
Y && /* @__PURE__ */ e(L, { label: "Aspect Ratio", icon: /* @__PURE__ */ e(ls, { className: "w-4 h-4" }), value: r.aspectRatio, onClick: () => A("ratio"), hasSubmenu: !0 }),
|
|
2620
|
+
g && /* @__PURE__ */ e(L, { label: "Flip", icon: /* @__PURE__ */ e(ps, { className: "w-4 h-4" }), value: r.flipState.horizontal ? "H" : r.flipState.vertical ? "V" : "Normal", onClick: () => A("flip"), hasSubmenu: !0 }),
|
|
2621
|
+
/* @__PURE__ */ e(L, { label: "Audio Boost", icon: /* @__PURE__ */ e(cs, { className: "w-4 h-4" }), value: r.audioGain > 1 ? `${r.audioGain}x` : "Off", onClick: () => A("boost"), hasSubmenu: !0 }),
|
|
2622
|
+
/* @__PURE__ */ e(me, {}),
|
|
2623
|
+
/* @__PURE__ */ e(L, { label: "Watch Party", icon: /* @__PURE__ */ e(Ui, { className: "w-4 h-4" }), onClick: () => A("party"), hasSubmenu: !0 }),
|
|
2624
|
+
/* @__PURE__ */ e(L, { label: "Cast to Device", icon: /* @__PURE__ */ e(ji, { className: "w-4 h-4" }), onClick: () => {
|
|
2625
|
+
n == null || n.requestCast(), z();
|
|
2574
2626
|
} }),
|
|
2575
|
-
|
|
2576
|
-
(
|
|
2577
|
-
|
|
2627
|
+
m.settings && m.settings.length > 0 && /* @__PURE__ */ e(me, {}),
|
|
2628
|
+
(P = m.settings) == null ? void 0 : P.map((l, R) => l.switch !== void 0 ? /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(
|
|
2629
|
+
le,
|
|
2578
2630
|
{
|
|
2579
2631
|
label: l.html,
|
|
2580
2632
|
icon: l.icon,
|
|
2581
2633
|
checked: l.switch,
|
|
2582
2634
|
tooltip: l.tooltip,
|
|
2583
|
-
onChange: (
|
|
2584
|
-
l.onSwitch && l.onSwitch(l,
|
|
2635
|
+
onChange: (O) => {
|
|
2636
|
+
l.onSwitch && l.onSwitch(l, O);
|
|
2585
2637
|
}
|
|
2586
2638
|
}
|
|
2587
|
-
) }, `cust-${
|
|
2588
|
-
|
|
2639
|
+
) }, `cust-${R}`) : /* @__PURE__ */ e(
|
|
2640
|
+
L,
|
|
2589
2641
|
{
|
|
2590
2642
|
label: l.html,
|
|
2591
2643
|
icon: l.icon,
|
|
2592
2644
|
value: l.currentLabel || l.value,
|
|
2593
2645
|
hasSubmenu: !!l.children,
|
|
2594
2646
|
onClick: () => {
|
|
2595
|
-
l.children ?
|
|
2647
|
+
l.children ? A(`custom-${R}`) : (l.click ? l.click(l) : l.onClick && l.onClick(l), z());
|
|
2596
2648
|
}
|
|
2597
2649
|
},
|
|
2598
|
-
`cust-${
|
|
2650
|
+
`cust-${R}`
|
|
2599
2651
|
)),
|
|
2600
|
-
/* @__PURE__ */ e(
|
|
2601
|
-
/* @__PURE__ */ e(
|
|
2652
|
+
/* @__PURE__ */ e(me, {}),
|
|
2653
|
+
/* @__PURE__ */ e(L, { label: "Appearance", icon: /* @__PURE__ */ e(ei, { className: "w-4 h-4" }), onClick: () => A("appearance"), hasSubmenu: !0 })
|
|
2602
2654
|
] }),
|
|
2603
|
-
|
|
2604
|
-
var
|
|
2605
|
-
const l = parseInt(
|
|
2606
|
-
return !
|
|
2607
|
-
/* @__PURE__ */ e(
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
!
|
|
2612
|
-
|
|
2655
|
+
J.startsWith("custom-") && (() => {
|
|
2656
|
+
var O;
|
|
2657
|
+
const l = parseInt(J.split("-")[1]), R = (O = m.settings) == null ? void 0 : O[l];
|
|
2658
|
+
return !R || !R.children ? null : /* @__PURE__ */ c("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
2659
|
+
/* @__PURE__ */ e(Z, { label: R.html || "Menu", onBack: () => A("main") }),
|
|
2660
|
+
R.children.map((I, tt) => /* @__PURE__ */ c(Me.Fragment, { children: [
|
|
2661
|
+
I.separator && /* @__PURE__ */ e(me, {}),
|
|
2662
|
+
I.switch !== void 0 && /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(le, { label: I.html, checked: I.switch, onChange: (ki) => I.onSwitch && I.onSwitch(I, ki) }) }),
|
|
2663
|
+
!I.separator && I.switch === void 0 && /* @__PURE__ */ e(
|
|
2664
|
+
L,
|
|
2613
2665
|
{
|
|
2614
|
-
label:
|
|
2615
|
-
icon:
|
|
2616
|
-
value:
|
|
2617
|
-
active:
|
|
2666
|
+
label: I.html,
|
|
2667
|
+
icon: I.icon,
|
|
2668
|
+
value: I.value,
|
|
2669
|
+
active: I.active,
|
|
2618
2670
|
onClick: () => {
|
|
2619
|
-
|
|
2671
|
+
I.onClick ? I.onClick(I) : I.click && I.click(I), z();
|
|
2620
2672
|
}
|
|
2621
2673
|
}
|
|
2622
2674
|
)
|
|
2623
|
-
] },
|
|
2675
|
+
] }, tt))
|
|
2624
2676
|
] });
|
|
2625
2677
|
})(),
|
|
2626
|
-
["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio"].includes(
|
|
2627
|
-
|
|
2628
|
-
/* @__PURE__ */ e(
|
|
2629
|
-
|
|
2630
|
-
const
|
|
2678
|
+
["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio", "videofit"].includes(J) && /* @__PURE__ */ c("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
2679
|
+
J === "sources" && /* @__PURE__ */ c(Q, { children: [
|
|
2680
|
+
/* @__PURE__ */ e(Z, { label: "Select Source", onBack: () => A("main") }),
|
|
2681
|
+
r.sources.map((l, R) => {
|
|
2682
|
+
const O = r.sourceStatuses[R], I = O === "success" ? /* @__PURE__ */ e(hs, { className: "w-3.5 h-3.5 text-emerald-500" }) : O === "error" ? /* @__PURE__ */ e(at, { className: "w-3.5 h-3.5 text-red-500" }) : null;
|
|
2631
2683
|
return /* @__PURE__ */ e(
|
|
2632
|
-
|
|
2684
|
+
L,
|
|
2633
2685
|
{
|
|
2634
|
-
label: l.name || `Source ${
|
|
2686
|
+
label: l.name || `Source ${R + 1}`,
|
|
2635
2687
|
value: l.type,
|
|
2636
|
-
active:
|
|
2637
|
-
rightIcon:
|
|
2638
|
-
onClick: () =>
|
|
2688
|
+
active: r.currentSourceIndex === R,
|
|
2689
|
+
rightIcon: I,
|
|
2690
|
+
onClick: () => n == null ? void 0 : n.switchSource(R)
|
|
2639
2691
|
},
|
|
2640
|
-
|
|
2692
|
+
R
|
|
2641
2693
|
);
|
|
2642
2694
|
})
|
|
2643
2695
|
] }),
|
|
2644
|
-
|
|
2645
|
-
/* @__PURE__ */ e(
|
|
2646
|
-
[0.5, 1, 1.5, 2].map((l) => /* @__PURE__ */ e(
|
|
2696
|
+
J === "speed" && /* @__PURE__ */ c(Q, { children: [
|
|
2697
|
+
/* @__PURE__ */ e(Z, { label: "Speed", onBack: () => A("main") }),
|
|
2698
|
+
[0.5, 1, 1.5, 2].map((l) => /* @__PURE__ */ e(L, { label: `${l}x`, active: r.playbackRate === l, onClick: () => n.video.playbackRate = l }, l))
|
|
2647
2699
|
] }),
|
|
2648
|
-
|
|
2649
|
-
/* @__PURE__ */ e(
|
|
2650
|
-
/* @__PURE__ */ e(
|
|
2651
|
-
|
|
2700
|
+
J === "quality" && /* @__PURE__ */ c(Q, { children: [
|
|
2701
|
+
/* @__PURE__ */ e(Z, { label: "Quality", onBack: () => A("main") }),
|
|
2702
|
+
/* @__PURE__ */ e(L, { label: "Auto", active: r.currentQuality === -1, onClick: () => n == null ? void 0 : n.setQuality(-1) }),
|
|
2703
|
+
r.qualityLevels.map((l) => /* @__PURE__ */ e(L, { label: `${l.height}p`, value: `${Math.round(l.bitrate / 1e3)}k`, active: r.currentQuality === l.index, onClick: () => n == null ? void 0 : n.setQuality(l.index) }, l.index))
|
|
2652
2704
|
] }),
|
|
2653
|
-
|
|
2654
|
-
/* @__PURE__ */ e(
|
|
2655
|
-
|
|
2656
|
-
|
|
2705
|
+
J === "audio" && /* @__PURE__ */ c(Q, { children: [
|
|
2706
|
+
/* @__PURE__ */ e(Z, { label: "Audio Track", onBack: () => A("main") }),
|
|
2707
|
+
r.audioTracks.length === 0 && /* @__PURE__ */ e("div", { className: "px-4 py-3 text-zinc-500 text-xs text-center", children: "No tracks available" }),
|
|
2708
|
+
r.audioTracks.map((l) => /* @__PURE__ */ e(L, { label: l.label, value: l.language, active: r.currentAudioTrack === l.index, onClick: () => n == null ? void 0 : n.setAudioTrack(l.index) }, l.index))
|
|
2657
2709
|
] }),
|
|
2658
|
-
|
|
2659
|
-
/* @__PURE__ */ e(
|
|
2660
|
-
[1, 1.5, 2, 3].map((l) => /* @__PURE__ */ e(
|
|
2710
|
+
J === "boost" && /* @__PURE__ */ c(Q, { children: [
|
|
2711
|
+
/* @__PURE__ */ e(Z, { label: "Audio Boost", onBack: () => A("main") }),
|
|
2712
|
+
[1, 1.5, 2, 3].map((l) => /* @__PURE__ */ e(L, { label: l === 1 ? "Off" : `${l}x`, active: r.audioGain === l, onClick: () => n == null ? void 0 : n.setAudioGain(l) }, l))
|
|
2661
2713
|
] }),
|
|
2662
|
-
|
|
2663
|
-
/* @__PURE__ */ e(
|
|
2664
|
-
/* @__PURE__ */
|
|
2665
|
-
/* @__PURE__ */ e(
|
|
2666
|
-
/* @__PURE__ */ e(
|
|
2714
|
+
J === "flip" && /* @__PURE__ */ c(Q, { children: [
|
|
2715
|
+
/* @__PURE__ */ e(Z, { label: "Video Flip", onBack: () => A("main") }),
|
|
2716
|
+
/* @__PURE__ */ c("div", { className: "p-2 space-y-1", children: [
|
|
2717
|
+
/* @__PURE__ */ e(le, { label: "Horizontal Flip", checked: r.flipState.horizontal, onChange: () => n == null ? void 0 : n.setFlip("horizontal") }),
|
|
2718
|
+
/* @__PURE__ */ e(le, { label: "Vertical Flip", checked: r.flipState.vertical, onChange: () => n == null ? void 0 : n.setFlip("vertical") })
|
|
2667
2719
|
] })
|
|
2668
2720
|
] }),
|
|
2669
|
-
|
|
2670
|
-
/* @__PURE__ */ e(
|
|
2671
|
-
["default", "16:9", "4:3"].map((l) => /* @__PURE__ */ e(
|
|
2721
|
+
J === "ratio" && /* @__PURE__ */ c(Q, { children: [
|
|
2722
|
+
/* @__PURE__ */ e(Z, { label: "Aspect Ratio", onBack: () => A("main") }),
|
|
2723
|
+
/* @__PURE__ */ e("div", { className: "max-h-[250px] overflow-y-auto hide-scrollbar", children: ["default", "16:9", "4:3", "21:9", "18:9", "1:1", "9:16"].map((l) => /* @__PURE__ */ e(L, { label: l === "default" ? "Default" : l.replace(":", " : "), active: r.aspectRatio === l, onClick: () => n == null ? void 0 : n.setAspectRatio(l) }, l)) })
|
|
2672
2724
|
] }),
|
|
2673
|
-
|
|
2674
|
-
/* @__PURE__ */ e(
|
|
2675
|
-
/* @__PURE__ */
|
|
2725
|
+
J === "videofit" && /* @__PURE__ */ c(Q, { children: [
|
|
2726
|
+
/* @__PURE__ */ e(Z, { label: "Video Fit", onBack: () => A("main") }),
|
|
2727
|
+
/* @__PURE__ */ e(L, { label: "Contain (Default)", value: "Fit", active: r.videoFit === "contain", onClick: () => n == null ? void 0 : n.setVideoFit("contain") }),
|
|
2728
|
+
/* @__PURE__ */ e(L, { label: "Cover", value: "Zoom", active: r.videoFit === "cover", onClick: () => n == null ? void 0 : n.setVideoFit("cover") }),
|
|
2729
|
+
/* @__PURE__ */ e(L, { label: "Fill", value: "Stretch", active: r.videoFit === "fill", onClick: () => n == null ? void 0 : n.setVideoFit("fill") }),
|
|
2730
|
+
/* @__PURE__ */ e(L, { label: "None", value: "Original", active: r.videoFit === "none", onClick: () => n == null ? void 0 : n.setVideoFit("none") })
|
|
2731
|
+
] }),
|
|
2732
|
+
J === "party" && /* @__PURE__ */ c(Q, { children: [
|
|
2733
|
+
/* @__PURE__ */ e(Z, { label: "Watch Party", onBack: () => A("main") }),
|
|
2734
|
+
/* @__PURE__ */ c("div", { className: "p-4 space-y-3", children: [
|
|
2676
2735
|
/* @__PURE__ */ e("p", { className: "text-xs text-zinc-400 leading-relaxed", children: "Create a synchronized room on WatchParty.me to watch together." }),
|
|
2677
|
-
/* @__PURE__ */ e("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((
|
|
2736
|
+
/* @__PURE__ */ e("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((ae = r.sources[r.currentSourceIndex]) == null ? void 0 : ae.url) || t || "")}`, target: "_blank", rel: "noopener noreferrer", className: "flex items-center justify-center w-full py-2.5 bg-[var(--accent)] hover:opacity-90 text-white font-medium transition-opacity text-xs", style: { borderRadius: "var(--radius)" }, children: "Create Room" })
|
|
2678
2737
|
] })
|
|
2679
2738
|
] }),
|
|
2680
|
-
|
|
2681
|
-
/* @__PURE__ */ e(
|
|
2682
|
-
/* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */ e(
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2739
|
+
J === "appearance" && /* @__PURE__ */ c(Q, { children: [
|
|
2740
|
+
/* @__PURE__ */ e(Z, { label: "Appearance", onBack: () => A("main") }),
|
|
2741
|
+
/* @__PURE__ */ c("div", { className: "pb-1", children: [
|
|
2742
|
+
/* @__PURE__ */ e("div", { className: "px-1 pt-1", children: /* @__PURE__ */ e(
|
|
2743
|
+
xe,
|
|
2744
|
+
{
|
|
2745
|
+
label: "Brightness",
|
|
2746
|
+
icon: /* @__PURE__ */ e(Gt, { className: "w-4 h-4" }),
|
|
2747
|
+
value: r.brightness,
|
|
2748
|
+
min: 0,
|
|
2749
|
+
max: 2,
|
|
2750
|
+
step: 0.1,
|
|
2751
|
+
onChange: (l) => n == null ? void 0 : n.setBrightness(l),
|
|
2752
|
+
formatValue: (l) => `${Math.round(l * 100)}%`
|
|
2753
|
+
}
|
|
2754
|
+
) }),
|
|
2755
|
+
/* @__PURE__ */ e(pe, { title: "Theme", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 px-3", children: Ms.map((l) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ theme: l.value, themeColor: l.color }), className: `py-2 text-xs font-bold uppercase tracking-wide transition-colors border-[length:var(--border-width)] border-white/10 ${r.theme === l.value ? "bg-[var(--accent)] text-white" : "bg-white/5 text-zinc-400 hover:text-white"}`, style: { borderRadius: "var(--radius)" }, children: l.label }, l.value)) }) }),
|
|
2756
|
+
/* @__PURE__ */ e(pe, { title: "Icon Size", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1 px-3", children: ["small", "medium", "large"].map((l) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ iconSize: l }), className: `py-1.5 text-xs font-medium transition-colors ${r.iconSize === l ? "bg-white text-black" : "bg-white/5 text-zinc-400 hover:text-zinc-200"}`, style: { borderRadius: "var(--radius)" }, children: l.charAt(0).toUpperCase() + l.slice(1) }, l)) }) }),
|
|
2757
|
+
/* @__PURE__ */ c(pe, { title: "Theme Color", children: [
|
|
2758
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-6 gap-2 px-3", children: Ns.map((l) => /* @__PURE__ */ e("button", { title: l.label, onClick: () => n == null ? void 0 : n.setAppearance({ themeColor: l.value }), className: `w-6 h-6 transition-transform hover:scale-110 ${r.themeColor === l.value ? "ring-2 ring-white scale-110" : "ring-1 ring-white/10"}`, style: { backgroundColor: l.value, borderRadius: "var(--radius-full)" }, children: r.themeColor === l.value && /* @__PURE__ */ e(He, { className: "w-3 h-3 text-white mx-auto stroke-[3]" }) }, l.value)) }),
|
|
2759
|
+
/* @__PURE__ */ e("div", { className: "px-3 pt-4", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-3 bg-white/5 p-2 hover:bg-white/10 transition-colors group", style: { borderRadius: "var(--radius)" }, children: [
|
|
2760
|
+
/* @__PURE__ */ e("div", { className: "relative w-6 h-6 overflow-hidden ring-1 ring-white/20", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ e("input", { type: "color", value: r.themeColor, onChange: (l) => n == null ? void 0 : n.setAppearance({ themeColor: l.target.value }), className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0" }) }),
|
|
2689
2761
|
/* @__PURE__ */ e("span", { className: "text-xs text-zinc-400 font-medium group-hover:text-zinc-200", children: "Custom Color" }),
|
|
2690
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children:
|
|
2762
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children: r.themeColor })
|
|
2691
2763
|
] }) })
|
|
2692
2764
|
] })
|
|
2693
2765
|
] })
|
|
@@ -2698,68 +2770,73 @@ const vn = [
|
|
|
2698
2770
|
default:
|
|
2699
2771
|
return null;
|
|
2700
2772
|
}
|
|
2701
|
-
},
|
|
2702
|
-
const
|
|
2773
|
+
}, wi = Ce(() => {
|
|
2774
|
+
const d = [
|
|
2703
2775
|
// Loop (Playback Group)
|
|
2704
2776
|
{ html: "Playback", isLabel: !0 },
|
|
2705
2777
|
{
|
|
2706
2778
|
html: "Loop",
|
|
2707
|
-
checked:
|
|
2708
|
-
onClick: () =>
|
|
2779
|
+
checked: r.isLooping,
|
|
2780
|
+
onClick: () => n == null ? void 0 : n.toggleLoop()
|
|
2709
2781
|
},
|
|
2710
2782
|
{ separator: !0 },
|
|
2711
2783
|
// Flip (Transform Group)
|
|
2712
2784
|
{ html: "Transform", isLabel: !0 },
|
|
2713
|
-
{ html: "Flip Horizontal", onClick: () =>
|
|
2714
|
-
{ html: "Flip Vertical", onClick: () =>
|
|
2785
|
+
{ html: "Flip Horizontal", onClick: () => n == null ? void 0 : n.setFlip("horizontal") },
|
|
2786
|
+
{ html: "Flip Vertical", onClick: () => n == null ? void 0 : n.setFlip("vertical") },
|
|
2715
2787
|
{ separator: !0 },
|
|
2716
2788
|
// Aspect Ratio Group
|
|
2717
2789
|
{ html: "Aspect Ratio", isLabel: !0 },
|
|
2718
|
-
{ html: "Default", checked:
|
|
2719
|
-
{ html: "16:9", checked:
|
|
2720
|
-
{ html: "
|
|
2790
|
+
{ html: "Default", checked: r.aspectRatio === "default", onClick: () => n == null ? void 0 : n.setAspectRatio("default") },
|
|
2791
|
+
{ html: "16:9", checked: r.aspectRatio === "16:9", onClick: () => n == null ? void 0 : n.setAspectRatio("16:9") },
|
|
2792
|
+
{ html: "21:9", checked: r.aspectRatio === "21:9", onClick: () => n == null ? void 0 : n.setAspectRatio("21:9") },
|
|
2793
|
+
{ separator: !0 },
|
|
2794
|
+
// Video Fit Group
|
|
2795
|
+
{ html: "Video Fit", isLabel: !0 },
|
|
2796
|
+
{ html: "Contain", checked: r.videoFit === "contain", onClick: () => n == null ? void 0 : n.setVideoFit("contain") },
|
|
2797
|
+
{ html: "Cover", checked: r.videoFit === "cover", onClick: () => n == null ? void 0 : n.setVideoFit("cover") },
|
|
2721
2798
|
{ separator: !0 },
|
|
2722
2799
|
// Stats
|
|
2723
2800
|
{
|
|
2724
2801
|
html: "Video Info",
|
|
2725
|
-
icon: /* @__PURE__ */ e(
|
|
2726
|
-
onClick: () =>
|
|
2802
|
+
icon: /* @__PURE__ */ e(as, { className: "w-3.5 h-3.5" }),
|
|
2803
|
+
onClick: () => mt(!0)
|
|
2727
2804
|
},
|
|
2728
2805
|
{ separator: !0 }
|
|
2729
2806
|
];
|
|
2730
|
-
return
|
|
2807
|
+
return m.contextmenu && d.push(...m.contextmenu), d.push({
|
|
2731
2808
|
html: /* @__PURE__ */ e("span", { className: "text-zinc-500 text-xs font-semibold tracking-wide", children: "StrataPlayer" }),
|
|
2732
2809
|
disabled: !0
|
|
2733
|
-
}),
|
|
2810
|
+
}), d.push({
|
|
2734
2811
|
html: "Close",
|
|
2735
|
-
onClick: (
|
|
2812
|
+
onClick: (w) => w(),
|
|
2736
2813
|
// Wrapper handles close
|
|
2737
|
-
icon: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */
|
|
2814
|
+
icon: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ c("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2738
2815
|
/* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
|
|
2739
2816
|
/* @__PURE__ */ e("path", { d: "m6 6 12 12" })
|
|
2740
2817
|
] }) })
|
|
2741
|
-
}),
|
|
2742
|
-
}, [
|
|
2818
|
+
}), d;
|
|
2819
|
+
}, [m.contextmenu, r.aspectRatio, r.isLooping, r.videoFit, n]), yi = r.isWebFullscreen, Bt = /* @__PURE__ */ c(
|
|
2743
2820
|
"div",
|
|
2744
2821
|
{
|
|
2745
|
-
id:
|
|
2746
|
-
ref:
|
|
2747
|
-
className: `group bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none text-zinc-100 strata-player-reset flex items-center justify-center ${
|
|
2748
|
-
style: { touchAction: "manipulation", "--accent":
|
|
2749
|
-
onMouseMove:
|
|
2822
|
+
id: m.id,
|
|
2823
|
+
ref: T,
|
|
2824
|
+
className: `group bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none text-zinc-100 strata-player-reset flex items-center justify-center ${yi ? "fixed inset-0 z-[2147483647] w-screen h-screen rounded-none" : "relative w-full h-full rounded-[var(--radius-player)]"} ${m.container || ""}`,
|
|
2825
|
+
style: { touchAction: "manipulation", "--accent": r.themeColor, "--accent-contrast": si },
|
|
2826
|
+
onMouseMove: Rt,
|
|
2750
2827
|
onMouseLeave: () => {
|
|
2751
|
-
|
|
2828
|
+
r.isPlaying && !V && !B && !E && n && n.setControlsVisible(!1);
|
|
2752
2829
|
},
|
|
2753
|
-
onMouseDown:
|
|
2754
|
-
onMouseUp:
|
|
2755
|
-
onTouchStart:
|
|
2756
|
-
onTouchMove:
|
|
2757
|
-
onTouchEnd:
|
|
2758
|
-
onContextMenu:
|
|
2830
|
+
onMouseDown: Pt,
|
|
2831
|
+
onMouseUp: Ze,
|
|
2832
|
+
onTouchStart: ci,
|
|
2833
|
+
onTouchMove: di,
|
|
2834
|
+
onTouchEnd: ui,
|
|
2835
|
+
onContextMenu: pi,
|
|
2759
2836
|
tabIndex: 0,
|
|
2760
2837
|
role: "region",
|
|
2761
2838
|
"aria-label": "Video Player",
|
|
2762
|
-
"data-theme":
|
|
2839
|
+
"data-theme": r.theme,
|
|
2763
2840
|
children: [
|
|
2764
2841
|
/* @__PURE__ */ e("style", { children: `
|
|
2765
2842
|
[data-theme="default"] {
|
|
@@ -2767,6 +2844,7 @@ const vn = [
|
|
|
2767
2844
|
--radius-lg: 0.75rem;
|
|
2768
2845
|
--radius-sm: 0.375rem;
|
|
2769
2846
|
--radius-full: 9999px;
|
|
2847
|
+
--radius-player: 0.25rem;
|
|
2770
2848
|
--font-main: "Inter", sans-serif;
|
|
2771
2849
|
--border-width: 0px;
|
|
2772
2850
|
--bg-panel: rgba(9, 9, 11, 0.95);
|
|
@@ -2779,6 +2857,7 @@ const vn = [
|
|
|
2779
2857
|
--radius-lg: 0px;
|
|
2780
2858
|
--radius-sm: 0px;
|
|
2781
2859
|
--radius-full: 0px;
|
|
2860
|
+
--radius-player: 0px;
|
|
2782
2861
|
--font-main: "Press Start 2P", cursive;
|
|
2783
2862
|
--border-width: 2px;
|
|
2784
2863
|
--bg-panel: #000000;
|
|
@@ -2792,6 +2871,7 @@ const vn = [
|
|
|
2792
2871
|
--radius-lg: 6px;
|
|
2793
2872
|
--radius-sm: 2px;
|
|
2794
2873
|
--radius-full: 4px;
|
|
2874
|
+
--radius-player: 4px;
|
|
2795
2875
|
--font-main: "Cinzel", serif;
|
|
2796
2876
|
--border-width: 1px;
|
|
2797
2877
|
--bg-panel: #0a0a0a;
|
|
@@ -2804,6 +2884,7 @@ const vn = [
|
|
|
2804
2884
|
--radius-lg: 0px;
|
|
2805
2885
|
--radius-sm: 0px;
|
|
2806
2886
|
--radius-full: 0px;
|
|
2887
|
+
--radius-player: 0px;
|
|
2807
2888
|
--font-main: "JetBrains Mono", monospace;
|
|
2808
2889
|
--border-width: 1px;
|
|
2809
2890
|
--bg-panel: #000000;
|
|
@@ -2855,136 +2936,152 @@ const vn = [
|
|
|
2855
2936
|
[data-theme="pixel"] .strata-backdrop { backdrop-filter: none; background: #000; }
|
|
2856
2937
|
[data-theme="hacker"] .strata-backdrop { backdrop-filter: none; background: #000; }
|
|
2857
2938
|
` }),
|
|
2858
|
-
|
|
2859
|
-
!
|
|
2860
|
-
|
|
2861
|
-
(
|
|
2939
|
+
r.theme === "hacker" && /* @__PURE__ */ e("div", { className: "strata-scanlines" }),
|
|
2940
|
+
!n && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-zinc-950 z-50", children: /* @__PURE__ */ e(De, { className: "w-10 h-10 text-[var(--accent)] animate-spin" }) }),
|
|
2941
|
+
n && /* @__PURE__ */ c(Q, { children: [
|
|
2942
|
+
(Dt = m.layers) == null ? void 0 : Dt.map((d, w) => /* @__PURE__ */ e(
|
|
2862
2943
|
"div",
|
|
2863
2944
|
{
|
|
2864
|
-
className: `absolute inset-0 pointer-events-none z-10 ${
|
|
2865
|
-
style:
|
|
2866
|
-
children: /* @__PURE__ */ e(
|
|
2945
|
+
className: `absolute inset-0 pointer-events-none z-10 ${d.className || ""}`,
|
|
2946
|
+
style: d.style,
|
|
2947
|
+
children: /* @__PURE__ */ e(Qt, { content: d.html || "", className: "w-full h-full" })
|
|
2867
2948
|
},
|
|
2868
|
-
|
|
2949
|
+
w
|
|
2869
2950
|
)),
|
|
2870
|
-
/* @__PURE__ */ e(
|
|
2871
|
-
/* @__PURE__ */ e(
|
|
2951
|
+
/* @__PURE__ */ e(vs, { notifications: r.notifications }),
|
|
2952
|
+
/* @__PURE__ */ e(xs, { cues: r.activeCues, settings: r.subtitleSettings }),
|
|
2872
2953
|
/* @__PURE__ */ e(
|
|
2873
2954
|
"div",
|
|
2874
2955
|
{
|
|
2875
2956
|
className: "absolute inset-0 z-[1] cursor-pointer",
|
|
2876
|
-
onClick:
|
|
2957
|
+
onClick: mi,
|
|
2877
2958
|
"aria-hidden": "true",
|
|
2878
2959
|
role: "button",
|
|
2879
2960
|
tabIndex: -1
|
|
2880
2961
|
}
|
|
2881
2962
|
),
|
|
2882
|
-
|
|
2963
|
+
a && !_ && /* @__PURE__ */ e(
|
|
2883
2964
|
"div",
|
|
2884
2965
|
{
|
|
2885
2966
|
className: "absolute inset-0 bg-cover bg-center z-[5] pointer-events-none strata-poster",
|
|
2886
|
-
style: { backgroundImage: `url(${
|
|
2967
|
+
style: { backgroundImage: `url(${a})` }
|
|
2887
2968
|
}
|
|
2888
2969
|
),
|
|
2889
|
-
|
|
2890
|
-
|
|
2970
|
+
oe.visible && /* @__PURE__ */ e(
|
|
2971
|
+
ks,
|
|
2891
2972
|
{
|
|
2892
|
-
x:
|
|
2893
|
-
y:
|
|
2894
|
-
items:
|
|
2895
|
-
onClose:
|
|
2896
|
-
containerWidth:
|
|
2897
|
-
containerHeight:
|
|
2973
|
+
x: oe.x,
|
|
2974
|
+
y: oe.y,
|
|
2975
|
+
items: wi,
|
|
2976
|
+
onClose: z,
|
|
2977
|
+
containerWidth: ge,
|
|
2978
|
+
containerHeight: re
|
|
2898
2979
|
}
|
|
2899
2980
|
),
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
/* @__PURE__ */ e(
|
|
2981
|
+
ni && n && /* @__PURE__ */ e(Ss, { player: n, onClose: () => mt(!1) }),
|
|
2982
|
+
Qe && /* @__PURE__ */ c("div", { className: "absolute top-8 left-1/2 -translate-x-1/2 bg-black/50 backdrop-blur-md px-4 py-2 rounded-full flex items-center gap-2 z-40 animate-in fade-in zoom-in duration-200 pointer-events-none", children: [
|
|
2983
|
+
/* @__PURE__ */ e(os, { className: "w-4 h-4 text-[var(--accent)] fill-current" }),
|
|
2903
2984
|
/* @__PURE__ */ e("span", { className: "text-xs font-bold tracking-wider", children: "2x Speed" })
|
|
2904
2985
|
] }),
|
|
2905
|
-
|
|
2986
|
+
Pe && /* @__PURE__ */ c("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-black/60 backdrop-blur-md p-6 rounded-2xl flex flex-col items-center gap-4 z-40 animate-in fade-in zoom-in duration-200 pointer-events-none", children: [
|
|
2987
|
+
r.isMuted || r.volume === 0 ? /* @__PURE__ */ e(Ut, { className: "w-10 h-10 text-white/80" }) : /* @__PURE__ */ e(jt, { className: "w-10 h-10 text-white/80" }),
|
|
2988
|
+
/* @__PURE__ */ e("div", { className: "w-32 h-1.5 bg-white/20 rounded-full overflow-hidden", children: /* @__PURE__ */ e("div", { className: "h-full bg-[var(--accent)]", style: { width: `${r.isMuted ? 0 : r.volume * 100}%` } }) }),
|
|
2989
|
+
/* @__PURE__ */ c("span", { className: "text-xl font-bold font-mono", children: [
|
|
2990
|
+
Math.round(r.volume * 100),
|
|
2991
|
+
"%"
|
|
2992
|
+
] })
|
|
2993
|
+
] }),
|
|
2994
|
+
vt && /* @__PURE__ */ c("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-black/60 backdrop-blur-md p-6 rounded-2xl flex flex-col items-center gap-4 z-40 animate-in fade-in zoom-in duration-200 pointer-events-none", children: [
|
|
2995
|
+
/* @__PURE__ */ e(Gt, { className: "w-10 h-10 text-white/80" }),
|
|
2996
|
+
/* @__PURE__ */ e("div", { className: "w-32 h-1.5 bg-white/20 rounded-full overflow-hidden", children: /* @__PURE__ */ e("div", { className: "h-full bg-[var(--accent)]", style: { width: `${Math.min(100, r.brightness * 100)}%` } }) }),
|
|
2997
|
+
/* @__PURE__ */ c("span", { className: "text-xl font-bold font-mono", children: [
|
|
2998
|
+
Math.round(r.brightness * 100),
|
|
2999
|
+
"%"
|
|
3000
|
+
] })
|
|
3001
|
+
] }),
|
|
3002
|
+
H && We && r.controlsVisible && /* @__PURE__ */ e(
|
|
2906
3003
|
"button",
|
|
2907
3004
|
{
|
|
2908
|
-
onMouseDown: (
|
|
2909
|
-
onTouchStart: (
|
|
2910
|
-
onClick: (
|
|
2911
|
-
|
|
3005
|
+
onMouseDown: (d) => d.stopPropagation(),
|
|
3006
|
+
onTouchStart: (d) => d.stopPropagation(),
|
|
3007
|
+
onClick: (d) => {
|
|
3008
|
+
d.stopPropagation(), n.toggleLock();
|
|
2912
3009
|
},
|
|
2913
|
-
className: `absolute left-4 md:left-6 bottom-24 md:bottom-28 z-50 p-3 rounded-full bg-black/50 backdrop-blur-md border border-white/10 text-white transition-all active:scale-95 ${
|
|
2914
|
-
children:
|
|
3010
|
+
className: `absolute left-4 md:left-6 bottom-24 md:bottom-28 z-50 p-3 rounded-full bg-black/50 backdrop-blur-md border border-white/10 text-white transition-all active:scale-95 ${r.isLocked ? "text-[var(--accent)] bg-white/10" : "hover:bg-white/10"}`,
|
|
3011
|
+
children: r.isLocked ? /* @__PURE__ */ e(is, { className: "w-5 h-5" }) : /* @__PURE__ */ e(ss, { className: "w-5 h-5" })
|
|
2915
3012
|
}
|
|
2916
3013
|
),
|
|
2917
|
-
|
|
3014
|
+
ue && /* @__PURE__ */ e(
|
|
2918
3015
|
"div",
|
|
2919
3016
|
{
|
|
2920
|
-
className: `absolute top-0 bottom-0 flex items-center justify-center w-[35%] z-20 bg-white/5 backdrop-blur-[1px] animate-out fade-out duration-500 fill-mode-forwards pointer-events-none ${
|
|
2921
|
-
onAnimationEnd: () =>
|
|
2922
|
-
children: /* @__PURE__ */
|
|
2923
|
-
|
|
2924
|
-
/* @__PURE__ */ e("span", { className: "font-bold text-sm mt-2 font-mono", children:
|
|
3017
|
+
className: `absolute top-0 bottom-0 flex items-center justify-center w-[35%] z-20 bg-white/5 backdrop-blur-[1px] animate-out fade-out duration-500 fill-mode-forwards pointer-events-none ${ue.type === "rewind" ? "left-0 rounded-r-[4rem]" : "right-0 rounded-l-[4rem]"}`,
|
|
3018
|
+
onAnimationEnd: () => Le(null),
|
|
3019
|
+
children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center text-white drop-shadow-lg", children: [
|
|
3020
|
+
ue.type === "rewind" ? /* @__PURE__ */ e(_t, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ e(qt, { className: "w-12 h-12 animate-pulse" }),
|
|
3021
|
+
/* @__PURE__ */ e("span", { className: "font-bold text-sm mt-2 font-mono", children: ue.type === "rewind" ? "-10s" : "+10s" })
|
|
2925
3022
|
] })
|
|
2926
3023
|
},
|
|
2927
|
-
|
|
3024
|
+
ue.id
|
|
2928
3025
|
),
|
|
2929
|
-
|
|
2930
|
-
|
|
3026
|
+
r.isBuffering && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ e(De, { className: "w-12 h-12 text-[var(--accent)] animate-spin drop-shadow-lg" }) }),
|
|
3027
|
+
r.error && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center z-30 bg-black/90 backdrop-blur-md animate-in fade-in", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-4 text-red-500 p-8 max-w-md text-center", children: [
|
|
2931
3028
|
/* @__PURE__ */ e("span", { className: "text-5xl mb-2", children: "⚠️" }),
|
|
2932
3029
|
/* @__PURE__ */ e("h3", { className: "text-xl font-bold text-white", children: "Playback Error" }),
|
|
2933
|
-
/* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children:
|
|
2934
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
3030
|
+
/* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: r.error }),
|
|
3031
|
+
/* @__PURE__ */ e("button", { onClick: () => n.load(n.store.get().sources[n.store.get().currentSourceIndex] || { url: t || "", type: i || "auto" }, f), className: "px-6 py-2 bg-[var(--accent)] text-white font-medium rounded-full hover:opacity-90 transition-opacity mt-4 shadow-lg", children: "Try Again" })
|
|
2935
3032
|
] }) }),
|
|
2936
|
-
j && !
|
|
3033
|
+
j && !r.isLocked && (!r.isPlaying && !r.isBuffering && !r.error || r.controlsVisible) && !r.isBuffering ? /* @__PURE__ */ e(
|
|
2937
3034
|
"div",
|
|
2938
3035
|
{
|
|
2939
|
-
className: `absolute inset-0 flex items-center justify-center z-10 transition-opacity duration-300 pointer-events-none ${
|
|
2940
|
-
children: /* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */ e("button", { onMouseDown: (
|
|
2942
|
-
|
|
2943
|
-
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all duration-300 active:scale-125 active:opacity-80 text-white/90 focus:outline-none backdrop-blur-sm ${
|
|
2944
|
-
/* @__PURE__ */ e("button", { onMouseDown: (
|
|
2945
|
-
|
|
2946
|
-
}, className: `group relative flex items-center justify-center rounded-full bg-white/10 hover:bg-[var(--accent)] border border-white/10 shadow-2xl transition-all duration-300 active:scale-90 active:opacity-80 focus:outline-none backdrop-blur-md ${
|
|
2947
|
-
/* @__PURE__ */ e("button", { onMouseDown: (
|
|
2948
|
-
|
|
2949
|
-
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all duration-300 active:scale-125 active:opacity-80 text-white/90 focus:outline-none backdrop-blur-sm ${
|
|
3036
|
+
className: `absolute inset-0 flex items-center justify-center z-10 transition-opacity duration-300 pointer-events-none ${r.controlsVisible || !r.isPlaying ? "opacity-100" : "opacity-0"}`,
|
|
3037
|
+
children: /* @__PURE__ */ c("div", { className: "flex items-center gap-8 md:gap-16 pointer-events-auto", children: [
|
|
3038
|
+
/* @__PURE__ */ e("button", { onMouseDown: (d) => d.stopPropagation(), onTouchStart: (d) => d.stopPropagation(), onClick: (d) => {
|
|
3039
|
+
d.stopPropagation(), z(), $e("rewind");
|
|
3040
|
+
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all duration-300 active:scale-125 active:opacity-80 text-white/90 focus:outline-none backdrop-blur-sm ${he.skipBtn}`, children: /* @__PURE__ */ e(_t, { className: he.skipIcon }) }),
|
|
3041
|
+
/* @__PURE__ */ e("button", { onMouseDown: (d) => d.stopPropagation(), onTouchStart: (d) => d.stopPropagation(), onClick: (d) => {
|
|
3042
|
+
d.stopPropagation(), z(), n.togglePlay();
|
|
3043
|
+
}, className: `group relative flex items-center justify-center rounded-full bg-white/10 hover:bg-[var(--accent)] border border-white/10 shadow-2xl transition-all duration-300 active:scale-90 active:opacity-80 focus:outline-none backdrop-blur-md ${he.playBtn}`, children: r.isPlaying ? /* @__PURE__ */ e(Wt, { className: `${he.playIcon} text-white fill-current` }) : /* @__PURE__ */ e(Ht, { className: `${he.playIcon} text-white ml-1 fill-current` }) }),
|
|
3044
|
+
/* @__PURE__ */ e("button", { onMouseDown: (d) => d.stopPropagation(), onTouchStart: (d) => d.stopPropagation(), onClick: (d) => {
|
|
3045
|
+
d.stopPropagation(), z(), $e("forward");
|
|
3046
|
+
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all duration-300 active:scale-125 active:opacity-80 text-white/90 focus:outline-none backdrop-blur-sm ${he.skipBtn}`, children: /* @__PURE__ */ e(qt, { className: he.skipIcon }) })
|
|
2950
3047
|
] })
|
|
2951
3048
|
}
|
|
2952
3049
|
) : null,
|
|
2953
|
-
/* @__PURE__ */
|
|
3050
|
+
/* @__PURE__ */ c(
|
|
2954
3051
|
"div",
|
|
2955
3052
|
{
|
|
2956
|
-
className: `absolute inset-x-0 bottom-0 z-30 transition-all duration-300 px-4 md:px-6 py-4 bg-gradient-to-t from-black/90 via-black/50 to-transparent ${
|
|
2957
|
-
onClick: (
|
|
2958
|
-
(
|
|
3053
|
+
className: `absolute inset-x-0 bottom-0 z-30 transition-all duration-300 px-4 md:px-6 py-4 bg-gradient-to-t from-black/90 via-black/50 to-transparent ${xi ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4 pointer-events-none"}`,
|
|
3054
|
+
onClick: (d) => {
|
|
3055
|
+
(V || B || E) && z(), d.target === d.currentTarget && ve(!1), d.stopPropagation();
|
|
2959
3056
|
},
|
|
2960
3057
|
children: [
|
|
2961
|
-
!
|
|
3058
|
+
!m.isLive && /* @__PURE__ */ c(
|
|
2962
3059
|
"div",
|
|
2963
3060
|
{
|
|
2964
|
-
ref:
|
|
3061
|
+
ref: Je,
|
|
2965
3062
|
className: "relative w-full h-3 group/slider mb-3 cursor-pointer touch-none flex items-center",
|
|
2966
|
-
onMouseMove:
|
|
3063
|
+
onMouseMove: hi,
|
|
2967
3064
|
onMouseLeave: () => {
|
|
2968
|
-
|
|
3065
|
+
kt(null), St(null);
|
|
2969
3066
|
},
|
|
2970
|
-
onMouseDown:
|
|
2971
|
-
onTouchStart:
|
|
3067
|
+
onMouseDown: Lt,
|
|
3068
|
+
onTouchStart: Lt,
|
|
2972
3069
|
children: [
|
|
2973
|
-
(
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
/* @__PURE__ */ e("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children:
|
|
3070
|
+
(Ot = m.highlight) == null ? void 0 : Ot.map((d, w) => /* @__PURE__ */ e("div", { className: "absolute top-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-yellow-400 rounded-full z-10 pointer-events-none", style: { left: `${d.time / r.duration * 100}%` }, title: d.text }, w)),
|
|
3071
|
+
yt !== null && /* @__PURE__ */ c("div", { className: "absolute bottom-full mb-1.5 flex flex-col items-center transform -translate-x-1/2 z-40 pointer-events-none transition-opacity duration-150", style: { left: `clamp(70px, ${ri}%, calc(100% - 70px))` }, children: [
|
|
3072
|
+
ce && /* @__PURE__ */ e("div", { className: "bg-black/90 border border-white/10 shadow-2xl overflow-hidden backdrop-blur-sm", style: { width: `${ce.w * 0.5}px`, height: `${ce.h * 0.5}px`, borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("div", { style: { backgroundImage: `url("${ce.url}")`, width: `${ce.w}px`, height: `${ce.h}px`, backgroundPosition: `-${ce.x}px -${ce.y}px`, backgroundRepeat: "no-repeat", transform: "scale(0.5)", transformOrigin: "top left" } }) }),
|
|
3073
|
+
/* @__PURE__ */ e("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children: it(yt) })
|
|
2977
3074
|
] }),
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
|
|
2980
|
-
/* @__PURE__ */ e("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(
|
|
3075
|
+
/* @__PURE__ */ c("div", { className: "w-full h-1 bg-white/20 overflow-hidden relative backdrop-blur-sm border-[length:var(--border-width)] border-white/10", style: { borderRadius: "var(--radius-full)" }, children: [
|
|
3076
|
+
r.duration > 0 && r.buffered.map((d, w) => /* @__PURE__ */ e("div", { className: "absolute top-0 bottom-0 bg-white/20", style: { left: `${d.start / r.duration * 100}%`, width: `${(d.end - d.start) / r.duration * 100}%` } }, w)),
|
|
3077
|
+
/* @__PURE__ */ e("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(_e ? Re : r.currentTime) / r.duration * 100}%` } })
|
|
2981
3078
|
] }),
|
|
2982
3079
|
/* @__PURE__ */ e(
|
|
2983
3080
|
"div",
|
|
2984
3081
|
{
|
|
2985
3082
|
className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-3.5 h-3.5 bg-white shadow-md scale-0 group-hover/slider:scale-100 transition-transform duration-100 z-10",
|
|
2986
3083
|
style: {
|
|
2987
|
-
left: `${(
|
|
3084
|
+
left: `${(_e ? Re : r.currentTime) / r.duration * 100}%`,
|
|
2988
3085
|
borderRadius: "var(--radius-full)"
|
|
2989
3086
|
}
|
|
2990
3087
|
}
|
|
@@ -2992,9 +3089,9 @@ const vn = [
|
|
|
2992
3089
|
]
|
|
2993
3090
|
}
|
|
2994
3091
|
),
|
|
2995
|
-
/* @__PURE__ */
|
|
2996
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children:
|
|
2997
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", children:
|
|
3092
|
+
/* @__PURE__ */ c("div", { className: "flex items-center justify-between pointer-events-auto", children: [
|
|
3093
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: At.filter((d) => d.position === "left" || d.position === "center").map(Vt) }),
|
|
3094
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: At.filter((d) => d.position === "right").map(Vt) })
|
|
2998
3095
|
] })
|
|
2999
3096
|
]
|
|
3000
3097
|
}
|
|
@@ -3003,21 +3100,21 @@ const vn = [
|
|
|
3003
3100
|
]
|
|
3004
3101
|
}
|
|
3005
3102
|
);
|
|
3006
|
-
return
|
|
3007
|
-
},
|
|
3008
|
-
const i =
|
|
3009
|
-
return i.render(
|
|
3103
|
+
return r.isWebFullscreen && typeof document < "u" ? Ti(Bt, document.body) : Bt;
|
|
3104
|
+
}, $s = (s, t) => {
|
|
3105
|
+
const i = Mi(s);
|
|
3106
|
+
return i.render(Me.createElement(Yt, t)), {
|
|
3010
3107
|
unmount: () => {
|
|
3011
3108
|
i.unmount();
|
|
3012
3109
|
},
|
|
3013
3110
|
update: (o) => {
|
|
3014
|
-
i.render(
|
|
3111
|
+
i.render(Me.createElement(Yt, { ...t, ...o }));
|
|
3015
3112
|
}
|
|
3016
3113
|
};
|
|
3017
3114
|
};
|
|
3018
3115
|
export {
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3116
|
+
$i as StrataCore,
|
|
3117
|
+
Yt as StrataPlayer,
|
|
3118
|
+
$s as mountStrataPlayer
|
|
3022
3119
|
};
|
|
3023
3120
|
//# sourceMappingURL=strataplayer.es.js.map
|