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