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

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 (51) hide show
  1. package/dist/_virtual/index.es3.js +4 -5
  2. package/dist/_virtual/index.es3.js.map +1 -1
  3. package/dist/_virtual/index.es4.js +5 -4
  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 +2 -1
  15. package/dist/components/Slide/Player.es.js +192 -195
  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 +3 -1
  20. package/dist/components/Slide/Slide.es.js +608 -599
  21. package/dist/components/Slide/Slide.es.js.map +1 -1
  22. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  23. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  24. package/dist/markdown-flow-ui.css +1 -1
  25. package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
  26. package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  27. package/dist/node_modules/classnames/index.cjs +1 -1
  28. package/dist/node_modules/classnames/index.es.js +1 -1
  29. package/dist/node_modules/cose-base/cose-base.cjs +1 -1
  30. package/dist/node_modules/cose-base/cose-base.cjs.map +1 -1
  31. package/dist/node_modules/cose-base/cose-base.es.js +1 -1
  32. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.cjs +1 -1
  33. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.cjs.map +1 -1
  34. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.es.js +1 -1
  35. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs +1 -1
  36. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs.map +1 -1
  37. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.es.js +1 -1
  38. package/dist/node_modules/layout-base/layout-base.cjs +1 -1
  39. package/dist/node_modules/layout-base/layout-base.cjs.map +1 -1
  40. package/dist/node_modules/layout-base/layout-base.es.js +1 -1
  41. package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
  42. package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
  43. package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
  44. package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  45. package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
  46. package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  47. package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
  48. package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
  49. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
  50. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +1 -1
  51. package/package.json +1 -1
@@ -1,277 +1,273 @@
1
- import { jsxs as Ge, jsx as u, Fragment as Gr } from "react/jsx-runtime";
2
- import { memo as $r, useMemo as f, useId as zr, useRef as m, useCallback as r, useState as p, useEffect as s, useLayoutEffect as Xr } from "react";
3
- import { isSandboxInteractionMessage as Jr } from "../../lib/sandboxInteraction.es.js";
4
- import { cn as we } from "../../lib/utils.es.js";
5
- import { useResolvedDirection as Wr } from "../../lib/useResolvedDirection.es.js";
6
- import { getMarkdownFlowDirection as jr, getMarkdownFlowLanguage as Qr } from "../../lib/locale.es.js";
7
- import Zr from "../ui/loading-overlay-card.es.js";
8
- import eo from "../ContentRender/ContentRender.es.js";
9
- import Ln from "../ContentRender/IframeSandbox.es.js";
1
+ import { jsxs as Ge, jsx as u, Fragment as $r } from "react/jsx-runtime";
2
+ import { memo as zr, useMemo as f, useId as Xr, useRef as m, useCallback as r, useState as p, useEffect as s, useLayoutEffect as Jr } from "react";
3
+ import { isSandboxInteractionMessage as Wr } from "../../lib/sandboxInteraction.es.js";
4
+ import { cn as Pe } from "../../lib/utils.es.js";
5
+ import { useResolvedDirection as jr } from "../../lib/useResolvedDirection.es.js";
6
+ import { getMarkdownFlowDirection as Qr, getMarkdownFlowLanguage as Zr } from "../../lib/locale.es.js";
7
+ import eo from "../ui/loading-overlay-card.es.js";
8
+ import to from "../ContentRender/ContentRender.es.js";
9
+ import Nn from "../ContentRender/IframeSandbox.es.js";
10
10
  import "../ui/inputGroup/input-group.es.js";
11
- import { isMobileDevice as to, isLandscapeViewport as Dn, subscribeMobileDeviceChange as no } from "../../lib/mobileDevice.es.js";
12
- import ro from "./Player.es.js";
13
- import oo from "./MarkdownSlideScaling.es.js";
14
- import io from "./SubtitleOverlay.es.js";
15
- import lo from "./useSlide.es.js";
16
- import ao from "./useWakePlayerFromIframe.es.js";
17
- import { PlayerKeyboardShortcutContext as so } from "./utils/playerKeyboardShortcutContext.es.js";
18
- import { activatePlayerKeyboardShortcutOwner as co } from "./utils/playerKeyboardShortcuts.es.js";
19
- import { DEFAULT_MOBILE_VIEW_MODE as vt, resolveMobileViewModeState as uo } from "./utils/mobileScreenMode.es.js";
20
- import { shouldRenderInteractionOverlay as fo, clampInteractionOverlayDragOffset as Nn, shouldPresentInteractionOverlay as mo } from "./utils/interactionPlayback.es.js";
21
- import { resolveMarkdownScalingMode as po } from "./utils/markdownScaling.es.js";
22
- import { shouldWakePlayerControlsAfterNavigation as Gt } from "./utils/playerNavigationContext.es.js";
23
- import { shouldAutoAdvanceIntoAppendedMarker as yo } from "./utils/appendedMarkerAdvance.es.js";
24
- import { resolvePendingStepAudioKey as ho, hasUnplayedStepAudio as go } from "./utils/stepAudioProgress.es.js";
25
- import { getPlaybackSequenceTransition as vo, shouldStartDefaultAudioSequence as So } from "./utils/playbackSequence.es.js";
26
- import { hasResolvedInteractionElement as Io, canReachSubtitleJumpTarget as Bn } from "./utils/subtitleJumpNavigation.es.js";
27
- import { resolvePlayerCustomActionElement as bo, getPlayerCustomActionCount as Ao } from "./utils/playerCustomActions.es.js";
28
- import { createPlaybackTimeStore as wo } from "./utils/playbackTimeStore.es.js";
29
- import { resolveSlideInteractionState as xo } from "./utils/interactionResolution.es.js";
30
- import { shouldUseAutoAdvanceToggle as Po } from "./utils/playerToggleMode.es.js";
31
- import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as Eo, areImageOnlyStepIframeVisualsReady as Co } from "./utils/imageOnlyStepVisualReady.es.js";
32
- import { resolveSilentStepAutoAdvanceBehavior as To } from "./utils/silentStepAutoAdvance.es.js";
33
- import { resolveSlidePlayerVisibility as Ro, resolveSlidePlayerLayoutState as _o } from "./utils/playerVisibility.es.js";
34
- import { getSlideLocaleTexts as Oo, DEFAULT_SLIDE_BUFFERING_TEXTS as Mo } from "./slideI18n.es.js";
11
+ import { isMobileDevice as no, isLandscapeViewport as Dn, subscribeMobileDeviceChange as ro } from "../../lib/mobileDevice.es.js";
12
+ import oo from "./Player.es.js";
13
+ import io from "./MarkdownSlideScaling.es.js";
14
+ import lo from "./SubtitleOverlay.es.js";
15
+ import ao from "./useSlide.es.js";
16
+ import so from "./useWakePlayerFromIframe.es.js";
17
+ import { PlayerKeyboardShortcutContext as co } from "./utils/playerKeyboardShortcutContext.es.js";
18
+ import { activatePlayerKeyboardShortcutOwner as uo } from "./utils/playerKeyboardShortcuts.es.js";
19
+ import { DEFAULT_MOBILE_VIEW_MODE as vt, resolveMobileViewModeState as fo } from "./utils/mobileScreenMode.es.js";
20
+ import { shouldRenderInteractionOverlay as mo, clampInteractionOverlayDragOffset as Bn, shouldPresentInteractionOverlay as po } from "./utils/interactionPlayback.es.js";
21
+ import { resolveMarkdownScalingMode as yo } from "./utils/markdownScaling.es.js";
22
+ import { shouldWakePlayerControlsAfterNavigation as $t } from "./utils/playerNavigationContext.es.js";
23
+ import { shouldAutoAdvanceIntoAppendedMarker as ho } from "./utils/appendedMarkerAdvance.es.js";
24
+ import { resolvePendingStepAudioKey as go, hasUnplayedStepAudio as vo } from "./utils/stepAudioProgress.es.js";
25
+ import { getPlaybackSequenceTransition as So, shouldStartDefaultAudioSequence as Io } from "./utils/playbackSequence.es.js";
26
+ import { hasResolvedInteractionElement as bo, canReachSubtitleJumpTarget as Vn } from "./utils/subtitleJumpNavigation.es.js";
27
+ import { resolvePlayerCustomActionElement as Ao, getPlayerCustomActionCount as wo } from "./utils/playerCustomActions.es.js";
28
+ import { createPlaybackTimeStore as xo } from "./utils/playbackTimeStore.es.js";
29
+ import { resolveSlideInteractionState as Po } from "./utils/interactionResolution.es.js";
30
+ import { shouldUseAutoAdvanceToggle as Eo } from "./utils/playerToggleMode.es.js";
31
+ import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as Co, areImageOnlyStepIframeVisualsReady as To } from "./utils/imageOnlyStepVisualReady.es.js";
32
+ import { resolveSilentStepAutoAdvanceBehavior as Ro } from "./utils/silentStepAutoAdvance.es.js";
33
+ import { resolveSlidePlayerVisibility as _o, resolveSlidePlayerLayoutState as Oo } from "./utils/playerVisibility.es.js";
34
+ import { getSlideLocaleTexts as Mo, DEFAULT_SLIDE_BUFFERING_TEXTS as ko } from "./slideI18n.es.js";
35
35
  /* empty css */
