PageSourceSearch

https://www.30sec.ai/_next/static/chunks/pages/apply/[...interviewID]-f0cc3ff39b407dd2.js

js 30sec.ai collected 2026-10-05 14:15:03 UTC 15,017 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4529],{98043:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/apply/[...interviewID]",function(){return n(94849)}])},94849:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Q}});var i=n(85893),r=n(11163),o=n(47568),s=n(14924),a=n(26042),c=n(69396),l=n(828),u=n(29815),d=n(34051),h=n.n(d),f=n(67294),m=n(99226),p=n(15861),x=n(2734),j=n(98396),g=n(57922),b=n(93946),Z=n(49990),v=n(26215),y=n(23508),w=function(e){var t=e.data,n=e.showLocation,r=void 0===n||n,o=(0,x.Z)(),s=((0,j.Z)(o.breakpoints.up("lg"),{defaultMatches:!0}),(0,f.useState)(!1)),a=s[0],c=s[1],l=!!t.jobAd.descriptionFile;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(m.Z,{children:[(0,i.jsxs)(m.Z,{width:"100%",children:[(0,i.jsx)(p.Z,{textAlign:"center",fontWeight:700,color:"primary.main",variant:"h4",component:"h1",gutterBottom:!0,children:t.jobAd.jobTitle}),(0,i.jsxs)(p.Z,{textAlign:"center",color:"primary.main",variant:"h5",gutterBottom:!0,children:["@ ",t.jobAd.company]}),r&&(0,i.jsx)(p.Z,{textAlign:"center",variant:"h6",color:"text.secondary",children:"".concat(t.jobAd.city," \xb7 ").concat(t.jobAd.country)})]}),l&&(0,i.jsx)(m.Z,{width:"100%",mt:4,display:"flex",flexDirection:"column",alignItems:"center",children:(0,i.jsx)(Z.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},onClick:function(){window.open(t.jobAd.descriptionFile)},children:(0,i.jsx)(p.Z,{variant:"body1",color:"text.secondary",textAlign:"center",sx:{textDecoration:"underline"},children:"Click to view Job description"})})}),!l&&(0,i.jsxs)(m.Z,{width:"100%",mt:4,display:"flex",flexDirection:"column",alignItems:"center",children:[(0,i.jsxs)(Z.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},onClick:function(){c((function(e){return!e}))},children:[(0,i.jsx)(p.Z,{variant:"body1",color:"text.secondary",textAlign:"center",children:"Click to view Job description"}),(0,i.jsx)(b.Z,{sx:{color:"primary.main"},children:a?(0,i.jsx)(y.Z,{}):(0,i.jsx)(v.Z,{})})]}),(0,i.jsx)(m.Z,{width:{xs:"100%",md:"80%"},px:2,mb:1,children:(0,i.jsx)(g.Z,{in:a,children:(0,i.jsx)(p.Z,{variant:"body1",sx:{whiteSpace:"pre-line"},children:"".concat(t.jobAd.description)})})})]})]})})},k=n(53156),S=n(67720),E=n(83321),A=n(30223),C=n(98789),F=n(59047),R=function(){var e=(0,F.rS)(),t=(0,f.useState)(null),n=t[0],i=t[1];(0,f.useEffect)((function(){!function(){var e=window.navigator.userAgent;e.indexOf("Chrome")>-1?i("Google Chrome"):e.indexOf("Firefox")>-1?i("Mozilla Firefox"):e.indexOf("Safari")>-1?i("Apple Safari"):e.indexOf("Opera")>-1||e.indexOf("OPR")>-1?i("Opera"):e.indexOf("Edge")>-1?i("Microsoft Edge"):e.indexOf("Trident")>-1?i("Internet Explorer"):i("Unknown")}()}),[]),(0,f.useEffect)((function(){n&&e.event(n,"browser")}),[n]);var r=(0,f.useState)(null),o=r[0],s=r[1];return(0,f.useEffect)((function(){!function(){var e=window.navigator.platform;e.startsWith("Win")?s("Windows"):e.startsWith("Mac")?s("MacOS"):e.startsWith("Linux")?s("Linux"):e.startsWith("iOS")?s("iOS"):e.startsWith("Android")?s("Android"):s("Unknown")}()}),[]),(0,f.useEffect)((function(){o&&e.event(o,"operating-system")}),[o]),null},W=n(93468),O=n(99964),P=n(18377),I=n(92708),_=function(e){var t,n=e.blobUrls,r=e.onError,s=e.onComplete,l=void 0===s?function(e){}:s,d=(0,f.useState)(!0),m=d[0],p=(d[1],(0,f.useState)(Array(n.length).fill(0))),x=p[0],j=p[1],g=(0,A.U)(),b=function(e,t,n,i){return new Promise((function(o,s){var a=new XMLHttpRequest;a.upload.addEventListener("progress",(function(e){if(e.lengthComputable){var n=100*e.loaded/e.total;j((function(e){var i=(0,u.Z)(e);return i[t]=n,i}))}}),!1),a.open("PUT",e,!0),a.onload=function(){200===a.status?(0,W.i)("/api/gcp/upload-complete",{file_name:i.file}).then((function(e){o(i)})):(r(),g.setError({title:"File upload failed",body:"Refresh your browser and try again. We apologize for the inconvenience"}),s())},a.onerror=function(){r(),g.setError({title:"File upload failed",body:"Refresh your browser and try again. We apologize for the inconvenience"}),s()},a.setRequestHeader("Content-Type",n.type),a.send(n)}))},Z=function(){var e=(0,o.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all(n.map(function(){var e=(0,o.Z)(h().mark((function e(t,n){var i,o,s,l,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.url,e.next=3,fetch(i).then((function(e){return e.blob()}));case 3:return o=e.sent,e.next=6,(0,W.R)("/api/gcp/signedURL?sizeInMB=".concat(o.size/1e6,"&type=").concat(o.type));case 6:return(s=e.sent).success||(r(),g.setError({title:"File upload failed",body:"Refresh your browser and try again. We ap
1ologize for the inconvenience"})),l=s.data,u=(0,c.Z)((0,a.Z)({},t),{file:l.file_name}),e.abrupt("return",b(l.url,n,o,u));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 3:t=e.sent,l(t),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),r(),g.setError({title:"File upload failed",body:"Refresh your browser and try again. We apologize for the inconvenience"});case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){Z()}),[]);var v=Math.min((t=Math).min.apply(t,(0,u.Z)(x)),99);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(O.Z,{open:m,onClose:function(){},children:(0,i.jsx)(P.Z,{height:"auto",padding:10,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:"white",borderRadius:2},children:(0,i.jsx)(I.Z,{value:v,text:"Files are uploading"})})})})},T=n(61603),z=n(18979),U=function(e){var t=e.rowsNum;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.Z,{display:"flex",justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},flexDirection:{xs:"column",sm:"row"},children:(0,i.jsx)(m.Z,{width:"100%",children:(0,u.Z)(Array(3)).map((function(e,t){return(0,i.jsx)(z.Z,{width:300,height:50,style:{margin:"auto"}})}))})}),(0,i.jsx)(S.Z,{sx:{marginY:2}}),(0,u.Z)(Array(t)).map((function(e,t){return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(f.Fragment,{children:[(0,i.jsx)(z.Z,{width:200,height:50}),(0,i.jsxs)(m.Z,{width:"100%",position:"relative",children:[(0,i.jsx)(z.Z,{height:200}),(0,i.jsx)(p.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Loading..."})]}),(0,i.jsx)(S.Z,{sx:{my:5}})]},"section-".concat(t))})}))]})},M=n(82580),L=n(19411),D=n(16310),N=n(21121),q=function(e){var t=e.onAuth,n=e.jobData,r=(0,f.useState)(!1),s=r[0],l=r[1],u=(0,A.U)();(0,f.useEffect)((function(){var e;(null===(e=n.customization)||void 0===e?void 0:e.signIn)?(0,W.R)("/api/campaigns/submit/check-auth?assessmentId=".concat(n.id)).then((function(e){e.success?t():l(!0)})):t()}),[]);var d=function(){var e=(0,o.Z)(h().mark((function e(i){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.i)("/api/campaigns/submit/auth",(0,c.Z)((0,a.Z)({},j.values),{assessmentId:n.id,jobAdId:n.jobAd.id}));case 2:e.sent.success?t():u.setError({title:"Access denied",body:"You are not allowed to take this assessment. Write to us via the 'Contact Us' section, if you believe this is a mistake."});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=D.object({email:L.Io}),j=(0,M.TA)({initialValues:{email:""},validationSchema:x,onSubmit:d});if(!s)return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(k.Z,{maxWidth:"md",children:(0,i.jsx)(U,{rowsNum:1})})});n.jobAd;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("form",{onSubmit:j.handleSubmit,children:(0,i.jsxs)(k.Z,{maxWidth:"md",sx:{mt:5},children:[(0,i.jsx)(w,{data:n,showLocation:!1}),(0,i.jsx)(p.Z,{textAlign:"center",mt:5,variant:"h6",color:"text.secondary",children:"Please enter the email ID you have provided in your job application."}),(0,i.jsx)(m.Z,{width:{xs:"100%"},mt:4,children:(0,i.jsx)(N.Z,{formik:j,label:"Enter email address",name:"email"})}),(0,i.jsx)(m.Z,{mt:2,children:(0,i.jsx)(E.Z,{variant:"contained",fullWidth:!0,type:"submit",children:"Submit"})})]})})})},B=function(e){e.data;var t,n=(0,f.useRef)(null),d=(0,f.useState)(null),x=d[0],j=d[1],g=(0,f.useState)(!1),b=g[0],Z=g[1],v=(0,A.U)(),y=(0,l.Z)(f.useState({}),2),O=y[0],P=y[1],I=(0,l.Z)(f.useState({}),2),z=I[0],M=I[1],L=(0,l.Z)(f.useState("waiting"),2),D=L[0],N=L[1],B=(0,f.useState)(!1),V=B[0],Y=B[1],H=((0,C.V)(),(0,F.rS)()),J=(0,r.useRouter)(),X=Object.keys(O).reduce((function(e,t){var n=Object.keys(O[t]).reduce((function(e,n){return O[t][n]._upload?(0,u.Z)(e).concat([{section:t,field:n,url:O[t][n].url}]):e}),[]);return(0,u.Z)(e).concat((0,u.Z)(n))}),[]);(0,f.useEffect)((function(){J.isReady&&(0,W.R)("/api/campaigns/public?url=".concat(J.query.interviewID[0])).then((function(e){e.success?j(e.data):v.setError({title:"Job ad not found",body:"Please confirm that you have entered the correct URL."})}))}),[J.isReady,b]);var G=function(){var e=(0,o.Z)(h().mark((function e(t){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.i)("/api/campaigns/response?id=".concat(x.id),{data:t});case 2:if(!(n=e.sent).success){e.next=7;break}localStorage.removeItem("".concat(x.id,"_progress")),N("submitted"),v.setError({title:"Thank y
1ou for your submission",body:"The job poster will get back to you shortly with feedback."},{onClick:function(){J.push("/apply/success")}}),e.next=21;break;case 7:N("waiting"),e.t0=n.exitCode,e.next=41===e.t0?11:42===e.t0?13:44===e.t0?15:47===e.t0?17:19;break;case 11:case 13:return v.setError({title:"The Job Ad is not accepting applications",body:"Please check with the job poster, and ensure that you have the right link."}),e.abrupt("break",21);case 15:case 17:return v.setError({title:"Refresh the page",body:"Your login may have expired, you need to sign in first to submit this assessment."}),e.abrupt("break",21);case 19:return v.setError({title:"Submission Failed",body:"Please check your responses and try again. Use the 'Contact us' form if the issue persists"}),e.abrupt("break",21);case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=(0,o.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y(!0),Object.keys(z).every((function(e){return z[e]}))?N("uploading"):v.setError({title:"Your form is incomplete",body:(0,i.jsxs)(i.Fragment,{children:["Please check your form and correct all the errors highlighted in ",(0,i.jsx)(p.Z,{component:"span",color:"error.main",children:"red"})]})},{onClick:function(){setTimeout((function(){window.scrollTo({top:document.getElementById("topfic").offsetTop-60,behavior:"smooth"})}),100)}});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return x?b?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.Z,{id:"topfic",height:"1px",width:"100%",ref:n}),(0,i.jsxs)(k.Z,{maxWidth:"md",sx:{marginTop:3,marginBottom:20},children:[x&&(0,i.jsx)(w,{data:x}),(0,i.jsx)(S.Z,{sx:{marginY:2}}),null===x||void 0===x||null===(t=x.formTemplate)||void 0===t?void 0:t.map((function(e,t){var n=T.Z.ApplicationForm[e.component],r={showErrors:V,onUpdate:function(t){var n=t.isValid,i=t.values;P((function(t){return(0,c.Z)((0,a.Z)({},t),(0,s.Z)({},e.id,i))})),M((function(t){return(0,c.Z)((0,a.Z)({},t),(0,s.Z)({},e.id,n))})),n&&H.event("section-complete",e.id)},customization:(0,c.Z)((0,a.Z)({},e.customization),{_id:e.id,_jobAd:x})};return(0,i.jsxs)(f.Fragment,{children:[(0,i.jsx)(n,(0,a.Z)({},r)),(0,i.jsx)(S.Z,{sx:{my:5}})]},"section-".concat(t))})),(0,i.jsx)(E.Z,{variant:"contained",size:"large",fullWidth:!0,onClick:K,disabled:!1,children:"Submit"})]}),"uploading"===D&&(0,i.jsx)(_,{blobUrls:X,onComplete:function(){var e=(0,o.Z)(h().mark((function e(t){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(0,a.Z)({},O),t.forEach((function(e){n[e.section][e.field]=e.file})),G(n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),onError:function(){N("waiting")}}),(0,i.jsx)(R,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(q,{onAuth:function(){Z(!0),j(null)},jobData:x})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(k.Z,{maxWidth:"md",children:(0,i.jsx)(U,{rowsNum:2})})})},V=n(58032),Y=n(14564),H=n(55113),J=n(86886),X=n(63094),G=n(60888),K=function(){var e=(0,f.useState)(!1),t=e[0],n=e[1],o=(0,f.useState)(""),s=o[0],c=o[1],l=(0,x.Z)(),u=(0,r.useRouter)(),d=(0,f.useRef)(null),h=(0,f.useState)(null),g=h[0],b=h[1],Z=Boolean(g),v=(0,j.Z)(l.breakpoints.up("md"),{defaultMatches:!0});(0,f.useEffect)((function(){console.log(u),u.isReady&&c(u.asPath)}),[u.isReady,u.pathname]);var y=(0,M.TA)({initialValues:{email:"",name:"",message:""},validationSchema:D.object({email:L.Io,name:(0,L.ky)(!0),message:(0,L.wK)({required:!0,maxLength:400})}),onSubmit:function(){n(!0),(0,W.i)("/api/help",(0,a.Z)({page:s},y.values))}});return(0,f.useEffect)((function(){Z&&n(!1),y.setFieldValue("message","")}),[Z]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(V.Z,{color:"secondary",sx:{margin:0,top:"auto",right:20,bottom:20,left:"auto",position:"fixed",height:v?70:55,width:v?70:55},onClick:function(e){b(e.currentTarget)},ref:d,children:(0,i.jsx)(X.Z,{})}),(0,i.jsx)(Y.ZP,{open:Z,anchorEl:g,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){b(null)},children:(0,i.jsx)(H.Z,{elevation:8,children:(0,i.jsx)("form",{onSubmit:y.handleSubmit,children:(0,i.jsxs)(J.ZP,{container:!0,spacing:2,p:3,maxWidth:500,minHeight:400,children:[(0,i.jsxs)(J.ZP,{item:!0,xs:12,mb:3,children:[(0,i.jsx)(p.Z,{variant:"h6",fontWeight:700,children:"Help & Support"}),(0,i.jsx)(p.Z,{children:" Use the form below submit a query or problem you are facing. An agent will be in touch within 24 hours."})]}),!t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(J.ZP,{item:!0,xs:12,children:(0,i.jsx)(N.Z,{name:"name",label:"Full Name",formik:y})}),(0,i.jsx)(J.ZP,{item:!0,xs:12,children:(0,i.jsx)(N.Z,{name:"email",label:"Email address",formik:y})}),(0,i.jsx)(J.ZP,{item:!0,xs:12,children:(0,i.jsx)(N.Z,{name:"message",label:"Enter your question",formik:y,rows:5,showCharCount:400})}),(0,i.jsx)(J.ZP,{item:!0,xs:12,children:(0,i.jsx)(E.Z,{size:"large",variant:"contained",type:"submit",fullWidth:!0,children:"Submit"})})]}),t&&(0,i.jsx)(J.ZP,{item:!0,xs:12,children:(0,i.jsxs)(m.Z,{display:"flex",justifyContent:"center",mb:2,children:[(0,i.jsx)(p.Z,{variant:"h4",fontWeight:700,align:"center",color:"success.main",pr:1,children:"Message sent"}),(0,i.jsx)(G.Z,{sx:{color:l.palette.success.main,fontSize:25}})]})})]})})})})]})},Q=function(e){var t=e.data,n=void 0===t?{}:t;(0,r.useRouter)(),(0,F.rS)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B,{data:n}),(0,i.jsx)(K,{})]})}}},function(e){e.O(0,[3362,2617,6310,2580,3467,5859,1526,9774,2888,179],(function(){return t=98043,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.