1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49295],{2938:(e,t,r)=>{r.d(t,{H8:()=>p,HJ:()=>d,Qo:()=>y,TC:()=>m,UM:()=>c,VX:()=>C});var o=r(15457),n=r(49457),l=r(12115);async function a(e,t,r=!1,n="profile"){let l=`/employer/${e}`,i={};t&&(i["x-user-id"]=t);try{let e=await (0,o.Vg)(l,{tab:n},r,{headers:i,throwOnError:!0});if(!e?.data)return null;return e}catch(e){if(e instanceof o.hD&&404===e.status)return null;throw e}}async function i(e,t=!1){try{let r=await (0,o.$P)("/getEmployers",{industryClientYN:!1,...e},t);return r?.data||[]}catch(e){return console.error("Error fetching employers list:",e),[]}}async function c(e,t=!1){try{let r=await (0,o.$P)("/getEmployers",{industryClientYN:!1,...e},t);return{data:r?.data||[],total:r?.total||0}}catch(e){return console.error("Error fetching employers list:",e),{data:[],total:0}}}let u=["id","company_name","acronym","logo","city","state","country","employerRating"];async function s({page:e,limit:t,country:r,sort:o},n=!1){let{data:l,total:a}=await c({page:e,limit:t,sort:o,isUni:1,industryClientYN:!1,company_name:"__not_null__",...r?{country:r}:{},select:u},n);return{universities:l.map(e=>({...e,employerRating:null!=e.employerRating&&Number(e.employerRating)>0?Number(e.employerRating):null})),total:a}}async function m(e,t=!1){try{let r=await (0,o.$P)("/getFavoriteEmployers",e,t);return r?.data||[]}catch(e){return console.error("Error fetching favorite employers:",e),[]}}async function y(e){try{return await (0,o.$P)("/favoriteEmployerId",e),!0}catch(e){return console.error("Error setting favorite employer:",e),!1}}async function d(e,t=!1){let r=e?.trim().toLowerCase();if(!r)return null;let n=r.includes("@")?r.split("@")[1]:r.replace(/^@/,"");if(!n)return null;try{let e=await (0,o.Vg)("/employer-by-domain",{domain:n},t);return e?.success&&e?.data?e.data:null}catch(e){return console.error(`Error fetching employer by email domain "${n}":`,e),null}}async function p(e){try{let t=await (0,o.$P)("/getEmployerSuggestions",e);return t?.data||[]}catch(e){if(e instanceof o.hD&&400===e.status)return[];return console.error("Error fetching employer suggestions:",e),[]}}async function f(e,t=!1){let r=`/employer/${e}/campuses`;try{let e=await (0,o.Vg)(r,{},t);return e?.data||[]}catch(t){return console.error(`Error fetching campuses for employer ID "${e}":`,t),null}}async function g(e,t=!1){let r=`/employer/${e}/job-stats`;try{let e=await (0,o.Vg)(r,{},t);return e?.data??null}catch(t){return console.error(`Error fetching job stats for employer ID "${e}":`,t),null}}async function h(e,t={},r=!1){let n=`/employer/${e}/top-liked-jobs`,{includeExpired:l=!1,limit:a,since:i,year:c}=t;try{let e=await (0,o.Vg)(n,{year:c?c.toString():void 0,since:i,limit:a?a.toString():void 0,includeExpired:l?"true":void 0},r);return(e?.data??[]).filter(e=>e?.id!=null&&e?.title).map(e=>({id:e.id,activationDate:e.activationDate??null,expirationDate:e.expirationDate??null,isExpired:!0===e.isExpired||1===e.isExpired||"1"===e.isExpired,title:e.title,likeCount:Number(e.likeCount)||0}))}
1catch(t){return console.error(`Error fetching top liked jobs for employer ID "${e}":`,t),[]}}async function b(e,t,r=!1){let l=t?(0,n.fM)(t):"global";try{let t=await (0,o.Vg)("/employers/top-by-likes",{limit:e?e.toString():void 0,countryCode:"global"===l?void 0:l},r);return(t?.data??[]).filter(e=>e?.id!=null&&e?.company_name).map(e=>({id:e.id,company_name:e.company_name,acronym:e.acronym??null,likeCount:Number(e.likeCount)||0,favouriteCount:Number(e.favouriteCount)||0,jobCount:Number(e.jobCount)||0}))}catch(e){return console.error("Error fetching top employers by likes:",e),[]}}async function w(e,t,r=!1){let l=t?(0,n.fM)(t):"global";try{let t=await (0,o.Vg)("/employers/top-by-views",{limit:e?e.toString():void 0,countryCode:"global"===l?void 0:l},r);return(t?.data??[]).filter(e=>e?.id!=null&&e?.company_name).map(e=>({id:e.id,company_name:e.company_name,acronym:e.acronym??null,jobCount:Number(e.jobCount)||0,viewCount:Number(e.viewCount)||0,likeCount:Number(e.likeCount)||0}))}catch(e){return console.error("Error fetching top employers by views:",e),[]}}async function v(e,t=!1){let r=`/getEmployerLinks/${e}`;try{return(await (0,o.Vg)(r,{},t)).data}catch(t){return console.error(`Error fetching links for employer ID "${e}":`,t),null}}async function E(e,t=!1){let r=`/getRmpContentByEmployer/${e}`;try{return(await (0,o.Vg)(r,{},t)).data}catch(t){return console.error(`Error fetching RMP content for employer ID "${e}":`,t),null}}async function x(e=6,t="global",r=[],n=!1){let l=`/topEmployersByCountry/${t}`;try{let t=await (0,o.Vg)(l,{limit:e.toString(),employers:r.toString()},n);return t?.data??[]}catch(e){return console.error(`Error fetching top employers for country "${t}":`,e),[]}}let C=async e=>{let t="string"==typeof e?{companyName:e}:e;try{return await (0,o.$P)("/addEmployer",t)}catch(e){throw console.error(`Error adding new employer "${t.companyName}":`,e),e}},N=async({careerHubSlug:e,revalidateSeconds:t=!1})=>{let r=`/getEmployerByCareerSlug/${e}`;try{return(await (0,o.Vg)(r,{},t)).data}catch(t){return console.error(`Error fetching employer by name "${e}":`,t),null}};(0,l.cache)(a),(0,l.cache)(i),(0,l.cache)(f),(0,l.cache)(g),(0,l.cache)(h),(0,l.cache)(b),(0,l.cache)(w),(0,l.cache)(v),(0,l.cache)(E),(0,l.cache)(x),(0,l.cache)(N),(0,l.cache)(d),(0,l.cache)(s)},5772:(e,t,r)=>{r.d(t,{default:()=>n.a});var o=r(97651),n=r.n(o)},49295:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var o=r(95155),n=r(2938),l=r(12115),a=r(5772),i=r(47650);let c=({field:e,label:t,customKey:r,value1:c,onChange:u,forceClass:s,forceLabelClass:m,forceListClass:y,onSelect:d,onBlur:p,country:f="",placeholder:g="Select your institution from the dropdown list",required:h=!1,inputClass:b="w-full input input-md input-bordered focus:outline-none focus:border-blue-600 text-lg placeholder-gray-500/70"})=>{let w=(0,l.useRef)(null),[v,E]=(0,l.useState)(c||""),[x,C]=(0,l.useState)(!1),[N,$]=(0,l.useState)([]),[j,k]=(0,l.useState)(!1),[_,S]=(0,l.useState)(null),[V,P]=(0,l.useState)(!1),[D,I]=(0,l.useState)(null);(0,l.useLayoutEffect)(()=>{if(x&&N.length>0&&w.current){let e=w.current.getBoundingClientRect();I({top:e.bottom+window.scrollY,left:e.left,width:e.width})}},[x,N]),(0,l.useEffect)(()=>{P(!0)},[]),(0,l.useEffect)(()=>{c!==v&&E(c)},[c]),(0,l.useEffect)(()=>{if(!V)return;let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="none",e.style.zIndex="9999",e.id="dropdown-portal-"+Math.random().toString(36).substr(2,9),document.body.appendChild(e),S(e),()=>{document.body.contains(e)&&document.body.removeChild(e),S(null)}},[V]);let R=(0,l.useCallback)(async e=>{try{let t=await (0,n.H8)({query:e,country:f});$(t)}catch(e){console.error("Failed to fetch employer suggestions:",e),$([])}},[f]);return(0,l.useEffect)(()=>{let e=e=>{w.current&&!w.current.contains(e.target)&&_&&!_.contains(e.target)&&C(!1)};if(V)return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[_,V]),(0,l.useEffect)(()=>{if(v?.length>=1&&!j){let e=setTimeout(()=>{R(v)},300);return()=>clearTimeout(e)}},[v,R,j]),(0,o.jsxs)("div",{className:"w-full flex-col gap-1.5 items-start",children:[(0,o.jsx)("label",{className:"label-text text-lg ",children:t}),(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)("input",{ref:w,type:"text",value:v,onCh
1ange:e=>{let t=e.target.value;E(t),k(!1),u&&u(t),t?C(!0):(C(!1),$([]))},onClick:()=>C(!0),onBlur:p,autoComplete:"off",name:r,placeholder:g,required:h,style:{position:"static"},className:b}),V&&_&&(0,i.createPortal)(x&&0!==N.length&&w.current&&D?(0,o.jsx)("ul",{className:`${y||""} absolute z-50 left-0 mt-2 w-full max-h-[calc(100vh-344px)] lg:max-h-[calc(100vh-524px)] overflow-y-auto bg-white border border-gray-300 rounded-md shadow-lg list-none`,style:{top:D.top+"px",left:D.left+"px",width:D.width+"px",pointerEvents:"auto"},children:N.map((e,t)=>(0,o.jsxs)("li",{className:"flex items-center justify-between w-full py-3 px-4 hover:bg-gray-50 cursor-pointer border-b border-gray-200 last:border-none",onClick:()=>(e=>{let{company_name:t,id:r,city:o,state:n,country:l,logo:a,employerPageURL:i,clientType:c,emailDomain:s}=e;E(t?.replace(/\s+/g," ").trim()),k(!0),u&&u(t,r,o,n,l,a,i,c),d&&d(t,r,o,n,l,a,i,c,s),C(!1)})(e),children:[(0,o.jsxs)("div",{className:"min-w-0 flex-1 pr-3",children:[(0,o.jsx)("p",{className:"mb-1 font-medium text-black",children:e.company_name}),(0,o.jsxs)("p",{className:"text-sm text-gray-500",children:[e.city?`${e.city}, `:"",e.country]})]}),e.logo&&(0,o.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 flex-shrink-0 overflow-hidden",children:(0,o.jsx)(a.default,{src:`https://cdn.academicjobs.com/img/university-logo/${e.logo}`,alt:`${e.company_name} logo`,className:"object-contain w-full h-full",width:64,height:64})})]},e.id||t))}):null,_)]})]})}},97651:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var o={default:function(){return s},getImageProps:function(){return u}};for(var n in o)Object.defineProperty(t,n,{enumerable:!0,get:o[n]});let l=r(73623),a=r(95413),i=r(38437),c=l._(r(36095));function u(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:c.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let s=i.Image}}]);
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.