markdown-flow-ui 0.1.125 → 0.1.127

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 (27) hide show
  1. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.js +3 -1
  2. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.js.map +1 -1
  3. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.d.ts +20 -0
  4. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +168 -108
  5. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  6. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.test.d.ts +1 -0
  7. package/dist/components/Slide/Player.cjs.js +1 -1
  8. package/dist/components/Slide/Player.cjs.js.map +1 -1
  9. package/dist/components/Slide/Player.d.ts +2 -0
  10. package/dist/components/Slide/Player.es.js +112 -107
  11. package/dist/components/Slide/Player.es.js.map +1 -1
  12. package/dist/components/Slide/Slide.cjs.js +1 -1
  13. package/dist/components/Slide/Slide.cjs.js.map +1 -1
  14. package/dist/components/Slide/Slide.es.js +167 -165
  15. package/dist/components/Slide/Slide.es.js.map +1 -1
  16. package/dist/components/Slide/useWakePlayerFromIframe.cjs.js +1 -1
  17. package/dist/components/Slide/useWakePlayerFromIframe.cjs.js.map +1 -1
  18. package/dist/components/Slide/useWakePlayerFromIframe.d.ts +3 -1
  19. package/dist/components/Slide/useWakePlayerFromIframe.es.js +42 -39
  20. package/dist/components/Slide/useWakePlayerFromIframe.es.js.map +1 -1
  21. package/dist/components/Slide/utils/playerNavigationContext.cjs.js +2 -0
  22. package/dist/components/Slide/utils/playerNavigationContext.cjs.js.map +1 -0
  23. package/dist/components/Slide/utils/playerNavigationContext.d.ts +7 -0
  24. package/dist/components/Slide/utils/playerNavigationContext.es.js +9 -0
  25. package/dist/components/Slide/utils/playerNavigationContext.es.js.map +1 -0
  26. package/dist/components/Slide/utils/playerNavigationContext.test.d.ts +1 -0
  27. package/package.json +1 -1
@@ -1,33 +1,34 @@
1
1
  import { j as r } from "../../_virtual/jsx-runtime.es.js";
2
- import { memo as In, useId as _n, useRef as p, useMemo as l, useCallback as n, useState as m, useEffect as s } from "react";
3
- import { isSandboxInteractionMessage as Pn } from "../../lib/sandboxInteraction.es.js";
2
+ import { memo as _n, useId as Pn, useRef as p, useMemo as l, useCallback as n, useState as m, useEffect as s } from "react";
3
+ import { isSandboxInteractionMessage as En } from "../../lib/sandboxInteraction.es.js";
4
4
  import { cn as Z } from "../../lib/utils.es.js";
5
- import En from "../ui/loading-overlay-card.es.js";
6
- import Cn from "../ContentRender/ContentRender.es.js";
5
+ import Cn from "../ui/loading-overlay-card.es.js";
6
+ import Tn from "../ContentRender/ContentRender.es.js";
7
7
  import Rt from "../ContentRender/IframeSandbox.es.js";
8
8
  import "../ui/inputGroup/input-group.es.js";
9
- import { getInteractionDefaultValues as Tn, getInteractionDefaultSelectedValues as Rn } from "../../lib/interaction-defaults.es.js";
10
- import { isMobileDevice as kn, isLandscapeViewport as kt, subscribeMobileDeviceChange as Fn } from "../../lib/mobileDevice.es.js";
11
- import Mn from "./Player.es.js";
12
- import Bn from "./SubtitleOverlay.es.js";
13
- import Nn from "./useSlide.es.js";
14
- import On from "./useWakePlayerFromIframe.es.js";
15
- import { PlayerKeyboardShortcutContext as jn } from "./utils/playerKeyboardShortcutContext.es.js";
16
- import { activatePlayerKeyboardShortcutOwner as Ln } from "./utils/playerKeyboardShortcuts.es.js";
17
- import { DEFAULT_MOBILE_VIEW_MODE as Ce, resolveMobileViewModeState as Vn } from "./utils/mobileScreenMode.es.js";
18
- import { shouldPresentInteractionOverlay as Kn } from "./utils/interactionPlayback.es.js";
19
- import { shouldAutoAdvanceIntoAppendedMarker as qn } from "./utils/appendedMarkerAdvance.es.js";
20
- import { getPlaybackSequenceTransition as Dn } from "./utils/playbackSequence.es.js";
21
- import { resolvePlayerCustomActionElement as Un, getPlayerCustomActionCount as zn } from "./utils/playerCustomActions.es.js";
22
- import { createPlaybackTimeStore as Gn } from "./utils/playbackTimeStore.es.js";
23
- import { shouldUseAutoAdvanceToggle as Hn } from "./utils/playerToggleMode.es.js";
9
+ import { getInteractionDefaultValues as Rn, getInteractionDefaultSelectedValues as kn } from "../../lib/interaction-defaults.es.js";
10
+ import { isMobileDevice as Fn, isLandscapeViewport as kt, subscribeMobileDeviceChange as Mn } from "../../lib/mobileDevice.es.js";
11
+ import Bn from "./Player.es.js";
12
+ import Nn from "./SubtitleOverlay.es.js";
13
+ import On from "./useSlide.es.js";
14
+ import jn from "./useWakePlayerFromIframe.es.js";
15
+ import { PlayerKeyboardShortcutContext as Ln } from "./utils/playerKeyboardShortcutContext.es.js";
16
+ import { activatePlayerKeyboardShortcutOwner as Vn } from "./utils/playerKeyboardShortcuts.es.js";
17
+ import { DEFAULT_MOBILE_VIEW_MODE as Ce, resolveMobileViewModeState as Kn } from "./utils/mobileScreenMode.es.js";
18
+ import { shouldPresentInteractionOverlay as qn } from "./utils/interactionPlayback.es.js";
19
+ import { shouldWakePlayerControlsAfterNavigation as Ft } from "./utils/playerNavigationContext.es.js";
20
+ import { shouldAutoAdvanceIntoAppendedMarker as Dn } from "./utils/appendedMarkerAdvance.es.js";
21
+ import { getPlaybackSequenceTransition as Un } from "./utils/playbackSequence.es.js";
22
+ import { resolvePlayerCustomActionElement as zn, getPlayerCustomActionCount as Gn } from "./utils/playerCustomActions.es.js";
23
+ import { createPlaybackTimeStore as Hn } from "./utils/playbackTimeStore.es.js";
24
+ import { shouldUseAutoAdvanceToggle as Wn } from "./utils/playerToggleMode.es.js";
24
25
  /* empty css */
