strataplayer 1.2.11 → 1.2.12

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.
@@ -1,12 +1,13 @@
1
- var qt = Object.defineProperty;
2
- var Qt = (s, t, i) => t in s ? qt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
3
- var S = (s, t, i) => Qt(s, typeof t != "symbol" ? t + "" : t, i);
4
- import ze, { useState as C, useEffect as P, useRef as I, useLayoutEffect as Xt, useMemo as Ce, useSyncExternalStore as Jt, useCallback as Ne } from "react";
5
- import { createRoot as Kt } from "react-dom/client";
1
+ var Xt = Object.defineProperty;
2
+ var Jt = (s, t, i) => t in s ? Xt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
3
+ var C = (s, t, i) => Jt(s, typeof t != "symbol" ? t + "" : t, i);
4
+ import ze, { useState as N, useEffect as P, useRef as I, useLayoutEffect as Kt, useMemo as Ce, useSyncExternalStore as Yt, useCallback as Ne } from "react";
5
+ import { createRoot as Zt } from "react-dom/client";
6
6
  import { jsxs as l, jsx as e, Fragment as L } from "react/jsx-runtime";
7
- class Yt {
7
+ import { createPortal as ei } from "react-dom";
8
+ class ti {
8
9
  constructor() {
9
- S(this, "events");
10
+ C(this, "events");
10
11
  this.events = /* @__PURE__ */ new Map();
11
12
  }
12
13
  on(t, i) {
@@ -17,21 +18,21 @@ class Yt {
17
18
  const r = this.events.get(t);
18
19
  r && this.events.set(
19
20
  t,
20
- r.filter((a) => a !== i)
21
+ r.filter((o) => o !== i)
21
22
  );
22
23
  }
23
24
  emit(t, i) {
24
25
  const r = this.events.get(t);
25
- r && r.forEach((a) => a(i));
26
+ r && r.forEach((o) => o(i));
26
27
  }
27
28
  destroy() {
28
29
  this.events.clear();
29
30
  }
30
31
  }
31
- class Zt {
32
+ class ii {
32
33
  constructor(t) {
33
- S(this, "state");
34
- S(this, "listeners");
34
+ C(this, "state");
35
+ C(this, "listeners");
35
36
  this.state = t, this.listeners = /* @__PURE__ */ new Set();
36
37
  }
37
38
  get() {
@@ -39,7 +40,7 @@ class Zt {
39
40
  }
40
41
  setState(t) {
41
42
  const i = this.state, r = typeof t == "function" ? t(i) : t;
42
- this.state = { ...i, ...r }, this.listeners.forEach((a) => a(this.state, i));
43
+ this.state = { ...i, ...r }, this.listeners.forEach((o) => o(this.state, i));
43
44
  }
44
45
  subscribe(t) {
45
46
  return this.listeners.add(t), () => this.listeners.delete(t);
@@ -48,13 +49,13 @@ class Zt {
48
49
  this.listeners.clear();
49
50
  }
50
51
  }
51
- class ei {
52
+ class si {
52
53
  constructor(t) {
53
- S(this, "context", null);
54
- S(this, "source", null);
55
- S(this, "gainNode", null);
56
- S(this, "video");
57
- S(this, "isInitialized", !1);
54
+ C(this, "context", null);
55
+ C(this, "source", null);
56
+ C(this, "gainNode", null);
57
+ C(this, "video");
58
+ C(this, "isInitialized", !1);
58
59
  this.video = t;
59
60
  }
60
61
  /**
@@ -88,7 +89,7 @@ const Re = {
88
89
  isBold: !1,
89
90
  textColor: "#ffffff",
90
91
  verticalOffset: 40
91
- }, xt = "strata-settings", V = {
92
+ }, yt = "strata-settings", B = {
92
93
  isPlaying: !1,
93
94
  isBuffering: !1,
94
95
  isLive: !1,
@@ -105,6 +106,7 @@ const Re = {
105
106
  currentAudioTrack: -1,
106
107
  error: null,
107
108
  isFullscreen: !1,
109
+ isWebFullscreen: !1,
108
110
  isPip: !1,
109
111
  subtitleTracks: [],
110
112
  currentSubtitle: -1,
@@ -125,11 +127,11 @@ const Re = {
125
127
  isAutoSized: !1,
126
128
  isLooping: !1,
127
129
  controlsVisible: !0
128
- }, wt = (s = {}) => {
130
+ }, kt = (s = {}) => {
129
131
  let t = {};
130
132
  if (!s.disablePersistence && typeof window < "u")
131
133
  try {
132
- const r = localStorage.getItem(xt);
134
+ const r = localStorage.getItem(yt);
133
135
  r && (t = JSON.parse(r));
134
136
  } catch {
135
137
  }
@@ -139,70 +141,70 @@ const Re = {
139
141
  ...s.subtitleSettings || {}
140
142
  };
141
143
  return {
142
- ...V,
144
+ ...B,
143
145
  ...t,
144
146
  // Load saved first
145
147
  // Override with config if present (not undefined)
146
- volume: s.volume ?? t.volume ?? V.volume,
147
- isMuted: s.muted ?? t.isMuted ?? V.isMuted,
148
- playbackRate: s.playbackRate ?? t.playbackRate ?? V.playbackRate,
149
- audioGain: s.audioGain ?? t.audioGain ?? V.audioGain,
150
- theme: s.theme ?? t.theme ?? V.theme,
151
- themeColor: s.themeColor ?? t.themeColor ?? V.themeColor,
152
- iconSize: s.iconSize ?? t.iconSize ?? V.iconSize,
148
+ volume: s.volume ?? t.volume ?? B.volume,
149
+ isMuted: s.muted ?? t.isMuted ?? B.isMuted,
150
+ playbackRate: s.playbackRate ?? t.playbackRate ?? B.playbackRate,
151
+ audioGain: s.audioGain ?? t.audioGain ?? B.audioGain,
152
+ theme: s.theme ?? t.theme ?? B.theme,
153
+ themeColor: s.themeColor ?? t.themeColor ?? B.themeColor,
154
+ iconSize: s.iconSize ?? t.iconSize ?? B.iconSize,
153
155
  subtitleSettings: i,
154
156
  // Config overrides state for these visual modes
155
- isAutoSized: s.autoSize ?? V.isAutoSized,
156
- isLive: s.isLive ?? t.isLive ?? V.isLive,
157
- isLooping: s.loop ?? t.isLooping ?? V.isLooping
157
+ isAutoSized: s.autoSize ?? B.isAutoSized,
158
+ isLive: s.isLive ?? t.isLive ?? B.isLive,
159
+ isLooping: s.loop ?? t.isLooping ?? B.isLooping
158
160
  };
159
161
  };
160
- class ti {
162
+ class ni {
161
163
  constructor(t = {}, i) {
162
- S(this, "video");
163
- S(this, "container", null);
164
- S(this, "events");
165
- S(this, "store");
166
- S(this, "plugins", /* @__PURE__ */ new Map());
167
- S(this, "audioEngine");
168
- S(this, "config");
169
- S(this, "resizeObserver", null);
164
+ C(this, "video");
165
+ C(this, "container", null);
166
+ C(this, "events");
167
+ C(this, "store");
168
+ C(this, "plugins", /* @__PURE__ */ new Map());
169
+ C(this, "audioEngine");
170
+ C(this, "config");
171
+ C(this, "resizeObserver", null);
170
172
  // Retry Logic
171
- S(this, "retryCount", 0);
172
- S(this, "maxRetries", 5);
173
- S(this, "retryTimer", null);
174
- S(this, "currentSource", null);
175
- S(this, "currentSrc", "");
176
- S(this, "currentTracks", []);
173
+ C(this, "retryCount", 0);
174
+ C(this, "maxRetries", 5);
175
+ C(this, "retryTimer", null);
176
+ C(this, "currentSource", null);
177
+ C(this, "currentSrc", "");
178
+ C(this, "currentTracks", []);
177
179
  // Cast
178
- S(this, "castInitialized", !1);
179
- S(this, "boundCueChange");
180
- S(this, "boundFullscreenChange");
181
- 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", t.playsInline !== !1 && (this.video.playsInline = !0), this.events = new Yt();
182
- const r = wt(t);
183
- this.store = new Zt(r), this.audioEngine = new ei(this.video), this.boundCueChange = this.handleCueChange.bind(this), this.boundFullscreenChange = () => {
184
- const a = !!document.fullscreenElement;
185
- 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) {
180
+ C(this, "castInitialized", !1);
181
+ C(this, "boundCueChange");
182
+ C(this, "boundFullscreenChange");
183
+ 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", t.playsInline !== !1 && (this.video.playsInline = !0), this.events = new ti();
184
+ const r = kt(t);
185
+ this.store = new ii(r), this.audioEngine = new si(this.video), this.boundCueChange = this.handleCueChange.bind(this), this.boundFullscreenChange = () => {
186
+ const o = !!document.fullscreenElement;
187
+ if (this.store.setState({ isFullscreen: o }), this.emit("resize"), this.emit(o ? "fullscreen" : "fullscreen_exit"), o && this.config.autoOrientation && screen.orientation && "lock" in screen.orientation) {
186
188
  const m = this.video.videoWidth > this.video.videoHeight ? "landscape" : "portrait";
187
189
  try {
188
190
  screen.orientation.lock(m).catch(() => {
189
191
  });
190
192
  } catch {
191
193
  }
192
- } else !a && screen.orientation && "unlock" in screen.orientation && screen.orientation.unlock();
193
- }, this.video.volume = r.volume, this.video.muted = r.isMuted, this.video.playbackRate = r.playbackRate, this.video.loop = r.isLooping, r.audioGain > 1 && this.audioEngine.setGain(r.audioGain), r.isAutoSized && (this.video.style.objectFit = "cover"), this.initVideoListeners(), this.initMediaSession(), this.initCast(), t.disablePersistence || this.store.subscribe((a) => {
194
+ } else !o && screen.orientation && "unlock" in screen.orientation && screen.orientation.unlock();
195
+ }, this.video.volume = r.volume, this.video.muted = r.isMuted, this.video.playbackRate = r.playbackRate, this.video.loop = r.isLooping, r.audioGain > 1 && this.audioEngine.setGain(r.audioGain), r.isAutoSized && (this.video.style.objectFit = "cover"), this.initVideoListeners(), this.initMediaSession(), this.initCast(), t.disablePersistence || this.store.subscribe((o) => {
194
196
  const d = {
195
- volume: a.volume,
196
- isMuted: a.isMuted,
197
- playbackRate: a.playbackRate,
198
- subtitleSettings: a.subtitleSettings,
199
- iconSize: a.iconSize,
200
- themeColor: a.themeColor,
201
- theme: a.theme,
202
- isLive: a.isLive,
203
- isLooping: a.isLooping
197
+ volume: o.volume,
198
+ isMuted: o.isMuted,
199
+ playbackRate: o.playbackRate,
200
+ subtitleSettings: o.subtitleSettings,
201
+ iconSize: o.iconSize,
202
+ themeColor: o.themeColor,
203
+ theme: o.theme,
204
+ isLive: o.isLive,
205
+ isLooping: o.isLooping
204
206
  };
205
- localStorage.setItem(xt, JSON.stringify(d));
207
+ localStorage.setItem(yt, JSON.stringify(d));
206
208
  });
207
209
  }
208
210
  // --- Instance Properties ---
@@ -288,8 +290,8 @@ class ti {
288
290
  "volumechange",
289
291
  "waiting"
290
292
  ].forEach((r) => {
291
- this.video.addEventListener(r, (a) => {
292
- switch (this.emit(`video:${r}`, a), r === "play" && this.emit("play"), r === "pause" && this.emit("pause"), r === "ended" && this.emit("ended"), r === "error" && this.emit("error", this.video.error), r === "seeked" && this.emit("seek"), r) {
293
+ this.video.addEventListener(r, (o) => {
294
+ switch (this.emit(`video:${r}`, o), r === "play" && this.emit("play"), r === "pause" && this.emit("pause"), r === "ended" && this.emit("ended"), r === "error" && this.emit("error", this.video.error), r === "seeked" && this.emit("seek"), r) {
293
295
  case "play":
294
296
  t({ isPlaying: !0 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "playing"), this.updateMediaSessionPosition();
295
297
  break;
@@ -366,9 +368,9 @@ class ti {
366
368
  });
367
369
  }
368
370
  updateMediaSessionMetadata() {
369
- var r, a;
371
+ var r, o;
370
372
  if (!("mediaSession" in navigator)) return;
371
- const t = ((r = this.currentSource) == null ? void 0 : r.name) || ((a = this.currentSource) == null ? void 0 : a.url.split("/").pop()) || "Video", i = [];
373
+ const t = ((r = this.currentSource) == null ? void 0 : r.name) || ((o = this.currentSource) == null ? void 0 : o.url.split("/").pop()) || "Video", i = [];
372
374
  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({
373
375
  title: t,
374
376
  artist: "StrataPlayer",
@@ -386,8 +388,8 @@ class ti {
386
388
  position: Math.max(0, Math.min(i, t))
387
389
  // Ensure within [0, duration]
388
390
  });
389
- } catch (a) {
390
- console.warn("MediaSession Position Error:", a);
391
+ } catch (o) {
392
+ console.warn("MediaSession Position Error:", o);
391
393
  }
392
394
  }
393
395
  triggerError(t, i = !1) {
@@ -397,12 +399,12 @@ class ti {
397
399
  const i = this.video.error, r = t || (i == null ? void 0 : i.message) || (i ? `Code ${i.code}` : "Unknown Error");
398
400
  if (this.removeNotification("retry"), this.emit("video:error", i), this.retryCount < this.maxRetries) {
399
401
  this.retryCount++;
400
- const a = Math.pow(2, this.retryCount - 1) * 1500;
402
+ const o = Math.pow(2, this.retryCount - 1) * 1500;
401
403
  this.notify({
402
404
  id: "retry",
403
405
  type: "loading",
404
406
  message: `Error: ${r}. Retrying (${this.retryCount}/${this.maxRetries})...`
405
- }), console.warn(`[StrataPlayer] Error: ${r}. Retrying in ${a}ms...`), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = setTimeout(() => {
407
+ }), console.warn(`[StrataPlayer] Error: ${r}. Retrying in ${o}ms...`), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = setTimeout(() => {
406
408
  if (this.currentSource) {
407
409
  this.load(this.currentSource, this.currentTracks, !0);
408
410
  const d = this.store.get().currentTime;
@@ -413,11 +415,11 @@ class ti {
413
415
  this.video.addEventListener("canplay", m);
414
416
  }
415
417
  }
416
- }, a);
418
+ }, o);
417
419
  } else {
418
420
  this.removeNotification("retry");
419
- const a = `Failed to play after ${this.maxRetries} attempts: ${r}`;
420
- this.store.setState({ error: a }), this.emit("error", a);
421
+ const o = `Failed to play after ${this.maxRetries} attempts: ${r}`;
422
+ this.store.setState({ error: o }), this.emit("error", o);
421
423
  }
422
424
  }
423
425
  updateBuffer() {
@@ -431,10 +433,10 @@ class ti {
431
433
  }
432
434
  updateSubtitles() {
433
435
  setTimeout(() => {
434
- const t = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions").map((r, a) => ({
435
- label: r.label || r.language || `Track ${a + 1}`,
436
+ const t = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions").map((r, o) => ({
437
+ label: r.label || r.language || `Track ${o + 1}`,
436
438
  language: r.language,
437
- index: a
439
+ index: o
438
440
  }));
439
441
  this.store.setState({ subtitleTracks: t });
440
442
  const i = this.store.get();
@@ -443,16 +445,16 @@ class ti {
443
445
  }
444
446
  // --- Utility ---
445
447
  async fetchWithRetry(t, i = 3, r) {
446
- const a = r ?? this.config.fetchTimeout ?? 3e4;
448
+ const o = r ?? this.config.fetchTimeout ?? 3e4;
447
449
  for (let d = 0; d < i; d++) {
448
- const m = new AbortController(), v = setTimeout(() => m.abort(), a);
450
+ const m = new AbortController(), v = setTimeout(() => m.abort(), o);
449
451
  try {
450
452
  const w = await fetch(t, { signal: m.signal });
451
453
  if (clearTimeout(v), !w.ok) throw new Error(`HTTP ${w.status}`);
452
454
  return w;
453
455
  } catch (w) {
454
456
  if (clearTimeout(v), d === i - 1) throw w;
455
- w.name === "AbortError" && console.warn(`Fetch timeout (${a}ms) for ${t}`), await new Promise((b) => setTimeout(b, 1e3 * Math.pow(2, d)));
457
+ w.name === "AbortError" && console.warn(`Fetch timeout (${o}ms) for ${t}`), await new Promise((b) => setTimeout(b, 1e3 * Math.pow(2, d)));
456
458
  }
457
459
  }
458
460
  throw new Error("Fetch failed");
@@ -473,19 +475,19 @@ class ti {
473
475
  switchSource(t) {
474
476
  const i = this.store.get().sources;
475
477
  if (t >= 0 && t < i.length) {
476
- const r = this.video.currentTime, a = !this.video.paused;
478
+ const r = this.video.currentTime, o = !this.video.paused;
477
479
  this.load(i[t], this.currentTracks);
478
480
  const d = () => {
479
- this.video.currentTime = r, a && this.video.play(), this.video.removeEventListener("canplay", d);
481
+ this.video.currentTime = r, o && this.video.play(), this.video.removeEventListener("canplay", d);
480
482
  };
481
483
  this.video.addEventListener("canplay", d);
482
484
  }
483
485
  }
484
486
  load(t, i = [], r = !1) {
485
487
  this.retryTimer && clearTimeout(this.retryTimer);
486
- const a = typeof t == "string" ? { url: t, type: "auto" } : t;
487
- r || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc = a.url, this.currentSource = a, this.currentTracks = i;
488
- const m = this.store.get().sources.findIndex((b) => b.url === a.url);
488
+ const o = typeof t == "string" ? { url: t, type: "auto" } : t;
489
+ r || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc = o.url, this.currentSource = o, this.currentTracks = i;
490
+ const m = this.store.get().sources.findIndex((b) => b.url === o.url);
489
491
  this.store.setState({
490
492
  isBuffering: !0,
491
493
  qualityLevels: [],
@@ -497,8 +499,8 @@ class ti {
497
499
  // subtitleTracks and currentSubtitle are purposely preserved
498
500
  currentSourceIndex: m
499
501
  }), this.updateMediaSessionMetadata();
500
- let v = a.type || "auto";
501
- v === "auto" && (a.url.includes(".m3u8") ? v = "hls" : a.url.includes(".mpd") ? v = "dash" : a.url.includes(".flv") || a.url.includes(".ts") ? v = "mpegts" : a.url.startsWith("magnet:") || a.url.includes(".torrent") ? v = "webtorrent" : v = "mp4"), this.events.emit("load", { url: a.url, type: v });
502
+ let v = o.type || "auto";
503
+ v === "auto" && (o.url.includes(".m3u8") ? v = "hls" : o.url.includes(".mpd") ? v = "dash" : o.url.includes(".flv") || o.url.includes(".ts") ? v = "mpegts" : o.url.startsWith("magnet:") || o.url.includes(".torrent") ? v = "webtorrent" : v = "mp4"), this.events.emit("load", { url: o.url, type: v });
502
504
  const w = this.video.getElementsByTagName("track");
503
505
  for (; w.length > 0; )
504
506
  w[0].remove();
@@ -508,7 +510,7 @@ class ti {
508
510
  }).catch((h) => {
509
511
  this.notify({ type: "warning", message: `Failed to load subtitle: ${b.label}`, duration: 4e3 });
510
512
  });
511
- }), (v === "mp4" || v === "webm" || v === "ogg") && (this.video.src = a.url);
513
+ }), (v === "mp4" || v === "webm" || v === "ogg") && (this.video.src = o.url);
512
514
  }
513
515
  // Wrapper for external subtitle API
514
516
  loadSubtitle(t, i = "Subtitle") {
@@ -516,10 +518,10 @@ class ti {
516
518
  }
517
519
  addTextTrack(t, i) {
518
520
  const r = new FileReader();
519
- r.onload = (a) => {
521
+ r.onload = (o) => {
520
522
  var w;
521
- if (!((w = a.target) != null && w.result)) return;
522
- let d = a.target.result;
523
+ if (!((w = o.target) != null && w.result)) return;
524
+ let d = o.target.result;
523
525
  (t.name.toLowerCase().endsWith(".srt") || !d.trim().startsWith("WEBVTT")) && (d = d.replace(/(\d{2}:\d{2}:\d{2}),(\d{3})/g, "$1.$2"), d.trim().startsWith("WEBVTT") || (d = `WEBVTT
524
526
 
525
527
  ` + d));
@@ -532,9 +534,9 @@ class ti {
532
534
  this.notify({ type: "error", message: "Failed to read file", duration: 3e3 });
533
535
  }, r.readAsText(t);
534
536
  }
535
- addTextTrackInternal(t, i, r = "", a = !1) {
537
+ addTextTrackInternal(t, i, r = "", o = !1) {
536
538
  const d = document.createElement("track");
537
- d.kind = "subtitles", d.label = i, d.src = t, d.srclang = r, a && (d.default = !0), this.video.appendChild(d), this.updateSubtitles();
539
+ d.kind = "subtitles", d.label = i, d.src = t, d.srclang = r, o && (d.default = !0), this.video.appendChild(d), this.updateSubtitles();
538
540
  }
539
541
  play() {
540
542
  return this.video.play();
@@ -580,6 +582,13 @@ class ti {
580
582
  console.error("Fullscreen toggle failed", t);
581
583
  }
582
584
  }
585
+ toggleWebFullscreen() {
586
+ const t = this.store.get().isWebFullscreen;
587
+ document.fullscreenElement && document.exitFullscreen().catch(() => {
588
+ });
589
+ const i = !t;
590
+ this.store.setState({ isWebFullscreen: i }), typeof document < "u" && (document.body.style.overflow = i ? "hidden" : ""), this.emit("webfullscreen", i);
591
+ }
583
592
  togglePip() {
584
593
  document.pictureInPictureElement ? document.exitPictureInPicture() : this.video !== document.pictureInPictureElement && this.video.requestPictureInPicture && this.video.requestPictureInPicture();
585
594
  }
@@ -590,8 +599,8 @@ class ti {
590
599
  if (i) {
591
600
  i.drawImage(this.video, 0, 0, t.width, t.height);
592
601
  try {
593
- const r = t.toDataURL("image/png"), a = document.createElement("a");
594
- a.download = `screenshot-${(/* @__PURE__ */ new Date()).toISOString()}.png`, a.href = r, a.click(), this.notify({ type: "success", message: "Screenshot saved", duration: 2e3 });
602
+ const r = t.toDataURL("image/png"), o = document.createElement("a");
603
+ o.download = `screenshot-${(/* @__PURE__ */ new Date()).toISOString()}.png`, o.href = r, o.click(), this.notify({ type: "success", message: "Screenshot saved", duration: 2e3 });
595
604
  } catch {
596
605
  this.notify({ type: "error", message: "Failed to take screenshot", duration: 3e3 });
597
606
  }
@@ -609,8 +618,8 @@ class ti {
609
618
  [t]: !i[t]
610
619
  };
611
620
  this.store.setState({ flipState: r });
612
- const a = r.horizontal ? -1 : 1, d = r.vertical ? -1 : 1;
613
- this.video.style.transform = `scale(${a}, ${d})`;
621
+ const o = r.horizontal ? -1 : 1, d = r.vertical ? -1 : 1;
622
+ this.video.style.transform = `scale(${o}, ${d})`;
614
623
  }
615
624
  setAspectRatio(t) {
616
625
  if (this.store.setState({ aspectRatio: t }), t === "default") {
@@ -655,8 +664,8 @@ class ti {
655
664
  try {
656
665
  const i = t.cast.framework.CastContext.getInstance().getCurrentSession();
657
666
  if (!i) return;
658
- const r = new t.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"), a = new t.chrome.cast.media.LoadRequest(r);
659
- i.loadMedia(a).then(() => {
667
+ const r = new t.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"), o = new t.chrome.cast.media.LoadRequest(r);
668
+ i.loadMedia(o).then(() => {
660
669
  this.notify({ type: "success", message: "Casting...", duration: 3e3 });
661
670
  }).catch((d) => console.error("Cast load error", d));
662
671
  } catch (i) {
@@ -669,10 +678,10 @@ class ti {
669
678
  this.store.setState({ activeCues: [] });
670
679
  return;
671
680
  }
672
- const r = Array.from(this.video.textTracks).filter((a) => a.kind === "subtitles" || a.kind === "captions")[t.currentSubtitle];
681
+ const r = Array.from(this.video.textTracks).filter((o) => o.kind === "subtitles" || o.kind === "captions")[t.currentSubtitle];
673
682
  if (r && r.activeCues) {
674
- const a = Array.from(r.activeCues).map((d) => d.text);
675
- this.store.setState({ activeCues: a });
683
+ const o = Array.from(r.activeCues).map((d) => d.text);
684
+ this.store.setState({ activeCues: o });
676
685
  } else
677
686
  this.store.setState({ activeCues: [] });
678
687
  }
@@ -680,10 +689,10 @@ class ti {
680
689
  if (Array.from(this.video.textTracks).forEach((i) => {
681
690
  i.removeEventListener("cuechange", this.boundCueChange), i.mode = "hidden";
682
691
  }), this.store.setState({ currentSubtitle: t, subtitleOffset: 0, activeCues: [] }), t !== -1) {
683
- const r = Array.from(this.video.textTracks).filter((a) => a.kind === "subtitles" || a.kind === "captions")[t];
692
+ const r = Array.from(this.video.textTracks).filter((o) => o.kind === "subtitles" || o.kind === "captions")[t];
684
693
  if (r) {
685
- const a = this.store.get().subtitleSettings;
686
- r.mode = a.useNative ? "showing" : "hidden", r.addEventListener("cuechange", this.boundCueChange), this.handleCueChange();
694
+ const o = this.store.get().subtitleSettings;
695
+ r.mode = o.useNative ? "showing" : "hidden", r.addEventListener("cuechange", this.boundCueChange), this.handleCueChange();
687
696
  }
688
697
  }
689
698
  }
@@ -696,8 +705,8 @@ class ti {
696
705
  }
697
706
  setSubtitleOffset(t) {
698
707
  const i = this.store.get().subtitleOffset, r = t - i;
699
- Math.abs(r) < 1e-3 || (Array.from(this.video.textTracks).forEach((a) => {
700
- (a.mode === "showing" || a.mode === "hidden") && a.cues && Array.from(a.cues).forEach((d) => {
708
+ Math.abs(r) < 1e-3 || (Array.from(this.video.textTracks).forEach((o) => {
709
+ (o.mode === "showing" || o.mode === "hidden") && o.cues && Array.from(o.cues).forEach((d) => {
701
710
  d.startTime += r, d.endTime += r;
702
711
  });
703
712
  }), this.store.setState({ subtitleOffset: t }), this.notify({ type: "info", message: `Subtitle Offset: ${t > 0 ? "+" : ""}${t.toFixed(1)}s`, duration: 1500 }));
@@ -712,17 +721,17 @@ class ti {
712
721
  }
713
722
  const i = this.notify({ type: "loading", message: "Preparing download...", progress: 0 });
714
723
  try {
715
- const a = await this.fetchWithRetry(t);
716
- if (!a.body) throw new Error("No body");
717
- const d = a.body.getReader(), m = a.headers.get("Content-Length"), v = m ? parseInt(m, 10) : 0;
724
+ const o = await this.fetchWithRetry(t);
725
+ if (!o.body) throw new Error("No body");
726
+ const d = o.body.getReader(), m = o.headers.get("Content-Length"), v = m ? parseInt(m, 10) : 0;
718
727
  let w = 0;
719
728
  const b = [];
720
729
  for (; ; ) {
721
730
  const { done: z, value: R } = await d.read();
722
731
  if (z) break;
723
732
  if (b.push(R), w += R.length, v) {
724
- const f = Math.round(w / v * 100);
725
- this.notify({ id: i, type: "loading", message: `Downloading... ${f}%`, progress: f });
733
+ const p = Math.round(w / v * 100);
734
+ this.notify({ id: i, type: "loading", message: `Downloading... ${p}%`, progress: p });
726
735
  }
727
736
  }
728
737
  const h = new Blob(b), y = window.URL.createObjectURL(h), k = document.createElement("a");
@@ -746,7 +755,7 @@ class ti {
746
755
  }));
747
756
  }
748
757
  destroy() {
749
- this.retryTimer && clearTimeout(this.retryTimer), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), document.removeEventListener("fullscreenchange", this.boundFullscreenChange), this.video.pause(), this.video.src = "";
758
+ this.retryTimer && clearTimeout(this.retryTimer), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.store.get().isWebFullscreen && typeof document < "u" && (document.body.style.overflow = ""), document.removeEventListener("fullscreenchange", this.boundFullscreenChange), this.video.pause(), this.video.src = "";
750
759
  const t = this.video.getElementsByTagName("track");
751
760
  for (; t.length > 0; ) t[0].remove();
752
761
  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();
@@ -756,11 +765,11 @@ const Te = (s) => {
756
765
  if (isNaN(s)) return "00:00";
757
766
  const t = Math.floor(s / 3600), i = Math.floor(s % 3600 / 60), r = Math.floor(s % 60);
758
767
  return t > 0 ? `${t}:${i.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${i}:${r.toString().padStart(2, "0")}`;
759
- }, ii = async (s, t = 3, i = 2e4) => {
768
+ }, ri = async (s, t = 3, i = 2e4) => {
760
769
  for (let r = 0; r < t; r++) {
761
- const a = new AbortController(), d = setTimeout(() => a.abort(), i);
770
+ const o = new AbortController(), d = setTimeout(() => o.abort(), i);
762
771
  try {
763
- const m = await fetch(s, { signal: a.signal });
772
+ const m = await fetch(s, { signal: o.signal });
764
773
  if (clearTimeout(d), !m.ok) throw new Error(`HTTP ${m.status}`);
765
774
  return await m.text();
766
775
  } catch (m) {
@@ -769,9 +778,9 @@ const Te = (s) => {
769
778
  }
770
779
  }
771
780
  throw new Error("Failed");
772
- }, si = async (s, t, i = 2e4) => {
781
+ }, oi = async (s, t, i = 2e4) => {
773
782
  try {
774
- const a = (await ii(s, 3, i)).split(`
783
+ const o = (await ri(s, 3, i)).split(`
775
784
  `), d = [];
776
785
  let m = null, v = null;
777
786
  const w = s.substring(0, s.lastIndexOf("/") + 1), b = (h) => {
@@ -779,26 +788,26 @@ const Te = (s) => {
779
788
  let k = 0;
780
789
  return y.length === 3 ? (k += parseFloat(y[0]) * 3600, k += parseFloat(y[1]) * 60, k += parseFloat(y[2])) : (k += parseFloat(y[0]) * 60, k += parseFloat(y[1])), k;
781
790
  };
782
- for (let h of a)
791
+ for (let h of o)
783
792
  if (h = h.trim(), h.includes("-->")) {
784
793
  const y = h.split("-->");
785
794
  m = b(y[0].trim()), v = b(y[1].trim());
786
795
  } else if (m !== null && v !== null && h.length > 0) {
787
796
  let [y, k] = h.split("#");
788
797
  !y.match(/^https?:\/\//) && !y.startsWith("data:") && (y = w + y);
789
- let z = 0, R = 0, f = 0, W = 0;
798
+ let z = 0, R = 0, p = 0, W = 0;
790
799
  if (k && k.startsWith("xywh=")) {
791
800
  const D = k.replace("xywh=", "").split(",");
792
- D.length === 4 && (z = parseInt(D[0]), R = parseInt(D[1]), f = parseInt(D[2]), W = parseInt(D[3]));
801
+ D.length === 4 && (z = parseInt(D[0]), R = parseInt(D[1]), p = parseInt(D[2]), W = parseInt(D[3]));
793
802
  }
794
- f > 0 && W > 0 && d.push({ start: m, end: v, url: y, x: z, y: R, w: f, h: W }), m = null, v = null;
803
+ p > 0 && W > 0 && d.push({ start: m, end: v, url: y, x: z, y: R, w: p, h: W }), m = null, v = null;
795
804
  }
796
805
  return d;
797
806
  } catch {
798
807
  return t({ type: "warning", message: "Failed to load thumbnails", duration: 4e3 }), [];
799
808
  }
800
- }, dt = (s, t = 200) => {
801
- const [i, r] = C(s), [a, d] = C(!1);
809
+ }, ht = (s, t = 200) => {
810
+ const [i, r] = N(s), [o, d] = N(!1);
802
811
  return P(() => {
803
812
  if (s)
804
813
  r(!0), requestAnimationFrame(() => {
@@ -813,12 +822,12 @@ const Te = (s) => {
813
822
  }, t);
814
823
  return () => clearTimeout(m);
815
824
  }
816
- }, [s, t]), { isMounted: i, isVisible: a };
817
- }, x = ({ className: s, children: t, fill: i = "none", strokeWidth: r = 2, viewBox: a = "0 0 24 24" }) => /* @__PURE__ */ e(
825
+ }, [s, t]), { isMounted: i, isVisible: o };
826
+ }, x = ({ className: s, children: t, fill: i = "none", strokeWidth: r = 2, viewBox: o = "0 0 24 24" }) => /* @__PURE__ */ e(
818
827
  "svg",
819
828
  {
820
829
  xmlns: "http://www.w3.org/2000/svg",
821
- viewBox: a,
830
+ viewBox: o,
822
831
  fill: i,
823
832
  stroke: "currentColor",
824
833
  strokeWidth: r,
@@ -827,70 +836,70 @@ const Te = (s) => {
827
836
  className: s,
828
837
  children: t
829
838
  }
830
- ), ut = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("polygon", { points: "5 3 19 12 5 21 5 3" }) }), ht = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
839
+ ), mt = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("polygon", { points: "5 3 19 12 5 21 5 3" }) }), ft = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
831
840
  /* @__PURE__ */ e("rect", { width: "4", height: "16", x: "6", y: "4", rx: "1" }),
832
841
  /* @__PURE__ */ e("rect", { width: "4", height: "16", x: "14", y: "4", rx: "1" })
833
- ] }), ni = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
842
+ ] }), ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
834
843
  /* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
835
844
  /* @__PURE__ */ e("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
836
845
  /* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
837
- ] }), ri = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
846
+ ] }), li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
838
847
  /* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
839
848
  /* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
840
- ] }), ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
849
+ ] }), ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
841
850
  /* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
842
851
  /* @__PURE__ */ e("line", { x1: "23", x2: "17", y1: "9", y2: "15" }),
843
852
  /* @__PURE__ */ e("line", { x1: "17", x2: "23", y1: "9", y2: "15" })
844
- ] }), oi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
853
+ ] }), di = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
845
854
  /* @__PURE__ */ e("path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }),
846
855
  /* @__PURE__ */ e("path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }),
847
856
  /* @__PURE__ */ e("path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }),
848
857
  /* @__PURE__ */ e("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
849
- ] }), li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
858
+ ] }), ui = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
850
859
  /* @__PURE__ */ e("path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }),
851
860
  /* @__PURE__ */ e("path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }),
852
861
  /* @__PURE__ */ e("path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }),
853
862
  /* @__PURE__ */ e("path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" })
854
- ] }), ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
863
+ ] }), hi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
855
864
  /* @__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" }),
856
865
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
857
- ] }), Le = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" }) }), di = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
866
+ ] }), Le = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" }) }), mi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
858
867
  /* @__PURE__ */ e("path", { d: "M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" }),
859
868
  /* @__PURE__ */ e("rect", { x: "12", y: "13", width: "10", height: "7", rx: "2" })
860
- ] }), ui = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
869
+ ] }), fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
861
870
  /* @__PURE__ */ e("rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2" }),
862
871
  /* @__PURE__ */ e("path", { d: "M7 15h4" }),
863
872
  /* @__PURE__ */ e("path", { d: "M15 15h2" }),
864
873
  /* @__PURE__ */ e("path", { d: "M7 11h2" }),
865
874
  /* @__PURE__ */ e("path", { d: "M13 11h4" })
866
- ] }), hi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
875
+ ] }), pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
867
876
  /* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
868
877
  /* @__PURE__ */ e("polyline", { points: "7 10 12 15 17 10" }),
869
878
  /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "15", y2: "3" })
870
- ] }), mi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
879
+ ] }), bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
871
880
  /* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
872
881
  /* @__PURE__ */ e("polyline", { points: "17 8 12 3 7 8" }),
873
882
  /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
874
- ] }), pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
883
+ ] }), vi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
875
884
  /* @__PURE__ */ e("path", { d: "m12 19-7-7 7-7" }),
876
885
  /* @__PURE__ */ e("path", { d: "M19 12H5" })
877
- ] }), Ie = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }), fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
886
+ ] }), Ie = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }), gi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
878
887
  /* @__PURE__ */ e("path", { d: "M2 16.1A5 5 0 0 1 5.9 20" }),
879
888
  /* @__PURE__ */ e("path", { d: "M2 12.05A9 9 0 0 1 9.95 20" }),
880
889
  /* @__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" }),
881
890
  /* @__PURE__ */ e("line", { x1: "2", x2: "2.01", y1: "20", y2: "20" })
882
- ] }), bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
891
+ ] }), xi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
883
892
  /* @__PURE__ */ e("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
884
893
  /* @__PURE__ */ e("circle", { cx: "9", cy: "7", r: "4" }),
885
894
  /* @__PURE__ */ e("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
886
895
  /* @__PURE__ */ e("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
887
- ] }), vi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
896
+ ] }), wi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
888
897
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
889
898
  /* @__PURE__ */ e("polyline", { points: "12 6 12 12 16 14" })
890
- ] }), gi = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M5 12h14" }) }), xi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
899
+ ] }), yi = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M5 12h14" }) }), ki = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
891
900
  /* @__PURE__ */ e("path", { d: "M5 12h14" }),
892
901
  /* @__PURE__ */ e("path", { d: "M12 5v14" })
893
- ] }), wi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
902
+ ] }), Si = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
894
903
  /* @__PURE__ */ e("path", { d: "M4 21v-7" }),
895
904
  /* @__PURE__ */ e("path", { d: "M4 10V3" }),
896
905
  /* @__PURE__ */ e("path", { d: "M12 21v-9" }),
@@ -900,69 +909,69 @@ const Te = (s) => {
900
909
  /* @__PURE__ */ e("path", { d: "M1 14h6" }),
901
910
  /* @__PURE__ */ e("path", { d: "M9 8h6" }),
902
911
  /* @__PURE__ */ e("path", { d: "M17 16h6" })
903
- ] }), yi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
912
+ ] }), Ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
904
913
  /* @__PURE__ */ e("polyline", { points: "4 7 4 4 20 4 20 7" }),
905
914
  /* @__PURE__ */ e("line", { x1: "9", x2: "15", y1: "20", y2: "20" }),
906
915
  /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "4", y2: "20" })
907
- ] }), yt = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
916
+ ] }), St = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
908
917
  /* @__PURE__ */ e("circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor" }),
909
918
  /* @__PURE__ */ e("circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor" }),
910
919
  /* @__PURE__ */ e("circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor" }),
911
920
  /* @__PURE__ */ e("circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor" }),
912
921
  /* @__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" })
913
- ] }), ki = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
922
+ ] }), Ni = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
914
923
  /* @__PURE__ */ e("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
915
924
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
916
- ] }), Si = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
925
+ ] }), Ti = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
917
926
  /* @__PURE__ */ e("polyline", { points: "8 18 12 22 16 18" }),
918
927
  /* @__PURE__ */ e("polyline", { points: "8 6 12 2 16 6" }),
919
928
  /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "2", y2: "22" })
920
- ] }), Ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
929
+ ] }), Mi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
921
930
  /* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
922
931
  /* @__PURE__ */ e("path", { d: "M3 3v5h5" })
923
- ] }), Ni = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
932
+ ] }), zi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
924
933
  /* @__PURE__ */ e("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
925
934
  /* @__PURE__ */ e("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
926
- ] }), Ti = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
935
+ ] }), Ii = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
927
936
  /* @__PURE__ */ e("path", { d: "m3 17 4-10 4 10" }),
928
937
  /* @__PURE__ */ e("path", { d: "M4 13h6" }),
929
938
  /* @__PURE__ */ e("path", { d: "M15 12h4.5a2.5 2.5 0 0 1 0 5H15V7h4a2.5 2.5 0 0 1 0 5h-4" })
930
- ] }), Mi = ({ className: s }) => /* @__PURE__ */ e(x, { 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" }) }), zi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
939
+ ] }), Ri = ({ className: s }) => /* @__PURE__ */ e(x, { 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" }) }), Li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
931
940
  /* @__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" }),
932
941
  /* @__PURE__ */ e("circle", { cx: "12", cy: "13", r: "3" })
933
- ] }), Ii = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
942
+ ] }), $i = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
934
943
  /* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
935
944
  /* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
936
- ] }), Ri = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
945
+ ] }), Ei = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
937
946
  /* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
938
947
  /* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })
939
- ] }), Li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
948
+ ] }), Pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
940
949
  /* @__PURE__ */ e("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
941
950
  /* @__PURE__ */ e("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
942
951
  /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
943
- ] }), $i = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
952
+ ] }), Fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
944
953
  /* @__PURE__ */ e("polygon", { points: "13 19 22 12 13 5 13 19" }),
945
954
  /* @__PURE__ */ e("polygon", { points: "2 19 11 12 2 5 2 19" })
946
- ] }), Ei = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
955
+ ] }), Ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
947
956
  /* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
948
957
  /* @__PURE__ */ e("path", { d: "m6 6 12 12" })
949
- ] }), Pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
958
+ ] }), Bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
950
959
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
951
960
  /* @__PURE__ */ e("path", { d: "M12 16v-4" }),
952
961
  /* @__PURE__ */ e("path", { d: "M12 8h.01" })
953
- ] }), mt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
962
+ ] }), pt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
954
963
  /* @__PURE__ */ l(x, { className: "w-full h-full", children: [
955
964
  /* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
956
965
  /* @__PURE__ */ e("path", { d: "M3 3v5h5" })
957
966
  ] }),
958
967
  /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
959
- ] }), pt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
968
+ ] }), bt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
960
969
  /* @__PURE__ */ l(x, { className: "w-full h-full", children: [
961
970
  /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
962
971
  /* @__PURE__ */ e("path", { d: "M21 3v5h-5" })
963
972
  ] }),
964
973
  /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
965
- ] }), Ai = ({ notifications: s }) => /* @__PURE__ */ e("div", { className: "absolute top-4 left-4 z-50 flex flex-col gap-2 pointer-events-none font-sans max-w-[85%] md:max-w-[400px]", children: s.map((t) => /* @__PURE__ */ l(
974
+ ] }), Vi = ({ notifications: s }) => /* @__PURE__ */ e("div", { className: "absolute top-4 left-4 z-50 flex flex-col gap-2 pointer-events-none font-sans max-w-[85%] md:max-w-[400px]", children: s.map((t) => /* @__PURE__ */ l(
966
975
  "div",
967
976
  {
968
977
  className: `
@@ -980,7 +989,7 @@ const Te = (s) => {
980
989
  ]
981
990
  },
982
991
  t.id
983
- )) }), Bi = ({ cues: s, settings: t }) => {
992
+ )) }), Oi = ({ cues: s, settings: t }) => {
984
993
  if (t.useNative || s.length === 0) return null;
985
994
  const i = () => {
986
995
  switch (t.textStyle) {
@@ -1003,7 +1012,7 @@ const Te = (s) => {
1003
1012
  style: {
1004
1013
  bottom: `${t.verticalOffset}px`
1005
1014
  },
1006
- children: s.map((r, a) => /* @__PURE__ */ e(
1015
+ children: s.map((r, o) => /* @__PURE__ */ e(
1007
1016
  "div",
1008
1017
  {
1009
1018
  className: "mb-1 inline-block max-w-[80%]",
@@ -1027,22 +1036,22 @@ const Te = (s) => {
1027
1036
  }
1028
1037
  )
1029
1038
  },
1030
- a
1039
+ o
1031
1040
  ))
1032
1041
  }
1033
1042
  );
1034
- }, kt = ({ children: s, onClose: t, align: i = "right", maxHeight: r, className: a }) => {
1043
+ }, Ct = ({ children: s, onClose: t, align: i = "right", maxHeight: r, className: o }) => {
1035
1044
  const d = I(null), m = i === "center" ? "left-1/2 -translate-x-1/2 origin-bottom" : "right-0 origin-bottom-right", v = r ? { maxHeight: `${r}px` } : {};
1036
1045
  return /* @__PURE__ */ e(
1037
1046
  "div",
1038
1047
  {
1039
- className: `absolute bottom-full mb-4 ${m} 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-all duration-300 ease-out ${a}`,
1048
+ className: `absolute bottom-full mb-4 ${m} 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-all duration-300 ease-out ${o}`,
1040
1049
  style: { ...v, borderRadius: "var(--radius-lg)" },
1041
1050
  onClick: (w) => w.stopPropagation(),
1042
1051
  children: /* @__PURE__ */ e("div", { className: "overflow-y-auto hide-scrollbar flex-1", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("div", { ref: d, children: s }) })
1043
1052
  }
1044
1053
  );
1045
- }, ft = ({ content: s, className: t }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { className: t, dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { className: t, children: s }) : /* @__PURE__ */ e("span", { className: t, children: s }), T = ({ label: s, value: t, active: i, onClick: r, hasSubmenu: a, icon: d }) => /* @__PURE__ */ l(
1054
+ }, vt = ({ content: s, className: t }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { className: t, dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { className: t, children: s }) : /* @__PURE__ */ e("span", { className: t, children: s }), T = ({ label: s, value: t, active: i, onClick: r, hasSubmenu: o, icon: d }) => /* @__PURE__ */ l(
1046
1055
  "button",
1047
1056
  {
1048
1057
  onClick: r,
@@ -1050,13 +1059,13 @@ const Te = (s) => {
1050
1059
  style: { borderRadius: "var(--radius)" },
1051
1060
  children: [
1052
1061
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3 overflow-hidden", children: [
1053
- d && /* @__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(ft, { content: d }) }),
1054
- /* @__PURE__ */ e("span", { className: `font-medium truncate text-sm flex items-center ${i ? "text-[var(--accent)]" : ""}`, title: typeof s == "string" ? s : void 0, children: /* @__PURE__ */ e(ft, { content: s }) })
1062
+ d && /* @__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(vt, { content: d }) }),
1063
+ /* @__PURE__ */ e("span", { className: `font-medium truncate text-sm flex items-center ${i ? "text-[var(--accent)]" : ""}`, title: typeof s == "string" ? s : void 0, children: /* @__PURE__ */ e(vt, { content: s }) })
1055
1064
  ] }),
1056
1065
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-zinc-400 shrink-0", children: [
1057
1066
  t && /* @__PURE__ */ e("span", { className: "text-xs font-medium truncate max-w-[60px]", title: t, children: t }),
1058
1067
  i && /* @__PURE__ */ e(Le, { className: "w-4 h-4 text-[var(--accent)] shrink-0" }),
1059
- a && /* @__PURE__ */ e("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
1068
+ o && /* @__PURE__ */ e("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
1060
1069
  ] })
1061
1070
  ]
1062
1071
  }
@@ -1072,7 +1081,7 @@ const Te = (s) => {
1072
1081
  className: "flex items-center gap-2 hover:text-white transition-colors focus:outline-none",
1073
1082
  onClick: t,
1074
1083
  children: [
1075
- /* @__PURE__ */ e(pi, { className: "w-3 h-3" }),
1084
+ /* @__PURE__ */ e(vi, { className: "w-3 h-3" }),
1076
1085
  /* @__PURE__ */ e("span", { children: s })
1077
1086
  ]
1078
1087
  }
@@ -1080,7 +1089,7 @@ const Te = (s) => {
1080
1089
  i
1081
1090
  ]
1082
1091
  }
1083
- ), bt = () => /* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }), de = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(L, { children: s }), K = ({ label: s, checked: t, onChange: i, icon: r, tooltip: a }) => /* @__PURE__ */ l(
1092
+ ), gt = () => /* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }), de = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(L, { children: s }), K = ({ label: s, checked: t, onChange: i, icon: r, tooltip: o }) => /* @__PURE__ */ l(
1084
1093
  "div",
1085
1094
  {
1086
1095
  className: "flex items-center justify-between py-2.5 px-3 hover:bg-white/5 group transition-colors",
@@ -1090,7 +1099,7 @@ const Te = (s) => {
1090
1099
  r && /* @__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(de, { content: r }) }),
1091
1100
  /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
1092
1101
  /* @__PURE__ */ e("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors flex items-center", children: /* @__PURE__ */ e(de, { content: s }) }),
1093
- a && /* @__PURE__ */ e("span", { className: "text-[10px] text-zinc-500", children: a })
1102
+ o && /* @__PURE__ */ e("span", { className: "text-[10px] text-zinc-500", children: o })
1094
1103
  ] })
1095
1104
  ] }),
1096
1105
  /* @__PURE__ */ e(
@@ -1115,7 +1124,7 @@ const Te = (s) => {
1115
1124
  )
1116
1125
  ]
1117
1126
  }
1118
- ), ce = ({ label: s, value: t, min: i, max: r, step: a, onChange: d, formatValue: m, icon: v }) => /* @__PURE__ */ l(
1127
+ ), ce = ({ label: s, value: t, min: i, max: r, step: o, onChange: d, formatValue: m, icon: v }) => /* @__PURE__ */ l(
1119
1128
  "div",
1120
1129
  {
1121
1130
  className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
@@ -1142,7 +1151,7 @@ const Te = (s) => {
1142
1151
  type: "range",
1143
1152
  min: i,
1144
1153
  max: r,
1145
- step: a,
1154
+ step: o,
1146
1155
  value: t,
1147
1156
  onChange: (w) => d(parseFloat(w.target.value)),
1148
1157
  className: "w-full h-1.5 appearance-none cursor-pointer focus:outline-none focus:ring-2 strata-range-input",
@@ -1173,14 +1182,14 @@ const Te = (s) => {
1173
1182
  ] })
1174
1183
  ]
1175
1184
  }
1176
- ), Vi = ({ label: s, value: t, options: i, onChange: r, icon: a }) => /* @__PURE__ */ l(
1185
+ ), ji = ({ label: s, value: t, options: i, onChange: r, icon: o }) => /* @__PURE__ */ l(
1177
1186
  "div",
1178
1187
  {
1179
1188
  className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
1180
1189
  style: { borderRadius: "var(--radius)" },
1181
1190
  children: [
1182
1191
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3 mb-2", children: [
1183
- 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(de, { content: a }) }),
1192
+ 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(de, { content: o }) }),
1184
1193
  /* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
1185
1194
  ] }),
1186
1195
  /* @__PURE__ */ l("div", { className: "relative", children: [
@@ -1201,9 +1210,9 @@ const Te = (s) => {
1201
1210
  ), Y = ({ title: s, children: t }) => /* @__PURE__ */ l("div", { className: "py-2", children: [
1202
1211
  s && /* @__PURE__ */ e("h4", { className: "px-3 text-[10px] font-bold text-[var(--accent)] uppercase tracking-wider mb-1 mt-2", children: s }),
1203
1212
  /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t })
1204
- ] }), Fi = ({ tracks: s, current: t, onSelect: i, onUpload: r, onClose: a, settings: d, onSettingsChange: m, onReset: v, offset: w, onOffsetChange: b, maxHeight: h, animationClass: y }) => {
1205
- const [k, z] = C("main"), R = I(null);
1206
- return /* @__PURE__ */ l(kt, { onClose: a, align: "right", maxHeight: h, className: y, children: [
1213
+ ] }), Hi = ({ tracks: s, current: t, onSelect: i, onUpload: r, onClose: o, settings: d, onSettingsChange: m, onReset: v, offset: w, onOffsetChange: b, maxHeight: h, animationClass: y }) => {
1214
+ const [k, z] = N("main"), R = I(null);
1215
+ return /* @__PURE__ */ l(Ct, { onClose: o, align: "right", maxHeight: h, className: y, children: [
1207
1216
  k === "main" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
1208
1217
  /* @__PURE__ */ e(
1209
1218
  "div",
@@ -1218,22 +1227,22 @@ const Te = (s) => {
1218
1227
  T,
1219
1228
  {
1220
1229
  label: "Upload Subtitle",
1221
- icon: /* @__PURE__ */ e(mi, { className: "w-4 h-4" }),
1230
+ icon: /* @__PURE__ */ e(bi, { className: "w-4 h-4" }),
1222
1231
  onClick: () => {
1223
- var f;
1224
- return (f = R.current) == null ? void 0 : f.click();
1232
+ var p;
1233
+ return (p = R.current) == null ? void 0 : p.click();
1225
1234
  }
1226
1235
  }
1227
1236
  ),
1228
- /* @__PURE__ */ e("input", { type: "file", accept: ".vtt,.srt", ref: R, className: "hidden", onChange: (f) => {
1237
+ /* @__PURE__ */ e("input", { type: "file", accept: ".vtt,.srt", ref: R, className: "hidden", onChange: (p) => {
1229
1238
  var W;
1230
- (W = f.target.files) != null && W[0] && r(f.target.files[0]);
1239
+ (W = p.target.files) != null && W[0] && r(p.target.files[0]);
1231
1240
  } }),
1232
1241
  /* @__PURE__ */ e(
1233
1242
  T,
1234
1243
  {
1235
1244
  label: "Customize",
1236
- icon: /* @__PURE__ */ e(wi, { className: "w-4 h-4" }),
1245
+ icon: /* @__PURE__ */ e(Si, { className: "w-4 h-4" }),
1237
1246
  onClick: () => z("customize"),
1238
1247
  hasSubmenu: !0
1239
1248
  }
@@ -1245,21 +1254,21 @@ const Te = (s) => {
1245
1254
  label: "Off",
1246
1255
  active: t === -1,
1247
1256
  onClick: () => {
1248
- i(-1), a();
1257
+ i(-1), o();
1249
1258
  }
1250
1259
  }
1251
1260
  ),
1252
- s.map((f) => /* @__PURE__ */ e(
1261
+ s.map((p) => /* @__PURE__ */ e(
1253
1262
  T,
1254
1263
  {
1255
- label: f.label,
1256
- value: f.language,
1257
- active: t === f.index,
1264
+ label: p.label,
1265
+ value: p.language,
1266
+ active: t === p.index,
1258
1267
  onClick: () => {
1259
- i(f.index), a();
1268
+ i(p.index), o();
1260
1269
  }
1261
1270
  },
1262
- f.index
1271
+ p.index
1263
1272
  ))
1264
1273
  ] })
1265
1274
  ] }),
@@ -1269,7 +1278,7 @@ const Te = (s) => {
1269
1278
  {
1270
1279
  label: "Customize",
1271
1280
  onBack: () => z("main"),
1272
- rightAction: /* @__PURE__ */ e("button", { onClick: v, className: "p-1.5 text-zinc-400 hover:text-white transition-colors rounded-md hover:bg-white/10", title: "Reset All", children: /* @__PURE__ */ e(Ci, { className: "w-4 h-4" }) })
1281
+ rightAction: /* @__PURE__ */ e("button", { onClick: v, className: "p-1.5 text-zinc-400 hover:text-white transition-colors rounded-md hover:bg-white/10", title: "Reset All", children: /* @__PURE__ */ e(Mi, { className: "w-4 h-4" }) })
1273
1282
  }
1274
1283
  ),
1275
1284
  /* @__PURE__ */ l("div", { className: "pb-1", children: [
@@ -1278,14 +1287,14 @@ const Te = (s) => {
1278
1287
  {
1279
1288
  label: "Native Video Subtitle",
1280
1289
  checked: d.useNative,
1281
- onChange: (f) => m({ useNative: f })
1290
+ onChange: (p) => m({ useNative: p })
1282
1291
  }
1283
1292
  ) }),
1284
1293
  !d.useNative && /* @__PURE__ */ l(L, { children: [
1285
1294
  /* @__PURE__ */ l(Y, { title: "Sync & Position", children: [
1286
1295
  /* @__PURE__ */ l("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
1287
1296
  /* @__PURE__ */ e("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
1288
- /* @__PURE__ */ e(vi, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
1297
+ /* @__PURE__ */ e(wi, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
1289
1298
  /* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Sync Offset" })
1290
1299
  ] }) }),
1291
1300
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
@@ -1294,7 +1303,7 @@ const Te = (s) => {
1294
1303
  {
1295
1304
  onClick: () => b(Math.round((w - 0.1) * 10) / 10),
1296
1305
  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",
1297
- children: /* @__PURE__ */ e(gi, { className: "w-4 h-4" })
1306
+ children: /* @__PURE__ */ e(yi, { className: "w-4 h-4" })
1298
1307
  }
1299
1308
  ),
1300
1309
  /* @__PURE__ */ l("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: [
@@ -1307,7 +1316,7 @@ const Te = (s) => {
1307
1316
  {
1308
1317
  onClick: () => b(Math.round((w + 0.1) * 10) / 10),
1309
1318
  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",
1310
- children: /* @__PURE__ */ e(xi, { className: "w-4 h-4" })
1319
+ children: /* @__PURE__ */ e(ki, { className: "w-4 h-4" })
1311
1320
  }
1312
1321
  )
1313
1322
  ] })
@@ -1316,13 +1325,13 @@ const Te = (s) => {
1316
1325
  ce,
1317
1326
  {
1318
1327
  label: "Vertical Position",
1319
- icon: /* @__PURE__ */ e(Si, { className: "w-4 h-4" }),
1328
+ icon: /* @__PURE__ */ e(Ti, { className: "w-4 h-4" }),
1320
1329
  value: d.verticalOffset,
1321
1330
  min: 0,
1322
1331
  max: 200,
1323
1332
  step: 5,
1324
- onChange: (f) => m({ verticalOffset: f }),
1325
- formatValue: (f) => `${f}px`
1333
+ onChange: (p) => m({ verticalOffset: p }),
1334
+ formatValue: (p) => `${p}px`
1326
1335
  }
1327
1336
  )
1328
1337
  ] }),
@@ -1331,29 +1340,29 @@ const Te = (s) => {
1331
1340
  ce,
1332
1341
  {
1333
1342
  label: "Text Size",
1334
- icon: /* @__PURE__ */ e(yi, { className: "w-4 h-4" }),
1343
+ icon: /* @__PURE__ */ e(Ci, { className: "w-4 h-4" }),
1335
1344
  value: d.textSize,
1336
1345
  min: 50,
1337
1346
  max: 200,
1338
1347
  step: 10,
1339
- onChange: (f) => m({ textSize: f }),
1340
- formatValue: (f) => `${f}%`
1348
+ onChange: (p) => m({ textSize: p }),
1349
+ formatValue: (p) => `${p}%`
1341
1350
  }
1342
1351
  ),
1343
1352
  /* @__PURE__ */ l("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
1344
1353
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3 mb-2", children: [
1345
- /* @__PURE__ */ e(yt, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
1354
+ /* @__PURE__ */ e(St, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
1346
1355
  /* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Text Color" })
1347
1356
  ] }),
1348
1357
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2 p-1 bg-zinc-800/50 rounded-lg", children: [
1349
- ["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((f) => /* @__PURE__ */ e(
1358
+ ["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((p) => /* @__PURE__ */ e(
1350
1359
  "button",
1351
1360
  {
1352
- onClick: () => m({ textColor: f }),
1353
- className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${d.textColor === f ? "ring-2 scale-110" : ""}`,
1354
- style: { backgroundColor: f, "--tw-ring-color": "var(--accent)" }
1361
+ onClick: () => m({ textColor: p }),
1362
+ className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${d.textColor === p ? "ring-2 scale-110" : ""}`,
1363
+ style: { backgroundColor: p, "--tw-ring-color": "var(--accent)" }
1355
1364
  },
1356
- f
1365
+ p
1357
1366
  )),
1358
1367
  /* @__PURE__ */ e("div", { className: "w-px h-6 bg-white/10 mx-1" }),
1359
1368
  /* @__PURE__ */ e("div", { className: "relative w-6 h-6 rounded-full overflow-hidden ring-1 ring-white/20 cursor-pointer", children: /* @__PURE__ */ e(
@@ -1361,14 +1370,14 @@ const Te = (s) => {
1361
1370
  {
1362
1371
  type: "color",
1363
1372
  value: d.textColor,
1364
- onChange: (f) => m({ textColor: f.target.value }),
1373
+ onChange: (p) => m({ textColor: p.target.value }),
1365
1374
  className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0"
1366
1375
  }
1367
1376
  ) })
1368
1377
  ] })
1369
1378
  ] }),
1370
1379
  /* @__PURE__ */ e(
1371
- Vi,
1380
+ ji,
1372
1381
  {
1373
1382
  label: "Text Style",
1374
1383
  value: d.textStyle,
@@ -1379,12 +1388,12 @@ const Te = (s) => {
1379
1388
  { label: "Depressed", value: "depressed" },
1380
1389
  { label: "Drop Shadow", value: "shadow" }
1381
1390
  ],
1382
- onChange: (f) => m({ textStyle: f })
1391
+ onChange: (p) => m({ textStyle: p })
1383
1392
  }
1384
1393
  ),
1385
1394
  /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-2 mt-1 px-1", children: [
1386
- /* @__PURE__ */ e(K, { label: "Bold", icon: /* @__PURE__ */ e(Ni, { className: "w-4 h-4" }), checked: d.isBold, onChange: (f) => m({ isBold: f }) }),
1387
- /* @__PURE__ */ e(K, { label: "Fix Caps", icon: /* @__PURE__ */ e(Ti, { className: "w-4 h-4" }), checked: d.fixCapitalization, onChange: (f) => m({ fixCapitalization: f }) })
1395
+ /* @__PURE__ */ e(K, { label: "Bold", icon: /* @__PURE__ */ e(zi, { className: "w-4 h-4" }), checked: d.isBold, onChange: (p) => m({ isBold: p }) }),
1396
+ /* @__PURE__ */ e(K, { label: "Fix Caps", icon: /* @__PURE__ */ e(Ii, { className: "w-4 h-4" }), checked: d.fixCapitalization, onChange: (p) => m({ fixCapitalization: p }) })
1388
1397
  ] })
1389
1398
  ] }),
1390
1399
  /* @__PURE__ */ l(Y, { title: "Background", children: [
@@ -1392,16 +1401,16 @@ const Te = (s) => {
1392
1401
  ce,
1393
1402
  {
1394
1403
  label: "Opacity",
1395
- icon: /* @__PURE__ */ e(ki, { className: "w-4 h-4" }),
1404
+ icon: /* @__PURE__ */ e(Ni, { className: "w-4 h-4" }),
1396
1405
  value: d.backgroundOpacity,
1397
1406
  min: 0,
1398
1407
  max: 100,
1399
1408
  step: 5,
1400
- onChange: (f) => m({ backgroundOpacity: f }),
1401
- formatValue: (f) => `${f}%`
1409
+ onChange: (p) => m({ backgroundOpacity: p }),
1410
+ formatValue: (p) => `${p}%`
1402
1411
  }
1403
1412
  ),
1404
- /* @__PURE__ */ e(K, { label: "Blur Background", icon: /* @__PURE__ */ e(Mi, { className: "w-4 h-4" }), checked: d.backgroundBlur, onChange: (f) => m({ backgroundBlur: f }) }),
1413
+ /* @__PURE__ */ e(K, { label: "Blur Background", icon: /* @__PURE__ */ e(Ri, { className: "w-4 h-4" }), checked: d.backgroundBlur, onChange: (p) => m({ backgroundBlur: p }) }),
1405
1414
  d.backgroundBlur && /* @__PURE__ */ e(
1406
1415
  ce,
1407
1416
  {
@@ -1410,8 +1419,8 @@ const Te = (s) => {
1410
1419
  min: 0,
1411
1420
  max: 20,
1412
1421
  step: 1,
1413
- onChange: (f) => m({ backgroundBlurAmount: f }),
1414
- formatValue: (f) => `${f}px`
1422
+ onChange: (p) => m({ backgroundBlurAmount: p }),
1423
+ formatValue: (p) => `${p}px`
1415
1424
  }
1416
1425
  )
1417
1426
  ] })
@@ -1419,17 +1428,17 @@ const Te = (s) => {
1419
1428
  ] })
1420
1429
  ] })
1421
1430
  ] });
1422
- }, Me = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(L, { children: s }), Oi = ({ x: s, y: t, items: i, onClose: r, containerWidth: a, containerHeight: d }) => {
1423
- const m = I(null), [v, w] = C({
1431
+ }, Me = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(L, { children: s }), Wi = ({ x: s, y: t, items: i, onClose: r, containerWidth: o, containerHeight: d }) => {
1432
+ const m = I(null), [v, w] = N({
1424
1433
  top: t,
1425
1434
  left: s,
1426
1435
  opacity: 0
1427
1436
  });
1428
- return Xt(() => {
1437
+ return Kt(() => {
1429
1438
  if (!m.current) return;
1430
1439
  const b = m.current.getBoundingClientRect(), h = b.width, y = b.height;
1431
1440
  let k = s, z = t;
1432
- s + h > a - 10 && (k = s - h), k < 10 && (k = 10), k + h > a && (k = Math.max(10, a - h - 10)), t + y > d - 10 && (z = t - y);
1441
+ s + h > o - 10 && (k = s - h), k < 10 && (k = 10), k + h > o && (k = Math.max(10, o - h - 10)), t + y > d - 10 && (z = t - y);
1433
1442
  let R = d - 20;
1434
1443
  z < 10 && (z = 10), z + y > d - 10 && (z = Math.max(10, d - y - 10)), w({
1435
1444
  top: z,
@@ -1437,7 +1446,7 @@ const Te = (s) => {
1437
1446
  maxHeight: R,
1438
1447
  opacity: 1
1439
1448
  });
1440
- }, [s, t, i, a, d]), P(() => {
1449
+ }, [s, t, i, o, d]), P(() => {
1441
1450
  const b = (h) => {
1442
1451
  m.current && !m.current.contains(h.target) && r();
1443
1452
  };
@@ -1478,10 +1487,10 @@ const Te = (s) => {
1478
1487
  ] }, h))
1479
1488
  }
1480
1489
  );
1481
- }, ji = ({ player: s, onClose: t }) => {
1482
- const [i, r] = C({});
1490
+ }, Di = ({ player: s, onClose: t }) => {
1491
+ const [i, r] = N({});
1483
1492
  return P(() => {
1484
- const a = () => {
1493
+ const o = () => {
1485
1494
  var w;
1486
1495
  if (!s.video) return;
1487
1496
  const m = s.video, v = m.getVideoPlaybackQuality ? m.getVideoPlaybackQuality() : null;
@@ -1497,8 +1506,8 @@ const Te = (s) => {
1497
1506
  URL: m.currentSrc
1498
1507
  });
1499
1508
  };
1500
- a();
1501
- const d = setInterval(a, 1e3);
1509
+ o();
1510
+ const d = setInterval(o, 1e3);
1502
1511
  return () => clearInterval(d);
1503
1512
  }, [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__ */ l(
1504
1513
  "div",
@@ -1510,59 +1519,59 @@ const Te = (s) => {
1510
1519
  /* @__PURE__ */ e(
1511
1520
  "button",
1512
1521
  {
1513
- onClick: (a) => {
1514
- a.stopPropagation(), t();
1522
+ onClick: (o) => {
1523
+ o.stopPropagation(), t();
1515
1524
  },
1516
1525
  className: "absolute top-3 right-3 p-1.5 text-zinc-400 hover:text-white hover:bg-white/10 rounded-full transition-colors",
1517
- children: /* @__PURE__ */ e(Ei, { className: "w-4 h-4" })
1526
+ children: /* @__PURE__ */ e(Ai, { className: "w-4 h-4" })
1518
1527
  }
1519
1528
  ),
1520
1529
  /* @__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" })
1521
1530
  ] }),
1522
- /* @__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, d]) => /* @__PURE__ */ l("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-1", children: [
1523
- /* @__PURE__ */ e("span", { className: "text-zinc-500 font-bold shrink-0", children: a }),
1531
+ /* @__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(([o, d]) => /* @__PURE__ */ l("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-1", children: [
1532
+ /* @__PURE__ */ e("span", { className: "text-zinc-500 font-bold shrink-0", children: o }),
1524
1533
  /* @__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(d), children: String(d) })
1525
- ] }, a)) })
1534
+ ] }, o)) })
1526
1535
  ]
1527
1536
  }
1528
1537
  ) });
1529
- }, Hi = [
1538
+ }, Ui = [
1530
1539
  { label: "Strata", value: "#6366f1" },
1531
1540
  { label: "Emerald", value: "#10b981" },
1532
1541
  { label: "Rose", value: "#f43f5e" },
1533
1542
  { label: "Amber", value: "#f59e0b" },
1534
1543
  { label: "Sky", value: "#0ea5e9" },
1535
1544
  { label: "Violet", value: "#8b5cf6" }
1536
- ], Wi = [
1545
+ ], Gi = [
1537
1546
  { label: "Default", value: "default", color: "#6366f1" },
1538
1547
  { label: "Pixel", value: "pixel", color: "#ef4444" },
1539
1548
  { label: "Game", value: "game", color: "#eab308" },
1540
1549
  { label: "Hacker", value: "hacker", color: "#22c55e" }
1541
- ], vt = ({ 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 }), gt = (s) => {
1542
- var ot, lt;
1543
- const { src: t, type: i, sources: r, poster: a, autoPlay: d, thumbnails: m, textTracks: v, plugins: w, onGetInstance: b, ...h } = s, y = h.screenshot ?? !1, k = h.pip ?? !0, z = h.setting ?? !0, R = h.fullscreen ?? !0, f = h.fullscreenWeb ?? !1, W = h.lock ?? !1, D = h.fastForward ?? !0, St = h.flip ?? !0, Ct = h.aspectRatio ?? !0, $e = h.hotKey ?? !0, Nt = h.backdrop ?? !0, ue = h.gestureSeek ?? !1, Tt = h.centerControls ?? !0, Ee = h.fetchTimeout ?? 3e4;
1550
+ ], xt = ({ 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 }), wt = (s) => {
1551
+ var ct, dt;
1552
+ const { src: t, type: i, sources: r, poster: o, autoPlay: d, thumbnails: m, textTracks: v, plugins: w, onGetInstance: b, ...h } = s, y = h.screenshot ?? !1, k = h.pip ?? !0, z = h.setting ?? !0, R = h.fullscreen ?? !0, p = h.fullscreenWeb ?? !1, W = h.lock ?? !1, D = h.fastForward ?? !0, Nt = h.flip ?? !0, Tt = h.aspectRatio ?? !0, $e = h.hotKey ?? !0, Mt = h.backdrop ?? !0, ue = h.gestureSeek ?? !1, zt = h.centerControls ?? !0, Ee = h.fetchTimeout ?? 3e4;
1544
1553
  h.autoOrientation;
1545
- const q = I(null), [n, Pe] = C(null), [he, me] = C(!1), [Ae, Mt] = C(0), [zt, It] = C(0), Be = Ce(() => wt(h), []), o = Jt(
1554
+ const q = I(null), [n, Pe] = N(null), [he, me] = N(!1), [Fe, It] = N(0), [Rt, Lt] = N(0), Ae = Ce(() => kt(h), []), a = Yt(
1546
1555
  Ne((c) => n ? n.store.subscribe(c) : () => {
1547
1556
  }, [n]),
1548
- () => n ? n.store.get() : Be,
1549
- () => Be
1550
- ), [$, F] = C(!1), [E, U] = C(!1), [A, M] = C("main"), [Z, pe] = C({ x: 0, y: 0, visible: !1 }), [Rt, Ve] = C(!1), Fe = dt($, 200), Oe = dt(E, 200), [fe, ne] = C(!1), [re, be] = C(0), [Lt, je] = C(!1), [$t, He] = C(!1), [ve, ae] = C(!1), [We, De] = C([]), [Ue, Ge] = C(null), [Et, Pt] = C(0), [G, _e] = C(null), [Q, oe] = C(null), [Di, qe] = C(null), [ge, Qe] = C(!1), xe = I(null), Xe = I(1), te = I(null), Je = I(0), ee = I(!1), ie = I(null), _ = I(null), we = I(null), ye = I(null), se = I(null);
1557
+ () => n ? n.store.get() : Ae,
1558
+ () => Ae
1559
+ ), [$, V] = N(!1), [E, U] = N(!1), [F, M] = N("main"), [Z, fe] = N({ x: 0, y: 0, visible: !1 }), [$t, Be] = N(!1), Ve = ht($, 200), Oe = ht(E, 200), [pe, ne] = N(!1), [re, be] = N(0), [Et, je] = N(!1), [Pt, He] = N(!1), [ve, oe] = N(!1), [We, De] = N([]), [Ue, Ge] = N(null), [Ft, At] = N(0), [G, _e] = N(null), [Q, ae] = N(null), [_i, qe] = N(null), [ge, Qe] = N(!1), xe = I(null), Xe = I(1), te = I(null), Je = I(0), ee = I(!1), ie = I(null), _ = I(null), we = I(null), ye = I(null), se = I(null);
1551
1560
  P(() => {
1552
1561
  if (!q.current) return;
1553
- const c = new ti({ ...h, poster: a });
1562
+ const c = new ni({ ...h, poster: o });
1554
1563
  w && w.length > 0 && w.forEach((g) => c.use(g)), c.attach(q.current), Pe(c), b && b(c);
1555
- const p = new ResizeObserver((g) => {
1556
- for (const N of g)
1557
- Mt(N.contentRect.height), It(N.contentRect.width);
1564
+ const f = new ResizeObserver((g) => {
1565
+ for (const S of g)
1566
+ It(S.contentRect.height), Lt(S.contentRect.width);
1558
1567
  });
1559
- return p.observe(q.current), () => {
1560
- p.disconnect(), c.destroy(), Pe(null);
1568
+ return f.observe(q.current), () => {
1569
+ f.disconnect(), c.destroy(), Pe(null);
1561
1570
  };
1562
1571
  }, []), P(() => {
1563
1572
  if (!n) return;
1564
1573
  const c = {};
1565
- h.theme !== void 0 && h.theme !== o.theme && (c.theme = h.theme), h.themeColor !== void 0 && h.themeColor !== o.themeColor && (c.themeColor = h.themeColor), h.iconSize !== void 0 && h.iconSize !== o.iconSize && (c.iconSize = h.iconSize), Object.keys(c).length > 0 && n.setAppearance(c), h.volume !== void 0 && Math.abs(h.volume - o.volume) > 0.01 && n.setVolume(h.volume), h.muted !== void 0 && h.muted !== o.isMuted && (h.muted ? n.video.muted = !0 : n.video.muted = !1);
1574
+ h.theme !== void 0 && h.theme !== a.theme && (c.theme = h.theme), h.themeColor !== void 0 && h.themeColor !== a.themeColor && (c.themeColor = h.themeColor), h.iconSize !== void 0 && h.iconSize !== a.iconSize && (c.iconSize = h.iconSize), Object.keys(c).length > 0 && n.setAppearance(c), h.volume !== void 0 && Math.abs(h.volume - a.volume) > 0.01 && n.setVolume(h.volume), h.muted !== void 0 && h.muted !== a.isMuted && (h.muted ? n.video.muted = !0 : n.video.muted = !1);
1566
1575
  }, [n, h.theme, h.themeColor, h.iconSize, h.volume, h.muted]), P(() => {
1567
1576
  if (!n) return;
1568
1577
  const c = v || [];
@@ -1571,134 +1580,137 @@ const Te = (s) => {
1571
1580
  n && d && (n.video.muted = !0, n.store.setState({ isMuted: !0 }), n.play().catch(() => {
1572
1581
  }));
1573
1582
  }, [n, d]), P(() => {
1574
- o.isPlaying && !he && me(!0);
1575
- }, [o.isPlaying, he]), P(() => {
1576
- m && n ? si(m, n.notify.bind(n), Ee).then((c) => De(c)) : De([]);
1583
+ a.isPlaying && !he && me(!0);
1584
+ }, [a.isPlaying, he]), P(() => {
1585
+ m && n ? oi(m, n.notify.bind(n), Ee).then((c) => De(c)) : De([]);
1577
1586
  }, [m, n, Ee]), P(() => (Q && (se.current && clearTimeout(se.current), se.current = setTimeout(() => {
1578
- oe(null);
1587
+ ae(null);
1579
1588
  }, 600)), () => {
1580
1589
  se.current && clearTimeout(se.current);
1581
1590
  }), [Q]), P(() => {
1582
- const c = (p) => {
1583
- var g;
1584
- if (!(!n || !$e) && ((g = document.activeElement) == null ? void 0 : g.tagName) !== "INPUT")
1585
- switch (p.key.toLowerCase()) {
1586
- case " ":
1587
- case "k":
1588
- p.preventDefault(), n.togglePlay();
1589
- break;
1590
- case "arrowright":
1591
- p.preventDefault(), n.skip(5);
1592
- break;
1593
- case "arrowleft":
1594
- p.preventDefault(), n.skip(-5);
1595
- break;
1596
- case "arrowup":
1597
- p.preventDefault(), n.setVolume(n.video.volume + 0.1);
1598
- break;
1599
- case "arrowdown":
1600
- p.preventDefault(), n.setVolume(n.video.volume - 0.1);
1601
- break;
1602
- case "f":
1603
- p.preventDefault(), n.toggleFullscreen();
1604
- break;
1605
- case "m":
1606
- p.preventDefault(), n.toggleMute();
1607
- break;
1608
- }
1591
+ const c = (f) => {
1592
+ var S;
1593
+ if (!n || !$e || ((S = document.activeElement) == null ? void 0 : S.tagName) === "INPUT") return;
1594
+ switch (f.key.toLowerCase()) {
1595
+ case " ":
1596
+ case "k":
1597
+ f.preventDefault(), n.togglePlay();
1598
+ break;
1599
+ case "arrowright":
1600
+ f.preventDefault(), n.skip(5);
1601
+ break;
1602
+ case "arrowleft":
1603
+ f.preventDefault(), n.skip(-5);
1604
+ break;
1605
+ case "arrowup":
1606
+ f.preventDefault(), n.setVolume(n.video.volume + 0.1);
1607
+ break;
1608
+ case "arrowdown":
1609
+ f.preventDefault(), n.setVolume(n.video.volume - 0.1);
1610
+ break;
1611
+ case "f":
1612
+ f.preventDefault(), n.toggleFullscreen();
1613
+ break;
1614
+ case "m":
1615
+ f.preventDefault(), n.toggleMute();
1616
+ break;
1617
+ case "escape":
1618
+ n.store.get().isWebFullscreen && (f.preventDefault(), n.toggleWebFullscreen());
1619
+ break;
1620
+ }
1609
1621
  };
1610
1622
  return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
1611
1623
  }, [n, $e]);
1612
1624
  const Ke = () => {
1613
1625
  n && (n.setControlsVisible(!0), _.current && clearTimeout(_.current), !($ || E) && (_.current = setTimeout(() => {
1614
- !o.isPlaying || $ || E || n.setControlsVisible(!1);
1626
+ !a.isPlaying || $ || E || n.setControlsVisible(!1);
1615
1627
  }, 2500)));
1616
1628
  };
1617
1629
  P(() => {
1618
- n && (!$ && !E && o.isPlaying ? Ke() : ($ || E) && (n.setControlsVisible(!0), _.current && clearTimeout(_.current)));
1619
- }, [$, E, o.isPlaying, n]);
1630
+ n && (!$ && !E && a.isPlaying ? Ke() : ($ || E) && (n.setControlsVisible(!0), _.current && clearTimeout(_.current)));
1631
+ }, [$, E, a.isPlaying, n]);
1620
1632
  const Ye = Ne(() => {
1621
- !D || !n || !o.isPlaying || o.isLocked || (Xe.current = n.video.playbackRate, xe.current = setTimeout(() => {
1633
+ !D || !n || !a.isPlaying || a.isLocked || (Xe.current = n.video.playbackRate, xe.current = setTimeout(() => {
1622
1634
  n.video.playbackRate = 2, Qe(!0);
1623
1635
  }, 500));
1624
- }, [D, n, o.isPlaying, o.isLocked]), ke = Ne(() => {
1636
+ }, [D, n, a.isPlaying, a.isLocked]), ke = Ne(() => {
1625
1637
  xe.current && clearTimeout(xe.current), ge && n && (n.video.playbackRate = Xe.current, Qe(!1));
1626
- }, [ge, n]), At = (c) => {
1627
- Ye(), ue && !o.isLocked && (te.current = c.touches[0].clientX, Je.current = o.currentTime, ee.current = !1);
1628
- }, Bt = (c) => {
1629
- if (!o.isLocked && ue && te.current !== null) {
1630
- const p = c.touches[0].clientX - te.current;
1631
- if (Math.abs(p) > 10 && (ke(), ee.current = !0, ne(!0), q.current && o.duration)) {
1632
- const g = q.current.getBoundingClientRect(), N = p / g.width, j = Math.max(0, Math.min(o.duration, Je.current + N * o.duration));
1638
+ }, [ge, n]), Bt = (c) => {
1639
+ Ye(), ue && !a.isLocked && (te.current = c.touches[0].clientX, Je.current = a.currentTime, ee.current = !1);
1640
+ }, Vt = (c) => {
1641
+ if (!a.isLocked && ue && te.current !== null) {
1642
+ const f = c.touches[0].clientX - te.current;
1643
+ if (Math.abs(f) > 10 && (ke(), ee.current = !0, ne(!0), q.current && a.duration)) {
1644
+ const g = q.current.getBoundingClientRect(), S = f / g.width, j = Math.max(0, Math.min(a.duration, Je.current + S * a.duration));
1633
1645
  be(j);
1634
1646
  }
1635
1647
  }
1636
- }, Vt = (c) => {
1648
+ }, Ot = (c) => {
1637
1649
  if (ke(), ue && ee.current) {
1638
1650
  n == null || n.seek(re), ne(!1), ee.current = !1, te.current = null;
1639
1651
  return;
1640
1652
  }
1641
1653
  te.current = null;
1642
1654
  }, Se = (c) => {
1643
- if (!we.current || !o.duration) return 0;
1644
- const p = we.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
1645
- return Math.max(0, Math.min(1, (g - p.left) / p.width)) * o.duration;
1655
+ if (!we.current || !a.duration) return 0;
1656
+ const f = we.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
1657
+ return Math.max(0, Math.min(1, (g - f.left) / f.width)) * a.duration;
1646
1658
  }, Ze = (c) => {
1647
- if (o.isLocked) return;
1659
+ if (a.isLocked) return;
1648
1660
  ne(!0), be(Se(c));
1649
- const p = (N) => be(Se(N)), g = (N) => {
1650
- n == null || n.seek(Se(N)), ne(!1), document.removeEventListener("mousemove", p), document.removeEventListener("touchmove", p), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
1661
+ const f = (S) => be(Se(S)), g = (S) => {
1662
+ n == null || n.seek(Se(S)), ne(!1), document.removeEventListener("mousemove", f), document.removeEventListener("touchmove", f), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
1651
1663
  };
1652
- document.addEventListener("mousemove", p), document.addEventListener("touchmove", p), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
1664
+ document.addEventListener("mousemove", f), document.addEventListener("touchmove", f), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
1653
1665
  }, et = (c) => {
1654
1666
  if (!ye.current) return 0;
1655
- const p = ye.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
1656
- return Math.max(0, Math.min(1, (g - p.left) / p.width));
1667
+ const f = ye.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
1668
+ return Math.max(0, Math.min(1, (g - f.left) / f.width));
1657
1669
  }, tt = (c) => {
1658
- if (!n || o.isLocked) return;
1670
+ if (!n || a.isLocked) return;
1659
1671
  je(!0), n.setVolume(et(c));
1660
- const p = (N) => n.setVolume(et(N)), g = () => {
1661
- je(!1), document.removeEventListener("mousemove", p), document.removeEventListener("touchmove", p), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
1672
+ const f = (S) => n.setVolume(et(S)), g = () => {
1673
+ je(!1), document.removeEventListener("mousemove", f), document.removeEventListener("touchmove", f), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
1662
1674
  };
1663
- document.addEventListener("mousemove", p), document.addEventListener("touchmove", p), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
1664
- }, Ft = (c) => {
1665
- if (!o.duration || o.isLive) return;
1666
- const p = c.currentTarget.getBoundingClientRect(), g = (c.clientX - p.left) / p.width, N = g * o.duration;
1667
- Pt(g * 100), Ge(N), We.length > 0 && _e(We.find((j) => N >= j.start && N < j.end) || null);
1675
+ document.addEventListener("mousemove", f), document.addEventListener("touchmove", f), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
1676
+ }, jt = (c) => {
1677
+ if (!a.duration || a.isLive) return;
1678
+ const f = c.currentTarget.getBoundingClientRect(), g = (c.clientX - f.left) / f.width, S = g * a.duration;
1679
+ At(g * 100), Ge(S), We.length > 0 && _e(We.find((j) => S >= j.start && S < j.end) || null);
1668
1680
  }, le = (c) => {
1669
- !n || o.isLocked || (n.skip(c === "forward" ? 10 : -10), qe(c), setTimeout(() => qe(null), 300));
1670
- }, Ot = (c) => {
1681
+ !n || a.isLocked || (n.skip(c === "forward" ? 10 : -10), qe(c), setTimeout(() => qe(null), 300));
1682
+ }, Ht = (c) => {
1671
1683
  if (!n) return;
1672
1684
  if (ee.current) {
1673
1685
  ee.current = !1;
1674
1686
  return;
1675
1687
  }
1676
- if ($ && F(!1), E && U(!1), ve && ae(!1), Z.visible && pe({ ...Z, visible: !1 }), n.setControlsVisible(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
1677
- !o.isPlaying || $ || E || n.setControlsVisible(!1);
1678
- }, 2500), o.isLocked) return;
1679
- const p = c.currentTarget.getBoundingClientRect(), g = c.clientX - p.left, N = p.width, j = Date.now();
1680
- ie.current ? (clearTimeout(ie.current), ie.current = null, g < N * 0.35 ? (le("rewind"), oe({ type: "rewind", id: j })) : g > N * 0.65 ? (le("forward"), oe({ type: "forward", id: j })) : n.toggleFullscreen()) : ie.current = setTimeout(() => {
1688
+ if ($ && V(!1), E && U(!1), ve && oe(!1), Z.visible && fe({ ...Z, visible: !1 }), n.setControlsVisible(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
1689
+ !a.isPlaying || $ || E || n.setControlsVisible(!1);
1690
+ }, 2500), a.isLocked) return;
1691
+ const f = c.currentTarget.getBoundingClientRect(), g = c.clientX - f.left, S = f.width, j = Date.now();
1692
+ ie.current ? (clearTimeout(ie.current), ie.current = null, g < S * 0.35 ? (le("rewind"), ae({ type: "rewind", id: j })) : g > S * 0.65 ? (le("forward"), ae({ type: "forward", id: j })) : n.toggleFullscreen()) : ie.current = setTimeout(() => {
1681
1693
  n.togglePlay(), ie.current = null;
1682
1694
  }, 250);
1683
- }, jt = (c) => {
1695
+ }, Wt = (c) => {
1684
1696
  var g;
1685
- if (c.preventDefault(), o.isLocked) return;
1686
- const p = (g = q.current) == null ? void 0 : g.getBoundingClientRect();
1687
- p && pe({
1697
+ if (c.preventDefault(), a.isLocked) return;
1698
+ const f = (g = q.current) == null ? void 0 : g.getBoundingClientRect();
1699
+ f && fe({
1688
1700
  visible: !0,
1689
- x: c.clientX - p.left,
1690
- y: c.clientY - p.top
1701
+ x: c.clientX - f.left,
1702
+ y: c.clientY - f.top
1691
1703
  });
1692
- }, Ht = (c) => {
1704
+ }, Dt = (c) => {
1693
1705
  c.stopPropagation();
1694
- const p = "ontouchstart" in window || navigator.maxTouchPoints > 0, g = window.matchMedia("(hover: none)").matches || p;
1706
+ const f = "ontouchstart" in window || navigator.maxTouchPoints > 0, g = window.matchMedia("(hover: none)").matches || f;
1695
1707
  if (ve) {
1696
- ae(!1);
1708
+ oe(!1);
1697
1709
  return;
1698
1710
  }
1699
- g ? ae(!0) : n == null || n.toggleMute();
1700
- }, Wt = o.isMuted || o.volume === 0 ? ai : o.volume < 0.5 ? ri : ni, it = Math.max(100, Ae - 120), Dt = () => {
1701
- switch (o.iconSize) {
1711
+ g ? oe(!0) : n == null || n.toggleMute();
1712
+ }, Ut = a.isMuted || a.volume === 0 ? ci : a.volume < 0.5 ? li : ai, it = Math.max(100, Fe - 120), Gt = () => {
1713
+ switch (a.iconSize) {
1702
1714
  case "small":
1703
1715
  return "w-4 h-4";
1704
1716
  case "large":
@@ -1706,8 +1718,8 @@ const Te = (s) => {
1706
1718
  default:
1707
1719
  return "w-5 h-5";
1708
1720
  }
1709
- }, Ut = () => {
1710
- switch (o.iconSize) {
1721
+ }, _t = () => {
1722
+ switch (a.iconSize) {
1711
1723
  case "small":
1712
1724
  return "p-2 min-w-[32px] min-h-[32px]";
1713
1725
  case "large":
@@ -1715,8 +1727,8 @@ const Te = (s) => {
1715
1727
  default:
1716
1728
  return "p-2.5 min-w-[36px] min-h-[36px]";
1717
1729
  }
1718
- }, B = Dt(), O = Ut(), X = (() => {
1719
- switch (o.iconSize) {
1730
+ }, A = Gt(), O = _t(), X = (() => {
1731
+ switch (a.iconSize) {
1720
1732
  case "small":
1721
1733
  return {
1722
1734
  playBtn: "w-14 h-14",
@@ -1739,7 +1751,7 @@ const Te = (s) => {
1739
1751
  skipIcon: "w-6 h-6"
1740
1752
  };
1741
1753
  }
1742
- })(), Gt = !o.isLocked && (o.controlsVisible || !o.isPlaying || $ || E), st = $t || Lt || ve, nt = Nt ? "backdrop-blur-xl bg-black/80" : "bg-black/95", rt = Ce(() => {
1754
+ })(), qt = !a.isLocked && (a.controlsVisible || !a.isPlaying || $ || E), st = Pt || Et || ve, nt = Mt ? "backdrop-blur-xl bg-black/80" : "bg-black/95", rt = Ce(() => {
1743
1755
  const c = [
1744
1756
  { id: "play", position: "left", index: 10, isBuiltIn: !0 },
1745
1757
  { id: "volume", position: "left", index: 20, isBuiltIn: !0 },
@@ -1752,12 +1764,12 @@ const Te = (s) => {
1752
1764
  { id: "fullscreenWeb", position: "right", index: 110, isBuiltIn: !0 },
1753
1765
  { id: "fullscreen", position: "right", index: 120, isBuiltIn: !0 }
1754
1766
  ];
1755
- return h.controls && h.controls.forEach((p) => {
1756
- const g = c.find((N) => N.id === p.id);
1757
- g ? Object.assign(g, p) : c.push(p);
1758
- }), c.filter((p) => !(p.id === "screenshot" && !y || p.id === "pip" && !k || p.id === "settings" && !z || p.id === "fullscreen" && !R || p.id === "fullscreenWeb" && !f)).sort((p, g) => p.index - g.index);
1759
- }, [h.controls, y, k, z, R, f]), at = (c) => {
1760
- var p, g, N, j, ct;
1767
+ return h.controls && h.controls.forEach((f) => {
1768
+ const g = c.find((S) => S.id === f.id);
1769
+ g ? Object.assign(g, f) : c.push(f);
1770
+ }), c.filter((f) => !(f.id === "screenshot" && !y || f.id === "pip" && !k || f.id === "settings" && !z || f.id === "fullscreen" && !R || f.id === "fullscreenWeb" && !p)).sort((f, g) => f.index - g.index);
1771
+ }, [h.controls, y, k, z, R, p]), ot = (c) => {
1772
+ var f, g, S, j, ut;
1761
1773
  if (!c.isBuiltIn)
1762
1774
  return /* @__PURE__ */ e(
1763
1775
  "button",
@@ -1768,13 +1780,13 @@ const Te = (s) => {
1768
1780
  className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none flex items-center justify-center ${O} ${c.className || ""}`,
1769
1781
  style: { borderRadius: "var(--radius)", ...c.style },
1770
1782
  title: c.tooltip,
1771
- children: /* @__PURE__ */ e(vt, { content: c.html || "" })
1783
+ children: /* @__PURE__ */ e(xt, { content: c.html || "" })
1772
1784
  },
1773
1785
  c.index
1774
1786
  );
1775
1787
  switch (c.id) {
1776
1788
  case "play":
1777
- return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.togglePlay(), className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: o.isPlaying ? /* @__PURE__ */ e(ht, { className: `${B} fill-current` }) : /* @__PURE__ */ e(ut, { className: `${B} fill-current` }) }, "play");
1789
+ return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.togglePlay(), className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: a.isPlaying ? /* @__PURE__ */ e(ft, { className: `${A} fill-current` }) : /* @__PURE__ */ e(mt, { className: `${A} fill-current` }) }, "play");
1778
1790
  case "volume":
1779
1791
  return /* @__PURE__ */ l(
1780
1792
  "div",
@@ -1787,12 +1799,12 @@ const Te = (s) => {
1787
1799
  window.matchMedia("(hover: hover)").matches && He(!1);
1788
1800
  },
1789
1801
  children: [
1790
- /* @__PURE__ */ e("button", { onClick: Ht, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(Wt, { className: B }) }),
1802
+ /* @__PURE__ */ e("button", { onClick: Dt, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(Ut, { className: A }) }),
1791
1803
  /* @__PURE__ */ e("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${st ? "w-28 opacity-100 ml-1" : "w-0 opacity-0"}`, children: /* @__PURE__ */ l("div", { ref: ye, className: "relative w-full h-full flex items-center cursor-pointer px-2", onMouseDown: tt, onTouchStart: tt, children: [
1792
- /* @__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: `${(o.isMuted ? 0 : o.volume) * 100}%`, borderRadius: "var(--radius-full)" } }) }),
1793
- /* @__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(${(o.isMuted ? 0 : o.volume) * 100}% * 0.85 + 4px)`, borderRadius: "var(--radius-full)" } })
1804
+ /* @__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: `${(a.isMuted ? 0 : a.volume) * 100}%`, borderRadius: "var(--radius-full)" } }) }),
1805
+ /* @__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(${(a.isMuted ? 0 : a.volume) * 100}% * 0.85 + 4px)`, borderRadius: "var(--radius-full)" } })
1794
1806
  ] }) }),
1795
- st && /* @__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 + ${(o.isMuted ? 0 : o.volume) * 80}px)` }, children: o.isMuted ? "0%" : `${Math.round(o.volume * 100)}%` })
1807
+ st && /* @__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 + ${(a.isMuted ? 0 : a.volume) * 80}px)` }, children: a.isMuted ? "0%" : `${Math.round(a.volume * 100)}%` })
1796
1808
  ]
1797
1809
  },
1798
1810
  "volume"
@@ -1802,29 +1814,29 @@ const Te = (s) => {
1802
1814
  /* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-red-500 animate-pulse" }),
1803
1815
  /* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-red-500 tracking-wider", children: "LIVE" })
1804
1816
  ] }, "live") : /* @__PURE__ */ l("div", { className: "text-xs font-medium text-zinc-400 font-mono select-none hidden sm:block tabular-nums", children: [
1805
- Te(fe ? re : o.currentTime),
1817
+ Te(pe ? re : a.currentTime),
1806
1818
  " ",
1807
1819
  /* @__PURE__ */ e("span", { className: "text-zinc-600", children: "/" }),
1808
1820
  " ",
1809
- Te(o.duration)
1821
+ Te(a.duration)
1810
1822
  ] }, "time");
1811
1823
  case "subtitle":
1812
1824
  return /* @__PURE__ */ l("div", { className: "relative", children: [
1813
1825
  /* @__PURE__ */ e("button", { onClick: (u) => {
1814
- u.stopPropagation(), U(!E), F(!1);
1815
- }, className: `strata-control-btn transition-colors focus:outline-none ${O} ${E ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(ui, { className: B }) }),
1826
+ u.stopPropagation(), U(!E), V(!1);
1827
+ }, className: `strata-control-btn transition-colors focus:outline-none ${O} ${E ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(fi, { className: A }) }),
1816
1828
  Oe.isMounted && /* @__PURE__ */ e(
1817
- Fi,
1829
+ Hi,
1818
1830
  {
1819
- tracks: o.subtitleTracks,
1820
- current: o.currentSubtitle,
1831
+ tracks: a.subtitleTracks,
1832
+ current: a.currentSubtitle,
1821
1833
  onSelect: (u) => n == null ? void 0 : n.setSubtitle(u),
1822
1834
  onUpload: (u) => n == null ? void 0 : n.addTextTrack(u, u.name),
1823
1835
  onClose: () => U(!1),
1824
- settings: o.subtitleSettings,
1836
+ settings: a.subtitleSettings,
1825
1837
  onSettingsChange: (u) => n == null ? void 0 : n.updateSubtitleSettings(u),
1826
1838
  onReset: () => n == null ? void 0 : n.resetSubtitleSettings(),
1827
- offset: o.subtitleOffset,
1839
+ offset: a.subtitleOffset,
1828
1840
  onOffsetChange: (u) => n == null ? void 0 : n.setSubtitleOffset(u),
1829
1841
  maxHeight: it,
1830
1842
  animationClass: `strata-backdrop ${nt} ${Oe.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`
@@ -1832,34 +1844,34 @@ const Te = (s) => {
1832
1844
  )
1833
1845
  ] }, "subtitle");
1834
1846
  case "screenshot":
1835
- return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.screenshot(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, title: "Screenshot", children: /* @__PURE__ */ e(zi, { className: B }) }, "ss");
1847
+ return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.screenshot(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, title: "Screenshot", children: /* @__PURE__ */ e(Li, { className: A }) }, "ss");
1836
1848
  case "pip":
1837
- return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.togglePip(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(di, { className: B }) }, "pip");
1849
+ return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.togglePip(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(mi, { className: A }) }, "pip");
1838
1850
  case "download":
1839
- return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.download(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(hi, { className: B }) }, "dl");
1851
+ return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.download(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(pi, { className: A }) }, "dl");
1840
1852
  case "fullscreen":
1841
- return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.toggleFullscreen(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 rounded-lg transition-transform hover:scale-110 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: o.isFullscreen ? /* @__PURE__ */ e(li, { className: B }) : /* @__PURE__ */ e(oi, { className: B }) }, "fs");
1853
+ return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.toggleFullscreen(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 rounded-lg transition-transform hover:scale-110 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: a.isFullscreen ? /* @__PURE__ */ e(ui, { className: A }) : /* @__PURE__ */ e(di, { className: A }) }, "fs");
1842
1854
  case "fullscreenWeb":
1843
- return /* @__PURE__ */ e("button", { className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, title: "Web Fullscreen", children: /* @__PURE__ */ e(Li, { className: B }) }, "fsw");
1855
+ return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.toggleWebFullscreen(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 hidden sm:block focus:outline-none ${O} ${a.isWebFullscreen ? "text-[var(--accent)]" : ""}`, style: { borderRadius: "var(--radius)" }, title: "Web Fullscreen", children: /* @__PURE__ */ e(Pi, { className: A }) }, "fsw");
1844
1856
  case "settings":
1845
1857
  return /* @__PURE__ */ l("div", { className: "relative", children: [
1846
1858
  /* @__PURE__ */ e("button", { onClick: (u) => {
1847
- u.stopPropagation(), F(!$), U(!1), M("main");
1848
- }, className: `strata-control-btn transition-all duration-300 focus:outline-none ${O} ${$ ? "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(ci, { className: B }) }),
1849
- Fe.isMounted && /* @__PURE__ */ e(kt, { onClose: () => F(!1), align: "right", maxHeight: it, className: `strata-backdrop ${nt} ${Fe.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`, children: /* @__PURE__ */ l("div", { className: "w-full", children: [
1850
- A === "main" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
1859
+ u.stopPropagation(), V(!$), U(!1), M("main");
1860
+ }, className: `strata-control-btn transition-all duration-300 focus:outline-none ${O} ${$ ? "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(hi, { className: A }) }),
1861
+ Ve.isMounted && /* @__PURE__ */ e(Ct, { onClose: () => V(!1), align: "right", maxHeight: it, className: `strata-backdrop ${nt} ${Ve.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`, children: /* @__PURE__ */ l("div", { className: "w-full", children: [
1862
+ F === "main" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
1851
1863
  /* @__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" }) }),
1852
- o.sources.length > 1 && /* @__PURE__ */ e(T, { label: "Source", value: ((p = o.sources[o.currentSourceIndex]) == null ? void 0 : p.name) || `Source ${o.currentSourceIndex + 1}`, onClick: () => M("sources"), hasSubmenu: !0 }),
1853
- /* @__PURE__ */ e(T, { label: "Speed", value: `${o.playbackRate}x`, onClick: () => M("speed"), hasSubmenu: !0 }),
1854
- /* @__PURE__ */ e(T, { label: "Quality", value: o.currentQuality === -1 ? "Auto" : `${(g = o.qualityLevels[o.currentQuality]) == null ? void 0 : g.height}p`, onClick: () => M("quality"), hasSubmenu: !0 }),
1855
- /* @__PURE__ */ e(T, { label: "Audio", value: ((N = o.audioTracks[o.currentAudioTrack]) == null ? void 0 : N.label) || "Default", onClick: () => M("audio"), hasSubmenu: !0 }),
1856
- St && /* @__PURE__ */ e(T, { label: "Flip", value: o.flipState.horizontal ? "H" : o.flipState.vertical ? "V" : "Normal", onClick: () => M("flip"), hasSubmenu: !0 }),
1857
- Ct && /* @__PURE__ */ e(T, { label: "Aspect Ratio", value: o.aspectRatio, onClick: () => M("ratio"), hasSubmenu: !0 }),
1858
- /* @__PURE__ */ e(bt, {}),
1859
- /* @__PURE__ */ e(T, { label: "Audio Boost", value: o.audioGain > 1 ? `${o.audioGain}x` : "Off", onClick: () => M("boost"), hasSubmenu: !0 }),
1860
- /* @__PURE__ */ e(T, { label: "Watch Party", icon: /* @__PURE__ */ e(bi, { className: "w-4 h-4" }), onClick: () => M("party"), hasSubmenu: !0 }),
1861
- /* @__PURE__ */ e(T, { label: "Cast to Device", icon: /* @__PURE__ */ e(fi, { className: "w-4 h-4" }), onClick: () => {
1862
- n == null || n.requestCast(), F(!1);
1864
+ a.sources.length > 1 && /* @__PURE__ */ e(T, { label: "Source", value: ((f = a.sources[a.currentSourceIndex]) == null ? void 0 : f.name) || `Source ${a.currentSourceIndex + 1}`, onClick: () => M("sources"), hasSubmenu: !0 }),
1865
+ /* @__PURE__ */ e(T, { label: "Speed", value: `${a.playbackRate}x`, onClick: () => M("speed"), hasSubmenu: !0 }),
1866
+ /* @__PURE__ */ e(T, { label: "Quality", value: a.currentQuality === -1 ? "Auto" : `${(g = a.qualityLevels[a.currentQuality]) == null ? void 0 : g.height}p`, onClick: () => M("quality"), hasSubmenu: !0 }),
1867
+ /* @__PURE__ */ e(T, { label: "Audio", value: ((S = a.audioTracks[a.currentAudioTrack]) == null ? void 0 : S.label) || "Default", onClick: () => M("audio"), hasSubmenu: !0 }),
1868
+ Nt && /* @__PURE__ */ e(T, { label: "Flip", value: a.flipState.horizontal ? "H" : a.flipState.vertical ? "V" : "Normal", onClick: () => M("flip"), hasSubmenu: !0 }),
1869
+ Tt && /* @__PURE__ */ e(T, { label: "Aspect Ratio", value: a.aspectRatio, onClick: () => M("ratio"), hasSubmenu: !0 }),
1870
+ /* @__PURE__ */ e(gt, {}),
1871
+ /* @__PURE__ */ e(T, { label: "Audio Boost", value: a.audioGain > 1 ? `${a.audioGain}x` : "Off", onClick: () => M("boost"), hasSubmenu: !0 }),
1872
+ /* @__PURE__ */ e(T, { label: "Watch Party", icon: /* @__PURE__ */ e(xi, { className: "w-4 h-4" }), onClick: () => M("party"), hasSubmenu: !0 }),
1873
+ /* @__PURE__ */ e(T, { label: "Cast to Device", icon: /* @__PURE__ */ e(gi, { className: "w-4 h-4" }), onClick: () => {
1874
+ n == null || n.requestCast(), V(!1);
1863
1875
  } }),
1864
1876
  (j = h.settings) == null ? void 0 : j.map((u, J) => u.switch !== void 0 ? /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(
1865
1877
  K,
@@ -1868,7 +1880,7 @@ const Te = (s) => {
1868
1880
  icon: u.icon,
1869
1881
  checked: u.switch,
1870
1882
  tooltip: u.tooltip,
1871
- onChange: (Gi) => {
1883
+ onChange: (Qi) => {
1872
1884
  u.onSwitch && u.onSwitch(u);
1873
1885
  }
1874
1886
  }
@@ -1878,66 +1890,66 @@ const Te = (s) => {
1878
1890
  label: u.html,
1879
1891
  icon: u.icon,
1880
1892
  onClick: () => {
1881
- u.click ? u.click() : u.onClick && u.onClick(), F(!1);
1893
+ u.click ? u.click() : u.onClick && u.onClick(), V(!1);
1882
1894
  }
1883
1895
  },
1884
1896
  `cust-${J}`
1885
1897
  )),
1886
- /* @__PURE__ */ e(bt, {}),
1887
- /* @__PURE__ */ e(T, { label: "Appearance", icon: /* @__PURE__ */ e(yt, { className: "w-4 h-4" }), onClick: () => M("appearance"), hasSubmenu: !0 })
1898
+ /* @__PURE__ */ e(gt, {}),
1899
+ /* @__PURE__ */ e(T, { label: "Appearance", icon: /* @__PURE__ */ e(St, { className: "w-4 h-4" }), onClick: () => M("appearance"), hasSubmenu: !0 })
1888
1900
  ] }),
1889
- ["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio"].includes(A) && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
1890
- A === "sources" && /* @__PURE__ */ l(L, { children: [
1901
+ ["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio"].includes(F) && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
1902
+ F === "sources" && /* @__PURE__ */ l(L, { children: [
1891
1903
  /* @__PURE__ */ e(H, { label: "Select Source", onBack: () => M("main") }),
1892
- o.sources.map((u, J) => /* @__PURE__ */ e(T, { label: u.name || `Source ${J + 1}`, value: u.type, active: o.currentSourceIndex === J, onClick: () => n == null ? void 0 : n.switchSource(J) }, J))
1904
+ a.sources.map((u, J) => /* @__PURE__ */ e(T, { label: u.name || `Source ${J + 1}`, value: u.type, active: a.currentSourceIndex === J, onClick: () => n == null ? void 0 : n.switchSource(J) }, J))
1893
1905
  ] }),
1894
- A === "speed" && /* @__PURE__ */ l(L, { children: [
1906
+ F === "speed" && /* @__PURE__ */ l(L, { children: [
1895
1907
  /* @__PURE__ */ e(H, { label: "Speed", onBack: () => M("main") }),
1896
- [0.5, 1, 1.5, 2].map((u) => /* @__PURE__ */ e(T, { label: `${u}x`, active: o.playbackRate === u, onClick: () => n.video.playbackRate = u }, u))
1908
+ [0.5, 1, 1.5, 2].map((u) => /* @__PURE__ */ e(T, { label: `${u}x`, active: a.playbackRate === u, onClick: () => n.video.playbackRate = u }, u))
1897
1909
  ] }),
1898
- A === "quality" && /* @__PURE__ */ l(L, { children: [
1910
+ F === "quality" && /* @__PURE__ */ l(L, { children: [
1899
1911
  /* @__PURE__ */ e(H, { label: "Quality", onBack: () => M("main") }),
1900
- /* @__PURE__ */ e(T, { label: "Auto", active: o.currentQuality === -1, onClick: () => n == null ? void 0 : n.setQuality(-1) }),
1901
- o.qualityLevels.map((u) => /* @__PURE__ */ e(T, { label: `${u.height}p`, value: `${Math.round(u.bitrate / 1e3)}k`, active: o.currentQuality === u.index, onClick: () => n == null ? void 0 : n.setQuality(u.index) }, u.index))
1912
+ /* @__PURE__ */ e(T, { label: "Auto", active: a.currentQuality === -1, onClick: () => n == null ? void 0 : n.setQuality(-1) }),
1913
+ a.qualityLevels.map((u) => /* @__PURE__ */ e(T, { label: `${u.height}p`, value: `${Math.round(u.bitrate / 1e3)}k`, active: a.currentQuality === u.index, onClick: () => n == null ? void 0 : n.setQuality(u.index) }, u.index))
1902
1914
  ] }),
1903
- A === "audio" && /* @__PURE__ */ l(L, { children: [
1915
+ F === "audio" && /* @__PURE__ */ l(L, { children: [
1904
1916
  /* @__PURE__ */ e(H, { label: "Audio Track", onBack: () => M("main") }),
1905
- o.audioTracks.length === 0 && /* @__PURE__ */ e("div", { className: "px-4 py-3 text-zinc-500 text-xs text-center", children: "No tracks available" }),
1906
- o.audioTracks.map((u) => /* @__PURE__ */ e(T, { label: u.label, value: u.language, active: o.currentAudioTrack === u.index, onClick: () => n == null ? void 0 : n.setAudioTrack(u.index) }, u.index))
1917
+ a.audioTracks.length === 0 && /* @__PURE__ */ e("div", { className: "px-4 py-3 text-zinc-500 text-xs text-center", children: "No tracks available" }),
1918
+ a.audioTracks.map((u) => /* @__PURE__ */ e(T, { label: u.label, value: u.language, active: a.currentAudioTrack === u.index, onClick: () => n == null ? void 0 : n.setAudioTrack(u.index) }, u.index))
1907
1919
  ] }),
1908
- A === "boost" && /* @__PURE__ */ l(L, { children: [
1920
+ F === "boost" && /* @__PURE__ */ l(L, { children: [
1909
1921
  /* @__PURE__ */ e(H, { label: "Audio Boost", onBack: () => M("main") }),
1910
- [1, 1.5, 2, 3].map((u) => /* @__PURE__ */ e(T, { label: u === 1 ? "Off" : `${u}x`, active: o.audioGain === u, onClick: () => n == null ? void 0 : n.setAudioGain(u) }, u))
1922
+ [1, 1.5, 2, 3].map((u) => /* @__PURE__ */ e(T, { label: u === 1 ? "Off" : `${u}x`, active: a.audioGain === u, onClick: () => n == null ? void 0 : n.setAudioGain(u) }, u))
1911
1923
  ] }),
1912
- A === "flip" && /* @__PURE__ */ l(L, { children: [
1924
+ F === "flip" && /* @__PURE__ */ l(L, { children: [
1913
1925
  /* @__PURE__ */ e(H, { label: "Video Flip", onBack: () => M("main") }),
1914
1926
  /* @__PURE__ */ l("div", { className: "p-2 space-y-1", children: [
1915
- /* @__PURE__ */ e(K, { label: "Horizontal Flip", checked: o.flipState.horizontal, onChange: () => n == null ? void 0 : n.setFlip("horizontal") }),
1916
- /* @__PURE__ */ e(K, { label: "Vertical Flip", checked: o.flipState.vertical, onChange: () => n == null ? void 0 : n.setFlip("vertical") })
1927
+ /* @__PURE__ */ e(K, { label: "Horizontal Flip", checked: a.flipState.horizontal, onChange: () => n == null ? void 0 : n.setFlip("horizontal") }),
1928
+ /* @__PURE__ */ e(K, { label: "Vertical Flip", checked: a.flipState.vertical, onChange: () => n == null ? void 0 : n.setFlip("vertical") })
1917
1929
  ] })
1918
1930
  ] }),
1919
- A === "ratio" && /* @__PURE__ */ l(L, { children: [
1931
+ F === "ratio" && /* @__PURE__ */ l(L, { children: [
1920
1932
  /* @__PURE__ */ e(H, { label: "Aspect Ratio", onBack: () => M("main") }),
1921
- ["default", "16:9", "4:3"].map((u) => /* @__PURE__ */ e(T, { label: u === "default" ? "Default" : u, active: o.aspectRatio === u, onClick: () => n == null ? void 0 : n.setAspectRatio(u) }, u))
1933
+ ["default", "16:9", "4:3"].map((u) => /* @__PURE__ */ e(T, { label: u === "default" ? "Default" : u, active: a.aspectRatio === u, onClick: () => n == null ? void 0 : n.setAspectRatio(u) }, u))
1922
1934
  ] }),
1923
- A === "party" && /* @__PURE__ */ l(L, { children: [
1935
+ F === "party" && /* @__PURE__ */ l(L, { children: [
1924
1936
  /* @__PURE__ */ e(H, { label: "Watch Party", onBack: () => M("main") }),
1925
1937
  /* @__PURE__ */ l("div", { className: "p-4 space-y-3", children: [
1926
1938
  /* @__PURE__ */ e("p", { className: "text-xs text-zinc-400 leading-relaxed", children: "Create a synchronized room on WatchParty.me to watch together." }),
1927
- /* @__PURE__ */ e("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((ct = o.sources[o.currentSourceIndex]) == null ? void 0 : ct.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" })
1939
+ /* @__PURE__ */ e("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((ut = a.sources[a.currentSourceIndex]) == null ? void 0 : ut.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" })
1928
1940
  ] })
1929
1941
  ] }),
1930
- A === "appearance" && /* @__PURE__ */ l(L, { children: [
1942
+ F === "appearance" && /* @__PURE__ */ l(L, { children: [
1931
1943
  /* @__PURE__ */ e(H, { label: "Appearance", onBack: () => M("main") }),
1932
1944
  /* @__PURE__ */ l("div", { className: "pb-1", children: [
1933
- /* @__PURE__ */ e(Y, { title: "Theme", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 px-3", children: Wi.map((u) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ theme: u.value, themeColor: u.color }), className: `py-2 text-xs font-bold uppercase tracking-wide transition-colors border-[length:var(--border-width)] border-white/10 ${o.theme === u.value ? "bg-[var(--accent)] text-white" : "bg-white/5 text-zinc-400 hover:text-white"}`, style: { borderRadius: "var(--radius)" }, children: u.label }, u.value)) }) }),
1934
- /* @__PURE__ */ e(Y, { title: "Icon Size", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1 px-3", children: ["small", "medium", "large"].map((u) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ iconSize: u }), className: `py-1.5 text-xs font-medium transition-colors ${o.iconSize === u ? "bg-white text-black" : "bg-white/5 text-zinc-400 hover:text-zinc-200"}`, style: { borderRadius: "var(--radius)" }, children: u.charAt(0).toUpperCase() + u.slice(1) }, u)) }) }),
1945
+ /* @__PURE__ */ e(Y, { title: "Theme", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 px-3", children: Gi.map((u) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ theme: u.value, themeColor: u.color }), className: `py-2 text-xs font-bold uppercase tracking-wide transition-colors border-[length:var(--border-width)] border-white/10 ${a.theme === u.value ? "bg-[var(--accent)] text-white" : "bg-white/5 text-zinc-400 hover:text-white"}`, style: { borderRadius: "var(--radius)" }, children: u.label }, u.value)) }) }),
1946
+ /* @__PURE__ */ e(Y, { title: "Icon Size", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1 px-3", children: ["small", "medium", "large"].map((u) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ iconSize: u }), className: `py-1.5 text-xs font-medium transition-colors ${a.iconSize === u ? "bg-white text-black" : "bg-white/5 text-zinc-400 hover:text-zinc-200"}`, style: { borderRadius: "var(--radius)" }, children: u.charAt(0).toUpperCase() + u.slice(1) }, u)) }) }),
1935
1947
  /* @__PURE__ */ l(Y, { title: "Theme Color", children: [
1936
- /* @__PURE__ */ e("div", { className: "grid grid-cols-6 gap-2 px-3", children: Hi.map((u) => /* @__PURE__ */ e("button", { title: u.label, onClick: () => n == null ? void 0 : n.setAppearance({ themeColor: u.value }), className: `w-6 h-6 transition-transform hover:scale-110 ${o.themeColor === u.value ? "ring-2 ring-white scale-110" : "ring-1 ring-white/10"}`, style: { backgroundColor: u.value, borderRadius: "var(--radius-full)" }, children: o.themeColor === u.value && /* @__PURE__ */ e(Le, { className: "w-3 h-3 text-white mx-auto stroke-[3]" }) }, u.value)) }),
1948
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-6 gap-2 px-3", children: Ui.map((u) => /* @__PURE__ */ e("button", { title: u.label, onClick: () => n == null ? void 0 : n.setAppearance({ themeColor: u.value }), className: `w-6 h-6 transition-transform hover:scale-110 ${a.themeColor === u.value ? "ring-2 ring-white scale-110" : "ring-1 ring-white/10"}`, style: { backgroundColor: u.value, borderRadius: "var(--radius-full)" }, children: a.themeColor === u.value && /* @__PURE__ */ e(Le, { className: "w-3 h-3 text-white mx-auto stroke-[3]" }) }, u.value)) }),
1937
1949
  /* @__PURE__ */ e("div", { className: "px-3 pt-4", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3 bg-white/5 p-2 hover:bg-white/10 transition-colors group", style: { borderRadius: "var(--radius)" }, children: [
1938
- /* @__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: o.themeColor, onChange: (u) => n == null ? void 0 : n.setAppearance({ themeColor: u.target.value }), className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0" }) }),
1950
+ /* @__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: a.themeColor, onChange: (u) => n == null ? void 0 : n.setAppearance({ themeColor: u.target.value }), className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0" }) }),
1939
1951
  /* @__PURE__ */ e("span", { className: "text-xs text-zinc-400 font-medium group-hover:text-zinc-200", children: "Custom Color" }),
1940
- /* @__PURE__ */ e("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children: o.themeColor })
1952
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children: a.themeColor })
1941
1953
  ] }) })
1942
1954
  ] })
1943
1955
  ] })
@@ -1948,13 +1960,13 @@ const Te = (s) => {
1948
1960
  default:
1949
1961
  return null;
1950
1962
  }
1951
- }, _t = Ce(() => {
1963
+ }, Qt = Ce(() => {
1952
1964
  const c = [
1953
1965
  // Loop (Playback Group)
1954
1966
  { html: "Playback", isLabel: !0 },
1955
1967
  {
1956
1968
  html: "Loop",
1957
- checked: o.isLooping,
1969
+ checked: a.isLooping,
1958
1970
  onClick: () => n == null ? void 0 : n.toggleLoop()
1959
1971
  },
1960
1972
  { separator: !0 },
@@ -1965,15 +1977,15 @@ const Te = (s) => {
1965
1977
  { separator: !0 },
1966
1978
  // Aspect Ratio Group
1967
1979
  { html: "Aspect Ratio", isLabel: !0 },
1968
- { html: "Default", checked: o.aspectRatio === "default", onClick: () => n == null ? void 0 : n.setAspectRatio("default") },
1969
- { html: "16:9", checked: o.aspectRatio === "16:9", onClick: () => n == null ? void 0 : n.setAspectRatio("16:9") },
1970
- { html: "4:3", checked: o.aspectRatio === "4:3", onClick: () => n == null ? void 0 : n.setAspectRatio("4:3") },
1980
+ { html: "Default", checked: a.aspectRatio === "default", onClick: () => n == null ? void 0 : n.setAspectRatio("default") },
1981
+ { html: "16:9", checked: a.aspectRatio === "16:9", onClick: () => n == null ? void 0 : n.setAspectRatio("16:9") },
1982
+ { html: "4:3", checked: a.aspectRatio === "4:3", onClick: () => n == null ? void 0 : n.setAspectRatio("4:3") },
1971
1983
  { separator: !0 },
1972
1984
  // Stats
1973
1985
  {
1974
1986
  html: "Video Info",
1975
- icon: /* @__PURE__ */ e(Pi, { className: "w-3.5 h-3.5" }),
1976
- onClick: () => Ve(!0)
1987
+ icon: /* @__PURE__ */ e(Bi, { className: "w-3.5 h-3.5" }),
1988
+ onClick: () => Be(!0)
1977
1989
  },
1978
1990
  { separator: !0 }
1979
1991
  ];
@@ -1982,35 +1994,34 @@ const Te = (s) => {
1982
1994
  disabled: !0
1983
1995
  }), c.push({
1984
1996
  html: "Close",
1985
- onClick: (p) => p(),
1997
+ onClick: (f) => f(),
1986
1998
  // Wrapper handles close
1987
1999
  icon: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ l("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
1988
2000
  /* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
1989
2001
  /* @__PURE__ */ e("path", { d: "m6 6 12 12" })
1990
2002
  ] }) })
1991
2003
  }), c;
1992
- }, [h.contextmenu, o.aspectRatio, o.isLooping, n]);
1993
- return /* @__PURE__ */ l(
2004
+ }, [h.contextmenu, a.aspectRatio, a.isLooping, n]), at = a.isWebFullscreen, lt = /* @__PURE__ */ l(
1994
2005
  "div",
1995
2006
  {
1996
2007
  id: h.id,
1997
2008
  ref: q,
1998
- className: `group relative w-full h-full bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none rounded-[var(--radius)] text-zinc-100 strata-player-reset ${h.container || ""}`,
1999
- style: { touchAction: "manipulation", "--accent": o.themeColor },
2009
+ className: `group bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none text-zinc-100 strata-player-reset ${at ? "fixed inset-0 z-[2147483647] w-screen h-screen rounded-none" : "relative w-full h-full rounded-[var(--radius)]"} ${h.container || ""}`,
2010
+ style: { touchAction: "manipulation", "--accent": a.themeColor },
2000
2011
  onMouseMove: Ke,
2001
2012
  onMouseLeave: () => {
2002
- o.isPlaying && !$ && !E && n && n.setControlsVisible(!1);
2013
+ a.isPlaying && !$ && !E && n && n.setControlsVisible(!1);
2003
2014
  },
2004
2015
  onMouseDown: Ye,
2005
2016
  onMouseUp: ke,
2006
- onTouchStart: At,
2007
- onTouchMove: Bt,
2008
- onTouchEnd: Vt,
2009
- onContextMenu: jt,
2017
+ onTouchStart: Bt,
2018
+ onTouchMove: Vt,
2019
+ onTouchEnd: Ot,
2020
+ onContextMenu: Wt,
2010
2021
  tabIndex: 0,
2011
2022
  role: "region",
2012
2023
  "aria-label": "Video Player",
2013
- "data-theme": o.theme,
2024
+ "data-theme": a.theme,
2014
2025
  children: [
2015
2026
  /* @__PURE__ */ e("style", { children: `
2016
2027
  [data-theme="default"] {
@@ -2106,96 +2117,96 @@ const Te = (s) => {
2106
2117
  [data-theme="pixel"] .strata-backdrop { backdrop-filter: none; background: #000; }
2107
2118
  [data-theme="hacker"] .strata-backdrop { backdrop-filter: none; background: #000; }
2108
2119
  ` }),
2109
- o.theme === "hacker" && /* @__PURE__ */ e("div", { className: "strata-scanlines" }),
2120
+ a.theme === "hacker" && /* @__PURE__ */ e("div", { className: "strata-scanlines" }),
2110
2121
  !n && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-zinc-950 z-50", children: /* @__PURE__ */ e(Ie, { className: "w-10 h-10 text-[var(--accent)] animate-spin" }) }),
2111
2122
  n && /* @__PURE__ */ l(L, { children: [
2112
- (ot = h.layers) == null ? void 0 : ot.map((c, p) => /* @__PURE__ */ e(
2123
+ (ct = h.layers) == null ? void 0 : ct.map((c, f) => /* @__PURE__ */ e(
2113
2124
  "div",
2114
2125
  {
2115
2126
  className: `absolute inset-0 pointer-events-none z-10 ${c.className || ""}`,
2116
2127
  style: c.style,
2117
- children: /* @__PURE__ */ e(vt, { content: c.html || "", className: "w-full h-full" })
2128
+ children: /* @__PURE__ */ e(xt, { content: c.html || "", className: "w-full h-full" })
2118
2129
  },
2119
- p
2130
+ f
2120
2131
  )),
2121
- /* @__PURE__ */ e(Ai, { notifications: o.notifications }),
2122
- /* @__PURE__ */ e(Bi, { cues: o.activeCues, settings: o.subtitleSettings }),
2123
- /* @__PURE__ */ e("div", { className: "absolute inset-0 z-0", onClick: Ot, "aria-hidden": "true" }),
2124
- a && !he && /* @__PURE__ */ e(
2132
+ /* @__PURE__ */ e(Vi, { notifications: a.notifications }),
2133
+ /* @__PURE__ */ e(Oi, { cues: a.activeCues, settings: a.subtitleSettings }),
2134
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 z-0", onClick: Ht, "aria-hidden": "true" }),
2135
+ o && !he && /* @__PURE__ */ e(
2125
2136
  "div",
2126
2137
  {
2127
2138
  className: "absolute inset-0 bg-cover bg-center z-[5] pointer-events-none",
2128
- style: { backgroundImage: `url(${a})` }
2139
+ style: { backgroundImage: `url(${o})` }
2129
2140
  }
2130
2141
  ),
2131
2142
  Z.visible && /* @__PURE__ */ e(
2132
- Oi,
2143
+ Wi,
2133
2144
  {
2134
2145
  x: Z.x,
2135
2146
  y: Z.y,
2136
- items: _t,
2137
- onClose: () => pe({ ...Z, visible: !1 }),
2138
- containerWidth: zt,
2139
- containerHeight: Ae
2147
+ items: Qt,
2148
+ onClose: () => fe({ ...Z, visible: !1 }),
2149
+ containerWidth: Rt,
2150
+ containerHeight: Fe
2140
2151
  }
2141
2152
  ),
2142
- Rt && n && /* @__PURE__ */ e(ji, { player: n, onClose: () => Ve(!1) }),
2153
+ $t && n && /* @__PURE__ */ e(Di, { player: n, onClose: () => Be(!1) }),
2143
2154
  ge && /* @__PURE__ */ l("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", children: [
2144
- /* @__PURE__ */ e($i, { className: "w-4 h-4 text-[var(--accent)] fill-current" }),
2155
+ /* @__PURE__ */ e(Fi, { className: "w-4 h-4 text-[var(--accent)] fill-current" }),
2145
2156
  /* @__PURE__ */ e("span", { className: "text-xs font-bold tracking-wider", children: "2x Speed" })
2146
2157
  ] }),
2147
- W && o.controlsVisible && /* @__PURE__ */ e(
2158
+ W && a.controlsVisible && /* @__PURE__ */ e(
2148
2159
  "button",
2149
2160
  {
2150
2161
  onClick: (c) => {
2151
2162
  c.stopPropagation(), n.toggleLock();
2152
2163
  },
2153
- 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 ${o.isLocked ? "text-[var(--accent)] bg-white/10" : "hover:bg-white/10"}`,
2154
- children: o.isLocked ? /* @__PURE__ */ e(Ii, { className: "w-5 h-5" }) : /* @__PURE__ */ e(Ri, { className: "w-5 h-5" })
2164
+ 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 ${a.isLocked ? "text-[var(--accent)] bg-white/10" : "hover:bg-white/10"}`,
2165
+ children: a.isLocked ? /* @__PURE__ */ e($i, { className: "w-5 h-5" }) : /* @__PURE__ */ e(Ei, { className: "w-5 h-5" })
2155
2166
  }
2156
2167
  ),
2157
2168
  Q && /* @__PURE__ */ e(
2158
2169
  "div",
2159
2170
  {
2160
2171
  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 ${Q.type === "rewind" ? "left-0 rounded-r-[4rem]" : "right-0 rounded-l-[4rem]"}`,
2161
- onAnimationEnd: () => oe(null),
2172
+ onAnimationEnd: () => ae(null),
2162
2173
  children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center text-white drop-shadow-lg", children: [
2163
- Q.type === "rewind" ? /* @__PURE__ */ e(mt, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ e(pt, { className: "w-12 h-12 animate-pulse" }),
2174
+ Q.type === "rewind" ? /* @__PURE__ */ e(pt, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ e(bt, { className: "w-12 h-12 animate-pulse" }),
2164
2175
  /* @__PURE__ */ e("span", { className: "font-bold text-sm mt-2 font-mono", children: Q.type === "rewind" ? "-10s" : "+10s" })
2165
2176
  ] })
2166
2177
  },
2167
2178
  Q.id
2168
2179
  ),
2169
- o.isBuffering && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ e(Ie, { className: "w-12 h-12 text-[var(--accent)] animate-spin drop-shadow-lg" }) }),
2170
- o.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__ */ l("div", { className: "flex flex-col items-center gap-4 text-red-500 p-8 max-w-md text-center", children: [
2180
+ a.isBuffering && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ e(Ie, { className: "w-12 h-12 text-[var(--accent)] animate-spin drop-shadow-lg" }) }),
2181
+ a.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__ */ l("div", { className: "flex flex-col items-center gap-4 text-red-500 p-8 max-w-md text-center", children: [
2171
2182
  /* @__PURE__ */ e("span", { className: "text-5xl mb-2", children: "⚠️" }),
2172
2183
  /* @__PURE__ */ e("h3", { className: "text-xl font-bold text-white", children: "Playback Error" }),
2173
- /* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: o.error }),
2184
+ /* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: a.error }),
2174
2185
  /* @__PURE__ */ e("button", { onClick: () => n.load(n.store.get().sources[n.store.get().currentSourceIndex] || { url: t || "" }, v), 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" })
2175
2186
  ] }) }),
2176
- Tt && !o.isLocked && (!o.isPlaying && !o.isBuffering && !o.error || o.controlsVisible) && !o.isBuffering ? /* @__PURE__ */ e(
2187
+ zt && !a.isLocked && (!a.isPlaying && !a.isBuffering && !a.error || a.controlsVisible) && !a.isBuffering ? /* @__PURE__ */ e(
2177
2188
  "div",
2178
2189
  {
2179
- className: `absolute inset-0 flex items-center justify-center z-10 transition-opacity duration-300 pointer-events-none ${o.controlsVisible || !o.isPlaying ? "opacity-100" : "opacity-0"}`,
2190
+ className: `absolute inset-0 flex items-center justify-center z-10 transition-opacity duration-300 pointer-events-none ${a.controlsVisible || !a.isPlaying ? "opacity-100" : "opacity-0"}`,
2180
2191
  children: /* @__PURE__ */ l("div", { className: "flex items-center gap-8 md:gap-16 pointer-events-auto", children: [
2181
2192
  /* @__PURE__ */ e("button", { onClick: (c) => {
2182
- c.stopPropagation(), F(!1), U(!1), le("rewind");
2183
- }, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-110 text-white/90 focus:outline-none backdrop-blur-sm ${X.skipBtn}`, children: /* @__PURE__ */ e(mt, { className: X.skipIcon }) }),
2193
+ c.stopPropagation(), V(!1), U(!1), le("rewind");
2194
+ }, 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 ${X.skipBtn}`, children: /* @__PURE__ */ e(pt, { className: X.skipIcon }) }),
2184
2195
  /* @__PURE__ */ e("button", { onClick: (c) => {
2185
- c.stopPropagation(), F(!1), U(!1), n.togglePlay();
2186
- }, 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 hover:scale-105 active:scale-110 duration-75 focus:outline-none backdrop-blur-md ${X.playBtn}`, children: o.isPlaying ? /* @__PURE__ */ e(ht, { className: `${X.playIcon} text-white fill-current` }) : /* @__PURE__ */ e(ut, { className: `${X.playIcon} text-white ml-1 fill-current` }) }),
2196
+ c.stopPropagation(), V(!1), U(!1), n.togglePlay();
2197
+ }, 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 hover:scale-110 active:scale-90 active:opacity-80 focus:outline-none backdrop-blur-md ${X.playBtn}`, children: a.isPlaying ? /* @__PURE__ */ e(ft, { className: `${X.playIcon} text-white fill-current` }) : /* @__PURE__ */ e(mt, { className: `${X.playIcon} text-white ml-1 fill-current` }) }),
2187
2198
  /* @__PURE__ */ e("button", { onClick: (c) => {
2188
- c.stopPropagation(), F(!1), U(!1), le("forward");
2189
- }, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-110 text-white/90 focus:outline-none backdrop-blur-sm ${X.skipBtn}`, children: /* @__PURE__ */ e(pt, { className: X.skipIcon }) })
2199
+ c.stopPropagation(), V(!1), U(!1), le("forward");
2200
+ }, 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 ${X.skipBtn}`, children: /* @__PURE__ */ e(bt, { className: X.skipIcon }) })
2190
2201
  ] })
2191
2202
  }
2192
2203
  ) : null,
2193
2204
  /* @__PURE__ */ l(
2194
2205
  "div",
2195
2206
  {
2196
- 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 ${Gt ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4 pointer-events-none"}`,
2207
+ 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 ${qt ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4 pointer-events-none"}`,
2197
2208
  onClick: (c) => {
2198
- c.target === c.currentTarget && (F(!1), U(!1), ae(!1)), c.stopPropagation();
2209
+ c.target === c.currentTarget && (V(!1), U(!1), oe(!1)), c.stopPropagation();
2199
2210
  },
2200
2211
  children: [
2201
2212
  !h.isLive && /* @__PURE__ */ l(
@@ -2203,28 +2214,28 @@ const Te = (s) => {
2203
2214
  {
2204
2215
  ref: we,
2205
2216
  className: "relative w-full h-3 group/slider mb-3 cursor-pointer touch-none flex items-center",
2206
- onMouseMove: Ft,
2217
+ onMouseMove: jt,
2207
2218
  onMouseLeave: () => {
2208
2219
  Ge(null), _e(null);
2209
2220
  },
2210
2221
  onMouseDown: Ze,
2211
2222
  onTouchStart: Ze,
2212
2223
  children: [
2213
- (lt = h.highlight) == null ? void 0 : lt.map((c, p) => /* @__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: `${c.time / o.duration * 100}%` }, title: c.text }, p)),
2214
- Ue !== null && /* @__PURE__ */ l("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, ${Et}%, calc(100% - 70px))` }, children: [
2224
+ (dt = h.highlight) == null ? void 0 : dt.map((c, f) => /* @__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: `${c.time / a.duration * 100}%` }, title: c.text }, f)),
2225
+ Ue !== null && /* @__PURE__ */ l("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, ${Ft}%, calc(100% - 70px))` }, children: [
2215
2226
  G && /* @__PURE__ */ e("div", { className: "bg-black/90 border border-white/10 shadow-2xl overflow-hidden backdrop-blur-sm", style: { width: `${G.w * 0.5}px`, height: `${G.h * 0.5}px`, borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("div", { style: { backgroundImage: `url("${G.url}")`, width: `${G.w}px`, height: `${G.h}px`, backgroundPosition: `-${G.x}px -${G.y}px`, backgroundRepeat: "no-repeat", transform: "scale(0.5)", transformOrigin: "top left" } }) }),
2216
2227
  /* @__PURE__ */ e("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children: Te(Ue) })
2217
2228
  ] }),
2218
2229
  /* @__PURE__ */ l("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: [
2219
- o.duration > 0 && o.buffered.map((c, p) => /* @__PURE__ */ e("div", { className: "absolute top-0 bottom-0 bg-white/20", style: { left: `${c.start / o.duration * 100}%`, width: `${(c.end - c.start) / o.duration * 100}%` } }, p)),
2220
- /* @__PURE__ */ e("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(fe ? re : o.currentTime) / o.duration * 100}%` } })
2230
+ a.duration > 0 && a.buffered.map((c, f) => /* @__PURE__ */ e("div", { className: "absolute top-0 bottom-0 bg-white/20", style: { left: `${c.start / a.duration * 100}%`, width: `${(c.end - c.start) / a.duration * 100}%` } }, f)),
2231
+ /* @__PURE__ */ e("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(pe ? re : a.currentTime) / a.duration * 100}%` } })
2221
2232
  ] }),
2222
2233
  /* @__PURE__ */ e(
2223
2234
  "div",
2224
2235
  {
2225
2236
  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",
2226
2237
  style: {
2227
- left: `${(fe ? re : o.currentTime) / o.duration * 100}%`,
2238
+ left: `${(pe ? re : a.currentTime) / a.duration * 100}%`,
2228
2239
  borderRadius: "var(--radius-full)"
2229
2240
  }
2230
2241
  }
@@ -2233,8 +2244,8 @@ const Te = (s) => {
2233
2244
  }
2234
2245
  ),
2235
2246
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between pointer-events-auto", children: [
2236
- /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: rt.filter((c) => c.position === "left" || c.position === "center").map(at) }),
2237
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: rt.filter((c) => c.position === "right").map(at) })
2247
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: rt.filter((c) => c.position === "left" || c.position === "center").map(ot) }),
2248
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: rt.filter((c) => c.position === "right").map(ot) })
2238
2249
  ] })
2239
2250
  ]
2240
2251
  }
@@ -2243,20 +2254,21 @@ const Te = (s) => {
2243
2254
  ]
2244
2255
  }
2245
2256
  );
2246
- }, Ji = (s, t) => {
2247
- const i = Kt(s);
2248
- return i.render(ze.createElement(gt, t)), {
2257
+ return at && typeof document < "u" ? ei(lt, document.body) : lt;
2258
+ }, es = (s, t) => {
2259
+ const i = Zt(s);
2260
+ return i.render(ze.createElement(wt, t)), {
2249
2261
  unmount: () => {
2250
2262
  i.unmount();
2251
2263
  },
2252
2264
  update: (r) => {
2253
- i.render(ze.createElement(gt, { ...t, ...r }));
2265
+ i.render(ze.createElement(wt, { ...t, ...r }));
2254
2266
  }
2255
2267
  };
2256
2268
  };
2257
2269
  export {
2258
- ti as StrataCore,
2259
- gt as StrataPlayer,
2260
- Ji as mountStrataPlayer
2270
+ ni as StrataCore,
2271
+ wt as StrataPlayer,
2272
+ es as mountStrataPlayer
2261
2273
  };
2262
2274
  //# sourceMappingURL=strataplayer.es.js.map