1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96682],{5244:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(74217).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},13456:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(74217).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},71988:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(74217).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},81762:(e,t,r)=>{r.d(t,{$G:()=>n,SL:()=>o,lg:()=>s,mO:()=>l});let s={easy:"Easy",medium:"Medium",hard:"Hard"},a={easy:0,medium:1,hard:2},c=(e,t)=>{var r,s;return(null!=(r=a[e.difficulty])?r:99)-(null!=(s=a[t.difficulty])?s:99)||e.setNumber-t.setNumber};function l(e){return[...e].sort(c).map((e,t)=>({...e,practiceNumber:t+1}))}function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={};e.forEach(e=>{(e.sets||[]).forEach(r=>{var s;(t[s=e.topic]||(t[s]={}))["".concat(r.difficulty,"|||").concat(r.setNumber)]=r})});let r={};return Object.entries(t).forEach(e=>{let[t,s]=e;
1Object.values(s).sort(c).forEach((e,s)=>{r["".concat(t,"|||").concat(e.difficulty,"|||").concat(e.setNumber)]=s+1})}),r}function o(e,t){let{topic:r,difficulty:s,setNumber:a}=t,c=null==e?void 0:e["".concat(r,"|||").concat(s,"|||").concat(a)];return c?"Practice ".concat(c):"Set ".concat(a)}},96682:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var s=r(23804),a=r(44976),c=r(13456),l=r(5244);let n=(0,r(74217).A)("circle-minus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);var o=r(71988),d=r(56025),i=r(73962),u=r(10866),m=r(81762);function x(e){return null==e?[]:Array.isArray(e)?e.map(String):"object"==typeof e?Object.values(e).map(String):String(e).split(",").map(e=>e.trim()).filter(Boolean)}function p(e){let{label:t,text:r,selected:a,correct:n}=e;return(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border px-3 py-2 text-xs ".concat(n?"border-success/40 bg-success/10 text-foreground":a?"border-destructive/40 bg-destructive/10 text-foreground":"border-border text-muted-foreground"),children:[(0,s.jsxs)("span",{className:"font-semibold shrink-0",children:[t,"."]}),(0,s.jsx)("span",{className:"flex-1",children:r}),n&&(0,s.jsx)(c.A,{className:"w-3.5 h-3.5 text-success shrink-0",strokeWidth:1.5}),a&&!n&&(0,s.jsx)(l.A,{className:"w-3.5 h-3.5 text-destructive shrink-0",strokeWidth:1.5})]})}function h(e){var t,r,a,o;let{item:d,index:i}=e,u=d.question,m=(null==u?void 0:u.questionData)||{},h=null==d.userAnswer||""===d.userAnswer?"skipped":d.isCorrect?"correct":"wrong",b="correct"===h?c.A:"wrong"===h?l.A:n,f=x(d.userAnswer),g=x(null!=(t=d.correctAnswer)?t:m.correct_answer);return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-card/60 backdrop-blur-sm p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(b,{className:"w-4 h-4 shrink-0 ".concat("correct"===h?"text-success":"wrong"===h?"text-destructive":"text-muted-foreground"),strokeWidth:1.5}),(0,s.jsxs)("span",{className:"text-xs font-semibold text-muted-foreground",children:["Question ",i+1]})]}),m.passage&&(0,s.jsx)("div",{className:"rounded-lg border border-border bg-muted/20 p-3 text-xs text-foreground leading-relaxed whitespace-pre-wrap max-h-40 overflow-y-auto",children:m.passage}),(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:m.question_text}),Array.isArray(m.blanks)&&m.blanks.length>0?(0,s.jsx)("div",{className:"space-y-3",children:m.blanks.map(e=>{var t,r;let a="blank".concat(e.blank_number),c=null==(t=d.userAnswer)?void 0:t[a],l=null!=(r=d.correctAnswer&&d.correctAnswer[a])?r:e.correct_answer;return(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("p",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:["Blank ",e.blank_number]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:(e.options||[]).map(e=>(0,s.jsx)(p,{label:e.label,text:e.text,selected:c===e.label,correct:l===e.label},e.label))})]},a)})}):Array.isArray(m.options)&&m.options.length>0?(0,s.jsx)("div",{className:"space-y-1.5",children:m.options.map(e=>(0,s.jsx)(p,{label:e.label,text:e.text,selected:f.includes(e.label),correct:g.includes(e.label)},e.label))}):(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 text-xs",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-border p-2",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-0.5",children:"Your answer"}),(0,s.jsx)("p",{className:"font-semibold text-foreground",children:null!=(r=d.userAnswer)?r:"â"})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-border p-2",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-0.5",children:"Correct answer"}),(0,s.jsx)("p",{className:"font-semibold text-foreground",children:String(null!=(o=null!=(a=d.correctAnswer)?a:m.correct_answer)?o:"â")})]})]}),m.explanation&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed border-t border-border pt-2",children:m.explanation})]})}function b(e){var t;let{attemptId:r,onBack:c}=e,[l,n]=(0,a.useState)(null),[x,p]=(0,a.useState)(!0),[b,f]=(0,a.useState)(null),[g,j]=(0,a.useState)({});return(0,a.useEffect)(()=>{var e;let t=null==l||null==(e=l.attempt)?void 0:e.section;t&&fetch("/api/gre/questions?mode=topics§ion=".concat(t)).then(e=>e.json()).then(e=>{e.success&&j((0,m.$G)(e.topicGroups||[]))}).catch(()=>{})},[null==l||null==(t=l.attempt)?void 0:t.section]),(0,a.useEffect)(()=>
1{p(!0),f(null),fetch("/api/gre/set-attempts/".concat(r)).then(e=>e.json()).then(e=>{if(!e.success)throw Error(e.error||"Failed to load attempt");n(e)}).catch(e=>f(e.message)).finally(()=>p(!1))},[r]),(0,s.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,s.jsx)("div",{className:"sticky top-0 z-10 border-b bg-background/95 backdrop-blur-sm border-border",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 max-w-3xl px-4 mx-auto sm:px-6 h-14",children:[(0,s.jsxs)(u.$,{onClick:c,variant:"ghost",size:"sm",className:"h-8 text-xs font-semibold text-muted-foreground hover:text-foreground gap-1.5",children:[(0,s.jsx)(o.A,{className:"w-3.5 h-3.5"}),"Back"]}),l&&(0,s.jsxs)("span",{className:"text-sm font-semibold text-foreground",children:[(0,s.jsx)("span",{className:"capitalize",children:l.attempt.topic.replace(/_/g," ")})," \xb7 ",(0,m.SL)(g,l.attempt)]})]})}),(0,s.jsxs)("div",{className:"max-w-3xl px-4 py-6 mx-auto space-y-4 sm:px-6",children:[x&&(0,s.jsx)("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:(0,s.jsx)(d.A,{className:"w-5 h-5 animate-spin",strokeWidth:1.5})}),b&&(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-card/60 p-4 text-sm text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"w-4 h-4 shrink-0",strokeWidth:1.5}),b]}),l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-card/60 backdrop-blur-sm p-4 flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xl font-bold text-foreground",children:[l.attempt.score,"/",l.attempt.total," correct"]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(l.attempt.completedAt).toLocaleString()})]}),(0,s.jsxs)("p",{className:"text-2xl font-bold text-foreground",children:[l.attempt.total>0?Math.round(l.attempt.score/l.attempt.total*100):0,"%"]})]}),l.items.map((e,t)=>(0,s.jsx)(h,{item:e,index:t},e.questionId||t))]})]})]})}}}]);
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.