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