1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[48861],{86835:(e,t,r)=>{r.d(t,{A:()=>l});let l=(0,r(67401).A)("circle-help",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},16972:(e,t,r)=>{r.d(t,{A:()=>l});let l=(0,r(67401).A)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]])},85047:(e,t,r)=>{r.d(t,{A:()=>l});let l=(0,r(67401).A)("settings-2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},65566:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var l=r(95155),a=r(12115),c=r(20628),s=r(25571),n=r(66546);let i=e=>{let{currentLevel:t,handleLevelComplete:r,onEarCoinsEarned:i,setCorrectAnswers:o,setAttempts:u,setProgress:d,setLives:m,onBackToMap:y,setShowGameOver:p}=e,h=(0,a.useRef)(!1),k=(0,a.useRef)(Date.now()),T=(0,a.useRef)([]),f=(0,n.P)((e,r)=>{let l=(Date.now()-k.current)/1e3,a=l/Math.max(r,1);return{questType:t.questType,levelId:t.id,totalScore:10*e,correctAnswers:e,totalQuestions:r,averageTime:a,quickestTime:a,slowestTime:a,totalTime:l,timeBonus:0,skipsPenalty:0,attempts:T.current.slice(0,200)}},i),w=(0,a.useCallback)((e,r,l,a)=>{u(r),o(l),T.current.push({isCorrect:e,item:String(null!=a?a:"")}),e||m(e=>{let t=Math.max(0,e-1);return t<=0&&(h.current=!0,f(l,r),setTimeout(()=>p(!0),1500)),t}),d(Math.min(100,r/t.attemptsAllowed*100))},[t.attemptsAllowed,u,o,m,d,p,f]),C=(0,a.useCallback)(e=>{if(e.correct>=t.requiredCorrect){let l=(Date.now()-k.current)/1e3,a=l/Math.max(e.total,1),c=l<=60?Math.floor((60-l)*10):0;(0,s.$)({questType:t.questType,levelId:t.id,totalScore:10*e.correct,correctAnswers:e.correct,totalQuestions:e.total,averageTime:a,quickestTime:a,slowestTime:a,totalTime:l,timeBonus:c,skipsPenalty:0,attempts:T.current.slice(0,200)}).then(e=>{e.earCoinsEarned&&(null==i||i(e.earCoinsEarned,e.earCoinsBreakdown))}).catch(()=>{}),r()}else f(e.correct,e.total),p(!0)},[t,r,i,p,f]);return(0,l.jsx)(c.HybridLabExercise,{onBack:y,levelId:t.id,levelName:t.name,levelDescription:t.description,onComplete:C,onAnswer:w,attemptsAllowed:t.attemptsAllowed,requiredCorrect:t.requiredCorrect,levelDegrees:t.hybridDegrees,levelTriadType:t.hybridTriadType,isGameOver:h.current})}},66546:(e,t,r)=>{r.d(t,{P:()=>c});var l=r(12115),a=r(25571);function c(e,t){let r=(0,l.useRef)(!1),c=(0,l.useRef)({buildStats:e,onEarCoinsEarned:t});return c.current={buildStats:e,onEarCoinsEarned:t},(0,l.useCallback)((e,t)=>{if(r.current)return;r.current=!0;let l=c.current.buildStats(e,t);l&&(0,a.$)({...l,totalScore:l.totalScore-l.timeBonus,timeBonus:0},{onError:()=>{}}).then(e=>{if(e.earCoinsEarned){var t,r;null===(t=(r=c.current).onEarCoinsEarned)||void 0===t||t.call(r,e.earCoinsEarned,e.earCoinsBreakdown)}}).catch(()=>{})},[])}}}]);
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.