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