PageSourceSearch

https://hireeing.com/assets/inbox-0vyioI_c.js

js hireeing.com collected 2026-09-24 14:45:32 UTC 9,009 bytes, 1 lines download raw bytes

1import{a$ as L,bw as m,c3 as D,c2 as V,bk as e,a1 as j,c4 as B,a5 as G,I as q,aW as y,a_ as K,b0 as T,$ as O,aU as g,av as U,c8 as Y,X as H,Y as J,f as b,l as C,g as k,h as X,J as W,b as Q,bm as Z,bX as _,aD as ee,aG as ae,bn as se}from"./index-BdR958M7.js";import{B as te}from"./badge-DB8vyzPB.js";import{R as re}from"./refresh-cw-BAIXrhyY.js";import{I as ne,B as ie}from"./inbox-DYKr_y0y.js";import{C as oe}from"./clock-Bt04igQc.js";import{M as le}from"./mail-CLTAquLD.js";import{M as ce}from"./message-square-BD64A3yK.js";import{C as de}from"./circle-check-CP3bf0X1.js";import{F as ue}from"./file-check-BMPtJPc7.js";const me=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],xe=L("star",me);var N="Tabs",[pe]=K(N,[T]),A=T(),[fe,w]=pe(N),M=m.forwardRef((a,r)=>{const{__scopeTabs:t,value:n,onValueChange:i,defaultValue:d,orientation:o="horizontal",dir:u,activationMode:p="automatic",...f}=a,c=D(u),[l,x]=V({prop:n,onChange:i,defaultProp:d??"",caller:N});return e.jsx(fe,{scope:t,baseId:B(),value:l,onValueChange:x,orientation:o,dir:c,activationMode:p,children:e.jsx(j.div,{dir:c,"data-orientation":o,...f,ref:r})})});M.displayName=N;var R="TabsList",z=m.forwardRef((a,r)=>{const{__scopeTabs:t,loop:n=!0,...i}=a,d=w(R,t),o=A(t);return e.jsx(G,{asChild:!0,...o,orientation:d.orientation,dir:d.dir,loop:n,children:e.jsx(j.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:r})})});z.displayName=R;var I="TabsTrigger",S=m.forwardRef((a,r)=>{const{__scopeTabs:t,value:n,disabled:i=!1,...d}=a,o=w(I,t),u=A(t),p=P(o.baseId,n),f=$(o.baseId,n),c=n===o.value;return e.jsx(q,{asChild:!0,...u,focusable:!i,active:c,children:e.jsx(j.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":f,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...d,ref:r,onMouseDown:y(a.onMouseDown,l=>{!i&&l.button===0&&l.ctrlKey===!1?o.onValueChange(n):l.preventDefault()}),onKeyDown:y(a.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&o.onValueChange(n)}),onFocus:y(a.onFocus,()=>{const l=o.activationMode!=="manual";!c&&!i&&l&&o.onValueChange(n)})})})});S.displayName=I;var F="TabsContent",he=m.forwardRef((a,r)=>{const{__scopeTabs:t,value:n,forceMount:i,children:d,...o}=a,u=w(F,t),p=P(u.baseId,n),f=$(u.baseId,n),c=n===u.value,l=m.useRef(c);return m.useEffect(()=>{const x=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(x)},[]),e.jsx(O,{present:i||c,children:({present:x})=>e.jsx(j.div,{"data-state":c?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!x,id:f,tabIndex:0,...o,ref:r,style:{...a.style,animationDuration:l.current?"0s":void 0},children:x&&d})})});he.displayName=F;function P(a,r){return`${a}-trigger-${r}`}function $(a,r){return`${a}-content-${r}`}var ge=M,ve=z,be=S;const je=ge;function Ne({className:a,...r}){return e.jsx(ve,{className:g("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center gap-1 rounded-lg p-1",a),...r})}function v({className:a,...r}){return e.jsx(be,{className:g("inline-flex items-center justify-center gap-1.5 rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all outline-none [&_svg]:size-4","focus-visible:ring-ring/40 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-soft",a),...r})}function ye(a){const r=Date.now()-new Date(a).getTime(),t=Math.floor(r/6e4);if(t<1)return"Just now";if(t<60)return`${t}m ago`;const n=Math.floor(t/60);if(n<24)return`${n}h ago`;const i=Math.floor(n/24);return i===1?"Yesterday":`${i}d ago`}function we(a){switch(a){case"approval_required":return e.jsx(ue,{className:"text-primary size-5"});case"application_submitted":return e.jsx(de,{className:"size-5 text-emerald-500"});case"application_blocked":return e.jsx(ae,{className:"size-5 text-rose-500"});
1case"recruiter_outreach":return e.jsx(ce,{className:"text-primary size-5"});case"match_digest":case"new_matches":return e.jsx(ee,{className:"size-5 text-purple-500"});case"dream_company_job":return e.jsx(xe,{className:"size-5 text-amber-500"});default:return e.jsx(ie,{className:"text-muted-foreground size-5"})}}function Se(){const{notifications:a}=U.useLoaderData(),r=Y(),[t,n]=m.useState("all"),[i,d]=m.useState(!1),[o,u]=m.useState(!1);async function p(){d(!0);try{await r.invalidate()}finally{d(!1)}}async function f(){u(!0);try{await Z(),_.success("All notifications marked as read"),await r.invalidate()}catch{_.error("Failed to mark notifications as read")}finally{u(!1)}}async function c(s){try{await se({data:{notificationId:s}}),await r.invalidate()}catch{}}const l=m.useMemo(()=>a.filter(s=>!s.read).length,[a]),x=m.useMemo(()=>a.filter(s=>t==="unread"?!s.read:t==="applications"?s.type==="approval_required"||s.type==="application_submitted"||s.type==="application_blocked":t==="messages"?s.type==="recruiter_outreach":t==="matches"?s.type==="match_digest"||s.type==="new_matches"||s.type==="dream_company_job":!0),[a,t]);return e.jsxs(H,{children:[e.jsx(J,{title:"Activity & Notifications",description:"Real-time alerts for application approval gates, recruiter direct messages, and high-signal job matches.",actions:e.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&e.jsxs(b,{variant:"outline",size:"sm",onClick:f,disabled:o,className:"h-8 gap-1.5 text-xs",children:[e.jsx(C,{className:"size-3.5"})," Mark all read"]}),e.jsxs(b,{variant:"outline",size:"sm",onClick:p,disabled:i,className:"h-8 gap-1.5 text-xs",children:[e.jsx(re,{className:g("size-3.5",i&&"animate-spin")}),"Refresh"]})]})}),e.jsx("div",{className:"mt-6",children:e.jsx(je,{value:t,onValueChange:s=>n(s),children:e.jsxs(Ne,{className:"grid w-full max-w-xl grid-cols-5",children:[e.jsxs(v,{value:"all",className:"text-xs",children:["All (",a.length,")"]}),e.jsxs(v,{value:"unread",className:"text-xs",children:["Unread ",l>0&&`(${l})`]}),e.jsx(v,{value:"applications",className:"text-xs",children:"Applications"}),e.jsx(v,{value:"messages",className:"text-xs",children:"Messages"}),e.jsx(v,{value:"matches",className:"text-xs",children:"Matches"})]})})}),e.jsx("div",{className:"mt-6 space-y-3",children:x.length===0?e.jsxs(k,{className:"p-12 text-center",children:[e.jsx(ne,{className:"text-muted-foreground/40 mx-auto mb-3 size-10"}),e.jsx("h4",{className:"text-base font-semibold text-foreground",children:t==="unread"?"All caught up!":"No notifications in this view"}),e.jsx("p",{className:"text-muted-foreground mx-auto mt-1 max-w-sm text-xs",children:t==="unread"?"You have read all your application updates and candidate messages.":"Activity and alerts will appear here as your job matches and applications progress."})]}):x.map(s=>{const h=!s.read,E=s.link||"/app/applications";return e.jsx(k,{className:g("transition-all hover:border-foreground
1/20 hover:shadow-xs",h&&"border-primary/40 bg-primary/5"),children:e.jsxs(X,{className:"flex flex-col gap-3 p-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3.5 min-w-0 flex-1",children:[e.jsx("div",{className:g("flex size-9 shrink-0 items-center justify-center rounded-lg border bg-card p-1.5 shadow-xs",h?"border-primary/30":"border-border"),children:we(s.type)}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:g("text-sm font-semibold",h?"text-foreground font-bold":"text-foreground/90"),children:s.title}),h&&e.jsx("span",{className:"size-2 rounded-full bg-primary shrink-0"}),e.jsx(te,{variant:"outline",className:"text-[10px] capitalize",children:s.type.replace(/_/g," ")})]}),e.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed",children:s.body}),e.jsxs("div",{className:"text-muted-foreground/75 flex items-center gap-2 pt-0.5 text-[11px]",children:[e.jsx(oe,{className:"size-3"}),e.jsx("span",{children:s.createdAt?ye(s.createdAt):"Recently"}),s.emailSent&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"•"}),e.jsxs("span",{className:"flex items-center gap-1 text-emerald-600 dark:text-emerald-400",children:[e.jsx(le,{className:"size-3"})," Email delivered"]})]})]})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2 self-end sm:self-start",children:[h&&e.jsxs(b,{variant:"ghost",size:"sm",onClick:()=>c(s.id),className:"h-7 text-xs",children:[e.jsx(C,{className:"size-3 mr-1"})," Mark read"]}),e.jsx(b,{asChild:!0,size:"sm",variant:h?"default":"outline",className:"h-7 text-xs gap-1",onClick:()=>c(s.id),children:e.jsxs(W,{to:E,children:["Open ",e.jsx(Q,{className:"size-3"})]})})]})]})},s.id)})})]})}export{Se as component};

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.