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