PageSourceSearch

https://reading-doctor.base44.app/assets/GreekLatinRoots-NDJn_zwG.js

js reading-doctor.base44.app collected 2026-10-03 03:08:34 UTC 9,861 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/saveGameResult-DEDGhF6x.js","assets/index-CgRBJ9tn.js","assets/index-CJZWJQqj.css"])))=>i.map(i=>d[i]);
2import{r as i,t as W,R as L,u as E,a as F,v as I,a7 as O,w as v,j as o,k as Q,l as K,x as U,y as B,D as H,F as T,C as z,m as h,H as J,X as V,J as X,K as Z,N as $,_ as Y,b as oo}from"./index-CgRBJ9tn.js";import{e as to}from"./distractorExplanations-DNpz82Pm.js";import{u as eo,D as ro}from"./useReadAloudHold-M23k3vMw.js";const ao=[{id:"gr_u_bene",word:"benefit",root:"bene",meaning:"good",options:["good","bad","before","self"]},{id:"gr_u_mal",word:"malfunction",root:"mal",meaning:"bad",options:["bad","good","big","small"]},{id:"gr_u_cred",word:"credible",root:"cred",meaning:"to believe",options:["to believe","to see","to send","to build"]},{id:"gr_u_vid",word:"evidence",root:"vid",meaning:"to see",options:["to see","to say","to break","to hold"]},{id:"gr_u_viv",word:"survive",root:"viv",meaning:"to live",options:["to live","to sleep","to travel","to speak"]},{id:"gr_u_mort",word:"mortal",root:"mort",meaning:"death",options:["death","life","time","place"]},{id:"gr_u_ten",word:"tenant",root:"ten",meaning:"to hold",options:["to hold","to throw","to see","to write"]},{id:"gr_u_vert",word:"convert",root:"vert",meaning:"to turn",options:["to turn","to break","to carry","to build"]},{id:"gr_u_duc",word:"conduct",root:"duc",meaning:"to lead",options:["to lead","to follow","to push","to hear"]},{id:"gr_u_pel",word:"repel",root:"pel",meaning:"to drive",options:["to drive","to pull","to look","to send"]},{id:"gr_u_pos",word:"position",root:"pos",meaning:"to place",options:["to place","to move","to break","to hold"]},{id:"gr_u_sub",word:"submarine",root:"sub",meaning:"under",options:["under","over","between","beside"]},{id:"gr_u_inter",word:"interrupt",root:"inter",meaning:"between",options:["between","under","against","across"]},{id:"gr_u_trans",word:"transport",root:"trans",meaning:"across",options:["across","under","between","through"]},{id:"gr_u_anti",word:"antibiotic",root:"anti",meaning:"against",options:["against","with","before","after"]},{id:"gr_u_astro",word:"astronomy",root:"astro",meaning:"star",options:["star","moon","sea","sky"]},{id:"gr_u_mar",word:"marine",root:"mar",meaning:"sea",options:["sea","land","mountain","sky"]},{id:"gr_u_omni",word:"omnivore",root:"omni",meaning:"all",options:["all","one","few","none"]},{id:"gr_u_vol",word:"volunteer",root:"vol",meaning:"will or wish",options:["will or wish","voice","turn","life"]},{id:"gr_u_ver",word:"verify",root:"ver",meaning:"truth",options:["truth","life","time","sight"]}],io=[{id:"gr_tele",word:"telephone",root:"tele",meaning:"far",options:["far","sound","small","light"]},{id:"gr_micro",word:"microscope",root:"micro",meaning:"small",options:["far","sound","small","light"]},{id:"gr_bi",word:"bicycle",root:"bi",meaning:"two",options:["one","two","three","many"]},{id:"gr_auto",word:"autobiography",root:"auto",meaning:"self",options:["book","life","self","write"]},{id:"gr_photo",word:"photograph",root:"photo",meaning:"light",options:["far","sound","small","light"]},{id:"gr_tri",word:"tricycle",root:"tri",meaning:"three",options:["one","two","three","many"]},{id:"gr_geo",word:"geography",root:"geo",meaning:"earth",options:["earth","write","study","life"]},{id:"gr_port",word:"portable",root:"port",meaning:"carry",options:["carry","write","see","hear"]},{id:"gr_aqua",word:"aquarium",root:"aqua",meaning:"water",options:["water","air","fire","earth"]},{id:"gr_bio",word:"biology",root:"bio",meaning:"life",options:["study","life","book","earth"]},{id:"gr_phon",word:"microphone",root:"phon",meaning:"sound",options:["sound","light","water","earth"]},{id:"gr_chron",word:"chronology",root:"chron",meaning:"time",options:["time","place","light","sound"]},{id:"gr_dict",word:"dictation",root:"dict",meaning:"to say",options:["to say","to write","to run","to see"]},{id:"gr_ject",word:"eject",root:"ject",meaning:"to throw",options:["to throw","to eat","to build","to see"]},{id:"gr_tract",word:"tractor",root:"tract",meaning:"pull",options:["pull","push","build","break"]},{id:"gr_struct",word:"structure",root:"struct",meaning:"to build",options:["to build","to break","to read","to hear"]},{id:"gr_vis",word:"visible",root:"vis",meaning:"to see",options:["to see","to hear","to run","to fly"]},{id:"gr_aud",word:"audience",root:"aud",meaning:"to hear",options:["to hear","to see","to write","to run"]},{id:"gr_script",word:"manuscript",root:"script",meaning:"to write",options:["to write","to read","to build","to carry"]},{id:"gr_meter",word:"thermometer",root:"meter",meaning:"to measure",options:["to measure","to build","to read","to carry"]},{id:"gr_hydro",word:"hydrogen",root:"hydro",meaning:"water",options:["water","fire","air","earth"]},{id:"gr_thermo",word:"thermostat",root:"thermo",meaning:"heat",options:["heat","cold","light","water"]},{id:"gr_path",word:"sympathy",root:"path",meaning:"feeling",options:["feeling","running","building","writing"]},{id:"gr_nov",word:"novice",root:"nov",meaning:"new",options:["new","old","big","small"]},{id:"gr_spect",word:"inspect",root:"spect",meaning:"to look",options:["to look","to run","to eat","to build"]},{id:"gr_form",word:"transform",root:"form",meaning:"shape",options:["shape","color","sound","size"]},{id:"gr_rupt",word:"erupt",root:"rupt",meaning:"to break",options:["to break","to build","to read","to fly"]},{id:"gr_mit",word:"transmit",root:"mit",meaning:"to send",options:["to send","to read","to build","to break"]},{id:"gr_ped",word:"pedal",root:"ped",meaning:"foot",options:["foot","hand","head","arm"]},{id:"gr_man",word:"manual",root:"man",meaning:"hand",options:["hand","foot","eye","ear"]}],no=10;function mo(){const{scheduleAdvance:j,handleSpeakingChange:k}=eo(),[d,w]=i.useState(0),[n,_]=i.useState(0),[s,l]=i.useState(null),[b,m]=i.useState(null),[N,f]=i.useState(!1),g=W(),u=L.useRef(!1),[C,R]=i.useState(0),x=E(),{data:A=[]}=F({queryKey:["students"],queryFn:()=>oo.entities.Student.list("-created_date"),initialData:[]}),t=A[0],c=I(t==null?void 0:t.grade),D=(t==null?void 0:t.grade)>=4?ao:io,p=i.useMemo(()=>O(D,{studentId:t==null?void 0:t.id,gameType:"greek_latin_roots",count:no}),[t==null?void 0:t.id,t==null?void 0:t.grade,C]),r=p[d],P=v({mutationFn:e=>Y(()=>import("./saveGameResult-DEDGhF6x.js"),__vite__mapDeps([0,1,2])).then(a=>a.saveGameResult(e)),onSuccess:()=>x.invalidateQueries({queryKey:["scores"]})}),q=v({mutationFn:async()=>{},onSuccess:()=>x.invalidateQueries({queryKey:["students"]})}),G=e=>{const a=e===r.meaning;if(g.recordAnswer(a),a){const M=Math.round(10*c.getDifficultyMultiplier());_(n+M),l("correct"),c.recordAttempt(!0,1e3)}else l("incorrect"),m({chosen:e,explanation:to({chosen:e,correct:r.meaning,context:"root_meaning",variant:r.root})}),c.recordAttempt(!1,1e3);j(()=>{d===p.length-1?y():(w(d+1),g.markQuestionShown(),l(null),m(null))},a?1500:4500)},y=async()=>
2{if(u.current)return;u.current=!0;const e=n+(s==="correct"?10:0),a=e>=80?3:e>=60?2:1;t&&(await P.mutateAsync({student_id:t.id,game_type:"greek_latin_roots",score:e,stars:a,grade_level:t.grade,time_taken:0}),await q.mutateAsync({id:t.id,data:{total_stars:(t.total_stars||0)+a,games_completed:(t.games_completed||0)+1}})),f(!0)},S=()=>{u.current=!1,R(e=>e+1),w(0),_(0),l(null),m(null),f(!1)};return o.jsx("div",{className:"min-h-screen p-4 md:p-8",children:o.jsxs("div",{className:"max-w-4xl mx-auto",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsx(Q,{to:K("AllGames"),onClick:e=>{var a;((a=window.history.state)==null?void 0:a.idx)>0&&(e.preventDefault(),window.history.back())},children:o.jsxs(U,{variant:"outline",size:"lg",children:[o.jsx(B,{className:"w-5 h-5 mr-2"}),"Back"]})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(H,{difficulty:c.difficulty}),o.jsxs("div",{className:"flex items-center gap-4 bg-white rounded-full px-6 py-3 shadow-lg",children:[o.jsx(T,{className:"w-6 h-6 text-yellow-500"}),o.jsx("span",{className:"text-2xl font-bold text-gray-900",children:n})]})]})]}),o.jsxs(z,{className:"p-8 bg-white/90 backdrop-blur-sm border-4 border-white shadow-xl",children:[o.jsx("h1",{className:"text-4xl font-black text-center text-transparent bg-clip-text bg-gradient-to-r from-amber-600 to-orange-400 mb-2",children:"Greek & Latin Roots"}),o.jsxs("p",{className:"text-center text-xl text-gray-700 mb-8",children:["What does the root mean? ",d+1,"/",p.length]}),o.jsxs("div",{className:"text-center mb-6",children:[o.jsx("p",{className:"text-5xl font-bold text-gray-800 mb-2",children:r.word}),o.jsxs("p",{className:"text-xl text-amber-600",children:["Root: ",o.jsx("span",{className:"font-bold",children:r.root})]})]}),s==="correct"&&o.jsxs(h.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center justify-center gap-2 mb-6 text-green-600",children:[o.jsx(J,{className:"w-8 h-8"}),o.jsxs("span",{className:"text-2xl font-bold",children:['Correct! "',r.root,'" means ',r.meaning,"!"]})]}),s==="incorrect"&&o.jsxs(h.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center justify-center gap-2 mb-6 text-red-600",children:[o.jsx(V,{className:"w-8 h-8"}),o.jsxs("span",{className:"text-2xl font-bold",children:['"',r.root,'" means: ',r.meaning]})]}),s==="incorrect"&&b&&o.jsx(ro,{items:[b],question:`Which word uses the root "${r.word}"?`,className:"mb-6",onSpeakingChange:k}),!s&&o.jsx("div",{className:"grid grid-cols-2 gap-4",children:r.options.map(e=>o.jsx(h.button,{whileHover:{scale:1.03},whileTap:{scale:.97},onClick:()=>G(e),className:"p-5 rounded-2xl text-2xl font-bold bg-gradient-to-br from-amber-400 to-orange-500 text-white shadow-lg",children:e},e))})]}),o.jsxs(X,{children:[o.jsx(Z,{watch:g,onWrapUp:()=>y()}),N&&o.jsx($,{stars:n>=80?3:n>=60?2:1,score:n,onPlayAgain:S})]})]})})}export{mo 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.