speakid-hangman 1.0.5 → 1.0.7

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 n, jsxs as u, Fragment as O } from "react/jsx-runtime";
2
- import { useState as m, useMemo as X, useCallback as le, useEffect as de } from "react";
1
+ import { jsx as o, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
+ import { useState as m, useMemo as Q, useCallback as ue, useEffect as he } from "react";
3
3
  const a = {
4
4
  gmCenterScreen: {
5
5
  position: "relative",
@@ -202,16 +202,16 @@ const a = {
202
202
  display: "block"
203
203
  }
204
204
  };
205
- function Se({
206
- mistakes: r,
207
- maxMistakes: U,
208
- size: D = 200
205
+ function He({
206
+ mistakes: i,
207
+ maxMistakes: J,
208
+ size: _ = 200
209
209
  }) {
210
- const l = D, g = D * 1.25, b = Math.max(3, D / 100), T = 10 * (l / 200), f = 240 * (g / 250), x = 150 * (l / 200), y = 80 * (l / 200), K = 20 * (g / 250), G = 240 * (g / 250), w = 80 * (l / 200), Q = 20 * (g / 250), $ = 150 * (l / 200), B = 150 * (l / 200), M = 20 * (g / 250), z = 50 * (g / 250), v = 150 * (l / 200), W = 70 * (g / 250), N = 20 * (l / 200), S = 150 * (l / 200), q = 90 * (g / 250), E = 150 * (g / 250), h = 150 * (l / 200), F = 110 * (g / 250), p = 130 * (l / 200), C = 130 * (g / 250), J = 150 * (l / 200), H = 110 * (g / 250), ce = 170 * (l / 200), L = 130 * (g / 250), ee = 150 * (l / 200), _ = 150 * (g / 250), d = 130 * (l / 200), te = 190 * (g / 250), I = 150 * (l / 200), ne = 150 * (g / 250), s = 170 * (l / 200), V = 190 * (g / 250), c = r === 0 || r <= U * 0.5 ? "#1f2937" : r <= U * 0.75 ? "#f59e0b" : "#ec4c44";
211
- return /* @__PURE__ */ u(
210
+ const c = _, g = _ * 1.25, w = Math.max(3, _ / 100), C = 10 * (c / 200), x = 240 * (g / 250), y = 150 * (c / 200), b = 80 * (c / 200), ee = 20 * (g / 250), N = 240 * (g / 250), M = 80 * (c / 200), P = 20 * (g / 250), L = 150 * (c / 200), H = 150 * (c / 200), v = 20 * (g / 250), I = 50 * (g / 250), F = 150 * (c / 200), R = 70 * (g / 250), V = 20 * (c / 200), T = 150 * (c / 200), te = 90 * (g / 250), A = 150 * (g / 250), f = 150 * (c / 200), B = 110 * (g / 250), p = 130 * (c / 200), O = 130 * (g / 250), ne = 150 * (c / 200), E = 110 * (g / 250), me = 170 * (c / 200), z = 130 * (g / 250), oe = 150 * (c / 200), Z = 150 * (g / 250), d = 130 * (c / 200), re = 190 * (g / 250), j = 150 * (c / 200), ie = 150 * (g / 250), u = 170 * (c / 200), ae = 190 * (g / 250), k = i === 0 || i <= J * 0.5 ? "#1f2937" : i <= J * 0.75 ? "#f59e0b" : "#ec4c44";
211
+ return /* @__PURE__ */ h(
212
212
  "svg",
213
213
  {
214
- width: l,
214
+ width: c,
215
215
  height: g,
216
216
  viewBox: "0 0 200 250",
217
217
  style: {
@@ -225,129 +225,129 @@ function Se({
225
225
  // ✅ Включение аппаратного ускорения на iOS
226
226
  },
227
227
  children: [
228
- r > 0 && /* @__PURE__ */ n(
228
+ i > 0 && /* @__PURE__ */ o(
229
229
  "line",
230
230
  {
231
- x1: T,
232
- y1: f,
233
- x2: x,
234
- y2: f,
235
- stroke: c,
236
- strokeWidth: b
231
+ x1: C,
232
+ y1: x,
233
+ x2: y,
234
+ y2: x,
235
+ stroke: k,
236
+ strokeWidth: w
237
237
  }
238
238
  ),
239
- r > 1 && /* @__PURE__ */ n(
239
+ i > 1 && /* @__PURE__ */ o(
240
240
  "line",
241
241
  {
242
- x1: y,
243
- y1: K,
244
- x2: y,
245
- y2: G,
246
- stroke: c,
247
- strokeWidth: b
242
+ x1: b,
243
+ y1: ee,
244
+ x2: b,
245
+ y2: N,
246
+ stroke: k,
247
+ strokeWidth: w
248
248
  }
249
249
  ),
250
- r > 2 && /* @__PURE__ */ n(
250
+ i > 2 && /* @__PURE__ */ o(
251
251
  "line",
252
252
  {
253
- x1: w,
254
- y1: Q,
255
- x2: $,
256
- y2: Q,
257
- stroke: c,
258
- strokeWidth: b
253
+ x1: M,
254
+ y1: P,
255
+ x2: L,
256
+ y2: P,
257
+ stroke: k,
258
+ strokeWidth: w
259
259
  }
260
260
  ),
261
- r > 3 && /* @__PURE__ */ n(
261
+ i > 3 && /* @__PURE__ */ o(
262
262
  "line",
263
263
  {
264
- x1: B,
265
- y1: M,
266
- x2: B,
267
- y2: z,
268
- stroke: c,
269
- strokeWidth: b
264
+ x1: H,
265
+ y1: v,
266
+ x2: H,
267
+ y2: I,
268
+ stroke: k,
269
+ strokeWidth: w
270
270
  }
271
271
  ),
272
- r > 4 && /* @__PURE__ */ n(
272
+ i > 4 && /* @__PURE__ */ o(
273
273
  "circle",
274
274
  {
275
- cx: v,
276
- cy: W,
277
- r: N,
278
- stroke: c,
275
+ cx: F,
276
+ cy: R,
277
+ r: V,
278
+ stroke: k,
279
279
  fill: "none",
280
- strokeWidth: b
280
+ strokeWidth: w
281
281
  }
282
282
  ),
283
- r > 5 && /* @__PURE__ */ n(
283
+ i > 5 && /* @__PURE__ */ o(
284
284
  "line",
285
285
  {
286
- x1: S,
287
- y1: q,
288
- x2: S,
289
- y2: E,
290
- stroke: c,
291
- strokeWidth: b
286
+ x1: T,
287
+ y1: te,
288
+ x2: T,
289
+ y2: A,
290
+ stroke: k,
291
+ strokeWidth: w
292
292
  }
293
293
  ),
294
- r > 6 && /* @__PURE__ */ n(
294
+ i > 6 && /* @__PURE__ */ o(
295
295
  "line",
296
296
  {
297
- x1: h,
298
- y1: F,
297
+ x1: f,
298
+ y1: B,
299
299
  x2: p,
300
- y2: C,
301
- stroke: c,
302
- strokeWidth: b
300
+ y2: O,
301
+ stroke: k,
302
+ strokeWidth: w
303
303
  }
304
304
  ),
305
- r > 7 && /* @__PURE__ */ n(
305
+ i > 7 && /* @__PURE__ */ o(
306
306
  "line",
307
307
  {
308
- x1: J,
309
- y1: H,
310
- x2: ce,
311
- y2: L,
312
- stroke: c,
313
- strokeWidth: b
308
+ x1: ne,
309
+ y1: E,
310
+ x2: me,
311
+ y2: z,
312
+ stroke: k,
313
+ strokeWidth: w
314
314
  }
315
315
  ),
316
- r > 8 && /* @__PURE__ */ n(
316
+ i > 8 && /* @__PURE__ */ o(
317
317
  "line",
318
318
  {
319
- x1: ee,
320
- y1: _,
319
+ x1: oe,
320
+ y1: Z,
321
321
  x2: d,
322
- y2: te,
323
- stroke: c,
324
- strokeWidth: b
322
+ y2: re,
323
+ stroke: k,
324
+ strokeWidth: w
325
325
  }
326
326
  ),
327
- r > 9 && /* @__PURE__ */ n(
327
+ i > 9 && /* @__PURE__ */ o(
328
328
  "line",
329
329
  {
330
- x1: I,
331
- y1: ne,
332
- x2: s,
333
- y2: V,
334
- stroke: c,
335
- strokeWidth: b
330
+ x1: j,
331
+ y1: ie,
332
+ x2: u,
333
+ y2: ae,
334
+ stroke: k,
335
+ strokeWidth: w
336
336
  }
337
337
  )
338
338
  ]
339
339
  }
340
340
  );
341
341
  }
342
- function Te({
343
- gameCubeSize: r = 400,
344
- screenHeight: U = 800,
345
- screenWidth: D = 800,
346
- logoUrl: l,
342
+ function Ye({
343
+ gameCubeSize: i = 400,
344
+ screenHeight: J = 800,
345
+ screenWidth: _ = 800,
346
+ logoUrl: c,
347
347
  showLogo: g = !0,
348
- baseURL: b
348
+ baseURL: w
349
349
  } = {}) {
350
- const T = {
350
+ const C = {
351
351
  Professions: ["teacher", "doctor", "nurse", "driver", "police", "firefighter", "cook", "waiter", "farmer", "builder", "singer", "actor", "dentist", "pilot", "vet", "artist", "cleaner", "student", "baker", "mechanic"],
352
352
  Family: ["mother", "father", "sister", "brother", "grandmother", "grandfather", "aunt", "uncle", "cousin", "baby", "parents", "children", "wife", "husband", "son", "daughter", "family", "twins", "relatives"],
353
353
  "Farm animals": ["cow", "pig", "horse", "sheep", "goat", "duck", "chicken", "rooster", "turkey", "goose", "rabbit", "mouse", "donkey", "bee", "hen", "lamb", "bull", "pony"],
@@ -365,133 +365,130 @@ function Te({
365
365
  Environment: ["tree", "forest", "air", "water", "pollution", "recycle", "nature", "clean", "waste", "plastic", "energy", "animal", "climate", "earth", "ocean", "river", "planet", "save", "green", "environment", "litter", "organic"],
366
366
  Space: ["planet", "star", "sun", "moon", "astronaut", "rocket", "space", "galaxy", "universe", "telescope", "comet", "asteroid", "orbit", "gravity", "alien", "spaceship", "mars", "satellite", "sky", "eclipse"],
367
367
  Devices: ["computer", "laptop", "phone", "tablet", "tv", "keyboard", "mouse", "printer", "camera", "headphones", "charger", "screen", "watch", "microphone", "speaker", "console", "router", "battery", "cable", "remote"]
368
- }, [f, x] = m("lobby"), [y, K] = m(""), [G] = m("Normal"), [w, Q] = m(0), [$, B] = m(1), [M, z] = m(""), [v, W] = m([]), [N, S] = m(0), [q, E] = m(0), [h, F] = m(null), [p, C] = m(null), [J, H] = m(1), [ce, L] = m([]), ee = G === "Easy" ? 8 : G === "Normal" ? 6 : 4, _ = b || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman` : "/cloud/speakid/games/hangman"), [d, te] = m(!1), [I, ne] = m(!1), s = X(() => {
369
- const e = (p || r || 1e3) / 400;
368
+ }, [x, y] = m("lobby"), [b, ee] = m(""), [N] = m("Normal"), [M, P] = m(0), [L, H] = m(1), [v, I] = m(""), [F, R] = m([]), [V, T] = m(0), [te, A] = m(0), [f, B] = m(null), [p, O] = m(null), [ne, E] = m(1), [me, z] = m([]), oe = N === "Easy" ? 8 : N === "Normal" ? 6 : 4, Z = w || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman` : "/cloud/speakid/games/hangman"), [d, re] = m(!1), [j, ie] = m(!1), [u, ae] = m(!1), [$, k] = m(!1), s = Q(() => {
369
+ const e = (p || i || 1e3) / 400, t = u ? 0.8 : 1, r = $ ? 0.9 : 1, l = t * r;
370
370
  return {
371
- headline1: d ? Math.max(24, Math.min(30, 30 * e)) : Math.max(28, Math.min(32, 32 * e)),
371
+ headline1: d ? Math.max(24, Math.min(30, 30 * e * l)) : Math.max(28, Math.min(32, 32 * e * r)),
372
372
  // Desktop: 32px
373
- headline2: Math.max(20, Math.min(28, 24 * e)),
373
+ headline2: Math.max(20, Math.min(28, 24 * e * l)),
374
374
  // Desktop: 24px
375
- headline3: d ? Math.max(14, Math.min(18, 16 * e)) : Math.max(20, Math.min(26, 24 * e)),
375
+ headline3: d ? Math.max(14, Math.min(18, 16 * e * l)) : Math.max(20, Math.min(26, 24 * e * l)),
376
376
  // Desktop: 24px
377
- bodyL: Math.max(14, Math.min(20, 18 * e)),
377
+ bodyL: Math.max(14, Math.min(20, 18 * e * l)),
378
378
  // Desktop: 18px
379
- bodyM: d ? Math.max(12, Math.min(16, 14 * e)) : Math.max(14, Math.min(18, 16 * e)),
379
+ bodyM: d ? Math.max(12, Math.min(16, 14 * e * l)) : Math.max(14, Math.min(18, 16 * e * l)),
380
380
  // Desktop: 16px
381
- bodyS: d ? Math.max(10, Math.min(14, 12 * e)) : Math.max(12, Math.min(16, 14 * e)),
381
+ bodyS: d ? Math.max(10, Math.min(14, 12 * e * l)) : Math.max(12, Math.min(16, 14 * e * l)),
382
382
  // Desktop: 14px
383
- wordDisplay: Math.max(18, Math.min(32, 26 * e)),
383
+ wordDisplay: Math.max(18, Math.min(32, 26 * e * l)),
384
384
  // Адаптивный размер
385
- button: Math.max(12, Math.min(18, 16 * e))
385
+ button: Math.max(12, Math.min(18, 16 * e * l))
386
386
  // Desktop: 16px
387
387
  };
388
- }, [d, p, r]), V = X(() => {
389
- const e = (p || r || 1e3) / 400;
390
- return I ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e));
391
- }, [I, p, r]), o = X(() => {
392
- const e = (p || r || 1e3) / 400;
393
- return I ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e));
394
- }, [I, p, r]), c = X(() => {
395
- const e = (p || r || 1e3) / 400;
396
- return Math.max(6, Math.min(10, 8 * e));
397
- }, [p, r]), he = (e, t) => e.split("").every((i) => t.includes(i)), me = (e, t) => e.split("").map((i) => t.includes(i) ? i : "_").join(" "), fe = (e) => "abcdefghijklmnopqrstuvwxyz".split("").filter((i) => !e.includes(i)), Z = (e, t = []) => {
398
- var P;
399
- if (!e || !T[e]) {
400
- const k = Object.keys(T)[0];
401
- return ((P = T[k]) == null ? void 0 : P[0]) || "";
388
+ }, [d, p, i, u, $]), fe = Q(() => {
389
+ const e = (p || i || 1e3) / 400, t = u ? 0.65 : 1, r = $ ? 0.85 : 1;
390
+ return j ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e)) * t * r;
391
+ }, [j, p, i, u, $]), n = Q(() => {
392
+ const e = (p || i || 1e3) / 400, t = u ? 0.65 : 1, r = $ ? 0.85 : 1;
393
+ return j ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e)) * t * r;
394
+ }, [j, p, i, u, $]), S = Q(() => {
395
+ const e = (p || i || 1e3) / 400, t = $ ? 0.9 : 1;
396
+ return Math.max(6, Math.min(10, 8 * e * t));
397
+ }, [p, i, $]), we = (e, t) => e.split("").every((r) => t.includes(r)), ke = (e, t) => e.split("").map((r) => t.includes(r) ? r : "_").join(" "), Me = (e) => "abcdefghijklmnopqrstuvwxyz".split("").filter((r) => !e.includes(r)), U = (e, t = []) => {
398
+ var q;
399
+ if (!e || !C[e]) {
400
+ const W = Object.keys(C)[0];
401
+ return ((q = C[W]) == null ? void 0 : q[0]) || "";
402
402
  }
403
- const i = T[e];
404
- if (!i || i.length === 0)
403
+ const r = C[e];
404
+ if (!r || r.length === 0)
405
405
  return "";
406
- const R = i.filter((k) => !t.includes(k)), j = R.length > 0 ? R : i;
407
- if (j.length === 0)
406
+ const l = r.filter((W) => !t.includes(W)), Y = l.length > 0 ? l : r;
407
+ if (Y.length === 0)
408
408
  return "";
409
- let A;
409
+ let D;
410
410
  if (typeof crypto < "u" && crypto.getRandomValues) {
411
- const k = new Uint32Array(1);
412
- crypto.getRandomValues(k);
413
- const ue = k[0] / 4294967295;
414
- A = Math.floor(ue * j.length);
411
+ const W = new Uint32Array(1);
412
+ crypto.getRandomValues(W);
413
+ const ge = W[0] / 4294967295;
414
+ D = Math.floor(ge * Y.length);
415
415
  } else
416
- A = Math.floor(Math.random() * j.length);
417
- return j[A];
418
- }, xe = () => {
419
- if (!y) return;
420
- L([]);
421
- const e = Z(y, []);
416
+ D = Math.floor(Math.random() * Y.length);
417
+ return Y[D];
418
+ }, $e = () => {
419
+ if (!b) return;
420
+ z([]);
421
+ const e = U(b, []);
422
422
  if (!e) {
423
- x("category");
423
+ y("category");
424
424
  return;
425
425
  }
426
- z(e), L([e]), W([]), S(0), B(1), E(0), F(null), x("game");
427
- }, oe = le((e) => {
428
- if (f !== "game" || h !== null) return;
426
+ I(e), z([e]), R([]), T(0), H(1), A(0), B(null), y("game");
427
+ }, se = ue((e) => {
428
+ if (x !== "game" || f !== null) return;
429
429
  const t = e.toLowerCase();
430
- /^[a-z]$/.test(t) && (W((i) => i.includes(t) ? i : [...i, t]), z((i) => (i && !i.includes(t) && S((R) => R + 1), i)));
431
- }, [f, h]), re = le((e) => {
432
- oe(e.key);
433
- }, [oe]);
434
- de(() => {
435
- if (f === "game")
436
- return window.addEventListener("keydown", re), () => window.removeEventListener("keydown", re);
437
- }, [f, re]);
438
- const ye = M ? me(M, v) : "", ge = M ? he(M, v) : !1, pe = N >= 10, be = fe(v), ie = le(() => {
439
- if (!y || $ >= w) {
440
- x("result");
430
+ /^[a-z]$/.test(t) && (R((r) => r.includes(t) ? r : [...r, t]), I((r) => (r && !r.includes(t) && T((l) => l + 1), r)));
431
+ }, [x, f]), le = ue((e) => {
432
+ se(e.key);
433
+ }, [se]);
434
+ he(() => {
435
+ if (x === "game")
436
+ return window.addEventListener("keydown", le), () => window.removeEventListener("keydown", le);
437
+ }, [x, le]);
438
+ const Se = v ? ke(v, F) : "", xe = v ? we(v, F) : !1, ye = V >= 10, ve = Me(F), ce = ue(() => {
439
+ if (!b || L >= M) {
440
+ y("result");
441
441
  return;
442
442
  }
443
- B((e) => e + 1), L((e) => {
444
- const t = Z(y, e);
445
- return t ? (z(t), [...e, t]) : e;
446
- }), W([]), S(0), F(null);
447
- }, [y, $, w]);
448
- de(() => {
449
- if (ge && h === null) {
450
- F("win"), E((t) => t + 1);
443
+ H((e) => e + 1), z((e) => {
444
+ const t = U(b, e);
445
+ return t ? (I(t), [...e, t]) : e;
446
+ }), R([]), T(0), B(null);
447
+ }, [b, L, M]);
448
+ he(() => {
449
+ if (xe && f === null) {
450
+ B("win"), A((t) => t + 1);
451
451
  const e = setTimeout(() => {
452
- ie();
452
+ ce();
453
453
  }, 2e3);
454
454
  return () => clearTimeout(e);
455
455
  }
456
- if (pe && h === null) {
457
- F("lose");
456
+ if (ye && f === null) {
457
+ B("lose");
458
458
  const e = setTimeout(() => {
459
- ie();
459
+ ce();
460
460
  }, 2e3);
461
461
  return () => clearTimeout(e);
462
462
  }
463
- }, [ge, pe, h, ie]);
464
- const ke = () => {
465
- if (!y || $ >= w) {
466
- x("result");
463
+ }, [xe, ye, f, ce]);
464
+ const Le = () => {
465
+ if (!b || L >= M) {
466
+ y("result");
467
467
  return;
468
468
  }
469
- B((e) => e + 1), L((e) => {
470
- const t = Z(y, e);
471
- return t ? (z(t), [...e, t]) : e;
472
- }), W([]), S(0), F(null);
469
+ H((e) => e + 1), z((e) => {
470
+ const t = U(b, e);
471
+ return t ? (I(t), [...e, t]) : e;
472
+ }), R([]), T(0), B(null);
473
473
  };
474
- de(() => {
474
+ he(() => {
475
475
  const e = () => {
476
- const t = window.innerWidth, i = window.innerHeight, R = t < 768 || t === 926 && i === 428 || t === 932 && i === 430, j = i < 700, A = t / i > 1.8, P = t === 1024 && i === 600;
477
- if (te(R), ne(P), r && r >= 320) {
478
- const ve = Math.max(320, Math.min(1200, r));
479
- C(ve), H(1);
480
- } else if (R)
481
- C(null), H(1);
482
- else if (j)
483
- C(null), H(1);
484
- else if (A) {
485
- const k = Math.min(1e3, Math.min(t, i) * 0.9);
486
- C(k), H(0.85);
487
- } else {
488
- const k = Math.min(1e3, Math.min(t, i) * 0.9);
489
- C(k), H(1);
476
+ const t = window.innerWidth, r = window.innerHeight, l = t < 768 || t === 926 && r === 428 || t === 932 && r === 430, Y = r < 700, D = t / r > 1.8, q = t === 1024 && r === 600, W = l && t > r, ge = t >= 1200 && t <= 1400;
477
+ if (re(l), ie(q), ae(W), k(ge), l)
478
+ O(null), E(1);
479
+ else if (Y)
480
+ O(null), E(1);
481
+ else {
482
+ const ze = t - 80, We = r - 80, be = Math.min(ze, We);
483
+ let pe;
484
+ i && i >= 320 ? pe = Math.min(i, be) : pe = Math.min(1e3, be * 0.9);
485
+ const Ce = Math.max(400, Math.min(1200, pe));
486
+ O(Ce), E(D ? 0.85 : 1);
490
487
  }
491
488
  };
492
489
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
493
- }, [r]);
494
- const se = `
490
+ }, [i]);
491
+ const K = `
495
492
  <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0.2;">
496
493
  <!-- Каракули мелками и фломастерами -->
497
494
 
@@ -535,35 +532,36 @@ function Te({
535
532
  <path d="M 35% 85% Q 37% 83%, 39% 85% T 43% 85% T 47% 85%"
536
533
  fill="none" stroke="#FF4500" stroke-width="3.5" stroke-linecap="round"/>
537
534
  </svg>
538
- `, we = !d && typeof window < "u" && window.innerWidth >= 768 && window.innerWidth < 1024, ae = !d && g && (f !== "game" || we), Me = {
535
+ `, Fe = !d && typeof window < "u" && window.innerWidth >= 768 && window.innerWidth < 1024, de = !d && g && (x !== "game" || Fe), Te = {
539
536
  ...a.gmCenterScreen,
540
537
  width: "100%",
541
538
  height: "100%",
542
- padding: `${V}px`,
543
- paddingTop: ae ? "60px" : `${V}px`,
539
+ padding: `${fe}px`,
540
+ paddingTop: de ? "60px" : `${fe}px`,
544
541
  // ✅ Резервируем место под логотип (16px top + 28px высота + 16px отступ)
545
- overflow: "auto",
542
+ overflow: $ ? "hidden" : "auto",
543
+ // ✅ Для разрешений 1200-1400 убираем скролл
546
544
  position: "relative",
547
545
  boxSizing: "border-box",
548
546
  background: "transparent"
549
- }, Y = X(
547
+ }, X = Q(
550
548
  () => {
551
549
  const e = window.innerWidth, t = window.innerHeight;
552
- if (d && e > t || t < 700 || !ae)
550
+ if (d && e > t || t < 700 || !de)
553
551
  return null;
554
- const i = l || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman/logo` : "/cloud/speakid/games/hangman/logo");
555
- return /* @__PURE__ */ n("div", { style: a.gmLogoFixed, children: /* @__PURE__ */ u("picture", { children: [
556
- /* @__PURE__ */ n(
552
+ const r = c || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman/logo` : "/cloud/speakid/games/hangman/logo");
553
+ return /* @__PURE__ */ o("div", { style: a.gmLogoFixed, children: /* @__PURE__ */ h("picture", { children: [
554
+ /* @__PURE__ */ o(
557
555
  "source",
558
556
  {
559
- srcSet: `${i}.svg`,
557
+ srcSet: `${r}.svg`,
560
558
  type: "image/svg+xml"
561
559
  }
562
560
  ),
563
- /* @__PURE__ */ n(
561
+ /* @__PURE__ */ o(
564
562
  "img",
565
563
  {
566
- src: `${i}.png`,
564
+ src: `${r}.png`,
567
565
  alt: "SPEAKID Logo",
568
566
  style: a.gmLogoImg,
569
567
  loading: "lazy"
@@ -571,28 +569,28 @@ function Te({
571
569
  )
572
570
  ] }) });
573
571
  },
574
- [d, ae, l, f]
575
- ), $e = () => f === "lobby" ? /* @__PURE__ */ u(O, { children: [
576
- Y,
577
- /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
578
- /* @__PURE__ */ n("h1", { style: {
572
+ [d, de, c, x]
573
+ ), Be = () => x === "lobby" ? /* @__PURE__ */ h(G, { children: [
574
+ X,
575
+ /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
576
+ /* @__PURE__ */ o("h1", { style: {
579
577
  ...a.gmHeadline1,
580
578
  fontSize: `${s.headline1}px`,
581
- marginBottom: `${o * 3}px`,
579
+ marginBottom: `${n * 3}px`,
582
580
  position: "relative",
583
581
  zIndex: 1
584
582
  }, children: "HANGMAN" }),
585
- /* @__PURE__ */ u(
583
+ /* @__PURE__ */ h(
586
584
  "button",
587
585
  {
588
- onClick: () => x("category"),
586
+ onClick: () => y("category"),
589
587
  style: {
590
588
  fontFamily: '"Onest", system-ui, sans-serif',
591
589
  fontWeight: 500,
592
590
  // Medium для более заметности
593
591
  fontSize: `${s.button}px`,
594
- padding: `${o * 1.2}px ${o * 3}px`,
595
- borderRadius: `${c * 1.5}px`,
592
+ padding: `${n * 1.2}px ${n * 3}px`,
593
+ borderRadius: `${S * 1.5}px`,
596
594
  position: "relative",
597
595
  zIndex: 1,
598
596
  display: "flex",
@@ -616,7 +614,7 @@ function Te({
616
614
  e.currentTarget.style.transform = "translateY(0)";
617
615
  },
618
616
  children: [
619
- /* @__PURE__ */ n(
617
+ /* @__PURE__ */ o(
620
618
  "svg",
621
619
  {
622
620
  width: `${s.button * 1.3}px`,
@@ -624,8 +622,8 @@ function Te({
624
622
  viewBox: "0 0 24 24",
625
623
  fill: "none",
626
624
  xmlns: "http://www.w3.org/2000/svg",
627
- style: { display: "block", marginRight: `${o}px` },
628
- children: /* @__PURE__ */ n(
625
+ style: { display: "block", marginRight: `${n}px` },
626
+ children: /* @__PURE__ */ o(
629
627
  "path",
630
628
  {
631
629
  d: "M8 5V19L19 12L8 5Z",
@@ -635,11 +633,11 @@ function Te({
635
633
  )
636
634
  }
637
635
  ),
638
- /* @__PURE__ */ n("span", { style: { fontWeight: 500 }, children: "PLAY" })
636
+ /* @__PURE__ */ o("span", { style: { fontWeight: 500 }, children: "PLAY" })
639
637
  ]
640
638
  }
641
639
  ),
642
- /* @__PURE__ */ u("div", { style: {
640
+ /* @__PURE__ */ h("div", { style: {
643
641
  position: "absolute",
644
642
  top: "50%",
645
643
  left: "50%",
@@ -649,34 +647,34 @@ function Te({
649
647
  pointerEvents: "none",
650
648
  zIndex: 0
651
649
  }, children: [
652
- /* @__PURE__ */ n(
650
+ /* @__PURE__ */ o(
653
651
  "img",
654
652
  {
655
- src: `${_}/sun.png`,
653
+ src: `${Z}/sun.png`,
656
654
  alt: "Sun",
657
655
  style: {
658
656
  position: "absolute",
659
657
  left: d ? "-10%" : "5%",
660
658
  top: "20%",
661
659
  width: "auto",
662
- height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
660
+ height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || i || 1e3) * 0.33, 300)}px`,
663
661
  maxHeight: "33vh",
664
662
  objectFit: "contain",
665
663
  opacity: 0.6
666
664
  }
667
665
  }
668
666
  ),
669
- /* @__PURE__ */ n(
667
+ /* @__PURE__ */ o(
670
668
  "img",
671
669
  {
672
- src: `${_}/character.png`,
670
+ src: `${Z}/character.png`,
673
671
  alt: "Hangman character",
674
672
  style: {
675
673
  position: "absolute",
676
674
  right: d ? "5%" : "10%",
677
675
  bottom: "10%",
678
676
  width: "auto",
679
- height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
677
+ height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || i || 1e3) * 0.33, 300)}px`,
680
678
  maxHeight: "33vh",
681
679
  objectFit: "contain",
682
680
  opacity: 0.6
@@ -684,13 +682,13 @@ function Te({
684
682
  }
685
683
  )
686
684
  ] })
687
- ] }) : f === "category" ? /* @__PURE__ */ u(O, { children: [
688
- Y,
689
- /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
690
- /* @__PURE__ */ n(
685
+ ] }) : x === "category" ? /* @__PURE__ */ h(G, { children: [
686
+ X,
687
+ /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
688
+ /* @__PURE__ */ o(
691
689
  "button",
692
690
  {
693
- onClick: () => x("lobby"),
691
+ onClick: () => y("lobby"),
694
692
  onMouseEnter: (e) => {
695
693
  e.currentTarget.style.backgroundColor = "#e5e7eb";
696
694
  },
@@ -701,8 +699,8 @@ function Te({
701
699
  ...a.gmButton,
702
700
  ...a.gmButtonSecondary,
703
701
  fontSize: `${s.button}px`,
704
- padding: `${o}px ${o * 1.5}px`,
705
- borderRadius: `${c}px`,
702
+ padding: `${n}px ${n * 1.5}px`,
703
+ borderRadius: `${S}px`,
706
704
  position: "absolute",
707
705
  top: "52px",
708
706
  // ✅ Под логотипом (16px top логотипа + 28px высота логотипа + 8px отступ)
@@ -713,11 +711,11 @@ function Te({
713
711
  children: "←"
714
712
  }
715
713
  ),
716
- /* @__PURE__ */ n("div", { style: { ...a.gmButtonGroup, gap: `${o}px`, marginBottom: `${o * 3}px`, marginTop: `${o * 4}px`, position: "relative", zIndex: 1 }, children: Object.keys(T).map((e) => /* @__PURE__ */ n(
714
+ /* @__PURE__ */ o("div", { style: { ...a.gmButtonGroup, gap: `${n}px`, marginBottom: `${n * 3}px`, marginTop: `${n * 4}px`, position: "relative", zIndex: 1 }, children: Object.keys(C).map((e) => /* @__PURE__ */ o(
717
715
  "button",
718
716
  {
719
717
  onClick: () => {
720
- K(e), x("rounds");
718
+ ee(e), y("rounds");
721
719
  },
722
720
  onMouseEnter: (t) => {
723
721
  t.currentTarget.style.backgroundColor = "#f0f0f0", t.currentTarget.style.borderColor = "#1f2937", t.currentTarget.style.transform = "scale(1.05)";
@@ -729,10 +727,10 @@ function Te({
729
727
  fontFamily: '"Onest", system-ui, sans-serif',
730
728
  fontWeight: 500,
731
729
  fontSize: `${s.button}px`,
732
- padding: `${o * 1.2}px ${o * 2}px`,
733
- borderRadius: `${c * 2}px`,
730
+ padding: `${n * 1.2}px ${n * 2}px`,
731
+ borderRadius: `${S * 2}px`,
734
732
  // Более округлые для облачков
735
- margin: `${o / 2}px`,
733
+ margin: `${n / 2}px`,
736
734
  background: "transparent",
737
735
  border: "2px solid #e5e7eb",
738
736
  color: "#1f2937",
@@ -744,13 +742,13 @@ function Te({
744
742
  },
745
743
  e
746
744
  )) })
747
- ] }) : f === "rounds" ? /* @__PURE__ */ u(O, { children: [
748
- Y,
749
- /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: se } }),
750
- /* @__PURE__ */ n(
745
+ ] }) : x === "rounds" ? /* @__PURE__ */ h(G, { children: [
746
+ X,
747
+ /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
748
+ /* @__PURE__ */ o(
751
749
  "button",
752
750
  {
753
- onClick: () => x("category"),
751
+ onClick: () => y("category"),
754
752
  onMouseEnter: (e) => {
755
753
  e.currentTarget.style.backgroundColor = "#e5e7eb";
756
754
  },
@@ -761,8 +759,8 @@ function Te({
761
759
  ...a.gmButton,
762
760
  ...a.gmButtonSecondary,
763
761
  fontSize: `${s.button}px`,
764
- padding: `${o}px ${o * 1.5}px`,
765
- borderRadius: `${c}px`,
762
+ padding: `${n}px ${n * 1.5}px`,
763
+ borderRadius: `${S}px`,
766
764
  position: "absolute",
767
765
  top: "52px",
768
766
  // ✅ Под логотипом (16px top логотипа + 28px высота логотипа + 8px отступ)
@@ -773,12 +771,12 @@ function Te({
773
771
  children: "←"
774
772
  }
775
773
  ),
776
- /* @__PURE__ */ n("h1", { style: { ...a.gmHeadline1, fontSize: `${s.headline1}px`, marginBottom: `${o * 2}px`, position: "relative", zIndex: 1 }, children: "Choose rounds" }),
777
- /* @__PURE__ */ n("div", { style: { ...a.gmButtonGroup, gap: `${o}px`, marginBottom: `${o * 3}px`, position: "relative", zIndex: 1 }, children: [1, 3, 5].map((e) => /* @__PURE__ */ n(
774
+ /* @__PURE__ */ o("h1", { style: { ...a.gmHeadline1, fontSize: `${s.headline1}px`, marginBottom: `${n * 2}px`, position: "relative", zIndex: 1 }, children: "Choose rounds" }),
775
+ /* @__PURE__ */ o("div", { style: { ...a.gmButtonGroup, gap: `${n}px`, marginBottom: `${n * 3}px`, position: "relative", zIndex: 1 }, children: [1, 3, 5].map((e) => /* @__PURE__ */ o(
778
776
  "button",
779
777
  {
780
778
  onClick: () => {
781
- Q(e), xe();
779
+ P(e), $e();
782
780
  },
783
781
  onMouseEnter: (t) => {
784
782
  t.currentTarget.style.backgroundColor = "#f0f0f0", t.currentTarget.style.borderColor = "#1f2937", t.currentTarget.style.transform = "scale(1.05)";
@@ -790,10 +788,10 @@ function Te({
790
788
  fontFamily: '"Onest", system-ui, sans-serif',
791
789
  fontWeight: 500,
792
790
  fontSize: `${s.button}px`,
793
- padding: `${o * 1.2}px ${o * 2}px`,
794
- borderRadius: `${c * 2}px`,
791
+ padding: `${n * 1.2}px ${n * 2}px`,
792
+ borderRadius: `${S * 2}px`,
795
793
  // Более округлые для облачков
796
- margin: `${o / 2}px`,
794
+ margin: `${n / 2}px`,
797
795
  background: "transparent",
798
796
  border: "2px solid #e5e7eb",
799
797
  color: "#1f2937",
@@ -805,97 +803,108 @@ function Te({
805
803
  },
806
804
  e
807
805
  )) })
808
- ] }) : f === "game" ? /* @__PURE__ */ u(O, { children: [
809
- Y,
810
- /* @__PURE__ */ u("div", { style: {
806
+ ] }) : x === "game" ? /* @__PURE__ */ h(G, { children: [
807
+ X,
808
+ !u && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
809
+ " ",
810
+ /* @__PURE__ */ h("div", { style: {
811
811
  ...a.gmInfoBox,
812
- padding: `${o * 0.8}px`,
813
- marginBottom: `${o * 0.5}px`,
814
- maxWidth: `${(p || r) * 0.9}px`
812
+ padding: `${u ? n * 0.6 : n * 0.8}px`,
813
+ // Уменьшаем padding в landscape
814
+ marginBottom: `${u ? n * 0.3 : n * 0.5}px`,
815
+ // ✅ Уменьшаем margin в landscape
816
+ maxWidth: `${(p || i) * 0.9}px`
815
817
  }, children: [
816
- /* @__PURE__ */ u("h3", { style: { ...a.gmHeadline3, fontSize: `${s.headline3}px`, marginBottom: `${o * 0.5}px` }, children: [
818
+ /* @__PURE__ */ h("h3", { style: { ...a.gmHeadline3, fontSize: `${s.headline3}px`, marginBottom: `${n * 0.5}px` }, children: [
817
819
  "Category: ",
818
- y
820
+ b
819
821
  ] }),
820
- /* @__PURE__ */ u("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
822
+ /* @__PURE__ */ h("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
821
823
  "Round ",
822
- $,
824
+ L,
823
825
  " of ",
824
- w
826
+ M
825
827
  ] })
826
828
  ] }),
827
- M && /* @__PURE__ */ u("p", { style: {
829
+ v && /* @__PURE__ */ h("p", { style: {
828
830
  ...a.gmBodyS,
829
831
  fontSize: `${s.bodyS}px`,
830
- marginTop: `${o * 0.5}px`,
831
- marginBottom: `${o}px`
832
+ marginTop: `${u ? n * 0.3 : n * 0.5}px`,
833
+ // ✅ Уменьшаем margin в landscape
834
+ marginBottom: `${u ? n * 0.5 : n}px`
835
+ // ✅ Уменьшаем margin в landscape
832
836
  }, children: [
833
837
  "I am thinking of a word that is ",
834
- /* @__PURE__ */ n("strong", { children: M.length }),
838
+ /* @__PURE__ */ o("strong", { children: v.length }),
835
839
  " letters long"
836
840
  ] }),
837
- /* @__PURE__ */ n("div", { style: {
838
- margin: `${o}px 0`,
841
+ /* @__PURE__ */ o("div", { style: {
842
+ margin: `${u ? n * 0.5 : n}px 0`,
843
+ // ✅ Уменьшаем margin в landscape
839
844
  display: "flex",
840
845
  justifyContent: "center",
841
846
  alignItems: "center"
842
- }, children: /* @__PURE__ */ n(
843
- Se,
847
+ }, children: /* @__PURE__ */ o(
848
+ He,
844
849
  {
845
- mistakes: N,
846
- maxMistakes: ee,
847
- size: I ? Math.max(80, Math.min(110, (p || r) * 0.16)) : d ? Math.max(100, Math.min(150, Math.min(window.innerWidth * 0.3, window.innerHeight * 0.2))) : Math.max(100, Math.min(150, (p || r) * 0.2))
850
+ mistakes: V,
851
+ maxMistakes: oe,
852
+ size: j ? Math.max(80, Math.min(110, (p || i) * 0.16)) : d ? u ? Math.max(70, Math.min(120, Math.min(window.innerWidth * 0.25, window.innerHeight * 0.15))) : Math.max(100, Math.min(150, Math.min(window.innerWidth * 0.3, window.innerHeight * 0.2))) : Math.max(100, Math.min(150, (p || i) * 0.2))
848
853
  }
849
854
  ) }),
850
- /* @__PURE__ */ n("div", { style: {
855
+ /* @__PURE__ */ o("div", { style: {
851
856
  ...a.gmWordDisplay,
852
857
  fontSize: `${Math.max(16, Math.min(24, s.wordDisplay * 0.9))}px`,
853
- margin: `${o}px 0`,
854
- letterSpacing: `${o * 0.8}px`,
858
+ margin: `${u ? n * 0.5 : n}px 0`,
859
+ // Уменьшаем margin в landscape
860
+ letterSpacing: `${n * 0.8}px`,
855
861
  minHeight: `${Math.max(16, Math.min(24, s.wordDisplay * 0.9)) * 1.2}px`
856
- }, children: ye || "Loading..." }),
857
- /* @__PURE__ */ u("div", { style: {
862
+ }, children: Se || "Loading..." }),
863
+ /* @__PURE__ */ h("div", { style: {
858
864
  ...a.gmInfoBox,
859
- padding: `${o}px`,
860
- marginTop: `${o}px`,
861
- marginBottom: `${o}px`,
862
- maxWidth: `${(p || r) * 0.95}px`
865
+ padding: `${u ? n * 0.6 : n}px`,
866
+ // ✅ Уменьшаем padding в landscape
867
+ marginTop: `${u ? n * 0.5 : n}px`,
868
+ // Уменьшаем margin в landscape
869
+ marginBottom: `${u ? n * 0.5 : n}px`,
870
+ // ✅ Уменьшаем margin в landscape
871
+ maxWidth: `${(p || i) * 0.95}px`
863
872
  }, children: [
864
- /* @__PURE__ */ n("p", { style: {
873
+ /* @__PURE__ */ o("p", { style: {
865
874
  ...a.gmBodyS,
866
875
  fontSize: `${s.bodyS}px`,
867
- marginBottom: `${o}px`,
876
+ marginBottom: `${n}px`,
868
877
  fontWeight: 500
869
878
  // Medium
870
879
  }, children: "Available letters:" }),
871
- /* @__PURE__ */ n("div", { style: {
880
+ /* @__PURE__ */ o("div", { style: {
872
881
  display: "flex",
873
882
  flexWrap: "wrap",
874
- gap: `${o / 3}px`,
883
+ gap: `${n / 3}px`,
875
884
  justifyContent: "center",
876
885
  fontSize: `${Math.max(9, Math.min(12, s.bodyS * 0.75))}px`,
877
886
  fontFamily: '"Onest", system-ui, sans-serif'
878
- }, children: be.map((e) => /* @__PURE__ */ n(
887
+ }, children: ve.map((e) => /* @__PURE__ */ o(
879
888
  "button",
880
889
  {
881
- onClick: () => oe(e),
882
- disabled: h !== null,
890
+ onClick: () => se(e),
891
+ disabled: f !== null,
883
892
  onMouseEnter: (t) => {
884
- h === null && (t.currentTarget.style.backgroundColor = "#e5e7eb", t.currentTarget.style.cursor = "pointer");
893
+ f === null && (t.currentTarget.style.backgroundColor = "#e5e7eb", t.currentTarget.style.cursor = "pointer");
885
894
  },
886
895
  onMouseLeave: (t) => {
887
- h === null && (t.currentTarget.style.backgroundColor = "#f9f9f9", t.currentTarget.style.cursor = "pointer");
896
+ f === null && (t.currentTarget.style.backgroundColor = "#f9f9f9", t.currentTarget.style.cursor = "pointer");
888
897
  },
889
898
  style: {
890
- padding: `${o / 4}px ${o / 3}px`,
891
- borderRadius: `${c * 0.5}px`,
899
+ padding: `${n / 4}px ${n / 3}px`,
900
+ borderRadius: `${S * 0.5}px`,
892
901
  background: "#f9f9f9",
893
902
  color: "#1f2937",
894
903
  border: "1px solid #e5e7eb",
895
- minWidth: `${Math.max(o * 1.5, (p || r) * 0.04)}px`,
904
+ minWidth: `${Math.max(n * 1.5, (p || i) * 0.04)}px`,
896
905
  textAlign: "center",
897
906
  display: "inline-block",
898
- cursor: h === null ? "pointer" : "default",
907
+ cursor: f === null ? "pointer" : "default",
899
908
  fontFamily: '"Onest", system-ui, sans-serif',
900
909
  fontSize: `${Math.max(9, Math.min(12, s.bodyS * 0.75))}px`,
901
910
  transition: "background-color 0.2s ease"
@@ -905,32 +914,32 @@ function Te({
905
914
  e
906
915
  )) })
907
916
  ] }),
908
- v.length > 0 && /* @__PURE__ */ n("div", { style: {
917
+ F.length > 0 && /* @__PURE__ */ o("div", { style: {
909
918
  ...a.gmGuessedLetters,
910
919
  fontSize: `${Math.max(10, Math.min(12, s.bodyS * 0.85))}px`,
911
- marginTop: `${o * 0.5}px`,
920
+ marginTop: `${n * 0.5}px`,
912
921
  marginBottom: "2px"
913
- }, children: /* @__PURE__ */ u("span", { style: { color: "#6b7280" }, children: [
922
+ }, children: /* @__PURE__ */ h("span", { style: { color: "#6b7280" }, children: [
914
923
  "Guessed letters: ",
915
- /* @__PURE__ */ n("strong", { children: v.join(", ") })
924
+ /* @__PURE__ */ o("strong", { children: F.join(", ") })
916
925
  ] }) }),
917
- h === "win" && /* @__PURE__ */ n("div", { style: {
926
+ f === "win" && /* @__PURE__ */ o("div", { style: {
918
927
  ...a.gmStatusWin,
919
928
  fontSize: `${s.bodyL}px`,
920
929
  margin: "2px 0"
921
930
  }, children: "🎉 You won this round!" }),
922
- h === "lose" && /* @__PURE__ */ u("div", { style: {
931
+ f === "lose" && /* @__PURE__ */ h("div", { style: {
923
932
  ...a.gmStatusLose,
924
933
  fontSize: `${s.bodyL}px`,
925
934
  margin: "2px 0"
926
935
  }, children: [
927
936
  "The hangman is complete! The word was: ",
928
- /* @__PURE__ */ n("strong", { children: M })
937
+ /* @__PURE__ */ o("strong", { children: v })
929
938
  ] }),
930
- h !== null && $ < w && /* @__PURE__ */ n("div", { style: { marginTop: "2px", marginBottom: `${o}px` }, children: /* @__PURE__ */ n(
939
+ f !== null && L < M && /* @__PURE__ */ o("div", { style: { marginTop: "2px", marginBottom: `${n}px` }, children: /* @__PURE__ */ o(
931
940
  "button",
932
941
  {
933
- onClick: ke,
942
+ onClick: Le,
934
943
  onMouseEnter: (e) => {
935
944
  e.currentTarget.style.backgroundColor = "#d43a32";
936
945
  },
@@ -940,16 +949,16 @@ function Te({
940
949
  style: {
941
950
  ...a.gmButton,
942
951
  fontSize: `${Math.max(11, Math.min(14, s.button * 0.85))}px`,
943
- padding: `${o * 0.6}px ${o * 1.2}px`,
944
- borderRadius: `${c}px`
952
+ padding: `${n * 0.6}px ${n * 1.2}px`,
953
+ borderRadius: `${S}px`
945
954
  },
946
955
  children: "NEXT"
947
956
  }
948
957
  ) }),
949
- h !== null && $ >= w && /* @__PURE__ */ n("div", { style: { marginTop: "2px", marginBottom: `${o}px` }, children: /* @__PURE__ */ n(
958
+ f !== null && L >= M && /* @__PURE__ */ o("div", { style: { marginTop: "2px", marginBottom: `${n}px` }, children: /* @__PURE__ */ o(
950
959
  "button",
951
960
  {
952
- onClick: () => x("result"),
961
+ onClick: () => y("result"),
953
962
  onMouseEnter: (e) => {
954
963
  e.currentTarget.style.backgroundColor = "#d43a32";
955
964
  },
@@ -959,53 +968,53 @@ function Te({
959
968
  style: {
960
969
  ...a.gmButton,
961
970
  fontSize: `${s.button}px`,
962
- padding: `${o}px ${o * 1.5}px`,
963
- borderRadius: `${c}px`
971
+ padding: `${n}px ${n * 1.5}px`,
972
+ borderRadius: `${S}px`
964
973
  },
965
974
  children: "View results"
966
975
  }
967
976
  ) }),
968
- h === null && v.length === 0 && /* @__PURE__ */ n("p", { style: {
977
+ f === null && F.length === 0 && /* @__PURE__ */ o("p", { style: {
969
978
  ...a.gmBodyS,
970
979
  fontSize: `${s.bodyS}px`,
971
- marginTop: `${o}px`,
972
- marginBottom: `${o}px`
980
+ marginTop: `${n}px`,
981
+ marginBottom: `${n}px`
973
982
  }, children: "Type a letter on your keyboard" })
974
- ] }) : f === "result" ? /* @__PURE__ */ u(O, { children: [
975
- Y,
976
- /* @__PURE__ */ n("h1", { style: {
983
+ ] }) : x === "result" ? /* @__PURE__ */ h(G, { children: [
984
+ X,
985
+ /* @__PURE__ */ o("h1", { style: {
977
986
  ...a.gmHeadline1,
978
987
  fontSize: `${s.headline1}px`,
979
- marginBottom: `${o * 2}px`
988
+ marginBottom: `${n * 2}px`
980
989
  }, children: "🎊 Game Finished!" }),
981
- /* @__PURE__ */ u("p", { style: {
990
+ /* @__PURE__ */ h("p", { style: {
982
991
  ...a.gmBodyL,
983
992
  fontSize: `${s.bodyL}px`,
984
- marginBottom: `${o * 2}px`
993
+ marginBottom: `${n * 2}px`
985
994
  }, children: [
986
995
  "You guessed ",
987
- /* @__PURE__ */ n("strong", { children: q }),
996
+ /* @__PURE__ */ o("strong", { children: te }),
988
997
  " out of ",
989
- /* @__PURE__ */ n("strong", { children: w }),
998
+ /* @__PURE__ */ o("strong", { children: M }),
990
999
  " words correctly."
991
1000
  ] }),
992
- /* @__PURE__ */ u("div", { style: {
1001
+ /* @__PURE__ */ h("div", { style: {
993
1002
  display: "flex",
994
1003
  flexDirection: "column",
995
- gap: `${o}px`,
1004
+ gap: `${n}px`,
996
1005
  alignItems: "center"
997
1006
  }, children: [
998
- /* @__PURE__ */ n(
1007
+ /* @__PURE__ */ o(
999
1008
  "button",
1000
1009
  {
1001
1010
  onClick: () => {
1002
- if (!y || w === 0) {
1003
- x("lobby");
1011
+ if (!b || M === 0) {
1012
+ y("lobby");
1004
1013
  return;
1005
1014
  }
1006
- L([]);
1007
- const e = Z(y, []);
1008
- e && (z(e), L([e]), W([]), S(0), B(1), E(0), F(null), x("game"));
1015
+ z([]);
1016
+ const e = U(b, []);
1017
+ e && (I(e), z([e]), R([]), T(0), H(1), A(0), B(null), y("game"));
1009
1018
  },
1010
1019
  onMouseEnter: (e) => {
1011
1020
  e.currentTarget.style.backgroundColor = "#d43a32";
@@ -1016,17 +1025,17 @@ function Te({
1016
1025
  style: {
1017
1026
  ...a.gmButton,
1018
1027
  fontSize: `${s.button}px`,
1019
- padding: `${o}px ${o * 1.5}px`,
1020
- borderRadius: `${c}px`,
1028
+ padding: `${n}px ${n * 1.5}px`,
1029
+ borderRadius: `${S}px`,
1021
1030
  minWidth: "200px"
1022
1031
  },
1023
1032
  children: "Play again"
1024
1033
  }
1025
1034
  ),
1026
- /* @__PURE__ */ n(
1035
+ /* @__PURE__ */ o(
1027
1036
  "button",
1028
1037
  {
1029
- onClick: () => x("lobby"),
1038
+ onClick: () => y("lobby"),
1030
1039
  onMouseEnter: (e) => {
1031
1040
  e.currentTarget.style.backgroundColor = "#e5e7eb";
1032
1041
  },
@@ -1037,8 +1046,8 @@ function Te({
1037
1046
  ...a.gmButton,
1038
1047
  ...a.gmButtonSecondary,
1039
1048
  fontSize: `${s.button}px`,
1040
- padding: `${o}px ${o * 1.5}px`,
1041
- borderRadius: `${c}px`,
1049
+ padding: `${n}px ${n * 1.5}px`,
1050
+ borderRadius: `${S}px`,
1042
1051
  minWidth: "200px"
1043
1052
  },
1044
1053
  children: "Exit"
@@ -1046,7 +1055,7 @@ function Te({
1046
1055
  )
1047
1056
  ] })
1048
1057
  ] }) : null;
1049
- return /* @__PURE__ */ n(
1058
+ return /* @__PURE__ */ o(
1050
1059
  "div",
1051
1060
  {
1052
1061
  style: {
@@ -1063,12 +1072,12 @@ function Te({
1063
1072
  right: 0,
1064
1073
  bottom: 0
1065
1074
  },
1066
- children: /* @__PURE__ */ n(
1075
+ children: /* @__PURE__ */ o(
1067
1076
  "div",
1068
1077
  {
1069
1078
  style: {
1070
- width: d ? "100%" : p || r || 1e3,
1071
- height: d ? "100%" : p || r || 1e3,
1079
+ width: d ? "100%" : p || i || 1e3,
1080
+ height: d ? "100%" : p || i || 1e3,
1072
1081
  display: "flex",
1073
1082
  justifyContent: "center",
1074
1083
  alignItems: "center",
@@ -1079,9 +1088,9 @@ function Te({
1079
1088
  margin: d ? "0 auto" : "unset",
1080
1089
  position: "relative",
1081
1090
  // needed so absolute logo is inside the square
1082
- transform: `scale(${J})`
1091
+ transform: `scale(${ne})`
1083
1092
  },
1084
- children: /* @__PURE__ */ n(
1093
+ children: /* @__PURE__ */ o(
1085
1094
  "div",
1086
1095
  {
1087
1096
  style: {
@@ -1092,7 +1101,7 @@ function Te({
1092
1101
  justifyContent: "center",
1093
1102
  alignItems: "center"
1094
1103
  },
1095
- children: /* @__PURE__ */ n("div", { style: Me, children: $e() })
1104
+ children: /* @__PURE__ */ o("div", { style: Te, children: Be() })
1096
1105
  }
1097
1106
  )
1098
1107
  }
@@ -1101,8 +1110,8 @@ function Te({
1101
1110
  );
1102
1111
  }
1103
1112
  export {
1104
- Te as Game,
1105
- Te as HangmanLobbyGame,
1106
- Te as default
1113
+ Ye as Game,
1114
+ Ye as HangmanLobbyGame,
1115
+ Ye as default
1107
1116
  };
1108
1117
  //# sourceMappingURL=speakid-hangman.es.js.map