PageSourceSearch

https://quarrion.ai/_next/static/chunks/3946.f264dfe3e9ccd25a.js

js quarrion.ai collected 2026-10-02 01:13:30 UTC 25,617 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3946],{8533:(e,t,a)=>{a.d(t,{O0:()=>n,Qv:()=>l,T3:()=>d,k8:()=>o,u8:()=>i});var r=a(54568),s=a(67908);function n(e){let{className:t,lines:a=3}=e;return(0,r.jsxs)("div",{className:(0,s.cn)("animate-pulse space-y-3",t),role:"status","aria-label":"Loading",children:[Array.from({length:a},(e,t)=>(0,r.jsx)("div",{className:(0,s.cn)("h-4 rounded bg-muted",t===a-1?"w-2/3":"w-full")},t)),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}function l(e){let{count:t=1}=e;return(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",role:"status","aria-label":"Loading cards",children:[Array.from({length:t},(e,t)=>(0,r.jsxs)("div",{className:"animate-pulse rounded-xl border border-border bg-card p-6",children:[(0,r.jsx)("div",{className:"mb-3 h-4 w-1/2 rounded bg-muted"}),(0,r.jsx)("div",{className:"h-8 w-1/3 rounded bg-muted"})]},t)),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}function i(){return(0,r.jsxs)("div",{className:"animate-pulse space-y-4",role:"status","aria-label":"Loading chart",children:[(0,r.jsx)("div",{className:"flex items-end gap-2",style:{height:"200px"},children:[40,65,50,80,55,70,45].map((e,t)=>(0,r.jsx)("div",{className:"flex-1 rounded-t bg-muted",style:{height:"".concat(e,"%")}},t))}),(0,r.jsx)("div",{className:"flex justify-between",children:[1,2,3,4,5,6,7].map(e=>(0,r.jsx)("div",{className:"h-3 w-8 rounded bg-muted/60"},e))}),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}function d(){return(0,r.jsxs)("div",{className:"flex gap-4 overflow-x-auto pb-4",role:"status","aria-label":"Loading kanban board",children:[[1,2,3,4,5].map(e=>(0,r.jsxs)("div",{className:"w-72 shrink-0 animate-pulse rounded-lg bg-muted/50 p-3",children:[(0,r.jsx)("div",{className:"mb-3 h-5 w-24 rounded bg-muted"}),[1,2,3].map(e=>(0,r.jsxs)("div",{className:"mb-2 rounded-lg border border-border bg-card p-3 space-y-2",children:[(0,r.jsx)("div",{className:"h-4 w-3/4 rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-1/2 rounded bg-muted/60"})]},e))]},e)),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}function o(){return(0,r.jsxs)("div",{className:"animate-pulse space-y-6",role:"status","aria-label":"Loading job details",children:[(0,r.jsx)("div",{className:"h-8 w-16 rounded bg-muted"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"h-7 w-2/3 rounded bg-muted"}),(0,r.jsx)("div",{className:"h-4 w-1/3 rounded bg-muted/60"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("div",{className:"h-6 w-20 rounded-full bg-muted"}),(0,r.jsx)("div",{className:"h-6 w-24 rounded-full bg-muted"}),(0,r.jsx)("div",{className:"h-6 w-16 rounded-full bg-muted"})]}),(0,r.jsx)("div",{className:"flex gap-4 border-b border-border pb-2",children:[1,2,3,4].map(e=>(0,r.jsx)("div",{className:"h-4 w-20 rounded bg-muted"},e))}),[1,2,3,4].map(e=>(0,r.jsx)("div",{className:(0,s.cn)("h-4 rounded bg-muted",4===e?"w-1/2":"w-full")},e)),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]})}},14486:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(92068).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},20415:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(92068).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},29255:(e,t,a)=>{a.d(t,{pq:()=>o,cj:()=>d});var r=a(27736),s=a(4869),n=a(81562),l=a(20855),i=a(66597);function d(e){return(0,r.I)({queryKey:["interview-prep",e],queryFn:()=>(0,i.Em)("/api/interview-prep/".concat(encodeURIComponent(e))),enabled:!!e,staleTime:6e4})}function o(){let e=(0,s.jE)(),t=(0,l.Zp)();return(0,n.n)({mutationFn:e=>(function(e){let t=new AbortController,a=setTimeout(()=>t.abort(),12e4);return(0,i.Em)("/api/interview-prep/".concat(encodeURIComponent(e)),{method:"POST",signal:t.signal}).finally(()=>clearTimeout(a))})(e),onSuccess:(a,r)=>{e.invalidateQueries({queryKey:["interview-prep",r]}),t("/interview-prep/".concat(r))},onError:e=>{console.error("Failed to generate interview prep:",e)}})}},31478:(e,t,a)=>{function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GBP";return new Intl.NumberFormat("en-GB",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GBP",a=d(t);return Math.abs(e)>=1e3?"".concat(a).concat(Math.round(e/1e3),"k"):"".concat(a).concat(e.toLocaleStr
1ing())}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GBP",a=d(t),r=Math.abs(e);if(r>=1e5)return"".concat(a).concat(Math.round(e/1e3),"k");if(r>=1e3){let t=(e/1e3).toFixed(1).replace(/\.0$/,"");return"".concat(a).concat(t,"k")}return"".concat(a).concat(e.toLocaleString())}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GBP";return"".concat(e<0?"-":"+").concat(n(Math.abs(e),t))}a.d(t,{CY:()=>c,HA:()=>n,Yo:()=>s,dT:()=>l,v9:()=>o,vv:()=>r});let i=new Map;function d(e){var t,a;let r=i.get(e);if(r)return r;let s=null!=(a=null==(t=new Intl.NumberFormat("en",{style:"currency",currency:e}).formatToParts(0).find(e=>"currency"===e.type))?void 0:t.value)?a:e;return i.set(e,s),s}function o(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GBP";return"".concat(r(e,a)," - ").concat(r(t,a))}function c(e,t,a){let r=(t||"USD").toUpperCase(),s=null==a?void 0:a[r];return"number"!=typeof s||!Number.isFinite(s)||s<=0?{amount:e,currency:"USD"}:{amount:e*s,currency:r}}},40209:(e,t,a)=>{a.d(t,{E:()=>l});var r=a(54568),s=a(67908);let n={default:"bg-gray-100 dark:bg-gray-700/50 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-400",warning:"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-400",danger:"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-400",info:"bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-400"};function l(e){let{children:t,variant:a="default",className:l}=e;return(0,r.jsx)("span",{className:(0,s.cn)("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",n[a],l),children:t})}},41385:(e,t,a)=>{a.d(t,{W:()=>i});var r=a(54568),s=a(28653),n=a(45234),l=a(67908);function i(e){let{message:t="Something went wrong. Please try again.",onRetry:a,className:i}=e;return(0,r.jsxs)("div",{className:(0,l.cn)("flex flex-col items-center justify-center rounded-lg border border-red-200 bg-red-50 p-8 dark:border-red-800 dark:bg-red-950/30",i),role:"alert",children:[(0,r.jsx)(s.A,{className:"mb-3 h-10 w-10 text-red-400 dark:text-red-400"}),(0,r.jsx)("p",{className:"mb-4 text-sm text-red-700 dark:text-red-300",children:t}),a&&(0,r.jsxs)("button",{onClick:a,className:"inline-flex items-center gap-2 rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:bg-red-700 dark:hover:bg-red-600",type:"button",children:[(0,r.jsx)(n.A,{className:"h-4 w-4"}),"Retry"]})]})}},60091:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(92068).A)("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]])},70783:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(92068).A)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},77738:(e,t,a)=>{a.d(t,{p:()=>i});var r=a(54568),s=a(27534),n=a(96886),l=a(67908);function i(e){let{title:t,description:a,icon:i=s.A,illustration:d,className:o,action:c}=e;return(0,r.jsxs)(n.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"},className:(0,l.cn)("flex flex-col items-center justify-center py-12",o),children:[d?(0,r.jsx)("img",{src:d,alt:"",className:"mb-6 h-32 w-32 object-contain",style:{animation:"float-bob 4s ease-in-out infinite"}}):(0,r.jsx)("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-muted/50",children:(0,r.jsx)(i,{className:"h-8 w-8 text-muted-foreground/50"})}),(0,r.jsx)("h3",{className:"text-sm font-medium text-foreground",children:t}),a&&(0,r.jsx)("p",{className:"mt-1 max-w-xs text-center text-sm text-muted-foreground",children:a}),c&&(0,r.jsx)("div",{className:"mt-4",children:c})]})}},85973:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(92068).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},96232:(e,t,a)=>{a.d(t,{Q:()=>P});var r=a(54568),s=a(7620),n=a(40209),l=a(77738);let i=(0,a(92068).A)("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);var d=a(12598),o=a(85973),c=a(14486),m=a(31587),u=a(67908);function x(e){let{question:t,suggestedAnswer:a,category:l,onFlip:i}
1=e,[d,o]=(0,s.useState)(!1),c=()=>{o(e=>!e),d||null==i||i()};return(0,r.jsxs)("div",{className:"relative min-h-[250px] cursor-pointer select-none",onClick:c,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},role:"button",tabIndex:0,"aria-label":d?"Show question":"Show answer",children:[(0,r.jsx)("div",{className:(0,u.cn)("absolute inset-0 rounded-xl border-2 p-6 shadow-lg transition-all duration-500 backface-hidden",d?"border-brand-300 bg-brand-50 rotate-y-180 dark:border-brand-700 dark:bg-brand-950":"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800"),style:{transform:d?"rotateY(180deg)":"rotateY(0deg)",backfaceVisibility:"hidden"},children:(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[(0,r.jsx)(n.E,{variant:"info",className:"mb-4",children:l}),(0,r.jsx)("p",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:t}),(0,r.jsx)("p",{className:"mt-6 text-xs text-gray-400 dark:text-gray-500",children:"Click to reveal answer"})]})}),(0,r.jsx)("div",{className:(0,u.cn)("absolute inset-0 rounded-xl border-2 border-brand-300 bg-brand-50 p-6 shadow-lg transition-all duration-500 backface-hidden dark:border-brand-700 dark:bg-brand-950"),style:{transform:d?"rotateY(0deg)":"rotateY(-180deg)",backfaceVisibility:"hidden"},children:(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(n.E,{variant:"info",children:l}),(0,r.jsx)(m.A,{className:"h-4 w-4 text-gray-400 dark:text-gray-500"})]}),(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"mb-2 text-xs font-medium text-gray-500 dark:text-gray-400",children:"Suggested Answer"}),(0,r.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-300",children:null!=a?a:"No suggested answer provided."})]})}),(0,r.jsx)("p",{className:"text-center text-xs text-gray-400 dark:text-gray-500",children:"Click to flip back"})]})})]})}function g(e){let{current:t,total:a,drilled:s}=e,n=a>0?Math.round(t/a*100):0;return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,r.jsxs)("span",{className:"font-medium text-gray-700 dark:text-gray-300",children:[t," of ",a," questions"]}),(0,r.jsxs)("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[s," drilled"]})]}),(0,r.jsx)("div",{className:"h-2 w-full rounded-full bg-gray-200 dark:bg-gray-700",children:(0,r.jsx)("div",{className:"h-2 rounded-full bg-brand-500 transition-all",style:{width:"".concat(n,"%")},role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":a})})]})}var h=a(26862);function b(e){let{value:t,onChange:a,max:s=5,size:n="md"}=e,l="sm"===n?"h-4 w-4":"h-5 w-5";return(0,r.jsx)("div",{className:"flex items-center gap-0.5",role:"group","aria-label":"Confidence rating",children:Array.from({length:s},(e,s)=>{let n=s+1,i=n<=t;return(0,r.jsx)("button",{type:"button",onClick:()=>a(n),className:(0,u.cn)("rounded-sm p-0.5 transition-colors focus:outline-none focus:ring-2 focus:ring-brand-500",i?"text-amber-400":"text-muted-foreground hover:text-amber-300"),"aria-label":"".concat(n," star").concat(n>1?"s":""),children:(0,r.jsx)(h.A,{className:(0,u.cn)(l,i&&"fill-current")})},n)})})}var p=a(70783);function f(e){let{initialValue:t,onSave:a,isLoading:n=!1,placeholder:l="Type your answer here..."}=e,[i,d]=(0,s.useState)(t);return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("textarea",{value:i,onChange:e=>d(e.target.value),rows:4,placeholder:l,disabled:n,className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500 disabled:opacity-50","aria-label":"Your answer"}),(0,r.jsxs)("button",{type:"button",onClick:()=>a(i),disabled:n||!i.trim(),className:"inline-flex items-center gap-1 rounded-md bg-brand-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-brand-700 disabled:opacity-50",children:[(0,r.jsx)(p.A,{className:"h-3.5 w-3.5"}),n?"Saving...":"Save Answer"]})]})}var y=a(27736),v=a(4869),j=a(81562),N=a(66597);function w(e){var t,a;let{isOpen:n,onClose:l,questions:m,jobId:u,initialCategory:h="all"}=e,p=(0,s.useRef)(null),{data:w}=(0,y.I)({queryKey:["interview-answers",u],queryFn:()=>(0,N.Em)("/api/interview-answers/".concat(encodeURIComponent(u))),enabled:!!u,staleTime:3e4}),k=function(){let e=(0,v.jE)();return(0,j.n)({mutationFn:e=>(0,N.Em)("/api/interview-answers",{method:"POST",body:JSON.stringify(e)}),onSuccess:(t,a)=>
1{e.invalidateQueries({queryKey:["interview-answers",a.jobId]})},onError:e=>{console.error("Failed to save interview answer:",e)}})}(),C=function(e){let t=(0,v.jE)();return(0,j.n)({mutationFn:e=>{let{id:t,data:a}=e;return(0,N.Em)("/api/interview-answers/".concat(encodeURIComponent(t)),{method:"PATCH",body:JSON.stringify(a)})},onSuccess:()=>{t.invalidateQueries({queryKey:["interview-answers",e]})},onError:e=>{console.error("Failed to update interview answer:",e)}})}(u),A=function(e){let t=(0,v.jE)();return(0,j.n)({mutationFn:e=>(0,N.Em)("/api/interview-answers/".concat(encodeURIComponent(e),"/drill"),{method:"POST"}),onSuccess:()=>{t.invalidateQueries({queryKey:["interview-answers",e]})},onError:e=>{console.error("Failed to mark answer as drilled:",e)}})}(u),[S,P]=(0,s.useState)(h),[E,q]=(0,s.useState)(0),[M,F]=(0,s.useState)(!1),[T,L]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=p.current;e&&(n&&!e.open?e.showModal():!n&&e.open&&e.close())},[n]),(0,s.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>l();return e.addEventListener("close",t),()=>e.removeEventListener("close",t)},[l]);let B=(0,s.useMemo)(()=>["all",...new Set(m.map(e=>e.category))],[m]),I=(0,s.useMemo)(()=>{let e="all"===S?[...m]:m.filter(e=>e.category===S);if(M){let t=[...e];for(let e=t.length-1;e>0;e--){let a=Math.floor(Math.random()*(e+1));[t[e],t[a]]=[t[a],t[e]]}return t}let t=new Map((null!=w?w:[]).map(e=>[e.question,e]));return[...e].sort((e,a)=>{let r=t.get(e.question),s=t.get(a.question);return((null==r?void 0:r.lastDrilled)?new Date(r.lastDrilled).getTime():0)-((null==s?void 0:s.lastDrilled)?new Date(s.lastDrilled).getTime():0)})},[m,S,M,w]),D=I[E],R=(0,s.useMemo)(()=>new Map((null!=w?w:[]).map(e=>[e.question,e])),[w]),O=D?R.get(D.question):void 0,K=(null!=w?w:[]).filter(e=>null!=e.lastDrilled).length;(0,s.useEffect)(()=>{q(0)},[S,M]);let Q=(0,s.useCallback)(()=>{q(e=>Math.min(e+1,I.length-1)),L(!1)},[I.length]),U=(0,s.useCallback)(()=>{q(e=>Math.max(e-1,0)),L(!1)},[]),Y=(0,s.useCallback)(()=>{O&&A.mutate(O.id)},[O,A]),G=(0,s.useCallback)(e=>{D&&(O?C.mutate({id:O.id,data:{answer:e}}):k.mutate({jobId:u,question:D.question,category:D.category,answer:e}),L(!1))},[D,O,C,k,u]),_=(0,s.useCallback)(e=>{D&&(O?C.mutate({id:O.id,data:{confidence:e}}):k.mutate({jobId:u,question:D.question,category:D.category,answer:""}))},[D,O,C,k,u]);return((0,s.useEffect)(()=>{let e=e=>{n&&("ArrowRight"===e.key&&Q(),"ArrowLeft"===e.key&&U())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,Q,U]),n)?(0,r.jsx)("dialog",{ref:p,className:"fixed inset-0 z-50 m-auto w-full max-w-2xl rounded-2xl border-0 bg-white p-0 shadow-2xl backdrop:bg-black/60 dark:bg-gray-900 dark:text-gray-100 sm:mx-auto sm:max-h-[90vh]","aria-label":"Flash card practice mode",children:(0,r.jsxs)("div",{className:"flex max-h-[100dvh] flex-col sm:max-h-[90vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-200 px-4 py-3 dark:border-gray-700 sm:px-6 sm:py-4",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Practice Mode"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-md p-2 transition-colors ".concat(M?"bg-brand-100 text-brand-700 dark:bg-brand-900 dark:text-brand-300":"text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300"),"aria-label":M?"Disable shuffle":"Enable shuffle","aria-pressed":M,children:(0,r.jsx)(i,{className:"h-4 w-4"})}),(0,r.jsx)("button",{type:"button",onClick:l,className:"rounded-md p-2 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300","aria-label":"Close practice mode",children:(0,r.jsx)(d.A,{className:"h-5 w-5"})})]})]}),(0,r.jsx)("div",{className:"border-b border-gray-100 px-4 py-3 dark:border-gray-800 sm:px-6",children:(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Filter by category",children:B.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>P(e),className:"rounded-full px-3 py-1 text-xs font-medium transition-colors ".concat(e===S?"bg-brand-100 text-brand-700 dark:bg-brand-900 dark:text-brand-300":"bg-gray-100 text-gray-600 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700"),"aria-pressed":e===S,children:"all"===e?"All":e},e))})}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto p-4 sm:p-6",children:D?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{current:E+1,total:I.length,drilled:K}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(x,{question:D.question,suggestedAnswer:D.suggestedAnswer,category:D.category,onFlip:Y})}),(0,r.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",children:"Your Confidence"}),(0,r.jsx)(b,{value:null!=(t=null==O?void 0:O.confidence)?t:0,onChange:_,size:"sm"})]}),T?(0,r.jsx)(f,{initialValue:null!=(a=null==O?void 0:O.answer)?a:"",onSave:G,isLoading:k.isPending||C.isPending}):(0,r.jsx)("button",{type:"button",onClick:()=>L(!0),className:"text-xs text-brand-600 hover:underline",children:(null==O?void 0:O.answer)?"Edit your answer":"Write your own answer"})]})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-sm text-gray-500 dark:text-gray-400",children:"No questions match this filter."})}),(0,r.jsxs)("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 dark:border-gray-700 sm:px-6 sm:py-4",children:[(0,r.jsxs)("button",{type:"button",onClick:U,disabled:0===E,className:"inline-flex min-h-[44px] items-center gap-1 rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",children:[(0,r.jsx)(o.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,r.jsxs)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[E+1," / ",I.length]}),(0,r.jsxs)("button",{type:"button",onClick:Q,disabled:E>=I.length-1,className:"inline-flex min-h-[44px] items-center gap-1 rounded-md bg-brand-600 px-4 py-2 text-sm font-medium text-white hover:bg-brand-700 disabled:opacity-50",children:[(0,r.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,r.jsx)(c.A,{className:"h-4 w-4"})]})]})]})}):null}var k=a(31478),C=a(20415),A=a(60091),S=a(45234);function P(e){var t;let{prep:a,jobId:i,onRegenerate:d,isRegenerating:o}
1=e,[c,m]=(0,s.useState)("all"),[u,x]=(0,s.useState)(!1);if(!a)return(0,r.jsx)(l.p,{title:"No interview prep yet",description:"The interview-prep agent will populate this section.",icon:C.A});let g=a.likelyQuestions,h=["all",...new Set(g.map(e=>e.category))],b="all"===c?g:g.filter(e=>e.category===c);return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Company Briefing"}),(0,r.jsx)("p",{className:"text-sm text-foreground/80",children:null!=(t=a.companyBriefing)?t:"No briefing available."})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[g.length>0&&(0,r.jsxs)("button",{type:"button",onClick:()=>x(!0),className:"inline-flex items-center gap-1.5 rounded-lg bg-brand-600 px-4 py-2 text-sm font-medium text-white hover:bg-brand-700","aria-label":"Open practice mode",children:[(0,r.jsx)(A.A,{className:"h-4 w-4"}),"Practice Mode"]}),d&&(0,r.jsxs)("button",{type:"button",onClick:d,disabled:o,className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-60","aria-label":"Regenerate interview prep",children:[(0,r.jsx)(S.A,{className:"h-4 w-4 ".concat(o?"animate-spin":"")}),o?"Regenerating...":"Regenerate"]})]})]}),a.rolePriorities.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Role Priorities"}),(0,r.jsx)("ol",{className:"space-y-1.5 list-decimal list-inside",children:a.rolePriorities.map((e,t)=>(0,r.jsx)("li",{className:"text-sm text-foreground/80",children:e},t))})]}),(a.interviewProcess.stages.length>0||a.interviewProcess.typical_timeline)&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Interview Process"}),a.interviewProcess.stages.length>0&&(0,r.jsx)("ol",{className:"space-y-1.5",children:a.interviewProcess.stages.map((e,t)=>(0,r.jsxs)("li",{className:"flex items-center gap-2 text-sm text-foreground/80",children:[(0,r.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-brand-500/20 text-xs font-medium text-brand-400",children:t+1}),e]},t))}),a.interviewProcess.typical_timeline&&(0,r.jsxs)("p",{className:"mt-2 text-xs text-muted-foreground",children:["Typical timeline: ",a.interviewProcess.typical_timeline]})]}),a.salaryBenchmark&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Salary Benchmark"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:(0,k.v9)(a.salaryBenchmark.min,a.salaryBenchmark.max)}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Median: ",(0,k.v9)(a.salaryBenchmark.median,a.salaryBenchmark.median)]})]}),a.gapTalkingPoints.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Gap Framing"}),(0,r.jsx)("div",{className:"space-y-3",children:a.gapTalkingPoints.map((e,t)=>(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-muted/40 p-3",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.gap}),(0,r.jsx)("p",{className:"mt-1 text-sm text-foreground/80",children:e.framing}),e.example&&(0,r.jsx)("p",{className:"mt-1.5 text-xs italic text-muted-foreground",children:e.example})]},t))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Interview Questions"}),(0,r.jsx)("div",{className:"mb-3 flex flex-wrap gap-1.5",role:"group","aria-label":"Filter questions by category",children:h.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>m(e),className:"rounded-full px-3 py-1 text-xs font-medium transition-colors ".concat(e===c?"bg-brand-100 text-brand-700":"bg-muted text-muted-foreground hover:bg-muted/80"),children:"all"===e?"All":e},e))}),(0,r.jsx)("div",{className:"space-y-3",children:b.map((e,t)=>(0,r.jsxs)("div",{className:"rounded-lg border border-border p-3",children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.question}),(0,r.jsx)(n.E,{variant:"info",children:e.category})]}),e.suggestedAnswer&&(0,r.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:e.suggestedAnswer})]},t))})]}),a.keyTalkingPoints.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Key Talking Points"}),(0,r.jsx)("ul",{className:"space-y-1.5",children:a.keyTalkingPoints.map((e,t)=>(0,r.jsxs)("li",{className:"flex items-start gap-2 text-sm text-foreground
1/80",children:[(0,r.jsx)("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-brand-500"}),e.myExperience]},t))})]}),(0,r.jsx)(w,{isOpen:u,onClose:()=>x(!1),questions:g,jobId:i,initialCategory:c})]})}}}]);

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.