@mblinkov/whats-missing 20.0.52 → 20.0.54

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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog - Последние исправления
2
2
 
3
+ ## Версия 20.0.54 - Поддержка синхронизации игры через seed
4
+
5
+ ### ✨ Новые возможности
6
+
7
+ - **Добавлена поддержка синхронизации игры между игроками:**
8
+ - Новый опциональный prop `seed?: number` в компоненте `Game`
9
+ - Реализован `SeededRandom` класс на основе Linear Congruential Generator (LCG)
10
+ - При одинаковом `seed` все игроки получают одинаковую последовательность элементов
11
+ - Если `seed` не передан, игра работает как раньше с `Math.random()`
12
+
13
+ ### 🔧 Технические детали
14
+
15
+ - Все использования `Math.random()` в игровой логике заменены на seeded random генератор
16
+ - Функции `getRandom()` и `getRandomInt()` автоматически используют seeded random при наличии `seed`
17
+ - Поддержка обновления `seed` через `useEffect` при изменении prop
18
+
19
+ ### 📝 Использование
20
+
21
+ ```typescript
22
+ <Game
23
+ gameCubeSize={gameCubeSize}
24
+ screenHeight={containerHeight}
25
+ screenWidth={containerWidth}
26
+ seed={12345} // Опционально: для синхронизации между игроками
27
+ />
28
+ ```
29
+
30
+ ---
31
+
3
32
  ## Версия 20.0.51 - Точечный фикс 1280×720 и публикация
4
33
 
5
34
  ### 🔧 Исправления
