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