strataplayer 1.2.10 → 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,61 +1,62 @@
1
- var Jt = Object.defineProperty;
2
- var Kt = (o, e, i) => e in o ? Jt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
3
- var S = (o, e, i) => Kt(o, typeof e != "symbol" ? e + "" : e, i);
4
- import Te, { useState as C, useEffect as E, forwardRef as yt, createElement as Ie, useRef as I, useLayoutEffect as Yt, useMemo as Ce, useSyncExternalStore as Zt, useCallback as Ne } from "react";
5
- import { createRoot as ei } from "react-dom/client";
6
- import { jsxs as h, jsx as t, Fragment as L } from "react/jsx-runtime";
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
+ import { jsxs as l, jsx as e, Fragment as L } from "react/jsx-runtime";
7
+ import { createPortal as ei } from "react-dom";
7
8
  class ti {
8
9
  constructor() {
9
- S(this, "events");
10
+ C(this, "events");
10
11
  this.events = /* @__PURE__ */ new Map();
11
12
  }
12
- on(e, i) {
13
- var n;
14
- return this.events.has(e) || this.events.set(e, []), (n = this.events.get(e)) == null || n.push(i), () => this.off(e, i);
13
+ on(t, i) {
14
+ var r;
15
+ return this.events.has(t) || this.events.set(t, []), (r = this.events.get(t)) == null || r.push(i), () => this.off(t, i);
15
16
  }
16
- off(e, i) {
17
- const n = this.events.get(e);
18
- n && this.events.set(
19
- e,
20
- n.filter((r) => r !== i)
17
+ off(t, i) {
18
+ const r = this.events.get(t);
19
+ r && this.events.set(
20
+ t,
21
+ r.filter((o) => o !== i)
21
22
  );
22
23
  }
23
- emit(e, i) {
24
- const n = this.events.get(e);
25
- n && n.forEach((r) => r(i));
24
+ emit(t, i) {
25
+ const r = this.events.get(t);
26
+ r && r.forEach((o) => o(i));
26
27
  }
27
28
  destroy() {
28
29
  this.events.clear();
29
30
  }
30
31
  }
31
32
  class ii {
32
- constructor(e) {
33
- S(this, "state");
34
- S(this, "listeners");
35
- this.state = e, this.listeners = /* @__PURE__ */ new Set();
33
+ constructor(t) {
34
+ C(this, "state");
35
+ C(this, "listeners");
36
+ this.state = t, this.listeners = /* @__PURE__ */ new Set();
36
37
  }
37
38
  get() {
38
39
  return this.state;
39
40
  }
40
- setState(e) {
41
- const i = this.state, n = typeof e == "function" ? e(i) : e;
42
- this.state = { ...i, ...n }, this.listeners.forEach((r) => r(this.state, i));
41
+ setState(t) {
42
+ const i = this.state, r = typeof t == "function" ? t(i) : t;
43
+ this.state = { ...i, ...r }, this.listeners.forEach((o) => o(this.state, i));
43
44
  }
44
- subscribe(e) {
45
- return this.listeners.add(e), () => this.listeners.delete(e);
45
+ subscribe(t) {
46
+ return this.listeners.add(t), () => this.listeners.delete(t);
46
47
  }
47
48
  destroy() {
48
49
  this.listeners.clear();
49
50
  }
50
51
  }
51
52
  class si {
52
- constructor(e) {
53
- S(this, "context", null);
54
- S(this, "source", null);
55
- S(this, "gainNode", null);
56
- S(this, "video");
57
- S(this, "isInitialized", !1);
58
- this.video = e;
53
+ constructor(t) {
54
+ C(this, "context", null);
55
+ C(this, "source", null);
56
+ C(this, "gainNode", null);
57
+ C(this, "video");
58
+ C(this, "isInitialized", !1);
59
+ this.video = t;
59
60
  }
60
61
  /**
61
62
  * Initialize the AudioContext. Must be called after user interaction.
@@ -70,14 +71,14 @@ class si {
70
71
  }
71
72
  }
72
73
  }
73
- setGain(e) {
74
- this.isInitialized || this.init(), this.gainNode && this.context && (this.gainNode.gain.value = e, this.context.state === "suspended" && this.context.resume());
74
+ setGain(t) {
75
+ this.isInitialized || this.init(), this.gainNode && this.context && (this.gainNode.gain.value = t, this.context.state === "suspended" && this.context.resume());
75
76
  }
76
77
  destroy() {
77
78
  this.context && this.context.close(), this.isInitialized = !1;
78
79
  }
79
80
  }
80
- const Le = {
81
+ const Re = {
81
82
  useNative: !1,
82
83
  fixCapitalization: !1,
83
84
  backgroundOpacity: 50,
@@ -88,7 +89,7 @@ const Le = {
88
89
  isBold: !1,
89
90
  textColor: "#ffffff",
90
91
  verticalOffset: 40
91
- }, wt = "strata-settings", V = {
92
+ }, yt = "strata-settings", B = {
92
93
  isPlaying: !1,
93
94
  isBuffering: !1,
94
95
  isLive: !1,
@@ -105,11 +106,12 @@ const Le = {
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,
111
113
  subtitleOffset: 0,
112
- subtitleSettings: Le,
114
+ subtitleSettings: Re,
113
115
  activeCues: [],
114
116
  viewMode: "normal",
115
117
  notifications: [],
@@ -125,84 +127,84 @@ const Le = {
125
127
  isAutoSized: !1,
126
128
  isLooping: !1,
127
129
  controlsVisible: !0
128
- }, kt = (o = {}) => {
129
- let e = {};
130
- if (!o.disablePersistence && typeof window < "u")
130
+ }, kt = (s = {}) => {
131
+ let t = {};
132
+ if (!s.disablePersistence && typeof window < "u")
131
133
  try {
132
- const n = localStorage.getItem(wt);
133
- n && (e = JSON.parse(n));
134
+ const r = localStorage.getItem(yt);
135
+ r && (t = JSON.parse(r));
134
136
  } catch {
135
137
  }
136
138
  const i = {
137
- ...Le,
138
- ...e.subtitleSettings || {},
139
- ...o.subtitleSettings || {}
139
+ ...Re,
140
+ ...t.subtitleSettings || {},
141
+ ...s.subtitleSettings || {}
140
142
  };
141
143
  return {
142
- ...V,
143
- ...e,
144
+ ...B,
145
+ ...t,
144
146
  // Load saved first
145
147
  // Override with config if present (not undefined)
146
- volume: o.volume ?? e.volume ?? V.volume,
147
- isMuted: o.muted ?? e.isMuted ?? V.isMuted,
148
- playbackRate: o.playbackRate ?? e.playbackRate ?? V.playbackRate,
149
- audioGain: o.audioGain ?? e.audioGain ?? V.audioGain,
150
- theme: o.theme ?? e.theme ?? V.theme,
151
- themeColor: o.themeColor ?? e.themeColor ?? V.themeColor,
152
- iconSize: o.iconSize ?? e.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: o.autoSize ?? V.isAutoSized,
156
- isLive: o.isLive ?? e.isLive ?? V.isLive,
157
- isLooping: o.loop ?? e.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
162
  class ni {
161
- constructor(e = {}, 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);
163
+ constructor(t = {}, i) {
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 = e, 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", e.playsInline !== !1 && (this.video.playsInline = !0), this.events = new ti();
182
- const n = kt(e);
183
- this.store = new ii(n), this.audioEngine = new si(this.video), this.boundCueChange = this.handleCueChange.bind(this), this.boundFullscreenChange = () => {
184
- const r = !!document.fullscreenElement;
185
- if (this.store.setState({ isFullscreen: r }), this.emit("resize"), this.emit(r ? "fullscreen" : "fullscreen_exit"), r && 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 !r && screen.orientation && "unlock" in screen.orientation && screen.orientation.unlock();
193
- }, this.video.volume = n.volume, this.video.muted = n.isMuted, this.video.playbackRate = n.playbackRate, this.video.loop = n.isLooping, n.audioGain > 1 && this.audioEngine.setGain(n.audioGain), n.isAutoSized && (this.video.style.objectFit = "cover"), this.initVideoListeners(), this.initMediaSession(), this.initCast(), e.disablePersistence || this.store.subscribe((r) => {
194
- const c = {
195
- volume: r.volume,
196
- isMuted: r.isMuted,
197
- playbackRate: r.playbackRate,
198
- subtitleSettings: r.subtitleSettings,
199
- iconSize: r.iconSize,
200
- themeColor: r.themeColor,
201
- theme: r.theme,
202
- isLive: r.isLive,
203
- isLooping: r.isLooping
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) => {
196
+ const d = {
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(wt, JSON.stringify(c));
207
+ localStorage.setItem(yt, JSON.stringify(d));
206
208
  });
207
209
  }
208
210
  // --- Instance Properties ---
@@ -212,8 +214,8 @@ class ni {
212
214
  get currentTime() {
213
215
  return this.video.currentTime;
214
216
  }
215
- set currentTime(e) {
216
- this.seek(e);
217
+ set currentTime(t) {
218
+ this.seek(t);
217
219
  }
218
220
  get duration() {
219
221
  return this.video.duration || 0;
@@ -224,46 +226,46 @@ class ni {
224
226
  get volume() {
225
227
  return this.video.volume;
226
228
  }
227
- set volume(e) {
228
- this.setVolume(e);
229
+ set volume(t) {
230
+ this.setVolume(t);
229
231
  }
230
232
  get muted() {
231
233
  return this.video.muted;
232
234
  }
233
- set muted(e) {
234
- this.video.muted = e, this.store.setState({ isMuted: e });
235
+ set muted(t) {
236
+ this.video.muted = t, this.store.setState({ isMuted: t });
235
237
  }
236
238
  get playbackRate() {
237
239
  return this.video.playbackRate;
238
240
  }
239
- set playbackRate(e) {
240
- this.video.playbackRate = e;
241
+ set playbackRate(t) {
242
+ this.video.playbackRate = t;
241
243
  }
242
244
  get loop() {
243
245
  return this.video.loop;
244
246
  }
245
- set loop(e) {
246
- this.video.loop = e, this.store.setState({ isLooping: e });
247
+ set loop(t) {
248
+ this.video.loop = t, this.store.setState({ isLooping: t });
247
249
  }
248
250
  // --- Instance Methods ---
249
- forward(e = 10) {
250
- this.skip(e);
251
+ forward(t = 10) {
252
+ this.skip(t);
251
253
  }
252
- backward(e = 10) {
253
- this.skip(-e);
254
+ backward(t = 10) {
255
+ this.skip(-t);
254
256
  }
255
257
  // --- Event API ---
256
- on(e, i) {
257
- return this.events.on(e, i);
258
+ on(t, i) {
259
+ return this.events.on(t, i);
258
260
  }
259
- off(e, i) {
260
- return this.events.off(e, i);
261
+ off(t, i) {
262
+ return this.events.off(t, i);
261
263
  }
262
- emit(e, i) {
263
- return this.events.emit(e, i);
264
+ emit(t, i) {
265
+ return this.events.emit(t, i);
264
266
  }
265
267
  initVideoListeners() {
266
- const e = (n) => this.store.setState(n);
268
+ const t = (r) => this.store.setState(r);
267
269
  [
268
270
  "abort",
269
271
  "canplay",
@@ -287,47 +289,47 @@ class ni {
287
289
  "timeupdate",
288
290
  "volumechange",
289
291
  "waiting"
290
- ].forEach((n) => {
291
- this.video.addEventListener(n, (r) => {
292
- switch (this.emit(`video:${n}`, r), n === "play" && this.emit("play"), n === "pause" && this.emit("pause"), n === "ended" && this.emit("ended"), n === "error" && this.emit("error", this.video.error), n === "seeked" && this.emit("seek"), n) {
292
+ ].forEach((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
- e({ isPlaying: !0 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "playing"), this.updateMediaSessionPosition();
296
+ t({ isPlaying: !0 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "playing"), this.updateMediaSessionPosition();
295
297
  break;
296
298
  case "pause":
297
- e({ isPlaying: !1 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "paused");
299
+ t({ isPlaying: !1 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "paused");
298
300
  break;
299
301
  case "ended":
300
- e({ isPlaying: !1 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "paused");
302
+ t({ isPlaying: !1 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "paused");
301
303
  break;
302
304
  case "waiting":
303
- e({ isBuffering: !0 }), this.emit("loading", !0);
305
+ t({ isBuffering: !0 }), this.emit("loading", !0);
304
306
  break;
305
307
  case "playing":
306
- e({ isBuffering: !1 }), this.emit("loading", !1);
308
+ t({ isBuffering: !1 }), this.emit("loading", !1);
307
309
  break;
308
310
  case "canplay":
309
- e({ isBuffering: !1 }), this.emit("loading", !1);
311
+ t({ isBuffering: !1 }), this.emit("loading", !1);
310
312
  break;
311
313
  case "loadeddata":
312
- e({ isBuffering: !1 }), this.retryCount = 0, this.removeNotification("retry"), this.store.get().error && e({ error: null });
314
+ t({ isBuffering: !1 }), this.retryCount = 0, this.removeNotification("retry"), this.store.get().error && t({ error: null });
313
315
  break;
314
316
  case "loadedmetadata":
315
317
  this.updateMediaSessionMetadata(), this.updateMediaSessionPosition();
316
318
  break;
317
319
  case "timeupdate":
318
- this.video.seeking || e({ currentTime: this.video.currentTime }), this.updateMediaSessionPosition();
320
+ this.video.seeking || t({ currentTime: this.video.currentTime }), this.updateMediaSessionPosition();
319
321
  break;
320
322
  case "seeked":
321
- e({ currentTime: this.video.currentTime }), this.updateMediaSessionPosition();
323
+ t({ currentTime: this.video.currentTime }), this.updateMediaSessionPosition();
322
324
  break;
323
325
  case "durationchange":
324
- e({ duration: this.video.duration }), this.updateMediaSessionPosition();
326
+ t({ duration: this.video.duration }), this.updateMediaSessionPosition();
325
327
  break;
326
328
  case "volumechange":
327
- e({ volume: this.video.volume, isMuted: this.video.muted });
329
+ t({ volume: this.video.volume, isMuted: this.video.muted });
328
330
  break;
329
331
  case "ratechange":
330
- e({ playbackRate: this.video.playbackRate }), this.updateMediaSessionPosition();
332
+ t({ playbackRate: this.video.playbackRate }), this.updateMediaSessionPosition();
331
333
  break;
332
334
  case "error":
333
335
  this.handleError();
@@ -336,156 +338,156 @@ class ni {
336
338
  this.updateBuffer();
337
339
  break;
338
340
  case "enterpictureinpicture":
339
- e({ isPip: !0 });
341
+ t({ isPip: !0 });
340
342
  break;
341
343
  case "leavepictureinpicture":
342
- e({ isPip: !1 });
344
+ t({ isPip: !1 });
343
345
  break;
344
346
  }
345
347
  });
346
348
  }), this.video.addEventListener("enterpictureinpicture", () => {
347
- e({ isPip: !0 }), this.emit("pip", !0);
349
+ t({ isPip: !0 }), this.emit("pip", !0);
348
350
  }), this.video.addEventListener("leavepictureinpicture", () => {
349
- e({ isPip: !1 }), this.emit("pip", !1);
351
+ t({ isPip: !1 }), this.emit("pip", !1);
350
352
  }), document.addEventListener("fullscreenchange", this.boundFullscreenChange), this.video.textTracks.addEventListener("addtrack", this.updateSubtitles.bind(this)), this.video.textTracks.addEventListener("removetrack", this.updateSubtitles.bind(this));
351
353
  }
352
354
  // --- Media Session API ---
353
355
  initMediaSession() {
354
356
  if (!("mediaSession" in navigator)) return;
355
- const e = navigator.mediaSession;
356
- e.setActionHandler("play", () => this.play()), e.setActionHandler("pause", () => this.pause()), e.setActionHandler("seekbackward", (i) => this.skip(i.seekOffset ? -i.seekOffset : -10)), e.setActionHandler("seekforward", (i) => this.skip(i.seekOffset || 10)), e.setActionHandler("seekto", (i) => {
357
+ const t = navigator.mediaSession;
358
+ t.setActionHandler("play", () => this.play()), t.setActionHandler("pause", () => this.pause()), t.setActionHandler("seekbackward", (i) => this.skip(i.seekOffset ? -i.seekOffset : -10)), t.setActionHandler("seekforward", (i) => this.skip(i.seekOffset || 10)), t.setActionHandler("seekto", (i) => {
357
359
  i.seekTime !== void 0 && this.seek(i.seekTime);
358
- }), e.setActionHandler("stop", () => {
360
+ }), t.setActionHandler("stop", () => {
359
361
  this.pause(), this.seek(0);
360
- }), e.setActionHandler("previoustrack", () => {
362
+ }), t.setActionHandler("previoustrack", () => {
361
363
  const i = this.store.get().currentSourceIndex;
362
364
  i > 0 && this.switchSource(i - 1);
363
- }), e.setActionHandler("nexttrack", () => {
364
- const i = this.store.get().currentSourceIndex, n = this.store.get().sources.length;
365
- i < n - 1 && this.switchSource(i + 1);
365
+ }), t.setActionHandler("nexttrack", () => {
366
+ const i = this.store.get().currentSourceIndex, r = this.store.get().sources.length;
367
+ i < r - 1 && this.switchSource(i + 1);
366
368
  });
367
369
  }
368
370
  updateMediaSessionMetadata() {
369
- var n, r;
371
+ var r, o;
370
372
  if (!("mediaSession" in navigator)) return;
371
- const e = ((n = this.currentSource) == null ? void 0 : n.name) || ((r = this.currentSource) == null ? void 0 : r.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
- title: e,
375
+ title: t,
374
376
  artist: "StrataPlayer",
375
377
  artwork: i
376
378
  });
377
379
  }
378
380
  updateMediaSessionPosition() {
379
381
  if (!("mediaSession" in navigator)) return;
380
- const e = this.video.duration, i = this.video.currentTime, n = this.video.playbackRate;
381
- if (!isNaN(e) && isFinite(e) && !isNaN(i))
382
+ const t = this.video.duration, i = this.video.currentTime, r = this.video.playbackRate;
383
+ if (!isNaN(t) && isFinite(t) && !isNaN(i))
382
384
  try {
383
385
  navigator.mediaSession.setPositionState({
384
- duration: Math.max(0, e),
385
- playbackRate: n,
386
- position: Math.max(0, Math.min(i, e))
386
+ duration: Math.max(0, t),
387
+ playbackRate: r,
388
+ position: Math.max(0, Math.min(i, t))
387
389
  // Ensure within [0, duration]
388
390
  });
389
- } catch (r) {
390
- console.warn("MediaSession Position Error:", r);
391
+ } catch (o) {
392
+ console.warn("MediaSession Position Error:", o);
391
393
  }
392
394
  }
393
- triggerError(e, i = !1) {
394
- i ? this.handleError(e) : this.notify({ type: "warning", message: `Warning: ${e}`, duration: 5e3 });
395
+ triggerError(t, i = !1) {
396
+ i ? this.handleError(t) : this.notify({ type: "warning", message: `Warning: ${t}`, duration: 5e3 });
395
397
  }
396
- handleError(e) {
397
- const i = this.video.error, n = e || (i == null ? void 0 : i.message) || (i ? `Code ${i.code}` : "Unknown Error");
398
+ handleError(t) {
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 r = 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
- message: `Error: ${n}. Retrying (${this.retryCount}/${this.maxRetries})...`
405
- }), console.warn(`[StrataPlayer] Error: ${n}. Retrying in ${r}ms...`), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = setTimeout(() => {
406
+ message: `Error: ${r}. Retrying (${this.retryCount}/${this.maxRetries})...`
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
- const c = this.store.get().currentTime;
409
- if (c > 0) {
410
+ const d = this.store.get().currentTime;
411
+ if (d > 0) {
410
412
  const m = () => {
411
- this.video.currentTime = c, this.video.removeEventListener("canplay", m);
413
+ this.video.currentTime = d, this.video.removeEventListener("canplay", m);
412
414
  };
413
415
  this.video.addEventListener("canplay", m);
414
416
  }
415
417
  }
416
- }, r);
418
+ }, o);
417
419
  } else {
418
420
  this.removeNotification("retry");
419
- const r = `Failed to play after ${this.maxRetries} attempts: ${n}`;
420
- this.store.setState({ error: r }), this.emit("error", r);
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() {
424
- const e = [];
426
+ const t = [];
425
427
  for (let i = 0; i < this.video.buffered.length; i++)
426
- e.push({
428
+ t.push({
427
429
  start: this.video.buffered.start(i),
428
430
  end: this.video.buffered.end(i)
429
431
  });
430
- this.store.setState({ buffered: e });
432
+ this.store.setState({ buffered: t });
431
433
  }
432
434
  updateSubtitles() {
433
435
  setTimeout(() => {
434
- const e = Array.from(this.video.textTracks).filter((n) => n.kind === "subtitles" || n.kind === "captions").map((n, r) => ({
435
- label: n.label || n.language || `Track ${r + 1}`,
436
- language: n.language,
437
- index: r
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}`,
438
+ language: r.language,
439
+ index: o
438
440
  }));
439
- this.store.setState({ subtitleTracks: e });
441
+ this.store.setState({ subtitleTracks: t });
440
442
  const i = this.store.get();
441
- i.currentSubtitle !== -1 && e.length > 0 && i.currentSubtitle < e.length && this.setSubtitle(i.currentSubtitle);
443
+ i.currentSubtitle !== -1 && t.length > 0 && i.currentSubtitle < t.length && this.setSubtitle(i.currentSubtitle);
442
444
  }, 50);
443
445
  }
444
446
  // --- Utility ---
445
- async fetchWithRetry(e, i = 3, n) {
446
- const r = n ?? this.config.fetchTimeout ?? 3e4;
447
- for (let c = 0; c < i; c++) {
448
- const m = new AbortController(), v = setTimeout(() => m.abort(), r);
447
+ async fetchWithRetry(t, i = 3, r) {
448
+ const o = r ?? this.config.fetchTimeout ?? 3e4;
449
+ for (let d = 0; d < i; d++) {
450
+ const m = new AbortController(), v = setTimeout(() => m.abort(), o);
449
451
  try {
450
- const x = await fetch(e, { signal: m.signal });
451
- if (clearTimeout(v), !x.ok) throw new Error(`HTTP ${x.status}`);
452
- return x;
453
- } catch (x) {
454
- if (clearTimeout(v), c === i - 1) throw x;
455
- x.name === "AbortError" && console.warn(`Fetch timeout (${r}ms) for ${e}`), await new Promise((b) => setTimeout(b, 1e3 * Math.pow(2, c)));
452
+ const w = await fetch(t, { signal: m.signal });
453
+ if (clearTimeout(v), !w.ok) throw new Error(`HTTP ${w.status}`);
454
+ return w;
455
+ } catch (w) {
456
+ if (clearTimeout(v), d === i - 1) throw w;
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");
459
461
  }
460
462
  // --- Core Methods ---
461
- attach(e) {
462
- this.container = e, this.container.contains(this.video) || (this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = this.store.get().isAutoSized ? "cover" : "contain", this.video.style.backgroundColor = "black", this.container.appendChild(this.video)), this.resizeObserver = new ResizeObserver((i) => {
463
- for (const n of i)
464
- this.emit("resize", { width: n.contentRect.width, height: n.contentRect.height });
463
+ attach(t) {
464
+ this.container = t, this.container.contains(this.video) || (this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = this.store.get().isAutoSized ? "cover" : "contain", this.video.style.backgroundColor = "black", this.container.appendChild(this.video)), this.resizeObserver = new ResizeObserver((i) => {
465
+ for (const r of i)
466
+ this.emit("resize", { width: r.contentRect.width, height: r.contentRect.height });
465
467
  }), this.resizeObserver.observe(this.container), this.emit("ready");
466
468
  }
467
- use(e) {
468
- this.plugins.has(e.name) || (e.init(this), this.plugins.set(e.name, e));
469
+ use(t) {
470
+ this.plugins.has(t.name) || (t.init(this), this.plugins.set(t.name, t));
469
471
  }
470
- setSources(e, i = []) {
471
- this.store.setState({ sources: e }), this.currentTracks = i, e.length > 0 && this.load(e[0], i);
472
+ setSources(t, i = []) {
473
+ this.store.setState({ sources: t }), this.currentTracks = i, t.length > 0 && this.load(t[0], i);
472
474
  }
473
- switchSource(e) {
475
+ switchSource(t) {
474
476
  const i = this.store.get().sources;
475
- if (e >= 0 && e < i.length) {
476
- const n = this.video.currentTime, r = !this.video.paused;
477
- this.load(i[e], this.currentTracks);
478
- const c = () => {
479
- this.video.currentTime = n, r && this.video.play(), this.video.removeEventListener("canplay", c);
477
+ if (t >= 0 && t < i.length) {
478
+ const r = this.video.currentTime, o = !this.video.paused;
479
+ this.load(i[t], this.currentTracks);
480
+ const d = () => {
481
+ this.video.currentTime = r, o && this.video.play(), this.video.removeEventListener("canplay", d);
480
482
  };
481
- this.video.addEventListener("canplay", c);
483
+ this.video.addEventListener("canplay", d);
482
484
  }
483
485
  }
484
- load(e, i = [], n = !1) {
486
+ load(t, i = [], r = !1) {
485
487
  this.retryTimer && clearTimeout(this.retryTimer);
486
- const r = typeof e == "string" ? { url: e, type: "auto" } : e;
487
- n || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc = r.url, this.currentSource = r, this.currentTracks = i;
488
- const m = this.store.get().sources.findIndex((b) => b.url === r.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,44 +499,44 @@ class ni {
497
499
  // subtitleTracks and currentSubtitle are purposely preserved
498
500
  currentSourceIndex: m
499
501
  }), this.updateMediaSessionMetadata();
500
- let v = r.type || "auto";
501
- v === "auto" && (r.url.includes(".m3u8") ? v = "hls" : r.url.includes(".mpd") ? v = "dash" : r.url.includes(".flv") || r.url.includes(".ts") ? v = "mpegts" : r.url.startsWith("magnet:") || r.url.includes(".torrent") ? v = "webtorrent" : v = "mp4"), this.events.emit("load", { url: r.url, type: v });
502
- const x = this.video.getElementsByTagName("track");
503
- for (; x.length > 0; )
504
- x[0].remove();
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 });
504
+ const w = this.video.getElementsByTagName("track");
505
+ for (; w.length > 0; )
506
+ w[0].remove();
505
507
  i.length > 0 && i.forEach((b) => {
506
508
  this.fetchWithRetry(b.src).then(() => {
507
509
  this.addTextTrackInternal(b.src, b.label, b.srcLang, b.default);
508
- }).catch((d) => {
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 = r.url);
513
+ }), (v === "mp4" || v === "webm" || v === "ogg") && (this.video.src = o.url);
512
514
  }
513
515
  // Wrapper for external subtitle API
514
- loadSubtitle(e, i = "Subtitle") {
515
- this.addTextTrackInternal(e, i, void 0, !0);
516
- }
517
- addTextTrack(e, i) {
518
- const n = new FileReader();
519
- n.onload = (r) => {
520
- var x;
521
- if (!((x = r.target) != null && x.result)) return;
522
- let c = r.target.result;
523
- (e.name.toLowerCase().endsWith(".srt") || !c.trim().startsWith("WEBVTT")) && (c = c.replace(/(\d{2}:\d{2}:\d{2}),(\d{3})/g, "$1.$2"), c.trim().startsWith("WEBVTT") || (c = `WEBVTT
516
+ loadSubtitle(t, i = "Subtitle") {
517
+ this.addTextTrackInternal(t, i, void 0, !0);
518
+ }
519
+ addTextTrack(t, i) {
520
+ const r = new FileReader();
521
+ r.onload = (o) => {
522
+ var w;
523
+ if (!((w = o.target) != null && w.result)) return;
524
+ let d = o.target.result;
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
- ` + c));
526
- const m = new Blob([c], { type: "text/vtt" }), v = URL.createObjectURL(m);
527
+ ` + d));
528
+ const m = new Blob([d], { type: "text/vtt" }), v = URL.createObjectURL(m);
527
529
  this.addTextTrackInternal(v, i, "user", !0), setTimeout(() => {
528
- const d = this.store.get().subtitleTracks.findIndex((w) => w.label === i);
529
- d !== -1 && (this.setSubtitle(d), this.notify({ type: "success", message: "Subtitle uploaded", duration: 3e3 }));
530
+ const h = this.store.get().subtitleTracks.findIndex((y) => y.label === i);
531
+ h !== -1 && (this.setSubtitle(h), this.notify({ type: "success", message: "Subtitle uploaded", duration: 3e3 }));
530
532
  }, 200);
531
- }, n.onerror = () => {
533
+ }, r.onerror = () => {
532
534
  this.notify({ type: "error", message: "Failed to read file", duration: 3e3 });
533
- }, n.readAsText(e);
535
+ }, r.readAsText(t);
534
536
  }
535
- addTextTrackInternal(e, i, n = "", r = !1) {
536
- const c = document.createElement("track");
537
- c.kind = "subtitles", c.label = i, c.src = e, c.srclang = n, r && (c.default = !0), this.video.appendChild(c), this.updateSubtitles();
537
+ addTextTrackInternal(t, i, r = "", o = !1) {
538
+ const d = document.createElement("track");
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();
@@ -545,101 +547,108 @@ class ni {
545
547
  togglePlay() {
546
548
  this.video.paused ? this.play() : this.pause();
547
549
  }
548
- seek(e) {
549
- if (isNaN(e)) return;
550
- const i = Math.max(0, Math.min(e, this.video.duration));
550
+ seek(t) {
551
+ if (isNaN(t)) return;
552
+ const i = Math.max(0, Math.min(t, this.video.duration));
551
553
  this.store.setState({ currentTime: i }), this.video.currentTime = i;
552
554
  }
553
- skip(e) {
554
- this.seek(this.video.currentTime + e);
555
+ skip(t) {
556
+ this.seek(this.video.currentTime + t);
555
557
  }
556
- setVolume(e) {
557
- const i = Math.max(0, Math.min(e, 1));
558
+ setVolume(t) {
559
+ const i = Math.max(0, Math.min(t, 1));
558
560
  this.video.volume = i, i > 0 && this.video.muted && (this.video.muted = !1), i === 0 && (this.video.muted = !0);
559
561
  }
560
562
  toggleMute() {
561
563
  this.video.muted = !this.video.muted;
562
564
  }
563
- setAudioGain(e) {
564
- this.store.setState({ audioGain: e }), this.audioEngine.setGain(e);
565
+ setAudioGain(t) {
566
+ this.store.setState({ audioGain: t }), this.audioEngine.setGain(t);
565
567
  }
566
- setQuality(e) {
567
- this.store.setState({ currentQuality: e }), this.events.emit("quality-request", e);
568
+ setQuality(t) {
569
+ this.store.setState({ currentQuality: t }), this.events.emit("quality-request", t);
568
570
  }
569
- setAudioTrack(e) {
570
- this.store.setState({ currentAudioTrack: e }), this.events.emit("audio-track-request", e);
571
+ setAudioTrack(t) {
572
+ this.store.setState({ currentAudioTrack: t }), this.events.emit("audio-track-request", t);
571
573
  }
572
- setControlsVisible(e) {
573
- this.store.get().controlsVisible !== e && (this.store.setState({ controlsVisible: e }), this.emit("control", e));
574
+ setControlsVisible(t) {
575
+ this.store.get().controlsVisible !== t && (this.store.setState({ controlsVisible: t }), this.emit("control", t));
574
576
  }
575
577
  async toggleFullscreen() {
576
578
  if (this.container)
577
579
  try {
578
580
  document.fullscreenElement ? await document.exitFullscreen() : await this.container.requestFullscreen();
579
- } catch (e) {
580
- console.error("Fullscreen toggle failed", e);
581
+ } catch (t) {
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
  }
586
595
  screenshot() {
587
- const e = document.createElement("canvas");
588
- e.width = this.video.videoWidth, e.height = this.video.videoHeight;
589
- const i = e.getContext("2d");
596
+ const t = document.createElement("canvas");
597
+ t.width = this.video.videoWidth, t.height = this.video.videoHeight;
598
+ const i = t.getContext("2d");
590
599
  if (i) {
591
- i.drawImage(this.video, 0, 0, e.width, e.height);
600
+ i.drawImage(this.video, 0, 0, t.width, t.height);
592
601
  try {
593
- const n = e.toDataURL("image/png"), r = document.createElement("a");
594
- r.download = `screenshot-${(/* @__PURE__ */ new Date()).toISOString()}.png`, r.href = n, r.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
  }
598
607
  }
599
608
  }
600
609
  toggleLock() {
601
- this.store.setState((e) => ({ isLocked: !e.isLocked }));
610
+ this.store.setState((t) => ({ isLocked: !t.isLocked }));
602
611
  }
603
612
  toggleLoop() {
604
613
  this.video.loop = !this.video.loop, this.store.setState({ isLooping: this.video.loop }), this.notify({ type: "info", message: `Loop: ${this.video.loop ? "On" : "Off"}`, duration: 1500 });
605
614
  }
606
- setFlip(e) {
607
- const i = this.store.get().flipState, n = {
615
+ setFlip(t) {
616
+ const i = this.store.get().flipState, r = {
608
617
  ...i,
609
- [e]: !i[e]
618
+ [t]: !i[t]
610
619
  };
611
- this.store.setState({ flipState: n });
612
- const r = n.horizontal ? -1 : 1, c = n.vertical ? -1 : 1;
613
- this.video.style.transform = `scale(${r}, ${c})`;
620
+ this.store.setState({ flipState: r });
621
+ const o = r.horizontal ? -1 : 1, d = r.vertical ? -1 : 1;
622
+ this.video.style.transform = `scale(${o}, ${d})`;
614
623
  }
615
- setAspectRatio(e) {
616
- if (this.store.setState({ aspectRatio: e }), e === "default") {
624
+ setAspectRatio(t) {
625
+ if (this.store.setState({ aspectRatio: t }), t === "default") {
617
626
  this.video.style.objectFit = this.store.get().isAutoSized ? "cover" : "contain", this.video.style.width = "100%", this.video.style.height = "100%";
618
627
  return;
619
628
  }
620
- this.video.style.objectFit = "contain", this.notify({ type: "info", message: `Aspect Ratio: ${e} (CSS support limited)`, duration: 2e3 });
629
+ this.video.style.objectFit = "contain", this.notify({ type: "info", message: `Aspect Ratio: ${t} (CSS support limited)`, duration: 2e3 });
621
630
  }
622
631
  initCast() {
623
- const e = window, i = () => {
632
+ const t = window, i = () => {
624
633
  if (!this.castInitialized)
625
634
  try {
626
- e.cast && e.cast.framework && e.chrome && e.chrome.cast && (e.cast.framework.CastContext.getInstance().setOptions({
627
- receiverApplicationId: e.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
628
- autoJoinPolicy: e.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED
635
+ t.cast && t.cast.framework && t.chrome && t.chrome.cast && (t.cast.framework.CastContext.getInstance().setOptions({
636
+ receiverApplicationId: t.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
637
+ autoJoinPolicy: t.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED
629
638
  }), this.castInitialized = !0);
630
- } catch (n) {
631
- console.warn("Cast Init Error or already initialized", n);
639
+ } catch (r) {
640
+ console.warn("Cast Init Error or already initialized", r);
632
641
  }
633
642
  };
634
- e.cast && e.cast.framework ? i() : e.__onGCastApiAvailable = (n) => {
635
- n && i();
643
+ t.cast && t.cast.framework ? i() : t.__onGCastApiAvailable = (r) => {
644
+ r && i();
636
645
  };
637
646
  }
638
647
  requestCast() {
639
- const e = window;
640
- if (e.cast && e.cast.framework)
648
+ const t = window;
649
+ if (t.cast && t.cast.framework)
641
650
  try {
642
- this.castInitialized || this.initCast(), e.cast.framework.CastContext.getInstance().requestSession().then(() => {
651
+ this.castInitialized || this.initCast(), t.cast.framework.CastContext.getInstance().requestSession().then(() => {
643
652
  this.loadMediaToCast();
644
653
  }).catch((i) => {
645
654
  i !== "cancel" && this.notify({ type: "error", message: "Cast failed: " + i, duration: 3e3 });
@@ -651,733 +660,339 @@ class ni {
651
660
  this.notify({ type: "warning", message: "Cast API not loaded", duration: 3e3 });
652
661
  }
653
662
  loadMediaToCast() {
654
- const e = window;
663
+ const t = window;
655
664
  try {
656
- const i = e.cast.framework.CastContext.getInstance().getCurrentSession();
665
+ const i = t.cast.framework.CastContext.getInstance().getCurrentSession();
657
666
  if (!i) return;
658
- const n = new e.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"), r = new e.chrome.cast.media.LoadRequest(n);
659
- i.loadMedia(r).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
- }).catch((c) => console.error("Cast load error", c));
670
+ }).catch((d) => console.error("Cast load error", d));
662
671
  } catch (i) {
663
672
  console.error("Failed to load media into Cast session", i);
664
673
  }
665
674
  }
666
675
  handleCueChange() {
667
- const e = this.store.get();
668
- if (e.currentSubtitle === -1) {
676
+ const t = this.store.get();
677
+ if (t.currentSubtitle === -1) {
669
678
  this.store.setState({ activeCues: [] });
670
679
  return;
671
680
  }
672
- const n = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions")[e.currentSubtitle];
673
- if (n && n.activeCues) {
674
- const r = Array.from(n.activeCues).map((c) => c.text);
675
- this.store.setState({ activeCues: r });
681
+ const r = Array.from(this.video.textTracks).filter((o) => o.kind === "subtitles" || o.kind === "captions")[t.currentSubtitle];
682
+ if (r && r.activeCues) {
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
  }
679
- setSubtitle(e) {
688
+ setSubtitle(t) {
680
689
  if (Array.from(this.video.textTracks).forEach((i) => {
681
690
  i.removeEventListener("cuechange", this.boundCueChange), i.mode = "hidden";
682
- }), this.store.setState({ currentSubtitle: e, subtitleOffset: 0, activeCues: [] }), e !== -1) {
683
- const n = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions")[e];
684
- if (n) {
685
- const r = this.store.get().subtitleSettings;
686
- n.mode = r.useNative ? "showing" : "hidden", n.addEventListener("cuechange", this.boundCueChange), this.handleCueChange();
691
+ }), this.store.setState({ currentSubtitle: t, subtitleOffset: 0, activeCues: [] }), t !== -1) {
692
+ const r = Array.from(this.video.textTracks).filter((o) => o.kind === "subtitles" || o.kind === "captions")[t];
693
+ if (r) {
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
  }
690
- updateSubtitleSettings(e) {
691
- const n = { ...this.store.get().subtitleSettings, ...e };
692
- this.store.setState({ subtitleSettings: n }), e.useNative !== void 0 && this.setSubtitle(this.store.get().currentSubtitle);
699
+ updateSubtitleSettings(t) {
700
+ const r = { ...this.store.get().subtitleSettings, ...t };
701
+ this.store.setState({ subtitleSettings: r }), t.useNative !== void 0 && this.setSubtitle(this.store.get().currentSubtitle);
693
702
  }
694
703
  resetSubtitleSettings() {
695
- this.store.setState({ subtitleSettings: Le }), this.setSubtitle(this.store.get().currentSubtitle);
704
+ this.store.setState({ subtitleSettings: Re }), this.setSubtitle(this.store.get().currentSubtitle);
696
705
  }
697
- setSubtitleOffset(e) {
698
- const i = this.store.get().subtitleOffset, n = e - i;
699
- Math.abs(n) < 1e-3 || (Array.from(this.video.textTracks).forEach((r) => {
700
- (r.mode === "showing" || r.mode === "hidden") && r.cues && Array.from(r.cues).forEach((c) => {
701
- c.startTime += n, c.endTime += n;
706
+ setSubtitleOffset(t) {
707
+ const i = this.store.get().subtitleOffset, r = t - i;
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) => {
710
+ d.startTime += r, d.endTime += r;
702
711
  });
703
- }), this.store.setState({ subtitleOffset: e }), this.notify({ type: "info", message: `Subtitle Offset: ${e > 0 ? "+" : ""}${e.toFixed(1)}s`, duration: 1500 }));
712
+ }), this.store.setState({ subtitleOffset: t }), this.notify({ type: "info", message: `Subtitle Offset: ${t > 0 ? "+" : ""}${t.toFixed(1)}s`, duration: 1500 }));
704
713
  }
705
714
  async download() {
706
- var n;
715
+ var r;
707
716
  if (!this.video.src) return;
708
- const e = this.video.src;
709
- if (e.includes("blob:") || e.includes(".m3u8")) {
717
+ const t = this.video.src;
718
+ if (t.includes("blob:") || t.includes(".m3u8")) {
710
719
  this.notify({ type: "warning", message: "Stream download not supported in browser.", duration: 4e3 });
711
720
  return;
712
721
  }
713
722
  const i = this.notify({ type: "loading", message: "Preparing download...", progress: 0 });
714
723
  try {
715
- const r = await this.fetchWithRetry(e);
716
- if (!r.body) throw new Error("No body");
717
- const c = r.body.getReader(), m = r.headers.get("Content-Length"), v = m ? parseInt(m, 10) : 0;
718
- let x = 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;
727
+ let w = 0;
719
728
  const b = [];
720
729
  for (; ; ) {
721
- const { done: T, value: R } = await c.read();
722
- if (T) break;
723
- if (b.push(R), x += R.length, v) {
724
- const p = Math.round(x / v * 100);
730
+ const { done: z, value: R } = await d.read();
731
+ if (z) break;
732
+ if (b.push(R), w += R.length, v) {
733
+ const p = Math.round(w / v * 100);
725
734
  this.notify({ id: i, type: "loading", message: `Downloading... ${p}%`, progress: p });
726
735
  }
727
736
  }
728
- const d = new Blob(b), w = window.URL.createObjectURL(d), k = document.createElement("a");
729
- k.style.display = "none", k.href = w, k.download = ((n = e.split("/").pop()) == null ? void 0 : n.split("?")[0]) || "video.mp4", document.body.appendChild(k), k.click(), window.URL.revokeObjectURL(w), document.body.removeChild(k), this.notify({ id: i, type: "success", message: "Saved!", duration: 3e3 });
737
+ const h = new Blob(b), y = window.URL.createObjectURL(h), k = document.createElement("a");
738
+ k.style.display = "none", k.href = y, k.download = ((r = t.split("/").pop()) == null ? void 0 : r.split("?")[0]) || "video.mp4", document.body.appendChild(k), k.click(), window.URL.revokeObjectURL(y), document.body.removeChild(k), this.notify({ id: i, type: "success", message: "Saved!", duration: 3e3 });
730
739
  } catch {
731
- this.notify({ id: i, type: "error", message: "Download failed.", duration: 4e3 }), window.open(e, "_blank");
740
+ this.notify({ id: i, type: "error", message: "Download failed.", duration: 4e3 }), window.open(t, "_blank");
732
741
  }
733
742
  }
734
- notify(e) {
735
- const i = e.id || Math.random().toString(36).substr(2, 9), n = { ...e, id: i };
736
- return this.store.setState({ notifications: [n] }), e.duration && setTimeout(() => this.removeNotification(i), e.duration), i;
743
+ notify(t) {
744
+ const i = t.id || Math.random().toString(36).substr(2, 9), r = { ...t, id: i };
745
+ return this.store.setState({ notifications: [r] }), t.duration && setTimeout(() => this.removeNotification(i), t.duration), i;
737
746
  }
738
- removeNotification(e) {
747
+ removeNotification(t) {
739
748
  const i = this.store.get().notifications;
740
- this.store.setState({ notifications: i.filter((n) => n.id !== e) });
749
+ this.store.setState({ notifications: i.filter((r) => r.id !== t) });
741
750
  }
742
- setAppearance(e) {
751
+ setAppearance(t) {
743
752
  this.store.setState((i) => ({
744
753
  ...i,
745
- ...e
754
+ ...t
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 = "";
750
- const e = this.video.getElementsByTagName("track");
751
- for (; e.length > 0; ) e[0].remove();
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 = "";
759
+ const t = this.video.getElementsByTagName("track");
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();
753
762
  }
754
763
  }
755
- const ze = (o) => {
756
- if (isNaN(o)) return "00:00";
757
- const e = Math.floor(o / 3600), i = Math.floor(o % 3600 / 60), n = Math.floor(o % 60);
758
- return e > 0 ? `${e}:${i.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}` : `${i}:${n.toString().padStart(2, "0")}`;
759
- }, ri = async (o, e = 3, i = 2e4) => {
760
- for (let n = 0; n < e; n++) {
761
- const r = new AbortController(), c = setTimeout(() => r.abort(), i);
764
+ const Te = (s) => {
765
+ if (isNaN(s)) return "00:00";
766
+ const t = Math.floor(s / 3600), i = Math.floor(s % 3600 / 60), r = Math.floor(s % 60);
767
+ return t > 0 ? `${t}:${i.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${i}:${r.toString().padStart(2, "0")}`;
768
+ }, ri = async (s, t = 3, i = 2e4) => {
769
+ for (let r = 0; r < t; r++) {
770
+ const o = new AbortController(), d = setTimeout(() => o.abort(), i);
762
771
  try {
763
- const m = await fetch(o, { signal: r.signal });
764
- if (clearTimeout(c), !m.ok) throw new Error(`HTTP ${m.status}`);
772
+ const m = await fetch(s, { signal: o.signal });
773
+ if (clearTimeout(d), !m.ok) throw new Error(`HTTP ${m.status}`);
765
774
  return await m.text();
766
775
  } catch (m) {
767
- if (clearTimeout(c), n === e - 1) throw m;
776
+ if (clearTimeout(d), r === t - 1) throw m;
768
777
  await new Promise((v) => setTimeout(v, 1e3));
769
778
  }
770
779
  }
771
780
  throw new Error("Failed");
772
- }, ai = async (o, e, i = 2e4) => {
781
+ }, oi = async (s, t, i = 2e4) => {
773
782
  try {
774
- const r = (await ri(o, 3, i)).split(`
775
- `), c = [];
783
+ const o = (await ri(s, 3, i)).split(`
784
+ `), d = [];
776
785
  let m = null, v = null;
777
- const x = o.substring(0, o.lastIndexOf("/") + 1), b = (d) => {
778
- const w = d.split(":");
786
+ const w = s.substring(0, s.lastIndexOf("/") + 1), b = (h) => {
787
+ const y = h.split(":");
779
788
  let k = 0;
780
- return w.length === 3 ? (k += parseFloat(w[0]) * 3600, k += parseFloat(w[1]) * 60, k += parseFloat(w[2])) : (k += parseFloat(w[0]) * 60, k += parseFloat(w[1])), k;
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 d of r)
783
- if (d = d.trim(), d.includes("-->")) {
784
- const w = d.split("-->");
785
- m = b(w[0].trim()), v = b(w[1].trim());
786
- } else if (m !== null && v !== null && d.length > 0) {
787
- let [w, k] = d.split("#");
788
- !w.match(/^https?:\/\//) && !w.startsWith("data:") && (w = x + w);
789
- let T = 0, R = 0, p = 0, D = 0;
791
+ for (let h of o)
792
+ if (h = h.trim(), h.includes("-->")) {
793
+ const y = h.split("-->");
794
+ m = b(y[0].trim()), v = b(y[1].trim());
795
+ } else if (m !== null && v !== null && h.length > 0) {
796
+ let [y, k] = h.split("#");
797
+ !y.match(/^https?:\/\//) && !y.startsWith("data:") && (y = w + y);
798
+ let z = 0, R = 0, p = 0, W = 0;
790
799
  if (k && k.startsWith("xywh=")) {
791
- const W = k.replace("xywh=", "").split(",");
792
- W.length === 4 && (T = parseInt(W[0]), R = parseInt(W[1]), p = parseInt(W[2]), D = parseInt(W[3]));
800
+ const D = k.replace("xywh=", "").split(",");
801
+ D.length === 4 && (z = parseInt(D[0]), R = parseInt(D[1]), p = parseInt(D[2]), W = parseInt(D[3]));
793
802
  }
794
- p > 0 && D > 0 && c.push({ start: m, end: v, url: w, x: T, y: R, w: p, h: D }), 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
- return c;
805
+ return d;
797
806
  } catch {
798
- return e({ type: "warning", message: "Failed to load thumbnails", duration: 4e3 }), [];
807
+ return t({ type: "warning", message: "Failed to load thumbnails", duration: 4e3 }), [];
799
808
  }
800
- }, ut = (o, e = 200) => {
801
- const [i, n] = C(o), [r, c] = C(!1);
802
- return E(() => {
803
- if (o)
804
- n(!0), requestAnimationFrame(() => {
809
+ }, ht = (s, t = 200) => {
810
+ const [i, r] = N(s), [o, d] = N(!1);
811
+ return P(() => {
812
+ if (s)
813
+ r(!0), requestAnimationFrame(() => {
805
814
  requestAnimationFrame(() => {
806
- c(!0);
815
+ d(!0);
807
816
  });
808
817
  });
809
818
  else {
810
- c(!1);
819
+ d(!1);
811
820
  const m = setTimeout(() => {
812
- n(!1);
813
- }, e);
821
+ r(!1);
822
+ }, t);
814
823
  return () => clearTimeout(m);
815
824
  }
816
- }, [o, e]), { isMounted: i, isVisible: r };
817
- };
818
- /**
819
- * @license lucide-react v0.462.0 - ISC
820
- *
821
- * This source code is licensed under the ISC license.
822
- * See the LICENSE file in the root directory of this source tree.
823
- */
824
- const oi = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), St = (...o) => o.filter((e, i, n) => !!e && e.trim() !== "" && n.indexOf(e) === i).join(" ").trim();
825
- /**
826
- * @license lucide-react v0.462.0 - ISC
827
- *
828
- * This source code is licensed under the ISC license.
829
- * See the LICENSE file in the root directory of this source tree.
830
- */
831
- var li = {
832
- xmlns: "http://www.w3.org/2000/svg",
833
- width: 24,
834
- height: 24,
835
- viewBox: "0 0 24 24",
836
- fill: "none",
837
- stroke: "currentColor",
838
- strokeWidth: 2,
839
- strokeLinecap: "round",
840
- strokeLinejoin: "round"
841
- };
842
- /**
843
- * @license lucide-react v0.462.0 - ISC
844
- *
845
- * This source code is licensed under the ISC license.
846
- * See the LICENSE file in the root directory of this source tree.
847
- */
848
- const ci = yt(
849
- ({
850
- color: o = "currentColor",
851
- size: e = 24,
852
- strokeWidth: i = 2,
853
- absoluteStrokeWidth: n,
854
- className: r = "",
855
- children: c,
856
- iconNode: m,
857
- ...v
858
- }, x) => Ie(
859
- "svg",
860
- {
861
- ref: x,
862
- ...li,
863
- width: e,
864
- height: e,
865
- stroke: o,
866
- strokeWidth: n ? Number(i) * 24 / Number(e) : i,
867
- className: St("lucide", r),
868
- ...v
869
- },
870
- [
871
- ...m.map(([b, d]) => Ie(b, d)),
872
- ...Array.isArray(c) ? c : [c]
873
- ]
874
- )
875
- );
876
- /**
877
- * @license lucide-react v0.462.0 - ISC
878
- *
879
- * This source code is licensed under the ISC license.
880
- * See the LICENSE file in the root directory of this source tree.
881
- */
882
- const y = (o, e) => {
883
- const i = yt(
884
- ({ className: n, ...r }, c) => Ie(ci, {
885
- ref: c,
886
- iconNode: e,
887
- className: St(`lucide-${oi(o)}`, n),
888
- ...r
889
- })
890
- );
891
- return i.displayName = `${o}`, i;
892
- };
893
- /**
894
- * @license lucide-react v0.462.0 - ISC
895
- *
896
- * This source code is licensed under the ISC license.
897
- * See the LICENSE file in the root directory of this source tree.
898
- */
899
- const di = y("ArrowLeft", [
900
- ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
901
- ["path", { d: "M19 12H5", key: "x3x0zl" }]
902
- ]);
903
- /**
904
- * @license lucide-react v0.462.0 - ISC
905
- *
906
- * This source code is licensed under the ISC license.
907
- * See the LICENSE file in the root directory of this source tree.
908
- */
909
- const ui = y("Bold", [
910
- [
911
- "path",
912
- { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
913
- ]
914
- ]);
915
- /**
916
- * @license lucide-react v0.462.0 - ISC
917
- *
918
- * This source code is licensed under the ISC license.
919
- * See the LICENSE file in the root directory of this source tree.
920
- */
921
- const hi = y("Camera", [
922
- [
923
- "path",
924
- {
925
- 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",
926
- key: "1tc9qg"
927
- }
928
- ],
929
- ["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
930
- ]);
931
- /**
932
- * @license lucide-react v0.462.0 - ISC
933
- *
934
- * This source code is licensed under the ISC license.
935
- * See the LICENSE file in the root directory of this source tree.
936
- */
937
- const mi = y("Captions", [
938
- ["rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2", key: "12ruh7" }],
939
- ["path", { d: "M7 15h4M15 15h2M7 11h2M13 11h4", key: "1ueiar" }]
940
- ]);
941
- /**
942
- * @license lucide-react v0.462.0 - ISC
943
- *
944
- * This source code is licensed under the ISC license.
945
- * See the LICENSE file in the root directory of this source tree.
946
- */
947
- const fi = y("CaseUpper", [
948
- ["path", { d: "m3 15 4-8 4 8", key: "1vwr6u" }],
949
- ["path", { d: "M4 13h6", key: "1r9ots" }],
950
- ["path", { d: "M15 11h4.5a2 2 0 0 1 0 4H15V7h4a2 2 0 0 1 0 4", key: "1sqfas" }]
951
- ]);
952
- /**
953
- * @license lucide-react v0.462.0 - ISC
954
- *
955
- * This source code is licensed under the ISC license.
956
- * See the LICENSE file in the root directory of this source tree.
957
- */
958
- const pi = y("Cast", [
959
- ["path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6", key: "3zrzxg" }],
960
- ["path", { d: "M2 12a9 9 0 0 1 8 8", key: "g6cvee" }],
961
- ["path", { d: "M2 16a5 5 0 0 1 4 4", key: "1y1dii" }],
962
- ["line", { x1: "2", x2: "2.01", y1: "20", y2: "20", key: "xu2jvo" }]
963
- ]);
964
- /**
965
- * @license lucide-react v0.462.0 - ISC
966
- *
967
- * This source code is licensed under the ISC license.
968
- * See the LICENSE file in the root directory of this source tree.
969
- */
970
- const bi = y("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
971
- /**
972
- * @license lucide-react v0.462.0 - ISC
973
- *
974
- * This source code is licensed under the ISC license.
975
- * See the LICENSE file in the root directory of this source tree.
976
- */
977
- const vi = y("Clock", [
978
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
979
- ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
980
- ]);
981
- /**
982
- * @license lucide-react v0.462.0 - ISC
983
- *
984
- * This source code is licensed under the ISC license.
985
- * See the LICENSE file in the root directory of this source tree.
986
- */
987
- const gi = y("Download", [
988
- ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
989
- ["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
990
- ["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
991
- ]);
992
- /**
993
- * @license lucide-react v0.462.0 - ISC
994
- *
995
- * This source code is licensed under the ISC license.
996
- * See the LICENSE file in the root directory of this source tree.
997
- */
998
- const xi = y("Droplet", [
999
- [
1000
- "path",
1001
- {
1002
- 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",
1003
- key: "c7niix"
1004
- }
1005
- ]
1006
- ]);
1007
- /**
1008
- * @license lucide-react v0.462.0 - ISC
1009
- *
1010
- * This source code is licensed under the ISC license.
1011
- * See the LICENSE file in the root directory of this source tree.
1012
- */
1013
- const yi = y("Eye", [
1014
- [
1015
- "path",
1016
- {
1017
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
1018
- key: "1nclc0"
1019
- }
1020
- ],
1021
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1022
- ]);
1023
- /**
1024
- * @license lucide-react v0.462.0 - ISC
1025
- *
1026
- * This source code is licensed under the ISC license.
1027
- * See the LICENSE file in the root directory of this source tree.
1028
- */
1029
- const wi = y("Info", [
1030
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1031
- ["path", { d: "M12 16v-4", key: "1dtifu" }],
1032
- ["path", { d: "M12 8h.01", key: "e9boi3" }]
1033
- ]);
1034
- /**
1035
- * @license lucide-react v0.462.0 - ISC
1036
- *
1037
- * This source code is licensed under the ISC license.
1038
- * See the LICENSE file in the root directory of this source tree.
1039
- */
1040
- const ki = y("LoaderCircle", [
1041
- ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
1042
- ]);
1043
- /**
1044
- * @license lucide-react v0.462.0 - ISC
1045
- *
1046
- * This source code is licensed under the ISC license.
1047
- * See the LICENSE file in the root directory of this source tree.
1048
- */
1049
- const Si = y("LockOpen", [
1050
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
1051
- ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
1052
- ]);
1053
- /**
1054
- * @license lucide-react v0.462.0 - ISC
1055
- *
1056
- * This source code is licensed under the ISC license.
1057
- * See the LICENSE file in the root directory of this source tree.
1058
- */
1059
- const Ci = y("Lock", [
1060
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
1061
- ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
1062
- ]);
1063
- /**
1064
- * @license lucide-react v0.462.0 - ISC
1065
- *
1066
- * This source code is licensed under the ISC license.
1067
- * See the LICENSE file in the root directory of this source tree.
1068
- */
1069
- const Ni = y("Maximize", [
1070
- ["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
1071
- ["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
1072
- ["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
1073
- ["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
1074
- ]);
1075
- /**
1076
- * @license lucide-react v0.462.0 - ISC
1077
- *
1078
- * This source code is licensed under the ISC license.
1079
- * See the LICENSE file in the root directory of this source tree.
1080
- */
1081
- const zi = y("Minimize", [
1082
- ["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
1083
- ["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
1084
- ["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
1085
- ["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
1086
- ]);
1087
- /**
1088
- * @license lucide-react v0.462.0 - ISC
1089
- *
1090
- * This source code is licensed under the ISC license.
1091
- * See the LICENSE file in the root directory of this source tree.
1092
- */
1093
- const Mi = y("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
1094
- /**
1095
- * @license lucide-react v0.462.0 - ISC
1096
- *
1097
- * This source code is licensed under the ISC license.
1098
- * See the LICENSE file in the root directory of this source tree.
1099
- */
1100
- const Ti = y("Monitor", [
1101
- ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
1102
- ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
1103
- ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
1104
- ]);
1105
- /**
1106
- * @license lucide-react v0.462.0 - ISC
1107
- *
1108
- * This source code is licensed under the ISC license.
1109
- * See the LICENSE file in the root directory of this source tree.
1110
- */
1111
- const Ii = y("MoveVertical", [
1112
- ["path", { d: "M12 2v20", key: "t6zp3m" }],
1113
- ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
1114
- ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
1115
- ]);
1116
- /**
1117
- * @license lucide-react v0.462.0 - ISC
1118
- *
1119
- * This source code is licensed under the ISC license.
1120
- * See the LICENSE file in the root directory of this source tree.
1121
- */
1122
- const Ri = y("Palette", [
1123
- ["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
1124
- ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
1125
- ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }],
1126
- ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
1127
- [
1128
- "path",
1129
- {
1130
- 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",
1131
- key: "12rzf8"
1132
- }
1133
- ]
1134
- ]);
1135
- /**
1136
- * @license lucide-react v0.462.0 - ISC
1137
- *
1138
- * This source code is licensed under the ISC license.
1139
- * See the LICENSE file in the root directory of this source tree.
1140
- */
1141
- const Li = y("Pause", [
1142
- ["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
1143
- ["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
1144
- ]);
1145
- /**
1146
- * @license lucide-react v0.462.0 - ISC
1147
- *
1148
- * This source code is licensed under the ISC license.
1149
- * See the LICENSE file in the root directory of this source tree.
1150
- */
1151
- const $i = y("PictureInPicture", [
1152
- [
1153
- "path",
1154
- {
1155
- d: "M8 4.5v5H3m-1-6 6 6m13 0v-3c0-1.16-.84-2-2-2h-7m-9 9v2c0 1.05.95 2 2 2h3",
1156
- key: "bcd8fb"
1157
- }
1158
- ],
1159
- ["rect", { width: "10", height: "7", x: "12", y: "13.5", ry: "2", key: "136fx3" }]
1160
- ]);
1161
- /**
1162
- * @license lucide-react v0.462.0 - ISC
1163
- *
1164
- * This source code is licensed under the ISC license.
1165
- * See the LICENSE file in the root directory of this source tree.
1166
- */
1167
- const Pi = y("Play", [
1168
- ["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
1169
- ]);
1170
- /**
1171
- * @license lucide-react v0.462.0 - ISC
1172
- *
1173
- * This source code is licensed under the ISC license.
1174
- * See the LICENSE file in the root directory of this source tree.
1175
- */
1176
- const Ei = y("Plus", [
1177
- ["path", { d: "M5 12h14", key: "1ays0h" }],
1178
- ["path", { d: "M12 5v14", key: "s699le" }]
1179
- ]);
1180
- /**
1181
- * @license lucide-react v0.462.0 - ISC
1182
- *
1183
- * This source code is licensed under the ISC license.
1184
- * See the LICENSE file in the root directory of this source tree.
1185
- */
1186
- const Ai = y("RefreshCcw", [
1187
- ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
1188
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
1189
- ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
1190
- ["path", { d: "M16 16h5v5", key: "ccwih5" }]
1191
- ]);
1192
- /**
1193
- * @license lucide-react v0.462.0 - ISC
1194
- *
1195
- * This source code is licensed under the ISC license.
1196
- * See the LICENSE file in the root directory of this source tree.
1197
- */
1198
- const Bi = y("RotateCcw", [
1199
- ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
1200
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
1201
- ]);
1202
- /**
1203
- * @license lucide-react v0.462.0 - ISC
1204
- *
1205
- * This source code is licensed under the ISC license.
1206
- * See the LICENSE file in the root directory of this source tree.
1207
- */
1208
- const Vi = y("RotateCw", [
1209
- ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
1210
- ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
1211
- ]);
1212
- /**
1213
- * @license lucide-react v0.462.0 - ISC
1214
- *
1215
- * This source code is licensed under the ISC license.
1216
- * See the LICENSE file in the root directory of this source tree.
1217
- */
1218
- const Fi = y("Settings", [
1219
- [
1220
- "path",
1221
- {
1222
- 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-.08a2 2 0 0 1-1-1.74v-.5a2 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",
1223
- key: "1qme2f"
1224
- }
1225
- ],
1226
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1227
- ]);
1228
- /**
1229
- * @license lucide-react v0.462.0 - ISC
1230
- *
1231
- * This source code is licensed under the ISC license.
1232
- * See the LICENSE file in the root directory of this source tree.
1233
- */
1234
- const Oi = y("SlidersHorizontal", [
1235
- ["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
1236
- ["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
1237
- ["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
1238
- ["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
1239
- ["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
1240
- ["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
1241
- ["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
1242
- ["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
1243
- ["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
1244
- ]);
1245
- /**
1246
- * @license lucide-react v0.462.0 - ISC
1247
- *
1248
- * This source code is licensed under the ISC license.
1249
- * See the LICENSE file in the root directory of this source tree.
1250
- */
1251
- const ji = y("Type", [
1252
- ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
1253
- ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
1254
- ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
1255
- ]);
1256
- /**
1257
- * @license lucide-react v0.462.0 - ISC
1258
- *
1259
- * This source code is licensed under the ISC license.
1260
- * See the LICENSE file in the root directory of this source tree.
1261
- */
1262
- const Hi = y("Upload", [
1263
- ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
1264
- ["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }],
1265
- ["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }]
1266
- ]);
1267
- /**
1268
- * @license lucide-react v0.462.0 - ISC
1269
- *
1270
- * This source code is licensed under the ISC license.
1271
- * See the LICENSE file in the root directory of this source tree.
1272
- */
1273
- const Di = y("Users", [
1274
- ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
1275
- ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
1276
- ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
1277
- ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
1278
- ]);
1279
- /**
1280
- * @license lucide-react v0.462.0 - ISC
1281
- *
1282
- * This source code is licensed under the ISC license.
1283
- * See the LICENSE file in the root directory of this source tree.
1284
- */
1285
- const Wi = y("Volume1", [
1286
- [
1287
- "path",
1288
- {
1289
- d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
1290
- key: "uqj9uw"
1291
- }
1292
- ],
1293
- ["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }]
1294
- ]);
1295
- /**
1296
- * @license lucide-react v0.462.0 - ISC
1297
- *
1298
- * This source code is licensed under the ISC license.
1299
- * See the LICENSE file in the root directory of this source tree.
1300
- */
1301
- const qi = y("Volume2", [
1302
- [
1303
- "path",
1304
- {
1305
- d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
1306
- key: "uqj9uw"
1307
- }
1308
- ],
1309
- ["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
1310
- ["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
1311
- ]);
1312
- /**
1313
- * @license lucide-react v0.462.0 - ISC
1314
- *
1315
- * This source code is licensed under the ISC license.
1316
- * See the LICENSE file in the root directory of this source tree.
1317
- */
1318
- const Ui = y("VolumeX", [
1319
- [
1320
- "path",
1321
- {
1322
- d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
1323
- key: "uqj9uw"
1324
- }
1325
- ],
1326
- ["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
1327
- ["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
1328
- ]);
1329
- /**
1330
- * @license lucide-react v0.462.0 - ISC
1331
- *
1332
- * This source code is licensed under the ISC license.
1333
- * See the LICENSE file in the root directory of this source tree.
1334
- */
1335
- const Gi = y("X", [
1336
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1337
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1338
- ]);
1339
- /**
1340
- * @license lucide-react v0.462.0 - ISC
1341
- *
1342
- * This source code is licensed under the ISC license.
1343
- * See the LICENSE file in the root directory of this source tree.
1344
- */
1345
- const _i = y("Zap", [
1346
- [
1347
- "path",
1348
- {
1349
- d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
1350
- key: "1xq2db"
1351
- }
1352
- ]
1353
- ]), ht = Pi, mt = Li, Xi = qi, Qi = Wi, Ji = Ui, Ki = Ni, Yi = zi, Zi = Fi, $e = bi, es = $i, ts = mi, is = gi, ss = Hi, ns = di, Re = ki, rs = pi, as = Di, os = vi, ls = Mi, cs = Ei, ds = Oi, us = ji, Ct = Ri, hs = yi, ms = Ii, fs = Ai, ps = ui, bs = fi, vs = xi, gs = hi, xs = Ci, ys = Si, ws = Ti, ks = _i, Ss = Gi, Cs = wi, ft = ({ className: o }) => /* @__PURE__ */ h("div", { className: `relative flex items-center justify-center ${o}`, children: [
1354
- /* @__PURE__ */ t(Bi, { className: "w-full h-full", strokeWidth: 2 }),
1355
- /* @__PURE__ */ t("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
1356
- ] }), pt = ({ className: o }) => /* @__PURE__ */ h("div", { className: `relative flex items-center justify-center ${o}`, children: [
1357
- /* @__PURE__ */ t(Vi, { className: "w-full h-full", strokeWidth: 2 }),
1358
- /* @__PURE__ */ t("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
1359
- ] }), Ns = ({ notifications: o }) => /* @__PURE__ */ t("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: o.map((e) => /* @__PURE__ */ h(
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(
827
+ "svg",
828
+ {
829
+ xmlns: "http://www.w3.org/2000/svg",
830
+ viewBox: o,
831
+ fill: i,
832
+ stroke: "currentColor",
833
+ strokeWidth: r,
834
+ strokeLinecap: "round",
835
+ strokeLinejoin: "round",
836
+ className: s,
837
+ children: t
838
+ }
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: [
840
+ /* @__PURE__ */ e("rect", { width: "4", height: "16", x: "6", y: "4", rx: "1" }),
841
+ /* @__PURE__ */ e("rect", { width: "4", height: "16", x: "14", y: "4", rx: "1" })
842
+ ] }), ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
843
+ /* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
844
+ /* @__PURE__ */ e("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
845
+ /* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
846
+ ] }), li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
847
+ /* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
848
+ /* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
849
+ ] }), ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
850
+ /* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
851
+ /* @__PURE__ */ e("line", { x1: "23", x2: "17", y1: "9", y2: "15" }),
852
+ /* @__PURE__ */ e("line", { x1: "17", x2: "23", y1: "9", y2: "15" })
853
+ ] }), di = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
854
+ /* @__PURE__ */ e("path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }),
855
+ /* @__PURE__ */ e("path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }),
856
+ /* @__PURE__ */ e("path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }),
857
+ /* @__PURE__ */ e("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
858
+ ] }), ui = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
859
+ /* @__PURE__ */ e("path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }),
860
+ /* @__PURE__ */ e("path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }),
861
+ /* @__PURE__ */ e("path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }),
862
+ /* @__PURE__ */ e("path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" })
863
+ ] }), hi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
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" }),
865
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
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: [
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" }),
868
+ /* @__PURE__ */ e("rect", { x: "12", y: "13", width: "10", height: "7", rx: "2" })
869
+ ] }), fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
870
+ /* @__PURE__ */ e("rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2" }),
871
+ /* @__PURE__ */ e("path", { d: "M7 15h4" }),
872
+ /* @__PURE__ */ e("path", { d: "M15 15h2" }),
873
+ /* @__PURE__ */ e("path", { d: "M7 11h2" }),
874
+ /* @__PURE__ */ e("path", { d: "M13 11h4" })
875
+ ] }), pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
876
+ /* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
877
+ /* @__PURE__ */ e("polyline", { points: "7 10 12 15 17 10" }),
878
+ /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "15", y2: "3" })
879
+ ] }), bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
880
+ /* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
881
+ /* @__PURE__ */ e("polyline", { points: "17 8 12 3 7 8" }),
882
+ /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
883
+ ] }), vi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
884
+ /* @__PURE__ */ e("path", { d: "m12 19-7-7 7-7" }),
885
+ /* @__PURE__ */ e("path", { d: "M19 12H5" })
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: [
887
+ /* @__PURE__ */ e("path", { d: "M2 16.1A5 5 0 0 1 5.9 20" }),
888
+ /* @__PURE__ */ e("path", { d: "M2 12.05A9 9 0 0 1 9.95 20" }),
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" }),
890
+ /* @__PURE__ */ e("line", { x1: "2", x2: "2.01", y1: "20", y2: "20" })
891
+ ] }), xi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
892
+ /* @__PURE__ */ e("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
893
+ /* @__PURE__ */ e("circle", { cx: "9", cy: "7", r: "4" }),
894
+ /* @__PURE__ */ e("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
895
+ /* @__PURE__ */ e("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
896
+ ] }), wi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
897
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
898
+ /* @__PURE__ */ e("polyline", { points: "12 6 12 12 16 14" })
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: [
900
+ /* @__PURE__ */ e("path", { d: "M5 12h14" }),
901
+ /* @__PURE__ */ e("path", { d: "M12 5v14" })
902
+ ] }), Si = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
903
+ /* @__PURE__ */ e("path", { d: "M4 21v-7" }),
904
+ /* @__PURE__ */ e("path", { d: "M4 10V3" }),
905
+ /* @__PURE__ */ e("path", { d: "M12 21v-9" }),
906
+ /* @__PURE__ */ e("path", { d: "M12 8V3" }),
907
+ /* @__PURE__ */ e("path", { d: "M20 21v-5" }),
908
+ /* @__PURE__ */ e("path", { d: "M20 12V3" }),
909
+ /* @__PURE__ */ e("path", { d: "M1 14h6" }),
910
+ /* @__PURE__ */ e("path", { d: "M9 8h6" }),
911
+ /* @__PURE__ */ e("path", { d: "M17 16h6" })
912
+ ] }), Ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
913
+ /* @__PURE__ */ e("polyline", { points: "4 7 4 4 20 4 20 7" }),
914
+ /* @__PURE__ */ e("line", { x1: "9", x2: "15", y1: "20", y2: "20" }),
915
+ /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "4", y2: "20" })
916
+ ] }), St = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
917
+ /* @__PURE__ */ e("circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor" }),
918
+ /* @__PURE__ */ e("circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor" }),
919
+ /* @__PURE__ */ e("circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor" }),
920
+ /* @__PURE__ */ e("circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor" }),
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" })
922
+ ] }), Ni = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
923
+ /* @__PURE__ */ e("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
924
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
925
+ ] }), Ti = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
926
+ /* @__PURE__ */ e("polyline", { points: "8 18 12 22 16 18" }),
927
+ /* @__PURE__ */ e("polyline", { points: "8 6 12 2 16 6" }),
928
+ /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "2", y2: "22" })
929
+ ] }), Mi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
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" }),
931
+ /* @__PURE__ */ e("path", { d: "M3 3v5h5" })
932
+ ] }), zi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
933
+ /* @__PURE__ */ e("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
934
+ /* @__PURE__ */ e("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
935
+ ] }), Ii = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
936
+ /* @__PURE__ */ e("path", { d: "m3 17 4-10 4 10" }),
937
+ /* @__PURE__ */ e("path", { d: "M4 13h6" }),
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" })
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: [
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" }),
941
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "13", r: "3" })
942
+ ] }), $i = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
943
+ /* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
944
+ /* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
945
+ ] }), Ei = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
946
+ /* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
947
+ /* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })
948
+ ] }), Pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
949
+ /* @__PURE__ */ e("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
950
+ /* @__PURE__ */ e("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
951
+ /* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
952
+ ] }), Fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
953
+ /* @__PURE__ */ e("polygon", { points: "13 19 22 12 13 5 13 19" }),
954
+ /* @__PURE__ */ e("polygon", { points: "2 19 11 12 2 5 2 19" })
955
+ ] }), Ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
956
+ /* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
957
+ /* @__PURE__ */ e("path", { d: "m6 6 12 12" })
958
+ ] }), Bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
959
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
960
+ /* @__PURE__ */ e("path", { d: "M12 16v-4" }),
961
+ /* @__PURE__ */ e("path", { d: "M12 8h.01" })
962
+ ] }), pt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
963
+ /* @__PURE__ */ l(x, { className: "w-full h-full", children: [
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" }),
965
+ /* @__PURE__ */ e("path", { d: "M3 3v5h5" })
966
+ ] }),
967
+ /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
968
+ ] }), bt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
969
+ /* @__PURE__ */ l(x, { className: "w-full h-full", children: [
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" }),
971
+ /* @__PURE__ */ e("path", { d: "M21 3v5h-5" })
972
+ ] }),
973
+ /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
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(
1360
975
  "div",
1361
976
  {
1362
977
  className: `
1363
978
  bg-zinc-950/90 backdrop-blur-md border border-white/10 text-white px-4 py-3 rounded-lg shadow-xl text-sm font-medium flex items-start gap-3 animate-in slide-in-from-left-2 fade-in duration-300 pointer-events-auto
1364
979
  w-fit max-w-full
1365
- ${e.type === "error" ? "border-red-500/50 text-red-100" : ""}
1366
- ${e.type === "warning" ? "border-amber-500/50 text-amber-100" : ""}
980
+ ${t.type === "error" ? "border-red-500/50 text-red-100" : ""}
981
+ ${t.type === "warning" ? "border-amber-500/50 text-amber-100" : ""}
1367
982
  `,
1368
983
  children: [
1369
- e.type === "loading" && /* @__PURE__ */ t(Re, { className: "w-4 h-4 animate-spin text-[var(--accent)] shrink-0 mt-0.5" }),
1370
- /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 min-w-0", children: [
1371
- /* @__PURE__ */ t("span", { className: "break-words line-clamp-4 leading-relaxed whitespace-pre-wrap", children: e.message }),
1372
- typeof e.progress == "number" && /* @__PURE__ */ t("div", { className: "h-1 w-full bg-white/10 rounded-full overflow-hidden mt-1.5", children: /* @__PURE__ */ t("div", { className: "h-full bg-[var(--accent)] transition-all duration-300", style: { width: `${e.progress}%` } }) })
984
+ t.type === "loading" && /* @__PURE__ */ e(Ie, { className: "w-4 h-4 animate-spin text-[var(--accent)] shrink-0 mt-0.5" }),
985
+ /* @__PURE__ */ l("div", { className: "flex flex-col gap-1 min-w-0", children: [
986
+ /* @__PURE__ */ e("span", { className: "break-words line-clamp-4 leading-relaxed whitespace-pre-wrap", children: t.message }),
987
+ typeof t.progress == "number" && /* @__PURE__ */ e("div", { className: "h-1 w-full bg-white/10 rounded-full overflow-hidden mt-1.5", children: /* @__PURE__ */ e("div", { className: "h-full bg-[var(--accent)] transition-all duration-300", style: { width: `${t.progress}%` } }) })
1373
988
  ] })
1374
989
  ]
1375
990
  },
1376
- e.id
1377
- )) }), zs = ({ cues: o, settings: e }) => {
1378
- if (e.useNative || o.length === 0) return null;
991
+ t.id
992
+ )) }), Oi = ({ cues: s, settings: t }) => {
993
+ if (t.useNative || s.length === 0) return null;
1379
994
  const i = () => {
1380
- switch (e.textStyle) {
995
+ switch (t.textStyle) {
1381
996
  case "outline":
1382
997
  return "0px 0px 4px black, 0px 0px 4px black";
1383
998
  case "raised":
@@ -1390,118 +1005,118 @@ const _i = y("Zap", [
1390
1005
  return "none";
1391
1006
  }
1392
1007
  };
1393
- return /* @__PURE__ */ t(
1008
+ return /* @__PURE__ */ e(
1394
1009
  "div",
1395
1010
  {
1396
1011
  className: "absolute inset-x-0 flex flex-col items-center justify-end text-center z-10 pointer-events-none transition-all duration-200",
1397
1012
  style: {
1398
- bottom: `${e.verticalOffset}px`
1013
+ bottom: `${t.verticalOffset}px`
1399
1014
  },
1400
- children: o.map((n, r) => /* @__PURE__ */ t(
1015
+ children: s.map((r, o) => /* @__PURE__ */ e(
1401
1016
  "div",
1402
1017
  {
1403
1018
  className: "mb-1 inline-block max-w-[80%]",
1404
1019
  style: {
1405
- fontSize: `${e.textSize}%`,
1406
- color: e.textColor,
1407
- fontWeight: e.isBold ? "bold" : "normal",
1408
- textTransform: e.fixCapitalization ? "capitalize" : "none",
1020
+ fontSize: `${t.textSize}%`,
1021
+ color: t.textColor,
1022
+ fontWeight: t.isBold ? "bold" : "normal",
1023
+ textTransform: t.fixCapitalization ? "capitalize" : "none",
1409
1024
  textShadow: i(),
1410
1025
  lineHeight: 1.4
1411
1026
  },
1412
- children: /* @__PURE__ */ t(
1027
+ children: /* @__PURE__ */ e(
1413
1028
  "span",
1414
1029
  {
1415
1030
  className: "px-2 py-0.5 rounded",
1416
1031
  style: {
1417
- backgroundColor: `rgba(0, 0, 0, ${e.backgroundOpacity / 100})`,
1418
- backdropFilter: e.backgroundBlur ? `blur(${e.backgroundBlurAmount}px)` : "none"
1032
+ backgroundColor: `rgba(0, 0, 0, ${t.backgroundOpacity / 100})`,
1033
+ backdropFilter: t.backgroundBlur ? `blur(${t.backgroundBlurAmount}px)` : "none"
1419
1034
  },
1420
- dangerouslySetInnerHTML: { __html: n }
1035
+ dangerouslySetInnerHTML: { __html: r }
1421
1036
  }
1422
1037
  )
1423
1038
  },
1424
- r
1039
+ o
1425
1040
  ))
1426
1041
  }
1427
1042
  );
1428
- }, Nt = ({ children: o, onClose: e, align: i = "right", maxHeight: n, className: r }) => {
1429
- const c = I(null), m = i === "center" ? "left-1/2 -translate-x-1/2 origin-bottom" : "right-0 origin-bottom-right", v = n ? { maxHeight: `${n}px` } : {};
1430
- return /* @__PURE__ */ t(
1043
+ }, Ct = ({ children: s, onClose: t, align: i = "right", maxHeight: r, className: o }) => {
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` } : {};
1045
+ return /* @__PURE__ */ e(
1431
1046
  "div",
1432
1047
  {
1433
- 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 ${r}`,
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}`,
1434
1049
  style: { ...v, borderRadius: "var(--radius-lg)" },
1435
- onClick: (x) => x.stopPropagation(),
1436
- children: /* @__PURE__ */ t("div", { className: "overflow-y-auto hide-scrollbar flex-1", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t("div", { ref: c, children: o }) })
1050
+ onClick: (w) => w.stopPropagation(),
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 }) })
1437
1052
  }
1438
1053
  );
1439
- }, bt = ({ content: o, className: e }) => typeof o == "string" ? o.trim().startsWith("<") ? /* @__PURE__ */ t("span", { className: e, dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ t("span", { className: e, children: o }) : /* @__PURE__ */ t("span", { className: e, children: o }), z = ({ label: o, value: e, active: i, onClick: n, hasSubmenu: r, icon: c }) => /* @__PURE__ */ h(
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(
1440
1055
  "button",
1441
1056
  {
1442
- onClick: n,
1057
+ onClick: r,
1443
1058
  className: "w-full flex items-center justify-between px-3 py-2.5 hover:bg-white/10 transition-colors text-left text-zinc-200 active:bg-white/5 focus:outline-none focus:bg-white/10 group overflow-hidden my-0.5",
1444
1059
  style: { borderRadius: "var(--radius)" },
1445
1060
  children: [
1446
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3 overflow-hidden", children: [
1447
- c && /* @__PURE__ */ t("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__ */ t(bt, { content: c }) }),
1448
- /* @__PURE__ */ t("span", { className: `font-medium truncate text-sm flex items-center ${i ? "text-[var(--accent)]" : ""}`, title: typeof o == "string" ? o : void 0, children: /* @__PURE__ */ t(bt, { content: o }) })
1061
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3 overflow-hidden", children: [
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 }) })
1449
1064
  ] }),
1450
- /* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-zinc-400 shrink-0", children: [
1451
- e && /* @__PURE__ */ t("span", { className: "text-xs font-medium truncate max-w-[60px]", title: e, children: e }),
1452
- i && /* @__PURE__ */ t($e, { className: "w-4 h-4 text-[var(--accent)] shrink-0" }),
1453
- r && /* @__PURE__ */ t("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
1065
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-zinc-400 shrink-0", children: [
1066
+ t && /* @__PURE__ */ e("span", { className: "text-xs font-medium truncate max-w-[60px]", title: t, children: t }),
1067
+ i && /* @__PURE__ */ e(Le, { className: "w-4 h-4 text-[var(--accent)] shrink-0" }),
1068
+ o && /* @__PURE__ */ e("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
1454
1069
  ] })
1455
1070
  ]
