1import{r as o,j as e,ah as T,L as y,H as I,p as j,C as _,B as N,ak as f,f as A,c as D,s as J,y as S,N as F,at as P,U as B,F as E}from"./index-CSNO-dh3.js";import{M as q}from"./map-pin-hg3zu9YT.js";import{B as w}from"./briefcase-D0EfF_QJ.js";import{f as $}from"./formatDistanceToNow-DUuIDd7A.js";import{S as z,a as M}from"./SEO-D42vEv_a.js";import{u as U}from"./useSEO-p118V3Yh.js";import{c as O,l as R,a as Q}from"./schemas-Bk_Efo84.js";import{u as V}from"./ssrLoaderData-Dwalzlr6.js";import{P as k}from"./plus-Bsk6oQQL.js";import"./endOfMonth-CFibeA8s.js";const L=o.forwardRef(({className:m,variant:d="default",delay:a=0,children:x,...r},u)=>{const[t,h]=o.useState(!1),l=o.useRef(null);o.useEffect(()=>{const n=new IntersectionObserver(([c])=>{c.isIntersecting&&(setTimeout(()=>h(!0),a),n.disconnect())},{threshold:.1});return l.current&&n.observe(l.current),()=>n.disconnect()},[a]);const g="scroll-reveal rounded-[5px] transition-all duration-300 ease-out",v={default:"bg-card border border-border",hover:"bg-card border border-border hover:-translate-y-1 hover:border-primary/30 hover:shadow-lg hover:shadow-primary/5",minimal:"bg-transparent hover:bg-muted/30"};return e.jsx("div",{ref:l,className:T(g,v[d],t&&"revealed",m),...r,children:x})});L.displayName="AnimatedCard";const H=({title:m,company:d,companyLogoUrl:a,location:x,jobType:r,experienceLevel:u,skills:t,createdAt:h,slug:l})=>{const g=r.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "),v=u.charAt(0).toUpperCase()+u.slice(1);return e.jsx(y,{to:`/jobs/${l}`,children:e.jsxs(L,{variant:"hover",className:"p-6 h-full flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg font-normal mb-2 truncate",children:m}),e.jsxs("div",{className:"flex flex-col gap-2 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[a?e.jsx("img",{src:a,alt:d,className:"h-4 w-4 rounded-full object-cover flex-shrink-0"}):e.jsx(I,{className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:d})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:x})]})]})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(j,{variant:"secondary",className:"text-xs",children:[e.jsx(w,{className:"h-3 w-3 mr-1"}),g]}),e.jsx(j,{variant:"outline",className:"text-xs",children:v})]}),t.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.slice(0,4).map((n,c)=>e.jsx(j,{variant:"secondary",className:"text-xs",children:n},c)),t.length>4&&e.jsxs(j,{variant:"secondary",className:"text-xs",children:["+",t.length-4," more"]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-auto pt-4 border-t border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(_,{className:"h-3 w-3"}),e.jsx("span",{children:$(new Date(h),{addSuffix:!0})})]}),e.jsx(N,{variant:"ghost",size:"sm",children:"View Details"})]})]})})},K=()=>e.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[e.jsx(f,{className:"h-48 w-full rounded-md"}),e.jsx(f,{className:"h-6 w-3/4"}),e.jsx(f,{className:"h-4 w-full"}),e.jsx(f,{className:"h-4 w-5/6"}),e.jsxs("div",{className:"flex justify-between items-center pt-4",children:[e.jsx(f,{className:"h-4 w-20"}),e.jsx(f,{className:"h-10 w-24"})]})]});function G(){const{user:m}
1=A(),d=V("/jobs/")?.jobs,[a,x]=o.useState(""),[r,u]=o.useState(null),[t,h]=o.useState(null),{data:l,isLoading:g}=D({queryKey:["jobs",a,r,t],queryFn:async()=>{let s=J.from("jobs").select("*").eq("status","open").order("created_at",{ascending:!1});a&&(s=s.or(`title.ilike.%${a}%,company.ilike.%${a}%,location.ilike.%${a}%`)),r&&(s=s.eq("job_type",r)),t&&(s=s.eq("experience_level",t));const{data:p,error:b}=await s;if(b)throw b;return p},initialData:!a&&!r&&!t&&d?.length?d:void 0}),v=[{value:"full-time",label:"Full Time"},{value:"part-time",label:"Part Time"},{value:"contract",label:"Contract"},{value:"internship",label:"Internship"},{value:"freelance",label:"Freelance"}],n=[{value:"entry",label:"Entry Level"},{value:"mid",label:"Mid Level"},{value:"senior",label:"Senior"},{value:"executive",label:"Executive"}],c=U({pageType:"static",pageIdentifier:"jobs",fallback:{title:"AI & Data Science Jobs",description:"Find your next AI, Machine Learning, or Data Science role. Post jobs and connect with top talent.",ogImage:`${S()}/favicon.png`}}),C=o.useMemo(()=>{const s=O([{name:"Home",url:"/"},{name:"Jobs",url:"/jobs"}]),p=(l||[]).slice(0,20).map(i=>R({title:i.title,description:i.description||i.title,company:i.company,location:i.location,jobType:i.job_type,experienceLevel:i.experience_level,datePosted:i.created_at,companyLogoUrl:i.company_logo_url||void 0,slug:i.slug,skills:i.skills})),b=p.length>0?Q(p,"AI & Data Science Jobs",`${S()}/jobs`):null;return b?[s,b]:[s]},[l]);return e.jsxs(e.Fragment,{children:[e.jsx(z,{title:c.metaTitle,description:c.metaDescription,canonical:c.canonicalUrl||"/jobs",ogImage:c.ogImage,keywords:c.metaKeywords,noindex:c.noindex,schema:c.schemaData}),e.jsx(M,{schema:C}),e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(F,{}),e.jsx("div",{className:"border-b bg-background/95 backdrop-blur-sm supports-[backdrop-filter]:bg-background/60 sticky top-16 z-40",children:e.jsx("div",{className:"container mx-auto px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(w,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"text-xl font-normal",children:"AI & Data Science Jobs"})]}),m&&e.jsx(y,{to:"/jobs/new",children:e.jsxs(N,{size:"sm",className:"gap-2",children:[e.jsx(k,{className:"h-4 w-4"}),"Post a Job"]})})]})})}),e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"container mx-auto px-4 py-6",children:e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("aside",{className:"w-64 shrink-0 sticky top-32 h-fit space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-muted-foreground mb-2 block",children:"Search"}),e.jsxs("div",{className:"relative",children:[e.jsx(P,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(B,{type:"text",placeholder:"Title, company, location...",value:a,onChange:s=>x(s.target.value),className:"pl-9 h-9"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-muted-foreground mb-2 block",children:"Job Type"}),e.jsx("div",{className:"flex flex-col gap-1.5",children:v.map(s=>e.jsx(j,{variant:r===s.value?"default":"outline",className:"cursor-pointer justify-start hover:bg-accent transition-colors",onClick:()=>u(r===s.value?null:s.value),children:s.label},s.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-muted-foreground mb-2 block",children:"Experience Level"}),e.jsx("div",{className:"flex flex-col gap-1.5",children:n.map(s=>e.jsx(j,{variant:t===s.value?"default":"outline",className:"cursor-pointer justify-start hover:bg-accent transition-colors",onClick:()=>h(t===s.value?null:s.value),children:s.label},s.value))})]}),(a||r||t)&&e.jsx(N,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{x(""),u(null),h(null)},children:"Clear All Filters"})]}),e.jsx("div",{className:"flex-1 min-w-0",children:g?e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:[...Array(6)].map((s,p)=>e.jsx(K,{},p))}):l&&l.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 text-sm text-muted-foreground",children:[l.length," ",l.length===1?"position":"positions"]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:l.map(s=>e.jsx(H,{id:s.id,title:s.title,company:s.company,companyLogoUrl:s.company_logo_url,location:s.location,jobType:s.job_type,experienceLevel:s.experience_level,skills:s.skills,createdAt:s.created_at,
1slug:s.slug},s.id))})]}):e.jsxs("div",{className:"text-center py-16",children:[e.jsx(w,{className:"h-12 w-12 text-muted-foreground mx-auto mb-3"}),e.jsx("h3",{className:"text-lg font-normal mb-2",children:"No jobs found"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:a||r||t?"Try adjusting your filters":"Be the first to post a job"}),m&&e.jsx(y,{to:"/jobs/new",children:e.jsxs(N,{size:"sm",children:[e.jsx(k,{className:"h-4 w-4 mr-2"}),"Post a Job"]})})]})})]})})}),e.jsx(E,{})]})]})}const ce=G;export{ce 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.