1import{j as e}from"./vendor-radix-Djw8bMfa.js";import{r,u as Ue,e as ze}from"./vendor-react-BosAocA3.js";import{C as k,c as S,B as $,p as J,s as oe,b as Y,f as H,M as Ve,u as Ke,a as Je,H as Ze,q as Xe,r as es,v as ss,w as ts,$ as rs}from"./index-CXNxXznd.js";import{u as as,D as ns}from"./DayNightToggle-Yfx1GYWW.js";import{P as De}from"./progress-B8SkJR97.js";import{u as ls,s as is}from"./useSpeechRecognition-BqIRTaJx.js";import{m as we,A as os}from"./vendor-motion-C9gs001o.js";import{j as Le,f as B,T as $e,a6 as cs,K as Ge,ad as ds,b0 as Me,a4 as Fe,h as qe,N as xs,am as Ye,aO as ms,bc as ps,ai as us,bd as hs,p as Q,w as Pe,ay as gs,aM as Ne,Z as fs,aU as js,b2 as bs,be as Ns,z as Re,r as be}from"./vendor-icons-CC7K3DCo.js";import{B as ye}from"./badge-BQ6rwnyo.js";import{A as ys,a as ws,b as vs,c as ks}from"./accordion-DUAmCARW.js";import{S as Ss}from"./switch-CwqKrZml.js";import{g as _s}from"./prepReport-CXNKlwmf.js";import"./vendor-supabase-DHET8n-G.js";import"./vendor-charts-C6ZjoPMk.js";import"./vendor-query-Di8qp77c.js";function Is(a){return a>=80?"text-emerald-600":a>=60?"text-yellow-600":"text-red-500"}function As(a){return a>=8?"text-emerald-600":a>=6?"text-yellow-600":"text-red-500"}const Ee=[{key:"identity",label:"Identity",icon:Me,color:"bg-purple-500"},{key:"tonality",label:"Tonality",icon:Fe,color:"bg-blue-500"},{key:"derisk",label:"Derisk",icon:qe,color:"bg-emerald-500"},{key:"actionImpact",label:"Action",icon:xs,color:"bg-amber-500"},{key:"companyIntel",label:"Company",icon:Ye,color:"bg-rose-500"}],Cs=({pillar:a,score:p})=>{const c=a.icon;return e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(c,{className:"h-3 w-3 text-muted-foreground shrink-0"}),e.jsx("div",{className:"flex gap-0.5",children:[0,1].map(v=>e.jsx("div",{className:J("h-2 w-4 rounded-sm transition-colors",v<p?a.color:"bg-muted")},v))})]})},Ts=({answers:a,questionsCount:p,gradeResult:c,grading:v,gradeError:l,onRestart:n,onRetryGrade:s})=>{const m=a.filter(i=>i.answer!=="(skipped)").length;return e.jsx(we.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},children:e.jsx(k,{className:"border-emerald-200 bg-emerald-50/50",children:e.jsxs(S,{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx(Le,{className:"h-12 w-12 text-emerald-600 mx-auto"}),e.jsx("h3",{className:"text-xl font-bold text-foreground",children:"Practice Complete!"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["You answered ",m," of ",p," questions."]})]}),v&&e.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[e.jsx(B,{className:"h-6 w-6 animate-spin text-primary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Grading your answersâ¦"})]}),l&&e.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[e.jsx($e,{className:"h-6 w-6 text-destructive"}),e.jsx("p",{className:"text-sm text-destructive",children:l}),e.jsx($,{variant:"outline",size:"sm",onClick:s,children:"Retry Grading"})]}),c&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsxs("div",{className:J("text-4xl font-bold",Is(c.overallScore)),children:[c.overallScore,"/100"]}),e.jsx(De,{value:c.overallScore,className:"h-3 max-w-xs mx-auto"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto",children:c.overallFeedback})]}),e.jsx("div",{className:"flex flex-wrap justify-center gap-3 text-[10px] text-muted-foreground",children:Ee.map(i=>{const u=i.icon;return e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"})," ",i.label]},i.key)})})]}),e.jsx("div",{className:"space-y-4 max-h-[400px] overflow-y-auto",children:a.map((i,u)=>{const f=c==null?void 0:c.grades.find(T=>T.questionIndex===u);return e.jsxs("div",{className:"border rounded-lg p-4 bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("p",{className:"text-xs font-semibold text-muted-foreground",children:["Q",u+1]}),f&&e.jsxs("span",{className:J("text-sm font-bold",As(f.score)),children:[f.score,"/10"]})]}),e.jsx("p",{className:"text-sm font-medium text-foreground",children:i.question}),e.jsx("p",{className:J("text-sm",i.answer==="(skipped)"?"italic text-muted-foreground":"text-foreground"),children:i.answer}),(f==null?void 0:f.pillarScores)&&e.jsx("div",{className:"flex flex-wrap gap-3 pt-2 border-t",children:Ee.map(T=>e.jsx(Cs,{pillar:T,score:f.pillarScores[T.key]},T.key))}),f&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 pt-2 border-t",children:[e.jsxs("div",{className:"flex items-start gap-1.5",children:[e.jsx(cs,{className:"h-3.5 w-3.5 text-emerald-500 mt-0.5 shrink-0"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:f.strength})]}),e.jsxs("div",{className:"flex items-start gap-1.5",children:[e.jsx(Ge,{className:"h-3.5 w-3.5 text-amber-500 mt-0.5 shrink-0"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:f.improvement})]})]})]},u)})}),e.jsxs($,{onClick:n,variant:"emerald",className:"w-full",children:[e.jsx(ds,{className:"h-4 w-4 mr-2"})," Practice Again"]})]})})})},Ps=["Tell me about yourself.","Why are you interested in this role?","What is your greatest strength?","Describe a time you overcame a challenge at work.","Where do you see yourself in five years?","Why are you leaving your current position?","Tell me about a time you showed leadership.","How do you handle conflict with a coworker?","What is your biggest weakness?","Do you have any questions for us?"],Rs=({questions:a=Ps,jobDescription:p,applicationId:c,jobTitle:v,companyName:l,candidateName:n,onComplete:s})=>{const[m,i]=r.useState(0),[u,f]=r.useState([]),[T,D]=r.useState(!1),[Z,d]=r.useState(!1),[j,P]=r.useState(null),[G,re]=r.useState(null),[M,X]=r.useState(!1),[W,ee]=r.useState(null),R=r.useRef(null),ce=[v,l,n].filter(
1Boolean).join(", ")||void 0,{isListening:E,transcript:L,start:de,stop:_,reset:h,isSupported:U,error:F}=ls({keyterm:ce}),N=a[m],se=m/a.length*100,te=r.useCallback(async b=>{d(!0),re(null);try{const{data:y,error:I}=await oe.functions.invoke("grade-interview-answers",{body:{answers:b,jobDescription:p,applicationId:c}});if(I)throw I;P(y)}catch(y){console.error("Grading failed:",y),re("Could not grade your answers. You can retry or practice again.")}finally{d(!1)}},[p,c]),z=r.useCallback(b=>{D(!0),s==null||s(b),te(b)},[s,te]),ae=r.useCallback(()=>{_();const b=L.trim(),y={question:N,answer:b},I=[...u,y];f(I),h(),m+1>=a.length?z(I):i(me=>me+1)},[_,L,N,u,m,a.length,h,z]),x=r.useCallback(()=>{_();const b={question:N,answer:"(skipped)"},y=[...u,b];f(y),h(),m+1>=a.length?z(y):i(I=>I+1)},[_,N,u,m,a.length,h,z]),ge=r.useCallback(()=>{h(),i(0),f([]),D(!1),P(null),re(null)},[h]);r.useEffect(()=>()=>{R.current&&(R.current.pause(),R.current=null)},[m]);const xe=r.useCallback(async()=>{if(ee(null),R.current&&!R.current.paused){R.current.pause(),R.current=null,X(!1);return}X(!0);try{const b=await is(N),y=URL.createObjectURL(b),I=new Audio(y);R.current=I,I.addEventListener("ended",()=>{URL.revokeObjectURL(y),R.current=null,X(!1)},{once:!0}),await I.play()}catch(b){console.error("TTS playback failed:",b),ee((b==null?void 0:b.message)||"Could not play question audio."),X(!1),R.current=null}},[N]);return U?T?e.jsx(Ts,{answers:u,questionsCount:a.length,gradeResult:j,grading:Z,gradeError:G,onRestart:ge,onRetryGrade:()=>te(u)}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{children:["Question ",m+1," of ",a.length]}),e.jsxs("span",{children:[Math.round(se),"%"]})]}),e.jsx(De,{value:se,className:"h-2"})]}),e.jsx(os,{mode:"wait",children:e.jsx(we.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},exit:{opacity:0,x:-30},transition:{duration:.25},children:e.jsx(k,{className:"border-primary/20 bg-primary/5",children:e.jsxs(S,{className:"p-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("p",{className:"text-lg font-semibold text-foreground leading-relaxed flex-1",children:N}),e.jsx($,{variant:"ghost",size:"sm",onClick:xe,disabled:E,className:"shrink-0 -mt-1 -mr-2","aria-label":M?"Stop audio":"Hear the question",title:M?"Stop audio":"Hear the question",children:M?e.jsx(B,{className:"h-4 w-4 animate-spin"}):e.jsx(ps,{className:"h-4 w-4"})})]}),W&&e.jsx("p",{className:"text-xs text-destructive mt-2",children:W})]})})},m)}),e.jsx(k,{className:"min-h-[120px]",children:e.jsx(S,{className:"p-4",children:L?e.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-wrap",children:L}):e.jsx("p",{className:"text-sm text-muted-foreground italic",children:E?"Listening⦠speak your answer":"Tap the mic to start recording your answer"})})}),F&&e.jsx("p",{className:"text-xs text-destructive text-center",children:F}),e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsxs($,{variant:"outline",size:"sm",onClick:x,disabled:E,children:[e.jsx(us,{className:"h-4 w-4 mr-1"})," Skip"]}),e.jsxs("button",{onClick:E?_:de,className:J("relative h-16 w-16 rounded-full flex items-center justify-center transition-all shadow-lg",E?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90"),children:[E&&e.jsx("span",{className:"absolute inset-0 rounded-full animate-ping bg-destructive/30"}),E?e.jsx(hs,{className:"h-6 w-6 relative z-10"}):e.jsx(Q,{className:"h-6 w-6"})]}),e.jsxs($,{variant:"emerald",size:"sm",onClick:ae,disabled:!L.trim(),children:[e.jsx(Le,{className:"h-4 w-4 mr-1"})," Next"]})]})]}):e.jsx(k,{className:"border-destructive/30 bg-destructive/5",children:e.jsxs(S,{className:"p-6 text-center space-y-3",children:[e.jsx(ms,{className:"h-10 w-10 text-destructive mx-auto"}),e.jsx("p",{className:"text-sm text-destructive font-medium",children:"Your browser doesn't support microphone recording. Please try Chrome, Edge, or Safari."})]})})},Es={behavioral:"bg-blue-100 text-blue-700 border-blue-200",technical:"bg-purple-100 text-purple-700 border-purple-200",situational:"bg-amber-100 text-amber-700 border-amber-200",motivation:"bg-emerald-100 text-emerald-700 border-emerald-200",closing:"bg-rose-100 text-rose-700 border-rose-200"},Os=({report:a,companyName:p,jobTitle:c,onPracticeQuestion:v})=>{const{reportSections:l}=a;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-center space-y-1",children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Your Interview Game Plan"}),e.jsxs("p",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:c})," at"," ",e.jsx("span",{className:"font-medium text-foreground",children:p})]})]}),l.openingStatement&&e.jsxs(k,{className:"border-primary/30 bg-primary/5",children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{
1className:"flex items-center gap-2 text-base",children:[e.jsx(Q,{className:"h-5 w-5 text-primary"}),"Your Opening Statement"]})}),e.jsxs(S,{children:[e.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:l.openingStatement}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"25-30 seconds ⢠Conversational tone ⢠Ends with why THIS role"})]})]}),l.answerFramework&&e.jsxs(k,{children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{className:"flex items-center gap-2 text-base",children:[e.jsx(Pe,{className:"h-5 w-5 text-primary"}),"Answer Method: ",l.answerFramework.method]})}),e.jsx(S,{children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"border rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"ðª HOOK"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.answerFramework.hookRule})]}),e.jsxs("div",{className:"border rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"ð¡ LESSON"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.answerFramework.lessonRule})]}),e.jsxs("div",{className:"border rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"ð¯ APPLICATION"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.answerFramework.applicationRule})]}),e.jsxs("div",{className:"border rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"â CLOSING QUESTION"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.answerFramework.closingQuestionRule})]})]})})]}),e.jsxs(k,{children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{className:"flex items-center gap-2 text-base",children:[e.jsx(gs,{className:"h-5 w-5 text-primary"}),"What They're Looking For"]})}),e.jsxs(S,{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:l.roleAnalysis.whatTheyWant}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"KEY REQUIREMENTS"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:l.roleAnalysis.keyRequirements.map((n,s)=>e.jsx(ye,{variant:"outline",className:"text-xs",children:n},s))})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3",children:[e.jsxs("p",{className:"text-xs font-medium text-amber-700 mb-1 flex items-center gap-1",children:[e.jsx(Me,{className:"h-3 w-3"})," Hidden Signals"]}),e.jsx("p",{className:"text-sm text-amber-800",children:l.roleAnalysis.hiddenSignals})]})]})]}),e.jsxs(k,{children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{className:"flex items-center gap-2 text-base",children:[e.jsx(qe,{className:"h-5 w-5 text-emerald-600"}),"Your Positioning"]})}),e.jsxs(S,{className:"space-y-4",children:[e.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"LEAD NARRATIVE"}),e.jsx("p",{className:"text-sm text-foreground",children:l.yourPositioning.leadNarrative})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"PROOF POINTS TO DEPLOY"}),e.jsx("div",{className:"space-y-3",children:l.yourPositioning.proofPoints.map((n,s)=>e.jsxs("div",{className:"border rounded-lg p-3 space-y-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:n.claim}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"Evidence:"})," ",n.evidence]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"Deploy when:"})," ",n.when]})]},s))})]}),e.jsxs("div",{className:"bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-emerald-700 mb-1",children:"YOUR UNIQUE ANGLE"}),e.jsx("p",{className:"text-sm text-emerald-800",children:l.yourPositioning.uniqueAngle})]})]})]}),e.jsxs(k,{children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{
1className:"flex items-center gap-2 text-base",children:[e.jsx(Ne,{className:"h-5 w-5 text-purple-600"}),"Question Bank (",l.questionBank.length," questions)"]})}),e.jsx(S,{children:e.jsx(ys,{type:"multiple",className:"space-y-2",children:l.questionBank.map((n,s)=>e.jsxs(ws,{value:`q-${s}`,className:"border rounded-lg px-3",children:[e.jsx(vs,{className:"py-3 hover:no-underline",children:e.jsxs("div",{className:"flex items-start gap-2 text-left",children:[e.jsx(ye,{variant:"outline",className:`text-[10px] shrink-0 ${Es[n.type]||""}`,children:n.type}),e.jsx("span",{className:"text-sm font-medium",children:n.question})]})}),e.jsxs(ks,{className:"pb-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"WHY THEY'LL ASK THIS"}),e.jsx("p",{className:"text-sm text-foreground",children:n.why})]}),n.hook?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-blue-700 mb-1",children:"ðª HOOK"}),e.jsxs("p",{className:"text-sm text-foreground italic",children:['"',n.hook,'"']})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-amber-700 mb-1",children:"ð¡ LESSON"}),e.jsxs("p",{className:"text-sm text-foreground italic",children:['"',n.lesson,'"']})]}),e.jsxs("div",{className:"bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-emerald-700 mb-1",children:"ð¯ APPLICATION"}),e.jsx("p",{className:"text-sm text-foreground",children:n.application})]}),n.closingQuestion&&e.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-purple-700 mb-1",children:"â CLOSING QUESTION"}),e.jsxs("p",{className:"text-sm text-foreground italic",children:['"',n.closingQuestion,'"']})]})]}):e.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"YOUR ANSWER FRAMEWORK"}),e.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:n.answerFramework})]}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-2",children:e.jsxs("p",{className:"text-xs text-red-700",children:[e.jsx("span",{className:"font-medium",children:"â ï¸ Watch out:"})," ",n.watchOut]})}),v&&e.jsxs($,{size:"sm",variant:"outline",onClick:()=>v(n.question),className:"text-xs",children:[e.jsx(Q,{className:"h-3 w-3 mr-1"})," Practice This Question"]})]})]},s))})})]}),l.redFlags.length>0&&e.jsxs(k,{children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{className:"flex items-center gap-2 text-base",children:[e.jsx($e,{className:"h-5 w-5 text-amber-600"}),"Red Flags & Mitigation"]})}),e.jsx(S,{className:"space-y-3",children:l.redFlags.map((n,s)=>e.jsxs("div",{className:"border border-amber-200 bg-amber-50/50 rounded-lg p-3 space-y-1",children:[e.jsxs("p",{className:"text-sm font-medium text-amber-800",children:["â ï¸ ",n.flag]}),e.jsxs("p",{className:"text-sm text-foreground",children:[e.jsx("span",{className:"font-medium text-emerald-700",children:"â Mitigation:"})," ",n.mitigation]})]},s))})]}),e.jsxs(k,{children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{className:"flex items-center gap-2 text-base",children:[e.jsx(Ye,{className:"h-5 w-5 text-blue-600"}),"Company Intel"]})}),e.jsxs(S,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"RESEARCH BEFORE THE INTERVIEW"}),e.jsx("ul",{className:"space-y-1",children:l.companyIntelligence.researchAngles.map((n,s)=>e.jsxs("li",{className:"text-sm text-foreground flex items-start gap-2",children:[e.jsx(Pe,{className:"h-3.5 w-3.5 text-blue-500 mt-0.5 shrink-0"}),n]},s))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"QUESTIONS TO ASK THEM"}),e.jsx("ul",{className:"space-y-1",children:l.companyIntelligence.questionsToAsk.map((n,s)=>e.jsxs("li",{className:"text-sm text-foreground flex items-start gap-2",children:[e.jsx(Fe,{className:"h-3.5 w-3.5 text-emerald-500 mt-0.5 shrink-0"}),n]},s))})]})]})]}),e.jsxs(k,{className:"border-primary/30 bg-primary/5",children:[e.jsx(Y,{className:"pb-3",children:e.jsxs(H,{
1className:"flex items-center gap-2 text-base",children:[e.jsx(fs,{className:"h-5 w-5 text-primary"}),"Game Day"]})}),e.jsxs(S,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:'OPENING PLAY â "Tell me about yourself"'}),e.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:l.gameDay.openingPlay})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-primary mb-1",children:"CLOSING PLAY"}),e.jsx("p",{className:"text-sm text-foreground",children:l.gameDay.closingPlay})]}),e.jsxs("div",{className:"bg-white/60 border rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"ð§ ENERGY NOTE"}),e.jsx("p",{className:"text-sm text-foreground",children:l.gameDay.energyNote})]})]})]})]})};function Ds(a){return a>=80?"text-emerald-600":a>=60?"text-yellow-600":"text-red-500"}const Ls={identity:"Identity Shift",tonality:"Neutral Tonality",derisk:"Derisk",actionImpact:"Action + Impact",companyIntel:"Company Intel"},$s=({applicationId:a,userId:p})=>{var D,Z;const[c,v]=r.useState([]),[l,n]=r.useState(!0);if(r.useEffect(()=>{(async()=>{n(!0);const{data:d}=await oe.from("prep_sessions").select("id, overall_score, overall_feedback, scores_per_question, session_type, created_at").eq("application_id",a).eq("client_id",p).eq("session_type","practice").order("created_at",{ascending:!0});v(d||[]),n(!1)})()},[a,p]),l)return e.jsx("div",{className:"flex justify-center py-8",children:e.jsx(B,{className:"h-5 w-5 animate-spin text-muted-foreground"})});if(c.length===0)return e.jsx(k,{className:"border-dashed",children:e.jsxs(S,{className:"p-6 text-center",children:[e.jsx(js,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"No practice sessions yet for this application."}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Complete a practice session to see your history."})]})});const s=((D=c[0])==null?void 0:D.overall_score)??0,m=((Z=c[c.length-1])==null?void 0:Z.overall_score)??0,i=m-s,u={};for(const d of c)if(d.scores_per_question){for(const j of d.scores_per_question)if(j!=null&&j.pillarScores)for(const[P,G]of Object.entries(j.pillarScores))u[P]||(u[P]={sum:0,count:0}),u[P].sum+=G,u[P].count+=1}const T=Object.entries(u).map(([d,{sum:j,count:P}])=>({key:d,avg:P>0?j/P:0})).sort((d,j)=>d.avg-j.avg).slice(0,2);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(k,{children:e.jsxs(S,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wide",children:"Practice Sessions"}),e.jsx("p",{className:"text-2xl font-bold text-foreground",children:c.length})]}),c.length>=2&&e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wide",children:"Improvement"}),e.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[i>0?e.jsx(Ge,{className:"h-4 w-4 text-emerald-500"}):i<0?e.jsx(bs,{className:"h-4 w-4 text-red-500"}):e.jsx(Ns,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("span",{className:J("text-lg font-bold",i>0?"text-emerald-600":i<0?"text-red-500":"text-muted-foreground"),children:[i>0?"+":"",i," pts"]})]}),e.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[s," â ",m]})]})]}),T.length>0&&e.jsxs("div",{className:"pt-2 border-t",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1.5",children:"Focus areas (weakest pillars):"}),e.jsx("div",{className:"flex gap-2",children:T.map(d=>e.jsxs(ye,{variant:"outline",className:"text-xs",children:[Ls[d.key]||d.key,": ",d.avg.toFixed(1),"/2"]},d.key))})]})]})}),e.jsx("div",{className:"space-y-2",children:[...c].reverse().map((d,j)=>e.jsxs("div",{className:"flex items-center justify-between border rounded-lg px-4 py-2.5 bg-background",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:["#",c.length-j]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:Ve(new Date(d.created_at),"MMM d, h:mm a")})]}),e.jsxs("span",{className:J("text-sm font-bold",Ds(d.overall_score??0)),children:[d.overall_score??"â","/100"]})]},d.id))})]})},K=new Map,Oe=8*60*1e3,et=()=>{const{user:a,loading:p,isAdmin:c}
1=Ke(),v=Ue(),l=ze(),{toast:n}=Je(),s=l.state,[m,i]=r.useState(s!=null&&s.applicationId?"setup":s!=null&&s.jobDescription?"practice":"select"),[u,f]=r.useState((s==null?void 0:s.jobDescription)||""),[T,D]=r.useState();r.useState(!1);const[Z,d]=r.useState(!1),[j,P]=r.useState((s==null?void 0:s.applicationId)||""),[G,re]=r.useState((s==null?void 0:s.jobTitle)||""),[M,X]=r.useState((s==null?void 0:s.companyName)||""),[W,ee]=r.useState([]),[R,ce]=r.useState(!0),[E,L]=r.useState(null),[de,_]=r.useState(null),[h,U]=r.useState(!1),[F,N]=r.useState([]),[se,te]=r.useState(null),[z,ae]=r.useState(Date.now()),{dayMode:x,setDayModePersist:ge}=as(),[xe,b]=r.useState(()=>{try{return localStorage.getItem("prepi_watch_think")==="1"}catch{return!1}}),y=r.useRef(xe),I=t=>{b(t),y.current=t;try{localStorage.setItem("prepi_watch_think",t?"1":"0")}catch{}},[me,pe]=r.useState([]),[ue,he]=r.useState(!1),ve=r.useRef(null);r.useEffect(()=>{var t;ue&&((t=ve.current)==null||t.scrollIntoView({behavior:"smooth",block:"end"}))},[me,ue]),r.useEffect(()=>{if(!h)return;const t=setInterval(()=>ae(Date.now()),1e3);return()=>clearInterval(t)},[h]),r.useEffect(()=>{window.scrollTo(0,0)},[m]);const ke=se?`${Math.floor((z-se)/6e4)}:${String(Math.floor((z-se)%6e4/1e3)).padStart(2,"0")}`:null;r.useState("prepare");const[He,Se]=r.useState(!1),[Be,fe]=r.useState("menu"),je=He||!!de;r.useEffect(()=>{!p&&!a&&v("/auth")},[a,p,v]),r.useEffect(()=>{a&&(async()=>{ce(!0);const{data:t}=await oe.from("job_applications").select("id, job_title, company_name, job_description_text, outcome, prep_report_generated").eq("user_id",a.id).is("archived_at",null).or("outcome.eq.interview,outcome.eq.phone_screen,outcome.eq.offer");ee(t||[]),ce(!1)})()},[a]);const _e=r.useRef(!1);r.useEffect(()=>{_e.current||s!=null&&s.jobDescription&&(s!=null&&s.applicationId||(_e.current=!0,d(!0),(async()=>{try{const{data:t,error:g}=await oe.functions.invoke("generate-interview-questions",{body:{jobDescription:s.jobDescription,questionCount:10,applicationId:s.applicationId}});if(g)throw g;t!=null&&t.questions&&D(t.questions)}catch(t){console.error("Auto-generate failed:",t),n({title:"Generation failed",description:"Using default questions instead.",variant:"destructive"})}finally{d(!1)}})()))},[]);const ne=async t=>{const{data:g}=await oe.from("prep_sessions").select("prep_report_text").eq("application_id",t).eq("session_type","report").order("created_at",{ascending:!1}).limit(1).single();if(g!=null&&g.prep_report_text)try{return JSON.parse(g.prep_report_text)}catch{return null}return null},Ie=r.useRef(!1);r.useEffect(()=>{Ie.current||s!=null&&s.applicationId&&(Ie.current=!0,(async()=>{const t=await ne(s.applicationId);t&&(_(t),Se(!0))})())},[]);const Ae=()=>{i("select"),D(void 0)},Ce=t=>{P(t.id),re(t.job_title),X(t.company_name),f(t.job_description_text||""),_(null),L(null),N([]),pe([]),Se(t.prep_report_generated),fe("menu"),i("setup"),t.prep_report_generated&&ne(t.id).then(g=>{g&&_(g)})},Qe=async()=>{const t=de||await ne(j);t&&(_(t),L(t),i("report"))},Te=async(t=!1,g)=>{const A=j;if(!A)return;const ie=K.get(A);if(ie&&Date.now()-ie.startedAt<Oe){U(!0),N([...ie.thoughts]),pe(ie.thoughts.filter((o,C,w)=>C===0||w[C-1].label!==o.label).map(o=>({label:o.label,at:o.at}))),he(y.current),te(ie.startedAt),ae(Date.now());const O=window.setInterval(async()=>{const o=K.get(A),C=await ne(A);C?(window.clearInterval(O),K.delete(A),L(C),_(C),ee(w=>w.map(q=>q.id===A?{...q,prep_report_generated:!0}:q)),U(!1),i("report"),n({title:"Your game plan is ready",description:"Read the brief, then hit Start Practice to drill the questions live."})):(!o||Date.now()-o.startedAt>Oe)&&(window.clearInterval(O),K.delete(A),U(!1),N(w=>[...w,{key:"error",label:"Stopped: this run took too long. Try again.",at:Date.now(),error:!0}]))},8e3);return}const V={startedAt:Date.now(),thoughts:[]};K.set(A,V),U(!0),N([]),pe([]),he(y.current),te(V.startedAt),ae(Date.now());try{const O=await _s(A,{force:t,onPhase:o=>{const C=V.thoughts[V.thoughts.length-1];C&&C.key===o.key?V.thoughts[V.thoughts.length-1]={key:o.key,label:o.label,at:Date.now()}:V.thoughts.push({key:o.key,label:o.label,at:Date.now()}),N(w=>{const q=w[w.length-1];return q&&q.key===o.key?[...w.slice(0,-1),{key:o.key,label:o.label,at:Date.now()}]:[...w,{key:o.key,label:o.label,at:Date.now()}]}),pe(w=>{const q=w[w.length-1];return q&&q.label===o.label?w:[...w,{label:o.label,at:Date.now()}]})}});K.delete(A),L(O),_(O),ee(o=>o.map(C=>C.id===A?{...C,prep_report_generated:!0}:C)),i("report"),n({title:"Your game plan is ready",description:"Read the brief, then hit Start Practice to drill the questions live."})}catch(O){if(K.delete(A),O!=null&&O.existing){const o=await ne(A);if(o){L(o),_(o),N([]),i("report"),n({title:"Your game plan was already saved",description:"Opened it for you. Use Rebuild if you want a fresh one."});return}}console.error("Failed to generate report:",O),N(o=>[...o,{key:"error",label:`Stopped: ${O.message}`,at:Date.now(),error:!0}]),n({title:"Game plan generation failed",description:O.message,variant:"destructive"})}finally{U(!1)}},We=t=>{D([t]),i("practice")};if(p)return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-emerald-50/30 flex items-center justify-center",children:e.jsx(B,{className:"h-8 w-8 animate-spin text-primary"})});const le=m==="select";return e.jsxs("div",{className:`flex flex-col ${le?x?"min-h-screen bg-gray-50 relative overflow-hidden":"min-h-screen bg-[#020617] relative overflow-hidden":"min-h-screen bg-gradient-to-br from-slate-50 via-white to-emerald-50/30"}`,children:[e.jsx(Ze,{}),le&&e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:`absolute top-[-10%] left-1/2 -translate-x-1/2 w-[800px] h-[500px] blur-[120px] rounded-full ${x?"bg-blue-200/40":"bg-blue-600/10"}`}),e.jsx("div",{className:`absolute bottom-[-20%] right-[-10%] w-[600px] h-[600px] blur-[100px] rounded-full ${x?"bg-indigo-200/40":"bg-indigo-900/10"}`})]}),le&&c&&e.jsx(ns,{dayMode:x,onToggle:ge}),e.jsx("main",{className:`w-full flex-1 ${le?"relative max-w-3xl mx-auto px-4 py-16":"max-w-2xl mx-auto px-4 pt-12 pb-32"}`,children:e.jsxs(we.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5},children:[le?e.jsxs("div",{className:"text-center mb-12 space-y-4",children:[e.jsxs("div",{className:`inline-flex items-center justify-center w-16 h-16 rounded-2xl mb-2 relative group border ${x?"bg-white border-gray-200 shadow-xl":"bg-slate-900 border-slate-800 shadow-2xl"}`,children:[e.jsx("div",{className:"absolute inset-0 bg-purple-500/20 blur-xl opacity-0 group-hover:opacity-100 transition-opacity rounded-2xl"}),e.jsx(Q,{className:`h-8 w-8 relative ${x?"text-purple-600":"text-purple-400"}`})]}),e.jsx("h1",{className:`text-4xl font-bold tracking-tight ${x?"text-slate-900":"text-white"}`,children:"Interview Prep"}),e.jsx("p",{className:`text-lg max-w-md mx-auto ${x?"text-slate-500":"text-slate-400"}`,children:"You already got them to say yes to a conversation. This is where you get ready to own it."})]}):m==="setup"?null:e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-purple-100 mb-4",children:e.jsx(Q,{className:"h-8 w-8 text-purple-600"})}),e.jsx("h1",{className:"text-3xl font-bold text-foreground mb-2",children:"Interview Prep"}),e.jsx("p",{className:"text-muted-foreground",children:"You got the room. Now own it."})]}),m==="select"&&e.jsx("div",{className:"space-y-8",children:R?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(B,{className:"h-6 w-6 animate-spin text-slate-500"})}):e.jsxs("div",{className:`w-full rounded-2xl overflow-hidden backdrop-blur-sm border ${x?"bg-white border-gray-200 shadow-xl":"bg-slate-900/40 border-slate-800 shadow-2xl"}`,children:[e.jsxs("div",{className:`px-6 py-4 border-b flex justify-between items-center ${x?"border-gray-100 bg-gray-50/60":"border-slate-800/50 bg-slate-900/20"}`,children:[e.jsx("span",{className:`text-xs font-semibold uppercase tracking-widest ${x?"text-slate-400":"text-slate-500"}`,children:"Active Applications"}),W.length>0&&e.jsxs("span",{className:`text-[10px] px-2 py-0.5 rounded uppercase tracking-wider border ${x?"bg-blue-50 text-blue-600 border-blue-200":"bg-blue-500/10 text-blue-400 border-blue-500/20"}`,children:[W.length," Ready"]})]}),W.length>0?e.jsx("div",{className:`divide-y ${x?"divide-gray-100":"divide-slate-800/50"}`,children:W.map(t=>{var g;return e.jsxs("div",{className:`p-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4 group transition-colors ${x?"hover:bg-gray-50":"hover:bg-white/[0.02]"}`,children:[e.jsxs("div",{className:"space-y-1.5 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("h3",{className:`text-xl font-semibold truncate ${x?"text-slate-900":"text-slate-100"}`,children:t.job_title}),e.jsx("span",{className:`px-2 py-0.5 text-[10px] font-medium rounded-md border capitalize whitespace-nowrap ${x?"bg-slate-100 text-slate-600 border-slate-200":"bg-slate-800 text-slate-300 border-slate-700"}`,children:(g=t.outcome)==null?void 0:g.replace("_"," ")})]}),e.jsx("p",{className:`text-sm truncate ${x?"text-slate-500":"text-slate-400"}`,children:t.company_name})]}),e.jsx("div",{className:"flex items-center gap-3 shrink-0",children:t.prep_report_generated?e.jsxs("button",{onClick:()=>Ce(t),className:`px-6 py-2.5 text-sm font-semibold text-white rounded-lg shadow-lg transition-all flex items-center gap-2 ${x?"bg-blue-600 hover:bg-blue-500 shadow-blue-900/20":"bg-purple-600 hover:bg-purple-500 shadow-purple-900/30"}`,children:[e.jsx(Re,{className:"w-4 h-4"}),"Open Game Plan",e.jsx(be,{className:"w-4 h-4 opacity-70"})]}):e.jsxs("button",{onClick:()=>Ce(t),className:`px-6 py-2.5 text-sm font-semibold text-white rounded-lg shadow-lg transition-all flex items-center gap-2 ${x?"bg-blue-600 hover:bg-blue-500 shadow-blue-900/20":"bg-purple-600 hover:bg-purple-500 shadow-purple-900/30"}`,children:["Build Game Plan",e.jsx(be,{className:"w-4 h-4 opacity-70"})]})})]},t.id)})}):e.jsxs("div",{className:"text-center py-10 px-6 space-y-2",children:[e.jsx("p",{className:x?"text-slate-700":"text-slate-300",children:"No applications in interview status yet."}),e.jsx("p",{className:`text-sm ${x?"text-slate-400":"text-slate-500"}`,children:"Move an application to interview status and Prep-i builds your game plan from it."})]})]})}),m==="setup"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("button",{onClick:()=>i("select"),className:"text-xs uppercase tracking-[0.2em] text-muted-foreground hover:text-foreground transition-colors py-2",children:"â Back to applications"}),e.jsxs("div",{className:"w-full border border-border bg-background shadow-[0_32px_64px_-12px_rgba(0,0,0,0.18)]",children:[e.jsx(Gs,{jobTitle:G,companyName:M}),e.jsxs("div",{className:"px-10 sm:px-12 py-12",children:[(!je||h)&&e.jsxs("label",{className:"mb-5 flex items-center gap-2.5 cursor-pointer select-none w-fit",children:[e.jsx(Ne,{className:"h-4 w-4 text-purple-600 shrink-0"}),e.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] text-foreground
1/50 whitespace-nowrap",children:"Watch Prep-i think"}),e.jsx(Ss,{checked:h?ue:xe,onCheckedChange:t=>{I(!!t),h&&he(!!t)},"aria-label":"Watch Prep-i think",className:"data-[state=checked]:bg-purple-600"})]}),!je&&!h&&F.length===0&&e.jsxs("button",{type:"button",onClick:()=>Te(),className:"group inline-flex items-center justify-center gap-3 bg-purple-950 text-purple-50 px-10 py-4 text-xs font-semibold uppercase tracking-[0.25em] hover:bg-purple-900 shadow-[0_0_20px_rgba(147,51,234,0.18)] hover:shadow-[0_0_32px_rgba(147,51,234,0.35)] transition-all",children:["Generate Interview Intel Report",e.jsx("span",{className:"inline-block transition-transform group-hover:translate-x-1",children:"â"})]}),je&&!h&&F.length===0&&(Be==="history"?e.jsxs("div",{className:"space-y-4",children:[e.jsx("button",{type:"button",onClick:()=>fe("menu"),className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground hover:text-foreground transition-colors",children:"â Back"}),a&&e.jsx($s,{applicationId:j,userId:a.id})]}):e.jsxs("div",{className:"flex flex-col items-start gap-4",children:[e.jsxs("button",{type:"button",onClick:Qe,className:"group inline-flex items-center justify-center gap-3 bg-purple-950 text-purple-50 px-10 py-4 text-xs font-semibold uppercase tracking-[0.25em] hover:bg-purple-900 shadow-[0_0_20px_rgba(147,51,234,0.18)] hover:shadow-[0_0_32px_rgba(147,51,234,0.35)] transition-all",children:["View Interview Intel Report",e.jsx("span",{className:"inline-block transition-transform group-hover:translate-x-1",children:"â"})]}),e.jsxs("button",{type:"button",onClick:()=>fe("history"),className:"pl-1 inline-flex items-center gap-2 text-xs font-medium text-foreground/60 hover:text-foreground transition-colors",children:[e.jsx(Re,{className:"h-3.5 w-3.5"}),"Session History",e.jsx(be,{className:"h-3.5 w-3.5 opacity-60"})]})]})),h&&ke&&e.jsxs("p",{className:"mb-4 text-[10px] tracking-[0.15em] text-foreground/30",children:[ke," elapsed · usually 3 to 4 minutes"]}),e.jsxs("div",{className:"space-y-2.5",children:[F.map((t,g)=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`mt-1.5 h-1.5 w-1.5 rounded-full shrink-0 ${t.error?"bg-red-500":g===F.length-1&&h?"bg-purple-500 animate-pulse shadow-[0_0_8px_rgba(168,85,247,0.6)]":"bg-emerald-500"}`}),e.jsx("p",{className:`text-sm ${t.error?"text-red-600":"text-foreground/80"}`,children:t.label})]},`${t.key}-${g}`)),F.length===0&&h&&e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground/60",children:[e.jsx(B,{className:"h-4 w-4 animate-spin"})," Opening your fileâ¦"]})]}),!h&&F.some(t=>t.error)&&e.jsx("div",{className:"mt-6",children:e.jsx($,{onClick:()=>Te(),className:"w-full sm:w-auto",children:"Try Again"})})]}),e.jsx("div",{className:"px-6 py-3 bg-muted/30 flex justify-between items-center border-t border-border",children:e.jsx("span",{className:"text-[9px] uppercase tracking-[0.2em] text-foreground/40",children:"Prep-i · Built on your discovery, your resume, your story"})})]})]}),e.jsx(Xe,{open:ue,onOpenChange:he,children:e.jsxs(es,{side:"right",className:"w-full sm:max-w-md overflow-y-auto",children:[e.jsxs(ss,{children:[e.jsxs(ts,{className:"flex items-center gap-2",children:[e.jsx(Ne,{className:"h-5 w-5 text-purple-600"}),"Watch Prep-i think"]}),e.jsx(rs,{children:"Live streaming reasoning; Your game plan written from Your story."})]}),e.jsxs("div",{className:"mt-4 space-y-2.5 pb-8",children:[me.map((t,g)=>e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"mt-1.5 h-1 w-1 rounded-full bg-purple-500/70 shrink-0"}),e.jsx("p",{className:"text-xs text-foreground/80 leading-relaxed",children:t.label})]},g)),h&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground/50 pt-1",children:[e.jsx(B,{className:"h-3 w-3 animate-spin"})," thinking"]}),e.jsx("div",{ref:ve})]})]})}),m==="practice"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx($,{variant:"ghost",size:"sm",onClick:Ae,children:"â Back to applications"}),G&&e.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:["Practicing for ",e.jsx("span",{className:"font-medium text-foreground",children:G}),M&&e.jsxs(e.Fragment,{children:[" at ",e.jsx("span",{className:"font-medium text-foreground",children:M})]})]}),Z?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[e.jsx(B,{className:"h-8 w-8 animate-spin text-primary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Generating tailored interview questionsâ¦"})]}):e.jsx(Rs,{questions:T,jobDescription:u||(s==null?void 0:s.jobDescription),applicationId:j||void 0,jobTitle:G||(s==null?void 0:s.jobTitle),companyName:M||(s==null?void 0:s.companyName)})]}),m==="report"&&E&&e.jsxs("div",{className:"space-y-4",children:[e.jsx($,{variant:"ghost",size:"sm",onClick:Ae,children:"â Back to applications"}),e.jsxs("div",{className:"border border-emerald-500/30 bg-emerald-500/5 rounded-lg p-5 flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 h-2 w-2 rounded-full bg-emerald-500 shadow-[0_0_8px_rgb(16,185,129)] shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Your game plan is ready."}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"It stays saved right here. Read the brief, then run a live practice session with Prep-i."})]})]}),e.jsxs($,{size:"sm",onClick:()=>{D(E.questions),i("practice")},className:"shrink-0 bg-purple-600 hover:bg-purple-500 text-white",children:[e.jsx(Q,{className:"h-4 w-4 mr-2"})," Start Practice"]})]}),e.jsx(Os,{report:E,companyName:M,jobTitle:G,onPracticeQuestion:We}),e.jsx("div",{className:"flex gap-3 pt-4",children:e.jsxs($,{variant:"outline",className:"flex-1 border-purple-300 text-purple-700 hover:bg-purple-50 hover:text-purple-800",onClick:()=>{D(E.questions),i("practice")},children:[e.jsx(Q,{className:"h-4 w-4 mr-2"})," Practice All Questions"]})})]})]})})]})}
1,Gs=({jobTitle:a,companyName:p})=>e.jsxs("div",{className:"p-10 sm:p-12 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(Q,{className:"w-4 h-4 text-foreground/40",strokeWidth:1.5}),e.jsx("span",{className:"text-[10px] uppercase tracking-[0.3em] font-medium text-foreground/40",children:"Prep-i Protocol"})]}),e.jsx("h1",{className:"text-4xl sm:text-5xl text-foreground leading-tight",style:{fontFamily:"'Instrument Serif', 'Times New Roman', serif"},children:a||p?e.jsxs(e.Fragment,{children:["Preparing for"," ",a&&e.jsx("span",{className:"italic",children:a}),a&&p&&" at ",p&&e.jsx("span",{className:"italic",children:p})]}):e.jsxs(e.Fragment,{children:["Your ",e.jsx("span",{className:"italic",children:"war room"}),"."]})})]});export{et 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.