markdown-flow-ui 0.1.100-beta.12 → 0.1.100-beta.13
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/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js.map +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +1 -1
- package/dist/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/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/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
- package/dist/_virtual/index.cjs10.js +1 -1
- 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.cjs9.js +1 -1
- package/dist/_virtual/index.es10.js +2 -2
- package/dist/_virtual/index.es4.js +4 -4
- package/dist/_virtual/index.es5.js +4 -4
- package/dist/_virtual/index.es6.js +5 -5
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/components/ContentRender/plugins/CustomVariable.cjs.js +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.cjs.js.map +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.es.js +68 -64
- package/dist/components/ContentRender/plugins/CustomVariable.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 +174 -174
- package/dist/components/Slide/Slide.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-lib.css +1 -1
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { j as t } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { hasBrowserUserActivation as
|
|
4
|
-
import { isSandboxInteractionMessage as
|
|
5
|
-
import { cn as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { memo as Ve, useRef as v, useMemo as O, useState as y, useCallback as i, useEffect as h } from "react";
|
|
3
|
+
import { hasBrowserUserActivation as ze } from "../../lib/browserUserActivation.es.js";
|
|
4
|
+
import { isSandboxInteractionMessage as Ge } from "../../lib/sandboxInteraction.es.js";
|
|
5
|
+
import { cn as $ } from "../../lib/utils.es.js";
|
|
6
|
+
import We from "../ContentRender/ContentRender.es.js";
|
|
7
|
+
import ye from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
|
-
import { getInteractionDefaultValues as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
import { getInteractionDefaultValues as Ye, getInteractionDefaultSelectedValues as Je } from "../../lib/interaction-defaults.es.js";
|
|
10
|
+
import Qe from "./Player.es.js";
|
|
11
|
+
import Xe from "./useSlide.es.js";
|
|
12
|
+
import Ze from "./useWakePlayerFromIframe.es.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
const
|
|
14
|
+
const et = 1e3, we = Ve(
|
|
15
15
|
({
|
|
16
16
|
content: b,
|
|
17
17
|
title: _,
|
|
18
|
-
defaultButtonText:
|
|
18
|
+
defaultButtonText: u,
|
|
19
19
|
defaultInputText: j,
|
|
20
20
|
defaultSelectedValues: w,
|
|
21
21
|
confirmButtonText: T,
|
|
22
22
|
copyButtonText: R,
|
|
23
23
|
copiedButtonText: P,
|
|
24
|
-
onSend:
|
|
24
|
+
onSend: D,
|
|
25
25
|
readonly: B = !1
|
|
26
26
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
27
27
|
/* @__PURE__ */ t.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ t.jsx("p", { className: "slide-player__interaction-title", children: _ }) }),
|
|
28
28
|
/* @__PURE__ */ t.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ t.jsx(
|
|
29
|
-
|
|
29
|
+
We,
|
|
30
30
|
{
|
|
31
31
|
content: b,
|
|
32
|
-
defaultButtonText:
|
|
32
|
+
defaultButtonText: u,
|
|
33
33
|
defaultInputText: j,
|
|
34
34
|
defaultSelectedValues: w,
|
|
35
35
|
confirmButtonText: T,
|
|
36
36
|
copyButtonText: R,
|
|
37
37
|
copiedButtonText: P,
|
|
38
|
-
onSend:
|
|
38
|
+
onSend: D,
|
|
39
39
|
readonly: B,
|
|
40
40
|
enableTypewriter: !1,
|
|
41
41
|
sandboxMode: "content"
|
|
@@ -44,178 +44,178 @@ const Ze = 1e3, ye = Ue(
|
|
|
44
44
|
/* @__PURE__ */ t.jsx("div", { className: "slide-player__interaction-arrow" })
|
|
45
45
|
] })
|
|
46
46
|
);
|
|
47
|
-
|
|
48
|
-
const
|
|
47
|
+
we.displayName = "InteractionOverlayCard";
|
|
48
|
+
const tt = (b, _) => b.length === _.length && b.every((u, j) => {
|
|
49
49
|
const w = _[j];
|
|
50
|
-
return
|
|
51
|
-
}),
|
|
50
|
+
return u.sequence_number === w?.sequence_number && u.type === w?.type && u.content === w?.content;
|
|
51
|
+
}), xt = ({
|
|
52
52
|
elementList: b = [],
|
|
53
53
|
showPlayer: _ = !0,
|
|
54
|
-
playerAlwaysVisible:
|
|
54
|
+
playerAlwaysVisible: u = !1,
|
|
55
55
|
playerClassName: j,
|
|
56
56
|
interactionTitle: w,
|
|
57
57
|
interactionTexts: T,
|
|
58
58
|
playerAutoHideDelay: R = 3e3,
|
|
59
59
|
interactionDefaultValueOptions: P,
|
|
60
|
-
onSend:
|
|
60
|
+
onSend: D,
|
|
61
61
|
onPlayerVisibilityChange: B,
|
|
62
|
-
onStepChange:
|
|
63
|
-
className:
|
|
64
|
-
onPointerDown:
|
|
65
|
-
...
|
|
62
|
+
onStepChange: oe,
|
|
63
|
+
className: Ie,
|
|
64
|
+
onPointerDown: se,
|
|
65
|
+
...Se
|
|
66
66
|
}) => {
|
|
67
|
-
const
|
|
68
|
-
currentElementList:
|
|
69
|
-
stepElementLists:
|
|
70
|
-
slideElementList:
|
|
67
|
+
const ee = v(null), te = v(null), le = v(null), C = v(null), q = v(null), F = v(null), ie = v([]), H = v(!1), {
|
|
68
|
+
currentElementList: f,
|
|
69
|
+
stepElementLists: ae,
|
|
70
|
+
slideElementList: K,
|
|
71
71
|
currentIndex: x,
|
|
72
|
-
audioList:
|
|
72
|
+
audioList: ce,
|
|
73
73
|
currentAudioSequenceIndexes: k,
|
|
74
74
|
currentInteractionElement: M,
|
|
75
|
-
canGoPrev:
|
|
75
|
+
canGoPrev: be,
|
|
76
76
|
canGoNext: I,
|
|
77
|
-
handlePrev:
|
|
78
|
-
handleNext:
|
|
79
|
-
} =
|
|
77
|
+
handlePrev: ue,
|
|
78
|
+
handleNext: g
|
|
79
|
+
} = Xe(b), de = O(() => {
|
|
80
80
|
if (!(x < 0))
|
|
81
|
-
return
|
|
82
|
-
}, [x,
|
|
81
|
+
return K[x];
|
|
82
|
+
}, [x, K]), _e = K.filter(
|
|
83
83
|
(e) => e.is_renderable !== !1
|
|
84
|
-
).length === 1,
|
|
84
|
+
).length === 1, d = _ && (K.length > 0 || ce.length > 0 || !!M), [fe, U] = y(!0), [V, L] = y(!1), [Te, ne] = y(!1), [Pe] = y(() => ze()), Ee = Pe || Te, [Ae, z] = y(-1), [G, W] = y(-1), [n, re] = y(), [Y, J] = y(!1), E = d && (u || fe), S = i(() => {
|
|
85
85
|
C.current !== null && (window.clearTimeout(C.current), C.current = null);
|
|
86
|
-
}, []),
|
|
86
|
+
}, []), m = i(() => {
|
|
87
87
|
F.current !== null && (window.clearTimeout(F.current), F.current = null);
|
|
88
88
|
}, []), A = i(() => {
|
|
89
89
|
q.current !== null && (window.clearTimeout(q.current), q.current = null);
|
|
90
90
|
}, []), N = i(() => {
|
|
91
|
-
A(),
|
|
92
|
-
}, [A,
|
|
91
|
+
A(), m(), z(-1), W(-1), re(void 0), J(!1);
|
|
92
|
+
}, [A, m]), Q = i(() => {
|
|
93
93
|
const e = k[0];
|
|
94
|
-
return typeof e != "number" ? !1 : (
|
|
95
|
-
}, [k]),
|
|
96
|
-
|
|
94
|
+
return typeof e != "number" ? !1 : (W(0), z(e), !0);
|
|
95
|
+
}, [k]), X = i(() => {
|
|
96
|
+
m(), J(!1), !Q() && I && g();
|
|
97
97
|
}, [
|
|
98
98
|
I,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
]),
|
|
103
|
-
(e =
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
m,
|
|
100
|
+
g,
|
|
101
|
+
Q
|
|
102
|
+
]), a = i(
|
|
103
|
+
(e = V) => {
|
|
104
|
+
d && (U(!0), S(), !(u || !e || R <= 0) && (C.current = window.setTimeout(() => {
|
|
105
|
+
U(!1), C.current = null;
|
|
106
106
|
}, R)));
|
|
107
107
|
},
|
|
108
108
|
[
|
|
109
109
|
S,
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
V,
|
|
111
|
+
u,
|
|
112
112
|
R,
|
|
113
|
-
|
|
113
|
+
d
|
|
114
114
|
]
|
|
115
115
|
);
|
|
116
116
|
h(() => () => {
|
|
117
|
-
A(), S(),
|
|
117
|
+
A(), S(), m();
|
|
118
118
|
}, [
|
|
119
119
|
A,
|
|
120
|
-
|
|
120
|
+
m,
|
|
121
121
|
S
|
|
122
122
|
]), h(() => (B?.(E), () => {
|
|
123
123
|
B?.(!1);
|
|
124
124
|
}), [B, E]), h(() => {
|
|
125
|
-
|
|
126
|
-
}, [x,
|
|
127
|
-
if (!
|
|
128
|
-
S(),
|
|
125
|
+
oe?.(de, x);
|
|
126
|
+
}, [x, de, oe]), h(() => {
|
|
127
|
+
if (!d) {
|
|
128
|
+
S(), U(!1);
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
if (
|
|
132
|
-
S(),
|
|
131
|
+
if (u) {
|
|
132
|
+
S(), U(!0);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
V || a(!0);
|
|
136
136
|
}, [
|
|
137
137
|
S,
|
|
138
|
-
|
|
139
|
-
c,
|
|
138
|
+
V,
|
|
140
139
|
u,
|
|
141
|
-
|
|
140
|
+
d,
|
|
141
|
+
a
|
|
142
142
|
]), h(() => {
|
|
143
143
|
if (typeof window > "u")
|
|
144
144
|
return;
|
|
145
145
|
const e = (r) => {
|
|
146
|
-
r.origin === window.location.origin &&
|
|
146
|
+
r.origin === window.location.origin && Ge(r.data) && d && (L(!0), a(!0));
|
|
147
147
|
};
|
|
148
148
|
return window.addEventListener("message", e), () => {
|
|
149
149
|
window.removeEventListener("message", e);
|
|
150
150
|
};
|
|
151
|
-
}, [
|
|
152
|
-
sectionRef:
|
|
153
|
-
enabled:
|
|
151
|
+
}, [d, a]), Ze({
|
|
152
|
+
sectionRef: ee,
|
|
153
|
+
enabled: d,
|
|
154
154
|
onWake: () => {
|
|
155
|
-
|
|
155
|
+
L(!0), a(!0);
|
|
156
156
|
}
|
|
157
157
|
}), h(() => {
|
|
158
|
-
if (N(), !(
|
|
158
|
+
if (N(), !(f.length === 0 && !M)) {
|
|
159
159
|
if (M) {
|
|
160
|
-
re(M),
|
|
160
|
+
re(M), J(!0);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
if (!
|
|
163
|
+
if (!Q() && I)
|
|
164
164
|
return q.current = window.setTimeout(() => {
|
|
165
|
-
q.current = null,
|
|
166
|
-
},
|
|
165
|
+
q.current = null, g();
|
|
166
|
+
}, et), () => {
|
|
167
167
|
A();
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
}, [
|
|
171
171
|
I,
|
|
172
172
|
A,
|
|
173
|
-
|
|
173
|
+
f,
|
|
174
174
|
M,
|
|
175
|
-
|
|
175
|
+
g,
|
|
176
176
|
N,
|
|
177
|
-
|
|
177
|
+
Q
|
|
178
178
|
]);
|
|
179
|
-
const
|
|
179
|
+
const me = O(() => n ? Ye(
|
|
180
180
|
typeof n.content == "string" ? n.content : void 0,
|
|
181
181
|
n.user_input,
|
|
182
182
|
P
|
|
183
|
-
) : {}, [n, P]),
|
|
183
|
+
) : {}, [n, P]), Ne = O(() => {
|
|
184
184
|
if (n)
|
|
185
|
-
return
|
|
185
|
+
return Je(
|
|
186
186
|
typeof n.content == "string" ? n.content : void 0,
|
|
187
187
|
n.user_input,
|
|
188
188
|
P
|
|
189
189
|
);
|
|
190
|
-
}, [n, P]),
|
|
190
|
+
}, [n, P]), pe = !!n?.user_input?.trim(), he = !!n?.readonly || pe, xe = he || pe, je = i(
|
|
191
191
|
(e) => {
|
|
192
192
|
const s = [
|
|
193
193
|
...e.selectedValues ?? [],
|
|
194
194
|
e.inputText?.trim() ?? "",
|
|
195
195
|
e.buttonText?.trim() ?? ""
|
|
196
196
|
].filter(Boolean).join(", ");
|
|
197
|
-
re((
|
|
198
|
-
...
|
|
197
|
+
re((c) => !c || !s ? c : {
|
|
198
|
+
...c,
|
|
199
199
|
user_input: s
|
|
200
|
-
}),
|
|
200
|
+
}), D?.(e, n), X();
|
|
201
201
|
},
|
|
202
|
-
[n,
|
|
202
|
+
[n, X, D]
|
|
203
203
|
);
|
|
204
204
|
h(() => {
|
|
205
|
-
if (
|
|
205
|
+
if (m(), !(!Y || !xe))
|
|
206
206
|
return F.current = window.setTimeout(() => {
|
|
207
|
-
F.current = null,
|
|
207
|
+
F.current = null, X();
|
|
208
208
|
}, 2e3), () => {
|
|
209
|
-
|
|
209
|
+
m();
|
|
210
210
|
};
|
|
211
211
|
}, [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
m,
|
|
213
|
+
X,
|
|
214
|
+
Y,
|
|
215
|
+
xe
|
|
216
216
|
]);
|
|
217
|
-
const
|
|
218
|
-
|
|
217
|
+
const Re = (e) => e ? e.type === "slot" ? /* @__PURE__ */ t.jsx(t.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ t.jsx(
|
|
218
|
+
ye,
|
|
219
219
|
{
|
|
220
220
|
className: "content-render-iframe",
|
|
221
221
|
hideFullScreen: !0,
|
|
@@ -224,7 +224,7 @@ const et = (b, _) => b.length === _.length && b.every((c, j) => {
|
|
|
224
224
|
content: e.content
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ t.jsx(
|
|
227
|
-
|
|
227
|
+
ye,
|
|
228
228
|
{
|
|
229
229
|
className: "content-render-iframe",
|
|
230
230
|
hideFullScreen: !0,
|
|
@@ -232,12 +232,12 @@ const et = (b, _) => b.length === _.length && b.every((c, j) => {
|
|
|
232
232
|
type: "markdown",
|
|
233
233
|
content: e.content
|
|
234
234
|
}
|
|
235
|
-
) : null,
|
|
235
|
+
) : null, Be = (e = [], r = !1) => {
|
|
236
236
|
if (e.length === 0)
|
|
237
237
|
return null;
|
|
238
238
|
const s = e.filter(
|
|
239
239
|
(o) => o.is_renderable !== !1
|
|
240
|
-
).length,
|
|
240
|
+
).length, c = e.reduce(
|
|
241
241
|
(o, l, p) => l.is_renderable !== !1 ? p : o,
|
|
242
242
|
-1
|
|
243
243
|
);
|
|
@@ -246,41 +246,41 @@ const et = (b, _) => b.length === _.length && b.every((c, j) => {
|
|
|
246
246
|
return /* @__PURE__ */ t.jsx(
|
|
247
247
|
"div",
|
|
248
248
|
{
|
|
249
|
-
ref: r && l ===
|
|
249
|
+
ref: r && l === c ? le : null,
|
|
250
250
|
"aria-hidden": p || void 0,
|
|
251
|
-
className:
|
|
251
|
+
className: $(
|
|
252
252
|
"w-full shrink-0",
|
|
253
253
|
s === 1 && o.is_renderable !== !1 && "slide-element--single",
|
|
254
254
|
p ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : o.is_renderable === !1 && "hidden"
|
|
255
255
|
),
|
|
256
|
-
children:
|
|
256
|
+
children: Re(o)
|
|
257
257
|
},
|
|
258
258
|
o.sequence_number ?? `${o.type}-${l}`
|
|
259
259
|
);
|
|
260
260
|
}) });
|
|
261
|
-
}, { mountedStepStates:
|
|
261
|
+
}, { mountedStepStates: Ce, currentMountedStateIndex: qe } = O(() => {
|
|
262
262
|
const e = [], r = /* @__PURE__ */ new Map();
|
|
263
|
-
return
|
|
263
|
+
return ae.forEach((s, c) => {
|
|
264
264
|
const o = e.findIndex(
|
|
265
|
-
(l) =>
|
|
265
|
+
(l) => tt(
|
|
266
266
|
l.elementList,
|
|
267
267
|
s
|
|
268
268
|
)
|
|
269
269
|
);
|
|
270
270
|
if (o >= 0) {
|
|
271
|
-
e[o]?.sourceStepIndexes.push(
|
|
271
|
+
e[o]?.sourceStepIndexes.push(c), r.set(c, o);
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
274
|
e.push({
|
|
275
275
|
elementList: s,
|
|
276
|
-
sourceStepIndexes: [
|
|
277
|
-
}), r.set(
|
|
276
|
+
sourceStepIndexes: [c]
|
|
277
|
+
}), r.set(c, e.length - 1);
|
|
278
278
|
}), {
|
|
279
279
|
mountedStepStates: e,
|
|
280
280
|
currentMountedStateIndex: x >= 0 ? r.get(x) ?? -1 : -1
|
|
281
281
|
};
|
|
282
|
-
}, [x,
|
|
283
|
-
const e =
|
|
282
|
+
}, [x, ae]), Fe = () => {
|
|
283
|
+
const e = ee.current;
|
|
284
284
|
if (e) {
|
|
285
285
|
if (document.fullscreenElement) {
|
|
286
286
|
document.exitFullscreen().catch(() => {
|
|
@@ -290,104 +290,104 @@ const et = (b, _) => b.length === _.length && b.every((c, j) => {
|
|
|
290
290
|
e.requestFullscreen?.().catch(() => {
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
},
|
|
294
|
-
const e =
|
|
293
|
+
}, ge = i(() => {
|
|
294
|
+
const e = te.current;
|
|
295
295
|
e && e.scrollTo({
|
|
296
296
|
top: e.scrollHeight,
|
|
297
297
|
behavior: "smooth"
|
|
298
298
|
});
|
|
299
|
-
}, []),
|
|
300
|
-
|
|
301
|
-
}, [
|
|
302
|
-
|
|
303
|
-
}, [
|
|
299
|
+
}, []), ke = i(() => {
|
|
300
|
+
H.current = !0, L(!0), ne(!0), a(!0), N(), ue();
|
|
301
|
+
}, [ue, N, a]), Me = i(() => {
|
|
302
|
+
H.current = !0, L(!0), ne(!0), a(!0), N(), g();
|
|
303
|
+
}, [g, N, a]), Le = i(
|
|
304
304
|
(e) => {
|
|
305
|
-
if (
|
|
305
|
+
if (G < 0 || k[G] !== e)
|
|
306
306
|
return;
|
|
307
|
-
const r =
|
|
307
|
+
const r = G + 1, s = k[r];
|
|
308
308
|
if (typeof s == "number") {
|
|
309
|
-
|
|
309
|
+
W(r), z(s);
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
z(-1), W(-1), I && g();
|
|
313
313
|
},
|
|
314
314
|
[
|
|
315
315
|
I,
|
|
316
316
|
k,
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
G,
|
|
318
|
+
g
|
|
319
319
|
]
|
|
320
|
-
),
|
|
321
|
-
n &&
|
|
320
|
+
), Oe = i(() => {
|
|
321
|
+
n && J((e) => !e);
|
|
322
322
|
}, [n]), ve = i(
|
|
323
323
|
(e) => {
|
|
324
|
-
e.stopPropagation(), E &&
|
|
324
|
+
e.stopPropagation(), E && a(!0);
|
|
325
325
|
},
|
|
326
|
-
[
|
|
327
|
-
),
|
|
326
|
+
[fe, a]
|
|
327
|
+
), $e = i(
|
|
328
328
|
(e) => {
|
|
329
|
-
|
|
329
|
+
se?.(e), L(!0), a(!0);
|
|
330
330
|
},
|
|
331
|
-
[
|
|
332
|
-
),
|
|
333
|
-
() =>
|
|
331
|
+
[se, a]
|
|
332
|
+
), De = !!n && Y, Z = O(
|
|
333
|
+
() => f.map(
|
|
334
334
|
(e, r) => `${e.sequence_number ?? `${e.type}-${r}`}:${String(e.is_new ?? "")}`
|
|
335
335
|
),
|
|
336
|
-
[
|
|
336
|
+
[f]
|
|
337
337
|
);
|
|
338
338
|
return h(() => {
|
|
339
|
-
const e =
|
|
339
|
+
const e = ie.current, c = (e.length > 0 && e.length < Z.length && e.every((l, p) => l === Z[p]) ? f.slice(e.length) : []).some(
|
|
340
340
|
(l) => l.is_new === !1
|
|
341
341
|
);
|
|
342
|
-
if (
|
|
342
|
+
if (ie.current = Z, !c)
|
|
343
343
|
return;
|
|
344
344
|
const o = window.requestAnimationFrame(() => {
|
|
345
|
-
const l =
|
|
345
|
+
const l = te.current, p = le.current;
|
|
346
346
|
if (!l || !p)
|
|
347
347
|
return;
|
|
348
|
-
const
|
|
348
|
+
const He = l.getBoundingClientRect(), Ke = p.getBoundingClientRect(), Ue = l.scrollTop + (Ke.top - He.top);
|
|
349
349
|
l.scrollTo({
|
|
350
|
-
top: Math.max(
|
|
350
|
+
top: Math.max(Ue, 0),
|
|
351
351
|
behavior: "smooth"
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
354
|
return () => {
|
|
355
355
|
window.cancelAnimationFrame(o);
|
|
356
356
|
};
|
|
357
|
-
}, [
|
|
358
|
-
if (!
|
|
357
|
+
}, [f, Z]), h(() => {
|
|
358
|
+
if (!H.current || (H.current = !1, f.length === 0))
|
|
359
359
|
return;
|
|
360
360
|
const e = window.requestAnimationFrame(() => {
|
|
361
|
-
|
|
361
|
+
ge();
|
|
362
362
|
});
|
|
363
363
|
return () => {
|
|
364
364
|
window.cancelAnimationFrame(e);
|
|
365
365
|
};
|
|
366
|
-
}, [
|
|
366
|
+
}, [f, ge]), /* @__PURE__ */ t.jsxs(
|
|
367
367
|
"section",
|
|
368
368
|
{
|
|
369
|
-
ref:
|
|
370
|
-
className:
|
|
371
|
-
onPointerDown:
|
|
372
|
-
...
|
|
369
|
+
ref: ee,
|
|
370
|
+
className: $("relative h-full w-full", Ie),
|
|
371
|
+
onPointerDown: $e,
|
|
372
|
+
...Se,
|
|
373
373
|
children: [
|
|
374
374
|
/* @__PURE__ */ t.jsx(
|
|
375
375
|
"div",
|
|
376
376
|
{
|
|
377
|
-
className:
|
|
377
|
+
className: $(
|
|
378
378
|
"h-full min-h-0 w-full",
|
|
379
|
-
|
|
379
|
+
_e ? "slide-content--single" : "grid gap-4"
|
|
380
380
|
),
|
|
381
|
-
children:
|
|
381
|
+
children: f.length > 0 ? /* @__PURE__ */ t.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ t.jsx("div", { ref: te, className: "slide-stage__layer w-full", children: Ce.map(
|
|
382
382
|
(e, r) => {
|
|
383
|
-
const s = r ===
|
|
383
|
+
const s = r === qe;
|
|
384
384
|
return /* @__PURE__ */ t.jsx(
|
|
385
385
|
"div",
|
|
386
386
|
{
|
|
387
387
|
"aria-hidden": !s || void 0,
|
|
388
388
|
className: "w-full",
|
|
389
389
|
style: { display: s ? void 0 : "none" },
|
|
390
|
-
children:
|
|
390
|
+
children: Be(
|
|
391
391
|
e.elementList,
|
|
392
392
|
s
|
|
393
393
|
)
|
|
@@ -398,53 +398,53 @@ const et = (b, _) => b.length === _.length && b.every((c, j) => {
|
|
|
398
398
|
) }) }) : null
|
|
399
399
|
}
|
|
400
400
|
),
|
|
401
|
-
|
|
401
|
+
De ? /* @__PURE__ */ t.jsx(
|
|
402
402
|
"div",
|
|
403
403
|
{
|
|
404
|
-
className:
|
|
404
|
+
className: $(
|
|
405
405
|
"slide-interaction-overlay",
|
|
406
|
-
E &&
|
|
406
|
+
E && d ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
407
407
|
),
|
|
408
408
|
onClick: ve,
|
|
409
409
|
onPointerDown: ve,
|
|
410
410
|
children: /* @__PURE__ */ t.jsx(
|
|
411
|
-
|
|
411
|
+
we,
|
|
412
412
|
{
|
|
413
413
|
content: String(n?.content ?? ""),
|
|
414
|
-
defaultButtonText:
|
|
415
|
-
defaultInputText:
|
|
416
|
-
defaultSelectedValues:
|
|
414
|
+
defaultButtonText: me.buttonText ?? "",
|
|
415
|
+
defaultInputText: me.inputText ?? "",
|
|
416
|
+
defaultSelectedValues: Ne,
|
|
417
417
|
confirmButtonText: T?.confirmButtonText,
|
|
418
418
|
copyButtonText: T?.copyButtonText,
|
|
419
419
|
copiedButtonText: T?.copiedButtonText,
|
|
420
|
-
onSend:
|
|
421
|
-
readonly:
|
|
420
|
+
onSend: je,
|
|
421
|
+
readonly: he,
|
|
422
422
|
title: T?.title ?? w ?? "Submit the content below to continue."
|
|
423
423
|
}
|
|
424
424
|
)
|
|
425
425
|
}
|
|
426
426
|
) : null,
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
428
|
+
Qe,
|
|
429
429
|
{
|
|
430
|
-
audioList:
|
|
431
|
-
className:
|
|
430
|
+
audioList: ce,
|
|
431
|
+
className: $(
|
|
432
432
|
"absolute left-1/2 bottom-6 z-[2] -translate-x-1/2",
|
|
433
433
|
j,
|
|
434
434
|
!E && "pointer-events-none opacity-0"
|
|
435
435
|
),
|
|
436
|
-
currentAudioIndex:
|
|
437
|
-
defaultPlaying:
|
|
436
|
+
currentAudioIndex: Ae,
|
|
437
|
+
defaultPlaying: Ee,
|
|
438
438
|
hasInteraction: !!n,
|
|
439
|
-
isInteractionOpen:
|
|
439
|
+
isInteractionOpen: Y,
|
|
440
440
|
nextDisabled: !I,
|
|
441
|
-
onEnded:
|
|
442
|
-
onFullscreen:
|
|
443
|
-
onInteractionToggle:
|
|
441
|
+
onEnded: Le,
|
|
442
|
+
onFullscreen: Fe,
|
|
443
|
+
onInteractionToggle: Oe,
|
|
444
444
|
onPlayRequest: () => ne(!0),
|
|
445
|
-
onNext:
|
|
446
|
-
onPrev:
|
|
447
|
-
prevDisabled: !
|
|
445
|
+
onNext: Me,
|
|
446
|
+
onPrev: ke,
|
|
447
|
+
prevDisabled: !be,
|
|
448
448
|
showControls: E
|
|
449
449
|
}
|
|
450
450
|
) : null
|
|
@@ -453,6 +453,6 @@ const et = (b, _) => b.length === _.length && b.every((c, j) => {
|
|
|
453
453
|
);
|
|
454
454
|
};
|
|
455
455
|
export {
|
|
456
|
-
|
|
456
|
+
xt as default
|
|
457
457
|
};
|
|
458
458
|
//# sourceMappingURL=Slide.es.js.map
|