1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3510],{22337:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ai-beta/[conversationId]",function(){return t(86024)}])},41972:(e,l,t)=>{"use strict";t.d(l,{A:()=>N});var i=t(37876),a=t(19635),r=t.n(a),n=t(81515),s=t.n(n),o=t(63819),c=t(82381),u=t(16495),d=t(70514),m=t(78063),x=t(1492);let f=u.JOB_PREFERENCES_CONST.JOB_ROLES,p=u.JOB_PREFERENCES_CONST.SKILLS,v=u.JOB_PREFERENCES_CONST.JOB_TYPES,h=u.JOB_PREFERENCES_CONST.LOCATION,g="remoteOnly",y="minExp",j="maxExp",N={generateQueriesFromFilter:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=Object.entries(e),t=[];return l.forEach(e=>{let[l,i]=e;switch(l){case p:{if(!(null==i?void 0:i.length)||!i)return;let e=i.map(e=>e.name);t.push("skills=".concat(encodeURIComponent(e.toString())));break}case f:i.length>0&&t.push("roles=".concat(i.toString()));break;case"min":case y:Number.isInteger(i)&&t.push("minExp=".concat(i));break;case"max":case j:Number.isInteger(i)&&t.push("maxExp=".concat(i));break;case g:t.push("remoteOnly=".concat(i));break;case v:t.push("jobType=".concat(i));break;case h:{let e=(0,c.yY)(i);e&&t.push(e);break}case"cities":if(i.length>0){let e=i.map(e=>o.default.isString(e)?e:e.city);t.some(e=>e.includes("cities"))||t.push("cities=".concat(e.toString()))}break;case"countries":if(i.length>0){let e=i.map(e=>o.default.isString(e)?e:e.country);t.some(e=>e.includes("countries"))||t.push("countries=".concat(e.toString()))}}}),t},generateFilterFromQueries:e=>{let l=Object.entries(e),t={};return l.forEach(e=>{var l,i,a;let[r,n]=e;switch(r){case p:t.skills=null==n||null==(l=n.split(","))?void 0:l.map(e=>({label:e,name:e}));break;case f:t.roles=null==n?void 0:n.split(",");break;case g:t.remoteOnly="true"===n;break;case v:t.jobType=n;break;case y:t[y]=n;break;case j:t[j]=n;break;case"cities":{let e=Array.isArray(n)?n:null==n||null==(i=n.split(","))?void 0:i.map(e=>({city:e}));t.cities=e,t.location=Array.isArray(t.location)?t.location.concat(e):e;break}case"countries":{let e=n instanceof Array?(null==n?void 0:n[0])||"":n,l=null==e||null==(a=e.split(","))?void 0:a.map(e=>({country:e}));t.countries=l,t.location=Array.isArray(t.location)?t.location.concat(l):l}}}),t},calculateJobPostPercentage:e=>{let l=0,t=["jobTitle","jobType","jobDescription","department","locationPreference","location","roles","skills","otherOptions","salary"];(null==e?void 0:e.applyLink)&&t.push(u.JOB_PREFERENCES_CONST.APPLY_LINK),(null==e?void 0:e.jobType)!==d.A.INTERNSHIP&&t.push(u.JOB_PREFERENCES_CONST.EQUITY,u.JOB_PREFERENCES_CONST.EXPERIENCE),(null==e?void 0:e.jobType)===d.A.INTERNSHIP&&t.push(d.A.INTERNSHIP_DURATION);let i=t.length;return Object.entries(r()(e,t)).forEach(e=>{var t;let[i,a]=e;if(null!=a){if(Array.isArray(a)&&a.length>0||"string"==typeof a&&""!==a.trim()||"boolean"==typeof a){l+=1;return}if("salary"===i){(null==a?void 0:a.min)&&(null==a?void 0:a.max)&&(l+=1);return}if("object"==typeof a&&!Array.isArray(a)&&(null==(t=Object)?void 0:t.keys(a).length)>0){if("equity"===i&&!(null==a?void 0:a.option))return;l+=1}"number"==typeof a&&(l+=1)}}),Math.min(l/i*100,100).toFixed()},restructureJobPostDataBeforeApiCall:(e,l)=>{var t,i,a,r,n,o,c;let{questions:x,socialLinks:f}=l,p={...e},v=["hiringManagerDetails","publishedAt"];(null==e?void 0:e.jobType)===d.A.INTERNSHIP&&v.push(u.JOB_PREFERENCES_CONST.EXPERIENCE),[d.A.FREELANCE,d.A.CONSULTANT,d.A.INTERNSHIP].includes(null==e?void 0:e.jobType)&&(v.push(u.JOB_PREFERENCES_CONST.EQUITY),p.salary={currency:null==e||null==(t=e.salary)?void 0:t.currency,min:null==e||null==(i=e.salary)?void 0:i.min,unit:null==e||null==(a=e.salary)?void 0:a.unit});let h=s()(p,v);if(null==h?void 0:h[u.JOB_PREFERENCES_CONST.EQUITY]){let e={min:(null==(r=h.equity)?void 0:r.min)&&parseFloat(h.equity.min)||null,max:(null==h||null==(n=h.equity)?void 0:n.max)&&parseFloat(h.equity.max)||null,option:h.equity.option};h[u.JOB_PREFERENCES_CONST.EQUITY]=e}return(null==h?void 0:h[u.JOB_PREFERENCES_CONST.JOB_DESCRIPTION])&&(h[u.JOB_PREFERENCES_CONST.JOB_DESCRIPTION]=(0,m.sanitizeRichText)(null==h?void 0:h.jobDescription,m.extendTagsMap.job)),(null==x?void 0:x.length)&&(h.applicationForm={...null!=(o=null==e?void 0:e.applicationForm)?o:{},questions:x}),(null==f?void 0:f.length)&&(h.applicationForm={...null!=(c=null==h?void 0:h.applicationForm)?c:{},socialLinks:f}),h},getCandidateBadgeByScore:e=>{if(!e||e>1||e<=0)return null;let l=null,t=parseFloat(e||0,10);switch(!0){case t>=.8:l=(0,i.jsx)(x.A.GreatFit,{});break;case t>=.6&&t<.8:l=(0,i.jsx)(x.A.GoodFit,{});break;case t<.3:l=(0,i.jsx)(x.A.MisFit,{});break;default:l=null}return l}}},80980:(e,l,t)=>{"use strict";t.d(l,{A:()=>y});var i=t(37876),a=t(16495),r=t(21639),n=t(18480),s=t(89311),o=t(48230),c=t.n(o),u=t(2171),d=t(14232),m=t(89099),x=t(93988),f=t(87156),p=t(4755),v=t(83872),h=t(38243);let g=()=>{var e;let l=(0,m.useRouter)(),{isLoggedIn:t,loading:n}=(0,f.A)(),{appData:o}=(0,u.useSelector)(e=>e.AppData),[g,y]=(0,d.useState)(!1),j=(null==l||null==(e=l.query)?void 0:e.conversationId)&&(null==l?void 0:l.asPath)!==a.APP_PATHS.AI_SEARCH_NEW;return(0,i.jsxs)("header",{children:[(0,i.jsxs)("nav",{className:"w-full flex items-center justify-between px-4 border-b h-14 fixed top-0 bg-gray-00 z-10",children:[(0,i.jsx)(c(),{href:"".concat(a.APP_PATHS.PEERLIST).concat(a.APP_PATHS.AI_SEARCH),children:(0,i.jsx)(x.A,{src:a.CDNImage.aiSearchLogo,alt:"Peerlist",className:"h-8"})}),n?null:(0,i.jsx)("div",{children:t?(0,i.jsxs)("div",{className:"flex items-center gap-x-4",children:[j?(0,i.jsx)(r.Ay.CarbonOutline,{iconLeft:(0,i.jsx)(v.PlusIcon,{size:18}),onClick:()=>y(!0),children:"New Chat"}):null,(0,i.jsx)(c(),{href:a.APP_PATHS.userProfile({profileHandle:null==o?void 0:o.profileHandle}),children:(0,i.jsx)(p.Ay.Smaller,{image:null==o?void 0:o.profilePicture})})]}):(0,i.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,i.jsx)(r.Ay.CarbonOutline,{as:c(),href:a.APP_PATHS.login,children:"Login"}),(0,i.jsx)(r.Ay.Primary,{as:c(),href:a.APP_PATHS.signup,children:"Create Profile"})]})})]}),(0,i.jsxs)(h.Ay,{showModal:g,setShowModal:y,showClose:!1,children:[(0,i.jsxs)(h.Ep.Body,{className:"text-center",children:[(0,i.jsx)("div",{className:"flex justify-center mb-6",children:(0,i.jsx)(v.WarningTriangleIcon,{size:"40"})}),(0,i.jsx)(s.default.SemiBoldText,{children:"Start a new chat?"}),(0,i.jsx)(s.default.NormalText,{sm:!0,children:"Creating a new chat will erase your current conversation."})]}),(0,i.jsxs)(h.Ep.Footer,{className:"justify-between",children:[(0,i.jsx)(r.Ay.CarbonOutline,{small:!0,onClick:()=>y(!1),children:"Cancel"}),(0,i.jsx)(r.Ay.Carbon,{small:!0,onClick:()=>{l.replace(a.APP_PATHS.AI_SEARCH,void 0,{shallow:!0}),y(!1),localStorage.removeItem(a.STORAGE_KEYS.NEW_AI_QUERY_PROMPT_KEY)},children:"New Chat"})]})]})]})},y=e=>{let{children:l,showSupportFooter:t=!1}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.A,{title:"Peerlist AI",description:"Search people and their work beyond keywords.",ke
1ywords:"ai search people, ai search projects, ai search articles",ogImage:a.CDNImage.aiOGImage,canonical:"".concat(a.APP_PATHS.PEERLIST).concat(a.APP_PATHS.AI_SEARCH),url:"".concat(a.APP_PATHS.PEERLIST).concat(a.APP_PATHS.AI_SEARCH),noIndex:!0}),(0,i.jsxs)("div",{className:"flex flex-col w-full min-h-screen relative",children:[(0,i.jsx)(g,{}),(0,i.jsx)("div",{className:"max-w-192 flex flex-col relative w-full mx-auto pt-14 sm:pt-24 flex-grow items-center justify-center",children:l}),t?(0,i.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 w-full bg-gray-00 mb-0 sticky bottom-0",children:[(0,i.jsx)(r.Ay.CarbonOutline,{small:!0,children:"Share Feedback"}),(0,i.jsxs)(s.default.NormalText,{xs:!0,textColor:"text-gray-400",className:"hover:text-gray-700 transition-colors duration-200",children:["\xa9 ",new Date().getFullYear()," ⢠Peerlist Inc."]})]}):null]})]})}},82381:(e,l,t)=>{"use strict";t.d(l,{AD:()=>n,kC:()=>r,yY:()=>s});var i=t(61251),a=t(16495);let r=e=>{if(e){if((null==e?void 0:e.city)&&(null==e?void 0:e.country)&&((null==e?void 0:e.code)||(null==e?void 0:e.countryCode)))return e;if((null==e?void 0:e.city)&&(null==e?void 0:e.country)&&!e.code){let l=i.find(l=>l.country===(null==e?void 0:e.country));return{city:null==e?void 0:e.city,country:null==l?void 0:l.country,code:null==l?void 0:l.code,countryCode:null==l?void 0:l.code}}if("string"==typeof e){var l;let t=e.split(","),a=null==t?void 0:t.length,r=t[0],n=null==t||null==(l=t[a-1])?void 0:l.trim(),s=i.find(e=>e.country===n);return{city:r,country:null==s?void 0:s.country,code:null==s?void 0:s.code}}if((null==e?void 0:e.country)===a.REMOTE)return{country:a.REMOTE,code:a.REMOTE};if((null==e?void 0:e.country)!==a.REMOTE&&((null==e?void 0:e.city)===""||!(null==e?void 0:e.city))){if((null==e?void 0:e.country)&&(null==e?void 0:e.code))return e;let l=null==e?void 0:e.country,t=i.find(e=>e.country.toLowerCase()===(null==l?void 0:l.toLowerCase()));return{country:null==t?void 0:t.country,code:null==t?void 0:t.code}}}},n=e=>{let l;if(!(e instanceof Array)||(null==e?void 0:e.length)===0)return;let t=[],i=[];return(e.forEach(e=>{let a=null==i?void 0:i.find(l=>l===e.city);(null==t?void 0:t.find(l=>l===e.country))||t.push(e.country),a||void 0===e.city||i.push(e.city),e.remote&&(l=e.remote)}),i.length>0&&t.length>0)?{cities:i,remote:l}:1===t.length||0===i.length?{countries:t,remote:l}:{remote:l}},s=e=>{if(!(e instanceof Array)||(null==e?void 0:e.length)===0)return;let{countries:l,cities:t}=n(e);return(null==t?void 0:t.length)>0?"cities=".concat(t.toString()):(null==l?void 0:l.length)>=1||(null==t?void 0:t.length)===0?"countries=".concat(l.join(",")):""}},82541:(e,l,t)=>{"use strict";t.d(l,{A:()=>c});var i=t(37876),a=t(14232),r=t(83872),n=t(21639),s=t(51100),o=t(5078);let c=e=>{let{prompt:l,setPrompt:t,expanded:c=!1,handleSubmit:u=()=>{}}=e,d=(0,a.useRef)(),{handlePublishTrigger:m}=(0,o.A)(),x=async()=>{var e;await m()&&(null==d||null==(e=d.current)||e.resetHeight(),u())};return(0,a.useEffect)(()=>{(null==d?void 0:d.current)&&d.current.focus()},[d.current,l]),(0,i.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:e=>{(null==e?void 0:e.key)!=="Enter"||(null==e?void 0:e.shiftKey)||(null==e||e.preventDefault(),x())},"aria-label":"Search people by role, company, interest, location...",className:"flex px-4 ".concat(c?"flex-col min-h-[97px] max-h-50 pt-4 pr-2 pb-2 justify-between":"items-center gap-2 py-4"," border border-gray-300 transition-colors duration-150 focus-within:border-gray-400 hover:border-gray-400 bg-gray-00 rounded-2xl cursor-text"),onClick:e=>{if(!e.target.closest("button")&&!e.target.closest("form")){var l;null==(l=d.current)||l.focus()}},children:[(0,i.jsx)("form",{id:"prompt-form",className:"w-full flex items-center",onSubmit:e=>{e.preventDefault(),x()},children:(0,i.jsx)(s.iy,{className:"focus:outline-none w-full max-h-[calc(200px-88px)]",placeholder:"Search people by role, company, interest, location...",value:l,onChange:e=>t(e.target.value),autoFocus:!0,ref:d})}),(0,i.jsx)("div",{className:"flex ".concat(c?"justify-end":"justify-between self-end"," "),children:(0,i.jsx)(n.Ay.Carbon,{type:"submit",form:"prompt-form",className:"flex self-end items-center justify-center",circular:!0,children:(0,i.jsx)("span",{className:"text-gray-00",children:(0,i.jsx)(r.ArrowUpIcon,{size:20})})})})]})}},86024:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>D});var i=t(37876),a=t(14232),r=t(89099),n=t(97778),s=t(83872),o=t(21639),c=t(89311),u=t(16495),d=t(63819),m=t(28857),x=t(4755);let f=e=>{var l;let{user:t,handleUserClick:a}=e,r=(0,d.getTldrString)(null==t?void 0:t.tldr);return(0,i.jsxs)("div",{className:"flex items-start p-4 bg-gray-00 relative group gap-x-2",children:[(0,i.jsx)(m.A,{profileHandle:null==t?void 0:t.profileHandle,className:"cursor-default",children:(0,i.jsx)("a",{href:u.APP_PATHS.userProfile({profileHandle:null==t?void 0:t.profileHandle,absolute:!0}),target:"_blank",rel:"noreferrer","aria-label":"Visit ".concat(d.default.getDisplayName(t),"'s profile"),children:(0,i.jsx)(x.Ay.Smaller,{image:null==t?void 0:t.profilePicture,verified:null==t?void 0:t.verified,idVerified:null==t?void 0:t.idVerifiedAt})})}),(0,i.jsxs)("div",{className:"w-full",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)(m.A,{profileHandle:null==t?void 0:t.profileHandle,className:"cursor-default",children:(0,i.jsx)("a",{href:u.APP_PATHS.userProfile({profileHandle:null==t?void 0:t.profileHandle,absolute:!0}),target:"_blank",rel:"noreferrer",children:(0,i.jsx)(c.default.SemiBoldText,{sm:!0,className:"capitalize hover:underline",children:d.default.getDisplayName(t)})})}),(0,i.jsx)("div",{className:"flex items-center gap-x-2 sm:opacity-0 group-hover:opacity-100 transition-all ease-in-out",children:(0,i.jsx)(o.Ay.CarbonOutline,{small:!0,onClick:()=>a(t),children:"Tell me more"})})]}),(0,i.jsx)(c.default.NormalText,{sm:!0,children:(null==t?void 0:t.summary)||r})]}),(null==t?void 0:t.score)?(0,i.jsxs)(c.default.SemiBoldText,{xs:!0,className:"absolute bottom-2 right-2",textColor:"text-red",children:["Score: ",null==t||null==(l=t.score)?void 0:l.toFixed(4)]}):null]})},p=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"}
1),(0,i.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",stroke:"#A3BFCA"}),(0,i.jsxs)("circle",{cx:"18",cy:"6",r:"2",fill:"#435346",children:[(0,i.jsx)("animate",{attributeName:"cx",values:"18;18;6;6;18",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"cy",values:"6;18;18;6;6",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"})]}),(0,i.jsxs)("circle",{cx:"18",cy:"18",r:"2",fill:"#435346",children:[(0,i.jsx)("animate",{attributeName:"cx",values:"18;6;6;18;18",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"cy",values:"18;18;6;6;18",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"})]}),(0,i.jsxs)("circle",{cx:"6",cy:"18",r:"2",fill:"#435346",children:[(0,i.jsx)("animate",{attributeName:"cx",values:"6;6;18;18;6",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"cy",values:"18;6;6;18;18",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"})]}),(0,i.jsxs)("circle",{cx:"6",cy:"6",r:"2",fill:"#435346",children:[(0,i.jsx)("animate",{attributeName:"cx",values:"6;18;18;6;6",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"cy",values:"6;6;18;18;6",keyTimes:"0;0.25;0.5;0.75;1",dur:"2s",repeatCount:"indefinite"})]})]});var v=t(48230),h=t.n(v);let g=e=>{var l;let{project:t}=e;return(0,i.jsxs)("div",{className:"w-full p-4 flex items-start gap-4 relative group bg-gray-00 group",children:[(null==t||null==(l=t.images)?void 0:l.length)?(0,i.jsx)("img",{src:t.images[0],className:"rounded-xl border w-16 h-16 sm:w-30 object-cover shrink-0",alt:null==t?void 0:t.title}):null,(0,i.jsxs)("div",{className:"flex-grow",children:[(0,i.jsxs)("div",{className:"relative flex items-start justify-between mb-2",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(c.default.SemiBoldText,{className:"group-hover:underline",children:null==t?void 0:t.title}),(0,i.jsx)(c.default.MutedText,{sm:!0,children:null==t?void 0:t.tagline})]}),(0,i.jsx)("div",{className:"flex items-center gap-x-2 sm:opacity-0 group-hover:opacity-100 transition-all ease-in-out right-0",children:(0,i.jsx)(o.Ay.CarbonOutline,{small:!0,iconRight:(0,i.jsx)(s.ArrowUpRightIcon,{size:"14"}),as:h(),href:null==t?void 0:t.projectURL,target:"_blank",children:"View"})})]}),(null==t?void 0:t.summary)?(0,i.jsx)(c.default.NormalText,{sm:!0,children:null==t?void 0:t.summary}):null]})]})},y=e=>{var l,t;let{article:r}=e,[n,s]=(0,a.useState)(!1),o=(null==r?void 0:r.featuredImage)||(null==r||null==(l=r.seo)?void 0:l.ogImage)||null,m=(null==r?void 0:r.plArticle)?u.APP_PATHS.blogURL({slug:r.slug,category:r.category,absolute:!0}):u.APP_PATHS.getAbsolutePath([null==r?void 0:r.url]);return(0,i.jsx)("a",{href:m,target:"_blank",rel:"noreferrer",className:"flex flex-col justify-between transition-shadow bg-gray-00 w-full px-4 group",children:(0,i.jsxs)("div",{className:"flex items-start gap-4 mb-3",children:[(0,i.jsxs)("div",{className:"flex-grow flex flex-col gap-1",children:[(0,i.jsx)(c.default.SemiBoldText,{className:"paragraph-clamp1 group-hover:underline",children:null==r?void 0:r.title}),(null==r?void 0:r.subTitle)?(0,i.jsx)(c.default.NormalText,{sm:!0,textColor:"text-gray-700",className:"paragraph-clamp",children:null==r?void 0:r.subTitle}):null,(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsxs)("div",{className:"flex items-center gap-x-1",children:[(0,i.jsx)(x.Ay.Tiny,{image:null==r||null==(t=r.creator)?void 0:t.profilePicture}),(0,i.jsx)(c.default.SemiBoldText,{xs:!0,children:d.default.getDisplayName(null==r?void 0:r.creator)}),(null==r?void 0:r.readTime)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.default.Dot,{}),(0,i.jsxs)(c.default.MutedText,{children:[r.readTime," min read"]})]}):null]})})]}),o&&!n?(0,i.jsx)("img",{src:o,className:"w-30 h-16 rounded-lg border flex-shrink-0",alt:null==r?void 0:r.title,onError:()=>s(!0)}):null]})})};var j=t(94277),N=t(3232),P=t(90828),b=t(56256);let A=e=>{let{profileURL:l}=e,[t,r]=(0,a.useState)(!1);return(0,i.jsx)(o.Ay.CarbonOutline,{small:!0,circular:!0,onClick:()=>{r(!0),d.default.copyToClipboard(l),setTimeout(()=>{r(!1)},800)},children:t?(0,i.jsx)("span",{className:"text-green",children:(0,i.jsx)(s.CheckIcon,{size:16})}):(0,i.jsx)(s.LinkIcon,{size:16})})},E=e=>{let{user:l}=e,[t,r]=(0,a.useState)(!1),n=(e=>{var l;let t=null==e?void 0:e.profileHandle,i=[{label:"Work",href:u.APP_PATHS.userProfileSubPage({profileHandle:t})},{label:"Resume",href:u.APP_PATHS.userProfileSubPage({profileHandle:t,subPage:u.APP_PATHS.resume})}];return(null==e||null==(l=e.tldr)?void 0:l.articlesCount)&&i.push({label:"Articles",href:u.APP_PATHS.userProfileSubPage({profileHandle:t,subPage:u.APP_PATHS.articles})}),i})(l),m=(0,P.B)(null==l?void 0:l.tldr),f=u.APP_PATHS.userProfile({profileHandle:null==l?void 0:l.profileHandle,absolute:!0});return(0,i.jsxs)("div",{className:"flex flex-col gap-2 p-4",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("a",{href:f,target:"_blank",rel:"noreferrer","aria-label":"Visit ".concat(d.default.getDisplayName(l),"'s profile"),children:(0,i.jsx)(x.Ay.SmallPlus,{image:(null==l?void 0:l.profilePicture)||u.CDNImage.emptyUserDP,verified:null==l?void 0:l.verified,idVerified:null==l?void 0:l.idVerifiedAt})}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(A,{profileURL:f}),(0,i.jsx)(N.A,{userData:l,userIsPeer:t,small:!0}),(0,i.jsx)(j.A,{profileData:l,as:o.Ay.Primary,small:!0,setUserIsPeer:r})]})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)("a",{href:f,target:"_blank",rel:"noreferrer",className:"hover:underline",children:(0,i.jsx)(c.default.SemiBoldText,{base:!0,children:null==l?void 0:l.displayName})}),(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(b.A,{as:c.default.NormalText,sm:!0,text:(null==l?void 0:l.summary)||(0,d.getTldrString)(null==l?void 0:l.tldr)}),(0,i.jsx)("ul",{className:"text-xs text-gray-500 list-disc -ml-1 h-fit",children:m})]})]}),(0,i.jsx)("div",{className:"flex items-center gap-2",children:n.map((e,l)=>(0,i.jsx)(o.Ay.CarbonOutline,{small:!0,iconRight:(0,i.jsx)(s.ArrowUpRightIcon,{size:14}),as:h(),href:e.href,target:"_blank",rel:" noopener",onClick:e=>{e.stopPropagation()},children:e.label},"profile-links-".concat(l+1,"-").concat(e.href)))})]})]})};var T=t(10986),S=t(78063);let C=e=>{var l,t,a;let{post:r}=e,n=(0,T._c)({caption:null==r?void 0:r.caption,charLimits:100}),s=u.APP_PATHS.postDetails(null==r?void 0:r.id,!0);return(0,i.jsxs)("a",{href:s,target:"_blank",rel:"noreferrer",className:"flex flex-col justify-between rounded-2xl border bg-gray-00 w-420 hover:shadow-10 transition-shadow p-3",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-3",children:[(0,i.jsxs)("div",{children:[(null==r?void 0:r.postTitle)?(0,i.jsx)(c.default.SemiBoldText,{className:"mb-1 paragraph-clamp1",children:null==r?void 0:r.postTitle}):null,n?(0,i.jsx)(S.default,{html:n,className:"post-caption font-normal rich-text-paragraph-regular text-sm text-gray-700"}):null]}),(null==r||null==(l=r.media)?void 0:l.length)?(0,i.jsx)("div",{className:"shrink-0",children:(0,i.jsx)("img",{src:null==r?void 0:r.media[0],alt:(null==r?void 0:r.title)||(null==r||null==(t=r.caption)?void 0:t.slice(0,15)),className:"w-30 h-16 rounded-lg border object-cover"})}):null]}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)(x.Ay.Tiny,{image:null==r||null==(a=r.postedBy)?void 0:a.profilePicture,alt:d.default.getDisplayName(null==r?void 0:r.postedBy)}),(0,i.jsx)(c.default.SemiBoldText,{sm:!0,children:d.default.getDisplayName(null==r?void 0:r.postedBy)})]})]})},_={USER:"user",PROJECT:"project",ARTICLE:"article",POST:"post"},w={hidden:{},visible:{transition:{staggerChildren:.1}}},R={hidden:e=>({opacity:0,y:20*("vertical"===e),x:20*("horizontal"===e)}),visible:{opacity:1,y:0,x:0,transition:{type:"spring",stiffness:260,damping:20}}},k=e=>{let{type:l}=e,t="";switch(l){case _.USER:t="people";break;case _.PROJECT:t="projects";break;case _.ARTICLE:t="articles";break;case _.POST:t="posts"}return(null==t?void 0:t.length)?(0,i.jsx)(b.A,{as:c.default.MediumText,sm:!0,className:"font-mono ml-4",text:"Here are some ".concat(t,":")}):null},I=e=>{var l,t,a,r,u,d,m,x,v,h,j,N,P,A,T,S;let{item:I,setPrompt:O=()=>{},handleUserClick:H=()=>{},isLastItem:F=!1}=e,B=null==I?void 0:I.prompt,D=null==I?void 0:I.loading,L=!(null==I||null==(l=I.projects)?void 0:l.length)&&!(null==I||null==(t=I.articles)?void 0:t.length)&&!(null==I||null==(a=I.posts)?void 0:a.length),Y=(null==I||null==(r=I.people)?void 0:r.length)===1&&L&&((null==I?void 0:I.type)===_.USER||(null==I||null==(d=I.people)||null==(u=d[0])?void 0:u.type)===_.USER)?(0,i.jsx)(E,{user:null==I||null==(m
1=I.people)?void 0:m[0],handleUserClick:H}):(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(null==I?void 0:I.summary)?(0,i.jsx)(b.A,{as:c.default.MediumText,sm:!0,className:"font-mono ml-4",text:null==I?void 0:I.summary}):null,(null==I||null==(x=I.people)?void 0:x.length)?(0,i.jsx)("div",{className:"flex flex-col gap-6",children:(0,i.jsx)("div",{className:"flex flex-col items-center w-full",children:(0,i.jsx)(n.PY1.div,{className:"flex flex-col items-center w-full",initial:"hidden",animate:"visible",variants:w,children:null==I||null==(v=I.people)?void 0:v.map(e=>e?(0,i.jsx)(n.PY1.div,{variants:R,className:"h-full w-full",custom:"vertical",children:(0,i.jsx)(f,{user:e,handleUserClick:H})},null==e?void 0:e.id):null)})})}):null,(null==I||null==(h=I.projects)?void 0:h.length)?(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,i.jsx)(k,{type:_.PROJECT}),(0,i.jsx)(n.PY1.div,{className:"flex flex-col gap-4 items-center w-full",initial:"hidden",animate:"visible",variants:w,children:null==I||null==(j=I.projects)?void 0:j.map(e=>e?(0,i.jsx)(n.PY1.div,{variants:R,className:"h-full w-full",custom:"vertical",children:(0,i.jsx)(g,{project:e})},null==e?void 0:e.id):null)})]}):null,(null==I||null==(N=I.articles)?void 0:N.length)?(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,i.jsx)(k,{type:_.ARTICLE}),(0,i.jsx)("div",{className:"flex flex-col items-center w-full",children:(0,i.jsx)(n.PY1.div,{className:"flex flex-col gap-4 items-center w-full",initial:"hidden",animate:"visible",variants:w,children:null==I||null==(P=I.articles)?void 0:P.map(e=>e?(0,i.jsx)(n.PY1.div,{variants:R,className:"h-full w-full",custom:"vertical",children:(0,i.jsx)(y,{article:e})},null==e?void 0:e.id):null)})})]}):null,(null==I||null==(A=I.posts)?void 0:A.length)?(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)(k,{type:_.POST}),(0,i.jsx)("div",{className:"flex items-start w-full overflow-x-scroll hide-scrollbar",children:(0,i.jsx)(n.PY1.div,{className:"flex items-start gap-6 p-4",initial:"hidden",animate:"visible",variants:w,children:null==I||null==(T=I.posts)?void 0:T.map(e=>e?(0,i.jsx)(n.PY1.div,{variants:R,className:"h-full",custom:"horizontal",children:(0,i.jsx)(C,{post:e})},null==e?void 0:e.id):null)})})]}):null]}),U=(null==I||null==(S=I.error)?void 0:S.length)?(0,i.jsx)(b.A,{as:c.default.MediumText,sm:!0,className:"font-mono ml-4",text:null==I?void 0:I.error}):Y;return(0,i.jsxs)("div",{className:"flex flex-col gap-4 relative ".concat(F?"min-h-[calc(100vh-222px)]":""),children:[(0,i.jsx)("div",{className:"flex w-full bg-gray-00",children:(0,i.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-2 w-full bg-gray-00",children:[(0,i.jsx)(c.default.NormalText,{sm:!0,xxl:!0,className:" tracking-tight",children:B}),(0,i.jsx)(o.Ay.CarbonTransparent,{circular:!0,onClick:()=>O(B),children:(0,i.jsx)("span",{className:"text-[#435346]",children:(0,i.jsx)(s.EditPencilIcon,{size:20})})})]})}),D?(0,i.jsxs)("div",{className:"flex gap-2 items-center ml-4",children:[(0,i.jsx)(p,{}),(0,i.jsx)(c.default.SemiBoldText,{className:"font-mono animate-pulse",children:"Thinking"})]}):U]})};var O=t(82541),H=t(34321),F=t(80980);let B=()=>{var e;let l=(0,r.useRouter)(),t=null==l||null==(e=l.query)?void 0:e.conversationId,[n,s]=(0,a.useState)(""),[o,c]=(0,a.useState)([]),d=()=>{var e;null==(e=window)||e.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},m=e=>{c(l=>[...l,{id:null==e?void 0:e.id,type:"user",people:[e],prompt:"Tell me more about ".concat(null==e?void 0:e.displayName)}]),setTimeout(()=>{d()},300)},x=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!(null==e?void 0:e.length))return;let i={id:e,type:"user",prompt:e,loading:!0};c(e=>[...e,i]),s(""),setTimeout(()=>{d()},300);try{var a,r;let i={prompt:e,observation:!1};t&&(null==l?void 0:l.asPath)!==u.APP_PATHS.AI_SEARCH_NEW&&(i.conversationId=t);let n=await H.tr.searchPeople(i),s=null==n||null==(r=n.data)||null==(a=r.data)?void 0:a.conversationId;(null==l?void 0:l.asPath)===u.APP_PATHS.AI_SEARCH_NEW&&(l.replace("".concat(u.APP_PATHS.AI_SEARCH,"/").concat(s),void 0,{shallow:!0}),localStorage.removeItem(u.STORAGE_KEYS.NEW_AI_QUERY_PROMPT_KEY)),c(l=>{var t,i,a,r,o,c,u,d,m,x,f,p;
1return[...l.slice(0,-1),{id:s,type:"user",people:(null==n||null==(i=n.data)||null==(t=i.data)?void 0:t.people)||[],projects:(null==n||null==(r=n.data)||null==(a=r.data)?void 0:a.projects)||[],articles:(null==n||null==(c=n.data)||null==(o=c.data)?void 0:o.articles)||[],posts:(null==n||null==(d=n.data)||null==(u=d.data)?void 0:u.posts)||[],error:(null==n||null==(x=n.data)||null==(m=x.data)?void 0:m.error)||"",summary:(null==n||null==(p=n.data)||null==(f=p.data)?void 0:f.summary)||"",prompt:e}]}),setTimeout(()=>{d()},300)}catch(e){c(e=>[...e.slice(0,-1),{...i,loading:!1,error:"Something went wrong. Try again with a different query."}])}};return(0,a.useEffect)(()=>{{let e=localStorage.getItem(u.STORAGE_KEYS.NEW_AI_QUERY_PROMPT_KEY);e&&(s(e),x(e))}},[]),(0,i.jsxs)("div",{className:"flex flex-col justify-between gap-2.5 w-full flex-grow",children:[(0,i.jsx)("div",{className:"flex flex-col gap-6",children:null==o?void 0:o.map((e,l)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(I,{item:e,setPrompt:s,handleUserClick:m,isLastItem:l===o.length-1},null==e?void 0:e.id),(null==o?void 0:o.length)>1&&l!==o.length-1?(0,i.jsx)("div",{className:"py-6 px-4",children:(0,i.jsx)("hr",{className:"w-full"})}):null]}))}),(0,i.jsx)("div",{className:"sticky bottom-0 p-4 mx-auto w-full",children:(0,i.jsx)(O.A,{prompt:n,setPrompt:s,handleSubmit:()=>x(n)})})]})};B.getLayout=function(e){return(0,i.jsx)(F.A,{children:e})};let D=B}},e=>{e.O(0,[1515,9111,828,636,6593,8792],()=>e(e.s=22337)),_N_E=e.O()}]);
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.