@factorialco/f0-react 12.12.0 → 12.14.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 (45) hide show
  1. package/dist/{ArchiveThumbnail-b34U-zTc.js → ArchiveThumbnail-CgaNJ6v9.js} +1 -1
  2. package/dist/{ArchiveViewer-BpmryW7A.js → ArchiveViewer-Uohl6wf1.js} +2 -2
  3. package/dist/{ChatPostComposerDialog-Cr207fXs.js → ChatPostComposerDialog-Cr6Ci2dz.js} +2 -2
  4. package/dist/{CoachmarkProvider-CsytVD-X.js → CoachmarkProvider-Cfb6WvLp.js} +17551 -17550
  5. package/dist/{CodeThumbnail-8NiQ3uzU.js → CodeThumbnail-CFNKh12S.js} +1 -1
  6. package/dist/{CodeViewer-BNZqt-5s.js → CodeViewer-C4XxNdq4.js} +3 -3
  7. package/dist/{DocumentToolbar-DUe9R1rU.js → DocumentToolbar-CcEggNyX.js} +1 -1
  8. package/dist/{DocxViewer-BUMy2iL7.js → DocxViewer-DIiFGMl7.js} +1 -1
  9. package/dist/Ellipsis-CBouJQYY.js +34 -0
  10. package/dist/{F0AiProcessingOverlay-CiUTeBwG.js → F0AiProcessingOverlay-wFS85Arm.js} +1539 -1485
  11. package/dist/{F0Alert-Ca8sBfXN.js → F0Alert-DRK5Na7T.js} +10 -10
  12. package/dist/F0AudioPlayer-Ds4txTh4.js +2 -0
  13. package/dist/{F0CanvasPanel-BOo_mxBl.js → F0CanvasPanel-CbJxX6Qv.js} +8681 -7494
  14. package/dist/{F0DocumentViewer-CaYAO9ok.js → F0DocumentViewer-B2_6INMo.js} +1 -1
  15. package/dist/{F0DocumentViewer-h0XY5tgT.js → F0DocumentViewer-B6ccmcTZ.js} +2 -2
  16. package/dist/{F0Map-b1uYlF_H.js → F0Map-BkrkSniz.js} +15 -15
  17. package/dist/F0Text-CXHuzMbj.js +14 -0
  18. package/dist/F0VideoPlayer-5bnm6ryg.js +1 -0
  19. package/dist/{F0VideoPlayer-D85XCpqh.js → F0VideoPlayer-BkRdc58E.js} +312 -312
  20. package/dist/{HtmlViewer-DxOnMV30.js → HtmlViewer-qkAWMkJy.js} +3 -3
  21. package/dist/{Map-BOMgctnS.js → Map-CZcZoNEa.js} +26 -25
  22. package/dist/{PdfThumbnail-98PDy4ud.js → PdfThumbnail-RTw1aKm_.js} +1 -1
  23. package/dist/{PdfViewer-nBnKrTYD.js → PdfViewer-m56GqoJt.js} +5 -5
  24. package/dist/{SheetViewer-CD9SHbXJ.js → SheetViewer-C80n4nta.js} +12 -12
  25. package/dist/{TextViewer-DxRBCXzV.js → TextViewer-BINEouL8.js} +1 -1
  26. package/dist/ai.d.ts +2 -2
  27. package/dist/ai.js +3 -3
  28. package/dist/component-status.js +1 -1
  29. package/dist/experimental.d.ts +15 -3
  30. package/dist/experimental.js +5782 -5775
  31. package/dist/{exports-cxvNeHfV.d.ts → exports-BGemf1WM.d.ts} +13 -11
  32. package/dist/f0.d.ts +8 -129
  33. package/dist/f0.js +382 -382
  34. package/dist/{highlight-CqFL-_MG.js → highlight-BNASV9vz.js} +7 -7
  35. package/dist/{index-DF8ubeg6.d.ts → index-BkCnaiJG.d.ts} +326 -10
  36. package/dist/localized-CnKvEJya.js +73 -0
  37. package/dist/{maplibre-Ip4Qe9dM.js → maplibre-DTAAiC-N.js} +1 -1
  38. package/dist/{pdfWorker-DMjHHAyP.js → pdfWorker-D16_euGm.js} +1 -1
  39. package/dist/{types-geibVrTM.d.ts → types-C2gKTwyT.d.ts} +2 -179
  40. package/package.json +1 -1
  41. package/dist/F0AudioPlayer-BefDLQA2.js +0 -1083
  42. package/dist/F0AudioPlayer-CNb4kXOk.js +0 -3
  43. package/dist/F0SegmentedControl-DXoAzTmH.js +0 -103
  44. package/dist/F0VideoPlayer-_zLFiEIp.js +0 -1
  45. package/dist/localized-BrUgGMzm.js +0 -46
@@ -2,38 +2,38 @@ import { a as e, r as t } from "./i18n-provider-Bdgo-LeP.js";
2
2
  import { n } from "./skeleton-AC0Fb8zj.js";
3
3
  import { L as r, R as i } from "./tooltip-BX4dSfeL.js";
4
4
  import { t as a } from "./F0Button-d91IgOnc.js";
5
- import { $o as o, Ja as s, Ko as c, Ms as l, Ya as u, go as d, gs as f, ho as p, qa as m, yo as h } from "./F0CanvasPanel-BOo_mxBl.js";
6
- import { n as g, t as _ } from "./F0Icon-DmCBV0gK.js";
7
- import { t as v } from "./Check-DAp9gCRh.js";
8
- import { A as y, B as b, F as x, H as S, I as C, P as ee, R as w, a as T, i as E, k as D, t as te, z as O } from "./popover-ics24JxK.js";
9
- import { i as k, n as A, r as j, t as M } from "./localized-BrUgGMzm.js";
10
- import { t as ne } from "./useFullscreen-CNwpzjpz.js";
11
- import { forwardRef as N, useCallback as P, useEffect as F, useId as I, useMemo as L, useRef as R, useState as z } from "react";
12
- import { jsx as B, jsxs as V } from "react/jsx-runtime";
5
+ import { Ks as o, Po as s, do as c, fo as l, js as u, ms as d, ss as f, uo as p } from "./F0CanvasPanel-CbJxX6Qv.js";
6
+ import { n as m, t as h } from "./F0Icon-DmCBV0gK.js";
7
+ import { t as g } from "./Check-DAp9gCRh.js";
8
+ import { a as _, i as v, n as y, o as b, r as x, t as S } from "./localized-CnKvEJya.js";
9
+ import { A as C, B as w, F as T, H as E, I as D, P as O, R as k, a as A, i as j, k as ee, t as te, z as ne } from "./popover-ics24JxK.js";
10
+ import { t as re } from "./useFullscreen-CNwpzjpz.js";
11
+ import { forwardRef as M, useCallback as N, useEffect as P, useId as F, useMemo as I, useRef as L, useState as R } from "react";
12
+ import { jsx as z, jsxs as B } from "react/jsx-runtime";
13
13
  //#region src/blocks/F0VideoPlayer/utils.ts
