PageSourceSearch

https://tryconnekt.com/assets/apply-BfgoL9oX.js

js tryconnekt.com collected 2026-09-24 14:55:05 UTC 8,141 bytes, 1 lines download raw bytes

1import{c as O,r as a,j as e}from"./index-DvxR_SoY.js";import{l as W,a as J,c as F}from"./index-CcyIbcaG.js";import{a as K,b as Q,F as V}from"./applicants-BWzZ2pIk.js";import{A as Z}from"./api-Cn2saL-5.js";import{S as c,B as g,T as I,X as ee}from"./button-hiNaJy4v.js";import{C as te,L as u,I as f}from"./label-BQbi8IY6.js";import{c as L}from"./createLucideIcon-CqtfHR-z.js";import{S as se}from"./shield-check-CVjiZtad.js";const P={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};P.node;const ae=L(P);const A={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};A.node;const re=L(A),ne=10*1024*1024;function w(t){return t?t.type!=="application/pdf"?`${t.name} isn't a PDF — only PDF files are accepted.`:t.size>ne?`${t.name} is larger than 10MB.`:null:null}function E({children:t}){return e.jsxs("div",{role:"alert",className:"flex items-start gap-2.5 rounded-lg border border-destructive/30 bg-destructive/10 px-3.5 py-3 text-sm text-destructive",children:[e.jsx(I,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"leading-relaxed",children:t})]})}function z({id:t,label:r,required:p,file:l,onChange:d,error:i}){const m=a.useRef(null);return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs(u,{htmlFor:t,children:[r,p&&e.jsx("span",{className:"text-[var(--status-critical)]",children:" *"})]}),e.jsx("input",{ref:m,id:t,type:"file",accept:"application/pdf",hidden:!0,onChange:n=>d(n.target.files?.[0]||null)}),l?e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2",children:[e.jsx(V,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:l.name}),e.jsxs(g,{type:"button",variant:"ghost",size:"sm",onClick:()=>d(null),children:[e.jsx(ee,{"aria-hidden":"true"}),"Remove"]})]}):e.jsxs(g,{type:"button",variant:"outline",onClick:()=>m.current?.click(),className:F("h-10 w-full justify-start font-normal text-muted-foreground hover:border-primary",i&&"border-destructive"),children:[e.jsx(re,{"aria-hidden":"true"}),"Choose PDF file…"]}),i&&e.jsx("p",{className:"m-0 text-xs text-destructive",children:i})]})}function le({roleInfo:t,publicCode:r}){return t.company_name?e.jsxs("div",{className:"mb-4 flex items-center gap-3 rounded-xl border border-border bg-background p-4",children:[e.jsx("div",{className:"flex size-12 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-card",children:t.has_company_logo?e.jsx("img",{src:`${Z}/apply/${r}/company-logo`,alt:`${t.company_name} logo`,className:"size-full object-contain"}):e.jsx("span",{className:"font-heading text-lg font-semibold text-muted-foreground",children:t.company_name.charAt(0).toUpperCase()})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"m-0 truncate font-heading text-sm font-semibold text-foreground",children:t.company_name}),t.company_website&&e.jsxs("a",{href:t.company_website,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-primary hover:underline",children:[e.jsx(ae,{className:"size-3","aria-hidden":"true"}),t.company_website.replace(/^https?:\/\//,"")]}),t.company_bio&&e.jsx("p",{className:"m-0 mt-0.5 text-xs leading-relaxed text-muted-foreground",children:t.company_bio})]})]}):null}function ie({companyName:t}){return e.jsxs("div",{className:"mt-4 flex items-start gap-2 rounded-lg border border-border bg-muted/50 px-3.5 py-3 text-xs text-muted-foreground",children:[e.jsx(se,{className:"mt-0.5 size-3.5 shrink-0 text-primary","aria-hidden":"true"}),e.jsxs("p",{className:"m-0 leading-relaxed",children:[t," uses Connekt to manage hiring for this role — that's why the application lives on"," ",e.jsx("span",{className:"font-medium text-foreground",children:"tryconnekt.com"}),". Your resume and details go straight to"," ",t,"'s hiring team; Connekt doesn't use your application for anything else."]})]})}function fe(){const{publicCode:t}
1=O(),[r,p]=a.useState(null),[l,d]=a.useState(null),[i,m]=a.useState(!0),[n,R]=a.useState(""),[x,D]=a.useState(""),[j,B]=a.useState(""),[h,M]=a.useState(null),[b,T]=a.useState(null),[y,$]=a.useState(null),[v,q]=a.useState(null),[N,k]=a.useState(!1),[C,S]=a.useState(null),[U,H]=a.useState(!1);a.useEffect(()=>{let s=!1;return(async()=>{try{const o=await K(t);s||p(o?.data??null)}catch(o){s||d(o.message||"This application link is invalid or has expired.")}finally{s||m(!1)}})(),()=>{s=!0}},[t]);const X=s=>{M(s),$(s?w(s):null)},Y=s=>{T(s),q(s?w(s):null)},_=n.trim()&&x.trim()&&h&&!y&&!v&&!N,G=async s=>{if(s.preventDefault(),!!_){k(!0),S(null);try{await Q(t,{name:n,email:x,phone:j||null,resume:h,coverLetter:b}),H(!0)}catch(o){S(o.message||"Failed to submit your application — please try again.")}finally{k(!1)}}};return e.jsx("div",{className:"flex min-h-screen justify-center bg-muted px-4 py-6 sm:px-8 sm:py-12",children:e.jsxs("div",{className:"w-full max-w-xl",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-center gap-2",children:[e.jsx("img",{src:W,alt:"Connekt",className:"size-7 dark:hidden"}),e.jsx("img",{src:J,alt:"Connekt",className:"hidden size-7 dark:block"}),e.jsx("span",{className:"font-heading text-sm font-semibold text-foreground",children:"Connekt"})]}),r&&e.jsxs(e.Fragment,{children:[e.jsx(le,{roleInfo:r,publicCode:t}),r.company_name&&e.jsx(ie,{companyName:r.company_name})]}),e.jsx("div",{className:F("rounded-xl border border-border bg-background p-6 sm:p-8",r?.company_name&&"mt-4"),children:i?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(c,{className:"h-8 w-3/5"}),e.jsx(c,{className:"h-4 w-11/12"}),e.jsx(c,{className:"h-11 w-full"}),e.jsx(c,{className:"h-11 w-full"}),e.jsx(c,{className:"h-20 w-full"})]}):l?e.jsx(E,{children:l}):U?e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[e.jsx(te,{className:"size-12 text-[var(--status-good)]","aria-hidden":"true"}),e.jsx("h1",{className:"m-0 font-heading text-lg font-semibold text-foreground",children:"Application submitted"}),e.jsxs("p",{className:"m-0 text-sm text-muted-foreground",children:["Thanks, ",n.split(" ")[0]||"there"," — your application for ",r.title," has been received."]})]}):e.jsxs("form",{onSubmit:G,children:[e.jsxs("h1",{className:"m-0 font-heading text-[22px] leading-tight font-semibold tracking-tight text-foreground",children:["Apply for ",r.title]}),r.description&&e.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground",children:r.description}),e.jsxs("div",{className:"mt-6 flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs(u,{htmlFor:"apply-name",children:["Full name",e.jsx("span",{className:"text-[var(--status-critical)]",children:" *"})]}),e.jsx(f,{id:"apply-name",value:n,onChange:s=>R(s.target.value),required:!0,autoComplete:"name",className:"h-10"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs(u,{htmlFor:"apply-email",children:["Email",e.jsx("span",{className:"text-[var(--status-critical)]",children:" *"})]}),e.jsx(f,{id:"apply-email",type:"email",value:x,onChange:s=>D(s.target.value),required:!0,autoComplete:"email",className:"h-10"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(u,{htmlFor:"apply-phone",children:"Phone (optional)"}),e.jsx(f,{id:"apply-phone",value:j,onChange:s=>B(s.target.value),autoComplete:"tel",className:"h-10"})]}),e.jsx(z,{id:"apply-resume",label:"Resume",required:!0,file:h,onChange:X,error:y}),e.jsx(z,{id:"apply-cover-letter",label:"Cover letter (optional)",file:b,onChange:Y,error:v}),C&&e.jsx(E,{children:C}),e.jsx(g,{type:"submit",disabled:!_,className:"h-10 w-full font-semibold",children:N?"Submitting…":"Submit application"})]})]})})]})})}export{fe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.