@therealtinhtute/baroiplayer 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/core-plugins-By-4-kGs.cjs +2 -0
  2. package/dist/core-plugins-By-4-kGs.cjs.map +1 -0
  3. package/dist/{core-plugins-CROGvQUy.js → core-plugins-DSBWcTuX.js} +444 -309
  4. package/dist/core-plugins-DSBWcTuX.js.map +1 -0
  5. package/dist/core.js +2 -2
  6. package/dist/core.mjs +19 -19
  7. package/dist/{enhanced-components-DUw2KrmQ.js → enhanced-components-B_l3cist.js} +2 -2
  8. package/dist/{enhanced-components-DUw2KrmQ.js.map → enhanced-components-B_l3cist.js.map} +1 -1
  9. package/dist/{enhanced-components-DXBCHU0v.cjs → enhanced-components-BspFs9OO.cjs} +2 -2
  10. package/dist/{enhanced-components-DXBCHU0v.cjs.map → enhanced-components-BspFs9OO.cjs.map} +1 -1
  11. package/dist/hooks-BXwI8QG6.cjs +4 -0
  12. package/dist/hooks-BXwI8QG6.cjs.map +1 -0
  13. package/dist/hooks-Bpi-jDiO.js +1816 -0
  14. package/dist/hooks-Bpi-jDiO.js.map +1 -0
  15. package/dist/index.js +2 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +18 -20
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/{minimal-components-DlRK7Qu_.js → minimal-components-C4z900Ro.js} +297 -298
  20. package/dist/minimal-components-C4z900Ro.js.map +1 -0
  21. package/dist/minimal-components-v4qBp6jv.cjs +2 -0
  22. package/dist/minimal-components-v4qBp6jv.cjs.map +1 -0
  23. package/package.json +1 -1
  24. package/src/components/accessibility/keyboard-help-overlay.tsx +2 -0
  25. package/src/components/enhanced/debug-panel.tsx +1 -1
  26. package/src/components/enhanced/enhanced-media-player.tsx +68 -25
  27. package/src/components/legacy.tsx +6 -6
  28. package/src/components/media-player-video.tsx +5 -12
  29. package/src/components/media-player.tsx +2 -2
  30. package/src/components/ui/enhanced-seek-bar.tsx +2 -2
  31. package/src/components/ui/media-resource-preloader.tsx +21 -23
  32. package/src/components/unified/base-media-player.tsx +22 -10
  33. package/src/components/variants/minimal/AccessibleMinimalPlayer.tsx +58 -38
  34. package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.tsx +6 -6
  35. package/src/core/optimization/bundle-optimizer.tsx +26 -27
  36. package/src/core/plugins/__tests__/registry.test.ts +1 -1
  37. package/src/core/plugins/enhanced-plugin-system.ts +26 -8
  38. package/src/core/plugins/registry.ts +319 -92
  39. package/src/core/plugins/types.ts +21 -3
  40. package/src/core/providers/enhanced-hls-provider.ts +11 -40
  41. package/src/core/providers/lazy-provider.tsx +5 -42
  42. package/src/features/media-session/media-session-manager.ts +4 -26
  43. package/src/features/picture-in-picture/pip-manager.ts +2 -2
  44. package/src/features/playlist/playlist-manager.ts +26 -18
  45. package/src/features/subtitles/subtitle-manager.ts +1 -1
  46. package/src/features/subtitles/subtitle-parser.ts +19 -16
  47. package/src/features/thumbnails/thumbnail-generator.ts +12 -5
  48. package/src/hooks/__tests__/currentTime-fix.test.ts +149 -0
  49. package/src/hooks/accessibility/use-accessibility-preferences.ts +1 -1
  50. package/src/hooks/accessibility/use-focus-management.ts +2 -2
  51. package/src/hooks/accessibility/use-keyboard-shortcuts.ts +2 -2
  52. package/src/hooks/accessibility/use-screen-reader.ts +1 -1
  53. package/src/hooks/core/index.ts +1 -1
  54. package/src/hooks/use-buffer-health.ts +1 -1
  55. package/src/hooks/use-enhanced-media-player.ts +107 -9
  56. package/src/hooks/use-focus-trap.tsx +2 -2
  57. package/src/hooks/use-intelligent-preloading.ts +23 -3
  58. package/src/hooks/use-keyboard-shortcuts.ts +2 -2
  59. package/src/hooks/use-media-player.ts +74 -43
  60. package/src/hooks/use-memory-optimization.ts +15 -15
  61. package/src/hooks/use-smart-preload.ts +1 -2
  62. package/src/hooks/useKeyboardShortcuts.ts +34 -2
  63. package/src/hooks/useVideoPlayer.ts +50 -4
  64. package/src/index-legacy.ts +3 -5
  65. package/src/test/accessibility-utils.ts +7 -7
  66. package/src/test/media-mocks.ts +41 -28
  67. package/src/test/setup.ts +22 -4
  68. package/src/types/index.ts +13 -0
  69. package/dist/core-plugins-CROGvQUy.js.map +0 -1
  70. package/dist/core-plugins-DtsHBOtF.cjs +0 -2
  71. package/dist/core-plugins-DtsHBOtF.cjs.map +0 -1
  72. package/dist/hooks-BW-JjVgP.cjs +0 -4
  73. package/dist/hooks-BW-JjVgP.cjs.map +0 -1
  74. package/dist/hooks-CyX6De5M.js +0 -1693
  75. package/dist/hooks-CyX6De5M.js.map +0 -1
  76. package/dist/minimal-components-Bdcpxav5.cjs +0 -2
  77. package/dist/minimal-components-Bdcpxav5.cjs.map +0 -1
  78. package/dist/minimal-components-DlRK7Qu_.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { j as e, d as Me, u as ie, a as Q, b as Z, M as y } from "./context-BYwDoSRX.js";
1
+ import { j as e, d as we, u as ie, a as Q, b as Z, M as y } from "./context-BYwDoSRX.js";
2
2
  import K, { useState as A, useRef as D, useEffect as B, useCallback as V } from "react";
3
3
  import { c as f, f as W } from "./utils-Dzpl2ArK.js";
