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.
Files changed (39) hide show
  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 +1 -1
  2. 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
  3. 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
  4. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +1 -1
  5. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +1 -1
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
  17. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
  18. package/dist/_virtual/index.cjs10.js +1 -1
  19. package/dist/_virtual/index.cjs4.js +1 -1
  20. package/dist/_virtual/index.cjs5.js +1 -1
  21. package/dist/_virtual/index.cjs6.js +1 -1
  22. package/dist/_virtual/index.cjs9.js +1 -1
  23. package/dist/_virtual/index.es10.js +2 -2
  24. package/dist/_virtual/index.es4.js +4 -4
  25. package/dist/_virtual/index.es5.js +4 -4
  26. package/dist/_virtual/index.es6.js +5 -5
  27. package/dist/_virtual/index.es9.js +2 -2
  28. package/dist/components/ContentRender/plugins/CustomVariable.cjs.js +1 -1
  29. package/dist/components/ContentRender/plugins/CustomVariable.cjs.js.map +1 -1
  30. package/dist/components/ContentRender/plugins/CustomVariable.es.js +68 -64
  31. package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
  32. package/dist/components/Slide/Slide.cjs.js +1 -1
  33. package/dist/components/Slide/Slide.cjs.js.map +1 -1
  34. package/dist/components/Slide/Slide.es.js +174 -174
  35. package/dist/components/Slide/Slide.es.js.map +1 -1
  36. package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
  37. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  38. package/dist/markdown-flow-ui-lib.css +1 -1
  39. 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 Ue, useRef as g, useMemo as L, useState as y, useCallback as i, useEffect as h } 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
