@mblinkov/whats-missing 20.0.44 → 20.0.46

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,219 @@
1
+ # Changelog - Последние исправления
2
+
3
+ ## Версия 20.0.46 - Оптимизация загрузки изображений
4
+
5
+ ### 🚀 Новые возможности
6
+
7
+ #### **Умная предзагрузка изображений**
8
+ **Проблема:** На медленных соединениях (VPN, 3G) картинки грузились долго, терялся принцип игры.
9
+
10
+ **Решение:**
11
+ - Добавлена система предзагрузки изображений с приоритетами
12
+ - Placeholder (skeleton) пока грузится изображение
13
+ - Плавный переход (fade-in) после загрузки
14
+ - Fetch Priority API для оптимизации загрузки
15
+
16
+ **Преимущества:**
17
+ - ✅ Мгновенное отображение после клика "Start game"
18
+ - ✅ Улучшен UX на медленных соединениях
19
+ - ✅ Изображения готовы до того, как пользователь их увидит
20
+ - ✅ Браузер получает инструкции о приоритете загрузки
21
+
22
+ **Код изменений:**
23
+ ```typescript
24
+ // Добавлены состояния
25
+ const [loadedImages, setLoadedImages] = useState<Set<string>>(new Set());
26
+
27
+ // Функции предзагрузки
28
+ const preloadImage = (src: string): Promise<void> => { ... };
29
+ const preloadImages = async (urls: string[]): Promise<void> => { ... };
30
+
31
+ // startGame теперь async и предзагружает изображения
32
+ const startGame = async () => {
33
+ const selected = getRandomSix(themes[theme]);
34
+ await preloadImages(selected.map(item => item.src)); // Текущий раунд
35
+ preloadImages(nextBatch.map(item => item.src)); // Следующий раунд в фоне
36
+ // ...
37
+ };
38
+
39
+ // JSX с placeholder и анимацией загрузки
40
+ <img
41
+ fetchpriority={loadedImages.has(file.src) ? "auto" : "high"}
42
+ onLoad={() => setLoadedImages(prev => new Set(prev).add(file.src))}
43
+ style={{ opacity: loadedImages.has(file.src) ? 1 : 0, transition: "opacity 0.3s ease" }}
44
+ />
45
+ ```
46
+
47
+ **Файлы:** `src/Game.tsx` (строки 129-130, 255-272, 274-311, 773-803)
48
+
49
+ ---
50
+
51
+ ## Версия 20.0.45 - Критические исправления
52
+
53
+ ### 🔧 Исправления
54
+
55
+ #### 1. **Проблема со скроллом после выхода из игры**
56
+ **Проблема:** После закрытия игры скролл пропадал на всем сайте и восстанавливался только после обновления страницы.
57
+
58
+ **Решение:**
59
+ - Добавлен ID `whats-missing-reset` для стилей
60
+ - В `useEffect` cleanup теперь полностью удаляется style элемент из `<head>`
61
+ - Восстанавливается `overflow` на `html` и `body` элементах
62
+
63
+ **Код изменений:**
64
+ ```typescript
65
+ // globalReset() - добавлен ID
66
+ const globalReset = () => {
67
+ const style = document.createElement("style");
68
+ style.id = "whats-missing-reset"; // ✅ Добавлено
69
+
70
+ // ... остальной код
71
+
72
+ // ✅ Удаляем старый стиль, если он есть
73
+ const existingStyle = document.getElementById("whats-missing-reset");
74
+ if (existingStyle) {
75
+ existingStyle.remove();
76
+ }
77
+
78
+ document.head.appendChild(style);
79
+ };
80
+
81
+ // useEffect cleanup
82
+ useEffect(() => {
83
+ globalReset();
84
+ return () => {
85
+ // ✅ Восстанавливаем overflow на html и body
86
+ document.documentElement.style.overflow = "";
87
+ document.body.style.overflow = "";
88
+
89
+ // ✅ Удаляем наш style элемент
90
+ const style = document.getElementById("whats-missing-reset");
91
+ if (style) {
92
+ style.remove();
93
+ }
94
+ };
95
+ }, []);
96
+ ```
97
+
98
+ **Файлы:** `src/Game.tsx` (строки 15-54, 83-96)
99
+
100
+ ---
101
+
102
+ #### 2. **Проблема с кнопкой Check на iPhone**
103
+ **Проблема:** На iPhone в portrait режиме кнопка Check изначально появлялась внизу под инпутом, но при фокусе на инпут она перемещалась в бок.
104
+
105
+ **Причина:** Inline проверка `window.innerWidth` и `window.innerHeight` в JSX выполнялась на каждом рендере, что привело к нестабильному layout из-за изменения размеров браузера при фокусе/скролле.
106
+
107
+ **Решение:**
108
+ - Добавлено состояние `isHorizontalLayout` для определения layout
109
+ - Расчет выполняется ОДИН РАЗ в `useEffect` при монтировании/изменении размера
110
+ - В JSX используется стабильное состояние вместо inline проверок
111
+
112
+ **Код изменений:**
113
+ ```typescript
114
+ // Добавлено состояние
115
+ const [isHorizontalLayout, setIsHorizontalLayout] = useState(false);
116
+
117
+ // В существующий useEffect добавлен расчет
118
+ const isHorizontal =
119
+ (mobile && width > height) ||
120
+ height < 700 ||
121
+ (width === 1366 && height === 766) ||
122
+ (width === 1366 && height === 768) ||
123
+ (width === 1280 && height === 720) ||
124
+ (width === 1440 && height === 900) ||
125
+ isIPadMiniPortrait ||
126
+ isIPadMiniLandscape ||
127
+ isIPadAirPortrait ||
128
+ isIPadAirLandscape ||
129
+ isSurfaceDuoPortrait ||
130
+ isSurfaceDuoLandscape ||
131
+ isIPadProPortrait ||
132
+ isIPadProLandscape ||
133
+ isDesktopLayout;
134
+ setIsHorizontalLayout(isHorizontal);
135
+
136
+ // В JSX заменены inline проверки
137
+ flexDirection: isHorizontalLayout ? "row" : "column", // Вместо длинной inline проверки
138
+ flex: isHorizontalLayout ? "1" : "none",
139
+ marginLeft: isHorizontalLayout ? "8px" : "0",
140
+ ```
141
+
142
+ **Файлы:** `src/美国人.tsx` (строки 128, 201-218, 778, 906, 912)
143
+
144
+ ---
145
+
146
+ #### 3. **Проблема с обрезанием иконок на экранах с масштабированием**
147
+ **Проблема:** На экранах с масштабированием Windows 125% (DPR 1.25) иконки обрезались по краям родительского окна.
148
+
149
+ **Причина:**
150
+ - Device Pixel Ratio 1.25 = 125% масштабирование
151
+ - Фиксированная высота `gridAutoRows: "210px"` была недостаточной для такого масштабирования
152
+ - Недостаточно gap и padding для компенсации обрезания
153
+
154
+ **Решение:**
155
+ Добавлено специальное правило для экранов с DPR 1.25-1.5 (125%-150% масштабирование):
156
+
157
+ ```typescript
158
+ // gridAutoRows - добавлена проверка DPR
159
+ : (typeof window !== "undefined" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5)
160
+ ? "240px" // Больше высота для экранов с масштабированием
161
+ : "210px",
162
+
163
+ // gap - добавлена проверка DPR
164
+ : (typeof window !== "undefined" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5)
165
+ ? "24px" // Больше отступы для экранов с масштабированием
166
+ : "20px",
167
+
168
+ // padding - добавлена проверка DPR
169
+ : (typeof window !== "undefined" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5)
170
+ ? "20px" // Дополнительные отступы для экранов с масштабированием
171
+ : "16px",
172
+ ```
173
+
174
+ **Файлы:** `src/Game.tsx` (строки 638-640, 651-653, 674-676)
175
+
176
+ ---
177
+
178
+ ### 📊 Влияние изменений
179
+
180
+ #### Скр ling фикс:
181
+ - ✅ Исправляет проблему на всех устройствах
182
+ - ✅ Не влияет на другие функции
183
+
184
+ #### Кнопка Check фикс:
185
+ - ✅ Исправляет на iPhone
186
+ - ❌ Не влияет на другие устройства
187
+ - ✅ Улучшает стабильность layout
188
+
189
+ #### DPR фикс:
190
+ - ✅ Исправляет на экранах с масштабированием 125%-150%
191
+ - ❌ Не влияет на iPhone (DPR 2.0-3.0)
192
+ - ❌ Не влияет на iPad (DPR 1.0-2.0)
193
+ - ❌ Не влияет на стандартные мониторы (DPR 1.0)
194
+ - ❌ Не влияет на Retina MacBook (DPR 2.0)
195
+
196
+ ---
197
+
198
+ ### 🔄 Как применить в своем проекте
199
+
200
+ 1. **Скопируйте следующие части кода из `src/Game.tsx`:**
201
+ - `globalReset()` функция (строки 15-54)
202
+ - `useEffect` с cleanup (строки 83-96)
203
+ - Состояние `isHorizontalLayout` (строка 128)
204
+ - Расчет `isHorizontalLayout` в useEffect (строки 201-218)
205
+ - Использование `isHorizontalLayout` в JSX (строки 778, 906, 912)
206
+ - Проверки `window.devicePixelRatio` в gridAutoRows, gap, padding (строки 638-640, 651-653, 674-676)
207
+
208
+ 2. **Альтернативный способ:**
209
+ - Используйте эту библиотеку из npm: `@mblinkov/whats-missing@20.0.45`
210
+
211
+ ---
212
+
213
+ ## Примечания
214
+
215
+ - Все изменения обратно совместимы
216
+ - Не влияют на существующий функционал
217
+ - Улучшают UX на проблемных устройствах
218
+ - Код проверен и протестирован
219
+
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("react"),xn=window.origin+"/cloud/speakid/games/whatsmissing/",F=(d,p)=>d.map(([g,r])=>({src:`${xn}${p}/${r.replace(/\s/g,"%20")}.png`,name:r})),cn=[["apple","apple"],["banana","banana"],["bread","bread"],["burger","burger"],["cake","cake"],["carrot","carrot"],["cheese","cheese"],["chicken","chicken"],["chocolate","chocolate"],["corn","corn"],["donut","donut"],["fish","fish"],["fries","fries"],["grapes","grapes"],["ice_cream","ice cream"],["milk","milk"],["orange","orange"],["pear","pear"],["pizza","pizza"],["rice","rice"],["sandwich","sandwich"],["soup","soup"],["strawberry","strawberry"],["tomato","tomato"],["watermelon","watermelon"]],mn=[["bear","bear"],["cat","cat"],["crocodile","crocodile"],["dolphin","dolphin"],["elephant","elephant"],["fox","fox"],["giraffe","giraffe"],["horse","horse"],["kangaroo","kangaroo"],["lion","lion"],["monkey","monkey"],["owl","owl"],["panda","panda"],["penguin","penguin"],["squirrel","squirrel"],["tiger","tiger"],["tortoise","tortoise"],["wolf","wolf"],["zebra","zebra"]],Hn=[["ball","ball"],["balloon","balloon"],["blocks","blocks"],["car","car"],["doll","doll"],["drum","drum"],["guitar","guitar"],["jump_rope","jump rope"],["kite","kite"],["paints","paints"],["plane","plane"],["puzzle","puzzle"],["rocket","rocket"],["scooter","scooter"],["skateboard","skateboard"],["slide","slide"],["teddy_bear","teddy bear"],["yo-yo","yo-yo"],["crayons","crayons"]],D={food:F(cn,"food"),animals:F(mn,"animals"),toys:F(Hn,"toys")},un=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),Nn=window.origin+"/cloud/speakid/games/whatsmissing/",Q=(r,u)=>r.map(([f,h])=>({src:`${Nn}${u}/${h.replace(/\s/g,"%20")}.png`,name:h})),On=[["apple","apple"],["banana","banana"],["bread","bread"],["burger","burger"],["cake","cake"],["carrot","carrot"],["cheese","cheese"],["chicken","chicken"],["chocolate","chocolate"],["corn","corn"],["donut","donut"],["fish","fish"],["fries","fries"],["grapes","grapes"],["ice_cream","ice cream"],["milk","milk"],["orange","orange"],["pear","pear"],["pizza","pizza"],["rice","rice"],["sandwich","sandwich"],["soup","soup"],["strawberry","strawberry"],["tomato","tomato"],["watermelon","watermelon"]],Vn=[["bear","bear"],["cat","cat"],["crocodile","crocodile"],["dolphin","dolphin"],["elephant","elephant"],["fox","fox"],["giraffe","giraffe"],["horse","horse"],["kangaroo","kangaroo"],["lion","lion"],["monkey","monkey"],["owl","owl"],["panda","panda"],["penguin","penguin"],["squirrel","squirrel"],["tiger","tiger"],["tortoise","tortoise"],["wolf","wolf"],["zebra","zebra"]],_n=[["ball","ball"],["balloon","balloon"],["blocks","blocks"],["car","car"],["doll","doll"],["drum","drum"],["guitar","guitar"],["jump_rope","jump rope"],["kite","kite"],["paints","paints"],["plane","plane"],["puzzle","puzzle"],["rocket","rocket"],["scooter","scooter"],["skateboard","skateboard"],["slide","slide"],["teddy_bear","teddy bear"],["yo-yo","yo-yo"],["crayons","crayons"]],A={food:Q(On,"food"),animals:Q(Vn,"animals"),toys:Q(_n,"toys")},$n=`
2
2
  @keyframes spin {
3
3
  from { transform: rotate(0deg); }
4
4
  to { transform: rotate(360deg); }
5
5
  }
6
- `;if(typeof document<"u"&&!document.getElementById("spin-keyframes")){const d=document.createElement("style");d.id="spin-keyframes",d.innerHTML=un,document.head.appendChild(d)}const Wn={animation:"spin 1.4s linear infinite"},t={gmCenterScreen:{position:"relative",zIndex:1,minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",color:"#1f2937",padding:"24px 16px",boxSizing:"border-box",transform:"translateY(20px)"},gmHeadline1:{fontWeight:700,fontSize:"clamp(28px, 4vw, 40px)",lineHeight:"110%"},gmHeadline3:{fontWeight:600,fontSize:"18px",lineHeight:"130%"},gmBodyM:{fontWeight:400,fontSize:"16px",lineHeight:"140%"},gmBodyS:{fontWeight:400,fontSize:"14px",lineHeight:"140%",color:"#6b7280"},gmButton:{fontFamily:'"Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans"',fontWeight:600,fontSize:"16px",padding:"10px 16px",borderRadius:"12px",border:"1px solid #e5e7eb",background:"#ec4c44",color:"#ffffff",cursor:"pointer",boxShadow:"0 6px 18px rgba(236, 76, 68, .18)",transition:"transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease"},gmButtonActive:{background:"#333",color:"#fff"},gmGameLayout:{position:"relative",width:"100%",maxWidth:"none",minHeight:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",color:"#1f2937",padding:"16px 8px",margin:"0 auto"},gmGrid:{width:"100%",maxWidth:"none",margin:"0 auto",display:"grid",gridTemplateColumns:"repeat(3, 210px)",gridAutoRows:"210px",gap:"20px",justifyContent:"center"},gmInput:{padding:"6px 10px",borderRadius:"6px",border:"1px solid #ccc",fontSize:"16px",fontFamily:'"Geist", system-ui',width:"160px"},gmTable:{marginTop:"20px",marginBottom:"32px",borderCollapse:"collapse",width:"100%",maxWidth:"520px",tableLayout:"fixed",textAlign:"center"},gmTableCell:{padding:"8px 12px",borderBottom:"1px solid #e5e7eb",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},gmLogoFixed:{position:"absolute",top:"16px",left:"24px",width:"120px",zIndex:10,pointerEvents:"none",background:"transparent",transform:"none",willChange:"auto"},gmLogoImg:{height:"clamp(28px, 5vw, 40px)",width:"auto",background:"transparent",objectFit:"contain",imageRendering:"auto",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased"},gmHourglass:{fontSize:"42px",...Wn}},fn=()=>{const d=document.createElement("style");d.textContent=`
6
+ `;if(typeof document<"u"&&!document.getElementById("spin-keyframes")){const r=document.createElement("style");r.id="spin-keyframes",r.innerHTML=$n,document.head.appendChild(r)}const Kn={animation:"spin 1.4s linear infinite"},o={gmCenterScreen:{position:"relative",zIndex:1,minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",color:"#1f2937",padding:"24px 16px",boxSizing:"border-box",transform:"translateY(20px)"},gmHeadline1:{fontWeight:700,fontSize:"clamp(28px, 4vw, 40px)",lineHeight:"110%"},gmHeadline3:{fontWeight:600,fontSize:"18px",lineHeight:"130%"},gmBodyM:{fontWeight:400,fontSize:"16px",lineHeight:"140%"},gmBodyS:{fontWeight:400,fontSize:"14px",lineHeight:"140%",color:"#6b7280"},gmButton:{fontFamily:'"Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans"',fontWeight:600,fontSize:"16px",padding:"10px 16px",borderRadius:"12px",border:"1px solid #e5e7eb",background:"#ec4c44",color:"#ffffff",cursor:"pointer",boxShadow:"0 6px 18px rgba(236, 76, 68, .18)",transition:"transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease"},gmButtonActive:{background:"#333",color:"#fff"},gmGameLayout:{position:"relative",width:"100%",maxWidth:"none",minHeight:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",color:"#1f2937",padding:"16px 8px",margin:"0 auto"},gmGrid:{width:"100%",maxWidth:"none",margin:"0 auto",display:"grid",gridTemplateColumns:"repeat(3, 210px)",gridAutoRows:"210px",gap:"20px",justifyContent:"center"},gmInput:{padding:"6px 10px",borderRadius:"6px",border:"1px solid #ccc",fontSize:"16px",fontFamily:'"Geist", system-ui',width:"160px"},gmTable:{marginTop:"20px",marginBottom:"32px",borderCollapse:"collapse",width:"100%",maxWidth:"520px",tableLayout:"fixed",textAlign:"center"},gmTableCell:{padding:"8px 12px",borderBottom:"1px solid #e5e7eb",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},gmLogoFixed:{position:"absolute",top:"16px",left:"24px",width:"120px",zIndex:10,pointerEvents:"none",background:"transparent",transform:"none",willChange:"auto"},gmLogoImg:{height:"clamp(28px, 5vw, 40px)",width:"auto",background:"transparent",objectFit:"contain",imageRendering:"auto",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased"},gmHourglass:{fontSize:"42px",...Kn}},Qn=()=>{const r=document.createElement("style");r.id="whats-missing-reset",r.textContent=`
7
7
  #whats-missing-root, #whats-missing-root * {
8
8
  box-sizing: border-box;
9
9
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
@@ -29,4 +29,4 @@
29
29
  height: 100% !important;
30
30
  overflow: hidden !important;
31
31
  }
32
- `,document.head.appendChild(d)},yn=(d,p)=>{const g=Array.from({length:d.length+1},()=>Array(p.length+1).fill(0));for(let r=0;r<=d.length;r++)g[r][0]=r;for(let r=0;r<=p.length;r++)g[0][r]=r;for(let r=1;r<=d.length;r++)for(let h=1;h<=p.length;h++)g[r][h]=d[r-1]===p[h-1]?g[r-1][h-1]:Math.min(g[r-1][h-1],g[r][h-1],g[r-1][h])+1;return g[d.length][p.length]};function bn({gameCubeSize:d,screenHeight:p,screenWidth:g}){const r=o.useRef(null);o.useEffect(()=>(fn(),()=>{document.body.style.overflow=""}),[]);const[h,Y]=o.useState(null),[u,q]=o.useState([]),[b,en]=o.useState(4),[W,P]=o.useState(!1),[j,U]=o.useState(1),[c,tn]=o.useState(null),[x,S]=o.useState("ready"),[N,O]=o.useState(3),[T,z]=o.useState(10),[C,V]=o.useState(20),[on,I]=o.useState(0),[k,R]=o.useState(!1),[v,_]=o.useState(""),[m,M]=o.useState(!1),[A,$]=o.useState(!1),[K,f]=o.useState(null),[dn,B]=o.useState([]),[wn,Z]=o.useState([]),[n,rn]=o.useState(!1),[jn,L]=o.useState(1),[J,E]=o.useState(null),[l,hn]=o.useState(!1);o.useEffect(()=>{const e=()=>{const w=g??window.innerWidth,a=p??window.innerHeight,s=w<768,H=a<700,y=w>=1200&&a>=600&&!s;if(hn(y),rn(s),s)E(d&&d>=320?d:null),L(1);else if(H)E(d&&d>=400?d:null),L(1);else{const pn=d?Math.max(400,Math.min(1200,d)):Math.min(1e3,Math.min(w,a)*.9);E(pn),L(1)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[g,p,d]);const Q=e=>[...e].sort(()=>Math.random()-.5).slice(0,6),X=()=>{if(!h)return;const e=Q(D[h]);q(e),P(!0),R(!1),U(1),I(0),B([]),Z([]),nn(e,[],!0)},nn=(e=u,w=wn,a=!1)=>{const s=Q(e.length?e:D[h]);let H=Math.floor(Math.random()*s.length),y=s[H].name,G=0;for(;w.includes(y)&&G<20;)H=Math.floor(Math.random()*s.length),y=s[H].name,G++;q(s),tn(H),Z([...w,y]),M(!1),_(""),V(20),f(null),a?(S("ready"),O(3),z(10)):(S("memorize"),z(10))};o.useEffect(()=>{if(!(!W||k||m)){if(x==="ready")if(N<=0)S("memorize");else{const e=setTimeout(()=>O(w=>w-1),1e3);return()=>clearTimeout(e)}if(x==="memorize")if(T<=0)S("guess");else{const e=setTimeout(()=>z(w=>w-1),1e3);return()=>clearTimeout(e)}if(x==="guess"){if(C<=0){M(!0),f("wrong");const w=u[c].name;B(a=>[...a,{round:j,answer:v,correct:w,result:"wrong"}]);return}const e=setTimeout(()=>V(w=>w-1),1e3);return()=>clearTimeout(e)}}},[x,N,T,C,W,k,m,u,c,j,v]);const sn=()=>{if(c===null||A)return;const e=u[c].name,w=v.toLowerCase().trim();let a="wrong";w===e?(I(s=>s+1),f("correct"),a="correct"):yn(w,e)===1?(I(s=>s+.5),f("almost"),a="almost"):(f("wrong"),a="wrong"),B(s=>[...s,{round:j,answer:w,correct:e,result:a}]),$(!0),setTimeout(()=>{$(!1),M(!0)},600)},an=()=>j<b?(U(e=>e+1),nn()):R(!0),gn=()=>{P(!1),R(!1),Y(null)},ln=o.useMemo(()=>n&&window.innerWidth>window.innerHeight||window.innerHeight<700?null:i.jsx("div",{style:{...t.gmLogoFixed,position:"absolute",top:16,left:16,zIndex:30},children:i.jsxs("picture",{children:[i.jsx("source",{srcSet:window.origin+"/cloud/speakid/games/whatsmissing/logo.svg",type:"image/svg+xml"}),i.jsx("img",{src:window.origin+"/cloud/speakid/games/whatsmissing/logo.png",alt:"SPEAKID Logo",style:t.gmLogoImg,loading:"lazy"})]})}),[n]);return i.jsx("div",{ref:r,style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",transition:"background 0.3s ease",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},children:i.jsx("div",{style:{width:n?"100%":J||d||1e3,height:n?"100%":J||d||1e3,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:n?0:"20px",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",boxShadow:n?"none":"0 0 40px rgba(0,0,0,0.1)",margin:n?"0 auto":"unset",position:"relative"},children:i.jsx("div",{style:{transform:"none",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{id:"whats-missing-root",children:[!n&&ln,!h&&!W&&i.jsxs("div",{style:t.gmCenterScreen,children:[i.jsx("h1",{style:t.gmHeadline1,children:"WHAT'S MISSING?"}),i.jsx("p",{style:t.gmBodyM,children:"Select a theme:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"8px":"16px"},children:["animals","food","toys"].map(e=>i.jsx("button",{style:{...t.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"8px 12px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"70px":"auto"},onClick:()=>Y(e),children:e==="animals"?"🐶 Animals":e==="food"?"🍎 Food":"🧸 Toys"},e))}),i.jsxs("div",{style:{marginTop:24},children:[i.jsx("p",{style:t.gmBodyS,children:"Choose number of rounds:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"6px":"12px",marginTop:8},children:[3,4,5].map(e=>i.jsx("button",{style:{...t.gmButton,...b===e?t.gmButtonActive:{},padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"40px":"auto"},onClick:()=>en(e),children:e},e))})]})]}),h&&!W&&i.jsxs("div",{style:t.gmCenterScreen,children:[i.jsxs("h1",{style:t.gmHeadline1,children:["Theme selected: ",h]}),i.jsxs("p",{style:t.gmBodyM,children:["Rounds: ",b]}),i.jsx("button",{style:{...t.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"120px":"auto"},onClick:X,children:"▶ Start game"})]}),k&&i.jsxs("div",{style:t.gmCenterScreen,children:[i.jsx("h1",{style:t.gmHeadline1,children:"Results"}),i.jsxs("h2",{style:t.gmHeadline3,children:["Your score: ",on," / ",b]}),i.jsx("p",{style:{...t.gmBodyM,color:"#10b981",marginTop:12},children:"Yahoo! You did it! 🍬✨"}),i.jsxs("table",{style:t.gmTable,children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Round"}),i.jsx("th",{children:"Your Answer"}),i.jsx("th",{children:"Correct"}),i.jsx("th",{children:"Result"})]})}),i.jsx("tbody",{children:dn.map((e,w)=>i.jsxs("tr",{children:[i.jsx("td",{style:t.gmTableCell,children:e.round}),i.jsx("td",{style:t.gmTableCell,children:e.answer||"—"}),i.jsx("td",{style:t.gmTableCell,children:e.correct}),i.jsx("td",{style:t.gmTableCell,children:e.result==="correct"?"✔ Correct":e.result==="almost"?"◐ Almost (0.5)":"✘ Wrong"})]},w))})]}),i.jsxs("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"6px":"12px",marginTop:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"2px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l?"12px":"24px"},children:[i.jsx("button",{style:{...t.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"80px":"auto"},onClick:X,children:"🔁 Play again"}),i.jsx("button",{style:{...t.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"80px":"auto"},onClick:gn,children:"⬅️ Choose theme"})]})]}),W&&!k&&i.jsxs("div",{style:t.gmGameLayout,children:[i.jsxs("div",{style:{minHeight:n&&window.innerWidth<=375&&window.innerHeight<=667?"45px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"50px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"60px":"160px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",paddingTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[x==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("h1",{style:{...t.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),i.jsx("div",{style:t.gmHourglass,children:"⏳"})]}),x==="memorize"&&i.jsxs("p",{style:{...t.gmBodyM,color:"#10b981"},children:["MEMORIZE (",T,")"]}),x==="guess"&&!m&&i.jsxs("p",{style:t.gmBodyM,children:["⏳ Time left: ",C,"s"]})]}),x!=="ready"&&i.jsx("div",{style:{...t.gmGrid,gridTemplateColumns:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"repeat(3, 1fr)":n?"repeat(2, 1fr)":window.innerHeight<700?"repeat(3, 1fr)":"repeat(3, 210px)",gridAutoRows:n&&window.innerWidth>window.innerHeight?"120px":n&&window.innerWidth<=375&&window.innerHeight<=667?"100px":n?"150px":window.innerHeight<700?"140px":"210px",gap:n&&window.innerWidth<=375&&window.innerHeight<=667?"12px":n||window.innerHeight<700?"8px":"20px",justifyItems:"center",maxWidth:n&&window.innerWidth>window.innerHeight?"90%":n&&window.innerWidth<=375&&window.innerHeight<=667?"95%":"100%",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"8px":"16px"},children:u.map((e,w)=>{const a=c===w&&x==="guess"&&!m;return i.jsx("div",{style:{width:"100%",height:"100%",borderRadius:n&&window.innerWidth<=375&&window.innerHeight<=667?"6px":"12px",overflow:"hidden",boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667?"0 1px 4px rgba(0,0,0,0.1)":"0 4px 12px rgba(0,0,0,0.15)",transition:"all 0.3s ease",cursor:"pointer",...K==="correct"&&c===w?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667?"0 0 15px #10b981":"0 0 20px #10b981",transform:"scale(1.03)"}:{},...K==="wrong"&&c===w?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667?"0 0 15px #ef4444":"0 0 20px #ef4444",transform:"scale(1.03)"}:{}},children:!a&&i.jsx("img",{src:e.src,alt:e.name,style:{width:"100%",height:"100%",objectFit:"cover"}})},w)})}),i.jsxs("div",{style:{marginTop:n&&window.innerWidth<=375&&window.innerHeight<=667?"1px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"2px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"4px":"16px",height:n&&window.innerWidth<=375&&window.innerHeight<=667?"40px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"45px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[x==="guess"&&!m&&i.jsx("div",{style:{display:"flex",flexDirection:n&&window.innerWidth>window.innerHeight||window.innerHeight<700||window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l?"row":"column",gap:n&&window.innerWidth<=375&&window.innerHeight<=667?"3px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"4px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"6px":"12px",alignItems:"center",justifyContent:"center",width:"100%",maxWidth:n&&window.innerWidth<=375&&window.innerHeight<=667?"270px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"350px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"400px":"300px"},children:i.jsxs(i.Fragment,{children:[i.jsx("input",{type:"text",placeholder:"Type the missing word",value:v,onChange:e=>_(e.target.value),style:{...t.gmInput,width:n&&window.innerWidth<=375&&window.innerHeight<=667?"170px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"220px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"250px":"auto",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 6px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"6px 8px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 12px":"12px 16px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:n&&window.innerWidth>window.innerHeight||window.innerHeight<700||window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l?"1":"none"}}),i.jsx("button",{style:{...t.gmButton,marginLeft:n&&window.innerWidth>window.innerHeight||window.innerHeight<700||window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l?"8px":"0",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",minWidth:n&&window.innerWidth<=375&&window.innerHeight<=667?"45px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"55px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||l||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:sn,disabled:A,children:A?"...":"Check"})]})}),m&&i.jsx("button",{style:{...t.gmButton,padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:an,children:"Next round"})]})]})]})})})})}exports.Game=bn;exports.themes=D;
32
+ `;const u=document.getElementById("whats-missing-reset");u&&u.remove(),document.head.appendChild(r)},Zn=(r,u)=>{const f=Array.from({length:r.length+1},()=>Array(u.length+1).fill(0));for(let h=0;h<=r.length;h++)f[h][0]=h;for(let h=0;h<=u.length;h++)f[0][h]=h;for(let h=1;h<=r.length;h++)for(let m=1;m<=u.length;m++)f[h][m]=r[h-1]===u[m-1]?f[h-1][m-1]:Math.min(f[h-1][m-1],f[h][m-1],f[h-1][m])+1;return f[r.length][u.length]};function Jn({gameCubeSize:r,screenHeight:u,screenWidth:f}){const h=d.useRef(null);d.useEffect(()=>(Qn(),()=>{document.documentElement.style.overflow="",document.body.style.overflow="";const e=document.getElementById("whats-missing-reset");e&&e.remove()}),[]);const[m,Z]=d.useState(null),[k,J]=d.useState([]),[L,fn]=d.useState(4),[P,X]=d.useState(!1),[R,nn]=d.useState(1),[j,yn]=d.useState(null),[b,M]=d.useState("ready"),[en,tn]=d.useState(3),[E,D]=d.useState(10),[G,wn]=d.useState(20),[bn,F]=d.useState(0),[B,Y]=d.useState(!1),[C,dn]=d.useState(""),[I,q]=d.useState(!1),[U,on]=d.useState(!1),[rn,T]=d.useState(null),[Sn,N]=d.useState([]),[jn,hn]=d.useState([]),[n,In]=d.useState(!1),[Xn,O]=d.useState(1),[sn,V]=d.useState(null),[y,vn]=d.useState(!1),[g,kn]=d.useState(!1),[a,Pn]=d.useState(!1),[p,Tn]=d.useState(!1),[l,zn]=d.useState(!1),[x,Ln]=d.useState(!1),[H,Rn]=d.useState(!1),[c,Mn]=d.useState(!1),[W,Bn]=d.useState(!1),[_,Cn]=d.useState(!1),[$,gn]=d.useState(new Set),[ni,ii]=d.useState([]);d.useEffect(()=>{const e=()=>{const t=f??window.innerWidth,w=u??window.innerHeight,s=t<768||t===926&&w===428||t===932&&w===430,S=w<700,v=t===768&&w===1024,z=t===1024&&w===768,xn=t===820&&w===1180,Hn=t===1180&&w===820,cn=t===540&&w===720,Wn=t===720&&w===540,mn=t===1024&&w===1366,un=t===1366&&w===1024,Yn=t>=1200&&w>=600&&!s;vn(Yn),kn(v),Pn(z),Tn(xn),zn(Hn),Ln(cn),Rn(Wn),Mn(mn),Bn(un);const qn=s&&t>w||w<700||t===1366&&w===766||t===1366&&w===768||t===1280&&w===720||t===1440&&w===900||v||z||xn||Hn||cn||Wn||mn||un||y;if(Cn(qn),In(s),s)V(r&&r>=320?r:null),O(1);else if(S)V(r&&r>=400?r:null),O(1);else{const Un=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);V(Un),O(1)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[f,u,r]);const K=e=>[...e].sort(()=>Math.random()-.5).slice(0,6),An=e=>new Promise((t,w)=>{const s=new Image;s.onload=()=>{gn(S=>new Set(S).add(e)),t()},s.onerror=w,s.src=e}),an=async e=>{const t=e.map(w=>An(w));await Promise.allSettled(t)},pn=async()=>{if(!m)return;const e=K(A[m]);await an(e.map(w=>w.src)),J(e),X(!0),Y(!1),nn(1),F(0),N([]),hn([]);const t=K(A[m].filter(w=>!e.includes(w)));an(t.map(w=>w.src)),ln(e,[],!0)},ln=(e=k,t=jn,w=!1)=>{const s=K(e.length?e:A[m]);let S=Math.floor(Math.random()*s.length),v=s[S].name,z=0;for(;t.includes(v)&&z<20;)S=Math.floor(Math.random()*s.length),v=s[S].name,z++;J(s),yn(S),hn([...t,v]),q(!1),dn(""),wn(20),T(null),w?(M("ready"),tn(3),D(10)):(M("memorize"),D(10))};d.useEffect(()=>{if(!(!P||B||I)){if(b==="ready")if(en<=0)M("memorize");else{const e=setTimeout(()=>tn(t=>t-1),1e3);return()=>clearTimeout(e)}if(b==="memorize")if(E<=0)M("guess");else{const e=setTimeout(()=>D(t=>t-1),1e3);return()=>clearTimeout(e)}if(b==="guess"){if(G<=0){q(!0),T("wrong");const t=k[j].name;N(w=>[...w,{round:R,answer:C,correct:t,result:"wrong"}]);return}const e=setTimeout(()=>wn(t=>t-1),1e3);return()=>clearTimeout(e)}}},[b,en,E,G,P,B,I,k,j,R,C]);const En=()=>{if(j===null||U)return;const e=k[j].name,t=C.toLowerCase().trim();let w="wrong";t===e?(F(s=>s+1),T("correct"),w="correct"):Zn(t,e)===1?(F(s=>s+.5),T("almost"),w="almost"):(T("wrong"),w="wrong"),N(s=>[...s,{round:R,answer:t,correct:e,result:w}]),on(!0),setTimeout(()=>{on(!1),q(!0)},600)},Dn=()=>R<L?(nn(e=>e+1),ln()):Y(!0),Gn=()=>{X(!1),Y(!1),Z(null)},Fn=d.useMemo(()=>n&&window.innerWidth>window.innerHeight||window.innerHeight<700?null:i.jsx("div",{style:{...o.gmLogoFixed,position:"absolute",top:16,left:16,zIndex:30},children:i.jsxs("picture",{children:[i.jsx("source",{srcSet:window.origin+"/cloud/speakid/games/whatsmissing/logo.svg",type:"image/svg+xml"}),i.jsx("img",{src:window.origin+"/cloud/speakid/games/whatsmissing/logo.png",alt:"SPEAKID Logo",style:o.gmLogoImg,loading:"lazy"})]})}),[n]);return i.jsx("div",{ref:h,style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",transition:"background 0.3s ease",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},children:i.jsx("div",{style:{width:n?"100%":sn||r||1e3,height:n?"100%":sn||r||1e3,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:n?0:"20px",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",boxShadow:n?"none":"0 0 40px rgba(0,0,0,0.1)",margin:n?"0 auto":"unset",position:"relative"},children:i.jsx("div",{style:{transform:"none",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{id:"whats-missing-root",children:[!n&&Fn,!m&&!P&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsx("h1",{style:o.gmHeadline1,children:"WHAT'S MISSING?"}),i.jsx("p",{style:o.gmBodyM,children:"Select a theme:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px":"16px"},children:["animals","food","toys"].map(e=>i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 12px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"70px":"auto"},onClick:()=>Z(e),children:e==="animals"?"🐶 Animals":e==="food"?"🍎 Food":"🧸 Toys"},e))}),i.jsxs("div",{style:{marginTop:24},children:[i.jsx("p",{style:o.gmBodyS,children:"Choose number of rounds:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:8},children:[3,4,5].map(e=>i.jsx("button",{style:{...o.gmButton,...L===e?o.gmButtonActive:{},padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"40px":"auto"},onClick:()=>fn(e),children:e},e))})]})]}),m&&!P&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsxs("h1",{style:o.gmHeadline1,children:["Theme selected: ",m]}),i.jsxs("p",{style:o.gmBodyM,children:["Rounds: ",L]}),i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"120px":"auto"},onClick:pn,children:"▶ Start game"})]}),B&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsx("h1",{style:{...o.gmHeadline1,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"0px":o.gmHeadline1.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"2px":o.gmHeadline1.marginBottom},children:"Results"}),i.jsxs("h2",{style:{...o.gmHeadline3,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"0px":o.gmHeadline3.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"2px":o.gmHeadline3.marginBottom},children:["Your score: ",bn," / ",L]}),i.jsx("p",{style:{...o.gmBodyM,color:"#10b981",marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"0px":"12px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"2px":o.gmBodyM.marginBottom},children:"Yahoo! You did it! 🍬✨"}),i.jsxs("table",{style:{...o.gmTable,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"0px":"20px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||g||a||p||l||x||H||c||W?"4px":"32px"},children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Round"}),i.jsx("th",{children:"Your Answer"}),i.jsx("th",{children:"Correct"}),i.jsx("th",{children:"Result"})]})}),i.jsx("tbody",{children:Sn.map((e,t)=>i.jsxs("tr",{children:[i.jsx("td",{style:o.gmTableCell,children:e.round}),i.jsx("td",{style:o.gmTableCell,children:e.answer||"—"}),i.jsx("td",{style:o.gmTableCell,children:e.correct}),i.jsx("td",{style:o.gmTableCell,children:e.result==="correct"?"✔ Correct":e.result==="almost"?"◐ Almost (0.5)":"✘ Wrong"})]},t))})]}),i.jsxs("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"2px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y?"12px":"24px"},children:[i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:pn,children:"🔁 Play again"}),i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:Gn,children:"⬅️ Choose theme"})]})]}),P&&!B&&i.jsxs("div",{style:o.gmGameLayout,children:[i.jsxs("div",{style:{minHeight:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"45px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"60px":"160px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",paddingTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[b==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("h1",{style:{...o.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),i.jsx("div",{style:o.gmHourglass,children:"⏳"})]}),b==="memorize"&&i.jsxs("p",{style:{...o.gmBodyM,color:"#10b981"},children:["MEMORIZE (",E,")"]}),b==="guess"&&!I&&i.jsxs("p",{style:o.gmBodyM,children:["⏳ Time left: ",G,"s"]})]}),b!=="ready"&&i.jsx("div",{style:{...o.gmGrid,gridTemplateColumns:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"repeat(3, 1fr)":n?"repeat(2, 1fr)":window.innerHeight<700?"repeat(3, 1fr)":"repeat(3, 210px)",gridAutoRows:n&&window.innerWidth>window.innerHeight?"120px":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"100px":n?"150px":window.innerHeight<700?"140px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"240px":"210px",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"12px":n||window.innerHeight<700?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"24px":"20px",justifyItems:"center",maxWidth:n&&window.innerWidth>window.innerHeight?"90%":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"95%":"100%",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"20px":"16px"},children:k.map((e,t)=>{const w=j===t&&b==="guess"&&!I;return i.jsx("div",{style:{width:"100%",height:"100%",borderRadius:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px":"12px",overflow:"hidden",boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 1px 4px rgba(0,0,0,0.1)":"0 4px 12px rgba(0,0,0,0.15)",transition:"all 0.3s ease",cursor:"pointer",...rn==="correct"&&j===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #10b981":"0 0 20px #10b981",transform:"scale(1.03)"}:{},...rn==="wrong"&&j===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #ef4444":"0 0 20px #ef4444",transform:"scale(1.03)"}:{}},children:!w&&i.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[!$.has(e.src)&&i.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%)",backgroundSize:"200% 100%",borderRadius:"inherit",display:"flex",justifyContent:"center",alignItems:"center"}}),i.jsx("img",{src:e.src,alt:e.name,fetchpriority:$.has(e.src)?"auto":"high",onLoad:()=>gn(s=>new Set(s).add(e.src)),style:{width:"100%",height:"100%",objectFit:"cover",opacity:$.has(e.src)?1:0,transition:"opacity 0.3s ease"}})]})},t)})}),i.jsxs("div",{style:{marginTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"1px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"4px":"16px",height:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"40px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[b==="guess"&&!I&&i.jsx("div",{style:{display:"flex",flexDirection:_?"row":"column",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"3px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"6px":"12px",alignItems:"center",justifyContent:"center",width:"100%",maxWidth:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"270px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"400px":"300px"},children:i.jsxs(i.Fragment,{children:[i.jsx("input",{type:"text",placeholder:"Type the missing word",value:C,onChange:e=>dn(e.target.value),style:{...o.gmInput,width:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"170px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"250px":"auto",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"5px 6px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 12px":"12px 16px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428?"10px":window.innerWidth===896&&window.innerHeight===414?"11px":window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:_?"1":"none"}}),i.jsx("button",{style:{...o.gmButton,marginLeft:_?"8px":"0",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",minWidth:n&&window.innerWidth<=375&&window.innerHeight<=667?"45px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"55px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:En,disabled:U,children:U?"...":"Check"})]})}),I&&i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||y||g||a||p||l||x||H||c||W||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:Dn,children:"Next round"})]})]})]})})})})}exports.Game=Jn;exports.themes=A;