markdown-flow-ui 0.1.100-beta.2 → 0.1.100-beta.21
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/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/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.es.js +1 -1
- package/dist/_virtual/index.cjs3.js +1 -1
- package/dist/_virtual/index.cjs4.js +1 -1
- package/dist/_virtual/index.es3.js +4 -5
- package/dist/_virtual/index.es3.js.map +1 -1
- package/dist/_virtual/index.es4.js +5 -4
- package/dist/_virtual/index.es4.js.map +1 -1
- package/dist/assets/markdown-flow-ui.css +1 -1
- package/dist/components/ContentRender/ContentRender.cjs.js +2 -2
- package/dist/components/ContentRender/ContentRender.cjs.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.d.ts +13 -10
- package/dist/components/ContentRender/ContentRender.es.js +175 -158
- package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.cjs.js +3 -3
- 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 +331 -202
- package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.cjs.js +3 -3
- package/dist/components/ContentRender/SandboxApp.cjs.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.d.ts +4 -0
- package/dist/components/ContentRender/SandboxApp.es.js +144 -111
- package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
- 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/MarkdownFlow/MarkdownFlow.cjs.js +1 -1
- package/dist/components/MarkdownFlow/MarkdownFlow.cjs.js.map +1 -1
- package/dist/components/MarkdownFlow/MarkdownFlow.d.ts +3 -0
- package/dist/components/MarkdownFlow/MarkdownFlow.es.js +19 -16
- package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
- package/dist/components/Slide/Player.cjs.js +1 -1
- package/dist/components/Slide/Player.cjs.js.map +1 -1
- package/dist/components/Slide/Player.d.ts +1 -0
- package/dist/components/Slide/Player.es.js +208 -168
- package/dist/components/Slide/Player.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs.js +1 -1
- package/dist/components/Slide/Slide.cjs.js.map +1 -1
- package/dist/components/Slide/Slide.d.ts +13 -0
- package/dist/components/Slide/Slide.es.js +374 -255
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/Slide.stories.d.ts +21 -1
- package/dist/components/Slide/index.d.ts +3 -3
- package/dist/components/Slide/types.d.ts +6 -6
- package/dist/components/Slide/useSlide.cjs.js +1 -1
- package/dist/components/Slide/useSlide.cjs.js.map +1 -1
- package/dist/components/Slide/useSlide.d.ts +4 -1
- package/dist/components/Slide/useSlide.es.js +115 -81
- package/dist/components/Slide/useSlide.es.js.map +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.cjs.js +2 -0
- package/dist/components/Slide/useWakePlayerFromIframe.cjs.js.map +1 -0
- package/dist/components/Slide/useWakePlayerFromIframe.d.ts +7 -0
- package/dist/components/Slide/useWakePlayerFromIframe.es.js +89 -0
- package/dist/components/Slide/useWakePlayerFromIframe.es.js.map +1 -0
- package/dist/components/index.d.ts +4 -2
- package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +24 -22
- package/dist/lib/interaction-defaults.cjs.js +2 -0
- package/dist/lib/interaction-defaults.cjs.js.map +1 -0
- package/dist/lib/interaction-defaults.es.js +106 -0
- package/dist/lib/interaction-defaults.es.js.map +1 -0
- package/dist/lib/sandboxInteraction.cjs.js +2 -0
- package/dist/lib/sandboxInteraction.cjs.js.map +1 -0
- package/dist/lib/sandboxInteraction.d.ts +8 -0
- package/dist/lib/sandboxInteraction.es.js +12 -0
- package/dist/lib/sandboxInteraction.es.js.map +1 -0
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.d.ts +5 -3
- package/dist/renderer.es.js +18 -16
- package/package.json +17 -2
- package/dist/components/Slide/interaction-defaults.cjs.js +0 -2
- package/dist/components/Slide/interaction-defaults.cjs.js.map +0 -1
- package/dist/components/Slide/interaction-defaults.es.js +0 -85
- package/dist/components/Slide/interaction-defaults.es.js.map +0 -1
- /package/dist/{components/Slide → lib}/interaction-defaults.d.ts +0 -0
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { j as r } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { useRef as i, useState as fe, useMemo as de, useEffect as R, useCallback as o } from "react";
|
|
3
|
+
import { cn as G } from "../../lib/utils.es.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
5
|
+
import me from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
|
|
6
|
+
import pe from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
|
|
7
|
+
import he from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/rotate-ccw.es.js";
|
|
8
|
+
import ge from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/rotate-cw.es.js";
|
|
9
|
+
import ye from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/maximize.es.js";
|
|
10
|
+
import _e from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js";
|
|
11
|
+
const J = /* @__PURE__ */ new Set(), Q = (g) => {
|
|
12
|
+
if (typeof document > "u" || !g || J.has(g))
|
|
13
|
+
return;
|
|
14
|
+
const v = document.createElement("link");
|
|
15
|
+
v.rel = "preload", v.as = "audio", v.href = g, /^https?:/i.test(g) && (v.crossOrigin = "anonymous"), document.head.appendChild(v), J.add(g);
|
|
16
|
+
}, Se = () => /* @__PURE__ */ r.jsxs(
|
|
12
17
|
"svg",
|
|
13
18
|
{
|
|
14
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -27,7 +32,7 @@ const oe = () => /* @__PURE__ */ r.jsxs(
|
|
|
27
32
|
/* @__PURE__ */ r.jsx("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
|
|
28
33
|
]
|
|
29
34
|
}
|
|
30
|
-
),
|
|
35
|
+
), be = () => /* @__PURE__ */ r.jsxs(
|
|
31
36
|
"svg",
|
|
32
37
|
{
|
|
33
38
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -46,240 +51,275 @@ const oe = () => /* @__PURE__ */ r.jsxs(
|
|
|
46
51
|
/* @__PURE__ */ r.jsx("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
|
|
47
52
|
]
|
|
48
53
|
}
|
|
49
|
-
),
|
|
50
|
-
audioList:
|
|
51
|
-
className:
|
|
52
|
-
currentAudioIndex:
|
|
53
|
-
defaultPlaying:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
), Me = ({
|
|
55
|
+
audioList: g = [],
|
|
56
|
+
className: v,
|
|
57
|
+
currentAudioIndex: c = -1,
|
|
58
|
+
defaultPlaying: d = !0,
|
|
59
|
+
onLoadingChange: F,
|
|
60
|
+
onPrev: X,
|
|
61
|
+
onNext: Y,
|
|
62
|
+
onFullscreen: q,
|
|
63
|
+
onEnded: K,
|
|
64
|
+
onPlayRequest: T,
|
|
65
|
+
onInteractionToggle: D,
|
|
66
|
+
hasInteraction: I = !1,
|
|
67
|
+
isInteractionOpen: ee = !1,
|
|
68
|
+
prevDisabled: re = !1,
|
|
69
|
+
nextDisabled: te = !1,
|
|
70
|
+
showControls: ne = !0,
|
|
71
|
+
...se
|
|
66
72
|
}) => {
|
|
67
|
-
const
|
|
68
|
-
() => [...
|
|
69
|
-
(e,
|
|
73
|
+
const y = i(null), x = i(null), L = i(null), j = i(0), f = i(null), Z = i(void 0), E = i([]), B = i(!1), a = i(!1), N = i(null), h = i(!1), s = i(!1), p = i(null), _ = i(!1), [V, u] = fe(d), m = c >= 0 ? g[c] : void 0, k = m?.audioUrl, S = de(
|
|
74
|
+
() => [...m?.audioSegments ?? []].sort(
|
|
75
|
+
(e, l) => e.segment_index - l.segment_index
|
|
70
76
|
),
|
|
71
|
-
[
|
|
72
|
-
),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
[m?.audioSegments]
|
|
78
|
+
), P = `${c}:${m?.audioKey ?? "none"}`;
|
|
79
|
+
R(() => {
|
|
80
|
+
Z.current = m;
|
|
81
|
+
}, [m]), R(() => {
|
|
82
|
+
E.current = S;
|
|
83
|
+
}, [S]), R(() => {
|
|
84
|
+
const e = m?.audioUrl, l = c >= 0 ? g[c + 1]?.audioUrl : void 0;
|
|
85
|
+
Q(e), Q(l);
|
|
86
|
+
}, [g, m?.audioUrl, c]);
|
|
87
|
+
const t = o(
|
|
82
88
|
(e) => {
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
B.current !== e && (B.current = e, F?.(e));
|
|
90
|
+
},
|
|
91
|
+
[F]
|
|
92
|
+
), H = o((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), $ = o(() => {
|
|
93
|
+
const e = f.current;
|
|
94
|
+
return e == null || e <= 0 ? 0 : E.current.slice(0, e).reduce(
|
|
95
|
+
(l, n) => l + Math.max(Number(n.duration_ms ?? 0), 0),
|
|
96
|
+
0
|
|
97
|
+
) / 1e3;
|
|
98
|
+
}, []), M = o(() => {
|
|
99
|
+
const e = y.current;
|
|
100
|
+
e && (s.current = !1, a.current = !1, N.current = null, p.current = null, h.current = !1, _.current = !1, e.pause(), e.removeAttribute("src"), e.load(), x.current = null, j.current = 0, f.current = null, u(!1), t(!1));
|
|
101
|
+
}, [t]), b = o(
|
|
102
|
+
(e) => {
|
|
103
|
+
const l = y.current;
|
|
104
|
+
if (!l)
|
|
85
105
|
return !1;
|
|
86
|
-
const
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
}).catch((
|
|
90
|
-
|
|
106
|
+
const n = l.play();
|
|
107
|
+
return n && typeof n.then == "function" && n.then(() => {
|
|
108
|
+
s.current = !1, _.current = !1;
|
|
109
|
+
}).catch((C) => {
|
|
110
|
+
u(!1);
|
|
91
111
|
}), !0;
|
|
92
112
|
},
|
|
93
|
-
[
|
|
94
|
-
),
|
|
95
|
-
(e,
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
113
|
+
[c]
|
|
114
|
+
), A = o(
|
|
115
|
+
(e, l) => {
|
|
116
|
+
const n = y.current, C = E.current[e];
|
|
117
|
+
if (!n || !C)
|
|
98
118
|
return !1;
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
119
|
+
const w = H(C.audio_data);
|
|
120
|
+
j.current = e, f.current = null, h.current = !1, _.current = !0;
|
|
121
|
+
const W = d && !a.current;
|
|
122
|
+
s.current = W, t(!1);
|
|
123
|
+
const O = x.current !== w;
|
|
124
|
+
return N.current = "segment", O && (n.pause(), n.removeAttribute("src"), n.load(), x.current = w, n.src = w, n.load()), p.current = 0, n.readyState > 0 && (n.currentTime = 0, p.current = null), W ? O ? !0 : b(`start-segment:${l}`) : (s.current = !1, _.current = !1, n.pause(), u(!1), !0);
|
|
125
|
+
},
|
|
126
|
+
[d, H, b, t]
|
|
127
|
+
), U = o(
|
|
128
|
+
(e) => {
|
|
129
|
+
s.current = !1, h.current = !1, _.current = !1, u(!1), t(!1), c >= 0 && K?.(c);
|
|
103
130
|
},
|
|
104
|
-
[
|
|
105
|
-
),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (c) {
|
|
110
|
-
x(e, "ended");
|
|
131
|
+
[c, K, t]
|
|
132
|
+
), z = o(() => {
|
|
133
|
+
const e = j.current + 1, l = E.current, n = l[e], C = Z.current, w = l.some((W) => W.is_final);
|
|
134
|
+
if (n) {
|
|
135
|
+
A(e, "ended");
|
|
111
136
|
return;
|
|
112
137
|
}
|
|
113
|
-
if (
|
|
114
|
-
|
|
138
|
+
if (C?.isAudioStreaming || !w) {
|
|
139
|
+
j.current = e, f.current = e, h.current = !0, s.current = d, u(!1), t(!0);
|
|
115
140
|
return;
|
|
116
141
|
}
|
|
117
|
-
|
|
118
|
-
}, [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
E,
|
|
122
|
-
x
|
|
123
|
-
]);
|
|
124
|
-
v(() => {
|
|
125
|
-
if (F.current === V)
|
|
142
|
+
U("segments-completed");
|
|
143
|
+
}, [d, U, A, t]);
|
|
144
|
+
R(() => {
|
|
145
|
+
if (L.current === P)
|
|
126
146
|
return;
|
|
127
|
-
|
|
128
|
-
const e =
|
|
129
|
-
e && (e.pause(), e.removeAttribute("src"), e.load(),
|
|
147
|
+
L.current = P, j.current = 0, f.current = null, h.current = !1, a.current = !1, s.current = !1, _.current = !1, N.current = null, x.current = null, t(!1);
|
|
148
|
+
const e = y.current;
|
|
149
|
+
e && (e.pause(), e.removeAttribute("src"), e.load(), u(!1));
|
|
130
150
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
c,
|
|
152
|
+
P,
|
|
153
|
+
S.length,
|
|
154
|
+
k,
|
|
155
|
+
t
|
|
156
|
+
]), R(() => {
|
|
157
|
+
const e = y.current;
|
|
137
158
|
if (e) {
|
|
138
|
-
if (!
|
|
139
|
-
|
|
159
|
+
if (!m) {
|
|
160
|
+
M();
|
|
140
161
|
return;
|
|
141
162
|
}
|
|
142
|
-
if (
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
|
|
163
|
+
if (k) {
|
|
164
|
+
const l = x.current !== k, n = d && !a.current;
|
|
165
|
+
if (N.current === "segment" && !!x.current && f.current === null) {
|
|
166
|
+
if (!n) {
|
|
167
|
+
s.current = !1, e.pause(), u(!1);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
e.paused && (s.current = !0, b("keep-segment-source"));
|
|
146
171
|
return;
|
|
147
172
|
}
|
|
148
|
-
|
|
173
|
+
if (l) {
|
|
174
|
+
const w = f.current !== null ? $() : 0;
|
|
175
|
+
e.pause(), e.removeAttribute("src"), e.load(), x.current = k, N.current = "url", e.src = k, e.load(), p.current = w, e.readyState > 0 && (e.currentTime = w, p.current = null);
|
|
176
|
+
}
|
|
177
|
+
if (s.current = n, h.current = !1, _.current = !1, t(!1), !n) {
|
|
178
|
+
s.current = !1, e.pause(), u(!1);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
l || b("sync-url");
|
|
149
182
|
return;
|
|
150
183
|
}
|
|
151
184
|
if (f.current !== null) {
|
|
152
|
-
if (f.current <
|
|
153
|
-
|
|
185
|
+
if (f.current < S.length) {
|
|
186
|
+
if (a.current) {
|
|
187
|
+
u(!1), t(!1);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
A(f.current, "wait-resume");
|
|
154
191
|
return;
|
|
155
192
|
}
|
|
156
|
-
|
|
193
|
+
h.current = !0, s.current = d && !a.current, u(!1), t(!a.current);
|
|
157
194
|
return;
|
|
158
195
|
}
|
|
159
|
-
if (!
|
|
160
|
-
if (
|
|
161
|
-
f.current =
|
|
196
|
+
if (!S.length) {
|
|
197
|
+
if (m.isAudioStreaming) {
|
|
198
|
+
f.current = j.current, h.current = !0, s.current = d && !a.current, u(!1), t(!a.current);
|
|
162
199
|
return;
|
|
163
200
|
}
|
|
164
|
-
|
|
201
|
+
M();
|
|
165
202
|
return;
|
|
166
203
|
}
|
|
167
|
-
if (!
|
|
168
|
-
|
|
204
|
+
if (!x.current) {
|
|
205
|
+
A(
|
|
169
206
|
Math.min(
|
|
170
|
-
|
|
171
|
-
|
|
207
|
+
j.current,
|
|
208
|
+
S.length - 1
|
|
172
209
|
),
|
|
173
210
|
"effect-init"
|
|
174
211
|
);
|
|
175
212
|
return;
|
|
176
213
|
}
|
|
177
|
-
if (!
|
|
178
|
-
|
|
214
|
+
if (!d || a.current) {
|
|
215
|
+
s.current = !1, e.pause(), u(!1);
|
|
179
216
|
return;
|
|
180
217
|
}
|
|
181
|
-
e.paused && (
|
|
218
|
+
e.paused && (s.current = !0, b("sync-paused-retry"));
|
|
182
219
|
}
|
|
183
220
|
}, [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
g,
|
|
187
|
-
j,
|
|
188
|
-
s,
|
|
221
|
+
m,
|
|
222
|
+
c,
|
|
189
223
|
S,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, [t
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
224
|
+
k,
|
|
225
|
+
d,
|
|
226
|
+
M,
|
|
227
|
+
A,
|
|
228
|
+
b,
|
|
229
|
+
$,
|
|
230
|
+
t
|
|
231
|
+
]), R(() => M, [M]);
|
|
232
|
+
const ue = o(() => {
|
|
233
|
+
u(!0), t(!1);
|
|
234
|
+
}, [t]), le = o(() => {
|
|
235
|
+
h.current || _.current || u(!1);
|
|
236
|
+
}, [c]), ce = o(() => {
|
|
237
|
+
const e = y.current;
|
|
238
|
+
e && p.current !== null && (e.currentTime = p.current, p.current = null), !(!s.current || !d) && b("canplay");
|
|
239
|
+
}, [c, d, b]), ae = o(() => {
|
|
240
|
+
const e = y.current;
|
|
241
|
+
e && p.current !== null && (e.currentTime = p.current, p.current = null);
|
|
242
|
+
}, [c]), ie = o(() => {
|
|
243
|
+
const e = N.current === "url" || E.current.length === 0;
|
|
244
|
+
if (_.current = !1, e) {
|
|
245
|
+
U("url-ended");
|
|
206
246
|
return;
|
|
207
247
|
}
|
|
208
|
-
|
|
209
|
-
}, [
|
|
210
|
-
|
|
248
|
+
z();
|
|
249
|
+
}, [U, z]), oe = o(() => {
|
|
250
|
+
u(!1), t(!1);
|
|
211
251
|
}, [t]);
|
|
212
|
-
return /* @__PURE__ */ r.jsxs("div", { className:
|
|
252
|
+
return /* @__PURE__ */ r.jsxs("div", { className: G("slide-player", v), ...se, children: [
|
|
213
253
|
/* @__PURE__ */ r.jsx(
|
|
214
254
|
"audio",
|
|
215
255
|
{
|
|
216
|
-
ref:
|
|
217
|
-
preload: "
|
|
256
|
+
ref: y,
|
|
257
|
+
preload: "auto",
|
|
218
258
|
playsInline: !0,
|
|
219
|
-
onLoadedMetadata:
|
|
220
|
-
onCanPlay:
|
|
221
|
-
onPlay:
|
|
222
|
-
onPause:
|
|
223
|
-
onEnded:
|
|
224
|
-
onError:
|
|
259
|
+
onLoadedMetadata: ae,
|
|
260
|
+
onCanPlay: ce,
|
|
261
|
+
onPlay: ue,
|
|
262
|
+
onPause: le,
|
|
263
|
+
onEnded: ie,
|
|
264
|
+
onError: oe
|
|
225
265
|
}
|
|
226
266
|
),
|
|
227
|
-
|
|
267
|
+
ne ? /* @__PURE__ */ r.jsxs("div", { className: "slide-player__controls", children: [
|
|
228
268
|
/* @__PURE__ */ r.jsxs("div", { className: "slide-player__group", children: [
|
|
229
269
|
/* @__PURE__ */ r.jsx("button", { "aria-label": "More options", className: "hidden", type: "button", children: /* @__PURE__ */ r.jsx(
|
|
230
|
-
|
|
270
|
+
me,
|
|
231
271
|
{
|
|
232
272
|
className: "slide-player__icon",
|
|
233
273
|
strokeWidth: 2.25
|
|
234
274
|
}
|
|
235
275
|
) }),
|
|
236
|
-
/* @__PURE__ */ r.jsx("button", { "aria-label": "Volume", className: "hidden", type: "button", children: /* @__PURE__ */ r.jsx(
|
|
276
|
+
/* @__PURE__ */ r.jsx("button", { "aria-label": "Volume", className: "hidden", type: "button", children: /* @__PURE__ */ r.jsx(pe, { className: "slide-player__icon", strokeWidth: 2.25 }) }),
|
|
237
277
|
/* @__PURE__ */ r.jsx(
|
|
238
278
|
"button",
|
|
239
279
|
{
|
|
240
280
|
"aria-label": "Rewind",
|
|
241
281
|
className: "slide-player__action",
|
|
242
|
-
disabled:
|
|
243
|
-
onClick:
|
|
282
|
+
disabled: re,
|
|
283
|
+
onClick: X,
|
|
244
284
|
type: "button",
|
|
245
|
-
children: /* @__PURE__ */ r.jsx(
|
|
285
|
+
children: /* @__PURE__ */ r.jsx(he, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
246
286
|
}
|
|
247
287
|
),
|
|
248
288
|
/* @__PURE__ */ r.jsx(
|
|
249
289
|
"button",
|
|
250
290
|
{
|
|
251
|
-
"aria-label":
|
|
291
|
+
"aria-label": V ? "Pause" : "Play",
|
|
252
292
|
className: "slide-player__toggle",
|
|
253
293
|
onClick: () => {
|
|
254
|
-
const e =
|
|
255
|
-
if (!(!e || !
|
|
294
|
+
const e = y.current;
|
|
295
|
+
if (!(!e || !m)) {
|
|
256
296
|
if (f.current !== null) {
|
|
257
|
-
if (
|
|
258
|
-
|
|
297
|
+
if (V) {
|
|
298
|
+
s.current = !1, a.current = !0, f.current = null, h.current = !1, u(!1), t(!1), e.pause();
|
|
259
299
|
return;
|
|
260
300
|
}
|
|
261
|
-
|
|
301
|
+
T?.(), a.current = !1, s.current = !0, t(!0);
|
|
262
302
|
return;
|
|
263
303
|
}
|
|
264
|
-
if (!e.src &&
|
|
265
|
-
|
|
304
|
+
if (!e.src && S.length > 0) {
|
|
305
|
+
T?.(), a.current = !1, A(
|
|
266
306
|
Math.min(
|
|
267
|
-
|
|
268
|
-
|
|
307
|
+
j.current,
|
|
308
|
+
S.length - 1
|
|
269
309
|
),
|
|
270
310
|
"toggle"
|
|
271
311
|
);
|
|
272
312
|
return;
|
|
273
313
|
}
|
|
274
314
|
if (e.paused) {
|
|
275
|
-
|
|
315
|
+
T?.(), a.current = !1, s.current = !0, b("toggle-resume");
|
|
276
316
|
return;
|
|
277
317
|
}
|
|
278
|
-
|
|
318
|
+
s.current = !1, a.current = !0, e.pause();
|
|
279
319
|
}
|
|
280
320
|
},
|
|
281
321
|
type: "button",
|
|
282
|
-
children:
|
|
322
|
+
children: V ? /* @__PURE__ */ r.jsx(Se, {}) : /* @__PURE__ */ r.jsx(be, {})
|
|
283
323
|
}
|
|
284
324
|
),
|
|
285
325
|
/* @__PURE__ */ r.jsx(
|
|
@@ -287,10 +327,10 @@ const oe = () => /* @__PURE__ */ r.jsxs(
|
|
|
287
327
|
{
|
|
288
328
|
"aria-label": "Forward",
|
|
289
329
|
className: "slide-player__action",
|
|
290
|
-
disabled:
|
|
291
|
-
onClick:
|
|
330
|
+
disabled: te,
|
|
331
|
+
onClick: Y,
|
|
292
332
|
type: "button",
|
|
293
|
-
children: /* @__PURE__ */ r.jsx(
|
|
333
|
+
children: /* @__PURE__ */ r.jsx(ge, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
294
334
|
}
|
|
295
335
|
),
|
|
296
336
|
/* @__PURE__ */ r.jsx(
|
|
@@ -298,9 +338,9 @@ const oe = () => /* @__PURE__ */ r.jsxs(
|
|
|
298
338
|
{
|
|
299
339
|
"aria-label": "Fullscreen",
|
|
300
340
|
className: "hidden",
|
|
301
|
-
onClick:
|
|
341
|
+
onClick: q,
|
|
302
342
|
type: "button",
|
|
303
|
-
children: /* @__PURE__ */ r.jsx(
|
|
343
|
+
children: /* @__PURE__ */ r.jsx(ye, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
304
344
|
}
|
|
305
345
|
)
|
|
306
346
|
] }),
|
|
@@ -309,20 +349,20 @@ const oe = () => /* @__PURE__ */ r.jsxs(
|
|
|
309
349
|
"button",
|
|
310
350
|
{
|
|
311
351
|
"aria-label": "Notes",
|
|
312
|
-
className:
|
|
352
|
+
className: G(
|
|
313
353
|
"slide-player__action",
|
|
314
|
-
|
|
354
|
+
ee && "slide-player__action--active"
|
|
315
355
|
),
|
|
316
|
-
disabled: !
|
|
317
|
-
onClick:
|
|
356
|
+
disabled: !I,
|
|
357
|
+
onClick: D,
|
|
318
358
|
type: "button",
|
|
319
|
-
children: /* @__PURE__ */ r.jsx(
|
|
359
|
+
children: /* @__PURE__ */ r.jsx(_e, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
320
360
|
}
|
|
321
361
|
) })
|
|
322
362
|
] }) : null
|
|
323
363
|
] });
|
|
324
364
|
};
|
|
325
365
|
export {
|
|
326
|
-
|
|
366
|
+
Me as default
|
|
327
367
|
};
|
|
328
368
|
//# sourceMappingURL=Player.es.js.map
|