speakid-build-a-sentence 1.0.19 → 1.0.20

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.
@@ -1,63 +1,63 @@
1
- import { jsx as a, jsxs as m } from "react/jsx-runtime";
2
- import { useState as c, useCallback as pe, useRef as be, useEffect as J, Component as Ue } from "react";
3
- const qe = `
4
- @keyframes magic-sentence-spin {
1
+ import { jsx as l, jsxs as y } from "react/jsx-runtime";
2
+ import { useState as p, useCallback as we, useRef as Z, useEffect as J, Component as sn } from "react";
3
+ const dn = `
4
+ @keyframes spin {
5
5
  from { transform: rotate(0deg); }
6
6
  to { transform: rotate(360deg); }
7
7
  }
8
8
 
9
- @keyframes magic-sentence-pulse {
9
+ @keyframes pulse {
10
10
  0%, 100% { transform: scale(1); }
11
11
  50% { transform: scale(1.05); }
12
12
  }
13
13
 
14
- @keyframes magic-sentence-shake {
14
+ @keyframes shake {
15
15
  0%, 100% { transform: translateX(0); }
16
16
  25% { transform: translateX(-5px); }
17
17
  75% { transform: translateX(5px); }
18
18
  }
19
19
 
20
- @keyframes magic-sentence-slideIn {
20
+ @keyframes slideIn {
21
21
  from { transform: translateY(-20px); opacity: 0; }
22
22
  to { transform: translateY(0); opacity: 1; }
23
23
  }
24
24
 
25
- @keyframes magic-sentence-bounce {
25
+ @keyframes bounce {
26
26
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
27
27
  40%, 43% { transform: translate3d(0, -8px, 0); }
28
28
  70% { transform: translate3d(0, -4px, 0); }
29
29
  90% { transform: translate3d(0, -2px, 0); }
30
30
  }
31
31
 
32
- @keyframes magic-sentence-glow {
32
+ @keyframes glow {
33
33
  0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
34
34
  50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 0 30px rgba(76, 175, 80, 0.6); }
35
35
  }
36
36
  `;
37
- if (typeof document < "u" && !document.getElementById("magic-sentence-keyframes")) {
38
- const g = document.createElement("style");
39
- g.id = "magic-sentence-keyframes", g.innerHTML = qe, document.head.appendChild(g);
37
+ if (typeof document < "u" && !document.getElementById("game-keyframes")) {
38
+ const w = document.createElement("style");
39
+ w.id = "game-keyframes", w.innerHTML = dn, document.head.appendChild(w);
40
40
  }
41
- const Se = {
41
+ const Te = {
42
42
  spin: {
43
- animation: "magic-sentence-spin 1.4s linear infinite"
43
+ animation: "spin 1.4s linear infinite"
44
44
  },
45
45
  pulse: {
46
- animation: "magic-sentence-pulse 0.6s ease-in-out"
46
+ animation: "pulse 0.6s ease-in-out"
47
47
  },
48
48
  shake: {
49
- animation: "magic-sentence-shake 0.4s ease-in-out"
49
+ animation: "shake 0.4s ease-in-out"
50
50
  },
51
51
  slideIn: {
52
- animation: "magic-sentence-slideIn 0.3s ease-out"
52
+ animation: "slideIn 0.3s ease-out"
53
53
  },
54
54
  bounce: {
55
- animation: "magic-sentence-bounce 0.6s ease-in-out"
55
+ animation: "bounce 0.6s ease-in-out"
56
56
  },
57
57
  glow: {
58
- animation: "magic-sentence-glow 1s ease-in-out infinite"
58
+ animation: "glow 1s ease-in-out infinite"
59
59
  }
60
- }, p = {
60
+ }, g = {
61
61
  gmCenterScreen: {
62
62
  position: "relative",
63
63
  zIndex: 1,
@@ -134,20 +134,20 @@ const Se = {
134
134
  fontFamily: '"Geist", system-ui',
135
135
  width: "160px"
136
136
  },
137
- // ✅ Обновлено под стандарты SPEAKID
137
+ // ✅ Обновлено только для качества логотипа (размер как в whats-missing)
138
138
  gmLogoFixed: {
139
139
  position: "absolute",
140
140
  top: "16px",
141
141
  left: "16px",
142
- width: "120px",
143
- zIndex: 30,
142
+ width: "auto",
143
+ zIndex: 10,
144
144
  pointerEvents: "none",
145
145
  background: "transparent",
146
146
  transform: "none",
147
147
  willChange: "auto"
148
148
  },
149
149
  gmLogoImg: {
150
- height: "clamp(28px, 5vw, 40px)",
150
+ height: "28px",
151
151
  width: "auto",
152
152
  background: "transparent",
153
153
  objectFit: "contain",
@@ -157,19 +157,6 @@ const Se = {
157
157
  WebkitFontSmoothing: "antialiased",
158
158
  display: "block"
159
159
  },
160
- gmLogoFallback: {
161
- height: "clamp(28px, 5vw, 40px)",
162
- width: "auto",
163
- background: "transparent",
164
- backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMTAwIDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8dGV4dCB4PSI1MCIgeT0iMjUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIyMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiNlYzRjNDQiIHRleHQtYW5jaG9yPSJtaWRkbGUiPlNQRUFLSUQ8L3RleHQ+Cjwvc3ZnPgo=')",
165
- backgroundSize: "contain",
166
- backgroundRepeat: "no-repeat",
167
- backgroundPosition: "center",
168
- transform: "translateZ(0)",
169
- backfaceVisibility: "hidden",
170
- WebkitFontSmoothing: "antialiased",
171
- display: "block"
172
- },
173
160
  gmReadyWrapper: {
174
161
  display: "flex",
175
162
  flexDirection: "column",
@@ -181,64 +168,62 @@ const Se = {
181
168
  },
182
169
  gmHourglass: {
183
170
  fontSize: "42px",
184
- ...Se.spin
171
+ ...Te.spin
185
172
  },
186
173
  // ===== Анимационные стили =====
187
- ...Se
188
- }, Ye = () => {
189
- const [g, r] = c([]), S = pe((H, I, u) => {
190
- const f = [];
191
- H.trim() || f.push({
174
+ ...Te
175
+ }, an = () => {
176
+ const [w, s] = p([]), v = we((D, R, f) => {
177
+ const b = [];
178
+ D.trim() || b.push({
192
179
  type: "empty",
193
180
  message: "Sentence cannot be empty"
194
- }), H.length > 41 && f.push({
181
+ }), D.length > 41 && b.push({
195
182
  type: "length",
196
- message: `Sentence is too long (${H.length}/41 characters)`
197
- }), H && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(H) && f.push({
183
+ message: `Sentence is too long (${D.length}/41 characters)`
184
+ }), D && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(D) && b.push({
198
185
  type: "characters",
199
186
  message: "Only Latin characters, numbers, spaces and punctuation are allowed"
200
187
  });
201
- const b = u.findIndex((D, V) => V !== I && D.toLowerCase().trim() === H.toLowerCase().trim());
202
- return b !== -1 && f.push({
188
+ const k = f.findIndex((z, _) => _ !== R && z.toLowerCase().trim() === D.toLowerCase().trim());
189
+ return k !== -1 && b.push({
203
190
  type: "duplicate",
204
- message: `Duplicate sentence (same as sentence ${b + 1})`
205
- }), r(f), {
206
- isValid: f.length === 0,
207
- errors: f
191
+ message: `Duplicate sentence (same as sentence ${k + 1})`
192
+ }), s(b), {
193
+ isValid: b.length === 0,
194
+ errors: b
208
195
  };
209
- }, []), ee = pe((H) => {
210
- const I = [];
211
- return H.forEach((u, f) => {
212
- const y = S(u, f, H);
213
- I.push(...y.errors.map((b) => ({
214
- ...b,
215
- message: `Sentence ${f + 1}: ${b.message}`
196
+ }, []), de = we((D) => {
197
+ const R = [];
198
+ return D.forEach((f, b) => {
199
+ const x = v(f, b, D);
200
+ R.push(...x.errors.map((k) => ({
201
+ ...k,
202
+ message: `Sentence ${b + 1}: ${k.message}`
216
203
  })));
217
204
  }), {
218
- isValid: I.length === 0,
219
- errors: I
205
+ isValid: R.length === 0,
206
+ errors: R
220
207
  };
221
- }, [S]), ne = pe(() => {
222
- r([]);
208
+ }, [v]), ae = we(() => {
209
+ s([]);
223
210
  }, []);
224
211
  return {
225
- errors: g,
226
- validateSentence: S,
227
- validateAllSentences: ee,
228
- clearErrors: ne
212
+ errors: w,
213
+ validateSentence: v,
214
+ validateAllSentences: de,
215
+ clearErrors: ae
229
216
  };
230
- }, Ke = (g, r, S) => r && S ? `${g} word "${r}" ${S}` : r ? `${g} word "${r}"` : g, _e = (g, r, S = ["Enter", " "]) => {
231
- S.includes(g.key) && (g.preventDefault(), r());
232
- }, E = (g) => {
233
- const r = document.createElement("div");
234
- r.setAttribute("aria-live", "polite"), r.setAttribute("aria-atomic", "true"), r.style.position = "absolute", r.style.left = "-10000px", r.style.width = "1px", r.style.height = "1px", r.style.overflow = "hidden", document.body.appendChild(r), r.textContent = g, setTimeout(() => {
235
- document.body.removeChild(r);
217
+ }, ln = (w, s, v) => s && v ? `${w} word "${s}" ${v}` : s ? `${w} word "${s}"` : w, cn = (w, s, v = ["Enter", " "]) => {
218
+ v.includes(w.key) && (w.preventDefault(), s());
219
+ }, L = (w) => {
220
+ const s = document.createElement("div");
221
+ s.setAttribute("aria-live", "polite"), s.setAttribute("aria-atomic", "true"), s.style.position = "absolute", s.style.left = "-10000px", s.style.width = "1px", s.style.height = "1px", s.style.overflow = "hidden", document.body.appendChild(s), s.textContent = w, setTimeout(() => {
222
+ document.body.removeChild(s);
236
223
  }, 1e3);
237
- }, en = () => {
238
- const g = document.createElement("style");
239
- g.id = "magic-sentence-reset";
240
- const r = document.getElementById("magic-sentence-reset");
241
- r && r.remove(), g.textContent = `
224
+ }, hn = () => {
225
+ const w = document.createElement("style");
226
+ w.id = "magic-sentence-reset", w.textContent = `
242
227
  #magic-sentence-root, #magic-sentence-root * {
243
228
  box-sizing: border-box;
244
229
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
@@ -255,7 +240,7 @@ const Se = {
255
240
  width: 100% !important;
256
241
  height: 100% !important;
257
242
  overflow: hidden !important;
258
- zoom: 1 !important;
243
+ zoom: 1 !important; /* ✅ защита от подзума */
259
244
  }
260
245
  #root {
261
246
  margin: 0 !important;
@@ -264,11 +249,13 @@ const Se = {
264
249
  height: 100% !important;
265
250
  overflow: hidden !important;
266
251
  }
267
- `, document.head.appendChild(g);
268
- }, nn = (g) => [...g].sort(() => Math.random() - 0.5);
269
- function dn(g = {}) {
270
- const { logoUrl: r, showLogo: S = !0 } = g, ee = be(null), { validateAllSentences: ne, errors: H } = Ye(), I = () => l || window.innerWidth < 768, u = () => l || window.innerWidth < 768 || window.innerWidth >= 320 && window.innerWidth <= 932 && window.innerHeight >= 390 && window.innerHeight <= 932, f = (e = "medium") => {
271
- if (!u())
252
+ `;
253
+ const s = document.getElementById("magic-sentence-reset");
254
+ s && s.remove(), document.head.appendChild(w);
255
+ }, pn = (w) => [...w].sort(() => Math.random() - 0.5);
256
+ function xn(w = {}) {
257
+ const { logoUrl: s, showLogo: v = !0 } = w, de = Z(null), { validateAllSentences: ae, errors: D } = an(), R = () => c || window.innerWidth < 768, f = () => c || window.innerWidth < 768 || window.innerWidth >= 320 && window.innerWidth <= 932 && window.innerHeight >= 390 && window.innerHeight <= 932, b = (e = "medium") => {
258
+ if (!f())
272
259
  return {
273
260
  padding: "12px 24px",
274
261
  fontSize: "16px",
@@ -295,114 +282,146 @@ function dn(g = {}) {
295
282
  };
296
283
  }
297
284
  };
298
- J(() => (en(), () => {
285
+ J(() => (hn(), () => {
299
286
  document.documentElement.style.overflow = "", document.body.style.overflow = "";
300
287
  const e = document.getElementById("magic-sentence-reset");
301
288
  e && e.remove();
302
289
  }), []);
303
- const [y, b] = c("select"), [D, V] = c(null), [ge, he] = c(null), [C, U] = c([]), [T, we] = c(0), [te, ue] = c([]), [k, ie] = c([]), [B, me] = c(20), [Q, q] = c(0), [tn, fe] = c(null), [L, z] = c(null), [d, Y] = c(!1), [oe, We] = c(
290
+ const [x, k] = p("select"), [z, _] = p(null), [fe, me] = p(null), [I, Q] = p([]), [E, xe] = p(0), [le, ye] = p([]), [W, ce] = p([]), [$, be] = p(20), [U, M] = p(0), [gn, We] = p(null), [A, C] = p(null), [a, ee] = p(!1), [ne, te] = p(!1), [he, De] = p(
304
291
  Number(localStorage.getItem("magicSentenceBest")) || 0
305
- ), X = be(null), [W, P] = c({ list: null, index: null, side: null }), [l, ve] = c(!1), [on, re] = c(1), [xe, se] = c(null), [ke, He] = c(!1), [M, Ie] = c(!1), [A, Ce] = c(!1), [G, De] = c(!1), [$, Te] = c(!1), [N, Pe] = c(!1), [j, Re] = c(!1), [O, ze] = c(!1), [F, Ee] = c(!1);
292
+ ), Y = Z(null), Re = Z(null), Se = Z(0), [m, B] = p({ list: null, id: null, side: null }), [c, ze] = p(!1), [Ee, ie] = p(1), [ke, re] = p(null), [Pe, Be] = p(!1), [O, Le] = p(!1), [N, Me] = p(!1), [G, Ae] = p(!1), [X, $e] = p(!1), [j, Oe] = p(!1), [F, Ne] = p(!1), [q, Ge] = p(!1), [V, Xe] = p(!1), [un, je] = p(!1), [wn, Fe] = p(!1);
306
293
  J(() => {
307
294
  const e = () => {
308
- const t = window.innerWidth, n = window.innerHeight, i = t < 768 || t === 926 && n === 428 || t === 932 && n === 430, o = n < 700, w = t === 768 && n === 1024, x = t === 1024 && n === 768, s = t === 820 && n === 1180, h = t === 1180 && n === 820, Z = t === 540 && n === 720, v = t === 720 && n === 540, ce = t === 1024 && n === 1366, Xe = t === 1366 && n === 1024, Je = t >= 1200 && n >= 600 && !i;
309
- if (He(Je), Ie(w), Ce(x), De(s), Te(h), Pe(Z), Re(v), ze(ce), Ee(Xe), ve(i), i)
310
- se(null), re(1);
311
- else if (o)
312
- se(null), re(1);
313
- else {
314
- const Ve = Math.min(1e3, Math.min(t, n) * 0.9);
315
- se(Ve), re(1);
295
+ const t = window.innerWidth, n = window.innerHeight, i = t < 768 || t === 926 && n === 428 || t === 932 && n === 430, r = n < 700, h = t / n > 1.8, u = t === 768 && n === 1024, o = t === 1024 && n === 768, d = t === 820 && n === 1180, T = t === 1180 && n === 820, H = t === 540 && n === 720, se = t === 720 && n === 540, He = t === 1024 && n === 1366, Ie = t === 1366 && n === 1024, Ce = t >= 1200 && n >= 600 && !i;
296
+ Be(Ce), Le(u), Me(o), Ae(d), $e(T), Oe(H), Ne(se), Ge(He), Xe(Ie), Fe(h);
297
+ const on = i && t > n || i || // ✅ ВСЕ мобильные устройства (включая portrait)
298
+ n < 700 || h || // ✅ Широкие экраны
299
+ t === 1366 && n === 766 || t === 1366 && n === 768 || t === 1280 && n === 720 || t === 1440 && n === 900 || u || o || d || T || H || se || He || Ie || Ce;
300
+ if (je(on), ze(i), i)
301
+ re(null), ie(1);
302
+ else if (r)
303
+ re(null), ie(1);
304
+ else if (h) {
305
+ const ue = Math.min(1e3, Math.min(t, n) * 0.9);
306
+ re(ue), ie(0.85);
307
+ } else {
308
+ const ue = Math.min(1e3, Math.min(t, n) * 0.9);
309
+ re(ue), ie(1);
316
310
  }
317
311
  };
318
312
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
319
313
  }, []);
320
- const K = (e, t, n, i) => {
321
- if (d) return;
322
- let o = [...te], w = [...k];
323
- const x = e === "bank" ? o : w, s = t === "bank" ? o : w, h = x.findIndex((ce) => ce.id === n);
324
- if (h === -1) return;
325
- const [Z] = x.splice(h, 1);
326
- let v = i;
327
- e === t && v !== null && v !== void 0 && v > h && (v = v - 1), v == null || v < 0 || v > s.length ? s.push(Z) : s.splice(v, 0, Z), e === "bank" ? o = x : w = x, t === "bank" ? o = s : w = s, ue(o), ie(w);
328
- }, _ = (e, t, n) => {
329
- if (e.preventDefault(), d) {
330
- P({ list: null, index: null, side: null });
314
+ const oe = (e, t, n, i) => {
315
+ if (a) return;
316
+ let r = [...le], h = [...W];
317
+ const u = e === "bank" ? r : h, o = t === "bank" ? r : h, d = u.findIndex((se) => se.id === n);
318
+ if (d === -1) return;
319
+ const [T] = u.splice(d, 1);
320
+ let H = i;
321
+ e === t && H !== null && H !== void 0 && H > d && (H = H - 1), H == null || H < 0 || H > o.length ? o.push(T) : o.splice(H, 0, T), e === "bank" ? r = u : h = u, t === "bank" ? r = o : h = o, ye(r), ce(h);
322
+ }, K = (e, t, n) => {
323
+ if (e.preventDefault(), a) {
324
+ B({ list: null, id: null, side: null });
331
325
  return;
332
326
  }
333
327
  const i = e.dataTransfer.getData("application/x-token") || (() => {
334
- const o = e.dataTransfer.getData("text/plain");
335
- if (!o) return "";
336
- const w = te.some((h) => h.id === o), x = k.some((h) => h.id === o), s = w ? "bank" : x ? "selected" : null;
337
- return s ? JSON.stringify({ from: s, id: o }) : "";
328
+ const r = e.dataTransfer.getData("text/plain");
329
+ if (!r) return "";
330
+ const h = le.some((d) => d.id === r), u = W.some((d) => d.id === r), o = h ? "bank" : u ? "selected" : null;
331
+ return o ? JSON.stringify({ from: o, id: r }) : "";
338
332
  })();
339
333
  if (i) {
340
334
  try {
341
- const o = JSON.parse(i);
342
- if (!o || !o.id || !o.from) return;
343
- K(o.from, t, o.id, n);
335
+ const r = JSON.parse(i);
336
+ if (!r || !r.id || !r.from) return;
337
+ oe(r.from, t, r.id, n);
344
338
  } catch {
345
339
  }
346
- P({ list: null, index: null, side: null });
340
+ B({ list: null, id: null, side: null });
347
341
  }
348
- }, Be = (e) => {
349
- V(e), U(Array(e).fill("")), b("time");
350
- }, Le = (e) => {
351
- he(e), b("type");
352
- }, Me = (e, t) => {
342
+ }, qe = (e) => {
343
+ _(e), Re.current = e, Q(Array(e).fill("")), k("time");
344
+ }, Ve = (e) => {
345
+ me(e), k("type");
346
+ }, Je = (e, t) => {
353
347
  if (t.length > 41 || t && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(t))
354
348
  return;
355
- const i = [...C];
356
- i[e] = t, U(i);
357
- const o = ne(i);
358
- o.isValid || console.warn("Validation errors:", o.errors);
359
- }, Ae = (e) => e.trim().replace(/\s+/g, " "), ye = (e) => e <= 3 ? 20 : e <= 5 ? 18 : e <= 7 ? 16 : e <= 9 ? 14 : 12, Ge = () => {
360
- C.some((t) => t.trim().length === 0) || (U((t) => t.map((n) => Ae(n))), q(0), we(0), fe(null), b("getready"));
349
+ const i = [...I];
350
+ i[e] = t, Q(i);
351
+ const r = ae(i);
352
+ r.isValid || console.warn("Validation errors:", r.errors);
353
+ }, Ue = (e) => e.trim().replace(/\s+/g, " "), ve = (e) => e <= 3 ? 20 : e <= 5 ? 18 : e <= 7 ? 16 : e <= 9 ? 14 : 12, Ye = () => {
354
+ I.some((t) => t.trim().length === 0) || (Q((t) => t.map((n) => Ue(n))), M(0), xe(0), Se.current = 0, We(null), k("getready"));
361
355
  };
362
356
  J(() => {
363
- if (y === "getready") {
364
- const e = setTimeout(() => ae(0), 3e3);
357
+ if (x === "getready") {
358
+ const e = setTimeout(() => pe(0), 3e3);
365
359
  return () => clearTimeout(e);
366
360
  }
367
- }, [y]);
368
- const ae = (e) => {
369
- const t = C[e];
361
+ }, [x]);
362
+ const pe = (e) => {
363
+ const t = I[e];
370
364
  if (!t) return;
371
- const i = nn(
365
+ const i = pn(
372
366
  t.trim().split(/\s+/).filter(Boolean)
373
- ).map((o, w) => ({
374
- id: `${Date.now()}-${e}-${w}-${Math.random().toString(36).slice(2)}`,
375
- text: o
367
+ ).map((r, h) => ({
368
+ id: `${Date.now()}-${e}-${h}-${Math.random().toString(36).slice(2)}`,
369
+ text: r
376
370
  }));
377
- ue(i), ie([]), we(e), me(ge || 20), z(null), Y(!1), b("play");
378
- };
371
+ ye(i), ce([]), xe(e), Se.current = e, be(fe || 20), C(null), ee(!1), te(!1), k("play");
372
+ }, S = Z(null);
379
373
  J(() => {
380
- if (y === "play" && !d)
381
- if (X.current !== null && window.clearTimeout(X.current), B > 0)
382
- X.current = window.setTimeout(() => me((e) => e - 1), 1e3);
374
+ if (x !== "play" || a) {
375
+ S.current !== null && (window.clearTimeout(S.current), S.current = null);
376
+ return;
377
+ }
378
+ const e = I[E];
379
+ if (!e) {
380
+ C(null), S.current !== null && (window.clearTimeout(S.current), S.current = null);
381
+ return;
382
+ }
383
+ if (W.length === 0) {
384
+ C(null), S.current !== null && (window.clearTimeout(S.current), S.current = null);
385
+ return;
386
+ }
387
+ const t = e.trim().split(/\s+/), n = W.map((r) => r.text);
388
+ if (n.length === t.length && n.every((r, h) => r === t[h]))
389
+ C("correct"), ne || (te(!0), M((r) => r + 1), P("correct"), L("Correct! Well done!"));
390
+ else {
391
+ S.current !== null && (window.clearTimeout(S.current), S.current = null);
392
+ const r = t.filter((d) => !n.includes(d)).length, h = n.filter((d) => !t.includes(d)).length, u = t.filter((d, T) => d !== n[T]).length, o = r + h + u;
393
+ C(o === 1 ? "almost" : "wrong"), ne && (te(!1), M((d) => Math.max(0, d - 1)));
394
+ }
395
+ return () => {
396
+ S.current !== null && (window.clearTimeout(S.current), S.current = null);
397
+ };
398
+ }, [x, W, I, E, a, A, ne, z]), J(() => {
399
+ if (x === "play" && !a)
400
+ if (Y.current !== null && window.clearTimeout(Y.current), $ > 0)
401
+ Y.current = window.setTimeout(() => be((e) => e - 1), 1e3);
383
402
  else {
384
- Y(!0);
385
- const t = C[T].trim().split(/\s+/), n = k.map((s) => s.text), i = t.filter((s) => !n.includes(s)).length, o = n.filter((s) => !t.includes(s)).length, w = t.filter((s, h) => s !== n[h]).length, x = i + o + w;
386
- x === 0 ? (z("correct"), R("correct"), E("Correct! Well done!")) : x === 1 ? (z("almost"), R("half"), E("Almost correct! Just one mistake.")) : (z("wrong"), R("wrong"), E("Not quite right. Keep trying!"));
403
+ ee(!0);
404
+ const t = I[E].trim().split(/\s+/), n = W.map((o) => o.text), i = t.filter((o) => !n.includes(o)).length, r = n.filter((o) => !t.includes(o)).length, h = t.filter((o, d) => o !== n[d]).length, u = i + r + h;
405
+ u === 0 ? (C("correct"), ne || (te(!0), M((o) => o + 1)), P("correct"), L("Correct! Well done!")) : u === 1 ? (C("almost"), P("half"), L("Almost correct! Just one mistake.")) : (C("wrong"), P("wrong"), L("Not quite right. Keep trying!"));
387
406
  }
388
407
  return () => {
389
- X.current !== null && window.clearTimeout(X.current);
408
+ Y.current !== null && window.clearTimeout(Y.current);
390
409
  };
391
- }, [y, B, d, C, T, k]);
392
- const $e = (e = !0) => {
393
- if (d && e) {
394
- T + 1 < (D || 0) ? ae(T + 1) : (b("results"), setTimeout(() => de(), 600));
410
+ }, [x, $, a, I, E, W]);
411
+ const Ke = (e = !0) => {
412
+ if (a && e) {
413
+ E + 1 < (z || 0) ? pe(E + 1) : (k("results"), setTimeout(() => ge(), 600));
395
414
  return;
396
415
  }
397
- if (e && !d) {
398
- const n = C[T].trim().split(/\s+/), i = k.map((h) => h.text), o = n.filter((h) => !i.includes(h)).length, w = i.filter((h) => !n.includes(h)).length, x = n.filter((h, Z) => h !== i[Z]).length, s = o + w + x;
399
- s === 0 && B > 0 ? (q((h) => h + 1), z("correct"), R("correct"), E("Correct! Well done!")) : s === 1 ? (q((h) => h + 0.5), z("almost"), R("half"), E("Almost correct! Just one mistake.")) : (z("wrong"), R("wrong"), E("Not quite right. Keep trying!")), T + 1 < (D || 0) ? setTimeout(() => ae(T + 1), 800) : (b("results"), setTimeout(() => de(), 600));
416
+ if (e && !a) {
417
+ const n = I[E].trim().split(/\s+/), i = W.map((d) => d.text), r = n.filter((d) => !i.includes(d)).length, h = i.filter((d) => !n.includes(d)).length, u = n.filter((d, T) => d !== i[T]).length, o = r + h + u;
418
+ o === 0 && $ > 0 ? (M((d) => d + 1), C("correct"), P("correct"), L("Correct! Well done!")) : o === 1 ? (M((d) => d + 0.5), C("almost"), P("half"), L("Almost correct! Just one mistake.")) : (C("wrong"), P("wrong"), L("Not quite right. Keep trying!")), E + 1 < (z || 0) ? setTimeout(() => pe(E + 1), 800) : (k("results"), setTimeout(() => ge(), 600));
400
419
  }
401
420
  };
402
421
  J(() => {
403
- y === "results" && Q > oe && (We(Q), localStorage.setItem("magicSentenceBest", String(Q)));
404
- }, [y, Q, oe]);
405
- const R = (e) => {
422
+ x === "results" && U > he && (De(U), localStorage.setItem("magicSentenceBest", String(U)));
423
+ }, [x, U, he]);
424
+ const P = (e) => {
406
425
  const t = new (window.AudioContext || window.webkitAudioContext)(), n = t.createOscillator(), i = t.createGain();
407
426
  switch (n.connect(i), i.connect(t.destination), e) {
408
427
  case "start":
@@ -422,36 +441,36 @@ function dn(g = {}) {
422
441
  break;
423
442
  }
424
443
  i.gain.setValueAtTime(0.1, t.currentTime), n.start(), n.stop(t.currentTime + 0.2);
425
- }, de = () => {
426
- const t = Date.now() + 2500, n = ["#ec4c44", "#f7c948", "#6fcf97", "#56ccf2", "#bb6bd9"], i = document.createElement("canvas"), o = i.getContext("2d");
444
+ }, ge = () => {
445
+ const t = Date.now() + 2500, n = ["#ec4c44", "#f7c948", "#6fcf97", "#56ccf2", "#bb6bd9"], i = document.createElement("canvas"), r = i.getContext("2d");
427
446
  i.width = window.innerWidth, i.height = window.innerHeight, i.style.position = "fixed", i.style.top = "0", i.style.left = "0", i.style.pointerEvents = "none", document.body.appendChild(i);
428
- const w = Array.from({ length: 100 }).map(() => ({
447
+ const h = Array.from({ length: 100 }).map(() => ({
429
448
  x: Math.random() * i.width,
430
449
  y: Math.random() * i.height - i.height,
431
450
  size: 6 + Math.random() * 6,
432
451
  color: n[Math.floor(Math.random() * n.length)],
433
452
  speed: 2 + Math.random() * 4,
434
453
  tilt: Math.random() * 2 * Math.PI
435
- })), x = () => {
436
- o.clearRect(0, 0, i.width, i.height), w.forEach((s) => {
437
- o.fillStyle = s.color, o.beginPath(), o.ellipse(s.x, s.y, s.size, s.size / 2, s.tilt, 0, 2 * Math.PI), o.fill(), s.y += s.speed, s.x += Math.sin(s.tilt);
438
- }), Date.now() < t ? requestAnimationFrame(x) : document.body.removeChild(i);
454
+ })), u = () => {
455
+ r.clearRect(0, 0, i.width, i.height), h.forEach((o) => {
456
+ r.fillStyle = o.color, r.beginPath(), r.ellipse(o.x, o.y, o.size, o.size / 2, o.tilt, 0, 2 * Math.PI), r.fill(), o.y += o.speed, o.x += Math.sin(o.tilt);
457
+ }), Date.now() < t ? requestAnimationFrame(u) : document.body.removeChild(i);
439
458
  };
440
- x();
441
- }, Ne = () => /* @__PURE__ */ m("div", { style: p.gmCenterScreen, children: [
442
- /* @__PURE__ */ a("h1", { style: p.gmHeadline1, children: "MAGIC SENTENCE" }),
443
- /* @__PURE__ */ a("p", { style: p.gmBodyM, children: "Select number of rounds" }),
444
- /* @__PURE__ */ a("div", { style: {
459
+ u();
460
+ }, Ze = () => /* @__PURE__ */ y("div", { style: g.gmCenterScreen, children: [
461
+ /* @__PURE__ */ l("h1", { style: g.gmHeadline1, children: "MAGIC SENTENCE" }),
462
+ /* @__PURE__ */ l("p", { style: g.gmBodyM, children: "Select number of rounds" }),
463
+ /* @__PURE__ */ l("div", { style: {
445
464
  display: "flex",
446
- gap: u() ? "8px" : "16px",
465
+ gap: f() ? "8px" : "16px",
447
466
  justifyContent: "center"
448
- }, children: [3, 4, 5].map((e) => /* @__PURE__ */ m(
467
+ }, children: [3, 4, 5].map((e) => /* @__PURE__ */ y(
449
468
  "button",
450
469
  {
451
- onClick: () => Be(e),
470
+ onClick: () => qe(e),
452
471
  style: {
453
- ...p.gmButton,
454
- ...f("medium")
472
+ ...g.gmButton,
473
+ ...b("medium")
455
474
  },
456
475
  children: [
457
476
  e,
@@ -460,20 +479,20 @@ function dn(g = {}) {
460
479
  },
461
480
  e
462
481
  )) })
463
- ] }), je = () => /* @__PURE__ */ m("div", { style: p.gmCenterScreen, children: [
464
- /* @__PURE__ */ a("h1", { style: p.gmHeadline1, children: "MAGIC SENTENCE" }),
465
- /* @__PURE__ */ a("p", { style: p.gmBodyM, children: "Select time per round" }),
466
- /* @__PURE__ */ a("div", { style: {
482
+ ] }), _e = () => /* @__PURE__ */ y("div", { style: g.gmCenterScreen, children: [
483
+ /* @__PURE__ */ l("h1", { style: g.gmHeadline1, children: "MAGIC SENTENCE" }),
484
+ /* @__PURE__ */ l("p", { style: g.gmBodyM, children: "Select time per round" }),
485
+ /* @__PURE__ */ l("div", { style: {
467
486
  display: "flex",
468
- gap: u() ? "8px" : "16px",
487
+ gap: f() ? "8px" : "16px",
469
488
  justifyContent: "center"
470
- }, children: [15, 20, 30].map((e) => /* @__PURE__ */ m(
489
+ }, children: [15, 20, 30].map((e) => /* @__PURE__ */ y(
471
490
  "button",
472
491
  {
473
- onClick: () => Le(e),
492
+ onClick: () => Ve(e),
474
493
  style: {
475
- ...p.gmButton,
476
- ...f("medium")
494
+ ...g.gmButton,
495
+ ...b("medium")
477
496
  },
478
497
  children: [
479
498
  e,
@@ -482,16 +501,16 @@ function dn(g = {}) {
482
501
  },
483
502
  e
484
503
  )) })
485
- ] }), Oe = () => /* @__PURE__ */ m("div", { style: p.gmCenterScreen, children: [
486
- /* @__PURE__ */ m("h2", { style: { ...p.gmBodyM, marginBottom: "0px" }, children: [
504
+ ] }), Qe = () => /* @__PURE__ */ y("div", { style: g.gmCenterScreen, children: [
505
+ /* @__PURE__ */ y("h2", { style: { ...g.gmBodyM, marginBottom: "0px" }, children: [
487
506
  "Type down ",
488
- D,
507
+ z,
489
508
  " sentence",
490
- D && D > 1 ? "s" : "",
509
+ z && z > 1 ? "s" : "",
491
510
  " for your student"
492
511
  ] }),
493
- /* @__PURE__ */ a("p", { style: { ...p.gmBodyS, marginBottom: "16px", marginTop: "0px", color: "#6b7280" }, children: "Maximum 41 characters per sentence" }),
494
- /* @__PURE__ */ a("div", { style: {
512
+ /* @__PURE__ */ l("p", { style: { ...g.gmBodyS, marginBottom: "16px", marginTop: "0px", color: "#6b7280" }, children: "Maximum 41 characters per sentence" }),
513
+ /* @__PURE__ */ l("div", { style: {
495
514
  display: "flex",
496
515
  flexDirection: "column",
497
516
  gap: 12,
@@ -501,16 +520,16 @@ function dn(g = {}) {
501
520
  // Минимальная ширина по содержимому
502
521
  maxWidth: "600px"
503
522
  // Ограничиваем максимальную ширину
504
- }, children: C.map((e, t) => /* @__PURE__ */ a(
523
+ }, children: I.map((e, t) => /* @__PURE__ */ l(
505
524
  "input",
506
525
  {
507
526
  value: e,
508
527
  placeholder: `Sentence ${t + 1}`,
509
- onChange: (n) => Me(t, n.target.value),
528
+ onChange: (n) => Je(t, n.target.value),
510
529
  style: {
511
- ...p.gmInput,
512
- padding: u() ? "8px 12px" : "12px 16px",
513
- fontSize: u() ? "14px" : "16px",
530
+ ...g.gmInput,
531
+ padding: f() ? "8px 12px" : "12px 16px",
532
+ fontSize: f() ? "14px" : "16px",
514
533
  width: "100%",
515
534
  // Поля теперь будут шире благодаря увеличенной ширине контейнера
516
535
  textAlign: "center"
@@ -519,125 +538,129 @@ function dn(g = {}) {
519
538
  },
520
539
  t
521
540
  )) }),
522
- /* @__PURE__ */ a(
541
+ /* @__PURE__ */ l(
523
542
  "button",
524
543
  {
525
- onClick: Ge,
526
- disabled: C.some((e) => e.trim().length === 0),
544
+ onClick: Ye,
545
+ disabled: I.some((e) => e.trim().length === 0),
527
546
  style: {
528
- ...p.gmButton,
547
+ ...g.gmButton,
529
548
  marginTop: 30,
530
- background: C.some((e) => e.trim().length === 0) ? "#ccc" : "#ec4c44",
531
- cursor: C.some((e) => e.trim().length === 0) ? "not-allowed" : "pointer",
532
- ...f("large")
549
+ background: I.some((e) => e.trim().length === 0) ? "#ccc" : "#ec4c44",
550
+ cursor: I.some((e) => e.trim().length === 0) ? "not-allowed" : "pointer",
551
+ ...b("large")
533
552
  },
534
553
  children: "PLAY"
535
554
  }
536
555
  )
537
- ] }), Fe = () => /* @__PURE__ */ m("div", { style: p.gmReadyWrapper, children: [
538
- /* @__PURE__ */ a("h1", { style: {
539
- ...p.gmHeadline1,
556
+ ] }), en = () => /* @__PURE__ */ y("div", { style: g.gmReadyWrapper, children: [
557
+ /* @__PURE__ */ l("h1", { style: {
558
+ ...g.gmHeadline1,
540
559
  color: "#ec4c44"
541
560
  }, children: "GET READY" }),
542
- /* @__PURE__ */ a("div", { style: p.gmHourglass, children: "⏳" })
543
- ] }), Ze = () => /* @__PURE__ */ m("div", { style: p.gmGameLayout, children: [
544
- /* @__PURE__ */ m("h2", { style: {
545
- marginBottom: u() ? "5px" : "10px",
546
- fontSize: u() ? "16px" : "20px"
561
+ /* @__PURE__ */ l("div", { style: g.gmHourglass, children: "⏳" })
562
+ ] }), nn = () => /* @__PURE__ */ y("div", { style: g.gmGameLayout, children: [
563
+ /* @__PURE__ */ y("h2", { style: {
564
+ marginBottom: f() ? "5px" : "10px",
565
+ fontSize: f() ? "16px" : "20px"
547
566
  }, children: [
548
567
  "Round ",
549
- T + 1,
568
+ E + 1,
550
569
  "/",
551
- D,
570
+ z,
552
571
  " — ",
553
- d ? "TIME'S UP!" : `Time: ${B}s`
572
+ a ? "TIME'S UP!" : `Time: ${$}s`
554
573
  ] }),
555
- /* @__PURE__ */ a(
574
+ /* @__PURE__ */ l(
556
575
  "div",
557
576
  {
558
577
  style: {
559
578
  width: "60%",
560
- height: u() ? "8px" : "14px",
579
+ height: f() ? "8px" : "14px",
561
580
  borderRadius: 8,
562
581
  background: "#eee",
563
582
  overflow: "hidden",
564
- marginBottom: u() ? "10px" : "20px"
583
+ marginBottom: f() ? "10px" : "20px"
565
584
  },
566
- children: /* @__PURE__ */ a(
585
+ children: /* @__PURE__ */ l(
567
586
  "div",
568
587
  {
569
588
  style: {
570
589
  height: "100%",
571
- width: `${B / (ge || 20) * 100}%`,
572
- background: B <= 5 ? "#ec4c44" : "#4caf50",
590
+ width: `${$ / (fe || 20) * 100}%`,
591
+ background: $ <= 5 ? "#ec4c44" : "#4caf50",
573
592
  transition: "width 1s linear"
574
593
  }
575
594
  }
576
595
  )
577
596
  }
578
597
  ),
579
- /* @__PURE__ */ a(
598
+ /* @__PURE__ */ l(
580
599
  "div",
581
600
  {
582
601
  onDragOver: (e) => e.preventDefault(),
583
- onDrop: (e) => _(e, "bank", null),
602
+ onDrop: (e) => K(e, "bank", null),
584
603
  style: {
585
604
  display: "flex",
586
- flexWrap: I() ? "wrap" : "nowrap",
587
- gap: l || window.innerWidth < 768 ? "6px" : "10px",
605
+ flexWrap: R() ? "wrap" : "nowrap",
606
+ gap: c || window.innerWidth < 768 ? "6px" : "10px",
588
607
  justifyContent: "center",
589
- marginBottom: l || window.innerWidth < 768 ? "15px" : "30px",
590
- padding: l || window.innerWidth < 768 ? "5px" : "10px",
608
+ marginBottom: c || window.innerWidth < 768 ? "15px" : "30px",
609
+ padding: c || window.innerWidth < 768 ? "5px" : "10px",
591
610
  width: "100%",
592
611
  boxSizing: "border-box"
593
612
  },
594
- children: te.map((e, t) => /* @__PURE__ */ a(
613
+ children: le.map((e, t) => /* @__PURE__ */ l(
595
614
  "div",
596
615
  {
597
- draggable: !d,
616
+ draggable: !a,
598
617
  role: "button",
599
- tabIndex: d ? -1 : 0,
600
- "aria-label": d ? `Word: ${e.text} (time expired)` : Ke("Drag word", e.text, "to build sentence"),
618
+ tabIndex: a ? -1 : 0,
619
+ "aria-label": a ? `Word: ${e.text} (time expired)` : ln("Drag word", e.text, "to build sentence"),
601
620
  onDragStart: (n) => {
602
- if (d) {
621
+ if (a) {
603
622
  n.preventDefault();
604
623
  return;
605
624
  }
606
625
  n.dataTransfer.setData(
607
626
  "application/x-token",
608
627
  JSON.stringify({ from: "bank", id: e.id })
609
- ), n.dataTransfer.setData("text/plain", e.id), E(`Dragging word: ${e.text}`);
628
+ ), n.dataTransfer.setData("text/plain", e.id), L(`Dragging word: ${e.text}`);
610
629
  },
611
630
  onKeyDown: (n) => {
612
- d || _e(n, () => K("bank", "selected", e.id, null));
631
+ a || cn(n, () => oe("bank", "selected", e.id, null));
613
632
  },
614
633
  onDragOver: (n) => n.preventDefault(),
615
634
  onDrop: (n) => {
616
- const i = n.currentTarget.getBoundingClientRect(), o = i.left + i.width / 2, w = n.clientX > o ? t + 1 : t;
617
- P({ list: null, index: null, side: null }), n.stopPropagation(), _(n, "bank", w);
635
+ const i = n.currentTarget.getBoundingClientRect(), r = i.left + i.width / 2, h = n.clientX > r ? t + 1 : t;
636
+ B({ list: null, id: null, side: null }), n.stopPropagation(), K(n, "bank", h);
618
637
  },
619
638
  onDragEnter: (n) => {
620
- if (d) return;
621
- const i = n.currentTarget.getBoundingClientRect(), o = i.left + i.width / 2;
622
- P({ list: "bank", index: t, side: n.clientX > o ? "right" : "left" });
639
+ if (a) return;
640
+ const i = n.currentTarget.getBoundingClientRect(), r = i.left + i.width / 2;
641
+ B({ list: "bank", id: e.id, side: n.clientX > r ? "right" : "left" });
623
642
  },
624
- onDragLeave: () => P({ list: null, index: null, side: null }),
643
+ onDragLeave: () => B({ list: null, id: null, side: null }),
625
644
  onClick: () => {
626
- d || K("bank", "selected", e.id, null);
645
+ a || oe("bank", "selected", e.id, null);
627
646
  },
628
647
  style: {
629
- padding: l || window.innerWidth < 768 ? "6px 10px" : "10px 16px",
630
- borderRadius: l || window.innerWidth < 768 ? "6px" : "10px",
648
+ padding: c || window.innerWidth < 768 ? "6px 10px" : "10px 16px",
649
+ borderRadius: c || window.innerWidth < 768 ? "6px" : "10px",
631
650
  border: "1px solid #ccc",
632
- background: d ? "#f0f0f0" : "#f9f9f9",
633
- cursor: d ? "not-allowed" : "pointer",
634
- fontSize: l || window.innerWidth < 768 ? "12px" : "18px",
635
- borderLeft: W.list === "bank" && W.index === t && W.side === "left" ? "3px solid #3b82f6" : "1px solid #ccc",
636
- borderRight: W.list === "bank" && W.index === t && W.side === "right" ? "3px solid #3b82f6" : "1px solid #ccc",
651
+ background: a ? "#f0f0f0" : "#f9f9f9",
652
+ cursor: a ? "not-allowed" : m.list === "bank" && m.id === e.id ? "grabbing" : "grab",
653
+ fontSize: c || window.innerWidth < 768 ? "12px" : "18px",
654
+ ...m.list === "bank" && m.id === e.id && m.side === "left" ? { borderLeft: "3px solid #3b82f6" } : {},
655
+ ...m.list === "bank" && m.id === e.id && m.side === "right" ? { borderRight: "3px solid #3b82f6" } : {},
637
656
  flexShrink: 0,
638
657
  flexBasis: "auto",
639
- opacity: d ? 0.6 : 1,
640
- transition: "opacity 0.3s ease"
658
+ opacity: a ? 0.6 : 1,
659
+ transition: "opacity 0.3s ease, transform 0.2s ease",
660
+ ...m.list === "bank" && m.id === e.id ? {
661
+ transform: "scale(1.05)",
662
+ boxShadow: "0 2px 8px rgba(59, 130, 246, 0.3)"
663
+ } : {}
641
664
  },
642
665
  children: e.text
643
666
  },
@@ -645,37 +668,48 @@ function dn(g = {}) {
645
668
  ))
646
669
  }
647
670
  ),
648
- /* @__PURE__ */ a(
671
+ /* @__PURE__ */ l(
649
672
  "div",
650
673
  {
651
674
  onDragOver: (e) => e.preventDefault(),
652
- onDrop: (e) => _(e, "selected", null),
675
+ onDrop: (e) => {
676
+ const t = e.currentTarget.getBoundingClientRect(), n = Array.from(e.currentTarget.children);
677
+ if (n.length === 0) {
678
+ K(e, "selected", 0);
679
+ return;
680
+ }
681
+ let i = W.length, r = 1 / 0;
682
+ n.forEach((h, u) => {
683
+ const o = h.getBoundingClientRect(), d = o.left + o.width / 2, T = Math.abs(e.clientX - d);
684
+ T < r && (r = T, i = e.clientX < d ? u : u + 1);
685
+ }), e.clientX > t.right - 30 && (i = W.length), e.clientX < t.left + 30 && (i = 0), K(e, "selected", i);
686
+ },
653
687
  style: {
654
- minHeight: l || window.innerWidth < 768 ? "50px" : "70px",
688
+ minHeight: c || window.innerWidth < 768 ? "50px" : "70px",
655
689
  width: "auto",
656
690
  // Автоматическая ширина в зависимости от содержимого
657
691
  maxWidth: "none",
658
692
  // Убираем ограничение максимальной ширины
659
693
  minWidth: "245px",
660
694
  // Минимальная ширина для растягивания
661
- border: L === "correct" ? "2px dashed #4caf50" : L === "almost" ? "2px dashed #ff9800" : L === "wrong" ? "2px dashed #f44336" : "2px dashed #ccc",
662
- borderRadius: l || window.innerWidth < 768 ? "8px" : "12px",
663
- padding: l || window.innerWidth < 768 ? "8px" : "12px",
695
+ border: A === "correct" ? "2px dashed #4caf50" : A === "almost" ? "2px dashed #ff9800" : A === "wrong" ? "2px dashed #f44336" : "2px dashed #ccc",
696
+ borderRadius: c || window.innerWidth < 768 ? "8px" : "12px",
697
+ padding: c || window.innerWidth < 768 ? "8px" : "12px",
664
698
  display: "flex",
665
- flexWrap: I() ? "wrap" : "nowrap",
699
+ flexWrap: R() ? "wrap" : "nowrap",
666
700
  alignItems: "center",
667
701
  justifyContent: "center",
668
- fontSize: `${ye(k.length)}px`,
669
- background: L === "correct" ? "#e8f5e8" : L === "almost" ? "#fff3e0" : L === "wrong" ? "#ffebee" : "#fafafa",
670
- overflowX: I() ? "hidden" : "auto",
671
- whiteSpace: I() ? "normal" : "nowrap"
702
+ fontSize: `${ve(W.length)}px`,
703
+ background: A === "correct" ? "#e8f5e8" : A === "almost" ? "#fff3e0" : A === "wrong" ? "#ffebee" : "#fafafa",
704
+ overflowX: R() ? "hidden" : "auto",
705
+ whiteSpace: R() ? "normal" : "nowrap"
672
706
  },
673
- children: k.map((e, t) => /* @__PURE__ */ a(
707
+ children: W.map((e, t) => /* @__PURE__ */ l(
674
708
  "span",
675
709
  {
676
- draggable: !d,
710
+ draggable: !a,
677
711
  onDragStart: (n) => {
678
- if (d) {
712
+ if (a) {
679
713
  n.preventDefault();
680
714
  return;
681
715
  }
@@ -686,37 +720,41 @@ function dn(g = {}) {
686
720
  },
687
721
  onDragOver: (n) => n.preventDefault(),
688
722
  onDrop: (n) => {
689
- const i = n.currentTarget.getBoundingClientRect(), o = i.left + i.width / 2, w = n.clientX > o ? t + 1 : t;
690
- P({ list: null, index: null, side: null }), n.stopPropagation(), _(n, "selected", w);
723
+ const i = n.currentTarget.getBoundingClientRect(), r = i.left + i.width / 2, h = i.width * 0.25, u = n.clientX < r - h ? t : n.clientX > r + h || n.clientX > r ? t + 1 : t;
724
+ B({ list: null, id: null, side: null }), n.stopPropagation(), K(n, "selected", u);
691
725
  },
692
726
  onDragEnter: (n) => {
693
- if (d) return;
694
- const i = n.currentTarget.getBoundingClientRect(), o = i.left + i.width / 2;
695
- P({ list: "selected", index: t, side: n.clientX > o ? "right" : "left" });
727
+ if (a) return;
728
+ const i = n.currentTarget.getBoundingClientRect(), r = i.left + i.width / 2;
729
+ B({ list: "selected", id: e.id, side: n.clientX > r ? "right" : "left" });
696
730
  },
697
- onDragLeave: () => P({ list: null, index: null, side: null }),
731
+ onDragLeave: () => B({ list: null, id: null, side: null }),
698
732
  onClick: () => {
699
- d || K("selected", "bank", e.id, null);
733
+ a || oe("selected", "bank", e.id, null);
700
734
  },
701
- title: d ? "Time expired" : "Click to remove back to bank",
735
+ title: a ? "Time expired" : "Click to remove back to bank",
702
736
  style: {
703
- padding: u() ? "4px 6px" : "6px 10px",
704
- margin: u() ? "2px" : "4px",
705
- borderRadius: u() ? "4px" : "8px",
706
- background: d ? "#f0f0f0" : "#ffe9e7",
707
- border: d ? "1px solid #ccc" : "1px solid #ec4c44",
708
- borderLeft: W.list === "selected" && W.index === t && W.side === "left" ? "3px solid #3b82f6" : void 0,
709
- borderRight: W.list === "selected" && W.index === t && W.side === "right" ? "3px solid #3b82f6" : void 0,
710
- cursor: d ? "not-allowed" : "pointer",
737
+ padding: f() ? "4px 6px" : "6px 10px",
738
+ margin: f() ? "2px" : "4px",
739
+ borderRadius: f() ? "4px" : "8px",
740
+ background: a ? "#f0f0f0" : "#ffe9e7",
741
+ border: a ? "1px solid #ccc" : "1px solid #ec4c44",
742
+ ...m.list === "selected" && m.id === e.id && m.side === "left" ? { borderLeft: "3px solid #3b82f6" } : {},
743
+ ...m.list === "selected" && m.id === e.id && m.side === "right" ? { borderRight: "3px solid #3b82f6" } : {},
744
+ cursor: a ? "not-allowed" : m.list === "selected" && m.id === e.id ? "grabbing" : "grab",
711
745
  userSelect: "none",
712
- fontSize: `${ye(k.length)}px`,
746
+ fontSize: `${ve(W.length)}px`,
713
747
  // Адаптивный размер шрифта для слов
714
748
  fontFamily: '"Roboto", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif',
715
749
  // Более плотный шрифт
716
750
  whiteSpace: "nowrap",
717
751
  // Запрещаем перенос слов
718
- opacity: d ? 0.6 : 1,
719
- transition: "opacity 0.3s ease"
752
+ opacity: a ? 0.6 : 1,
753
+ transition: "opacity 0.3s ease, transform 0.2s ease",
754
+ ...m.list === "selected" && m.id === e.id ? {
755
+ transform: "scale(1.05)",
756
+ boxShadow: "0 2px 8px rgba(59, 130, 246, 0.3)"
757
+ } : {}
720
758
  },
721
759
  children: e.text
722
760
  },
@@ -724,91 +762,91 @@ function dn(g = {}) {
724
762
  ))
725
763
  }
726
764
  ),
727
- /* @__PURE__ */ a(
765
+ /* @__PURE__ */ l(
728
766
  "button",
729
767
  {
730
- onClick: () => $e(!0),
731
- disabled: !d && k.length === 0,
768
+ onClick: () => Ke(!0),
769
+ disabled: !a && W.length === 0,
732
770
  style: {
733
- marginTop: u() ? "15px" : "30px",
734
- fontSize: u() ? "14px" : "20px",
735
- padding: u() ? "6px 12px" : "10px 24px",
736
- borderRadius: u() ? "8px" : "12px",
737
- background: d || k.length > 0 ? "#ec4c44" : "#ccc",
771
+ marginTop: f() ? "15px" : "30px",
772
+ fontSize: f() ? "14px" : "20px",
773
+ padding: f() ? "6px 12px" : "10px 24px",
774
+ borderRadius: f() ? "8px" : "12px",
775
+ background: a || W.length > 0 ? "#ec4c44" : "#ccc",
738
776
  color: "white",
739
777
  border: "none",
740
- cursor: d || k.length > 0 ? "pointer" : "not-allowed"
778
+ cursor: a || W.length > 0 ? "pointer" : "not-allowed"
741
779
  },
742
780
  children: "NEXT"
743
781
  }
744
782
  )
745
- ] }), Qe = () => /* @__PURE__ */ m("div", { style: p.gmCenterScreen, children: [
746
- /* @__PURE__ */ a("h1", { style: {
747
- ...p.gmHeadline1,
748
- marginTop: (l && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || M || A || G || $ || N || j || O || F, "0px"),
749
- marginBottom: l && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || M || A || G || $ || N || j || O || F ? "2px" : "10px",
750
- fontSize: l && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "32px" : "clamp(28px, 4vw, 40px)"
783
+ ] }), tn = () => /* @__PURE__ */ y("div", { style: g.gmCenterScreen, children: [
784
+ /* @__PURE__ */ l("h1", { style: {
785
+ ...g.gmHeadline1,
786
+ marginTop: (c && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || O || N || G || X || j || F || q || V, "0px"),
787
+ marginBottom: c && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || O || N || G || X || j || F || q || V ? "2px" : "10px",
788
+ fontSize: c && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "32px" : "clamp(28px, 4vw, 40px)"
751
789
  }, children: "Game Over 🎯" }),
752
- /* @__PURE__ */ m("h2", { style: {
753
- ...p.gmHeadline2,
754
- marginTop: (l && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || M || A || G || $ || N || j || O || F, "0px"),
755
- marginBottom: l && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || M || A || G || $ || N || j || O || F ? "2px" : "16px",
756
- fontSize: l && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "18px" : "24px"
790
+ /* @__PURE__ */ y("h2", { style: {
791
+ ...g.gmHeadline2,
792
+ marginTop: (c && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || O || N || G || X || j || F || q || V, "0px"),
793
+ marginBottom: c && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || O || N || G || X || j || F || q || V ? "2px" : "16px",
794
+ fontSize: c && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "18px" : "24px"
757
795
  }, children: [
758
796
  "Your score: ",
759
- Q,
797
+ U,
760
798
  " out of ",
761
- D
799
+ z
762
800
  ] }),
763
- /* @__PURE__ */ m("p", { style: {
764
- ...p.gmBodyM,
801
+ /* @__PURE__ */ y("p", { style: {
802
+ ...g.gmBodyM,
765
803
  color: "#10b981",
766
- marginTop: l && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || M || A || G || $ || N || j || O || F ? "0px" : "12px",
767
- marginBottom: l && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || M || A || G || $ || N || j || O || F ? "2px" : "16px",
768
- fontSize: l && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px"
804
+ marginTop: c && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || O || N || G || X || j || F || q || V ? "0px" : "12px",
805
+ marginBottom: c && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || O || N || G || X || j || F || q || V ? "2px" : "16px",
806
+ fontSize: c && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px"
769
807
  }, children: [
770
808
  "Best score: ",
771
- oe
809
+ he
772
810
  ] }),
773
- /* @__PURE__ */ m("div", { style: {
811
+ /* @__PURE__ */ y("div", { style: {
774
812
  display: "flex",
775
- gap: l && window.innerWidth > window.innerHeight || l && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
776
- marginTop: l && window.innerWidth > window.innerHeight || l && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || ke ? "12px" : "24px"
813
+ gap: c && window.innerWidth > window.innerHeight || c && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
814
+ marginTop: c && window.innerWidth > window.innerHeight || c && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || Pe ? "12px" : "24px"
777
815
  }, children: [
778
- /* @__PURE__ */ a(
816
+ /* @__PURE__ */ l(
779
817
  "button",
780
818
  {
781
819
  onClick: () => {
782
- de(), R("start"), setTimeout(() => {
783
- b("getready"), fe(null), Y(!1);
820
+ ge(), P("start"), setTimeout(() => {
821
+ k("getready"), We(null), ee(!1);
784
822
  }, 800);
785
823
  },
786
824
  style: {
787
- ...p.gmButton,
788
- ...f("medium")
825
+ ...g.gmButton,
826
+ ...b("medium")
789
827
  },
790
828
  children: "🔁 Play again"
791
829
  }
792
830
  ),
793
- /* @__PURE__ */ a(
831
+ /* @__PURE__ */ l(
794
832
  "button",
795
833
  {
796
834
  onClick: () => {
797
- R("click"), b("select"), V(null), he(null), U([]), q(0), ie([]), Y(!1);
835
+ P("click"), k("select"), _(null), me(null), Q([]), M(0), ce([]), ee(!1);
798
836
  },
799
837
  style: {
800
- ...p.gmButton,
801
- ...f("medium")
838
+ ...g.gmButton,
839
+ ...b("medium")
802
840
  },
803
841
  children: "⬅️ Exit"
804
842
  }
805
843
  )
806
844
  ] })
807
- ] }), le = r || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/magic%20sentence/logo.svg` : null);
808
- return /* @__PURE__ */ a(
845
+ ] }), rn = !c && v;
846
+ return /* @__PURE__ */ l(
809
847
  "div",
810
848
  {
811
- ref: ee,
849
+ ref: de,
812
850
  style: {
813
851
  width: "100%",
814
852
  height: "100%",
@@ -824,90 +862,81 @@ function dn(g = {}) {
824
862
  right: 0,
825
863
  bottom: 0
826
864
  },
827
- children: /* @__PURE__ */ m(
865
+ children: /* @__PURE__ */ l(
828
866
  "div",
829
867
  {
830
868
  style: {
831
- width: l ? "100%" : xe || 1e3,
832
- height: l ? "100%" : xe || 1e3,
869
+ width: c ? "100%" : ke || 1e3,
870
+ height: c ? "100%" : ke || 1e3,
833
871
  display: "flex",
834
872
  justifyContent: "center",
835
873
  alignItems: "center",
836
874
  overflow: "hidden",
837
- borderRadius: l ? 0 : "20px",
875
+ borderRadius: c ? 0 : "20px",
838
876
  background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
839
- boxShadow: l ? "none" : "0 0 40px rgba(0,0,0,0.1)",
840
- margin: l ? "0 auto" : "unset",
841
- position: "relative"
877
+ boxShadow: c ? "none" : "0 0 40px rgba(0,0,0,0.1)",
878
+ margin: c ? "0 auto" : "unset",
879
+ position: "relative",
842
880
  // needed so absolute logo is inside the square
881
+ transform: `scale(${Ee})`
882
+ // ✅ Применяем масштаб для широких экранов
843
883
  },
844
- children: [
845
- !l && S ? /* @__PURE__ */ a("div", { style: { ...p.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: le ? /* @__PURE__ */ m("picture", { children: [
846
- /* @__PURE__ */ a(
847
- "source",
848
- {
849
- srcSet: le,
850
- type: "image/svg+xml"
851
- }
852
- ),
853
- /* @__PURE__ */ a(
854
- "img",
855
- {
856
- src: le.replace(".svg", ".png"),
857
- alt: "SPEAKID Logo",
858
- style: p.gmLogoImg,
859
- loading: "lazy"
860
- }
861
- )
862
- ] }) : /* @__PURE__ */ a("div", { style: p.gmLogoFallback, children: "SPEAKID" }) }) : null,
863
- /* @__PURE__ */ a(
864
- "div",
865
- {
866
- style: {
867
- transform: "none",
868
- width: "100%",
869
- height: "100%",
870
- display: "flex",
871
- justifyContent: "center",
872
- alignItems: "center"
873
- },
874
- children: /* @__PURE__ */ m("div", { id: "magic-sentence-root", children: [
875
- y === "select" ? Ne() : null,
876
- y === "time" ? je() : null,
877
- y === "type" ? Oe() : null,
878
- y === "getready" ? Fe() : null,
879
- y === "play" ? Ze() : null,
880
- y === "results" ? Qe() : null
881
- ] })
882
- }
883
- )
884
- ]
884
+ children: /* @__PURE__ */ l(
885
+ "div",
886
+ {
887
+ style: {
888
+ transform: "translateZ(0)",
889
+ width: "100%",
890
+ height: "100%",
891
+ display: "flex",
892
+ justifyContent: "center",
893
+ alignItems: "center"
894
+ },
895
+ children: /* @__PURE__ */ y("div", { id: "magic-sentence-root", children: [
896
+ rn ? /* @__PURE__ */ l("div", { style: g.gmLogoFixed, children: /* @__PURE__ */ l(
897
+ "img",
898
+ {
899
+ src: s || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/magic%20sentence/logo.png` : "/logo.png"),
900
+ alt: "SPEAKID Logo",
901
+ style: g.gmLogoImg,
902
+ loading: "lazy"
903
+ }
904
+ ) }) : null,
905
+ x === "select" ? Ze() : null,
906
+ x === "time" ? _e() : null,
907
+ x === "type" ? Qe() : null,
908
+ x === "getready" ? en() : null,
909
+ x === "play" ? nn() : null,
910
+ x === "results" ? tn() : null
911
+ ] })
912
+ }
913
+ )
885
914
  }
886
915
  )
887
916
  }
888
917
  );
889
918
  }
890
- class ln extends Ue {
891
- constructor(r) {
892
- super(r), this.state = { hasError: !1 };
919
+ class yn extends sn {
920
+ constructor(s) {
921
+ super(s), this.state = { hasError: !1 };
893
922
  }
894
- static getDerivedStateFromError(r) {
923
+ static getDerivedStateFromError(s) {
895
924
  return {
896
925
  hasError: !0,
897
- error: r
926
+ error: s
898
927
  };
899
928
  }
900
- componentDidCatch(r, S) {
901
- console.error("Game Error:", r, S), this.setState({
902
- error: r,
903
- errorInfo: S
929
+ componentDidCatch(s, v) {
930
+ console.error("Game Error:", s, v), this.setState({
931
+ error: s,
932
+ errorInfo: v
904
933
  });
905
934
  }
906
935
  handleReset = () => {
907
936
  this.setState({ hasError: !1, error: void 0, errorInfo: void 0 });
908
937
  };
909
938
  render() {
910
- return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ m("div", { style: {
939
+ return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ y("div", { style: {
911
940
  display: "flex",
912
941
  flexDirection: "column",
913
942
  alignItems: "center",
@@ -919,9 +948,9 @@ class ln extends Ue {
919
948
  color: "#dc2626",
920
949
  fontFamily: "system-ui, sans-serif"
921
950
  }, children: [
922
- /* @__PURE__ */ a("h1", { style: { fontSize: "24px", marginBottom: "16px" }, children: "🚨 Oops! Something went wrong" }),
923
- /* @__PURE__ */ a("p", { style: { fontSize: "16px", marginBottom: "24px", maxWidth: "500px" }, children: "The game encountered an unexpected error. Don't worry, your progress is saved!" }),
924
- /* @__PURE__ */ a(
951
+ /* @__PURE__ */ l("h1", { style: { fontSize: "24px", marginBottom: "16px" }, children: "🚨 Oops! Something went wrong" }),
952
+ /* @__PURE__ */ l("p", { style: { fontSize: "16px", marginBottom: "24px", maxWidth: "500px" }, children: "The game encountered an unexpected error. Don't worry, your progress is saved!" }),
953
+ /* @__PURE__ */ l(
925
954
  "button",
926
955
  {
927
956
  onClick: this.handleReset,
@@ -935,14 +964,14 @@ class ln extends Ue {
935
964
  cursor: "pointer",
936
965
  transition: "background-color 0.2s"
937
966
  },
938
- onMouseOver: (r) => r.currentTarget.style.backgroundColor = "#b91c1c",
939
- onMouseOut: (r) => r.currentTarget.style.backgroundColor = "#dc2626",
967
+ onMouseOver: (s) => s.currentTarget.style.backgroundColor = "#b91c1c",
968
+ onMouseOut: (s) => s.currentTarget.style.backgroundColor = "#dc2626",
940
969
  children: "🔄 Restart Game"
941
970
  }
942
971
  ),
943
- typeof process < "u" && process.env.NODE_ENV === "development" && this.state.error && /* @__PURE__ */ m("details", { style: { marginTop: "20px", textAlign: "left", maxWidth: "600px" }, children: [
944
- /* @__PURE__ */ a("summary", { style: { cursor: "pointer", fontSize: "14px" }, children: "Technical Details (Development Only)" }),
945
- /* @__PURE__ */ m("pre", { style: {
972
+ typeof process < "u" && process.env.NODE_ENV === "development" && this.state.error && /* @__PURE__ */ y("details", { style: { marginTop: "20px", textAlign: "left", maxWidth: "600px" }, children: [
973
+ /* @__PURE__ */ l("summary", { style: { cursor: "pointer", fontSize: "14px" }, children: "Technical Details (Development Only)" }),
974
+ /* @__PURE__ */ y("pre", { style: {
946
975
  backgroundColor: "#f3f4f6",
947
976
  padding: "12px",
948
977
  borderRadius: "4px",
@@ -958,12 +987,12 @@ class ln extends Ue {
958
987
  }
959
988
  }
960
989
  export {
961
- ln as ErrorBoundary,
962
- dn as Game,
963
- E as announceToScreenReader,
964
- Ke as createAriaLabel,
965
- dn as default,
966
- _e as handleKeyDown,
967
- Ye as useValidation
990
+ yn as ErrorBoundary,
991
+ xn as Game,
992
+ L as announceToScreenReader,
993
+ ln as createAriaLabel,
994
+ xn as default,
995
+ cn as handleKeyDown,
996
+ an as useValidation
968
997
  };
969
998
  //# sourceMappingURL=speakid-build-a-sentence.es.js.map