speakid-hangman 1.0.4 → 1.0.6

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