36
- import $t from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
37
- import ko from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
38
- const Fo = 2e3, Lo = 300, Do = 160, No = 16, Vn = 3e3, St = {
36
+ import zt from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
37
+ import Fo from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
38
+ const Lo = 2e3, No = 300, Do = 160, Bo = 16, Kn = 3e3, St = {
39
39
  x: 0,
40
40
  y: 0
41
- }, Xt = 0.5, Bo = typeof window > "u" ? s : Xr, Vo = [
41
+ }, Jt = 0.5, Vo = typeof window > "u" ? s : Jr, Ko = [
42
42
  "button",
43
43
  "input",
44
44
  "textarea",
45
45
  '[contenteditable=""]',
46
46
  '[contenteditable="true"]',
47
47
  '[contenteditable="plaintext-only"]'
48
- ].join(", "), Jt = "waitingForAudio", Ko = ({
48
+ ].join(", "), Wt = "waitingForAudio", qo = ({
49
49
  x: c,
50
50
  y: d
51
51
  }) => ({
52
52
  x: Number(c.toFixed(2)),
53
53
  y: Number(d.toFixed(2))
54
- }), Kn = (c) => Math.abs(c) >= Xt, qn = (c, d) => Math.abs(c.x - d.x) < Xt && Math.abs(c.y - d.y) < Xt, qo = (c, d) => typeof c == "string" ? c : c[d] ?? c[Jt] ?? Mo[d], Uo = (c, d) => typeof c == "string" ? c : {
54
+ }), qn = (c) => Math.abs(c) >= Jt, Un = (c, d) => Math.abs(c.x - d.x) < Jt && Math.abs(c.y - d.y) < Jt, Uo = (c, d) => typeof c == "string" ? c : c[d] ?? c[Wt] ?? ko[d], Ho = (c, d) => typeof c == "string" ? c : {
55
55
  ...d,
56
56
  ...c
57
- }, Ho = (c, d) => d ? c !== "loadingAudio" : !1, Un = $r(
57
+ }, Yo = (c, d) => d ? c !== "loadingAudio" : !1, Hn = zr(
58
58
  ({
59
59
  content: c,
60
60
  title: d,
61
- dragHandleAriaLabel: G,
62
- locale: xe,
63
- dir: $,
64
- lang: z,
65
- defaultButtonText: Pe,
66
- defaultInputText: ae,
61
+ dragHandleAriaLabel: $,
62
+ locale: Ee,
63
+ dir: z,
64
+ lang: X,
65
+ defaultButtonText: Ce,
66
+ defaultInputText: se,
67
67
  defaultSelectedValues: $e,
68
68
  confirmButtonText: It,
69
- copyButtonText: X,
69
+ copyButtonText: J,
70
70
  copiedButtonText: bt,
71
- onSend: Ee,
71
+ onSend: Te,
72
72
  onDragHandlePointerCancel: ze,
73
73
  onDragHandlePointerDown: At,
74
74
  onDragHandlePointerMove: Xe,
75
75
  onDragHandlePointerUp: Je,
76
- readonly: Ce = !1
76
+ readonly: We = !1
77
77
  }) => /* @__PURE__ */ Ge("div", { className: "slide-player__interaction-card", children: [
78
78
  /* @__PURE__ */ u(
79
79
  "button",
80
80
  {
81
81
  type: "button",
82
82
  className: "slide-player__interaction-drag-handle",
83
- "aria-label": G,
83
+ "aria-label": $,
84
84
  onPointerCancel: ze,
85
85
  onPointerDown: At,
86
86
  onPointerMove: Xe,
87
87
  onPointerUp: Je,
88
88
  children: /* @__PURE__ */ Ge("span", { className: "slide-player__interaction-drag-handle-icon", children: [
89
- /* @__PURE__ */ u($t, { "aria-hidden": "true" }),
90
- /* @__PURE__ */ u($t, { "aria-hidden": "true" }),
91
- /* @__PURE__ */ u($t, { "aria-hidden": "true" })
89
+ /* @__PURE__ */ u(zt, { "aria-hidden": "true" }),
90
+ /* @__PURE__ */ u(zt, { "aria-hidden": "true" }),
91
+ /* @__PURE__ */ u(zt, { "aria-hidden": "true" })
92
92
  ] })
93
93
  }
94
94
  ),
95
95
  /* @__PURE__ */ u("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ u("p", { className: "slide-player__interaction-title", children: d }) }),
96
96
  /* @__PURE__ */ u("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ u(
97
- eo,
97
+ to,
98
98
  {
99
99
  content: c,
100
- locale: xe,
101
- dir: $,
102
- lang: z,
103
- defaultButtonText: Pe,
104
- defaultInputText: ae,
100
+ locale: Ee,
101
+ dir: z,
102
+ lang: X,
103
+ defaultButtonText: Ce,
104
+ defaultInputText: se,
105
105
  defaultSelectedValues: $e,
106
106
  confirmButtonText: It,
107
- copyButtonText: X,
107
+ copyButtonText: J,
108
108
  copiedButtonText: bt,
109
- onSend: Ee,
110
- readonly: Ce,
109
+ onSend: Te,
110
+ readonly: We,
111
111
  sandboxMode: "content"
112
112
  }
113
113
  ) })
114
114
  ] })
115
115
  );