14
- var H = [
14
+ var V = [
15
15
  .5,
16
16
  .75,
17
17
  1,
18
18
  1.25,
19
19
  1.5
20
- ], U = .1, re = [
20
+ ], H = .1, ie = [
21
21
  25,
22
22
  50,
23
23
  75
24
- ], W = 3e5, G = .03;
25
- function K(e) {
24
+ ], U = 3e5, W = .03;
25
+ function G(e) {
26
26
  return !Number.isFinite(e) || e < 0 ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
27
27
  }
28
- function q(e) {
28
+ function K(e) {
29
29
  return `${e}x`;
30
30
  }
31
- function J(e) {
32
- return H.includes(e);
31
+ function q(e) {
32
+ return V.includes(e);
33
33
  }
34
34
  //#endregion
35
35
  //#region src/blocks/F0VideoPlayer/components/AudioDescriptionToggleIcons.tsx
36
- var Y = {
36
+ var J = {
37
37
  x: 12,
38
38
  y: 15,
39
39
  textAnchor: "middle",
@@ -41,14 +41,14 @@ var Y = {
41
41
  fontWeight: 700,
42
42
  fontFamily: "inherit",
43
43
  letterSpacing: -.4
44
- }, X = N(({ animate: e, ...t }, n) => /* @__PURE__ */ V("svg", {
44
+ }, Y = M(({ animate: e, ...t }, n) => /* @__PURE__ */ B("svg", {
45
45
  xmlns: "http://www.w3.org/2000/svg",
46
46
  viewBox: "0 0 24 24",
47
47
  fill: "none",
48
48
  ref: n,
49
49
  ...t,
50
50
  "aria-hidden": "true",
51
- children: [/* @__PURE__ */ B("rect", {
51
+ children: [/* @__PURE__ */ z("rect", {
52
52
  x: 3.5,
53
53
  y: 6.5,
54
54
  width: 17,
@@ -56,38 +56,38 @@ var Y = {
56
56
  rx: 2.5,
57
57
  stroke: "currentColor",
58
58
  vectorEffect: "non-scaling-stroke"
59
- }), /* @__PURE__ */ B("text", {
60
- ...Y,
59
+ }), /* @__PURE__ */ z("text", {
60
+ ...J,
61
61
  fill: "currentColor",
62
62
  children: "AD"
63
63
  })]
64
64
  }));
65
- X.displayName = "AudioDescriptionLineIcon";
66
- var Z = N(({ animate: e, ...t }, n) => {
67
- let r = `ad-mask-${I().replace(/:/g, "")}`;
68
- return /* @__PURE__ */ V("svg", {
65
+ Y.displayName = "AudioDescriptionLineIcon";
66
+ var X = M(({ animate: e, ...t }, n) => {
67
+ let r = `ad-mask-${F().replace(/:/g, "")}`;
68
+ return /* @__PURE__ */ B("svg", {
69
69
  xmlns: "http://www.w3.org/2000/svg",
70
70
  viewBox: "0 0 24 24",
71
71
  fill: "none",
72
72
  ref: n,
73
73
  ...t,
74
74
  "aria-hidden": "true",
75
- children: [/* @__PURE__ */ V("mask", {
75
+ children: [/* @__PURE__ */ B("mask", {
76
76
  id: r,
77
77
  maskUnits: "userSpaceOnUse",
78
- children: [/* @__PURE__ */ B("rect", {
78
+ children: [/* @__PURE__ */ z("rect", {
79
79
  x: 3,
80
80
  y: 6,
81
81
  width: 18,
82
82
  height: 12,
83
83
  rx: 3,
84
84
  fill: "white"
85
- }), /* @__PURE__ */ B("text", {
86
- ...Y,
85
+ }), /* @__PURE__ */ z("text", {
86
+ ...J,
87
87
  fill: "black",
88
88
  children: "AD"
89
89
  })]
90
- }), /* @__PURE__ */ B("rect", {
90
+ }), /* @__PURE__ */ z("rect", {
91
91
  x: 3,
92
92
  y: 6,
93
93
  width: 18,
@@ -98,17 +98,17 @@ var Z = N(({ animate: e, ...t }, n) => {
98
98
  })]
99
99
  });
100
100
  });
101
- Z.displayName = "AudioDescriptionFilledIcon";
101
+ X.displayName = "AudioDescriptionFilledIcon";
102
102
  //#endregion
103
103
  //#region src/blocks/F0VideoPlayer/components/CaptionsToggleIcons.tsx
104
- var Q = N(({ animate: e, ...t }, n) => /* @__PURE__ */ V("svg", {
104
+ var Z = M(({ animate: e, ...t }, n) => /* @__PURE__ */ B("svg", {
105
105
  xmlns: "http://www.w3.org/2000/svg",
106
106
  fill: "none",
107
107
  viewBox: "0 0 24 24",
108
108
  ref: n,
109
109
  ...t,
110
110
  children: [
111
- /* @__PURE__ */ B("rect", {
111
+ /* @__PURE__ */ z("rect", {
112
112
  x: 3.5,
113
113
  y: 6.5,
114
114
  width: 17,
@@ -117,13 +117,13 @@ var Q = N(({ animate: e, ...t }, n) => /* @__PURE__ */ V("svg", {
117
117
  stroke: "currentColor",
118
118
  vectorEffect: "non-scaling-stroke"
119
119
  }),
120
- /* @__PURE__ */ B("path", {
120
+ /* @__PURE__ */ z("path", {
121
121
  stroke: "currentColor",
122
122
  strokeLinecap: "round",
123
123
  d: "M7 10.75h8",
124
124
  vectorEffect: "non-scaling-stroke"
125
125
  }),
126
- /* @__PURE__ */ B("path", {
126
+ /* @__PURE__ */ z("path", {
127
127
  stroke: "currentColor",
128
128
  strokeLinecap: "round",
129
129
  d: "M7 13.75h4.5",
@@ -131,14 +131,14 @@ var Q = N(({ animate: e, ...t }, n) => /* @__PURE__ */ V("svg", {
131
131
  })
132
132
  ]
133
133
  }));
134
- Q.displayName = "CaptionsLineIcon";
135
- var ie = N(({ animate: e, ...t }, n) => /* @__PURE__ */ B("svg", {
134
+ Z.displayName = "CaptionsLineIcon";
135
+ var ae = M(({ animate: e, ...t }, n) => /* @__PURE__ */ z("svg", {
136
136
  xmlns: "http://www.w3.org/2000/svg",
137
137
  fill: "none",
138
138
  viewBox: "0 0 24 24",
139
139
  ref: n,
140
140
  ...t,
141
- children: /* @__PURE__ */ B("path", {
141
+ children: /* @__PURE__ */ z("path", {
142
142
  fill: "currentColor",
143
143
  fillRule: "evenodd",
144
144
  clipRule: "evenodd",
@@ -146,23 +146,23 @@ var ie = N(({ animate: e, ...t }, n) => /* @__PURE__ */ B("svg", {
146
146
  vectorEffect: "non-scaling-stroke"
147
147
  })
148
148
  }));
149
- ie.displayName = "CaptionsFilledIcon";
149
+ ae.displayName = "CaptionsFilledIcon";
150
150
  //#endregion
151
151
  //#region src/blocks/F0VideoPlayer/components/PlaybackRateMenu.tsx
152
- function ae({ value: e, onChange: n, containerRef: i }) {
153
- let { t: o } = t(), [s, c] = z(!1);
154
- return /* @__PURE__ */ V(te, {
152
+ function oe({ value: e, onChange: n, containerRef: i }) {
153
+ let { t: o } = t(), [s, c] = R(!1);
154
+ return /* @__PURE__ */ B(te, {
155
155
  open: s,
156
156
  onOpenChange: c,
157
- children: [/* @__PURE__ */ B(T, {
157
+ children: [/* @__PURE__ */ z(A, {
158
158
  asChild: !0,
159
- children: /* @__PURE__ */ B(a, {
159
+ children: /* @__PURE__ */ z(a, {
160
160
  variant: "ghost",
161
161
  size: "sm",
162
- label: q(e),
163
- "aria-label": o("videoPlayer.playbackSpeed", { rate: q(e) })
162
+ label: K(e),
163
+ "aria-label": o("videoPlayer.playbackSpeed", { rate: K(e) })
164
164
  })
165
- }), /* @__PURE__ */ B(E, {
165
+ }), /* @__PURE__ */ z(j, {
166
166
  container: i.current,
167
167
  side: "top",
168
168
  align: "end",
@@ -191,9 +191,9 @@ function ae({ value: e, onChange: n, containerRef: i }) {
191
191
  }
192
192
  e.preventDefault(), t[r]?.focus();
193
193
  },
194
- children: H.map((t) => {
194
+ children: V.map((t) => {
195
195
  let i = t === e;
196
- return /* @__PURE__ */ V("button", {
196
+ return /* @__PURE__ */ B("button", {
197
197
  type: "button",
198
198
  role: "menuitemradio",
199
199
  "aria-checked": i,
@@ -201,10 +201,10 @@ function ae({ value: e, onChange: n, containerRef: i }) {
201
201
  onClick: () => {
202
202
  n(t), c(!1);
203
203
  },
204
- children: [i ? /* @__PURE__ */ B("span", {
204
+ children: [i ? /* @__PURE__ */ z("span", {
205
205
  className: "absolute left-2.5 inline-flex items-center",
206
- children: /* @__PURE__ */ B(v, {})
207
- }) : null, q(t)]
206
+ children: /* @__PURE__ */ z(g, {})
207
+ }) : null, K(t)]
208
208
  }, t);
209
209
  })
210
210
  })]
@@ -212,8 +212,8 @@ function ae({ value: e, onChange: n, containerRef: i }) {
212
212
  }
213
213
  //#endregion
214
214
  //#region src/blocks/F0VideoPlayer/components/Seekbar.tsx
215
- function oe({ currentTime: e, duration: n, markerTime: a, blockSeekPastMarker: o = !1, onSeek: s }) {
216
- let { t: c } = t(), l = R(null), [u, d] = z(!1), [f, p] = z(null), m = n > 0 ? Math.min(1, e / n) : 0, h = a !== void 0 && n > 0 ? Math.min(1, a / n) : 0, g = a !== void 0 && n > 0 && a > 0 && a < n - .25 && e < a - .25, _ = (e) => {
215
+ function se({ currentTime: e, duration: n, markerTime: a, blockSeekPastMarker: o = !1, onSeek: s }) {
216
+ let { t: c } = t(), l = L(null), [u, d] = R(!1), [f, p] = R(null), m = n > 0 ? Math.min(1, e / n) : 0, h = a !== void 0 && n > 0 ? Math.min(1, a / n) : 0, g = a !== void 0 && n > 0 && a > 0 && a < n - .25 && e < a - .25, _ = (e) => {
217
217
  let t = l.current;
218
218
  if (!t) return 0;
219
219
  let n = t.getBoundingClientRect();
@@ -227,7 +227,7 @@ function oe({ currentTime: e, duration: n, markerTime: a, blockSeekPastMarker: o
227
227
  }, x = (e) => {
228
228
  u && (d(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
229
229
  }, S = f !== null && o && a !== void 0 && f > h;
230
- return /* @__PURE__ */ V("div", {
230
+ return /* @__PURE__ */ B("div", {
231
231
  ref: l,
232
232
  className: r("relative flex h-4 flex-1 items-center rounded-sm", "cursor-pointer touch-none", i()),
233
233
  role: "slider",
@@ -237,8 +237,8 @@ function oe({ currentTime: e, duration: n, markerTime: a, blockSeekPastMarker: o
237
237
  "aria-valuemax": n || 0,
238
238
  "aria-valuenow": e,
239
239
  "aria-valuetext": c("videoPlayer.timeProgress", {
240
- current: K(e),
241
- total: K(n)
240
+ current: G(e),
241
+ total: G(n)
242
242
  }),
243
243
  onPointerDown: y,
244
244
  onPointerMove: b,
@@ -267,55 +267,55 @@ function oe({ currentTime: e, duration: n, markerTime: a, blockSeekPastMarker: o
267
267
  t.preventDefault(), t.stopPropagation(), s(r);
268
268
  },
269
269
  children: [
270
- /* @__PURE__ */ B("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
271
- /* @__PURE__ */ B("div", {
270
+ /* @__PURE__ */ z("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
271
+ /* @__PURE__ */ z("div", {
272
272
  className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
273
273
  style: { width: `${m * 100}%` }
274
274
  }),
275
- g ? /* @__PURE__ */ B("div", {
275
+ g ? /* @__PURE__ */ z("div", {
276
276
  className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
277
277
  style: { left: `${h * 100}%` },
278
278
  "aria-hidden": "true"
279
279
  }) : null,
280
- /* @__PURE__ */ B("div", {
280
+ /* @__PURE__ */ z("div", {
281
281
  className: "pointer-events-none absolute z-[2] h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
282
282
  style: { left: `${m * 100}%` }
283
283
  }),
284
- S ? /* @__PURE__ */ B("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
284
+ S ? /* @__PURE__ */ z("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
285
285
  ]
286
286
  });
287
287
  }
288
288
  //#endregion
289
289
  //#region src/blocks/F0VideoPlayer/components/SettingsMenu.tsx
290
- var se = "off", ce = "py-2 pr-4 text-base font-medium", le = "gap-2 py-2 pl-3 pr-2 text-base font-medium", ue = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
290
+ var Q = "off", ce = "py-2 pr-4 text-base font-medium", le = "gap-2 py-2 pl-3 pr-2 text-base font-medium", ue = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
291
291
  function $({ icon: e, label: t, container: n, options: r, value: i, onLanguageChange: a, on: o, onOff: s, offLabel: c }) {
292
- let l = s !== void 0, u = r.find((e) => e.locale === i), d = l && !o ? c : u ? j(u) : c;
293
- return /* @__PURE__ */ V(w, { children: [/* @__PURE__ */ V(b, {
292
+ let l = s !== void 0, u = r.find((e) => e.locale === i), d = l && !o ? c : u ? x(u) : c;
293
+ return /* @__PURE__ */ B(k, { children: [/* @__PURE__ */ B(w, {
294
294
  className: le,
295
295
  children: [
296
- /* @__PURE__ */ B(g, { icon: e }),
297
- /* @__PURE__ */ B("span", {
296
+ /* @__PURE__ */ z(m, { icon: e }),
297
+ /* @__PURE__ */ z("span", {
298
298
  className: "flex-1",
299
299
  children: t
300
300
  }),
301
- /* @__PURE__ */ B("span", {
301
+ /* @__PURE__ */ z("span", {
302
302
  className: "text-f1-foreground-secondary",
303
303
  children: d
304
304
  })
305
305
  ]
306
- }), /* @__PURE__ */ B(ee, {
306
+ }), /* @__PURE__ */ z(O, {
307
307
  container: n ?? void 0,
308
- children: /* @__PURE__ */ B(O, {
308
+ children: /* @__PURE__ */ z(ne, {
309
309
  className: ue,
310
- children: /* @__PURE__ */ V(x, {
311
- value: l ? o ? i : se : i,
312
- onValueChange: (e) => l && e === se ? s() : a(e),
313
- children: [r.map((e) => /* @__PURE__ */ B(C, {
310
+ children: /* @__PURE__ */ B(T, {
311
+ value: l ? o ? i : Q : i,
312
+ onValueChange: (e) => l && e === Q ? s() : a(e),
313
+ children: [r.map((e) => /* @__PURE__ */ z(D, {
314
314
  value: e.locale,
315
315
  className: ce,
316
- children: j(e)
317
- }, e.locale)), l ? /* @__PURE__ */ B(C, {
318
- value: se,
316
+ children: x(e)
317
+ }, e.locale)), l ? /* @__PURE__ */ z(D, {
318
+ value: Q,
319
319
  className: ce,
320
320
  children: c
321
321
  }) : null]
@@ -323,53 +323,53 @@ function $({ icon: e, label: t, container: n, options: r, value: i, onLanguageCh
323
323
  })
324
324
  })] });
325
325
  }
326
- function de({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: o, captionLanguage: s, captionsOn: c, onCaptionLanguageChange: l, onCaptionsOff: u, audioDescriptionLanguages: d, audioDescriptionLanguage: p, audioDescriptionOn: m, onAudioDescriptionLanguageChange: g, onAudioDescriptionOff: _ }) {
327
- let { t: v } = t(), b = e.current, x = v("videoPlayer.off");
328
- return /* @__PURE__ */ V(D, { children: [/* @__PURE__ */ B(S, {
326
+ function de({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: o, captionLanguage: c, captionsOn: l, onCaptionLanguageChange: d, onCaptionsOff: f, audioDescriptionLanguages: p, audioDescriptionLanguage: m, audioDescriptionOn: h, onAudioDescriptionLanguageChange: g, onAudioDescriptionOff: _ }) {
327
+ let { t: v } = t(), y = e.current, b = v("videoPlayer.off");
328
+ return /* @__PURE__ */ B(ee, { children: [/* @__PURE__ */ z(E, {
329
329
  asChild: !0,
330
- children: /* @__PURE__ */ B(a, {
330
+ children: /* @__PURE__ */ z(a, {
331
331
  variant: "ghost",
332
332
  size: "sm",
333
333
  hideLabel: !0,
334
- icon: h,
334
+ icon: s,
335
335
  label: v("videoPlayer.settings")
336
336
  })
337
- }), /* @__PURE__ */ V(y, {
338
- container: b,
337
+ }), /* @__PURE__ */ B(C, {
338
+ container: y,
339
339
  side: "top",
340
340
  align: "end",
341
341
  className: ue,
342
342
  children: [
343
- n.length > 1 ? /* @__PURE__ */ B($, {
344
- icon: f,
343
+ n.length > 1 ? /* @__PURE__ */ z($, {
344
+ icon: u,
345
345
  label: v("videoPlayer.audio"),
346
- container: b,
346
+ container: y,
347
347
  options: n,
348
348
  value: r,
349
349
  onLanguageChange: i,
350
- offLabel: x
350
+ offLabel: b
351
351
  }) : null,
352
- o.length > 1 ? /* @__PURE__ */ B($, {
353
- icon: Q,
352
+ o.length > 1 ? /* @__PURE__ */ z($, {
353
+ icon: Z,
354
354
  label: v("videoPlayer.subtitles"),
355
- container: b,
355
+ container: y,
356
356
  options: o,
357
- value: s,
358
- on: c,
359
- onLanguageChange: l,
360
- onOff: u,
361
- offLabel: x
357
+ value: c,
358
+ on: l,
359
+ onLanguageChange: d,
360
+ onOff: f,
361
+ offLabel: b
362
362
  }) : null,
363
- d.length > 1 ? /* @__PURE__ */ B($, {
364
- icon: X,
363
+ p.length > 1 ? /* @__PURE__ */ z($, {
364
+ icon: Y,
365
365
  label: v("videoPlayer.audioDescription"),
366
- container: b,
367
- options: d,
368
- value: p,
369
- on: m,
366
+ container: y,
367
+ options: p,
368
+ value: m,
369
+ on: h,
370
370
  onLanguageChange: g,
371
371
  onOff: _,
372
- offLabel: x
372
+ offLabel: b
373
373
  }) : null
374
374
  ]
375
375
  })] });
@@ -380,34 +380,34 @@ function fe(e) {
380
380
  //#endregion
381
381
  //#region src/blocks/F0VideoPlayer/components/VolumeControl.tsx
382
382
  function pe(e, t) {
383
- return t || e === 0 ? m : e <= .5 ? s : u;
383
+ return t || e === 0 ? p : e <= .5 ? c : l;
384
384
  }
385
385
  function me({ volume: e, isMuted: n, onToggleMute: r, onVolumeChange: i, silent: o = !1 }) {
386
386
  let { t: s } = t(), c = n || e === 0;
387
- return o ? /* @__PURE__ */ B(a, {
387
+ return o ? /* @__PURE__ */ z(a, {
388
388
  variant: "ghost",
389
389
  size: "sm",
390
390
  hideLabel: !0,
391
391
  disabled: !0,
392
- icon: m,
392
+ icon: p,
393
393
  label: s("videoPlayer.noAudio")
394
- }) : /* @__PURE__ */ V("div", {
394
+ }) : /* @__PURE__ */ B("div", {
395
395
  className: "flex items-center gap-1",
396
- children: [/* @__PURE__ */ B(a, {
396
+ children: [/* @__PURE__ */ z(a, {
397
397
  variant: "ghost",
398
398
  size: "sm",
399
399
  hideLabel: !0,
400
400
  icon: pe(e, c),
401
401
  label: s(c ? "videoPlayer.unmute" : "videoPlayer.mute"),
402
402
  onClick: r
403
- }), /* @__PURE__ */ B(he, {
403
+ }), /* @__PURE__ */ z(he, {
404
404
  value: c ? 0 : e,
405
405
  onChange: i
406
406
  })]
407
407
  });
408
408
  }
409
409
  function he({ value: e, onChange: n }) {
410
- let { t: a } = t(), o = R(null), [s, c] = z(!1), l = Math.max(0, Math.min(1, e)), u = (e) => {
410
+ let { t: a } = t(), o = L(null), [s, c] = R(!1), l = Math.max(0, Math.min(1, e)), u = (e) => {
411
411
  let t = o.current;
412
412
  if (!t) return 0;
413
413
  let n = t.getBoundingClientRect(), r = n.width - 12;
@@ -419,7 +419,7 @@ function he({ value: e, onChange: n }) {
419
419
  }, p = (e) => {
420
420
  s && (c(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
421
421
  };
422
- return /* @__PURE__ */ V("div", {
422
+ return /* @__PURE__ */ B("div", {
423
423
  ref: o,
424
424
  className: r("relative flex h-4 w-[60px] items-center rounded-sm", "cursor-pointer touch-none", i()),
425
425
  role: "slider",
@@ -439,11 +439,11 @@ function he({ value: e, onChange: n }) {
439
439
  switch (e.key) {
440
440
  case "ArrowRight":
441
441
  case "ArrowUp":
442
- t = Math.min(1, l + U);
442
+ t = Math.min(1, l + H);
443
443
  break;
444
444
  case "ArrowLeft":
445
445
  case "ArrowDown":
446
- t = Math.max(0, l - U);
446
+ t = Math.max(0, l - H);
447
447
  break;
448
448
  case "Home":
449
449
  t = 0;
@@ -456,12 +456,12 @@ function he({ value: e, onChange: n }) {
456
456
  e.preventDefault(), e.stopPropagation(), n(t);
457
457
  },
458
458
  children: [
459
- /* @__PURE__ */ B("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
460
- /* @__PURE__ */ B("div", {
459
+ /* @__PURE__ */ z("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
460
+ /* @__PURE__ */ z("div", {
461
461
  className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
462
462
  style: { width: `calc(12px + (100% - 12px) * ${l})` }
463
463
  }),
464
- /* @__PURE__ */ B("div", {
464
+ /* @__PURE__ */ z("div", {
465
465
  className: "pointer-events-none absolute h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
466
466
  style: { left: `calc(6px + (100% - 12px) * ${l})` }
467
467
  })
@@ -470,99 +470,99 @@ function he({ value: e, onChange: n }) {
470
470
  }
471
471
  //#endregion
472
472
  //#region src/blocks/F0VideoPlayer/components/Controls.tsx
473
- function ge({ isPlaying: e, currentTime: n, duration: i, volume: s, isMuted: u, playbackRate: f, isFullscreen: m, markerTime: h, blockSeekPastMarker: g, containerRef: _, captionsAvailable: v, captionsOn: y, audioDescriptionAvailable: b, audioDescriptionOn: x, silent: S, persist: C, audioLanguages: ee, audioLanguage: w, onAudioLanguageChange: T, captionLanguages: E, captionLanguage: D, onCaptionLanguageChange: te, onCaptionsOff: O, audioDescriptionLanguages: k, audioDescriptionLanguage: A, onAudioDescriptionLanguageChange: j, onAudioDescriptionOff: M, onTogglePlay: ne, onToggleMute: N, onVolumeChange: P, onPlaybackRateChange: F, onToggleFullscreen: I, onToggleCaptions: L, onToggleAudioDescription: R, onSeek: z, download: H }) {
474
- let { t: U } = t(), re = v && E.length <= 1, W = b && k.length <= 1, G = fe({
475
- audioLanguages: ee.length,
476
- captionLanguages: E.length,
477
- audioDescriptionLanguages: k.length
473
+ function ge({ isPlaying: e, currentTime: n, duration: i, volume: s, isMuted: c, playbackRate: l, isFullscreen: u, markerTime: p, blockSeekPastMarker: m, containerRef: h, captionsAvailable: g, captionsOn: v, audioDescriptionAvailable: y, audioDescriptionOn: x, silent: S, persist: C, audioLanguages: w, audioLanguage: T, onAudioLanguageChange: E, captionLanguages: D, captionLanguage: O, onCaptionLanguageChange: k, onCaptionsOff: A, audioDescriptionLanguages: j, audioDescriptionLanguage: ee, onAudioDescriptionLanguageChange: te, onAudioDescriptionOff: ne, onTogglePlay: re, onToggleMute: M, onVolumeChange: N, onPlaybackRateChange: P, onToggleFullscreen: F, onToggleCaptions: I, onToggleAudioDescription: L, onSeek: R, download: V }) {
474
+ let { t: H } = t(), ie = g && D.length <= 1, U = y && j.length <= 1, W = fe({
475
+ audioLanguages: w.length,
476
+ captionLanguages: D.length,
477
+ audioDescriptionLanguages: j.length
478
478
  });
479
- return /* @__PURE__ */ V("div", {
479
+ return /* @__PURE__ */ B("div", {
480
480
  className: r("dark absolute inset-x-0 bottom-0 z-[2] flex select-none items-center gap-2", "rounded-b-[inherit] bg-gradient-to-t from-[#000000f2] via-[#000000b3] to-transparent px-3 py-3", "[text-shadow:0_1px_2px_rgba(0,0,0,0.55)] [&_svg]:drop-shadow-[0_1px_2px_rgba(0,0,0,0.55)]", "transition-opacity duration-200 motion-reduce:transition-none", !e || C ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
481
481
  children: [
482
- /* @__PURE__ */ B(a, {
482
+ /* @__PURE__ */ z(a, {
483
483
  variant: "ghost",
484
484
  size: "sm",
485
485
  hideLabel: !0,
486
- icon: e ? d : p,
487
- label: U(e ? "videoPlayer.pause" : "videoPlayer.play"),
488
- onClick: ne
486
+ icon: e ? b : _,
487
+ label: H(e ? "videoPlayer.pause" : "videoPlayer.play"),
488
+ onClick: re
489
489
  }),
490
- /* @__PURE__ */ B(oe, {
490
+ /* @__PURE__ */ z(se, {
491
491
  currentTime: n,
492
492
  duration: i,
493
- markerTime: h,
494
- blockSeekPastMarker: g,
495
- onSeek: z
493
+ markerTime: p,
494
+ blockSeekPastMarker: m,
495
+ onSeek: R
496
496
  }),
497
- /* @__PURE__ */ V("span", {
497
+ /* @__PURE__ */ B("span", {
498
498
  className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground",
499
499
  children: [
500
- K(n),
500
+ G(n),
501
501
  " / ",
502
- K(i)
502
+ G(i)
503
503
  ]
504
504
  }),
505
- /* @__PURE__ */ B(me, {
505
+ /* @__PURE__ */ z(me, {
506
506
  volume: s,
507
- isMuted: u,
508
- onToggleMute: N,
509
- onVolumeChange: P,
507
+ isMuted: c,
508
+ onToggleMute: M,
509
+ onVolumeChange: N,
510
510
  silent: S
511
511
  }),
512
- /* @__PURE__ */ B(ae, {
513
- value: f,
514
- onChange: F,
515
- containerRef: _
512
+ /* @__PURE__ */ z(oe, {
513
+ value: l,
514
+ onChange: P,
515
+ containerRef: h
516
516
  }),
517
- re ? /* @__PURE__ */ B(a, {
517
+ ie ? /* @__PURE__ */ z(a, {
518
518
  variant: "ghost",
519
519
  size: "sm",
520
520
  hideLabel: !0,
521
- icon: y ? ie : Q,
522
- label: U("videoPlayer.captions"),
523
- "aria-pressed": y,
524
- onClick: L
521
+ icon: v ? ae : Z,
522
+ label: H("videoPlayer.captions"),
523
+ "aria-pressed": v,
524
+ onClick: I
525
525
  }) : null,
526
- W ? /* @__PURE__ */ B(a, {
526
+ U ? /* @__PURE__ */ z(a, {
527
527
  variant: "ghost",
528
528
  size: "sm",
529
529
  hideLabel: !0,
530
- icon: x ? Z : X,
531
- label: U("videoPlayer.audioDescription"),
530
+ icon: x ? X : Y,
531
+ label: H("videoPlayer.audioDescription"),
532
532
  "aria-pressed": x,
533
- onClick: R
533
+ onClick: L
534
534
  }) : null,
535
- G ? /* @__PURE__ */ B(de, {
536
- containerRef: _,
537
- audioLanguages: ee,
538
- audioLanguage: w,
539
- onAudioLanguageChange: T,
540
- captionLanguages: E,
541
- captionLanguage: D,
542
- captionsOn: y,
543
- onCaptionLanguageChange: te,
544
- onCaptionsOff: O,
545
- audioDescriptionLanguages: k,
546
- audioDescriptionLanguage: A,
535
+ W ? /* @__PURE__ */ z(de, {
536
+ containerRef: h,
537
+ audioLanguages: w,
538
+ audioLanguage: T,
539
+ onAudioLanguageChange: E,
540
+ captionLanguages: D,
541
+ captionLanguage: O,
542
+ captionsOn: v,
543
+ onCaptionLanguageChange: k,
544
+ onCaptionsOff: A,
545
+ audioDescriptionLanguages: j,
546
+ audioDescriptionLanguage: ee,
547
547
  audioDescriptionOn: x,
548
- onAudioDescriptionLanguageChange: j,
549
- onAudioDescriptionOff: M
548
+ onAudioDescriptionLanguageChange: te,
549
+ onAudioDescriptionOff: ne
550
550
  }) : null,
551
- H ? /* @__PURE__ */ B(a, {
551
+ V ? /* @__PURE__ */ z(a, {
552
552
  variant: "ghost",
553
553
  size: "sm",
554
554
  hideLabel: !0,
555
- icon: l,
556
- label: H.label,
557
- onClick: H.onClick
555
+ icon: o,
556
+ label: V.label,
557
+ onClick: V.onClick
558
558
  }) : null,
559
- /* @__PURE__ */ B(a, {
559
+ /* @__PURE__ */ z(a, {
560
560
  variant: "ghost",
561
561
  size: "sm",
562
562
  hideLabel: !0,
563
- icon: m ? c : o,
564
- label: U(m ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
565
- onClick: I
563
+ icon: u ? f : d,
564
+ label: H(u ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
565
+ onClick: F
566
566
  })
567
567
  ]
568
568
  });
@@ -571,8 +571,8 @@ function ge({ isPlaying: e, currentTime: n, duration: i, volume: s, isMuted: u,
571
571
  //#region src/blocks/F0VideoPlayer/hooks/useVttSource.ts
572
572
  var _e = (e) => e.trimStart().startsWith("WEBVTT");
573
573
  function ve(e) {
574
- let t = e !== void 0 && _e(e), [n, r] = z();
575
- return F(() => {
574
+ let t = e !== void 0 && _e(e), [n, r] = R();
575
+ return P(() => {
576
576
  if (e === void 0 || !_e(e)) {
577
577
  r(void 0);
578
578
  return;
@@ -588,8 +588,8 @@ function ve(e) {
588
588
  //#region src/blocks/F0VideoPlayer/hooks/useAudioDescription.ts
589
589
  var ye = "descriptions";
590
590
  function be(e, { enabled: t, describedSrc: n, descriptions: r }) {
591
- let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ve(r), [s, c] = z(!1), l = i || r !== void 0 || s, [u, d] = z(), f = R(!1);
592
- return F(() => {
591
+ let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ve(r), [s, c] = R(!1), l = i || r !== void 0 || s, [u, d] = R(), f = L(!1);
592
+ return P(() => {
593
593
  if (!e) return;
594
594
  let n = e.textTracks, a = typeof window < "u" && "speechSynthesis" in window, o = t && !i && a, s = () => {
595
595
  f.current && (f.current = !1, e.play().catch(() => {}));
@@ -621,7 +621,7 @@ function be(e, { enabled: t, describedSrc: n, descriptions: r }) {
621
621
  i,
622
622
  r,
623
623
  a
624
- ]), L(() => ({
624
+ ]), I(() => ({
625
625
  trackSrc: a,
626
626
  needsCrossOrigin: o,
627
627
  available: l,
@@ -636,7 +636,7 @@ function be(e, { enabled: t, describedSrc: n, descriptions: r }) {
636
636
  //#endregion
637
637
  //#region src/blocks/F0VideoPlayer/hooks/useKeyboardShortcuts.ts
638
638
  function xe({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscreen: i, setVolume: a }) {
639
- return P((o) => {
639
+ return N((o) => {
640
640
  let s = o.target;
641
641
  if (s instanceof HTMLElement && (s.closest("button, a, input, textarea, select, [role=\"button\"], [contenteditable=\"true\"]") || s.closest("[role=\"menu\"], [role^=\"menuitem\"]") || s.getAttribute("role") === "slider")) return;
642
642
  let c = e.current;
@@ -654,10 +654,10 @@ function xe({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
654
654
  return;
655
655
  }
656
656
  case "ArrowUp":
657
- o.preventDefault(), a(Math.min(1, c.volume + U));
657
+ o.preventDefault(), a(Math.min(1, c.volume + H));
658
658
  return;
659
659
  case "ArrowDown":
660
- o.preventDefault(), a(Math.max(0, c.volume - U));
660
+ o.preventDefault(), a(Math.max(0, c.volume - H));
661
661
  return;
662
662
  case "m":
663
663
  o.preventDefault(), r();
@@ -679,12 +679,12 @@ function xe({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
679
679
  //#endregion
680
680
  //#region src/blocks/F0VideoPlayer/hooks/useRestrictForwardSeek.ts
681
681
  function Se({ video: e, enabled: t, resetKey: n }) {
682
- let r = R(0), i = R(0), a = R(t);
682
+ let r = L(0), i = L(0), a = L(t);
683
683
  a.current = t;
684
- let [o, s] = z(0);
685
- return F(() => {
684
+ let [o, s] = R(0);
685
+ return P(() => {
686
686
  r.current = 0, i.current = 0, s(0);
687
- }, [n]), F(() => {
687
+ }, [n]), P(() => {
688
688
  if (!e) return;
689
689
  let t = () => {
690
690
  a.current && e.currentTime > r.current + .25 && (e.currentTime = r.current);
@@ -706,17 +706,17 @@ function Se({ video: e, enabled: t, resetKey: n }) {
706
706
  };
707
707
  }, [e]), {
708
708
  maxWatchedTime: o,
709
- clampSeek: P((e) => a.current ? Math.min(e, r.current) : e, [])
709
+ clampSeek: N((e) => a.current ? Math.min(e, r.current) : e, [])
710
710
  };
711
711
  }
712
712
  //#endregion
713
713
  //#region src/blocks/F0VideoPlayer/hooks/useVideoCaptions.ts
714
714
  var Ce = /* @__PURE__ */ new Set(["captions", "subtitles"]), we = 2, Te = 3;
715
715
  function Ee(e, t) {
716
- let { trackSrc: n, needsCrossOrigin: r } = ve(t), [i, a] = z(!1), [o, s] = z(!1), [c, l] = z(!1), u = o || t !== void 0 && !c;
717
- return F(() => {
716
+ let { trackSrc: n, needsCrossOrigin: r } = ve(t), [i, a] = R(!1), [o, s] = R(!1), [c, l] = R(!1), u = o || t !== void 0 && !c;
717
+ return P(() => {
718
718
  l(!1), s(!1);
719
- }, [n]), F(() => {
719
+ }, [n]), P(() => {
720
720
  if (!e) return;
721
721
  let t = e.textTracks, n = e.querySelector("track[kind=\"captions\"]"), r = () => {
722
722
  let e = !1;
@@ -751,7 +751,7 @@ function Ee(e, t) {
751
751
  t,
752
752
  i,
753
753
  n
754
- ]), L(() => ({
754
+ ]), I(() => ({
755
755
  trackSrc: n,
756
756
  needsCrossOrigin: r,
757
757
  available: u,
@@ -767,15 +767,15 @@ function Ee(e, t) {
767
767
  //#endregion
768
768
  //#region src/blocks/F0VideoPlayer/hooks/useVideoCompletion.ts
769
769
  function De(e) {
770
- return e - Math.min(10, e * G);
770
+ return e - Math.min(10, e * W);
771
771
  }
772
772
  function Oe({ video: e, onComplete: t, resetKey: n }) {
773
- let r = R(t);
773
+ let r = L(t);
774
774
  r.current = t;
775
- let i = R(!1), a = !!t;
776
- F(() => {
775
+ let i = L(!1), a = !!t;
776
+ P(() => {
777
777
  i.current = !1;
778
- }, [n]), F(() => {
778
+ }, [n]), P(() => {
779
779
  if (!e || !a) return;
780
780
  let t = () => {
781
781
  !i.current && e.duration && e.currentTime >= De(e.duration) && (i.current = !0, r.current?.(e));
@@ -788,17 +788,17 @@ function Oe({ video: e, onComplete: t, resetKey: n }) {
788
788
  //#endregion
789
789
  //#region src/blocks/F0VideoPlayer/hooks/useVideoMilestones.ts
790
790
  function ke({ video: e, onMilestone: t, resetKey: n }) {
791
- let r = R(t);
791
+ let r = L(t);
792
792
  r.current = t;
793
- let i = R(/* @__PURE__ */ new Set()), a = !!t;
794
- F(() => {
793
+ let i = L(/* @__PURE__ */ new Set()), a = !!t;
794
+ P(() => {
795
795
  i.current.clear();
796
- }, [n]), F(() => {
796
+ }, [n]), P(() => {
797
797
  if (!e || !a) return;
798
798
  let t = () => {
799
799
  if (!e.duration) return;
800
800
  let t = Math.round(e.currentTime / e.duration * 100);
801
- for (let n of re) i.current.has(n) || t >= n && (i.current.add(n), r.current?.(n, e));
801
+ for (let n of ie) i.current.has(n) || t >= n && (i.current.add(n), r.current?.(n, e));
802
802
  };
803
803
  return e.addEventListener("timeupdate", t), () => {
804
804
  e.removeEventListener("timeupdate", t);
@@ -808,18 +808,18 @@ function ke({ video: e, onMilestone: t, resetKey: n }) {
808
808
  //#endregion
809
809
  //#region src/blocks/F0VideoPlayer/hooks/useVideoState.ts
810
810
  function Ae(e) {
811
- let t = R(null), [n, r] = z(null), i = R(0), a = P((e) => {
811
+ let t = L(null), [n, r] = R(null), i = L(0), a = N((e) => {
812
812
  t.current = e, r(e);
813
- }, []), [o, s] = z(!1), [c, l] = z(!1), [u, d] = z(0), [f, p] = z(0), [m, h] = z(1), [g, _] = z(!1), [v, y] = z(1);
814
- return F(() => {
813
+ }, []), [o, s] = R(!1), [c, l] = R(!1), [u, d] = R(0), [f, p] = R(0), [m, h] = R(1), [g, _] = R(!1), [v, y] = R(1);
814
+ return P(() => {
815
815
  i.current = 0, t.current && (t.current.playbackRate = 1), s(!1), l(!1), d(0), p(0), y(1);
816
- }, [e]), F(() => {
816
+ }, [e]), P(() => {
817
817
  let e = n;
818
818
  if (!e) return;
819
819
  let t = () => l(!0), r = () => l(!1), a = () => l(!1), o = () => {
820
820
  h(e.volume), _(e.muted);
821
821
  }, s = () => p(e.duration || 0), c = () => {
822
- J(e.playbackRate) && y(e.playbackRate);
822
+ q(e.playbackRate) && y(e.playbackRate);
823
823
  }, u = () => {
824
824
  let t = performance.now();
825
825
  t - i.current >= 250 && (i.current = t, d(e.currentTime));
@@ -839,25 +839,25 @@ function Ae(e) {
839
839
  isMuted: g,
840
840
  playbackRate: v,
841
841
  setVideoLoaded: s,
842
- togglePlay: P(() => {
842
+ togglePlay: N(() => {
843
843
  let e = t.current;
844
844
  e && (e.paused || e.ended ? e.play().catch(() => {}) : e.pause());
845
845
  }, []),
846
- toggleMute: P(() => {
846
+ toggleMute: N(() => {
847
847
  let e = t.current;
848
848
  e && (e.muted = !e.muted);
849
849
  }, []),
850
- setVolume: P((e) => {
850
+ setVolume: N((e) => {
851
851
  let n = t.current;
852
852
  if (!n) return;
853
853
  let r = Math.max(0, Math.min(1, e));
854
854
  n.volume = r, n.muted = r === 0;
855
855
  }, []),
856
- setPlaybackRate: P((e) => {
856
+ setPlaybackRate: N((e) => {
857
857
  let n = t.current;
858
858
  n && (n.playbackRate = e);
859
859
  }, []),
860
- seekTo: P((e) => {
860
+ seekTo: N((e) => {
861
861
  let n = t.current;
862
862
  if (!n) return;
863
863
  let r = Math.max(0, Math.min(e, n.duration || e));
@@ -868,17 +868,17 @@ function Ae(e) {
868
868
  //#endregion
869
869
  //#region src/blocks/F0VideoPlayer/hooks/useVideoTracking.ts
870
870
  function je({ video: e, onTrackAction: t }) {
871
- let n = R(t);
871
+ let n = L(t);
872
872
  n.current = t;
873
873
  let r = !!t;
874
- F(() => {
874
+ P(() => {
875
875
  if (!e || !r) return;
876
876
  let t = null, i = () => {
877
877
  t &&= (clearInterval(t), null);
878
878
  }, a = () => {
879
879
  n.current?.(), i(), t = setInterval(() => {
880
880
  n.current?.();
881
- }, W);
881
+ }, U);
882
882
  }, o = () => {
883
883
  n.current?.(), i();
884
884
  }, s = () => i();
@@ -889,177 +889,177 @@ function je({ video: e, onTrackAction: t }) {
889
889
  }
890
890
  //#endregion
891
891
  //#region src/blocks/F0VideoPlayer/internal.tsx
892
- function Me({ src: e, poster: n, ariaLabel: a, silent: o = !1, persistControls: s = !1, content: c, defaultLanguage: l, autoPlay: u = !1, autoFocus: d = !1, download: f, restrictForwardSeek: m = !1, onTrackAction: h, onMilestone: g, onComplete: v, ...y }) {
893
- let { t: b } = t(), x = R(null), S = L(() => M(e), [e]), [C, ee] = z(() => A(S, l)), w = S.some((e) => e.locale === C) ? C : A(S, l), T = k(e, w) ?? "", E = L(() => M(c?.captions), [c?.captions]), [D, te] = z(() => A(E, l)), O = E.some((e) => e.locale === D) ? D : A(E, l), j = k(c?.captions, O), N = L(() => M(c?.descriptions, c?.describedSrc), [c?.descriptions, c?.describedSrc]), [I, H] = z(() => A(N, l)), U = N.some((e) => e.locale === I) ? I : A(N, l), re = k(c?.descriptions, U), W = k(c?.describedSrc, U), [G, K] = z(!1), q = G && W ? W : T, J = Ae(q), Y = Ee(J.videoElement, j), X = be(J.videoElement, {
894
- enabled: G,
895
- describedSrc: W,
896
- descriptions: re
897
- }), Z = P(() => {
898
- let e = J.videoRef.current;
892
+ function Me({ src: e, poster: n, ariaLabel: a, silent: o = !1, persistControls: s = !1, content: c, defaultLanguage: l, autoPlay: u = !1, autoFocus: d = !1, download: f, restrictForwardSeek: p = !1, onTrackAction: m, onMilestone: g, onComplete: b, ...x }) {
893
+ let { t: C } = t(), w = L(null), T = I(() => S(e), [e]), [E, D] = R(() => y(T, l)), O = T.some((e) => e.locale === E) ? E : y(T, l), k = v(e, O) ?? "", A = I(() => S(c?.captions), [c?.captions]), [j, ee] = R(() => y(A, l)), te = A.some((e) => e.locale === j) ? j : y(A, l), ne = v(c?.captions, te), M = I(() => S(c?.descriptions, c?.describedSrc), [c?.descriptions, c?.describedSrc]), [F, V] = R(() => y(M, l)), H = M.some((e) => e.locale === F) ? F : y(M, l), ie = v(c?.descriptions, H), U = v(c?.describedSrc, H), [W, G] = R(!1), K = W && U ? U : k, q = Ae(K), J = Ee(q.videoElement, ne), Y = be(q.videoElement, {
894
+ enabled: W,
895
+ describedSrc: U,
896
+ descriptions: ie
897
+ }), X = N(() => {
898
+ let e = q.videoRef.current;
899
899
  if (!e) return;
900
900
  let t = e.currentTime, n = !e.paused, r = () => {
901
901
  e.currentTime = t, n && e.play().catch(() => {}), e.removeEventListener("loadedmetadata", r);
902
902
  };
903
903
  e.addEventListener("loadedmetadata", r);
904
- }, [J.videoRef]), Q = P((e) => {
905
- Z(), ee(e);
906
- }, [Z]), ie = P(() => {
907
- W && Z(), K((e) => !e);
908
- }, [W, Z]), ae = P((e) => {
909
- te(e), Y.showing || Y.toggle();
910
- }, [Y]), oe = P(() => {
911
- Y.showing && Y.toggle();
912
- }, [Y]), se = P((e) => {
913
- W && Z(), H(e), K(!0);
914
- }, [W, Z]), ce = P(() => {
915
- W && Z(), K(!1);
916
- }, [W, Z]);
904
+ }, [q.videoRef]), Z = N((e) => {
905
+ X(), D(e);
906
+ }, [X]), ae = N(() => {
907
+ U && X(), G((e) => !e);
908
+ }, [U, X]), oe = N((e) => {
909
+ ee(e), J.showing || J.toggle();
910
+ }, [J]), se = N(() => {
911
+ J.showing && J.toggle();
912
+ }, [J]), Q = N((e) => {
913
+ U && X(), V(e), G(!0);
914
+ }, [U, X]), ce = N(() => {
915
+ U && X(), G(!1);
916
+ }, [U, X]);
917
917
  je({
918
- video: J.videoElement,
919
- onTrackAction: h
918
+ video: q.videoElement,
919
+ onTrackAction: m
920
920
  }), ke({
921
- video: J.videoElement,
921
+ video: q.videoElement,
922
922
  onMilestone: g,
923
- resetKey: T
923
+ resetKey: k
924
924
  }), Oe({
925
- video: J.videoElement,
926
- onComplete: v,
927
- resetKey: T
925
+ video: q.videoElement,
926
+ onComplete: b,
927
+ resetKey: k
928
928
  });
929
929
  let { maxWatchedTime: le, clampSeek: ue } = Se({
930
- video: J.videoElement,
931
- enabled: m,
932
- resetKey: T
933
- }), $ = P((e) => J.seekTo(ue(e)), [J, ue]), { isFullscreen: de, toggleFullscreen: fe } = ne({ targetRef: x }), pe = P(() => {}, []), me = !!(G && W);
934
- F(() => {
935
- let e = J.videoRef.current;
930
+ video: q.videoElement,
931
+ enabled: p,
932
+ resetKey: k
933
+ }), $ = N((e) => q.seekTo(ue(e)), [q, ue]), { isFullscreen: de, toggleFullscreen: fe } = re({ targetRef: w }), pe = N(() => {}, []), me = !!(W && U);
934
+ P(() => {
935
+ let e = q.videoRef.current;
936
936
  o && e && (e.muted = !me);
937
937
  }, [
938
938
  o,
939
939
  me,
940
- J.videoElement,
941
- J.videoRef
940
+ q.videoElement,
941
+ q.videoRef
942
942
  ]);
943
943
  let he = xe({
944
- videoRef: J.videoRef,
944
+ videoRef: q.videoRef,
945
945
  seek: $,
946
- togglePlay: J.togglePlay,
947
- toggleMute: o ? pe : J.toggleMute,
946
+ togglePlay: q.togglePlay,
947
+ toggleMute: o ? pe : q.toggleMute,
948
948
  toggleFullscreen: fe,
949
- setVolume: o ? pe : J.setVolume
949
+ setVolume: o ? pe : q.setVolume
950
950
  });
951
- F(() => {
952
- d && x.current?.focus({ preventScroll: !0 });
951
+ P(() => {
952
+ d && w.current?.focus({ preventScroll: !0 });
953
953
  }, [d]);
954
954
  let _e = (e) => e.preventDefault();
955
- return /* @__PURE__ */ V("div", {
956
- ref: x,
955
+ return /* @__PURE__ */ B("div", {
956
+ ref: w,
957
957
  className: r("group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background", "[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none", i()),
958
958
  role: "region",
959
- "aria-label": a ?? b("videoPlayer.regionLabel"),
959
+ "aria-label": a ?? C("videoPlayer.regionLabel"),
960
960
  tabIndex: 0,
961
961
  onKeyDown: he,
962
- "data-video-captions": o ? "no-audio" : Y.available ? "available" : "missing",
963
- ...y,
962
+ "data-video-captions": o ? "no-audio" : J.available ? "available" : "missing",
963
+ ...x,
964
964
  children: [
965
- /* @__PURE__ */ V("video", {
966
- ref: J.setVideoNode,
965
+ /* @__PURE__ */ B("video", {
966
+ ref: q.setVideoNode,
967
967
  autoPlay: u,
968
968
  playsInline: !0,
969
969
  disablePictureInPicture: !0,
970
970
  disableRemotePlayback: !0,
971
971
  draggable: !1,
972
972
  onContextMenu: _e,
973
- onClick: J.togglePlay,
974
- src: q,
973
+ onClick: q.togglePlay,
974
+ src: K,
975
975
  poster: n,
976
- crossOrigin: Y.needsCrossOrigin || X.needsCrossOrigin ? "anonymous" : void 0,
977
- onLoadedData: () => J.setVideoLoaded(!0),
976
+ crossOrigin: J.needsCrossOrigin || Y.needsCrossOrigin ? "anonymous" : void 0,
977
+ onLoadedData: () => q.setVideoLoaded(!0),
978
978
  className: r("block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300", "[&::-webkit-media-text-track-container]:![transform:translateY(-3.5rem)]"),
979
- style: { opacity: J.videoLoaded || n ? 1 : 0 },
980
- children: [Y.trackSrc ? /* @__PURE__ */ B("track", {
979
+ style: { opacity: q.videoLoaded || n ? 1 : 0 },
980
+ children: [J.trackSrc ? /* @__PURE__ */ z("track", {
981
981
  kind: "captions",
982
- src: Y.trackSrc,
983
- label: b("videoPlayer.captions"),
982
+ src: J.trackSrc,
983
+ label: C("videoPlayer.captions"),
984
984
  default: !1
985
- }) : null, X.trackSrc ? /* @__PURE__ */ B("track", {
985
+ }) : null, Y.trackSrc ? /* @__PURE__ */ z("track", {
986
986
  kind: "descriptions",
987
- src: X.trackSrc,
988
- label: b("videoPlayer.audioDescription"),
987
+ src: Y.trackSrc,
988
+ label: C("videoPlayer.audioDescription"),
989
989
  default: !1
990
990
  }) : null]
991
991
  }),
992
- J.isPlaying ? null : /* @__PURE__ */ B("div", {
992
+ q.isPlaying ? null : /* @__PURE__ */ z("div", {
993
993
  "aria-hidden": !0,
994
994
  "data-video-play-overlay": !0,
995
995
  className: "pointer-events-none absolute inset-0 z-[1] flex items-center justify-center",
996
- children: /* @__PURE__ */ B("button", {
996
+ children: /* @__PURE__ */ z("button", {
997
997
  type: "button",
998
998
  tabIndex: -1,
999
- onClick: J.togglePlay,
999
+ onClick: q.togglePlay,
1000
1000
  className: "pointer-events-auto flex size-14 items-center justify-center rounded-full bg-f1-foreground/70 pl-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.45)] transition-transform duration-150 hover:scale-105 motion-reduce:transition-none dark:bg-f1-background/70 [&_svg]:size-7",
1001
- children: /* @__PURE__ */ B(_, {
1002
- icon: p,
1001
+ children: /* @__PURE__ */ z(h, {
1002
+ icon: _,
1003
1003
  size: "lg",
1004
1004
  color: "#fff"
1005
1005
  })
1006
1006
  })
1007
1007
  }),
1008
- Y.showing && X.activeCue ? /* @__PURE__ */ B("div", {
1008
+ J.showing && Y.activeCue ? /* @__PURE__ */ z("div", {
1009
1009
  "aria-hidden": !0,
1010
1010
  className: "dark pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-center p-3",
1011
- children: /* @__PURE__ */ V("p", {
1011
+ children: /* @__PURE__ */ B("p", {
1012
1012
  className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]",
1013
- children: [/* @__PURE__ */ V("span", {
1013
+ children: [/* @__PURE__ */ B("span", {
1014
1014
  className: "pr-1 font-medium not-italic opacity-70",
1015
1015
  children: [
1016
1016
  "[",
1017
- b("videoPlayer.audioDescription"),
1017
+ C("videoPlayer.audioDescription"),
1018
1018
  "]"
1019
1019
  ]
1020
- }), X.activeCue]
1020
+ }), Y.activeCue]
1021
1021
  })
1022
1022
  }) : null,
1023
- /* @__PURE__ */ B("span", {
1023
+ /* @__PURE__ */ z("span", {
1024
1024
  className: "sr-only",
1025
1025
  "aria-live": "polite",
1026
- children: J.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused")
1026
+ children: q.isPlaying ? C("videoPlayer.playing") : C("videoPlayer.paused")
1027
1027
  }),
1028
- J.videoLoaded ? /* @__PURE__ */ B(ge, {
1029
- isPlaying: J.isPlaying,
1030
- currentTime: J.currentTime,
1031
- duration: J.duration,
1032
- volume: J.volume,
1033
- isMuted: J.isMuted,
1034
- playbackRate: J.playbackRate,
1028
+ q.videoLoaded ? /* @__PURE__ */ z(ge, {
1029
+ isPlaying: q.isPlaying,
1030
+ currentTime: q.currentTime,
1031
+ duration: q.duration,
1032
+ volume: q.volume,
1033
+ isMuted: q.isMuted,
1034
+ playbackRate: q.playbackRate,
1035
1035
  isFullscreen: de,
1036
- markerTime: m ? le : void 0,
1037
- blockSeekPastMarker: m,
1038
- containerRef: x,
1039
- captionsAvailable: Y.available,
1040
- captionsOn: Y.showing,
1041
- audioDescriptionAvailable: X.available,
1042
- audioDescriptionOn: G,
1036
+ markerTime: p ? le : void 0,
1037
+ blockSeekPastMarker: p,
1038
+ containerRef: w,
1039
+ captionsAvailable: J.available,
1040
+ captionsOn: J.showing,
1041
+ audioDescriptionAvailable: Y.available,
1042
+ audioDescriptionOn: W,
1043
1043
  silent: o,
1044
1044
  persist: s,
1045
- audioLanguages: S,
1046
- audioLanguage: w,
1047
- onAudioLanguageChange: Q,
1048
- captionLanguages: E,
1049
- captionLanguage: O,
1050
- onCaptionLanguageChange: ae,
1051
- onCaptionsOff: oe,
1052
- audioDescriptionLanguages: N,
1053
- audioDescriptionLanguage: U,
1054
- onAudioDescriptionLanguageChange: se,
1045
+ audioLanguages: T,
1046
+ audioLanguage: O,
1047
+ onAudioLanguageChange: Z,
1048
+ captionLanguages: A,
1049
+ captionLanguage: te,
1050
+ onCaptionLanguageChange: oe,
1051
+ onCaptionsOff: se,
1052
+ audioDescriptionLanguages: M,
1053
+ audioDescriptionLanguage: H,
1054
+ onAudioDescriptionLanguageChange: Q,
1055
1055
  onAudioDescriptionOff: ce,
1056
- onTogglePlay: J.togglePlay,
1057
- onToggleMute: J.toggleMute,
1058
- onVolumeChange: J.setVolume,
1059
- onPlaybackRateChange: J.setPlaybackRate,
1056
+ onTogglePlay: q.togglePlay,
1057
+ onToggleMute: q.toggleMute,
1058
+ onVolumeChange: q.setVolume,
1059
+ onPlaybackRateChange: q.setPlaybackRate,
1060
1060
  onToggleFullscreen: () => void fe(),
1061
- onToggleCaptions: Y.toggle,
1062
- onToggleAudioDescription: ie,
1061
+ onToggleCaptions: J.toggle,
1062
+ onToggleAudioDescription: ae,
1063
1063
  onSeek: $,
1064
1064
  download: f
1065
1065
  }) : null