PageSourceSearch

https://www.earonman.com/_next/static/chunks/57152.7bed9654f67828f5.js

js earonman.com collected 2026-10-02 00:33:14 UTC 28,157 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57152],{13374:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(95155);a(12115);var s=a(11536),n=a(73616),o=a(21567);function l(e){let{className:t,size:a="sm"}=e,[l,c]=(0,n.iZ)(),i="sm"===a;return(0,r.jsxs)("button",{type:"button",role:"switch","aria-checked":l,onClick:()=>c(!l),title:l?"Auto-advance is ON — next question loads automatically after a correct answer. Click to disable.":"Auto-advance is OFF — tap Next to continue after each answer. Click to enable.",className:(0,o.cn)("inline-flex items-center gap-2 rounded-full border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",i?"px-3 py-1 text-xs":"px-4 py-2 text-sm",l?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300 hover:bg-emerald-500/15":"border-white/10 bg-white/5 text-white/70 hover:bg-white/10",t),children:[(0,r.jsx)(s.LxX,{className:(0,o.cn)(i?"h-3 w-3":"h-3.5 w-3.5",!l&&"opacity-60"),"aria-hidden":"true"}),(0,r.jsx)("span",{className:"font-medium",children:"Auto-advance"}),(0,r.jsx)("span",{className:(0,o.cn)("rounded-full px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide",l?"bg-emerald-500/20 text-emerald-200":"bg-white/10 text-white/60"),children:l?"On":"Off"})]})}},68174:(e,t,a)=>{a.d(t,{A:()=>m});var r=a(95155);a(12115);var s=a(11555),n=a(47650),o=a(25683),l=a(2178),c=a(43226),i=a(11536),d=a(21567);function m(e){let{open:t,isOutOfLives:a=!1,title:m,message:u,variant:x="wrong",onRepeat:p,onNext:f,withinParent:h=!1}=e,{t:b,ready:w}=(0,s.Bd)(["components","quests","a11y","common"]);if(!w)return null;let g=document.getElementById("portal-root"),y="correct"===x?i.A7C:"wrong"===x?i._Hm:null,v=(0,r.jsx)(o.N,{children:t&&(0,r.jsx)("div",{className:(h?"absolute inset-0":"fixed inset-0")+" z-[96] flex items-center justify-center bg-black/60",children:(0,r.jsxs)(l.P.div,{initial:{opacity:0,scale:.96,y:6},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:6},transition:{duration:.18},className:"glass-surface rounded-xl shadow-xl ring-1 ring-white/10 p-4 sm:p-5 w-[92vw] max-w-sm overflow-hidden",children:[(0,r.jsxs)("div",{className:(0,d.cn)("flex items-center gap-2 text-base font-medium mb-1.5","correct"===x?"text-success":"wrong"===x?"text-rose-300":""),children:[y&&(0,r.jsx)(y,{className:(0,d.cn)("shrink-0 text-lg","correct"===x?"text-success":"wrong"===x?"text-rose-400":""),"aria-hidden":"true"}),(0,r.jsx)("span",{children:null!=m?m:a?"Out of lives":"What would you like to do?"})]}),(0,r.jsx)("div",{className:"text-sm text-white/80 mb-4",children:null!=u?u:a?"You can listen again, or finish the game.":"You can listen again, or go to the next question."}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2 flex-wrap sm:flex-nowrap",children:[(0,r.jsxs)(c.$,{variant:"outline",onClick:p,className:"glass-chip flex items-center shrink-0",children:[(0,r.jsx)(i.Swo,{className:"mr-2"})," ",b("a11y:actions.listen"),(0,r.jsx)("span",{className:"ml-2 text-xs bg-muted text-muted-foreground px-1.5 py-0.5 rounded",children:"Space"})]}),(0,r.jsxs)(c.$,{onClick:f,className:"glass-chip-strong tint-steel flex items-center shrink-0",children:[(0,r.jsx)(i.Z0P,{className:"mr-2"})," ",a?"Finish Game":"Next Question",(0,r.jsx)("span",{className:"ml-2 text-xs bg-muted text-muted-foreground px-1.5 py-0.5 rounded",children:"Enter"})]})]})]})})});return h?v:g?(0,n.createPortal)(v,g):v}},79469:(e,t,a)=>{a.d(t,{u:()=>n});var r=a(95155),s=a(21567);function n(e){let{className:t,...a}=e;return(0,r.jsx)("kbd",{"data-slot":"kbd",className:(0,s.cn)("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...a})}},86877:(e,t,a)=>{a.d(t,{A:()=>d});var r=a(95155),s=a(58803),n=a.n(s),o=a(12115),l=a(25683),c=a(2178),i=a(21567);let d=e=>{let{items:t,placeholder:a,wrapperClassName:s,surfaceClassName:d}=e,m=(0,o.useMemo)(()=>t.slice(-3),[t]),u={correct:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",wrong:"bg-red-500/15 text-red-300 border-red-500/30",skip:"bg-amber-500/15 text-amber-300 border-amber-500/30"};return(0,r.jsxs)("div",{className:"jsx-c55aa17868d3279c "+((0,i.cn)("my-1 sm:my-2 w-full px-2 overflow-hidden",s)||""),children:[(0,r.jsx)("div",{className:"jsx-c55aa17868d3279c "+((0,i.cn)("history-bar mx-auto flex gap-1.5 sm:gap-2 flex-nowrap justify-center overflow-hidden py-1.5 px-2 sm:px-3 rounded-md sm:rounded-lg bg-card/40 border border-border/40 max-w-sm sm:max-w-xl min-h-[32px] sm:min-h-[40px]",d)||""),children:m.length>0?(0,r.jsx)(l.N,{initial:!1,children:m.map(e=>(0,r.jsxs)(c.P.div,{className:(0,i.cn)("flex flex-row items-center justify-center rounded border px-2 sm:px-3 py-1 sm:py-1.5 text-[10px] sm:text-sm leading-tight shadow-sm flex-shrink min-w-0 max-w-[120px] sm:max-w-[180px] gap-1 overflow-hidden",u[e.result]),initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.25,ease:"easeOut"},children:[(0,r.jsx)("span",{className:"jsx-c55aa17868d3279c font-semibold leading-snug truncate",children:e.label}),"correct"!==e.result&&e.correctLabel&&(0,r.jsxs)("span",{className:"jsx-c55aa17868d3279c opacity-80 leading-snug text-[9px] sm:text-xs truncate",children:["→ ",e.correctLabel]})]},e.id))}):a?(0,r.jsx)("div",{className:"jsx-c55aa17868d3279c flex w-full items-center justify-center text-[0.6rem] sm:text-xs tracking-[0.15em] sm:tracking-[0.2em] uppercase text-muted-foreground/70 px-1 text-center",children:a}):null}),(0,r.jsx)(n(),{id:"c55aa17868d3279c",children:".history-bar{white-space:nowrap}"})]})}},68804:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_});var r=a(95155),s=a(58803),n=a.n(s),o=a(12115),l=a(76046),c=a(43226),i=a(56114);let d=o.memo(e=>{let{scale:t,showFullScale:a}=e,s=(0,o.useRef)(null);return(0,o.useEffect)(()=>{var e;if(!t.vexflowNotes||!s.current)return;let r=[];try{r=JSON.parse(t.vexflowNotes)}catch(e){return}if(!r||0===r.length)return;let n=parseInt((null===(e=t.rootNote.match(/\d+/))||void 0===e?void 0:e[0])||"4",10),o=n<4||3===n&&t.rootNote&&t.rootNote[0]<"A"?"bass":"treble",l=s.current;l.innerHTML="";let c=new i.Renderer(l,i.Renderer.Backends.SVG);c.resize(500,150);let d=c.getContext();d.setFillStyle("black"),d.setStrokeStyle("black");let m=new i.Stave(10,40,480);m.addClef(o).setContext(d).draw();let u=(a?r:[r[0]]).filter(e=>"string"==typeof e&&e.includes("/")).map(e=>{let t=e.toLowerCase(),a=t.split("/")[0],r=new i.StaveNote({clef:o,keys:[t],duration:"8"});return a.includes("##")?r.addModifier(new i.Accidental("##"),0):a.includes("#")&&!a.includes("##")?r.addModifier(new i.Accidental("#"),0):a.length>2&&a.endsWith("bb")?r.addModifier(new i.Accidental("bb"),0):a.length>1&&a.endsWith("b")&&r.addModifier(new i.Accidental("b"),0),r});if(!u.length)return;try{let e=new i.Voice({num_beats:u.length/2,beat_value:4});e.setStrict(!1),e.addTickables(u);let t=[];if(a&&8===u.length){let e=[new i.Fraction(4,8),new i.Fraction(4,8)];t=i.Beam.generateBeams(u,{groups:e})}new i.Formatter().joinVoices([e]).format([e],m.getWidth()-50),e.draw(d,m),t.length>0&&t.forEach(e=>e.setContext(d).draw())}catch(e){}let x=l.getElementsByTagName("svg")[0];x&&(x.style.background="white",x.style.maxWidth="100%",x.style.height="auto",x.setAttribute("preserveAspectRatio","xMidYMid meet"))},[t.vexflowNotes,t.rootNote,a]),(0,r.jsx)("div",{className:"flex justify-center items-center w-full",children:(0,r.jsx)("div",{ref:s,className:"bg-white rounded-lg p-4 shadow-lg transition-opacity duration-300 max-w-full overflow-hidden",style:{minHeight:"150px"}})})});d.displayName="ScaleRenderer";var m=a(11536),u=a(31523),x=a(84501),p=a(68174),f=a(73616),h=a(13374),b=a(9756),w=a(75556),g=a(25571),y=a(66546),v=a(1404),j=a(92068),k=a(35906),N=a(13538),C=a(17008),A=a(86877),S=a(1628),F=a(4838),z=a(68308),E=a(19966);let T=o.memo(e=>{var t,a;let{currentLevel:s,handleLevelComplete:i,onEarCoinsEarned:T,xp:_,setXp:q,updateXp:O,level:R,setLevel:D,badges:L,setBadges:B,attempts:W,setAttempts:M,correctAnswers:I,setCorrectAnswers:J,lives:Q,setLives:P,progress:G,setProgress:H,setResultMessage:$,setNewBadge:U,resultMessage:Z,onBackToMap:K,setShowGameOver:V,setResponseTimes:Y,refetch:X,testOutProgressId:ee}=e;(0,o.useEffect)(()=>(window.innerWidth<640&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"),()=>{document.body.style.overflow="",document.documentElement.style.overflow=""}),[]);let[et,ea]=(0,o.useState)(null),er=(0,k.jE)(),es=(0,l.useRouter)(),[en,eo]=(0,o.useState)([]),[el,ec]=(0,o.useState)(null),[ei,ed]=(0,o.useState)(!1),[em,eu]=(0,o.useState)(!1),[ex,ep]=(0,o.useState)(!1),[ef,eh]=(0,o.useState)(!1),[eb,ew]=(0,o.useState)(!1),{soundManager:eg,isInitialized:ey,initializationError:ev}=(0,u.q)(),{playCorrect:ej,playWrong:ek,playComplete:eN}=(0,S.J)(),[eC,eA]=(0,o.useState)(!1),eS=(0,N.GR)(),eF=(0,N.Dz)(),ez=!!ee,[eE,eT]=(0,o.useState)(0),[e_,eq]=(0,o.useState)(50),[eO,eR]=(0,o.useState)(!1),[eD,eL]=(0,o.useState)([]),[eB,eW]=(0,o.useState)(null),[eM,eI]=(0,o.useState)(null),[eJ,eQ]=(0,o.useState)([]),[eP,eG]=(0,o.useState)(Date.now()),[eH,e$]=(0,o.useState)(0),[eU,eZ]=(0,o.useState)(!1),[eK,eV]=(0,o.useState)([]),[eY,eX]=(0,o.useState)(!1),[e0,e5]=(0,o.useState)(null),[e1,e4]=(0,o.useState)(!1),[e2,e9]=(0,o.useState)(!1),e3=(0,o.useRef)(null),e6=(0,o.useRef)(null),e8=(0,o.useRef)(null),e7=(0,o.useRef)(null),te=(0,o.useRef)(!1),tt=(0,o.useRef)(0),ta=(0,o.useRef)([]),tr=(0,o.useCallback)(async()=>{let e=(0,g.W)(eJ,I,W,eH,10),t=await (0,g.$)({...e,questType:"scale",levelId:s.id,attempts:ta.current.slice(0,200)},{onError:()=>{}});t.earCoinsEarned&&(null==T||T(t.earCoinsEarned,t.earCoinsBreakdown))},[eJ,I,W,eH,s.id,T]),ts=(0,y.P)((e,t)=>s.id?{...(0,g.W)(eJ,e,t,eH,10),questType:"scale",levelId:s.id,attempts:ta.current.slice(0,200)}:null,T),tn=(0,o.useCallback)(()=>{e6.current&&(clearTimeout(e6.current),e6.current=null),eg.stopAllSounds(),te.current=!1,eh(!1)},[eg]),to=(0,o.useCallback)(async e=>{if((null==e?void 0:e.notes)&&!te.current&&ey)try{let t=JSON.parse(e.notes);if(!t||0===t.length)return;tn(),te.current=!0,eh(!0),eg.playExerciseSequence(t,!1,300);let a=Math.max(0,(t.length-1)*300)+100;setTimeout(()=>{te.current=!1,eh(!1)},a)}catch(e){te.current=!1,eh(!1)}},[tn,ey,eg]),tl=e=>{let t=e.toLowerCase();return"minor"===t||"aeolian"===t?"minor":"harmonicminor"===t||"harmonic_minor"===t?"harmonic_minor":"melodicminor"===t||"melodic_minor"===t?"melodic_minor":"dorian#4"===t?"doriansharp4":"lydian#2"===t?"lydiansharp2":"alteredbb7"===t?"altereddominantbb7":t},tc=(0,o.useCallback)(()=>{var e;let t=null!==(e=s.scaleTypes)&&void 0!==e?e:[];
1if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return console.error("[ScaleQuest] Failed to parse scaleTypes JSON string:",e),null}let a=(Array.isArray(t)?t:[]).filter(e=>"string"==typeof e);if(0===a.length)return null;let r=a.map(tl);if(0===r.length)return null;let n=r[Math.floor(Math.random()*r.length)],o=(0,j.ye)();try{return(0,j.rF)(o,n)}catch(e){return console.error("[ScaleQuest] Error in createScale:",e),null}},[s.scaleTypes,s.id,s.name]),ti=(0,o.useCallback)(()=>{if(!ex)try{tn();let e=tc();if(!e)throw Error("Failed to create scale - no valid scale types in level configuration");ea(e),eu(!1),ew(!1),$(null),eI(null),eG(Date.now());let t=setTimeout(()=>{to(e)},300);return()=>clearTimeout(t)}catch(e){console.error("[ScaleQuest] Error in setupNewScale:",e),ec("Failed to set up new scale: ".concat(e instanceof Error?e.message:"Unknown error"))}},[ex,to,$,tn,tc]);(0,o.useEffect)(()=>{let e=!0;return(tt.current++,tt.current>3)?(ec("Too many initialization attempts"),()=>{e=!1}):((async()=>{if(e&&ey)try{if(await eg.waitForLoad(),!e)return;e8.current=new w.Howl({src:["/sounds/correct.mp3"],volume:.2,html5:!1}),e7.current=new w.Howl({src:["/sounds/wrong.mp3"],volume:.2,html5:!1}),eA(!0)}catch(t){e&&ec(t instanceof Error?t.message:"Unknown error occurred during audio initialization")}})(),()=>{e=!1,tn(),e8.current&&e8.current.unload(),e7.current&&e7.current.unload()})},[ey,eg,tn]),(0,o.useEffect)(()=>{var e;let t=null!==(e=s.scaleTypes)&&void 0!==e?e:[];if("string"==typeof t)try{t=JSON.parse(t)}catch(e){console.error("[ScaleQuest] Failed to parse scaleTypes JSON string in useEffect:",e),t=[]}let a=(Array.isArray(t)?t:[]).filter(e=>"string"==typeof e).map(tl),r=j.dJ,n=e=>e.replace(/_/g," ").replace(/sharp/gi,"#").replace(/\bb/gi,"bb").replace(/\b([a-z])/g,(e,t)=>t.toUpperCase());eo(a.map(e=>{var t;return{name:e,displayName:null!==(t=r[e])&&void 0!==t?t:n(e)}})),et||ti()},[s.scaleTypes,ti,et]);let td=(0,o.useCallback)(async e=>{var t,a,r,n;if(!et||ex||te.current||eb||!eC)return;let o=(Date.now()-eP)/1e3;eQ(e=>[...e,o]),null==Y||Y(e=>[...e,o]),M(e=>e+1),ew(!0),eX(!1),tn();let l=et.type===e,c=(null===(t=en.find(t=>t.name===e))||void 0===t?void 0:t.displayName)||e,i=et.displayName;if(ta.current.push({isCorrect:l,item:String(et.type),answer:String(e)}),ez&&ee){eV(e=>{let t=[...e,{id:"".concat(Date.now(),"-").concat(l?"ok":"wrong"),label:c,correctLabel:l?void 0:i,result:l?"correct":"wrong"}];return t.length>10?t.slice(-10):t});let e=eE+1,t=e_||50;l?(ej(),eI(i),$("✅ ".concat(e,"/").concat(t," \xb7 ").concat(i)),eu(!0)):(ek(),eI(i),$("❌ ".concat(e,"/").concat(t," \xb7 ").concat(i)),eu(!1));try{let r=await eS.mutateAsync({progressId:ee,isCorrect:l}),s=null!==(a=r.requiredAttempts)&&void 0!==a?a:t;if(eq(s),eT(r.attemptsCount),!l||"failed"===r.status){(r.attemptsCount!==e||s!==t)&&$("❌ ".concat(r.attemptsCount,"/").concat(s," \xb7 ").concat(i)),eu(!1),eW({attempts:r.attemptsCount,required:s,correctAnswer:i});return}if("completed"===r.status){let e=await eF.mutateAsync({progressId:ee});eL(e.unlockedLevels||[]),eR(!0),eI(i),eN();return}(r.attemptsCount!==e||s!==t)&&$("✅ ".concat(r.attemptsCount,"/").concat(s," \xb7 ").concat(i)),eu(!0),e3.current&&clearTimeout(e3.current),e3.current=setTimeout(()=>{$(null),ti()},800);return}catch(e){console.error("[TEST-OUT] Error in scale test-out flow:",e),ek(),eW({attempts:eE,required:e_,correctAnswer:i}),$("❌ Test-out error. Please try again.");return}}let d=!1;if(l){eI(i),eV(e=>{let t=[...e,{id:"".concat(Date.now(),"-ok"),label:c,result:"correct"}];return t.length>10?t.slice(-10):t});let e=I+1,t=e/s.requiredCorrect*100;if(e>=s.requiredCorrect&&!ex)e3.current&&(clearTimeout(e3.current),e3.current=null),e6.current&&(clearTimeout(e6.current),e6.current=null),ep(!0),eZ(!1),$(null),tr(),e9(!0),setTimeout(()=>{tn(),e8.current&&e8.current.stop(),e7.current&&e7.current.stop(),eA(!1),eh(!1)},1e3);else{J(e),H(t),$("Correct!"),eu(!0),null===(r=e8.current)||void 0===r||r.play(),(0,E.Ac)();let a=_+10,s=L.find(e=>e.xpRequired>_&&e.xpRequired<=a);s&&U(s),O?await O(a):q(a),d=!0}}else{eI(i),eV(e=>{let t=[...e,{id:"".concat(Date.now(),"-wrong"),label:c,correctLabel:i,result:"wrong"}];return t.length>10?t.slice(-10):t}),$("Wrong!"),eu(!1),null===(n=e7.current)||void 0===n||n.play(),(0,E.Rm)();let e=Q-1;P(e),e<=0?($("Game Over!"),e4(!0),eZ(!0),tr()):eX(!0)}e3.current&&clearTimeout(e3.current),d?(e5(!0),(0,f.ly)()?e3.current=setTimeout(()=>{$(null),ti()},800):eX(!0)):l||e5(!1)},[et,s.requiredCorrect,ex,eb,eC,eP,tn,en,ez,ee,eS,e_,ek,ej,eN,eF,ti,I,tr,e8,e7,_,L,O,eE,M,ew,eX,$,eu,eW,eI,eL,eR,ep,eZ,e9,eA,eh,J,H,U,q,P,Q]),tm=(0,o.useCallback)(()=>
1{et&&!ex&&!te.current&&(!eb||eY)&&eC&&to(et)},[et,to,ex,eb,eY,eC]),tu=(0,o.useCallback)(()=>{var e;if(ex||te.current||eb||!eC)return;e5(!1),eI(null!==(e=null==et?void 0:et.displayName)&&void 0!==e?e:null),eu(!1);let t=(Date.now()-eP)/1e3;eQ(e=>[...e,t]),null==Y||Y(e=>[...e,t]),e$(e=>e+1),M(e=>e+1),ew(!0),tn();let a=null==et?void 0:et.displayName;eV(e=>{let t=[...e,{id:"".concat(Date.now(),"-skip"),label:"Skip",correctLabel:a,result:"skip"}];return t.length>10?t.slice(-10):t});let r=Q-1;P(r),r<=0?($("Game Over!"),e4(!0),eZ(!0),tr()):$("Skipped!"),!ex&&(e3.current&&clearTimeout(e3.current),r>0&&eX(!0))},[ti,M,P,$,V,ex,eb,eP,tr,tn,eC,Q]),tx=(0,o.useCallback)(()=>{e3.current&&(clearTimeout(e3.current),e3.current=null),e6.current&&(clearTimeout(e6.current),e6.current=null),tn(),eh(!1),K()},[tn,K]);if((0,o.useEffect)(()=>{e1&&(ts(I,W),V(!0),e4(!1))},[e1,V,ts,I,W]),(0,o.useEffect)(()=>{e2&&(i(),e9(!1))},[e2,i]),(0,x.M)({onRepeat:et&&!ex&&!te.current&&(!eb||eY)&&eC?tm:void 0,onSkip:ex||te.current||eb||eY||!eC?void 0:tu,onBack:tx,onNext:eY?()=>{Q<=0?e4(!0):($(null),eX(!1),ti())}:void 0,disabled:ex||te.current||!eC}),el)return(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"text-red-500",children:el}),(0,r.jsx)(c.$,{onClick:()=>{tt.current=0,ec(null)},variant:"secondary",className:"mt-4",children:"Retry"}),(0,r.jsx)(c.$,{onClick:K,variant:"secondary",className:"mt-4 ml-4",children:"Back to Map"})]});let tp=(0,v.w1)(I,100),tf=(0,v.Xd)((0,v.q7)(eJ),60),th=(0,v.WJ)(eH,50);(0,v.bq)(tp,tf,th);let tb=null!=Z?Z:"",tw=!!Z&&(tb.startsWith("✅")||tb.startsWith("✓")||tb.startsWith("\uD83C\uDF89")||"Correct!"===tb),tg=!!Z&&(tb.startsWith("❌")||tb.includes("Wrong")||tb.toLowerCase().includes("failed")||"Game Over!"===tb);return(0,r.jsxs)("div",{className:"jsx-5504a9a4c0409401 relative min-h-[calc(100dvh-3rem)] sm:min-h-0 pb-[calc(80px+env(safe-area-inset-bottom))] sm:pb-0",children:[(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 sm:hidden text-center pt-4 pb-2 px-4",children:(0,r.jsx)("h2",{className:"jsx-5504a9a4c0409401 text-xl font-bold ear-title",children:s.name})}),ez&&(0,r.jsxs)("div",{className:"jsx-5504a9a4c0409401 bg-gradient-to-r from-amber-600 to-orange-600 text-white px-6 py-4 mb-6 rounded-lg shadow-xl",children:[(0,r.jsxs)("div",{className:"jsx-5504a9a4c0409401 flex items-center justify-between mb-2",children:[(0,r.jsxs)("h3",{className:"jsx-5504a9a4c0409401 text-lg font-bold flex items-center gap-2",children:[(0,r.jsx)("span",{className:"jsx-5504a9a4c0409401 text-2xl",children:"\uD83D\uDE80"}),"Jump to Next Section Challenge"]}),(0,r.jsxs)("div",{className:"jsx-5504a9a4c0409401 text-xl font-bold",children:[eE,"/",e_]})]}),(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 w-full bg-amber-900/50 rounded-full h-3 mb-2",children:(0,r.jsx)("div",{style:{width:"".concat(eE/e_*100,"%")},className:"jsx-5504a9a4c0409401 bg-white h-3 rounded-full transition-all duration-300"})}),(0,r.jsxs)("p",{className:"jsx-5504a9a4c0409401 text-sm text-amber-100",children:[(0,r.jsx)("strong",{className:"jsx-5504a9a4c0409401",children:"Zero mistakes allowed!"})," One wrong answer fails the test."]})]}),(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 absolute top-0 right-0 z-40 drop-shadow-lg",children:(0,r.jsx)(c.$,{onClick:()=>ed(!ei),variant:"ghost",className:"p-2 rounded-full border border-border/70 shadow-lg bg-background/90 text-foreground hover:bg-background",children:(0,r.jsx)(m.__w,{size:24})})}),ei&&(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 absolute top-12 right-0 bg-card p-4 rounded-lg shadow-lg z-30 max-w-sm text-card-foreground",children:(0,r.jsx)("p",{className:"jsx-5504a9a4c0409401",children:s.description})}),(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 flex flex-col items-center w-full px-2 sm:px-4",children:(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 mb-2 sm:mb-4 transition-all duration-500 flex flex-col items-center w-full",children:et?(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 "+"inline-block ".concat(em?"animate-glow":""),children:(0,r.jsx)(d,{scale:et,showFullScale:eb})}):(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 h-24 flex items-center justify-center text-sm text-muted-foreground",children:"Getting next scale…"})})}),(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 flex justify-center w-full",children:(0,r.jsx)(b.A,{scaleOptions:en,handleAnswer:td,disabled:ex||te.current||eb||!eC})}),(0,r.jsx)(A.A,{items:eK}),(0,r.jsxs)("div",{className:"jsx-5504a9a4c0409401 flex flex-wrap justify-center gap-2 sm:gap-3 mt-3 sm:mt-4 px-2",children:[(0,r.jsxs)("button",{onClick:tm,disabled:ex||te.current||!eY&&eb||!eC,className:"jsx-5504a9a4c0409401 flex items-center h-10 sm:h-11 px-4 sm:px-5 text-xs sm:text-sm font-medium bg-action/20 dark:bg-action/15 backdrop-blur-md text-blue-700 dark:text-action border border-action/30 dark:border-action/20 rounded-xl shadow-sm hover:bg-action/30 dark:hover:bg-action/25 hover:border-action/40 hover:shadow-md active:scale-95 transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(m.Swo,{className:"mr-1.5 sm:mr-2"})," Listen",(0,r.jsxs)("span",{className:"jsx-5504a9a4c0409401 ml-1.5 sm:ml-2 text-[10px] sm:text-xs bg-action/20 px-1.5 py-0.5 rounded hidden sm:inline",children:[">","Space"]})]}),!eb&&(0,r.jsxs)("button",{onClick:tu,disabled:ex||te.current||!eC,className:"jsx-5504a9a4c0409401 flex items-center h-10 sm:h-11 px-4 sm:px-5 text-xs sm:text-sm font-medium bg-amber-500/20 dark:bg-amber-500/15 backdrop-blur-md text-amber-700 dark:text-amber-300 border border-amber-500/30 dark:border-amber-400/20 rounded-xl shadow-sm hover:bg-amber-500/30 dark:hover:bg-amber-500/25 hover:border-amber-500/40 hover:shadow-md active:scale-95 transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(m.Ny1,{className:"mr-1.5 sm:mr-2"})," Reveal Answer",(0,r.jsx)("span",{className:"jsx-5504a9a4c0409401 ml-1.5 sm:ml-2 text-[10px] sm:text-xs bg-amber-500/20 px-1.5 py-0.5 rounded hidden sm:inline",children:"Backspace"})]})]}),(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 flex justify-center mt-4 sm:mt-6 mb-2",children:(0,r.jsx)(h.A,{})}),(0,r.jsx)(z.$,{onClick:tx}),Z&&(0,r.jsx)("div",{className:"jsx-5504a9a4c0409401 w-full flex justify-center mt-3 px-2",children:(0,r.jsxs)("div",{className:"jsx-5504a9a4c0409401 "+"bg-card/95 backdrop-blur-sm px-4 py-2 rounded-full flex items-center justify-center transition-all duration-300 shadow-lg border border-border/50 ".concat(tw?"animate-success border-green-500/30":tg?"animate-error border-red-500/30":""),children:[tw?(0,r.jsx)(m.A7C,{className:"text-green-500 mr-2",size:18}):"Skipped!"===Z?(0,r.jsx)(m._Hm,{className:"text-yellow-400 mr-2",size:18}):(0,r.jsx)(m._Hm,{className:"text-red-400 mr-2",size:18}),(0,r.jsx)("span",{className:"jsx-5504a9a4c0409401 text-card-foreground text-sm font-medium",children:Z}),tw&&eM&&(0,r.jsx)("span",{className:"jsx-5504a9a4c0409401 ml-2 text-green-500 font-semibold",children:eM})]})}),(0,r.jsx)(p.A,{open:eY,isOutOfLives:Q<=0,title:e0?"Correct!":eM?"Correct answer: ".concat(eM):void 0,message:e0?"Take a moment to absorb. Tap Next when you're ready.":eM?"Listen again to internalize the sound, then tap Next.":void 0,variant:e0?"correct":"wrong",onRepeat:tm,onNext:()=>{Q<=0?(e4(!0),eX(!1)):($(null),eX(!1),ti())},withinParent:!0}),ez&&(0,r.jsx)(C.f,{isOpen:eO,onClose:async()=>{eR(!1),await er.refetchQueries({queryKey:["exercisesInitData"],exact:!1}),es.push("/exercises?refresh=".concat(Date.now()))},onContinue:async()=>{eR(!1),await er.refetchQueries({queryKey:["exercisesInitData"],exact:!1}),es.push("/exercises?refresh=".concat(Date.now()))},sectionName:"string"==typeof s.sectionBreak?s.sectionBreak:(null===(t=s.sectionBreak)||void 0===t?void 0:t.t
1itle)||"Section",unlockedLevelsCount:eD.length,nextSectionAvailable:eD.length>0}),ez&&eB&&(0,r.jsx)(F.P,{isOpen:!!eB,onClose:async()=>{eW(null),$(null),ew(!1),await er.refetchQueries({queryKey:["exercisesInitData"],exact:!1}),es.push("/exercises?refresh=".concat(Date.now()))},sectionName:"string"==typeof s.sectionBreak?s.sectionBreak:(null===(a=s.sectionBreak)||void 0===a?void 0:a.title)||"Section",attempts:eB.attempts,requiredAttempts:eB.required,correctAnswer:eB.correctAnswer}),(0,r.jsx)(n(),{id:"5504a9a4c0409401",children:"@-webkit-keyframes glow{0%,100%{-webkit-box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50;box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50}50%{-webkit-box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50;box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50}}@-moz-keyframes glow{0%,100%{-moz-box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50;box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50}50%{-moz-box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50;box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50}}@-o-keyframes glow{0%,100%{box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50}50%{box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50}}@keyframes glow{0%,100%{-webkit-box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50;-moz-box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50;box-shadow:0 0 5px -2px#4CAF50,0 0 10px -2px#4CAF50}50%{-webkit-box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50;-moz-box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50;box-shadow:0 0 15px 5px#4CAF50,0 0 25px 5px#4CAF50}}.animate-glow{-webkit-animation:glow.7s ease-out;-moz-animation:glow.7s ease-out;-o-animation:glow.7s ease-out;animation:glow.7s ease-out;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0);will-change:box-shadow}.animate-success{-webkit-animation:success.5s ease-in-out;-moz-animation:success.5s ease-in-out;-o-animation:success.5s ease-in-out;animation:success.5s ease-in-out}.animate-error{-webkit-animation:error.5s ease-in-out;-moz-animation:error.5s ease-in-out;-o-animation:error.5s ease-in-out;animation:error.5s ease-in-out}@-webkit-keyframes success{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-moz-keyframes success{0%{-moz-transform:scale(1);transform:scale(1)}50%{-moz-transform:scale(1.1);transform:scale(1.1)}100%{-moz-transform:scale(1);transform:scale(1)}}@-o-keyframes success{0%{-o-transform:scale(1);transform:scale(1)}50%{-o-transform:scale(1.1);transform:scale(1.1)}100%{-o-transform:scale(1);transform:scale(1)}}@keyframes success{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-webkit-keyframes error{0%,100%{-webkit-transform:translatex(0);transform:translatex(0)}25%{-webkit-transform:translatex(-5px);transform:translatex(-5px)}75%{-webkit-transform:translatex(5px);transform:translatex(5px)}}@-moz-keyframes error{0%,100%{-moz-transform:translatex(0);transform:translatex(0)}25%{-moz-transform:translatex(-5px);transform:translatex(-5px)}75%{-moz-transform:translatex(5px);transform:translatex(5px)}}@-o-keyframes error{0%,100%{-o-transform:translatex(0);transform:translatex(0)}25%{-o-transform:translatex(-5px);transform:translatex(-5px)}75%{-o-transform:translatex(5px);transform:translatex(5px)}}@keyframes error{0%,100%{-webkit-transform:translatex(0);-moz-transform:translatex(0);-o-transform:translatex(0);transform:translatex(0)}25%{-webkit-transform:translatex(-5px);-moz-transform:translatex(-5px);-o-transform:translatex(-5px);transform:translatex(-5px)}75%{-webkit-transform:translatex(5px);-moz-transform:translatex(5px);-o-transform:translatex(5px);transform:translatex(5px)}}"})]})});T.displayName="ScaleQuestComponent";let _=T},73616:(e,t,a)=>{a.d(t,{iZ:()=>o,ly:()=>n});var r=a(12115);let s="earonman_auto_advance_enabled";function n(){try{let e=window.localStorage.getItem(s);if(null===e)return!0;return"true"===e}catch(e){return!0}}function o(){let[e,t]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{t(n());let e=e=>{let a=e.detail;"boolean"==typeof a?t(a):t(n())},a=e=>{e.key===s&&t(n())};return window.addEventListener("earonman:auto-advance-changed",e),window.addEventListener("storage",a),()=>{window.removeEventListener("earonman:auto-advance-changed",e),window.removeEventListener("storage",a)}},[]),[e,e=>{t(e),function(e){try{window.localStorage.setItem(s,String(e)),window.dispatchEvent(new CustomEvent("earonman:auto-advance-changed",{detail:e}))}catch(e){}}(e)}]}}}]);

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.