highsoft-ui 1.0.146 → 1.0.148

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 (65) hide show
  1. package/CLAUDE.md +13 -1
  2. package/dist/{Button-DIGyNR41.js → Button-BGsqFCRW.js} +1 -1
  3. package/dist/{ButtonGroup-BSQzx-sZ.js → ButtonGroup-DKfaXOeS.js} +1 -1
  4. package/dist/{Checkbox-wlH6EGWW.js → Checkbox-CniRhVkQ.js} +1 -1
  5. package/dist/{CodeBlock-DtTAC5ru.js → CodeBlock-BeseY88j.js} +5 -5
  6. package/dist/{CookiePolicyModal-CGRXL0wR.js → CookiePolicyModal-k89sCBEJ.js} +2 -2
  7. package/dist/{CopyCode-_MHQorJS.js → CopyCode-_yeXCeeq.js} +3 -3
  8. package/dist/{Dropdown-CVyrHJiC.js → Dropdown-B_Ib6i1c.js} +1 -1
  9. package/dist/{Footer-DW2asf8g.js → Footer-_P2pj3K7.js} +8 -8
  10. package/dist/{FooterBottom-CP0f9kYj.js → FooterBottom-CqpN8Wky.js} +1 -1
  11. package/dist/{FooterHelp-BxDXmtHK.js → FooterHelp-Cb5sraAE.js} +3 -3
  12. package/dist/{FooterLinks-BZwAVSm4.js → FooterLinks-CogdK_5Z.js} +2 -2
  13. package/dist/{Header-DQ1xi25C.js → Header-CVKH_INR.js} +25 -25
  14. package/dist/{InputGrouped-BE3zLov9.js → InputGrouped-CHGCMmsK.js} +11 -11
  15. package/dist/{Label-C_KZM-FN.js → Label-CgiWi1v6.js} +1 -1
  16. package/dist/{NewsletterSignup-CJAI81M3.js → NewsletterSignup-DrcPfdrg.js} +2 -2
  17. package/dist/{Notification-C2kN_ceR.js → Notification-B3skQvZE.js} +3 -3
  18. package/dist/{PrefPanel-BZUX1nfw.js → PrefPanel-BGw72I_D.js} +10 -10
  19. package/dist/{RoadmapDetails-CfayA5CZ.js → RoadmapDetails-XS0OylnP.js} +5 -5
  20. package/dist/{Search-Cw_e1PyF.js → Search-UPVxQliM.js} +12 -12
  21. package/dist/{SearchDropdown-ECOTZ1Uf.js → SearchDropdown-L_rQz1vn.js} +1 -1
  22. package/dist/VideoCover-DqMDvzvA.js +195 -0
  23. package/dist/VideoPlayer-Cq_garSg.js +455 -0
  24. package/dist/{VideoPlayerModal-DbP3OjSF.js → VideoPlayerModal-D1v1O2kW.js} +2 -2
  25. package/dist/{YoutubeModal-D_ZHayEn.js → YoutubeModal-BBYdQil8.js} +4 -2
  26. package/dist/components/Button/index.js +1 -1
  27. package/dist/components/ButtonGroup/index.js +1 -1
  28. package/dist/components/Checkbox/index.js +1 -1
  29. package/dist/components/CodeBlock/index.js +1 -1
  30. package/dist/components/CopyCode/index.js +1 -1
  31. package/dist/components/Dropdown/index.js +1 -1
  32. package/dist/components/Footer/CookiePolicyModal.js +1 -1
  33. package/dist/components/Footer/FooterBottom.js +1 -1
  34. package/dist/components/Footer/FooterHelp.js +1 -1
  35. package/dist/components/Footer/FooterLinks.js +1 -1
  36. package/dist/components/Footer/YoutubeModal.js +1 -1
  37. package/dist/components/Footer/index.js +1 -1
  38. package/dist/components/Header/index.js +1 -1
  39. package/dist/components/InputGrouped/index.js +1 -1
  40. package/dist/components/Label/index.js +1 -1
  41. package/dist/components/Modal/ModalContactFooter.js +2 -2
  42. package/dist/components/Modal/index.js +2 -2
  43. package/dist/components/NewsletterSignup/index.js +1 -1
  44. package/dist/components/Notification/index.js +1 -1
  45. package/dist/components/PrefPanel/index.js +1 -1
  46. package/dist/components/RoadmapDetails/index.js +1 -1
  47. package/dist/components/Search/index.js +1 -1
  48. package/dist/components/SearchDropdown/index.js +1 -1
  49. package/dist/components/Sidebar/Sidebar.js +1 -1
  50. package/dist/components/VideoCover/index.js +1 -1
  51. package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
  52. package/dist/components/VideoPlayer/index.js +1 -1
  53. package/dist/components/VideoPlayer/useMediaEngine.js +58 -55
  54. package/dist/{create-element-WbENDceu.js → create-element-CDnUGrhg.js} +1 -1
  55. package/dist/{esm-B0YmMAXt.js → esm-BnxclXHW.js} +121 -51
  56. package/dist/highsoft-ui.css +1 -1
  57. package/dist/lib/components/VideoCover/index.d.ts +39 -5
  58. package/dist/lib/components/VideoPlayer/index.d.ts +33 -1
  59. package/dist/lib/main.d.ts +1 -1
  60. package/dist/main.js +18 -18
  61. package/dist/{prism-light-C4xXs3Qn.js → prism-light-COlcVrfu.js} +1 -1
  62. package/dist/scss/variables.scss +4 -0
  63. package/package.json +1 -1
  64. package/dist/VideoCover-BN8wnHpf.js +0 -92
  65. package/dist/VideoPlayer-CKjq7IRq.js +0 -324
