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