@factorialco/f0-react 10.6.1 → 10.7.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/{ChatPostComposerDialog-BeJZv7tT.js → ChatPostComposerDialog-C2V9TUkg.js} +3 -3
  2. package/dist/{CoachmarkProvider-DVF40v2q.js → CoachmarkProvider-BvBZeMBP.js} +21253 -21318
  3. package/dist/{DocumentToolbar-rCarM1oo.js → DocumentToolbar-Ms3L6qnK.js} +5 -5
  4. package/dist/{ChatDocxThumbnail-DdI_ITWn.js → DocxThumbnail-kHTNnwW0.js} +1 -1
  5. package/dist/{DocxViewer-C1dP05wX.js → DocxViewer-53xYfUJz.js} +2 -2
  6. package/dist/{F0AiProcessingOverlay-CrvPHV1G.js → F0AiProcessingOverlay-DU9SNCpZ.js} +1429 -1172
  7. package/dist/{F0Box-D0fWIRgc.js → F0Box-CYL5_Zhb.js} +1 -1
  8. package/dist/{F0CanvasPanel-C7vHU_iJ.js → F0CanvasPanel-CZJtegui.js} +8396 -7035
  9. package/dist/{F0DocumentViewer-BrxSgrT8.js → F0DocumentViewer-CMRiSo6z.js} +12 -12
  10. package/dist/F0DocumentViewer-DOf2JnU5.js +3 -0
  11. package/dist/{F0Map-DC_Mplnx.js → F0Map-Biu6ugJ0.js} +20 -20
  12. package/dist/{F0Select-CovHF33V.js → F0Select-By_QpX1S.js} +2 -2
  13. package/dist/{F0VideoPlayer-NjaAU0Gm.js → F0VideoPlayer-ecHVj-1l.js} +319 -319
  14. package/dist/F0VideoPlayer-fM7EfmVJ.js +1 -0
  15. package/dist/{Map-D6mJxw2a.js → Map-UhAoXj_6.js} +29 -29
  16. package/dist/{ChatPdfThumbnail-adL3N5Xz.js → PdfThumbnail-CAjsh0iU.js} +2 -2
  17. package/dist/{ChatSheetThumbnail-BKCy7BGq.js → SheetThumbnail-HtGezPp4.js} +1 -1
  18. package/dist/{SheetViewer-8ZWEuOLq.js → SheetViewer-C95sLVLL.js} +7 -7
  19. package/dist/{ChatTextThumbnail-Ct32PcXO.js → TextThumbnail-X04JgaNI.js} +1 -1
  20. package/dist/{TextViewer-B00Rmqc7.js → TextViewer-D5kapR67.js} +2 -2
  21. package/dist/ai.d.ts +4 -4
  22. package/dist/ai.js +5 -5
  23. package/dist/component-status.js +29 -7
  24. package/dist/{dist-7YY6sRd4.js → dist-CUsub1Mu.js} +1 -1
  25. package/dist/dist-Dt-cTb6D.js +43 -0
  26. package/dist/experimental.d.ts +2 -2
  27. package/dist/experimental.js +5138 -5989
  28. package/dist/{exports-B1AxzHkB.d.ts → exports-G0JJykkK.d.ts} +85 -2
  29. package/dist/f0.d.ts +5 -5
  30. package/dist/f0.js +1906 -1906
  31. package/dist/{i18n-provider-defaults-DliS9uYl.js → i18n-provider-defaults-BA2_-hRH.js} +2 -0
  32. package/dist/{i18n-provider-defaults-DiJM3DSg.d.ts → i18n-provider-defaults-m88KkXdP.d.ts} +2 -0
  33. package/dist/i18n-provider-defaults.d.ts +1 -1
  34. package/dist/i18n-provider-defaults.js +1 -1
  35. package/dist/{index-CHpMOnlX.d.ts → index-BftFpZQm.d.ts} +95 -4
  36. package/dist/{index-DQo_UZ7M.d.ts → index-BrGZDOLv.d.ts} +2 -2
  37. package/dist/{maplibre-C8TCdToL.js → maplibre-BxlnEhf3.js} +1 -1
  38. package/dist/{pdfWorker-8f29nzGo.js → pdfWorker-C9Hcqt4e.js} +2 -2
  39. package/dist/{popover-B2hEEubt.js → popover-B7fqB9lu.js} +1 -1
  40. package/dist/styles.css +1 -1
  41. package/dist/{useData-DjJsB0qa.js → useData-CAl9SKtE.js} +1 -1
  42. package/dist/useFullscreen-CNwpzjpz.js +23 -0
  43. package/package.json +1 -1
  44. package/dist/F0DocumentViewer-Crhq3XFQ.js +0 -3
  45. package/dist/F0VideoPlayer-C0kP3yFk.js +0 -1
@@ -1,23 +1,23 @@
1
- import { w as e } from "./CoachmarkProvider-DVF40v2q.js";
2
- import { A as t, B as n, F as r, I as i, L as a, U as o, V as s, a as c, an as l, ar as u, b as d, i as f, in as p, j as m, rn as h, rr as g, t as _, z as v } from "./popover-B2hEEubt.js";
3
- import { I as y, L as b } from "./tooltip-TOvfXq9F.js";
4
- import { Ao as x, Ji as S, Ki as C, Wa as ee, Za as te, _a as w, ma as T, mo as E, pa as ne, qi as re } from "./F0CanvasPanel-C7vHU_iJ.js";
1
+ import { A as e, B as t, F as n, I as r, L as i, U as a, V as o, a as s, an as c, ar as l, b as u, i as d, in as f, j as p, rn as m, rr as h, t as g, z as _ } from "./popover-B7fqB9lu.js";
2
+ import { I as v, L as y } from "./tooltip-TOvfXq9F.js";
3
+ import { Ia as b, La as x, Po as S, Ra as C, Vo as ee, bs as w, io as T, is as E, ro as te, so as ne } from "./F0CanvasPanel-CZJtegui.js";
5
4
  import { t as D } from "./Check-DAp9gCRh.js";
6
- import { forwardRef as O, useCallback as k, useEffect as A, useId as j, useMemo as M, useRef as N, useState as P } from "react";
7
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
5
+ import { t as O } from "./useFullscreen-CNwpzjpz.js";
6
+ import { forwardRef as k, useCallback as A, useEffect as j, useId as M, useMemo as N, useRef as P, useState as F } from "react";
7
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
8
8
  //#region src/elements/lib/localized.ts
9
- function L(e) {
9
+ function R(e) {
10
10
  return Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "locale" in e && "value" in e);
11
11
  }