25
- import Wn from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
26
- const $n = 2e3, Yn = 300, Xn = 160, Jn = 16, Ge = "waitingForAudio", Ft = {
26
+ import $n from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
27
+ const Yn = 2e3, Xn = 300, Jn = 160, Qn = 16, Ge = "waitingForAudio", Mt = {
27
28
  waitingForAudio: "Waiting for current slide audio...",
28
29
  loadingAudio: "Loading current slide audio...",
29
30
  waitingForMoreAudio: "Waiting for more current slide audio..."
30
- }, Qn = (S, I) => typeof S == "string" ? S : S[I] ?? S[Ge] ?? Ft[I], Zn = (S, I) => I ? S !== "loadingAudio" : !1, Mt = In(
31
+ }, Zn = (S, I) => typeof S == "string" ? S : S[I] ?? S[Ge] ?? Mt[I], er = (S, I) => I ? S !== "loadingAudio" : !1, Bt = _n(
31
32
  ({
32
33
  content: S,
33
34
  title: I,
@@ -42,7 +43,7 @@ const $n = 2e3, Yn = 300, Xn = 160, Jn = 16, Ge = "waitingForAudio", Ft = {
42
43
  }) => /* @__PURE__ */ r.jsxs("div", { className: "slide-player__interaction-card", children: [
43
44
  /* @__PURE__ */ r.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ r.jsx("p", { className: "slide-player__interaction-title", children: I }) }),
44
45
  /* @__PURE__ */ r.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ r.jsx(
45
- Cn,
46
+ Tn,
46
47
  {
47
48
  content: S,
48
49
  defaultButtonText: _,
@@ -58,11 +59,11 @@ const $n = 2e3, Yn = 300, Xn = 160, Jn = 16, Ge = "waitingForAudio", Ft = {
58
59
  ) })
59
60
  ] })
60
61
  );
