1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9939],{67985:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mockinterview/videoAvatarInterview/[id]",function(){return i(54164)}])},54164:function(e,t,i){"use strict";i.r(t);var r=i(85893),n=i(67294),o=i(98396),a=i(99226),s=i(72852),l=i(46901),d=i(15861),x=i(86886),h=i(83321),c=i(98456),p=i(50480),m=i(54118),g=i(27674),u=i(47926);i(66192);var w=i(29474),f=(i(79067),i(1939)),b=i(90948),v=i(23918),j=i(22120),y=i(25675),k=i.n(y),Z=i(11163),S=i(9473),z=i(93607),C=i(83454);let _=g.L,I=()=>{var e,t,i,g,y,I;let R=(0,S.v9)(z.P7),A=null==R?void 0:R.plan,P=null!==(e=null==A?void 0:A.video_recording_allowed)&&void 0!==e&&e,E=(0,Z.useRouter)(),M=Array.isArray(E.query.id)?E.query.id[0]:E.query.id,[W,B]=(0,n.useState)(null),[D,X]=(0,n.useState)(!1),[L,T]=(0,n.useState)(""),[N,H]=(0,n.useState)(!1),{settings:F,saveSettings:V}=(0,v.r)(),{t:G}=(0,j.$G)("common"),[U,q]=(0,n.useState)(null),Y=C.env.NEXT_PUBLIC_LIVEKIT_SERVER_URL||"wss://livekit.xinterview.xyz",K=(0,o.Z)("(min-width:730px)");if((0,n.useEffect)(()=>{q(!K)},[K]),null===U)return null;let O=(0,b.ZP)(a.Z)(e=>{let{theme:t}=e;return{flex:1,width:"100%",[t.breakpoints.up("md")]:{maxWidth:450},[t.breakpoints.up("lg")]:{maxWidth:600},[t.breakpoints.up("xl")]:{maxWidth:700}}}),Q=(0,b.ZP)(s.Z)(e=>{let{theme:t}=e;return{width:62,height:34,padding:7,margin:"8px !important","& .MuiSwitch-switchBase":{top:0,left:12,margin:1,padding:"0 !important",transform:"translateX(-12px)","&.Mu
1i-checked":{color:"#fff",left:2,transform:"translateX(22px)","& .MuiSwitch-thumb:before":{backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20' width='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23fff' d='M4.2 2.5l-.7 1.8-1.8.7 1.8.7.7 1.8.6-1.8L6.7 5l-1.9-.7-.6-1.8zm15 8.3a6.7 6.7 0 11-6.6-6.6 5.8 5.8 0 006.6 6.6z'/%3E%3C/svg%3E\")"},"& + .MuiSwitch-track":{opacity:1,backgroundColor:"dark"===t.palette.mode?"#8796A5":"#aab4be"}}},"& .MuiSwitch-thumb":{backgroundColor:"dark"===t.palette.mode?"#003892 !important":"#001e3c !important",width:32,height:32,"&:before":{content:"''",position:"absolute",width:"100%",height:"100%",left:0,top:0,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20' width='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23fff' d='M9.305 1.667V3.75h1.389V1.667h-1.39zm-4.707 1.95l-.982.982L5.09 6.072l.982-.982-1.473-1.473zm10.802 0L13.927 5.09l.982.982 1.473-1.473-.982-.982zM10 5.139a4.872 4.872 0 00-4.862 4.86A4.872 4.872 0 0010 14.862 4.872 4.872 0 0014.86 10 4.872 4.872 0 0010 5.139zm0 1.389A3.462 3.462 0 0113.471 10a3.462 3.462 0 01-3.473 3.472A3.462 3.462 0 016.527 10 3.462 3.462 0 0110 6.528zM1.665 9.305v1.39h2.083v-1.39H1.666zm14.583 0v1.39h2.084v-1.39h-2.084zM5.09 13.928L3.616 15.4l.982.982 1.473-1.473-.982-.982zm9.82 0l-.982.982 1.473 1.473.982-.982-1.473-1.473zM9.305 16.25v2.083h1.389V16.25h-1.39z'/%3E%3C/svg%3E\")"}},"& .MuiSwitch-track":{width:48,border:0,height:20,opacity:1,borderRadius:10,backgroundColor:"dark"===t.palette.mode?"#8796A5":"#aab4be"}}}),$=()=>{V({...F,mode:"dark"===F.mode?"light":"dark"})},J=async()=>{try{if(!M){T("Interview id not found in the URL");return}X(!0),T("");let{data:e}=await w.ZP.post("/interviews/start/".concat(M,"/"));B(e),H(!0)}catch(e){T(e instanceof Error?e.message:"Failed to start interview")}finally{X(!1)}},ee=()=>{H(!1),B(null)};if(N&&W){let e=null!==(y=null===(t=W.session)||void 0===t?void 0:t.id)&&void 0!==y?y:M,n=null!==(I=null===(i=W.session)||void 0===i?void 0:null===(g=i.ai_interview)||void 0===g?void 0:g.timing)&&void 0!==I?I:void 0;return(0,r.jsxs)(_,{video:!0,audio:!0,token:W.token,serverUrl:Y,"data-lk-theme":"default",style:{height:"100vh"},options:{adaptiveStream:!0,dynacast:!0,videoCaptureDefaults:{resolution:{width:1280,height:720}}},onDisconnected:ee,onError:e=>{console.error("LiveKit connection error:",e),T(e instanceof Error?e.message:"Failed to connect to the interview room"),H(!1)},children:[(0,r.jsx)(f.Z,{session:W,onEndInterview:ee,recordInterview:P,interviewId:e,interviewDurationMinutes:n}),(0,r.jsx)(u.R,{})]})}return(0,r.jsx)(r.Fragment,{children:U?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(a.Z,{sx:{position:"relative",width:"100%",display:"flex",flexDirection:"column",height:"100vh",overflow:"auto",backgroundColor:"dark"===F.mode?"rgba(0, 0, 0, 1)":"white"},children:[(0,r.jsx)(a.Z,{sx:{position:"absolute",top:"20px",left:"20px",zIndex:1e3},children:"light"===F.mode?(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_black_logo.svg",alt:"XCareer logo",priority:!0,width:120,height:26,style:{cursor:"pointer"}})}):(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_logo.png",alt:"XCareer logo",priority:!0,width:120,height:26,style:{cursor:"pointer"}})})}),(0,r.jsx)(a.Z,{sx:{position:"absolute",top:"25%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"80%",sm:"70%",md:"60%",lg:"0px"},height:{xs:"300px",sm:"500px",md:"600px",lg:"0px"},display:{xs:"block",lg:"none"},filter:"blur(20px)",borderRadius:"30px",border:"10px solid ".concat((F.mode,"#15846a")),zIndex:-1}}),(0,r.jsx)(a.Z,{sx:{width:"100%",display:"flex",justifyContent:"center",paddingTop:"1rem",flexShrink:0},children:(0,r.jsx)(a.Z,{sx:{width:"50vh",height:"40rem",position:"relative",bottom:"18px","@media (max-width: 1023px)":{flexDirection:"column-reverse",gap:"6rem"}},children:(0,r.jsx)(O,{sx:{margin:"auto"},children:(0,r.jsx)(a.Z,{sx:{padding:"0.5rem",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",margin:"auto",width:"fit-content","@media (max-width: 1023px)":{margin:"auto"}},children:(0,r.jsxs)(a.Z,{sx:{width:"100%",maxWidth:400,mt:10},children:[L&&(0,r.jsx)(l.Z,{severity:"error",sx:{mb:3},children:L}),(0,r.jsxs)(a.Z,{sx:{my:2,mx:"auto","@media (max-width: 380px)":{width:"310px"}},children:[(0,r.jsx)(d.Z,{variant:"h2",sx:{fontSize:"1.75rem",textAlign:"center",fontWeight:700,mb:1,"@media (max-width: 370px)":{fontSize:"1.5rem"}},children:"Welcome \uD83D\uDC4B"}),(0,r.jsx)(d.Z,{sx:{textAlign:"center",px:"3px",fontSize:"0.95rem",lineHeight:1.4},children:"AI is here to help you practice your interview skills with our avatar interviewer. Good luck!"})]}),(0,r.jsxs)(x.ZP,{item:!0,xs:20,sx:{display:"flex",flexDirection:"column",alignItems:"center",mb:"0.5rem",marginTop:"1rem",borderRadius:"12px",width:"295px",margin:"auto",paddingX:{xs:"0.75rem",sm:"10px"},paddingY:"0.75rem",backgroundColor:"light"===F.mode?"#f2f2f2":"#0f
10f0f"},children:[(0,r.jsx)(a.Z,{sx:{opacity:"85%",marginBottom:"0.5rem",textAlign:"center",marginTop:"0px",overflow:"visible",fontSize:{xs:"0.9rem",sm:"0.95rem"},"@media (max-width: 400px)":{fontSize:"0.85rem"},fontWeight:600,color:"dark"===F.mode?"#1cb08e":"#12715b"},children:"Tips for Success:"}),(0,r.jsxs)(a.Z,{sx:{fontWeight:"500",fontSize:{xs:"11px",sm:"12px"},"@media (max-width: 400px)":{fontSize:"10px"},lineHeight:1.5},children:[(0,r.jsxs)(d.Z,{sx:{fontSize:"inherit",lineHeight:"inherit"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"16px",position:"relative",top:"1px",marginRight:"4px"},children:"â¢"}),"Quiet, Well-Lit Space"]}),(0,r.jsxs)(d.Z,{sx:{fontSize:"inherit",lineHeight:"inherit"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"16px",position:"relative",top:"1px",marginRight:"4px"},children:"â¢"}),"Minimize Background Noise"]}),(0,r.jsxs)(d.Z,{sx:{fontSize:"inherit",lineHeight:"inherit"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"16px",position:"relative",top:"1px",marginRight:"4px"},children:"â¢"}),"Present Naturally"]}),(0,r.jsxs)(d.Z,{sx:{fontSize:"inherit",lineHeight:"inherit"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"16px",position:"relative",top:"1px",marginRight:"4px"},children:"â¢"}),"Practice & Prepare"]})]}),(0,r.jsx)(a.Z,{textAlign:"center",mt:2,sx:{width:"100%"},children:(0,r.jsx)(h.Z,{variant:"contained",size:"large",fullWidth:!0,onClick:J,disabled:D,startIcon:D?(0,r.jsx)(c.Z,{size:20,color:"inherit"}):(0,r.jsx)(m.Z,{}),sx:{px:6,py:1.5,fontSize:"1.1rem",borderRadius:2,backgroundColor:"#15846a","&:hover":{backgroundColor:"#12715b"}},children:D?"Starting Interview...":"Start AI Interview"})})]}),(0,r.jsx)(a.Z,{sx:{width:"100%",borderBottom:"2px solid #ccc",opacity:.6,my:"0.7rem"}}),(0,r.jsxs)(a.Z,{textAlign:"center",mt:2,sx:{mx:"auto","@media (max-width: 380px)":{width:"310px"}},children:[(0,r.jsxs)(d.Z,{variant:"body2",sx:{mb:2},children:["By starting the interview, you agree to our ",(0,r.jsx)("br",{}),(0,r.jsx)("a",{href:"https://www.xcareer.ai/terms-and-conditions/",target:"_blank",style:{color:"#12715b"},children:"Terms and Conditions"}),(0,r.jsx)("span",{children:" & "}),(0,r.jsx)("a",{href:"https://www.xcareer.ai/privacy-policy/",target:"_blank",style:{color:"#12715b"},children:"Privacy Policy"})]}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:"0.15rem",justifyContent:"center",alignItems:"center",paddingBlockStart:"0.25rem",mt:"15px"},children:[(0,r.jsxs)(d.Z,{variant:"caption",fontWeight:900,children:["Powered by"," "]}),"light"===F.mode?(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_black_logo.svg",alt:"XCareer logo",priority:!0,width:100,height:21.75,style:{cursor:"pointer"}})}):(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_logo.png",alt:"XCareer logo",priority:!0,width:100,height:21.75,style:{cursor:"pointer"}})})]}),(0,r.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",left:"13px"},children:(0,r.jsx)(p.Z,{label:"",control:(0,r.jsx)(Q,{sx:{m:1,padding:.5,"& .MuiSwitch-thumb":{width:25,height:22},"& .MuiSwitch-track":{borderRadius:10}},checked:"dark"===F.mode,onChange:$,disableRipple:!1})})})]})]})})})})})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{sx:{position:"fixed",top:"20px",left:"20px",zIndex:1e3},children:"light"===F.mode?(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_black_logo.svg",alt:"XCareer logo",priority:!0,width:120,height:26,style:{cursor:"pointer"}})}):(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_logo.png",alt:"XCareer logo",priority:!0,width:120,height:26,style:{cursor:"pointer"}})})}),(0,r.jsx)(a.Z,{sx:{flex:1,backgroundColor:"".concat("dark"===F.mode?"rgba(0, 0, 0, 1)":"white"),position:"relative"},children:(0,r.jsx)(a.Z,{sx:{position:"absolute",top:"50%",left:"25%",transform:"translate(-50%, -50%)",width:"500px",height:"600px",filter:"blur(20px)",borderRadius:"30px",border:"10px solid ".concat((F.mode,"#15846a")),zIndex:0}})}),(0,r.jsx)(a.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:"".concat("dark"===F.mode?"#1a1a1a":"white"),padding:"30px",borderRadius:"12px",boxShadow:"0px 8px 20px rgba(0,0,0,0.2)",zIndex:10},children:(0,r.jsx)(a.Z,{sx:{width:"50vh",height:"40rem",position:"relative",bottom:"18px","@media (max-width: 1023px)":{flexDirection:"column-reverse",gap:"6rem"}},children:(0,r.jsx)(O,{sx:{margin:"auto"},children:(0,r.jsx)(a.Z,{sx:{padding:"0.5rem",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",margin:"auto",width:"fit-content"},children:(0,r.jsxs)(a.Z,{sx:{width:"100%",maxWidth:400},children:[L&&(0,r.jsx)(l.Z,{severity:"error",sx:{mb:3},children:L}),(0,r.jsxs)(a.Z,{sx:{my:3,mx:"auto","@media (max-width: 380px)":{width:"310px"}},children:[(0,r.jsx)(d.Z,{variant:"h2",sx:{fontSize:"1.9rem",textAlign:"center","@media (max-width: 370px)":{fontSize:"1.8rem"}},children:"Welcome \uD83D\uDC4B"}),(0,r.jsx)(d.Z,{sx:{textAlign:"center",px:"3px"},children:"AI is here to help you practice your interview skills with our avatar interviewer. Good luck!"})]}),(0,r.jsxs)(x.ZP,{item:!0,xs:20,sx:{display:"flex",flexDirection:"column",alignItems:"center",mb:"0.5rem",marginTop:"1rem",borderRadius:"15p
1x",width:"295px",margin:"auto",paddingX:{xs:"1rem",sm:"10px"},paddingY:"0.5rem",backgroundColor:"light"===F.mode?"#f2f2f2":"#0f0f0f"},children:[(0,r.jsx)(a.Z,{sx:{opacity:"80%",marginBottom:"0.5rem",textAlign:"center",marginTop:"5px",overflow:"visible",fontSize:{xs:"1rem",sm:"1rem"},"@media (max-width: 400px)":{fontSize:"1rem"},color:"dark"===F.mode?"#1cb08e":"#12715b"},children:"Make your AI Avatar Interview a success with these tips:"}),(0,r.jsxs)(a.Z,{sx:{fontWeight:"bold",fontSize:{xs:"12px",sm:"14px"},"@media (max-width: 400px)":{fontSize:"11px"}},children:[(0,r.jsxs)(d.Z,{sx:{fontSize:"13px"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"20px",position:"relative",top:"2px"},children:"â¢"})," Choose a Quiet, Well-Lit Space"]}),(0,r.jsxs)(d.Z,{sx:{fontSize:"13px"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"20px",position:"relative",top:"2px"},children:"â¢"})," Minimize Background Noise"]}),(0,r.jsxs)(d.Z,{sx:{fontSize:"13px"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"20px",position:"relative",top:"2px"},children:"â¢"})," Present Yourself Naturally"]}),(0,r.jsxs)(d.Z,{sx:{fontSize:"13px"},variant:"body2",children:[(0,r.jsx)("span",{style:{fontSize:"20px",position:"relative",top:"2px"},children:"â¢"})," Practice and Prepare"]})]}),(0,r.jsx)(a.Z,{textAlign:"center",mt:2,sx:{width:"100%"},children:(0,r.jsx)(h.Z,{variant:"contained",size:"large",fullWidth:!0,onClick:J,disabled:D,startIcon:D?(0,r.jsx)(c.Z,{size:20,color:"inherit"}):(0,r.jsx)(m.Z,{}),sx:{px:6,py:1.5,fontSize:"1.1rem",borderRadius:2,backgroundColor:"#15846a","&:hover":{backgroundColor:"#12715b"}},children:D?"Starting Interview...":"Start AI Interview"})})]}),(0,r.jsx)(a.Z,{sx:{width:"100%",borderBottom:"2px solid #ccc",opacity:.6,my:"0.7rem"}}),(0,r.jsxs)(a.Z,{textAlign:"center",mt:2,sx:{mx:"auto","@media (max-width: 380px)":{width:"310px"}},children:[(0,r.jsxs)(d.Z,{variant:"body2",sx:{mb:2},children:["By starting the interview, you agree to our ",(0,r.jsx)("br",{}),(0,r.jsx)("a",{href:"https://www.xcareer.ai/terms-and-conditions/",target:"_blank",style:{color:"#12715b"},children:"Terms and Conditions"}),(0,r.jsx)("span",{children:" & "}),(0,r.jsx)("a",{href:"https://www.xcareer.ai/privacy-policy/",target:"_blank",style:{color:"#12715b"},children:"Privacy Policy"})]}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:"0.15rem",justifyContent:"center",alignItems:"center",paddingBlockStart:"0.25rem",mt:"15px"},children:[(0,r.jsxs)(d.Z,{variant:"caption",fontWeight:900,children:["Powered by"," "]}),"light"===F.mode?(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_black_logo.svg",alt:"XCareer logo",priority:!0,width:100,height:21.75,style:{cursor:"pointer"}})}):(0,r.jsx)("a",{href:"https://www.xcareer.ai/",target:"_blank",children:(0,r.jsx)(k(),{src:"/images/xcareer_logo.png",alt:"XCareer logo",priority:!0,width:100,height:21.75,style:{cursor:"pointer"}})})]}),(0,r.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",left:"13px"},children:(0,r.jsx)(p.Z,{label:"",control:(0,r.jsx)(Q,{sx:{m:1,padding:.5,"& .MuiSwitch-thumb":{width:25,height:22},"& .MuiSwitch-track":{borderRadius:10}},checked:"dark"===F.mode,onChange:$,disableRipple:!1})})})]})]})})})})}),(0,r.jsx)(a.Z,{sx:{flex:1,backgroundColor:"".concat((F.mode,"#15846a"))}}),(0,r.jsx)(a.Z,{sx:{position:"absolute",top:"50%",right:"25%",transform:"translate(50%, -50%)",width:"500px",height:"600px",filter:"blur(20px)",borderRadius:"30px",border:"10px solid ".concat("dark"===F.mode?"rgba(0, 0, 0, 1)":"white"),zIndex:0}})]})})};I.getLayout=e=>e,I.authGuard=!1,t.default=I}},function(e){e.O(0,[5970,6886,9928,8903,4055,697,1939,9774,2888,179],function(){return e(e.s=67985)}),_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.