PageSourceSearch

https://balliq.app/assets/ResultsScreen-BNZlg9nI.js

js balliq.app collected 2026-09-24 14:08:19 UTC 12,468 bytes, 1 lines download raw bytes

1import{j as e}from"./client-6IbISpu-.js";import{r as X}from"./react-PZFeUDsy.js";import{m as ae,F as ie,j as _,k as ne,S as A,n as oe}from"./GameRoot-Dh0vXsiT.js";import{D}from"./DailyDone-CbVEx-uh.js";import{C as le}from"./CountUp-C1YHvyL-.js";import{R as ce}from"./ResultsCloseBtn-BxsEC5Vw.js";import{R as de}from"./ReportButton-Bui8JBW4.js";import{h as Q}from"./StoreBadge-TDy-gnyG.js";import{r as he}from"./wordleStatus-QDnZN2ut.js";import{a as me,T as xe}from"./footleXp-tkBSlsKX.js";import{s as U,a as je}from"./stump-eyTkilLc.js";import"./clubColour-BSqgpkbq.js";import"./index-D7X09KaW.js";import"./preload-helper-D6ZZRfBn.js";import"./supabase-BIZ8dl4x.js";import"./main-DWhu5Idg.js";import"./webpushVisitor-DayvjJS_.js";import"./SiteHeader-C5Gcy-N4.js";import"./mysteryPlayer-CgPrIUKK.js";import"./trail-Dq-f3cvu.js";import"./mysterySchedule-CsJ_h9FK.js";import"./index-DIOGSxz5.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="f8446370-86b7-4548-acf8-3c68bc333b1f",s._sentryDebugIdIdentifier="sentry-dbid-f8446370-86b7-4548-acf8-3c68bc333b1f")}catch{}})();function B({wrongAnswers:s,onReport:a,mode:n}){return X.useEffect(()=>{s?.length&&ae("review-viewed")},[]),!s||s.length===0?null:e.jsxs("div",{style:{marginTop:24},children:[e.jsxs("div",{className:"ds-eyebrow",style:{textAlign:"center",marginBottom:10},children:["Review ",s.length," missed ",s.length===1?"answer":"answers"]}),e.jsx("div",{className:"wrong-review",children:s.map((r,i)=>e.jsxs("div",{className:"wr-item",children:[e.jsx("div",{className:"wr-q",children:r.q}),r.user&&e.jsxs("div",{className:"wr-user",children:[e.jsx("span",{className:"wr-x",children:"✗"}),r.user]}),e.jsxs("div",{className:"wr-a",children:[e.jsx("span",{className:"wr-tick",children:"✓"}),r.correct]}),r.hint&&e.jsx("div",{className:"wr-why",children:r.hint}),a&&e.jsx(de,{onReport:a,idle:e.jsxs(e.Fragment,{children:[e.jsx(ie,{size:13,strokeWidth:2.4,"aria-hidden":"true"})," This looks wrong"]}),info:{id:r.id,q:r.q,picked:r.user??null,correct:r.correct??null,mode:n},style:{marginTop:10,padding:"7px 11px",minHeight:36,background:"none",border:"1px solid var(--border)",borderRadius:9,fontSize:12,fontWeight:700}},r.id!=null?String(r.id):r.q)]},i))})]})}function H(s,a){const n=a||7,r=Math.max(0,Math.min(n,s||0));return r===n?{emoji:"🏆",headline:"Perfect run!",sub:"All seven correct — flawless."}:r>=6?{emoji:"🌟",headline:"Excellent!",sub:"One of those days where it just clicks."}:r>=4?{emoji:"⚽",headline:"Solid challenge.",sub:"Some tough ones in there today."}:r>=2?{emoji:"📈",headline:"Keep going.",sub:"Tomorrow's another chance to climb."}:{emoji:"💪",headline:"Everyone starts somewhere.",sub:"Come back tomorrow for a fresh seven."}}function O(s){return s<=30?"Tough round.":s<=50?"Solid effort.":s<=70?"Strong showing.":s<=89?"Excellent.":"Brilliant!"}function fe({d:s}){if(!s)return null;const a=({a:i,b:h})=>e.jsxs("span",{className:"rd-num",style:{color:h>i?"var(--grn-soft)":h<i?"var(--t3)":"var(--t2)"},children:[i," ",e.jsx("span",{"aria-hidden":"true",children:"→"})," ",h]}),n=({children:i,label:h})=>e.jsx("div",{className:"results-card-delta",role:"status","aria-label":h,children:i});if(!s.ratedAfter)return e.jsx(n,{children:e.jsxs("div",{className:"rd-head",children:[e.jsx("span",{className:"rd-label",children:"Ball IQ"}),e.jsxs("span",{className:"rd-body",children:[s.toRated," more ",s.toRated===1?"answer":"answers"," to get rated"]})]})});if(!s.ratedBefore)return e.jsx(n,{children:e.jsxs("div",{className:"rd-head",children:[e.jsx("span",{className:"rd-label",children:"Ball IQ"}),e.jsxs("span",{className:"rd-body",children:["Rated ",e.jsx("span",{className:"rd-num",style:{color:"var(--grn-soft)"},children:s.after})," — your card is live"]})]})});const r=s.faces.slice(0,2);return e.jsxs(n,{label:`Ball IQ ${s.before} to ${s.after}`,children:[e.jsxs("div",{className:"rd-head",children:[e.jsx("span",{className:"rd-label",children:"Ball IQ"}),s.after===s.before?e.jsx("span",{className:"rd-num rd-flat",children:s.after}):e.jsx(a,{a:s.before,b:s.after})]}),r.length>0&&e.jsx("div",{className:"rd-faces",children:r.map(i=>e.jsxs("span",{className:"rd-face",children:[e.jsx("span",{className:"rd-dot",style:{background:i.color},"aria-hidden":"true"}),e.jsx("span",{className:"rd-abbr",children:i.abbr}),e.jsx(a,{a:i.before,b:i.after})]},i.abbr))})]})}function _e({result:s,mode:a,onHome:n,onRetry:r,onShare:i,onPlayFootle:h,onPlayDaily:j,dailyOpen:u,survivalBest:m,wrongAnswers:g,askedQuestions:G,classicBest:f,label:K,onReport:w,photoNudge:V,dailyDone:l,cardDelta:Z}){const S=s&&s.score===s.total&&s.total>=10,b=Math.round(s.score/s.total*100);X.useEffect(()=>{S&&_("levelup")},[S]);const o=a==="survival",c=a==="daily",C=me(s.score,s.total,a),J=o?s.score>=10:b>=80,v=he(),T=v&&(v.kind==="ready"||v.kind==="in-progress"),E=v?.kind==="in-progress"?"Continue today's Footle":"Play today's Footle",z=a==="classic"&&s.total===10&&s.score>(f||0)&&s.score>0,F={hard:3,medium:2,easy:1},I=(G||[]).filter(t=>t&&t.id&&t.type==="mcq"&&Array.isArray(t.o)&&t.o.length>=2),Y=new Set((g||[]).map(t=>t.q)),N=I.filter(t=>Y.has(t.q)),P=N.length?N:I,d=P.length?P.slice().sort((t,x)=>(F[x.diff]||0)-(F[t.diff]||0))[0]:null,p=()=>
1{if(!d)return;_("soft");const t=N.length?`This one got me 🙈 bet you can't get it either ⚽ ${U(d)}`:`I got this one — bet you can't 😏 ⚽ ${U(d)}`;oe("stump-share",{mode:a,hard:d.diff==="hard",missed:N.length>0}),je(t)},W=o&&s.score>(m||0)&&s.score>=3,q=z||W,$=s.score,L=o?s.score===0?"Out on the first question — it happens to everyone":`${s.score} in a row before missing one`:`${s.score} correct out of ${s.total}`,M=!o&&s.bestStreak!=null&&s.bestStreak>=3&&s.bestStreak<s.total?s.bestStreak:0,R=u&&j?{label:"Play today's Daily 7",onClick:j}:T?{label:E,onClick:h}:null,k=!!R&&!(o&&s.score===0),y=s.score===0,ee=[{classic:"Classic",daily:"Daily 7",survival:"Survival",legends:"Legends",chaos:"Chaos"}[a]||"Quiz",K].filter(Boolean).join(" · "),se=(()=>{const t=Array.isArray(s.allAnswers)?s.allAnswers.map(x=>x.isCorrect===!0):[];for(;t.length<s.total;)t.push(!1);return t.slice(0,s.total)})(),re=c?H(s.score,s.total).headline:O(b),te=s.bestStreak!=null?s.bestStreak:0;return e.jsxs("div",{className:"screen",style:{paddingTop:8,position:"relative"},children:[(S||J)&&e.jsx(ne,{}),e.jsxs("div",{className:"rd-mobile",children:[e.jsx(ce,{onClose:n}),e.jsxs("div",{style:{textAlign:"center",padding:"20px 0 8px"},children:[e.jsx("div",{className:"ds-eyebrow",children:"Final score"}),e.jsx("div",{className:"numeric",style:{marginTop:8,fontSize:88,fontWeight:900,color:$>0?"var(--accent)":"var(--t2)",letterSpacing:"-0.03em",lineHeight:1,textShadow:$>0?"0 8px 32px rgba(88,204,2,0.35)":"none"},children:e.jsx(le,{value:$,duration:900,delay:200,triggerHaptic:!0})}),e.jsxs("div",{style:{marginTop:8,fontSize:15,color:"var(--t2)"},children:[L,M?e.jsxs(e.Fragment,{children:[" · best run ",e.jsx("span",{className:"numeric",children:M})," in a row"]}):null]}),c?(()=>{const{headline:t,sub:x}=H(s.score,s.total);return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{marginTop:6,fontSize:15,color:"var(--t1)",fontWeight:700},children:t}),e.jsx("div",{style:{marginTop:2,fontSize:13,color:"var(--t3)",fontWeight:500},children:x})]})})():o?s.score===0&&e.jsx("div",{style:{marginTop:6,fontSize:14,color:"var(--t3)",fontWeight:500},children:"One wrong answer ends a run. The next one starts clean."}):e.jsx("div",{style:{marginTop:6,fontSize:14,color:"var(--t3)",fontWeight:500},children:O(b)}),q&&e.jsxs("div",{style:{marginTop:10,display:"inline-flex",alignItems:"center",gap:6,fontSize:13,fontWeight:700,color:"var(--gold)"},children:[e.jsx(A,{size:14,strokeWidth:2.4,"aria-hidden":"true"}),e.jsxs("span",{children:["Personal best",z&&f?` — was ${f}`:W&&m?` — was ${m}`:""]})]}),C>0&&e.jsxs("div",{style:{marginTop:14,fontSize:14,color:"var(--gold)",fontWeight:700},children:["+",C," XP"]})]}),s.winner&&e.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:6,margin:"14px 0",fontSize:15,fontWeight:700,color:"var(--gold)"},children:[e.jsx(xe,{size:16,strokeWidth:2.4,"aria-hidden":"true"}),s.winner," wins!"]}),V,c&&l&&e.jsx("div",{style:{marginTop:18},children:e.jsx(D,{game:"daily7",edition:Q(new Date),won:!0,bucket:s.score,streak:l.streak,onShare:i,remind:l.remind,nextUp:l.nextUp,save:l.save,stump:d?p:null,track:l.track})}),c?e.jsxs(e.Fragment,{children:[e.jsx(B,{wrongAnswers:g,onReport:w,mode:a}),e.jsx("div",{className:"results-actions",style:{marginTop:18},children:e.jsx("button",{className:"results-exit",onClick:n,children:"Back to Home"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(fe,{d:Z}),e.jsxs("div",{className:"results-actions",style:{marginTop:18},children:[k?e.jsx("button",{className:"btn-3d",onClick:R.onClick,children:R.label}):e.jsx("button",{className:"btn-3d",onClick:r,children:o?"Go again":"Play again"}),e.jsxs("div",{className:"results-row",children:[k&&e.jsx("button",{className:"btn-3d ghost",onClick:r,children:"Play again"}),e.jsx("button",{className:"btn-3d ghost",onClick:i,children:"Share score"}),!k&&d&&e.jsx("button",{className:"btn-3d ghost",onClick:p,children:"Stump a mate"})]}),k&&d&&e.jsx("button",{className:"results-link",onClick:p,children:"Stump a mate with a question"}),e.jsx("button",{className:"results-exit",onClick:n,children:"Back to Home"})]}),e.jsx(B,{wrongAnswers:g,onReport:w,mode:a})]})]}),e.jsxs("div",{className:"rd-desktop",children:[e.jsxs("div",{className:"rd-card",children:[e.jsx("div",{className:`rd-eyebrow${y?" is-zero":""}`,children:o?"Run over":"Round complete"}),e.jsx("div",{className:"rd-sub",children:ee}),y&&e.jsx("div",{className:"rd-soft",children:L}),e.jsxs("div",{className:`rd-badge${y?" is-zero":""}`,children:[e.jsxs("div",{className:"rd-badge-score",children:[s.score,!o&&e.jsxs("span",{className:"rd-badge-total",children:["/",s.total]})]}),e.jsx("div",{className:`rd-badge-tier${y?" is-zero":""}`,children:o?"in a row":re})]}),!o&&e.jsx("div",{className:"rd-dots","aria-hidden":"true",children:se.map((t,x)=>e.jsx("span",{className:`rd-dot ${t?"ok":"no"}`,children:t?"✓":"✗"},x))}),q&&e.jsxs("div",{className:"rd-pb",children:[e.jsx(A,{size:14,strokeWidth:2.4,"aria-hidden":"true"}),e.jsxs("span",{children:["Personal best",z&&f?` — was ${f}`:W&&m?` — was ${m}`:""]})]}),e.jsxs("div",{className:"rd-tiles",children:[o?e.jsxs("div",{className:"rd-tile",children:[e.jsx("div",{className:"rd-tile-v",children:m>0?m:"—"}),e.jsx("div",{className:"rd-tile-k",children:"Best ever"})]}):e.jsxs("div",{className:"rd-tile",children:[e.jsxs("div",{className:"rd-tile-v",children:[b,"%"]}),e.jsx("div",{className:"rd-tile-k",children:"Accuracy"})]}),e.jsxs("div",{className:"rd-tile",children:[e.jsxs("div",{className:"rd-tile-v rd-amber",children:["+",C]}),e.jsx("div",{className:"rd-tile-k",children:"XP earned"})]}),e.jsxs("div",{className:"rd-tile",children:[e.jsx("div",{className:"rd-tile-v rd-green",children:te}),e.jsx("div",{className:"rd-tile-k",children:"Best streak"})]})]}),c&&l&&e.jsx("div",{style:{margin:"18px 0"},children:e.jsx(D,{game:"daily7",edition:Q(new Date),won:!0,bucket:s.score,streak:l.streak,onShare:i,remind:l.remind,nextUp:l.nextUp,save:l.save,stump:d?p:null,track:l.track})}),e.jsxs("div",{className:"rd-actions",children:[!c&&u&&j&&e.jsx("button",{className:"rd-btn rd-btn-primary",onClick:j,children:"Play today's Daily 7"}),!c&&!u&&T&&e.jsx("button",{className:"rd-btn rd-btn-primary",onClick:h,children:E}),!c&&e.jsx("button",{className:`rd-btn ${u&&j||T?"rd-btn-ghost":"rd-btn-primary"}`,onClick:r,children:o?"Go again":"Play again"}),!c&&e.jsxs("button",{className:"rd-btn rd-btn-ghost",onClick:i,children:[e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7"}),e.jsx("path",{d:"M12 15V4M8 8l4-4 4 4"})]}),"Share"]})]}),d&&!c&&e.jsx("button",{className:"rd-link",onClick:p,children:"Stump a mate with a question"}),e.jsx("button",{className:"rd-exit",onClick:n,children:"Back to Home"})]}),e.jsx("div",{style:{maxWidth:560,margin:"0 auto"},children:e.jsx(B,{wrongAnswers:g,onReport:w,mode:a})})]})]})}export{_e as Results,_e as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.