4
- import { u as Ne, a as Le, b as ze, c as Ee, d as ke, e as Ce, f as Ae, g as Se } from "./hooks-CyX6De5M.js";
4
+ import { u as Me, a as Ne, b as Le, c as ze, d as Ee, e as ke, f as Ce, g as Ae } from "./hooks-Bpi-jDiO.js";
5
5
  function Oe(...t) {
6
6
  return (s) => {
7
7
  t.forEach((n) => {
@@ -9,15 +9,15 @@ function Oe(...t) {
9
9
  });
10
10
  };
11
11
  }
12
- function Pe({
12
+ function Se({
13
13
  children: t,
14
14
  className: s,
15
15
  dir: n = "ltr",
16
16
  disabled: a = !1,
17
- asChild: l = !1,
18
- autoHide: r = !0,
19
- enableGestures: c = !0,
20
- enableMobileOptimizations: o = !0,
17
+ asChild: r = !1,
18
+ autoHide: l = !0,
19
+ enableGestures: o = !0,
20
+ enableMobileOptimizations: c = !0,
21
21
  onPlay: d,
22
22
  onPause: p,
23
23
  onEnded: v,
@@ -29,10 +29,10 @@ function Pe({
29
29
  onFullscreenChange: k,
30
30
  ...g
31
31
  }) {
32
- const x = ie(), u = Q(), { isTouchDevice: w } = Ne(), h = Z((i) => i.isPlaying), m = Z((i) => i.currentTime), L = Z((i) => i.volume);
32
+ const x = ie(), u = Q(), { isTouchDevice: w } = Me(), h = Z((i) => i.isPlaying), m = Z((i) => i.currentTime), L = Z((i) => i.volume);
33
33
  Z((i) => i.isMuted), Z((i) => i.error);
34
34
  const j = Z((i) => i.isFullscreen);
35
- Z((i) => i.isPictureInPicture), Le();
35
+ Z((i) => i.isPictureInPicture), Ne();
36
36
  const C = {
37
37
  onPlayPause: () => {
38
38
  a || u({
@@ -66,11 +66,11 @@ function Pe({
66
66
  console.log("Zoom gesture detected:", i);
67
67
  }
68
68
  };
69
- ze(
69
+ Le(
70
70
  x.rootRef,
71
- c ? C : {}
71
+ o ? C : {}
72
72
  );
73
- const S = (i) => {
73
+ const O = (i) => {
74
74
  if (a) return;
75
75
  const E = i.target;
76
76
  if (E.tagName === "INPUT" || E.tagName === "TEXTAREA" || E.isContentEditable) return;
@@ -128,7 +128,7 @@ function Pe({
128
128
  u({ type: y.PAUSE }), p?.();
129
129
  }, I = () => {
130
130
  u({ type: y.PAUSE }), v?.();
131
- }, O = () => {
131
+ }, S = () => {
132
132
  const P = i.currentTime;
133
133
  u({ type: y.SET_CURRENT_TIME, detail: P }), b?.(P);
134
134
  }, J = () => {
@@ -142,8 +142,8 @@ function Pe({
142
142
  }, U = () => {
143
143
  u({ type: y.SET_LOADING, detail: !0 });
144
144
  };
145
- return i.addEventListener("play", E), i.addEventListener("pause", Y), i.addEventListener("ended", I), i.addEventListener("timeupdate", O), i.addEventListener("volumechange", J), i.addEventListener("loadedmetadata", F), i.addEventListener("error", H), i.addEventListener("loadstart", U), () => {
146
- i.removeEventListener("play", E), i.removeEventListener("pause", Y), i.removeEventListener("ended", I), i.removeEventListener("timeupdate", O), i.removeEventListener("volumechange", J), i.removeEventListener("loadedmetadata", F), i.removeEventListener("error", H), i.removeEventListener("loadstart", U);
145
+ return i.addEventListener("play", E), i.addEventListener("pause", Y), i.addEventListener("ended", I), i.addEventListener("timeupdate", S), i.addEventListener("volumechange", J), i.addEventListener("loadedmetadata", F), i.addEventListener("error", H), i.addEventListener("loadstart", U), () => {
146
+ i.removeEventListener("play", E), i.removeEventListener("pause", Y), i.removeEventListener("ended", I), i.removeEventListener("timeupdate", S), i.removeEventListener("volumechange", J), i.removeEventListener("loadedmetadata", F), i.removeEventListener("error", H), i.removeEventListener("loadstart", U);
147
147
  };
148
148
  }, [u, d, p, v, b, N, M, z]);
149
149
  const G = {
@@ -176,22 +176,22 @@ function Pe({
176
176
  "transform-gpu",
177
177
  s
178
178
  ),
179
- onKeyDown: S,
179
+ onKeyDown: O,
180
180
  ...g
181
181
  };
182
182
  return /* @__PURE__ */ e.jsx("div", { ref: Oe(x.rootRef), ...G, children: t });
183
183
  }
184
- function ce(t) {
185
- return /* @__PURE__ */ e.jsx(Me, { children: /* @__PURE__ */ e.jsx(Pe, { ...t }) });
184
+ function oe(t) {
185
+ return /* @__PURE__ */ e.jsx(we, { children: /* @__PURE__ */ e.jsx(Se, { ...t }) });
186
186
  }
187
- ce.displayName = "MediaPlayerRoot";
188
- const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsx(
187
+ oe.displayName = "MediaPlayerRoot";
188
+ const ce = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsx(
189
189
  "path",
190
190
  {
191
191
  fill: "currentColor",
192
192
  d: "M3 2.25a1 1 0 0 0-1 1V9a1 1 0 0 0 1 1h5.25a1 1 0 0 0 0-2H4.863c.985-1.179 2.208-2.113 3.682-2.57a9.435 9.435 0 0 1 6.106.16c1.981.738 3.81 2.232 4.722 3.894a1 1 0 1 0 1.754-.961c-1.175-2.143-3.415-3.927-5.778-4.807a11.435 11.435 0 0 0-7.395-.196C6.378 4.008 5.068 4.9 4 5.979V3.25a1 1 0 0 0-1-1ZM9.75 12a1 1 0 0 0-1.762-.647l-.222.265c-.515.623-1.078 1.303-2.28 2.024a1 1 0 1 0 1.029 1.716c.483-.29.889-.582 1.235-.865V20a1 1 0 0 0 2 0v-8Zm6.5-1c-1.386 0-2.4.635-3.008 1.661c-.564.95-.742 2.161-.742 3.339s.178 2.39.742 3.339C13.85 20.365 14.864 21 16.25 21s2.4-.635 3.008-1.661c.564-.95.742-2.161.742-3.339s-.178-2.39-.742-3.339C18.65 11.635 17.636 11 16.25 11Zm-1.75 5c0-1.031.166-1.82.461-2.318c.251-.422.613-.682 1.289-.682c.676 0 1.038.26 1.288.682c.296.498.462 1.287.462 2.318c0 1.031-.166 1.82-.462 2.318c-.25.422-.612.682-1.288.682s-1.038-.26-1.289-.682c-.295-.498-.461-1.287-.461-2.318Z"
193
193
  }
194
- ) }), Te = (t) => /* @__PURE__ */ e.jsx(
194
+ ) }), Pe = (t) => /* @__PURE__ */ e.jsx(
195
195
  "svg",
196
196
  {
197
197
  width: 32,
@@ -207,13 +207,13 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
207
207
  }
208
208
  )
209
209
  }
210
- ), Ie = Te, de = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsx(
210
+ ), Te = Pe, ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsx(
211
211
  "path",
212
212
  {
213
213
  fill: "currentColor",
214
214
  d: "M21 2.25a1 1 0 0 1 1 1V9a1 1 0 0 1-1 1h-5.25a1 1 0 0 1 0-2h3.387c-.985-1.179-2.208-2.113-3.682-2.57a9.435 9.435 0 0 0-6.106.16c-1.981.738-3.81 2.232-4.722 3.894a1 1 0 0 1-1.754-.961C4.048 6.38 6.288 4.596 8.652 3.716a11.435 11.435 0 0 1 7.394-.196c1.576.488 2.886 1.38 3.954 2.459V3.25a1 1 0 0 1 1-1ZM9.095 11.061A1 1 0 0 1 9.75 12v8a1 1 0 0 1-2 0v-5.507c-.346.283-.752.575-1.235.864a1 1 0 1 1-1.03-1.715c1.203-.721 1.766-1.4 2.281-2.024c.074-.09.148-.178.222-.265a1 1 0 0 1 1.107-.292Zm4.147 1.6C13.85 11.635 14.864 11 16.25 11s2.4.635 3.008 1.661c.564.95.742 2.161.742 3.339s-.178 2.39-.742 3.339C18.65 20.365 17.636 21 16.25 21s-2.4-.636-3.008-1.661c-.564-.95-.742-2.161-.742-3.339s.178-2.39.742-3.339Zm1.72 1.021c-.296.498-.462 1.287-.462 2.318c0 1.031.166 1.82.461 2.318c.251.422.613.682 1.289.682c.676 0 1.038-.26 1.288-.682c.296-.498.462-1.287.462-2.318c0-1.031-.166-1.82-.462-2.318c-.25-.422-.612-.682-1.288-.682s-1.038.26-1.289.682Z"
215
215
  }
216
- ) }), qe = (t) => /* @__PURE__ */ e.jsx(
216
+ ) }), Ie = (t) => /* @__PURE__ */ e.jsx(
217
217
  "svg",
218
218
  {
219
219
  width: "24",
@@ -234,7 +234,7 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
234
234
  }
235
235
  )
236
236
  }
237
- ), Ge = (t) => /* @__PURE__ */ e.jsx(
237
+ ), qe = (t) => /* @__PURE__ */ e.jsx(
238
238
  "svg",
239
239
  {
240
240
  width: "24",
@@ -255,7 +255,7 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
255
255
  }
256
256
  )
257
257
  }
258
- ), Ye = (t) => /* @__PURE__ */ e.jsxs(
258
+ ), Ge = (t) => /* @__PURE__ */ e.jsxs(
259
259
  "svg",
260
260
  {
261
261
  width: "24",
@@ -288,7 +288,7 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
288
288
  ) })
289
289
  ]
290
290
  }
291
- ), Ze = (t) => /* @__PURE__ */ e.jsx(
291
+ ), Ye = (t) => /* @__PURE__ */ e.jsx(
292
292
  "svg",
293
293
  {
294
294
  width: "24",
@@ -309,7 +309,7 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
309
309
  }
310
310
  )
311
311
  }
312
- ), Ke = (t) => /* @__PURE__ */ e.jsx(
312
+ ), Ze = (t) => /* @__PURE__ */ e.jsx(
313
313
  "svg",
314
314
  {
315
315
  width: "24",
@@ -328,13 +328,13 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
328
328
  }
329
329
  )
330
330
  }
331
- ), De = (t) => /* @__PURE__ */ e.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsx(
331
+ ), Ke = (t) => /* @__PURE__ */ e.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsx(
332
332
  "path",
333
333
  {
334
334
  fill: "currentColor",
335
335
  d: "M2 12c0-.865.11-1.703.316-2.504A3 3 0 0 0 4.99 4.867a9.99 9.99 0 0 1 4.335-2.505a3 3 0 0 0 5.348 0a9.99 9.99 0 0 1 4.335 2.505a3 3 0 0 0 2.675 4.63a10.036 10.036 0 0 1 0 5.007a3 3 0 0 0-2.675 4.629a9.99 9.99 0 0 1-4.335 2.505a3 3 0 0 0-5.348 0a9.99 9.99 0 0 1-4.335-2.505a3 3 0 0 0-2.675-4.63A10.056 10.056 0 0 1 2 12zm4.804 3c.63 1.091.81 2.346.564 3.524c.408.29.842.541 1.297.75A4.993 4.993 0 0 1 12 18c1.26 0 2.438.471 3.335 1.274c.455-.209.889-.46 1.297-.75A4.993 4.993 0 0 1 17.196 15a4.993 4.993 0 0 1 2.77-2.25a8.126 8.126 0 0 0 0-1.5A4.993 4.993 0 0 1 17.195 9a4.993 4.993 0 0 1-.564-3.524a7.989 7.989 0 0 0-1.297-.75A4.993 4.993 0 0 1 12 6a4.993 4.993 0 0 1-3.335-1.274a7.99 7.99 0 0 0-1.297.75A4.993 4.993 0 0 1 6.804 9a4.993 4.993 0 0 1-2.77 2.25a8.126 8.126 0 0 0 0 1.5A4.993 4.993 0 0 1 6.805 15zM12 15a3 3 0 1 1 0-6a3 3 0 0 1 0 6zm0-2a1 1 0 1 0 0-2a1 1 0 0 0 0 2z"
336
336
  }
337
- ) }), Re = (t) => /* @__PURE__ */ e.jsx(
337
+ ) }), De = (t) => /* @__PURE__ */ e.jsx(
338
338
  "svg",
339
339
  {
340
340
  width: "24",
@@ -353,7 +353,7 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
353
353
  }
354
354
  )
355
355
  }