12
- function R(e, t) {
12
+ function z(e, t) {
13
13
  if (e !== void 0) {
14
- if (!L(e)) return e;
14
+ if (!R(e)) return e;
15
15
  if (e.length !== 0) return ((t ? e.find((e) => e.locale === t) : void 0) ?? e[0]).value;
16
16
  }
17
17
  }
18
- function z(...e) {
18
+ function B(...e) {
19
19
  let t = /* @__PURE__ */ new Map();
20
- for (let n of e) if (L(n)) for (let e of n) {
20
+ for (let n of e) if (R(n)) for (let e of n) {
21
21
  let n = t.get(e.locale);
22
22
  n ? !n.label && e.label && (n.label = e.label) : t.set(e.locale, {
23
23
  locale: e.locale,
@@ -26,7 +26,7 @@ function z(...e) {
26
26
  }
27
27
  return Array.from(t.values());
28
28
  }
29
- function B(e, t) {
29
+ function V(e, t) {
30
30
  if (e.label) return e.label;
31
31
  try {
32
32
  let n = t ?? e.locale, r = new Intl.DisplayNames([n], { type: "language" }).of(e.locale) ?? e.locale;
@@ -35,7 +35,7 @@ function B(e, t) {
35
35
  return e.locale;
36
36
  }
37
37
  }
38
- function V(e, t) {
38
+ function H(e, t) {
39
39
  if (e.length === 0) return;
40
40
  let n = e.map((e) => e.locale), r = (e) => e.split("-")[0], i = (e) => n.find((t) => t === e) ?? n.find((t) => r(t) === r(e));
41
41
  if (t) {
@@ -51,29 +51,29 @@ function V(e, t) {
51
51
  }
52
52
  //#endregion
53
53
  //#region src/blocks/F0VideoPlayer/utils.ts
54
- var H = [
54
+ var U = [
55
55
  .5,
56
56
  .75,
57
57
  1,
58
58
  1.25,
59
59
  1.5
60
- ], U = .1, W = [
60
+ ], W = .1, G = [
61
61
  25,
62
62
  50,
63
63
  75
64
- ], G = 3e5, K = .03;
65
- function q(e) {
64
+ ], K = 3e5, q = .03;
65
+ function J(e) {
66
66
  return !Number.isFinite(e) || e < 0 ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
67
67
  }
68
- function J(e) {
68
+ function Y(e) {
69
69
  return `${e}x`;
70
70
  }
71
- function Y(e) {
72
- return H.includes(e);
71
+ function X(e) {
72
+ return U.includes(e);
73
73
  }
74
74
  //#endregion
75
75
  //#region src/blocks/F0VideoPlayer/components/AudioDescriptionToggleIcons.tsx
76
- var X = {
76
+ var Z = {
77
77
  x: 12,
78
78
  y: 15,
79
79
  textAnchor: "middle",
@@ -81,14 +81,14 @@ var X = {
81
81
  fontWeight: 700,
82
82
  fontFamily: "inherit",
83
83
  letterSpacing: -.4
84
- }, Z = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
84
+ }, Q = k(({ animate: e, ...t }, n) => /* @__PURE__ */ L("svg", {
85
85
  xmlns: "http://www.w3.org/2000/svg",
86
86
  viewBox: "0 0 24 24",
87
87
  fill: "none",
88
88
  ref: n,
89
89
  ...t,
90
90
  "aria-hidden": "true",
91
- children: [/* @__PURE__ */ F("rect", {
91
+ children: [/* @__PURE__ */ I("rect", {
92
92
  x: 3.5,
93
93
  y: 6.5,
94
94
  width: 17,
@@ -96,38 +96,38 @@ var X = {
96
96
  rx: 2.5,
97
97
  stroke: "currentColor",
98
98
  vectorEffect: "non-scaling-stroke"
99
- }), /* @__PURE__ */ F("text", {
100
- ...X,
99
+ }), /* @__PURE__ */ I("text", {
100
+ ...Z,
101
101
  fill: "currentColor",
102
102
  children: "AD"
103
103
  })]
104
104
  }));
105
- Z.displayName = "AudioDescriptionLineIcon";
106
- var ie = O(({ animate: e, ...t }, n) => {
107
- let r = `ad-mask-${j().replace(/:/g, "")}`;
108
- return /* @__PURE__ */ I("svg", {
105
+ Q.displayName = "AudioDescriptionLineIcon";
106
+ var re = k(({ animate: e, ...t }, n) => {
107
+ let r = `ad-mask-${M().replace(/:/g, "")}`;
108
+ return /* @__PURE__ */ L("svg", {
109
109
  xmlns: "http://www.w3.org/2000/svg",
110
110
  viewBox: "0 0 24 24",
111
111
  fill: "none",
112
112
  ref: n,
113
113
  ...t,
114
114
  "aria-hidden": "true",
115
- children: [/* @__PURE__ */ I("mask", {
115
+ children: [/* @__PURE__ */ L("mask", {
116
116
  id: r,
117
117
  maskUnits: "userSpaceOnUse",
118
- children: [/* @__PURE__ */ F("rect", {
118
+ children: [/* @__PURE__ */ I("rect", {
119
119
  x: 3,
120
120
  y: 6,
121
121
  width: 18,
122
122
  height: 12,
123
123
  rx: 3,
124
124
  fill: "white"
125
- }), /* @__PURE__ */ F("text", {
126
- ...X,
125
+ }), /* @__PURE__ */ I("text", {
126
+ ...Z,
127
127
  fill: "black",
128
128
  children: "AD"
129
129
  })]
130
- }), /* @__PURE__ */ F("rect", {
130
+ }), /* @__PURE__ */ I("rect", {
131
131
  x: 3,
132
132
  y: 6,
133
133
  width: 18,
@@ -138,17 +138,17 @@ var ie = O(({ animate: e, ...t }, n) => {
138
138
  })]
139
139
  });
140
140
  });
141
- ie.displayName = "AudioDescriptionFilledIcon";
141
+ re.displayName = "AudioDescriptionFilledIcon";
142
142
  //#endregion
143
143
  //#region src/blocks/F0VideoPlayer/components/CaptionsToggleIcons.tsx
144
- var Q = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
144
+ var $ = k(({ animate: e, ...t }, n) => /* @__PURE__ */ L("svg", {
145
145
  xmlns: "http://www.w3.org/2000/svg",
146
146
  fill: "none",
147
147
  viewBox: "0 0 24 24",
148
148
  ref: n,
149
149
  ...t,
150
150
  children: [
151
- /* @__PURE__ */ F("rect", {
151
+ /* @__PURE__ */ I("rect", {
152
152
  x: 3.5,
153
153
  y: 6.5,
154
154
  width: 17,
@@ -157,13 +157,13 @@ var Q = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
157
157
  stroke: "currentColor",
158
158
  vectorEffect: "non-scaling-stroke"
159
159
  }),
160
- /* @__PURE__ */ F("path", {
160
+ /* @__PURE__ */ I("path", {
161
161
  stroke: "currentColor",
162
162
  strokeLinecap: "round",
163
163
  d: "M7 10.75h8",
164
164
  vectorEffect: "non-scaling-stroke"
165
165
  }),
166
- /* @__PURE__ */ F("path", {
166
+ /* @__PURE__ */ I("path", {
167
167
  stroke: "currentColor",
168
168
  strokeLinecap: "round",
169
169
  d: "M7 13.75h4.5",
@@ -171,14 +171,14 @@ var Q = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
171
171
  })
172
172
  ]
173
173
  }));
174
- Q.displayName = "CaptionsLineIcon";
175
- var ae = O(({ animate: e, ...t }, n) => /* @__PURE__ */ F("svg", {
174
+ $.displayName = "CaptionsLineIcon";
175
+ var ie = k(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
176
176
  xmlns: "http://www.w3.org/2000/svg",
177
177
  fill: "none",
178
178
  viewBox: "0 0 24 24",
179
179
  ref: n,
180
180
  ...t,
181
- children: /* @__PURE__ */ F("path", {
181
+ children: /* @__PURE__ */ I("path", {
182
182
  fill: "currentColor",
183
183
  fillRule: "evenodd",
184
184
  clipRule: "evenodd",
@@ -186,28 +186,28 @@ var ae = O(({ animate: e, ...t }, n) => /* @__PURE__ */ F("svg", {
186
186
  vectorEffect: "non-scaling-stroke"
187
187
  })
188
188
  }));
189
- ae.displayName = "CaptionsFilledIcon";
189
+ ie.displayName = "CaptionsFilledIcon";
190
190
  //#endregion
191
191
  //#region src/blocks/F0VideoPlayer/components/PlaybackRateMenu.tsx
192
- function oe({ value: e, onChange: t, containerRef: n }) {
193
- let { t: r } = h(), [i, a] = P(!1);
194
- return /* @__PURE__ */ I(_, {
192
+ function ae({ value: e, onChange: t, containerRef: n }) {
193
+ let { t: r } = m(), [i, a] = F(!1);
194
+ return /* @__PURE__ */ L(g, {
195
195
  open: i,
196
196
  onOpenChange: a,
197
- children: [/* @__PURE__ */ F(c, {
197
+ children: [/* @__PURE__ */ I(s, {
198
198
  asChild: !0,
199
- children: /* @__PURE__ */ F(d, {
199
+ children: /* @__PURE__ */ I(u, {
200
200
  variant: "ghost",
201
201
  size: "sm",
202
- label: J(e),
203
- "aria-label": r("videoPlayer.playbackSpeed", { rate: J(e) })
202
+ label: Y(e),
203
+ "aria-label": r("videoPlayer.playbackSpeed", { rate: Y(e) })
204
204
  })
205
- }), /* @__PURE__ */ F(f, {
205
+ }), /* @__PURE__ */ I(d, {
206
206
  container: n.current,
207
207
  side: "top",
208
208
  align: "end",
209
209
  sideOffset: 8,
210
- className: y("flex w-auto min-w-[7rem] flex-col gap-0.5 rounded-md border", "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"),
210
+ className: v("flex w-auto min-w-[7rem] flex-col gap-0.5 rounded-md border", "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"),
211
211
  role: "menu",
212
212
  "aria-label": r("videoPlayer.playbackSpeedLabel"),
213
213
  onKeyDown: (e) => {
@@ -231,20 +231,20 @@ function oe({ value: e, onChange: t, containerRef: n }) {
231
231
  }
232
232
  e.preventDefault(), t[r]?.focus();
233
233
  },
234
- children: H.map((n) => {
234
+ children: U.map((n) => {
235
235
  let r = n === e;
236
- return /* @__PURE__ */ I("button", {
236
+ return /* @__PURE__ */ L("button", {
237
237
  type: "button",
238
238
  role: "menuitemradio",
239
239
  "aria-checked": r,
240
- className: y("relative flex items-center rounded-xs py-1.5 pl-8 pr-3", "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums", "text-f1-foreground transition-colors hover:bg-f1-background-secondary", "focus-visible:bg-f1-background-secondary focus-visible:outline-none", "[&_svg]:h-3.5 [&_svg]:w-3.5"),
240
+ className: v("relative flex items-center rounded-xs py-1.5 pl-8 pr-3", "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums", "text-f1-foreground transition-colors hover:bg-f1-background-secondary", "focus-visible:bg-f1-background-secondary focus-visible:outline-none", "[&_svg]:h-3.5 [&_svg]:w-3.5"),
241
241
  onClick: () => {
242
242
  t(n), a(!1);
243
243
  },
244
- children: [r ? /* @__PURE__ */ F("span", {
244
+ children: [r ? /* @__PURE__ */ I("span", {
245
245
  className: "absolute left-2.5 inline-flex items-center",
246
- children: /* @__PURE__ */ F(D, {})
247
- }) : null, J(n)]
246
+ children: /* @__PURE__ */ I(D, {})
247
+ }) : null, Y(n)]
248
248
  }, n);
249
249
  })
250
250
  })]
@@ -252,24 +252,24 @@ function oe({ value: e, onChange: t, containerRef: n }) {
252
252
  }
253
253
  //#endregion
254
254
  //#region src/blocks/F0VideoPlayer/components/Seekbar.tsx
255
- function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r = !1, onSeek: i }) {
256
- let { t: a } = h(), o = N(null), [s, c] = P(!1), [l, u] = P(null), d = t > 0 ? Math.min(1, e / t) : 0, f = n !== void 0 && t > 0 ? Math.min(1, n / t) : 0, p = n !== void 0 && t > 0 && n > 0 && n < t - .25 && e < n - .25, m = (e) => {
255
+ function oe({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r = !1, onSeek: i }) {
256
+ let { t: a } = m(), o = P(null), [s, c] = F(!1), [l, u] = F(null), d = t > 0 ? Math.min(1, e / t) : 0, f = n !== void 0 && t > 0 ? Math.min(1, n / t) : 0, p = n !== void 0 && t > 0 && n > 0 && n < t - .25 && e < n - .25, h = (e) => {
257
257
  let t = o.current;
258
258
  if (!t) return 0;
259
259
  let n = t.getBoundingClientRect();
260
260
  return Math.max(0, Math.min(1, (e - n.left) / n.width));
261
261
  }, g = (e) => {
262
- t && i(m(e) * t);
262
+ t && i(h(e) * t);
263
263
  }, _ = (e) => {
264
264
  t && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), c(!0), g(e.clientX));
265
- }, v = (e) => {
266
- t && (u(m(e.clientX)), s && g(e.clientX));
265
+ }, b = (e) => {
266
+ t && (u(h(e.clientX)), s && g(e.clientX));
267
267
  }, x = (e) => {
268
268
  s && (c(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
269
269
  }, S = l !== null && r && n !== void 0 && l > f;
270
- return /* @__PURE__ */ I("div", {
270
+ return /* @__PURE__ */ L("div", {
271
271
  ref: o,
272
- className: y("relative flex h-4 flex-1 items-center rounded-sm", "cursor-pointer touch-none", b()),
272
+ className: v("relative flex h-4 flex-1 items-center rounded-sm", "cursor-pointer touch-none", y()),
273
273
  role: "slider",
274
274
  tabIndex: 0,
275
275
  "aria-label": a("videoPlayer.seekLabel"),
@@ -277,11 +277,11 @@ function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r
277
277
  "aria-valuemax": t || 0,
278
278
  "aria-valuenow": e,
279
279
  "aria-valuetext": a("videoPlayer.timeProgress", {
280
- current: q(e),
281
- total: q(t)
280
+ current: J(e),
281
+ total: J(t)
282
282
  }),
283
283
  onPointerDown: _,
284
- onPointerMove: v,
284
+ onPointerMove: b,
285
285
  onPointerUp: x,
286
286
  onPointerCancel: x,
287
287
  onLostPointerCapture: () => c(!1),
@@ -307,55 +307,55 @@ function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r
307
307
  n.preventDefault(), n.stopPropagation(), i(r);
308
308
  },
309
309
  children: [
310
- /* @__PURE__ */ F("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
311
- /* @__PURE__ */ F("div", {
310
+ /* @__PURE__ */ I("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
311
+ /* @__PURE__ */ I("div", {
312
312
  className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
313
313
  style: { width: `${d * 100}%` }
314
314
  }),
315
- p ? /* @__PURE__ */ F("div", {
315
+ p ? /* @__PURE__ */ I("div", {
316
316
  className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
317
317
  style: { left: `${f * 100}%` },
318
318
  "aria-hidden": "true"
319
319
  }) : null,
320
- /* @__PURE__ */ F("div", {
320
+ /* @__PURE__ */ I("div", {
321
321
  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)]",
322
322
  style: { left: `${d * 100}%` }
323
323
  }),
324
- S ? /* @__PURE__ */ F("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
324
+ S ? /* @__PURE__ */ I("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
325
325
  ]
326
326
  });
327
327
  }
328
328
  //#endregion
329
329
  //#region src/blocks/F0VideoPlayer/components/SettingsMenu.tsx
330
- var $ = "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";
331
- function de({ icon: e, label: t, container: o, options: c, value: u, onLanguageChange: d, on: f, onOff: p, offLabel: m }) {
332
- let h = p !== void 0, g = c.find((e) => e.locale === u), _ = h && !f ? m : g ? B(g) : m;
333
- return /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ I(s, {
330
+ 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";
331
+ function de({ icon: e, label: a, container: s, options: l, value: u, onLanguageChange: d, on: f, onOff: p, offLabel: m }) {
332
+ let h = p !== void 0, g = l.find((e) => e.locale === u), v = h && !f ? m : g ? V(g) : m;
333
+ return /* @__PURE__ */ L(_, { children: [/* @__PURE__ */ L(o, {
334
334
  className: le,
335
335
  children: [
336
- /* @__PURE__ */ F(l, { icon: e }),
337
- /* @__PURE__ */ F("span", {
336
+ /* @__PURE__ */ I(c, { icon: e }),
337
+ /* @__PURE__ */ I("span", {
338
338
  className: "flex-1",
339
- children: t
339
+ children: a
340
340
  }),
341
- /* @__PURE__ */ F("span", {
341
+ /* @__PURE__ */ I("span", {
342
342
  className: "text-f1-foreground-secondary",
343
- children: _
343
+ children: v
344
344
  })
345
345
  ]
346
- }), /* @__PURE__ */ F(r, {
347
- container: o ?? void 0,
348
- children: /* @__PURE__ */ F(n, {
346
+ }), /* @__PURE__ */ I(n, {
347
+ container: s ?? void 0,
348
+ children: /* @__PURE__ */ I(t, {
349
349
  className: ue,
350
- children: /* @__PURE__ */ I(i, {
351
- value: h ? f ? u : $ : u,
352
- onValueChange: (e) => h && e === $ ? p() : d(e),
353
- children: [c.map((e) => /* @__PURE__ */ F(a, {
350
+ children: /* @__PURE__ */ L(r, {
351
+ value: h ? f ? u : se : u,
352
+ onValueChange: (e) => h && e === se ? p() : d(e),
353
+ children: [l.map((e) => /* @__PURE__ */ I(i, {
354
354
  value: e.locale,
355
355
  className: ce,
356
- children: B(e)
357
- }, e.locale)), h ? /* @__PURE__ */ F(a, {
358
- value: $,
356
+ children: V(e)
357
+ }, e.locale)), h ? /* @__PURE__ */ I(i, {
358
+ value: se,
359
359
  className: ce,
360
360
  children: m
361
361
  }) : null]
@@ -363,24 +363,24 @@ function de({ icon: e, label: t, container: o, options: c, value: u, onLanguageC
363
363
  })
364
364
  })] });
365
365
  }
366
- function fe({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: a, captionLanguage: s, captionsOn: c, onCaptionLanguageChange: l, onCaptionsOff: u, audioDescriptionLanguages: f, audioDescriptionLanguage: p, audioDescriptionOn: g, onAudioDescriptionLanguageChange: _, onAudioDescriptionOff: v }) {
367
- let { t: y } = h(), b = e.current, x = y("videoPlayer.off");
368
- return /* @__PURE__ */ I(t, { children: [/* @__PURE__ */ F(o, {
366
+ function fe({ containerRef: t, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: o, captionLanguage: s, captionsOn: c, onCaptionLanguageChange: l, onCaptionsOff: d, audioDescriptionLanguages: f, audioDescriptionLanguage: h, audioDescriptionOn: g, onAudioDescriptionLanguageChange: _, onAudioDescriptionOff: v }) {
367
+ let { t: y } = m(), b = t.current, x = y("videoPlayer.off");
368
+ return /* @__PURE__ */ L(e, { children: [/* @__PURE__ */ I(a, {
369
369
  asChild: !0,
370
- children: /* @__PURE__ */ F(d, {
370
+ children: /* @__PURE__ */ I(u, {
371
371
  variant: "ghost",
372
372
  size: "sm",
373
373
  hideLabel: !0,
374
- icon: w,
374
+ icon: ne,
375
375
  label: y("videoPlayer.settings")
376
376
  })
377
- }), /* @__PURE__ */ I(m, {
377
+ }), /* @__PURE__ */ L(p, {
378
378
  container: b,
379
379
  side: "top",
380
380
  align: "end",
381
381
  className: ue,
382
382
  children: [
383
- n.length > 1 ? /* @__PURE__ */ F(de, {
383
+ n.length > 1 ? /* @__PURE__ */ I(de, {
384
384
  icon: E,
385
385
  label: y("videoPlayer.audio"),
386
386
  container: b,
@@ -389,23 +389,23 @@ function fe({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLangu
389
389
  onLanguageChange: i,
390
390
  offLabel: x
391
391
  }) : null,
392
- a.length > 1 ? /* @__PURE__ */ F(de, {
393
- icon: Q,
392
+ o.length > 1 ? /* @__PURE__ */ I(de, {
393
+ icon: $,
394
394
  label: y("videoPlayer.subtitles"),
395
395
  container: b,
396
- options: a,
396
+ options: o,
397
397
  value: s,
398
398
  on: c,
399
399
  onLanguageChange: l,
400
- onOff: u,
400
+ onOff: d,
401
401
  offLabel: x
402
402
  }) : null,
403
- f.length > 1 ? /* @__PURE__ */ F(de, {
404
- icon: Z,
403
+ f.length > 1 ? /* @__PURE__ */ I(de, {
404
+ icon: Q,
405
405
  label: y("videoPlayer.audioDescription"),
406
406
  container: b,
407
407
  options: f,
408
- value: p,
408
+ value: h,
409
409
  on: g,
410
410
  onLanguageChange: _,
411
411
  onOff: v,
@@ -420,34 +420,34 @@ function pe(e) {
420
420
  //#endregion
421
421
  //#region src/blocks/F0VideoPlayer/components/VolumeControl.tsx
422
422
  function me(e, t) {
423
- return t || e === 0 ? C : e <= .5 ? re : S;
423
+ return t || e === 0 ? b : e <= .5 ? x : C;
424
424
  }
425
425
  function he({ volume: e, isMuted: t, onToggleMute: n, onVolumeChange: r, silent: i = !1 }) {
426
- let { t: a } = h(), o = t || e === 0;
427
- return i ? /* @__PURE__ */ F(d, {
426
+ let { t: a } = m(), o = t || e === 0;
427
+ return i ? /* @__PURE__ */ I(u, {
428
428
  variant: "ghost",
429
429
  size: "sm",
430
430
  hideLabel: !0,
431
431
  disabled: !0,
432
- icon: C,
432
+ icon: b,
433
433
  label: a("videoPlayer.noAudio")
434
- }) : /* @__PURE__ */ I("div", {
434
+ }) : /* @__PURE__ */ L("div", {
435
435
  className: "flex items-center gap-1",
436
- children: [/* @__PURE__ */ F(d, {
436
+ children: [/* @__PURE__ */ I(u, {
437
437
  variant: "ghost",
438
438
  size: "sm",
439
439
  hideLabel: !0,
440
440
  icon: me(e, o),
441
441
  label: a(o ? "videoPlayer.unmute" : "videoPlayer.mute"),
442
442
  onClick: n
443
- }), /* @__PURE__ */ F(ge, {
443
+ }), /* @__PURE__ */ I(ge, {
444
444
  value: o ? 0 : e,
445
445
  onChange: r
446
446
  })]
447
447
  });
448
448
  }
449
449
  function ge({ value: e, onChange: t }) {
450
- let { t: n } = h(), r = N(null), [i, a] = P(!1), o = Math.max(0, Math.min(1, e)), s = (e) => {
450
+ let { t: n } = m(), r = P(null), [i, a] = F(!1), o = Math.max(0, Math.min(1, e)), s = (e) => {
451
451
  let t = r.current;
452
452
  if (!t) return 0;
453
453
  let n = t.getBoundingClientRect(), i = n.width - 12;
@@ -459,9 +459,9 @@ function ge({ value: e, onChange: t }) {
459
459
  }, u = (e) => {
460
460
  i && (a(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
461
461
  };
462
- return /* @__PURE__ */ I("div", {
462
+ return /* @__PURE__ */ L("div", {
463
463
  ref: r,
464
- className: y("relative flex h-4 w-[60px] items-center rounded-sm", "cursor-pointer touch-none", b()),
464
+ className: v("relative flex h-4 w-[60px] items-center rounded-sm", "cursor-pointer touch-none", y()),
465
465
  role: "slider",
466
466
  tabIndex: 0,
467
467
  "aria-label": n("videoPlayer.volume"),
@@ -479,11 +479,11 @@ function ge({ value: e, onChange: t }) {
479
479
  switch (e.key) {
480
480
  case "ArrowRight":
481
481
  case "ArrowUp":
482
- n = Math.min(1, o + U);
482
+ n = Math.min(1, o + W);
483
483
  break;
484
484
  case "ArrowLeft":
485
485
  case "ArrowDown":
486
- n = Math.max(0, o - U);
486
+ n = Math.max(0, o - W);
487
487
  break;
488
488
  case "Home":
489
489
  n = 0;
@@ -496,12 +496,12 @@ function ge({ value: e, onChange: t }) {
496
496
  e.preventDefault(), e.stopPropagation(), t(n);
497
497
  },
498
498
  children: [
499
- /* @__PURE__ */ F("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
500
- /* @__PURE__ */ F("div", {
499
+ /* @__PURE__ */ I("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
500
+ /* @__PURE__ */ I("div", {
501
501
  className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
502
502
  style: { width: `calc(12px + (100% - 12px) * ${o})` }
503
503
  }),
504
- /* @__PURE__ */ F("div", {
504
+ /* @__PURE__ */ I("div", {
505
505
  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)]",
506
506
  style: { left: `calc(6px + (100% - 12px) * ${o})` }
507
507
  })
@@ -510,99 +510,99 @@ function ge({ value: e, onChange: t }) {
510
510
  }
511
511
  //#endregion
512
512
  //#region src/blocks/F0VideoPlayer/components/Controls.tsx
513
- function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i, playbackRate: a, isFullscreen: o, markerTime: s, blockSeekPastMarker: c, containerRef: l, captionsAvailable: u, captionsOn: f, audioDescriptionAvailable: p, audioDescriptionOn: m, silent: g, persist: _, audioLanguages: v, audioLanguage: b, onAudioLanguageChange: S, captionLanguages: C, captionLanguage: w, onCaptionLanguageChange: E, onCaptionsOff: re, audioDescriptionLanguages: D, audioDescriptionLanguage: O, onAudioDescriptionLanguageChange: k, onAudioDescriptionOff: A, onTogglePlay: j, onToggleMute: M, onVolumeChange: N, onPlaybackRateChange: P, onToggleFullscreen: L, onToggleCaptions: R, onToggleAudioDescription: z, onSeek: B, download: V }) {
514
- let { t: H } = h(), U = u && C.length <= 1, W = p && D.length <= 1, G = pe({
515
- audioLanguages: v.length,
513
+ function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i, playbackRate: a, isFullscreen: o, markerTime: s, blockSeekPastMarker: c, containerRef: l, captionsAvailable: d, captionsOn: f, audioDescriptionAvailable: p, audioDescriptionOn: h, silent: g, persist: _, audioLanguages: y, audioLanguage: b, onAudioLanguageChange: x, captionLanguages: C, captionLanguage: E, onCaptionLanguageChange: ne, onCaptionsOff: D, audioDescriptionLanguages: O, audioDescriptionLanguage: k, onAudioDescriptionLanguageChange: A, onAudioDescriptionOff: j, onTogglePlay: M, onToggleMute: N, onVolumeChange: P, onPlaybackRateChange: F, onToggleFullscreen: R, onToggleCaptions: z, onToggleAudioDescription: B, onSeek: V, download: H }) {
514
+ let { t: U } = m(), W = d && C.length <= 1, G = p && O.length <= 1, K = pe({
515
+ audioLanguages: y.length,
516
516
  captionLanguages: C.length,
517
- audioDescriptionLanguages: D.length
517
+ audioDescriptionLanguages: O.length
518
518
  });
519
- return /* @__PURE__ */ I("div", {
520
- className: y("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 || _ ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
519
+ return /* @__PURE__ */ L("div", {
520
+ className: v("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 || _ ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
521
521
  children: [
522
- /* @__PURE__ */ F(d, {
522
+ /* @__PURE__ */ I(u, {
523
523
  variant: "ghost",
524
524
  size: "sm",
525
525
  hideLabel: !0,
526
- icon: e ? T : ne,
527
- label: H(e ? "videoPlayer.pause" : "videoPlayer.play"),
528
- onClick: j
526
+ icon: e ? T : te,
527
+ label: U(e ? "videoPlayer.pause" : "videoPlayer.play"),
528
+ onClick: M
529
529
  }),
530
- /* @__PURE__ */ F(se, {
530
+ /* @__PURE__ */ I(oe, {
531
531
  currentTime: t,
532
532
  duration: n,
533
533
  markerTime: s,
534
534
  blockSeekPastMarker: c,
535
- onSeek: B
535
+ onSeek: V
536
536
  }),
537
- /* @__PURE__ */ I("span", {
537
+ /* @__PURE__ */ L("span", {
538
538
  className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground",
539
539
  children: [
540
- q(t),
540
+ J(t),
541
541
  " / ",
542
- q(n)
542
+ J(n)
543
543
  ]
544
544
  }),
545
- /* @__PURE__ */ F(he, {
545
+ /* @__PURE__ */ I(he, {
546
546
  volume: r,
547
547
  isMuted: i,
548
- onToggleMute: M,
549
- onVolumeChange: N,
548
+ onToggleMute: N,
549
+ onVolumeChange: P,
550
550
  silent: g
551
551
  }),
552
- /* @__PURE__ */ F(oe, {
552
+ /* @__PURE__ */ I(ae, {
553
553
  value: a,
554
- onChange: P,
554
+ onChange: F,
555
555
  containerRef: l
556
556
  }),
557
- U ? /* @__PURE__ */ F(d, {
557
+ W ? /* @__PURE__ */ I(u, {
558
558
  variant: "ghost",
559
559
  size: "sm",
560
560
  hideLabel: !0,
561
- icon: f ? ae : Q,
562
- label: H("videoPlayer.captions"),
561
+ icon: f ? ie : $,
562
+ label: U("videoPlayer.captions"),
563
563
  "aria-pressed": f,
564
- onClick: R
564
+ onClick: z
565
565
  }) : null,
566
- W ? /* @__PURE__ */ F(d, {
566
+ G ? /* @__PURE__ */ I(u, {
567
567
  variant: "ghost",
568
568
  size: "sm",
569
569
  hideLabel: !0,
570
- icon: m ? ie : Z,
571
- label: H("videoPlayer.audioDescription"),
572
- "aria-pressed": m,
573
- onClick: z
570
+ icon: h ? re : Q,
571
+ label: U("videoPlayer.audioDescription"),
572
+ "aria-pressed": h,
573
+ onClick: B
574
574
  }) : null,
575
- G ? /* @__PURE__ */ F(fe, {
575
+ K ? /* @__PURE__ */ I(fe, {
576
576
  containerRef: l,
577
- audioLanguages: v,
577
+ audioLanguages: y,
578
578
  audioLanguage: b,
579
- onAudioLanguageChange: S,
579
+ onAudioLanguageChange: x,
580
580
  captionLanguages: C,
581
- captionLanguage: w,
581
+ captionLanguage: E,
582
582
  captionsOn: f,
583
- onCaptionLanguageChange: E,
584
- onCaptionsOff: re,
585
- audioDescriptionLanguages: D,
586
- audioDescriptionLanguage: O,
587
- audioDescriptionOn: m,
588
- onAudioDescriptionLanguageChange: k,
589
- onAudioDescriptionOff: A
583
+ onCaptionLanguageChange: ne,
584
+ onCaptionsOff: D,
585
+ audioDescriptionLanguages: O,
586
+ audioDescriptionLanguage: k,
587
+ audioDescriptionOn: h,
588
+ onAudioDescriptionLanguageChange: A,
589
+ onAudioDescriptionOff: j
590
590
  }) : null,
591
- V ? /* @__PURE__ */ F(d, {
591
+ H ? /* @__PURE__ */ I(u, {
592
592
  variant: "ghost",
593
593
  size: "sm",
594
594
  hideLabel: !0,
595
- icon: x,
596
- label: V.label,
597
- onClick: V.onClick
595
+ icon: w,
596
+ label: H.label,
597
+ onClick: H.onClick
598
598
  }) : null,
599
- /* @__PURE__ */ F(d, {
599
+ /* @__PURE__ */ I(u, {
600
600
  variant: "ghost",
601
601
  size: "sm",
602
602
  hideLabel: !0,
603
- icon: o ? ee : te,
604
- label: H(o ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
605
- onClick: L
603
+ icon: o ? S : ee,
604
+ label: U(o ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
605
+ onClick: R
606
606
  })
607
607
  ]
608
608
  });
@@ -611,8 +611,8 @@ function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i,
611
611
  //#region src/blocks/F0VideoPlayer/hooks/useVttSource.ts
612
612
  var ve = (e) => e.trimStart().startsWith("WEBVTT");
613
613
  function ye(e) {
614
- let t = e !== void 0 && ve(e), [n, r] = P();
615
- return A(() => {
614
+ let t = e !== void 0 && ve(e), [n, r] = F();
615
+ return j(() => {
616
616
  if (e === void 0 || !ve(e)) {
617
617
  r(void 0);
618
618
  return;
@@ -628,8 +628,8 @@ function ye(e) {
628
628
  //#region src/blocks/F0VideoPlayer/hooks/useAudioDescription.ts
629
629
  var be = "descriptions";
630
630
  function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
631
- let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ye(r), [s, c] = P(!1), l = i || r !== void 0 || s, [u, d] = P(), f = N(!1);
632
- return A(() => {
631
+ let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ye(r), [s, c] = F(!1), l = i || r !== void 0 || s, [u, d] = F(), f = P(!1);
632
+ return j(() => {
633
633
  if (!e) return;
634
634
  let n = e.textTracks, a = typeof window < "u" && "speechSynthesis" in window, o = t && !i && a, s = () => {
635
635
  f.current && (f.current = !1, e.play().catch(() => {}));
@@ -661,7 +661,7 @@ function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
661
661
  i,
662
662
  r,
663
663
  a
664
- ]), M(() => ({
664
+ ]), N(() => ({
665
665
  trackSrc: a,
666
666
  needsCrossOrigin: o,
667
667
  available: l,
@@ -676,7 +676,7 @@ function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
676
676
  //#endregion
677
677
  //#region src/blocks/F0VideoPlayer/hooks/useKeyboardShortcuts.ts
678
678
  function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscreen: i, setVolume: a }) {
679
- return k((o) => {
679
+ return A((o) => {
680
680
  let s = o.target;
681
681
  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;
682
682
  let c = e.current;
@@ -694,10 +694,10 @@ function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
694
694
  return;
695
695
  }
696
696
  case "ArrowUp":
697
- o.preventDefault(), a(Math.min(1, c.volume + U));
697
+ o.preventDefault(), a(Math.min(1, c.volume + W));
698
698
  return;
699
699
  case "ArrowDown":
700
- o.preventDefault(), a(Math.max(0, c.volume - U));
700
+ o.preventDefault(), a(Math.max(0, c.volume - W));
701
701
  return;
702
702
  case "m":
703
703
  o.preventDefault(), r();
@@ -719,12 +719,12 @@ function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
719
719
  //#endregion
720
720
  //#region src/blocks/F0VideoPlayer/hooks/useRestrictForwardSeek.ts
721
721
  function Ce({ video: e, enabled: t, resetKey: n }) {
722
- let r = N(0), i = N(0), a = N(t);
722
+ let r = P(0), i = P(0), a = P(t);
723
723
  a.current = t;
724
- let [o, s] = P(0);
725
- return A(() => {
724
+ let [o, s] = F(0);
725
+ return j(() => {
726
726
  r.current = 0, i.current = 0, s(0);
727
- }, [n]), A(() => {
727
+ }, [n]), j(() => {
728
728
  if (!e) return;
729
729
  let t = () => {
730
730
  a.current && e.currentTime > r.current + .25 && (e.currentTime = r.current);
@@ -746,17 +746,17 @@ function Ce({ video: e, enabled: t, resetKey: n }) {
746
746
  };
747
747
  }, [e]), {
748
748
  maxWatchedTime: o,
749
- clampSeek: k((e) => a.current ? Math.min(e, r.current) : e, [])
749
+ clampSeek: A((e) => a.current ? Math.min(e, r.current) : e, [])
750
750
  };
751
751
  }
752
752
  //#endregion
753
753
  //#region src/blocks/F0VideoPlayer/hooks/useVideoCaptions.ts
754
754
  var we = /* @__PURE__ */ new Set(["captions", "subtitles"]), Te = 2, Ee = 3;
755
755
  function De(e, t) {
756
- let { trackSrc: n, needsCrossOrigin: r } = ye(t), [i, a] = P(!1), [o, s] = P(!1), [c, l] = P(!1), u = o || t !== void 0 && !c;
757
- return A(() => {
756
+ let { trackSrc: n, needsCrossOrigin: r } = ye(t), [i, a] = F(!1), [o, s] = F(!1), [c, l] = F(!1), u = o || t !== void 0 && !c;
757
+ return j(() => {
758
758
  l(!1), s(!1);
759
- }, [n]), A(() => {
759
+ }, [n]), j(() => {
760
760
  if (!e) return;
761
761
  let t = e.textTracks, n = e.querySelector("track[kind=\"captions\"]"), r = () => {
762
762
  let e = !1;
@@ -791,7 +791,7 @@ function De(e, t) {
791
791
  t,
792
792
  i,
793
793
  n
794
- ]), M(() => ({
794
+ ]), N(() => ({
795
795
  trackSrc: n,
796
796
  needsCrossOrigin: r,
797
797
  available: u,
@@ -807,15 +807,15 @@ function De(e, t) {
807
807
  //#endregion
808
808
  //#region src/blocks/F0VideoPlayer/hooks/useVideoCompletion.ts
809
809
  function Oe(e) {
810
- return e - Math.min(10, e * K);
810
+ return e - Math.min(10, e * q);
811
811
  }
812
812
  function ke({ video: e, onComplete: t, resetKey: n }) {
813
- let r = N(t);
813
+ let r = P(t);
814
814
  r.current = t;
815
- let i = N(!1), a = !!t;
816
- A(() => {
815
+ let i = P(!1), a = !!t;
816
+ j(() => {
817
817
  i.current = !1;
818
- }, [n]), A(() => {
818
+ }, [n]), j(() => {
819
819
  if (!e || !a) return;
820
820
  let t = () => {
821
821
  !i.current && e.duration && e.currentTime >= Oe(e.duration) && (i.current = !0, r.current?.(e));
@@ -828,17 +828,17 @@ function ke({ video: e, onComplete: t, resetKey: n }) {
828
828
  //#endregion
829
829
  //#region src/blocks/F0VideoPlayer/hooks/useVideoMilestones.ts
830
830
  function Ae({ video: e, onMilestone: t, resetKey: n }) {
831
- let r = N(t);
831
+ let r = P(t);
832
832
  r.current = t;
833
- let i = N(/* @__PURE__ */ new Set()), a = !!t;
834
- A(() => {
833
+ let i = P(/* @__PURE__ */ new Set()), a = !!t;
834
+ j(() => {
835
835
  i.current.clear();
836
- }, [n]), A(() => {
836
+ }, [n]), j(() => {
837
837
  if (!e || !a) return;
838
838
  let t = () => {
839
839
  if (!e.duration) return;
840
840
  let t = Math.round(e.currentTime / e.duration * 100);
841
- for (let n of W) i.current.has(n) || t >= n && (i.current.add(n), r.current?.(n, e));
841
+ for (let n of G) i.current.has(n) || t >= n && (i.current.add(n), r.current?.(n, e));
842
842
  };
843
843
  return e.addEventListener("timeupdate", t), () => {
844
844
  e.removeEventListener("timeupdate", t);
@@ -848,18 +848,18 @@ function Ae({ video: e, onMilestone: t, resetKey: n }) {
848
848
  //#endregion
849
849
  //#region src/blocks/F0VideoPlayer/hooks/useVideoState.ts
850
850
  function je(e) {
851
- let t = N(null), [n, r] = P(null), i = N(0), a = k((e) => {
851
+ let t = P(null), [n, r] = F(null), i = P(0), a = A((e) => {
852
852
  t.current = e, r(e);
853
- }, []), [o, s] = P(!1), [c, l] = P(!1), [u, d] = P(0), [f, p] = P(0), [m, h] = P(1), [g, _] = P(!1), [v, y] = P(1);
854
- return A(() => {
853
+ }, []), [o, s] = F(!1), [c, l] = F(!1), [u, d] = F(0), [f, p] = F(0), [m, h] = F(1), [g, _] = F(!1), [v, y] = F(1);
854
+ return j(() => {
855
855
  i.current = 0, t.current && (t.current.playbackRate = 1), s(!1), l(!1), d(0), p(0), y(1);
856
- }, [e]), A(() => {
856
+ }, [e]), j(() => {
857
857
  let e = n;
858
858
  if (!e) return;
859
859
  let t = () => l(!0), r = () => l(!1), a = () => l(!1), o = () => {
860
860
  h(e.volume), _(e.muted);
861
861
  }, s = () => p(e.duration || 0), c = () => {
862
- Y(e.playbackRate) && y(e.playbackRate);
862
+ X(e.playbackRate) && y(e.playbackRate);
863
863
  }, u = () => {
864
864
  let t = performance.now();
865
865
  t - i.current >= 250 && (i.current = t, d(e.currentTime));
@@ -879,25 +879,25 @@ function je(e) {
879
879
  isMuted: g,
880
880
  playbackRate: v,
881
881
  setVideoLoaded: s,
882
- togglePlay: k(() => {
882
+ togglePlay: A(() => {
883
883
  let e = t.current;
884
884
  e && (e.paused || e.ended ? e.play().catch(() => {}) : e.pause());
885
885
  }, []),
886
- toggleMute: k(() => {
886
+ toggleMute: A(() => {
887
887
  let e = t.current;
888
888
  e && (e.muted = !e.muted);
889
889
  }, []),
890
- setVolume: k((e) => {
890
+ setVolume: A((e) => {
891
891
  let n = t.current;
892
892
  if (!n) return;
893
893
  let r = Math.max(0, Math.min(1, e));
894
894
  n.volume = r, n.muted = r === 0;
895
895
  }, []),
896
- setPlaybackRate: k((e) => {
896
+ setPlaybackRate: A((e) => {
897
897
  let n = t.current;
898
898
  n && (n.playbackRate = e);
899
899
  }, []),
900
- seekTo: k((e) => {
900
+ seekTo: A((e) => {
901
901
  let n = t.current;
902
902
  if (!n) return;
903
903
  let r = Math.max(0, Math.min(e, n.duration || e));
@@ -908,17 +908,17 @@ function je(e) {
908
908
  //#endregion
909
909
  //#region src/blocks/F0VideoPlayer/hooks/useVideoTracking.ts
910
910
  function Me({ video: e, onTrackAction: t }) {
911
- let n = N(t);
911
+ let n = P(t);
912
912
  n.current = t;
913
913
  let r = !!t;
914
- A(() => {
914
+ j(() => {
915
915
  if (!e || !r) return;
916
916
  let t = null, i = () => {
917
917
  t &&= (clearInterval(t), null);
918
918
  }, a = () => {
919
919
  n.current?.(), i(), t = setInterval(() => {
920
920
  n.current?.();
921
- }, G);
921
+ }, K);
922
922
  }, o = () => {
923
923
  n.current?.(), i();
924
924
  }, s = () => i();
@@ -929,185 +929,185 @@ function Me({ video: e, onTrackAction: t }) {
929
929
  }
930
930
  //#endregion
931
931
  //#region src/blocks/F0VideoPlayer/internal.tsx
932
- function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls: a = !1, content: o, defaultLanguage: s, autoPlay: c = !1, autoFocus: l = !1, download: u, restrictForwardSeek: d = !1, onTrackAction: f, onMilestone: m, onComplete: g, ..._ }) {
933
- let { t: v } = h(), x = N(null), S = M(() => z(t), [t]), [C, ee] = P(() => V(S, s)), te = S.some((e) => e.locale === C) ? C : V(S, s), w = R(t, te) ?? "", T = M(() => z(o?.captions), [o?.captions]), [E, re] = P(() => V(T, s)), D = T.some((e) => e.locale === E) ? E : V(T, s), O = R(o?.captions, D), j = M(() => z(o?.descriptions, o?.describedSrc), [o?.descriptions, o?.describedSrc]), [L, B] = P(() => V(j, s)), H = j.some((e) => e.locale === L) ? L : V(j, s), U = R(o?.descriptions, H), W = R(o?.describedSrc, H), [G, K] = P(!1), q = G && W ? W : w, J = je(q), Y = De(J.videoElement, O), X = xe(J.videoElement, {
934
- enabled: G,
935
- describedSrc: W,
936
- descriptions: U
937
- }), Z = k(() => {
938
- let e = J.videoRef.current;
932
+ function Ne({ src: e, poster: t, ariaLabel: n, silent: r = !1, persistControls: i = !1, content: a, defaultLanguage: o, autoPlay: s = !1, autoFocus: c = !1, download: l, restrictForwardSeek: u = !1, onTrackAction: d, onMilestone: p, onComplete: h, ...g }) {
933
+ let { t: _ } = m(), b = P(null), x = N(() => B(e), [e]), [S, C] = F(() => H(x, o)), ee = x.some((e) => e.locale === S) ? S : H(x, o), w = z(e, ee) ?? "", T = N(() => B(a?.captions), [a?.captions]), [E, ne] = F(() => H(T, o)), D = T.some((e) => e.locale === E) ? E : H(T, o), k = z(a?.captions, D), M = N(() => B(a?.descriptions, a?.describedSrc), [a?.descriptions, a?.describedSrc]), [R, V] = F(() => H(M, o)), U = M.some((e) => e.locale === R) ? R : H(M, o), W = z(a?.descriptions, U), G = z(a?.describedSrc, U), [K, q] = F(!1), J = K && G ? G : w, Y = je(J), X = De(Y.videoElement, k), Z = xe(Y.videoElement, {
934
+ enabled: K,
935
+ describedSrc: G,
936
+ descriptions: W
937
+ }), Q = A(() => {
938
+ let e = Y.videoRef.current;
939
939
  if (!e) return;
940
940
  let t = e.currentTime, n = !e.paused, r = () => {
941
941
  e.currentTime = t, n && e.play().catch(() => {}), e.removeEventListener("loadedmetadata", r);
942
942
  };
943
943
  e.addEventListener("loadedmetadata", r);
944
- }, [J.videoRef]), ie = k((e) => {
945
- Z(), ee(e);
946
- }, [Z]), Q = k(() => {
947
- W && Z(), K((e) => !e);
948
- }, [W, Z]), ae = k((e) => {
949
- re(e), Y.showing || Y.toggle();
950
- }, [Y]), oe = k(() => {
951
- Y.showing && Y.toggle();
952
- }, [Y]), se = k((e) => {
953
- W && Z(), B(e), K(!0);
954
- }, [W, Z]), $ = k(() => {
955
- W && Z(), K(!1);
956
- }, [W, Z]);
944
+ }, [Y.videoRef]), re = A((e) => {
945
+ Q(), C(e);
946
+ }, [Q]), $ = A(() => {
947
+ G && Q(), q((e) => !e);
948
+ }, [G, Q]), ie = A((e) => {
949
+ ne(e), X.showing || X.toggle();
950
+ }, [X]), ae = A(() => {
951
+ X.showing && X.toggle();
952
+ }, [X]), oe = A((e) => {
953
+ G && Q(), V(e), q(!0);
954
+ }, [G, Q]), se = A(() => {
955
+ G && Q(), q(!1);
956
+ }, [G, Q]);
957
957
  Me({
958
- video: J.videoElement,
959
- onTrackAction: f
958
+ video: Y.videoElement,
959
+ onTrackAction: d
960
960
  }), Ae({
961
- video: J.videoElement,
962
- onMilestone: m,
961
+ video: Y.videoElement,
962
+ onMilestone: p,
963
963
  resetKey: w
964
964
  }), ke({
965
- video: J.videoElement,
966
- onComplete: g,
965
+ video: Y.videoElement,
966
+ onComplete: h,
967
967
  resetKey: w
968
968
  });
969
969
  let { maxWatchedTime: ce, clampSeek: le } = Ce({
970
- video: J.videoElement,
971
- enabled: d,
970
+ video: Y.videoElement,
971
+ enabled: u,
972
972
  resetKey: w
973
- }), ue = k((e) => J.seekTo(le(e)), [J, le]), { isFullscreen: de, toggleFullscreen: fe } = e({ targetRef: x }), pe = k(() => {}, []), me = !!(G && W);
974
- A(() => {
975
- let e = J.videoRef.current;
976
- i && e && (e.muted = !me);
973
+ }), ue = A((e) => Y.seekTo(le(e)), [Y, le]), { isFullscreen: de, toggleFullscreen: fe } = O({ targetRef: b }), pe = A(() => {}, []), me = !!(K && G);
974
+ j(() => {
975
+ let e = Y.videoRef.current;
976
+ r && e && (e.muted = !me);
977
977
  }, [
978
- i,
978
+ r,
979
979
  me,
980
- J.videoElement,
981
- J.videoRef
980
+ Y.videoElement,
981
+ Y.videoRef
982
982
  ]);
983
983
  let he = Se({
984
- videoRef: J.videoRef,
984
+ videoRef: Y.videoRef,
985
985
  seek: ue,
986
- togglePlay: J.togglePlay,
987
- toggleMute: i ? pe : J.toggleMute,
986
+ togglePlay: Y.togglePlay,
987
+ toggleMute: r ? pe : Y.toggleMute,
988
988
  toggleFullscreen: fe,
989
- setVolume: i ? pe : J.setVolume
989
+ setVolume: r ? pe : Y.setVolume
990
990
  });
991
- A(() => {
992
- l && x.current?.focus({ preventScroll: !0 });
993
- }, [l]);
991
+ j(() => {
992
+ c && b.current?.focus({ preventScroll: !0 });
993
+ }, [c]);
994
994
  let ge = (e) => e.preventDefault();
995
- return /* @__PURE__ */ I("div", {
996
- ref: x,
997
- className: y("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", b()),
995
+ return /* @__PURE__ */ L("div", {
996
+ ref: b,
997
+ className: v("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", y()),
998
998
  role: "region",
999
- "aria-label": r ?? v("videoPlayer.regionLabel"),
999
+ "aria-label": n ?? _("videoPlayer.regionLabel"),
1000
1000
  tabIndex: 0,
1001
1001
  onKeyDown: he,
1002
- "data-video-captions": i ? "no-audio" : Y.available ? "available" : "missing",
1003
- ..._,
1002
+ "data-video-captions": r ? "no-audio" : X.available ? "available" : "missing",
1003
+ ...g,
1004
1004
  children: [
1005
- /* @__PURE__ */ I("video", {
1006
- ref: J.setVideoNode,
1007
- autoPlay: c,
1005
+ /* @__PURE__ */ L("video", {
1006
+ ref: Y.setVideoNode,
1007
+ autoPlay: s,
1008
1008
  playsInline: !0,
1009
1009
  disablePictureInPicture: !0,
1010
1010
  disableRemotePlayback: !0,
1011
1011
  draggable: !1,
1012
1012
  onContextMenu: ge,
1013
- onClick: J.togglePlay,
1014
- src: q,
1015
- poster: n,
1016
- crossOrigin: Y.needsCrossOrigin || X.needsCrossOrigin ? "anonymous" : void 0,
1017
- onLoadedData: () => J.setVideoLoaded(!0),
1018
- className: y("block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300", "[&::-webkit-media-text-track-container]:![transform:translateY(-3.5rem)]"),
1019
- style: { opacity: J.videoLoaded || n ? 1 : 0 },
1020
- children: [Y.trackSrc ? /* @__PURE__ */ F("track", {
1013
+ onClick: Y.togglePlay,
1014
+ src: J,
1015
+ poster: t,
1016
+ crossOrigin: X.needsCrossOrigin || Z.needsCrossOrigin ? "anonymous" : void 0,
1017
+ onLoadedData: () => Y.setVideoLoaded(!0),
1018
+ className: v("block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300", "[&::-webkit-media-text-track-container]:![transform:translateY(-3.5rem)]"),
1019
+ style: { opacity: Y.videoLoaded || t ? 1 : 0 },
1020
+ children: [X.trackSrc ? /* @__PURE__ */ I("track", {
1021
1021
  kind: "captions",
1022
- src: Y.trackSrc,
1023
- label: v("videoPlayer.captions"),
1022
+ src: X.trackSrc,
1023
+ label: _("videoPlayer.captions"),
1024
1024
  default: !1
1025
- }) : null, X.trackSrc ? /* @__PURE__ */ F("track", {
1025
+ }) : null, Z.trackSrc ? /* @__PURE__ */ I("track", {
1026
1026
  kind: "descriptions",
1027
- src: X.trackSrc,
1028
- label: v("videoPlayer.audioDescription"),
1027
+ src: Z.trackSrc,
1028
+ label: _("videoPlayer.audioDescription"),
1029
1029
  default: !1
1030
1030
  }) : null]
1031
1031
  }),
1032
- J.isPlaying ? null : /* @__PURE__ */ F("div", {
1032
+ Y.isPlaying ? null : /* @__PURE__ */ I("div", {
1033
1033
  "aria-hidden": !0,
1034
1034
  "data-video-play-overlay": !0,
1035
1035
  className: "pointer-events-none absolute inset-0 z-[1] flex items-center justify-center",
1036
- children: /* @__PURE__ */ F("button", {
1036
+ children: /* @__PURE__ */ I("button", {
1037
1037
  type: "button",
1038
1038
  tabIndex: -1,
1039
- onClick: J.togglePlay,
1039
+ onClick: Y.togglePlay,
1040
1040
  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",
1041
- children: /* @__PURE__ */ F(p, {
1042
- icon: ne,
1041
+ children: /* @__PURE__ */ I(f, {
1042
+ icon: te,
1043
1043
  size: "lg",
1044
1044
  color: "#fff"
1045
1045
  })
1046
1046
  })
1047
1047
  }),
1048
- Y.showing && X.activeCue ? /* @__PURE__ */ F("div", {
1048
+ X.showing && Z.activeCue ? /* @__PURE__ */ I("div", {
1049
1049
  "aria-hidden": !0,
1050
1050
  className: "dark pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-center p-3",
1051
- children: /* @__PURE__ */ I("p", {
1051
+ children: /* @__PURE__ */ L("p", {
1052
1052
  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)]",
1053
- children: [/* @__PURE__ */ I("span", {
1053
+ children: [/* @__PURE__ */ L("span", {
1054
1054
  className: "pr-1 font-medium not-italic opacity-70",
1055
1055
  children: [
1056
1056
  "[",
1057
- v("videoPlayer.audioDescription"),
1057
+ _("videoPlayer.audioDescription"),
1058
1058
  "]"
1059
1059
  ]
1060
- }), X.activeCue]
1060
+ }), Z.activeCue]
1061
1061
  })
1062
1062
  }) : null,
1063
- /* @__PURE__ */ F("span", {
1063
+ /* @__PURE__ */ I("span", {
1064
1064
  className: "sr-only",
1065
1065
  "aria-live": "polite",
1066
- children: J.isPlaying ? v("videoPlayer.playing") : v("videoPlayer.paused")
1066
+ children: Y.isPlaying ? _("videoPlayer.playing") : _("videoPlayer.paused")
1067
1067
  }),
1068
- J.videoLoaded ? /* @__PURE__ */ F(_e, {
1069
- isPlaying: J.isPlaying,
1070
- currentTime: J.currentTime,
1071
- duration: J.duration,
1072
- volume: J.volume,
1073
- isMuted: J.isMuted,
1074
- playbackRate: J.playbackRate,
1068
+ Y.videoLoaded ? /* @__PURE__ */ I(_e, {
1069
+ isPlaying: Y.isPlaying,
1070
+ currentTime: Y.currentTime,
1071
+ duration: Y.duration,
1072
+ volume: Y.volume,
1073
+ isMuted: Y.isMuted,
1074
+ playbackRate: Y.playbackRate,
1075
1075
  isFullscreen: de,
1076
- markerTime: d ? ce : void 0,
1077
- blockSeekPastMarker: d,
1078
- containerRef: x,
1079
- captionsAvailable: Y.available,
1080
- captionsOn: Y.showing,
1081
- audioDescriptionAvailable: X.available,
1082
- audioDescriptionOn: G,
1083
- silent: i,
1084
- persist: a,
1085
- audioLanguages: S,
1086
- audioLanguage: te,
1087
- onAudioLanguageChange: ie,
1076
+ markerTime: u ? ce : void 0,
1077
+ blockSeekPastMarker: u,
1078
+ containerRef: b,
1079
+ captionsAvailable: X.available,
1080
+ captionsOn: X.showing,
1081
+ audioDescriptionAvailable: Z.available,
1082
+ audioDescriptionOn: K,
1083
+ silent: r,
1084
+ persist: i,
1085
+ audioLanguages: x,
1086
+ audioLanguage: ee,
1087
+ onAudioLanguageChange: re,
1088
1088
  captionLanguages: T,
1089
1089
  captionLanguage: D,
1090
- onCaptionLanguageChange: ae,
1091
- onCaptionsOff: oe,
1092
- audioDescriptionLanguages: j,
1093
- audioDescriptionLanguage: H,
1094
- onAudioDescriptionLanguageChange: se,
1095
- onAudioDescriptionOff: $,
1096
- onTogglePlay: J.togglePlay,
1097
- onToggleMute: J.toggleMute,
1098
- onVolumeChange: J.setVolume,
1099
- onPlaybackRateChange: J.setPlaybackRate,
1090
+ onCaptionLanguageChange: ie,
1091
+ onCaptionsOff: ae,
1092
+ audioDescriptionLanguages: M,
1093
+ audioDescriptionLanguage: U,
1094
+ onAudioDescriptionLanguageChange: oe,
1095
+ onAudioDescriptionOff: se,
1096
+ onTogglePlay: Y.togglePlay,
1097
+ onToggleMute: Y.toggleMute,
1098
+ onVolumeChange: Y.setVolume,
1099
+ onPlaybackRateChange: Y.setPlaybackRate,
1100
1100
  onToggleFullscreen: () => void fe(),
1101
- onToggleCaptions: Y.toggle,
1102
- onToggleAudioDescription: Q,
1101
+ onToggleCaptions: X.toggle,
1102
+ onToggleAudioDescription: $,
1103
1103
  onSeek: ue,
1104
- download: u
1104
+ download: l
1105
1105
  }) : null
1106
1106
  ]
1107
1107
  });
1108
1108
  }
1109
1109
  //#endregion
1110
1110
  //#region src/blocks/F0VideoPlayer/F0VideoPlayer.tsx
1111
- var Pe = u(g("F0VideoPlayer", Ne));
1111
+ var Pe = l(h("F0VideoPlayer", Ne));
1112
1112
  //#endregion
1113
- export { R as a, B as i, z as n, V as r, Pe as t };
1113
+ export { z as a, V as i, B as n, H as r, Pe as t };