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