356
- ), We = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsxs("g", { fill: "currentColor", children: [
356
+ ), Re = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsxs("g", { fill: "currentColor", children: [
357
357
  /* @__PURE__ */ e.jsx(
358
358
  "path",
359
359
  {
@@ -363,7 +363,7 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
363
363
  }
364
364
  ),
365
365
  /* @__PURE__ */ e.jsx("path", { d: "M21.78 3.53a.75.75 0 0 0-1.06-1.06l-4.45 4.449a11.265 11.265 0 0 0-.193-1.39c-.172-.788-.477-1.473-1.116-1.923a3.066 3.066 0 0 0-.769-.39c-.818-.28-1.631-.057-2.457.345c-.814.395-1.8 1.046-3.032 1.857l-.267.176c-.447.295-.602.394-.76.464a2.17 2.17 0 0 1-.535.16c-.171.03-.354.032-.89.032h-.162c-1.217 0-2.062-.001-2.814.347A3.962 3.962 0 0 0 1.548 8.22c-.392.729-.438 1.491-.504 2.575l-.008.13C1.014 11.294 1 11.658 1 12c0 .342.014.706.036 1.074l.008.13c.066 1.084.112 1.846.504 2.575a3.962 3.962 0 0 0 1.727 1.624c.61.283 1.283.336 2.166.345L2.72 20.47a.75.75 0 1 0 1.06 1.06l18-18ZM16.5 12a.75.75 0 0 0-1.255-.554l-.071.074l-6 6.274A.778.778 0 0 0 9.34 19c1.039.68 1.899 1.225 2.631 1.549c.743.328 1.48.489 2.222.236a3.08 3.08 0 0 0 .769-.391c.706-.497 1.005-1.28 1.167-2.18c.159-.884.213-2.056.281-3.516l.003-.058a68.23 68.23 0 0 0 .088-2.64Z" })
366
- ] }) }), Je = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsxs("g", { fill: "currentColor", children: [
366
+ ] }) }), We = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e.jsxs("g", { fill: "currentColor", children: [
367
367
  /* @__PURE__ */ e.jsx("path", { d: "M2.003 11.716c.037-1.843.056-2.764.668-3.552a3.18 3.18 0 0 1 .413-.431c.752-.636 1.746-.636 3.733-.636c.71 0 1.065 0 1.403-.092c.07-.02.14-.042.209-.067c.33-.121.627-.33 1.22-.746c2.338-1.645 3.508-2.467 4.489-2.11c.188.069.37.168.533.29c.848.635.913 2.115 1.042 5.073a70.58 70.58 0 0 1 .08 2.555c0 .521-.032 1.46-.08 2.555c-.13 2.958-.194 4.438-1.042 5.073a2.109 2.109 0 0 1-.533.29c-.982.357-2.15-.465-4.49-2.11c-.592-.416-.889-.625-1.22-.746a2.61 2.61 0 0 0-.208-.067c-.338-.092-.693-.092-1.403-.092c-1.987 0-2.98 0-3.733-.636a3.145 3.145 0 0 1-.413-.43c-.612-.79-.63-1.71-.668-3.553a14.06 14.06 0 0 1 0-.569Z" }),
368
368
  /* @__PURE__ */ e.jsx(
369
369
  "path",
@@ -373,134 +373,133 @@ const ue = (t) => /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/
373
373
  clipRule: "evenodd"
374
374
  }
375
375
  )
376
- ] }) }), He = ({
376
+ ] }) }), Je = ({
377
377
  size: t = 24,
378
378
  className: s = "",
379
379
  color: n = "currentColor"
380
- }) => /* @__PURE__ */ e.jsx(Ke, { width: t, height: t, className: s, style: { color: n } }), Ue = ({
380
+ }) => /* @__PURE__ */ e.jsx(Ze, { width: t, height: t, className: s, style: { color: n } }), He = ({
381
381
  size: t = 24,
382
382
  className: s = "",
383
383
  color: n = "currentColor"
384
- }) => /* @__PURE__ */ e.jsx(Ze, { width: t, height: t, className: s, style: { color: n } }), Ve = ({
384
+ }) => /* @__PURE__ */ e.jsx(Ye, { width: t, height: t, className: s, style: { color: n } }), Ue = ({
385
385
  size: t = 24,
386
386
  className: s = "",
387
387
  color: n = "currentColor"
388
- }) => /* @__PURE__ */ e.jsx(Je, { width: t, height: t, className: s, style: { color: n } }), Fe = ({
388
+ }) => /* @__PURE__ */ e.jsx(We, { width: t, height: t, className: s, style: { color: n } }), Ve = ({
389
389
  size: t = 24,
390
390
  className: s = "",
391
391
  color: n = "currentColor"
392
- }) => /* @__PURE__ */ e.jsx(We, { width: t, height: t, className: s, style: { color: n } }), Xe = ({
392
+ }) => /* @__PURE__ */ e.jsx(Re, { width: t, height: t, className: s, style: { color: n } }), Fe = ({
393
393
  size: t = 24,
394
394
  className: s = "",
395
395
  color: n = "currentColor"
396
- }) => /* @__PURE__ */ e.jsx(qe, { width: t, height: t, className: s, style: { color: n } }), Be = ({
396
+ }) => /* @__PURE__ */ e.jsx(Ie, { width: t, height: t, className: s, style: { color: n } }), Xe = ({
397
397
  size: t = 24,
398
398
  className: s = "",
399
399
  color: n = "currentColor"
400
- }) => /* @__PURE__ */ e.jsx(Ge, { width: t, height: t, className: s, style: { color: n } }), Qe = ({
400
+ }) => /* @__PURE__ */ e.jsx(qe, { width: t, height: t, className: s, style: { color: n } }), Be = ({
401
401
  size: t = 24,
402
402
  className: s = "",
403
403
  color: n = "currentColor"
404
- }) => /* @__PURE__ */ e.jsx(De, { width: t, height: t, className: s, style: { color: n } }), _e = ({
404
+ }) => /* @__PURE__ */ e.jsx(Ke, { width: t, height: t, className: s, style: { color: n } }), Qe = ({
405
405
  size: t = 24,
406
406
  className: s = "",
407
407
  color: n = "currentColor"
408
408
  }) => /* @__PURE__ */ e.jsx(
409
- Ye,
409
+ Ge,
410
410
  {
411
411
  width: t,
412
412
  height: t,
413
413
  className: `animate-spin ${s}`,
414
414
  style: { color: n }
415
415
  }
416
- ), $e = ({
416
+ ), _e = ({
417
417
  size: t = 24,
418
418
  className: s = "",
419
419
  color: n = "currentColor"
420
- }) => /* @__PURE__ */ e.jsx(ue, { width: t, height: t, className: s, style: { color: n } }), et = ({
420
+ }) => /* @__PURE__ */ e.jsx(ce, { width: t, height: t, className: s, style: { color: n } }), $e = ({
421
421
  size: t = 24,
422
422
  className: s = "",
423
423
  color: n = "currentColor"
424
- }) => /* @__PURE__ */ e.jsx(de, { width: t, height: t, className: s, style: { color: n } }), tt = ({
424
+ }) => /* @__PURE__ */ e.jsx(ue, { width: t, height: t, className: s, style: { color: n } }), et = ({
425
425
  size: t = 24,
426
426
  className: s = "",
427
427
  color: n = "currentColor"
428
- }) => /* @__PURE__ */ e.jsx(de, { width: t, height: t, className: s, style: { color: n } }), nt = ({
428
+ }) => /* @__PURE__ */ e.jsx(ue, { width: t, height: t, className: s, style: { color: n } }), tt = ({
429
429
  size: t = 24,
430
430
  className: s = "",
431
431
  color: n = "currentColor"
432
- }) => /* @__PURE__ */ e.jsx(ue, { width: t, height: t, className: s, style: { color: n } }), me = ({
432
+ }) => /* @__PURE__ */ e.jsx(ce, { width: t, height: t, className: s, style: { color: n } }), de = ({
433
433
  size: t = 24,
434
434
  className: s = "",
435
435
  color: n = "currentColor"
436
- }) => /* @__PURE__ */ e.jsx(Re, { width: t, height: t, className: s, style: { color: n } }), st = ({
436
+ }) => /* @__PURE__ */ e.jsx(De, { width: t, height: t, className: s, style: { color: n } }), nt = ({
437
437
  size: t = 24,
438
438
  className: s = "",
439
439
  color: n = "currentColor"
440
- }) => /* @__PURE__ */ e.jsx(Ie, { width: t, height: t, className: s, style: { color: n } }), R = {
441
- play: He,
442
- pause: Ue,
443
- volume: Ve,
444
- volumeMuted: Fe,
445
- fullscreen: Xe,
446
- exitFullscreen: Be,
447
- settings: Qe,
448
- forward: $e,
449
- backward: et,
450
- spinner: _e,
451
- subtitle: me
440
+ }) => /* @__PURE__ */ e.jsx(Te, { width: t, height: t, className: s, style: { color: n } }), R = {
441
+ play: Je,
442
+ pause: He,
443
+ volume: Ue,
444
+ volumeMuted: Ve,
445
+ fullscreen: Fe,
446
+ exitFullscreen: Xe,
447
+ settings: Be,
448
+ forward: _e,
449
+ backward: $e,
450
+ spinner: Qe,
451
+ subtitle: de
452
452
  };