116
- Un.displayName = "InteractionOverlayCard";
117
- const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
118
- const $ = d[xe];
119
- return G.sequence_number === $?.sequence_number && G.type === $?.type && G.content === $?.content;
120
- }), zt = (c) => c instanceof HTMLElement && !!c.closest(Vo), Ri = ({
116
+ Hn.displayName = "InteractionOverlayCard";
117
+ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
118
+ const z = d[Ee];
119
+ return $.sequence_number === z?.sequence_number && $.type === z?.type && $.content === z?.content;
120
+ }), Xt = (c) => c instanceof HTMLElement && !!c.closest(Ko), _i = ({
121
121
  elementList: c = [],
122
122
  locale: d,
123
- playerEnabled: G,
124
- playerControlsVisibility: xe,
125
- playerClassName: $,
126
- fullscreenHeader: z,
127
- playerCustomActions: Pe,
128
- playerCustomActionPauseOnActive: ae = !0,
123
+ playerEnabled: $,
124
+ playerControlsVisibility: Ee,
125
+ playerClassName: z,
126
+ fullscreenHeader: X,
127
+ playerCustomActions: Ce,
128
+ playerCustomActionPauseOnActive: se = !0,
129
129
  bufferingText: $e,
130
130
  interactionTitle: It,
131
- interactionTexts: X,
131
+ interactionTexts: J,
132
132
  playerTexts: bt,
133
- playerAutoHideDelay: Ee = 3e3,
134
- markerAutoAdvanceDelay: ze = Fo,
133
+ playerAutoHideDelay: Te = 3e3,
134
+ markerAutoAdvanceDelay: ze = Lo,
135
135
  showSlideProgress: At = !1,
136
- interactionDefaultValueOptions: Xe,
137
- onSend: Je,
138
- onPlayerVisibilityChange: Ce,
139
- onMobileViewModeChange: Wt,
140
- onStepChange: jt,
141
- onPlaybackCheckpoint: Hn,
136
+ onSlideProgressNavigate: Xe,
137
+ interactionDefaultValueOptions: Je,
138
+ onSend: We,
139
+ onPlayerVisibilityChange: wt,
140
+ onMobileViewModeChange: jt,
141
+ onStepChange: Qt,
142
+ onPlaybackCheckpoint: Yn,
142
143
  playbackRestoreRequest: U = null,
143
- enableKeyboardShortcuts: se = !0,
144
- enableIframeScaling: Yn = !0,
145
- enableMarkdownScaling: Gn = !0,
146
- disableLoadingOverlay: F = !1,
147
- className: $n,
148
- dir: zn,
149
- lang: Xn,
150
- onPointerDown: Qt,
151
- onFocusCapture: Zt,
152
- ...Jn
144
+ enableKeyboardShortcuts: ce = !0,
145
+ enableIframeScaling: Gn = !0,
146
+ enableMarkdownScaling: $n = !0,
147
+ disableLoadingOverlay: L = !1,
148
+ className: zn,
149
+ dir: Xn,
150
+ lang: Jn,
151
+ onPointerDown: Zt,
152
+ onFocusCapture: en,
153
+ ...Wn
153
154
  }) => {
154
- const J = zn ?? jr(d), Te = Xn ?? Qr(d), N = f(() => Oo(d), [d]), Wn = f(
155
- () => Uo(
155
+ const W = Xn ?? Qr(d), Re = Jn ?? Zr(d), D = f(() => Mo(d), [d]), jn = f(
156
+ () => Ho(
156
157
  $e,
157
- N.bufferingText
158
+ D.bufferingText
158
159
  ),
159
- [$e, N.bufferingText]
160
+ [$e, D.bufferingText]
160
161
  ), {
161
- playerEnabled: jn,
162
- playerControlsVisibility: W
163
- } = Ro({
164
- playerEnabled: G,
165
- playerControlsVisibility: xe
166
- }), We = zr(), ce = m(null), { resolvedDirection: Qn } = Wr(ce, J), wt = m(null), je = m(null), en = m(null), ue = m(null), Qe = m(!1), Re = m(null), Ze = m(null), j = m(null), _e = m(null), Oe = m(null), de = m(null), Me = m(null), tn = m([]), ke = m(!1), Q = m(null), Fe = m(null), nn = m(0), xt = m(null), rn = m({
162
+ playerEnabled: Qn,
163
+ playerControlsVisibility: j
164
+ } = _o({
165
+ playerEnabled: $,
166
+ playerControlsVisibility: Ee
167
+ }), je = Xr(), ue = m(null), { resolvedDirection: Zn } = jr(ue, W), xt = m(null), Qe = m(null), tn = m(null), de = m(null), Ze = m(!1), _e = m(null), et = m(null), Q = m(null), Oe = m(null), Me = m(null), fe = m(null), ke = m(null), nn = m([]), me = m(!1), H = m(null), Fe = m(null), rn = m(0), Pt = m(null), on = m({
167
168
  markerCount: 0,
168
169
  currentIndex: -1,
169
170
  canGoNext: !1
170
- }), Pt = m(!1), {
171
+ }), Et = m(!1), {
171
172
  currentElementList: T,
172
- stepElementLists: on,
173
- slideElementList: x,
173
+ stepElementLists: ln,
174
+ slideElementList: S,
174
175
  currentIndex: a,
175
176
  audioList: y,
176
177
  audioSlideIndexes: Z,
177
- currentAudioSequenceIndexes: et,
178
- currentStepHasSpeakableElement: b,
178
+ currentAudioSequenceIndexes: tt,
179
+ currentStepHasSpeakableElement: w,
179
180
  currentInteractionElement: h,
180
- canGoPrev: Zn,
181
+ canGoPrev: er,
181
182
  canGoNext: R,
182
- handlePrev: ln,
183
- handleNext: L,
184
- handleGoTo: tt
185
- } = lo(c), Le = f(() => {
183
+ handlePrev: an,
184
+ handleNext: N,
185
+ handleGoTo: pe
186
+ } = ao(c), Le = f(() => {
186
187
  if (!(a < 0))
187
- return x[a];
188
- }, [a, x]), fe = f(
188
+ return S[a];
189
+ }, [a, S]), ye = f(
189
190
  () => T.map(
190
191
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
191
192
  ),
192
193
  [T]
193
- ), an = x.filter(
194
- (e) => e.is_renderable !== !1
195
- ).length, er = Math.max(
196
- x.slice(0, a + 1).filter((e) => e.is_renderable !== !1).length - 1,
197
- 0
198
- ), tr = an === 1, A = jn && (x.length > 0 || y.length > 0 || !!h), nr = f(
194
+ ), sn = S.length, tr = sn === 1, x = Qn && (S.length > 0 || y.length > 0 || !!h), nr = f(
199
195
  () => ({
200
- enabled: se,
201
- ownerId: We
196
+ enabled: ce,
197
+ ownerId: je
202
198
  }),
203
- [se, We]
204
- ), H = r(() => {
205
- !se || !A || co(We);
206
- }, [se, We, A]), _ = f(
207
- () => et.map((e) => y[e]?.audioKey).filter((e) => !!e),
208
- [y, et]
209
- ), [rr, De] = p(!0), [nt, me] = p(!1), [Et, Ct] = p(!0), [Ne, sn] = p(!0), [P, B] = p(null), [rt, cn] = p(null), Be = m(
199
+ [ce, je]
200
+ ), Y = r(() => {
201
+ !ce || !x || uo(je);
202
+ }, [ce, je, x]), _ = f(
203
+ () => tt.map((e) => y[e]?.audioKey).filter((e) => !!e),
204
+ [y, tt]
205
+ ), [rr, Ne] = p(!0), [nt, ee] = p(!1), [Ct, Tt] = p(!0), [De, cn] = p(!0), [P, B] = p(null), [rt, un] = p(null), Be = m(
210
206
  null
211
- ), un = m(null), [or, dn] = p(null), [ir, w] = p(!1), [lr, Tt] = p(Jt), [O, ot] = p(!1), it = m(/* @__PURE__ */ new Set()), [ar, lt] = p(!1), [fn, sr] = p(!0), [Rt, _t] = p(!1), [S, Ot] = p(), [pe, at] = p(!1), [mn, st] = p(!1), [E, Mt] = p(
207
+ ), dn = m(null), [or, fn] = p(null), [ir, I] = p(!1), [lr, Rt] = p(Wt), [O, ot] = p(!1), it = m(/* @__PURE__ */ new Set()), [ar, lt] = p(!1), [mn, sr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [he, at] = p(!1), [pn, st] = p(!1), [E, kt] = p(
212
208
  St
213
- ), [kt, Ft] = p(!1), [
209
+ ), [Ft, Lt] = p(!1), [
214
210
  cr,
215
- ye
216
- ] = p(0), [pn, ur] = p(!1), V = f(() => to(), []), [ct, Lt] = p(
211
+ ge
212
+ ] = p(0), [yn, ur] = p(!1), V = f(() => no(), []), [ct, Nt] = p(
217
213
  vt
218
- ), [yn, Dt] = p(!1), [dr, hn] = p(
214
+ ), [hn, Dt] = p(!1), [dr, gn] = p(
219
215
  () => V ? Dn() : !1
220
- ), he = f(() => wo(), []), {
221
- effectiveMobileViewMode: ee,
222
- isImmersiveMobileFullscreen: ge,
223
- isNativeMobileFullscreen: gn,
216
+ ), ve = f(() => xo(), []), {
217
+ effectiveMobileViewMode: te,
218
+ isImmersiveMobileFullscreen: Se,
219
+ isNativeMobileFullscreen: vn,
224
220
  shouldRotateFullscreenViewport: fr
225
221
  } = f(
226
- () => uo({
227
- hasManualMobileViewMode: yn,
222
+ () => fo({
223
+ hasManualMobileViewMode: hn,
228
224
  isMobileDevice: V,
229
225
  mobileViewMode: ct
230
226
  }),
231
227
  [
232
- yn,
228
+ hn,
233
229
  V,
234
230
  dr,
235
231
  ct
236
232
  ]
237
- ), vn = m(ee), {
233
+ ), Sn = m(te), {
238
234
  controlsVisible: K,
239
235
  layoutReserved: ut
240
- } = _o({
236
+ } = Oo({
241
237
  isAutoVisible: rr,
242
- playerControlsVisibility: W,
243
- shouldMountPlayer: A
244
- }), mr = ge && K, pr = ge && ut, yr = ge || gn, Sn = pn && !V, hr = r(
238
+ playerControlsVisibility: j,
239
+ shouldMountPlayer: x
240
+ }), mr = Se && K, pr = Se && ut, yr = Se || vn, In = yn && !V, hr = r(
245
241
  (e) => {
246
- Dt(!0), Lt(e);
242
+ Dt(!0), Nt(e);
247
243
  },
248
244
  []
249
- ), In = r(() => {
250
- Dt(!1), Lt(vt);
245
+ ), bn = r(() => {
246
+ Dt(!1), Nt(vt);
251
247
  }, []), gr = r(() => {
252
- In(), z?.onBack?.();
253
- }, [z, In]), M = r(() => {
254
- j.current !== null && (window.clearTimeout(j.current), j.current = null);
248
+ bn(), X?.onBack?.();
249
+ }, [X, bn]), M = r(() => {
250
+ Q.current !== null && (window.clearTimeout(Q.current), Q.current = null);
255
251
  }, []), k = r(() => {
256
- _e.current !== null && (window.clearTimeout(_e.current), _e.current = null);
252
+ Oe.current !== null && (window.clearTimeout(Oe.current), Oe.current = null);
257
253
  }, []), dt = r(() => {
258
- M(), k(), at(!1), ye(0);
254
+ M(), k(), at(!1), ge(0);
259
255
  }, [M, k]), ft = r(
260
256
  (e) => {
261
- e && dt(), _t(e);
257
+ e && dt(), Ot(e);
262
258
  },
263
259
  [dt]
264
- ), bn = r(() => {
265
- dt(), _t((e) => !e);
266
- }, [dt]), te = r(() => {
267
- Mt(
260
+ ), An = r(() => {
261
+ dt(), Ot((e) => !e);
262
+ }, [dt]), ne = r(() => {
263
+ kt(
268
264
  (e) => e.x === St.x && e.y === St.y ? e : St
269
- ), Ft(!1), Me.current = null, de.current = null;
265
+ ), Lt(!1), ke.current = null, fe.current = null;
270
266
  }, []), { mountedStepStates: vr, currentMountedStateIndex: Sr } = f(() => {
271
267
  const e = [], t = /* @__PURE__ */ new Map();
272
- return on.forEach((n, i) => {
268
+ return ln.forEach((n, i) => {
273
269
  const l = e.findIndex(
274
- (o) => Yo(
270
+ (o) => Go(
275
271
  o.elementList,
276
272
  n
277
273
  )
@@ -288,14 +284,14 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
288
284
  mountedStepStates: e,
289
285
  currentMountedStateIndex: a >= 0 ? t.get(a) ?? -1 : -1
290
286
  };
291
- }, [a, on]), An = f(() => String(a), [a]), C = f(() => P ? y.findIndex(
287
+ }, [a, ln]), wn = f(() => String(a), [a]), C = f(() => P ? y.findIndex(
292
288
  (e) => (e.audioKey ?? "") === P
293
289
  ) : -1, [y, P]), mt = f(
294
290
  () => C >= 0 ? y[C] : void 0,
295
291
  [y, C]
296
292
  );
297
293
  s(() => {
298
- if (!U || U.id === un.current)
294
+ if (!U || U.id === dn.current)
299
295
  return;
300
296
  const e = y.findIndex(
301
297
  (n) => n.audioKey === U.audioKey
@@ -303,50 +299,50 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
303
299
  if (e < 0)
304
300
  return;
305
301
  const t = Z[e];
306
- t != null && (un.current = U.id, Ct(!0), B(U.audioKey), Be.current = U, cn(U), a !== t && tt(t));
302
+ t != null && (dn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, un(U), a !== t && pe(t));
307
303
  }, [
308
304
  y,
309
305
  Z,
310
306
  a,
311
- tt,
307
+ pe,
312
308
  U
313
309
  ]);
314
310
  const Ir = mt?.element?.subtitle_cues ?? [], pt = f(
315
311
  () => _[0] ?? "none",
316
312
  [_]
317
- ), Nt = f(
313
+ ), Bt = f(
318
314
  () => ({
319
- currentElement: bo({
315
+ currentElement: Ao({
320
316
  currentAudioIndex: C,
321
- currentAudioSequenceIndexes: et,
317
+ currentAudioSequenceIndexes: tt,
322
318
  audioList: y,
323
- currentInteractionElement: S,
319
+ currentInteractionElement: b,
324
320
  currentStepElement: Le
325
321
  }),
326
322
  currentIndex: a,
327
323
  currentStepElement: Le,
328
- isActive: Rt,
324
+ isActive: _t,
329
325
  setActive: ft,
330
- toggleActive: bn
326
+ toggleActive: An
331
327
  }),
332
328
  [
333
- S,
329
+ b,
334
330
  y,
335
331
  C,
336
- et,
332
+ tt,
337
333
  a,
338
334
  Le,
339
- Rt,
335
+ _t,
340
336
  ft,
341
- bn
337
+ An
342
338
  ]
343
339
  ), yt = f(
344
- () => Ao(
345
- Pe,
346
- Nt
340
+ () => wo(
341
+ Ce,
342
+ Bt
347
343
  ),
348
- [Nt, Pe]
349
- ), Bt = yt > 0, Vt = Bt && Rt, br = f(
344
+ [Bt, Ce]
345
+ ), Vt = yt > 0, Kt = Vt && _t, br = f(
350
346
  () => ({
351
347
  "--slide-player-custom-action-count": String(yt),
352
348
  "--slide-player-mobile-control-count": String(
@@ -360,232 +356,232 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
360
356
  E.y,
361
357
  yt
362
358
  ]
363
- ), wn = _.length > 0, xn = f(() => h ? `${h.sequence_number ?? "none"}:${String(
359
+ ), xn = _.length > 0, Pn = f(() => h ? `${h.sequence_number ?? "none"}:${String(
364
360
  h.content ?? ""
365
- )}` : "none", [h]), ve = f(
366
- () => [An, xn].join("|"),
367
- [xn, An]
361
+ )}` : "none", [h]), Ie = f(
362
+ () => [wn, Pn].join("|"),
363
+ [Pn, wn]
368
364
  ), Ar = f(
369
365
  () => [
370
- ve,
366
+ Ie,
371
367
  mt?.audioKey ?? "none",
372
368
  String(C)
373
369
  ].join("|"),
374
- [C, mt?.audioKey, ve]
375
- ), Pn = !!f(() => !pt || pt === "none" ? "" : y.find(
370
+ [C, mt?.audioKey, Ie]
371
+ ), En = !!f(() => !pt || pt === "none" ? "" : y.find(
376
372
  (t) => t.audioKey === pt
377
- )?.audioUrl?.trim() ?? "", [y, pt]), ne = ae && Vt, Ve = f(
378
- () => Po({
373
+ )?.audioUrl?.trim() ?? "", [y, pt]), re = se && Kt, Ve = f(
374
+ () => Eo({
379
375
  canGoNext: R,
380
376
  currentAudioIndex: C,
381
- currentStepHasSpeakableElement: b,
377
+ currentStepHasSpeakableElement: w,
382
378
  hasInteraction: !!h
383
379
  }),
384
380
  [
385
381
  R,
386
382
  C,
387
383
  h,
388
- b
384
+ w
389
385
  ]
390
- ), En = f(
391
- () => To({
386
+ ), Cn = f(
387
+ () => Ro({
392
388
  currentElementList: T,
393
- currentStepHasSpeakableElement: b,
389
+ currentStepHasSpeakableElement: w,
394
390
  currentInteractionElement: h,
395
391
  markerAutoAdvanceDelay: ze
396
392
  }),
397
393
  [
398
394
  T,
399
395
  h,
400
- b,
396
+ w,
401
397
  ze
402
398
  ]
403
- ), Cn = En.delayMs, Ke = En.usesImageOnlyDelay, Kt = f(
404
- () => `${a}:${fe.join("|")}`,
405
- [a, fe]
406
- ), [wr, xr] = p(null), Tn = !Ke || wr === Kt, q = r(() => {
407
- ue.current !== null && (window.clearTimeout(ue.current), ue.current = null);
408
- }, []), Se = r(() => {
409
- Re.current !== null && (window.clearTimeout(Re.current), Re.current = null);
410
- }, []), Y = r(() => {
411
- Ze.current !== null && (window.clearTimeout(Ze.current), Ze.current = null);
412
- }, []), D = r(
399
+ ), Tn = Cn.delayMs, Ke = Cn.usesImageOnlyDelay, qt = f(
400
+ () => `${a}:${ye.join("|")}`,
401
+ [a, ye]
402
+ ), [wr, xr] = p(null), Rn = !Ke || wr === qt, q = r(() => {
403
+ de.current !== null && (window.clearTimeout(de.current), de.current = null);
404
+ }, []), be = r(() => {
405
+ _e.current !== null && (window.clearTimeout(_e.current), _e.current = null);
406
+ }, []), G = r(() => {
407
+ et.current !== null && (window.clearTimeout(et.current), et.current = null);
408
+ }, []), F = r(
413
409
  (e = {}) => {
414
- Se(), M(), k(), Y(), B(null), he.reset(), w(!1), Tt(Jt), ot(!1), it.current = /* @__PURE__ */ new Set(), lt(!1), dn(null), e.preservePendingSubtitleJump || (Fe.current = null), Ot(void 0), at(!1), ye(0);
410
+ be(), M(), k(), G(), B(null), ve.reset(), I(!1), Rt(Wt), ot(!1), it.current = /* @__PURE__ */ new Set(), lt(!1), fn(null), e.preservePendingSubtitleJump || (Fe.current = null), Mt(void 0), at(!1), ge(0);
415
411
  },
416
412
  [
417
- Se,
418
- Y,
413
+ be,
414
+ G,
419
415
  M,
420
416
  k,
421
- he
417
+ ve
422
418
  ]
423
419
  ), ht = r(
424
420
  (e) => {
425
- nn.current += 1, dn({
421
+ rn.current += 1, fn({
426
422
  ...e,
427
- id: nn.current
423
+ id: rn.current
428
424
  });
429
425
  },
430
426
  []
431
- ), Ie = r(() => {
432
- const e = ho(
427
+ ), Ae = r(() => {
428
+ const e = go(
433
429
  _,
434
430
  it.current
435
431
  );
436
432
  return e ? (B(e), !0) : !1;
437
433
  }, [_]), qe = r(() => {
438
- M(), k(), at(!1), ye(0), !Ie() && R && L();
434
+ M(), k(), at(!1), ge(0), !Ae() && R && N();
439
435
  }, [
440
436
  R,
441
437
  M,
442
438
  k,
443
- L,
444
- Ie
445
- ]), Rn = r(
439
+ N,
440
+ Ae
441
+ ]), _n = r(
446
442
  (e) => {
447
443
  if (k(), !e)
448
444
  return;
449
445
  const t = () => {
450
- _e.current = null, ye(
446
+ Oe.current = null, ge(
451
447
  Do
452
- ), at(!0), Q.current = null;
448
+ ), at(!0), H.current = null;
453
449
  };
454
- _e.current = window.setTimeout(
450
+ Oe.current = window.setTimeout(
455
451
  t,
456
- Lo
452
+ No
457
453
  );
458
454
  },
459
455
  [k]
460
- ), qt = r(
461
- () => Qe.current || !!ce.current?.querySelector(".slide-player__controls:hover"),
456
+ ), Ut = r(
457
+ () => Ze.current || !!ue.current?.querySelector(".slide-player__controls:hover"),
462
458
  []
463
459
  ), g = r(
464
460
  (e = nt) => {
465
- !A || W === "hidden" || (De(!0), q(), !(W === "visible" || !e || Ee <= 0 || qt()) && (ue.current = window.setTimeout(() => {
466
- if (qt()) {
467
- ue.current = null;
461
+ !x || j === "hidden" || (Ne(!0), q(), !(j === "visible" || !e || Te <= 0 || Ut()) && (de.current = window.setTimeout(() => {
462
+ if (Ut()) {
463
+ de.current = null;
468
464
  return;
469
465
  }
470
- De(!1), ue.current = null;
471
- }, Ee)));
466
+ Ne(!1), de.current = null;
467
+ }, Te)));
472
468
  },
473
469
  [
474
470
  q,
475
471
  nt,
476
- qt,
477
- Ee,
478
- W,
479
- A
472
+ Ut,
473
+ Te,
474
+ j,
475
+ x
480
476
  ]
481
- ), Ue = !!Io(h), re = !!h && !Ue, Pr = r((e) => {
482
- Ct(e);
483
- }, []), be = r(
477
+ ), Ue = !!bo(h), oe = !!h && !Ue, Pr = r((e) => {
478
+ Tt(e);
479
+ }, []), we = r(
484
480
  (e) => {
485
- e && Ct(e.shouldContinuePlayback);
481
+ e && Tt(e.shouldContinuePlayback);
486
482
  },
487
483
  []
488
484
  );
489
485
  s(() => {
490
- sn(Et);
491
- }, [a, Et, ae]), s(() => {
492
- ae && ft(!1);
486
+ cn(Ct);
487
+ }, [a, Ct, se]), s(() => {
488
+ se && ft(!1);
493
489
  }, [
494
490
  a,
495
- ae,
491
+ se,
496
492
  ft
497
493
  ]), s(() => {
498
- Bt || _t(!1);
499
- }, [Bt]), s(() => () => {
500
- Se(), Y(), q(), M(), k();
494
+ Vt || Ot(!1);
495
+ }, [Vt]), s(() => () => {
496
+ be(), G(), q(), M(), k();
501
497
  }, [
502
- Se,
503
- Y,
498
+ be,
499
+ G,
504
500
  M,
505
501
  k,
506
502
  q
507
503
  ]), s(() => {
508
504
  if (!Ke) {
509
- Y();
505
+ G();
510
506
  return;
511
507
  }
512
508
  let e = !1, t = null, n = null;
513
509
  const i = () => {
514
510
  n?.(), n = null;
515
511
  }, l = () => {
516
- e || (i(), Y(), xr(Kt));
512
+ e || (i(), G(), xr(qt));
517
513
  }, o = () => {
518
514
  if (e)
519
515
  return;
520
516
  i();
521
- const v = je.current?.querySelector(
517
+ const v = Qe.current?.querySelector(
522
518
  '[data-active-step="true"]'
523
519
  );
524
520
  if (!v)
525
521
  return;
526
- const I = Array.from(
522
+ const A = Array.from(
527
523
  v.querySelectorAll("iframe")
528
524
  );
529
- if (I.length === 0 || Co(I)) {
525
+ if (A.length === 0 || To(A)) {
530
526
  l();
531
527
  return;
532
528
  }
533
- const oe = [], Ye = () => {
529
+ const ie = [], Ye = () => {
534
530
  e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
535
531
  t = null, o();
536
532
  }));
537
- }, Yt = (ie, Ae, le) => {
538
- ie.addEventListener(Ae, le, { once: !0 }), oe.push(
539
- () => ie.removeEventListener(Ae, le)
533
+ }, Gt = (le, xe, ae) => {
534
+ le.addEventListener(xe, ae, { once: !0 }), ie.push(
535
+ () => le.removeEventListener(xe, ae)
540
536
  );
541
537
  };
542
- I.forEach((ie) => {
543
- const Ae = ie.contentDocument;
544
- if (!Ae || Ae.readyState !== "complete") {
545
- Yt(ie, "load", Ye);
538
+ A.forEach((le) => {
539
+ const xe = le.contentDocument;
540
+ if (!xe || xe.readyState !== "complete") {
541
+ Gt(le, "load", Ye);
546
542
  return;
547
543
  }
548
- Array.from(Ae.images).filter((le) => !le.complete).forEach((le) => {
549
- Yt(le, "load", Ye), Yt(le, "error", Ye);
544
+ Array.from(xe.images).filter((ae) => !ae.complete).forEach((ae) => {
545
+ Gt(ae, "load", Ye), Gt(ae, "error", Ye);
550
546
  });
551
547
  }), n = () => {
552
- oe.forEach((ie) => ie());
548
+ ie.forEach((le) => le());
553
549
  };
554
550
  };
555
551
  return t = window.requestAnimationFrame(() => {
556
552
  t = null, o();
557
- }), Ze.current = window.setTimeout(() => {
553
+ }), et.current = window.setTimeout(() => {
558
554
  l();
559
- }, Eo), () => {
560
- e = !0, i(), Y(), t !== null && window.cancelAnimationFrame(t);
555
+ }, Co), () => {
556
+ e = !0, i(), G(), t !== null && window.cancelAnimationFrame(t);
561
557
  };
562
558
  }, [
563
- Y,
559
+ G,
564
560
  T,
565
561
  a,
566
- Kt,
562
+ qt,
567
563
  Ke
568
- ]), s(() => (Ce?.(K), () => {
569
- Ce?.(!1);
570
- }), [Ce, K]), s(() => {
571
- K || (Qe.current = !1);
564
+ ]), s(() => (wt?.(K), () => {
565
+ wt?.(!1);
566
+ }), [wt, K]), s(() => {
567
+ K || (Ze.current = !1);
572
568
  }, [K]), s(() => {
573
- V || ct === vt || (Dt(!1), Lt(vt));
569
+ V || ct === vt || (Dt(!1), Nt(vt));
574
570
  }, [V, ct]), s(() => {
575
571
  if (!V) {
576
- hn(!1);
572
+ gn(!1);
577
573
  return;
578
574
  }
579
575
  const e = () => {
580
- hn(Dn()), te();
576
+ gn(Dn()), ne();
581
577
  }, t = () => {
582
- te();
578
+ ne();
583
579
  };
584
580
  e(), window.addEventListener("orientationchange", t), window.screen?.orientation?.addEventListener?.(
585
581
  "change",
586
582
  t
587
583
  );
588
- const n = no(
584
+ const n = ro(
589
585
  e
590
586
  );
591
587
  return () => {
@@ -594,237 +590,237 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
594
590
  t
595
591
  );
596
592
  };
597
- }, [V, te]), s(() => {
598
- Wt?.(ee);
599
- }, [ee, Wt]), s(() => {
600
- vn.current !== ee && te(), vn.current = ee;
601
- }, [ee, te]), s(() => {
602
- jt?.(Le, a);
603
- }, [a, Le, jt]), s(() => {
604
- const e = rn.current, t = yo(
593
+ }, [V, ne]), s(() => {
594
+ jt?.(te);
595
+ }, [te, jt]), s(() => {
596
+ Sn.current !== te && ne(), Sn.current = te;
597
+ }, [te, ne]), s(() => {
598
+ Qt?.(Le, a);
599
+ }, [a, Le, Qt]), s(() => {
600
+ const e = on.current, t = ho(
605
601
  {
606
602
  previousMarkerCount: e.markerCount,
607
- nextMarkerCount: x.length,
603
+ nextMarkerCount: S.length,
608
604
  previousIndex: e.currentIndex,
609
605
  previousCanGoNext: e.canGoNext,
610
606
  nextCanGoNext: R,
611
607
  currentAudioKey: P,
612
608
  hasCompletedCurrentStepAudio: O,
613
609
  hasResolvedCurrentInteraction: Ue,
614
- currentStepHasSpeakableElement: b,
610
+ currentStepHasSpeakableElement: w,
615
611
  currentInteractionElement: h,
616
- isAutoAdvanceEnabled: Ne,
612
+ isAutoAdvanceEnabled: De,
617
613
  shouldUseSilentStepAutoAdvanceToggle: Ve
618
614
  }
619
615
  );
620
- rn.current = {
621
- markerCount: x.length,
616
+ on.current = {
617
+ markerCount: S.length,
622
618
  currentIndex: a,
623
619
  canGoNext: R
624
- }, t && L();
620
+ }, t && N();
625
621
  }, [
626
622
  R,
627
623
  P,
628
624
  a,
629
625
  h,
630
- b,
631
- L,
626
+ w,
627
+ N,
632
628
  O,
633
629
  Ue,
634
- Ne,
630
+ De,
635
631
  Ve,
636
- x.length
632
+ S.length
637
633
  ]), s(() => {
638
- if (!A || W === "hidden") {
639
- q(), De(!1);
634
+ if (!x || j === "hidden") {
635
+ q(), Ne(!1);
640
636
  return;
641
637
  }
642
- if (W === "visible") {
643
- q(), De(!0);
638
+ if (j === "visible") {
639
+ q(), Ne(!0);
644
640
  return;
645
641
  }
646
642
  nt || g(!0);
647
643
  }, [
648
644
  q,
649
645
  nt,
650
- W,
651
- A,
646
+ j,
647
+ x,
652
648
  g
653
649
  ]), s(() => {
654
650
  if (typeof window > "u")
655
651
  return;
656
652
  const e = (t) => {
657
- t.origin === window.location.origin && Jr(t.data) && t.data.eventType === "click" && A && (H(), me(!0), g(!0));
653
+ t.origin === window.location.origin && Wr(t.data) && t.data.eventType === "click" && x && (Y(), ee(!0), g(!0));
658
654
  };
659
655
  return window.addEventListener("message", e), () => {
660
656
  window.removeEventListener("message", e);
661
657
  };
662
- }, [H, A, g]), ao({
663
- sectionRef: ce,
664
- enabled: A,
665
- keyboardShortcutsEnabled: se,
666
- onKeyboardShortcut: H,
658
+ }, [Y, x, g]), so({
659
+ sectionRef: ue,
660
+ enabled: x,
661
+ keyboardShortcutsEnabled: ce,
662
+ onKeyboardShortcut: Y,
667
663
  onWake: () => {
668
- H(), me(!0), g(!0);
664
+ Y(), ee(!0), g(!0);
669
665
  }
670
666
  }), s(() => {
671
- if (!A) {
672
- D();
667
+ if (!x) {
668
+ F();
673
669
  return;
674
670
  }
675
671
  if (Be.current) {
676
- xt.current = ve;
672
+ Pt.current = Ie;
677
673
  return;
678
674
  }
679
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = vo({
680
- previousResetKey: xt.current,
681
- nextResetKey: ve,
675
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = So({
676
+ previousResetKey: Pt.current,
677
+ nextResetKey: Ie,
682
678
  currentAudioKey: P,
683
679
  hasCompletedCurrentStepAudio: O
684
680
  });
685
- xt.current = ve;
686
- const n = Q.current === a && !!h, i = mo({
681
+ Pt.current = Ie;
682
+ const n = H.current === a && !!h, i = po({
687
683
  hasInteraction: !!h,
688
- shouldBlockPlaybackForInteraction: re,
684
+ shouldBlockPlaybackForInteraction: oe,
689
685
  shouldOpenInteractionOverlayAfterAudio: n,
690
686
  hasPlaybackContextChanged: e,
691
687
  hasResolvedCurrentInteraction: Ue,
692
- currentStepHasSpeakableElement: b,
693
- isPlayerCustomActionActive: Vt
688
+ currentStepHasSpeakableElement: w,
689
+ isPlayerCustomActionActive: Kt
694
690
  }), l = Fe.current, o = l?.slideIndex === a;
695
- if (e && D({
691
+ if (e && F({
696
692
  preservePendingSubtitleJump: o
697
- }), !(T.length === 0 && !h) && !ne) {
698
- if (l?.slideIndex === a && Bn({
693
+ }), !(T.length === 0 && !h) && !re) {
694
+ if (l?.slideIndex === a && Vn({
699
695
  currentIndex: a,
700
- resolvedCurrentInteractionElement: S,
701
- slideElementList: x,
696
+ resolvedCurrentInteractionElement: b,
697
+ slideElementList: S,
702
698
  targetSlideIndex: l.slideIndex
703
699
  })) {
704
- Fe.current = null, Pt.current = !0, B(l.audioKey), ht({
700
+ Fe.current = null, Et.current = !0, B(l.audioKey), ht({
705
701
  audioIndex: l.audioIndex,
706
702
  timeMs: l.timeMs
707
703
  });
708
704
  return;
709
705
  }
710
- if (h && Ot(h), i) {
711
- Rn(h);
706
+ if (h && Mt(h), i) {
707
+ _n(h);
712
708
  return;
713
709
  }
714
- if (k(), Q.current = null, !re && t && !Ie()) {
715
- if (b) {
716
- if (F) {
717
- w(!1);
710
+ if (k(), H.current = null, !oe && t && !Ae()) {
711
+ if (w) {
712
+ if (L) {
713
+ I(!1);
718
714
  return;
719
715
  }
720
- w(!0);
716
+ I(!0);
721
717
  return;
722
718
  }
723
- if (R && !(Ve && !Ne) && !(Ke && !Tn))
724
- return Re.current = window.setTimeout(() => {
725
- Re.current = null, L();
726
- }, Cn), () => {
727
- Se();
719
+ if (R && !(Ve && !De) && !(Ke && !Rn))
720
+ return _e.current = window.setTimeout(() => {
721
+ _e.current = null, N();
722
+ }, Tn), () => {
723
+ be();
728
724
  };
729
725
  }
730
726
  }
731
727
  }, [
732
- S,
728
+ b,
733
729
  R,
734
- Se,
730
+ be,
735
731
  T.length,
736
732
  a,
737
733
  h,
738
734
  P,
739
- ve,
740
- b,
735
+ Ie,
736
+ w,
741
737
  Ke,
738
+ Rn,
742
739
  Tn,
743
- Cn,
744
- L,
740
+ N,
745
741
  O,
746
- F,
747
- Ne,
742
+ L,
743
+ De,
748
744
  Ue,
749
- Vt,
750
- re,
745
+ Kt,
746
+ oe,
751
747
  k,
752
- D,
748
+ F,
753
749
  ht,
754
- Rn,
755
- A,
750
+ _n,
756
751
  x,
757
- Ie,
758
- ne,
752
+ S,
753
+ Ae,
754
+ re,
759
755
  Ve
760
756
  ]), s(() => {
761
- if (F || ne || !b || re) {
762
- w(!1);
757
+ if (L || re || !w || oe) {
758
+ I(!1);
763
759
  return;
764
760
  }
765
761
  if (O) {
766
- w(!1);
762
+ I(!1);
767
763
  return;
768
764
  }
769
- if (wn) {
770
- w(!1);
765
+ if (xn) {
766
+ I(!1);
771
767
  return;
772
768
  }
773
- Tt("waitingForAudio"), w(!0);
769
+ Rt("waitingForAudio"), I(!0);
774
770
  }, [
775
- wn,
776
- b,
771
+ xn,
772
+ w,
777
773
  O,
778
- F,
779
- ne,
780
- re
774
+ L,
775
+ re,
776
+ oe
781
777
  ]), s(() => {
782
- O && go(
778
+ O && vo(
783
779
  _,
784
780
  it.current
785
781
  ) && ot(!1);
786
782
  }, [_, O]), s(() => {
787
783
  if (Be.current)
788
784
  return;
789
- const e = Pt.current;
790
- Pt.current = !1, So({
785
+ const e = Et.current;
786
+ Et.current = !1, Io({
791
787
  currentAudioKey: P,
792
788
  currentAudioSequenceLength: _.length,
793
- currentStepHasSpeakableElement: b,
789
+ currentStepHasSpeakableElement: w,
794
790
  hasCompletedCurrentStepAudio: O,
795
- shouldBlockPlaybackForInteraction: re,
796
- shouldPausePlaybackForCustomAction: ne,
791
+ shouldBlockPlaybackForInteraction: oe,
792
+ shouldPausePlaybackForCustomAction: re,
797
793
  shouldSkipDefaultAudioStart: e
798
- }) && Ie();
794
+ }) && Ae();
799
795
  }, [
800
796
  P,
801
797
  _,
802
- b,
798
+ w,
803
799
  O,
804
- ne,
805
800
  re,
806
- Ie
801
+ oe,
802
+ Ae
807
803
  ]), s(() => {
808
804
  !P || C >= 0 || B(null);
809
805
  }, [C, P]), s(() => {
810
- C >= 0 || he.reset();
811
- }, [C, he]), s(() => {
806
+ C >= 0 || ve.reset();
807
+ }, [C, ve]), s(() => {
812
808
  lt(!1);
813
809
  }, [Ar]);
814
810
  const {
815
- interactionDefaults: _n,
811
+ interactionDefaults: On,
816
812
  interactionDefaultSelectedValues: Er,
817
- hasResolvedInteractionInput: On,
813
+ hasResolvedInteractionInput: Mn,
818
814
  isInteractionReadonly: Cr,
819
- shouldAutoContinueInteraction: Mn
815
+ shouldAutoContinueInteraction: kn
820
816
  } = f(
821
- () => xo(S, {
822
- interactionDefaultValueOptions: Xe
817
+ () => Po(b, {
818
+ interactionDefaultValueOptions: Je
823
819
  }),
824
- [S, Xe]
825
- ), Tr = !!S?.readonly || Cr, He = fo({
826
- hasActiveInteraction: !!S,
827
- isInteractionOverlayOpen: pe
820
+ [b, Je]
821
+ ), Tr = !!b?.readonly || Cr, He = mo({
822
+ hasActiveInteraction: !!b,
823
+ isInteractionOverlayOpen: he
828
824
  }), Rr = r(
829
825
  (e) => {
830
826
  const n = [
@@ -832,38 +828,38 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
832
828
  e.inputText?.trim() ?? "",
833
829
  e.buttonText?.trim() ?? ""
834
830
  ].filter(Boolean).join(", ");
835
- Ot((i) => !i || !n ? i : {
831
+ Mt((i) => !i || !n ? i : {
836
832
  ...i,
837
833
  user_input: n
838
- }), Je?.(e, S), qe();
834
+ }), We?.(e, b), qe();
839
835
  },
840
- [S, qe, Je]
836
+ [b, qe, We]
841
837
  );
842
838
  s(() => {
843
839
  const e = () => {
844
- ur(document.fullscreenElement === ce.current);
840
+ ur(document.fullscreenElement === ue.current);
845
841
  };
846
842
  return e(), document.addEventListener("fullscreenchange", e), () => {
847
843
  document.removeEventListener("fullscreenchange", e);
848
844
  };
849
845
  }, []), s(() => {
850
- S && pe || st(!1);
851
- }, [S, pe]), s(() => {
852
- te();
853
- }, [S, te]), s(() => {
846
+ b && he || st(!1);
847
+ }, [b, he]), s(() => {
848
+ ne();
849
+ }, [b, ne]), s(() => {
854
850
  if (!He) {
855
- ye(0);
851
+ ge(0);
856
852
  return;
857
853
  }
858
- const e = Oe.current;
854
+ const e = Me.current;
859
855
  if (!e)
860
856
  return;
861
857
  const t = () => {
862
858
  const i = Math.ceil(
863
859
  e.getBoundingClientRect().height
864
860
  );
865
- ye(
866
- i + No
861
+ ge(
862
+ i + Bo
867
863
  );
868
864
  };
869
865
  if (t(), typeof ResizeObserver > "u")
@@ -875,52 +871,52 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
875
871
  n.disconnect();
876
872
  };
877
873
  }, [He]), s(() => {
878
- if (M(), !!pe) {
879
- if (Mn)
880
- return j.current = window.setTimeout(() => {
881
- j.current = null, qe();
882
- }, Vn), () => {
874
+ if (M(), !!he) {
875
+ if (kn)
876
+ return Q.current = window.setTimeout(() => {
877
+ Q.current = null, qe();
878
+ }, Kn), () => {
883
879
  M();
884
880
  };
885
- if (!(mn || !On))
886
- return j.current = window.setTimeout(() => {
887
- j.current = null, qe();
888
- }, Vn), () => {
881
+ if (!(pn || !Mn))
882
+ return Q.current = window.setTimeout(() => {
883
+ Q.current = null, qe();
884
+ }, Kn), () => {
889
885
  M();
890
886
  };
891
887
  }
892
888
  }, [
893
889
  M,
894
890
  qe,
895
- mn,
896
- On,
897
- pe,
898
- Mn
891
+ pn,
892
+ Mn,
893
+ he,
894
+ kn
899
895
  ]);
900
- const _r = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u(Gr, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
901
- Ln,
896
+ const _r = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u($r, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
897
+ Nn,
902
898
  {
903
899
  className: "content-render-iframe",
904
- disableLoadingOverlay: F,
900
+ disableLoadingOverlay: L,
905
901
  hideFullScreen: !0,
906
902
  locale: d,
907
- dir: J,
908
- lang: Te,
903
+ dir: W,
904
+ lang: Re,
909
905
  mode: "blackboard",
910
906
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
911
907
  type: "sandbox",
912
908
  content: e.content,
913
- enableScaling: Yn
909
+ enableScaling: Gn
914
910
  }
915
911
  ) : /* @__PURE__ */ u(
916
- Ln,
912
+ Nn,
917
913
  {
918
914
  className: "content-render-iframe",
919
- disableLoadingOverlay: F,
915
+ disableLoadingOverlay: L,
920
916
  hideFullScreen: !0,
921
917
  locale: d,
922
- dir: J,
923
- lang: Te,
918
+ dir: W,
919
+ lang: Re,
924
920
  mode: "blackboard",
925
921
  type: "markdown",
926
922
  content: e.content
@@ -930,26 +926,26 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
930
926
  return null;
931
927
  const n = e.filter(
932
928
  (o) => o.is_renderable !== !1
933
- ).length, i = t && Gn ? po(e) : "disabled", l = e.reduce(
934
- (o, v, I) => v.is_renderable !== !1 ? I : o,
929
+ ).length, i = t && $n ? yo(e) : "disabled", l = e.reduce(
930
+ (o, v, A) => v.is_renderable !== !1 ? A : o,
935
931
  -1
936
932
  );
937
933
  return /* @__PURE__ */ u(
938
- oo,
934
+ io,
939
935
  {
940
936
  className: "slide-stage__content flex w-full flex-col gap-4",
941
937
  mode: i,
942
938
  children: e.map((o, v) => {
943
- const I = o.type === "html" && o.is_renderable === !1;
939
+ const A = o.type === "html" && o.is_renderable === !1;
944
940
  return /* @__PURE__ */ u(
945
941
  "div",
946
942
  {
947
- ref: t && v === l ? en : null,
948
- "aria-hidden": I || void 0,
949
- className: we(
943
+ ref: t && v === l ? tn : null,
944
+ "aria-hidden": A || void 0,
945
+ className: Pe(
950
946
  "w-full shrink-0",
951
947
  n === 1 && o.is_renderable !== !1 && "slide-element--single",
952
- I ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : o.is_renderable === !1 && "hidden"
948
+ A ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : o.is_renderable === !1 && "hidden"
953
949
  ),
954
950
  children: _r(o, {
955
951
  replaceRootScreenHeightWithFull: n === 1 && o.type === "html" && o.is_renderable !== !1
@@ -961,7 +957,7 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
961
957
  }
962
958
  );
963
959
  }, Mr = r(() => {
964
- const e = ce.current;
960
+ const e = ue.current;
965
961
  if (e) {
966
962
  if (document.fullscreenElement === e) {
967
963
  document.exitFullscreen().catch(() => {
@@ -971,91 +967,103 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
971
967
  e.requestFullscreen?.().catch(() => {
972
968
  });
973
969
  }
974
- }, []), kn = r(() => {
975
- const e = je.current;
970
+ }, []), Fn = r(() => {
971
+ const e = Qe.current;
976
972
  e && e.scrollTo({
977
973
  top: e.scrollHeight,
978
974
  behavior: "smooth"
979
975
  });
980
- }, []), Ut = r(
981
- (e) => Bn({
976
+ }, []), Ht = r(
977
+ (e) => Vn({
982
978
  currentIndex: a,
983
- resolvedCurrentInteractionElement: S,
984
- slideElementList: x,
979
+ resolvedCurrentInteractionElement: b,
980
+ slideElementList: S,
985
981
  targetSlideIndex: Z[e.audioIndex]
986
982
  }),
987
983
  [
988
- S,
984
+ b,
989
985
  Z,
990
986
  a,
991
- x
987
+ S
992
988
  ]
993
989
  ), kr = r(
994
990
  (e, t) => {
995
991
  const i = y[e.audioIndex]?.audioKey, l = Z[e.audioIndex];
996
- return !i || l == null || !Ut(e) ? !1 : (be(t), Q.current = null, w(!1), ot(!1), lt(!1), Gt(t) && (me(!0), g(!0)), l === a ? (Fe.current = null, D(), B(i), ht(e), !0) : (ke.current = !0, D(), Fe.current = {
992
+ return !i || l == null || !Ht(e) ? !1 : (we(t), H.current = null, I(!1), ot(!1), lt(!1), $t(t) && (ee(!0), g(!0)), l === a ? (Fe.current = null, F(), B(i), ht(e), !0) : (me.current = !0, F(), Fe.current = {
997
993
  audioIndex: e.audioIndex,
998
994
  audioKey: i,
999
995
  slideIndex: l,
1000
996
  timeMs: e.timeMs
1001
- }, tt(l), !0));
997
+ }, pe(l), !0));
1002
998
  },
1003
999
  [
1004
1000
  y,
1005
1001
  Z,
1006
- Ut,
1002
+ Ht,
1007
1003
  a,
1008
- tt,
1004
+ pe,
1009
1005
  ht,
1010
- D,
1006
+ F,
1011
1007
  g,
1012
- be
1008
+ we
1013
1009
  ]
1014
1010
  ), Fr = r(
1015
1011
  (e) => {
1016
- be(e), ke.current = !0, Q.current = null, w(!1), Gt(e) && (me(!0), g(!0)), D(), ln();
1012
+ we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), F(), an();
1017
1013
  },
1018
1014
  [
1019
- ln,
1020
- D,
1015
+ an,
1016
+ F,
1021
1017
  g,
1022
- be
1018
+ we
1023
1019
  ]
1024
1020
  ), Lr = r(
1025
1021
  (e) => {
1026
- be(e), ke.current = !0, Q.current = null, w(!1), Gt(e) && (me(!0), g(!0)), D(), L();
1022
+ we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), F(), N();
1027
1023
  },
1028
1024
  [
1029
- L,
1030
- D,
1025
+ N,
1026
+ F,
1027
+ g,
1028
+ we
1029
+ ]
1030
+ ), Nr = r(
1031
+ (e) => {
1032
+ e < 0 || e >= S.length || e === a || (me.current = !0, H.current = null, I(!1), ee(!0), g(!0), F(), pe(e), Xe?.(S[e], e));
1033
+ },
1034
+ [
1035
+ a,
1036
+ pe,
1037
+ Xe,
1038
+ F,
1031
1039
  g,
1032
- be
1040
+ S
1033
1041
  ]
1034
1042
  ), Dr = r(
1035
1043
  ({
1036
1044
  loading: e,
1037
1045
  reason: t
1038
1046
  }) => {
1039
- if (F) {
1040
- w(!1);
1047
+ if (L) {
1048
+ I(!1);
1041
1049
  return;
1042
1050
  }
1043
- if (!b || O) {
1044
- w(!1);
1051
+ if (!w || O) {
1052
+ I(!1);
1045
1053
  return;
1046
1054
  }
1047
- e && t && Tt(t), w(Ho(t, e));
1055
+ e && t && Rt(t), I(Yo(t, e));
1048
1056
  },
1049
1057
  [
1050
- b,
1058
+ w,
1051
1059
  O,
1052
- F
1060
+ L
1053
1061
  ]
1054
1062
  );
1055
1063
  s(() => {
1056
- F && w(!1);
1057
- }, [F]);
1058
- const Nr = r(
1064
+ L && I(!1);
1065
+ }, [L]);
1066
+ const Br = r(
1059
1067
  (e) => {
1060
1068
  const t = y[e]?.audioKey;
1061
1069
  if (!t || !P || t !== P)
@@ -1073,9 +1081,9 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1073
1081
  B(l);
1074
1082
  return;
1075
1083
  }
1076
- if (B(null), ot(!0), w(!1), R) {
1077
- const o = a + 1, v = x[o];
1078
- Pn && v?.type === "interaction" && (Q.current = o), L();
1084
+ if (B(null), ot(!0), I(!1), R) {
1085
+ const o = a + 1, v = S[o];
1086
+ En && v?.type === "interaction" && (H.current = o), N();
1079
1087
  return;
1080
1088
  }
1081
1089
  },
@@ -1085,22 +1093,22 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1085
1093
  a,
1086
1094
  P,
1087
1095
  _,
1088
- L,
1089
- Pn,
1090
- x
1096
+ N,
1097
+ En,
1098
+ S
1091
1099
  ]
1092
- ), Br = r(() => {
1093
- Qe.current = !0, q(), A && De(!0);
1094
- }, [q, A]), Vr = r(() => {
1095
- Qe.current = !1, g(!0);
1096
- }, [g]), Ht = r(
1100
+ ), Vr = r(() => {
1101
+ Ze.current = !0, q(), x && Ne(!0);
1102
+ }, [q, x]), Kr = r(() => {
1103
+ Ze.current = !1, g(!0);
1104
+ }, [g]), Yt = r(
1097
1105
  (e) => {
1098
1106
  e.stopPropagation(), K && g(!0);
1099
1107
  },
1100
1108
  [K, g]
1101
1109
  ), gt = r(
1102
1110
  (e, t) => {
1103
- const n = wt.current;
1111
+ const n = xt.current;
1104
1112
  if (!n)
1105
1113
  return null;
1106
1114
  const i = e.getBoundingClientRect(), l = n.getBoundingClientRect();
@@ -1113,23 +1121,23 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1113
1121
  },
1114
1122
  []
1115
1123
  );
1116
- Bo(() => {
1117
- const e = Oe.current;
1124
+ Vo(() => {
1125
+ const e = Me.current;
1118
1126
  if (!He || !e) {
1119
- de.current = null;
1127
+ fe.current = null;
1120
1128
  return;
1121
1129
  }
1122
- const t = de.current, n = e.getBoundingClientRect();
1123
- if (!t || kt) {
1124
- de.current = {
1130
+ const t = fe.current, n = e.getBoundingClientRect();
1131
+ if (!t || Ft) {
1132
+ fe.current = {
1125
1133
  left: n.left,
1126
1134
  top: n.top
1127
1135
  };
1128
1136
  return;
1129
1137
  }
1130
1138
  const i = t.left - n.left, l = t.top - n.top;
1131
- if (!Kn(i) && !Kn(l)) {
1132
- de.current = {
1139
+ if (!qn(i) && !qn(l)) {
1140
+ fe.current = {
1133
1141
  left: n.left,
1134
1142
  top: n.top
1135
1143
  };
@@ -1141,51 +1149,51 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1141
1149
  }, v = gt(
1142
1150
  e,
1143
1151
  E
1144
- ), I = Ko(
1145
- v ? Nn(o, v) : o
1152
+ ), A = qo(
1153
+ v ? Bn(o, v) : o
1146
1154
  );
1147
- de.current = {
1148
- left: n.left + I.x - E.x,
1149
- top: n.top + I.y - E.y
1150
- }, qn(
1151
- I,
1155
+ fe.current = {
1156
+ left: n.left + A.x - E.x,
1157
+ top: n.top + A.y - E.y
1158
+ }, Un(
1159
+ A,
1152
1160
  E
1153
- ) || Mt(
1154
- (oe) => qn(oe, I) ? oe : I
1161
+ ) || kt(
1162
+ (ie) => Un(ie, A) ? ie : A
1155
1163
  );
1156
1164
  }, [
1157
1165
  gt,
1158
1166
  E,
1159
- kt,
1167
+ Ft,
1160
1168
  ut,
1161
1169
  He
1162
1170
  ]);
1163
- const Kr = r(
1171
+ const qr = r(
1164
1172
  (e) => {
1165
- if (Ht(e), e.button !== 0 || !e.currentTarget.isConnected || !Oe.current)
1173
+ if (Yt(e), e.button !== 0 || !e.currentTarget.isConnected || !Me.current)
1166
1174
  return;
1167
1175
  const t = gt(
1168
- Oe.current,
1176
+ Me.current,
1169
1177
  E
1170
1178
  );
1171
- t && (e.preventDefault(), e.currentTarget.hasPointerCapture?.(e.pointerId) !== !0 && e.currentTarget.setPointerCapture(e.pointerId), Me.current = {
1179
+ t && (e.preventDefault(), e.currentTarget.hasPointerCapture?.(e.pointerId) !== !0 && e.currentTarget.setPointerCapture(e.pointerId), ke.current = {
1172
1180
  pointerId: e.pointerId,
1173
1181
  startClientX: e.clientX,
1174
1182
  startClientY: e.clientY,
1175
1183
  startOffset: E,
1176
1184
  bounds: t
1177
- }, Ft(!0));
1185
+ }, Lt(!0));
1178
1186
  },
1179
1187
  [
1180
1188
  gt,
1181
1189
  E,
1182
- Ht
1190
+ Yt
1183
1191
  ]
1184
- ), qr = r(
1192
+ ), Ur = r(
1185
1193
  (e) => {
1186
- const t = Me.current;
1187
- !t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), Mt(
1188
- Nn(
1194
+ const t = ke.current;
1195
+ !t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), kt(
1196
+ Bn(
1189
1197
  {
1190
1198
  x: t.startOffset.x + e.clientX - t.startClientX,
1191
1199
  y: t.startOffset.y + e.clientY - t.startClientY
@@ -1195,36 +1203,36 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1195
1203
  ));
1196
1204
  },
1197
1205
  []
1198
- ), Fn = r(
1206
+ ), Ln = r(
1199
1207
  (e) => {
1200
- const t = Me.current;
1201
- !t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), Me.current = null, Ft(!1));
1208
+ const t = ke.current;
1209
+ !t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), ke.current = null, Lt(!1));
1202
1210
  },
1203
1211
  []
1204
- ), Ur = r(
1212
+ ), Hr = r(
1205
1213
  (e) => {
1206
- H(), Qt?.(e);
1214
+ Y(), Zt?.(e);
1207
1215
  },
1208
- [H, Qt]
1209
- ), Hr = r(
1216
+ [Y, Zt]
1217
+ ), Yr = r(
1210
1218
  (e) => {
1211
- H(), Zt?.(e);
1219
+ Y(), en?.(e);
1212
1220
  },
1213
- [H, Zt]
1214
- ), Yr = r(() => {
1215
- me(!0), g(!0);
1221
+ [Y, en]
1222
+ ), Gr = r(() => {
1223
+ ee(!0), g(!0);
1216
1224
  }, [g]);
1217
1225
  return s(() => {
1218
- const e = tn.current, i = (e.length > 0 && e.length < fe.length && e.every((o, v) => o === fe[v]) ? T.slice(e.length) : []).some(
1226
+ const e = nn.current, i = (e.length > 0 && e.length < ye.length && e.every((o, v) => o === ye[v]) ? T.slice(e.length) : []).some(
1219
1227
  (o) => o.is_new === !1
1220
1228
  );
1221
- if (tn.current = fe, !i)
1229
+ if (nn.current = ye, !i)
1222
1230
  return;
1223
1231
  const l = window.requestAnimationFrame(() => {
1224
- const o = je.current, v = en.current;
1232
+ const o = Qe.current, v = tn.current;
1225
1233
  if (!o || !v)
1226
1234
  return;
1227
- const I = o.getBoundingClientRect(), oe = v.getBoundingClientRect(), Ye = o.scrollTop + (oe.top - I.top);
1235
+ const A = o.getBoundingClientRect(), ie = v.getBoundingClientRect(), Ye = o.scrollTop + (ie.top - A.top);
1228
1236
  o.scrollTo({
1229
1237
  top: Math.max(Ye, 0),
1230
1238
  behavior: "smooth"
@@ -1233,33 +1241,33 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1233
1241
  return () => {
1234
1242
  window.cancelAnimationFrame(l);
1235
1243
  };
1236
- }, [T, fe]), s(() => {
1237
- if (!ke.current || (ke.current = !1, T.length === 0))
1244
+ }, [T, ye]), s(() => {
1245
+ if (!me.current || (me.current = !1, T.length === 0))
1238
1246
  return;
1239
1247
  const e = window.requestAnimationFrame(() => {
1240
- kn();
1248
+ Fn();
1241
1249
  });
1242
1250
  return () => {
1243
1251
  window.cancelAnimationFrame(e);
1244
1252
  };
1245
- }, [T, kn]), /* @__PURE__ */ Ge(
1253
+ }, [T, Fn]), /* @__PURE__ */ Ge(
1246
1254
  "section",
1247
1255
  {
1248
- ref: ce,
1249
- className: we(
1256
+ ref: ue,
1257
+ className: Pe(
1250
1258
  "relative h-full w-full",
1251
1259
  V && "slide--mobile-device",
1252
- Sn && "slide--browser-fullscreen",
1253
- ge && "slide--mobile-landscape",
1254
- gn && "slide--mobile-landscape-native",
1255
- $n
1260
+ In && "slide--browser-fullscreen",
1261
+ Se && "slide--mobile-landscape",
1262
+ vn && "slide--mobile-landscape-native",
1263
+ zn
1256
1264
  ),
1257
- dir: J,
1258
- lang: Te,
1259
- onClick: Yr,
1260
- onFocusCapture: Hr,
1261
- onPointerDown: Ur,
1262
- ...Jn,
1265
+ dir: W,
1266
+ lang: Re,
1267
+ onClick: Gr,
1268
+ onFocusCapture: Yr,
1269
+ onPointerDown: Hr,
1270
+ ...Wn,
1263
1271
  children: [
1264
1272
  yr ? /* @__PURE__ */ u(
1265
1273
  "div",
@@ -1271,23 +1279,23 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1271
1279
  /* @__PURE__ */ Ge(
1272
1280
  "div",
1273
1281
  {
1274
- ref: wt,
1275
- className: we(
1282
+ ref: xt,
1283
+ className: Pe(
1276
1284
  "slide__viewport relative h-full min-h-0 w-full",
1277
- ge && "slide__viewport--mobile-landscape",
1278
- ge && !fr && "slide__viewport--mobile-landscape-native"
1285
+ Se && "slide__viewport--mobile-landscape",
1286
+ Se && !fr && "slide__viewport--mobile-landscape-native"
1279
1287
  ),
1280
1288
  children: [
1281
1289
  mr ? /* @__PURE__ */ Ge("div", { className: "slide-landscape-header", children: [
1282
1290
  /* @__PURE__ */ u(
1283
1291
  "button",
1284
1292
  {
1285
- "aria-label": z?.backAriaLabel ?? N.fullscreenBackAriaLabel,
1293
+ "aria-label": X?.backAriaLabel ?? D.fullscreenBackAriaLabel,
1286
1294
  className: "slide-landscape-header__back",
1287
1295
  onClick: gr,
1288
1296
  type: "button",
1289
1297
  children: /* @__PURE__ */ u(
1290
- ko,
1298
+ Fo,
1291
1299
  {
1292
1300
  className: "slide-landscape-header__icon h-6 w-6",
1293
1301
  strokeWidth: 2.25
@@ -1295,17 +1303,17 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1295
1303
  )
1296
1304
  }
1297
1305
  ),
1298
- z?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: z.content }) : null
1306
+ X?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: X.content }) : null
1299
1307
  ] }) : null,
1300
1308
  /* @__PURE__ */ u(
1301
1309
  "div",
1302
1310
  {
1303
- className: we(
1311
+ className: Pe(
1304
1312
  "h-full min-h-0 w-full",
1305
1313
  pr && "slide__viewport-content--with-header",
1306
1314
  tr ? "slide-content--single" : "grid gap-4"
1307
1315
  ),
1308
- children: T.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: je, className: "slide-stage__layer w-full", children: vr.map(
1316
+ children: T.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: Qe, className: "slide-stage__layer w-full", children: vr.map(
1309
1317
  (e, t) => {
1310
1318
  const n = t === Sr;
1311
1319
  return /* @__PURE__ */ u(
@@ -1327,96 +1335,96 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1327
1335
  }
1328
1336
  ),
1329
1337
  ir ? /* @__PURE__ */ u(
1330
- Zr,
1338
+ eo,
1331
1339
  {
1332
- message: qo(
1333
- Wn,
1340
+ message: Uo(
1341
+ jn,
1334
1342
  lr
1335
1343
  ),
1336
1344
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
1337
1345
  }
1338
1346
  ) : null,
1339
1347
  /* @__PURE__ */ u(
1340
- io,
1348
+ lo,
1341
1349
  {
1342
1350
  extraBottomOffset: cr,
1343
1351
  hasPlayerGap: ut,
1344
- isEnabled: fn && ar,
1345
- playbackTimeStore: he,
1352
+ isEnabled: mn && ar,
1353
+ playbackTimeStore: ve,
1346
1354
  subtitleCues: Ir
1347
1355
  }
1348
1356
  ),
1349
1357
  He ? /* @__PURE__ */ u(
1350
1358
  "div",
1351
1359
  {
1352
- ref: Oe,
1360
+ ref: Me,
1353
1361
  "data-player-keyboard-shortcuts-ignore": "true",
1354
- className: we(
1362
+ className: Pe(
1355
1363
  "slide-interaction-overlay",
1356
1364
  ut ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
1357
- kt && "slide-interaction-overlay--dragging"
1365
+ Ft && "slide-interaction-overlay--dragging"
1358
1366
  ),
1359
- onClick: Ht,
1367
+ onClick: Yt,
1360
1368
  onPointerDownCapture: (e) => {
1361
- zt(e.target) && st(!0);
1369
+ Xt(e.target) && st(!0);
1362
1370
  },
1363
1371
  onFocusCapture: (e) => {
1364
- zt(e.target) && st(!0);
1372
+ Xt(e.target) && st(!0);
1365
1373
  },
1366
1374
  onInputCapture: (e) => {
1367
- zt(e.target) && st(!0);
1375
+ Xt(e.target) && st(!0);
1368
1376
  },
1369
1377
  style: br,
1370
1378
  children: /* @__PURE__ */ u(
1371
- Un,
1379
+ Hn,
1372
1380
  {
1373
- dir: J,
1374
- lang: Te,
1375
- content: String(S?.content ?? ""),
1376
- dragHandleAriaLabel: X?.dragHandleAriaLabel ?? N.interactionTexts.dragHandleAriaLabel,
1381
+ dir: W,
1382
+ lang: Re,
1383
+ content: String(b?.content ?? ""),
1384
+ dragHandleAriaLabel: J?.dragHandleAriaLabel ?? D.interactionTexts.dragHandleAriaLabel,
1377
1385
  locale: d,
1378
- defaultButtonText: _n.buttonText ?? "",
1379
- defaultInputText: _n.inputText ?? "",
1386
+ defaultButtonText: On.buttonText ?? "",
1387
+ defaultInputText: On.inputText ?? "",
1380
1388
  defaultSelectedValues: Er,
1381
- confirmButtonText: X?.confirmButtonText ?? N.interactionTexts.confirmButtonText,
1382
- copyButtonText: X?.copyButtonText ?? N.interactionTexts.copyButtonText,
1383
- copiedButtonText: X?.copiedButtonText ?? N.interactionTexts.copiedButtonText,
1389
+ confirmButtonText: J?.confirmButtonText ?? D.interactionTexts.confirmButtonText,
1390
+ copyButtonText: J?.copyButtonText ?? D.interactionTexts.copyButtonText,
1391
+ copiedButtonText: J?.copiedButtonText ?? D.interactionTexts.copiedButtonText,
1384
1392
  onSend: Rr,
1385
- onDragHandlePointerCancel: Fn,
1386
- onDragHandlePointerDown: Kr,
1387
- onDragHandlePointerMove: qr,
1388
- onDragHandlePointerUp: Fn,
1393
+ onDragHandlePointerCancel: Ln,
1394
+ onDragHandlePointerDown: qr,
1395
+ onDragHandlePointerMove: Ur,
1396
+ onDragHandlePointerUp: Ln,
1389
1397
  readonly: Tr,
1390
- title: X?.title ?? It ?? N.interactionTexts.title
1398
+ title: J?.title ?? It ?? D.interactionTexts.title
1391
1399
  }
1392
1400
  )
1393
1401
  }
1394
1402
  ) : null,
1395
- A ? /* @__PURE__ */ u(
1396
- so.Provider,
1403
+ x ? /* @__PURE__ */ u(
1404
+ co.Provider,
1397
1405
  {
1398
1406
  value: nr,
1399
1407
  children: /* @__PURE__ */ u(
1400
- ro,
1408
+ oo,
1401
1409
  {
1402
- dir: J === "auto" ? Qn : J,
1403
- lang: Te,
1410
+ dir: W === "auto" ? Zn : W,
1411
+ lang: Re,
1404
1412
  audioList: y,
1405
- className: we(
1413
+ className: Pe(
1406
1414
  "absolute left-1/2 z-[2] -translate-x-1/2",
1407
- Sn ? "bottom-3" : "-bottom-3",
1408
- $,
1415
+ In ? "bottom-3" : "-bottom-3",
1416
+ z,
1409
1417
  !K && "pointer-events-none opacity-0"
1410
1418
  ),
1411
1419
  currentAudioIndex: C,
1412
- defaultPlaying: Et,
1413
- enableKeyboardShortcuts: se,
1414
- isPlaybackPaused: ne,
1415
- isAutoAdvanceEnabled: Ne,
1420
+ defaultPlaying: Ct,
1421
+ enableKeyboardShortcuts: ce,
1422
+ isPlaybackPaused: re,
1423
+ isAutoAdvanceEnabled: De,
1416
1424
  locale: d,
1417
- isInteractionOpen: pe,
1418
- isSubtitleEnabled: fn,
1419
- onAutoAdvanceToggle: sn,
1425
+ isInteractionOpen: he,
1426
+ isSubtitleEnabled: mn,
1427
+ onAutoAdvanceToggle: cn,
1420
1428
  onLoadingChange: Dr,
1421
1429
  onPlaybackStarted: () => {
1422
1430
  lt(!0);
@@ -1425,7 +1433,7 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1425
1433
  const i = y.findIndex(
1426
1434
  (o) => o.audioKey === e
1427
1435
  ), l = i >= 0 ? y[i] : void 0;
1428
- !l?.audioKey || !l.element || Hn?.({
1436
+ !l?.audioKey || !l.element || Yn?.({
1429
1437
  audioKey: l.audioKey,
1430
1438
  element: l.element,
1431
1439
  isComplete: t,
@@ -1434,29 +1442,30 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1434
1442
  });
1435
1443
  },
1436
1444
  onPlaybackPreferenceChange: Pr,
1437
- onPlaybackTimeChange: he.setTime,
1445
+ onPlaybackTimeChange: ve.setTime,
1438
1446
  onSubtitleToggle: () => {
1439
1447
  sr((e) => !e);
1440
1448
  },
1441
1449
  nextDisabled: !R,
1442
- onEnded: Nr,
1450
+ onEnded: Br,
1443
1451
  onFullscreen: Mr,
1444
- isFullscreen: pn,
1445
- mobileViewMode: ee,
1446
- settingsPortalContainer: wt.current,
1452
+ isFullscreen: yn,
1453
+ mobileViewMode: te,
1454
+ settingsPortalContainer: xt.current,
1447
1455
  onMobileViewModeChange: hr,
1448
- onControlsPointerEnter: Br,
1449
- onControlsPointerLeave: Vr,
1456
+ onControlsPointerEnter: Vr,
1457
+ onControlsPointerLeave: Kr,
1450
1458
  onNext: Lr,
1451
1459
  onPrev: Fr,
1452
1460
  onSubtitleJump: kr,
1453
- canJumpToSubtitleTarget: Ut,
1454
- prevDisabled: !Zn,
1461
+ canJumpToSubtitleTarget: Ht,
1462
+ prevDisabled: !er,
1455
1463
  showControls: K,
1456
1464
  slideProgress: At ? {
1457
- ariaLabel: N.slideProgressAriaLabel,
1458
- currentIndex: er,
1459
- totalSteps: an
1465
+ ariaLabel: D.slideProgressAriaLabel,
1466
+ currentIndex: a,
1467
+ onNavigate: Nr,
1468
+ totalSteps: sn
1460
1469
  } : null,
1461
1470
  subtitleSeekRequest: or,
1462
1471
  playbackRestoreRequest: rt && rt.audioKey === mt?.audioKey ? {
@@ -1464,11 +1473,11 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1464
1473
  timeMs: rt.timeMs
1465
1474
  } : null,
1466
1475
  onPlaybackRestoreComplete: (e) => {
1467
- Be.current?.id === e && (Be.current = null, cn(null));
1476
+ Be.current?.id === e && (Be.current = null, un(null));
1468
1477
  },
1469
1478
  texts: bt,
1470
- customActionContext: Nt,
1471
- customActions: Pe,
1479
+ customActionContext: Bt,
1480
+ customActions: Ce,
1472
1481
  useAutoAdvanceToggle: Ve
1473
1482
  }
1474
1483
  )
@@ -1482,6 +1491,6 @@ const Yo = (c, d) => c.length === d.length && c.every((G, xe) => {
1482
1491
  );
1483
1492
  };
1484
1493
  export {
1485
- Ri as default
1494
+ _i as default
1486
1495
  };
1487
1496
  //# sourceMappingURL=Slide.es.js.map