markdown-flow-ui 0.2.25-dev.2 → 0.2.25-dev.4

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.
@@ -1,56 +1,56 @@
1
- import { jsxs as Q, jsx as s, Fragment as Nt } from "react/jsx-runtime";
2
- import ar, { memo as sr, useId as cr, useContext as ir, useRef as o, useState as Ve, useMemo as re, useCallback as r, useEffect as b } from "react";
3
- import { getMarkdownFlowDirection as or, getMarkdownFlowLanguage as fr } from "../../lib/locale.es.js";
4
- import { useDetachedLanguage as dr } from "../../lib/useDetachedLanguage.es.js";
5
- import { useResolvedDirection as mr } from "../../lib/useResolvedDirection.es.js";
6
- import { cn as pr } from "../../lib/utils.es.js";
7
- import hr from "./MobilePlayerSettingsSheet.es.js";
8
- import { getSlidePlayerTexts as yr } from "./slideI18n.es.js";
9
- import { DEFAULT_MOBILE_VIEW_MODE as gr } from "./utils/mobileScreenMode.es.js";
10
- import { hasReachedAudioEnd as br } from "./utils/audioCompletion.es.js";
11
- import { PlayerKeyboardShortcutContext as Sr } from "./utils/playerKeyboardShortcutContext.es.js";
12
- import { activatePlayerKeyboardShortcutOwner as _r, registerPlayerKeyboardShortcutOwner as kr, isActivePlayerKeyboardShortcutOwner as wr, getPlayerKeyboardShortcutAction as Mr, shouldIgnorePlayerKeyboardShortcutEvent as Tr } from "./utils/playerKeyboardShortcuts.es.js";
13
- import { resolveAudioPlaybackSourceType as Cr } from "./utils/playbackSource.es.js";
14
- import { shouldKeepPlayingAfterNavigation as vr } from "./utils/playbackPreference.es.js";
15
- import { toPlayerCustomActionList as Lr } from "./utils/playerCustomActions.es.js";
16
- import { suppressPlayerControlsWakeAfterNavigation as He } from "./utils/playerNavigationContext.es.js";
17
- import { isPlaybackTimeCoveredBySegments as Et, resolveSegmentSeekTarget as xr } from "./utils/segmentSeek.es.js";
18
- import { getSortedAudioSegments as Kt } from "./utils/audioSegments.es.js";
19
- import { getSubtitleCueJumpTarget as Ar, shouldClearSubtitleCueJumpTarget as Rr } from "./utils/subtitleCue.es.js";
1
+ import { jsxs as te, jsx as a, Fragment as $t } from "react/jsx-runtime";
2
+ import br, { memo as _r, useId as Mr, useContext as wr, useRef as s, useState as Ye, useMemo as ae, useCallback as u, useEffect as m } from "react";
3
+ import { getMarkdownFlowDirection as Tr, getMarkdownFlowLanguage as kr } from "../../lib/locale.es.js";
4
+ import { useDetachedLanguage as Lr } from "../../lib/useDetachedLanguage.es.js";
5
+ import { useResolvedDirection as vr } from "../../lib/useResolvedDirection.es.js";
6
+ import { cn as Ar } from "../../lib/utils.es.js";
7
+ import Cr from "./MobilePlayerSettingsSheet.es.js";
8
+ import { getSlidePlayerTexts as xr } from "./slideI18n.es.js";
9
+ import { DEFAULT_MOBILE_VIEW_MODE as Er } from "./utils/mobileScreenMode.es.js";
10
+ import { hasReachedAudioEnd as Nr } from "./utils/audioCompletion.es.js";
11
+ import { PlayerKeyboardShortcutContext as Kr } from "./utils/playerKeyboardShortcutContext.es.js";
12
+ import { activatePlayerKeyboardShortcutOwner as Fr, registerPlayerKeyboardShortcutOwner as Ur, isActivePlayerKeyboardShortcutOwner as Br, getPlayerKeyboardShortcutAction as Wr, shouldIgnorePlayerKeyboardShortcutEvent as Pr } from "./utils/playerKeyboardShortcuts.es.js";
13
+ import { resolveAudioPlaybackSourceType as Or } from "./utils/playbackSource.es.js";
14
+ import { shouldKeepPlayingAfterNavigation as Rr } from "./utils/playbackPreference.es.js";
15
+ import { toPlayerCustomActionList as Vr } from "./utils/playerCustomActions.es.js";
16
+ import { suppressPlayerControlsWakeAfterNavigation as Ge } from "./utils/playerNavigationContext.es.js";
17
+ import { isPlaybackTimeCoveredBySegments as Qe, resolveSegmentSeekTarget as Jt } from "./utils/segmentSeek.es.js";
18
+ import { getSortedAudioSegments as Zt } from "./utils/audioSegments.es.js";
19
+ import { getSubtitleCueJumpTarget as Hr, shouldClearSubtitleCueJumpTarget as Ir } from "./utils/subtitleCue.es.js";
20
20
  /* empty css */
