markdown-flow-ui 0.1.108-beta.2 → 0.1.108-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/_virtual/index.cjs4.js +1 -1
  2. package/dist/_virtual/index.cjs5.js +1 -1
  3. package/dist/_virtual/index.cjs6.js +1 -1
  4. package/dist/_virtual/index.cjs7.js +1 -1
  5. package/dist/_virtual/index.es4.js +4 -4
  6. package/dist/_virtual/index.es5.js +4 -4
  7. package/dist/_virtual/index.es6.js +2 -5
  8. package/dist/_virtual/index.es6.js.map +1 -1
  9. package/dist/_virtual/index.es7.js +5 -2
  10. package/dist/_virtual/index.es7.js.map +1 -1
  11. package/dist/assets/markdown-flow-ui.css +1 -1
  12. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.js +1 -1
  13. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.js.map +1 -1
  14. package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +5 -1
  15. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +69 -27
  16. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
  17. package/dist/components/Slide/Player.cjs.js +1 -1
  18. package/dist/components/Slide/Player.cjs.js.map +1 -1
  19. package/dist/components/Slide/Player.d.ts +6 -1
  20. package/dist/components/Slide/Player.es.js +281 -249
  21. package/dist/components/Slide/Player.es.js.map +1 -1
  22. package/dist/components/Slide/Slide.cjs.js +1 -1
  23. package/dist/components/Slide/Slide.cjs.js.map +1 -1
  24. package/dist/components/Slide/Slide.es.js +410 -394
  25. package/dist/components/Slide/Slide.es.js.map +1 -1
  26. package/dist/components/Slide/SubtitleOverlay.cjs.js +1 -1
  27. package/dist/components/Slide/SubtitleOverlay.cjs.js.map +1 -1
  28. package/dist/components/Slide/SubtitleOverlay.d.ts +2 -1
  29. package/dist/components/Slide/SubtitleOverlay.es.js +33 -32
  30. package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
  31. package/dist/components/Slide/constants.cjs.js +1 -1
  32. package/dist/components/Slide/constants.cjs.js.map +1 -1
  33. package/dist/components/Slide/constants.d.ts +2 -0
  34. package/dist/components/Slide/constants.es.js +4 -2
  35. package/dist/components/Slide/constants.es.js.map +1 -1
  36. package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
  37. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  38. package/dist/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.cjs.js +1 -1
  39. package/dist/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
  40. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.js +7 -0
  41. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.js.map +1 -0
  42. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions-off.es.js +20 -0
  43. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions-off.es.js.map +1 -0
  44. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions.cjs.js +7 -0
  45. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions.cjs.js.map +1 -0
  46. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions.es.js +16 -0
  47. package/dist/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/captions.es.js.map +1 -0
  48. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js +1 -1
  49. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.es.js +1 -1
  50. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.cjs.js +1 -1
  51. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  52. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.cjs.js +1 -1
  53. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  54. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.cjs.js +1 -1
  55. package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.es.js +1 -1
  56. package/dist/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
  57. package/dist/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
  58. package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
  59. package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
  60. package/dist/markdown-flow-ui-lib.css +1 -1
  61. package/package.json +1 -1
@@ -1,154 +1,153 @@
1
1
  import { j as n } from "../../_virtual/jsx-runtime.es.js";
2
- import { memo as on, useRef as h, useMemo as c, useState as m, useCallback as r, useEffect as a } from "react";
3
- import { isSandboxInteractionMessage as ln } from "../../lib/sandboxInteraction.es.js";
2
+ import { memo as dn, useRef as v, useMemo as i, useState as f, useCallback as r, useEffect as c } from "react";
3
+ import { isSandboxInteractionMessage as fn } from "../../lib/sandboxInteraction.es.js";
4
4
  import { cn as X } from "../../lib/utils.es.js";
5
- import sn from "../ui/loading-overlay-card.es.js";
6
- import cn from "../ContentRender/ContentRender.es.js";
7
- import gt from "../ContentRender/IframeSandbox.es.js";
5
+ import mn from "../ui/loading-overlay-card.es.js";
6
+ import pn from "../ContentRender/ContentRender.es.js";
7
+ import xt from "../ContentRender/IframeSandbox.es.js";
8
8
  import "../ui/inputGroup/input-group.es.js";
9
- import { getInteractionDefaultValues as an, getInteractionDefaultSelectedValues as un } from "../../lib/interaction-defaults.es.js";
10
- import { isMobileDevice as dn, isLandscapeViewport as bt, subscribeMobileDeviceChange as fn } from "../../lib/mobileDevice.es.js";
11
- import mn from "./Player.es.js";
12
- import pn from "./SubtitleOverlay.es.js";
13
- import { DEFAULT_SLIDE_PLAYER_TEXTS as hn } from "./constants.es.js";
14
- import vn from "./SlideFullscreenHint.es.js";
15
- import yn from "./useSlide.es.js";
16
- import gn from "./useWakePlayerFromIframe.es.js";
17
- import { DEFAULT_MOBILE_VIEW_MODE as be, resolveMobileViewModeState as bn } from "./utils/mobileScreenMode.es.js";
18
- import { shouldPresentInteractionOverlay as Sn } from "./utils/interactionPlayback.es.js";
19
- import { getPlaybackSequenceTransition as xn } from "./utils/playbackSequence.es.js";
20
- import { resolvePlayerCustomActionElement as wn, getPlayerCustomActionCount as In } from "./utils/playerCustomActions.es.js";
21
- import { createPlaybackTimeStore as An } from "./utils/playbackTimeStore.es.js";
22
- import { shouldUseAutoAdvanceToggle as _n } from "./utils/playerToggleMode.es.js";
9
+ import { getInteractionDefaultValues as hn, getInteractionDefaultSelectedValues as vn } from "../../lib/interaction-defaults.es.js";
10
+ import { isMobileDevice as yn, isLandscapeViewport as wt, subscribeMobileDeviceChange as bn } from "../../lib/mobileDevice.es.js";
11
+ import gn from "./Player.es.js";
12
+ import Sn from "./SubtitleOverlay.es.js";
13
+ import { DEFAULT_SLIDE_PLAYER_TEXTS as xn } from "./constants.es.js";
14
+ import wn from "./SlideFullscreenHint.es.js";
15
+ import In from "./useSlide.es.js";
16
+ import An from "./useWakePlayerFromIframe.es.js";
17
+ import { DEFAULT_MOBILE_VIEW_MODE as Se, resolveMobileViewModeState as _n } from "./utils/mobileScreenMode.es.js";
18
+ import { shouldPresentInteractionOverlay as En } from "./utils/interactionPlayback.es.js";
19
+ import { getPlaybackSequenceTransition as Tn } from "./utils/playbackSequence.es.js";
20
+ import { resolvePlayerCustomActionElement as Pn, getPlayerCustomActionCount as Cn } from "./utils/playerCustomActions.es.js";
21
+ import { createPlaybackTimeStore as Rn } from "./utils/playbackTimeStore.es.js";
22
+ import { shouldUseAutoAdvanceToggle as Fn } from "./utils/playerToggleMode.es.js";
23
23
  /* empty css */
