PageSourceSearch

https://quarrion.ai/_next/static/chunks/3673.e75736b3fdceb59e.js

js quarrion.ai collected 2026-09-24 14:30:52 UTC 58,020 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3673],{7117:(e,t,s)=>{function a(e){return e>=80?"text-emerald-600":e>=60?"text-green-600":e>=40?"text-amber-600":e>=20?"text-orange-600":"text-red-600"}function r(e){return e>=80?"bg-emerald-500":e>=60?"bg-green-500":e>=40?"bg-amber-500":e>=20?"bg-orange-500":"bg-red-500"}function n(e){return e>=80?"bg-emerald-100":e>=60?"bg-green-100":e>=40?"bg-amber-100":e>=20?"bg-orange-100":"bg-red-100"}s.d(t,{_8:()=>r,d2:()=>n,fs:()=>a})},7571:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(92068).A)("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},14502:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(92068).A)("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},18525:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(92068).A)("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]])},30114:(e,t,s)=>{s.d(t,{Z:()=>n});var a=s(54568),r=s(67908);function n(e){let{children:t,className:s,title:n,icon:i}=e;return(0,a.jsxs)("div",{className:(0,r.cn)("glass-card p-6",s),children:[n&&(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[i&&(0,a.jsx)(i,{className:"h-5 w-5 text-brand-400"}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:n})]}),t]})}},33917:(e,t,s)=>{s.d(t,{W:()=>i});var a=s(54568),r=s(62843),n=s(67908);function i(e){let{status:t,className:s}=e,i=(0,r.JS)(t);return(0,a.jsxs)("span",{className:(0,n.cn)("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium",i.bg,i.text,s),children:[(0,a.jsx)("span",{className:(0,n.cn)("h-1.5 w-1.5 rounded-full",i.dot),"aria-hidden":"true"}),(0,r.ps)(t)]})}},69573:(e,t,s)=>{s.d(t,{C:()=>o});var a=s(54568),r=s(7620),n=s(7117),i=s(67908);let l={sm:{bar:"h-1.5",text:"text-xs"},md:{bar:"h-2",text:"text-sm"},lg:{bar:"h-3",text:"text-base"}},d=e=>Math.max(0,Math.min(100,e));function o(e){let{score:t,size:s="md",showLabel:o=!0,reasoning:c,reasoningScore:u}=e,[x,m]=(0,r.useState)(!1),h=(0,r.useId)();if(null==t)return(0,a.jsx)("div",{className:"flex items-center gap-2 w-[5.5rem] justify-end","aria-label":"Score: none",children:(0,a.jsx)("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:"--"})});let p=d(t),g=l[s],b="string"==typeof c&&c.trim().length>0&&"number"==typeof u&&Number.isFinite(u)&&d(u)===p,f=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,i.cn)("w-16 rounded-full shrink-0",g.bar,(0,n.d2)(p)),children:(0,a.jsx)("div",{className:(0,i.cn)("rounded-full",g.bar,(0,n._8)(p)),style:{width:"".concat(p,"%")}})}),o&&(0,a.jsx)("span",{className:(0,i.cn)("font-medium tabular-nums w-6 text-right",g.text,(0,n.fs)(p)),children:p})]});return b?(0,a.jsxs)("div",{className:"relative flex w-[5.5rem] items-center justify-end",children:[(0,a.jsx)("button",{type:"button",className:"flex items-center gap-2 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 focus-visible:ring-offset-1","aria-label":"Score: ".concat(p,". Why this score?"),"aria-describedby":h,"aria-expanded":x,onClick:()=>m(e=>!e),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),onFocus:()=>m(!0),onBlur:()=>m(!1),children:f}),(0,a.jsx)("div",{id:h,role:"tooltip",className:x?"absolute right-0 top-full z-20 mt-1 w-64 rounded-md border border-border bg-card px-3 py-2 text-left text-xs leading-relaxed text-card-foreground shadow-lg":"sr-only",children:c})]}):(0,a.jsx)("div",{className:"flex items-center gap-2 w-[5.5rem] justify-end","aria-label":"Score: ".concat(p),children:f})}},72835:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(92068).A)("CircleX",[["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"}]])},73673:(e,t,s)=>{s.r(t),s.d(t,{ApplicationDetail:()=>ez});var a=s(54568),r=s(20855),n=s(96886),i=s(18525),l=s(65202),d=s(74717),o=s(20415),c=s(92068);let u=(0,c.A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);var x=s(85300),m=s(7571),h=s(3094),p=s(63072),g=s(75892),b=s(64751),f=s(32064),j=s(90757),v=s(29255),N=s(95593),y=s(30114),w=s(7620),k=s(62843),A=s(33917),C=s(72116);function S(e){let{currentStatus:t,onStatusChange:s,disabled:r}=e,[n,i]=(0,w.useState)(!1),[l,d]=(0,w.useState)(-1),o=(0,w.useRef)(null),c=(0,w.useRef)(null);(0,w.useEffect)(()=>{function e(e){o.current&&!o.current.contains(e.target)&&i(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,w.useEffect)(()=>
1{if(n){let e=k.nY.indexOf(t);d(e>=0?e:0)}},[n,t]);let u=(0,w.useCallback)(e=>{var t;s(e),i(!1),null==(t=c.current)||t.focus()},[s]),x=(0,w.useCallback)(e=>{if(!n){("ArrowDown"===e.key||"Enter"===e.key||" "===e.key)&&(e.preventDefault(),i(!0));return}switch(e.key){case"ArrowDown":e.preventDefault(),d(e=>Math.min(e+1,k.nY.length-1));break;case"ArrowUp":e.preventDefault(),d(e=>Math.max(e-1,0));break;case"Enter":case" ":e.preventDefault(),l>=0&&u(k.nY[l]);break;case"Escape":var t;e.preventDefault(),i(!1),null==(t=c.current)||t.focus();break;case"Home":e.preventDefault(),d(0);break;case"End":e.preventDefault(),d(k.nY.length-1)}},[n,l,u]);return(0,a.jsxs)("div",{ref:o,className:"relative inline-block",onKeyDown:x,children:[(0,a.jsxs)("button",{ref:c,type:"button",onClick:()=>!r&&i(e=>!e),className:"inline-flex items-center gap-1 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-brand-500","aria-haspopup":"listbox","aria-expanded":n,"aria-label":"Change status from ".concat((0,k.ps)(t)),disabled:r,children:[(0,a.jsx)(A.W,{status:t}),(0,a.jsx)(C.A,{className:"h-3 w-3 text-gray-600 dark:text-gray-400"})]}),n&&(0,a.jsx)("ul",{role:"listbox","aria-label":"Select status","aria-activedescendant":l>=0?"status-option-".concat(k.nY[l]):void 0,className:"absolute right-0 z-10 mt-1 w-40 rounded-md border border-gray-200 bg-white py-1 shadow-lg",children:k.nY.map((e,s)=>(0,a.jsx)("li",{id:"status-option-".concat(e),role:"option","aria-selected":e===t,className:"cursor-pointer px-3 py-1.5 text-sm hover:bg-gray-50 ".concat(s===l?"bg-gray-100":""),onClick:()=>u(e),children:(0,a.jsx)(A.W,{status:e})},e))})]})}var E=s(69573),P=s(889),T=s(7117),I=s(67908);function R(e){let{overall:t,breakdown:s}=e;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:(0,I.cn)("text-4xl font-bold",(0,T.fs)(t)),children:t}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Overall Match Score"})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[(0,a.jsx)(P.A,{className:"h-6 w-6 text-muted-foreground","aria-hidden":"true"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"This role has an overall score but no category detail yet — it appears after the next scoring pass."})]}):(0,a.jsx)("div",{className:"space-y-4",children:s.map(e=>{var t;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{className:"font-medium text-foreground",children:e.category}),(0,a.jsx)("span",{className:(0,I.cn)("font-semibold",(0,T.fs)(e.score)),children:e.score})]}),(0,a.jsx)("div",{className:(0,I.cn)("h-2 w-full rounded-full",(0,T.d2)(e.score)),role:"meter","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"".concat(e.category,": ").concat(e.score," out of 100"),children:(0,a.jsx)("div",{className:(0,I.cn)("h-2 rounded-full transition-all",(0,T._8)(e.score)),style:{width:"".concat(e.score,"%")}})}),(e.rationale||null!==e.weight)&&(0,a.jsxs)("div",{className:"mt-1 flex justify-between gap-3 text-xs text-muted-foreground",children:[(0,a.jsx)("span",{children:null!=(t=e.rationale)?t:""}),null!==e.weight&&(0,a.jsxs)("span",{className:"shrink-0",children:["Weight: ",e.weight,"x"]})]})]},e.category)})})]})}var D=s(40209),L=s(77738),M=s(79957);function U(e){let{research:t}=e;return t?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[t.sector&&(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Sector"}),(0,a.jsx)("dd",{className:"mt-1 text-sm text-foreground",children:t.sector})]}),t.companySize&&(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Company Size"}),(0,a.jsx)("dd",{className:"mt-1 text-sm text-foreground",children:t.companySize})]}),t.hiringManager&&(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Hiring Manager"}),(0,a.jsx)("dd",{className:"mt-1 text-sm text-foreground",children:t.hiringManager})]}),t.teamInfo&&(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Team"}),(0,a.jsx)("dd",{className:"mt-1 text-sm text-foreground",children:t.teamInfo})]})]}),t.techStack&&t.techStack.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Tech Stack"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.techStack.map(e=>(0,a.jsx)(D.E,{variant:"info",children:e},e))})]}),t.cultureSignals&&t.cultureSignals.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Culture Signals"}),(0,a.jsx)("ul",{className:"space-y-1",children:t.cultureSignals.map((e,t)=>
1(0,a.jsxs)("li",{className:"text-sm text-foreground/80",children:["- ",e]},t))})]}),t.recentNews&&t.recentNews.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Recent News"}),(0,a.jsx)("ul",{className:"space-y-1",children:t.recentNews.map((e,t)=>(0,a.jsxs)("li",{className:"text-sm text-foreground/80",children:["- ",e]},t))})]}),t.interviewProcess&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Interview Process"}),(0,a.jsx)("p",{className:"text-sm text-foreground/80",children:t.interviewProcess})]})]}):(0,a.jsx)(L.p,{title:"No research data yet",description:"The deep-research agent will populate this section.",icon:M.A})}var q=s(89886),_=s(48517),F=s(69354);let O={low:"success",medium:"warning",high:"danger",critical:"danger"};function Y(){return(0,a.jsx)("div",{className:"space-y-3","aria-hidden":"true",children:[{area:"Technical Skills",severity:"medium",description:"Gap analysis hidden — upgrade to view."},{area:"Domain Experience",severity:"high",description:"Upgrade to see your skill gaps."},{area:"Leadership",severity:"low",description:"Available on Starter and Pro."}].map(e=>(0,a.jsxs)("div",{className:"rounded-lg border border-border p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.area}),(0,a.jsx)(D.E,{variant:O[e.severity],children:e.severity})]}),(0,a.jsx)("p",{className:"mb-2 text-sm text-foreground/80",children:e.description}),(0,a.jsx)("div",{className:"rounded bg-green-50 p-2",children:(0,a.jsxs)("p",{className:"text-xs text-green-700",children:[(0,a.jsx)("span",{className:"font-medium",children:"Suggested framing:"})," Upgrade to see AI recommendations."]})})]},e.area))})}function B(e){let{gaps:t}=e,[s,r]=(0,w.useState)(!1);return(null==t?void 0:t.blurred)===!0?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("div",{className:"blur-sm pointer-events-none select-none","aria-hidden":"true",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"Overall Risk:"}),(0,a.jsx)(D.E,{variant:"warning",children:"MEDIUM"})]}),(0,a.jsx)(Y,{})]}),(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center rounded-lg bg-black/20 backdrop-blur-[1px]",children:[(0,a.jsx)(_.A,{className:"mb-2 h-6 w-6 text-white/60"}),(0,a.jsx)("p",{className:"mb-3 text-sm font-medium text-white/80",children:"Gap analysis requires Starter or Pro"}),!s&&(0,a.jsx)(q.d,{metric:"gap analyses",used:0,limit:0,onDismiss:()=>r(!0)})]})]}):t&&0!==t.items.length?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"Overall Risk:"}),(0,a.jsx)(D.E,{variant:"low"===t.overallRisk?"success":"medium"===t.overallRisk?"warning":"danger",children:t.overallRisk.toUpperCase()})]}),(0,a.jsx)("div",{className:"space-y-3",children:t.items.map((e,t)=>(0,a.jsxs)("div",{className:"rounded-lg border border-border p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.area}),(0,a.jsx)(D.E,{variant:O[e.severity],children:e.severity})]}),(0,a.jsx)("p",{className:"mb-2 text-sm text-foreground/80",children:e.description}),(0,a.jsx)("div",{className:"rounded bg-green-50 p-2",children:(0,a.jsxs)("p",{className:"text-xs text-green-700",children:[(0,a.jsx)("span",{className:"font-medium",children:"Suggested framing:"})," ",e.suggestedFraming]})})]},t))})]}):(0,a.jsx)(L.p,{title:"No gaps identified",description:"The gap-analysis agent will populate this section.",icon:F.A})}var z=s(96232),W=s(63449),K=s(6438),Q=s(3927),Z=s(12598),H=s(80021);let G={pending:"default",sent:"warning",replied:"info",connected:"success"};function V(e){let{contacts:t}=e,s=(0,W.aF)(),n=(0,W.vC)(),i=(0,W.g5)(),[l,d]=(0,w.useState)(null),[o,c]=(0,w.useState)(null),[x,m]=(0,w.useState)("");return 0===t.length?(0,a.jsx)(L.p,{title:"No contacts identified",de
1scription:"The networking-intelligence agent will populate this section.",icon:u}):(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-xs font-medium text-muted-foreground",children:"Networking Contacts"}),(0,a.jsxs)(r.N_,{to:"/messaging?channel=email","aria-label":"Full Outreach Queue for networking contacts",className:"inline-flex items-center gap-1 text-xs text-brand-600 hover:underline",children:[(0,a.jsx)(f.A,{className:"h-3 w-3"}),"Full Outreach Queue"]})]}),(0,a.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,a.jsxs)("div",{className:"rounded-lg border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.name}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.title," \xb7 ",e.connectionType]})]}),(0,a.jsx)(D.E,{variant:G[e.outreachStatus],children:e.outreachStatus}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:["pending"===e.outreachStatus&&e.draftMessage&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>s.mutate(e.id),className:"rounded p-1.5 text-green-600 hover:bg-green-50","aria-label":"Approve outreach to ".concat(e.name),children:(0,a.jsx)(K.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;c(e.id),m(null!=(t=e.draftMessage)?t:""),d(e.id)},className:"rounded p-1.5 text-blue-600 hover:bg-blue-50","aria-label":"Edit outreach to ".concat(e.name),children:(0,a.jsx)(Q.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{type:"button",onClick:()=>i.mutate({id:e.id}),className:"rounded p-1.5 text-red-600 hover:bg-red-50","aria-label":"Reject outreach to ".concat(e.name),children:(0,a.jsx)(Z.A,{className:"h-3.5 w-3.5"})})]}),e.draftMessage&&(0,a.jsx)("button",{type:"button",onClick:()=>d(l===e.id?null:e.id),className:"rounded p-1.5 text-muted-foreground hover:bg-muted","aria-label":l===e.id?"Collapse draft":"Expand draft",children:l===e.id?(0,a.jsx)(H.A,{className:"h-3.5 w-3.5"}):(0,a.jsx)(C.A,{className:"h-3.5 w-3.5"})})]})]}),l===e.id&&e.draftMessage&&(0,a.jsx)("div",{className:"border-t border-border px-3 py-3",children:o===e.id?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("textarea",{value:x,onChange:e=>m(e.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500",rows:4,"aria-label":"Edit draft message"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void(n.mutate({id:t,content:x}),c(null),m(""))},className:"rounded-md bg-brand-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-brand-700",children:"Save"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(null),className:"rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted",children:"Cancel"})]})]}):(0,a.jsx)("p",{className:"text-sm text-foreground/80 whitespace-pre-wrap",children:e.draftMessage})})]},e.id))})]})}var J=s(65545),X=s(40272);let $={pending:"warning",sent:"success",skipped:"default"};function ee(e){let{followUps:t}=e,s=(0,X.JU)(),n=(0,X.Yr)(),[i,l]=(0,w.useState)(null),[d,o]=(0,w.useState)("");return 0===t.length?(0,a.jsx)(L.p,{title:"No follow-ups scheduled",description:"The follow-up agent will populate this section.",icon:m.A}):(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-xs font-medium text-muted-foreground",children:"Follow-ups"}),(0,a.jsxs)(r.N_,{to:"/messaging?channel=email","aria-label":"Full Outreach Queue for follow-ups",className:"inline-flex items-center gap-1 text-xs text-brand-600 hover:underline",children:[(0,a.jsx)(f.A,{className:"h-3 w-3"}),"Full Outreach Queue"]})]}),(0,a.jsxs)("div",{className:"relative space-y-4",children:[(0,a.jsx)("div",{className:"absolute left-3.5 to
1p-0 h-full w-0.5 bg-border","aria-hidden":"true"}),t.map(e=>(0,a.jsxs)("div",{className:"relative flex gap-4 pl-9",children:[(0,a.jsx)("div",{className:"absolute left-2 top-1.5 h-3 w-3 rounded-full border-2 border-background bg-brand-500","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex-1 rounded-lg border border-border p-3",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,J.r6)(e.scheduledAt)}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(D.E,{variant:$[e.status],children:e.status}),"pending"===e.status&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>s.mutate(e.id),className:"rounded p-1 text-green-600 hover:bg-green-50","aria-label":"Approve follow-up scheduled ".concat((0,J.r6)(e.scheduledAt)),children:(0,a.jsx)(K.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{l(e.id),o(e.content)},className:"rounded p-1 text-blue-600 hover:bg-blue-50","aria-label":"Edit follow-up scheduled ".concat((0,J.r6)(e.scheduledAt)),children:(0,a.jsx)(Q.A,{className:"h-3.5 w-3.5"})})]})]})]}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:e.type}),i===e.id?(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,a.jsx)("textarea",{value:d,onChange:e=>o(e.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground focus:border-brand-500 focus:outline-none focus:ring-1 focus:ring-brand-500",rows:3,"aria-label":"Edit follow-up content"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void(n.mutate({id:t,draftContent:d}),l(null),o(""))},className:"rounded-md bg-brand-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-brand-700",children:"Save"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(null),className:"rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted",children:"Cancel"})]})]}):(0,a.jsx)("p",{className:"mt-1 text-sm text-foreground/80",children:e.content})]})]},e.id))]})]})}var et=s(31478);function es(){return(0,a.jsxs)("div",{className:"space-y-6","aria-hidden":"true",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Market Range"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-foreground",children:"\xa355,000 – \xa375,000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Anchor Strategy"}),(0,a.jsx)("p",{className:"text-sm text-foreground/80",children:"Upgrade to Pro to unlock AI-generated negotiation strategies tailored to this role."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Counter-offer Framework"}),(0,a.jsx)("p",{className:"text-sm text-foreground/80",children:"Pro includes counter-offer scripts, market benchmarks, and negotiation playbooks."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Negotiation Scripts"}),(0,a.jsx)("div",{className:"space-y-3",children:["Initial offer response","Counter-offer framing","Closing"].map(e=>(0,a.jsxs)("div",{className:"rounded-lg border border-border p-3",children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:e}),(0,a.jsx)("p",{className:"text-sm italic text-foreground/80",children:"“Script available on Pro plan…”"})]},e))})]})]})}function ea(e){let{negotiation:t}=e,[s,r]=(0,w.useState)(!1);return(null==t?void 0:t.blurred)===!0?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"blur-sm pointer-events-none select-none","aria-hidden":"true",children:(0,a.jsx)(es,{})}),(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center rounded-lg bg-black/20 backdrop-blur-[1px]",children:[(0,a.jsx)(_.A,{className:"mb-2 h-6 w-6 text-white/60"}),(0,a.jsx)("p",{className:"mb-3 text-sm font-medium text-white/80",children:"Salary negotiation requires Pro"}),!s&&(0,a.jsx)(q.d,{metric:"salary negotiations",used:0,limit:0,onDismiss:()=>r(!0)})]})]}):t?(0,a.jsxs)("div",{className:"space-y-6",children:[t.marketData&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Market Range"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-foreground",children:(0,et.v9)(t.marketData.min,t.marketData.max)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Anchor Strategy"}
1),(0,a.jsx)("p",{className:"text-sm text-foreground/80",children:t.anchorStrategy})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Counter-offer Framework"}),(0,a.jsx)("p",{className:"text-sm text-foreground/80",children:t.counterOfferFramework})]}),t.scripts.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Negotiation Scripts"}),(0,a.jsx)("div",{className:"space-y-3",children:t.scripts.map((e,t)=>(0,a.jsxs)("div",{className:"rounded-lg border border-border p-3",children:[(0,a.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:e.scenario}),(0,a.jsxs)("p",{className:"text-sm italic text-foreground/80",children:["“",e.script,"”"]})]},t))})]})]}):(0,a.jsx)(L.p,{title:"No negotiation data",description:"Available at offer stage. The salary-negotiation agent will populate this.",icon:h.A})}var er=s(19166);function en(e){let{message:t}=e,s="outbound"===t.direction;return(0,a.jsxs)("li",{className:"flex flex-col gap-1 rounded-lg border border-border p-3 ".concat(s?"bg-brand-500/5":"bg-card"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-muted-foreground",children:s?"You":"Them"}),(0,a.jsx)("time",{className:"text-xs text-muted-foreground/70",dateTime:t.created_at,children:(0,J.Yq)(t.created_at)})]}),(0,a.jsx)("p",{className:"whitespace-pre-wrap text-sm text-foreground",children:t.content})]})}function ei(e){let{applicationId:t}=e,{data:s,isLoading:n,isError:i,refetch:l}=(0,er.ZK)(t);return n?(0,a.jsx)("div",{className:"space-y-2","aria-busy":"true","aria-label":"Loading conversation",children:[0,1,2].map(e=>(0,a.jsx)("div",{className:"h-16 animate-pulse rounded-lg bg-muted"},e))}):i?(0,a.jsxs)("div",{className:"rounded-lg border border-border p-6 text-center",children:[(0,a.jsx)("p",{className:"mb-2 text-sm text-muted-foreground",children:"Couldn’t load the conversation."}),(0,a.jsx)("button",{type:"button",onClick:()=>void l(),className:"rounded-md px-3 py-1.5 text-sm font-medium text-brand-400 transition-colors hover:bg-brand-500/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500",children:"Retry"})]}):s&&null!==s.contactId&&0!==s.messages.length?(0,a.jsxs)("section",{"aria-label":"Linked LinkedIn conversation",children:[(0,a.jsxs)("p",{className:"mb-3 text-xs text-muted-foreground",children:[s.total," message",1===s.total?"":"s"," in this conversation"]}),(0,a.jsx)("ul",{className:"space-y-2",children:s.messages.map(e=>(0,a.jsx)(en,{message:e},e.id))})]}):(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-dashed border-border py-12 text-center",children:[(0,a.jsx)(x.A,{className:"h-8 w-8 text-muted-foreground/40","aria-hidden":"true"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"No LinkedIn conversation linked yet."}),(0,a.jsxs)(r.N_,{to:"/messaging",className:"inline-flex items-center gap-1.5 rounded-md bg-brand-600 px-3 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-brand-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500",children:[(0,a.jsx)(o.A,{className:"h-4 w-4","aria-hidden":"true"}),"Link a conversation"]})]})}var el=s(90614),ed=s(27736),eo=s(66597);function ec(){return(0,eo.Em)("/api/calendar-events/feed-url")}var eu=s(82078);let ex=(0,c.A)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),em={interview:"info",prep:"warning",deadline:"danger"};function eh(e){let{events:t,applicationId:s}=e,{downloadAllIcs:r,downloadEventIcs:n}=function(){let[e,t]=(0,w.useState)(null),s=(0,w.useCallback)(async(e,s)=>{t(null);try{let t=await (0,eo.gf)(e),a=await t.blob(),r=URL.createObjectURL(a),n=document.createElement("a");n.href=r,n.download=s,document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}catch(e){t(e instanceof Error?e.message:"Calendar download failed")}},[]);return{downloadAllIcs:(0,w.useCallback)(e=>{s((function(e){let t=new URLSearchParams;(null==e?void 0:e.applicationId)&&t.set("applicationId",e.applicationId);let s=t.toString();return"".concat(eo.C1,"/api/calendar-events/export.ics").concat(s?"?".concat(s):"")})(void 0!==e?{applicationId:e}:void 0).replace(/^https?:\/\/[^/]+/,""),"interviews.ics")},[s]),downloadEventIcs:(0,w.useCallback)(e=>{s("".concat(eo.C1,"/api/calendar-events/").concat(encodeURIComponent(e),"/download.ics").replace(/^https?:\/\/[^/]+/,""),"event-".concat(e,".ics"))},[s]),error:e}}(),{data:i}=(0,ed.I)({queryKey:["calendar-feed-url"],queryFn:ec,staleTime:6e5}),[l,d]=(0,w.useState)(!1);return 0===t.length?(0,a.jsx)(L.p,{title:"No upcoming events",description:"Calendar events will appear here once scheduled.",icon:p.A}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>r(s),className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted","aria-label":"Export all events to calendar",children:[(0,a.jsx)(eu.A,{className:"h-3.5 w-3.5"}),"Export All to Calendar"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted","aria-label":"Subscribe to calendar",children:[(0,a.jsx)(ex,{className:"h-3.5 w-3.5"}),"Subscribe to Calendar"]})]}),l&&(null==i?void 0:i.webcalUrl)&&(0,a.jsxs)("div",{className:"rounded-lg border border-brand-200 bg-brand-50 p-4",children:[(0,a.jsx)("h4",{className:"mb-2 text-sm font-medium text-brand-900",children:"Subscribe to Calendar"}),(0,a.jsx)("p",{className:"mb-3 text-xs text-brand-700",children:"Add this URL to Apple Calendar, Google Calendar, or Outlook to automatically receive event updates."}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 rounded border border-brand-200 bg-white px-3 py-1.5 text-xs text-gray-700 break-all",children:i.webcalUrl}),(0,a.jsx)(el.$,{text:i.webcalUrl,label:"Copy URL"})]}),(0,a.jsx)("p",{className:"mt-2 text-xs text-brand-600",children:"Apple Calendar: File > New Calendar Subscription > paste URL"})]}),(0,a.jsx)("div",{className:"space-y-3",children:t.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border border-border p-3",children:[(0,a.jsx)("div",{className:"shrink-0 pt-0.5",children:(0,a.jsx)(p.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.title}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(D.E,{variant:em[e.type],children:e.type}),(0,a.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground","aria-label":"Download .ics for ".concat(e.title),children:(0,a.jsx)(eu.A,{className:"h-3.5 w-3.5"})})]})]}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,J.r6)(e.startTime)," - ",(0,J.r6)(e.endTime)]}),e.prepBlockStatus&&(0,a.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Prep: ",e.prepBlockStatus]})]})]},e.id))})]})}function ep(e){let{entries:t}=e;return 0===t.length?(0,a.jsx)(L.p,{title:"No decision log entries",description:"Agent decisions will be logged here.",icon:g.A}):(0,a.jsx)("div",{className:"space-y-2",children:t.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border border-border p-3 text-sm",children:[(0,a.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:(0,J.r6)(e.timestamp)}),(0,a.jsx)(D.E,{variant:"info",children:e.agent}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("span",{className:"font-medium text-foreground",children:e.action}),(0,a.jsx)("p",{className:"text-muted-foreground",children:e.details})]})]},t))})}var eg=s(14502),eb=s(19760),ef=s(8533),ej=s(41385);function ev(e){let{applicationId:t}=e,{data:s,isLoading:r,error:n,refetch:i}=(0,ed.I)({queryKey:["application-history",t],queryFn:()=>t?(0,eo.np)(t):[],enabled:!!t,staleTime:3e4,gcTime:12e4});if(r)return(0,a.jsx)("div",{className:"space-y-3","aria-busy":"true",children:(0,a.jsx)(ef.O0,{lines:4})});if(n)return(0,a.jsx)(ej.W,{message:"Couldn't load the status history. Please try again.",onRetry:()=>void i()});let l=null!=s?s:[];if(0===l.length)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-border py-10 text-center",children:[(0,a.jsx)(eg.A,{className:"mb-2 h-8 w-8 text-muted-foreground
1/40","aria-hidden":"true"}),(0,a.jsx)("p",{className:"text-sm font-medium text-foreground",children:"No status changes yet"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Updates appear here as this application moves through your pipeline."})]});let d=[...l].reverse();return(0,a.jsx)("ol",{"aria-label":"Status change history",className:"relative space-y-5 border-l border-border pl-5",children:d.map(e=>(0,a.jsxs)("li",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute -left-[1.4rem] top-1 h-2.5 w-2.5 rounded-full border-2 border-background bg-brand-500","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[e.fromStatus&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A.W,{status:e.fromStatus}),(0,a.jsx)(eb.A,{className:"h-3.5 w-3.5 text-muted-foreground","aria-hidden":"true"})]}),(0,a.jsx)(A.W,{status:e.toStatus})]}),(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground",children:[(0,a.jsx)("time",{dateTime:e.changedAt,title:(0,J.r6)(e.changedAt),children:(0,J.om)(e.changedAt)}),(0,a.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,a.jsx)("span",{children:"user"===e.changedBy?"You":"Automated"})]}),e.reason&&(0,a.jsx)("p",{className:"mt-1 text-sm text-foreground/80",children:e.reason})]},e.id||"".concat(e.toStatus,"-").concat(e.changedAt)))})}var eN=s(13119),ey=s(14486),ew=s(99935);let ek={0:"T0 \xb7 API",1:"T1 \xb7 Form",2:"T2 \xb7 Assisted",3:"T3 \xb7 Manual"};function eA(e){var t;let{tier:s}=e,r=null!=s?null!=(t=ek[s])?t:"T".concat(s):"Tier —";return(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-xs font-semibold text-brand-600 dark:text-brand-300",children:r})}function eC(e){let{applicationId:t}=e,{data:s,isLoading:r,error:n,refetch:i}=(0,ed.I)({queryKey:["apply-traces",t],queryFn:()=>t?(0,eo.jk)(t):[],enabled:!!t,staleTime:3e4,gcTime:12e4}),[l,o]=(0,w.useState)({});if(r)return(0,a.jsx)("div",{className:"space-y-3","aria-busy":"true",children:(0,a.jsx)(ef.O0,{lines:4})});if(n)return(0,a.jsx)(ej.W,{message:"Couldn't load the attempt traces. Please try again.",onRetry:()=>void i()});let c=null!=s?s:[];return 0===c.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-border py-10 text-center",children:[(0,a.jsx)(eN.A,{className:"mb-2 h-8 w-8 text-muted-foreground/40","aria-hidden":"true"}),(0,a.jsx)("p",{className:"text-sm font-medium text-foreground",children:"No apply attempts recorded yet"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Each submission attempt through the auto-apply ladder appears here with its step timeline."})]}):(0,a.jsx)("ol",{"aria-label":"Apply attempt traces",className:"space-y-3",children:c.map((e,t)=>{var s;let r=e.id||"".concat(e.startedAt,"-").concat(t),n=null!=(s=l[r])&&s,i=!!e.failureCategory;return(0,a.jsxs)("li",{className:"rounded-lg border border-border bg-card",children:[(0,a.jsxs)("button",{type:"button","aria-expanded":n,onClick:()=>o(e=>({...e,[r]:!n})),className:"flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left transition-colors hover:bg-muted/50",children:[n?(0,a.jsx)(C.A,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):(0,a.jsx)(ey.A,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,a.jsx)(eA,{tier:e.tier}),e.method&&(0,a.jsx)("span",{className:"text-xs font-medium text-foreground/80",children:e.method}),i?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-red-500/10 px-2 py-0.5 text-xs font-semibold text-red-600 dark:text-red-400",children:[(0,a.jsx)(d.A,{className:"h-3 w-3","aria-hidden":"true"}),e.failureCategory]}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-semibold text-emerald-600 dark:text-emerald-400",children:[(0,a.jsx)(ew.A,{className:"h-3 w-3","aria-hidden":"true"}),"ok"]}),(0,a.jsx)("time",{className:"ml-auto shrink-0 text-xs text-muted-foreground",dateTime:e.startedAt,title:(0,J.r6)(e.startedAt),children:(0,J.om)(e.startedAt)})]}),n&&(0,a.jsxs)("div",{className:"border-t border-border px-3 py-3",children:[e.routerDecision&&(0,a.jsxs)("p",{className:"mb-2 text-xs text-muted-foreground",children:[(0,a.jsx)("span",{className:"font-medium text-foreground
1/70",children:"Router:"})," ",e.routerDecision]}),0===e.steps.length?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"No steps recorded for this attempt."}):(0,a.jsx)("ol",{className:"relative space-y-2.5 border-l border-border pl-4",children:e.steps.map(e=>(0,a.jsxs)("li",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute -left-[1.15rem] top-1 h-2 w-2 rounded-full border-2 border-background bg-brand-500","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs font-semibold text-foreground",children:e.stage}),(0,a.jsxs)("span",{className:"text-xs tabular-nums text-muted-foreground",children:["+",e.ms,"ms"]})]}),e.detail&&(0,a.jsx)("p",{className:"mt-0.5 text-xs text-foreground/70",children:e.detail})]},e.idx))}),e.error&&(0,a.jsx)("p",{className:"mt-2 rounded bg-red-500/5 px-2 py-1 text-xs text-red-600 dark:text-red-400",children:e.error}),e.screenshotPath&&(0,a.jsxs)("p",{className:"mt-2 truncate text-xs text-muted-foreground",title:e.screenshotPath,children:[(0,a.jsx)("span",{className:"font-medium text-foreground/70",children:"Evidence:"})," ",e.screenshotPath]})]})]},r)})})}var eS=s(45234),eE=s(72835),eP=s(93285),eT=s(4869),eI=s(81562);let eR=new Set(["http_404","http_410","closed_marker","redirect_away","manual"]);function eD(e){let{applicationId:t,isActive:s,lastSeenAt:r,lastCheckedAt:n,listingClosedAt:i,listingClosedReason:l,checkEnabled:o=!1}=e,{toast:c}=(0,eP.dj)(),u=function(e){let t=(0,eT.jE)();return(0,eI.n)({mutationFn:()=>(0,eo.Em)("/api/applications/".concat(encodeURIComponent(e),"/check-listing"),{method:"POST"}),onSuccess:()=>{t.invalidateQueries({queryKey:["application",e]})}})}(t),{mutate:x}=u,m=function(e,t){if(!1===e.isActive)return e.listingClosedReason&&eR.has(e.listingClosedReason)?"closed":"possibly_closed";if(!0===e.isActive){let s=e.lastCheckedAt?Date.parse(e.lastCheckedAt):NaN;if(!Number.isNaN(s)&&t-s<=6048e5)return"live"}return"hidden"}({isActive:s,lastCheckedAt:n,listingClosedReason:l},Date.now()),h=(0,w.useCallback)(()=>{x(void 0,{onSuccess:e=>{c(e.available?"success":"info",e.available?"Listing is still live.":"This listing is no longer available.")},onError:()=>{c("error","Couldn't check the listing right now. Please try again.")}})},[x,c]);if("hidden"===m)return null;let p=function(e,t){switch(e){case"closed":return{label:"No longer listed",ariaLabel:"This job listing is no longer available",detail:t.listingClosedAt?"Closed ".concat((0,J.Yq)(t.listingClosedAt)):null,className:"bg-red-100 px-2.5 py-0.5 text-red-800",Icon:eE.A};case"possibly_closed":return{label:"Possibly closed",ariaLabel:"This job listing may no longer be available",detail:t.lastSeenAt?"Not seen since ".concat((0,J.Yq)(t.lastSeenAt)):null,className:"bg-amber-100 px-2.5 py-0.5 text-amber-800",Icon:d.A};case"live":return{label:"Listing verified live",ariaLabel:"This job listing was recently verified as live",detail:t.lastCheckedAt?(0,J.om)(t.lastCheckedAt):null,className:"px-0 py-0 text-muted-foreground",Icon:ew.A}}}(m,{lastSeenAt:r,lastCheckedAt:n,listingClosedAt:i}),g="listing-check-coming-soon";return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",role:"group","aria-label":p.ariaLabel,children:[(0,a.jsxs)("span",{className:(0,I.cn)("inline-flex items-center gap-1.5 rounded-full text-xs font-semibold",p.className),children:[(0,a.jsx)(p.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),p.label]}),p.detail&&(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:p.detail}),(0,a.jsxs)("button",{type:"button",onClick:h,disabled:!o||u.isPending,"aria-label":"Check listing availability now","aria-describedby":o?void 0:g,title:o?"Re-check this listing now":"Live re-check is coming soon",className:(0,I.cn)("inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs font-medium text-foreground","transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-60"),children:[(0,a.jsx)(eS.A,{className:(0,I.cn)("h-3.5 w-3.5",u.isPending&&"animate-spin"),"aria-hidden":"true"}),u.isPending?"Checking…":"Check now"]}),!o&&(0,a.jsx)("span",{id:g,className:"text-xs italic text-muted-foreground",children:"Coming soon"})]})}var eL=s(54925),eM=s(31126);function eU(e){var t;let{applicationId:s,coPilotPaused:r,escalationBlocker:i,status:l,appliedAt:o}=e,{data:c,isLoading:u,isError:x,refetch:m,isFetching:h}=(0,j.Ec)(s),[p,g]=(0,w.useState)(!1),[b,f]=(0,w.useState)(!1);if(u)return null;let v=!("applied"===l||o)&&!0===r,N=v?"Paused Tab Evidence":"Submission Evidence";if(x)return(0,a.jsx)(y.Z,{title:N,icon:eL.A,children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",role:"alert",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(d.A,{className:"h-4 w-4 text-amber-500"}),(0,a.jsxs)("span",{children:["Couldn't load the ",v?"paused-tab":"submission"," screenshot."]})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>void m(),className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-brand-400","aria-label":"Retry loading submission screenshot",children:[(0,a.jsx)(eM.A,{className:"h-3.5 w-3.5 ".concat(h?"animate-spin":"")})," Retry"]})]})});let k=null!=(t=null==c?void 0:c.screenshotUrl)?t:null;return k?(0,a.jsxs)(y.Z,{title:N,icon:eL.A,children:[(0,a.jsxs)("p",{className:"mb-3 text-sm text-muted-foreground",children:[v?i?({submit:"Captured when your paired browser paused before Submit — nothing has been submitted yet",captcha:"Captured when your paired browser paused on a CAPTCHA check",login:"Captured when your paired browser paused on a sign-in step",mfa:"Captured when your paired browser paused on a verification step",review:"Captured when your paired browser paused before submission so you could check the application details — nothing has been submitted yet"})[i]:"Captured when your paired browser paused on a step only you can complete":"Captured by your paired browser when it submitted this application",(null==c?void 0:c.capturedAt)?" on ".concat((0,J.Yq)(c.capturedAt)):"","."]}),(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-xl border border-border bg-muted/30",children:[!b&&!p&&(0,a.jsx)("div",{className:"aspect-video w-full animate-pulse bg-muted","aria-hidden":"true"}),p?(0,a.jsxs)("div",{className:"flex aspect-video w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground",role:"alert",children:[(0,a.jsx)(d.A,{className:"h-6 w-6 text-amber-500"}),(0,a.jsx)("span",{children:"The screenshot link expired. Refresh to view it again."}),(0,a.jsxs)("button",{type:"button",onClick:()=>{g(!1),f(!1),m()},className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 font-medium text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-brand-400",children:[(0,a.jsx)(eM.A,{className:"h-3.5 w-3.5"})," Refresh"]})]}):(0,a.jsx)(n.P.a,{href:k,target:"_blank",rel:"noopener noreferrer",initial:{opacity:0}
1,animate:{opacity:+!!b},transition:{duration:.3},className:"block focus:outline-none focus:ring-2 focus:ring-brand-400","aria-label":v?"Open paused-tab screenshot full size in a new tab":"Open submission screenshot full size in a new tab",children:(0,a.jsx)("img",{src:k,alt:v?v&&("submit"===i||"review"===i)?"Screenshot of the application form your paired browser paused on, before Submit":"Screenshot of the page your paired browser paused on":"Screenshot of the submitted job application confirmation",className:"w-full cursor-zoom-in",onLoad:()=>f(!0),onError:()=>g(!0)})})]})]}):null}var eq=s(8635),e_=s(74624),eF=s(16377);function eO(e){let{coPilotPaused:t,escalationBlocker:s,pausedSince:r,pauseExpiresAt:n,now:i}=e,[l,d]=(0,w.useState)(()=>null!=i?i:Date.now()),o=void 0!==i,c=function(e,t){if(!e.coPilotPaused)return"hidden";let s=e.pauseExpiresAt?Date.parse(e.pauseExpiresAt):NaN;return!Number.isNaN(s)&&t>s?"expired":"live"}({coPilotPaused:t,escalationBlocker:s,pausedSince:r,pauseExpiresAt:n},o?i:l),u=!o&&"live"===c&&!!n;if((0,w.useEffect)(()=>{if(!u)return;let e=setInterval(()=>d(Date.now()),3e4);return()=>clearInterval(e)},[u]),"hidden"===c)return null;let x=(0,eF.Ud)(s),m="expired"===c,h=m?"".concat(x.headline," — expired"):x.headline,p=m?"This paused attempt timed out, so the co-pilot is no longer waiting. You can apply directly using the details below.":x.detail,g=m?"No longer waiting: ".concat(h):"Action needed: ".concat(h);return(0,a.jsxs)("div",{role:"status","aria-live":"polite","aria-label":g,tabIndex:0,className:(0,I.cn)("flex flex-col gap-1.5 rounded-lg border p-3","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",m?"border-border bg-muted":"border-amber-400 bg-amber-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(eq.A,{className:(0,I.cn)("h-4 w-4 shrink-0",m?"text-muted-foreground":"text-amber-800"),"aria-hidden":"true"}),(0,a.jsx)("span",{className:(0,I.cn)("text-sm font-semibold",m?"text-foreground":"text-amber-900"),children:h})]}),(0,a.jsx)("p",{className:(0,I.cn)("text-xs",m?"text-muted-foreground":"text-amber-900"),children:p}),r&&(0,a.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,a.jsx)(e_.A,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),(0,a.jsxs)("span",{children:["Paused ",(0,J.om)(r)]})]})]})}
1var eY=s(46552);let eB=[{id:"overview",label:"Overview",icon:i.A},{id:"research",label:"Research",icon:l.A},{id:"scores",label:"Scores",icon:i.A},{id:"gaps",label:"Gaps",icon:d.A},{id:"interview",label:"Interview Prep",icon:o.A},{id:"networking",label:"Networking",icon:u},{id:"conversation",label:"Conversation",icon:x.A},{id:"followups",label:"Follow-ups",icon:m.A},{id:"negotiation",label:"Negotiation",icon:h.A},{id:"calendar",label:"Calendar",icon:p.A},{id:"logs",label:"Activity",icon:g.A}];function ez(){let{id:e}=(0,r.g)(),{data:t,isLoading:s,error:i,refetch:l}=(0,j.YY)(e),d=(0,j.Dq)(),o=(0,v.pq)();if((0,j.Ec)(e),s)return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-8",children:(0,a.jsx)(ef.O0,{lines:2})}),(0,a.jsx)(ef.O0,{lines:8})]});if(i||!t)return(0,a.jsxs)("div",{children:[(0,a.jsxs)(r.N_,{to:"/",className:"mb-4 inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(b.A,{className:"h-4 w-4"})," Back to Dashboard"]}),(0,a.jsx)(ej.W,{message:"Failed to load application details.",onRetry:()=>void l()})]});let c=!1===t.isActive,u=(0,eY.s)(t.url);return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.P.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.2},children:(0,a.jsxs)(r.N_,{to:"/",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(b.A,{className:"h-4 w-4"})," Back to Dashboard"]})}),(0,a.jsxs)(n.P.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:t.title}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t.company})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(E.C,{score:t.score,size:"md"}),(0,a.jsx)(S,{currentStatus:t.status,onStatusChange:e=>d.mutate({id:t.id,status:e})})]})]}),(0,a.jsx)(eO,{coPilotPaused:t.coPilotPaused,escalationBlocker:t.escalationBlocker,pausedSince:t.pausedSince,pauseExpiresAt:t.pauseExpiresAt}),(0,a.jsx)(eD,{applicationId:t.id,isActive:t.isActive,lastSeenAt:t.lastSeenAt,lastCheckedAt:t.lastCheckedAt,listingClosedAt:t.listingClosedAt,listingClosedReason:t.listingClosedReason}),(0,a.jsx)(eU,{applicationId:t.id,status:t.status,appliedAt:t.appliedAt,coPilotPaused:t.coPilotPaused,escalationBlocker:t.escalationBlocker}),(0,a.jsx)(n.P.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.1,duration:.4},children:(0,a.jsx)(N.K,{tabs:[...eB],defaultTab:"overview",children:e=>{switch(e){case"overview":return(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,a.jsx)(y.Z,{title:"Job Details",children:(0,a.jsxs)("dl",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Company"}),(0,a.jsx)("dd",{className:"font-medium text-foreground",children:t.company})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Title"}),(0,a.jsx)("dd",{className:"font-medium text-foreground",children:t.title})]}),t.location&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Location"}),(0,a.jsx)("dd",{className:"text-foreground",children:t.location})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Status"}),(0,a.jsx)("dd",{children:(0,a.jsx)(S,{currentStatus:t.status,onStatusChange:e=>d.mutate({id:t.id,status:e})})})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Discovered"}),(0,a.jsx)("dd",{className:"text-foreground",children:(0,J.Yq)(t.createdAt)})]}),t.appliedAt&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Applied"}),(0,a.jsx)("dd",{className:"text-foreground",children:(0,J.Yq)(t.appliedAt)})]}),u&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Listing"}),(0,a.jsx)("dd",{children:(0,a.jsxs)("a",{href:u,target:"_blank",rel:"noopener noreferrer",title:c?"This listing appears to be closed — it may no longer be reachable":void 0,"aria-label":c?"Vie
1w original listing (listing appears closed)":"View original listing",className:(0,I.cn)("inline-flex items-center gap-1.5 text-sm font-medium",c?"text-muted-foreground line-through hover:text-foreground":"text-brand-600 hover:text-brand-700"),children:[(0,a.jsx)(f.A,{className:"h-4 w-4","aria-hidden":"true"})," View Original Listing"]})})]})]})}),(0,a.jsx)(y.Z,{title:"Score",children:t.scores?(0,a.jsx)(R,{overall:t.scores.overall,breakdown:t.scores.breakdown}):(0,a.jsxs)("div",{className:"flex flex-col items-center py-8",children:[(0,a.jsx)(E.C,{score:t.score,size:"lg"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Detailed breakdown pending"})]})})]});case"research":return(0,a.jsx)(U,{research:t.research});case"scores":return t.scores?(0,a.jsx)(R,{overall:t.scores.overall,breakdown:t.scores.breakdown}):(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"No score data available yet."});case"gaps":return(0,a.jsx)(B,{gaps:t.gaps});case"interview":var s;return(0,a.jsx)(z.Q,{prep:(s=t.interviewPrep)?{id:"",jobId:"",companyBriefing:s.briefing,rolePriorities:[],interviewProcess:{stages:[],format:[],typical_timeline:null,notes:null},gapTalkingPoints:[],likelyQuestions:s.questions.map(e=>{var t;return{question:e.question,category:e.category||"general",suggestedAnswer:null!=(t=e.suggestedAnswer)?t:""}}),keyTalkingPoints:s.talkingPoints.map(e=>({theirRequirement:"",myExperience:e,specificExample:null})),salaryBenchmark:s.salaryBenchmark?{min:s.salaryBenchmark.min,median:s.salaryBenchmark.median,max:s.salaryBenchmark.max,currency:"GBP",source:"",notes:null}:null,generatedAt:new Date().toISOString()}:null,jobId:t.id,onRegenerate:()=>o.mutate(t.id),isRegenerating:o.isPending});case"networking":return(0,a.jsx)(V,{contacts:t.networking});case"conversation":return(0,a.jsx)(ei,{applicationId:t.id});case"followups":return(0,a.jsx)(ee,{followUps:t.followUps});case"negotiation":return(0,a.jsx)(ea,{negotiation:t.negotiation});case"calendar":return(0,a.jsx)(eh,{events:t.calendarEvents,applicationId:t.id});case"logs":return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(y.Z,{title:"Status timeline",children:(0,a.jsx)(ev,{applicationId:t.id})}),(0,a.jsx)(y.Z,{title:"Attempt timeline",children:(0,a.jsxs)("details",{className:"group",children:[(0,a.jsxs)("summary",{className:"cursor-pointer list-none text-sm font-medium text-brand-600 hover:text-brand-500 dark:text-brand-400",children:[(0,a.jsx)("span",{className:"group-open:hidden",children:"Show apply attempt traces"}),(0,a.jsx)("span",{className:"hidden group-open:inline",children:"Hide apply attempt traces"})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(eC,{applicationId:t.id})})]})}),(0,a.jsx)(ep,{entries:t.decisionLog})]});default:return null}}})})]})}},74624:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(92068).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},89886:(e,t,s)=>{s.d(t,{d:()=>c});var a=s(54568),r=s(99100),n=s(96886),i=s(12598),l=s(19760),d=s(20855),o=s(64980);function c(e){var t;let{metric:s,used:c,limit:u,onDismiss:x}=e,{checkout:m,isPending:h}=(0,o.Q5)(),{isFreeTier:p}=(0,o.Rs)(),{data:g}=(0,o.jC)(),b=p?"starter":"pro",f=(null!=g?g:[]).find(e=>e.tier===b),j=null!=(t=null==f?void 0:f.stripePriceIdAnnual)?t:"";return(0,a.jsx)(r.N,{children:(0,a.jsxs)(n.P.div,{"data-testid":"upgrade-prompt",initial:{y:80,opacity:0},animate:{y:0,opacity:1},exit:{y:80,opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"fixed bottom-6 left-1/2 z-50 w-full max-w-sm -translate-x-1/2 rounded-xl border border-gray-200 dark:border-white/10 bg-white/95 dark:bg-gray-900/95 p-4 shadow-2xl backdrop-blur-md",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("p",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:["You've used ",c,"/",u," ",s," this month"]}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-gray-600 dark:text-white/50",children:["Upgrade to ",p?"Starter for 8\xd7 more capacity":"Pro for unlimited capacity","."]})]}),(0,a.jsx)("button",{type:"button",onClick:x,className:"rounded-md p-1 text-gray-500 dark:text-white/40 transition-colors hover:text-gray-900 dark:hover:text-white/70","aria-label":"Dismiss",children:(0,a.jsx)(i.A,{className:"h-4 w-4"})})]}),(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>j&&m(j,b),disabled:h||!j,className:"inline-flex flex-1 items-center justify-center gap-1.5 rounded-lg bg-brand-600 px-3 py-2 text-xs font-semibold text-white transition-colors hover:bg-brand-500 disabled:opacity-60",children:[h?"Redirecting…":p?"Upgrade to Starter":"Upgrade to Pro",!h&&(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"})]}),(0,a.jsx)("button",{type:"button",onClick:x,className:"px-2 py-2 text-xs text-gray-600 dark:text-white/40 transition-colors hover:text-gray-900 dark:hover:text-white/60",children:"Later"})]}),(0,a.jsx)(d.N_,{to:"/pricing",className:"text-center text-xs text-gray-600 dark:text-white/30 transition-colors hover:text-gray-900 dark:hover:text-white/60",onClick:x,children:"View all plans →"})]})]})})}},95593:(e,t,s)=>{s.d(t,{K:()=>i});var a=s(54568),r=s(7620),n=s(67908);function i(e){var t,s;let{tabs:i,children:l,defaultTab:d,activeTab:o,onTabChange:c,className:u}=e,[x,m]=(0,r.useState)(null!=(s=null!=d?d:null==(t=i[0])?void 0:t.id)?s:""),h=void 0!==o,p=h?o:x;(0,r.useEffect)(()=>{h&&o!==x&&m(o)},[h,o,x]);let g=(0,r.useCallback)(e=>{h||m(e),null==c||c(e)},[h,c]),b=(0,r.useRef)(new Map),f=(0,r.useCallback)(e=>t=>{t?b.current.set(e,t):b.current.delete(e)},[]),j=(0,r.useCallback)(e=>{let t=i.findIndex(e=>e.id===p),s=null;if("ArrowRight"===e.key?s=(t+1)%i.length:"ArrowLeft"===e.key?s=(t-1+i.length)%i.length:"Home"===e.key?s=0:"End"===e.key&&(s=i.length-1),null!==s){var a;e.preventDefault();let t=i[s];g(t.id),null==(a=b.current.get(t.id))||a.focus()}},[i,p,g]);return(0,a.jsxs)("div",{className:u,children:[(0,a.jsx)("div",{className:"border-b border-gray-200 dark:border-gray-700",role:"tablist","aria-label":"Tabs",children:(0,a.jsx)("nav",{className:"-mb-px flex space-x-4 overflow-x-auto sm:space-x-6","aria-label":"Tabs",children:i.map(e=>{let t=e.id===p;return(0,a.jsxs)("button",{ref:f(e.id),role:"tab","aria-selected":t,"aria-controls":"tabpanel-".concat(e.id),tabIndex:t?0:-1,onClick:()=>g(e.id),onKeyDown:j,className:(0,n.cn)("flex shrink-0 items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",t?"border-brand-500 text-brand-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:border-gray-600 dark:hover:text-gray-300"),type:"button",children:[e.icon&&(0,a.jsx)(e.icon,{className:"h-4 w-4"}),e.label]},e.id)})})}),(0,a.jsx)("div",{role:"tabpanel",id:"tabpanel-".concat(p),tabIndex:0,className:"pt-6",children:l(p)})]})}}}]);

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.