21
- import Nr from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
22
- import Er from "../../node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
23
- import Kr from "../../node_modules/lucide-react/dist/esm/icons/skip-back.es.js";
24
- import Ur from "../../node_modules/lucide-react/dist/esm/icons/skip-forward.es.js";
25
- import Fr from "../../node_modules/lucide-react/dist/esm/icons/rewind.es.js";
26
- import Pr from "../../node_modules/lucide-react/dist/esm/icons/fast-forward.es.js";
27
- import Wr from "../../node_modules/lucide-react/dist/esm/icons/captions.es.js";
28
- import Br from "../../node_modules/lucide-react/dist/esm/icons/captions-off.es.js";
29
- import Or from "../../node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
30
- import Vr from "../../node_modules/lucide-react/dist/esm/icons/maximize.es.js";
31
- const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
32
- if (typeof window > "u" || !f || Ut.has(f))
21
+ import Dr from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
22
+ import $r from "../../node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
23
+ import Jr from "../../node_modules/lucide-react/dist/esm/icons/skip-back.es.js";
24
+ import Zr from "../../node_modules/lucide-react/dist/esm/icons/skip-forward.es.js";
25
+ import jr from "../../node_modules/lucide-react/dist/esm/icons/rewind.es.js";
26
+ import zr from "../../node_modules/lucide-react/dist/esm/icons/fast-forward.es.js";
27
+ import Yr from "../../node_modules/lucide-react/dist/esm/icons/captions.es.js";
28
+ import Gr from "../../node_modules/lucide-react/dist/esm/icons/captions-off.es.js";
29
+ import Qr from "../../node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
30
+ import Xr from "../../node_modules/lucide-react/dist/esm/icons/maximize.es.js";
31
+ const jt = /* @__PURE__ */ new Map(), zt = (d) => {
32
+ if (typeof window > "u" || !d || jt.has(d))
33
33
  return;
34
- const d = window.document.createElement("audio");
35
- d.preload = "auto", d.setAttribute("playsinline", "true"), d.src = f, d.load(), Ut.set(f, d);
36
- }, Hr = (f, d) => d !== null && d.audioList === f && d.subtitleCueLists.length === f.length && f.every((a, k) => {
37
- const w = a.element?.subtitle_cues;
38
- return d.subtitleCueLists[k] === w && d.subtitleCueLengths[k] === (w?.length ?? 0);
39
- }), Ir = (f) => {
40
- const d = f.map(
41
- (a) => a.element?.subtitle_cues
34
+ const p = window.document.createElement("audio");
35
+ p.preload = "auto", p.setAttribute("playsinline", "true"), p.src = d, p.load(), jt.set(d, p);
36
+ }, qr = (d, p) => p !== null && p.audioList === d && p.subtitleCueLists.length === d.length && d.every((l, w) => {
37
+ const T = l.element?.subtitle_cues;
38
+ return p.subtitleCueLists[w] === T && p.subtitleCueLengths[w] === (T?.length ?? 0);
39
+ }), en = (d) => {
40
+ const p = d.map(
41
+ (l) => l.element?.subtitle_cues
42
42
  );
43
43
  return {
44
- audioList: f,
45
- subtitleCueLists: d,
46
- subtitleCueLengths: d.map(
47
- (a) => a?.length ?? 0
44
+ audioList: d,
45
+ subtitleCueLists: p,
46
+ subtitleCueLengths: p.map(
47
+ (l) => l?.length ?? 0
48
48
  ),
49
- tracks: d.map((a) => ({
50
- subtitleCues: a ?? []
49
+ tracks: p.map((l) => ({
50
+ subtitleCues: l ?? []
51
51
  }))
52
52
  };
53
- }, $r = () => /* @__PURE__ */ Q(
53
+ }, tn = () => /* @__PURE__ */ te(
54
54
  "svg",
55
55
  {
56
56
  xmlns: "http://www.w3.org/2000/svg",
@@ -59,17 +59,17 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
59
59
  viewBox: "0 0 34 34",
60
60
  fill: "none",
61
61
  children: [
62
- /* @__PURE__ */ s(
62
+ /* @__PURE__ */ a(
63
63
  "path",
64
64
  {
65
65
  d: "M16.6667 33.3333C25.8714 33.3333 33.3333 25.8714 33.3333 16.6667C33.3333 7.46192 25.8714 0 16.6667 0C7.46192 0 0 7.46192 0 16.6667C0 25.8714 7.46192 33.3333 16.6667 33.3333Z",
66
66
  fill: "#0A0A0A"
67
67
  }
68
68
  ),
69
- /* @__PURE__ */ s("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
69
+ /* @__PURE__ */ a("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
70
70
  ]
71
71
  }
72
- ), Dr = () => /* @__PURE__ */ Q(
72
+ ), rn = () => /* @__PURE__ */ te(
73
73
  "svg",
74
74
  {
75
75
  xmlns: "http://www.w3.org/2000/svg",
@@ -78,755 +78,859 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
78
78
  viewBox: "0 0 34 34",
79
79
  fill: "none",
80
80
  children: [
81
- /* @__PURE__ */ s(
81
+ /* @__PURE__ */ a(
82
82
  "path",
83
83
  {
84
84
  d: "M16.6667 33.3333C25.8714 33.3333 33.3333 25.8714 33.3333 16.6667C33.3333 7.46192 25.8714 0 16.6667 0C7.46192 0 0 7.46192 0 16.6667C0 25.8714 7.46192 33.3333 16.6667 33.3333Z",
85
85
  fill: "#0A0A0A"
86
86
  }
87
87
  ),
88
- /* @__PURE__ */ s("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
88
+ /* @__PURE__ */ a("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
89
89
  ]
90
90
  }
91
- ), $ = {
91
+ ), J = {
92
92
  fullscreen: "F",
93
93
  next: "→",
94
94
  nextSubtitle: "Shift+→",
95
95
  previous: "←",
96
96
  previousSubtitle: "Shift+←",
97
97
  subtitle: "C"
98
- }, Jr = 250, Zr = (f, d) => f ? `${f} (${d})` : d, jr = ({
99
- audioList: f = [],
100
- className: d,
101
- currentAudioIndex: a = -1,
102
- defaultPlaying: k = !0,
103
- isPlaybackPaused: w = !1,
104
- isAutoAdvanceEnabled: D = !0,
105
- useAutoAdvanceToggle: P = !1,
106
- onLoadingChange: Ie,
107
- onPlaybackPreferenceChange: $e,
108
- onPlaybackStarted: De,
109
- onPlaybackTimeChange: oe,
110
- onSubtitleToggle: ne,
111
- onPrev: fe,
112
- onNext: de,
113
- onSubtitleJump: me,
114
- canJumpToSubtitleTarget: xe,
115
- onFullscreen: ue,
116
- isFullscreen: Je = !1,
117
- mobileViewMode: Pt = gr,
118
- settingsPortalContainer: Wt,
119
- onMobileViewModeChange: Ze,
120
- onEnded: je,
121
- onAutoAdvanceToggle: ze,
122
- onInteractionToggle: Yr,
123
- hasInteraction: Gr,
124
- isInteractionOpen: pe = !1,
125
- isSubtitleEnabled: Ae = !0,
126
- prevDisabled: Re = !1,
127
- nextDisabled: Ne = !1,
128
- showControls: Ee = !0,
129
- onControlsPointerEnter: Bt,
130
- onControlsPointerLeave: Ot,
131
- enableKeyboardShortcuts: Vt = !0,
132
- subtitleSeekRequest: V = null,
133
- customActions: Ye,
134
- customActionContext: Ge,
135
- locale: he,
136
- texts: Qe,
137
- onFocusCapture: Xe,
138
- onPointerDown: qe,
139
- ...Ke
98
+ }, nn = 250, un = 15e3, ln = (d, p) => d ? `${d} (${p})` : p, sn = ({
99
+ audioList: d = [],
100
+ className: p,
101
+ currentAudioIndex: l = -1,
102
+ defaultPlaying: w = !0,
103
+ isPlaybackPaused: T = !1,
104
+ isAutoAdvanceEnabled: Z = !0,
105
+ useAutoAdvanceToggle: W = !1,
106
+ onLoadingChange: Xe,
107
+ onPlaybackPreferenceChange: qe,
108
+ onPlaybackStarted: et,
109
+ onPlaybackTimeChange: ye,
110
+ onPlaybackCheckpoint: re,
111
+ playbackRestoreRequest: _ = null,
112
+ onPlaybackRestoreComplete: ce,
113
+ onSubtitleToggle: oe,
114
+ onPrev: be,
115
+ onNext: _e,
116
+ onSubtitleJump: Me,
117
+ canJumpToSubtitleTarget: Ue,
118
+ onFullscreen: fe,
119
+ isFullscreen: tt = !1,
120
+ mobileViewMode: Yt = Er,
121
+ settingsPortalContainer: Gt,
122
+ onMobileViewModeChange: rt,
123
+ onEnded: nt,
124
+ onAutoAdvanceToggle: ut,
125
+ onInteractionToggle: cn,
126
+ hasInteraction: on,
127
+ isInteractionOpen: we = !1,
128
+ isSubtitleEnabled: Be = !0,
129
+ prevDisabled: We = !1,
130
+ nextDisabled: Pe = !1,
131
+ showControls: Oe = !0,
132
+ onControlsPointerEnter: Qt,
133
+ onControlsPointerLeave: Xt,
134
+ enableKeyboardShortcuts: qt = !0,
135
+ subtitleSeekRequest: H = null,
136
+ customActions: it,
137
+ customActionContext: lt,
138
+ locale: Te,
139
+ texts: st,
140
+ onFocusCapture: at,
141
+ onPointerDown: ct,
142
+ ...Re
140
143
  }) => {
141
- const Ue = Ke.dir ?? or(he), et = Ke.lang ?? fr(he), Ht = cr(), tt = ir(Sr), S = o(null), { resolvedDirection: rt, readDirection: nt } = mr(S, Ue), ye = rt === "rtl", It = dr(S, et), ut = o(pe), K = o(null), lt = o(null), U = o(0), m = o(null), ge = o(void 0), R = o([]), le = o(
142
- P ? D : k
143
- ), ae = o(!1), at = o(!1), M = o(!1), F = o(null), J = o(null), x = o(!1), c = o(!1), T = o(null), N = o(!1), Z = o(null), be = o(0), st = o(() => {
144
- }), Se = o(null), se = o(null), ct = o(null), it = o(null), W = o("unknown"), [_e, h] = Ve(k), [ot, X] = Ve(!1), [q, $t] = Ve({
144
+ const Ve = Re.dir ?? Tr(Te), ot = Re.lang ?? kr(Te), er = Mr(), ft = wr(Kr), g = s(null), { resolvedDirection: dt, readDirection: mt } = vr(g, Ve), ke = dt === "rtl", tr = Lr(g, ot), pt = s(we), P = s(null), Le = s(null), K = s(0), h = s(null), de = s(void 0), k = s([]), me = s(
145
+ W ? Z : w
146
+ ), pe = s(!1), ht = s(!1), L = s(!1), B = s(null), j = s(null), E = s(!1), c = s(!1), x = s(null), F = s(!1), z = s(null), ve = s(0), gt = s(() => {
147
+ }), Ae = s(null), he = s(null), St = s(null), Y = s(null), yt = s(0), He = s(!1), Ie = s(!1), bt = s(re), _t = s(() => 0), Mt = s(null), O = s("unknown"), [Ce, S] = Ye(w), [wt, ne] = Ye(!1), [ue, rr] = Ye({
145
148
  next: !1,
146
149
  previous: !1
147
- }), j = tt?.ownerId ?? Ht, B = Vt && (tt?.enabled ?? !0), p = a >= 0 ? f[a] : void 0, v = p?.audioUrl, ft = p?.audioSegments, Dt = ft?.length ?? 0, E = re(
148
- () => Kt(p),
149
- [p, Dt, ft]
150
+ }), G = ft?.ownerId ?? er, R = qt && (ft?.enabled ?? !0), f = l >= 0 ? d[l] : void 0, A = f?.audioUrl, Tt = f?.audioSegments, nr = Tt?.length ?? 0, U = ae(
151
+ () => Zt(f),
152
+ [f, nr, Tt]
150
153
  );
151
- let ke = it.current;
152
- Hr(f, ke) || (ke = Ir(f), it.current = ke);
153
- const dt = ke.tracks, Fe = re(
154
- () => Lr(Ye, Ge),
155
- [Ge, Ye]
156
- ), mt = Fe.length + 6, Jt = re(
154
+ let xe = Mt.current;
155
+ qr(d, xe) || (xe = en(d), Mt.current = xe);
156
+ const kt = xe.tracks, De = ae(
157
+ () => Vr(it, lt),
158
+ [lt, it]
159
+ ), Lt = De.length + 6, ur = ae(
157
160
  () => ({
158
- "--slide-player-mobile-control-count": String(mt)
161
+ "--slide-player-mobile-control-count": String(Lt)
159
162
  }),
160
- [mt]
161
- ), i = re(
163
+ [Lt]
164
+ ), o = ae(
162
165
  () => ({
163
- ...yr(he),
164
- ...Qe
166
+ ...xr(Te),
167
+ ...st
165
168
  }),
166
- [he, Qe]
167
- ), Pe = re(() => p ? p.audioKey ?? `${String(p.sequenceNumber ?? "none")}:${String(p.audioUrl ?? "")}` : "none", [p]), Zt = P ? D : _e, pt = P ? D ? i.pauseAutoplayLabel : i.playAutoplayLabel : _e ? i.pauseLabel : i.playLabel, ht = Je ? i.exitFullscreenLabel : i.enterFullscreenLabel, z = r(
168
- (e, t, u) => ({
169
- ariaKeyShortcuts: B ? u : void 0,
170
- title: B ? Zr(e, t) : e
169
+ [Te, st]
170
+ ), $e = ae(() => f ? f.audioKey ?? `${String(f.sequenceNumber ?? "none")}:${String(f.audioUrl ?? "")}` : "none", [f]), ir = W ? Z : Ce, vt = W ? Z ? o.pauseAutoplayLabel : o.playAutoplayLabel : Ce ? o.pauseLabel : o.playLabel, At = tt ? o.exitFullscreenLabel : o.enterFullscreenLabel, Q = u(
171
+ (e, t, r) => ({
172
+ ariaKeyShortcuts: R ? r : void 0,
173
+ title: R ? ln(e, t) : e
171
174
  }),
172
- [B]
173
- ), yt = z(
174
- i.subtitleToggleAriaLabel,
175
- $.subtitle,
175
+ [R]
176
+ ), Ct = Q(
177
+ o.subtitleToggleAriaLabel,
178
+ J.subtitle,
176
179
  "c"
177
- ), gt = z(
178
- i.previousLabel,
179
- ye ? $.next : $.previous,
180
- ye ? "ArrowRight" : "ArrowLeft"
181
- ), bt = z(
182
- i.previousSubtitleLabel,
183
- $.previousSubtitle,
180
+ ), xt = Q(
181
+ o.previousLabel,
182
+ ke ? J.next : J.previous,
183
+ ke ? "ArrowRight" : "ArrowLeft"
184
+ ), Et = Q(
185
+ o.previousSubtitleLabel,
186
+ J.previousSubtitle,
184
187
  "Shift+ArrowLeft"
185
- ), St = z(
186
- pt,
187
- i.playbackShortcutLabel,
188
+ ), Nt = Q(
189
+ vt,
190
+ o.playbackShortcutLabel,
188
191
  "Space"
189
- ), _t = z(
190
- i.nextLabel,
191
- ye ? $.previous : $.next,
192
- ye ? "ArrowLeft" : "ArrowRight"
193
- ), kt = z(
194
- i.nextSubtitleLabel,
195
- $.nextSubtitle,
192
+ ), Kt = Q(
193
+ o.nextLabel,
194
+ ke ? J.previous : J.next,
195
+ ke ? "ArrowLeft" : "ArrowRight"
196
+ ), Ft = Q(
197
+ o.nextSubtitleLabel,
198
+ J.nextSubtitle,
196
199
  "Shift+ArrowRight"
197
- ), wt = z(
198
- ht,
199
- $.fullscreen,
200
+ ), Ut = Q(
201
+ At,
202
+ J.fullscreen,
200
203
  "f"
201
- ), we = r(() => {
202
- B && _r(j);
203
- }, [j, B]), jt = r(
204
+ ), Ee = u(() => {
205
+ R && Fr(G);
206
+ }, [G, R]), lr = u(
204
207
  (e) => {
205
- we(), qe?.(e);
208
+ Ee(), ct?.(e);
206
209
  },
207
- [we, qe]
208
- ), zt = r(
210
+ [Ee, ct]
211
+ ), sr = u(
209
212
  (e) => {
210
- we(), Xe?.(e);
213
+ Ee(), at?.(e);
211
214
  },
212
- [we, Xe]
215
+ [Ee, at]
213
216
  );
214
- b(() => {
215
- ge.current = p;
216
- }, [p]), b(() => {
217
- le.current = P ? D : k;
218
- }, [k, D, P]), b(() => {
219
- Ee || X(!1);
220
- }, [Ee]), b(() => {
221
- !ut.current && pe && X(!1), ut.current = pe;
222
- }, [pe]), b(() => {
223
- R.current = E;
224
- }, [E]), b(() => {
225
- const e = p?.audioUrl, t = a >= 0 ? f[a + 1]?.audioUrl : void 0;
226
- Ft(e), Ft(t);
227
- }, [f, p?.audioUrl, a]);
228
- const l = r(
217
+ m(() => {
218
+ de.current = f;
219
+ }, [f]), m(() => {
220
+ me.current = W ? Z : w;
221
+ }, [w, Z, W]), m(() => {
222
+ Oe || ne(!1);
223
+ }, [Oe]), m(() => {
224
+ !pt.current && we && ne(!1), pt.current = we;
225
+ }, [we]), m(() => {
226
+ k.current = U;
227
+ }, [U]), m(() => {
228
+ const e = f?.audioUrl, t = l >= 0 ? d[l + 1]?.audioUrl : void 0;
229
+ zt(e), zt(t);
230
+ }, [d, f?.audioUrl, l]);
231
+ const i = u(
229
232
  (e, t = null) => {
230
- at.current === e && (!e || t === null) || (at.current = e, Ie?.({
233
+ ht.current === e && (!e || t === null) || (ht.current = e, Xe?.({
231
234
  loading: e,
232
235
  reason: e ? t : null
233
236
  }));
234
237
  },
235
- [Ie]
236
- ), O = r(
238
+ [Xe]
239
+ ), V = u(
237
240
  (e) => {
238
- le.current = e, $e?.(e);
241
+ me.current = e, qe?.(e);
239
242
  },
240
- [$e]
241
- ), Y = r(() => P ? {
242
- shouldContinuePlayback: le.current
243
+ [qe]
244
+ ), X = u(() => W ? {
245
+ shouldContinuePlayback: me.current
243
246
  } : {
244
- shouldContinuePlayback: vr({
245
- defaultPlaying: le.current,
246
- isPausedByUser: M.current
247
+ shouldContinuePlayback: Rr({
248
+ defaultPlaying: me.current,
249
+ isPausedByUser: L.current
247
250
  })
248
- }, [P]), Mt = r((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), H = r(() => k && !w && !M.current && W.current !== "blocked", [k, w]), Tt = r((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), Ct = r(() => {
249
- const e = m.current;
250
- return e == null || e <= 0 ? 0 : R.current.slice(0, e).reduce(
251
- (t, u) => t + Math.max(Number(u.duration_ms ?? 0), 0),
251
+ }, [W]), Bt = u((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), I = u(() => w && !T && !L.current && O.current !== "blocked", [w, T]), Wt = u((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), Pt = u(() => {
252
+ const e = h.current;
253
+ return e == null || e <= 0 ? 0 : k.current.slice(0, e).reduce(
254
+ (t, r) => t + Math.max(Number(r.duration_ms ?? 0), 0),
252
255
  0
253
256
  ) / 1e3;
254
- }, []), G = r((e) => e <= 0 ? 0 : R.current.slice(0, e).reduce(
255
- (t, u) => t + Math.max(Number(u.duration_ms ?? 0), 0),
257
+ }, []), q = u((e) => e <= 0 ? 0 : k.current.slice(0, e).reduce(
258
+ (t, r) => t + Math.max(Number(r.duration_ms ?? 0), 0),
256
259
  0
257
- ), []), Me = r(
258
- (e, t) => !e || w ? !1 : e.audioUrl ? !0 : Et(
259
- Kt(e),
260
+ ), []), Ne = u(
261
+ (e, t) => !e || T ? !1 : e.audioUrl ? !0 : Qe(
262
+ Zt(e),
260
263
  t
261
264
  ),
262
- [w]
263
- ), ce = r(
264
- (e, t, u = {}) => {
265
- const n = Ar({
266
- currentAudioIndex: a,
265
+ [T]
266
+ ), ge = u(
267
+ (e, t, r = {}) => {
268
+ const n = Hr({
269
+ currentAudioIndex: l,
267
270
  currentTimeMs: t,
268
271
  direction: e,
269
- excludeTarget: u.excludeTarget,
270
- tracks: dt
272
+ excludeTarget: r.excludeTarget,
273
+ tracks: kt
271
274
  });
272
- return !n || !Me(
273
- f[n.audioIndex],
275
+ return !n || !Ne(
276
+ d[n.audioIndex],
274
277
  n.timeMs
275
- ) || n.audioIndex !== a && (!me || xe && !xe(n)) ? null : n;
278
+ ) || n.audioIndex !== l && (!Me || Ue && !Ue(n)) ? null : n;
276
279
  },
277
280
  [
278
- f,
279
- xe,
281
+ d,
282
+ Ue,
283
+ Ne,
284
+ l,
280
285
  Me,
281
- a,
282
- me,
283
- dt
286
+ kt
284
287
  ]
285
- ), We = r(
288
+ ), Je = u(
286
289
  (e, t = !1) => {
287
- const u = Math.max(Number(e), 0);
288
- if (!t && Se.current !== null && Math.abs(
289
- u - Se.current
290
- ) < Jr)
290
+ const r = Math.max(Number(e), 0);
291
+ if (!t && Ae.current !== null && Math.abs(
292
+ r - Ae.current
293
+ ) < nn)
291
294
  return;
292
- Se.current = u;
295
+ Ae.current = r;
293
296
  const n = {
294
- previous: ce("previous", u) !== null,
295
- next: ce("next", u) !== null
297
+ previous: ge("previous", r) !== null,
298
+ next: ge("next", r) !== null
296
299
  };
297
- $t((g) => g.previous === n.previous && g.next === n.next ? g : n);
300
+ rr((b) => b.previous === n.previous && b.next === n.next ? b : n);
298
301
  },
299
- [ce]
302
+ [ge]
300
303
  );
301
- b(() => {
302
- st.current = We, We(be.current, !0);
303
- }, [We]);
304
- const Te = r(() => {
305
- const e = S.current;
306
- return e ? F.current === "segment" ? G(U.current) + Math.max(e.currentTime, 0) * 1e3 : T.current !== null && e.readyState === 0 ? T.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : m.current != null ? G(m.current) : 0;
307
- }, [G]), C = r(
304
+ m(() => {
305
+ gt.current = Je, Je(ve.current, !0);
306
+ }, [Je]);
307
+ const D = u(() => {
308
+ const e = g.current;
309
+ return e ? B.current === "segment" ? q(K.current) + Math.max(e.currentTime, 0) * 1e3 : x.current !== null && e.readyState === 0 ? x.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : h.current != null ? q(h.current) : 0;
310
+ }, [q]);
311
+ m(() => {
312
+ bt.current = re;
313
+ }, [re]), m(() => {
314
+ _t.current = D;
315
+ }, [D]);
316
+ const N = u(
308
317
  (e) => {
309
318
  const t = Math.max(e, 0);
310
- be.current !== t && (be.current = t, Rr({
311
- currentAudioIndex: a,
319
+ ve.current !== t && (ve.current = t, Ir({
320
+ currentAudioIndex: l,
312
321
  currentTimeMs: t,
313
- target: se.current
314
- }) && (se.current = null), oe?.(t), st.current(t));
322
+ target: he.current
323
+ }) && (he.current = null), ye?.(t), gt.current(t));
315
324
  },
316
- [a, oe]
317
- ), y = r(() => {
318
- C(Te());
319
- }, [Te, C]), _ = r(() => {
320
- typeof window > "u" || Z.current === null || (window.cancelAnimationFrame(Z.current), Z.current = null);
321
- }, []), vt = r(() => {
322
- if (typeof window > "u" || Z.current !== null)
325
+ [l, ye]
326
+ ), y = u(() => {
327
+ N(D());
328
+ }, [D, N]), $ = u(
329
+ (e = !1, t = !1) => {
330
+ const r = Le.current;
331
+ if (!re || !r)
332
+ return;
333
+ const n = Date.now();
334
+ !e && n - yt.current < 5e3 || (yt.current = n, He.current = t, re({
335
+ audioKey: r,
336
+ isComplete: t,
337
+ timeMs: D()
338
+ }));
339
+ },
340
+ [D, re]
341
+ );
342
+ m(
343
+ () => () => {
344
+ He.current || bt.current?.({
345
+ audioKey: Le.current ?? "none",
346
+ isComplete: !1,
347
+ timeMs: _t.current()
348
+ });
349
+ },
350
+ []
351
+ ), m(() => {
352
+ He.current = !1;
353
+ }, [l]);
354
+ const M = u(() => {
355
+ typeof window > "u" || z.current === null || (window.cancelAnimationFrame(z.current), z.current = null);
356
+ }, []), Ot = u(() => {
357
+ if (typeof window > "u" || z.current !== null)
323
358
  return;
324
359
  const e = () => {
325
360
  y();
326
- const t = S.current;
361
+ const t = g.current;
327
362
  if (!t || t.paused || t.ended) {
328
- Z.current = null;
363
+ z.current = null;
329
364
  return;
330
365
  }
331
- Z.current = window.requestAnimationFrame(e);
366
+ z.current = window.requestAnimationFrame(e);
332
367
  };
333
- Z.current = window.requestAnimationFrame(e);
334
- }, [y]), ee = r(() => {
335
- const e = S.current;
336
- e && (_(), c.current = !1, M.current = !1, ae.current = !1, F.current = null, T.current = null, x.current = !1, N.current = !1, J.current = null, e.pause(), e.removeAttribute("src"), e.load(), K.current = null, U.current = 0, m.current = null, C(0), h(!1), l(!1));
337
- }, [C, _, l]), L = r(
368
+ z.current = window.requestAnimationFrame(e);
369
+ }, [y]), ie = u(() => {
370
+ const e = g.current;
371
+ e && (M(), c.current = !1, L.current = !1, pe.current = !1, B.current = null, x.current = null, E.current = !1, F.current = !1, j.current = null, e.pause(), e.removeAttribute("src"), e.load(), P.current = null, K.current = 0, h.current = null, N(0), S(!1), i(!1));
372
+ }, [N, M, i]), v = u(
338
373
  (e) => {
339
- const t = S.current;
374
+ const t = g.current;
340
375
  if (!t)
341
376
  return !1;
342
- const u = t.play();
343
- return u && typeof u.then == "function" && u.then(() => {
344
- W.current === "unknown" && (W.current = "auto"), c.current = !1, N.current = !1;
377
+ const r = t.play();
378
+ return r && typeof r.then == "function" && r.then(() => {
379
+ O.current === "unknown" && (O.current = "auto"), c.current = !1, F.current = !1;
345
380
  }).catch((n) => {
346
- W.current === "unknown" && Mt(n) && (W.current = "blocked", c.current = !1, l(!1)), N.current = !1, h(!1);
381
+ O.current === "unknown" && Bt(n) && (O.current = "blocked", c.current = !1, i(!1)), F.current = !1, S(!1);
347
382
  }), !0;
348
383
  },
349
- [Mt, l]
350
- ), A = r(
351
- (e, t, u = {}) => {
352
- const n = S.current, g = R.current[e];
353
- if (!n || !g)
384
+ [Bt, i]
385
+ ), C = u(
386
+ (e, t, r = {}) => {
387
+ const n = g.current, b = k.current[e];
388
+ if (!n || !b)
354
389
  return !1;
355
- const I = Tt(g.audio_data), Le = Math.max(
356
- Number(u.seekTimeSeconds ?? 0),
390
+ const ee = Wt(b.audio_data), ze = Math.max(
391
+ Number(r.seekTimeSeconds ?? 0),
357
392
  0
358
393
  );
359
- U.current = e, m.current = null, x.current = !1, N.current = !0, J.current = "segment", C(
360
- G(e) + Le * 1e3
394
+ K.current = e, h.current = null, E.current = !1, F.current = !0, j.current = "segment", N(
395
+ q(e) + ze * 1e3
361
396
  );
362
- const Rt = u.shouldResume ?? H();
363
- c.current = Rt, l(!1);
364
- const lr = K.current !== I;
365
- return F.current = "segment", lr && (n.pause(), n.removeAttribute("src"), n.load(), K.current = I, n.src = I, n.load()), T.current = Le, n.readyState > 0 && (n.currentTime = Le, T.current = null), Rt ? L(`start-segment:${t}`) : (c.current = !1, N.current = !1, n.pause(), h(!1), !0);
397
+ const Dt = r.shouldResume ?? I();
398
+ c.current = Dt, i(!1);
399
+ const yr = P.current !== ee;
400
+ return B.current = "segment", yr && (n.pause(), n.removeAttribute("src"), n.load(), P.current = ee, n.src = ee, n.load()), x.current = ze, n.readyState > 0 && (n.currentTime = ze, x.current = null), Dt ? v(`start-segment:${t}`) : (c.current = !1, F.current = !1, n.pause(), S(!1), !0);
366
401
  },
367
402
  [
368
- H,
369
- Tt,
370
- G,
371
- C,
372
- L,
373
- l
403
+ I,
404
+ Wt,
405
+ q,
406
+ N,
407
+ v,
408
+ i
374
409
  ]
375
- ), Ce = r(
410
+ ), le = u(
411
+ (e, t) => {
412
+ const r = g.current;
413
+ if (!r)
414
+ return !1;
415
+ const n = Math.max(Number(t), 0) / 1e3;
416
+ return P.current !== e && (r.pause(), r.removeAttribute("src"), r.load(), P.current = e, B.current = "url", j.current = "url", r.src = e, r.load()), x.current = n, N(n * 1e3), r.readyState > 0 && (r.currentTime = n, x.current = null), !0;
417
+ },
418
+ [N]
419
+ ), Ke = u(
376
420
  (e) => {
377
- const t = S.current;
378
- if (!t || !p || w)
421
+ const t = g.current;
422
+ if (!t || !f || T)
379
423
  return !1;
380
- const u = Math.max(Number(e), 0), n = !t.paused && !t.ended || c.current || N.current || m.current !== null && le.current && !M.current, g = Et(
381
- R.current,
382
- u
383
- ) ? xr(
384
- R.current,
385
- u
424
+ const r = Math.max(Number(e), 0), n = !t.paused && !t.ended || c.current || F.current || h.current !== null && me.current && !L.current, b = Qe(
425
+ k.current,
426
+ r
427
+ ) ? Jt(
428
+ k.current,
429
+ r
386
430
  ) : null;
387
- if (Se.current = null, _(), c.current = n, l(!1), n && (W.current = "manual", M.current = !1, O(!0)), g && (F.current === "segment" || !v))
388
- return A(
389
- g.segmentIndex,
390
- "subtitle-seek-segment",
391
- {
392
- seekTimeSeconds: g.segmentTimeSeconds,
393
- shouldResume: n
394
- }
395
- );
396
- if (v) {
397
- const I = u / 1e3;
398
- return K.current !== v && (t.pause(), t.removeAttribute("src"), t.load(), K.current = v, F.current = "url", J.current = "url", t.src = v, t.load()), T.current = I, C(u), t.readyState > 0 && (t.currentTime = I, T.current = null), n ? L("subtitle-seek-url") : (c.current = !1, t.pause(), h(!1), !0);
399
- }
400
- return !1;
431
+ return Ae.current = null, M(), c.current = n, i(!1), n && (O.current = "manual", L.current = !1, V(!0)), b && (B.current === "segment" || !A) ? C(
432
+ b.segmentIndex,
433
+ "subtitle-seek-segment",
434
+ {
435
+ seekTimeSeconds: b.segmentTimeSeconds,
436
+ shouldResume: n
437
+ }
438
+ ) : A && le(A, r) ? n ? v("subtitle-seek-url") : (c.current = !1, t.pause(), S(!1), !0) : !1;
401
439
  },
402
440
  [
403
- p,
404
- v,
405
- w,
441
+ f,
442
+ A,
443
+ T,
444
+ le,
406
445
  C,
446
+ M,
447
+ v,
448
+ i,
449
+ V
450
+ ]
451
+ ), Rt = u(
452
+ (e) => {
453
+ if (!g.current || !f)
454
+ return !1;
455
+ const r = Math.max(Number(e), 0), n = Qe(
456
+ k.current,
457
+ r
458
+ ) ? Jt(
459
+ k.current,
460
+ r
461
+ ) : null;
462
+ return c.current = !0, i(!1), n && (B.current === "segment" || !A) ? C(n.segmentIndex, "restore", {
463
+ seekTimeSeconds: n.segmentTimeSeconds,
464
+ shouldResume: !0
465
+ }) : !A || !le(A, r) ? !1 : (v("restore"), !0);
466
+ },
467
+ [
468
+ f,
407
469
  A,
408
- _,
409
- L,
410
- l,
411
- O
470
+ le,
471
+ C,
472
+ v,
473
+ i
412
474
  ]
413
- ), ie = r(
475
+ ), Se = u(
414
476
  (e) => {
415
- const t = ce(
477
+ const t = ge(
416
478
  e,
417
- Te(),
479
+ D(),
418
480
  {
419
- excludeTarget: e === "previous" ? se.current : null
481
+ excludeTarget: e === "previous" ? he.current : null
420
482
  }
421
483
  );
422
484
  if (t === null)
423
485
  return !1;
424
- if (t.audioIndex === a) {
425
- const n = Ce(t.timeMs);
426
- return n && (se.current = t), n;
486
+ if (t.audioIndex === l) {
487
+ const n = Ke(t.timeMs);
488
+ return n && (he.current = t), n;
427
489
  }
428
- const u = !!me?.(
490
+ const r = !!Me?.(
429
491
  t,
430
- He(Y())
492
+ Ge(X())
431
493
  );
432
- return u && (se.current = t), u;
494
+ return r && (he.current = t), r;
433
495
  },
434
496
  [
435
- a,
436
- Te,
437
- Y,
438
- ce,
439
- me,
440
- Ce
497
+ l,
498
+ D,
499
+ X,
500
+ ge,
501
+ Me,
502
+ Ke
441
503
  ]
442
- ), te = r(
504
+ ), se = u(
443
505
  (e) => {
444
- _(), c.current = !1, x.current = !1, N.current = !1, y(), h(!1), l(!1), a >= 0 && je?.(a);
506
+ M(), c.current = !1, E.current = !1, F.current = !1, y(), S(!1), i(!1), l >= 0 && nt?.(l);
445
507
  },
446
508
  [
447
- a,
448
- je,
449
- _,
509
+ l,
510
+ nt,
511
+ M,
450
512
  y,
451
- l
513
+ i
452
514
  ]
453
- ), ve = r(
515
+ ), Fe = u(
454
516
  (e) => {
455
- const t = S.current;
456
- return !t || F.current !== "url" || !br({
517
+ const t = g.current;
518
+ return !t || B.current !== "url" || !Nr({
457
519
  currentTimeSeconds: Math.max(t.currentTime, 0),
458
520
  durationSeconds: t.duration
459
- }) ? !1 : (c.current = !1, t.pause(), te(e), !0);
521
+ }) ? !1 : (c.current = !1, t.pause(), se(e), !0);
460
522
  },
461
- [te]
462
- ), Lt = r(() => {
463
- const e = U.current + 1, t = R.current, u = t[e], n = ge.current, g = t.some((I) => I.is_final);
464
- if (u) {
465
- A(e, "ended");
523
+ [se]
524
+ ), Vt = u(() => {
525
+ const e = K.current + 1, t = k.current, r = t[e], n = de.current, b = t.some((ee) => ee.is_final);
526
+ if (r) {
527
+ C(e, "ended");
466
528
  return;
467
529
  }
468
- if (n?.isAudioStreaming || !g) {
469
- U.current = e, m.current = e, x.current = !0, c.current = k, C(G(e)), h(!1), l(!0, "waitingForMoreAudio");
530
+ if (n?.isAudioStreaming || !b) {
531
+ K.current = e, h.current = e, E.current = !0, c.current = w, N(q(e)), S(!1), i(!0, "waitingForMoreAudio");
470
532
  return;
471
533
  }
472
- te("segments-completed");
534
+ se("segments-completed");
473
535
  }, [
474
- k,
475
- te,
476
- G,
536
+ w,
537
+ se,
538
+ q,
539
+ N,
477
540
  C,
478
- A,
479
- l
541
+ i
480
542
  ]);
481
- b(() => {
482
- if (lt.current === Pe)
543
+ m(() => {
544
+ if (Le.current === $e)
483
545
  return;
484
- lt.current = Pe, U.current = 0, m.current = null, x.current = !1, M.current = !1, ae.current = !1, c.current = !1, N.current = !1, F.current = null, J.current = null, K.current = null, _(), C(0), l(!1);
485
- const e = S.current;
486
- e && (e.pause(), e.removeAttribute("src"), e.load(), h(!1));
546
+ $(!0), Le.current = $e, K.current = 0, h.current = null, E.current = !1, L.current = !1, pe.current = !1, c.current = !1, F.current = !1, B.current = null, j.current = null, P.current = null, M(), N(0), i(!1);
547
+ const e = g.current;
548
+ e && (Ie.current = !0, e.pause(), e.removeAttribute("src"), e.load(), Ie.current = !1, S(!1));
487
549
  }, [
488
- a,
489
- Pe,
490
- E.length,
491
- v,
492
- C,
493
- _,
494
- l
495
- ]), b(() => {
496
- const e = S.current;
550
+ l,
551
+ $e,
552
+ U.length,
553
+ A,
554
+ $,
555
+ N,
556
+ M,
557
+ i
558
+ ]), m(() => {
559
+ const e = g.current;
497
560
  if (e) {
498
- if (w) {
499
- ae.current = !!(ge.current && !M.current && (!e.paused || c.current || m.current !== null)), c.current = !1, l(!1), e.pause(), h(!1);
561
+ if (T) {
562
+ pe.current = !!(de.current && !L.current && (!e.paused || c.current || h.current !== null)), c.current = !1, i(!1), e.pause(), S(!1);
500
563
  return;
501
564
  }
502
- if (!(!ae.current || !ge.current || M.current)) {
503
- if (ae.current = !1, m.current !== null) {
504
- if (m.current < R.current.length) {
505
- A(m.current, "external-resume");
565
+ if (!(!pe.current || !de.current || L.current)) {
566
+ if (pe.current = !1, h.current !== null) {
567
+ if (h.current < k.current.length) {
568
+ C(h.current, "external-resume");
506
569
  return;
507
570
  }
508
- c.current = !0, l(!0, "waitingForMoreAudio");
571
+ c.current = !0, i(!0, "waitingForMoreAudio");
509
572
  return;
510
573
  }
511
- if (!K.current && R.current.length > 0) {
512
- A(
574
+ if (!P.current && k.current.length > 0) {
575
+ C(
513
576
  Math.min(
514
- U.current,
515
- R.current.length - 1
577
+ K.current,
578
+ k.current.length - 1
516
579
  ),
517
580
  "external-resume-init"
518
581
  );
519
582
  return;
520
583
  }
521
- e.paused && (c.current = !0, L("external-resume"));
584
+ e.paused && (c.current = !0, v("external-resume"));
522
585
  }
523
586
  }
524
587
  }, [
525
- w,
526
- A,
527
- L,
528
- l
529
- ]), b(() => {
530
- const e = S.current;
588
+ T,
589
+ C,
590
+ v,
591
+ i
592
+ ]), m(() => {
593
+ const e = g.current;
531
594
  if (!e)
532
595
  return;
533
- if (!p) {
534
- ee();
596
+ if (!f) {
597
+ ie();
535
598
  return;
536
599
  }
537
- if (w) {
538
- c.current = !1, l(!1), e.pause(), h(!1);
600
+ if (_ && _.id !== Y.current)
601
+ return;
602
+ if (T) {
603
+ c.current = !1, i(!1), e.pause(), S(!1);
539
604
  return;
540
605
  }
541
- const t = Cr({
542
- activeSourceType: F.current,
543
- hasAudioUrl: !!v,
544
- segmentCount: E.length,
545
- preferredSourceType: J.current,
546
- waitingSegmentIndex: m.current
606
+ const t = Or({
607
+ activeSourceType: B.current,
608
+ hasAudioUrl: !!A,
609
+ segmentCount: U.length,
610
+ preferredSourceType: j.current,
611
+ waitingSegmentIndex: h.current
547
612
  });
548
- if (t && J.current !== t && (J.current = t), t === "url" && v) {
549
- const u = K.current !== v, n = H();
550
- if (u) {
551
- const g = m.current !== null ? Ct() : 0;
552
- e.pause(), e.removeAttribute("src"), e.load(), K.current = v, F.current = "url", e.src = v, e.load(), T.current = g, C(g * 1e3), e.readyState > 0 && (e.currentTime = g, T.current = null);
613
+ if (t && j.current !== t && (j.current = t), t === "url" && A) {
614
+ const r = P.current !== A, n = I();
615
+ if (r) {
616
+ const b = h.current !== null ? Pt() : 0;
617
+ le(A, b * 1e3);
553
618
  }
554
- if (c.current = n, x.current = !1, N.current = !1, l(!1), !n) {
555
- c.current = !1, e.pause(), h(!1);
619
+ if (c.current = n, E.current = !1, F.current = !1, i(!1), !n) {
620
+ c.current = !1, e.pause(), S(!1);
556
621
  return;
557
622
  }
558
- L(u ? "sync-url-init" : "sync-url");
623
+ v(r ? "sync-url-init" : "sync-url");
559
624
  return;
560
625
  }
561
- if (t === "segment" && m.current !== null) {
562
- if (m.current < E.length) {
563
- if (M.current) {
564
- h(!1), l(!1);
626
+ if (t === "segment" && h.current !== null) {
627
+ if (h.current < U.length) {
628
+ if (L.current) {
629
+ S(!1), i(!1);
565
630
  return;
566
631
  }
567
- A(m.current, "wait-resume");
632
+ C(h.current, "wait-resume");
568
633
  return;
569
634
  }
570
- x.current = !0, c.current = H(), h(!1), l(H());
635
+ E.current = !0, c.current = I(), S(!1), i(I());
571
636
  return;
572
637
  }
573
- if (t === "segment" && !E.length) {
574
- if (p.isAudioStreaming) {
575
- m.current = U.current, x.current = !0, c.current = H(), h(!1), l(H());
638
+ if (t === "segment" && !U.length) {
639
+ if (f.isAudioStreaming) {
640
+ h.current = K.current, E.current = !0, c.current = I(), S(!1), i(I());
576
641
  return;
577
642
  }
578
- ee();
643
+ ie();
579
644
  return;
580
645
  }
581
- if (t === "segment" && !K.current) {
582
- A(
646
+ if (t === "segment" && !P.current) {
647
+ C(
583
648
  Math.min(
584
- U.current,
585
- E.length - 1
649
+ K.current,
650
+ U.length - 1
586
651
  ),
587
652
  "effect-init"
588
653
  );
589
654
  return;
590
655
  }
591
656
  if (t !== "segment") {
592
- ee();
657
+ ie();
593
658
  return;
594
659
  }
595
- if (!k || M.current) {
596
- c.current = !1, e.pause(), h(!1);
660
+ if (!w || L.current) {
661
+ c.current = !1, e.pause(), S(!1);
597
662
  return;
598
663
  }
599
- e.paused && (c.current = !0, L("sync-paused-retry"));
664
+ e.paused && (c.current = !0, v("sync-paused-retry"));
600
665
  }, [
601
- p,
602
- a,
603
- E,
604
- v,
605
- k,
666
+ f,
667
+ l,
668
+ U,
669
+ A,
606
670
  w,
607
- H,
671
+ T,
672
+ _,
673
+ I,
674
+ ie,
675
+ le,
608
676
  C,
609
- ee,
610
- A,
611
- L,
612
- Ct,
613
- l
614
- ]), b(() => {
615
- if (!V || V.id === ct.current || V.audioIndex !== a)
677
+ v,
678
+ Pt,
679
+ i
680
+ ]), m(() => {
681
+ if (!H || H.id === St.current || H.audioIndex !== l)
616
682
  return;
617
- const e = f[V.audioIndex];
618
- Me(e, V.timeMs) && (ct.current = V.id, Ce(V.timeMs));
683
+ const e = d[H.audioIndex];
684
+ Ne(e, H.timeMs) && (St.current = H.id, Ke(H.timeMs));
619
685
  }, [
620
- f,
621
- Me,
622
- a,
623
- Ce,
624
- V
625
- ]), b(() => ee, [ee]), b(() => _, [_]);
626
- const Yt = r(() => {
627
- y(), vt(), h(!0), l(!1), De?.();
686
+ d,
687
+ Ne,
688
+ l,
689
+ Ke,
690
+ H
691
+ ]), m(() => {
692
+ if (!(!_ || _.id === Y.current || l < 0)) {
693
+ if (Rt(_.timeMs)) {
694
+ Y.current = _.id, ce?.(_.id);
695
+ return;
696
+ }
697
+ f?.isAudioStreaming || (Y.current = _.id, ce?.(_.id));
698
+ }
628
699
  }, [
629
- De,
630
- vt,
700
+ f?.isAudioStreaming,
701
+ l,
702
+ ce,
703
+ _,
704
+ Rt
705
+ ]), m(() => {
706
+ if (!_ || _.id === Y.current || l < 0 || !f?.isAudioStreaming)
707
+ return;
708
+ const e = window.setTimeout(() => {
709
+ _.id !== Y.current && (Y.current = _.id, ce?.(_.id));
710
+ }, un);
711
+ return () => {
712
+ window.clearTimeout(e);
713
+ };
714
+ }, [
715
+ f?.isAudioStreaming,
716
+ l,
717
+ ce,
718
+ _
719
+ ]), m(() => ie, [ie]), m(() => M, [M]);
720
+ const ar = u(() => {
721
+ y(), Ot(), S(!0), i(!1), et?.();
722
+ }, [
723
+ et,
724
+ Ot,
631
725
  y,
632
- l
633
- ]), Gt = r(() => {
634
- x.current || N.current || (_(), y(), h(!1));
635
- }, [a, _, y]), Qt = r(() => {
636
- const e = S.current;
637
- e && T.current !== null && (e.currentTime = T.current, T.current = null), y(), !ve("canplay-seek-finished") && (!c.current || !k || L("canplay"));
726
+ i
727
+ ]), cr = u(() => {
728
+ Ie.current || E.current || F.current || (M(), y(), $(!0), S(!1));
729
+ }, [$, M, y]), or = u(() => {
730
+ const e = g.current;
731
+ e && x.current !== null && (e.currentTime = x.current, x.current = null), y(), !Fe("canplay-seek-finished") && (!c.current || !w || v("canplay"));
638
732
  }, [
639
- a,
640
- k,
641
- ve,
733
+ l,
734
+ w,
735
+ Fe,
642
736
  y,
643
- L
644
- ]), Xt = r(() => {
645
- const e = S.current;
646
- e && T.current !== null && (e.currentTime = T.current, T.current = null), y(), ve("metadata-seek-finished");
647
- }, [a, ve, y]), qt = r(() => {
648
- y();
649
- }, [y]), er = r(() => {
650
- x.current || l(!0, "loadingAudio");
651
- }, [l]), tr = r(() => {
652
- if (x.current) {
653
- l(!0, "waitingForMoreAudio");
737
+ v
738
+ ]), fr = u(() => {
739
+ const e = g.current;
740
+ e && x.current !== null && (e.currentTime = x.current, x.current = null), y(), Fe("metadata-seek-finished");
741
+ }, [l, Fe, y]), dr = u(() => {
742
+ y(), $();
743
+ }, [$, y]), mr = u(() => {
744
+ E.current || i(!0, "loadingAudio");
745
+ }, [i]), pr = u(() => {
746
+ if (E.current) {
747
+ i(!0, "waitingForMoreAudio");
654
748
  return;
655
749
  }
656
- l(!0, "loadingAudio");
657
- }, [l]), xt = r(() => {
750
+ i(!0, "loadingAudio");
751
+ }, [i]), Ht = u(() => {
658
752
  y();
659
- }, [y]), rr = r(() => {
660
- const e = F.current === "url" || R.current.length === 0;
661
- if (_(), N.current = !1, e) {
662
- te("url-ended");
753
+ }, [y]), hr = u(() => {
754
+ const e = de.current, t = B.current === "url" || k.current.length === 0, r = !!k.current[K.current + 1], n = k.current.some(
755
+ (ee) => ee.is_final
756
+ ), b = !!e?.isAudioStreaming;
757
+ if ($(
758
+ !0,
759
+ t || !b && !r && n
760
+ ), M(), F.current = !1, t) {
761
+ se("url-ended");
663
762
  return;
664
763
  }
665
- Lt();
666
- }, [te, Lt, _]), nr = r(() => {
667
- _(), y(), h(!1), l(!1);
668
- }, [_, y, l]), ur = r(
764
+ Vt();
765
+ }, [
766
+ $,
767
+ se,
768
+ Vt,
769
+ M
770
+ ]), gr = u(() => {
771
+ M(), y(), S(!1), i(!1);
772
+ }, [M, y, i]), Sr = u(
669
773
  (e) => {
670
- Ze?.(e), X(!1);
774
+ rt?.(e), ne(!1);
671
775
  },
672
- [Ze]
673
- ), Be = r(() => {
674
- if (P) {
675
- const t = !D;
676
- return O(t), ze?.(t), !0;
776
+ [rt]
777
+ ), Ze = u(() => {
778
+ if (W) {
779
+ const t = !Z;
780
+ return V(t), ut?.(t), !0;
677
781
  }
678
- const e = S.current;
679
- return w || !e || !p ? !1 : m.current !== null ? _e ? (O(!1), c.current = !1, M.current = !0, m.current = null, x.current = !1, h(!1), l(!1), e.pause(), !0) : (O(!0), W.current = "manual", M.current = !1, c.current = !0, l(!0, "waitingForMoreAudio"), !0) : !e.src && E.length > 0 ? (O(!0), W.current = "manual", M.current = !1, A(
782
+ const e = g.current;
783
+ return T || !e || !f ? !1 : h.current !== null ? Ce ? (V(!1), c.current = !1, L.current = !0, h.current = null, E.current = !1, S(!1), i(!1), e.pause(), !0) : (V(!0), O.current = "manual", L.current = !1, c.current = !0, i(!0, "waitingForMoreAudio"), !0) : !e.src && U.length > 0 ? (V(!0), O.current = "manual", L.current = !1, C(
680
784
  Math.min(
681
- U.current,
682
- E.length - 1
785
+ K.current,
786
+ U.length - 1
683
787
  ),
684
788
  "toggle"
685
- ), !0) : e.paused ? (O(!0), W.current = "manual", M.current = !1, c.current = !0, L("toggle-resume"), !0) : (O(!1), c.current = !1, M.current = !0, e.pause(), !0);
789
+ ), !0) : e.paused ? (V(!0), O.current = "manual", L.current = !1, c.current = !0, v("toggle-resume"), !0) : (V(!1), c.current = !1, L.current = !0, e.pause(), !0);
686
790
  }, [
687
- p,
688
- E.length,
689
- D,
690
- w,
691
- _e,
692
- ze,
693
- A,
694
- L,
695
- l,
696
- O,
697
- P
791
+ f,
792
+ U.length,
793
+ Z,
794
+ T,
795
+ Ce,
796
+ ut,
797
+ C,
798
+ v,
799
+ i,
800
+ V,
801
+ W
698
802
  ]);
699
- b(() => {
700
- if (B)
701
- return kr(j);
702
- }, [j, B]);
703
- const Oe = re(
803
+ m(() => {
804
+ if (R)
805
+ return Ur(G);
806
+ }, [G, R]);
807
+ const je = ae(
704
808
  () => ({
705
- fullscreen: () => ue ? (ue(), !0) : !1,
706
- next: () => de ? (Ne || de(
707
- He(Y())
809
+ fullscreen: () => fe ? (fe(), !0) : !1,
810
+ next: () => _e ? (Pe || _e(
811
+ Ge(X())
708
812
  ), !0) : !1,
709
- nextSubtitle: () => q.next ? ie("next") : !0,
710
- previous: () => fe ? (Re || fe(
711
- He(Y())
813
+ nextSubtitle: () => ue.next ? Se("next") : !0,
814
+ previous: () => be ? (We || be(
815
+ Ge(X())
712
816
  ), !0) : !1,
713
- previousSubtitle: () => q.previous ? ie("previous") : !0,
714
- subtitle: () => ne ? (ne(), !0) : !1,
715
- togglePlayback: () => (Be(), !0)
817
+ previousSubtitle: () => ue.previous ? Se("previous") : !0,
818
+ subtitle: () => oe ? (oe(), !0) : !1,
819
+ togglePlayback: () => (Ze(), !0)
716
820
  }),
717
821
  [
718
- Y,
719
- ie,
720
- Ne,
721
- ue,
722
- de,
822
+ X,
823
+ Se,
824
+ Pe,
723
825
  fe,
724
- ne,
725
- Re,
726
- q.next,
727
- q.previous,
728
- Be
826
+ _e,
827
+ be,
828
+ oe,
829
+ We,
830
+ ue.next,
831
+ ue.previous,
832
+ Ze
729
833
  ]
730
- ), At = o(Oe);
731
- return b(() => {
732
- At.current = Oe;
733
- }, [Oe]), b(() => {
734
- if (!B || typeof document > "u")
834
+ ), It = s(je);
835
+ return m(() => {
836
+ It.current = je;
837
+ }, [je]), m(() => {
838
+ if (!R || typeof document > "u")
735
839
  return;
736
840
  const e = (t) => {
737
- if (!wr(j))
841
+ if (!Br(G))
738
842
  return;
739
- const u = Mr(t, nt());
740
- if (!u || Tr(t, u))
843
+ const r = Wr(t, mt());
844
+ if (!r || Pr(t, r))
741
845
  return;
742
846
  let n = !1;
743
- const g = At.current[u];
744
- n = g(), n && t.preventDefault();
847
+ const b = It.current[r];
848
+ n = b(), n && t.preventDefault();
745
849
  };
746
850
  return document.addEventListener("keydown", e), () => {
747
851
  document.removeEventListener("keydown", e);
748
852
  };
749
- }, [j, nt, B]), b(() => {
750
- oe?.(be.current);
751
- }, [oe]), /* @__PURE__ */ Q(
853
+ }, [G, mt, R]), m(() => {
854
+ ye?.(ve.current);
855
+ }, [ye]), /* @__PURE__ */ te(
752
856
  "div",
753
857
  {
754
- ...Ke,
755
- dir: Ue,
756
- lang: et,
757
- "data-slide-player-shortcut-owner": j,
758
- className: pr("slide-player", d),
759
- onFocusCapture: zt,
760
- onPointerDown: jt,
858
+ ...Re,
859
+ dir: Ve,
860
+ lang: ot,
861
+ "data-slide-player-shortcut-owner": G,
862
+ className: Ar("slide-player", p),
863
+ onFocusCapture: sr,
864
+ onPointerDown: lr,
761
865
  children: [
762
- /* @__PURE__ */ s(
866
+ /* @__PURE__ */ a(
763
867
  "audio",
764
868
  {
765
- ref: S,
869
+ ref: g,
766
870
  preload: "auto",
767
871
  playsInline: !0,
768
- onLoadStart: er,
769
- onLoadedMetadata: Xt,
770
- onCanPlay: Qt,
771
- onPlay: Yt,
772
- onPause: Gt,
773
- onWaiting: tr,
774
- onSeeking: xt,
775
- onSeeked: xt,
776
- onTimeUpdate: qt,
777
- onEnded: rr,
778
- onError: nr
872
+ onLoadStart: mr,
873
+ onLoadedMetadata: fr,
874
+ onCanPlay: or,
875
+ onPlay: ar,
876
+ onPause: cr,
877
+ onWaiting: pr,
878
+ onSeeking: Ht,
879
+ onSeeked: Ht,
880
+ onTimeUpdate: dr,
881
+ onEnded: hr,
882
+ onError: gr
779
883
  }
780
884
  ),
781
- Ee ? /* @__PURE__ */ Q(Nt, { children: [
782
- /* @__PURE__ */ s(
783
- hr,
885
+ Oe ? /* @__PURE__ */ te($t, { children: [
886
+ /* @__PURE__ */ a(
887
+ Cr,
784
888
  {
785
- container: Wt,
786
- dir: Ue ?? rt,
787
- lang: It,
889
+ container: Gt,
890
+ dir: Ve ?? dt,
891
+ lang: tr,
788
892
  labels: {
789
- closeSettings: i.closeSettingsLabel,
790
- fullscreen: i.fullscreenLabel,
791
- nonFullscreen: i.nonFullscreenLabel,
792
- screen: i.screenLabel,
793
- screenMode: i.screenModeLabel,
794
- subtitle: i.subtitleLabel,
795
- subtitleToggle: i.subtitleToggleAriaLabel,
796
- title: i.settingsTitle
893
+ closeSettings: o.closeSettingsLabel,
894
+ fullscreen: o.fullscreenLabel,
895
+ nonFullscreen: o.nonFullscreenLabel,
896
+ screen: o.screenLabel,
897
+ screenMode: o.screenModeLabel,
898
+ subtitle: o.subtitleLabel,
899
+ subtitleToggle: o.subtitleToggleAriaLabel,
900
+ title: o.settingsTitle
797
901
  },
798
- isSubtitleEnabled: Ae,
799
- onClose: () => X(!1),
800
- onOpenChange: X,
801
- onSubtitleToggle: ne ?? (() => {
902
+ isSubtitleEnabled: Be,
903
+ onClose: () => ne(!1),
904
+ onOpenChange: ne,
905
+ onSubtitleToggle: oe ?? (() => {
802
906
  }),
803
- onViewModeChange: ur,
804
- open: ot,
805
- viewMode: Pt
907
+ onViewModeChange: Sr,
908
+ open: wt,
909
+ viewMode: Yt
806
910
  }
807
911
  ),
808
- /* @__PURE__ */ Q(
912
+ /* @__PURE__ */ te(
809
913
  "div",
810
914
  {
811
915
  className: "slide-player__controls",
812
- onPointerEnter: Bt,
813
- onPointerLeave: Ot,
814
- style: Jt,
916
+ onPointerEnter: Qt,
917
+ onPointerLeave: Xt,
918
+ style: ur,
815
919
  children: [
816
- /* @__PURE__ */ Q("div", { className: "slide-player__group", children: [
817
- /* @__PURE__ */ s(
920
+ /* @__PURE__ */ te("div", { className: "slide-player__group", children: [
921
+ /* @__PURE__ */ a(
818
922
  "button",
819
923
  {
820
- "aria-expanded": ot,
924
+ "aria-expanded": wt,
821
925
  "aria-haspopup": "dialog",
822
- "aria-label": i.moreOptionsAriaLabel,
926
+ "aria-label": o.moreOptionsAriaLabel,
823
927
  className: "slide-player__action slide-player__action--mobile-more",
824
928
  onClick: () => {
825
- X((e) => !e);
929
+ ne((e) => !e);
826
930
  },
827
931
  type: "button",
828
- children: /* @__PURE__ */ s(
829
- Nr,
932
+ children: /* @__PURE__ */ a(
933
+ Dr,
830
934
  {
831
935
  className: "slide-player__icon",
832
936
  strokeWidth: 2.25
@@ -834,58 +938,58 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
834
938
  )
835
939
  }
836
940
  ),
837
- /* @__PURE__ */ s(
941
+ /* @__PURE__ */ a(
838
942
  "button",
839
943
  {
840
- "aria-label": i.volumeAriaLabel,
944
+ "aria-label": o.volumeAriaLabel,
841
945
  className: "hidden",
842
946
  type: "button",
843
- children: /* @__PURE__ */ s(Er, { className: "slide-player__icon", strokeWidth: 2.25 })
947
+ children: /* @__PURE__ */ a($r, { className: "slide-player__icon", strokeWidth: 2.25 })
844
948
  }
845
949
  ),
846
- /* @__PURE__ */ s(
950
+ /* @__PURE__ */ a(
847
951
  "button",
848
952
  {
849
- "aria-label": pt,
850
- "aria-keyshortcuts": St.ariaKeyShortcuts,
953
+ "aria-label": vt,
954
+ "aria-keyshortcuts": Nt.ariaKeyShortcuts,
851
955
  className: "slide-player__toggle slide-player__toggle--playback",
852
956
  onClick: () => {
853
- Be();
957
+ Ze();
854
958
  },
855
- title: St.title,
959
+ title: Nt.title,
856
960
  type: "button",
857
- children: Zt ? /* @__PURE__ */ s($r, {}) : /* @__PURE__ */ s(Dr, {})
961
+ children: ir ? /* @__PURE__ */ a(tn, {}) : /* @__PURE__ */ a(rn, {})
858
962
  }
859
963
  ),
860
- /* @__PURE__ */ s(
964
+ /* @__PURE__ */ a(
861
965
  "button",
862
966
  {
863
- "aria-keyshortcuts": gt.ariaKeyShortcuts,
864
- "aria-label": i.previousLabel,
967
+ "aria-keyshortcuts": xt.ariaKeyShortcuts,
968
+ "aria-label": o.previousLabel,
865
969
  className: "slide-player__action slide-player__action--prev",
866
- disabled: Re,
970
+ disabled: We,
867
971
  onClick: () => {
868
- fe?.(Y());
972
+ be?.(X());
869
973
  },
870
- title: gt.title,
974
+ title: xt.title,
871
975
  type: "button",
872
- children: /* @__PURE__ */ s(Kr, { className: "slide-player__icon", strokeWidth: 2.25 })
976
+ children: /* @__PURE__ */ a(Jr, { className: "slide-player__icon", strokeWidth: 2.25 })
873
977
  }
874
978
  ),
875
- /* @__PURE__ */ s(
979
+ /* @__PURE__ */ a(
876
980
  "button",
877
981
  {
878
- "aria-keyshortcuts": _t.ariaKeyShortcuts,
879
- "aria-label": i.nextLabel,
982
+ "aria-keyshortcuts": Kt.ariaKeyShortcuts,
983
+ "aria-label": o.nextLabel,
880
984
  className: "slide-player__action slide-player__action--next",
881
- disabled: Ne,
985
+ disabled: Pe,
882
986
  onClick: () => {
883
- de?.(Y());
987
+ _e?.(X());
884
988
  },
885
- title: _t.title,
989
+ title: Kt.title,
886
990
  type: "button",
887
- children: /* @__PURE__ */ s(
888
- Ur,
991
+ children: /* @__PURE__ */ a(
992
+ Zr,
889
993
  {
890
994
  className: "slide-player__icon",
891
995
  strokeWidth: 2.25
@@ -893,35 +997,35 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
893
997
  )
894
998
  }
895
999
  ),
896
- /* @__PURE__ */ s(
1000
+ /* @__PURE__ */ a(
897
1001
  "button",
898
1002
  {
899
- "aria-keyshortcuts": bt.ariaKeyShortcuts,
900
- "aria-label": i.previousSubtitleLabel,
1003
+ "aria-keyshortcuts": Et.ariaKeyShortcuts,
1004
+ "aria-label": o.previousSubtitleLabel,
901
1005
  className: "slide-player__action slide-player__action--prev-subtitle",
902
- disabled: !q.previous,
1006
+ disabled: !ue.previous,
903
1007
  onClick: () => {
904
- ie("previous");
1008
+ Se("previous");
905
1009
  },
906
- title: bt.title,
1010
+ title: Et.title,
907
1011
  type: "button",
908
- children: /* @__PURE__ */ s(Fr, { className: "slide-player__icon", strokeWidth: 2.25 })
1012
+ children: /* @__PURE__ */ a(jr, { className: "slide-player__icon", strokeWidth: 2.25 })
909
1013
  }
910
1014
  ),
911
- /* @__PURE__ */ s(
1015
+ /* @__PURE__ */ a(
912
1016
  "button",
913
1017
  {
914
- "aria-keyshortcuts": kt.ariaKeyShortcuts,
915
- "aria-label": i.nextSubtitleLabel,
1018
+ "aria-keyshortcuts": Ft.ariaKeyShortcuts,
1019
+ "aria-label": o.nextSubtitleLabel,
916
1020
  className: "slide-player__action slide-player__action--next-subtitle",
917
- disabled: !q.next,
1021
+ disabled: !ue.next,
918
1022
  onClick: () => {
919
- ie("next");
1023
+ Se("next");
920
1024
  },
921
- title: kt.title,
1025
+ title: Ft.title,
922
1026
  type: "button",
923
- children: /* @__PURE__ */ s(
924
- Pr,
1027
+ children: /* @__PURE__ */ a(
1028
+ zr,
925
1029
  {
926
1030
  className: "slide-player__icon",
927
1031
  strokeWidth: 2.25
@@ -929,18 +1033,18 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
929
1033
  )
930
1034
  }
931
1035
  ),
932
- /* @__PURE__ */ s(
1036
+ /* @__PURE__ */ a(
933
1037
  "button",
934
1038
  {
935
- "aria-label": i.subtitleToggleAriaLabel,
936
- "aria-keyshortcuts": yt.ariaKeyShortcuts,
937
- "aria-pressed": Ae,
1039
+ "aria-label": o.subtitleToggleAriaLabel,
1040
+ "aria-keyshortcuts": Ct.ariaKeyShortcuts,
1041
+ "aria-pressed": Be,
938
1042
  className: "slide-player__action slide-player__action--subtitle",
939
- onClick: ne,
940
- title: yt.title,
1043
+ onClick: oe,
1044
+ title: Ct.title,
941
1045
  type: "button",
942
- children: Ae ? /* @__PURE__ */ s(Wr, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ s(
943
- Br,
1046
+ children: Be ? /* @__PURE__ */ a(Yr, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ a(
1047
+ Gr,
944
1048
  {
945
1049
  className: "slide-player__icon",
946
1050
  strokeWidth: 2.25
@@ -948,23 +1052,23 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
948
1052
  )
949
1053
  }
950
1054
  ),
951
- ue ? /* @__PURE__ */ s(
1055
+ fe ? /* @__PURE__ */ a(
952
1056
  "button",
953
1057
  {
954
- "aria-label": ht,
955
- "aria-keyshortcuts": wt.ariaKeyShortcuts,
1058
+ "aria-label": At,
1059
+ "aria-keyshortcuts": Ut.ariaKeyShortcuts,
956
1060
  className: "slide-player__action slide-player__action--fullscreen",
957
- onClick: ue,
958
- title: wt.title,
1061
+ onClick: fe,
1062
+ title: Ut.title,
959
1063
  type: "button",
960
- children: Je ? /* @__PURE__ */ s(
961
- Or,
1064
+ children: tt ? /* @__PURE__ */ a(
1065
+ Qr,
962
1066
  {
963
1067
  className: "slide-player__icon",
964
1068
  strokeWidth: 2.25
965
1069
  }
966
- ) : /* @__PURE__ */ s(
967
- Vr,
1070
+ ) : /* @__PURE__ */ a(
1071
+ Xr,
968
1072
  {
969
1073
  className: "slide-player__icon",
970
1074
  strokeWidth: 2.25
@@ -973,9 +1077,9 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
973
1077
  }
974
1078
  ) : null
975
1079
  ] }),
976
- Fe.length > 0 ? /* @__PURE__ */ Q(Nt, { children: [
977
- /* @__PURE__ */ s("div", { className: "slide-player__separator" }),
978
- /* @__PURE__ */ s("div", { className: "slide-player__group slide-player__group--custom-actions", children: Fe.map((e, t) => /* @__PURE__ */ s(ar.Fragment, { children: e }, `custom-action-${t}`)) })
1080
+ De.length > 0 ? /* @__PURE__ */ te($t, { children: [
1081
+ /* @__PURE__ */ a("div", { className: "slide-player__separator" }),
1082
+ /* @__PURE__ */ a("div", { className: "slide-player__group slide-player__group--custom-actions", children: De.map((e, t) => /* @__PURE__ */ a(br.Fragment, { children: e }, `custom-action-${t}`)) })
979
1083
  ] }) : null
980
1084
  ]
981
1085
  }
@@ -984,9 +1088,9 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
984
1088
  ]
985
1089
  }
986
1090
  );
987
- }, zr = sr(jr);
988
- zr.displayName = "Player";
1091
+ }, an = _r(sn);
1092
+ an.displayName = "Player";
989
1093
  export {
990
- zr as default
1094
+ an as default
991
1095
  };
992
1096
  //# sourceMappingURL=Player.es.js.map