24
- import Tn from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
25
- const En = 2e3, Pn = 300, Rn = 160, Cn = 16, St = on(
24
+ import Mn from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
25
+ const On = 2e3, Bn = 300, Nn = 160, kn = 16, It = dn(
26
26
  ({
27
- content: j,
28
- title: k,
29
- defaultButtonText: b,
27
+ content: L,
28
+ title: j,
29
+ defaultButtonText: g,
30
30
  defaultInputText: J,
31
31
  defaultSelectedValues: S,
32
- confirmButtonText: V,
32
+ confirmButtonText: K,
33
33
  copyButtonText: Q,
34
- copiedButtonText: Se,
35
- onSend: xe,
36
- readonly: K = !1
34
+ copiedButtonText: xe,
35
+ onSend: we,
36
+ readonly: V = !1
37
37
  }) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
38
- /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: k }) }),
38
+ /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: j }) }),
39
39
  /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
40
- cn,
40
+ pn,
41
41
  {
42
- content: j,
43
- defaultButtonText: b,
42
+ content: L,
43
+ defaultButtonText: g,
44
44
  defaultInputText: J,
45
45
  defaultSelectedValues: S,
46
- confirmButtonText: V,
46
+ confirmButtonText: K,
47
47
  copyButtonText: Q,
48
- copiedButtonText: Se,
49
- onSend: xe,
50
- readonly: K,
48
+ copiedButtonText: xe,
49
+ onSend: we,
50
+ readonly: V,
51
51
  enableTypewriter: !1,
52
52
  sandboxMode: "content"
53
53
  }
54
- ) }),
55
- /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-arrow" })
54
+ ) })
56
55
  ] })
57
56
  );
