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