1456
1071
  }
1457
- ), H = ({ label: o, onBack: e, rightAction: i }) => /* @__PURE__ */ h(
1072
+ ), H = ({ label: s, onBack: t, rightAction: i }) => /* @__PURE__ */ l(
1458
1073
  "div",
1459
1074
  {
1460
1075
  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",
1461
1076
  style: { borderRadius: "var(--radius)" },
1462
1077
  children: [
1463
- /* @__PURE__ */ h(
1078
+ /* @__PURE__ */ l(
1464
1079
  "button",
1465
1080
  {
1466
1081
  className: "flex items-center gap-2 hover:text-white transition-colors focus:outline-none",
1467
- onClick: e,
1082
+ onClick: t,
1468
1083
  children: [
1469
- /* @__PURE__ */ t(ns, { className: "w-3 h-3" }),
1470
- /* @__PURE__ */ t("span", { children: o })
1084
+ /* @__PURE__ */ e(vi, { className: "w-3 h-3" }),
1085
+ /* @__PURE__ */ e("span", { children: s })
1471
1086
  ]
1472
1087
  }
1473
1088
  ),
1474
1089
  i
1475
1090
  ]
1476
1091
  }
1477
- ), vt = () => /* @__PURE__ */ t("div", { className: "h-px bg-white/5 mx-2 my-1" }), de = ({ content: o }) => typeof o == "string" ? o.trim().startsWith("<") ? /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ t("span", { children: o }) : /* @__PURE__ */ t(L, { children: o }), K = ({ label: o, checked: e, onChange: i, icon: n, tooltip: r }) => /* @__PURE__ */ h(
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(
1478
1093
  "div",
1479
1094
  {
1480
1095
  className: "flex items-center justify-between py-2.5 px-3 hover:bg-white/5 group transition-colors",
1481
1096
  style: { borderRadius: "var(--radius)" },
1482
1097
  children: [
1483
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3", children: [
1484
- n && /* @__PURE__ */ t("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ t(de, { content: n }) }),
1485
- /* @__PURE__ */ h("div", { className: "flex flex-col", children: [
1486
- /* @__PURE__ */ t("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors flex items-center", children: /* @__PURE__ */ t(de, { content: o }) }),
1487
- r && /* @__PURE__ */ t("span", { className: "text-[10px] text-zinc-500", children: r })
1098
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
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 }) }),
1100
+ /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
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 }) }),
1102
+ o && /* @__PURE__ */ e("span", { className: "text-[10px] text-zinc-500", children: o })
1488
1103
  ] })
