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