453
- function oe(...t) {
453
+ function st(...t) {
454
454
  return (s) => {
455
455
  t.forEach((n) => {
456
456
  typeof n == "function" ? n(s) : n && (n.current = s);
457
457
  });
458
458
  };
459
459
  }
460
- function he({
460
+ function me({
461
461
  asChild: t = !1,
462
462
  className: s,
463
463
  children: n,
464
464
  ...a
465
465
  }) {
466
- const l = ie(), [r, c] = K.useState(
467
- () => oe(l.mediaRef)
466
+ const r = ie(), l = K.useMemo(
467
+ () => st(r.mediaRef),
468
+ [r.mediaRef]
468
469
  );
469
- if (K.useEffect(() => {
470
- c(() => oe(l.mediaRef));
471
- }, [l.mediaRef]), t) {
470
+ if (t) {
472
471
  const o = K.Children.only(n);
473
472
  return K.cloneElement(o, {
474
473
  ...a,
475
- ref: r,
474
+ ref: l,
476
475
  "data-slot": "media-player-video"
477
476
  });
478
477
  }
479
- return /* @__PURE__ */ e.jsx("video", { ref: r, "data-slot": "media-player-video", className: s, ...a, children: n });
478
+ return /* @__PURE__ */ e.jsx("video", { ref: l, "data-slot": "media-player-video", className: s, ...a, children: n });
480
479
  }
481
- he.displayName = "MediaPlayerVideo";
480
+ me.displayName = "MediaPlayerVideo";
482
481
  function se({
483
482
  variant: t = "current-duration",
484
483
  className: s,
485
484
  asChild: n = !1,
486
485
  children: a,
487
- ...l
486
+ ...r
488
487
  }) {
489
- const r = ie(), c = Z((b) => b.currentTime), o = Z((b) => b.duration), d = K.useMemo(() => t === "remaining" ? {
490
- remaining: W(Math.max(0, o - c))
488
+ const l = ie(), o = Z((b) => b.currentTime), c = Z((b) => b.duration), d = K.useMemo(() => t === "remaining" ? {
489
+ remaining: W(Math.max(0, c - o))
491
490
  } : t === "duration" ? {
492
- duration: W(o)
491
+ duration: W(c)
493
492
  } : t === "current" ? {
494
- current: W(c)
493
+ current: W(o)
495
494
  } : {
496
- current: W(c),
497
- duration: W(o)
498
- }, [t, c, o]), p = {
495
+ current: W(o),
496
+ duration: W(c)
497
+ }, [t, o, c]), p = {
499
498
  "data-slot": "media-player-time",
500
499
  "data-variant": t,
501
- dir: r.dir,
500
+ dir: l.dir,
502
501
  className: f("text-sm text-foreground/80 tabular-nums", s),
503
- ...l
502
+ ...r
504
503
  };
505
504
  if (t !== "current-duration") {
506
505
  const b = d[t];
@@ -542,16 +541,16 @@ function at({
542
541
  size: n = "md",
543
542
  className: a
544
543
  }) {
545
- const l = Q(), r = () => {
546
- l({
544
+ const r = Q(), l = () => {
545
+ r({
547
546
  type: t ? y.PAUSE : y.PLAY
548
547
  });
549
- }, c = {
548
+ }, o = {
550
549
  sm: "h-10 w-10",
551
550
  md: "h-12 w-12 minimal-btn",
552
551
  lg: "h-16 w-16 minimal-btn-lg",
553
552
  xl: "h-20 w-20 minimal-btn-lg"
554
- }, o = {
553
+ }, c = {
555
554
  sm: 27,
556
555
  md: 30,
557
556
  lg: 36,
@@ -560,17 +559,17 @@ function at({
560
559
  return !d || !p ? null : /* @__PURE__ */ e.jsx(
561
560
  "button",
562
561
  {
563
- className: f("minimal-btn", c[n], a),
564
- onClick: r,
562
+ className: f("minimal-btn", o[n], a),
563
+ onClick: l,
565
564
  "aria-label": t ? "Pause" : "Play",
566
- children: t ? /* @__PURE__ */ e.jsx(p, { size: o[n] }) : /* @__PURE__ */ e.jsx(d, { size: o[n] })
565
+ children: t ? /* @__PURE__ */ e.jsx(p, { size: c[n] }) : /* @__PURE__ */ e.jsx(d, { size: c[n] })
567
566
  }
568
567
  );
569
568
  }
570
569
  function it({ thumbnails: t, onSeek: s, className: n }) {
571
- const a = Q(), l = Z((h) => h.currentTime), r = Z((h) => h.duration), c = Z((h) => h.buffered), [o, d] = A(!1), [p, v] = A(0), [b, N] = A(0), M = D(null), z = r > 0 ? l / r * 100 : 0, T = c && c.length > 0 && r > 0 ? c.end(c.length - 1) / r * 100 : 0, k = (h) => {
572
- if (!M.current || r === 0) return;
573
- const m = M.current.getBoundingClientRect(), j = Math.max(0, Math.min(1, (h - m.left) / m.width)) * r;
570
+ const a = Q(), r = Z((h) => h.currentTime), l = Z((h) => h.duration), o = Z((h) => h.buffered), [c, d] = A(!1), [p, v] = A(0), [b, N] = A(0), M = D(null), z = l > 0 ? r / l * 100 : 0, T = o && o.length > 0 && l > 0 ? o.end(o.length - 1) / l * 100 : 0, k = (h) => {
571
+ if (!M.current || l === 0) return;
572
+ const m = M.current.getBoundingClientRect(), j = Math.max(0, Math.min(1, (h - m.left) / m.width)) * l;
574
573
  a({
575
574
  type: y.SEEK,
576
575
  detail: j
@@ -578,16 +577,16 @@ function it({ thumbnails: t, onSeek: s, className: n }) {
578
577
  }, g = (h) => {
579
578
  h.preventDefault(), d(!0), k(h.clientX);
580
579
  }, x = (h) => {
581
- if (!M.current || r === 0) return;
582
- const m = M.current.getBoundingClientRect(), j = Math.max(0, Math.min(1, (h.clientX - m.left) / m.width)) * r;
583
- v(j), N(h.clientX - m.left), o && k(h.clientX);
580
+ if (!M.current || l === 0) return;
581
+ const m = M.current.getBoundingClientRect(), j = Math.max(0, Math.min(1, (h.clientX - m.left) / m.width)) * l;
582
+ v(j), N(h.clientX - m.left), c && k(h.clientX);
584
583
  }, u = () => {
585
584
  d(!1);
586
585
  }, w = () => {
587
586
  d(!1), v(0);
588
587
  };
589
588
  return K.useEffect(() => {
590
- if (o) {
589
+ if (c) {
591
590
  const h = (L) => {
592
591
  k(L.clientX);
593
592
  }, m = () => {
@@ -597,7 +596,7 @@ function it({ thumbnails: t, onSeek: s, className: n }) {
597
596
  document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", m);
598
597
  };
599
598
  }
600
- }, [o]), /* @__PURE__ */ e.jsxs("div", { className: f("group relative", n), children: [
599
+ }, [c]), /* @__PURE__ */ e.jsxs("div", { className: f("group relative", n), children: [
601
600
  p > 0 && /* @__PURE__ */ e.jsxs(
602
601
  "div",
603
602
  {
@@ -624,7 +623,7 @@ function it({ thumbnails: t, onSeek: s, className: n }) {
624
623
  /* @__PURE__ */ e.jsx(
625
624
  "div",
626
625
  {
627
- className: f("minimal-seekbar-thumb", o && "active"),
626
+ className: f("minimal-seekbar-thumb", c && "active"),
628
627
  style: { left: `${z}%` }
629
628
  }
630
629
  )
@@ -633,8 +632,8 @@ function it({ thumbnails: t, onSeek: s, className: n }) {
633
632
  )
634
633
  ] });
635
634
  }
636
- function rt({ icons: t, className: s }) {
637
- const n = Q(), a = Z((v) => v.volume), l = Z((v) => v.isMuted), [r, c] = A(!1), o = (v) => {
635
+ function lt({ icons: t, className: s }) {
636
+ const n = Q(), a = Z((v) => v.volume), r = Z((v) => v.isMuted), [l, o] = A(!1), c = (v) => {
638
637
  const b = parseFloat(v.target.value);
639
638
  n({
640
639
  type: y.SET_VOLUME,
@@ -644,20 +643,20 @@ function rt({ icons: t, className: s }) {
644
643
  n({
645
644
  type: y.TOGGLE_MUTE
646
645
  });
647
- }, p = l || a === 0 ? t.volumeMuted : t.volume;
646
+ }, p = r || a === 0 ? t.volumeMuted : t.volume;
648
647
  return p ? /* @__PURE__ */ e.jsxs(
649
648
  "div",
650
649
  {
651
650
  className: f("minimal-volume-group flex items-center gap-2", s),
652
- onMouseEnter: () => c(!0),
653
- onMouseLeave: () => c(!1),
651
+ onMouseEnter: () => o(!0),
652
+ onMouseLeave: () => o(!1),
654
653
  children: [
655
654
  /* @__PURE__ */ e.jsx(
656
655
  "button",
657
656
  {
658
657
  className: "minimal-btn inline-flex h-8 w-8 items-center justify-center rounded-full border border-white/20 bg-white/10 text-white transition-all duration-150 hover:border-white/30 hover:bg-white/20",
659
658
  onClick: d,
660
- "aria-label": l ? "Unmute" : "Mute",
659
+ "aria-label": r ? "Unmute" : "Mute",
661
660
  children: /* @__PURE__ */ e.jsx(p, { size: 18 })
662
661
  }
663
662
  ),
@@ -666,7 +665,7 @@ function rt({ icons: t, className: s }) {
666
665
  {
667
666
  className: f(
668
667
  "overflow-hidden transition-all duration-250",
669
- r ? "w-20 opacity-100" : "w-0 opacity-0"
668
+ l ? "w-20 opacity-100" : "w-0 opacity-0"
670
669
  ),
671
670
  children: /* @__PURE__ */ e.jsx(
672
671
  "input",
@@ -675,11 +674,11 @@ function rt({ icons: t, className: s }) {
675
674
  min: "0",
676
675
  max: "1",
677
676
  step: "0.01",
678
- value: l ? 0 : a,
679
- onChange: o,
677
+ value: r ? 0 : a,
678
+ onChange: c,
680
679
  className: "minimal-volume-slider h-1 w-full cursor-pointer appearance-none rounded-full bg-white/20",
681
680
  style: {
682
- background: `linear-gradient(to right, rgb(59 130 246) 0%, rgb(59 130 246) ${(l ? 0 : a) * 100}%, rgba(255,255,255,0.2) ${(l ? 0 : a) * 100}%, rgba(255,255,255,0.2) 100%)`
681
+ background: `linear-gradient(to right, rgb(59 130 246) 0%, rgb(59 130 246) ${(r ? 0 : a) * 100}%, rgba(255,255,255,0.2) ${(r ? 0 : a) * 100}%, rgba(255,255,255,0.2) 100%)`
683
682
  }
684
683
  }
685
684
  )
@@ -689,15 +688,15 @@ function rt({ icons: t, className: s }) {
689
688
  }
690
689
  ) : null;
691
690
  }
692
- function lt({
691
+ function rt({
693
692
  visible: t,
694
693
  icons: s,
695
694
  isPlaying: n,
696
695
  showQualitySelector: a,
697
- showSpeedControl: l,
698
- qualities: r,
699
- thumbnails: c,
700
- onUserInteractionStart: o,
696
+ showSpeedControl: r,
697
+ qualities: l,
698
+ thumbnails: o,
699
+ onUserInteractionStart: c,
701
700
  onUserInteractionEnd: d,
702
701
  onSeek: p
703
702
  }) {
@@ -711,16 +710,16 @@ function lt({
711
710
  t ? "minimal-controls-visible" : "minimal-controls-hidden"
712
711
  ),
713
712
  "data-hidden": !t,
714
- onMouseDown: o,
713
+ onMouseDown: c,
715
714
  onMouseUp: d,
716
- onTouchStart: o,
715
+ onTouchStart: c,
717
716
  onTouchEnd: d,
718
717
  children: [
719
- /* @__PURE__ */ e.jsx("div", { className: "mb-2", children: /* @__PURE__ */ e.jsx(it, { thumbnails: c, onSeek: p }) }),
718
+ /* @__PURE__ */ e.jsx("div", { className: "mb-2", children: /* @__PURE__ */ e.jsx(it, { thumbnails: o, onSeek: p }) }),
720
719
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
721
720
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
722
721
  /* @__PURE__ */ e.jsx(at, { isPlaying: n, icons: s }),
723
- /* @__PURE__ */ e.jsx(rt, { icons: s }),
722
+ /* @__PURE__ */ e.jsx(lt, { icons: s }),
724
723
  /* @__PURE__ */ e.jsxs("div", { className: "minimal-time select-none font-mono text-sm text-white/90", children: [
725
724
  /* @__PURE__ */ e.jsx(se, { variant: "current" }),
726
725
  /* @__PURE__ */ e.jsx("span", { className: "mx-1 text-white/60", children: "/" }),
@@ -728,9 +727,9 @@ function lt({
728
727
  ] })
729
728
  ] }),
730
729
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
731
- a && r && r.length > 1 && /* @__PURE__ */ e.jsx("button", { className: "minimal-btn w-auto px-3 font-medium text-xs", title: "Quality", children: r.find((v) => v.default)?.quality || r[0]?.quality || "Auto" }),
732
- l && /* @__PURE__ */ e.jsx("button", { className: "minimal-btn w-auto px-3 font-medium text-xs", title: "Playback Speed", children: "1x" }),
733
- s.settings && (a || l) && /* @__PURE__ */ e.jsx("button", { className: "minimal-btn", title: "Settings", children: /* @__PURE__ */ e.jsx(s.settings, { size: 18 }) }),
730
+ a && l && l.length > 1 && /* @__PURE__ */ e.jsx("button", { className: "minimal-btn w-auto px-3 font-medium text-xs", title: "Quality", children: l.find((v) => v.default)?.quality || l[0]?.quality || "Auto" }),
731
+ r && /* @__PURE__ */ e.jsx("button", { className: "minimal-btn w-auto px-3 font-medium text-xs", title: "Playback Speed", children: "1x" }),
732
+ s.settings && (a || r) && /* @__PURE__ */ e.jsx("button", { className: "minimal-btn", title: "Settings", children: /* @__PURE__ */ e.jsx(s.settings, { size: 18 }) }),
734
733
  /* @__PURE__ */ e.jsx(
735
734
  "button",
736
735
  {
@@ -767,20 +766,20 @@ function ct({
767
766
  showCenterButton: s = !1,
768
767
  isPlaying: n = !1,
769
768
  icons: a,
770
- onPlayPause: l,
771
- className: r
769
+ onPlayPause: r,
770
+ className: l
772
771
  }) {
773
772
  if (!t || !s) return null;
774
- const c = a.play, o = a.pause;
775
- return !c || !o ? null : /* @__PURE__ */ e.jsx(
773
+ const o = a.play, c = a.pause;
774
+ return !o || !c ? null : /* @__PURE__ */ e.jsx(
776
775
  "div",
777
776
  {
778
777
  className: f(
779
778
  "absolute inset-0 z-30 flex items-center justify-center",
780
779
  "bg-black/20 transition-opacity duration-200",
781
- r
780
+ l
782
781
  ),
783
- onClick: l,
782
+ onClick: r,
784
783
  children: /* @__PURE__ */ e.jsx(
785
784
  "button",
786
785
  {
@@ -794,10 +793,10 @@ function ct({
794
793
  "active:scale-95"
795
794
  ),
796
795
  onClick: (d) => {
797
- d.stopPropagation(), l?.();
796
+ d.stopPropagation(), r?.();
798
797
  },
799
798
  "aria-label": n ? "Pause" : "Play",
800
- children: n ? /* @__PURE__ */ e.jsx(o, { size: 48 }) : /* @__PURE__ */ e.jsx(c, { size: 48, className: "ml-1" })
799
+ children: n ? /* @__PURE__ */ e.jsx(c, { size: 48 }) : /* @__PURE__ */ e.jsx(o, { size: 48, className: "ml-1" })
801
800
  }
802
801
  )
803
802
  }
@@ -808,10 +807,10 @@ function kt({
808
807
  poster: s,
809
808
  autoPlay: n = !1,
810
809
  muted: a = !1,
811
- loop: l = !1,
812
- autoHideControls: r = !0,
813
- hideDelay: c = 2500,
814
- theme: o = "dark",
810
+ loop: r = !1,
811
+ autoHideControls: l = !0,
812
+ hideDelay: o = 2500,
813
+ theme: c = "dark",
815
814
  customIcons: d,
816
815
  showCenterPlayButton: p = !0,
817
816
  showLoadingSpinner: v = !0,
@@ -829,50 +828,50 @@ function kt({
829
828
  showSpeedControl: m = !1,
830
829
  thumbnails: L
831
830
  }) {
832
- const [j, C] = A(!0), [S, G] = A(!1), [i, E] = A(!1), [Y, I] = A(null), O = D(null), J = D(null), [F, H] = A(!1), [U, P] = A(!1), X = { ...R, ...d }, _ = () => {
833
- r && (O.current && clearTimeout(O.current), C(!0), !U && S && (O.current = setTimeout(() => {
831
+ const [j, C] = A(!0), [O, G] = A(!1), [i, E] = A(!1), [Y, I] = A(null), S = D(null), J = D(null), [F, H] = A(!1), [U, P] = A(!1), X = { ...R, ...d }, _ = () => {
832
+ l && (S.current && clearTimeout(S.current), C(!0), !U && O && (S.current = setTimeout(() => {
834
833
  C(!1);
835
- }, c)));
836
- }, fe = () => {
834
+ }, o)));
835
+ }, he = () => {
837
836
  _();
837
+ }, fe = () => {
838
+ H(!0), C(!0), S.current && clearTimeout(S.current);
838
839
  }, ve = () => {
839
- H(!0), C(!0), O.current && clearTimeout(O.current);
840
- }, xe = () => {
841
- H(!1), S && r && !U && (O.current = setTimeout(() => {
840
+ H(!1), O && l && !U && (S.current = setTimeout(() => {
842
841
  C(!1);
843
842
  }, 500));
843
+ }, xe = () => {
844
+ P(!0), C(!0), S.current && clearTimeout(S.current);
844
845
  }, pe = () => {
845
- P(!0), C(!0), O.current && clearTimeout(O.current);
846
- }, ge = () => {
847
846
  P(!1), _();
848
- }, le = (q) => {
849
- G(q), q ? (N?.(), _()) : (M?.(), C(!0), O.current && clearTimeout(O.current));
850
- }, be = () => {
847
+ }, re = (q) => {
848
+ G(q), q ? (N?.(), _()) : (M?.(), C(!0), S.current && clearTimeout(S.current));
849
+ }, ge = () => {
851
850
  E(!0), I(null);
852
- }, je = () => {
851
+ }, be = () => {
853
852
  E(!1);
854
- }, ye = (q) => {
853
+ }, je = (q) => {
855
854
  E(!1), I(q.message || "An error occurred"), x?.(q);
856
855
  };
857
856
  B(() => () => {
858
- O.current && clearTimeout(O.current);
857
+ S.current && clearTimeout(S.current);
859
858
  }, []);
860
- const we = w && w.length > 0 && (w.find((q) => q.default)?.src || w[0]?.src) || (typeof t == "string" ? t : t[0]);
859
+ const ye = w && w.length > 0 && (w.find((q) => q.default)?.src || w[0]?.src) || (typeof t == "string" ? t : t[0]);
861
860
  return /* @__PURE__ */ e.jsx(
862
861
  "div",
863
862
  {
864
863
  ref: J,
865
864
  className: f(
866
865
  "minimal-player theme-minimal relative overflow-hidden rounded-lg bg-black",
867
- `theme-minimal-${o}`,
866
+ `theme-minimal-${c}`,
868
867
  b
869
868
  ),
870
- "data-theme": o,
871
- onMouseMove: fe,
872
- onMouseEnter: ve,
873
- onMouseLeave: xe,
869
+ "data-theme": c,
870
+ onMouseMove: he,
871
+ onMouseEnter: fe,
872
+ onMouseLeave: ve,
874
873
  children: /* @__PURE__ */ e.jsxs(
875
- ce,
874
+ oe,
876
875
  {
877
876
  className: "relative h-full w-full",
878
877
  autoHide: !1,
@@ -880,17 +879,17 @@ function kt({
880
879
  enableMobileOptimizations: !0,
881
880
  children: [
882
881
  /* @__PURE__ */ e.jsx(
883
- he,
882
+ me,
884
883
  {
885
- src: we,
884
+ src: ye,
886
885
  poster: s,
887
886
  autoPlay: n,
888
887
  muted: a,
889
- loop: l,
888
+ loop: r,
890
889
  playsInline: !0,
891
890
  crossOrigin: "anonymous",
892
- onPlay: () => le(!0),
893
- onPause: () => le(!1),
891
+ onPlay: () => re(!0),
892
+ onPause: () => re(!1),
894
893
  onEnded: z,
895
894
  onTimeUpdate: (q) => {
896
895
  const $ = q.currentTarget;
@@ -900,9 +899,9 @@ function kt({
900
899
  const $ = q.currentTarget;
901
900
  k?.($.volume);
902
901
  },
903
- onLoadStart: be,
904
- onLoadedData: je,
905
- onError: (q) => ye(new Error("Failed to load video"))
902
+ onLoadStart: ge,
903
+ onLoadedData: be,
904
+ onError: (q) => je(new Error("Failed to load video"))
906
905
  }
907
906
  ),
908
907
  v && i && /* @__PURE__ */ e.jsx(ot, { icon: X.spinner }),
@@ -952,31 +951,31 @@ function kt({
952
951
  )
953
952
  }
954
953
  ),
955
- p && !S && !i && /* @__PURE__ */ e.jsx(
954
+ p && !O && !i && /* @__PURE__ */ e.jsx(
956
955
  ct,
957
956
  {
958
957
  visible: !0,
959
958
  showCenterButton: !0,
960
- isPlaying: S,
959
+ isPlaying: O,
961
960
  icons: X,
962
961
  onPlayPause: () => {
963
962
  const q = J.current?.querySelector("video");
964
- q && (S ? q.pause() : q.play());
963
+ q && (O ? q.pause() : q.play());
965
964
  }
966
965
  }
967
966
  ),
968
967
  /* @__PURE__ */ e.jsx(
969
- lt,
968
+ rt,
970
969
  {
971
- visible: j || !S || F,
970
+ visible: j || !O || F,
972
971
  icons: X,
973
- isPlaying: S,
972
+ isPlaying: O,
974
973
  showQualitySelector: h,
975
974
  showSpeedControl: m,
976
975
  qualities: w,
977
976
  thumbnails: L,
978
- onUserInteractionStart: pe,
979
- onUserInteractionEnd: ge,
977
+ onUserInteractionStart: xe,
978
+ onUserInteractionEnd: pe,
980
979
  onSeek: g
981
980
  }
982
981
  )
@@ -998,9 +997,9 @@ function dt({
998
997
  gifSrc: s,
999
998
  showFallback: n = !0,
1000
999
  className: a,
1001
- ...l
1000
+ ...r
1002
1001
  }) {
1003
- const [r, c] = A(!1), [o, d] = A(!1), p = [
1002
+ const [l, o] = A(!1), [c, d] = A(!1), p = [
1004
1003
  s,
1005
1004
  ae,
1006
1005
  "/mona-loading.gif",
@@ -1008,7 +1007,7 @@ function dt({
1008
1007
  "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
1009
1008
  // 1x1 transparent gif as last resort
1010
1009
  ].filter(Boolean), [v, b] = A(0), N = p[v], M = () => {
1011
- v < p.length - 1 ? b(v + 1) : c(!0);
1010
+ v < p.length - 1 ? b(v + 1) : o(!0);
1012
1011
  }, z = () => /* @__PURE__ */ e.jsxs("div", { className: "relative h-12 w-12", children: [
1013
1012
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 animate-spin rounded-full bg-gradient-to-r from-cyan-400 via-blue-500 to-cyan-400 opacity-75" }),
1014
1013
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-1 rounded-full bg-black/90" }),
@@ -1025,10 +1024,10 @@ function dt({
1025
1024
  "flex flex-col items-center justify-center space-y-2 rounded py-2 text-white",
1026
1025
  a
1027
1026
  ),
1028
- ...l,
1027
+ ...r,
1029
1028
  children: [
1030
- (!o || r) && n && /* @__PURE__ */ e.jsx(z, {}),
1031
- !r && N && /* @__PURE__ */ e.jsx(
1029
+ (!c || l) && n && /* @__PURE__ */ e.jsx(z, {}),
1030
+ !l && N && /* @__PURE__ */ e.jsx(
1032
1031
  "img",
1033
1032
  {
1034
1033
  alt: "loading",
@@ -1037,8 +1036,8 @@ function dt({
1037
1036
  src: N,
1038
1037
  onError: M,
1039
1038
  onLoad: () => d(!0),
1040
- className: f("object-contain", !o && "hidden"),
1041
- style: { display: o ? "block" : "none" }
1039
+ className: f("object-contain", !c && "hidden"),
1040
+ style: { display: c ? "block" : "none" }
1042
1041
  }
1043
1042
  ),
1044
1043
  /* @__PURE__ */ e.jsx("span", { className: "mt-2 text-sm tracking-wider", children: t })
@@ -1067,7 +1066,7 @@ const mt = {
1067
1066
  spinner: "h-18 w-18 border-4",
1068
1067
  dots: "h-3 w-3"
1069
1068
  }
1070
- }, re = {
1069
+ }, le = {
1071
1070
  initial: {
1072
1071
  wrapper: "absolute inset-0 z-50 flex items-center justify-center",
1073
1072
  background: "bg-black/80"
@@ -1084,9 +1083,9 @@ const mt = {
1084
1083
  context: s = "initial",
1085
1084
  message: n,
1086
1085
  className: a,
1087
- textSize: l = "text-sm"
1086
+ textSize: r = "text-sm"
1088
1087
  }) {
1089
- const r = re[s], c = () => {
1088
+ const l = le[s], o = () => {
1090
1089
  if (n) return n;
1091
1090
  switch (s) {
1092
1091
  case "initial":
@@ -1099,25 +1098,25 @@ const mt = {
1099
1098
  return "Loading...";
1100
1099
  }
1101
1100
  };
1102
- return /* @__PURE__ */ e.jsx("div", { className: f(r.wrapper, r.background, a), children: /* @__PURE__ */ e.jsx(dt, { loadingText: c(), className: f("text-white", l) }) });
1101
+ return /* @__PURE__ */ e.jsx("div", { className: f(l.wrapper, l.background, a), children: /* @__PURE__ */ e.jsx(dt, { loadingText: o(), className: f("text-white", r) }) });
1103
1102
  }, ee = function({
1104
1103
  variant: s = "animate",
1105
1104
  context: n = "initial",
1106
1105
  size: a = "md",
1107
- color: l,
1108
- message: r,
1109
- showMessage: c = !0,
1110
- className: o,
1106
+ color: r,
1107
+ message: l,
1108
+ showMessage: o = !0,
1109
+ className: c,
1111
1110
  style: d
1112
1111
  }) {
1113
- const p = mt[a], v = re[n];
1112
+ const p = mt[a], v = le[n];
1114
1113
  if (s === "animate")
1115
1114
  return /* @__PURE__ */ e.jsx(
1116
1115
  ht,
1117
1116
  {
1118
1117
  context: n,
1119
- message: r,
1120
- className: o,
1118
+ message: l,
1119
+ className: c,
1121
1120
  textSize: a === "sm" ? "text-xs" : a === "lg" ? "text-base" : "text-sm"
1122
1121
  }
1123
1122
  );
@@ -1131,10 +1130,10 @@ const mt = {
1131
1130
  "minimal-loading-spinner animate-spin rounded-full",
1132
1131
  "border-white/20 border-t-cyan-500",
1133
1132
  p.spinner,
1134
- o
1133
+ c
1135
1134
  ),
1136
1135
  style: {
1137
- borderTopColor: l || void 0,
1136
+ borderTopColor: r || void 0,
1138
1137
  ...d
1139
1138
  }
1140
1139
  }
@@ -1146,10 +1145,10 @@ const mt = {
1146
1145
  className: f(
1147
1146
  "minimal-loading-dot rounded-full bg-cyan-500",
1148
1147
  p.dots,
1149
- o
1148
+ c
1150
1149
  ),
1151
1150
  style: {
1152
- backgroundColor: l || void 0,
1151
+ backgroundColor: r || void 0,
1153
1152
  animationDelay: `${M * 150}ms`,
1154
1153
  ...d
1155
1154
  }
@@ -1157,7 +1156,7 @@ const mt = {
1157
1156
  M
1158
1157
  )) });
1159
1158
  case "skeleton":
1160
- return /* @__PURE__ */ e.jsxs("div", { className: f("space-y-3", o), children: [
1159
+ return /* @__PURE__ */ e.jsxs("div", { className: f("space-y-3", c), children: [
1161
1160
  /* @__PURE__ */ e.jsx("div", { className: "minimal-loading-skeleton h-4 w-32 rounded bg-white/10" }),
1162
1161
  /* @__PURE__ */ e.jsx("div", { className: "minimal-loading-skeleton h-3 w-24 rounded bg-white/10" }),
1163
1162
  /* @__PURE__ */ e.jsx("div", { className: "minimal-loading-skeleton h-3 w-28 rounded bg-white/10" })
@@ -1166,7 +1165,7 @@ const mt = {
1166
1165
  return null;
1167
1166
  }
1168
1167
  }, N = () => {
1169
- if (r) return r;
1168
+ if (l) return l;
1170
1169
  switch (n) {
1171
1170
  case "initial":
1172
1171
  return "Loading video...";
@@ -1180,7 +1179,7 @@ const mt = {
1180
1179
  };
1181
1180
  return /* @__PURE__ */ e.jsx("div", { className: f(v.wrapper, v.background), children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
1182
1181
  /* @__PURE__ */ e.jsx("div", { className: f(p.container, "flex items-center justify-center"), children: b() }),
1183
- c && /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
1182
+ o && /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
1184
1183
  /* @__PURE__ */ e.jsx("p", { className: "font-medium text-sm text-white/90", children: N() }),
1185
1184
  n === "buffering" && /* @__PURE__ */ e.jsx("p", { className: "mt-1 text-white/60 text-xs", children: "Please wait..." })
1186
1185
  ] })
@@ -1190,8 +1189,8 @@ const mt = {
1190
1189
  context: n = "initial",
1191
1190
  className: a
1192
1191
  }) {
1193
- const l = re[n];
1194
- return /* @__PURE__ */ e.jsx("div", { className: f(l.wrapper, l.background, a), children: s });
1192
+ const r = le[n];
1193
+ return /* @__PURE__ */ e.jsx("div", { className: f(r.wrapper, r.background, a), children: s });
1195
1194
  }, ne = {
1196
1195
  Initial: (t) => /* @__PURE__ */ e.jsx(ee, { variant: "animate", context: "initial", size: "md", ...t }),
1197
1196
  Seeking: (t) => /* @__PURE__ */ e.jsx(ee, { variant: "animate", context: "seeking", size: "sm", ...t }),
@@ -1207,9 +1206,9 @@ const mt = {
1207
1206
  isPlaying: s,
1208
1207
  onTogglePlay: n,
1209
1208
  onSeekBackward: a,
1210
- onSeekForward: l
1209
+ onSeekForward: r
1211
1210
  }) {
1212
- const r = R.play, c = R.pause;
1211
+ const l = R.play, o = R.pause;
1213
1212
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1214
1213
  /* @__PURE__ */ e.jsx(
1215
1214
  "button",
@@ -1217,7 +1216,7 @@ const mt = {
1217
1216
  className: "minimal-btn size-15",
1218
1217
  onClick: n,
1219
1218
  "aria-label": s ? "Pause" : "Play",
1220
- children: s ? c && /* @__PURE__ */ e.jsx(c, { size: 32 }) : r && /* @__PURE__ */ e.jsx(r, { size: 32 })
1219
+ children: s ? o && /* @__PURE__ */ e.jsx(o, { size: 32 }) : l && /* @__PURE__ */ e.jsx(l, { size: 32 })
1221
1220
  }
1222
1221
  ),
1223
1222
  /* @__PURE__ */ e.jsx(
@@ -1227,17 +1226,17 @@ const mt = {
1227
1226
  onClick: a,
1228
1227
  "aria-label": "Backward 10 seconds",
1229
1228
  title: "Backward 10s (J)",
1230
- children: /* @__PURE__ */ e.jsx(nt, { size: 18 })
1229
+ children: /* @__PURE__ */ e.jsx(tt, { size: 18 })
1231
1230
  }
1232
1231
  ),
1233
1232
  /* @__PURE__ */ e.jsx(
1234
1233
  "button",
1235
1234
  {
1236
1235
  className: "minimal-btn h-9 w-9",
1237
- onClick: l,
1236
+ onClick: r,
1238
1237
  "aria-label": "Forward 10 seconds",
1239
1238
  title: "Forward 10s (L)",
1240
- children: /* @__PURE__ */ e.jsx(tt, { size: 18 })
1239
+ children: /* @__PURE__ */ e.jsx(et, { size: 18 })
1241
1240
  }
1242
1241
  )
1243
1242
  ] });
@@ -1245,14 +1244,14 @@ const mt = {
1245
1244
  showSettings: s,
1246
1245
  playbackRate: n,
1247
1246
  onToggleSettings: a,
1248
- onChangePlaybackRate: l
1247
+ onChangePlaybackRate: r
1249
1248
  }) {
1250
- const r = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], c = V(
1249
+ const l = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], o = V(
1251
1250
  (d) => {
1252
1251
  d.stopPropagation(), a();
1253
1252
  },
1254
1253
  [a]
1255
- ), o = V((d) => {
1254
+ ), c = V((d) => {
1256
1255
  d.stopPropagation();
1257
1256
  }, []);
1258
1257
  return /* @__PURE__ */ e.jsxs("div", { className: "relative", style: { zIndex: s ? 60 : "auto" }, children: [
@@ -1260,7 +1259,7 @@ const mt = {
1260
1259
  "button",
1261
1260
  {
1262
1261
  className: f("minimal-btn h-9 w-9", s && "text-cyan-500"),
1263
- onClick: c,
1262
+ onClick: o,
1264
1263
  "aria-label": "Settings",
1265
1264
  children: R.settings && /* @__PURE__ */ e.jsx(R.settings, { size: 18 })
1266
1265
  }
@@ -1273,10 +1272,10 @@ const mt = {
1273
1272
  bottom: "100%",
1274
1273
  zIndex: 1e3
1275
1274
  },
1276
- onClick: o,
1275
+ onClick: c,
1277
1276
  children: [
1278
1277
  /* @__PURE__ */ e.jsx("div", { className: "px-3 py-1 text-gray-400 text-xs uppercase tracking-wider", children: "Speed" }),
1279
- /* @__PURE__ */ e.jsx("div", { className: "px-1", children: r.map((d) => /* @__PURE__ */ e.jsx(
1278
+ /* @__PURE__ */ e.jsx("div", { className: "px-1", children: l.map((d) => /* @__PURE__ */ e.jsx(
1280
1279
  "button",
1281
1280
  {
1282
1281
  className: f(
@@ -1284,7 +1283,7 @@ const mt = {
1284
1283
  "text-white",
1285
1284
  n === d && "bg-cyan-700/20 text-cyan-400"
1286
1285
  ),
1287
- onClick: () => l(d),
1286
+ onClick: () => r(d),
1288
1287
  children: d === 1 ? "Normal" : `${d}x`
1289
1288
  },
1290
1289
  d
@@ -1297,10 +1296,10 @@ const mt = {
1297
1296
  subtitleSrc: s,
1298
1297
  subtitlesEnabled: n,
1299
1298
  subtitleTracks: a,
1300
- currentTrackId: l,
1301
- hasSubtitles: r,
1302
- subtitleLoadError: c,
1303
- isFullscreen: o,
1299
+ currentTrackId: r,
1300
+ hasSubtitles: l,
1301
+ subtitleLoadError: o,
1302
+ isFullscreen: c,
1304
1303
  showSettings: d,
1305
1304
  playbackRate: p,
1306
1305
  onToggleSubtitles: v,
@@ -1322,19 +1321,19 @@ const mt = {
1322
1321
  a && a.length > 0 ? g(!k) : v();
1323
1322
  };
1324
1323
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1325
- r && /* @__PURE__ */ e.jsxs("div", { className: "relative", ref: x, children: [
1324
+ l && /* @__PURE__ */ e.jsxs("div", { className: "relative", ref: x, children: [
1326
1325
  /* @__PURE__ */ e.jsx(
1327
1326
  "button",
1328
1327
  {
1329
1328
  className: f(
1330
1329
  "minimal-btn h-9 w-9",
1331
1330
  n && "text-cyan-500",
1332
- c && "text-red-500"
1331
+ o && "text-red-500"
1333
1332
  ),
1334
1333
  onClick: h,
1335
1334
  "aria-label": "Subtitles",
1336
- title: c ? "Subtitle Error" : "Subtitles (C)",
1337
- children: /* @__PURE__ */ e.jsx(me, { size: 18 })
1335
+ title: o ? "Subtitle Error" : "Subtitles (C)",
1336
+ children: /* @__PURE__ */ e.jsx(de, { size: 18 })
1338
1337
  }
1339
1338
  ),
1340
1339
  k && a && a.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "absolute right-0 bottom-full mb-2 w-48 rounded-md bg-gray-900/95 py-2 shadow-lg backdrop-blur-sm", children: [
@@ -1357,7 +1356,7 @@ const mt = {
1357
1356
  {
1358
1357
  className: f(
1359
1358
  "flex w-full items-center px-3 py-1.5 text-gray-300 text-sm hover:bg-gray-800",
1360
- l === m.id && "bg-gray-800 text-cyan-500"
1359
+ r === m.id && "bg-gray-800 text-cyan-500"
1361
1360
  ),
1362
1361
  onClick: () => {
1363
1362
  b?.(m.id), g(!1);
@@ -1373,7 +1372,7 @@ const mt = {
1373
1372
  },
1374
1373
  m.id
1375
1374
  )),
1376
- c && /* @__PURE__ */ e.jsx("div", { className: "mt-2 border-gray-800 border-t px-3 py-2", children: /* @__PURE__ */ e.jsx("p", { className: "text-red-400 text-xs", children: "Failed to load subtitles" }) })
1375
+ o && /* @__PURE__ */ e.jsx("div", { className: "mt-2 border-gray-800 border-t px-3 py-2", children: /* @__PURE__ */ e.jsx("p", { className: "text-red-400 text-xs", children: "Failed to load subtitles" }) })
1377
1376
  ] })
1378
1377
  ] }),
1379
1378
  /* @__PURE__ */ e.jsx(
@@ -1383,7 +1382,7 @@ const mt = {
1383
1382
  onClick: (m) => N(m.ctrlKey || m.metaKey),
1384
1383
  "aria-label": "Take Screenshot",
1385
1384
  title: "Screenshot (S) - Ctrl+Click to copy",
1386
- children: /* @__PURE__ */ e.jsx(st, { size: 18 })
1385
+ children: /* @__PURE__ */ e.jsx(nt, { size: 18 })
1387
1386
  }
1388
1387
  ),
1389
1388
  /* @__PURE__ */ e.jsx(
@@ -1400,9 +1399,9 @@ const mt = {
1400
1399
  {
1401
1400
  className: "minimal-btn h-9 w-9",
1402
1401
  onClick: M,
1403
- "aria-label": o ? "Exit Fullscreen" : "Enter Fullscreen",
1402
+ "aria-label": c ? "Exit Fullscreen" : "Enter Fullscreen",
1404
1403
  title: "Fullscreen (F)",
1405
- children: o ? w && /* @__PURE__ */ e.jsx(w, { size: 18 }) : u && /* @__PURE__ */ e.jsx(u, { size: 18 })
1404
+ children: c ? w && /* @__PURE__ */ e.jsx(w, { size: 18 }) : u && /* @__PURE__ */ e.jsx(u, { size: 18 })
1406
1405
  }
1407
1406
  )
1408
1407
  ] });
@@ -1410,18 +1409,18 @@ const mt = {
1410
1409
  currentTime: s,
1411
1410
  duration: n,
1412
1411
  bufferedRanges: a = [],
1413
- isSeeking: l = !1,
1414
- onSeek: r
1412
+ isSeeking: r = !1,
1413
+ onSeek: l
1415
1414
  }) {
1416
- const [c, o] = A(!1), [d, p] = A(0), [v, b] = A(!1), [N, M] = A({ x: 0, y: 0 }), z = D(null), T = n > 0 ? s / n * 100 : 0, k = (w) => {
1415
+ const [o, c] = A(!1), [d, p] = A(0), [v, b] = A(!1), [N, M] = A({ x: 0, y: 0 }), z = D(null), T = n > 0 ? s / n * 100 : 0, k = (w) => {
1417
1416
  if (n === 0) return;
1418
1417
  const h = w.currentTarget.getBoundingClientRect(), m = (w.clientX - h.left) / h.width, L = Math.max(0, Math.min(n, m * n));
1419
- M({ x: w.clientX - h.left, y: w.clientY - h.top }), b(!0), setTimeout(() => b(!1), 600), r(L);
1418
+ M({ x: w.clientX - h.left, y: w.clientY - h.top }), b(!0), setTimeout(() => b(!1), 600), l(L);
1420
1419
  }, g = (w) => {
1421
1420
  if (!z.current) return;
1422
1421
  const h = z.current.getBoundingClientRect(), m = (w.clientX - h.left) / h.width * 100;
1423
1422
  p(Math.max(0, Math.min(100, m)));
1424
- }, x = () => o(!0), u = () => o(!1);
1423
+ }, x = () => c(!0), u = () => c(!1);
1425
1424
  return /* @__PURE__ */ e.jsxs("div", { className: "relative mb-3", children: [
1426
1425
  /* @__PURE__ */ e.jsxs(
1427
1426
  "div",
@@ -1429,7 +1428,7 @@ const mt = {
1429
1428
  ref: z,
1430
1429
  className: f(
1431
1430
  "minimal-seekbar group relative cursor-pointer",
1432
- l && "minimal-seekbar-seeking"
1431
+ r && "minimal-seekbar-seeking"
1433
1432
  ),
1434
1433
  onClick: k,
1435
1434
  onMouseMove: g,
@@ -1455,19 +1454,19 @@ const mt = {
1455
1454
  {
1456
1455
  className: f(
1457
1456
  "minimal-seekbar-progress",
1458
- l && "minimal-seekbar-progress-seeking"
1457
+ r && "minimal-seekbar-progress-seeking"
1459
1458
  ),
1460
1459
  style: { width: `${T}%` }
1461
1460
  }
1462
1461
  ),
1463
- c && !l && /* @__PURE__ */ e.jsx("div", { className: "minimal-seekbar-hover-indicator", style: { left: `${d}%` } }),
1462
+ o && !r && /* @__PURE__ */ e.jsx("div", { className: "minimal-seekbar-hover-indicator", style: { left: `${d}%` } }),
1464
1463
  /* @__PURE__ */ e.jsx(
1465
1464
  "div",
1466
1465
  {
1467
1466
  className: f(
1468
1467
  "minimal-seekbar-thumb",
1469
- (c || l) && "opacity-100",
1470
- l && "minimal-seekbar-thumb-seeking"
1468
+ (o || r) && "opacity-100",
1469
+ r && "minimal-seekbar-thumb-seeking"
1471
1470
  ),
1472
1471
  style: { left: `${T}%` }
1473
1472
  }
@@ -1485,7 +1484,7 @@ const mt = {
1485
1484
  ]
1486
1485
  }
1487
1486
  ),
1488
- l && /* @__PURE__ */ e.jsx("div", { className: "-top-6 -translate-x-1/2 absolute left-1/2 transform", children: /* @__PURE__ */ e.jsx("div", { className: "rounded bg-black/80 px-2 py-1 text-white text-xs backdrop-blur-sm", children: "Seeking..." }) })
1487
+ r && /* @__PURE__ */ e.jsx("div", { className: "-top-6 -translate-x-1/2 absolute left-1/2 transform", children: /* @__PURE__ */ e.jsx("div", { className: "rounded bg-black/80 px-2 py-1 text-white text-xs backdrop-blur-sm", children: "Seeking..." }) })
1489
1488
  ] });
1490
1489
  }, bt = function({ currentTime: s, duration: n }) {
1491
1490
  return /* @__PURE__ */ e.jsxs("div", { className: "font-mono text-sm text-white", children: [
@@ -1497,29 +1496,29 @@ const mt = {
1497
1496
  volume: s,
1498
1497
  isMuted: n,
1499
1498
  showVolumeSlider: a,
1500
- onToggleMute: l,
1501
- onVolumeChange: r,
1502
- onShowVolumeSlider: c,
1503
- orientation: o = "horizontal",
1499
+ onToggleMute: r,
1500
+ onVolumeChange: l,
1501
+ onShowVolumeSlider: o,
1502
+ orientation: c = "horizontal",
1504
1503
  className: d
1505
1504
  }) {
1506
1505
  const p = R.volume, v = R.volumeMuted, b = D(null), N = D(null), M = D(!1), [z, T] = K.useState(!1), [k, g] = K.useState(!1), x = D(null);
1507
1506
  V(
1508
1507
  (j) => {
1509
1508
  const C = parseFloat(j.target.value);
1510
- r(C);
1509
+ l(C);
1511
1510
  },
1512
- [r]
1511
+ [l]
1513
1512
  );
1514
1513
  const u = V(
1515
1514
  (j, C) => {
1516
- const S = C ? N : b;
1517
- if (!S.current) return;
1518
- const G = S.current.getBoundingClientRect();
1515
+ const O = C ? N : b;
1516
+ if (!O.current) return;
1517
+ const G = O.current.getBoundingClientRect();
1519
1518
  let i;
1520
- C ? i = Math.max(0, Math.min(1, 1 - (j.clientY - G.top) / G.height)) : i = Math.max(0, Math.min(1, (j.clientX - G.left) / G.width)), r(i);
1519
+ C ? i = Math.max(0, Math.min(1, 1 - (j.clientY - G.top) / G.height)) : i = Math.max(0, Math.min(1, (j.clientX - G.left) / G.width)), l(i);
1521
1520
  },
1522
- [r]
1521
+ [l]
1523
1522
  ), w = V(
1524
1523
  (j, C) => {
1525
1524
  j.preventDefault(), j.stopPropagation(), M.current = !0, T(!0), u(j, C);
@@ -1527,13 +1526,13 @@ const mt = {
1527
1526
  [u]
1528
1527
  );
1529
1528
  B(() => {
1530
- const j = (S) => {
1529
+ const j = (O) => {
1531
1530
  if (!M.current) return;
1532
- const G = o === "vertical" ? N : b;
1531
+ const G = c === "vertical" ? N : b;
1533
1532
  if (!G.current) return;
1534
1533
  const i = G.current.getBoundingClientRect();
1535
1534
  let E;
1536
- o === "horizontal" ? E = Math.max(0, Math.min(1, (S.clientX - i.left) / i.width)) : E = Math.max(0, Math.min(1, 1 - (S.clientY - i.top) / i.height)), r(E);
1535
+ c === "horizontal" ? E = Math.max(0, Math.min(1, (O.clientX - i.left) / i.width)) : E = Math.max(0, Math.min(1, 1 - (O.clientY - i.top) / i.height)), l(E);
1537
1536
  }, C = () => {
1538
1537
  M.current = !1, T(!1);
1539
1538
  };
@@ -1541,14 +1540,14 @@ const mt = {
1541
1540
  return document.addEventListener("mousemove", j), document.addEventListener("mouseup", C), () => {
1542
1541
  document.removeEventListener("mousemove", j), document.removeEventListener("mouseup", C);
1543
1542
  };
1544
- }, [z, o, r]);
1543
+ }, [z, c, l]);
1545
1544
  const h = V(() => {
1546
- x.current && clearTimeout(x.current), g(!0), c(!0);
1547
- }, [c]), m = V(() => {
1545
+ x.current && clearTimeout(x.current), g(!0), o(!0);
1546
+ }, [o]), m = V(() => {
1548
1547
  x.current = setTimeout(() => {
1549
- M.current || (g(!1), c(!1));
1548
+ M.current || (g(!1), o(!1));
1550
1549
  }, 200);
1551
- }, [c]);
1550
+ }, [o]);
1552
1551
  B(() => () => {
1553
1552
  x.current && clearTimeout(x.current);
1554
1553
  }, []);
@@ -1558,13 +1557,13 @@ const mt = {
1558
1557
  {
1559
1558
  className: f(
1560
1559
  "volume-control-wrapper",
1561
- o === "vertical" ? "relative" : "flex items-center gap-2",
1560
+ c === "vertical" ? "relative" : "flex items-center gap-2",
1562
1561
  d
1563
1562
  ),
1564
1563
  onMouseEnter: h,
1565
1564
  onMouseLeave: m,
1566
1565
  children: [
1567
- o === "vertical" && /* @__PURE__ */ e.jsx(
1566
+ c === "vertical" && /* @__PURE__ */ e.jsx(
1568
1567
  "div",
1569
1568
  {
1570
1569
  className: f(
@@ -1613,12 +1612,12 @@ const mt = {
1613
1612
  "button",
1614
1613
  {
1615
1614
  className: "minimal-btn h-10 w-10",
1616
- onClick: l,
1615
+ onClick: r,
1617
1616
  "aria-label": n ? "Unmute" : "Mute",
1618
1617
  children: n || s === 0 ? v && /* @__PURE__ */ e.jsx(v, { size: 20 }) : p && /* @__PURE__ */ e.jsx(p, { size: 20 })
1619
1618
  }
1620
1619
  ),
1621
- o === "horizontal" && /* @__PURE__ */ e.jsx(
1620
+ c === "horizontal" && /* @__PURE__ */ e.jsx(
1622
1621
  "div",
1623
1622
  {
1624
1623
  className: f(
@@ -1663,10 +1662,10 @@ const mt = {
1663
1662
  controlsVisible: s,
1664
1663
  currentTime: n,
1665
1664
  duration: a,
1666
- isPlaying: l,
1667
- volume: r,
1668
- isMuted: c,
1669
- showVolumeSlider: o,
1665
+ isPlaying: r,
1666
+ volume: l,
1667
+ isMuted: o,
1668
+ showVolumeSlider: c,
1670
1669
  isFullscreen: d,
1671
1670
  showSettings: p,
1672
1671
  playbackRate: v,
@@ -1685,13 +1684,13 @@ const mt = {
1685
1684
  onSeekForward: L,
1686
1685
  onToggleMute: j,
1687
1686
  onVolumeChange: C,
1688
- onShowVolumeSlider: S,
1687
+ onShowVolumeSlider: O,
1689
1688
  onToggleSubtitles: G,
1690
1689
  onSelectSubtitleTrack: i,
1691
1690
  onTakeScreenshot: E,
1692
1691
  onToggleFullscreen: Y,
1693
1692
  onToggleSettings: I,
1694
- onChangePlaybackRate: O
1693
+ onChangePlaybackRate: S
1695
1694
  }) {
1696
1695
  return /* @__PURE__ */ e.jsxs(
1697
1696
  "div",
@@ -1718,7 +1717,7 @@ const mt = {
1718
1717
  /* @__PURE__ */ e.jsx(
1719
1718
  vt,
1720
1719
  {
1721
- isPlaying: l,
1720
+ isPlaying: r,
1722
1721
  onTogglePlay: h,
1723
1722
  onSeekBackward: m,
1724
1723
  onSeekForward: L
@@ -1727,12 +1726,12 @@ const mt = {
1727
1726
  /* @__PURE__ */ e.jsx(
1728
1727
  jt,
1729
1728
  {
1730
- volume: r,
1731
- isMuted: c,
1732
- showVolumeSlider: o,
1729
+ volume: l,
1730
+ isMuted: o,
1731
+ showVolumeSlider: c,
1733
1732
  onToggleMute: j,
1734
1733
  onVolumeChange: C,
1735
- onShowVolumeSlider: S,
1734
+ onShowVolumeSlider: O,
1736
1735
  orientation: g
1737
1736
  }
1738
1737
  ),
@@ -1755,7 +1754,7 @@ const mt = {
1755
1754
  onTakeScreenshot: E,
1756
1755
  onToggleFullscreen: Y,
1757
1756
  onToggleSettings: I,
1758
- onChangePlaybackRate: O
1757
+ onChangePlaybackRate: S
1759
1758
  }
1760
1759
  )
1761
1760
  ] })
@@ -1771,10 +1770,10 @@ const mt = {
1771
1770
  videoRef: s,
1772
1771
  src: n,
1773
1772
  poster: a,
1774
- subtitleSrc: l,
1775
- subtitlesEnabled: r,
1776
- crossOrigin: c,
1777
- onTogglePlay: o
1773
+ subtitleSrc: r,
1774
+ subtitlesEnabled: l,
1775
+ crossOrigin: o,
1776
+ onTogglePlay: c
1778
1777
  }) {
1779
1778
  return /* @__PURE__ */ e.jsx(
1780
1779
  "video",
@@ -1782,10 +1781,10 @@ const mt = {
1782
1781
  ref: s,
1783
1782
  src: n,
1784
1783
  poster: a,
1785
- crossOrigin: c,
1784
+ crossOrigin: o,
1786
1785
  className: "h-full w-full object-contain",
1787
- onClick: o,
1788
- children: l && /* @__PURE__ */ e.jsx("track", { kind: "subtitles", src: l, default: r })
1786
+ onClick: c,
1787
+ children: r && /* @__PURE__ */ e.jsx("track", { kind: "subtitles", src: r, default: l })
1789
1788
  }
1790
1789
  );
1791
1790
  };
@@ -1794,14 +1793,14 @@ function Ct(t) {
1794
1793
  src: s,
1795
1794
  poster: n,
1796
1795
  className: a,
1797
- subtitleSrc: l,
1798
- subtitleTracks: r,
1799
- crossOrigin: c,
1800
- volumeOrientation: o = "horizontal",
1796
+ subtitleSrc: r,
1797
+ subtitleTracks: l,
1798
+ crossOrigin: o,
1799
+ volumeOrientation: c = "horizontal",
1801
1800
  loadingComponent: d = void 0,
1802
1801
  showLoadingState: p = !0,
1803
1802
  loadingProps: v = {}
1804
- } = t, b = D(null), [N, M] = A(!1), [z, T] = A(1), { videoRef: k, state: g, controls: x } = Ee(b), {
1803
+ } = t, b = D(null), [N, M] = A(!1), [z, T] = A(1), { videoRef: k, state: g, controls: x } = ze(b), {
1805
1804
  subtitlesEnabled: u,
1806
1805
  currentSubtitle: w,
1807
1806
  toggleSubtitles: h,
@@ -1809,21 +1808,21 @@ function Ct(t) {
1809
1808
  setCurrentSubtitle: L,
1810
1809
  selectSubtitleTrack: j,
1811
1810
  availableTracks: C,
1812
- currentTrackId: S,
1811
+ currentTrackId: O,
1813
1812
  loadError: G,
1814
1813
  hasSubtitles: i
1815
- } = ke({
1816
- subtitleSrc: l,
1817
- subtitleTracks: r,
1814
+ } = Ee({
1815
+ subtitleSrc: r,
1816
+ subtitleTracks: l,
1818
1817
  onLoadError: (P) => console.error("Subtitle load error:", P)
1819
- }), { takeScreenshot: E } = Se(k), {
1818
+ }), { takeScreenshot: E } = Ae(k), {
1820
1819
  controlsVisible: Y,
1821
1820
  showVolumeSlider: I,
1822
- setShowVolumeSlider: O,
1821
+ setShowVolumeSlider: S,
1823
1822
  handleMouseMove: J,
1824
1823
  handleMouseEnter: F,
1825
1824
  handleMouseLeave: H
1826
- } = Ce(g.isPlaying, N);
1825
+ } = ke(g.isPlaying, N);
1827
1826
  B(() => {
1828
1827
  if (u) {
1829
1828
  const P = m(g.currentTime);
@@ -1833,7 +1832,7 @@ function Ct(t) {
1833
1832
  const U = (P) => {
1834
1833
  k.current && (k.current.playbackRate = P, T(P), M(!1));
1835
1834
  };
1836
- return Ae({
1835
+ return Ce({
1837
1836
  videoControls: x,
1838
1837
  toggleSubtitles: h,
1839
1838
  takeScreenshot: E,
@@ -1854,9 +1853,9 @@ function Ct(t) {
1854
1853
  videoRef: k,
1855
1854
  src: s,
1856
1855
  poster: n,
1857
- subtitleSrc: l,
1856
+ subtitleSrc: r,
1858
1857
  subtitlesEnabled: u,
1859
- crossOrigin: c,
1858
+ crossOrigin: o,
1860
1859
  onTogglePlay: x.togglePlay
1861
1860
  }
1862
1861
  ),
@@ -1881,13 +1880,13 @@ function Ct(t) {
1881
1880
  isFullscreen: g.isFullscreen,
1882
1881
  showSettings: N,
1883
1882
  playbackRate: z,
1884
- subtitleSrc: l,
1883
+ subtitleSrc: r,
1885
1884
  subtitlesEnabled: u,
1886
1885
  subtitleTracks: C,
1887
- currentTrackId: S,
1886
+ currentTrackId: O,
1888
1887
  hasSubtitles: i,
1889
1888
  subtitleLoadError: G,
1890
- volumeOrientation: o,
1889
+ volumeOrientation: c,
1891
1890
  bufferedRanges: g.bufferedRanges,
1892
1891
  isSeeking: g.isSeeking,
1893
1892
  onSeek: x.seekTo,
@@ -1896,7 +1895,7 @@ function Ct(t) {
1896
1895
  onSeekForward: x.seekForward,
1897
1896
  onToggleMute: x.toggleMute,
1898
1897
  onVolumeChange: x.setVolume,
1899
- onShowVolumeSlider: O,
1898
+ onShowVolumeSlider: S,
1900
1899
  onToggleSubtitles: h,
1901
1900
  onSelectSubtitleTrack: j,
1902
1901
  onTakeScreenshot: E,
@@ -1915,13 +1914,13 @@ function Ct(t) {
1915
1914
  );
1916
1915
  }
1917
1916
  export {
1918
- ce as M,
1917
+ oe as M,
1919
1918
  Ct as S,
1920
1919
  kt as a,
1921
- He as b,
1922
- Ue as c,
1920
+ Je as b,
1921
+ He as c,
1923
1922
  R as d,
1924
- Ve as e,
1925
- Xe as f
1923
+ Ue as e,
1924
+ Fe as f
1926
1925
  };
1927
- //# sourceMappingURL=minimal-components-DlRK7Qu_.js.map
1926
+ //# sourceMappingURL=minimal-components-C4z900Ro.js.map