File size: 33,899 Bytes
00577d2
 
 
 
 
1
2
3
4
5
6
var vt=Object.defineProperty;var Fe=Object.getOwnPropertySymbols;var wt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable;var Me=(n,e,t)=>e in n?vt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,He=(n,e)=>{for(var t in e||(e={}))wt.call(e,t)&&Me(n,t,e[t]);if(Fe)for(var t of Fe(e))_t.call(e,t)&&Me(n,t,e[t]);return n};import{S as Le,i as Ne,s as Ue,e as L,k as W,c as N,a as R,m as Y,d as b,b as p,g as $,J as v,K as _e,L as me,n as be,M as Oe,t as ae,h as se,N as Te,O as Ae,P as bt,x as ye,y as Ve,z as ke,o as Ee,p as le,C as xe,q as Pe,r as ee,Q as ze,R as ve,T as je,l as Ie,j as Re,U as yt,w as mt,V as pt,W as Be,f as we,X as kt,Y as Et}from"../chunks/index-7118b6c4.js";import{_ as pe}from"../chunks/preload-helper-8235996a.js";var ce=(n=>(n.INITIAL="",n.CORRECT="correct",n.PRESENT="present",n.ABSENT="absent",n))(ce||{}),ue=(n=>(n[n.PLAYING=0]="PLAYING",n[n.SUCESS=1]="SUCESS",n[n.FAIL=2]="FAIL",n))(ue||{});function xt(n,e){const t=[...n],r=t[e];for(const a of[...r].reverse())if(a.letter){a.letter="";break}return t}function Pt(n,e,t){const r=[...n],a=r[e];for(const s of a)if(s.correct===" "&&(s.letter=" "),!s.letter){s.letter=t;break}return r}const qe={[ce.CORRECT]:"#00b81a",[ce.PRESENT]:"#ffc80a",[ce.ABSENT]:"#d9d9d9",[ce.INITIAL]:"#5d5d5d"},De={2:"two",5:"five",10:"ten",15:"fifteen",20:"twenty",35:"thirtyfive",50:"fifty"},St=["\u{1F917} Hugging \u{1F917}","\u{1F9DE} Genius \u{1F9DE}","\u{1F929} Magnificent \u{1F929}","\u{1F632} Impressive \u{1F632}","\u{1F9DA} Splendid \u{1F9DA}","\u2733 Great \u2733","\u{1F361} Phew \u{1F361}"];function Xe(n,e,t){const r=n.slice();return r[4]=e[t],r[6]=t,r}function Ge(n,e,t){const r=n.slice();return r[7]=e[t],r}function Tt(n){let e;return{c(){e=L("div"),this.h()},l(t){e=N(t,"DIV",{class:!0}),R(e).forEach(b),this.h()},h(){p(e,"class","spacer svelte-2ngxdh")},m(t,r){$(t,e,r)},d(t){t&&b(e)}}}function At(n){let e,t=n[7]+"",r;return{c(){e=L("span"),r=ae(t)},l(a){e=N(a,"SPAN",{});var s=R(e);r=se(s,t),s.forEach(b)},m(a,s){$(a,e,s),v(e,r)},p:be,d(a){a&&b(e)}}}function jt(n){let e,t;return{c(){e=Te("svg"),t=Te("path"),this.h()},l(r){e=Ae(r,"svg",{xmlns:!0,height:!0,viewBox:!0,width:!0});var a=R(e);t=Ae(a,"path",{fill:!0,d:!0}),R(t).forEach(b),a.forEach(b),this.h()},h(){p(t,"fill","currentColor"),p(t,"d","M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7.07L2.4 12l4.66-7H22v14zm-11.59-2L14 13.41 17.59 17 19 15.59 15.41 12 19 8.41 17.59 7 14 10.59 10.41 7 9 8.41 12.59 12 9 15.59z"),p(e,"xmlns","http://www.w3.org/2000/svg"),p(e,"height","24"),p(e,"viewBox","0 0 24 24"),p(e,"width","24")},m(r,a){$(r,e,a),v(e,t)},p:be,d(r){r&&b(e)}}}function We(n){let e,t,r,a;function s(y,S){return y[7]==="Backspace"?jt:At}let o=s(n)(n);function u(){return n[3](n[7])}return{c(){e=L("button"),o.c(),this.h()},l(y){e=N(y,"BUTTON",{class:!0});var S=R(e);o.l(S),S.forEach(b),this.h()},h(){p(e,"class",t=(n[0][n[7]]===void 0?"":n[0][n[7]])+" "+(n[7].length>1&&"big")+" svelte-2ngxdh")},m(y,S){$(y,e,S),o.m(e,null),r||(a=_e(e,"click",u),r=!0)},p(y,S){n=y,o.p(n,S),S&1&&t!==(t=(n[0][n[7]]===void 0?"":n[0][n[7]])+" "+(n[7].length>1&&"big")+" svelte-2ngxdh")&&p(e,"class",t)},d(y){y&&b(e),o.d(),r=!1,a()}}}function It(n){let e;return{c(){e=L("div"),this.h()},l(t){e=N(t,"DIV",{class:!0}),R(e).forEach(b),this.h()},h(){p(e,"class","spacer svelte-2ngxdh")},m(t,r){$(t,e,r)},d(t){t&&b(e)}}}function Ye(n){let e,t,r,a,s=n[6]===1&&Tt(),l=n[4],o=[];for(let y=0;y<l.length;y+=1)o[y]=We(Ge(n,l,y));let u=n[6]===1&&It();return{c(){e=L("div"),s&&s.c(),t=W();for(let y=0;y<o.length;y+=1)o[y].c();r=W(),u&&u.c(),a=W(),this.h()},l(y){e=N(y,"DIV",{class:!0});var S=R(e);s&&s.l(S),t=Y(S);for(let P=0;P<o.length;P+=1)o[P].l(S);r=Y(S),u&&u.l(S),a=Y(S),S.forEach(b),this.h()},h(){p(e,"class","row svelte-2ngxdh")},m(y,S){$(y,e,S),s&&s.m(e,null),v(e,t);for(let P=0;P<o.length;P+=1)o[P].m(e,null);v(e,r),u&&u.m(e,null),v(e,a)},p(y,S){if(S&7){l=y[4];let P;for(P=0;P<l.length;P+=1){const U=Ge(y,l,P);o[P]?o[P].p(U,S):(o[P]=We(U),o[P].c(),o[P].m(e,r))}for(;P<o.length;P+=1)o[P].d(1);o.length=l.length}},d(y){y&&b(e),s&&s.d(),me(o,y),u&&u.d()}}}function Rt(n){let e,t=n[2],r=[];for(let a=0;a<t.length;a+=1)r[a]=Ye(Xe(n,t,a));return{c(){e=L("div");for(let a=0;a<r.length;a+=1)r[a].c();this.h()},l(a){e=N(a,"DIV",{class:!0});var s=R(e);for(let l=0;l<r.length;l+=1)r[l].l(s);s.forEach(b),this.h()},h(){p(e,"class","my-3 mx-auto select-none max-w-md")},m(a,s){$(a,e,s);for(let l=0;l<r.length;l+=1)r[l].m(e,null)},p(a,[s]){if(s&7){t=a[2];let l;for(l=0;l<t.length;l+=1){const o=Xe(a,t,l);r[l]?r[l].p(o,s):(r[l]=Ye(o),r[l].c(),r[l].m(e,null))}for(;l<r.length;l+=1)r[l].d(1);r.length=t.length}},i:be,o:be,d(a){a&&b(e),me(r,a)}}}function Dt(n,e,t){let{letterStates:r}=e;const a=Oe(),s=["qwertyuiop".split(""),[..."asdfghjkl".split("")],["Enter",..."zxcvbnm".split(""),"Backspace"]],l=o=>a("keyup",o);return n.$$set=o=>{"letterStates"in o&&t(0,r=o.letterStates)},[r,a,s,l]}class Ct extends Le{constructor(e){super(),Ne(this,e,Dt,Rt,Ue,{letterStates:0})}}function Lt(n){const e=n-1;return e*e*e+1}function Ce(n,{delay:e=0,duration:t=400,easing:r=bt}={}){const a=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:r,css:s=>`opacity: ${s*a}`}}function Ke(n,{delay:e=0,duration:t=400,easing:r=Lt,start:a=0,opacity:s=0}={}){const l=getComputedStyle(n),o=+l.opacity,u=l.transform==="none"?"":l.transform,y=1-a,S=o*(1-s);return{delay:e,duration:t,easing:r,css:(P,U)=>`
			transform: ${u} scale(${1-y*U});
			opacity: ${o-S*U}
		`}}var gt={exports:{}};(function(n){(function(e){var t=Q(),r=te(),a=C(),s=K(),l={imagePlaceholder:void 0,cacheBust:!1},o={toSvg:u,toPng:S,toJpeg:P,toBlob:U,toPixelData:y,impl:{fontFaces:a,images:s,util:t,inliner:r,options:{}}};n.exports=o;function u(m,w){return w=w||{},D(w),Promise.resolve(m).then(function(x){return M(x,w.filter,!0)}).then(q).then(J).then(E).then(function(x){return Z(x,w.width||t.width(m),w.height||t.height(m))});function E(x){return w.bgcolor&&(x.style.backgroundColor=w.bgcolor),w.width&&(x.style.width=w.width+"px"),w.height&&(x.style.height=w.height+"px"),w.style&&Object.keys(w.style).forEach(function(V){x.style[V]=w.style[V]}),x}}function y(m,w){return B(m,w||{}).then(function(E){return E.getContext("2d").getImageData(0,0,t.width(m),t.height(m)).data})}function S(m,w){return B(m,w||{}).then(function(E){return E.toDataURL()})}function P(m,w){return w=w||{},B(m,w).then(function(E){return E.toDataURL("image/jpeg",w.quality||1)})}function U(m,w){return B(m,w||{}).then(t.canvasToBlob)}function D(m){typeof m.imagePlaceholder=="undefined"?o.impl.options.imagePlaceholder=l.imagePlaceholder:o.impl.options.imagePlaceholder=m.imagePlaceholder,typeof m.cacheBust=="undefined"?o.impl.options.cacheBust=l.cacheBust:o.impl.options.cacheBust=m.cacheBust}function B(m,w){return u(m,w).then(t.makeImage).then(t.delay(100)).then(function(x){var V=E(m);return V.getContext("2d").drawImage(x,0,0),V});function E(x){var V=document.createElement("canvas");if(V.width=w.width||t.width(x),V.height=w.height||t.height(x),w.bgcolor){var i=V.getContext("2d");i.fillStyle=w.bgcolor,i.fillRect(0,0,V.width,V.height)}return V}}function M(m,w,E){if(!E&&w&&!w(m))return Promise.resolve();return Promise.resolve(m).then(x).then(function(c){return V(m,c,w)}).then(function(c){return i(m,c)});function x(c){return c instanceof HTMLCanvasElement?t.makeImage(c.toDataURL()):c.cloneNode(!1)}function V(c,k,T){var _=c.childNodes;if(_.length===0)return Promise.resolve(k);return A(k,t.asArray(_),T).then(function(){return k});function A(z,G,d){var h=Promise.resolve();return G.forEach(function(j){h=h.then(function(){return M(j,d)}).then(function(f){f&&z.appendChild(f)})}),h}}function i(c,k){if(!(k instanceof Element))return k;return Promise.resolve().then(T).then(_).then(A).then(z).then(function(){return k});function T(){G(window.getComputedStyle(c),k.style);function G(d,h){d.cssText?h.cssText=d.cssText:j(d,h);function j(f,H){t.asArray(f).forEach(function(g){H.setProperty(g,f.getPropertyValue(g),f.getPropertyPriority(g))})}}}function _(){[":before",":after"].forEach(function(d){G(d)});function G(d){var h=window.getComputedStyle(c,d),j=h.getPropertyValue("content");if(j===""||j==="none")return;var f=t.uid();k.className=k.className+" "+f;var H=document.createElement("style");H.appendChild(g(f,d,h)),k.appendChild(H);function g(I,F,O){var X="."+I+":"+F,re=O.cssText?ge(O):de(O);return document.createTextNode(X+"{"+re+"}");function ge(oe){var ie=oe.getPropertyValue("content");return oe.cssText+" content: "+ie+";"}function de(oe){return t.asArray(oe).map(ie).join("; ")+";";function ie(ne){return ne+": "+oe.getPropertyValue(ne)+(oe.getPropertyPriority(ne)?" !important":"")}}}}}function A(){c instanceof HTMLTextAreaElement&&(k.innerHTML=c.value),c instanceof HTMLInputElement&&k.setAttribute("value",c.value)}function z(){k instanceof SVGElement&&(k.setAttribute("xmlns","http://www.w3.org/2000/svg"),k instanceof SVGRectElement&&["width","height"].forEach(function(G){var d=k.getAttribute(G);!d||k.style.setProperty(G,d)}))}}}function q(m){return a.resolveAll().then(function(w){var E=document.createElement("style");return m.appendChild(E),E.appendChild(document.createTextNode(w)),m})}function J(m){return s.inlineAll(m).then(function(){return m})}function Z(m,w,E){return Promise.resolve(m).then(function(x){return x.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(x)}).then(t.escapeXhtml).then(function(x){return'<foreignObject x="0" y="0" width="100%" height="100%">'+x+"</foreignObject>"}).then(function(x){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+w+'" height="'+E+'">'+x+"</svg>"}).then(function(x){return"data:image/svg+xml;charset=utf-8,"+x})}function Q(){return{escape:z,parseExtension:w,mimeType:E,dataAsUrl:A,isDataUrl:x,canvasToBlob:i,resolveUrl:c,getAndEncode:_,uid:k(),delay:G,asArray:d,escapeXhtml:h,makeImage:T,width:j,height:f};function m(){var g="application/font-woff",I="image/jpeg";return{woff:g,woff2:g,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:I,jpeg:I,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function w(g){var I=/\.([^\.\/]*?)$/g.exec(g);return I?I[1]:""}function E(g){var I=w(g).toLowerCase();return m()[I]||""}function x(g){return g.search(/^(data:)/)!==-1}function V(g){return new Promise(function(I){for(var F=window.atob(g.toDataURL().split(",")[1]),O=F.length,X=new Uint8Array(O),re=0;re<O;re++)X[re]=F.charCodeAt(re);I(new Blob([X],{type:"image/png"}))})}function i(g){return g.toBlob?new Promise(function(I){g.toBlob(I)}):V(g)}function c(g,I){var F=document.implementation.createHTMLDocument(),O=F.createElement("base");F.head.appendChild(O);var X=F.createElement("a");return F.body.appendChild(X),O.href=I,X.href=g,X.href}function k(){var g=0;return function(){return"u"+I()+g++;function I(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function T(g){return new Promise(function(I,F){var O=new Image;O.onload=function(){I(O)},O.onerror=F,O.src=g})}function _(g){var I=3e4;return o.impl.options.cacheBust&&(g+=(/\?/.test(g)?"&":"?")+new Date().getTime()),new Promise(function(F){var O=new XMLHttpRequest;O.onreadystatechange=ge,O.ontimeout=de,O.responseType="blob",O.timeout=I,O.open("GET",g,!0),O.send();var X;if(o.impl.options.imagePlaceholder){var re=o.impl.options.imagePlaceholder.split(/,/);re&&re[1]&&(X=re[1])}function ge(){if(O.readyState===4){if(O.status!==200){X?F(X):oe("cannot fetch resource: "+g+", status: "+O.status);return}var ie=new FileReader;ie.onloadend=function(){var ne=ie.result.split(/,/)[1];F(ne)},ie.readAsDataURL(O.response)}}function de(){X?F(X):oe("timeout of "+I+"ms occured while fetching resource: "+g)}function oe(ie){console.error(ie),F("")}})}function A(g,I){return"data:"+I+";base64,"+g}function z(g){return g.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function G(g){return function(I){return new Promise(function(F){setTimeout(function(){F(I)},g)})}}function d(g){for(var I=[],F=g.length,O=0;O<F;O++)I.push(g[O]);return I}function h(g){return g.replace(/#/g,"%23").replace(/\n/g,"%0A")}function j(g){var I=H(g,"border-left-width"),F=H(g,"border-right-width");return g.scrollWidth+I+F}function f(g){var I=H(g,"border-top-width"),F=H(g,"border-bottom-width");return g.scrollHeight+I+F}function H(g,I){var F=window.getComputedStyle(g).getPropertyValue(I);return parseFloat(F.replace("px",""))}}function te(){var m=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:V,shouldProcess:w,impl:{readUrls:E,inline:x}};function w(i){return i.search(m)!==-1}function E(i){for(var c=[],k;(k=m.exec(i))!==null;)c.push(k[1]);return c.filter(function(T){return!t.isDataUrl(T)})}function x(i,c,k,T){return Promise.resolve(c).then(function(A){return k?t.resolveUrl(A,k):A}).then(T||t.getAndEncode).then(function(A){return t.dataAsUrl(A,t.mimeType(c))}).then(function(A){return i.replace(_(c),"$1"+A+"$3")});function _(A){return new RegExp(`(url\\(['"]?)(`+t.escape(A)+`)(['"]?\\))`,"g")}}function V(i,c,k){if(T())return Promise.resolve(i);return Promise.resolve(i).then(E).then(function(_){var A=Promise.resolve(i);return _.forEach(function(z){A=A.then(function(G){return x(G,z,c,k)})}),A});function T(){return!w(i)}}}function C(){return{resolveAll:m,impl:{readAll:w}};function m(){return w().then(function(E){return Promise.all(E.map(function(x){return x.resolve()}))}).then(function(E){return E.join(`
`)})}function w(){return Promise.resolve(t.asArray(document.styleSheets)).then(x).then(E).then(function(i){return i.map(V)});function E(i){return i.filter(function(c){return c.type===CSSRule.FONT_FACE_RULE}).filter(function(c){return r.shouldProcess(c.style.getPropertyValue("src"))})}function x(i){var c=[];return i.forEach(function(k){try{t.asArray(k.cssRules||[]).forEach(c.push.bind(c))}catch(T){console.log("Error while reading CSS rules from "+k.href,T.toString())}}),c}function V(i){return{resolve:function(){var k=(i.parentStyleSheet||{}).href;return r.inlineAll(i.cssText,k)},src:function(){return i.style.getPropertyValue("src")}}}}}function K(){return{inlineAll:w,impl:{newImage:m}};function m(E){return{inline:x};function x(V){return t.isDataUrl(E.src)?Promise.resolve():Promise.resolve(E.src).then(V||t.getAndEncode).then(function(i){return t.dataAsUrl(i,t.mimeType(E.src))}).then(function(i){return new Promise(function(c,k){E.onload=c,E.onerror=k,E.src=i})})}}function w(E){if(!(E instanceof Element))return Promise.resolve(E);return x(E).then(function(){return E instanceof HTMLImageElement?m(E).inline():Promise.all(t.asArray(E.childNodes).map(function(V){return w(V)}))});function x(V){var i=V.style.getPropertyValue("background");return i?r.inlineAll(i).then(function(c){V.style.setProperty("background",c,V.style.getPropertyPriority("background"))}).then(function(){return V}):Promise.resolve(V)}}}})()})(gt);var Nt=gt.exports;function Ut(n){switch(n){case"./badges/fifteen.svelte":return pe(()=>import("../chunks/fifteen-6ece83ce.js"),["chunks/fifteen-6ece83ce.js","chunks/index-7118b6c4.js"]);case"./badges/fifty.svelte":return pe(()=>import("../chunks/fifty-230cfc24.js"),["chunks/fifty-230cfc24.js","chunks/index-7118b6c4.js"]);case"./badges/five.svelte":return pe(()=>import("../chunks/five-e7ec1bc4.js"),["chunks/five-e7ec1bc4.js","chunks/index-7118b6c4.js"]);case"./badges/ten.svelte":return pe(()=>import("../chunks/ten-7c9c0a66.js"),["chunks/ten-7c9c0a66.js","chunks/index-7118b6c4.js"]);case"./badges/thirtyfive.svelte":return pe(()=>import("../chunks/thirtyfive-d3270980.js"),["chunks/thirtyfive-d3270980.js","chunks/index-7118b6c4.js"]);case"./badges/twenty.svelte":return pe(()=>import("../chunks/twenty-97dd6623.js"),["chunks/twenty-97dd6623.js","chunks/index-7118b6c4.js"]);case"./badges/two.svelte":return pe(()=>import("../chunks/two-09cc56a1.js"),["chunks/two-09cc56a1.js","chunks/index-7118b6c4.js"]);default:return new Promise(function(e,t){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(t.bind(null,new Error("Unknown variable dynamic import: "+n)))})}}function Ze(n,e,t){const r=n.slice();return r[18]=e[t],r[20]=t,r}function Je(n,e,t){const r=n.slice();return r[21]=e[t],r[23]=t,r}function Qe(n,e,t){const r=n.slice();return r[24]=e[t],r}function $e(n){let e,t,r,a;var s=n[6];function l(o){return{props:{classNames:"w-full max-w-[180px]"}}}return s&&(t=new s(l())),{c(){e=L("div"),t&&ye(t.$$.fragment),this.h()},l(o){e=N(o,"DIV",{class:!0});var u=R(e);t&&Ve(t.$$.fragment,u),u.forEach(b),this.h()},h(){p(e,"class","absolute left-0 right-0 top-0 bottom-0 flex place-content-center place-items-center")},m(o,u){$(o,e,u),t&&ke(t,e,null),a=!0},p(o,u){if(s!==(s=o[6])){if(t){Ee();const y=t;le(y.$$.fragment,1,0,()=>{xe(y,1)}),Pe()}s?(t=new s(l()),ye(t.$$.fragment),ee(t.$$.fragment,1),ke(t,e,null)):t=null}},i(o){a||(t&&ee(t.$$.fragment,o),ze(()=>{r||(r=ve(e,Ke,{duration:500},!0)),r.run(1)}),a=!0)},o(o){t&&le(t.$$.fragment,o),r||(r=ve(e,Ke,{duration:500},!1)),r.run(0),a=!1},d(o){o&&b(e),t&&xe(t),o&&r&&r.end()}}}function et(n){let e,t,r,a;return{c(){e=L("div"),t=L("img"),a=W(),this.h()},l(s){e=N(s,"DIV",{});var l=R(e);t=N(l,"IMG",{src:!0,alt:!0,class:!0}),a=Y(l),l.forEach(b),this.h()},h(){je(t.src,r=n[9]+n[24])||p(t,"src",r),p(t,"alt",""),p(t,"class","aspect-square w-full h-full")},m(s,l){$(s,e,l),v(e,t),v(e,a)},p(s,l){l&2&&!je(t.src,r=s[9]+s[24])&&p(t,"src",r)},d(s){s&&b(e)}}}function tt(n){let e,t;return{c(){e=Te("rect"),this.h()},l(r){e=Ae(r,"rect",{fill:!0,x:!0,y:!0,width:!0,height:!0,rx:!0}),R(e).forEach(b),this.h()},h(){p(e,"fill",t=qe[n[21].state]),p(e,"x",n[23]*(he+fe)),p(e,"y",n[20]*(he+fe)),p(e,"width",he),p(e,"height",he),p(e,"rx",n[11])},m(r,a){$(r,e,a)},p(r,a){a&1&&t!==(t=qe[r[21].state])&&p(e,"fill",t)},d(r){r&&b(e)}}}function rt(n){let e,t=n[18],r=[];for(let a=0;a<t.length;a+=1)r[a]=tt(Je(n,t,a));return{c(){for(let a=0;a<r.length;a+=1)r[a].c();e=Ie()},l(a){for(let s=0;s<r.length;s+=1)r[s].l(a);e=Ie()},m(a,s){for(let l=0;l<r.length;l+=1)r[l].m(a,s);$(a,e,s)},p(a,s){if(s&2049){t=a[18];let l;for(l=0;l<t.length;l+=1){const o=Je(a,t,l);r[l]?r[l].p(o,s):(r[l]=tt(o),r[l].c(),r[l].m(e.parentNode,e))}for(;l<r.length;l+=1)r[l].d(1);r.length=t.length}},d(a){me(r,a),a&&b(e)}}}function Vt(n){let e,t,r,a,s,l,o,u,y,S,P,U,D,B,M,q,J,Z,Q,te,C,K,m=n[5]?"SAVING..":"SAVE SCREENSHOT",w,E,x,V,i,c,k,T,_=n[2]in De&&$e(n),A=n[1],z=[];for(let h=0;h<A.length;h+=1)z[h]=et(Qe(n,A,h));let G=n[0],d=[];for(let h=0;h<G.length;h+=1)d[h]=rt(Ze(n,G,h));return{c(){e=L("div"),t=L("div"),r=L("div"),a=L("div"),s=L("header"),l=L("h1"),o=ae("WORDALLE \u{1F951}"),u=W(),y=L("span"),S=ae("hf.co/wordalle"),P=W(),U=L("h2"),D=ae(n[8]),B=W(),M=L("div"),_&&_.c(),q=W();for(let h=0;h<z.length;h+=1)z[h].c();J=W(),Z=Te("svg");for(let h=0;h<d.length;h+=1)d[h].c();te=W(),C=L("div"),K=L("button"),w=ae(m),E=W(),x=L("button"),V=ae("NEXT"),this.h()},l(h){e=N(h,"DIV",{class:!0});var j=R(e);t=N(j,"DIV",{class:!0});var f=R(t);r=N(f,"DIV",{class:!0});var H=R(r);a=N(H,"DIV",{class:!0});var g=R(a);s=N(g,"HEADER",{class:!0});var I=R(s);l=N(I,"H1",{class:!0});var F=R(l);o=se(F,"WORDALLE \u{1F951}"),F.forEach(b),u=Y(I),y=N(I,"SPAN",{class:!0});var O=R(y);S=se(O,"hf.co/wordalle"),O.forEach(b),I.forEach(b),P=Y(g),U=N(g,"H2",{class:!0});var X=R(U);D=se(X,n[8]),X.forEach(b),B=Y(g),M=N(g,"DIV",{class:!0});var re=R(M);_&&_.l(re),q=Y(re);for(let ne=0;ne<z.length;ne+=1)z[ne].l(re);re.forEach(b),J=Y(g),Z=Ae(g,"svg",{class:!0,viewBox:!0,xmlns:!0});var ge=R(Z);for(let ne=0;ne<d.length;ne+=1)d[ne].l(ge);ge.forEach(b),g.forEach(b),H.forEach(b),te=Y(f),C=N(f,"DIV",{class:!0});var de=R(C);K=N(de,"BUTTON",{class:!0});var oe=R(K);w=se(oe,m),oe.forEach(b),E=Y(de),x=N(de,"BUTTON",{class:!0});var ie=R(x);V=se(ie,"NEXT"),ie.forEach(b),de.forEach(b),f.forEach(b),j.forEach(b),this.h()},h(){p(l,"class","text-xs font-bold uppercase whitespace-nowrap"),p(y,"class","font-light"),p(s,"class","p-3 flex justify-between items-center"),p(U,"class","text-center uppercase tracking-widest font-extrabold"),p(M,"class","grid grid-cols-3 gap-2 p-3 relative"),p(Z,"class","w-full p-3 mx-auto max-h-[30vh]"),p(Z,"viewBox",Q="0 0 "+(n[0][0].length*(fe+he)-fe)+" "+(n[0].length*(fe+he)-fe)),p(Z,"xmlns","http://www.w3.org/2000/svg"),p(a,"class","p-3"),p(r,"class","border-0"),K.disabled=n[5],p(K,"class","min-w-[15ch] flex-1 mr-1 svelte-oufr2e"),p(x,"class","flex-1 ml-1 svelte-oufr2e"),p(C,"class","p-3 px-6 flex text-base"),p(t,"class","message svelte-oufr2e"),p(e,"class","modal relative z-50 svelte-oufr2e")},m(h,j){$(h,e,j),v(e,t),v(t,r),v(r,a),v(a,s),v(s,l),v(l,o),v(s,u),v(s,y),v(y,S),v(a,P),v(a,U),v(U,D),v(a,B),v(a,M),_&&_.m(M,null),v(M,q);for(let f=0;f<z.length;f+=1)z[f].m(M,null);v(a,J),v(a,Z);for(let f=0;f<d.length;f+=1)d[f].m(Z,null);n[13](a),v(t,te),v(t,C),v(C,K),v(K,w),v(C,E),v(C,x),v(x,V),n[16](e),c=!0,k||(T=[_e(K,"click",n[14]),_e(x,"click",n[15])],k=!0)},p(h,[j]){if(h[2]in De?_?(_.p(h,j),j&4&&ee(_,1)):(_=$e(h),_.c(),ee(_,1),_.m(M,q)):_&&(Ee(),le(_,1,1,()=>{_=null}),Pe()),j&514){A=h[1];let f;for(f=0;f<A.length;f+=1){const H=Qe(h,A,f);z[f]?z[f].p(H,j):(z[f]=et(H),z[f].c(),z[f].m(M,null))}for(;f<z.length;f+=1)z[f].d(1);z.length=A.length}if(j&2049){G=h[0];let f;for(f=0;f<G.length;f+=1){const H=Ze(h,G,f);d[f]?d[f].p(H,j):(d[f]=rt(H),d[f].c(),d[f].m(Z,null))}for(;f<d.length;f+=1)d[f].d(1);d.length=G.length}(!c||j&1&&Q!==(Q="0 0 "+(h[0][0].length*(fe+he)-fe)+" "+(h[0].length*(fe+he)-fe)))&&p(Z,"viewBox",Q),(!c||j&32)&&m!==(m=h[5]?"SAVING..":"SAVE SCREENSHOT")&&Re(w,m),(!c||j&32)&&(K.disabled=h[5])},i(h){c||(ee(_),ze(()=>{i||(i=ve(e,Ce,{},!0)),i.run(1)}),c=!0)},o(h){le(_),i||(i=ve(e,Ce,{},!1)),i.run(0),c=!1},d(h){h&&b(e),_&&_.d(),me(z,h),me(d,h),n[13](null),n[16](null),h&&i&&i.end(),k=!1,yt(T)}}}const he=10,fe=1;function Bt(n,e,t){const r=Oe();let{board:a}=e,{currentRowIndex:s}=e,{imagePaths:l}=e,{totalStreaks:o}=e;const u=St[s],y="";let S,P,U=!1;async function D(C){t(5,U=!0);try{const K=await Nt.toBlob(C,{bgcolor:"#000"}),m=document.createElement("a");m.download=`sucess-${Date.now()}.png`,m.target="_self",m.onclick=async w=>{if(t(5,U=!0),m.href){URL.revokeObjectURL(m.href),t(5,U=!1);return}m.href=URL.createObjectURL(K),t(5,U=!1)},m.click(),console.log("Downloding image.")}catch(K){console.log(K.name,K.message)}}const B=C=>{C.key==="Escape"?r("restart"):C.key===" "&&D(P)};let M;mt(async()=>{if(o in De){const C=De[o];t(6,M=(await Ut(`./badges/${C}.svelte`)).default)}window.addEventListener("keyup",B,!0)}),pt(()=>{window.removeEventListener("keyup",B,!0)});const q=he/10;function J(C){Be[C?"unshift":"push"](()=>{P=C,t(4,P)})}const Z=()=>D(P),Q=()=>r("restart");function te(C){Be[C?"unshift":"push"](()=>{S=C,t(3,S)})}return n.$$set=C=>{"board"in C&&t(0,a=C.board),"currentRowIndex"in C&&t(12,s=C.currentRowIndex),"imagePaths"in C&&t(1,l=C.imagePaths),"totalStreaks"in C&&t(2,o=C.totalStreaks)},[a,l,o,S,P,U,M,r,u,y,D,q,s,J,Z,Q,te]}class Ot extends Le{constructor(e){super(),Ne(this,e,Bt,Vt,Ue,{board:0,currentRowIndex:12,imagePaths:1,totalStreaks:2})}}function nt(n){let e,t,r,a,s;return{c(){e=L("div"),t=L("button"),r=ae("Try Again"),this.h()},l(l){e=N(l,"DIV",{class:!0});var o=R(e);t=N(o,"BUTTON",{class:!0});var u=R(t);r=se(u,"Try Again"),u.forEach(b),o.forEach(b),this.h()},h(){p(t,"class","hover:no-underline underline underline-offset-2 hover:scale-105 transition-all duration-200 ease-in-out"),p(e,"class","font-light flex-1 text-xs sm:text-base text-center")},m(l,o){$(l,e,o),v(e,t),v(t,r),a||(s=_e(t,"click",n[3]),a=!0)},p:be,d(l){l&&b(e),a=!1,s()}}}function zt(n){let e,t,r,a,s,l=n[0]===ue.FAIL&&nt(n);return{c(){e=L("div"),t=ae(n[1]),r=W(),l&&l.c(),this.h()},l(o){e=N(o,"DIV",{class:!0});var u=R(e);t=se(u,n[1]),r=Y(u),l&&l.l(u),u.forEach(b),this.h()},h(){p(e,"class","message svelte-1sv0qpd")},m(o,u){$(o,e,u),v(e,t),v(e,r),l&&l.m(e,null),s=!0},p(o,[u]){(!s||u&2)&&Re(t,o[1]),o[0]===ue.FAIL?l?l.p(o,u):(l=nt(o),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},i(o){s||(ze(()=>{a||(a=ve(e,Ce,{},!0)),a.run(1)}),s=!0)},o(o){a||(a=ve(e,Ce,{},!1)),a.run(0),s=!1},d(o){o&&b(e),l&&l.d(),o&&a&&a.end()}}}function Ft(n,e,t){const r=Oe();let{gameState:a}=e,{message:s=null}=e;const l=()=>r("restart");return n.$$set=o=>{"gameState"in o&&t(0,a=o.gameState),"message"in o&&t(1,s=o.message)},[a,s,r,l]}class Mt extends Le{constructor(e){super(),Ne(this,e,Ft,zt,Ue,{gameState:0,message:1})}}function at(n,e,t){const r=n.slice();return r[25]=e[t],r[27]=t,r}function st(n,e,t){const r=n.slice();return r[28]=e[t],r[27]=t,r}function lt(n,e,t){const r=n.slice();return r[30]=e[t],r}function ot(n){let e,t,r,a,s,l,o,u,y,S,P,U,D,B,M,q,J,Z,Q,te,C,K,m,w,E,x,V,i=n[6]&&it(n),c=n[8]===ue.SUCESS&&ct(n),k=n[1],T=[];for(let d=0;d<k.length;d+=1)T[d]=ut(lt(n,k,d));let _=n[4],A=[];for(let d=0;d<_.length;d+=1)A[d]=ht(at(n,_,d));function z(d){n[13](d)}let G={};return n[3]!==void 0&&(G.letterStates=n[3]),m=new Ct({props:G}),Be.push(()=>Et(m,"letterStates",z)),m.$on("keyup",n[14]),{c(){e=L("div"),i&&i.c(),t=W(),c&&c.c(),r=W(),a=L("header"),s=L("span"),l=ae("Guess the prompt!"),o=W(),u=L("span"),y=W(),S=L("h1"),P=ae("\u{1F951} WORDALLE \u{1F951}"),U=W(),D=L("span"),B=W(),M=L("span"),q=L("button"),J=ae("Skip to next"),Z=W(),Q=L("div");for(let d=0;d<T.length;d+=1)T[d].c();te=W(),C=L("div");for(let d=0;d<A.length;d+=1)A[d].c();K=W(),ye(m.$$.fragment),this.h()},l(d){e=N(d,"DIV",{class:!0});var h=R(e);i&&i.l(h),t=Y(h),c&&c.l(h),r=Y(h),a=N(h,"HEADER",{class:!0});var j=R(a);s=N(j,"SPAN",{class:!0});var f=R(s);l=se(f,"Guess the prompt!"),f.forEach(b),o=Y(j),u=N(j,"SPAN",{class:!0}),R(u).forEach(b),y=Y(j),S=N(j,"H1",{class:!0});var H=R(S);P=se(H,"\u{1F951} WORDALLE \u{1F951}"),H.forEach(b),U=Y(j),D=N(j,"SPAN",{class:!0}),R(D).forEach(b),B=Y(j),M=N(j,"SPAN",{class:!0});var g=R(M);q=N(g,"BUTTON",{tabindex:!0,class:!0});var I=R(q);J=se(I,"Skip to next"),I.forEach(b),g.forEach(b),j.forEach(b),Z=Y(h),Q=N(h,"DIV",{class:!0});var F=R(Q);for(let X=0;X<T.length;X+=1)T[X].l(F);F.forEach(b),te=Y(h),C=N(h,"DIV",{class:!0});var O=R(C);for(let X=0;X<A.length;X+=1)A[X].l(O);O.forEach(b),K=Y(h),Ve(m.$$.fragment,h),h.forEach(b),this.h()},h(){p(s,"class","font-light flex-1 text-xs sm:text-base"),p(u,"class","sm:block hidden mx-3 flex-1 border-[0.5px] border-opacity-50 border-gray-400"),p(S,"class","text-xl font-bold text-center whitespace-nowrap"),p(D,"class","sm:block hidden mx-3 flex-1 border-[0.5px] border-opacity-50 border-gray-400"),p(q,"tabindex","-1"),p(q,"class","hover:no-underline underline underline-offset-2 hover:scale-105 transition-all duration-200 ease-in-out"),p(M,"class","font-light flex-1 text-xs sm:text-base"),p(a,"class","flex justify-between items-center uppercase sm:px-2 text-center"),p(Q,"class","grid grid-cols-3 gap-2 max-w-md mx-auto p-3"),p(C,"class","board svelte-1y5wh9j"),p(e,"class","max-w-screen-lg mx-auto px-1 relative z-0 mt-3")},m(d,h){$(d,e,h),i&&i.m(e,null),v(e,t),c&&c.m(e,null),v(e,r),v(e,a),v(a,s),v(s,l),v(a,o),v(a,u),v(a,y),v(a,S),v(S,P),v(a,U),v(a,D),v(a,B),v(a,M),v(M,q),v(q,J),v(e,Z),v(e,Q);for(let j=0;j<T.length;j+=1)T[j].m(Q,null);v(e,te),v(e,C);for(let j=0;j<A.length;j+=1)A[j].m(C,null);v(e,K),ke(m,e,null),E=!0,x||(V=_e(q,"click",n[12]),x=!0)},p(d,h){if(d[6]?i?(i.p(d,h),h[0]&64&&ee(i,1)):(i=it(d),i.c(),ee(i,1),i.m(e,t)):i&&(Ee(),le(i,1,1,()=>{i=null}),Pe()),d[8]===ue.SUCESS?c?(c.p(d,h),h[0]&256&&ee(c,1)):(c=ct(d),c.c(),ee(c,1),c.m(e,r)):c&&(Ee(),le(c,1,1,()=>{c=null}),Pe()),h[0]&514){k=d[1];let f;for(f=0;f<k.length;f+=1){const H=lt(d,k,f);T[f]?T[f].p(H,h):(T[f]=ut(H),T[f].c(),T[f].m(Q,null))}for(;f<T.length;f+=1)T[f].d(1);T.length=k.length}if(h[0]&436){_=d[4];let f;for(f=0;f<_.length;f+=1){const H=at(d,_,f);A[f]?A[f].p(H,h):(A[f]=ht(H),A[f].c(),A[f].m(C,null))}for(;f<A.length;f+=1)A[f].d(1);A.length=_.length}const j={};!w&&h[0]&8&&(w=!0,j.letterStates=d[3],kt(()=>w=!1)),m.$set(j)},i(d){E||(ee(i),ee(c),ee(m.$$.fragment,d),E=!0)},o(d){le(i),le(c),le(m.$$.fragment,d),E=!1},d(d){d&&b(e),i&&i.d(),c&&c.d(),me(T,d),me(A,d),xe(m),x=!1,V()}}}function it(n){let e,t;return e=new Mt({props:{message:n[6],gameState:n[8]}}),e.$on("restart",n[10]),{c(){ye(e.$$.fragment)},l(r){Ve(e.$$.fragment,r)},m(r,a){ke(e,r,a),t=!0},p(r,a){const s={};a[0]&64&&(s.message=r[6]),a[0]&256&&(s.gameState=r[8]),e.$set(s)},i(r){t||(ee(e.$$.fragment,r),t=!0)},o(r){le(e.$$.fragment,r),t=!1},d(r){xe(e,r)}}}function ct(n){let e,t;return e=new Ot({props:{board:n[4],currentRowIndex:n[5],imagePaths:n[1],totalStreaks:n[0].length}}),e.$on("restart",n[10]),{c(){ye(e.$$.fragment)},l(r){Ve(e.$$.fragment,r)},m(r,a){ke(e,r,a),t=!0},p(r,a){const s={};a[0]&16&&(s.board=r[4]),a[0]&32&&(s.currentRowIndex=r[5]),a[0]&2&&(s.imagePaths=r[1]),a[0]&1&&(s.totalStreaks=r[0].length),e.$set(s)},i(r){t||(ee(e.$$.fragment,r),t=!0)},o(r){le(e.$$.fragment,r),t=!1},d(r){xe(e,r)}}}function ut(n){let e,t,r,a;return{c(){e=L("div"),t=L("img"),a=W(),this.h()},l(s){e=N(s,"DIV",{});var l=R(e);t=N(l,"IMG",{src:!0,alt:!0,class:!0}),a=Y(l),l.forEach(b),this.h()},h(){je(t.src,r=n[9]+n[30])||p(t,"src",r),p(t,"alt",""),p(t,"class","aspect-square w-full h-full")},m(s,l){$(s,e,l),v(e,t),v(e,a)},p(s,l){l[0]&2&&!je(t.src,r=s[9]+s[30])&&p(t,"src",r)},d(s){s&&b(e)}}}function ft(n){let e,t,r,a=n[28].letter+"",s,l,o,u,y=n[28].letter+"",S,P,U;return{c(){e=L("div"),t=L("div"),r=L("span"),s=ae(a),o=W(),u=L("div"),S=ae(y),this.h()},l(D){e=N(D,"DIV",{class:!0});var B=R(e);t=N(B,"DIV",{class:!0,style:!0});var M=R(t);r=N(M,"SPAN",{class:!0});var q=R(r);s=se(q,a),q.forEach(b),M.forEach(b),o=Y(B),u=N(B,"DIV",{class:!0,style:!0});var J=R(u);S=se(J,y),J.forEach(b),B.forEach(b),this.h()},h(){p(r,"class","letter svelte-1y5wh9j"),p(t,"class",l="front z-0 "+(n[28].correct===" "?"space":"")+" svelte-1y5wh9j"),we(t,"transition-delay",n[27]*n[2]+"ms"),p(u,"class",P="back z-0 "+n[28].state+" svelte-1y5wh9j"),we(u,"transition-delay",n[27]*n[2]+"ms"),we(u,"animation-delay",n[27]*100+"ms"),p(e,"class",U="tile "+(n[28].letter&&"filled")+" "+(n[28].state&&"revealed")+" svelte-1y5wh9j")},m(D,B){$(D,e,B),v(e,t),v(t,r),v(r,s),v(e,o),v(e,u),v(u,S)},p(D,B){B[0]&16&&a!==(a=D[28].letter+"")&&Re(s,a),B[0]&16&&l!==(l="front z-0 "+(D[28].correct===" "?"space":"")+" svelte-1y5wh9j")&&p(t,"class",l),B[0]&4&&we(t,"transition-delay",D[27]*D[2]+"ms"),B[0]&16&&y!==(y=D[28].letter+"")&&Re(S,y),B[0]&16&&P!==(P="back z-0 "+D[28].state+" svelte-1y5wh9j")&&p(u,"class",P),B[0]&4&&we(u,"transition-delay",D[27]*D[2]+"ms"),B[0]&16&&U!==(U="tile "+(D[28].letter&&"filled")+" "+(D[28].state&&"revealed")+" svelte-1y5wh9j")&&p(e,"class",U)},d(D){D&&b(e)}}}function ht(n){let e,t,r,a=n[25],s=[];for(let l=0;l<a.length;l+=1)s[l]=ft(st(n,a,l));return{c(){e=L("div");for(let l=0;l<s.length;l+=1)s[l].c();t=W(),this.h()},l(l){e=N(l,"DIV",{class:!0});var o=R(e);for(let u=0;u<s.length;u+=1)s[u].l(o);t=Y(o),o.forEach(b),this.h()},h(){p(e,"class",r="row "+(n[7]===n[27]&&"shake")+" "+(n[8]==ue.SUCESS&&n[5]===n[27]&&"jump")+" svelte-1y5wh9j")},m(l,o){$(l,e,o);for(let u=0;u<s.length;u+=1)s[u].m(e,null);v(e,t)},p(l,o){if(o[0]&20){a=l[25];let u;for(u=0;u<a.length;u+=1){const y=st(l,a,u);s[u]?s[u].p(y,o):(s[u]=ft(y),s[u].c(),s[u].m(e,t))}for(;u<s.length;u+=1)s[u].d(1);s.length=a.length}o[0]&416&&r!==(r="row "+(l[7]===l[27]&&"shake")+" "+(l[8]==ue.SUCESS&&l[5]===l[27]&&"jump")+" svelte-1y5wh9j")&&p(e,"class",r)},d(l){l&&b(e),me(s,l)}}}function Ht(n){let e,t,r=n[4]!==void 0&&ot(n);return{c(){r&&r.c(),e=Ie()},l(a){r&&r.l(a),e=Ie()},m(a,s){r&&r.m(a,s),$(a,e,s),t=!0},p(a,s){a[4]!==void 0?r?(r.p(a,s),s[0]&16&&ee(r,1)):(r=ot(a),r.c(),ee(r,1),r.m(e.parentNode,e)):r&&(Ee(),le(r,1,1,()=>{r=null}),Pe())},i(a){t||(ee(r),t=!0)},o(a){le(r),t=!1},d(a){r&&r.d(a),a&&b(e)}}}const Se=1e3;function dt(){document.body.style.setProperty("--vh",window.innerHeight+"px")}function qt(n,e,t){const r="";let a,s=[],l;mt(async()=>{dt(),a=await fetch(r+"data").then(i=>i.json()),Z(),window.addEventListener("keyup",Q,!0),window.addEventListener("resize",dt),window.focus(),document.body.addEventListener("click",()=>window.focus(),!1)}),pt(()=>{window.removeEventListener("keyup",Q,!0)});let o,u,y,S,P={},U,D=0,B="",M=-1,q=ue.PLAYING,J=!0;function Z(){t(8,q=ue.PLAYING),t(7,M=-1),t(6,B=""),t(5,D=0),t(3,P={}),J=!0;const i=Object.keys(a),c=s.map(z=>z.idx),k=i.filter((z,G)=>!c.includes(G)),T=~~(Math.random()*k.length),_=k[T];l=i.indexOf(_),o=_.replace(/_/g," "),t(1,u=a[_].slice(0,6));const A=[...o].map(z=>Math.random()>.5?"*":z).join("");console.log("%cCLUE: ","color: red;font-weight:bold",A),y=_.length,t(2,S=Se/y),t(4,U=Array.from({length:7},()=>Array.from(o).map(z=>({letter:"",correct:z,state:ce.INITIAL})))),document.body.style.setProperty("--cols",`${y}`)}const Q=i=>{te(i.key)};function te(i){!J||(/^[a-zA-Z]$/.test(i)?t(4,U=Pt(U,D,i.toLowerCase())):i==="Backspace"?t(4,U=xt(U,D)):i==="Enter"&&C())}function C(){const i=[...U],c=i[D],k=He({},P);if(c.every(T=>T.letter)){c.map(_=>_.letter).join(""),w(c);const T=o.split("");c.forEach((_,A)=>{T[A]===_.letter&&(_.state=k[_.letter]=ce.CORRECT,T[A]=null)}),c.forEach(_=>{!_.state&&T.includes(_.letter)&&(_.state=ce.PRESENT,T[T.indexOf(_.letter)]=null,k[_.letter]||(k[_.letter]=ce.PRESENT))}),c.forEach(_=>{_.state||(_.state=ce.ABSENT,k[_.letter]||(k[_.letter]=ce.ABSENT))}),J=!1,c.every(_=>_.state===ce.CORRECT)?(t(0,s=[...s,{prompt:o,idx:l}]),setTimeout(()=>{t(8,q=ue.SUCESS)},Se)):D<U.length-1?(t(5,D++,D),setTimeout(()=>{J=!0},Se)):(t(8,q=ue.FAIL),setTimeout(()=>{K(o.toUpperCase(),-1)},Se))}else m(),K("Not enough letters");t(4,U=i),t(3,P=k)}function K(i,c=1e3){t(6,B=i),c>0&&setTimeout(()=>{t(6,B="")},c)}function m(){t(7,M=D),setTimeout(()=>{t(7,M=-1)},1e3)}async function w(i){const c=i.map(T=>T.letter).join(""),k=i.map(T=>T.correct).join("");fetch(r+"prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({guess:c,correct:k})})}const E=i=>{Z(),i.currentTarget.blur()};function x(i){P=i,t(3,P)}return[s,u,S,P,U,D,B,M,q,r,Z,te,E,x,({detail:i})=>te(i)]}class Yt extends Le{constructor(e){super(),Ne(this,e,qt,Ht,Ue,{},null,[-1,-1])}}export{Yt as default};