PageSourceSearch

https://iamaiworld.ai/_next/static/chunks/pages/profile/fill-ba385842b8179a9d.js

js iamaiworld.ai collected 2026-10-05 12:04:37 UTC 17,384 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1976],{83876:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/fill",function(){return t(3885)}])},50918:function(e,r,t){"use strict";t.d(r,{f:function(){return a}});var n=t(85893),i=t(9008),o=t.n(i),a=function(e){var r=e.title,t=e.description;return(0,n.jsxs)(o(),{children:[(0,n.jsx)("title",{children:r}),(0,n.jsx)("meta",{name:"description",content:t}),(0,n.jsx)("meta",{property:"og:title",content:r}),(0,n.jsx)("meta",{property:"og:description",content:t})]})}},18954:function(e,r,t){"use strict";t.d(r,{A:function(){return m}});var n=t(85893),i=t(59876),o=t(68527),a=t(15193),l=t(88145),s=t(1286),c=t(24364),d=function(){return(0,n.jsx)(l.r,{href:c.$w.Root,display:"flex",alignItems:"center",children:(0,n.jsx)(s.K7,{})})},m=function(e){var r=e.buttonClick,t=e.buttonText;return(0,n.jsx)(o.xu,{borderBottom:"0.065rem solid black",pos:"relative",zIndex:10,children:(0,n.jsxs)(o.kC,{as:"header",alignItems:"center",justifyContent:"space-between",maxW:1520,px:{base:"1rem",sm:"2rem"},h:"5rem",mx:"auto",children:[(0,n.jsx)(a.zx,{leftIcon:(0,n.jsx)(i.Tw,{fontSize:"0.875rem"}),colorScheme:"black",textTransform:"uppercase",variant:"link",lineHeight:"1.25rem",letterSpacing:"-0.8px",onClick:function(){return r()},children:t}),(0,n.jsx)(d,{}),(0,n.jsx)(o.xu,{w:"50px"})]})})}},3885:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return J}});var n=t(85893),i=t(11163),o=t(67294),a=t(43238),l=t(68527),s=t(15193),c=t(68133),d=t(50918),m=t(18954),u=t(56305),p=t(24364),h=t(88767),f=t(60400),x=function(e){var r=e.content,t=e.title;return(0,n.jsxs)(l.xu,{mt:"0 !important",children:[(0,n.jsx)(l.xv,{mb:"1.25rem",fontWeight:"500",fontFamily:"heading",fontSize:{base:"1.125rem",sm:"xl"},letterSpacing:"normal",lineHeight:{base:"1.5rem",sm:"2rem"},children:t}),(0,n.jsx)(n.Fragment,{children:r})]})},b=t(96486),g=t(59876),v=t(39067),j=function(e){var r=e.cvSkills,t=e.removeSkill,i=(0,v.ut)().data,o=function(e){return!(0,b.isUndefined)(null===i||void 0===i?void 0:i.find((function(r){return r.name==e})))};return(0,n.jsx)(l.kC,{gap:"0.5rem",flexWrap:"wrap",children:r.sort((function(e,r){return Number(o(e.name))-Number(o(r.name))})).map((function(e){return(0,n.jsxs)(l.kC,{gap:"0.5rem",borderRadius:"0.25rem",border:"0.065rem solid black",alignItems:"center",px:"1rem",py:"0.4rem",opacity:o(e.name)?1:.5,children:[(0,n.jsxs)(l.xv,{textTransform:"uppercase",fontWeight:"500",whiteSpace:"nowrap",children:[" ",e.name]}),(0,n.jsx)(s.hU,{"aria-label":"remove",variant:"unstyled",display:"flex",alignItems:"center",minWidth:"0",height:"fit-content",icon:(0,n.jsx)(g.Tw,{onClick:function(){return t(e.name)},opacity:"0.5",width:"0.75rem",height:"0.75rem",cursor:"pointer"})})]},e.name)}))})},y=t(26522),k=t(27484),w=t.n(k),S=t(87536),C=t(1604),O=t(79762),I=t(4612),D=t(11391),P=t(33441),M=t(86889),Y=t(32988);function A(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function z(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){A(e,r,t[r])}))}return e}function N(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var T=C.z.object({title:C.z.string().min(2,"Please provide a meaningful value").max(255,"Value should not exceed 255 characters"),company:C.z.string().nonempty("Please provide a company name").max(255,"Value should not exceed 255 characters"),description:C.z.string().min(10,"Please provide a meaningful value").max(2e3,"Value should not exceed 2000 characters"),startMonth:C.z.string().nonempty("Please select a month"),startYear:C.z.string().nonempty("Please select a year"),endMonth:C.z.string(),endYear:C.z.string(),isActive:C.z.boolean(),endDate:C.z.string()}).refine((function(e){return e.isActive||e.endMonth.length>0&&e.endYear.length>0}),{message:"Please, select end date",path:["endDate"]}).refine((function(e){return e.isActive||new Date(Number(e.startYear),Number(e.startMonth))<new Date(Number(e.endYear),Number(e.endMonth))}),{message:"Plesase, set end date later than the start date",path:["endDate"]}),E=["January","February","March","April","May","June","July","August","September","October","November","December"],F=function(e){var r=e.children;return(0,n.jsx)(l.xv,{mb:"1.25rem",textTransform:"uppercase",as:"h2",fontSize:{base:"sm",sm:"md"},letterSpacing:"-0.8px",fontWeight:"500",children:r})},_=function(e){var r,t,i,o,a,d,m,u,p,h,f=e.experience,x=e.index,b=e.updateExperience,g=e.onRemove,v=z({startMonth:w()(null===f||void 0===f?void 0:f.startDate).month().toString(),startYear:w()(null===f||void 0===f?void 0:f.startDate).year().toString(),endMonth:w()(null!==(u=null===f||void 0===f?void 0:f.endDate)&&void 0!==u?u:new Date).month().toString(),endYear:w()(null!==(p=null===f||void 0===f?void 0:f.endDate)&&void 0!==p?p:new Date).year().toString()},f,{endDate:null!==(h=null===f||void 0===f?void 0:f.endDate)&&void 0!==h?h:""}),j=(0,S.cI)({defaultValues:v,resolver:T&&(0,y.F)(T)}),k=j.formState,C=j.register,A=j.watch,_=j.reset,R=(j.setValue,j.handleSubmit),W=A("title"),H=A("company"),V=A("description"),K=A("isActive"),J=(A("endMonth"),A("endYear"),A("endDate"),function(){for(var e=(new Date).getFullYear(),r=e-100,t=[],n=e;n>=r;n--)t.push(n);return t}());return(0,n.jsxs)(l.Kq,{mt:"0 !Important",borderRadius:"0.25rem",border:"0.065rem solid black",padding:{base:"1rem",sm:"1.25rem"},position:"relative",children:[(0,n.jsx)("form",{id:f.title,style:{width:"100%"},onSubmit:R((function(e,r){null===r||void 0===r||r.preventDefault(),null===r||void 0===r||r.stopPropagation();var t=e.isActive,n=e.startMonth,i=e.startYear,o=e.endMonth,a=e.endYear,l=z({},N(e,["isActive","startMonth","startYear","endMonth","endYear"]),{isActive:t,startDate:w()(new Date(Number(i),Number(n))).format("YYYY-MM-DD"),endDate:t?void 0:o&&a?w()(new Date(+a,+o)).format("YYYY-MM-DD"):void 0});b(x,l),_({},{keepValues:!0})})),children:(0,n.jsxs)(l.Kq,{gap:{base:"2rem",sm:"3rem"},children:[(0,n.jsxs)(l.kC,{flexDirection:{base:"column",md:"row"},gap:"1.5rem",children:[(0,n.jsxs)(O.NI,{isInvalid:!!k.errors.title,mb:3,children:[(0,n.jsx)(F,{children:"TITLE/POSITION *"}),(0,n.jsx)(I.II,z({id:"title",placeholder:"Ex: Project Engineer",_focus:{},autoFocus:!0,border:"0.065rem solid black",borderRadius:"0.25rem",letterSpacing:"-0.8px",height:"fit-content",padding:"1.25rem",lineHeight:"1.25rem"},C("title"))),(0,n.jsx)(O.J1,{mt:"0.5rem",children:null===(r=k.errors.title)||void 0===r?void 0:r.message})]}),(0,n.jsxs)(O.NI,{mt:"0 !important",isInvalid:!!k.errors.company,mb:3,children:[(0,n.jsx)(F,{children:"COMPANY/ORGANISATION *"}),(0,n.jsx)(I.II,z({id:"company",placeholder:"Ex: Microsoft",_focus:{},autoFocus:!0,border:"0.065rem solid black",borderRadius:"0.25rem",letterSpacing:"-0.8px",height:"fit-content",padding:"1.25rem",lineHeight:"1.25rem"},C("company"))),(0,n.jsx)(O.J1,{mt:"0.5rem",children:null===(t=k.errors.company)||void 0===t?void 0:t.message})]})]}),(0,n.jsxs)(l.xu,{mt:"0 !important",children:[(0,n.jsxs)(l.xu,{mb:"1rem",children:[(0,n.jsx)(l.xv,{mb:"0.5rem",textTransform:"uppercase",as:"h2",fontSize:{base:"sm",sm:"md"},letterSpacing:"-0.8px",fontWeight:"500",children:"Time period"}),(0,n.jsx)(l.xu,{mb:"0.5rem",children:(0,n.jsx)(c.XZ,z({colorScheme:"blackCheckbox",sx:{"> control":{backgroundColor:"black !important",color:"black"}}},C("isActive"),{children:"I currently work here"}))})]}),(0,n.jsx)(l.xv,{mb:"1.25rem",textTransform:"uppercase",as:"h2",fontSize:{base:"sm",sm:"md"},letterSpacing:"-0.8px",fontWeight:"500",children:"FROM"}),(0,n.jsx)(l.xu,{children:(0,n.jsxs)(l.Ug,{spacing:{base:"0.75rem",sm:6},children:[(0,n.jsxs)(O.NI,{isInvalid:!!k.errors.startMonth,children:[(0,n.jsx)(D.Ph,z({id:"startDateMonth",_focus:{},icon:(0,n.jsx)(M.Z,{width:"1rem",fill:"black"}),border:"0.065rem solid black",borderRadius:"0.25rem",letterSpacing:"-0.8px",sx:{padding:"1.25rem",height:"fit-content",color:"black",gap:"1.25rem","> option":{backgroundColor:"white",height:"2.5rem",padding:"1.25rem"}}},C("startMonth"),{children:E.map((function(e,r){return(0,n.jsx)("option",{style:{backgroundColor:"white"},value:r,children:e},e)}))})),(0,n.jsx)(O.J1,{children:null===(i=k.errors.startMonth)||void 0===i?void 0:i.message})]}),(0,n.jsxs)(O.NI,{isInvalid:!!k.errors.startYear,children:[(0,n.jsx)(D.Ph,z({iconColor:"black",_focus:{},icon:(0,n.jsx)(M.Z,{width:"1rem",fill:"black"}),border:"0.065rem solid black",borderRadius:"0.25rem",letterSpacing:"-0.8px",sx:{padding:"1.25rem",height:"fit-content",color:"black",gap:"1.25rem","> option":{backgroundColor:"white",height:"2.5rem",padding:"1.25rem"}}},C("startYear"),{children:J.map((function(e){return(0,n.jsx)("option",{style:{backgroundColor:"white"},value:e,children:e},e)}))})),(0,n.jsx)(O.J1,{children:null===(o=k.errors.startYear)||void 0===o?void 0:o.message})]})]})}),!K&&(0,n.jsxs)(l.xu,{mt:"1rem",children:[(0,n.jsx)(l.xv,{mb:"1.25rem",textTransform:"uppercase",as:"h2",fontSize:{base:"sm",sm:"md"},letterSpacing:"-0.8px",fontWeight:"500",children:"TO"}),(0,n.jsxs)(O.NI,{isInvalid:!!k.errors.endDate,children:[(0,n.jsxs)(l.Ug,{spacing:{base:"0.75rem",sm:6},children:[(0,n.jsx)(D.Ph,z({iconColor:"black",_focus:{},icon:(0,n.jsx)(M.Z,{width:"1rem",fill:"black"}),border:"0.065rem solid black",borderRadius:"0.25rem",letterSpacing:"-0.8px",sx:{padding:"1.25rem",height:"fit-content",color:"black",gap:"1.25rem","> option":{backgroundColor:"white",height:"2.5rem",padding:"1.25rem"}}},C("endMonth"),{children:E.map((function(e,r){return(0,n.jsx)("option",{style:{backgroundColor:"white"},value:r,children:e},r)}))})),(0,n.jsx)(D.Ph,z({iconColor:"black",_focus:{},icon:(0,n.jsx)(M.Z,{width:"1rem",fill:"black"}),border:"0.065rem solid black",borderRadius:"0.25rem",letterSpacing:"-0.8px",sx:{padding:"1.25rem",height:"fit-content",color:"black",gap:"1.25rem","> option":{backgroundColor:"white",height:"2.5rem",padding:"1.25rem"}}},C("endYear"),{children:J.map((function(e){return(0,n.jsx)("option",{style:{backgroundColor:"white"},value:e,children:e},e)}))})),(0,n.jsx)(O.J1,{children:null===(a=k.errors.endYear)||void 0===a?void 0:a.message})]}),(0,n.jsx)(O.J1,{children:null===(d=k.errors.endDate)||void 0===d?void 0:d.message})]})]})]}),(0,n.jsxs)(O.NI,{mt:"0 !important",isInvalid:!!k.errors.description,mb:3,children:[(0,n.jsx)(F,{children:"WHAT DID YOU DO?"}),(0,n.jsx)(P.g,z({id:"description",py:"1.125rem",px:"1.25rem",minHeight:"22rem",textColor:"black",focusBorderColor:"black",borderColor:"black",placeholder:"Type here..."},C("description"))),(0,n.jsx)(O.J1,{mt:"0.5rem",children:null===(m=k.errors.description)||void 0===m?void 0:m.message})]}),Object.entries(k.dirtyFields).length>0&&(0,n.jsx)(s.zx,{disabled:!W||!H||!V,type:"submit",form:f.title,width:{base:"100%",sm:"12rem"},variant:"black",mt:"0 !important",children:"Save changes"})]})}),(0,n.jsx)(s.hU,{position:"absolute",mt:"0 !important",top:"-1rem",right:"-1rem","aria-label":"remove",variant:"unstyled",rounded:"50%",width:"2rem",border:"0.065rem solid black",backgroundColor:"#F0F0F0",display:"flex",alignItems:"center",justifyContent:"center",icon:(0,n.jsx)(Y.X,{width:"1.25rem",fill:"rgba(0,0,0,0.5)"}),onClick:g})]})};function R(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var W=function(e){var r=e.cvExperience,t=e.removeExperience,i=e.setCvProfileValues,o=function(e,t){var n=r.map((function(r,n){return n==e?t:r}));i((function(e){return function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}
1)))),n.forEach((function(r){R(e,r,t[r])}))}return e}({},e,{experience:n})}))};return(0,n.jsx)(l.Kq,{gap:{base:"1.5rem",sm:"2.5rem"},children:r.map((function(e,r){return(0,n.jsx)(_,{experience:e,onRemove:function(){return t(r)},updateExperience:o,index:r},r)}))})},H=t(21229);function V(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function K(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){V(e,r,t[r])}))}return e}var J=function(){var e=(0,o.useState)(!1),r=e[0],t=e[1],b=(0,v.TK)().data,g=(0,h.useMutation)((function(e){return f.S.post("/me/update-cv-data",e)})),y=g.mutate,k=g.isLoading,w=(0,h.useQuery)(["cv-data"],(function(){return f.S.get("/get-cv-data/me")}),{refetchOnWindowFocus:!1,retry:1}).data,S=(0,a.pm)(),C=(0,i.useRouter)(),O=(0,o.useState)({replaceDescription:!1,description:"",skills:[],experience:[]}),I=O[0],D=O[1];(0,o.useEffect)((function(){var e;w&&D(K({},w,{replaceDescription:"undefined"==typeof b||0==(null===b||void 0===b||null===(e=b.value)||void 0===e?void 0:e.replaceAll(" ","").length)||w.replaceDescription}))}),[w,b]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.f,{title:"IAMAI Create your profile",description:"IAMAI Create your profile"})," ",(0,n.jsx)(m.A,{buttonText:"Cancel",buttonClick:function(){return C.back()}}),r?(0,n.jsxs)(l.Kq,{minHeight:"calc(100vh - 5rem)",alignSelf:"center",justifyContent:"center",height:"100%",gap:"3rem",alignItems:"center",children:[(0,n.jsxs)(l.Kq,{alignItems:"center",gap:"1rem",children:[(0,n.jsx)(u.Z,{width:"3rem"}),(0,n.jsx)(l.xv,{margin:"0 !important",textAlign:"center",fontFamily:"heading",fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},lineHeight:{base:"2rem",sm:"3.25rem"},children:"Your profile was updated."})]}),(0,n.jsx)(s.zx,{onClick:function(){C.push(p.$w.Profile)},px:"0",width:"10rem",margin:"0 !important",variant:"transparent",children:"Okay"})]}):(0,n.jsx)(l.kC,{alignItems:"center",justifyContent:"center",children:(0,n.jsxs)(l.Kq,{gap:{base:"1.5rem",sm:"2.5rem",lg:"3.75rem"},py:{base:"2rem",sm:"3rem",lg:"5rem"},px:{base:"1rem",sm:"2rem"},letterSpacing:"-0.8px",w:"100%",maxW:1272,children:[(0,n.jsxs)(l.xu,{children:[(0,n.jsx)(l.xv,{fontFamily:"heading",fontSize:{base:"xl",sm:"2xl"},lineHeight:{base:"2rem",sm:"3.25rem"},fontWeight:"500",children:"Fill your profile with the CV info"}),(0,n.jsx)(l.xv,{mt:"0.5rem",opacity:"0.5",lineHeight:"1.25rem",children:"Review the information from your CV, make changes if needed, and it will be displayed in the relevant sections of your profile."})]}),(0,n.jsxs)(l.Kq,{gap:{base:"2rem",sm:"3.75rem"},children:[(0,n.jsx)(x,{content:(0,n.jsxs)(l.Kq,{gap:"0.75rem",letterSpacing:"-0.8px",children:[b&&(0,n.jsxs)(l.Kq,{mt:"-0.5rem",borderRadius:"0.25rem",backgroundColor:"#F0F0F0",padding:"1.25rem",gap:"1.25rem",children:[(0,n.jsxs)(l.xv,{fontSize:{base:"sm",sm:"md"},children:[(0,n.jsxs)(l.xv,{display:"inline",fontWeight:"500",children:["Pay Attention."," "]}),"'About Me' section is already filled on your profile. Would you like to replace it with information from your CV?"]}),(0,n.jsx)(c.XZ,{mt:"0 !Important",colorScheme:"blackCheckbox",textTransform:"uppercase",fontWeight:"500",sx:{"> control":{backgroundColor:"black !important",color:"black"},borderColor:"black"},outline:"none !important",lineHeight:"1.25rem",textAlign:"center",gap:"0.25rem",checked:I.replaceDescription,onChange:function(e){return D((function(r){return K({},r,{replaceDescription:e.target.checked})}))},children:"Replace about me section info with info from CV"})]}),(0,n.jsx)(H.Z,{id:"description",mt:"0 !important",focusBorderColor:"black",borderColor:"black",textColor:"black",minHeight:"22rem",autoFocus:!0,py:"1.125rem",px:"1.25rem",placeholder:"Type here...",value:I.description,limit:2e3,onChange:function(e){return D((function(r){return K({},r,{description:e.target.value})}))}})]}),title:"About me"}),I.skills.length>0&&(0,n.jsx)(x,{content:(0,n.jsx)(j,{cvSkills:I.skills,removeSkill:function(e){D((function(r){return K({},r,{skills:r.skills.filter((function(r){return r.name!==e}))})}))}}),title:"Skills"}),I.experience.length>0&&(0,n.jsx)(x,{content:(0,n.jsx)(W,{cvExperience:I.experience,removeExperience:function(e){D((function(r){return K({},r,{experience:r.experience.filter((function(r,t){return t!==e}))})}))},setCvProfileValues:D}),title:"Experience"}),(0,n.jsx)(s.zx,{isLoading:k,onClick:function(){y(I,{onSuccess:function(){return t(!0)},onError:function(){S({title:"An unexpected error has occurred",description:"Please try again. If issue persist, please contact admin.",status:"error",duration:1500,isClosable:!0})}})},width:{base:"100%",sm:"10rem"},variant:"black",mt:"0 !important",children:"Save"})]})]})})]})}}},function(e){e.O(0,[7665,3662,3908,3238,6387,8990,3910,9876,6617,1664,3225,2370,9067,9774,2888,179],(function(){return r=83876,e(e.s=r);var r}));var r=e.O();_N_E=r}]);

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.