@@ -0,0 +1,195 @@
1
+ import { t as e } from "./clsx-BWCAbrjV.js";
2
+ import { et as t } from "./esm-BnxclXHW.js";
3
+ import { t as n } from "./Icon-VeXJMj8Q.js";
4
+ import { t as r } from "./Typography-AvvBRu-u.js";
5
+ import { forwardRef as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ var d = {
8
+ caption: "a1m2bq_caption",
9
+ content: "a1m2bq_content",
10
+ cover: "a1m2bq_cover",
11
+ figure: "a1m2bq_figure",
12
+ hoverZoom: "a1m2bq_hoverZoom",
13
+ playControl: "a1m2bq_playControl",
14
+ poster: "a1m2bq_poster",
15
+ reduced: "a1m2bq_reduced",
16
+ video: "a1m2bq_video"
17
+ }, f = () => /* @__PURE__ */ l("svg", {
18
+ viewBox: "0 0 24 24",
19
+ "aria-hidden": "true",
20
+ focusable: "false",
21
+ fill: "currentColor",
22
+ children: /* @__PURE__ */ l("path", { d: "M8.5 5.65v12.7c0 .8.87 1.29 1.55.88l10.2-6.35a1.04 1.04 0 0 0 0-1.76L10.05 4.77a1.04 1.04 0 0 0-1.55.88Z" })
23
+ }), p = () => /* @__PURE__ */ u("svg", {
24
+ viewBox: "0 0 24 24",
25
+ "aria-hidden": "true",
26
+ focusable: "false",
27
+ fill: "currentColor",
28
+ children: [/* @__PURE__ */ l("rect", {
29
+ x: "6.5",
30
+ y: "5",
31
+ width: "4",
32
+ height: "14",
33
+ rx: "1.6"
34
+ }), /* @__PURE__ */ l("rect", {
35
+ x: "13.5",
36
+ y: "5",
37
+ width: "4",
38
+ height: "14",
39
+ rx: "1.6"
40
+ })]
41
+ }), m = () => /* @__PURE__ */ u("svg", {
42
+ viewBox: "0 0 24 24",
43
+ "aria-hidden": "true",
44
+ focusable: "false",
45
+ fill: "none",
46
+ stroke: "currentColor",
47
+ strokeWidth: "2.4",
48
+ strokeLinecap: "round",
49
+ strokeLinejoin: "round",
50
+ children: [/* @__PURE__ */ l("path", { d: "M20 8.5A8.06 8.06 0 1 0 20.94 12" }), /* @__PURE__ */ l("path", {
51
+ d: "M21 4v4.5h-4.5",
52
+ fill: "none"
53
+ })]
54
+ }), h = i(({ src: i, sources: h, poster: g, fit: _ = "cover", autoPlay: v = !0, loop: ee = !1, muted: y = !0, playsInline: b = !0, preload: x = "auto", lazy: S = !0, hoverZoom: C = !1, reducedMotion: w, aspectRatio: T, radius: E = 0, playControl: D = !0, playWhenVisible: O = !0, caption: k, children: A, "aria-label": j, className: te, style: ne }, M) => {
55
+ let N = s(null), P = s(null), [F, I] = c(!S), [L, R] = c(!1), [z, B] = c("paused"), [V, H] = c(!1), U = s("none"), W = !j, G = a((e) => {
56
+ P.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
57
+ }, [M]), [K, q] = c(() => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
58
+ o(() => {
59
+ if (typeof window > "u" || !window.matchMedia) return;
60
+ let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => q(e.matches);
61
+ return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
62
+ }, []);
63
+ let J = w === void 0 ? K ? "no-animation" : !1 : w === !0 ? "no-animation" : w, Y = J !== !1, X = v && !Y, Z = a(() => {
64
+ let e = P.current;
65
+ e && (e.pause(), J === "skip-to-end" && Number.isFinite(e.duration) ? e.currentTime = Math.max(0, e.duration - .05) : J === "no-animation" && (e.currentTime = 0));
66
+ }, [J]);
67
+ o(() => {
68
+ let e = P.current;
69
+ !e || !F || (Y ? Z() : v && !O && e.play().catch(() => {}));
70
+ }, [
71
+ Y,
72
+ F,
73
+ v,
74
+ O,
75
+ Z
76
+ ]);
77
+ let Q = a(() => {
78
+ let e = P.current;
79
+ e && B(e.ended ? "ended" : e.paused ? "paused" : "playing");
80
+ }, []), re = a(() => {
81
+ let e = P.current;
82
+ if (e) {
83
+ if (!e.paused) {
84
+ U.current = "pause", e.pause();
85
+ return;
86
+ }
87
+ U.current = "play", e.ended && (e.currentTime = 0), e.play().catch(() => {});
88
+ }
89
+ }, []);
90
+ o(() => {
91
+ if (!O) return;
92
+ let e = N.current;
93
+ if (!e || typeof IntersectionObserver > "u") {
94
+ H(!0);
95
+ return;
96
+ }
97
+ let t = new IntersectionObserver(([e]) => H(!!e?.isIntersecting), { threshold: .2 });
98
+ return t.observe(e), () => t.disconnect();
99
+ }, [O]), o(() => {
100
+ let e = P.current;
101
+ !e || !F || !O || (V ? (U.current === "play" || X && U.current !== "pause") && e.paused && !e.ended && e.play().catch(() => {}) : e.paused || e.pause());
102
+ }, [
103
+ V,
104
+ F,
105
+ O,
106
+ X
107
+ ]), o(() => {
108
+ if (F) return;
109
+ let e = N.current;
110
+ if (!e || typeof IntersectionObserver > "u") {
111
+ I(!0);
112
+ return;
113
+ }
114
+ let t = new IntersectionObserver(([e]) => {
115
+ e?.isIntersecting && (I(!0), t.disconnect());
116
+ }, { rootMargin: "200px" });
117
+ return t.observe(e), () => t.disconnect();
118
+ }, [F]);
119
+ let $ = /* @__PURE__ */ u("div", {
120
+ ref: N,
121
+ className: e("hsui-video-cover", d.cover, {
122
+ [d.hoverZoom]: C,
123
+ [d.reduced]: Y
124
+ }, te),
125
+ style: {
126
+ "--vc-radius": `${E}px`,
127
+ aspectRatio: T,
128
+ ...ne
129
+ },
130
+ role: W ? "presentation" : "img",
131
+ "aria-label": j,
132
+ children: [
133
+ g && /* @__PURE__ */ l("img", {
134
+ className: d.poster,
135
+ style: { objectFit: _ },
136
+ src: g,
137
+ alt: "",
138
+ "aria-hidden": "true"
139
+ }),
140
+ /* @__PURE__ */ l("video", {
141
+ ref: G,
142
+ className: d.video,
143
+ style: { objectFit: _ },
144
+ src: F && !h ? i : void 0,
145
+ autoPlay: X && !O,
146
+ loop: ee,
147
+ muted: y,
148
+ playsInline: b,
149
+ preload: F ? x : "none",
150
+ "data-ready": L || void 0,
151
+ onCanPlay: () => {
152
+ R(!0), Q();
153
+ },
154
+ onLoadedMetadata: Y ? Z : void 0,
155
+ onPlay: Q,
156
+ onPause: Q,
157
+ onEnded: Q,
158
+ "aria-hidden": W || void 0,
159
+ children: F && h?.map((e) => /* @__PURE__ */ l("source", {
160
+ src: e.src,
161
+ type: e.type
162
+ }, e.src))
163
+ }),
164
+ A != null && /* @__PURE__ */ l("div", {
165
+ className: d.content,
166
+ children: A
167
+ }),
168
+ D && /* @__PURE__ */ l("button", {
169
+ type: "button",
170
+ className: d.playControl,
171
+ onClick: re,
172
+ "aria-label": z === "playing" ? "Pause video" : z === "ended" ? "Replay video" : "Play video",
173
+ children: l(z === "playing" ? p : z === "ended" ? m : f, {})
174
+ })
175
+ ]
176
+ });
177
+ return k == null ? $ : /* @__PURE__ */ u("figure", {
178
+ className: e("hsui-video-cover-figure", d.figure),
179
+ children: [$, /* @__PURE__ */ u("figcaption", {
180
+ className: d.caption,
181
+ children: [/* @__PURE__ */ l(n, {
182
+ name: t,
183
+ size: 12
184
+ }), /* @__PURE__ */ l(r, {
185
+ as: "span",
186
+ size: 75,
187
+ color: "tertiary",
188
+ children: k
189
+ })]
190
+ })]
191
+ });
192
+ });
193
+ h.displayName = "VideoCover";
194
+ //#endregion
195
+ export { h as t };
@@ -0,0 +1,455 @@
1
+ import { t as e } from "./clsx-BWCAbrjV.js";
2
+ import { C as t, E as n, a as r, i, k as a, o, r as s, t as ee, tt as c, x as l } from "./esm-BnxclXHW.js";
3
+ import { t as u } from "./Icon-VeXJMj8Q.js";
4
+ import { detectProvider as d, providerPosterUrl as f, useMediaEngine as p } from "./components/VideoPlayer/useMediaEngine.js";
5
+ import { forwardRef as m, useCallback as h, useEffect as g, useId as _, useImperativeHandle as v, useRef as y, useState as b } from "react";
6
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
7
+ var C = {
8
+ button: "_1OFWhq_button",
9
+ ccButton: "_1OFWhq_ccButton",
10
+ centerPlay: "_1OFWhq_centerPlay",
11
+ controlBar: "_1OFWhq_controlBar",
12
+ docked: "_1OFWhq_docked",
13
+ dragging: "_1OFWhq_dragging",
14
+ embed: "_1OFWhq_embed",
15
+ fullscreenTranscript: "_1OFWhq_fullscreenTranscript",
16
+ fullscreenTranscriptBody: "_1OFWhq_fullscreenTranscriptBody",
17
+ fullscreenTranscriptClose: "_1OFWhq_fullscreenTranscriptClose",
18
+ fullscreenTranscriptHeader: "_1OFWhq_fullscreenTranscriptHeader",
19
+ fullscreenTranscriptOpen: "_1OFWhq_fullscreenTranscriptOpen",
20
+ fullscreenTranscriptTitle: "_1OFWhq_fullscreenTranscriptTitle",
21
+ fullscreenTranscriptVisible: "_1OFWhq_fullscreenTranscriptVisible",
22
+ idle: "_1OFWhq_idle",
23
+ player: "_1OFWhq_player",
24
+ progress: "_1OFWhq_progress",
25
+ scrim: "_1OFWhq_scrim",
26
+ slider: "_1OFWhq_slider",
27
+ sliderBuffered: "_1OFWhq_sliderBuffered",
28
+ sliderFill: "_1OFWhq_sliderFill",
29
+ sliderThumb: "_1OFWhq_sliderThumb",
30
+ sliderTrack: "_1OFWhq_sliderTrack",
31
+ stack: "_1OFWhq_stack",
32
+ startCover: "_1OFWhq_startCover",
33
+ tapLayer: "_1OFWhq_tapLayer",
34
+ time: "_1OFWhq_time",
35
+ timeDuration: "_1OFWhq_timeDuration",
36
+ transcript: "_1OFWhq_transcript",
37
+ transcriptBody: "_1OFWhq_transcriptBody",
38
+ transcriptButton: "_1OFWhq_transcriptButton",
39
+ transcriptClip: "_1OFWhq_transcriptClip",
40
+ transcriptReveal: "_1OFWhq_transcriptReveal",
41
+ transcriptRevealOpen: "_1OFWhq_transcriptRevealOpen",
42
+ video: "_1OFWhq_video",
43
+ volumePopover: "_1OFWhq_volumePopover",
44
+ volumeSlider: "_1OFWhq_volumeSlider",
45
+ volumeWrap: "_1OFWhq_volumeWrap"
46
+ }, te = "var(--HS-text-brand-default-alt)", ne = 2600, w = -4;
47
+ function T(e) {
48
+ if (!Number.isFinite(e) || e < 0) return "0:00";
49
+ let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = n > 0 ? String(r).padStart(2, "0") : String(r), o = String(i).padStart(2, "0");
50
+ return n > 0 ? `${n}:${a}:${o}` : `${a}:${o}`;
51
+ }
52
+ var E = (e) => Math.max(0, Math.min(1, e));
53
+ function D({ value: t, buffered: n, ariaLabel: r, ariaValueText: i, className: a, step: o = .05, onChange: s, onScrubStart: ee, onScrubEnd: c }) {
54
+ let l = y(null), [u, d] = b(!1), f = (e) => `${E(e) * 100}%`, p = h((e) => {
55
+ let t = l.current;
56
+ if (!t) return 0;
57
+ let n = t.getBoundingClientRect();
58
+ return E((e - n.left) / n.width);
59
+ }, []), m = (e) => {
60
+ e.preventDefault(), l.current?.setPointerCapture(e.pointerId), d(!0), ee?.(), s(p(e.clientX));
61
+ }, g = (e) => {
62
+ u && s(p(e.clientX));
63
+ }, _ = (e) => {
64
+ u && (d(!1), c?.(), l.current?.releasePointerCapture?.(e.pointerId));
65
+ }, v = (e) => {
66
+ let n = null;
67
+ switch (e.key) {
68
+ case "ArrowRight":
69
+ case "ArrowUp":
70
+ n = t + o;
71
+ break;
72
+ case "ArrowLeft":
73
+ case "ArrowDown":
74
+ n = t - o;
75
+ break;
76
+ case "Home":
77
+ n = 0;
78
+ break;
79
+ case "End":
80
+ n = 1;
81
+ break;
82
+ default: return;
83
+ }
84
+ e.preventDefault(), e.stopPropagation(), s(E(n));
85
+ };
86
+ return /* @__PURE__ */ S("div", {
87
+ ref: l,
88
+ role: "slider",
89
+ tabIndex: 0,
90
+ "aria-label": r,
91
+ "aria-valuemin": 0,
92
+ "aria-valuemax": 100,
93
+ "aria-valuenow": Math.round(E(t) * 100),
94
+ "aria-valuetext": i,
95
+ className: e(C.slider, a, { [C.dragging]: u }),
96
+ onPointerDown: m,
97
+ onPointerMove: g,
98
+ onPointerUp: _,
99
+ onPointerCancel: _,
100
+ onKeyDown: v,
101
+ children: [/* @__PURE__ */ S("div", {
102
+ className: C.sliderTrack,
103
+ children: [n != null && /* @__PURE__ */ x("div", {
104
+ className: C.sliderBuffered,
105
+ style: { width: f(n) }
106
+ }), /* @__PURE__ */ x("div", {
107
+ className: C.sliderFill,
108
+ style: { width: f(t) }
109
+ })]
110
+ }), /* @__PURE__ */ x("span", {
111
+ className: C.sliderThumb,
112
+ style: { left: f(t) }
113
+ })]
114
+ });
115
+ }
116
+ var O = m(({ src: m, sources: O, poster: k, muted: re = !1, autoPlay: ie = !1, loop: A = !1, playsInline: ae = !0, preload: oe = "metadata", aspectRatio: se = "16 / 9", radius: j = 16, accentGradient: ce = te, tracks: M, transcript: N, transcriptTitle: P = "Transcript", "aria-label": F = "Video player", className: le, style: ue }, de) => {
117
+ let I = d(m, !!O?.length), L = I !== "file", R = !L && M ? M : [], z = R.map((e, t) => (e.kind ?? "captions") === "descriptions" ? -1 : t).filter((e) => e >= 0), B = p({
118
+ provider: I,
119
+ src: m,
120
+ muted: re,
121
+ autoPlay: ie,
122
+ loop: A
123
+ }), { state: V } = B, H = y(null), U = y(null), W = y(void 0), G = _(), fe = h((e) => {
124
+ U.current = e, B.videoRef(e);
125
+ }, [B]);
126
+ v(de, () => U.current, []);
127
+ let [K, pe] = b(!1), [me, q] = b(!1), [he, J] = b(!1), [ge, _e] = b(!1), [Y, ve] = b(() => R.findIndex((e) => e.default && (e.kind ?? "captions") !== "descriptions")), [X, Z] = b(!1), Q = _(), ye = y(null), be = y(null), [xe, Se] = b(void 0);
128
+ g(() => {
129
+ V.playing && _e(!0);
130
+ }, [V.playing]), g(() => {
131
+ if (Se(void 0), I !== "vimeo" || k || !m) return;
132
+ let e = !1;
133
+ return fetch(`https://vimeo.com/api/oembed.json?url=${encodeURIComponent(m)}&width=1280`).then((e) => e.ok ? e.json() : null).then((t) => {
134
+ !e && t?.thumbnail_url && Se(t.thumbnail_url);
135
+ }).catch(() => {}), () => {
136
+ e = !0;
137
+ };
138
+ }, [
139
+ I,
140
+ k,
141
+ m
142
+ ]), g(() => {
143
+ let e = () => pe(document.fullscreenElement === H.current);
144
+ return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
145
+ }, []), g(() => {
146
+ K && X && be.current?.focus();
147
+ }, [K, X]);
148
+ let Ce = h(() => {
149
+ q(!1), window.clearTimeout(W.current), W.current = window.setTimeout(() => q(!0), ne);
150
+ }, []);
151
+ g(() => () => window.clearTimeout(W.current), []);
152
+ let $ = h(() => {
153
+ let e = H.current;
154
+ e && (document.fullscreenElement === e ? document.exitFullscreen().catch(() => {}) : e.requestFullscreen?.().catch(() => {}));
155
+ }, []), we = h(() => {
156
+ Z(!1), window.requestAnimationFrame(() => ye.current?.focus());
157
+ }, []);
158
+ g(() => {
159
+ let e = U.current;
160
+ if (!e || !R.length) return;
161
+ let t = e.textTracks;
162
+ for (let e = 0; e < t.length; e += 1) {
163
+ let n = t[e];
164
+ n && (n.mode = e === Y ? "showing" : "hidden");
165
+ }
166
+ }, [
167
+ Y,
168
+ R.length,
169
+ V.duration
170
+ ]), g(() => {
171
+ let e = U.current;
172
+ if (!e || !R.length || typeof VTTCue > "u" || typeof CSS < "u" && CSS.supports?.("-webkit-box-reflect", "below 0px")) return;
173
+ let t = Array.from(e.textTracks).map((e) => {
174
+ let t = () => {
175
+ let t = e.cues ?? e.activeCues;
176
+ if (t) for (let e = 0; e < t.length; e += 1) {
177
+ let n = t[e];
178
+ n instanceof VTTCue && n.line !== w && (n.line = w);
179
+ }
180
+ };
181
+ return t(), e.addEventListener("cuechange", t), [e, t];
182
+ });
183
+ return () => t.forEach(([e, t]) => e.removeEventListener("cuechange", t));
184
+ }, [
185
+ R.length,
186
+ Y,
187
+ V.duration
188
+ ]);
189
+ let Te = h(() => {
190
+ if (!z.length) return;
191
+ let e = z.indexOf(Y), t = e + 1 < z.length ? z[e + 1] ?? -1 : -1;
192
+ ve(e === -1 ? z[0] ?? -1 : t);
193
+ }, [z, Y]), Ee = (e) => {
194
+ if (e.target === e.currentTarget) switch (e.key) {
195
+ case " ":
196
+ case "k":
197
+ e.preventDefault(), B.toggle();
198
+ break;
199
+ case "f":
200
+ e.preventDefault(), $();
201
+ break;
202
+ case "m":
203
+ e.preventDefault(), B.toggleMute();
204
+ break;
205
+ case "c":
206
+ e.preventDefault(), Te();
207
+ break;
208
+ case "t":
209
+ N != null && (e.preventDefault(), Z((e) => !e));
210
+ break;
211
+ case "ArrowRight":
212
+ e.preventDefault(), B.seekBy(5);
213
+ break;
214
+ case "ArrowLeft":
215
+ e.preventDefault(), B.seekBy(-5);
216
+ break;
217
+ default:
218
+ }
219
+ }, De = k ?? f(I, m) ?? xe, Oe = V.duration ? E(V.currentTime / V.duration) : 0, ke = V.muted || V.volume === 0 ? s : V.volume < .5 ? i : r, Ae = {
220
+ "--vp-radius": `${j}px`,
221
+ "--vp-gradient": ce,
222
+ aspectRatio: K ? void 0 : se
223
+ }, je = I === "file" ? /* @__PURE__ */ S("video", {
224
+ ref: fe,
225
+ className: C.video,
226
+ src: O?.length ? void 0 : m,
227
+ poster: k,
228
+ muted: re,
229
+ autoPlay: ie,
230
+ loop: A,
231
+ playsInline: ae,
232
+ preload: oe,
233
+ onClick: B.toggle,
234
+ children: [O?.map((e) => /* @__PURE__ */ x("source", {
235
+ src: e.src,
236
+ type: e.type
237
+ }, e.src)), R.map((e) => /* @__PURE__ */ x("track", {
238
+ src: e.src,
239
+ srcLang: e.srclang,
240
+ label: e.label,
241
+ kind: e.kind ?? "captions"
242
+ }, e.src))]
243
+ }) : /* @__PURE__ */ x("div", {
244
+ ref: B.mountRef,
245
+ className: C.embed
246
+ }), Me = /* @__PURE__ */ S("div", {
247
+ ref: H,
248
+ role: "region",
249
+ "aria-label": F,
250
+ "aria-labelledby": G,
251
+ tabIndex: 0,
252
+ className: e("hsui-video-player", C.player, {
253
+ [C.playing]: V.playing,
254
+ [C.ended]: V.ended,
255
+ [C.idle]: me && V.playing && !he,
256
+ [C.docked]: N != null && X,
257
+ [C.fullscreenTranscriptVisible]: K && X
258
+ }, le),
259
+ style: {
260
+ ...Ae,
261
+ ...ue
262
+ },
263
+ onPointerMove: Ce,
264
+ onPointerLeave: () => V.playing && q(!0),
265
+ onKeyDown: Ee,
266
+ onDoubleClick: $,
267
+ children: [
268
+ /* @__PURE__ */ x("span", {
269
+ id: G,
270
+ className: "sr-only",
271
+ children: F
272
+ }),
273
+ je,
274
+ L && !ge && /* @__PURE__ */ x("div", {
275
+ className: C.startCover,
276
+ "aria-hidden": "true",
277
+ style: De ? { backgroundImage: `url("${De}")` } : void 0
278
+ }),
279
+ L && /* @__PURE__ */ x("button", {
280
+ type: "button",
281
+ className: C.tapLayer,
282
+ onClick: B.toggle,
283
+ "aria-label": V.playing ? "Pause" : "Play",
284
+ tabIndex: -1
285
+ }),
286
+ /* @__PURE__ */ x("div", {
287
+ className: C.scrim,
288
+ "aria-hidden": "true"
289
+ }),
290
+ !V.playing && /* @__PURE__ */ x("button", {
291
+ type: "button",
292
+ className: C.centerPlay,
293
+ onClick: B.toggle,
294
+ "aria-label": V.ended ? "Replay" : "Play",
295
+ tabIndex: -1,
296
+ children: /* @__PURE__ */ x(u, {
297
+ name: l,
298
+ size: 32
299
+ })
300
+ }),
301
+ /* @__PURE__ */ S("div", {
302
+ className: C.controlBar,
303
+ children: [
304
+ /* @__PURE__ */ x("button", {
305
+ type: "button",
306
+ className: C.button,
307
+ onClick: B.toggle,
308
+ "aria-label": V.playing ? "Pause" : "Play",
309
+ children: /* @__PURE__ */ x(u, {
310
+ name: V.playing ? t : l,
311
+ size: 20
312
+ })
313
+ }),
314
+ /* @__PURE__ */ S("div", {
315
+ className: C.volumeWrap,
316
+ children: [/* @__PURE__ */ x("button", {
317
+ type: "button",
318
+ className: C.button,
319
+ onClick: B.toggleMute,
320
+ "aria-label": V.muted ? "Unmute" : "Mute",
321
+ "aria-pressed": V.muted,
322
+ children: /* @__PURE__ */ x(u, {
323
+ name: ke,
324
+ size: 20
325
+ })
326
+ }), /* @__PURE__ */ x("div", {
327
+ className: C.volumePopover,
328
+ children: /* @__PURE__ */ x(D, {
329
+ className: C.volumeSlider,
330
+ value: V.volume,
331
+ ariaLabel: "Volume",
332
+ ariaValueText: `${Math.round(V.volume * 100)}%`,
333
+ onChange: B.setVolume
334
+ })
335
+ })]
336
+ }),
337
+ /* @__PURE__ */ x("span", {
338
+ className: C.time,
339
+ children: T(V.currentTime)
340
+ }),
341
+ /* @__PURE__ */ x(D, {
342
+ className: C.progress,
343
+ value: Oe,
344
+ buffered: V.buffered,
345
+ ariaLabel: "Seek",
346
+ ariaValueText: `${T(V.currentTime)} of ${T(V.duration)}`,
347
+ onChange: B.seekFraction,
348
+ onScrubStart: () => {
349
+ J(!0), B.beginSeek();
350
+ },
351
+ onScrubEnd: () => {
352
+ J(!1), B.endSeek();
353
+ }
354
+ }),
355
+ /* @__PURE__ */ x("span", {
356
+ className: e(C.time, C.timeDuration),
357
+ children: T(V.duration)
358
+ }),
359
+ N != null && /* @__PURE__ */ x("button", {
360
+ ref: ye,
361
+ type: "button",
362
+ className: e(C.button, C.transcriptButton),
363
+ onClick: () => Z((e) => !e),
364
+ "aria-expanded": X,
365
+ "aria-controls": Q,
366
+ "aria-label": X ? "Hide transcript" : "Show transcript",
367
+ children: /* @__PURE__ */ x(u, {
368
+ name: c,
369
+ size: 20
370
+ })
371
+ }),
372
+ z.length > 0 && /* @__PURE__ */ x("button", {
373
+ type: "button",
374
+ className: e(C.button, C.ccButton),
375
+ onClick: Te,
376
+ "aria-pressed": Y !== -1,
377
+ "aria-label": Y === -1 ? "Turn on captions" : z.length > 1 ? `Captions: ${R[Y]?.label ?? ""} — next track` : "Turn off captions",
378
+ children: /* @__PURE__ */ x(u, {
379
+ name: o,
380
+ size: 20
381
+ })
382
+ }),
383
+ /* @__PURE__ */ x("button", {
384
+ type: "button",
385
+ className: C.button,
386
+ onClick: $,
387
+ "aria-label": K ? "Exit fullscreen" : "Enter fullscreen",
388
+ children: /* @__PURE__ */ x(u, {
389
+ name: K ? n : a,
390
+ size: 20
391
+ })
392
+ })
393
+ ]
394
+ }),
395
+ K && N != null && /* @__PURE__ */ S("aside", {
396
+ id: Q,
397
+ role: "region",
398
+ "aria-label": P,
399
+ "aria-hidden": !X,
400
+ inert: !X,
401
+ className: e(C.fullscreenTranscript, { [C.fullscreenTranscriptOpen]: X }),
402
+ onKeyDown: (e) => {
403
+ e.key === "Escape" && (e.preventDefault(), we());
404
+ },
405
+ children: [/* @__PURE__ */ S("div", {
406
+ className: C.fullscreenTranscriptHeader,
407
+ children: [/* @__PURE__ */ x("h2", {
408
+ className: C.fullscreenTranscriptTitle,
409
+ children: P
410
+ }), /* @__PURE__ */ x("button", {
411
+ ref: be,
412
+ type: "button",
413
+ className: C.fullscreenTranscriptClose,
414
+ onClick: we,
415
+ "aria-label": "Close transcript",
416
+ children: /* @__PURE__ */ x(u, {
417
+ name: ee,
418
+ size: 20
419
+ })
420
+ })]
421
+ }), /* @__PURE__ */ x("div", {
422
+ className: e(C.transcriptBody, C.fullscreenTranscriptBody),
423
+ children: N
424
+ })]
425
+ })
426
+ ]
427
+ });
428
+ return N == null ? Me : /* @__PURE__ */ S("div", {
429
+ className: e("hsui-video-player-stack", C.stack),
430
+ children: [Me, !K && /* @__PURE__ */ x("div", {
431
+ className: e(C.transcriptReveal, { [C.transcriptRevealOpen]: X }),
432
+ inert: !X,
433
+ children: /* @__PURE__ */ x("div", {
434
+ className: C.transcriptClip,
435
+ children: /* @__PURE__ */ x("div", {
436
+ id: Q,
437
+ role: "region",
438
+ "aria-label": P,
439
+ className: C.transcript,
440
+ style: {
441
+ borderBottomLeftRadius: j,
442
+ borderBottomRightRadius: j
443
+ },
444
+ children: /* @__PURE__ */ x("div", {
445
+ className: C.transcriptBody,
446
+ children: N
447
+ })
448
+ })
449
+ })
450
+ })]
451
+ });
452
+ });
453
+ O.displayName = "VideoPlayer";
454
+ //#endregion
455
+ export { O as t };
@@ -1,7 +1,7 @@
1
- import { n as e } from "./esm-B0YmMAXt.js";
1
+ import { n as e } from "./esm-BnxclXHW.js";
2
2
  import { t } from "./dist-J9cXmrDi.js";
3
3
  import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./dist-f0z6DapB.js";
4
- import { t as l } from "./VideoPlayer-CKjq7IRq.js";
4
+ import { t as l } from "./VideoPlayer-Cq_garSg.js";
5
5
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
6
  var f = {
7
7
  close: "ig0T5q_close",
@@ -1,6 +1,6 @@
1
1
  import { s as e } from "./fa-B95RwBpz.js";
2
- import { t } from "./VideoCover-BN8wnHpf.js";
3
- import { t as n } from "./VideoPlayerModal-DbP3OjSF.js";
2
+ import { t } from "./VideoCover-DqMDvzvA.js";
3
+ import { t as n } from "./VideoPlayerModal-D1v1O2kW.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  var a = {
6
6
  youtube: "elwCNG_youtube",
@@ -23,6 +23,8 @@ function u() {
23
23
  }],
24
24
  preload: "metadata",
25
25
  hoverZoom: !0,
26
+ loop: !0,
27
+ playControl: !1,
26
28
  children: /* @__PURE__ */ i("span", {
27
29
  className: a.youtubeCopy,
28
30
  children: [/* @__PURE__ */ r(e, {}), /* @__PURE__ */ r("p", { children: o })]
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../Button-DIGyNR41.js";
1
+ import { t as e } from "../../Button-BGsqFCRW.js";
2
2
  export { e as Button };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../ButtonGroup-BSQzx-sZ.js";
1
+ import { t as e } from "../../ButtonGroup-DKfaXOeS.js";
2
2
  export { e as ButtonGroup };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../../Checkbox-wlH6EGWW.js";
1
+ import { n as e, t } from "../../Checkbox-CniRhVkQ.js";
2
2
  export { t as Checkbox, e as CheckboxGroup };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../CodeBlock-DtTAC5ru.js";
1
+ import { t as e } from "../../CodeBlock-BeseY88j.js";
2
2
  export { e as CodeBlock };