package/dist/Game.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export default function Game({ gameCubeSize, screenHeight, screenWidth, }: {
1
+ export default function Game({ gameCubeSize, screenHeight, screenWidth, seed, }: {
2
2
  gameCubeSize?: number;
3
3
  screenHeight?: number;
4
4
  screenWidth?: number;
5
+ seed?: number;
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),Jn=window.origin+"/cloud/speakid/games/whatsmissing/",on=(r,y)=>r.map(([a,s,...g])=>({src:`${Jn}${y}/${s.replace(/\s/g,"%20")}.png`,name:s,aliases:g?.length?g:void 0})),Qn=[["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"]],Xn=[["bear","bear"],["cat","cat"],["crocodile","crocodile","alligator"],["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","turtle"],["wolf","wolf"],["zebra","zebra"]],ni=[["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:on(Qn,"food"),animals:on(Xn,"animals"),toys:on(ni,"toys")},ii=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),ii=window.origin+"/cloud/speakid/games/whatsmissing/",rn=(r,g)=>r.map(([a,s,...y])=>({src:`${ii}${g}/${s.replace(/\s/g,"%20")}.png`,name:s,aliases:y?.length?y:void 0})),ei=[["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"]],ti=[["bear","bear"],["cat","cat"],["crocodile","crocodile","alligator"],["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","turtle"],["wolf","wolf"],["zebra","zebra"]],wi=[["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:rn(ei,"food"),animals:rn(ti,"animals"),toys:rn(wi,"toys")},di=`
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 r=document.createElement("style");r.id="spin-keyframes",r.innerHTML=ii,document.head.appendChild(r)}const ei={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",...ei}},ti=()=>{const r=document.createElement("style");r.id="whats-missing-reset",r.textContent=`
6
+ `;if(typeof document<"u"&&!document.getElementById("spin-keyframes")){const r=document.createElement("style");r.id="spin-keyframes",r.innerHTML=di,document.head.appendChild(r)}const oi={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",...oi}},ri=()=>{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
- `;const y=document.getElementById("whats-missing-reset");y&&y.remove(),document.head.appendChild(r)},wi=(r,y)=>{const a=Array.from({length:r.length+1},()=>Array(y.length+1).fill(0));for(let s=0;s<=r.length;s++)a[s][0]=s;for(let s=0;s<=y.length;s++)a[0][s]=s;for(let s=1;s<=r.length;s++)for(let g=1;g<=y.length;g++)a[s][g]=r[s-1]===y[g-1]?a[s-1][g-1]:Math.min(a[s-1][g-1],a[s][g-1],a[s-1][g])+1;return a[r.length][y.length]},di=r=>new Promise(y=>{const a=new Image;a.onload=()=>y(a),a.onerror=()=>y(a),a.src=r}),rn=async(r,y)=>{const a=new Map,s=r.map(async g=>{const E=await di(g);a.set(g,E)});return await Promise.allSettled(s),a};function oi({gameCubeSize:r,screenHeight:y,screenWidth:a}){const s=d.useRef(null);d.useEffect(()=>(ti(),()=>{document.documentElement.style.overflow="",document.body.style.overflow="";const e=document.getElementById("whats-missing-reset");e&&e.remove(),I.current&&I.current.abort()}),[]);const[g,E]=d.useState(null),[z,hn]=d.useState([]),[D,jn]=d.useState(4),[L,sn]=d.useState(!1),[G,gn]=d.useState(1),[v,In]=d.useState(null),[j,F]=d.useState("ready"),[an,pn]=d.useState(10),[O,V]=d.useState(10),[Z,ln]=d.useState(20),[vn,_]=d.useState(0),[U,K]=d.useState(!1),[Y,xn]=d.useState(""),[M,J]=d.useState(!1),[Q,cn]=d.useState(!1),[Hn,B]=d.useState(null),[Pn,X]=d.useState([]),[kn,Wn]=d.useState([]),[n,Tn]=d.useState(!1),[zn,$]=d.useState(1),[mn,q]=d.useState(null),[S,Rn]=d.useState(!1),[p,Mn]=d.useState(!1),[l,Ln]=d.useState(!1),[x,Bn]=d.useState(!1),[c,Cn]=d.useState(!1),[H,An]=d.useState(!1),[W,En]=d.useState(!1),[m,Dn]=d.useState(!1),[u,Gn]=d.useState(!1),[nn,Fn]=d.useState(!1),[P,Un]=d.useState(!1),en=d.useRef(new Set),N=d.useRef(new Map),I=d.useRef(null);d.useEffect(()=>{const e=()=>{const t=a??window.innerWidth,w=y??window.innerHeight,h=t<768||t===926&&w===428||t===932&&w===430,f=w<700,k=t/w>1.8,b=t===768&&w===1024,wn=t===1024&&w===768,C=t===820&&w===1180,T=t===1180&&w===820,R=t===540&&w===720,yn=t===720&&w===540,bn=t===1024&&w===1366,Sn=t===1366&&w===1024,Vn=t>=1200&&w>=600&&!h;Rn(Vn),Mn(b),Ln(wn),Bn(C),Cn(T),An(R),En(yn),Dn(bn),Gn(Sn),Un(k);const Zn=h&&t>w||h||w<700||k||t===1366&&w===766||t===1366&&w===768||t===1280&&w===720||t===1440&&w===900||b||wn||C||T||R||yn||bn||Sn||S;if(Fn(Zn),Tn(h),h)q(r&&r>=320?r:null),$(1);else if(f)q(r&&r>=400?r:null),$(1);else if(k){const dn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);q(dn),$(.85)}else{const dn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);q(dn),$(1)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a,y,r]);const tn=e=>[...e].sort(()=>Math.random()-.5).slice(0,6),Yn=e=>{I.current&&I.current.abort(),I.current=new AbortController;const w=A[e].map(h=>h.src);rn(w,I.current.signal).then(h=>{w.forEach(f=>{en.current.add(f),h.has(f)&&N.current.set(f,h.get(f))})}).catch(()=>{})},un=()=>{if(!g)return;const e=tn(A[g]);hn(e),sn(!0),K(!1),gn(1),_(0),X([]),Wn([]);const t=e.map(w=>w.src);rn(t,I.current?.signal).then(w=>{t.forEach(h=>{en.current.add(h),w.has(h)&&N.current.set(h,w.get(h))})}).catch(()=>{}),fn(e,[],!0)},fn=(e=z,t=kn,w=!1)=>{const h=tn(e.length?e:A[g]);let f=Math.floor(Math.random()*h.length),k=h[f].name,b=0;for(;t.includes(k)&&b<20;)f=Math.floor(Math.random()*h.length),k=h[f].name,b++;if(hn(h),In(f),Wn([...t,k]),J(!1),xn(""),ln(20),B(null),g&&!w){const C=tn(A[g].filter(T=>!t.includes(T.name))).map(T=>T.src);rn(C,I.current?.signal).then(T=>{C.forEach(R=>{en.current.add(R),T.has(R)&&N.current.set(R,T.get(R))})}).catch(()=>{})}w?(F("ready"),pn(10),V(10)):(F("memorize"),V(10))};d.useEffect(()=>{if(!(!L||U||M)){if(j==="ready")if(an<=0)F("memorize");else{const e=setTimeout(()=>pn(t=>t-1),1e3);return()=>clearTimeout(e)}if(j==="memorize")if(O<=0)F("guess");else{const e=setTimeout(()=>V(t=>t-1),1e3);return()=>clearTimeout(e)}if(j==="guess"){if(Z<=0){J(!0),B("wrong");const t=z[v].name,w=z[v].aliases,h=[t,...w||[]].join(", ");X(f=>[...f,{round:G,answer:Y,correct:h,result:"wrong"}]);return}const e=setTimeout(()=>ln(t=>t-1),1e3);return()=>clearTimeout(e)}}},[j,an,O,Z,L,U,M,z,v,G,Y]);const $n=()=>{if(v===null||Q)return;const e=z[v].name,t=z[v].aliases,w=Y.toLowerCase().trim();let h="wrong";const f=[e,...t||[]].map(b=>b.toLowerCase()),k=[e,...t||[]].join(", ");f.includes(w)?(_(b=>b+1),B("correct"),h="correct"):f.some(b=>wi(w,b)===1)?(_(b=>b+.5),B("almost"),h="almost"):(B("wrong"),h="wrong"),X(b=>[...b,{round:G,answer:w,correct:k,result:h}]),cn(!0),setTimeout(()=>{cn(!1),J(!0)},600)},qn=()=>G<D?(gn(e=>e+1),fn()):K(!0),Nn=()=>{I.current&&I.current.abort(),sn(!1),K(!1),E(null)},On=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:s,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%":mn||r||1e3,height:n?"100%":mn||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",transform:`scale(${zn})`},children:i.jsx("div",{style:{transform:"translateZ(0)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{id:"whats-missing-root",children:[!n&&On,!g&&!L&&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:()=>{E(e),Yn(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,...D===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:()=>jn(e),children:e},e))})]})]}),g&&!L&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsxs("h1",{style:o.gmHeadline1,children:["Theme selected: ",g]}),i.jsxs("p",{style:o.gmBodyM,children:["Rounds: ",D]}),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:un,children:"▶ Start game"})]}),U&&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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"2px":o.gmHeadline3.marginBottom},children:["Your score: ",vn," / ",D]}),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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"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:Pn.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||S?"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:un,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:Nn,children:"⬅️ Choose theme"})]})]}),L&&!U&&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":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"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||window.innerWidth===926&&window.innerHeight===428||P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[j==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("h1",{style:{...o.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),i.jsx("div",{style:o.gmHourglass,children:"⏳"})]}),j==="memorize"&&i.jsxs("p",{style:{...o.gmBodyM,color:"#10b981"},children:["MEMORIZE (",O,")"]}),j==="guess"&&!M&&i.jsxs("p",{style:o.gmBodyM,children:["⏳ Time left: ",Z,"s"]})]}),j!=="ready"&&i.jsx("div",{style:{...o.gmGrid,...P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?{width:"100%"}:{},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)":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"repeat(3, 130px)":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"repeat(3, 150px)":"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":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"130px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"150px":"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":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"12px":"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":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"10px":"16px"},children:z.map((e,t)=>{const w=v===t&&j==="guess"&&!M;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",...Hn==="correct"&&v===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)"}:{},...Hn==="wrong"&&v===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&&(()=>{const h=N.current.get(e.src),f=h?.complete&&h.src?h.src:e.src;return i.jsx("img",{src:f,alt:e.name,fetchPriority:"high",loading:"eager",decoding:"async",style:{width:"100%",height:"100%",objectFit:"cover"}},`${e.src}-${h?.complete?"loaded":"pending"}`)})()},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":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||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":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[j==="guess"&&!M&&i.jsx("div",{style:{display:"flex",flexDirection:nn?"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||S||p||l||x||c||H||W||m||u?"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||S||p||l||x||c||H||W||m||u||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:Y,onChange:e=>xn(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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:nn?"1":"none"}}),i.jsx("button",{style:{...o.gmButton,marginLeft:nn?"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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:$n,disabled:Q,children:Q?"...":"Check"})]})}),M&&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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:qn,children:"Next round"})]})]})]})})})})}exports.Game=oi;exports.themes=A;
32
+ `;const g=document.getElementById("whats-missing-reset");g&&g.remove(),document.head.appendChild(r)};class hi{constructor(g){this.seed=g}next(){return this.seed=(this.seed*1664525+1013904223)%Math.pow(2,32),this.seed/Math.pow(2,32)}nextInt(g){return Math.floor(this.next()*g)}}const si=(r,g)=>{const a=Array.from({length:r.length+1},()=>Array(g.length+1).fill(0));for(let s=0;s<=r.length;s++)a[s][0]=s;for(let s=0;s<=g.length;s++)a[0][s]=s;for(let s=1;s<=r.length;s++)for(let y=1;y<=g.length;y++)a[s][y]=r[s-1]===g[y-1]?a[s-1][y-1]:Math.min(a[s-1][y-1],a[s][y-1],a[s-1][y])+1;return a[r.length][g.length]},gi=r=>new Promise(g=>{const a=new Image;a.onload=()=>g(a),a.onerror=()=>g(a),a.src=r}),hn=async(r,g)=>{const a=new Map,s=r.map(async y=>{const j=await gi(y);a.set(y,j)});return await Promise.allSettled(s),a};function ai({gameCubeSize:r,screenHeight:g,screenWidth:a,seed:s}){const y=d.useRef(null);d.useEffect(()=>(ri(),()=>{document.documentElement.style.overflow="",document.body.style.overflow="";const i=document.getElementById("whats-missing-reset");i&&i.remove(),v.current&&v.current.abort()}),[]);const[j,sn]=d.useState(null),[R,gn]=d.useState([]),[G,Pn]=d.useState(4),[C,an]=d.useState(!1),[F,pn]=d.useState(1),[P,kn]=d.useState(null),[I,U]=d.useState("ready"),[ln,xn]=d.useState(10),[V,Z]=d.useState(10),[_,cn]=d.useState(20),[Tn,K]=d.useState(0),[Y,J]=d.useState(!1),[$,Hn]=d.useState(""),[L,Q]=d.useState(!1),[X,Wn]=d.useState(!1),[mn,A]=d.useState(null),[zn,nn]=d.useState([]),[Rn,un]=d.useState([]),[n,Mn]=d.useState(!1),[Ln,q]=d.useState(1),[fn,N]=d.useState(null),[S,Bn]=d.useState(!1),[p,Cn]=d.useState(!1),[l,An]=d.useState(!1),[x,En]=d.useState(!1),[c,Dn]=d.useState(!1),[H,Gn]=d.useState(!1),[W,Fn]=d.useState(!1),[m,Un]=d.useState(!1),[u,Yn]=d.useState(!1),[en,$n]=d.useState(!1),[k,qn]=d.useState(!1),tn=d.useRef(new Set),O=d.useRef(new Map),v=d.useRef(null),B=d.useRef(null);d.useEffect(()=>{s!==void 0?B.current=new hi(s):B.current=null},[s]);const Nn=()=>B.current?B.current.next():Math.random(),yn=i=>B.current?B.current.nextInt(i):Math.floor(Math.random()*i);d.useEffect(()=>{const i=()=>{const t=a??window.innerWidth,w=g??window.innerHeight,h=t<768||t===926&&w===428||t===932&&w===430,f=w<700,T=t/w>1.8,b=t===768&&w===1024,dn=t===1024&&w===768,E=t===820&&w===1180,z=t===1180&&w===820,M=t===540&&w===720,jn=t===720&&w===540,In=t===1024&&w===1366,vn=t===1366&&w===1024,Jn=t>=1200&&w>=600&&!h;Bn(Jn),Cn(b),An(dn),En(E),Dn(z),Gn(M),Fn(jn),Un(In),Yn(vn),qn(T);const Qn=h&&t>w||h||w<700||T||t===1366&&w===766||t===1366&&w===768||t===1280&&w===720||t===1440&&w===900||b||dn||E||z||M||jn||In||vn||S;if($n(Qn),Mn(h),h)N(r&&r>=320?r:null),q(1);else if(f)N(r&&r>=400?r:null),q(1);else if(T){const on=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);N(on),q(.85)}else{const on=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);N(on),q(1)}};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[a,g,r]);const wn=i=>[...i].sort(()=>Nn()-.5).slice(0,6),On=i=>{v.current&&v.current.abort(),v.current=new AbortController;const w=D[i].map(h=>h.src);hn(w,v.current.signal).then(h=>{w.forEach(f=>{tn.current.add(f),h.has(f)&&O.current.set(f,h.get(f))})}).catch(()=>{})},bn=()=>{if(!j)return;const i=wn(D[j]);gn(i),an(!0),J(!1),pn(1),K(0),nn([]),un([]);const t=i.map(w=>w.src);hn(t,v.current?.signal).then(w=>{t.forEach(h=>{tn.current.add(h),w.has(h)&&O.current.set(h,w.get(h))})}).catch(()=>{}),Sn(i,[],!0)},Sn=(i=R,t=Rn,w=!1)=>{const h=wn(i.length?i:D[j]);let f=yn(h.length),T=h[f].name,b=0;for(;t.includes(T)&&b<20;)f=yn(h.length),T=h[f].name,b++;if(gn(h),kn(f),un([...t,T]),Q(!1),Hn(""),cn(20),A(null),j&&!w){const E=wn(D[j].filter(z=>!t.includes(z.name))).map(z=>z.src);hn(E,v.current?.signal).then(z=>{E.forEach(M=>{tn.current.add(M),z.has(M)&&O.current.set(M,z.get(M))})}).catch(()=>{})}w?(U("ready"),xn(10),Z(10)):(U("memorize"),Z(10))};d.useEffect(()=>{if(!(!C||Y||L)){if(I==="ready")if(ln<=0)U("memorize");else{const i=setTimeout(()=>xn(t=>t-1),1e3);return()=>clearTimeout(i)}if(I==="memorize")if(V<=0)U("guess");else{const i=setTimeout(()=>Z(t=>t-1),1e3);return()=>clearTimeout(i)}if(I==="guess"){if(_<=0){Q(!0),A("wrong");const t=R[P].name,w=R[P].aliases,h=[t,...w||[]].join(", ");nn(f=>[...f,{round:F,answer:$,correct:h,result:"wrong"}]);return}const i=setTimeout(()=>cn(t=>t-1),1e3);return()=>clearTimeout(i)}}},[I,ln,V,_,C,Y,L,R,P,F,$]);const Vn=()=>{if(P===null||X)return;const i=R[P].name,t=R[P].aliases,w=$.toLowerCase().trim();let h="wrong";const f=[i,...t||[]].map(b=>b.toLowerCase()),T=[i,...t||[]].join(", ");f.includes(w)?(K(b=>b+1),A("correct"),h="correct"):f.some(b=>si(w,b)===1)?(K(b=>b+.5),A("almost"),h="almost"):(A("wrong"),h="wrong"),nn(b=>[...b,{round:F,answer:w,correct:T,result:h}]),Wn(!0),setTimeout(()=>{Wn(!1),Q(!0)},600)},Zn=()=>F<G?(pn(i=>i+1),Sn()):J(!0),_n=()=>{v.current&&v.current.abort(),an(!1),J(!1),sn(null)},Kn=d.useMemo(()=>{const i=a??window.innerWidth,t=g??window.innerHeight,w=!n&&i>=1200&&i<=1400;return n&&i>t||t<700&&!w?null:e.jsx("div",{style:{...o.gmLogoFixed,position:"absolute",top:16,left:16,zIndex:30},children:e.jsxs("picture",{children:[e.jsx("source",{srcSet:window.origin+"/cloud/speakid/games/whatsmissing/logo.svg",type:"image/svg+xml"}),e.jsx("img",{src:window.origin+"/cloud/speakid/games/whatsmissing/logo.png",alt:"SPEAKID Logo",style:o.gmLogoImg,loading:"lazy"})]})})},[n,a,g]);return e.jsx("div",{ref:y,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:e.jsx("div",{style:{width:n?"100%":fn||r||1e3,height:n?"100%":fn||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",transform:`scale(${Ln})`},children:e.jsx("div",{style:{transform:"translateZ(0)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsxs("div",{id:"whats-missing-root",children:[!n&&Kn,!j&&!C&&e.jsxs("div",{style:o.gmCenterScreen,children:[e.jsx("h1",{style:o.gmHeadline1,children:"WHAT'S MISSING?"}),e.jsx("p",{style:o.gmBodyM,children:"Select a theme:"}),e.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(i=>e.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:()=>{sn(i),On(i)},children:i==="animals"?"🐶 Animals":i==="food"?"🍎 Food":"🧸 Toys"},i))}),e.jsxs("div",{style:{marginTop:24},children:[e.jsx("p",{style:o.gmBodyS,children:"Choose number of rounds:"}),e.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(i=>e.jsx("button",{style:{...o.gmButton,...G===i?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:()=>Pn(i),children:i},i))})]})]}),j&&!C&&e.jsxs("div",{style:o.gmCenterScreen,children:[e.jsxs("h1",{style:o.gmHeadline1,children:["Theme selected: ",j]}),e.jsxs("p",{style:o.gmBodyM,children:["Rounds: ",G]}),e.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:bn,children:"▶ Start game"})]}),Y&&e.jsxs("div",{style:o.gmCenterScreen,children:[e.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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"2px":o.gmHeadline1.marginBottom},children:"Results"}),e.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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"2px":o.gmHeadline3.marginBottom},children:["Your score: ",Tn," / ",G]}),e.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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"2px":o.gmBodyM.marginBottom},children:"Yahoo! You did it! 🍬✨"}),e.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||p||l||x||c||H||W||m||u?"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||p||l||x||c||H||W||m||u?"4px":"32px"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Round"}),e.jsx("th",{children:"Your Answer"}),e.jsx("th",{children:"Correct"}),e.jsx("th",{children:"Result"})]})}),e.jsx("tbody",{children:zn.map((i,t)=>e.jsxs("tr",{children:[e.jsx("td",{style:o.gmTableCell,children:i.round}),e.jsx("td",{style:o.gmTableCell,children:i.answer||"—"}),e.jsx("td",{style:o.gmTableCell,children:i.correct}),e.jsx("td",{style:o.gmTableCell,children:i.result==="correct"?"✔ Correct":i.result==="almost"?"◐ Almost (0.5)":"✘ Wrong"})]},t))})]}),e.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||S?"12px":"24px"},children:[e.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:bn,children:"🔁 Play again"}),e.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:_n,children:"⬅️ Choose theme"})]})]}),C&&!Y&&e.jsxs("div",{style:o.gmGameLayout,children:[e.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":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"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||window.innerWidth===926&&window.innerHeight===428||k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[I==="ready"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{style:{...o.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),e.jsx("div",{style:o.gmHourglass,children:"⏳"})]}),I==="memorize"&&e.jsxs("p",{style:{...o.gmBodyM,color:"#10b981"},children:["MEMORIZE (",V,")"]}),I==="guess"&&!L&&e.jsxs("p",{style:o.gmBodyM,children:["⏳ Time left: ",_,"s"]})]}),I!=="ready"&&e.jsx("div",{style:{...o.gmGrid,...k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?{width:"100%"}:{},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)":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"repeat(3, 130px)":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"repeat(3, 150px)":"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":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"130px":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"150px":"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":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"12px":"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":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"10px":"16px"},children:R.map((i,t)=>{const w=P===t&&I==="guess"&&!L;return e.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",...mn==="correct"&&P===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)"}:{},...mn==="wrong"&&P===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&&(()=>{const h=O.current.get(i.src),f=h?.complete&&h.src?h.src:i.src;return e.jsx("img",{src:f,alt:i.name,fetchPriority:"high",loading:"eager",decoding:"async",style:{width:"100%",height:"100%",objectFit:"cover"}},`${i.src}-${h?.complete?"loaded":"pending"}`)})()},t)})}),e.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":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||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":k||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[I==="guess"&&!L&&e.jsx("div",{style:{display:"flex",flexDirection:en?"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||S||p||l||x||c||H||W||m||u?"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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"400px":"300px"},children:e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",placeholder:"Type the missing word",value:$,onChange:i=>Hn(i.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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:en?"1":"none"}}),e.jsx("button",{style:{...o.gmButton,marginLeft:en?"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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:Vn,disabled:X,children:X?"...":"Check"})]})}),L&&e.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||S||p||l||x||c||H||W||m||u||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||S||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:Zn,children:"Next round"})]})]})]})})})})}exports.Game=ai;exports.themes=D;
@@ -1,10 +1,10 @@
1
- import { jsx as d, jsxs as p, Fragment as kn } from "react/jsx-runtime";
2
- import { useRef as Z, useEffect as hn, useState as h, useMemo as ii } from "react";
3
- const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, b) => o.map(([a, g, ...s]) => ({
4
- src: `${ei}${b}/${g.replace(/\s/g, "%20")}.png`,
5
- name: g,
6
- aliases: s?.length ? s : void 0
7
- })), ti = [
1
+ import { jsx as d, jsxs as p, Fragment as Rn } from "react/jsx-runtime";
2
+ import { useRef as G, useEffect as q, useState as h, useMemo as di } from "react";
3
+ const oi = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, g) => o.map(([a, s, ...b]) => ({
4
+ src: `${oi}${g}/${s.replace(/\s/g, "%20")}.png`,
5
+ name: s,
6
+ aliases: b?.length ? b : void 0
7
+ })), ri = [
8
8
  ["apple", "apple"],
9
9
  ["banana", "banana"],
10
10
  ["bread", "bread"],
@@ -30,7 +30,7 @@ const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, b) =>
30
30
  ["strawberry", "strawberry"],
31
31
  ["tomato", "tomato"],
32
32
  ["watermelon", "watermelon"]
33
- ], wi = [
33
+ ], hi = [
34
34
  ["bear", "bear"],
35
35
  ["cat", "cat"],
36
36
  ["crocodile", "crocodile", "alligator"],
@@ -50,7 +50,7 @@ const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, b) =>
50
50
  ["tortoise", "tortoise", "turtle"],
51
51
  ["wolf", "wolf"],
52
52
  ["zebra", "zebra"]
53
- ], di = [
53
+ ], si = [
54
54
  ["ball", "ball"],
55
55
  ["balloon", "balloon"],
56
56
  ["blocks", "blocks"],
@@ -70,11 +70,11 @@ const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, b) =>
70
70
  ["teddy_bear", "teddy bear"],
71
71
  ["yo-yo", "yo-yo"],
72
72
  ["crayons", "crayons"]
73
- ], _ = {
74
- food: gn(ti, "food"),
75
- animals: gn(wi, "animals"),
76
- toys: gn(di, "toys")
77
- }, oi = `
73
+ ], K = {
74
+ food: gn(ri, "food"),
75
+ animals: gn(hi, "animals"),
76
+ toys: gn(si, "toys")
77
+ }, gi = `
78
78
  @keyframes spin {
79
79
  from { transform: rotate(0deg); }
80
80
  to { transform: rotate(360deg); }
@@ -82,9 +82,9 @@ const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, b) =>
82
82
  `;
83
83
  if (typeof document < "u" && !document.getElementById("spin-keyframes")) {
84
84
  const o = document.createElement("style");
85
- o.id = "spin-keyframes", o.innerHTML = oi, document.head.appendChild(o);
85
+ o.id = "spin-keyframes", o.innerHTML = gi, document.head.appendChild(o);
86
86
  }
87
- const ri = {
87
+ const ai = {
88
88
  animation: "spin 1.4s linear infinite"
89
89
  }, w = {
90
90
  gmCenterScreen: {
@@ -219,9 +219,9 @@ const ri = {
219
219
  },
220
220
  gmHourglass: {
221
221
  fontSize: "42px",
222
- ...ri
222
+ ...ai
223
223
  }
224
- }, hi = () => {
224
+ }, pi = () => {
225
225
  const o = document.createElement("style");
226
226
  o.id = "whats-missing-reset", o.textContent = `
227
227
  #whats-missing-root, #whats-missing-root * {
@@ -250,162 +250,185 @@ const ri = {
250
250
  overflow: hidden !important;
251
251
  }
252
252
  `;
253
- const b = document.getElementById("whats-missing-reset");
254
- b && b.remove(), document.head.appendChild(o);
255
- }, gi = (o, b) => {
256
- const a = Array.from({ length: o.length + 1 }, () => Array(b.length + 1).fill(0));
257
- for (let g = 0; g <= o.length; g++) a[g][0] = g;
258
- for (let g = 0; g <= b.length; g++) a[0][g] = g;
259
- for (let g = 1; g <= o.length; g++)
260
- for (let s = 1; s <= b.length; s++)
261
- a[g][s] = o[g - 1] === b[s - 1] ? a[g - 1][s - 1] : Math.min(a[g - 1][s - 1], a[g][s - 1], a[g - 1][s]) + 1;
262
- return a[o.length][b.length];
263
- }, si = (o) => new Promise((b) => {
253
+ const g = document.getElementById("whats-missing-reset");
254
+ g && g.remove(), document.head.appendChild(o);
255
+ };
256
+ class li {
257
+ constructor(g) {
258
+ this.seed = g;
259
+ }
260
+ // Linear Congruential Generator (LCG)
261
+ // Используем параметры из Numerical Recipes
262
+ next() {
263
+ return this.seed = (this.seed * 1664525 + 1013904223) % Math.pow(2, 32), this.seed / Math.pow(2, 32);
264
+ }
265
+ // Генерирует случайное число от 0 до max (не включая max)
266
+ nextInt(g) {
267
+ return Math.floor(this.next() * g);
268
+ }
269
+ }
270
+ const ci = (o, g) => {
271
+ const a = Array.from({ length: o.length + 1 }, () => Array(g.length + 1).fill(0));
272
+ for (let s = 0; s <= o.length; s++) a[s][0] = s;
273
+ for (let s = 0; s <= g.length; s++) a[0][s] = s;
274
+ for (let s = 1; s <= o.length; s++)
275
+ for (let b = 1; b <= g.length; b++)
276
+ a[s][b] = o[s - 1] === g[b - 1] ? a[s - 1][b - 1] : Math.min(a[s - 1][b - 1], a[s][b - 1], a[s - 1][b]) + 1;
277
+ return a[o.length][g.length];
278
+ }, xi = (o) => new Promise((g) => {
264
279
  const a = new Image();
265
- a.onload = () => b(a), a.onerror = () => b(a), a.src = o;
266
- }), sn = async (o, b) => {
267
- const a = /* @__PURE__ */ new Map(), g = o.map(async (s) => {
268
- const E = await si(s);
269
- a.set(s, E);
280
+ a.onload = () => g(a), a.onerror = () => g(a), a.src = o;
281
+ }), an = async (o, g) => {
282
+ const a = /* @__PURE__ */ new Map(), s = o.map(async (b) => {
283
+ const v = await xi(b);
284
+ a.set(b, v);
270
285
  });
271
- return await Promise.allSettled(g), a;
286
+ return await Promise.allSettled(s), a;
272
287
  };
273
- function li({
288
+ function mi({
274
289
  gameCubeSize: o,
275
- screenHeight: b,
276
- screenWidth: a
290
+ screenHeight: g,
291
+ screenWidth: a,
292
+ seed: s
277
293
  }) {
278
- const g = Z(null);
279
- hn(() => (hi(), () => {
294
+ const b = G(null);
295
+ q(() => (pi(), () => {
280
296
  document.documentElement.style.overflow = "", document.body.style.overflow = "";
281
297
  const i = document.getElementById("whats-missing-reset");
282
- i && i.remove(), P.current && P.current.abort();
298
+ i && i.remove(), k.current && k.current.abort();
283
299
  }), []);
284
- const [s, E] = h(null), [M, an] = h([]), [D, zn] = h(4), [C, pn] = h(!1), [G, ln] = h(1), [k, Tn] = h(null), [v, F] = h("ready"), [cn, xn] = h(10), [q, K] = h(10), [O, Hn] = h(20), [Ln, J] = h(0), [U, Q] = h(!1), [Y, Wn] = h(""), [B, X] = h(!1), [nn, mn] = h(!1), [fn, A] = h(null), [Mn, en] = h([]), [Rn, un] = h([]), [n, Bn] = h(!1), [Cn, $] = h(1), [yn, N] = h(null), [S, An] = h(!1), [l, jn] = h(!1), [c, En] = h(!1), [x, Dn] = h(!1), [H, Gn] = h(!1), [W, Fn] = h(!1), [m, Un] = h(!1), [f, Yn] = h(!1), [u, $n] = h(!1), [tn, Nn] = h(!1), [z, Vn] = h(!1), wn = Z(/* @__PURE__ */ new Set()), V = Z(/* @__PURE__ */ new Map()), P = Z(null);
285
- hn(() => {
300
+ const [v, pn] = h(null), [L, ln] = h([]), [F, Mn] = h(4), [j, cn] = h(!1), [U, xn] = h(1), [z, Ln] = h(null), [P, Y] = h("ready"), [Hn, Wn] = h(10), [O, J] = h(10), [Q, mn] = h(20), [Bn, X] = h(0), [$, nn] = h(!1), [N, un] = h(""), [C, en] = h(!1), [tn, fn] = h(!1), [yn, E] = h(null), [Cn, wn] = h([]), [An, bn] = h([]), [n, jn] = h(!1), [En, V] = h(1), [In, Z] = h(null), [S, Dn] = h(!1), [l, Gn] = h(!1), [c, Fn] = h(!1), [x, Un] = h(!1), [H, Yn] = h(!1), [W, $n] = h(!1), [m, Nn] = h(!1), [u, Vn] = h(!1), [f, Zn] = h(!1), [dn, _n] = h(!1), [T, qn] = h(!1), on = G(/* @__PURE__ */ new Set()), _ = G(/* @__PURE__ */ new Map()), k = G(null), A = G(null);
301
+ q(() => {
302
+ s !== void 0 ? A.current = new li(s) : A.current = null;
303
+ }, [s]);
304
+ const Kn = () => A.current ? A.current.next() : Math.random(), Sn = (i) => A.current ? A.current.nextInt(i) : Math.floor(Math.random() * i);
305
+ q(() => {
286
306
  const i = () => {
287
- const e = a ?? window.innerWidth, t = b ?? window.innerHeight, r = e < 768 || e === 926 && t === 428 || e === 932 && t === 430, y = t < 700, T = e / t > 1.8, I = e === 768 && t === 1024, on = e === 1024 && t === 768, j = e === 820 && t === 1180, L = e === 1180 && t === 820, R = e === 540 && t === 720, Sn = e === 720 && t === 540, vn = e === 1024 && t === 1366, Pn = e === 1366 && t === 1024, Jn = e >= 1200 && t >= 600 && !r;
288
- An(Jn), jn(I), En(on), Dn(j), Gn(L), Fn(R), Un(Sn), Yn(vn), $n(Pn), Vn(T);
289
- const Qn = r && e > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
290
- t < 700 || T || // ✅ Широкие экраны
291
- e === 1366 && t === 766 || e === 1366 && t === 768 || e === 1280 && t === 720 || e === 1440 && t === 900 || I || on || j || L || R || Sn || vn || Pn || S;
292
- if (Nn(Qn), Bn(r), r)
293
- N(o && o >= 320 ? o : null), $(1);
307
+ const e = a ?? window.innerWidth, t = g ?? window.innerHeight, r = e < 768 || e === 926 && t === 428 || e === 932 && t === 430, y = t < 700, R = e / t > 1.8, I = e === 768 && t === 1024, hn = e === 1024 && t === 768, D = e === 820 && t === 1180, M = e === 1180 && t === 820, B = e === 540 && t === 720, kn = e === 720 && t === 540, zn = e === 1024 && t === 1366, Tn = e === 1366 && t === 1024, ii = e >= 1200 && t >= 600 && !r;
308
+ Dn(ii), Gn(I), Fn(hn), Un(D), Yn(M), $n(B), Nn(kn), Vn(zn), Zn(Tn), qn(R);
309
+ const ei = r && e > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
310
+ t < 700 || R || // ✅ Широкие экраны
311
+ e === 1366 && t === 766 || e === 1366 && t === 768 || e === 1280 && t === 720 || e === 1440 && t === 900 || I || hn || D || M || B || kn || zn || Tn || S;
312
+ if (_n(ei), jn(r), r)
313
+ Z(o && o >= 320 ? o : null), V(1);
294
314
  else if (y)
295
- N(o && o >= 400 ? o : null), $(1);
296
- else if (T) {
297
- const rn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
298
- N(rn), $(0.85);
315
+ Z(o && o >= 400 ? o : null), V(1);
316
+ else if (R) {
317
+ const sn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
318
+ Z(sn), V(0.85);
299
319
  } else {
300
- const rn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
301
- N(rn), $(1);
320
+ const sn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
321
+ Z(sn), V(1);
302
322
  }
303
323
  };
304
324
  return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
305
- }, [a, b, o]);
306
- const dn = (i) => [...i].sort(() => Math.random() - 0.5).slice(0, 6), Zn = (i) => {
307
- P.current && P.current.abort(), P.current = new AbortController();
308
- const t = _[i].map((r) => r.src);
309
- sn(t, P.current.signal).then((r) => {
325
+ }, [a, g, o]);
326
+ const rn = (i) => [...i].sort(() => Kn() - 0.5).slice(0, 6), On = (i) => {
327
+ k.current && k.current.abort(), k.current = new AbortController();
328
+ const t = K[i].map((r) => r.src);
329
+ an(t, k.current.signal).then((r) => {
310
330
  t.forEach((y) => {
311
- wn.current.add(y), r.has(y) && V.current.set(y, r.get(y));
331
+ on.current.add(y), r.has(y) && _.current.set(y, r.get(y));
312
332
  });
313
333
  }).catch(() => {
314
334
  });
315
- }, bn = () => {
316
- if (!s) return;
317
- const i = dn(_[s]);
318
- an(i), pn(!0), Q(!1), ln(1), J(0), en([]), un([]);
335
+ }, vn = () => {
336
+ if (!v) return;
337
+ const i = rn(K[v]);
338
+ ln(i), cn(!0), nn(!1), xn(1), X(0), wn([]), bn([]);
319
339
  const e = i.map((t) => t.src);
320
- sn(e, P.current?.signal).then((t) => {
340
+ an(e, k.current?.signal).then((t) => {
321
341
  e.forEach((r) => {
322
- wn.current.add(r), t.has(r) && V.current.set(r, t.get(r));
342
+ on.current.add(r), t.has(r) && _.current.set(r, t.get(r));
323
343
  });
324
344
  }).catch(() => {
325
- }), In(i, [], !0);
326
- }, In = (i = M, e = Rn, t = !1) => {
327
- const r = dn(i.length ? i : _[s]);
328
- let y = Math.floor(Math.random() * r.length), T = r[y].name, I = 0;
329
- for (; e.includes(T) && I < 20; )
330
- y = Math.floor(Math.random() * r.length), T = r[y].name, I++;
331
- if (an(r), Tn(y), un([...e, T]), X(!1), Wn(""), Hn(20), A(null), s && !t) {
332
- const j = dn(_[s].filter((L) => !e.includes(L.name))).map((L) => L.src);
333
- sn(j, P.current?.signal).then((L) => {
334
- j.forEach((R) => {
335
- wn.current.add(R), L.has(R) && V.current.set(R, L.get(R));
345
+ }), Pn(i, [], !0);
346
+ }, Pn = (i = L, e = An, t = !1) => {
347
+ const r = rn(i.length ? i : K[v]);
348
+ let y = Sn(r.length), R = r[y].name, I = 0;
349
+ for (; e.includes(R) && I < 20; )
350
+ y = Sn(r.length), R = r[y].name, I++;
351
+ if (ln(r), Ln(y), bn([...e, R]), en(!1), un(""), mn(20), E(null), v && !t) {
352
+ const D = rn(K[v].filter((M) => !e.includes(M.name))).map((M) => M.src);
353
+ an(D, k.current?.signal).then((M) => {
354
+ D.forEach((B) => {
355
+ on.current.add(B), M.has(B) && _.current.set(B, M.get(B));
336
356
  });
337
357
  }).catch(() => {
338
358
  });
339
359
  }
340
- t ? (F("ready"), xn(10), K(10)) : (F("memorize"), K(10));
360
+ t ? (Y("ready"), Wn(10), J(10)) : (Y("memorize"), J(10));
341
361
  };
342
- hn(() => {
343
- if (!(!C || U || B)) {
344
- if (v === "ready")
345
- if (cn <= 0) F("memorize");
362
+ q(() => {
363
+ if (!(!j || $ || C)) {
364
+ if (P === "ready")
365
+ if (Hn <= 0) Y("memorize");
346
366
  else {
347
- const i = setTimeout(() => xn((e) => e - 1), 1e3);
367
+ const i = setTimeout(() => Wn((e) => e - 1), 1e3);
348
368
  return () => clearTimeout(i);
349
369
  }
350
- if (v === "memorize")
351
- if (q <= 0) F("guess");
370
+ if (P === "memorize")
371
+ if (O <= 0) Y("guess");
352
372
  else {
353
- const i = setTimeout(() => K((e) => e - 1), 1e3);
373
+ const i = setTimeout(() => J((e) => e - 1), 1e3);
354
374
  return () => clearTimeout(i);
355
375
  }
356
- if (v === "guess") {
357
- if (O <= 0) {
358
- X(!0), A("wrong");
359
- const e = M[k].name, t = M[k].aliases, r = [e, ...t || []].join(", ");
360
- en((y) => [
376
+ if (P === "guess") {
377
+ if (Q <= 0) {
378
+ en(!0), E("wrong");
379
+ const e = L[z].name, t = L[z].aliases, r = [e, ...t || []].join(", ");
380
+ wn((y) => [
361
381
  ...y,
362
- { round: G, answer: Y, correct: r, result: "wrong" }
382
+ { round: U, answer: N, correct: r, result: "wrong" }
363
383
  ]);
364
384
  return;
365
385
  }
366
- const i = setTimeout(() => Hn((e) => e - 1), 1e3);
386
+ const i = setTimeout(() => mn((e) => e - 1), 1e3);
367
387
  return () => clearTimeout(i);
368
388
  }
369
389
  }
370
- }, [v, cn, q, O, C, U, B, M, k, G, Y]);
371
- const _n = () => {
372
- if (k === null || nn) return;
373
- const i = M[k].name, e = M[k].aliases, t = Y.toLowerCase().trim();
390
+ }, [P, Hn, O, Q, j, $, C, L, z, U, N]);
391
+ const Jn = () => {
392
+ if (z === null || tn) return;
393
+ const i = L[z].name, e = L[z].aliases, t = N.toLowerCase().trim();
374
394
  let r = "wrong";
375
- const y = [i, ...e || []].map((I) => I.toLowerCase()), T = [i, ...e || []].join(", ");
376
- y.includes(t) ? (J((I) => I + 1), A("correct"), r = "correct") : y.some((I) => gi(t, I) === 1) ? (J((I) => I + 0.5), A("almost"), r = "almost") : (A("wrong"), r = "wrong"), en((I) => [...I, { round: G, answer: t, correct: T, result: r }]), mn(!0), setTimeout(() => {
377
- mn(!1), X(!0);
395
+ const y = [i, ...e || []].map((I) => I.toLowerCase()), R = [i, ...e || []].join(", ");
396
+ y.includes(t) ? (X((I) => I + 1), E("correct"), r = "correct") : y.some((I) => ci(t, I) === 1) ? (X((I) => I + 0.5), E("almost"), r = "almost") : (E("wrong"), r = "wrong"), wn((I) => [...I, { round: U, answer: t, correct: R, result: r }]), fn(!0), setTimeout(() => {
397
+ fn(!1), en(!0);
378
398
  }, 600);
379
- }, qn = () => G < D ? (ln((i) => i + 1), In()) : Q(!0), Kn = () => {
380
- P.current && P.current.abort(), pn(!1), Q(!1), E(null);
381
- }, On = ii(
382
- () => n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? null : (
383
- // ensure logo is positioned inside the square container
384
- /* @__PURE__ */ d("div", { style: { ...w.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ p("picture", { children: [
385
- /* @__PURE__ */ d(
386
- "source",
387
- {
388
- srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
389
- type: "image/svg+xml"
390
- }
391
- ),
392
- /* @__PURE__ */ d(
393
- "img",
394
- {
395
- src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
396
- alt: "SPEAKID Logo",
397
- style: w.gmLogoImg,
398
- loading: "lazy"
399
- }
400
- )
401
- ] }) })
402
- ),
403
- [n]
399
+ }, Qn = () => U < F ? (xn((i) => i + 1), Pn()) : nn(!0), Xn = () => {
400
+ k.current && k.current.abort(), cn(!1), nn(!1), pn(null);
401
+ }, ni = di(
402
+ () => {
403
+ const i = a ?? window.innerWidth, e = g ?? window.innerHeight, t = !n && i >= 1200 && i <= 1400;
404
+ return n && i > e || e < 700 && !t ? null : (
405
+ // ensure logo is positioned inside the square container
406
+ /* @__PURE__ */ d("div", { style: { ...w.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ p("picture", { children: [
407
+ /* @__PURE__ */ d(
408
+ "source",
409
+ {
410
+ srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
411
+ type: "image/svg+xml"
412
+ }
413
+ ),
414
+ /* @__PURE__ */ d(
415
+ "img",
416
+ {
417
+ src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
418
+ alt: "SPEAKID Logo",
419
+ style: w.gmLogoImg,
420
+ loading: "lazy"
421
+ }
422
+ )
423
+ ] }) })
424
+ );
425
+ },
426
+ [n, a, g]
404
427
  );
405
428
  return /* @__PURE__ */ d(
406
429
  "div",
407
430
  {
408
- ref: g,
431
+ ref: b,
409
432
  style: {
410
433
  width: "100%",
411
434
  height: "100%",
@@ -425,8 +448,8 @@ function li({
425
448
  "div",
426
449
  {
427
450
  style: {
428
- width: n ? "100%" : yn || o || 1e3,
429
- height: n ? "100%" : yn || o || 1e3,
451
+ width: n ? "100%" : In || o || 1e3,
452
+ height: n ? "100%" : In || o || 1e3,
430
453
  display: "flex",
431
454
  justifyContent: "center",
432
455
  alignItems: "center",
@@ -437,7 +460,7 @@ function li({
437
460
  margin: n ? "0 auto" : "unset",
438
461
  position: "relative",
439
462
  // needed so absolute logo is inside the square
440
- transform: `scale(${Cn})`
463
+ transform: `scale(${En})`
441
464
  // ✅ Применяем масштаб для широких экранов
442
465
  },
443
466
  children: /* @__PURE__ */ d(
@@ -452,8 +475,8 @@ function li({
452
475
  alignItems: "center"
453
476
  },
454
477
  children: /* @__PURE__ */ p("div", { id: "whats-missing-root", children: [
455
- !n && On,
456
- !s && !C && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
478
+ !n && ni,
479
+ !v && !j && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
457
480
  /* @__PURE__ */ d("h1", { style: w.gmHeadline1, children: "WHAT'S MISSING?" }),
458
481
  /* @__PURE__ */ d("p", { style: w.gmBodyM, children: "Select a theme:" }),
459
482
  /* @__PURE__ */ d("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((i) => /* @__PURE__ */ d("button", { style: {
@@ -462,7 +485,7 @@ function li({
462
485
  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",
463
486
  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"
464
487
  }, onClick: () => {
465
- E(i), Zn(i);
488
+ pn(i), On(i);
466
489
  }, children: i === "animals" ? "🐶 Animals" : i === "food" ? "🍎 Food" : "🧸 Toys" }, i)) }),
467
490
  /* @__PURE__ */ p("div", { style: { marginTop: 24 }, children: [
468
491
  /* @__PURE__ */ d("p", { style: w.gmBodyS, children: "Choose number of rounds:" }),
@@ -471,60 +494,60 @@ function li({
471
494
  {
472
495
  style: {
473
496
  ...w.gmButton,
474
- ...D === i ? w.gmButtonActive : {},
497
+ ...F === i ? w.gmButtonActive : {},
475
498
  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",
476
499
  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",
477
500
  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"
478
501
  },
479
- onClick: () => zn(i),
502
+ onClick: () => Mn(i),
480
503
  children: i
481
504
  },
482
505
  i
483
506
  )) })
484
507
  ] })
485
508
  ] }),
486
- s && !C && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
509
+ v && !j && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
487
510
  /* @__PURE__ */ p("h1", { style: w.gmHeadline1, children: [
488
511
  "Theme selected: ",
489
- s
512
+ v
490
513
  ] }),
491
514
  /* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
492
515
  "Rounds: ",
493
- D
516
+ F
494
517
  ] }),
495
518
  /* @__PURE__ */ d("button", { style: {
496
519
  ...w.gmButton,
497
520
  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",
498
521
  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",
499
522
  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"
500
- }, onClick: bn, children: "▶ Start game" })
523
+ }, onClick: vn, children: "▶ Start game" })
501
524
  ] }),
502
- U && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
525
+ $ && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
503
526
  /* @__PURE__ */ d("h1", { style: {
504
527
  ...w.gmHeadline1,
505
- 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 || l || c || x || H || W || m || f || u ? "0px" : w.gmHeadline1.marginTop,
506
- 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 || l || c || x || H || W || m || f || u ? "2px" : w.gmHeadline1.marginBottom
528
+ 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 || l || c || x || H || W || m || u || f ? "0px" : w.gmHeadline1.marginTop,
529
+ 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 || l || c || x || H || W || m || u || f ? "2px" : w.gmHeadline1.marginBottom
507
530
  }, children: "Results" }),
508
531
  /* @__PURE__ */ p("h2", { style: {
509
532
  ...w.gmHeadline3,
510
- 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 || l || c || x || H || W || m || f || u ? "0px" : w.gmHeadline3.marginTop,
511
- 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 || l || c || x || H || W || m || f || u ? "2px" : w.gmHeadline3.marginBottom
533
+ 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 || l || c || x || H || W || m || u || f ? "0px" : w.gmHeadline3.marginTop,
534
+ 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 || l || c || x || H || W || m || u || f ? "2px" : w.gmHeadline3.marginBottom
512
535
  }, children: [
513
536
  "Your score: ",
514
- Ln,
537
+ Bn,
515
538
  " / ",
516
- D
539
+ F
517
540
  ] }),
518
541
  /* @__PURE__ */ d("p", { style: {
519
542
  ...w.gmBodyM,
520
543
  color: "#10b981",
521
- 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 || l || c || x || H || W || m || f || u ? "0px" : "12px",
522
- 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 || l || c || x || H || W || m || f || u ? "2px" : w.gmBodyM.marginBottom
544
+ 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 || l || c || x || H || W || m || u || f ? "0px" : "12px",
545
+ 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 || l || c || x || H || W || m || u || f ? "2px" : w.gmBodyM.marginBottom
523
546
  }, children: "Yahoo! You did it! 🍬✨" }),
524
547
  /* @__PURE__ */ p("table", { style: {
525
548
  ...w.gmTable,
526
- 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 || l || c || x || H || W || m || f || u ? "0px" : "20px",
527
- 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 || l || c || x || H || W || m || f || u ? "4px" : "32px"
549
+ 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 || l || c || x || H || W || m || u || f ? "0px" : "20px",
550
+ 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 || l || c || x || H || W || m || u || f ? "4px" : "32px"
528
551
  }, children: [
529
552
  /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ p("tr", { children: [
530
553
  /* @__PURE__ */ d("th", { children: "Round" }),
@@ -532,7 +555,7 @@ function li({
532
555
  /* @__PURE__ */ d("th", { children: "Correct" }),
533
556
  /* @__PURE__ */ d("th", { children: "Result" })
534
557
  ] }) }),
535
- /* @__PURE__ */ d("tbody", { children: Mn.map((i, e) => /* @__PURE__ */ p("tr", { children: [
558
+ /* @__PURE__ */ d("tbody", { children: Cn.map((i, e) => /* @__PURE__ */ p("tr", { children: [
536
559
  /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.round }),
537
560
  /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.answer || "—" }),
538
561
  /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.correct }),
@@ -549,63 +572,63 @@ function li({
549
572
  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",
550
573
  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",
551
574
  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"
552
- }, onClick: bn, children: "🔁 Play again" }),
575
+ }, onClick: vn, children: "🔁 Play again" }),
553
576
  /* @__PURE__ */ d("button", { style: {
554
577
  ...w.gmButton,
555
578
  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",
556
579
  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",
557
580
  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"
558
- }, onClick: Kn, children: "⬅️ Choose theme" })
581
+ }, onClick: Xn, children: "⬅️ Choose theme" })
559
582
  ] })
560
583
  ] }),
561
- C && !U && /* @__PURE__ */ p("div", { style: w.gmGameLayout, children: [
584
+ j && !$ && /* @__PURE__ */ p("div", { style: w.gmGameLayout, children: [
562
585
  /* @__PURE__ */ p(
563
586
  "div",
564
587
  {
565
588
  style: {
566
- 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" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "50px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
589
+ 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" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "50px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
567
590
  display: "flex",
568
591
  flexDirection: "column",
569
592
  justifyContent: "center",
570
593
  alignItems: "center",
571
- 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 || z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
594
+ 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 || T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
572
595
  },
573
596
  children: [
574
- v === "ready" && /* @__PURE__ */ p(kn, { children: [
597
+ P === "ready" && /* @__PURE__ */ p(Rn, { children: [
575
598
  /* @__PURE__ */ d("h1", { style: { ...w.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
576
599
  /* @__PURE__ */ d("div", { style: w.gmHourglass, children: "⏳" })
577
600
  ] }),
578
- v === "memorize" && /* @__PURE__ */ p("p", { style: { ...w.gmBodyM, color: "#10b981" }, children: [
601
+ P === "memorize" && /* @__PURE__ */ p("p", { style: { ...w.gmBodyM, color: "#10b981" }, children: [
579
602
  "MEMORIZE (",
580
- q,
603
+ O,
581
604
  ")"
582
605
  ] }),
583
- v === "guess" && !B && /* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
606
+ P === "guess" && !C && /* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
584
607
  "⏳ Time left: ",
585
- O,
608
+ Q,
586
609
  "s"
587
610
  ] })
588
611
  ]
589
612
  }
590
613
  ),
591
- v !== "ready" && /* @__PURE__ */ d(
614
+ P !== "ready" && /* @__PURE__ */ d(
592
615
  "div",
593
616
  {
594
617
  style: {
595
618
  ...w.gmGrid,
596
- ...z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
619
+ ...T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
597
620
  // ✅ Широкие экраны: полная ширина грида
598
- 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)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
621
+ 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)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
599
622
  // desktop: 3 колонки фиксированного размера
600
- 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" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
623
+ 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" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
601
624
  // desktop: стандартная высота
602
- 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" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
625
+ 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" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
603
626
  justifyItems: "center",
604
627
  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%",
605
- 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" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
628
+ 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" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
606
629
  },
607
- children: M.map((i, e) => {
608
- const t = k === e && v === "guess" && !B;
630
+ children: L.map((i, e) => {
631
+ const t = z === e && P === "guess" && !C;
609
632
  return /* @__PURE__ */ d(
610
633
  "div",
611
634
  {
@@ -617,17 +640,17 @@ function li({
617
640
  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)",
618
641
  transition: "all 0.3s ease",
619
642
  cursor: "pointer",
620
- ...fn === "correct" && k === e ? {
643
+ ...yn === "correct" && z === e ? {
621
644
  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",
622
645
  transform: "scale(1.03)"
623
646
  } : {},
624
- ...fn === "wrong" && k === e ? {
647
+ ...yn === "wrong" && z === e ? {
625
648
  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",
626
649
  transform: "scale(1.03)"
627
650
  } : {}
628
651
  },
629
652
  children: !t && (() => {
630
- const r = V.current.get(i.src), y = r?.complete && r.src ? r.src : i.src;
653
+ const r = _.current.get(i.src), y = r?.complete && r.src ? r.src : i.src;
631
654
  return /* @__PURE__ */ d(
632
655
  "img",
633
656
  {
@@ -652,31 +675,31 @@ function li({
652
675
  }
653
676
  ),
654
677
  /* @__PURE__ */ p("div", { style: {
655
- 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" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
656
- 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" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
678
+ 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" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
679
+ 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" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
657
680
  }, children: [
658
- v === "guess" && !B && /* @__PURE__ */ d("div", { style: {
681
+ P === "guess" && !C && /* @__PURE__ */ d("div", { style: {
659
682
  display: "flex",
660
- flexDirection: tn ? "row" : "column",
661
- 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 || S || l || c || x || H || W || m || f || u ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
683
+ flexDirection: dn ? "row" : "column",
684
+ 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 || S || l || c || x || H || W || m || u || f ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
662
685
  alignItems: "center",
663
686
  justifyContent: "center",
664
687
  width: "100%",
665
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
666
- }, children: /* @__PURE__ */ p(kn, { children: [
688
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
689
+ }, children: /* @__PURE__ */ p(Rn, { children: [
667
690
  /* @__PURE__ */ d(
668
691
  "input",
669
692
  {
670
693
  type: "text",
671
694
  placeholder: "Type the missing word",
672
- value: Y,
673
- onChange: (i) => Wn(i.target.value),
695
+ value: N,
696
+ onChange: (i) => un(i.target.value),
674
697
  style: {
675
698
  ...w.gmInput,
676
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "250px" : "auto",
677
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
678
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
679
- flex: tn ? "1" : "none"
699
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "250px" : "auto",
700
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
701
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
702
+ flex: dn ? "1" : "none"
680
703
  }
681
704
  }
682
705
  ),
@@ -685,23 +708,23 @@ function li({
685
708
  {
686
709
  style: {
687
710
  ...w.gmButton,
688
- marginLeft: tn ? "8px" : "0",
689
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
690
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
691
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
711
+ marginLeft: dn ? "8px" : "0",
712
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
713
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
714
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
692
715
  flexShrink: 0
693
716
  },
694
- onClick: _n,
695
- disabled: nn,
696
- children: nn ? "..." : "Check"
717
+ onClick: Jn,
718
+ disabled: tn,
719
+ children: tn ? "..." : "Check"
697
720
  }
698
721
  )
699
722
  ] }) }),
700
- B && /* @__PURE__ */ d("button", { style: {
723
+ C && /* @__PURE__ */ d("button", { style: {
701
724
  ...w.gmButton,
702
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
703
- 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 || S || l || c || x || H || W || m || f || u || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
704
- }, onClick: qn, children: "Next round" })
725
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
726
+ 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 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
727
+ }, onClick: Qn, children: "Next round" })
705
728
  ] })
706
729
  ] })
707
730
  ] })
@@ -713,6 +736,6 @@ function li({
713
736
  );
714
737
  }
715
738
  export {
716
- li as Game,
717
- _ as themes
739
+ mi as Game,
740
+ K as themes
718
741
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mblinkov/whats-missing",
3
- "version": "20.0.52",
3
+ "version": "20.0.54",
4
4
  "description": "A memory game component for React - Guess what's missing from a collection of images",
5
5
  "main": "dist/whats-missing.cjs.js",
6
6
  "module": "dist/whats-missing.es.js",