1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3982],{8031:(e,t,n)=>{n.d(t,{Gt:()=>o,TE:()=>c,e9:()=>i,ko:()=>s,yV:()=>a});var r=n(51728);let s=2e3,l=/\{(name|headline|company|role|location)\}/gi;function i(e,t){return{name:(0,r.QC)(e)||e.fullName.trim(),headline:e.title.trim(),company:t?.company?.trim()??"",role:t?.title?.trim()??"",location:e.location.trim()}}function a(e,t,n){let r=new Set(n?.keepEmpty??[]);return e.replace(l,(e,n)=>{let s=n.toLowerCase(),l=t[s]??"";return!l&&r.has(s)?`{${s}}`:l}).replace(/[ \t]+\n/g,"\n").replace(/ +\./g,".").replace(/ {2,}/g," ").replace(/\n{3,}/g,"\n\n").trim()}function o(e){return!!(e.fullName.trim()||e.title.trim()||e.about.trim()||e.skills.length||(0,r.$Y)(e.cv).experience.length)}function c(e){return"ru"===e?"ÐдÑавÑÑвÑйÑе!\n\nÐÐµÐ½Ñ Ð·Ð¾Ð²ÑÑ {name}, Ñ {headline}. ÐаинÑеÑеÑовала ваканÑÐ¸Ñ {role} в {company}.\n\nÐоÑов обÑÑдиÑÑ Ð´ÐµÑали.\n\nС Ñважением,\n{name}":"Hello,\n\nMy name is {name}, {headline}. I am writing about the {role} role at {company}.\n\nI would be glad to talk.\n\nBest regards,\n{name}"}},8356:(e,t,n)=>{n.d(t,{C:()=>w});var r=n(95155),s=n(98500),l=n.n(s),i=n(96584),a=n(31206),o=n(84299),c=n(10850),u=n(81512),d=n(72741),m=n(28853),p=n(12115),f=n(89239),h=n(42763),g=n(43417),x=n(61823),y=n(18555),j=n(8031),v=n(30651);let b={telegram:i.h,email:a.A,url:o.A};function w({contacts:e,sourceUrl:t,vacancyTitle:n,company:s,size:l="lg",block:a,className:o,open:d,onOpenChange:m,trigger:p=!0}){let g=(0,y.K_)();return e.length||t||!p?(0,r.jsxs)(h.lG,{open:d,onOpenChange:m,children:[p?(0,r.jsx)(h.zM,{asChild:!0,children:(0,r.jsx)(f.$,{size:l,block:a,className:o,children:g.match.apply})}):null,(0,r.jsxs)(h.Cf,{closeLabel:g.common.close,children:[(0,r.jsxs)(h.c7,{children:[(0,r.jsx)(h.L3,{children:g.match.contacts}),(0,r.jsx)(h.rr,{children:e.length?g.match.contactsHint:g.match.contactsEmpty})]}),(0,r.jsxs)(h.R4,{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{role:"note",className:"flex gap-2.5 rounded-lg bg-warning-bg px-3 py-2.5 text-fg-warning",children:[(0,r.jsx)(c.A,{className:"mt-0.5 size-4 shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-semibold",children:g.match.contactsSafetyTitle}),(0,r.jsx)("p",{className:"mt-0.5 text-sm leading-snug opacity-90",children:g.match.contactsSafety})]})]}),e.map(e=>(0,r.jsx)(N,{contact:e},`${e.kind}:${e.label}`)),(0,r.jsx)(k,{vacancyTitle:n,company:s}),t?(0,r.jsxs)("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:"hover-color mt-2 flex items-center justify-between gap-3 rounded-lg bg-card px-3 py-2.5 shadow-ring-subtle hover:bg-muted hover:shadow-ring",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2.5",children:[(0,r.jsx)(i.h,{className:"size-4 shrink-0 text-fg-subtle"}),(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsx)("span",{className:"block text-base font-medium text-fg",children:g.match.originalPost}),(0,r.jsx)("span",{className:"block truncate text-sm text-fg-muted",children:t})]})]}),(0,r.jsx)(u.A,{className:"size-4 shrink-0 text-fg-subtle"})]}):null]})]})]}):null}function k({vacancyTitle:e,company:t}){let n=(0,y.K_)(),s=(0,y.Ym)(),{status:i}=(0,g.Q)(),a=(0,x.k)().data,[o,c]=(0,p.useState)(!1),u=(0,p.useMemo)(()=>{if(!a)return"";let n=a.coverLetter.trim();return n?(0,j.yV)(n,(0,j.e9)(a,{title:e,company:t})):""},[t,a,e]);if("authed"!==i)return null;if(!u)return(0,r.jsxs)("div",{className:"mt-2 rounded-lg bg-card px-3 py-2.5 shadow-ring-subtle",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-fg",children:n.profile.coverLetter}),(0,r.jsx)("p",{className:"mt-0.5 text-sm text-fg-muted",children:n.match.coverLetterApplyEmpty}),(0,r.jsx)(l(),{href:(0,v.Vd)(s,"edit"),className:"mt-2 inline-block text-sm font-semibold text-fg-brand underline-offset-4 hover:underline",children:n.profile.coverLetterEdit})]});let f=async()=>{try{await navigator.clipboard.writeText(u),c(!0),window.setTimeout(()=>c(!1),2e3)}catch{}};return(0,r.jsxs)("div",{className:"mt-2 rounded-lg bg-card px-3 py-2.5 shadow-ring-subtle",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-fg",children:n.profile.coverLetter}),(0,r.jsx)("p",{className:"mt-0.5 text-sm text-fg-muted",children:n.match.coverLetterApplyHint})]}),(0,r.jsx)("button",{type:"button",onClick:()=>void f(),"aria-label":o?n.common.copied:n.profile.coverLetterCopy,className:"grid size-8 shrink-0 place-items-center rounded-md text-fg-muted transition-colors hover:bg-hover hover:text-fg",children:o?(0,r.jsx)(d.A,{className:"size-4"}):(0,r.jsx)(m.A,{className:"size-4"})})]}),(0,r.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm leading-relaxed text-fg-secondary",children:u}),(0,r.jsx)(l(),{href:(0,v.Vd)(s,"edit"),className:"mt-2 inline-block text-sm font-semibold text-fg-brand underline-offset-4 hover:underline",children:n.profile.coverLetterEdit})]})}function N({contact:e}){let t=(0,y.K_)(),[n,s]=(0,p.useState)(!1),l=b[e.kind],i=async()=>{try{await navigator.clipboard.writeText(e.label),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return(0,r.jsxs)("div",{className:"hover-color flex items-center gap-1 rounded-lg bg-card pr-1 shadow-ring-subtle hover:bg-muted hover:shadow-ring",children:[(0,r.jsxs)("a",{href:e.href,target:"_blank",rel:"noreferrer noopener",className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-l-lg px-3 py-2.5",children:[(0,r.jsx)(l,{className:"size-4 shrink-0 text-fg-subtle"}),(0,r.jsx)("span",{className:"truncate text-base font-medium text-fg",children:e.label})]}),(0,r.jsx)("button",{type:"button",onClick:i,"aria-label":`${t.common.copy} ${e.label}`,className:"grid size-8 shrink-0 place-items-center rounded-md text-fg-muted transition-colors hover:bg-hover hover:text-fg",children:n?(0,r.jsx)(d.A,{className:"size-4"}):(0,r.jsx)(m.A,{className:"size-4"})})]})}}
1,20893:(e,t,n)=>{n.d(t,{Q:()=>x});var r=n(95155),s=n(98500),l=n.n(s),i=n(12115),a=n(97073),o=n(89239),c=n(42763),u=n(79439),d=n(60529),m=n(29991),p=n(43417),f=n(88955),h=n(18555),g=n(30651);function x({vacancyId:e,className:t,open:n,onOpenChange:s,trigger:y=!0}){let j=(0,h.K_)(),v=(0,h.Ym)(),{status:b,user:w}=(0,p.Q)(),k=(0,f.V)(),[N,C]=(0,i.useState)(!1),S=s??C,[$,L]=(0,i.useState)(""),[E,_]=(0,i.useState)(null),[z,A]=(0,i.useState)(!1),[M,P]=(0,i.useState)(null),[O,Q]=(0,i.useState)(null);if((0,i.useEffect)(()=>{let e=k.items.find(e=>e.active)??k.items[0];_(e?.id??null)},[k.items]),(0,i.useEffect)(()=>{L(""),P(null),Q(null),A(!1)},[e]),"authed"===b&&w?.accountKind==="employer")return null;let T=async()=>{A(!0),Q(null);let t=await fetch(`/api/vacancies/${e}/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({coverLetter:$,resumeId:E})});(A(!1),409===t.status)?P("exists"):t.ok?P("sent"):Q(j.common.error)};return(0,r.jsxs)(c.lG,{open:n??N,onOpenChange:S,children:[y?(0,r.jsx)(c.zM,{asChild:!0,children:(0,r.jsx)(o.$,{type:"button",size:"lg",className:t,children:M?j.match.applyOfficialSent:j.match.applyOfficial})}):null,(0,r.jsx)(c.Cf,{closeLabel:j.common.close,className:"max-w-md",children:M?(0,r.jsxs)("div",{className:"flex flex-col items-center px-6 pb-7 pt-10 text-center",children:[(0,r.jsx)("span",{className:"grid size-14 place-items-center rounded-full bg-success-bg text-fg-success",children:(0,r.jsx)(u.A,{className:"size-7","aria-hidden":!0})}),(0,r.jsx)(c.L3,{className:"mt-5 text-xl font-semibold",children:j.match.applyOfficialSent}),(0,r.jsx)(c.rr,{className:"mt-1.5 max-w-sm text-sm text-pretty text-fg-muted",children:"exists"===M?j.match.applyExists:j.match.applyOfficialSentDescription}),(0,r.jsx)(o.$,{size:"lg",className:"mt-6 w-full",asChild:!0,children:(0,r.jsx)(l(),{href:(0,g.Vd)(v,"applications"),onClick:()=>S(!1),children:j.match.applyOfficialSentAction})})]}):(0,r.jsxs)("div",{className:"px-6 pb-6 pt-10",children:[(0,r.jsx)(c.L3,{className:"text-xl font-semibold",children:j.match.applyOfficial}),(0,r.jsx)(c.rr,{className:"mt-1 text-sm text-fg-muted",children:j.match.applyOfficialHint}),"authed"!==b?(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("p",{className:"mb-4 text-sm text-fg-secondary",children:j.match.applyOfficialSignIn}),(0,r.jsx)(a.zE,{})]}):(0,r.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[(0,r.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm font-medium text-fg",children:[j.match.applyCoverLetter,(0,r.jsx)(d.TM,{rows:6,value:$,onChange:e=>L(e.target.value)})]}),k.items.length?(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-fg",children:j.match.applyResume}),(0,r.jsxs)(m.l6,{value:E??"__none",onValueChange:e=>_("__none"===e?null:e),children:[(0,r.jsx)(m.bq,{size:"lg","aria-label":j.match.applyResume,children:(0,r.jsx)(m.yv,{placeholder:j.match.applyResumeNone})}),(0,r.jsxs)(m.gC,{className:"z-[60]",children:[(0,r.jsx)(m.eb,{value:"__none",children:j.match.applyResumeNone}),k.items.map(e=>(0,r.jsx)(m.eb,{value:e.id,children:e.fileName},e.id))]})]})]}):null,O?(0,r.jsx)("p",{className:"text-sm text-fg-danger",children:O}):null,(0,r.jsx)(o.$,{type:"button",size:"lg",loading:z,onClick:()=>void T(),children:j.match.applySubmit})]})]})})]})}},29991:(e,t,n)=>{n.d(t,{bq:()=>h,eb:()=>x,gC:()=>g,l6:()=>d,yv:()=>m});var r=n(95155),s=n(12115),l=n(69359),i=n(60529),a=n(49734),o=n(40980);let c=(0,s.createContext)(null);function u(){let e=(0,s.useContext)(c);if(!e)throw Error("Select parts must be used inside Select");return e}function d({value:e,defaultValue:t,onValueChange:n,children:l}){let[i,o]=(0,s.useState)(t),u={};return!function e(t,n){s.Children.forEach(t,t=>{(0,s.isValidElement)(t)&&("string"==typeof t.props.value&&n(t.props.value,function e(t){return null==t||"boolean"==typeof t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):(0,s.isValidElement)(t)?e(t.props.children):""}(t.props.children)),null!=t.props.children&&e(t.props.children,n))})}(l,(e,t)=>{u[e]=t}),(0,r.jsx)(c.Provider,{value:{value:void 0!==e?e:i,onValueChange:t=>{void 0===e&&o(t),n?.(t)},labels:u},children:(0,r.jsx)(a.W1,{children:l})})}function m({placeholder:e,className:t}){let{value:n,labels:s}=u(),l=n?s[n]:void 0,i=!l||l===e;return(0,r.jsx)("span",{className:(0,o.cn)("min-w-0 truncate",i&&"text-fg-subtle",t),children:i?e:l})}let p={sm:"h-8 pl-3 pr-2 text-sm",md:"h-10 pl-4 pr-2.5 text-base",lg:"h-12 pl-5 pr-3 text-md"},f={sm:"size-4",md:"size-4.5",lg:"size-5"};function h({className:e,children:t,size:n="md",...s}){return(0,r.jsxs)(a.cQ,{className:(0,o.cn)("inline-flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg bg-surface text-fg",p[n],i.fj,"focus:outline-none focus-visible:outline-none","data-[state=open]:border-accent","disabled:cursor-not-allowed disabled:opacity-45",e),...s,children:[t,(0,r.jsx)("span",{className:"inline-flex shrink-0 text-fg-subtle",children:(0,r.jsx)(l.A,{className:f[n]})})]})}function g({className:e,children:t}){let{value:n,onValueChange:s}=u();return(0,r.jsx)(a.rm,{align:"start",className:(0,o.cn)("w-[var(--radix-dropdown-menu-trigger-width)]",e),children:(0,r.jsx)(a.aW,{value:n,onValueChange:s,children:t})})}function x({className:e,children:t,value:n,disabled:s}){return(0,r.jsx)(a.iD,{value:n,disabled:s,className:e,children:t})}},47647:(e,t,n)=>{n.d(t,{V:()=>m,w:()=>d});var r=n(95155),s=n(12115),l=n(88108),i=n(83772),a=n(78232),o=n(8356),c=n(20893);let u=(0,s.createContext)(null);function d({children:e}
1){let[t,n]=(0,s.useState)(null),[m,p]=(0,s.useState)(!1),f=(0,s.useCallback)(e=>{n(e),p(!0)},[]),h=(0,s.useMemo)(()=>({requestApply:f}),[f]),g=!!t&&(0,l.pi)(t),x=(0,s.useMemo)(()=>t&&!g?(0,i.w)(t.apply_url,t.description):[],[g,t]),y=t&&!g?(0,i.j)(t.source_channel,t.source_message_id):null;return(0,r.jsxs)(u.Provider,{value:h,children:[e,t&&g?(0,r.jsx)(c.Q,{vacancyId:t.id,open:m,onOpenChange:p,trigger:!1}):null,t&&!g?(0,r.jsx)(o.C,{contacts:x,sourceUrl:y,vacancyTitle:(0,a.K)(t.title),company:t.company,open:m,onOpenChange:p,trigger:!1}):null]})}function m(){return(0,s.useContext)(u)}},51728:(e,t,n)=>{function r(){return{experience:[],education:[],projects:[],languages:[],certifications:[]}}function s(){return crypto.randomUUID()}function l(){return{id:s(),company:"",title:"",location:"",start:"",end:"",current:!0,description:"",skills:[]}}function i(){return{id:s(),school:"",degree:"",field:"",start:"",end:"",current:!1,description:""}}function a(){return{id:s(),name:"",url:"",year:"",description:"",skills:[]}}function o(){return{id:s(),name:"",level:""}}function c(){return{id:s(),name:"",issuer:"",year:"",url:""}}function u(e){return null===e||"object"!=typeof e||Array.isArray(e)?{}:e}function d(e,t){return"string"!=typeof e?"":e.trim().slice(0,t)}function m(e,t,n){if(!Array.isArray(e))return[];let r=new Set,s=[];for(let l of e){let e=d(l,n);if(!e)continue;let i=e.toLowerCase();if(!r.has(i)&&(r.add(i),s.push(e),s.length>=t))break}return s}function p(e){let t=d(e,7);return/^\d{4}(-\d{2})?$/.test(t)?t:""}function f(e){let t=d(e,4);return/^\d{4}$/.test(t)?t:""}function h(e,t,n){if(!Array.isArray(e))return[];let r=[];for(let s of e){let e=n(s);if(e&&(r.push(e),r.length>=t))break}return r}function g(e){let t=u(e);return{id:d(t.id,64)||s(),company:d(t.company,120),title:d(t.title,120),location:d(t.location,80),start:p(t.start),end:p(t.end),current:!0===t.current,description:d(t.description,2e3),skills:m(t.skills,20,40)}}function x(e){let t=u(e);return{id:d(t.id,64)||s(),school:d(t.school,160),degree:d(t.degree,120),field:d(t.field,120),start:p(t.start),end:p(t.end),current:!0===t.current,description:d(t.description,1e3)}}function y(e){let t=u(e);return{id:d(t.id,64)||s(),name:d(t.name,160),url:d(t.url,300),year:f(t.year),description:d(t.description,1e3),skills:m(t.skills,16,40)}}function j(e){let t=u(e),n=d(t.name,60);return n||d(t.level,16)?{id:d(t.id,64)||s(),name:n,level:d(t.level,16)}:null}function v(e){let t=u(e);return{id:d(t.id,64)||s(),name:d(t.name,160),issuer:d(t.issuer,120),year:f(t.year),url:d(t.url,300)}}function b(e){let t=u(e);return{experience:h(t.experience,20,g),education:h(t.education,15,x),projects:h(t.projects,15,y),languages:h(t.languages,12,j),certifications:h(t.certifications,15,v)}}function w(e){return{experience:e.experience.filter(e=>C(e.company)||C(e.title)),education:e.education.filter(e=>C(e.school)),projects:e.projects.filter(e=>C(e.name)),languages:e.languages.filter(e=>C(e.name)),certifications:e.certifications.filter(e=>C(e.name))}}n.d(t,{$Y:()=>w,F_:()=>b,Pe:()=>L,QC:()=>$,Sl:()=>S,UU:()=>l,Up:()=>c,XE:()=>N,mC:()=>o,nc:()=>r,uy:()=>i,zU:()=>a});let k=[{id:"fullName",section:"you",done:e=>C(e.fullName)},{id:"lastName",section:"you",done:e=>C(e.lastName)},{id:"username",section:"settings",done:e=>C(e.username)},{id:"title",section:"you",done:e=>C(e.title)},{id:"about",section:"you",done:e=>C(e.about)},{id:"coverLetter",section:"you",done:e=>C(e.coverLetter)},{id:"location",section:"you",done:e=>C(e.location)},{id:"seniority",section:"role",done:e=>C(e.seniority)},{id:"skills",section:"role",done:e=>e.skills.length>0},{id:"experienceYears",section:"role",done:e=>null!=e.experienceYears},{id:"englishLevel",section:"role",done:e=>C(e.englishLevel)},{id:"remotePref",section:"role",done:e=>C(e.remotePref)},{id:"employmentPref",section:"role",done:e=>C(e.employmentPref)},{id:"salaryExpectation",section:"role",done:e=>null!=e.salaryExpectation},{id:"noticePeriod",section:"role",done:e=>C(e.noticePeriod)},{id:"experience",section:"experience",done:e=>e.cv.experience.some(e=>C(e.company)&&C(e.title))},{id:"education",section:"education",done:e=>e.cv.education.some(e=>C(e.school))},{id:"projects",section:"projects",done:e=>e.cv.projects.some(e=>C(e.name))},{id:"languages",section:"more",done:e=>e.cv.languages.some(e=>C(e.name))},{id:"certifications",section:"more",done:e=>e.cv.certifications.some(e=>C(e.name))},{id:"githubUrl",section:"more",done:e=>C(e.githubUrl)},{id:"linkedinUrl",section:"more",done:e=>C(e.linkedinUrl)},{id:"portfolioUrl",section:"more",done:e=>C(e.portfolioUrl)},{id:"telegram",section:"more",done:e=>C(e.telegram)}];function N(e){return k.map(({id:t,section:n,done:r})=>({id:t,section:n,done:r(e)}))}function C(e){return!!e.trim()}function S(e){let t=N(e),n=Object.fromEntries(t.map(e=>[e.id,e.done])),r=t.filter(e=>e.done).length,s=n.fullName&&n.title,l=n.skills&&n.seniority,i=n.githubUrl||n.linkedinUrl||n.portfolioUrl||n.telegram||n.languages||n.certifications;return{score:Math.round(r/t.length*100),filled:r,total:t.length,sections:{you:s,role:l,experience:n.experience,education:n.education,projects:n.projects,more:i}}}function $(e){return[e.fullName.trim(),e.lastName.trim()].filter(
1Boolean).join(" ")}function L(e,t,n){let r=t+n;if(r<0||r>=e.length)return e;let s=[...e],[l]=s.splice(t,1);return s.splice(r,0,l),s}},52416:(e,t,n)=>{n.d(t,{M:()=>l,s:()=>a});var r=n(26708),s=n(89712);let l=["ai-fit-scores"];async function i(e){let t=await fetch("/api/profile/fit/cached",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:e})}),n=await t.json();if(!t.ok)throw Error(n.error??"Could not load match scores");return n.scores??{}}function a(e,t){let n=!!(t&&(0,s.jK)(t)&&e.length);return(0,r.useQuery)({queryKey:[...l,t?.updatedAt,e],queryFn:()=>i(e),enabled:n,staleTime:6e4})}},61823:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(26708),s=n(43417);let l=["fit-profile"];async function i(){let e=await fetch("/api/profile",{cache:"no-store"});if(401===e.status)return null;let t=await e.json();if(!e.ok)throw Error(t.error??"Could not load profile");return t.profile??null}function a(){let{status:e}=(0,s.Q)();return(0,r.useQuery)({queryKey:l,queryFn:i,enabled:"authed"===e,staleTime:6e4})}},78232:(e,t,n)=>{n.d(t,{K:()=>g});let r=/[\u{1F300}-\u{1FAFF}\u{2600}-\u{27BF}\u{FE0F}]/gu,s=/\s*\([^)]*https?:\/\/[^)]*\)/g,l=/\s*\([^)]{40,}\)/g,i=/\s*(?:â|->)\s*[\s\S]*$/,a=/^(.{8,}?)[\s,/|-]+\1\b/i,o=/\s+[A-ZÐ-ЯÐ][A-Za-zÐ-Яа-ÑÐÑ]*(?:\s+[a-zа-ÑÑ]+)?\s*:\s[\s\S]*$/,c=RegExp("\\s+(?:actually\\s+from\\s+message|i'?ll\\s+use|let'?s\\s+fix|ÑÑдÑ\\s+по\\s+ÑекÑÑÑ|ÑÑÑанавливаÑ|из\\s+ÑекÑÑа|иÑÑ
одÑ|в\\s+данном\\s+ÑлÑÑае|по\\s+ÑмолÑаниÑ|еÑли\\s+в\\s+иÑÑ
одном|еÑли\\s+не\\s+Ñказан|на\\s+оÑнове\\s+доÑÑÑпного|пÑинимаÑ\\s+допÑÑениÑ|веÑни\\s+is_vacancy|допÑÑкаÑ\\s+other)(?![A-Za-zÐ-Яа-ÑÐÑ])[\\s\\S]*$","i"),u=/\s*[ââ-]\s*(?:по\s+конÑекÑÑÑ|ÑÑоÑни|пÑимеÑнаÑ|извлеÑено|опиÑание|likely|corrected|actually)[\s\S]*$/i,d=/,?\s*(?:employment|skills|remote|english_level|seniority)\s*:[\s\S]*$/i,m=/\s[@#]\S+[\s\S]*$/,p=/([)\wа-ÑÑ])[.!?;]\s+\S[\s\S]*$/i,f=" ââ-,;:.|/";function h(e){let t=0,n=e.length;for(;t<n&&f.includes(e[t]);)t+=1;for(;n>t&&f.includes(e[n-1]);)n-=1;return e.slice(t,n)}function g(e){let t=(e??"").replace(r," ").replace(/\s+/g," ").trim();return t?(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(s,"")).replace(l,"")).replace(i,"")).replace(a,"$1")).replace(u,"")).replace(c,"")).replace(d,"")).replace(m,"")).replace(o,"")).replace(p,"$1"),(t.match(/\)/g)?.length??0)>(t.match(/\(/g)?.length??0)&&(t=t.replace(/\)/g,"")),(t=h(t.replace(/\s+/g," "))).length>72&&(t=h(t.slice(0,72).replace(/\S*$/,""))+"â¦"),t):""}},81832:(e,t,n)=>{n.d(t,{hL:()=>j,o:()=>b,wy:()=>v});var r=n(95155),s=n(35625),l=n(48934),i=n(73321),a=n(12115),o=n(42763),c=n(43417),u=n(85087),d=n(52416),m=n(61823),p=n(18555),f=n(30651),h=n(89712);let g=(0,a.createContext)({}),x=(0,a.createContext)(()=>()=>{}),y=(0,a.createContext)({requestMatch:()=>{},matchingId:null});function j({children:e}){let t=(0,a.useRef)(new Set),n=(0,a.useRef)(!1),[v,b]=(0,a.useState)([]),w=(0,m.k)(),k=(0,a.useCallback)(()=>{n.current=!1,b(e=>{let n=[...t.current].sort();return e.length===n.length&&e.every((e,t)=>e===n[t])?e:n})},[]),N=(0,a.useCallback)(()=>{n.current||(n.current=!0,queueMicrotask(k))},[k]),C=(0,a.useCallback)(e=>(t.current.add(e),N(),()=>{t.current.delete(e),N()}),[N]),S=(0,d.s)(v,w.data??void 0),$=(0,p.K_)(),L=(0,p.Ym)(),E=(0,i.useRouter)(),{status:_}=(0,c.Q)(),z=(0,s.useQueryClient)(),[A,M]=(0,a.useState)(!1),P=(0,l.useMutation)({mutationFn:async e=>{let t=await fetch("/api/profile/fit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({vacancyId:e,locale:L})}),n=await t.json();if(n.code===u.n)throw Object.assign(Error($.profile.fitQuota),{code:u.n});if(!t.ok&&!n.fit)throw Error(n.error??$.common.error);return n},onSuccess:()=>{z.invalidateQueries({queryKey:d.M})},onError:e=>{e.code===u.n&&M(!0)}}),O=(0,a.useCallback)(e=>{"authed"===_&&w.data&&(0,h.jK)(w.data)?P.mutate(e):E.push((0,f.Vd)(L,"cv"))},[L,P,w.data,E,_]),Q=(0,a.useMemo)(()=>({requestMatch:O,matchingId:P.isPending?P.variables??null:null}),[P.isPending,P.variables,O]);return(0,r.jsx)(x.Provider,{value:C,children:(0,r.jsx)(g.Provider,{value:S.data??{},children:(0,r.jsxs)(y.Provider,{value:Q,children:[e,(0,r.jsx)(o.lG,{open:A,onOpenChange:M,children:(0,r.jsxs)(o.Cf,{closeLabel:$.common.close,className:"md:max-w-md",children:[(0,r.jsx)(o.L3,{children:$.profile.fitScoreLabel}),(0,r.jsx)(o.R4,{className:"pt-2 pb-6 md:pt-3",children:(0,r.jsx)("p",{className:"text-sm text-pretty text-fg-muted",children:$.profile.fitQuota})})]})})]})})})}function v(e,t){let n=(0,a.useContext)(x),r=(0,a.useContext)(g);(0,a.useEffect)(()=>n(e),[e,n]);let s=r[e],l=s?{skills:s.skills,experience:s.experience,terms:s.terms}:null;return null!=t?{score:t,matched:!0,parts:l}:s?{score:s.score,matched:!0,parts:l}:{score:0,matched:!1,parts:null}}function b(){return(0,a.useContext)(y)}}
1,83772:(e,t,n)=>{n.d(t,{j:()=>d,w:()=>u});let r=/[\w.+-]+@[\w-]+\.[\w.-]*[a-z]{2,}/gi,s=/(?:^|[^\w@/])@([a-z]\w{4,31})\b/gi,l=/https?:\/\/[^\s<>()"'«»]+/gi,i=/[.,;:!?)\]}»"']+$/,a=new Set(["t.me","telegram.me","telegram.dog"]),o=new Set(["vacancy","vacancies","resume","channel","share","gmail","mail","example"]);function c(e){let t=[];for(let[n]of e.matchAll(l)){let e=function(e){var t,n;let r,s=e.replace(i,"");try{r=new URL(s)}catch{return null}if(t=r.hostname,a.has(t.replace(/^www\./,"").toLowerCase())){let e;return(e=((n=r).pathname.replace(/^\/+/,"").split("/")[0]??"").replace(/^@/,""))?e.startsWith("+")||"c"===e?{kind:"telegram",label:n.href,href:n.href}:{kind:"telegram",label:`@${e}`,href:`https://t.me/${e}`}:null}let l=r.pathname.replace(/\/$/,"");return{kind:"url",label:r.hostname.replace(/^www\./,"")+l,href:r.href}}(n);e&&t.push(e)}for(let[n]of e.matchAll(r)){let e=n.replace(i,"");t.push({kind:"email",label:e,href:`mailto:${e}`})}for(let[,n]of e.matchAll(s))o.has(n.toLowerCase())||t.push({kind:"telegram",label:`@${n}`,href:`https://t.me/${n}`});return t}function u(e,t){let n=[...c(e??""),...c(t??"")],r=new Set,s=n.filter(e=>{let t=`${e.kind}:${e.label.toLowerCase()}`;return!r.has(t)&&(r.add(t),!0)}),l={telegram:0,email:1,url:2};return s.sort((e,t)=>l[e.kind]-l[t.kind])}function d(e,t){let n=e?.trim().replace(/^@/,"");return n&&t&&/^[a-zA-Z][a-zA-Z0-9_]{4,31}$/.test(n)?`https://t.me/${n}/${t}`:null}},85087:(e,t,n)=>{n.d(t,{n:()=>i,D:()=>m});var r=n(35625),s=n(26708),l=n(48934);let i="rate_limited";var a=n(89712),o=n(52416);async function c(e){let t=await e.json();if(!e.ok&&!t.fit)throw Error(t.error??"Could not score fit");return{fit:t.fit??null,source:"ai"===t.source?"ai":"rules",cached:t.cached,remaining:Number.isFinite(t.remaining)?t.remaining:0,code:t.code}}async function u(e,t){let n=new URLSearchParams({vacancyId:e,locale:t}),r=await fetch(`/api/profile/fit?${n}`,{cache:"no-store"}),s=await c(r);return s.fit||s.cached?s:null}async function d(e,t){return c(await fetch("/api/profile/fit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({vacancyId:e,locale:t})}))}function m(e,t,n){let i=(0,r.useQueryClient)(),c=!!(t&&(0,a.jK)(t)),m=["ai-fit",e,t?.updatedAt,n],p=(0,s.useQuery)({queryKey:m,queryFn:()=>u(e,n),enabled:c,staleTime:1/0,retry:!1}),f=(0,l.useMutation)({mutationFn:()=>d(e,n),onSuccess:e=>{i.setQueryData(m,e),"ai"===e.source&&i.invalidateQueries({queryKey:o.M})}});return{data:f.data??p.data??void 0,isLoading:c&&p.isLoading,isFetching:f.isPending,refetch:()=>f.mutateAsync()}}},88955:(e,t,n)=>{n.d(t,{V:()=>d});var r=n(35625),s=n(26708),l=n(48934),i=n(43417),a=n(18555);let o=["profile-resumes"];function c(e,t){var n;let r=Error(e.error??t);return r.code="too_large"===(n=e.code)||"bad_type"===n||"no_file"===n||"limit_reached"===n||"not_found"===n||"upload_failed"===n?e.code:void 0,r}async function u(){let e=await fetch("/api/profile/resumes",{cache:"no-store"}),t=await e.json();if(401===e.status)return[];if(!e.ok)throw c(t,"Could not load CVs");return t.items??[]}function d(){let{status:e}=(0,i.Q)(),t=(0,a.Ym)(),n=(0,r.useQueryClient)(),d="authed"===e,m=(0,s.useQuery)({queryKey:o,queryFn:u,enabled:d,staleTime:3e4}),p=d?m.data??[]:[],f=e=>{n.setQueryData(o,e.items)},h=(0,l.useMutation)({mutationFn:async e=>{let n=new FormData;n.set("file",e),n.set("locale",t);let r=await fetch("/api/profile/resumes",{method:"POST",body:n}),s=await r.json();if(!r.ok)throw c(s,"Could not upload the CV");return{items:s.items??[],profile:s.profile}},onSuccess:f}),g=(0,l.useMutation)({mutationFn:async e=>{let t=await fetch(`/api/profile/resumes/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({active:!0})}),n=await t.json();if(!t.ok)throw c(n,"Could not set the active CV");return{items:n.items??[],profile:n.profile}},onSuccess:f}),x=(0,l.useMutation)({mutationFn:async e=>{let t=await fetch(`/api/profile/resumes/${e}`,{method:"DELETE"}),n=await t.json();if(!t.ok)throw c(n,"Could not delete the CV");return{items:n.items??[],profile:n.profile}},onSuccess:f});return{items:p,enabled:d,isLoading:d&&m.isLoading,isError:m.isError,refetch:m.refetch,upload:h,activate:g,remove:x,atLimit:p.length>=5,limit:5,active:p.find(e=>e.active)??null}}}
1,89712:(e,t,n)=>{n.d(t,{jK:()=>m,m0:()=>x});var r=n(81402);let s=new Map(r.kQ.map((e,t)=>[e.value,t])),l=new Map(r.Lw.map((e,t)=>[e.value,t])),i=new Set(r.QE.map(e=>e.value)),a=new Set(r.AM.map(e=>e.value)),o={js:"javascript",ts:"typescript","react.js":"react",reactjs:"react","next.js":"nextjs",next:"nextjs","node.js":"nodejs",node:"nodejs","vue.js":"vue",vuejs:"vue","nuxt.js":"nuxt",k8s:"kubernetes",postgres:"postgresql",psql:"postgresql",mongo:"mongodb",tf:"tensorflow",golang:"go",cpp:"c++","c plus plus":"c++",tailwind:"tailwindcss","tailwind css":"tailwindcss","ci/cd":"cicd",cicd:"cicd","github actions":"githubactions","gitlab ci":"gitlabci","deno fresh":"denofresh",fresh:"denofresh",wasm:"webassembly","web assembly":"webassembly",elastic:"elasticsearch","elastic search":"elasticsearch",opensearch:"elasticsearch"},c=new Map;for(let e of[["react","preact"],["vue","vuejs"],["javascript","js"],["typescript","ts"],["nodejs","node"],["postgresql","postgres","psql"],["mongodb","mongo"],["kubernetes","k8s"],["go","golang"],["tailwindcss","tailwind"],["webassembly","wasm"],["elasticsearch","elastic","opensearch"],["esbuild","vite","webpack","rollup","parcel"],["jest","vitest"],["scss","sass","less"],["reactnative","expo"],["deno","denofresh"]]){let t=e[0];if(t)for(let n of e)c.set(n,t)}let u=new Map;for(let[e,t]of Object.entries({react:["denofresh","nextjs","remix","gatsby","jsx"],preact:["denofresh","jsx"],nextjs:["react"],nuxt:["vue"],nestjs:["nodejs"],express:["nodejs"],typescript:["javascript"],postgresql:["sql"],mysql:["sql"],django:["python"],flask:["python"],fastapi:["python"],spring:["java"],rails:["ruby"],laravel:["php"],grpc:["protobuf"],protobuf:["grpc"]}))u.set(e,new Set(t));let d={skills:50,seniority:18,remote:10,employment:8,english:7,salary:7};function m(e){return e.skills.length>0||!!e.seniority.trim()}function p(e){let t=e.trim().toLowerCase();if(!t)return"";let n=t.replace(/\.js$/i,"js").replace(/[^a-z0-9+#./]+/g,"");return o[t]??o[n]??n}function f(e){let t=new Map;for(let n of e){let e=p(n);e&&!t.has(e)&&t.set(e,n)}return t}function h(e,t){let n=p(t);if(!n)return!1;if(e.has(n))return!0;let r=c.get(n);if(r){for(let t of e)if(c.get(t)===r)return!0}for(let t of e)if(u.get(t)?.has(n))return!0;return!1}function g(e,t,n){if(!t||!n)return null;let r=e.get(t),s=e.get(n);return null==r||null==s?null:r>=s?"pass":r===s-1?"near":"fail"}function x(e,t){var n,r,o,c,u;if(!m(e)||!(t.skills.length>0||t.seniority))return null;let x=new Set(f([...e.skills,...e.cv.experience.flatMap(e=>e.skills),...e.cv.projects.flatMap(e=>e.skills)]).keys()),y=f(t.skills),j=t.skills.map(e=>({label:e,have:h(x,e)})),v=[],b=(e,t,n,r)=>{t&&v.push({id:e,status:t,have:n||void 0,want:r||void 0})};b("seniority",g(s,e.seniority,t.seniority),e.seniority,t.seniority),b("remote",(n=e.remotePref,r=t.remote,n&&r&&i.has(n)&&i.has(r)?n===r?"pass":"hybrid"===n?"remote"===r?"pass":"near":"remote"===n&&"hybrid"===r||"onsite"===n&&"hybrid"===r?"near":"fail":null),e.remotePref,t.remote),b("employment",(o=e.employmentPref,c=t.employment,o&&c&&a.has(o)&&a.has(c)?o===c?"pass":"fail":null),e.employmentPref,t.employment),b("english",g(l,e.englishLevel,t.english_level),e.englishLevel,t.english_level),b("salary",function(e,t,n,r){if(null==e||null==t&&null==n||"RUB"!==(r??"RUB").toUpperCase()&&e>=8e4)return null;let s=n??t;return null==s?null:e<=s?"pass":e<=1.15*s?"near":"fail"}(e.salaryExpectation,t.salary_min,t.salary_max,t.salary_currency));let w=function(e,t){let n=new Map;for(let t of e){let e=p(t.label);e&&!n.has(e)&&n.set(e,t.have)}let r=0,s=0;for(let e of(n.size&&(r+=[...n.values()].filter(Boolean).length/n.size*d.skills,s+=d.skills),t)){var l;r+=("pass"===(l=e.status)?1:.55*("near"===l))*d[e.id],s+=d[e.id]}return s?{score:Math.round(r/s*100),thin:s<25}:null}(j,v);return w?{score:w.score,verdict:(u=w.score)>=75?"strong":u>=50?"possible":"weak",thin:w.thin,skills:j,checks:v,roles:function(e,t){if(!t.size)return[];let n=[];for(let r of e.cv.experience){let e=[...f(r.skills).entries()].filter(([e])=>[...t].some(t=>h(new Set([e]),t))).map(([,e])=>e);e.length&&(r.title.trim()||r.company.trim())&&n.push({id:r.id,kind:"experience",title:r.title.trim(),company:r.company.trim(),overlap:e})}for(let r of e.cv.projects){let e=[...f(r.skills).entries()].filter(([e])=>[...t].some(t=>h(new Set([e]),t))).map(([,e])=>e);e.length&&r.name.trim()&&n.push({id:r.id,kind:"project",title:r.name.trim(),company:"",overlap:e})}return n.sort((e,t)=>
1t.overlap.length-e.overlap.length).slice(0,3)}(e,new Set(y.keys()))}:null}}}]);
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.