- import ge from "../ContentRender/IframeSandbox.es.js";
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 We, getInteractionDefaultSelectedValues as Ye } from "../../lib/interaction-defaults.es.js";
10
- import Je from "./Player.es.js";
11
- import Qe from "./useSlide.es.js";
12
- import Xe from "./useWakePlayerFromIframe.es.js";
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 Ze = 1e3, ye = Ue(
14
+ const et = 1e3, we = Ve(
15
15
  ({
16
16
  content: b,
17
17
  title: _,
18
- defaultButtonText: c,
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
- Ge,
29
+ We,
30
30
  {
31
31
  content: b,
32
- defaultButtonText: c,
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
- ye.displayName = "InteractionOverlayCard";
48
- const et = (b, _) => b.length === _.length && b.every((c, j) => {
47
+ we.displayName = "InteractionOverlayCard";
48
+ const tt = (b, _) => b.length === _.length && b.every((u, j) => {
49
49
  const w = _[j];
50
- return c.sequence_number === w?.sequence_number && c.type === w?.type && c.content === w?.content;
51
- }), ht = ({
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: c = !1,
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: se,
63
- className: we,
64
- onPointerDown: le,
65
- ...Ie
62
+ onStepChange: oe,
63
+ className: Ie,
64
+ onPointerDown: se,
65
+ ...Se
66
66
  }) => {
67
- const X = g(null), Z = g(null), ie = g(null), C = g(null), q = g(null), F = g(null), ae = g([]), D = g(!1), {
68
- currentElementList: d,
69
- stepElementLists: ce,
70
- slideElementList: ee,
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: ue,
72
+ audioList: ce,
73
73
  currentAudioSequenceIndexes: k,
74
74
  currentInteractionElement: M,
75
- canGoPrev: Se,
75
+ canGoPrev: be,
76
76
  canGoNext: I,
77
- handlePrev: de,
78
- handleNext: v
79
- } = Qe(b), fe = L(() => {
77
+ handlePrev: ue,
78
+ handleNext: g
79
+ } = Xe(b), de = O(() => {
80
80
  if (!(x < 0))
81
- return ee[x];
82
- }, [x, ee]), me = ee.filter(
81
+ return K[x];
82
+ }, [x, K]), _e = K.filter(
83
83
  (e) => e.is_renderable !== !1
84
- ).length === 1, u = _ && (me || ue.length > 0 || !!M), [pe, H] = y(!0), [K, te] = y(!1), [be, ne] = y(!1), [_e] = y(() => Ve()), Te = _e || be, [Pe, U] = y(-1), [V, z] = y(-1), [n, re] = y(), [G, W] = y(!1), E = u && (c || pe), S = i(() => {
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
- }, []), f = i(() => {
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(), f(), U(-1), z(-1), re(void 0), W(!1);
92
- }, [A, f]), Y = i(() => {
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 : (z(0), U(e), !0);
95
- }, [k]), J = i(() => {
96
- f(), W(!1), !Y() && I && v();
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
- f,
100
- v,
101
- Y
102
- ]), m = i(
103
- (e = K) => {
104
- u && (H(!0), S(), !(c || !e || R <= 0) && (C.current = window.setTimeout(() => {
105
- H(!1), C.current = null;
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
- K,
111
- c,
110
+ V,
111
+ u,
112
112
  R,
113
- u
113
+ d
114
114
  ]
115
115
  );
116
116
  h(() => () => {
117
- A(), S(), f();
117
+ A(), S(), m();
118
118
  }, [
119
119
  A,
120
- f,
120
+ m,
121
121
  S
122
122
  ]), h(() => (B?.(E), () => {
123
123
  B?.(!1);
124
124
  }), [B, E]), h(() => {
125
- se?.(fe, x);
126
- }, [x, fe, se]), h(() => {
127
- if (!u) {
128
- S(), H(!1);
125
+ oe?.(de, x);
126
+ }, [x, de, oe]), h(() => {
127
+ if (!d) {
128
+ S(), U(!1);
129
129
  return;
130
130
  }
131
- if (c) {
132
- S(), H(!0);
131
+ if (u) {
132
+ S(), U(!0);
133
133
  return;
134
134
  }
135
- K || m(!0);
135
+ V || a(!0);
136
136
  }, [
137
137
  S,
138
- K,
139
- c,
138
+ V,
140
139
  u,
141
- m
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 && ze(r.data) && u && (te(!0), m(!0));
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
- }, [u, m]), Xe({
152
- sectionRef: X,
153
- enabled: u,
151
+ }, [d, a]), Ze({
152
+ sectionRef: ee,
153
+ enabled: d,
154
154
  onWake: () => {
155
- te(!0), m(!0);
155
+ L(!0), a(!0);
156
156
  }
157
157
  }), h(() => {
158
- if (N(), !(d.length === 0 && !M)) {
158
+ if (N(), !(f.length === 0 && !M)) {
159
159
  if (M) {
160
- re(M), W(!0);
160
+ re(M), J(!0);
161
161
  return;
162
162
  }
163
- if (!Y() && I)
163
+ if (!Q() && I)
164
164
  return q.current = window.setTimeout(() => {
165
- q.current = null, v();
166
- }, Ze), () => {
165
+ q.current = null, g();
166
+ }, et), () => {
167
167
  A();
168
168
  };
169
169
  }
170
170
  }, [
171
171
  I,
172
172
  A,
173
- d,
173
+ f,
174
174
  M,
175
- v,
175
+ g,
176
176
  N,
177
- Y
177
+ Q
178
178
  ]);
179
- const he = L(() => n ? We(
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]), Ee = L(() => {
183
+ ) : {}, [n, P]), Ne = O(() => {
184
184
  if (n)
185
- return Ye(
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]), oe = !!n?.user_input?.trim(), Ae = !!n?.readonly || oe, Ne = i(
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((a) => !a || !s ? a : {
198
- ...a,
197
+ re((c) => !c || !s ? c : {
198
+ ...c,
199
199
  user_input: s
200
- }), $?.(e, n), J();
200
+ }), D?.(e, n), X();
201
201
  },
202
- [n, J, $]
202
+ [n, X, D]
203
203
  );
204
204
  h(() => {
205
- if (f(), !(!G || !oe))
205
+ if (m(), !(!Y || !xe))
206
206
  return F.current = window.setTimeout(() => {
207
- F.current = null, J();
207
+ F.current = null, X();
208
208
  }, 2e3), () => {
209
- f();
209
+ m();
210
210
  };
211
211
  }, [
212
- f,
213
- J,
214
- oe,
215
- G
212
+ m,
213
+ X,
214
+ Y,
215
+ xe
216
216
  ]);
217
- const je = (e) => e ? e.type === "slot" ? /* @__PURE__ */ t.jsx(t.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ t.jsx(
218
- ge,
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
- ge,
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, Re = (e = [], r = !1) => {
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, a = e.reduce(
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 === a ? ie : null,
249
+ ref: r && l === c ? le : null,
250
250
  "aria-hidden": p || void 0,
251
- className: O(
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: je(o)
256
+ children: Re(o)
257
257
  },
258
258
  o.sequence_number ?? `${o.type}-${l}`
259
259
  );
260
260
  }) });
261
- }, { mountedStepStates: Be, currentMountedStateIndex: Ce } = L(() => {
261
+ }, { mountedStepStates: Ce, currentMountedStateIndex: qe } = O(() => {
262
262
  const e = [], r = /* @__PURE__ */ new Map();
263
- return ce.forEach((s, a) => {
263
+ return ae.forEach((s, c) => {
264
264
  const o = e.findIndex(
265
- (l) => et(
265
+ (l) => tt(
266
266
  l.elementList,
267
267
  s
268
268
  )
269
269
  );
270
270
  if (o >= 0) {
271
- e[o]?.sourceStepIndexes.push(a), r.set(a, o);
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: [a]
277
- }), r.set(a, e.length - 1);
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, ce]), qe = () => {
283
- const e = X.current;
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
- }, xe = i(() => {
294
- const e = Z.current;
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
- }, []), Fe = i(() => {
300
- D.current = !0, ne(!0), N(), de();
301
- }, [de, N]), ke = i(() => {
302
- D.current = !0, ne(!0), N(), v();
303
- }, [v, N]), Me = i(
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 (V < 0 || k[V] !== e)
305
+ if (G < 0 || k[G] !== e)
306
306
  return;
307
- const r = V + 1, s = k[r];
307
+ const r = G + 1, s = k[r];
308
308
  if (typeof s == "number") {
309
- z(r), U(s);
309
+ W(r), z(s);
310
310
  return;
311
311
  }
312
- U(-1), z(-1), I && v();
312
+ z(-1), W(-1), I && g();
313
313
  },
314
314
  [
315
315
  I,
316
316
  k,
317
- V,
318
- v
317
+ G,
318
+ g
319
319
  ]
320
- ), Le = i(() => {
321
- n && W((e) => !e);
320
+ ), Oe = i(() => {
321
+ n && J((e) => !e);
322
322
  }, [n]), ve = i(
323
323
  (e) => {
324
- e.stopPropagation(), E && m(!0);
324
+ e.stopPropagation(), E && a(!0);
325
325
  },
326
- [pe, m]
327
- ), Oe = i(
326
+ [fe, a]
327
+ ), $e = i(
328
328
  (e) => {
329
- le?.(e), te(!0), m(!0);
329
+ se?.(e), L(!0), a(!0);
330
330
  },
331
- [le, m]
332
- ), $e = !!n && G, Q = L(
333
- () => d.map(
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
- [d]
336
+ [f]
337
337
  );
338
338
  return h(() => {
339
- const e = ae.current, a = (e.length > 0 && e.length < Q.length && e.every((l, p) => l === Q[p]) ? d.slice(e.length) : []).some(
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 (ae.current = Q, !a)
342
+ if (ie.current = Z, !c)
343
343
  return;
344
344
  const o = window.requestAnimationFrame(() => {
345
- const l = Z.current, p = ie.current;
345
+ const l = te.current, p = le.current;
346
346
  if (!l || !p)
347
347
  return;
348
- const De = l.getBoundingClientRect(), He = p.getBoundingClientRect(), Ke = l.scrollTop + (He.top - De.top);
348
+ const He = l.getBoundingClientRect(), Ke = p.getBoundingClientRect(), Ue = l.scrollTop + (Ke.top - He.top);
349
349
  l.scrollTo({
350
- top: Math.max(Ke, 0),
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
- }, [d, Q]), h(() => {
358
- if (!D.current || (D.current = !1, d.length === 0))
357
+ }, [f, Z]), h(() => {
358
+ if (!H.current || (H.current = !1, f.length === 0))
359
359
  return;
360
360
  const e = window.requestAnimationFrame(() => {
361
- xe();
361
+ ge();
362
362
  });
363
363
  return () => {
364
364
  window.cancelAnimationFrame(e);
365
365
  };
366
- }, [d, xe]), /* @__PURE__ */ t.jsxs(
366
+ }, [f, ge]), /* @__PURE__ */ t.jsxs(
367
367
  "section",
368
368
  {
369
- ref: X,
370
- className: O("relative h-full w-full", we),
371
- onPointerDown: Oe,
372
- ...Ie,
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: O(
377
+ className: $(
378
378
  "h-full min-h-0 w-full",
379
- me ? "slide-content--single" : "grid gap-4"
379
+ _e ? "slide-content--single" : "grid gap-4"
380
380
  ),
381
- children: d.length > 0 ? /* @__PURE__ */ t.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ t.jsx("div", { ref: Z, className: "slide-stage__layer w-full", children: Be.map(
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 === Ce;
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: Re(
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
- $e ? /* @__PURE__ */ t.jsx(
401
+ De ? /* @__PURE__ */ t.jsx(
402
402
  "div",
403
403
  {
404
- className: O(
404
+ className: $(
405
405
  "slide-interaction-overlay",
406
- E && u ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
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
- ye,
411
+ we,
412
412
  {
413
413
  content: String(n?.content ?? ""),
414
- defaultButtonText: he.buttonText ?? "",
415
- defaultInputText: he.inputText ?? "",
416
- defaultSelectedValues: Ee,
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: Ne,
421
- readonly: Ae,
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
- u ? /* @__PURE__ */ t.jsx(
428
- Je,
427
+ d ? /* @__PURE__ */ t.jsx(
428
+ Qe,
429
429
  {
430
- audioList: ue,
431
- className: O(
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: Pe,
437
- defaultPlaying: Te,
436
+ currentAudioIndex: Ae,
437
+ defaultPlaying: Ee,
438
438
  hasInteraction: !!n,
439
- isInteractionOpen: G,
439
+ isInteractionOpen: Y,
440
440
  nextDisabled: !I,
441
- onEnded: Me,
442
- onFullscreen: qe,
443
- onInteractionToggle: Le,
441
+ onEnded: Le,
442
+ onFullscreen: Fe,
443
+ onInteractionToggle: Oe,
444
444
  onPlayRequest: () => ne(!0),
445
- onNext: ke,
446
- onPrev: Fe,
447
- prevDisabled: !Se,
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
- ht as default
456
+ xt as default
457
457
  };
458
458
  //# sourceMappingURL=Slide.es.js.map