1489
1104
  ] }),
1490
- /* @__PURE__ */ t(
1105
+ /* @__PURE__ */ e(
1491
1106
  "button",
1492
1107
  {
1493
- onClick: () => i(!e),
1494
- className: `w-11 h-6 shrink-0 transition-colors relative focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 ${e ? "bg-[var(--accent)]" : "bg-zinc-700"}`,
1108
+ onClick: () => i(!t),
1109
+ className: `w-11 h-6 shrink-0 transition-colors relative focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 ${t ? "bg-[var(--accent)]" : "bg-zinc-700"}`,
1495
1110
  style: {
1496
1111
  "--tw-ring-color": "var(--accent)",
1497
1112
  borderRadius: "var(--radius-full)",
1498
1113
  borderWidth: "var(--border-width)",
1499
1114
  borderColor: "rgba(255,255,255,0.1)"
1500
1115
  },
1501
- children: /* @__PURE__ */ t(
1116
+ children: /* @__PURE__ */ e(
1502
1117
  "div",
1503
1118
  {
1504
- className: `absolute top-1/2 -translate-y-1/2 left-0.5 bg-white w-4 h-4 transition-transform shadow-sm ${e ? "translate-x-5" : "translate-x-0"}`,
1119
+ className: `absolute top-1/2 -translate-y-1/2 left-0.5 bg-white w-4 h-4 transition-transform shadow-sm ${t ? "translate-x-5" : "translate-x-0"}`,
1505
1120
  style: { borderRadius: "var(--radius-full)" }
1506
1121
  }
1507
1122
  )
@@ -1509,45 +1124,45 @@ const _i = y("Zap", [
1509
1124
  )
1510
1125
  ]
1511
1126
  }
1512
- ), ce = ({ label: o, value: e, min: i, max: n, step: r, onChange: c, formatValue: m, icon: v }) => /* @__PURE__ */ h(
1127
+ ), ce = ({ label: s, value: t, min: i, max: r, step: o, onChange: d, formatValue: m, icon: v }) => /* @__PURE__ */ l(
1513
1128
  "div",
1514
1129
  {
1515
1130
  className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
1516
1131
  style: { borderRadius: "var(--radius)" },
1517
1132
  children: [
1518
- /* @__PURE__ */ h("div", { className: "flex justify-between items-center mb-2", children: [
1519
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3", children: [
1520
- v && /* @__PURE__ */ t("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ t(de, { content: v }) }),
1521
- /* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: o })
1133
+ /* @__PURE__ */ l("div", { className: "flex justify-between items-center mb-2", children: [
1134
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
1135
+ v && /* @__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: v }) }),
1136
+ /* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
1522
1137
  ] }),
1523
- /* @__PURE__ */ t(
1138
+ /* @__PURE__ */ e(
1524
1139
  "span",
1525
1140
  {
1526
1141
  className: "text-[10px] font-mono font-medium text-zinc-300 bg-white/10 px-1.5 py-0.5 tabular-nums",
1527
1142
  style: { borderRadius: "var(--radius-sm)" },
1528
- children: m ? m(e) : e
1143
+ children: m ? m(t) : t
1529
1144
  }
1530
1145
  )
1531
1146
  ] }),
1532
- /* @__PURE__ */ h("div", { className: "relative h-4 flex items-center px-1", children: [
1533
- /* @__PURE__ */ t(
1147
+ /* @__PURE__ */ l("div", { className: "relative h-4 flex items-center px-1", children: [
1148
+ /* @__PURE__ */ e(
1534
1149
  "input",
1535
1150
  {
1536
1151
  type: "range",
1537
1152
  min: i,
1538
- max: n,
1539
- step: r,
1540
- value: e,
1541
- onChange: (x) => c(parseFloat(x.target.value)),
1153
+ max: r,
1154
+ step: o,
1155
+ value: t,
1156
+ onChange: (w) => d(parseFloat(w.target.value)),
1542
1157
  className: "w-full h-1.5 appearance-none cursor-pointer focus:outline-none focus:ring-2 strata-range-input",
1543
1158
  style: {
1544
1159
  borderRadius: "var(--radius-full)",
1545
- background: `linear-gradient(to right, var(--accent) 0%, var(--accent) ${(e - i) / (n - i) * 100}%, #3f3f46 ${(e - i) / (n - i) * 100}%, #3f3f46 100%)`,
1160
+ background: `linear-gradient(to right, var(--accent) 0%, var(--accent) ${(t - i) / (r - i) * 100}%, #3f3f46 ${(t - i) / (r - i) * 100}%, #3f3f46 100%)`,
1546
1161
  "--tw-ring-color": "var(--accent)"
1547
1162
  }
1548
1163
  }
1549
1164
  ),
1550
- /* @__PURE__ */ t("style", { children: `
1165
+ /* @__PURE__ */ e("style", { children: `
1551
1166
  .strata-range-input::-webkit-slider-thumb {
1552
1167
  -webkit-appearance: none;
1553
1168
  height: 14px;
@@ -1567,151 +1182,151 @@ const _i = y("Zap", [
1567
1182
  ] })
1568
1183
  ]
1569
1184
  }
1570
- ), Ms = ({ label: o, value: e, options: i, onChange: n, icon: r }) => /* @__PURE__ */ h(
1185
+ ), ji = ({ label: s, value: t, options: i, onChange: r, icon: o }) => /* @__PURE__ */ l(
1571
1186
  "div",
1572
1187
  {
1573
1188
  className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
1574
1189
  style: { borderRadius: "var(--radius)" },
1575
1190
  children: [
1576
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3 mb-2", children: [
1577
- r && /* @__PURE__ */ t("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ t(de, { content: r }) }),
1578
- /* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: o })
1191
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3 mb-2", children: [
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 }) }),
1193
+ /* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
1579
1194
  ] }),
1580
- /* @__PURE__ */ h("div", { className: "relative", children: [
1581
- /* @__PURE__ */ t(
1195
+ /* @__PURE__ */ l("div", { className: "relative", children: [
1196
+ /* @__PURE__ */ e(
1582
1197
  "select",
1583
1198
  {
1584
- value: e,
1585
- onChange: (c) => n(c.target.value),
1199
+ value: t,
1200
+ onChange: (d) => r(d.target.value),
1586
1201
  className: "w-full bg-zinc-800 border-[length:var(--border-width)] border-white/10 px-3 py-2 text-sm text-zinc-200 focus:outline-none focus:ring-2 appearance-none hover:bg-zinc-700 transition-colors cursor-pointer",
1587
1202
  style: { "--tw-ring-color": "var(--accent)", borderRadius: "var(--radius)" },
1588
- children: i.map((c) => /* @__PURE__ */ t("option", { value: c.value, children: c.label }, c.value))
1203
+ children: i.map((d) => /* @__PURE__ */ e("option", { value: d.value, children: d.label }, d.value))
1589
1204
  }
1590
1205
  ),
1591
- /* @__PURE__ */ t("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-zinc-400", children: /* @__PURE__ */ t("svg", { width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M1 1L5 5L9 1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
1206
+ /* @__PURE__ */ e("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-zinc-400", children: /* @__PURE__ */ e("svg", { width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M1 1L5 5L9 1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
1592
1207
  ] })
1593
1208
  ]
1594
1209
  }
1595
- ), Y = ({ title: o, children: e }) => /* @__PURE__ */ h("div", { className: "py-2", children: [
1596
- o && /* @__PURE__ */ t("h4", { className: "px-3 text-[10px] font-bold text-[var(--accent)] uppercase tracking-wider mb-1 mt-2", children: o }),
1597
- /* @__PURE__ */ t("div", { className: "space-y-0.5", children: e })
1598
- ] }), Ts = ({ tracks: o, current: e, onSelect: i, onUpload: n, onClose: r, settings: c, onSettingsChange: m, onReset: v, offset: x, onOffsetChange: b, maxHeight: d, animationClass: w }) => {
1599
- const [k, T] = C("main"), R = I(null);
1600
- return /* @__PURE__ */ h(Nt, { onClose: r, align: "right", maxHeight: d, className: w, children: [
1601
- k === "main" && /* @__PURE__ */ h("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
1602
- /* @__PURE__ */ t(
1210
+ ), Y = ({ title: s, children: t }) => /* @__PURE__ */ l("div", { className: "py-2", children: [
1211
+ s && /* @__PURE__ */ e("h4", { className: "px-3 text-[10px] font-bold text-[var(--accent)] uppercase tracking-wider mb-1 mt-2", children: s }),
1212
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t })
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: [
1216
+ k === "main" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
1217
+ /* @__PURE__ */ e(
1603
1218
  "div",
1604
1219
  {
1605
1220
  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",
1606
1221
  style: { borderRadius: "var(--radius)" },
1607
- children: /* @__PURE__ */ t("span", { children: "Subtitles" })
1222
+ children: /* @__PURE__ */ e("span", { children: "Subtitles" })
1608
1223
  }
1609
1224
  ),
1610
- /* @__PURE__ */ h("div", { children: [
1611
- /* @__PURE__ */ t(
1612
- z,
1225
+ /* @__PURE__ */ l("div", { children: [
1226
+ /* @__PURE__ */ e(
1227
+ T,
1613
1228
  {
1614
1229
  label: "Upload Subtitle",
1615
- icon: /* @__PURE__ */ t(ss, { className: "w-4 h-4" }),
1230
+ icon: /* @__PURE__ */ e(bi, { className: "w-4 h-4" }),
1616
1231
  onClick: () => {
1617
1232
  var p;
1618
1233
  return (p = R.current) == null ? void 0 : p.click();
1619
1234
  }
1620
1235
  }
1621
1236
  ),
1622
- /* @__PURE__ */ t("input", { type: "file", accept: ".vtt,.srt", ref: R, className: "hidden", onChange: (p) => {
1623
- var D;
1624
- (D = p.target.files) != null && D[0] && n(p.target.files[0]);
1237
+ /* @__PURE__ */ e("input", { type: "file", accept: ".vtt,.srt", ref: R, className: "hidden", onChange: (p) => {
1238
+ var W;
1239
+ (W = p.target.files) != null && W[0] && r(p.target.files[0]);
1625
1240
  } }),
1626
- /* @__PURE__ */ t(
1627
- z,
1241
+ /* @__PURE__ */ e(
1242
+ T,
1628
1243
  {
1629
1244
  label: "Customize",
1630
- icon: /* @__PURE__ */ t(ds, { className: "w-4 h-4" }),
1631
- onClick: () => T("customize"),
1245
+ icon: /* @__PURE__ */ e(Si, { className: "w-4 h-4" }),
1246
+ onClick: () => z("customize"),
1632
1247
  hasSubmenu: !0
1633
1248
  }
1634
1249
  ),
1635
- /* @__PURE__ */ t("div", { className: "h-px bg-white/5 mx-2 my-1" }),
1636
- /* @__PURE__ */ t(
1637
- z,
1250
+ /* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }),
1251
+ /* @__PURE__ */ e(
1252
+ T,
1638
1253
  {
1639
1254
  label: "Off",
1640
- active: e === -1,
1255
+ active: t === -1,
1641
1256
  onClick: () => {
1642
- i(-1), r();
1257
+ i(-1), o();
1643
1258
  }
1644
1259
  }
1645
1260
  ),
1646
- o.map((p) => /* @__PURE__ */ t(
1647
- z,
1261
+ s.map((p) => /* @__PURE__ */ e(
1262
+ T,
1648
1263
  {
1649
1264
  label: p.label,
1650
1265
  value: p.language,
1651
- active: e === p.index,
1266
+ active: t === p.index,
1652
1267
  onClick: () => {
1653
- i(p.index), r();
1268
+ i(p.index), o();
1654
1269
  }
1655
1270
  },
1656
1271
  p.index
1657
1272
  ))
1658
1273
  ] })
1659
1274
  ] }),
1660
- k === "customize" && /* @__PURE__ */ h("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
1661
- /* @__PURE__ */ t(
1275
+ k === "customize" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
1276
+ /* @__PURE__ */ e(
1662
1277
  H,
1663
1278
  {
1664
1279
  label: "Customize",
1665
- onBack: () => T("main"),
1666
- rightAction: /* @__PURE__ */ t("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__ */ t(fs, { className: "w-4 h-4" }) })
1280
+ onBack: () => z("main"),
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" }) })
1667
1282
  }
1668
1283
  ),
1669
- /* @__PURE__ */ h("div", { className: "pb-1", children: [
1670
- /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
1284
+ /* @__PURE__ */ l("div", { className: "pb-1", children: [
1285
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
1671
1286
  K,
1672
1287
  {
1673
1288
  label: "Native Video Subtitle",
1674
- checked: c.useNative,
1289
+ checked: d.useNative,
1675
1290
  onChange: (p) => m({ useNative: p })
1676
1291
  }
1677
1292
  ) }),
1678
- !c.useNative && /* @__PURE__ */ h(L, { children: [
1679
- /* @__PURE__ */ h(Y, { title: "Sync & Position", children: [
1680
- /* @__PURE__ */ h("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
1681
- /* @__PURE__ */ t("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-3", children: [
1682
- /* @__PURE__ */ t(os, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
1683
- /* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Sync Offset" })
1293
+ !d.useNative && /* @__PURE__ */ l(L, { children: [
1294
+ /* @__PURE__ */ l(Y, { title: "Sync & Position", children: [
1295
+ /* @__PURE__ */ l("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
1296
+ /* @__PURE__ */ e("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
1297
+ /* @__PURE__ */ e(wi, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
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" })
1684
1299
  ] }) }),
1685
- /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1686
- /* @__PURE__ */ t(
1300
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
1301
+ /* @__PURE__ */ e(
1687
1302
  "button",
1688
1303
  {
1689
- onClick: () => b(Math.round((x - 0.1) * 10) / 10),
1304
+ onClick: () => b(Math.round((w - 0.1) * 10) / 10),
1690
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",
1691
- children: /* @__PURE__ */ t(ls, { className: "w-4 h-4" })
1306
+ children: /* @__PURE__ */ e(yi, { className: "w-4 h-4" })
1692
1307
  }
1693
1308
  ),
1694
- /* @__PURE__ */ h("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: [
1695
- x > 0 ? "+" : "",
1696
- (x == null ? void 0 : x.toFixed(1)) || "0.0",
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: [
1310
+ w > 0 ? "+" : "",
1311
+ (w == null ? void 0 : w.toFixed(1)) || "0.0",
1697
1312
  "s"
1698
1313
  ] }),
1699
- /* @__PURE__ */ t(
1314
+ /* @__PURE__ */ e(
1700
1315
  "button",
1701
1316
  {
1702
- onClick: () => b(Math.round((x + 0.1) * 10) / 10),
1317
+ onClick: () => b(Math.round((w + 0.1) * 10) / 10),
1703
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",
1704
- children: /* @__PURE__ */ t(cs, { className: "w-4 h-4" })
1319
+ children: /* @__PURE__ */ e(ki, { className: "w-4 h-4" })
1705
1320
  }
1706
1321
  )
1707
1322
  ] })
1708
1323
  ] }),
1709
- /* @__PURE__ */ t(
1324
+ /* @__PURE__ */ e(
1710
1325
  ce,
1711
1326
  {
1712
1327
  label: "Vertical Position",
1713
- icon: /* @__PURE__ */ t(ms, { className: "w-4 h-4" }),
1714
- value: c.verticalOffset,
1328
+ icon: /* @__PURE__ */ e(Ti, { className: "w-4 h-4" }),
1329
+ value: d.verticalOffset,
1715
1330
  min: 0,
1716
1331
  max: 200,
1717
1332
  step: 5,
@@ -1720,13 +1335,13 @@ const _i = y("Zap", [
1720
1335
  }
1721
1336
  )
1722
1337
  ] }),
1723
- /* @__PURE__ */ h(Y, { title: "Appearance", children: [
1724
- /* @__PURE__ */ t(
1338
+ /* @__PURE__ */ l(Y, { title: "Appearance", children: [
1339
+ /* @__PURE__ */ e(
1725
1340
  ce,
1726
1341
  {
1727
1342
  label: "Text Size",
1728
- icon: /* @__PURE__ */ t(us, { className: "w-4 h-4" }),
1729
- value: c.textSize,
1343
+ icon: /* @__PURE__ */ e(Ci, { className: "w-4 h-4" }),
1344
+ value: d.textSize,
1730
1345
  min: 50,
1731
1346
  max: 200,
1732
1347
  step: 10,
@@ -1734,38 +1349,38 @@ const _i = y("Zap", [
1734
1349
  formatValue: (p) => `${p}%`
1735
1350
  }
1736
1351
  ),
1737
- /* @__PURE__ */ h("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
1738
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3 mb-2", children: [
1739
- /* @__PURE__ */ t(Ct, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
1740
- /* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Text Color" })
1352
+ /* @__PURE__ */ l("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
1353
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3 mb-2", children: [
1354
+ /* @__PURE__ */ e(St, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
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" })
1741
1356
  ] }),
1742
- /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 p-1 bg-zinc-800/50 rounded-lg", children: [
1743
- ["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((p) => /* @__PURE__ */ t(
1357
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2 p-1 bg-zinc-800/50 rounded-lg", children: [
1358
+ ["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((p) => /* @__PURE__ */ e(
1744
1359
  "button",
1745
1360
  {
1746
1361
  onClick: () => m({ textColor: p }),
1747
- className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${c.textColor === p ? "ring-2 scale-110" : ""}`,
1362
+ className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${d.textColor === p ? "ring-2 scale-110" : ""}`,
1748
1363
  style: { backgroundColor: p, "--tw-ring-color": "var(--accent)" }
1749
1364
  },
1750
1365
  p
1751
1366
  )),
1752
- /* @__PURE__ */ t("div", { className: "w-px h-6 bg-white/10 mx-1" }),
1753
- /* @__PURE__ */ t("div", { className: "relative w-6 h-6 rounded-full overflow-hidden ring-1 ring-white/20 cursor-pointer", children: /* @__PURE__ */ t(
1367
+ /* @__PURE__ */ e("div", { className: "w-px h-6 bg-white/10 mx-1" }),
1368
+ /* @__PURE__ */ e("div", { className: "relative w-6 h-6 rounded-full overflow-hidden ring-1 ring-white/20 cursor-pointer", children: /* @__PURE__ */ e(
1754
1369
  "input",
1755
1370
  {
1756
1371
  type: "color",
1757
- value: c.textColor,
1372
+ value: d.textColor,
1758
1373
  onChange: (p) => m({ textColor: p.target.value }),
1759
1374
  className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0"
1760
1375
  }
1761
1376
  ) })
1762
1377
  ] })
1763
1378
  ] }),
1764
- /* @__PURE__ */ t(
1765
- Ms,
1379
+ /* @__PURE__ */ e(
1380
+ ji,
1766
1381
  {
1767
1382
  label: "Text Style",
1768
- value: c.textStyle,
1383
+ value: d.textStyle,
1769
1384
  options: [
1770
1385
  { label: "None", value: "none" },
1771
1386
  { label: "Outline", value: "outline" },
@@ -1776,18 +1391,18 @@ const _i = y("Zap", [
1776
1391
  onChange: (p) => m({ textStyle: p })
1777
1392
  }
1778
1393
  ),
1779
- /* @__PURE__ */ h("div", { className: "grid grid-cols-2 gap-2 mt-1 px-1", children: [
1780
- /* @__PURE__ */ t(K, { label: "Bold", icon: /* @__PURE__ */ t(ps, { className: "w-4 h-4" }), checked: c.isBold, onChange: (p) => m({ isBold: p }) }),
1781
- /* @__PURE__ */ t(K, { label: "Fix Caps", icon: /* @__PURE__ */ t(bs, { className: "w-4 h-4" }), checked: c.fixCapitalization, onChange: (p) => m({ fixCapitalization: p }) })
1394
+ /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-2 mt-1 px-1", children: [
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 }) })
1782
1397
  ] })
1783
1398
  ] }),
1784
- /* @__PURE__ */ h(Y, { title: "Background", children: [
1785
- /* @__PURE__ */ t(
1399
+ /* @__PURE__ */ l(Y, { title: "Background", children: [
1400
+ /* @__PURE__ */ e(
1786
1401
  ce,
1787
1402
  {
1788
1403
  label: "Opacity",
1789
- icon: /* @__PURE__ */ t(hs, { className: "w-4 h-4" }),
1790
- value: c.backgroundOpacity,
1404
+ icon: /* @__PURE__ */ e(Ni, { className: "w-4 h-4" }),
1405
+ value: d.backgroundOpacity,
1791
1406
  min: 0,
1792
1407
  max: 100,
1793
1408
  step: 5,
@@ -1795,12 +1410,12 @@ const _i = y("Zap", [
1795
1410
  formatValue: (p) => `${p}%`
1796
1411
  }
1797
1412
  ),
1798
- /* @__PURE__ */ t(K, { label: "Blur Background", icon: /* @__PURE__ */ t(vs, { className: "w-4 h-4" }), checked: c.backgroundBlur, onChange: (p) => m({ backgroundBlur: p }) }),
1799
- c.backgroundBlur && /* @__PURE__ */ t(
1413
+ /* @__PURE__ */ e(K, { label: "Blur Background", icon: /* @__PURE__ */ e(Ri, { className: "w-4 h-4" }), checked: d.backgroundBlur, onChange: (p) => m({ backgroundBlur: p }) }),
1414
+ d.backgroundBlur && /* @__PURE__ */ e(
1800
1415
  ce,
1801
1416
  {
1802
1417
  label: "Blur Intensity",
1803
- value: c.backgroundBlurAmount,
1418
+ value: d.backgroundBlurAmount,
1804
1419
  min: 0,
1805
1420
  max: 20,
1806
1421
  step: 1,
@@ -1813,30 +1428,30 @@ const _i = y("Zap", [
1813
1428
  ] })
1814
1429
  ] })
1815
1430
  ] });
1816
- }, Me = ({ content: o }) => typeof o == "string" ? o.trim().startsWith("<") ? /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ t("span", { children: o }) : /* @__PURE__ */ t(L, { children: o }), Is = ({ x: o, y: e, items: i, onClose: n, containerWidth: r, containerHeight: c }) => {
1817
- const m = I(null), [v, x] = C({
1818
- top: e,
1819
- left: o,
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({
1433
+ top: t,
1434
+ left: s,
1820
1435
  opacity: 0
1821
1436
  });
1822
- return Yt(() => {
1437
+ return Kt(() => {
1823
1438
  if (!m.current) return;
1824
- const b = m.current.getBoundingClientRect(), d = b.width, w = b.height;
1825
- let k = o, T = e;
1826
- o + d > r - 10 && (k = o - d), k < 10 && (k = 10), k + d > r && (k = Math.max(10, r - d - 10)), e + w > c - 10 && (T = e - w);
1827
- let R = c - 20;
1828
- T < 10 && (T = 10), T + w > c - 10 && (T = Math.max(10, c - w - 10)), x({
1829
- top: T,
1439
+ const b = m.current.getBoundingClientRect(), h = b.width, y = b.height;
1440
+ let k = s, z = t;
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);
1442
+ let R = d - 20;
1443
+ z < 10 && (z = 10), z + y > d - 10 && (z = Math.max(10, d - y - 10)), w({
1444
+ top: z,
1830
1445
  left: k,
1831
1446
  maxHeight: R,
1832
1447
  opacity: 1
1833
1448
  });
1834
- }, [o, e, i, r, c]), E(() => {
1835
- const b = (d) => {
1836
- m.current && !m.current.contains(d.target) && n();
1449
+ }, [s, t, i, o, d]), P(() => {
1450
+ const b = (h) => {
1451
+ m.current && !m.current.contains(h.target) && r();
1837
1452
  };
1838
1453
  return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
1839
- }, [n]), /* @__PURE__ */ t(
1454
+ }, [r]), /* @__PURE__ */ e(
1840
1455
  "div",
1841
1456
  {
1842
1457
  ref: m,
@@ -1849,37 +1464,37 @@ const _i = y("Zap", [
1849
1464
  borderRadius: "var(--radius-lg)"
1850
1465
  },
1851
1466
  onClick: (b) => b.stopPropagation(),
1852
- children: i.map((b, d) => b.separator ? /* @__PURE__ */ t("div", { className: "h-0 border-t border-white/10 mx-2 my-1.5" }, d) : b.isLabel ? /* @__PURE__ */ t("div", { className: "px-3 py-1.5 text-[10px] font-bold text-zinc-500 uppercase tracking-wider select-none", children: /* @__PURE__ */ t(Me, { content: b.html || "" }) }, d) : /* @__PURE__ */ h(Te.Fragment, { children: [
1853
- /* @__PURE__ */ h(
1467
+ children: i.map((b, h) => b.separator ? /* @__PURE__ */ e("div", { className: "h-0 border-t border-white/10 mx-2 my-1.5" }, h) : b.isLabel ? /* @__PURE__ */ e("div", { className: "px-3 py-1.5 text-[10px] font-bold text-zinc-500 uppercase tracking-wider select-none", children: /* @__PURE__ */ e(Me, { content: b.html || "" }) }, h) : /* @__PURE__ */ l(ze.Fragment, { children: [
1468
+ /* @__PURE__ */ l(
1854
1469
  "button",
1855
1470
  {
1856
1471
  onClick: () => {
1857
- b.disabled || (b.click ? b.click(n) : b.onClick && b.onClick(n));
1472
+ b.disabled || (b.click ? b.click(r) : b.onClick && b.onClick(r));
1858
1473
  },
1859
1474
  disabled: b.disabled,
1860
1475
  className: "w-full text-left px-3 py-2.5 flex items-center justify-between hover:bg-white/10 focus:bg-white/10 focus:outline-none transition-colors text-sm text-zinc-200 disabled:opacity-50 disabled:cursor-not-allowed group my-0.5",
1861
1476
  style: { borderRadius: "var(--radius)" },
1862
1477
  children: [
1863
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3 overflow-hidden", children: [
1864
- b.icon && /* @__PURE__ */ t("span", { className: "text-zinc-400 w-4 h-4 flex items-center justify-center shrink-0 group-hover:text-zinc-300 transition-colors", children: /* @__PURE__ */ t(Me, { content: b.icon }) }),
1865
- /* @__PURE__ */ t("span", { className: `flex items-center font-medium truncate ${b.checked ? "text-[var(--accent)]" : ""}`, children: /* @__PURE__ */ t(Me, { content: b.html || "" }) })
1478
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3 overflow-hidden", children: [
1479
+ b.icon && /* @__PURE__ */ e("span", { className: "text-zinc-400 w-4 h-4 flex items-center justify-center shrink-0 group-hover:text-zinc-300 transition-colors", children: /* @__PURE__ */ e(Me, { content: b.icon }) }),
1480
+ /* @__PURE__ */ e("span", { className: `flex items-center font-medium truncate ${b.checked ? "text-[var(--accent)]" : ""}`, children: /* @__PURE__ */ e(Me, { content: b.html || "" }) })
1866
1481
  ] }),
1867
- b.checked && /* @__PURE__ */ t($e, { className: "w-4 h-4 text-[var(--accent)] shrink-0 ml-2" })
1482
+ b.checked && /* @__PURE__ */ e(Le, { className: "w-4 h-4 text-[var(--accent)] shrink-0 ml-2" })
1868
1483
  ]
1869
1484
  }
1870
1485
  ),
1871
- b.showBorder && /* @__PURE__ */ t("div", { className: "h-0 border-t border-white/10 mx-2 my-1" })
1872
- ] }, d))
1486
+ b.showBorder && /* @__PURE__ */ e("div", { className: "h-0 border-t border-white/10 mx-2 my-1" })
1487
+ ] }, h))
1873
1488
  }
1874
1489
  );
1875
- }, Rs = ({ player: o, onClose: e }) => {
1876
- const [i, n] = C({});
1877
- return E(() => {
1878
- const r = () => {
1879
- var x;
1880
- if (!o.video) return;
1881
- const m = o.video, v = m.getVideoPlaybackQuality ? m.getVideoPlaybackQuality() : null;
1882
- n({
1490
+ }, Di = ({ player: s, onClose: t }) => {
1491
+ const [i, r] = N({});
1492
+ return P(() => {
1493
+ const o = () => {
1494
+ var w;
1495
+ if (!s.video) return;
1496
+ const m = s.video, v = m.getVideoPlaybackQuality ? m.getVideoPlaybackQuality() : null;
1497
+ r({
1883
1498
  "Player Size": `${m.offsetWidth} x ${m.offsetHeight}`,
1884
1499
  "Video Resolution": `${m.videoWidth} x ${m.videoHeight}`,
1885
1500
  "Current Time": `${m.currentTime.toFixed(3)}s`,
@@ -1887,211 +1502,214 @@ const _i = y("Zap", [
1887
1502
  Volume: `${Math.round(m.volume * 100)}%`,
1888
1503
  "Dropped Frames": v ? v.droppedVideoFrames : "N/A",
1889
1504
  Buffer: m.buffered.length > 0 ? `${(m.buffered.end(m.buffered.length - 1) - m.currentTime).toFixed(2)}s` : "0s",
1890
- Engine: ((x = o.store.get().sources[o.store.get().currentSourceIndex]) == null ? void 0 : x.type) || "native",
1505
+ Engine: ((w = s.store.get().sources[s.store.get().currentSourceIndex]) == null ? void 0 : w.type) || "native",
1891
1506
  URL: m.currentSrc
1892
1507
  });
1893
1508
  };
1894
- r();
1895
- const c = setInterval(r, 1e3);
1896
- return () => clearInterval(c);
1897
- }, [o]), /* @__PURE__ */ t("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__ */ h(
1509
+ o();
1510
+ const d = setInterval(o, 1e3);
1511
+ return () => clearInterval(d);
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(
1898
1513
  "div",
1899
1514
  {
1900
1515
  className: "bg-[var(--bg-panel)] border border-white/10 rounded-xl w-full max-w-md shadow-2xl relative font-mono text-xs text-zinc-300 flex flex-col",
1901
1516
  style: { borderRadius: "var(--radius)", maxHeight: "90%" },
1902
1517
  children: [
1903
- /* @__PURE__ */ h("div", { className: "p-5 pb-0 flex-shrink-0 relative", children: [
1904
- /* @__PURE__ */ t(
1518
+ /* @__PURE__ */ l("div", { className: "p-5 pb-0 flex-shrink-0 relative", children: [
1519
+ /* @__PURE__ */ e(
1905
1520
  "button",
1906
1521
  {
1907
- onClick: (r) => {
1908
- r.stopPropagation(), e();
1522
+ onClick: (o) => {
1523
+ o.stopPropagation(), t();
1909
1524
  },
1910
1525
  className: "absolute top-3 right-3 p-1.5 text-zinc-400 hover:text-white hover:bg-white/10 rounded-full transition-colors",
1911
- children: /* @__PURE__ */ t(Ss, { className: "w-4 h-4" })
1526
+ children: /* @__PURE__ */ e(Ai, { className: "w-4 h-4" })
1912
1527
  }
1913
1528
  ),
1914
- /* @__PURE__ */ t("h3", { className: "text-sm font-bold text-white mb-4 uppercase tracking-wider border-b border-white/10 pb-2", children: "Video Statistics" })
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" })
1915
1530
  ] }),
1916
- /* @__PURE__ */ t("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(([r, c]) => /* @__PURE__ */ h("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-1", children: [
1917
- /* @__PURE__ */ t("span", { className: "text-zinc-500 font-bold shrink-0", children: r }),
1918
- /* @__PURE__ */ t("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(c), children: String(c) })
1919
- ] }, r)) })
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 }),
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) })
1534
+ ] }, o)) })
1920
1535
  ]
1921
1536
  }
1922
1537
  ) });
1923
- }, Ls = [
1538
+ }, Ui = [
1924
1539
  { label: "Strata", value: "#6366f1" },
1925
1540
  { label: "Emerald", value: "#10b981" },
1926
1541
  { label: "Rose", value: "#f43f5e" },
1927
1542
  { label: "Amber", value: "#f59e0b" },
1928
1543
  { label: "Sky", value: "#0ea5e9" },
1929
1544
  { label: "Violet", value: "#8b5cf6" }
1930
- ], $s = [
1545
+ ], Gi = [
1931
1546
  { label: "Default", value: "default", color: "#6366f1" },
1932
1547
  { label: "Pixel", value: "pixel", color: "#ef4444" },
1933
1548
  { label: "Game", value: "game", color: "#eab308" },
1934
1549
  { label: "Hacker", value: "hacker", color: "#22c55e" }
1935
- ], gt = ({ content: o, className: e, style: i }) => typeof o == "string" ? o.trim().startsWith("<") ? /* @__PURE__ */ t("div", { className: e, style: i, dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ t("div", { className: e, style: i, children: o }) : /* @__PURE__ */ t("div", { className: e, style: i, children: o }), xt = (o) => {
1936
- var lt, ct;
1937
- const { src: e, type: i, sources: n, poster: r, autoPlay: c, thumbnails: m, textTracks: v, plugins: x, onGetInstance: b, ...d } = o, w = d.screenshot ?? !1, k = d.pip ?? !0, T = d.setting ?? !0, R = d.fullscreen ?? !0, p = d.fullscreenWeb ?? !1, D = d.lock ?? !1, W = d.fastForward ?? !0, zt = d.flip ?? !0, Mt = d.aspectRatio ?? !0, Pe = d.hotKey ?? !0, Tt = d.backdrop ?? !0, ue = d.gestureSeek ?? !1, It = d.centerControls ?? !0, Ee = d.fetchTimeout ?? 3e4;
1938
- d.autoOrientation;
1939
- const _ = I(null), [s, Ae] = C(null), [he, me] = C(!1), [Be, Rt] = C(0), [Lt, $t] = C(0), Ve = Ce(() => kt(d), []), a = Zt(
1940
- Ne((l) => s ? s.store.subscribe(l) : () => {
1941
- }, [s]),
1942
- () => s ? s.store.get() : Ve,
1943
- () => Ve
1944
- ), [$, F] = C(!1), [P, q] = C(!1), [A, M] = C("main"), [Z, fe] = C({ x: 0, y: 0, visible: !1 }), [Pt, Fe] = C(!1), Oe = ut($, 200), je = ut(P, 200), [pe, ne] = C(!1), [re, be] = C(0), [Et, He] = C(!1), [At, De] = C(!1), [ve, ae] = C(!1), [We, qe] = C([]), [Ue, Ge] = C(null), [Bt, Vt] = C(0), [U, _e] = C(null), [X, oe] = C(null), [Ps, Xe] = C(null), [ge, Qe] = C(!1), xe = I(null), Je = I(1), te = I(null), Ke = I(0), ee = I(!1), ie = I(null), G = I(null), ye = I(null), we = I(null), se = I(null);
1945
- E(() => {
1946
- if (!_.current) return;
1947
- const l = new ni({ ...d, poster: r });
1948
- x && x.length > 0 && x.forEach((g) => l.use(g)), l.attach(_.current), Ae(l), b && b(l);
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;
1553
+ h.autoOrientation;
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(
1555
+ Ne((c) => n ? n.store.subscribe(c) : () => {
1556
+ }, [n]),
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);
1560
+ P(() => {
1561
+ if (!q.current) return;
1562
+ const c = new ni({ ...h, poster: o });
1563
+ w && w.length > 0 && w.forEach((g) => c.use(g)), c.attach(q.current), Pe(c), b && b(c);
1949
1564
  const f = new ResizeObserver((g) => {
1950
- for (const N of g)
1951
- Rt(N.contentRect.height), $t(N.contentRect.width);
1565
+ for (const S of g)
1566
+ It(S.contentRect.height), Lt(S.contentRect.width);
1952
1567
  });
1953
- return f.observe(_.current), () => {
1954
- f.disconnect(), l.destroy(), Ae(null);
1568
+ return f.observe(q.current), () => {
1569
+ f.disconnect(), c.destroy(), Pe(null);
1955
1570
  };
1956
- }, []), E(() => {
1957
- if (!s) return;
1958
- const l = {};
1959
- d.theme !== void 0 && d.theme !== a.theme && (l.theme = d.theme), d.themeColor !== void 0 && d.themeColor !== a.themeColor && (l.themeColor = d.themeColor), d.iconSize !== void 0 && d.iconSize !== a.iconSize && (l.iconSize = d.iconSize), Object.keys(l).length > 0 && s.setAppearance(l), d.volume !== void 0 && Math.abs(d.volume - a.volume) > 0.01 && s.setVolume(d.volume), d.muted !== void 0 && d.muted !== a.isMuted && (d.muted ? s.video.muted = !0 : s.video.muted = !1);
1960
- }, [s, d.theme, d.themeColor, d.iconSize, d.volume, d.muted]), E(() => {
1961
- if (!s) return;
1962
- const l = v || [];
1963
- n && n.length > 0 ? (me(!1), s.setSources(n, l)) : e && (me(!1), s.setSources([{ url: e, type: i || "auto" }], l));
1964
- }, [e, i, n, v, s]), E(() => {
1965
- s && c && (s.video.muted = !0, s.store.setState({ isMuted: !0 }), s.play().catch(() => {
1571
+ }, []), P(() => {
1572
+ if (!n) return;
1573
+ const c = {};
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);
1575
+ }, [n, h.theme, h.themeColor, h.iconSize, h.volume, h.muted]), P(() => {
1576
+ if (!n) return;
1577
+ const c = v || [];
1578
+ r && r.length > 0 ? (me(!1), n.setSources(r, c)) : t && (me(!1), n.setSources([{ url: t, type: i || "auto" }], c));
1579
+ }, [t, i, r, v, n]), P(() => {
1580
+ n && d && (n.video.muted = !0, n.store.setState({ isMuted: !0 }), n.play().catch(() => {
1966
1581
  }));
1967
- }, [s, c]), E(() => {
1582
+ }, [n, d]), P(() => {
1968
1583
  a.isPlaying && !he && me(!0);
1969
- }, [a.isPlaying, he]), E(() => {
1970
- m && s ? ai(m, s.notify.bind(s), Ee).then((l) => qe(l)) : qe([]);
1971
- }, [m, s, Ee]), E(() => (X && (se.current && clearTimeout(se.current), se.current = setTimeout(() => {
1972
- oe(null);
1584
+ }, [a.isPlaying, he]), P(() => {
1585
+ m && n ? oi(m, n.notify.bind(n), Ee).then((c) => De(c)) : De([]);
1586
+ }, [m, n, Ee]), P(() => (Q && (se.current && clearTimeout(se.current), se.current = setTimeout(() => {
1587
+ ae(null);
1973
1588
  }, 600)), () => {
1974
1589
  se.current && clearTimeout(se.current);
1975
- }), [X]), E(() => {
1976
- const l = (f) => {
1977
- var g;
1978
- if (!(!s || !Pe) && ((g = document.activeElement) == null ? void 0 : g.tagName) !== "INPUT")
1979
- switch (f.key.toLowerCase()) {
1980
- case " ":
1981
- case "k":
1982
- f.preventDefault(), s.togglePlay();
1983
- break;
1984
- case "arrowright":
1985
- f.preventDefault(), s.skip(5);
1986
- break;
1987
- case "arrowleft":
1988
- f.preventDefault(), s.skip(-5);
1989
- break;
1990
- case "arrowup":
1991
- f.preventDefault(), s.setVolume(s.video.volume + 0.1);
1992
- break;
1993
- case "arrowdown":
1994
- f.preventDefault(), s.setVolume(s.video.volume - 0.1);
1995
- break;
1996
- case "f":
1997
- f.preventDefault(), s.toggleFullscreen();
1998
- break;
1999
- case "m":
2000
- f.preventDefault(), s.toggleMute();
2001
- break;
2002
- }
1590
+ }), [Q]), P(() => {
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
+ }
2003
1621
  };
2004
- return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
2005
- }, [s, Pe]);
2006
- const Ye = () => {
2007
- s && (s.setControlsVisible(!0), G.current && clearTimeout(G.current), !($ || P) && (G.current = setTimeout(() => {
2008
- !a.isPlaying || $ || P || s.setControlsVisible(!1);
1622
+ return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
1623
+ }, [n, $e]);
1624
+ const Ke = () => {
1625
+ n && (n.setControlsVisible(!0), _.current && clearTimeout(_.current), !($ || E) && (_.current = setTimeout(() => {
1626
+ !a.isPlaying || $ || E || n.setControlsVisible(!1);
2009
1627
  }, 2500)));
2010
1628
  };
2011
- E(() => {
2012
- s && (!$ && !P && a.isPlaying ? Ye() : ($ || P) && (s.setControlsVisible(!0), G.current && clearTimeout(G.current)));
2013
- }, [$, P, a.isPlaying, s]);
2014
- const Ze = Ne(() => {
2015
- !W || !s || !a.isPlaying || a.isLocked || (Je.current = s.video.playbackRate, xe.current = setTimeout(() => {
2016
- s.video.playbackRate = 2, Qe(!0);
1629
+ P(() => {
1630
+ n && (!$ && !E && a.isPlaying ? Ke() : ($ || E) && (n.setControlsVisible(!0), _.current && clearTimeout(_.current)));
1631
+ }, [$, E, a.isPlaying, n]);
1632
+ const Ye = Ne(() => {
1633
+ !D || !n || !a.isPlaying || a.isLocked || (Xe.current = n.video.playbackRate, xe.current = setTimeout(() => {
1634
+ n.video.playbackRate = 2, Qe(!0);
2017
1635
  }, 500));
2018
- }, [W, s, a.isPlaying, a.isLocked]), ke = Ne(() => {
2019
- xe.current && clearTimeout(xe.current), ge && s && (s.video.playbackRate = Je.current, Qe(!1));
2020
- }, [ge, s]), Ft = (l) => {
2021
- Ze(), ue && !a.isLocked && (te.current = l.touches[0].clientX, Ke.current = a.currentTime, ee.current = !1);
2022
- }, Ot = (l) => {
1636
+ }, [D, n, a.isPlaying, a.isLocked]), ke = Ne(() => {
1637
+ xe.current && clearTimeout(xe.current), ge && n && (n.video.playbackRate = Xe.current, Qe(!1));
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) => {
2023
1641
  if (!a.isLocked && ue && te.current !== null) {
2024
- const f = l.touches[0].clientX - te.current;
2025
- if (Math.abs(f) > 10 && (ke(), ee.current = !0, ne(!0), _.current && a.duration)) {
2026
- const g = _.current.getBoundingClientRect(), N = f / g.width, j = Math.max(0, Math.min(a.duration, Ke.current + N * a.duration));
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));
2027
1645
  be(j);
2028
1646
  }
2029
1647
  }
2030
- }, jt = (l) => {
1648
+ }, Ot = (c) => {
2031
1649
  if (ke(), ue && ee.current) {
2032
- s == null || s.seek(re), ne(!1), ee.current = !1, te.current = null;
1650
+ n == null || n.seek(re), ne(!1), ee.current = !1, te.current = null;
2033
1651
  return;
2034
1652
  }
2035
1653
  te.current = null;
2036
- }, Se = (l) => {
2037
- if (!ye.current || !a.duration) return 0;
2038
- const f = ye.current.getBoundingClientRect(), g = "touches" in l ? l.touches[0].clientX : l.clientX;
1654
+ }, Se = (c) => {
1655
+ if (!we.current || !a.duration) return 0;
1656
+ const f = we.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
2039
1657
  return Math.max(0, Math.min(1, (g - f.left) / f.width)) * a.duration;
2040
- }, et = (l) => {
1658
+ }, Ze = (c) => {
2041
1659
  if (a.isLocked) return;
2042
- ne(!0), be(Se(l));
2043
- const f = (N) => be(Se(N)), g = (N) => {
2044
- s == null || s.seek(Se(N)), ne(!1), document.removeEventListener("mousemove", f), document.removeEventListener("touchmove", f), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
1660
+ ne(!0), be(Se(c));
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);
2045
1663
  };
2046
1664
  document.addEventListener("mousemove", f), document.addEventListener("touchmove", f), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
2047
- }, tt = (l) => {
2048
- if (!we.current) return 0;
2049
- const f = we.current.getBoundingClientRect(), g = "touches" in l ? l.touches[0].clientX : l.clientX;
1665
+ }, et = (c) => {
1666
+ if (!ye.current) return 0;
1667
+ const f = ye.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
2050
1668
  return Math.max(0, Math.min(1, (g - f.left) / f.width));
2051
- }, it = (l) => {
2052
- if (!s || a.isLocked) return;
2053
- He(!0), s.setVolume(tt(l));
2054
- const f = (N) => s.setVolume(tt(N)), g = () => {
2055
- He(!1), document.removeEventListener("mousemove", f), document.removeEventListener("touchmove", f), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
1669
+ }, tt = (c) => {
1670
+ if (!n || a.isLocked) return;
1671
+ je(!0), n.setVolume(et(c));
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);
2056
1674
  };
2057
1675
  document.addEventListener("mousemove", f), document.addEventListener("touchmove", f), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
2058
- }, Ht = (l) => {
1676
+ }, jt = (c) => {
2059
1677
  if (!a.duration || a.isLive) return;
2060
- const f = l.currentTarget.getBoundingClientRect(), g = (l.clientX - f.left) / f.width, N = g * a.duration;
2061
- Vt(g * 100), Ge(N), We.length > 0 && _e(We.find((j) => N >= j.start && N < j.end) || null);
2062
- }, le = (l) => {
2063
- !s || a.isLocked || (s.skip(l === "forward" ? 10 : -10), Xe(l), setTimeout(() => Xe(null), 300));
2064
- }, Dt = (l) => {
2065
- if (!s) 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);
1680
+ }, le = (c) => {
1681
+ !n || a.isLocked || (n.skip(c === "forward" ? 10 : -10), qe(c), setTimeout(() => qe(null), 300));
1682
+ }, Ht = (c) => {
1683
+ if (!n) return;
2066
1684
  if (ee.current) {
2067
1685
  ee.current = !1;
2068
1686
  return;
2069
1687
  }
2070
- if ($ && F(!1), P && q(!1), ve && ae(!1), Z.visible && fe({ ...Z, visible: !1 }), s.setControlsVisible(!0), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
2071
- !a.isPlaying || $ || P || s.setControlsVisible(!1);
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);
2072
1690
  }, 2500), a.isLocked) return;
2073
- const f = l.currentTarget.getBoundingClientRect(), g = l.clientX - f.left, N = f.width, j = Date.now();
2074
- 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 })) : s.toggleFullscreen()) : ie.current = setTimeout(() => {
2075
- s.togglePlay(), ie.current = null;
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(() => {
1693
+ n.togglePlay(), ie.current = null;
2076
1694
  }, 250);
2077
- }, Wt = (l) => {
1695
+ }, Wt = (c) => {
2078
1696
  var g;
2079
- if (l.preventDefault(), a.isLocked) return;
2080
- const f = (g = _.current) == null ? void 0 : g.getBoundingClientRect();
1697
+ if (c.preventDefault(), a.isLocked) return;
1698
+ const f = (g = q.current) == null ? void 0 : g.getBoundingClientRect();
2081
1699
  f && fe({
2082
1700
  visible: !0,
2083
- x: l.clientX - f.left,
2084
- y: l.clientY - f.top
1701
+ x: c.clientX - f.left,
1702
+ y: c.clientY - f.top
2085
1703
  });
2086
- }, qt = (l) => {
2087
- l.stopPropagation();
1704
+ }, Dt = (c) => {
1705
+ c.stopPropagation();
2088
1706
  const f = "ontouchstart" in window || navigator.maxTouchPoints > 0, g = window.matchMedia("(hover: none)").matches || f;
2089
1707
  if (ve) {
2090
- ae(!1);
1708
+ oe(!1);
2091
1709
  return;
2092
1710
  }
2093
- g ? ae(!0) : s == null || s.toggleMute();
2094
- }, Ut = a.isMuted || a.volume === 0 ? Ji : a.volume < 0.5 ? Qi : Xi, st = Math.max(100, Be - 120), Gt = () => {
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 = () => {
2095
1713
  switch (a.iconSize) {
2096
1714
  case "small":
2097
1715
  return "w-4 h-4";
@@ -2109,7 +1727,7 @@ const _i = y("Zap", [
2109
1727
  default:
2110
1728
  return "p-2.5 min-w-[36px] min-h-[36px]";
2111
1729
  }
2112
- }, B = Gt(), O = _t(), Q = (() => {
1730
+ }, A = Gt(), O = _t(), X = (() => {
2113
1731
  switch (a.iconSize) {
2114
1732
  case "small":
2115
1733
  return {
@@ -2133,8 +1751,8 @@ const _i = y("Zap", [
2133
1751
  skipIcon: "w-6 h-6"
2134
1752
  };
2135
1753
  }
2136
- })(), Xt = !a.isLocked && (a.controlsVisible || !a.isPlaying || $ || P), nt = At || Et || ve, rt = Tt ? "backdrop-blur-xl bg-black/80" : "bg-black/95", at = Ce(() => {
2137
- const l = [
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(() => {
1755
+ const c = [
2138
1756
  { id: "play", position: "left", index: 10, isBuiltIn: !0 },
2139
1757
  { id: "volume", position: "left", index: 20, isBuiltIn: !0 },
2140
1758
  { id: "time", position: "left", index: 30, isBuiltIn: !0 },
@@ -2146,192 +1764,192 @@ const _i = y("Zap", [
2146
1764
  { id: "fullscreenWeb", position: "right", index: 110, isBuiltIn: !0 },
2147
1765
  { id: "fullscreen", position: "right", index: 120, isBuiltIn: !0 }
2148
1766
  ];
2149
- return d.controls && d.controls.forEach((f) => {
2150
- const g = l.find((N) => N.id === f.id);
2151
- g ? Object.assign(g, f) : l.push(f);
2152
- }), l.filter((f) => !(f.id === "screenshot" && !w || f.id === "pip" && !k || f.id === "settings" && !T || f.id === "fullscreen" && !R || f.id === "fullscreenWeb" && !p)).sort((f, g) => f.index - g.index);
2153
- }, [d.controls, w, k, T, R, p]), ot = (l) => {
2154
- var f, g, N, j, dt;
2155
- if (!l.isBuiltIn)
2156
- return /* @__PURE__ */ t(
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;
1773
+ if (!c.isBuiltIn)
1774
+ return /* @__PURE__ */ e(
2157
1775
  "button",
2158
1776
  {
2159
1777
  onClick: () => {
2160
- l.click ? l.click(s) : l.onClick && l.onClick(s);
1778
+ c.click ? c.click(n) : c.onClick && c.onClick(n);
2161
1779
  },
2162
- 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} ${l.className || ""}`,
2163
- style: { borderRadius: "var(--radius)", ...l.style },
2164
- title: l.tooltip,
2165
- children: /* @__PURE__ */ t(gt, { content: l.html || "" })
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 || ""}`,
1781
+ style: { borderRadius: "var(--radius)", ...c.style },
1782
+ title: c.tooltip,
1783
+ children: /* @__PURE__ */ e(xt, { content: c.html || "" })
2166
1784
  },
2167
- l.index
1785
+ c.index
2168
1786
  );
2169
- switch (l.id) {
1787
+ switch (c.id) {
2170
1788
  case "play":
2171
- return /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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__ */ t(mt, { className: `${B} fill-current` }) : /* @__PURE__ */ t(ht, { 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");
2172
1790
  case "volume":
2173
- return /* @__PURE__ */ h(
1791
+ return /* @__PURE__ */ l(
2174
1792
  "div",
2175
1793
  {
2176
1794
  className: "flex items-center gap-2 group/vol relative",
2177
1795
  onMouseEnter: () => {
2178
- window.matchMedia("(hover: hover)").matches && De(!0);
1796
+ window.matchMedia("(hover: hover)").matches && He(!0);
2179
1797
  },
2180
1798
  onMouseLeave: () => {
2181
- window.matchMedia("(hover: hover)").matches && De(!1);
1799
+ window.matchMedia("(hover: hover)").matches && He(!1);
2182
1800
  },
2183
1801
  children: [
2184
- /* @__PURE__ */ t("button", { onClick: qt, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(Ut, { className: B }) }),
2185
- /* @__PURE__ */ t("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${nt ? "w-28 opacity-100 ml-1" : "w-0 opacity-0"}`, children: /* @__PURE__ */ h("div", { ref: we, className: "relative w-full h-full flex items-center cursor-pointer px-2", onMouseDown: it, onTouchStart: it, children: [
2186
- /* @__PURE__ */ t("div", { className: "w-full h-1 bg-white/20 overflow-hidden", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ t("div", { className: "h-full bg-white", style: { width: `${(a.isMuted ? 0 : a.volume) * 100}%`, borderRadius: "var(--radius-full)" } }) }),
2187
- /* @__PURE__ */ t("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)" } })
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 }) }),
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: [
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)" } })
2188
1806
  ] }) }),
2189
- nt && /* @__PURE__ */ t("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)}%` })
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)}%` })
2190
1808
  ]
2191
1809
  },
2192
1810
  "volume"
2193
1811
  );
2194
1812
  case "time":
2195
- return d.isLive ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 px-2 py-0.5 bg-red-500/10 border border-red-500/20 rounded-md", children: [
2196
- /* @__PURE__ */ t("div", { className: "w-2 h-2 rounded-full bg-red-500 animate-pulse" }),
2197
- /* @__PURE__ */ t("span", { className: "text-[10px] font-bold text-red-500 tracking-wider", children: "LIVE" })
2198
- ] }, "live") : /* @__PURE__ */ h("div", { className: "text-xs font-medium text-zinc-400 font-mono select-none hidden sm:block tabular-nums", children: [
2199
- ze(pe ? re : a.currentTime),
1813
+ return h.isLive ? /* @__PURE__ */ l("div", { className: "flex items-center gap-2 px-2 py-0.5 bg-red-500/10 border border-red-500/20 rounded-md", children: [
1814
+ /* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-red-500 animate-pulse" }),
1815
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-red-500 tracking-wider", children: "LIVE" })
1816
+ ] }, "live") : /* @__PURE__ */ l("div", { className: "text-xs font-medium text-zinc-400 font-mono select-none hidden sm:block tabular-nums", children: [
1817
+ Te(pe ? re : a.currentTime),
2200
1818
  " ",
2201
- /* @__PURE__ */ t("span", { className: "text-zinc-600", children: "/" }),
1819
+ /* @__PURE__ */ e("span", { className: "text-zinc-600", children: "/" }),
2202
1820
  " ",
2203
- ze(a.duration)
1821
+ Te(a.duration)
2204
1822
  ] }, "time");
2205
1823
  case "subtitle":
2206
- return /* @__PURE__ */ h("div", { className: "relative", children: [
2207
- /* @__PURE__ */ t("button", { onClick: (u) => {
2208
- u.stopPropagation(), q(!P), F(!1);
2209
- }, className: `strata-control-btn transition-colors focus:outline-none ${O} ${P ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(ts, { className: B }) }),
2210
- je.isMounted && /* @__PURE__ */ t(
2211
- Ts,
1824
+ return /* @__PURE__ */ l("div", { className: "relative", children: [
1825
+ /* @__PURE__ */ e("button", { onClick: (u) => {
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 }) }),
1828
+ Oe.isMounted && /* @__PURE__ */ e(
1829
+ Hi,
2212
1830
  {
2213
1831
  tracks: a.subtitleTracks,
2214
1832
  current: a.currentSubtitle,
2215
- onSelect: (u) => s == null ? void 0 : s.setSubtitle(u),
2216
- onUpload: (u) => s == null ? void 0 : s.addTextTrack(u, u.name),
2217
- onClose: () => q(!1),
1833
+ onSelect: (u) => n == null ? void 0 : n.setSubtitle(u),
1834
+ onUpload: (u) => n == null ? void 0 : n.addTextTrack(u, u.name),
1835
+ onClose: () => U(!1),
2218
1836
  settings: a.subtitleSettings,
2219
- onSettingsChange: (u) => s == null ? void 0 : s.updateSubtitleSettings(u),
2220
- onReset: () => s == null ? void 0 : s.resetSubtitleSettings(),
1837
+ onSettingsChange: (u) => n == null ? void 0 : n.updateSubtitleSettings(u),
1838
+ onReset: () => n == null ? void 0 : n.resetSubtitleSettings(),
2221
1839
  offset: a.subtitleOffset,
2222
- onOffsetChange: (u) => s == null ? void 0 : s.setSubtitleOffset(u),
2223
- maxHeight: st,
2224
- animationClass: `strata-backdrop ${rt} ${je.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`
1840
+ onOffsetChange: (u) => n == null ? void 0 : n.setSubtitleOffset(u),
1841
+ maxHeight: it,
1842
+ animationClass: `strata-backdrop ${nt} ${Oe.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`
2225
1843
  }
2226
1844
  )
2227
1845
  ] }, "subtitle");
2228
1846
  case "screenshot":
2229
- return /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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__ */ t(gs, { 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");
2230
1848
  case "pip":
2231
- return /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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__ */ t(es, { 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");
2232
1850
  case "download":
2233
- return /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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__ */ t(is, { 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");
2234
1852
  case "fullscreen":
2235
- return /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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__ */ t(Yi, { className: B }) : /* @__PURE__ */ t(Ki, { 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");
2236
1854
  case "fullscreenWeb":
2237
- return /* @__PURE__ */ t("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__ */ t(ws, { 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");
2238
1856
  case "settings":
2239
- return /* @__PURE__ */ h("div", { className: "relative", children: [
2240
- /* @__PURE__ */ t("button", { onClick: (u) => {
2241
- u.stopPropagation(), F(!$), q(!1), M("main");
2242
- }, 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__ */ t(Zi, { className: B }) }),
2243
- Oe.isMounted && /* @__PURE__ */ t(Nt, { onClose: () => F(!1), align: "right", maxHeight: st, className: `strata-backdrop ${rt} ${Oe.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`, children: /* @__PURE__ */ h("div", { className: "w-full", children: [
2244
- A === "main" && /* @__PURE__ */ h("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
2245
- /* @__PURE__ */ t("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__ */ t("span", { children: "Settings" }) }),
2246
- a.sources.length > 1 && /* @__PURE__ */ t(z, { label: "Source", value: ((f = a.sources[a.currentSourceIndex]) == null ? void 0 : f.name) || `Source ${a.currentSourceIndex + 1}`, onClick: () => M("sources"), hasSubmenu: !0 }),
2247
- /* @__PURE__ */ t(z, { label: "Speed", value: `${a.playbackRate}x`, onClick: () => M("speed"), hasSubmenu: !0 }),
2248
- /* @__PURE__ */ t(z, { label: "Quality", value: a.currentQuality === -1 ? "Auto" : `${(g = a.qualityLevels[a.currentQuality]) == null ? void 0 : g.height}p`, onClick: () => M("quality"), hasSubmenu: !0 }),
2249
- /* @__PURE__ */ t(z, { label: "Audio", value: ((N = a.audioTracks[a.currentAudioTrack]) == null ? void 0 : N.label) || "Default", onClick: () => M("audio"), hasSubmenu: !0 }),
2250
- zt && /* @__PURE__ */ t(z, { label: "Flip", value: a.flipState.horizontal ? "H" : a.flipState.vertical ? "V" : "Normal", onClick: () => M("flip"), hasSubmenu: !0 }),
2251
- Mt && /* @__PURE__ */ t(z, { label: "Aspect Ratio", value: a.aspectRatio, onClick: () => M("ratio"), hasSubmenu: !0 }),
2252
- /* @__PURE__ */ t(vt, {}),
2253
- /* @__PURE__ */ t(z, { label: "Audio Boost", value: a.audioGain > 1 ? `${a.audioGain}x` : "Off", onClick: () => M("boost"), hasSubmenu: !0 }),
2254
- /* @__PURE__ */ t(z, { label: "Watch Party", icon: /* @__PURE__ */ t(as, { className: "w-4 h-4" }), onClick: () => M("party"), hasSubmenu: !0 }),
2255
- /* @__PURE__ */ t(z, { label: "Cast to Device", icon: /* @__PURE__ */ t(rs, { className: "w-4 h-4" }), onClick: () => {
2256
- s == null || s.requestCast(), F(!1);
1857
+ return /* @__PURE__ */ l("div", { className: "relative", children: [
1858
+ /* @__PURE__ */ e("button", { onClick: (u) => {
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: [
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" }) }),
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);
2257
1875
  } }),
2258
- (j = d.settings) == null ? void 0 : j.map((u, J) => u.switch !== void 0 ? /* @__PURE__ */ t("div", { className: "px-1", children: /* @__PURE__ */ t(
1876
+ (j = h.settings) == null ? void 0 : j.map((u, J) => u.switch !== void 0 ? /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(
2259
1877
  K,
2260
1878
  {
2261
1879
  label: u.html,
2262
1880
  icon: u.icon,
2263
1881
  checked: u.switch,
2264
1882
  tooltip: u.tooltip,
2265
- onChange: (As) => {
1883
+ onChange: (Qi) => {
2266
1884
  u.onSwitch && u.onSwitch(u);
2267
1885
  }
2268
1886
  }
2269
- ) }, `cust-${J}`) : /* @__PURE__ */ t(
2270
- z,
1887
+ ) }, `cust-${J}`) : /* @__PURE__ */ e(
1888
+ T,
2271
1889
  {
2272
1890
  label: u.html,
2273
1891
  icon: u.icon,
2274
1892
  onClick: () => {
2275
- u.click ? u.click() : u.onClick && u.onClick(), F(!1);
1893
+ u.click ? u.click() : u.onClick && u.onClick(), V(!1);
2276
1894
  }
2277
1895
  },
2278
1896
  `cust-${J}`
2279
1897
  )),
2280
- /* @__PURE__ */ t(vt, {}),
2281
- /* @__PURE__ */ t(z, { label: "Appearance", icon: /* @__PURE__ */ t(Ct, { 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 })
2282
1900
  ] }),
2283
- ["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio"].includes(A) && /* @__PURE__ */ h("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
2284
- A === "sources" && /* @__PURE__ */ h(L, { children: [
2285
- /* @__PURE__ */ t(H, { label: "Select Source", onBack: () => M("main") }),
2286
- a.sources.map((u, J) => /* @__PURE__ */ t(z, { label: u.name || `Source ${J + 1}`, value: u.type, active: a.currentSourceIndex === J, onClick: () => s == null ? void 0 : s.switchSource(J) }, J))
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: [
1903
+ /* @__PURE__ */ e(H, { label: "Select Source", onBack: () => M("main") }),
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))
2287
1905
  ] }),
2288
- A === "speed" && /* @__PURE__ */ h(L, { children: [
2289
- /* @__PURE__ */ t(H, { label: "Speed", onBack: () => M("main") }),
2290
- [0.5, 1, 1.5, 2].map((u) => /* @__PURE__ */ t(z, { label: `${u}x`, active: a.playbackRate === u, onClick: () => s.video.playbackRate = u }, u))
1906
+ F === "speed" && /* @__PURE__ */ l(L, { children: [
1907
+ /* @__PURE__ */ e(H, { label: "Speed", onBack: () => M("main") }),
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))
2291
1909
  ] }),
2292
- A === "quality" && /* @__PURE__ */ h(L, { children: [
2293
- /* @__PURE__ */ t(H, { label: "Quality", onBack: () => M("main") }),
2294
- /* @__PURE__ */ t(z, { label: "Auto", active: a.currentQuality === -1, onClick: () => s == null ? void 0 : s.setQuality(-1) }),
2295
- a.qualityLevels.map((u) => /* @__PURE__ */ t(z, { label: `${u.height}p`, value: `${Math.round(u.bitrate / 1e3)}k`, active: a.currentQuality === u.index, onClick: () => s == null ? void 0 : s.setQuality(u.index) }, u.index))
1910
+ F === "quality" && /* @__PURE__ */ l(L, { children: [
1911
+ /* @__PURE__ */ e(H, { label: "Quality", onBack: () => M("main") }),
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))
2296
1914
  ] }),
2297
- A === "audio" && /* @__PURE__ */ h(L, { children: [
2298
- /* @__PURE__ */ t(H, { label: "Audio Track", onBack: () => M("main") }),
2299
- a.audioTracks.length === 0 && /* @__PURE__ */ t("div", { className: "px-4 py-3 text-zinc-500 text-xs text-center", children: "No tracks available" }),
2300
- a.audioTracks.map((u) => /* @__PURE__ */ t(z, { label: u.label, value: u.language, active: a.currentAudioTrack === u.index, onClick: () => s == null ? void 0 : s.setAudioTrack(u.index) }, u.index))
1915
+ F === "audio" && /* @__PURE__ */ l(L, { children: [
1916
+ /* @__PURE__ */ e(H, { label: "Audio Track", onBack: () => M("main") }),
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))
2301
1919
  ] }),
2302
- A === "boost" && /* @__PURE__ */ h(L, { children: [
2303
- /* @__PURE__ */ t(H, { label: "Audio Boost", onBack: () => M("main") }),
2304
- [1, 1.5, 2, 3].map((u) => /* @__PURE__ */ t(z, { label: u === 1 ? "Off" : `${u}x`, active: a.audioGain === u, onClick: () => s == null ? void 0 : s.setAudioGain(u) }, u))
1920
+ F === "boost" && /* @__PURE__ */ l(L, { children: [
1921
+ /* @__PURE__ */ e(H, { label: "Audio Boost", onBack: () => M("main") }),
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))
2305
1923
  ] }),
2306
- A === "flip" && /* @__PURE__ */ h(L, { children: [
2307
- /* @__PURE__ */ t(H, { label: "Video Flip", onBack: () => M("main") }),
2308
- /* @__PURE__ */ h("div", { className: "p-2 space-y-1", children: [
2309
- /* @__PURE__ */ t(K, { label: "Horizontal Flip", checked: a.flipState.horizontal, onChange: () => s == null ? void 0 : s.setFlip("horizontal") }),
2310
- /* @__PURE__ */ t(K, { label: "Vertical Flip", checked: a.flipState.vertical, onChange: () => s == null ? void 0 : s.setFlip("vertical") })
1924
+ F === "flip" && /* @__PURE__ */ l(L, { children: [
1925
+ /* @__PURE__ */ e(H, { label: "Video Flip", onBack: () => M("main") }),
1926
+ /* @__PURE__ */ l("div", { className: "p-2 space-y-1", children: [
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") })
2311
1929
  ] })
2312
1930
  ] }),
2313
- A === "ratio" && /* @__PURE__ */ h(L, { children: [
2314
- /* @__PURE__ */ t(H, { label: "Aspect Ratio", onBack: () => M("main") }),
2315
- ["default", "16:9", "4:3"].map((u) => /* @__PURE__ */ t(z, { label: u === "default" ? "Default" : u, active: a.aspectRatio === u, onClick: () => s == null ? void 0 : s.setAspectRatio(u) }, u))
1931
+ F === "ratio" && /* @__PURE__ */ l(L, { children: [
1932
+ /* @__PURE__ */ e(H, { label: "Aspect Ratio", onBack: () => M("main") }),
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))
2316
1934
  ] }),
2317
- A === "party" && /* @__PURE__ */ h(L, { children: [
2318
- /* @__PURE__ */ t(H, { label: "Watch Party", onBack: () => M("main") }),
2319
- /* @__PURE__ */ h("div", { className: "p-4 space-y-3", children: [
2320
- /* @__PURE__ */ t("p", { className: "text-xs text-zinc-400 leading-relaxed", children: "Create a synchronized room on WatchParty.me to watch together." }),
2321
- /* @__PURE__ */ t("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((dt = a.sources[a.currentSourceIndex]) == null ? void 0 : dt.url) || e || "")}`, 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" })
1935
+ F === "party" && /* @__PURE__ */ l(L, { children: [
1936
+ /* @__PURE__ */ e(H, { label: "Watch Party", onBack: () => M("main") }),
1937
+ /* @__PURE__ */ l("div", { className: "p-4 space-y-3", children: [
1938
+ /* @__PURE__ */ e("p", { className: "text-xs text-zinc-400 leading-relaxed", children: "Create a synchronized room on WatchParty.me to watch together." }),
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" })
2322
1940
  ] })
2323
1941
  ] }),
2324
- A === "appearance" && /* @__PURE__ */ h(L, { children: [
2325
- /* @__PURE__ */ t(H, { label: "Appearance", onBack: () => M("main") }),
2326
- /* @__PURE__ */ h("div", { className: "pb-1", children: [
2327
- /* @__PURE__ */ t(Y, { title: "Theme", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 px-3", children: $s.map((u) => /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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)) }) }),
2328
- /* @__PURE__ */ t(Y, { title: "Icon Size", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1 px-3", children: ["small", "medium", "large"].map((u) => /* @__PURE__ */ t("button", { onClick: () => s == null ? void 0 : s.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)) }) }),
2329
- /* @__PURE__ */ h(Y, { title: "Theme Color", children: [
2330
- /* @__PURE__ */ t("div", { className: "grid grid-cols-6 gap-2 px-3", children: Ls.map((u) => /* @__PURE__ */ t("button", { title: u.label, onClick: () => s == null ? void 0 : s.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__ */ t($e, { className: "w-3 h-3 text-white mx-auto stroke-[3]" }) }, u.value)) }),
2331
- /* @__PURE__ */ t("div", { className: "px-3 pt-4", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-3 bg-white/5 p-2 hover:bg-white/10 transition-colors group", style: { borderRadius: "var(--radius)" }, children: [
2332
- /* @__PURE__ */ t("div", { className: "relative w-6 h-6 overflow-hidden ring-1 ring-white/20", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ t("input", { type: "color", value: a.themeColor, onChange: (u) => s == null ? void 0 : s.setAppearance({ themeColor: u.target.value }), className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0" }) }),
2333
- /* @__PURE__ */ t("span", { className: "text-xs text-zinc-400 font-medium group-hover:text-zinc-200", children: "Custom Color" }),
2334
- /* @__PURE__ */ t("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children: a.themeColor })
1942
+ F === "appearance" && /* @__PURE__ */ l(L, { children: [
1943
+ /* @__PURE__ */ e(H, { label: "Appearance", onBack: () => M("main") }),
1944
+ /* @__PURE__ */ l("div", { className: "pb-1", children: [
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)) }) }),
1947
+ /* @__PURE__ */ l(Y, { title: "Theme Color", children: [
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)) }),
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: [
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" }) }),
1951
+ /* @__PURE__ */ e("span", { className: "text-xs text-zinc-400 font-medium group-hover:text-zinc-200", children: "Custom Color" }),
1952
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children: a.themeColor })
2335
1953
  ] }) })
2336
1954
  ] })
2337
1955
  ] })
@@ -2343,70 +1961,69 @@ const _i = y("Zap", [
2343
1961
  return null;
2344
1962
  }
2345
1963
  }, Qt = Ce(() => {
2346
- const l = [
1964
+ const c = [
2347
1965
  // Loop (Playback Group)
2348
1966
  { html: "Playback", isLabel: !0 },
2349
1967
  {
2350
1968
  html: "Loop",
2351
1969
  checked: a.isLooping,
2352
- onClick: () => s == null ? void 0 : s.toggleLoop()
1970
+ onClick: () => n == null ? void 0 : n.toggleLoop()
2353
1971
  },
2354
1972
  { separator: !0 },
2355
1973
  // Flip (Transform Group)
2356
1974
  { html: "Transform", isLabel: !0 },
2357
- { html: "Flip Horizontal", onClick: () => s == null ? void 0 : s.setFlip("horizontal") },
2358
- { html: "Flip Vertical", onClick: () => s == null ? void 0 : s.setFlip("vertical") },
1975
+ { html: "Flip Horizontal", onClick: () => n == null ? void 0 : n.setFlip("horizontal") },
1976
+ { html: "Flip Vertical", onClick: () => n == null ? void 0 : n.setFlip("vertical") },
2359
1977
  { separator: !0 },
2360
1978
  // Aspect Ratio Group
2361
1979
  { html: "Aspect Ratio", isLabel: !0 },
2362
- { html: "Default", checked: a.aspectRatio === "default", onClick: () => s == null ? void 0 : s.setAspectRatio("default") },
2363
- { html: "16:9", checked: a.aspectRatio === "16:9", onClick: () => s == null ? void 0 : s.setAspectRatio("16:9") },
2364
- { html: "4:3", checked: a.aspectRatio === "4:3", onClick: () => s == null ? void 0 : s.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") },
2365
1983
  { separator: !0 },
2366
1984
  // Stats
2367
1985
  {
2368
1986
  html: "Video Info",
2369
- icon: /* @__PURE__ */ t(Cs, { className: "w-3.5 h-3.5" }),
2370
- onClick: () => Fe(!0)
1987
+ icon: /* @__PURE__ */ e(Bi, { className: "w-3.5 h-3.5" }),
1988
+ onClick: () => Be(!0)
2371
1989
  },
2372
1990
  { separator: !0 }
2373
1991
  ];
2374
- return d.contextmenu && l.push(...d.contextmenu), l.push({
2375
- html: /* @__PURE__ */ t("span", { className: "text-zinc-500 text-xs font-semibold tracking-wide", children: "StrataPlayer" }),
1992
+ return h.contextmenu && c.push(...h.contextmenu), c.push({
1993
+ html: /* @__PURE__ */ e("span", { className: "text-zinc-500 text-xs font-semibold tracking-wide", children: "StrataPlayer" }),
2376
1994
  disabled: !0
2377
- }), l.push({
1995
+ }), c.push({
2378
1996
  html: "Close",
2379
1997
  onClick: (f) => f(),
2380
1998
  // Wrapper handles close
2381
- icon: /* @__PURE__ */ t("div", { className: "text-red-400", children: /* @__PURE__ */ h("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
2382
- /* @__PURE__ */ t("path", { d: "M18 6 6 18" }),
2383
- /* @__PURE__ */ t("path", { d: "m6 6 12 12" })
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: [
2000
+ /* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
2001
+ /* @__PURE__ */ e("path", { d: "m6 6 12 12" })
2384
2002
  ] }) })
2385
- }), l;
2386
- }, [d.contextmenu, a.aspectRatio, a.isLooping, s]);
2387
- return /* @__PURE__ */ h(
2003
+ }), c;
2004
+ }, [h.contextmenu, a.aspectRatio, a.isLooping, n]), at = a.isWebFullscreen, lt = /* @__PURE__ */ l(
2388
2005
  "div",
2389
2006
  {
2390
- id: d.id,
2391
- ref: _,
2392
- 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 ${d.container || ""}`,
2007
+ id: h.id,
2008
+ ref: q,
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 || ""}`,
2393
2010
  style: { touchAction: "manipulation", "--accent": a.themeColor },
2394
- onMouseMove: Ye,
2011
+ onMouseMove: Ke,
2395
2012
  onMouseLeave: () => {
2396
- a.isPlaying && !$ && !P && s && s.setControlsVisible(!1);
2013
+ a.isPlaying && !$ && !E && n && n.setControlsVisible(!1);
2397
2014
  },
2398
- onMouseDown: Ze,
2015
+ onMouseDown: Ye,
2399
2016
  onMouseUp: ke,
2400
- onTouchStart: Ft,
2401
- onTouchMove: Ot,
2402
- onTouchEnd: jt,
2017
+ onTouchStart: Bt,
2018
+ onTouchMove: Vt,
2019
+ onTouchEnd: Ot,
2403
2020
  onContextMenu: Wt,
2404
2021
  tabIndex: 0,
2405
2022
  role: "region",
2406
2023
  "aria-label": "Video Player",
2407
2024
  "data-theme": a.theme,
2408
2025
  children: [
2409
- /* @__PURE__ */ t("style", { children: `
2026
+ /* @__PURE__ */ e("style", { children: `
2410
2027
  [data-theme="default"] {
2411
2028
  --radius: 0.75rem;
2412
2029
  --radius-lg: 0.75rem;
@@ -2500,120 +2117,120 @@ const _i = y("Zap", [
2500
2117
  [data-theme="pixel"] .strata-backdrop { backdrop-filter: none; background: #000; }
2501
2118
  [data-theme="hacker"] .strata-backdrop { backdrop-filter: none; background: #000; }
2502
2119
  ` }),
2503
- a.theme === "hacker" && /* @__PURE__ */ t("div", { className: "strata-scanlines" }),
2504
- !s && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center bg-zinc-950 z-50", children: /* @__PURE__ */ t(Re, { className: "w-10 h-10 text-[var(--accent)] animate-spin" }) }),
2505
- s && /* @__PURE__ */ h(L, { children: [
2506
- (lt = d.layers) == null ? void 0 : lt.map((l, f) => /* @__PURE__ */ t(
2120
+ a.theme === "hacker" && /* @__PURE__ */ e("div", { className: "strata-scanlines" }),
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" }) }),
2122
+ n && /* @__PURE__ */ l(L, { children: [
2123
+ (ct = h.layers) == null ? void 0 : ct.map((c, f) => /* @__PURE__ */ e(
2507
2124
  "div",
2508
2125
  {
2509
- className: `absolute inset-0 pointer-events-none z-10 ${l.className || ""}`,
2510
- style: l.style,
2511
- children: /* @__PURE__ */ t(gt, { content: l.html || "", className: "w-full h-full" })
2126
+ className: `absolute inset-0 pointer-events-none z-10 ${c.className || ""}`,
2127
+ style: c.style,
2128
+ children: /* @__PURE__ */ e(xt, { content: c.html || "", className: "w-full h-full" })
2512
2129
  },
2513
2130
  f
2514
2131
  )),
2515
- /* @__PURE__ */ t(Ns, { notifications: a.notifications }),
2516
- /* @__PURE__ */ t(zs, { cues: a.activeCues, settings: a.subtitleSettings }),
2517
- /* @__PURE__ */ t("div", { className: "absolute inset-0 z-0", onClick: Dt, "aria-hidden": "true" }),
2518
- r && !he && /* @__PURE__ */ t(
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(
2519
2136
  "div",
2520
2137
  {
2521
2138
  className: "absolute inset-0 bg-cover bg-center z-[5] pointer-events-none",
2522
- style: { backgroundImage: `url(${r})` }
2139
+ style: { backgroundImage: `url(${o})` }
2523
2140
  }
2524
2141
  ),
2525
- Z.visible && /* @__PURE__ */ t(
2526
- Is,
2142
+ Z.visible && /* @__PURE__ */ e(
2143
+ Wi,
2527
2144
  {
2528
2145
  x: Z.x,
2529
2146
  y: Z.y,
2530
2147
  items: Qt,
2531
2148
  onClose: () => fe({ ...Z, visible: !1 }),
2532
- containerWidth: Lt,
2533
- containerHeight: Be
2149
+ containerWidth: Rt,
2150
+ containerHeight: Fe
2534
2151
  }
2535
2152
  ),
2536
- Pt && s && /* @__PURE__ */ t(Rs, { player: s, onClose: () => Fe(!1) }),
2537
- ge && /* @__PURE__ */ h("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: [
2538
- /* @__PURE__ */ t(ks, { className: "w-4 h-4 text-[var(--accent)] fill-current" }),
2539
- /* @__PURE__ */ t("span", { className: "text-xs font-bold tracking-wider", children: "2x Speed" })
2153
+ $t && n && /* @__PURE__ */ e(Di, { player: n, onClose: () => Be(!1) }),
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: [
2155
+ /* @__PURE__ */ e(Fi, { className: "w-4 h-4 text-[var(--accent)] fill-current" }),
2156
+ /* @__PURE__ */ e("span", { className: "text-xs font-bold tracking-wider", children: "2x Speed" })
2540
2157
  ] }),
2541
- D && a.controlsVisible && /* @__PURE__ */ t(
2158
+ W && a.controlsVisible && /* @__PURE__ */ e(
2542
2159
  "button",
2543
2160
  {
2544
- onClick: (l) => {
2545
- l.stopPropagation(), s.toggleLock();
2161
+ onClick: (c) => {
2162
+ c.stopPropagation(), n.toggleLock();
2546
2163
  },
2547
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"}`,
2548
- children: a.isLocked ? /* @__PURE__ */ t(xs, { className: "w-5 h-5" }) : /* @__PURE__ */ t(ys, { className: "w-5 h-5" })
2165
+ children: a.isLocked ? /* @__PURE__ */ e($i, { className: "w-5 h-5" }) : /* @__PURE__ */ e(Ei, { className: "w-5 h-5" })
2549
2166
  }
2550
2167
  ),
2551
- X && /* @__PURE__ */ t(
2168
+ Q && /* @__PURE__ */ e(
2552
2169
  "div",
2553
2170
  {
2554
- 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 ${X.type === "rewind" ? "left-0 rounded-r-[4rem]" : "right-0 rounded-l-[4rem]"}`,
2555
- onAnimationEnd: () => oe(null),
2556
- children: /* @__PURE__ */ h("div", { className: "flex flex-col items-center text-white drop-shadow-lg", children: [
2557
- X.type === "rewind" ? /* @__PURE__ */ t(ft, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ t(pt, { className: "w-12 h-12 animate-pulse" }),
2558
- /* @__PURE__ */ t("span", { className: "font-bold text-sm mt-2 font-mono", children: X.type === "rewind" ? "-10s" : "+10s" })
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]"}`,
2172
+ onAnimationEnd: () => ae(null),
2173
+ children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center text-white drop-shadow-lg", children: [
2174
+ Q.type === "rewind" ? /* @__PURE__ */ e(pt, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ e(bt, { className: "w-12 h-12 animate-pulse" }),
2175
+ /* @__PURE__ */ e("span", { className: "font-bold text-sm mt-2 font-mono", children: Q.type === "rewind" ? "-10s" : "+10s" })
2559
2176
  ] })
2560
2177
  },
2561
- X.id
2178
+ Q.id
2562
2179
  ),
2563
- a.isBuffering && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ t(Re, { className: "w-12 h-12 text-[var(--accent)] animate-spin drop-shadow-lg" }) }),
2564
- a.error && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center z-30 bg-black/90 backdrop-blur-md animate-in fade-in", children: /* @__PURE__ */ h("div", { className: "flex flex-col items-center gap-4 text-red-500 p-8 max-w-md text-center", children: [
2565
- /* @__PURE__ */ t("span", { className: "text-5xl mb-2", children: "⚠️" }),
2566
- /* @__PURE__ */ t("h3", { className: "text-xl font-bold text-white", children: "Playback Error" }),
2567
- /* @__PURE__ */ t("p", { className: "text-zinc-400 text-sm", children: a.error }),
2568
- /* @__PURE__ */ t("button", { onClick: () => s.load(s.store.get().sources[s.store.get().currentSourceIndex] || { url: e || "" }, 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" })
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: [
2182
+ /* @__PURE__ */ e("span", { className: "text-5xl mb-2", children: "⚠️" }),
2183
+ /* @__PURE__ */ e("h3", { className: "text-xl font-bold text-white", children: "Playback Error" }),
2184
+ /* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: a.error }),
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" })
2569
2186
  ] }) }),
2570
- It && !a.isLocked && (!a.isPlaying && !a.isBuffering && !a.error || a.controlsVisible) && !a.isBuffering ? /* @__PURE__ */ t(
2187
+ zt && !a.isLocked && (!a.isPlaying && !a.isBuffering && !a.error || a.controlsVisible) && !a.isBuffering ? /* @__PURE__ */ e(
2571
2188
  "div",
2572
2189
  {
2573
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"}`,
2574
- children: /* @__PURE__ */ h("div", { className: "flex items-center gap-8 md:gap-16 pointer-events-auto", children: [
2575
- /* @__PURE__ */ t("button", { onClick: (l) => {
2576
- l.stopPropagation(), F(!1), q(!1), le("rewind");
2577
- }, 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 ${Q.skipBtn}`, children: /* @__PURE__ */ t(ft, { className: Q.skipIcon }) }),
2578
- /* @__PURE__ */ t("button", { onClick: (l) => {
2579
- l.stopPropagation(), F(!1), q(!1), s.togglePlay();
2580
- }, 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 ${Q.playBtn}`, children: a.isPlaying ? /* @__PURE__ */ t(mt, { className: `${Q.playIcon} text-white fill-current` }) : /* @__PURE__ */ t(ht, { className: `${Q.playIcon} text-white ml-1 fill-current` }) }),
2581
- /* @__PURE__ */ t("button", { onClick: (l) => {
2582
- l.stopPropagation(), F(!1), q(!1), le("forward");
2583
- }, 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 ${Q.skipBtn}`, children: /* @__PURE__ */ t(pt, { className: Q.skipIcon }) })
2191
+ children: /* @__PURE__ */ l("div", { className: "flex items-center gap-8 md:gap-16 pointer-events-auto", children: [
2192
+ /* @__PURE__ */ e("button", { onClick: (c) => {
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 }) }),
2195
+ /* @__PURE__ */ e("button", { onClick: (c) => {
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` }) }),
2198
+ /* @__PURE__ */ e("button", { onClick: (c) => {
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 }) })
2584
2201
  ] })
2585
2202
  }
2586
2203
  ) : null,
2587
- /* @__PURE__ */ h(
2204
+ /* @__PURE__ */ l(
2588
2205
  "div",
2589
2206
  {
2590
- className: `absolute inset-x-0 bottom-0 z-30 transition-all duration-300 px-4 md:px-6 pb-4 md:pb-6 pt-24 bg-gradient-to-t from-black/95 via-black/70 to-transparent ${Xt ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4 pointer-events-none"}`,
2591
- onClick: (l) => {
2592
- l.target === l.currentTarget && (F(!1), q(!1), ae(!1)), l.stopPropagation();
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"}`,
2208
+ onClick: (c) => {
2209
+ c.target === c.currentTarget && (V(!1), U(!1), oe(!1)), c.stopPropagation();
2593
2210
  },
2594
2211
  children: [
2595
- !d.isLive && /* @__PURE__ */ h(
2212
+ !h.isLive && /* @__PURE__ */ l(
2596
2213
  "div",
2597
2214
  {
2598
- ref: ye,
2215
+ ref: we,
2599
2216
  className: "relative w-full h-3 group/slider mb-3 cursor-pointer touch-none flex items-center",
2600
- onMouseMove: Ht,
2217
+ onMouseMove: jt,
2601
2218
  onMouseLeave: () => {
2602
2219
  Ge(null), _e(null);
2603
2220
  },
2604
- onMouseDown: et,
2605
- onTouchStart: et,
2221
+ onMouseDown: Ze,
2222
+ onTouchStart: Ze,
2606
2223
  children: [
2607
- (ct = d.highlight) == null ? void 0 : ct.map((l, f) => /* @__PURE__ */ t("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: `${l.time / a.duration * 100}%` }, title: l.text }, f)),
2608
- Ue !== null && /* @__PURE__ */ h("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, ${Bt}%, calc(100% - 70px))` }, children: [
2609
- U && /* @__PURE__ */ t("div", { className: "bg-black/90 border border-white/10 shadow-2xl overflow-hidden backdrop-blur-sm", style: { width: `${U.w * 0.5}px`, height: `${U.h * 0.5}px`, borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t("div", { style: { backgroundImage: `url("${U.url}")`, width: `${U.w}px`, height: `${U.h}px`, backgroundPosition: `-${U.x}px -${U.y}px`, backgroundRepeat: "no-repeat", transform: "scale(0.5)", transformOrigin: "top left" } }) }),
2610
- /* @__PURE__ */ t("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children: ze(Ue) })
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: [
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" } }) }),
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) })
2611
2228
  ] }),
2612
- /* @__PURE__ */ h("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: [
2613
- a.duration > 0 && a.buffered.map((l, f) => /* @__PURE__ */ t("div", { className: "absolute top-0 bottom-0 bg-white/20", style: { left: `${l.start / a.duration * 100}%`, width: `${(l.end - l.start) / a.duration * 100}%` } }, f)),
2614
- /* @__PURE__ */ t("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(pe ? re : a.currentTime) / a.duration * 100}%` } })
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: [
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}%` } })
2615
2232
  ] }),
2616
- /* @__PURE__ */ t(
2233
+ /* @__PURE__ */ e(
2617
2234
  "div",
2618
2235
  {
2619
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",
@@ -2626,9 +2243,9 @@ const _i = y("Zap", [
2626
2243
  ]
2627
2244
  }
2628
2245
  ),
2629
- /* @__PURE__ */ h("div", { className: "flex items-center justify-between pointer-events-auto", children: [
2630
- /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: at.filter((l) => l.position === "left" || l.position === "center").map(ot) }),
2631
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: at.filter((l) => l.position === "right").map(ot) })
2246
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between pointer-events-auto", children: [
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) })
2632
2249
  ] })
2633
2250
  ]
2634
2251
  }
@@ -2637,20 +2254,21 @@ const _i = y("Zap", [
2637
2254
  ]
2638
2255
  }
2639
2256
  );
2640
- }, js = (o, e) => {
2641
- const i = ei(o);
2642
- return i.render(Te.createElement(xt, e)), {
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)), {
2643
2261
  unmount: () => {
2644
2262
  i.unmount();
2645
2263
  },
2646
- update: (n) => {
2647
- i.render(Te.createElement(xt, { ...e, ...n }));
2264
+ update: (r) => {
2265
+ i.render(ze.createElement(wt, { ...t, ...r }));
2648
2266
  }
2649
2267
  };
2650
2268
  };
2651
2269
  export {
2652
2270
  ni as StrataCore,
2653
- xt as StrataPlayer,
2654
- js as mountStrataPlayer
2271
+ wt as StrataPlayer,
2272
+ es as mountStrataPlayer
2655
2273
  };
2656
2274
  //# sourceMappingURL=strataplayer.es.js.map