markdown-flow-ui 0.2.25 → 0.2.26-dev.1

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