61
- Mt.displayName = "InteractionOverlayCard";
62
- const er = (S, I) => S.length === I.length && S.every((_, ee) => {
62
+ Bt.displayName = "InteractionOverlayCard";
63
+ const tr = (S, I) => S.length === I.length && S.every((_, ee) => {
63
64
  const P = I[ee];
64
65
  return _.sequence_number === P?.sequence_number && _.type === P?.type && _.content === P?.content;
65
- }), Cr = ({
66
+ }), Rr = ({
66
67
  elementList: S = [],
67
68
  showPlayer: I = !0,
68
69
  playerAlwaysVisible: _ = !1,
@@ -70,26 +71,26 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
70
71
  fullscreenHeader: P,
71
72
  playerCustomActions: q,
72
73
  playerCustomActionPauseOnActive: te = !0,
73
- bufferingText: Te = Ft,
74
+ bufferingText: Te = Mt,
74
75
  interactionTitle: Re,
75
76
  interactionTexts: D,
76
- playerTexts: Bt,
77
+ playerTexts: Nt,
77
78
  playerAutoHideDelay: ke = 3e3,
78
- markerAutoAdvanceDelay: He = $n,
79
+ markerAutoAdvanceDelay: He = Yn,
79
80
  interactionDefaultValueOptions: pe,
80
81
  onSend: We,
81
82
  onPlayerVisibilityChange: Fe,
82
83
  onMobileViewModeChange: $e,
83
84
  onStepChange: Ye,
84
85
  enableKeyboardShortcuts: U = !0,
85
- enableIframeScaling: Nt = !0,
86
+ enableIframeScaling: Ot = !0,
86
87
  disableLoadingOverlay: C = !1,
87
- className: Ot,
88
+ className: jt,
88
89
  onPointerDown: Xe,
89
90
  onFocusCapture: Je,
90
- ...jt
91
+ ...Lt
91
92
  }) => {
92
- const he = _n(), ve = p(null), Qe = p(null), Me = p(null), Ze = p(null), ne = p(null), re = p(null), oe = p(null), se = p(null), et = p(null), tt = p([]), ye = p(!1), z = p(null), nt = p(null), rt = p({
93
+ const he = Pn(), ve = p(null), Qe = p(null), Me = p(null), Ze = p(null), ne = p(null), re = p(null), oe = p(null), se = p(null), et = p(null), tt = p([]), ye = p(!1), z = p(null), nt = p(null), rt = p({
93
94
  markerCount: 0,
94
95
  currentIndex: -1,
95
96
  canGoNext: !1
@@ -102,40 +103,40 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
102
103
  currentAudioSequenceIndexes: ge,
103
104
  currentStepHasSpeakableElement: b,
104
105
  currentInteractionElement: u,
105
- canGoPrev: Lt,
106
+ canGoPrev: Vt,
106
107
  canGoNext: w,
107
108
  handlePrev: st,
108
109
  handleNext: T
109
- } = Nn(S), ie = l(() => {
110
+ } = On(S), ie = l(() => {
110
111
  if (!(d < 0))
111
112
  return N[d];
112
- }, [d, N]), Vt = N.filter(
113
+ }, [d, N]), Kt = N.filter(
113
114
  (e) => e.is_renderable !== !1
114
- ).length === 1, x = I && (N.length > 0 || h.length > 0 || !!u), Kt = l(
115
+ ).length === 1, A = I && (N.length > 0 || h.length > 0 || !!u), qt = l(
115
116
  () => ({
116
117
  enabled: U,
117
118
  ownerId: he
118
119
  }),
119
120
  [U, he]
120
121
  ), L = n(() => {
121
- !U || !x || Ln(he);
122
- }, [U, he, x]), R = l(
122
+ !U || !A || Vn(he);
123
+ }, [U, he, A]), R = l(
123
124
  () => ge.map((e) => h[e]?.audioKey).filter((e) => !!e),
124
125
  [h, ge]
125
- ), [it, Se] = m(!0), [be, le] = m(!1), [ce, lt] = m(!0), [ae, ct] = m(!0), [v, G] = m(null), [qt, y] = m(!1), [Dt, Be] = m(Ge), [k, at] = m(!1), [Ut, Ne] = m(!1), [ut, zt] = m(!0), [Oe, je] = m(!1), [o, Le] = m(), [xe, Ae] = m(!1), [
126
- Gt,
126
+ ), [it, Se] = m(!0), [be, le] = m(!1), [ce, lt] = m(!0), [ae, ct] = m(!0), [v, G] = m(null), [Dt, y] = m(!1), [Ut, Be] = m(Ge), [k, at] = m(!1), [zt, Ne] = m(!1), [ut, Gt] = m(!0), [Oe, je] = m(!1), [o, Le] = m(), [Ae, xe] = m(!1), [
127
+ Ht,
127
128
  ue
128
- ] = m(0), [dt, Ht] = m(!1), O = l(() => kn(), []), [we, Ve] = m(
129
+ ] = m(0), [dt, Wt] = m(!1), O = l(() => Fn(), []), [we, Ve] = m(
129
130
  Ce
130
- ), [ft, Ke] = m(!1), [Wt, mt] = m(
131
+ ), [ft, Ke] = m(!1), [$t, mt] = m(
131
132
  () => O ? kt() : !1
132
- ), H = l(() => Gn(), []), {
133
+ ), H = l(() => Hn(), []), {
133
134
  effectiveMobileViewMode: W,
134
135
  isImmersiveMobileFullscreen: $,
135
136
  isNativeMobileFullscreen: pt,
136
- shouldRotateFullscreenViewport: $t
137
+ shouldRotateFullscreenViewport: Yt
137
138
  } = l(
138
- () => Vn({
139
+ () => Kn({
139
140
  hasManualMobileViewMode: ft,
140
141
  isMobileDevice: O,
141
142
  mobileViewMode: we
@@ -143,27 +144,27 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
143
144
  [
144
145
  ft,
145
146
  O,
146
- Wt,
147
+ $t,
147
148
  we
148
149
  ]
149
- ), Yt = p(W), F = x && (_ || it), Xt = $ && F, Jt = $ && F, Qt = $ || pt, ht = dt && !O, Zt = n(
150
+ ), Xt = p(W), F = A && (_ || it), Jt = $ && F, Qt = $ && F, Zt = $ || pt, ht = dt && !O, en = n(
150
151
  (e) => {
151
152
  Ke(!0), Ve(e);
152
153
  },
153
154
  []
154
155
  ), vt = n(() => {
155
156
  Ke(!1), Ve(Ce);
156
- }, []), en = n(() => {
157
+ }, []), tn = n(() => {
157
158
  vt(), P?.onBack?.();
158
159
  }, [P, vt]), yt = n((e) => {
159
160
  je(e);
160
161
  }, []), gt = n(() => {
161
162
  je((e) => !e);
162
- }, []), { mountedStepStates: tn, currentMountedStateIndex: nn } = l(() => {
163
+ }, []), { mountedStepStates: nn, currentMountedStateIndex: rn } = l(() => {
163
164
  const e = [], t = /* @__PURE__ */ new Map();
164
165
  return ot.forEach((c, f) => {
165
166
  const i = e.findIndex(
166
- (a) => er(
167
+ (a) => tr(
167
168
  a.elementList,
168
169
  c
169
170
  )
@@ -185,12 +186,12 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
185
186
  ) : -1, [h, v]), qe = l(
186
187
  () => g >= 0 ? h[g] : void 0,
187
188
  [h, g]
188
- ), rn = qe?.element?.subtitle_cues ?? [], Ie = l(
189
+ ), on = qe?.element?.subtitle_cues ?? [], Ie = l(
189
190
  () => R[0] ?? "none",
190
191
  [R]
191
192
  ), De = l(
192
193
  () => ({
193
- currentElement: Un({
194
+ currentElement: zn({
194
195
  currentAudioIndex: g,
195
196
  currentAudioSequenceIndexes: ge,
196
197
  audioList: h,
@@ -215,12 +216,12 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
215
216
  gt
216
217
  ]
217
218
  ), Ue = l(
218
- () => zn(
219
+ () => Gn(
219
220
  q,
220
221
  De
221
222
  ),
222
223
  [De, q]
223
- ), on = l(
224
+ ), sn = l(
224
225
  () => ({
225
226
  "--slide-player-custom-action-count": String(Ue),
226
227
  "--slide-player-mobile-control-count": String(
@@ -228,22 +229,22 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
228
229
  )
229
230
  }),
230
231
  [Ue]
231
- ), bt = R.length > 0, xt = l(() => u ? `${u.sequence_number ?? "none"}:${String(
232
+ ), bt = R.length > 0, At = l(() => u ? `${u.sequence_number ?? "none"}:${String(
232
233
  u.content ?? ""
233
234
  )}` : "none", [u]), de = l(
234
- () => [St, xt].join("|"),
235
- [xt, St]
236
- ), sn = l(
235
+ () => [St, At].join("|"),
236
+ [At, St]
237
+ ), ln = l(
237
238
  () => [
238
239
  de,
239
240
  qe?.audioKey ?? "none",
240
241
  String(g)
241
242
  ].join("|"),
242
243
  [g, qe?.audioKey, de]
243
- ), At = !!l(() => !Ie || Ie === "none" ? "" : h.find(
244
+ ), xt = !!l(() => !Ie || Ie === "none" ? "" : h.find(
244
245
  (t) => t.audioKey === Ie
245
246
  )?.audioUrl?.trim() ?? "", [h, Ie]), V = te && !!q && Oe, fe = l(
246
- () => Hn({
247
+ () => Wn({
247
248
  canGoNext: w,
248
249
  currentAudioIndex: g,
249
250
  currentStepHasSpeakableElement: b,
@@ -264,7 +265,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
264
265
  }, []), Y = n(() => {
265
266
  re.current !== null && (window.clearTimeout(re.current), re.current = null);
266
267
  }, []), X = n(() => {
267
- Y(), j(), M(), G(null), H.reset(), y(!1), Be(Ge), at(!1), Ne(!1), Le(void 0), Ae(!1), ue(0);
268
+ Y(), j(), M(), G(null), H.reset(), y(!1), Be(Ge), at(!1), Ne(!1), Le(void 0), xe(!1), ue(0);
268
269
  }, [
269
270
  Y,
270
271
  j,
@@ -274,7 +275,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
274
275
  const e = R[0];
275
276
  return e ? (G(e), !0) : !1;
276
277
  }, [R]), _e = n(() => {
277
- j(), M(), Ae(!1), ue(0), !J() && w && T();
278
+ j(), M(), xe(!1), ue(0), !J() && w && T();
278
279
  }, [
279
280
  w,
280
281
  j,
@@ -287,18 +288,18 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
287
288
  return;
288
289
  const t = () => {
289
290
  se.current = null, ue(
290
- Xn
291
- ), Ae(!0), z.current = null;
291
+ Jn
292
+ ), xe(!0), z.current = null;
292
293
  };
293
294
  se.current = window.setTimeout(
294
295
  t,
295
- Yn
296
+ Xn
296
297
  );
297
298
  },
298
299
  [M]
299
- ), A = n(
300
+ ), x = n(
300
301
  (e = be) => {
301
- x && (Se(!0), K(), !(_ || !e || ke <= 0) && (ne.current = window.setTimeout(() => {
302
+ A && (Se(!0), K(), !(_ || !e || ke <= 0) && (ne.current = window.setTimeout(() => {
302
303
  Se(!1), ne.current = null;
303
304
  }, ke)));
304
305
  },
@@ -307,9 +308,9 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
307
308
  be,
308
309
  _,
309
310
  ke,
310
- x
311
+ A
311
312
  ]
312
- ), me = !!(u?.readonly || u?.user_input?.trim()), Q = !!u && !me, ln = n((e) => {
313
+ ), me = !!(u?.readonly || u?.user_input?.trim()), Q = !!u && !me, cn = n((e) => {
313
314
  lt(e);
314
315
  }, []), Pe = n(
315
316
  (e) => {
@@ -339,15 +340,15 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
339
340
  const e = () => {
340
341
  mt(kt());
341
342
  };
342
- return e(), Fn(e);
343
+ return e(), Mn(e);
343
344
  }, [O]), s(() => {
344
345
  $e?.(W);
345
346
  }, [W, $e]), s(() => {
346
- Yt.current = W;
347
+ Xt.current = W;
347
348
  }, [W]), s(() => {
348
349
  Ye?.(ie, d);
349
350
  }, [d, ie, Ye]), s(() => {
350
- const e = rt.current, t = qn(
351
+ const e = rt.current, t = Dn(
351
352
  {
352
353
  previousMarkerCount: e.markerCount,
353
354
  nextMarkerCount: N.length,
@@ -381,7 +382,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
381
382
  fe,
382
383
  N.length
383
384
  ]), s(() => {
384
- if (!x) {
385
+ if (!A) {
385
386
  K(), Se(!1);
386
387
  return;
387
388
  }
@@ -389,38 +390,39 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
389
390
  K(), Se(!0);
390
391
  return;
391
392
  }
392
- be || A(!0);
393
+ be || x(!0);
393
394
  }, [
394
395
  K,
395
396
  be,
396
397
  _,
397
- x,
398
- A
398
+ A,
399
+ x
399
400
  ]), s(() => {
400
401
  if (typeof window > "u")
401
402
  return;
402
403
  const e = (t) => {
403
- t.origin === window.location.origin && Pn(t.data) && t.data.eventType === "click" && x && (L(), le(!0), A(!0));
404
+ t.origin === window.location.origin && En(t.data) && t.data.eventType === "click" && A && (L(), le(!0), x(!0));
404
405
  };
405
406
  return window.addEventListener("message", e), () => {
406
407
  window.removeEventListener("message", e);
407
408
  };
408
- }, [L, x, A]), On({
409
+ }, [L, A, x]), jn({
409
410
  sectionRef: ve,
410
- enabled: x,
411
+ enabled: A,
411
412
  keyboardShortcutsEnabled: U,
413
+ onKeyboardShortcut: L,
412
414
  onWake: () => {
413
- L(), le(!0), A(!0);
415
+ L(), le(!0), x(!0);
414
416
  }
415
417
  }), s(() => {
416
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Dn({
418
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Un({
417
419
  previousResetKey: nt.current,
418
420
  nextResetKey: de,
419
421
  currentAudioKey: v,
420
422
  hasCompletedCurrentStepAudio: k
421
423
  });
422
424
  nt.current = de;
423
- const c = z.current === d && !!u, f = Kn({
425
+ const c = z.current === d && !!u, f = qn({
424
426
  hasInteraction: !!u,
425
427
  shouldBlockPlaybackForInteraction: Q,
426
428
  shouldOpenInteractionOverlayAfterAudio: c,
@@ -508,26 +510,26 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
508
510
  g >= 0 || H.reset();
509
511
  }, [g, H]), s(() => {
510
512
  Ne(!1);
511
- }, [sn]);
513
+ }, [ln]);
512
514
  const It = l(() => {
513
515
  if (!o)
514
516
  return {};
515
517
  const e = !!o.user_input?.trim();
516
- return Tn(
518
+ return Rn(
517
519
  typeof o.content == "string" ? o.content : void 0,
518
520
  o.user_input,
519
521
  e ? void 0 : pe
520
522
  );
521
- }, [o, pe]), cn = l(() => {
523
+ }, [o, pe]), an = l(() => {
522
524
  if (!o)
523
525
  return;
524
526
  const e = !!o.user_input?.trim();
525
- return Rn(
527
+ return kn(
526
528
  typeof o.content == "string" ? o.content : void 0,
527
529
  o.user_input,
528
530
  e ? void 0 : pe
529
531
  );
530
- }, [o, pe]), _t = !!o?.user_input?.trim(), Pt = !!o?.readonly || _t, Et = Pt || _t, ze = !!o && xe, an = n(
532
+ }, [o, pe]), _t = !!o?.user_input?.trim(), Pt = !!o?.readonly || _t, Et = Pt || _t, ze = !!o && Ae, un = n(
531
533
  (e) => {
532
534
  const c = [
533
535
  ...e.selectedValues ?? [],
@@ -543,7 +545,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
543
545
  );
544
546
  s(() => {
545
547
  const e = () => {
546
- Ht(document.fullscreenElement === ve.current);
548
+ Wt(document.fullscreenElement === ve.current);
547
549
  };
548
550
  return e(), document.addEventListener("fullscreenchange", e), () => {
549
551
  document.removeEventListener("fullscreenchange", e);
@@ -561,7 +563,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
561
563
  e.getBoundingClientRect().height
562
564
  );
563
565
  ue(
564
- f + Jn
566
+ f + Qn
565
567
  );
566
568
  };
567
569
  if (t(), typeof ResizeObserver > "u")
@@ -573,7 +575,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
573
575
  c.disconnect();
574
576
  };
575
577
  }, [ze]), s(() => {
576
- if (j(), !(!xe || !Et))
578
+ if (j(), !(!Ae || !Et))
577
579
  return oe.current = window.setTimeout(() => {
578
580
  oe.current = null, _e();
579
581
  }, 2e3), () => {
@@ -582,10 +584,10 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
582
584
  }, [
583
585
  j,
584
586
  _e,
585
- xe,
587
+ Ae,
586
588
  Et
587
589
  ]);
588
- const un = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ r.jsx(
590
+ const dn = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ r.jsx(
589
591
  Rt,
590
592
  {
591
593
  className: "content-render-iframe",
@@ -595,7 +597,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
595
597
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
596
598
  type: "sandbox",
597
599
  content: e.content,
598
- enableScaling: Nt
600
+ enableScaling: Ot
599
601
  }
600
602
  ) : /* @__PURE__ */ r.jsx(
601
603
  Rt,
@@ -607,7 +609,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
607
609
  type: "markdown",
608
610
  content: e.content
609
611
  }
610
- ) : null, dn = (e = [], t = !1) => {
612
+ ) : null, fn = (e = [], t = !1) => {
611
613
  if (e.length === 0)
612
614
  return null;
613
615
  const c = e.filter(
@@ -628,14 +630,14 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
628
630
  c === 1 && i.is_renderable !== !1 && "slide-element--single",
629
631
  E ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : i.is_renderable === !1 && "hidden"
630
632
  ),
631
- children: un(i, {
633
+ children: dn(i, {
632
634
  replaceRootScreenHeightWithFull: c === 1 && i.type === "html" && i.is_renderable !== !1
633
635
  })
634
636
  },
635
637
  i.sequence_number ?? `${i.type}-${a}`
636
638
  );
637
639
  }) });
638
- }, fn = n(() => {
640
+ }, mn = n(() => {
639
641
  const e = ve.current;
640
642
  if (e) {
641
643
  if (document.fullscreenElement === e) {
@@ -652,27 +654,27 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
652
654
  top: e.scrollHeight,
653
655
  behavior: "smooth"
654
656
  });
655
- }, []), mn = n(
657
+ }, []), pn = n(
656
658
  (e) => {
657
- Pe(e), ye.current = !0, z.current = null, le(!0), y(!1), A(!0), X(), st();
659
+ Pe(e), ye.current = !0, z.current = null, y(!1), Ft(e) && (le(!0), x(!0)), X(), st();
658
660
  },
659
661
  [
660
662
  st,
661
663
  X,
662
- A,
664
+ x,
663
665
  Pe
664
666
  ]
665
- ), pn = n(
667
+ ), hn = n(
666
668
  (e) => {
667
- Pe(e), ye.current = !0, z.current = null, le(!0), y(!1), A(!0), X(), T();
669
+ Pe(e), ye.current = !0, z.current = null, y(!1), Ft(e) && (le(!0), x(!0)), X(), T();
668
670
  },
669
671
  [
670
672
  T,
671
673
  X,
672
- A,
674
+ x,
673
675
  Pe
674
676
  ]
675
- ), hn = n(
677
+ ), vn = n(
676
678
  ({
677
679
  loading: e,
678
680
  reason: t
@@ -685,7 +687,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
685
687
  y(!1);
686
688
  return;
687
689
  }
688
- e && t && Be(t), y(Zn(t, e));
690
+ e && t && Be(t), y(er(t, e));
689
691
  },
690
692
  [
691
693
  b,
@@ -696,7 +698,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
696
698
  s(() => {
697
699
  C && y(!1);
698
700
  }, [C]);
699
- const vn = n(
701
+ const yn = n(
700
702
  (e) => {
701
703
  const t = h[e]?.audioKey;
702
704
  if (!t || !v || t !== v)
@@ -715,7 +717,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
715
717
  }
716
718
  if (G(null), at(!0), y(!1), w) {
717
719
  const a = d + 1, E = N[a];
718
- At && E?.type === "interaction" && (z.current = a), T();
720
+ xt && E?.type === "interaction" && (z.current = a), T();
719
721
  return;
720
722
  }
721
723
  },
@@ -726,29 +728,29 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
726
728
  v,
727
729
  R,
728
730
  T,
729
- At,
731
+ xt,
730
732
  N
731
733
  ]
732
- ), yn = n(() => {
733
- o && Ae((e) => !e);
734
+ ), gn = n(() => {
735
+ o && xe((e) => !e);
734
736
  }, [o]), Tt = n(
735
737
  (e) => {
736
- e.stopPropagation(), F && A(!0);
738
+ e.stopPropagation(), F && x(!0);
737
739
  },
738
- [it, A]
739
- ), gn = n(
740
+ [it, x]
741
+ ), Sn = n(
740
742
  (e) => {
741
743
  L(), Xe?.(e);
742
744
  },
743
745
  [L, Xe]
744
- ), Sn = n(
746
+ ), bn = n(
745
747
  (e) => {
746
748
  L(), Je?.(e);
747
749
  },
748
750
  [L, Je]
749
- ), bn = n(() => {
750
- le(!0), A(!0);
751
- }, [A]), Ee = l(
751
+ ), An = n(() => {
752
+ le(!0), x(!0);
753
+ }, [x]), Ee = l(
752
754
  () => B.map(
753
755
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
754
756
  ),
@@ -764,9 +766,9 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
764
766
  const a = Me.current, E = Ze.current;
765
767
  if (!a || !E)
766
768
  return;
767
- const xn = a.getBoundingClientRect(), An = E.getBoundingClientRect(), wn = a.scrollTop + (An.top - xn.top);
769
+ const xn = a.getBoundingClientRect(), wn = E.getBoundingClientRect(), In = a.scrollTop + (wn.top - xn.top);
768
770
  a.scrollTo({
769
- top: Math.max(wn, 0),
771
+ top: Math.max(In, 0),
770
772
  behavior: "smooth"
771
773
  });
772
774
  });
@@ -792,14 +794,14 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
792
794
  ht && "slide--browser-fullscreen",
793
795
  $ && "slide--mobile-landscape",
794
796
  pt && "slide--mobile-landscape-native",
795
- Ot
797
+ jt
796
798
  ),
797
- onClick: bn,
798
- onFocusCapture: Sn,
799
- onPointerDown: gn,
800
- ...jt,
799
+ onClick: An,
800
+ onFocusCapture: bn,
801
+ onPointerDown: Sn,
802
+ ...Lt,
801
803
  children: [
802
- Qt ? /* @__PURE__ */ r.jsx(
804
+ Zt ? /* @__PURE__ */ r.jsx(
803
805
  "div",
804
806
  {
805
807
  "aria-hidden": "true",
@@ -813,19 +815,19 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
813
815
  className: Z(
814
816
  "slide__viewport relative h-full min-h-0 w-full",
815
817
  $ && "slide__viewport--mobile-landscape",
816
- $ && !$t && "slide__viewport--mobile-landscape-native"
818
+ $ && !Yt && "slide__viewport--mobile-landscape-native"
817
819
  ),
818
820
  children: [
819
- Xt ? /* @__PURE__ */ r.jsxs("div", { className: "slide-landscape-header", children: [
821
+ Jt ? /* @__PURE__ */ r.jsxs("div", { className: "slide-landscape-header", children: [
820
822
  /* @__PURE__ */ r.jsx(
821
823
  "button",
822
824
  {
823
825
  "aria-label": P?.backAriaLabel ?? "Back",
824
826
  className: "slide-landscape-header__back",
825
- onClick: en,
827
+ onClick: tn,
826
828
  type: "button",
827
829
  children: /* @__PURE__ */ r.jsx(
828
- Wn,
830
+ $n,
829
831
  {
830
832
  className: "slide-landscape-header__icon h-6 w-6",
831
833
  strokeWidth: 2.25
@@ -840,19 +842,19 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
840
842
  {
841
843
  className: Z(
842
844
  "h-full min-h-0 w-full",
843
- Jt && "slide__viewport-content--with-header",
844
- Vt ? "slide-content--single" : "grid gap-4"
845
+ Qt && "slide__viewport-content--with-header",
846
+ Kt ? "slide-content--single" : "grid gap-4"
845
847
  ),
846
- children: B.length > 0 ? /* @__PURE__ */ r.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ r.jsx("div", { ref: Me, className: "slide-stage__layer w-full", children: tn.map(
848
+ children: B.length > 0 ? /* @__PURE__ */ r.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ r.jsx("div", { ref: Me, className: "slide-stage__layer w-full", children: nn.map(
847
849
  (e, t) => {
848
- const c = t === nn;
850
+ const c = t === rn;
849
851
  return /* @__PURE__ */ r.jsx(
850
852
  "div",
851
853
  {
852
854
  "aria-hidden": !c || void 0,
853
855
  className: "w-full h-full",
854
856
  style: { display: c ? void 0 : "none" },
855
- children: dn(
857
+ children: fn(
856
858
  e.elementList,
857
859
  c
858
860
  )
@@ -863,25 +865,25 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
863
865
  ) }) }) : null
864
866
  }
865
867
  ),
866
- qt ? /* @__PURE__ */ r.jsx(
867
- En,
868
+ Dt ? /* @__PURE__ */ r.jsx(
869
+ Cn,
868
870
  {
869
- message: Qn(
871
+ message: Zn(
870
872
  Te,
871
- Dt
873
+ Ut
872
874
  ),
873
875
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
874
876
  }
875
877
  ) : null,
876
878
  /* @__PURE__ */ r.jsx(
877
- Bn,
879
+ Nn,
878
880
  {
879
- extraBottomOffset: Gt,
881
+ extraBottomOffset: Ht,
880
882
  hasPlayerGap: F,
881
- isEnabled: ut && Ut,
882
- isPlayerHidden: x && !F,
883
+ isEnabled: ut && zt,
884
+ isPlayerHidden: A && !F,
883
885
  playbackTimeStore: H,
884
- subtitleCues: rn
886
+ subtitleCues: on
885
887
  }
886
888
  ),
887
889
  ze ? /* @__PURE__ */ r.jsx(
@@ -891,34 +893,34 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
891
893
  "data-player-keyboard-shortcuts-ignore": "true",
892
894
  className: Z(
893
895
  "slide-interaction-overlay",
894
- F && x ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
896
+ F && A ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
895
897
  ),
896
898
  onClick: Tt,
897
899
  onPointerDown: Tt,
898
- style: on,
900
+ style: sn,
899
901
  children: /* @__PURE__ */ r.jsx(
900
- Mt,
902
+ Bt,
901
903
  {
902
904
  content: String(o?.content ?? ""),
903
905
  defaultButtonText: It.buttonText ?? "",
904
906
  defaultInputText: It.inputText ?? "",
905
- defaultSelectedValues: cn,
907
+ defaultSelectedValues: an,
906
908
  confirmButtonText: D?.confirmButtonText,
907
909
  copyButtonText: D?.copyButtonText,
908
910
  copiedButtonText: D?.copiedButtonText,
909
- onSend: an,
911
+ onSend: un,
910
912
  readonly: Pt,
911
913
  title: D?.title ?? Re ?? "Submit the content below to continue."
912
914
  }
913
915
  )
914
916
  }
915
917
  ) : null,
916
- x ? /* @__PURE__ */ r.jsx(
917
- jn.Provider,
918
+ A ? /* @__PURE__ */ r.jsx(
919
+ Ln.Provider,
918
920
  {
919
- value: Kt,
921
+ value: qt,
920
922
  children: /* @__PURE__ */ r.jsx(
921
- Mn,
923
+ Bn,
922
924
  {
923
925
  audioList: h,
924
926
  className: Z(
@@ -933,31 +935,31 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
933
935
  isPlaybackPaused: V,
934
936
  isAutoAdvanceEnabled: ae,
935
937
  hasInteraction: !!o,
936
- isInteractionOpen: xe,
938
+ isInteractionOpen: Ae,
937
939
  isSubtitleEnabled: ut,
938
940
  onAutoAdvanceToggle: ct,
939
- onLoadingChange: hn,
941
+ onLoadingChange: vn,
940
942
  onPlaybackStarted: () => {
941
943
  Ne(!0);
942
944
  },
943
- onPlaybackPreferenceChange: ln,
945
+ onPlaybackPreferenceChange: cn,
944
946
  onPlaybackTimeChange: H.setTime,
945
947
  onSubtitleToggle: () => {
946
- zt((e) => !e);
948
+ Gt((e) => !e);
947
949
  },
948
950
  nextDisabled: !w,
949
- onEnded: vn,
950
- onFullscreen: fn,
951
+ onEnded: yn,
952
+ onFullscreen: mn,
951
953
  isFullscreen: dt,
952
954
  mobileViewMode: W,
953
955
  settingsPortalContainer: Qe.current,
954
- onMobileViewModeChange: Zt,
955
- onInteractionToggle: yn,
956
- onNext: pn,
957
- onPrev: mn,
958
- prevDisabled: !Lt,
956
+ onMobileViewModeChange: en,
957
+ onInteractionToggle: gn,
958
+ onNext: hn,
959
+ onPrev: pn,
960
+ prevDisabled: !Vt,
959
961
  showControls: F,
960
- texts: Bt,
962
+ texts: Nt,
961
963
  customActionContext: De,
962
964
  customActions: q,
963
965
  useAutoAdvanceToggle: fe
@@ -973,6 +975,6 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
973
975
  );
974
976
  };
975
977
  export {
976
- Cr as default
978
+ Rr as default
977
979
  };
978
980
  //# sourceMappingURL=Slide.es.js.map