speakid-build-a-sentence 1.0.28 → 1.0.30

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,5 +1,5 @@
1
- import { jsx as l, jsxs as y } from "react/jsx-runtime";
2
- import { useState as c, useCallback as ce, useRef as re, useEffect as j, useMemo as dt, Component as pt } from "react";
1
+ import { jsx as c, jsxs as b } from "react/jsx-runtime";
2
+ import { useState as l, useCallback as ce, useRef as re, useEffect as j, useMemo as dt, Component as pt } from "react";
3
3
  const ut = `
4
4
  @keyframes spin {
5
5
  from { transform: rotate(0deg); }
@@ -174,7 +174,7 @@ const Ce = {
174
174
  // ===== Анимационные стили =====
175
175
  ...Ce
176
176
  }, ft = () => {
177
- const [f, s] = c([]), v = ce((k, M, h) => {
177
+ const [f, s] = l([]), v = ce((k, L, h) => {
178
178
  const w = [];
179
179
  k.trim() || w.push({
180
180
  type: "empty",
@@ -186,7 +186,7 @@ const Ce = {
186
186
  type: "characters",
187
187
  message: "Only Latin characters, numbers, spaces and punctuation are allowed"
188
188
  });
189
- const O = h.findIndex((N, b) => b !== M && N.toLowerCase().trim() === k.toLowerCase().trim());
189
+ const O = h.findIndex((N, y) => y !== L && N.toLowerCase().trim() === k.toLowerCase().trim());
190
190
  return O !== -1 && w.push({
191
191
  type: "duplicate",
192
192
  message: `Duplicate sentence (same as sentence ${O + 1})`
@@ -195,16 +195,16 @@ const Ce = {
195
195
  errors: w
196
196
  };
197
197
  }, []), H = ce((k) => {
198
- const M = [];
198
+ const L = [];
199
199
  return k.forEach((h, w) => {
200
200
  const K = v(h, w, k);
201
- M.push(...K.errors.map((O) => ({
201
+ L.push(...K.errors.map((O) => ({
202
202
  ...O,
203
203
  message: `Sentence ${w + 1}: ${O.message}`
204
204
  })));
205
205
  }), {
206
- isValid: M.length === 0,
207
- errors: M
206
+ isValid: L.length === 0,
207
+ errors: L
208
208
  };
209
209
  }, [v]), $ = ce(() => {
210
210
  s([]);
@@ -255,14 +255,14 @@ const Ce = {
255
255
  s && s.remove(), document.head.appendChild(f);
256
256
  }, xt = (f) => [...f].sort(() => Math.random() - 0.5);
257
257
  function kt(f = {}) {
258
- const { logoUrl: s, showLogo: v = !0, screenHeight: H, screenWidth: $, gameCubeSize: k } = f, M = re(null), h = () => $ ?? (typeof window < "u" ? window.innerWidth : 1920), w = () => H ?? (typeof window < "u" ? window.innerHeight : 1080), { validateAllSentences: K, errors: O } = ft(), N = () => {
258
+ const { logoUrl: s, showLogo: v = !0, screenHeight: H, screenWidth: $, gameCubeSize: k } = f, L = re(null), h = () => $ ?? (typeof window < "u" ? window.innerWidth : 1920), w = () => H ?? (typeof window < "u" ? window.innerHeight : 1080), { validateAllSentences: K, errors: O } = ft(), N = () => {
259
259
  const e = h();
260
260
  return !!(m || e < 768 || e >= 768 && e < 1300);
261
- }, b = () => {
261
+ }, y = () => {
262
262
  const e = h(), n = w();
263
263
  return m || e < 768 || e >= 320 && e <= 932 && n >= 390 && n <= 932;
264
264
  }, F = (e = "medium") => {
265
- if (!b())
265
+ if (!y())
266
266
  return {
267
267
  padding: "12px 24px",
268
268
  fontSize: "16px",
@@ -294,13 +294,13 @@ function kt(f = {}) {
294
294
  const e = document.getElementById("magic-sentence-reset");
295
295
  e && e.remove();
296
296
  }), []);
297
- const [S, z] = c("select"), [E, de] = c(null), [pe, ue] = c(null), [T, Z] = c([]), [D, fe] = c(0), [oe, me] = c([]), [I, ie] = c([]), [W, ge] = c(20), [V, G] = c(0), [yt, he] = c(null), [X, P] = c(null), [a, _] = c(!1), [xe, se] = c(!1), [ae, Te] = c(
297
+ const [S, z] = l("select"), [E, de] = l(null), [pe, ue] = l(null), [T, Z] = l([]), [D, fe] = l(0), [oe, me] = l([]), [I, ie] = l([]), [M, ge] = l(20), [V, G] = l(0), [yt, he] = l(null), [X, P] = l(null), [a, _] = l(!1), [xe, se] = l(!1), [ae, Te] = l(
298
298
  Number(localStorage.getItem("magicSentenceBest")) || 0
299
- ), q = re(null), De = re(null), ye = re(0), [x, B] = c({ list: null, id: null, side: null }), [m, Re] = c(!1), [ze, U] = c(1), [be, J] = c(null), [Ee, Pe] = c(!1), [Be, Le] = c(!1), [Me, We] = c(!1), [Ae, He] = c(!1), [$e, Oe] = c(!1), [Ne, Ge] = c(!1), [Xe, je] = c(!1), [Fe, Ve] = c(!1), [qe, Ue] = c(!1), [bt, Je] = c(!1), [wt, Ye] = c(!1);
299
+ ), q = re(null), De = re(null), ye = re(0), [x, B] = l({ list: null, id: null, side: null }), [m, Re] = l(!1), [ze, U] = l(1), [be, J] = l(null), [Ee, Pe] = l(!1), [Be, We] = l(!1), [Le, Me] = l(!1), [Ae, He] = l(!1), [$e, Oe] = l(!1), [Ne, Ge] = l(!1), [Xe, je] = l(!1), [Fe, Ve] = l(!1), [qe, Ue] = l(!1), [bt, Je] = l(!1), [wt, Ye] = l(!1);
300
300
  j(() => {
301
301
  const e = () => {
302
302
  const n = h(), t = w(), r = n < 768 || n === 926 && t === 428 || n === 932 && t === 430, o = t < 700, p = n / t > 1.8, g = n === 768 && t === 1024, i = n === 1024 && t === 768, d = n === 820 && t === 1180, R = n === 1180 && t === 820, C = n === 540 && t === 720, ne = n === 720 && t === 540, ve = n === 1024 && t === 1366, ke = n === 1366 && t === 1024, Ie = n >= 1200 && t >= 600 && !r;
303
- Pe(Ie), Le(g), We(i), He(d), Oe(R), Ge(C), je(ne), Ve(ve), Ue(ke), Ye(p);
303
+ Pe(Ie), We(g), Me(i), He(d), Oe(R), Ge(C), je(ne), Ve(ve), Ue(ke), Ye(p);
304
304
  const ct = r && n > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
305
305
  t < 700 || p || // ✅ Широкие экраны
306
306
  n === 1366 && t === 766 || n === 1366 && t === 768 || n === 1280 && t === 720 || n === 1440 && t === 900 || g || i || d || R || C || ne || ve || ke || Ie;
@@ -383,19 +383,19 @@ function kt(f = {}) {
383
383
  }));
384
384
  me(r), ie([]), fe(e), ye.current = e, ge(pe || 20), P(null), _(!1), se(!1), z("play");
385
385
  };
386
- j(() => (S === "play" && !a && (q.current !== null && window.clearTimeout(q.current), W > 0 ? q.current = window.setTimeout(() => ge((e) => e - 1), 1e3) : _(!0)), () => {
386
+ j(() => (S === "play" && !a && (q.current !== null && window.clearTimeout(q.current), M > 0 ? q.current = window.setTimeout(() => ge((e) => e - 1), 1e3) : _(!0)), () => {
387
387
  q.current !== null && window.clearTimeout(q.current);
388
- }), [S, W, a]), j(() => {
389
- if (S === "play" && a && W === 0) {
388
+ }), [S, M, a]), j(() => {
389
+ if (S === "play" && a && M === 0) {
390
390
  const e = T[D];
391
391
  if (!e) {
392
392
  P(null);
393
393
  return;
394
394
  }
395
395
  const n = e.trim().split(/\s+/), t = I.map((i) => i.text), r = n.filter((i) => !t.includes(i)).length, o = t.filter((i) => !n.includes(i)).length, p = n.filter((i, d) => t.includes(i) ? t[d] !== i : !1).length, g = r + o + p;
396
- g === 0 ? (P("correct"), xe || (se(!0), G((i) => i + 1)), L("correct"), A("Correct! Well done!")) : g === 1 ? (P("almost"), G((i) => i + 0.5), L("half"), A("Almost correct! Just one mistake.")) : (P("wrong"), L("wrong"), A("Not quite right. Keep trying!"));
396
+ g === 0 ? (P("correct"), xe || (se(!0), G((i) => i + 1)), W("correct"), A("Correct! Well done!")) : g === 1 ? (P("almost"), G((i) => i + 0.5), W("half"), A("Almost correct! Just one mistake.")) : (P("wrong"), W("wrong"), A("Not quite right. Keep trying!"));
397
397
  }
398
- }, [S, a, W, T, D, I, xe]);
398
+ }, [S, a, M, T, D, I, xe]);
399
399
  const tt = (e = !0) => {
400
400
  if (e) {
401
401
  if (a) {
@@ -408,7 +408,7 @@ function kt(f = {}) {
408
408
  return;
409
409
  }
410
410
  const t = n.trim().split(/\s+/), r = I.map((d) => d.text), o = t.filter((d) => !r.includes(d)).length, p = r.filter((d) => !t.includes(d)).length, g = t.filter((d, R) => r.includes(d) ? r[R] !== d : !1).length, i = o + p + g;
411
- i === 0 ? (G((d) => d + 1), P("correct"), se(!0), L("correct"), A("Correct! Well done!")) : i === 1 ? (G((d) => d + 0.5), P("almost"), L("half"), A("Almost correct! Just one mistake.")) : (P("wrong"), L("wrong"), A("Not quite right. Keep trying!")), D + 1 < (E || 0) ? setTimeout(() => ee(D + 1), 800) : setTimeout(() => {
411
+ i === 0 ? (G((d) => d + 1), P("correct"), se(!0), W("correct"), A("Correct! Well done!")) : i === 1 ? (G((d) => d + 0.5), P("almost"), W("half"), A("Almost correct! Just one mistake.")) : (P("wrong"), W("wrong"), A("Not quite right. Keep trying!")), D + 1 < (E || 0) ? setTimeout(() => ee(D + 1), 800) : setTimeout(() => {
412
412
  z("results"), setTimeout(() => te(), 600);
413
413
  }, 800);
414
414
  }
@@ -416,7 +416,7 @@ function kt(f = {}) {
416
416
  j(() => {
417
417
  S === "results" && V > ae && (Te(V), localStorage.setItem("magicSentenceBest", String(V)));
418
418
  }, [S, V, ae]);
419
- const L = (e) => {
419
+ const W = (e) => {
420
420
  const n = new (window.AudioContext || window.webkitAudioContext)(), t = n.createOscillator(), r = n.createGain();
421
421
  switch (t.connect(r), r.connect(n.destination), e) {
422
422
  case "start":
@@ -452,14 +452,14 @@ function kt(f = {}) {
452
452
  }), Date.now() < n ? requestAnimationFrame(g) : document.body.removeChild(r);
453
453
  };
454
454
  g();
455
- }, nt = () => /* @__PURE__ */ y("div", { style: u.gmCenterScreen, children: [
456
- /* @__PURE__ */ l("h1", { style: u.gmHeadline1, children: "MAGIC SENTENCE" }),
457
- /* @__PURE__ */ l("p", { style: u.gmBodyM, children: "Select number of rounds" }),
458
- /* @__PURE__ */ l("div", { style: {
455
+ }, nt = () => /* @__PURE__ */ b("div", { style: u.gmCenterScreen, children: [
456
+ /* @__PURE__ */ c("h1", { style: u.gmHeadline1, children: "MAGIC SENTENCE" }),
457
+ /* @__PURE__ */ c("p", { style: u.gmBodyM, children: "Select number of rounds" }),
458
+ /* @__PURE__ */ c("div", { style: {
459
459
  display: "flex",
460
- gap: b() ? "8px" : "16px",
460
+ gap: y() ? "8px" : "16px",
461
461
  justifyContent: "center"
462
- }, children: [3, 4, 5].map((e) => /* @__PURE__ */ y(
462
+ }, children: [3, 4, 5].map((e) => /* @__PURE__ */ b(
463
463
  "button",
464
464
  {
465
465
  onClick: () => Ke(e),
@@ -474,14 +474,14 @@ function kt(f = {}) {
474
474
  },
475
475
  e
476
476
  )) })
477
- ] }), rt = () => /* @__PURE__ */ y("div", { style: u.gmCenterScreen, children: [
478
- /* @__PURE__ */ l("h1", { style: u.gmHeadline1, children: "MAGIC SENTENCE" }),
479
- /* @__PURE__ */ l("p", { style: u.gmBodyM, children: "Select time per round" }),
480
- /* @__PURE__ */ l("div", { style: {
477
+ ] }), rt = () => /* @__PURE__ */ b("div", { style: u.gmCenterScreen, children: [
478
+ /* @__PURE__ */ c("h1", { style: u.gmHeadline1, children: "MAGIC SENTENCE" }),
479
+ /* @__PURE__ */ c("p", { style: u.gmBodyM, children: "Select time per round" }),
480
+ /* @__PURE__ */ c("div", { style: {
481
481
  display: "flex",
482
- gap: b() ? "8px" : "16px",
482
+ gap: y() ? "8px" : "16px",
483
483
  justifyContent: "center"
484
- }, children: [15, 20, 30].map((e) => /* @__PURE__ */ y(
484
+ }, children: [15, 20, 30].map((e) => /* @__PURE__ */ b(
485
485
  "button",
486
486
  {
487
487
  onClick: () => Ze(e),
@@ -496,16 +496,16 @@ function kt(f = {}) {
496
496
  },
497
497
  e
498
498
  )) })
499
- ] }), ot = () => /* @__PURE__ */ y("div", { style: u.gmCenterScreen, children: [
500
- /* @__PURE__ */ y("h2", { style: { ...u.gmBodyM, marginBottom: "0px" }, children: [
499
+ ] }), ot = () => /* @__PURE__ */ b("div", { style: u.gmCenterScreen, children: [
500
+ /* @__PURE__ */ b("h2", { style: { ...u.gmBodyM, marginBottom: "0px" }, children: [
501
501
  "Type down ",
502
502
  E,
503
503
  " sentence",
504
504
  E && E > 1 ? "s" : "",
505
505
  " for your student"
506
506
  ] }),
507
- /* @__PURE__ */ l("p", { style: { ...u.gmBodyS, marginBottom: "16px", marginTop: "0px", color: "#6b7280" }, children: "Maximum 41 characters per sentence" }),
508
- /* @__PURE__ */ l("div", { style: {
507
+ /* @__PURE__ */ c("p", { style: { ...u.gmBodyS, marginBottom: "16px", marginTop: "0px", color: "#6b7280" }, children: "Maximum 41 characters per sentence" }),
508
+ /* @__PURE__ */ c("div", { style: {
509
509
  display: "flex",
510
510
  flexDirection: "column",
511
511
  gap: 12,
@@ -515,7 +515,7 @@ function kt(f = {}) {
515
515
  // Минимальная ширина по содержимому
516
516
  maxWidth: "600px"
517
517
  // Ограничиваем максимальную ширину
518
- }, children: T.map((e, n) => /* @__PURE__ */ l(
518
+ }, children: T.map((e, n) => /* @__PURE__ */ c(
519
519
  "input",
520
520
  {
521
521
  value: e,
@@ -523,8 +523,8 @@ function kt(f = {}) {
523
523
  onChange: (t) => _e(n, t.target.value),
524
524
  style: {
525
525
  ...u.gmInput,
526
- padding: b() ? "8px 12px" : "12px 16px",
527
- fontSize: b() ? "14px" : "16px",
526
+ padding: y() ? "8px 12px" : "12px 16px",
527
+ fontSize: y() ? "14px" : "16px",
528
528
  width: "100%",
529
529
  // Поля теперь будут шире благодаря увеличенной ширине контейнера
530
530
  textAlign: "center"
@@ -533,7 +533,7 @@ function kt(f = {}) {
533
533
  },
534
534
  n
535
535
  )) }),
536
- /* @__PURE__ */ l(
536
+ /* @__PURE__ */ c(
537
537
  "button",
538
538
  {
539
539
  onClick: et,
@@ -548,49 +548,49 @@ function kt(f = {}) {
548
548
  children: "PLAY"
549
549
  }
550
550
  )
551
- ] }), it = () => /* @__PURE__ */ y("div", { style: u.gmReadyWrapper, children: [
552
- /* @__PURE__ */ l("h1", { style: {
551
+ ] }), it = () => /* @__PURE__ */ b("div", { style: u.gmReadyWrapper, children: [
552
+ /* @__PURE__ */ c("h1", { style: {
553
553
  ...u.gmHeadline1,
554
554
  color: "#ec4c44"
555
555
  }, children: "GET READY" }),
556
- /* @__PURE__ */ l("div", { style: u.gmHourglass, children: "⏳" })
557
- ] }), st = () => /* @__PURE__ */ y("div", { style: u.gmGameLayout, children: [
558
- /* @__PURE__ */ y("h2", { style: {
559
- marginBottom: b() ? "5px" : "10px",
560
- fontSize: b() ? "16px" : "20px"
556
+ /* @__PURE__ */ c("div", { style: u.gmHourglass, children: "⏳" })
557
+ ] }), st = () => /* @__PURE__ */ b("div", { style: u.gmGameLayout, children: [
558
+ /* @__PURE__ */ b("h2", { style: {
559
+ marginBottom: y() ? "5px" : "10px",
560
+ fontSize: y() ? "16px" : "20px"
561
561
  }, children: [
562
562
  "Round ",
563
563
  D + 1,
564
564
  "/",
565
565
  E,
566
566
  " — ",
567
- a ? "TIME'S UP!" : `Time: ${W}s`
567
+ a ? "TIME'S UP!" : `Time: ${M}s`
568
568
  ] }),
569
- /* @__PURE__ */ l(
569
+ /* @__PURE__ */ c(
570
570
  "div",
571
571
  {
572
572
  style: {
573
573
  width: "60%",
574
- height: b() ? "8px" : "14px",
574
+ height: y() ? "8px" : "14px",
575
575
  borderRadius: 8,
576
576
  background: "#eee",
577
577
  overflow: "hidden",
578
- marginBottom: b() ? "10px" : "20px"
578
+ marginBottom: y() ? "10px" : "20px"
579
579
  },
580
- children: /* @__PURE__ */ l(
580
+ children: /* @__PURE__ */ c(
581
581
  "div",
582
582
  {
583
583
  style: {
584
584
  height: "100%",
585
- width: `${W / (pe || 20) * 100}%`,
586
- background: W <= 5 ? "#ec4c44" : "#4caf50",
585
+ width: `${M / (pe || 20) * 100}%`,
586
+ background: M <= 5 ? "#ec4c44" : "#4caf50",
587
587
  transition: "width 1s linear"
588
588
  }
589
589
  }
590
590
  )
591
591
  }
592
592
  ),
593
- /* @__PURE__ */ l(
593
+ /* @__PURE__ */ c(
594
594
  "div",
595
595
  {
596
596
  onDragOver: (e) => e.preventDefault(),
@@ -605,7 +605,7 @@ function kt(f = {}) {
605
605
  width: "100%",
606
606
  boxSizing: "border-box"
607
607
  },
608
- children: oe.map((e, n) => /* @__PURE__ */ l(
608
+ children: oe.map((e, n) => /* @__PURE__ */ c(
609
609
  "div",
610
610
  {
611
611
  draggable: !a,
@@ -666,7 +666,7 @@ function kt(f = {}) {
666
666
  ))
667
667
  }
668
668
  ),
669
- /* @__PURE__ */ l(
669
+ /* @__PURE__ */ c(
670
670
  "div",
671
671
  {
672
672
  onDragOver: (e) => e.preventDefault(),
@@ -702,7 +702,7 @@ function kt(f = {}) {
702
702
  overflowX: N() ? "hidden" : "auto",
703
703
  whiteSpace: N() ? "normal" : "nowrap"
704
704
  },
705
- children: I.map((e, n) => /* @__PURE__ */ l(
705
+ children: I.map((e, n) => /* @__PURE__ */ c(
706
706
  "span",
707
707
  {
708
708
  draggable: !a,
@@ -732,9 +732,9 @@ function kt(f = {}) {
732
732
  },
733
733
  title: a ? "Time expired" : "Click to remove back to bank",
734
734
  style: {
735
- padding: b() ? "4px 6px" : "6px 10px",
736
- margin: b() ? "2px" : "4px",
737
- borderRadius: b() ? "4px" : "8px",
735
+ padding: y() ? "4px 6px" : "6px 10px",
736
+ margin: y() ? "2px" : "4px",
737
+ borderRadius: y() ? "4px" : "8px",
738
738
  background: a ? "#f0f0f0" : "#ffe9e7",
739
739
  border: a ? "1px solid #ccc" : "1px solid #ec4c44",
740
740
  ...x.list === "selected" && x.id === e.id && x.side === "left" ? { borderLeft: "3px solid #3b82f6" } : {},
@@ -760,16 +760,16 @@ function kt(f = {}) {
760
760
  ))
761
761
  }
762
762
  ),
763
- /* @__PURE__ */ l(
763
+ /* @__PURE__ */ c(
764
764
  "button",
765
765
  {
766
766
  onClick: () => tt(!0),
767
767
  disabled: !a && I.length === 0,
768
768
  style: {
769
- marginTop: b() ? "15px" : "30px",
770
- fontSize: b() ? "14px" : "20px",
771
- padding: b() ? "6px 12px" : "10px 24px",
772
- borderRadius: b() ? "8px" : "12px",
769
+ marginTop: y() ? "15px" : "30px",
770
+ fontSize: y() ? "14px" : "20px",
771
+ padding: y() ? "6px 12px" : "10px 24px",
772
+ borderRadius: y() ? "8px" : "12px",
773
773
  background: a || I.length > 0 ? "#ec4c44" : "#ccc",
774
774
  color: "white",
775
775
  border: "none",
@@ -779,15 +779,15 @@ function kt(f = {}) {
779
779
  }
780
780
  )
781
781
  ] }), at = () => {
782
- const e = h(), n = w(), t = m && e > n || e === 896 && n === 414 || e === 844 && n === 390 || e === 926 && n === 428 || e === 932 && n === 430 || Be || Me || Ae || $e || Ne || Xe || Fe || qe, r = m && e <= 375 && n <= 667 || e === 896 && n === 414 || e === 844 && n === 390 || e === 926 && n === 428 || e === 932 && n === 430, o = e === 1366 && n === 766 || e === 1366 && n === 768 || e === 1280 && n === 720 || e === 1440 && n === 900;
783
- return /* @__PURE__ */ y("div", { style: u.gmCenterScreen, children: [
784
- /* @__PURE__ */ l("h1", { style: {
782
+ const e = h(), n = w(), t = m && e > n || e === 896 && n === 414 || e === 844 && n === 390 || e === 926 && n === 428 || e === 932 && n === 430 || Be || Le || Ae || $e || Ne || Xe || Fe || qe, r = m && e <= 375 && n <= 667 || e === 896 && n === 414 || e === 844 && n === 390 || e === 926 && n === 428 || e === 932 && n === 430, o = e === 1366 && n === 766 || e === 1366 && n === 768 || e === 1280 && n === 720 || e === 1440 && n === 900;
783
+ return /* @__PURE__ */ b("div", { style: u.gmCenterScreen, children: [
784
+ /* @__PURE__ */ c("h1", { style: {
785
785
  ...u.gmHeadline1,
786
786
  marginTop: "0px",
787
787
  marginBottom: t ? "2px" : "10px",
788
788
  fontSize: r ? "32px" : "clamp(28px, 4vw, 40px)"
789
789
  }, children: "Game Over 🎯" }),
790
- /* @__PURE__ */ y("h2", { style: {
790
+ /* @__PURE__ */ b("h2", { style: {
791
791
  ...u.gmHeadline2,
792
792
  marginTop: "0px",
793
793
  marginBottom: t ? "2px" : "16px",
@@ -798,7 +798,7 @@ function kt(f = {}) {
798
798
  " out of ",
799
799
  E
800
800
  ] }),
801
- /* @__PURE__ */ y("p", { style: {
801
+ /* @__PURE__ */ b("p", { style: {
802
802
  ...u.gmBodyM,
803
803
  color: "#10b981",
804
804
  marginTop: t ? "0px" : "12px",
@@ -808,16 +808,16 @@ function kt(f = {}) {
808
808
  "Best score: ",
809
809
  ae
810
810
  ] }),
811
- /* @__PURE__ */ y("div", { style: {
811
+ /* @__PURE__ */ b("div", { style: {
812
812
  display: "flex",
813
813
  gap: t || m && e <= 375 && n <= 667 ? "6px" : "12px",
814
814
  marginTop: t || m && e <= 375 && n <= 667 ? "2px" : o || Ee ? "12px" : "24px"
815
815
  }, children: [
816
- /* @__PURE__ */ l(
816
+ /* @__PURE__ */ c(
817
817
  "button",
818
818
  {
819
819
  onClick: () => {
820
- te(), L("start"), setTimeout(() => {
820
+ te(), W("start"), setTimeout(() => {
821
821
  z("getready"), he(null), _(!1);
822
822
  }, 800);
823
823
  },
@@ -828,11 +828,11 @@ function kt(f = {}) {
828
828
  children: "🔁 Play again"
829
829
  }
830
830
  ),
831
- /* @__PURE__ */ l(
831
+ /* @__PURE__ */ c(
832
832
  "button",
833
833
  {
834
834
  onClick: () => {
835
- L("click"), z("select"), de(null), ue(null), Z([]), G(0), ie([]), _(!1);
835
+ W("click"), z("select"), de(null), ue(null), Z([]), G(0), ie([]), _(!1);
836
836
  },
837
837
  style: {
838
838
  ...u.gmButton,
@@ -845,35 +845,26 @@ function kt(f = {}) {
845
845
  ] });
846
846
  }, Se = !m && v, lt = dt(
847
847
  () => {
848
- const e = h(), n = w();
849
- if (m && e > n || n < 700 || !Se)
848
+ const e = h(), n = w(), t = e >= 1200 && e <= 1400;
849
+ if (m && e > n || n < 700 && !t || !Se)
850
850
  return null;
851
- const t = s || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/magic%20sentence/logo` : "/cloud/speakid/games/magic%20sentence/logo");
852
- return /* @__PURE__ */ l("div", { style: u.gmLogoFixed, children: /* @__PURE__ */ y("picture", { children: [
853
- /* @__PURE__ */ l(
854
- "source",
855
- {
856
- srcSet: `${t}.svg`,
857
- type: "image/svg+xml"
858
- }
859
- ),
860
- /* @__PURE__ */ l(
861
- "img",
862
- {
863
- src: `${t}.png`,
864
- alt: "SPEAKID Logo",
865
- style: u.gmLogoImg,
866
- loading: "lazy"
867
- }
868
- )
869
- ] }) });
851
+ const r = s || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/magic%20sentence/logo` : "/cloud/speakid/games/magic%20sentence/logo");
852
+ return /* @__PURE__ */ c("div", { style: u.gmLogoFixed, children: /* @__PURE__ */ c(
853
+ "img",
854
+ {
855
+ src: `${r}.svg`,
856
+ alt: "SPEAKID Logo",
857
+ style: u.gmLogoImg,
858
+ loading: "lazy"
859
+ }
860
+ ) });
870
861
  },
871
862
  [m, Se, s, $, H]
872
863
  );
873
- return /* @__PURE__ */ l(
864
+ return /* @__PURE__ */ c(
874
865
  "div",
875
866
  {
876
- ref: M,
867
+ ref: L,
877
868
  style: {
878
869
  width: "100%",
879
870
  height: "100%",
@@ -889,7 +880,7 @@ function kt(f = {}) {
889
880
  right: 0,
890
881
  bottom: 0
891
882
  },
892
- children: /* @__PURE__ */ y(
883
+ children: /* @__PURE__ */ b(
893
884
  "div",
894
885
  {
895
886
  style: {
@@ -910,7 +901,7 @@ function kt(f = {}) {
910
901
  },
911
902
  children: [
912
903
  lt,
913
- /* @__PURE__ */ l(
904
+ /* @__PURE__ */ c(
914
905
  "div",
915
906
  {
916
907
  style: {
@@ -921,7 +912,7 @@ function kt(f = {}) {
921
912
  justifyContent: "center",
922
913
  alignItems: "center"
923
914
  },
924
- children: /* @__PURE__ */ y("div", { id: "magic-sentence-root", children: [
915
+ children: /* @__PURE__ */ b("div", { id: "magic-sentence-root", children: [
925
916
  S === "select" ? nt() : null,
926
917
  S === "time" ? rt() : null,
927
918
  S === "type" ? ot() : null,
@@ -957,7 +948,7 @@ class It extends pt {
957
948
  this.setState({ hasError: !1, error: void 0, errorInfo: void 0 });
958
949
  };
959
950
  render() {
960
- return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ y("div", { style: {
951
+ return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ b("div", { style: {
961
952
  display: "flex",
962
953
  flexDirection: "column",
963
954
  alignItems: "center",
@@ -969,9 +960,9 @@ class It extends pt {
969
960
  color: "#dc2626",
970
961
  fontFamily: "system-ui, sans-serif"
971
962
  }, children: [
972
- /* @__PURE__ */ l("h1", { style: { fontSize: "24px", marginBottom: "16px" }, children: "🚨 Oops! Something went wrong" }),
973
- /* @__PURE__ */ l("p", { style: { fontSize: "16px", marginBottom: "24px", maxWidth: "500px" }, children: "The game encountered an unexpected error. Don't worry, your progress is saved!" }),
974
- /* @__PURE__ */ l(
963
+ /* @__PURE__ */ c("h1", { style: { fontSize: "24px", marginBottom: "16px" }, children: "🚨 Oops! Something went wrong" }),
964
+ /* @__PURE__ */ c("p", { style: { fontSize: "16px", marginBottom: "24px", maxWidth: "500px" }, children: "The game encountered an unexpected error. Don't worry, your progress is saved!" }),
965
+ /* @__PURE__ */ c(
975
966
  "button",
976
967
  {
977
968
  onClick: this.handleReset,
@@ -990,9 +981,9 @@ class It extends pt {
990
981
  children: "🔄 Restart Game"
991
982
  }
992
983
  ),
993
- typeof process < "u" && process.env.NODE_ENV === "development" && this.state.error && /* @__PURE__ */ y("details", { style: { marginTop: "20px", textAlign: "left", maxWidth: "600px" }, children: [
994
- /* @__PURE__ */ l("summary", { style: { cursor: "pointer", fontSize: "14px" }, children: "Technical Details (Development Only)" }),
995
- /* @__PURE__ */ y("pre", { style: {
984
+ typeof process < "u" && process.env.NODE_ENV === "development" && this.state.error && /* @__PURE__ */ b("details", { style: { marginTop: "20px", textAlign: "left", maxWidth: "600px" }, children: [
985
+ /* @__PURE__ */ c("summary", { style: { cursor: "pointer", fontSize: "14px" }, children: "Technical Details (Development Only)" }),
986
+ /* @__PURE__ */ b("pre", { style: {
996
987
  backgroundColor: "#f3f4f6",
997
988
  padding: "12px",
998
989
  borderRadius: "4px",