58
- St.displayName = "InteractionOverlayCard";
59
- const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
60
- const S = k[J];
61
- return b.sequence_number === S?.sequence_number && b.type === S?.type && b.content === S?.content;
62
- }), lr = ({
63
- elementList: j = [],
64
- showPlayer: k = !0,
65
- playerAlwaysVisible: b = !1,
57
+ It.displayName = "InteractionOverlayCard";
58
+ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
59
+ const S = j[J];
60
+ return g.sequence_number === S?.sequence_number && g.type === S?.type && g.content === S?.content;
61
+ }), ur = ({
62
+ elementList: L = [],
63
+ showPlayer: j = !0,
64
+ playerAlwaysVisible: g = !1,
66
65
  playerClassName: J,
67
66
  fullscreenHeader: S,
68
- playerCustomActions: V,
67
+ playerCustomActions: K,
69
68
  playerCustomActionPauseOnActive: Q = !0,
70
- bufferingText: Se = "Buffering...",
71
- interactionTitle: xe,
72
- interactionTexts: K,
73
- playerTexts: ke,
74
- playerAutoHideDelay: we = 3e3,
75
- markerAutoAdvanceDelay: Ve = En,
76
- interactionDefaultValueOptions: se,
77
- onSend: Ke,
78
- onPlayerVisibilityChange: Ie,
79
- onMobileViewModeChange: qe,
80
- onStepChange: De,
81
- enableIframeScaling: xt = !0,
82
- className: wt,
83
- onPointerDown: He,
84
- ...It
69
+ bufferingText: xe = "Buffering...",
70
+ interactionTitle: we,
71
+ interactionTexts: V,
72
+ playerTexts: Ve,
73
+ playerAutoHideDelay: Ie = 3e3,
74
+ markerAutoAdvanceDelay: qe = On,
75
+ interactionDefaultValueOptions: ie,
76
+ onSend: He,
77
+ onPlayerVisibilityChange: Ae,
78
+ onMobileViewModeChange: De,
79
+ onStepChange: Ue,
80
+ enableIframeScaling: At = !0,
81
+ className: _t,
82
+ onPointerDown: ze,
83
+ ...Et
85
84
  }) => {
86
- const ie = h(null), Ue = h(null), Ae = h(null), ze = h(null), Z = h(null), ee = h(null), te = h(null), ne = h(null), $e = h(null), We = h([]), ce = h(!1), q = h(null), Ye = h(null), {
87
- currentElementList: R,
88
- stepElementLists: Ge,
89
- slideElementList: D,
90
- currentIndex: f,
85
+ const ce = v(null), $e = v(null), _e = v(null), We = v(null), Z = v(null), ee = v(null), te = v(null), ne = v(null), Ye = v(null), Ge = v([]), ae = v(!1), q = v(null), Xe = v(null), {
86
+ currentElementList: C,
87
+ stepElementLists: Je,
88
+ slideElementList: H,
89
+ currentIndex: m,
91
90
  audioList: p,
92
- currentAudioSequenceIndexes: ae,
91
+ currentAudioSequenceIndexes: ue,
93
92
  currentStepHasSpeakableElement: x,
94
93
  currentInteractionElement: d,
95
- canGoPrev: At,
96
- canGoNext: C,
97
- handlePrev: Xe,
94
+ canGoPrev: Tt,
95
+ canGoNext: R,
96
+ handlePrev: Qe,
98
97
  handleNext: M
99
- } = yn(j), re = c(() => {
100
- if (!(f < 0))
101
- return D[f];
102
- }, [f, D]), _t = D.filter(
98
+ } = In(L), re = i(() => {
99
+ if (!(m < 0))
100
+ return H[m];
101
+ }, [m, H]), Pt = H.filter(
103
102
  (e) => e.is_renderable !== !1
104
- ).length === 1, w = k && (D.length > 0 || p.length > 0 || !!d), _ = c(
105
- () => ae.map((e) => p[e]?.audioKey).filter((e) => !!e),
106
- [p, ae]
107
- ), [Je, ue] = m(!0), [de, oe] = m(!1), [_e, Qe] = m(!0), [y, H] = m(null), [Tt, I] = m(!1), [O, Ze] = m(!1), [Te, Ee] = m(!1), [o, Pe] = m(), [fe, me] = m(!1), [
108
- Et,
103
+ ).length === 1, w = j && (H.length > 0 || p.length > 0 || !!d), _ = i(
104
+ () => ue.map((e) => p[e]?.audioKey).filter((e) => !!e),
105
+ [p, ue]
106
+ ), [Ze, de] = f(!0), [fe, oe] = f(!1), [Ee, et] = f(!0), [b, D] = f(null), [Ct, I] = f(!1), [O, tt] = f(!1), [Rt, Te] = f(!1), [nt, Ft] = f(!0), [Pe, Ce] = f(!1), [o, Re] = f(), [me, pe] = f(!1), [
107
+ Mt,
109
108
  le
110
- ] = m(0), [Pt, Rt] = m(!1), T = c(() => dn(), []), [pe, Re] = m(
111
- be
112
- ), [et, Ce] = m(!1), [Fe, tt] = m(
113
- () => T ? bt() : !1
114
- ), [Ct, he] = m(!1), U = c(() => An(), []), {
109
+ ] = f(0), [Ot, Bt] = f(!1), E = i(() => yn(), []), [he, Fe] = f(
110
+ Se
111
+ ), [rt, Me] = f(!1), [Oe, ot] = f(
112
+ () => E ? wt() : !1
113
+ ), [Nt, ve] = f(!1), U = i(() => Rn(), []), {
115
114
  effectiveMobileViewMode: B,
116
115
  isImmersiveMobileFullscreen: z,
117
- isNativeMobileFullscreen: nt,
118
- shouldRotateFullscreenViewport: Ft
119
- } = c(
120
- () => bn({
121
- hasManualMobileViewMode: et,
122
- isMobileDevice: T,
123
- mobileViewMode: pe
116
+ isNativeMobileFullscreen: lt,
117
+ shouldRotateFullscreenViewport: kt
118
+ } = i(
119
+ () => _n({
120
+ hasManualMobileViewMode: rt,
121
+ isMobileDevice: E,
122
+ mobileViewMode: he
124
123
  }),
125
124
  [
126
- et,
127
- T,
128
- Fe,
129
- pe
125
+ rt,
126
+ E,
127
+ Oe,
128
+ he
130
129
  ]
131
- ), rt = h(B), E = w && (b || Je), Mt = z && E, Ot = z && E, Bt = z || nt, Nt = ke?.fullscreenHintText ?? hn.fullscreenHintText, Lt = r(
130
+ ), st = v(B), T = w && (g || Ze), Lt = z && T, jt = z && T, Kt = z || lt, Vt = Ve?.fullscreenHintText ?? xn.fullscreenHintText, qt = r(
132
131
  (e) => {
133
- Ce(!0), Re(e);
132
+ Me(!0), Fe(e);
134
133
  },
135
134
  []
136
- ), ot = r(() => {
137
- Ce(!1), Re(be);
138
- }, []), jt = r(() => {
139
- ot(), S?.onBack?.();
140
- }, [S, ot]), kt = r(() => {
141
- he(!1);
142
- }, []), lt = r((e) => {
143
- Ee(e);
144
- }, []), st = r(() => {
145
- Ee((e) => !e);
146
- }, []), { mountedStepStates: Vt, currentMountedStateIndex: Kt } = c(() => {
135
+ ), it = r(() => {
136
+ Me(!1), Fe(Se);
137
+ }, []), Ht = r(() => {
138
+ it(), S?.onBack?.();
139
+ }, [S, it]), Dt = r(() => {
140
+ ve(!1);
141
+ }, []), ct = r((e) => {
142
+ Ce(e);
143
+ }, []), at = r(() => {
144
+ Ce((e) => !e);
145
+ }, []), { mountedStepStates: Ut, currentMountedStateIndex: zt } = i(() => {
147
146
  const e = [], t = /* @__PURE__ */ new Map();
148
- return Ge.forEach((l, u) => {
147
+ return Je.forEach((l, u) => {
149
148
  const s = e.findIndex(
150
- (i) => Fn(
151
- i.elementList,
149
+ (a) => Ln(
150
+ a.elementList,
152
151
  l
153
152
  )
154
153
  );
@@ -162,77 +161,84 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
162
161
  }), t.set(u, e.length - 1);
163
162
  }), {
164
163
  mountedStepStates: e,
165
- currentMountedStateIndex: f >= 0 ? t.get(f) ?? -1 : -1
164
+ currentMountedStateIndex: m >= 0 ? t.get(m) ?? -1 : -1
166
165
  };
167
- }, [f, Ge]), it = c(() => String(f), [f]), g = c(() => y ? p.findIndex(
168
- (e) => (e.audioKey ?? "") === y
169
- ) : -1, [p, y]), qt = c(
170
- () => g >= 0 ? p[g] : void 0,
171
- [p, g]
172
- )?.element?.subtitle_cues ?? [], ve = c(
166
+ }, [m, Je]), ut = i(() => String(m), [m]), h = i(() => b ? p.findIndex(
167
+ (e) => (e.audioKey ?? "") === b
168
+ ) : -1, [p, b]), Be = i(
169
+ () => h >= 0 ? p[h] : void 0,
170
+ [p, h]
171
+ ), $t = Be?.element?.subtitle_cues ?? [], ye = i(
173
172
  () => _[0] ?? "none",
174
173
  [_]
175
- ), Me = c(
174
+ ), Ne = i(
176
175
  () => ({
177
- currentElement: wn({
178
- currentAudioIndex: g,
179
- currentAudioSequenceIndexes: ae,
176
+ currentElement: Pn({
177
+ currentAudioIndex: h,
178
+ currentAudioSequenceIndexes: ue,
180
179
  audioList: p,
181
180
  currentInteractionElement: o,
182
181
  currentStepElement: re
183
182
  }),
184
- currentIndex: f,
183
+ currentIndex: m,
185
184
  currentStepElement: re,
186
- isActive: Te,
187
- setActive: lt,
188
- toggleActive: st
185
+ isActive: Pe,
186
+ setActive: ct,
187
+ toggleActive: at
189
188
  }),
190
189
  [
191
190
  o,
192
191
  p,
193
- g,
194
- ae,
195
- f,
192
+ h,
193
+ ue,
194
+ m,
196
195
  re,
197
- Te,
198
- lt,
199
- st
196
+ Pe,
197
+ ct,
198
+ at
200
199
  ]
201
- ), Oe = c(
202
- () => In(
203
- V,
204
- Me
200
+ ), ke = i(
201
+ () => Cn(
202
+ K,
203
+ Ne
205
204
  ),
206
- [Me, V]
207
- ), Dt = c(
205
+ [Ne, K]
206
+ ), Wt = i(
208
207
  () => ({
209
- "--slide-player-custom-action-count": String(Oe),
208
+ "--slide-player-custom-action-count": String(ke),
210
209
  "--slide-player-mobile-control-count": String(
211
- Oe + 4
210
+ ke + 4
212
211
  )
213
212
  }),
214
- [Oe]
215
- ), ct = _.length > 0, at = c(() => d ? `${d.sequence_number ?? "none"}:${String(
213
+ [ke]
214
+ ), dt = _.length > 0, ft = i(() => d ? `${d.sequence_number ?? "none"}:${String(
216
215
  d.content ?? ""
217
- )}` : "none", [d]), Be = c(
218
- () => [it, at].join("|"),
219
- [at, it]
220
- ), ut = !!c(() => !ve || ve === "none" ? "" : p.find(
221
- (t) => t.audioKey === ve
222
- )?.audioUrl?.trim() ?? "", [p, ve]), N = Q && !!V && Te, Ne = c(
223
- () => _n({
224
- canGoNext: C,
225
- currentAudioIndex: g,
216
+ )}` : "none", [d]), se = i(
217
+ () => [ut, ft].join("|"),
218
+ [ft, ut]
219
+ ), Yt = i(
220
+ () => [
221
+ se,
222
+ Be?.audioKey ?? "none",
223
+ String(h)
224
+ ].join("|"),
225
+ [h, Be?.audioKey, se]
226
+ ), mt = !!i(() => !ye || ye === "none" ? "" : p.find(
227
+ (t) => t.audioKey === ye
228
+ )?.audioUrl?.trim() ?? "", [p, ye]), N = Q && !!K && Pe, Le = i(
229
+ () => Fn({
230
+ canGoNext: R,
231
+ currentAudioIndex: h,
226
232
  currentStepHasSpeakableElement: x,
227
233
  hasInteraction: !!d
228
234
  }),
229
235
  [
230
- C,
231
- g,
236
+ R,
237
+ h,
232
238
  d,
233
239
  x
234
240
  ]
235
- ), L = r(() => {
241
+ ), k = r(() => {
236
242
  Z.current !== null && (window.clearTimeout(Z.current), Z.current = null);
237
243
  }, []), F = r(() => {
238
244
  te.current !== null && (window.clearTimeout(te.current), te.current = null);
@@ -241,7 +247,7 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
241
247
  }, []), $ = r(() => {
242
248
  ee.current !== null && (window.clearTimeout(ee.current), ee.current = null);
243
249
  }, []), W = r(() => {
244
- $(), F(), P(), H(null), U.reset(), I(!1), Ze(!1), Pe(void 0), me(!1), le(0);
250
+ $(), F(), P(), D(null), U.reset(), I(!1), tt(!1), Te(!1), Re(void 0), pe(!1), le(0);
245
251
  }, [
246
252
  $,
247
253
  F,
@@ -249,131 +255,131 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
249
255
  U
250
256
  ]), Y = r(() => {
251
257
  const e = _[0];
252
- return e ? (H(e), !0) : !1;
253
- }, [_]), ye = r(() => {
254
- F(), P(), me(!1), le(0), !Y() && C && M();
258
+ return e ? (D(e), !0) : !1;
259
+ }, [_]), be = r(() => {
260
+ F(), P(), pe(!1), le(0), !Y() && R && M();
255
261
  }, [
256
- C,
262
+ R,
257
263
  F,
258
264
  P,
259
265
  M,
260
266
  Y
261
- ]), dt = r(
267
+ ]), pt = r(
262
268
  (e) => {
263
269
  if (P(), !e)
264
270
  return;
265
271
  const t = () => {
266
272
  ne.current = null, le(
267
- Rn
268
- ), me(!0), q.current = null;
273
+ Nn
274
+ ), pe(!0), q.current = null;
269
275
  };
270
276
  ne.current = window.setTimeout(
271
277
  t,
272
- Pn
278
+ Bn
273
279
  );
274
280
  },
275
281
  [P]
276
- ), v = r(
277
- (e = de) => {
278
- w && (ue(!0), L(), !(b || !e || we <= 0) && (Z.current = window.setTimeout(() => {
279
- ue(!1), Z.current = null;
280
- }, we)));
282
+ ), y = r(
283
+ (e = fe) => {
284
+ w && (de(!0), k(), !(g || !e || Ie <= 0) && (Z.current = window.setTimeout(() => {
285
+ de(!1), Z.current = null;
286
+ }, Ie)));
281
287
  },
282
288
  [
283
- L,
284
- de,
285
- b,
286
- we,
289
+ k,
290
+ fe,
291
+ g,
292
+ Ie,
287
293
  w
288
294
  ]
289
- ), Le = !!(d?.readonly || d?.user_input?.trim()), G = !!d && !Le;
290
- a(() => {
291
- Qe(!0), Q && Ee(!1);
292
- }, [f, Q]), a(() => () => {
293
- $(), L(), F(), P();
295
+ ), je = !!(d?.readonly || d?.user_input?.trim()), G = !!d && !je;
296
+ c(() => {
297
+ et(!0), Q && Ce(!1);
298
+ }, [m, Q]), c(() => () => {
299
+ $(), k(), F(), P();
294
300
  }, [
295
301
  $,
296
302
  F,
297
303
  P,
298
- L
299
- ]), a(() => (Ie?.(E), () => {
300
- Ie?.(!1);
301
- }), [Ie, E]), a(() => {
302
- T || pe === be || (Ce(!1), Re(be));
303
- }, [T, pe]), a(() => {
304
- if (!T) {
305
- tt(!1);
304
+ k
305
+ ]), c(() => (Ae?.(T), () => {
306
+ Ae?.(!1);
307
+ }), [Ae, T]), c(() => {
308
+ E || he === Se || (Me(!1), Fe(Se));
309
+ }, [E, he]), c(() => {
310
+ if (!E) {
311
+ ot(!1);
306
312
  return;
307
313
  }
308
314
  const e = () => {
309
- tt(bt());
315
+ ot(wt());
310
316
  };
311
- return e(), fn(e);
312
- }, [T]), a(() => {
313
- qe?.(B);
314
- }, [B, qe]), a(() => {
315
- const l = rt.current !== "fullscreen" && B === "fullscreen" && !Fe;
316
- if (rt.current = B, !T) {
317
- he(!1);
317
+ return e(), bn(e);
318
+ }, [E]), c(() => {
319
+ De?.(B);
320
+ }, [B, De]), c(() => {
321
+ const l = st.current !== "fullscreen" && B === "fullscreen" && !Oe;
322
+ if (st.current = B, !E) {
323
+ ve(!1);
318
324
  return;
319
325
  }
320
326
  if (l) {
321
- he(!0);
327
+ ve(!0);
322
328
  return;
323
329
  }
324
- B !== "fullscreen" && he(!1);
325
- }, [B, T, Fe]), a(() => {
326
- De?.(re, f);
327
- }, [f, re, De]), a(() => {
330
+ B !== "fullscreen" && ve(!1);
331
+ }, [B, E, Oe]), c(() => {
332
+ Ue?.(re, m);
333
+ }, [m, re, Ue]), c(() => {
328
334
  if (!w) {
329
- L(), ue(!1);
335
+ k(), de(!1);
330
336
  return;
331
337
  }
332
- if (b) {
333
- L(), ue(!0);
338
+ if (g) {
339
+ k(), de(!0);
334
340
  return;
335
341
  }
336
- de || v(!0);
342
+ fe || y(!0);
337
343
  }, [
338
- L,
339
- de,
340
- b,
344
+ k,
345
+ fe,
346
+ g,
341
347
  w,
342
- v
343
- ]), a(() => {
348
+ y
349
+ ]), c(() => {
344
350
  if (typeof window > "u")
345
351
  return;
346
352
  const e = (t) => {
347
- t.origin === window.location.origin && ln(t.data) && t.data.eventType === "click" && w && (oe(!0), v(!0));
353
+ t.origin === window.location.origin && fn(t.data) && t.data.eventType === "click" && w && (oe(!0), y(!0));
348
354
  };
349
355
  return window.addEventListener("message", e), () => {
350
356
  window.removeEventListener("message", e);
351
357
  };
352
- }, [w, v]), gn({
353
- sectionRef: ie,
358
+ }, [w, y]), An({
359
+ sectionRef: ce,
354
360
  enabled: w,
355
361
  onWake: () => {
356
- oe(!0), v(!0);
362
+ oe(!0), y(!0);
357
363
  }
358
- }), a(() => {
359
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = xn({
360
- previousResetKey: Ye.current,
361
- nextResetKey: Be,
362
- currentAudioKey: y,
364
+ }), c(() => {
365
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Tn({
366
+ previousResetKey: Xe.current,
367
+ nextResetKey: se,
368
+ currentAudioKey: b,
363
369
  hasCompletedCurrentStepAudio: O
364
370
  });
365
- Ye.current = Be;
366
- const l = q.current === f && !!d, u = Sn({
371
+ Xe.current = se;
372
+ const l = q.current === m && !!d, u = En({
367
373
  hasInteraction: !!d,
368
374
  shouldBlockPlaybackForInteraction: G,
369
375
  shouldOpenInteractionOverlayAfterAudio: l,
370
376
  hasPlaybackContextChanged: e,
371
- hasResolvedCurrentInteraction: Le,
377
+ hasResolvedCurrentInteraction: je,
372
378
  currentStepHasSpeakableElement: x
373
379
  });
374
- if (e && W(), !(R.length === 0 && !d) && !N) {
375
- if (d && Pe(d), u) {
376
- dt(d);
380
+ if (e && W(), !(C.length === 0 && !d) && !N) {
381
+ if (d && Re(d), u) {
382
+ pt(d);
377
383
  return;
378
384
  }
379
385
  if (P(), q.current = null, !!t && !Y()) {
@@ -381,35 +387,35 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
381
387
  I(!0);
382
388
  return;
383
389
  }
384
- if (C && !(Ne && !_e))
390
+ if (R && !(Le && !Ee))
385
391
  return ee.current = window.setTimeout(() => {
386
392
  ee.current = null, M();
387
- }, Ve), () => {
393
+ }, qe), () => {
388
394
  $();
389
395
  };
390
396
  }
391
397
  }
392
398
  }, [
393
- C,
399
+ R,
394
400
  $,
395
- R.length,
401
+ C.length,
396
402
  d,
397
- y,
398
- Be,
403
+ b,
404
+ se,
399
405
  x,
400
- Ve,
406
+ qe,
401
407
  M,
402
408
  O,
403
- _e,
404
- Le,
409
+ Ee,
410
+ je,
405
411
  G,
406
412
  P,
407
413
  W,
408
- dt,
414
+ pt,
409
415
  Y,
410
416
  N,
411
- Ne
412
- ]), a(() => {
417
+ Le
418
+ ]), c(() => {
413
419
  if (N || !x || G) {
414
420
  I(!1);
415
421
  return;
@@ -418,77 +424,79 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
418
424
  I(!1);
419
425
  return;
420
426
  }
421
- if (ct) {
427
+ if (dt) {
422
428
  I(!1);
423
429
  return;
424
430
  }
425
431
  I(!0);
426
432
  }, [
427
- ct,
433
+ dt,
428
434
  x,
429
435
  O,
430
436
  N,
431
437
  G
432
- ]), a(() => {
433
- y || _.length === 0 || N || !x || G || O || Y();
438
+ ]), c(() => {
439
+ b || _.length === 0 || N || !x || G || O || Y();
434
440
  }, [
435
- y,
441
+ b,
436
442
  _,
437
443
  x,
438
444
  O,
439
445
  N,
440
446
  G,
441
447
  Y
442
- ]), a(() => {
443
- !y || g >= 0 || H(null);
444
- }, [g, y]), a(() => {
445
- g >= 0 || U.reset();
446
- }, [g, U]);
447
- const ft = c(() => {
448
+ ]), c(() => {
449
+ !b || h >= 0 || D(null);
450
+ }, [h, b]), c(() => {
451
+ h >= 0 || U.reset();
452
+ }, [h, U]), c(() => {
453
+ Te(!1);
454
+ }, [Yt]);
455
+ const ht = i(() => {
448
456
  if (!o)
449
457
  return {};
450
458
  const e = !!o.user_input?.trim();
451
- return an(
459
+ return hn(
452
460
  typeof o.content == "string" ? o.content : void 0,
453
461
  o.user_input,
454
- e ? void 0 : se
462
+ e ? void 0 : ie
455
463
  );
456
- }, [o, se]), Ht = c(() => {
464
+ }, [o, ie]), Gt = i(() => {
457
465
  if (!o)
458
466
  return;
459
467
  const e = !!o.user_input?.trim();
460
- return un(
468
+ return vn(
461
469
  typeof o.content == "string" ? o.content : void 0,
462
470
  o.user_input,
463
- e ? void 0 : se
471
+ e ? void 0 : ie
464
472
  );
465
- }, [o, se]), mt = !!o?.user_input?.trim(), pt = !!o?.readonly || mt, ht = pt || mt, je = !!o && fe, Ut = r(
473
+ }, [o, ie]), vt = !!o?.user_input?.trim(), yt = !!o?.readonly || vt, bt = yt || vt, Ke = !!o && me, Xt = r(
466
474
  (e) => {
467
475
  const l = [
468
476
  ...e.selectedValues ?? [],
469
477
  e.inputText?.trim() ?? "",
470
478
  e.buttonText?.trim() ?? ""
471
479
  ].filter(Boolean).join(", ");
472
- Pe((u) => !u || !l ? u : {
480
+ Re((u) => !u || !l ? u : {
473
481
  ...u,
474
482
  user_input: l
475
- }), Ke?.(e, o), ye();
483
+ }), He?.(e, o), be();
476
484
  },
477
- [o, ye, Ke]
485
+ [o, be, He]
478
486
  );
479
- a(() => {
487
+ c(() => {
480
488
  const e = () => {
481
- Rt(document.fullscreenElement === ie.current);
489
+ Bt(document.fullscreenElement === ce.current);
482
490
  };
483
491
  return e(), document.addEventListener("fullscreenchange", e), () => {
484
492
  document.removeEventListener("fullscreenchange", e);
485
493
  };
486
- }, []), a(() => {
487
- if (!je) {
494
+ }, []), c(() => {
495
+ if (!Ke) {
488
496
  le(0);
489
497
  return;
490
498
  }
491
- const e = $e.current;
499
+ const e = Ye.current;
492
500
  if (!e)
493
501
  return;
494
502
  const t = () => {
@@ -496,7 +504,7 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
496
504
  e.getBoundingClientRect().height
497
505
  );
498
506
  le(
499
- u + Cn
507
+ u + kn
500
508
  );
501
509
  };
502
510
  if (t(), typeof ResizeObserver > "u")
@@ -507,21 +515,21 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
507
515
  return l.observe(e), () => {
508
516
  l.disconnect();
509
517
  };
510
- }, [je]), a(() => {
511
- if (F(), !(!fe || !ht))
518
+ }, [Ke]), c(() => {
519
+ if (F(), !(!me || !bt))
512
520
  return te.current = window.setTimeout(() => {
513
- te.current = null, ye();
521
+ te.current = null, be();
514
522
  }, 2e3), () => {
515
523
  F();
516
524
  };
517
525
  }, [
518
526
  F,
519
- ye,
520
- fe,
521
- ht
527
+ be,
528
+ me,
529
+ bt
522
530
  ]);
523
- const zt = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
524
- gt,
531
+ const Jt = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
532
+ xt,
525
533
  {
526
534
  className: "content-render-iframe",
527
535
  hideFullScreen: !0,
@@ -529,10 +537,10 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
529
537
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
530
538
  type: "sandbox",
531
539
  content: e.content,
532
- enableScaling: xt
540
+ enableScaling: At
533
541
  }
534
542
  ) : /* @__PURE__ */ n.jsx(
535
- gt,
543
+ xt,
536
544
  {
537
545
  className: "content-render-iframe",
538
546
  hideFullScreen: !0,
@@ -540,36 +548,36 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
540
548
  type: "markdown",
541
549
  content: e.content
542
550
  }
543
- ) : null, $t = (e = [], t = !1) => {
551
+ ) : null, Qt = (e = [], t = !1) => {
544
552
  if (e.length === 0)
545
553
  return null;
546
554
  const l = e.filter(
547
555
  (s) => s.is_renderable !== !1
548
556
  ).length, u = e.reduce(
549
- (s, i, A) => i.is_renderable !== !1 ? A : s,
557
+ (s, a, A) => a.is_renderable !== !1 ? A : s,
550
558
  -1
551
559
  );
552
- return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((s, i) => {
560
+ return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((s, a) => {
553
561
  const A = s.type === "html" && s.is_renderable === !1;
554
562
  return /* @__PURE__ */ n.jsx(
555
563
  "div",
556
564
  {
557
- ref: t && i === u ? ze : null,
565
+ ref: t && a === u ? We : null,
558
566
  "aria-hidden": A || void 0,
559
567
  className: X(
560
568
  "w-full shrink-0",
561
569
  l === 1 && s.is_renderable !== !1 && "slide-element--single",
562
570
  A ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : s.is_renderable === !1 && "hidden"
563
571
  ),
564
- children: zt(s, {
572
+ children: Jt(s, {
565
573
  replaceRootScreenHeightWithFull: l === 1 && s.type === "html" && s.is_renderable !== !1
566
574
  })
567
575
  },
568
- s.sequence_number ?? `${s.type}-${i}`
576
+ s.sequence_number ?? `${s.type}-${a}`
569
577
  );
570
578
  }) });
571
- }, Wt = r(() => {
572
- const e = ie.current;
579
+ }, Zt = r(() => {
580
+ const e = ce.current;
573
581
  if (e) {
574
582
  if (document.fullscreenElement === e) {
575
583
  document.exitFullscreen().catch(() => {
@@ -579,17 +587,17 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
579
587
  e.requestFullscreen?.().catch(() => {
580
588
  });
581
589
  }
582
- }, []), vt = r(() => {
583
- const e = Ae.current;
590
+ }, []), gt = r(() => {
591
+ const e = _e.current;
584
592
  e && e.scrollTo({
585
593
  top: e.scrollHeight,
586
594
  behavior: "smooth"
587
595
  });
588
- }, []), Yt = r(() => {
589
- ce.current = !0, q.current = null, oe(!0), I(!1), v(!0), W(), Xe();
590
- }, [Xe, W, v]), Gt = r(() => {
591
- ce.current = !0, q.current = null, oe(!0), I(!1), v(!0), W(), M();
592
- }, [M, W, v]), Xt = r(
596
+ }, []), en = r(() => {
597
+ ae.current = !0, q.current = null, oe(!0), I(!1), y(!0), W(), Qe();
598
+ }, [Qe, W, y]), tn = r(() => {
599
+ ae.current = !0, q.current = null, oe(!0), I(!1), y(!0), W(), M();
600
+ }, [M, W, y]), nn = r(
593
601
  (e) => {
594
602
  if (!x || O) {
595
603
  I(!1);
@@ -598,102 +606,102 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
598
606
  I(e);
599
607
  },
600
608
  [x, O]
601
- ), Jt = r(
609
+ ), rn = r(
602
610
  (e) => {
603
611
  const t = p[e]?.audioKey;
604
- if (!t || !y || t !== y)
612
+ if (!t || !b || t !== b)
605
613
  return;
606
614
  const l = _.findIndex(
607
- (i) => i === t
615
+ (a) => a === t
608
616
  );
609
617
  if (l < 0) {
610
- H(null);
618
+ D(null);
611
619
  return;
612
620
  }
613
621
  const u = l + 1, s = _[u];
614
622
  if (s) {
615
- H(s);
623
+ D(s);
616
624
  return;
617
625
  }
618
- if (H(null), Ze(!0), I(!1), C) {
619
- const i = f + 1, A = D[i];
620
- ut && A?.type === "interaction" && (q.current = i), M();
626
+ if (D(null), tt(!0), I(!1), R) {
627
+ const a = m + 1, A = H[a];
628
+ mt && A?.type === "interaction" && (q.current = a), M();
621
629
  }
622
630
  },
623
631
  [
624
632
  p,
625
- C,
626
- f,
627
- y,
633
+ R,
634
+ m,
635
+ b,
628
636
  _,
629
637
  M,
630
- ut,
631
- D
638
+ mt,
639
+ H
632
640
  ]
633
- ), Qt = r(() => {
634
- o && me((e) => !e);
635
- }, [o]), yt = r(
641
+ ), on = r(() => {
642
+ o && pe((e) => !e);
643
+ }, [o]), St = r(
636
644
  (e) => {
637
- e.stopPropagation(), E && v(!0);
645
+ e.stopPropagation(), T && y(!0);
638
646
  },
639
- [Je, v]
640
- ), Zt = r(
647
+ [Ze, y]
648
+ ), ln = r(
641
649
  (e) => {
642
- He?.(e);
650
+ ze?.(e);
643
651
  },
644
- [He]
645
- ), en = r(() => {
646
- oe(!0), v(!0);
647
- }, [v]), ge = c(
648
- () => R.map(
652
+ [ze]
653
+ ), sn = r(() => {
654
+ oe(!0), y(!0);
655
+ }, [y]), ge = i(
656
+ () => C.map(
649
657
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
650
658
  ),
651
- [R]
659
+ [C]
652
660
  );
653
- return a(() => {
654
- const e = We.current, u = (e.length > 0 && e.length < ge.length && e.every((i, A) => i === ge[A]) ? R.slice(e.length) : []).some(
655
- (i) => i.is_new === !1
661
+ return c(() => {
662
+ const e = Ge.current, u = (e.length > 0 && e.length < ge.length && e.every((a, A) => a === ge[A]) ? C.slice(e.length) : []).some(
663
+ (a) => a.is_new === !1
656
664
  );
657
- if (We.current = ge, !u)
665
+ if (Ge.current = ge, !u)
658
666
  return;
659
667
  const s = window.requestAnimationFrame(() => {
660
- const i = Ae.current, A = ze.current;
661
- if (!i || !A)
668
+ const a = _e.current, A = We.current;
669
+ if (!a || !A)
662
670
  return;
663
- const tn = i.getBoundingClientRect(), nn = A.getBoundingClientRect(), rn = i.scrollTop + (nn.top - tn.top);
664
- i.scrollTo({
665
- top: Math.max(rn, 0),
671
+ const cn = a.getBoundingClientRect(), an = A.getBoundingClientRect(), un = a.scrollTop + (an.top - cn.top);
672
+ a.scrollTo({
673
+ top: Math.max(un, 0),
666
674
  behavior: "smooth"
667
675
  });
668
676
  });
669
677
  return () => {
670
678
  window.cancelAnimationFrame(s);
671
679
  };
672
- }, [R, ge]), a(() => {
673
- if (!ce.current || (ce.current = !1, R.length === 0))
680
+ }, [C, ge]), c(() => {
681
+ if (!ae.current || (ae.current = !1, C.length === 0))
674
682
  return;
675
683
  const e = window.requestAnimationFrame(() => {
676
- vt();
684
+ gt();
677
685
  });
678
686
  return () => {
679
687
  window.cancelAnimationFrame(e);
680
688
  };
681
- }, [R, vt]), /* @__PURE__ */ n.jsxs(
689
+ }, [C, gt]), /* @__PURE__ */ n.jsxs(
682
690
  "section",
683
691
  {
684
- ref: ie,
692
+ ref: ce,
685
693
  className: X(
686
694
  "relative h-full w-full",
687
- T && "slide--mobile-device",
695
+ E && "slide--mobile-device",
688
696
  z && "slide--mobile-landscape",
689
- nt && "slide--mobile-landscape-native",
690
- wt
697
+ lt && "slide--mobile-landscape-native",
698
+ _t
691
699
  ),
692
- onClick: en,
693
- onPointerDown: Zt,
694
- ...It,
700
+ onClick: sn,
701
+ onPointerDown: ln,
702
+ ...Et,
695
703
  children: [
696
- Bt ? /* @__PURE__ */ n.jsx(
704
+ Kt ? /* @__PURE__ */ n.jsx(
697
705
  "div",
698
706
  {
699
707
  "aria-hidden": "true",
@@ -703,22 +711,22 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
703
711
  /* @__PURE__ */ n.jsxs(
704
712
  "div",
705
713
  {
706
- ref: Ue,
714
+ ref: $e,
707
715
  className: X(
708
716
  "slide__viewport relative h-full min-h-0 w-full",
709
717
  z && "slide__viewport--mobile-landscape",
710
- z && !Ft && "slide__viewport--mobile-landscape-native"
718
+ z && !kt && "slide__viewport--mobile-landscape-native"
711
719
  ),
712
720
  children: [
713
- Mt ? /* @__PURE__ */ n.jsxs("div", { className: "slide-landscape-header", children: [
721
+ Lt ? /* @__PURE__ */ n.jsxs("div", { className: "slide-landscape-header", children: [
714
722
  /* @__PURE__ */ n.jsx(
715
723
  "button",
716
724
  {
717
725
  "aria-label": S?.backAriaLabel ?? "Back",
718
726
  className: "slide-landscape-header__back",
719
- onClick: jt,
727
+ onClick: Ht,
720
728
  type: "button",
721
- children: /* @__PURE__ */ n.jsx(Tn, { className: "h-6 w-6 text-white", strokeWidth: 2.25 })
729
+ children: /* @__PURE__ */ n.jsx(Mn, { className: "h-6 w-6 text-white", strokeWidth: 2.25 })
722
730
  }
723
731
  ),
724
732
  S?.content ? /* @__PURE__ */ n.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: S.content }) : null
@@ -728,19 +736,19 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
728
736
  {
729
737
  className: X(
730
738
  "h-full min-h-0 w-full",
731
- Ot && "slide__viewport-content--with-header",
732
- _t ? "slide-content--single" : "grid gap-4"
739
+ jt && "slide__viewport-content--with-header",
740
+ Pt ? "slide-content--single" : "grid gap-4"
733
741
  ),
734
- children: R.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: Ae, className: "slide-stage__layer w-full", children: Vt.map(
742
+ children: C.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: _e, className: "slide-stage__layer w-full", children: Ut.map(
735
743
  (e, t) => {
736
- const l = t === Kt;
744
+ const l = t === zt;
737
745
  return /* @__PURE__ */ n.jsx(
738
746
  "div",
739
747
  {
740
748
  "aria-hidden": !l || void 0,
741
749
  className: "w-full h-full",
742
750
  style: { display: l ? void 0 : "none" },
743
- children: $t(
751
+ children: Qt(
744
752
  e.elementList,
745
753
  l
746
754
  )
@@ -751,93 +759,101 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
751
759
  ) }) }) : null
752
760
  }
753
761
  ),
754
- Tt ? /* @__PURE__ */ n.jsx(
755
- sn,
762
+ Ct ? /* @__PURE__ */ n.jsx(
763
+ mn,
756
764
  {
757
- message: Se,
765
+ message: xe,
758
766
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
759
767
  }
760
768
  ) : null,
761
769
  /* @__PURE__ */ n.jsx(
762
- vn,
770
+ wn,
763
771
  {
764
- onClose: kt,
765
- open: Ct,
766
- text: Nt
772
+ onClose: Dt,
773
+ open: Nt,
774
+ text: Vt
767
775
  }
768
776
  ),
769
777
  /* @__PURE__ */ n.jsx(
770
- pn,
778
+ Sn,
771
779
  {
772
- extraBottomOffset: Et,
773
- hasPlayerGap: E,
774
- isPlayerHidden: w && !E,
780
+ extraBottomOffset: Mt,
781
+ hasPlayerGap: T,
782
+ isEnabled: nt && Rt,
783
+ isPlayerHidden: w && !T,
775
784
  playbackTimeStore: U,
776
- subtitleCues: qt
785
+ subtitleCues: $t
777
786
  }
778
787
  ),
779
- je ? /* @__PURE__ */ n.jsx(
788
+ Ke ? /* @__PURE__ */ n.jsx(
780
789
  "div",
781
790
  {
782
- ref: $e,
791
+ ref: Ye,
783
792
  className: X(
784
793
  "slide-interaction-overlay",
785
- E && w ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
794
+ T && w ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
786
795
  ),
787
- onClick: yt,
788
- onPointerDown: yt,
789
- style: Dt,
796
+ onClick: St,
797
+ onPointerDown: St,
798
+ style: Wt,
790
799
  children: /* @__PURE__ */ n.jsx(
791
- St,
800
+ It,
792
801
  {
793
802
  content: String(o?.content ?? ""),
794
- defaultButtonText: ft.buttonText ?? "",
795
- defaultInputText: ft.inputText ?? "",
796
- defaultSelectedValues: Ht,
797
- confirmButtonText: K?.confirmButtonText,
798
- copyButtonText: K?.copyButtonText,
799
- copiedButtonText: K?.copiedButtonText,
800
- onSend: Ut,
801
- readonly: pt,
802
- title: K?.title ?? xe ?? "Submit the content below to continue."
803
+ defaultButtonText: ht.buttonText ?? "",
804
+ defaultInputText: ht.inputText ?? "",
805
+ defaultSelectedValues: Gt,
806
+ confirmButtonText: V?.confirmButtonText,
807
+ copyButtonText: V?.copyButtonText,
808
+ copiedButtonText: V?.copiedButtonText,
809
+ onSend: Xt,
810
+ readonly: yt,
811
+ title: V?.title ?? we ?? "Submit the content below to continue."
803
812
  }
804
813
  )
805
814
  }
806
815
  ) : null,
807
816
  w ? /* @__PURE__ */ n.jsx(
808
- mn,
817
+ gn,
809
818
  {
810
819
  audioList: p,
811
820
  className: X(
812
821
  "absolute left-1/2 bottom-6 z-[2] -translate-x-1/2",
813
822
  J,
814
- !E && "pointer-events-none opacity-0"
823
+ !T && "pointer-events-none opacity-0"
815
824
  ),
816
- currentAudioIndex: g,
825
+ currentAudioIndex: h,
817
826
  defaultPlaying: !0,
818
827
  isPlaybackPaused: N,
819
- isAutoAdvanceEnabled: _e,
828
+ isAutoAdvanceEnabled: Ee,
820
829
  hasInteraction: !!o,
821
- isInteractionOpen: fe,
822
- onAutoAdvanceToggle: Qe,
823
- onLoadingChange: Xt,
830
+ isInteractionOpen: me,
831
+ isSubtitleEnabled: nt,
832
+ onAutoAdvanceToggle: et,
833
+ onLoadingChange: nn,
834
+ onPlaybackStarted: () => {
835
+ Te(!0);
836
+ },
824
837
  onPlaybackTimeChange: U.setTime,
825
- nextDisabled: !C,
826
- onEnded: Jt,
827
- onFullscreen: Wt,
828
- isFullscreen: Pt,
838
+ onSubtitleToggle: () => {
839
+ Ft((e) => !e);
840
+ },
841
+ nextDisabled: !R,
842
+ onEnded: rn,
843
+ onFullscreen: Zt,
844
+ isFullscreen: Ot,
829
845
  mobileViewMode: B,
830
- settingsPortalContainer: Ue.current,
831
- onMobileViewModeChange: Lt,
832
- onInteractionToggle: Qt,
833
- onNext: Gt,
834
- onPrev: Yt,
835
- prevDisabled: !At,
836
- showControls: E,
837
- texts: ke,
838
- customActionContext: Me,
839
- customActions: V,
840
- useAutoAdvanceToggle: Ne
846
+ settingsPortalContainer: $e.current,
847
+ onMobileViewModeChange: qt,
848
+ onInteractionToggle: on,
849
+ onNext: tn,
850
+ onPrev: en,
851
+ prevDisabled: !Tt,
852
+ showControls: T,
853
+ texts: Ve,
854
+ customActionContext: Ne,
855
+ customActions: K,
856
+ useAutoAdvanceToggle: Le
841
857
  }
842
858
  ) : null
843
859
  ]
@@ -848,6 +864,6 @@ const Fn = (j, k) => j.length === k.length && j.every((b, J) => {
848
864
  );
849
865
  };
850
866
  export {
851
- lr as default
867
+ ur as default
852
868
  };
853
869
  //# sourceMappingURL=Slide.es.js.map