1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1458],{622:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/private/myProfile/live-test/attempt_now_newflow/TestAttempt_1",function(){return s(63006)}])},31764:function(e,t,s){"use strict";var n=s(85893);s(67294),t.Z=function(){return(0,n.jsx)("div",{className:"loader_main_wraper",children:(0,n.jsx)("div",{className:"loader_main",children:(0,n.jsxs)("div",{className:"spinner-dot-border",role:"status",children:[(0,n.jsx)("div",{className:"dotCircle"}),(0,n.jsx)("div",{className:"dotCircle"}),(0,n.jsx)("div",{className:"dotCircle"}),(0,n.jsx)("div",{className:"dotCircle"})]})})})}},63006:function(e,t,s){"use strict";s.r(t);var n=s(85893),i=s(67294),r=s(11163),a=s(45007),o=s(90049),l=s(32673),c=s(31764),d=s(85553),u=s(19151),m=s(36342),f=s(30417);t.default=function(){let[e,t]=(0,i.useState)(""),[s,g]=(0,i.useState)(!1),[p,_]=(0,i.useState)(350),[h,v]=(0,i.useState)(14),[x,w]=(0,i.useState)(!1),[S,y]=(0,i.useState)(!1),j=(0,r.useRouter)(),I=(0,a.I0)(),b=(0,m.p3)(),[k,E]=(0,i.useState)(!1);(0,i.useRef)(!1);let{testId:N,resume:C,courseId:R}=j.query,[L,T]=(0,i.useState)(5),D=(0,i.useRef)(!1),{testStatus:P,error:z,testName:F,timeLeft:Z,instructions:H,availableLanguages:K,selectedLanguageId:O,isResumeEnabled:q,is_reattempt:B,testSetType:M,userAnswers:U,sections:W,allQuestions:A,masterLanguageId:J,sectionTimeLeft:X,allowUserMove:Y,lastSubmissionType:G,result_date:Q,currentSectionId:V}=(0,a.v9)(e=>null==e?void 0:e.newTest),$=(0,a.v9)(e=>{var t,s,n,i;return null==e?void 0:null===(i=e.allCategory)||void 0===i?void 0:null===(n=i.content)||void 0===n?void 0:null===(s=n.settings)||void 0===s?void 0:null===(t=s.left_menu)||void 0===t?void 0:t.is_resume_enabled}),ee=A[J]||[],et=!1;if("live"===P&&q)switch(String(q)){case"1":et="0"===M;break;case"2":et="1"===M;break;case"3":et=!0;break;default:et=!1}(0,i.useEffect)(()=>{window.isRedirecting=!1;{let e=localStorage.getItem("redirectdetails");e&&t(e)}return()=>{window.isRedirecting=!1}},[]),(0,i.useEffect)(()=>{if(j.isReady&&N&&"loading_instructions"===P){let t=localStorage.getItem("test_attempt_data");if(t)try{let s=(0,m.p3)(),n=(0,m.pe)(t,s);if(n.test_id==N){localStorage.setItem("current_test_course_id",n.course_id),localStorage.setItem("current_test_id",n.test_id),localStorage.setItem("firstattempt",n.first_attempt);let e={test_id:n.test_id,course_id:n.course_id,resumeSetting:"1"==n.state||"111"==n.end_date||"0"!=n.is_reattempt&&"1"==n.state?"4":$,test_type:n.test_type,is_reattempt:n.is_reattempt,result_date:n.result_date,end_date:n.end_date,state:n.state};I((0,d.dW)(e))}else j.push(e||"/")}catch(t){j.push(e||"/")}}},[I,N,j.isReady,e]),(0,i.useEffect)(()=>{let e=e=>{e.ctrlKey&&("c"===e.key||"C"===e.key)&&e.preventDefault()};return document.addEventListener("keydown",e),document.addEventListener("contextmenu",e=>e.preventDefault()),()=>{document.removeEventListener("keydown",e)}},[]),(0,i.useEffect)(()=>{let e=e=>{e.ctrlKey&&["c","v","x","u","s"].includes(e.key.toLowerCase())&&e.preventDefault(),"F12"===e.key&&e.preventDefault()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,i.useEffect)(()=>{if("live"!==P)return;let t=localStorage.getItem("test_attempt_data"),s=null;if(t&&b)try{s=(0,m.pe)(t,b)}catch(e){console.error("decrypt failed",e)}history.pushState({page:"test"},"",j.asPath);let n=()=>{if(!window.isRedirecting){if((null==s?void 0:s.first_attempt)===0||(null==s?void 0:s.submission_type)==1){window.isRedirecting=!0,w(!1),localStorage.removeItem("datastore"),j.push(e||"/");return}w(!0),history.pushState({page:"test"},"",j.asPath)}};return window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}},[P,j.asPath,b]),(0,i.useEffect)(()=>{if("live"===P){let e=setInterval(()=>{I((0,d.im)())},1e3);return()=>clearInterval(e)}},[I,P]),(0,i.useEffect)(()=>{if("finished"===P&&"0"===G){j.push(e||"/");return}if("finished"===P&&(null==H?void 0:H.test_basic)){let e=H.test_basic,t=localStorage.getItem("current_test_course_id"),s=localStorage.getItem("firstattempt"),n={jwt:localStorage.getItem("jwt"),user_id:localStorage.getItem("user_id"),course_id:t,test_id:e.id,lang:O,state:"1",test_type:e.test_type,first_attempt:s,appid:localStorage.getItem("appId"),username:localStorage.getItem("userName")},i=(0,m.p3)(),r=(0,m.HI)(JSON.stringify(n),i);if(Q){let e=Date.now(),t=new Date(1e3*Q).getTime();if(t>
1e&&"0"!=s){let e=new Date(t).toLocaleString("en-IN",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0});sessionStorage.setItem("toastMessage","Your Result will be declared on ".concat(e));let s=localStorage.getItem("redirectdetails")||"/";j.push(s)}else localStorage.setItem("datastore",r),j.push("/private/myProfile/live-test/attempt_now/".concat(encodeURIComponent(r)))}}},[P,j,H,O]),(0,i.useEffect)(()=>{let e=e=>{if(!0!==window.isRedirecting&&"live"===P)throw w(!0),j.events.emit("routeChangeError"),"Abort route change to show modal"};return j.events.on("routeChangeStart",e),()=>{j.events.off("routeChangeStart",e)}},[P,j]);let es=()=>{if(S)return;let t=localStorage.getItem("test_attempt_data");if(t){let e=(0,m.p3)(),s=(0,m.pe)(t,e),n={test_id:s.test_id,course_id:s.course_id,first_attempt:s.first_attempt};y(!0),window.isRedirecting=!0,w(!1),I((0,d.kj)(n)).unwrap().catch(()=>{y(!1),window.isRedirecting=!1})}else j.push(e||"/")},en=()=>{let e=localStorage.getItem("test_attempt_data");if(e){let t=(0,m.pe)(e,b),s={test_id:t.test_id,course_id:t.course_id};I((0,d.Oz)(s))}},ei=e=>{I((0,d.om)(e))};return((0,i.useEffect)(()=>{if("instructions_loaded"===P){let e=localStorage.getItem("test_attempt_data");if(e)try{let t=(0,m.p3)(),s=(0,m.pe)(e,t);"0"===s.state&&en()}catch(e){console.error("Could not check resume status from localStorage:",e)}}},[P,I]),P)?((0,i.useEffect)(()=>{"submitting"===P&&0==Z&&es()},[P]),(0,i.useEffect)(()=>{"submitting"!==P||0!==Z||D.current||(E(!0),T(5))},[P,Z]),(0,i.useEffect)(()=>{if(!k)return;let e=setInterval(()=>{T(e=>e-1)},1e3);return()=>clearInterval(e)},[k]),(0,i.useEffect)(()=>{L<=0&&k&&!D.current&&(D.current=!0,es(),E(!1))},[L,k]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Z,{show:x,onHide:()=>!S&&w(!1),userAnswers:U,instructionData:H,sections:W,masterQuestionList:ee,handleSubmit:et?()=>{if(S)return;let e=localStorage.getItem("test_attempt_data");if(e){let t=(0,m.p3)(),s=(0,m.pe)(e,t),n={test_id:s.test_id,course_id:s.course_id,first_attempt:s.first_attempt};y(!0),I((0,d.WH)(n)).unwrap().then(()=>{w(!1),window.isRedirecting=!0;let e=localStorage.getItem("redirectdetails");j.push(e||"/")}).catch(e=>{y(!1),alert("Failed to pause test: ".concat(e))})}}:es,testStatus:P,isLoading:S}),(0,n.jsxs)("main",{className:"\n ".concat("instructions_loaded"==P?"fullTestInstructionNewPage":""," \n ").concat("live"==P?"fullTestLiveNewPage":""),children:[(0,n.jsx)(o.default,{title:F,time:"".concat(String(Math.floor(Z/3600)).padStart(2,"0")," : ").concat(String(Math.floor(Z%3600/60)).padStart(2,"0")," : ").concat(String(Z%60).padStart(2,"0")),viewFullScreen:s,toggleFullScreen:()=>{try{var e,t,n,i;s?null===(n=(i=document).exitFullscreen)||void 0===n||n.call(i):null===(e=(t=document.documentElement).requestFullscreen)||void 0===e||e.call(t),g(e=>!e)}catch(e){console.error("Fullscreen toggle failed:",e)}},handleIncreaseSize:()=>{p<470&&_(e=>e+20)},handleDecreaseSize:()=>{p>350&&_(e=>e-20)},onPauseTest:()=>{w(!0)},showPauseButton:et,sectionTime:X,allowUserMove:Y,currentSectionId:V,isSubmitting:S}),(0,n.jsx)("div",{className:"",children:(()=>{switch(P){case"loading_instructions":case"loading_questions":case"submitting":return(0,n.jsx)(c.Z,{});case"instructions_loaded":return(0,n.jsx)(l.default,{instructionData:H,onStartTest:en,onGoBack:()=>j.push(e),languages:K,selectedLang:O,onLanguageChange:ei});case"live":return(0,n.jsx)(u.default,{questionImageWidth:p,questionUniversalSize:h,testName:F});case"error":return(0,n.jsxs)("div",{children:["Error: ",z]});default:return(0,n.jsx)("h1",{children:"Initializing..."})}})()})]}),k&&(0,n.jsx)("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:9999,color:"#333"},children:(0,n.jsxs)("div",{style:{backgroundColor:"#fff",padding:"30px 40px",borderRadius:"10px",textAlign:"center",minWidth:"320px",boxShadow:"0 4px 15px rgba(0,0,0,0.2)"},children:[(0,n.jsx)("h3",{style:{margin:0,fontSize:"24px"},children:"Time's Up!"}),(0,n.jsx)("p",{style:{marginTop:"10px"},children:"Your test will be submitted automatically in:"}),(0,n.jsx)("div",{style:{fontSize:"48px",margin:"15px 0",fontWeight:"bold",color:"#d9534f"},children:L}),(0,n.jsx)("button",{onClick:()=>{D.current||(D.current=!0,es(),E(!1))},disabled:S,style:{marginTop:"10px",padding:"10px 25px",cursor:S?"not-allowed":"pointer",backgroundColor:S?"#ccc":"#007bff",color:"white",border:"none",borderRadius:"5px",fontSize:"16px"},children:S?"Submitting...":"Submit Now"})]})})]})):(0,n.jsx)(c.Z,{})}},90049:function(e,t,s){"use strict";s.r(t);var n=s(85893),i=s(67294),r=s(25675),a=s.n(r),o=s(11163),l=s(45184);t.default=function(e){let{title:t,time:s,toggleFullScreen:r,status:c,allowUserMove:d,sectionTime:u,currentSectionId:m,handleIncreaseSize:f,handleDecreaseSize:g,onPauseTest:p,showPauseButton:_}=e;(0,o.useRouter)();let[h,v]=(0,i.useState)(null);(0,i.useEffect)(()=>{v(localStorage.getItem("logo"))},[]),(0,i.useEffect)(()=>{let e=e=>{("F12"===e.key||e.ctrlKey&&e.shiftKey&&("I"===e.key||"J"===e.key)||e.ctrlKey&&"U"===e.key)&&e.preventDefault(),("F5"===e.key||e.ctrlKey&&"r"===e.key||e.ctrlKey&&e.shiftKey&&"R"===e.key)&&e.preventDefault()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),(0,i.useEffect)(()=>{let e=e=>e.preventDefault();return document.addEventListener("contextmenu",e),()=>{document.removeEventListener("contextmenu",e)}},[]);let x="0"===d,w=x&&u&&"object"==typeof u&&u[m]||0,S=x?(e=>{e<0&&(e=0);let t=Math.floor(e/60),s=e%60;return"".concat(String(t).padStart(2,"0"),":").concat(String(s).padStart(2,"0"))})(w):s;return(0,n.jsxs)("div",{className:"main_testHeader_container newTest_main_testHeader_container d-flex align-items-center justify-content-between",style:{position:"fixed",top:0,left:0,width:"100%",zIndex:1e3},children:[(0,n.jsxs)("div",{className:"testHeader_logo d-flex align-items-center gap-4",children:[h&&(0,n.jsx)("img",{src:h,style:{maxHeight:"40px"},alt:""}),(0,n.jsxs)("div",{className:"newTestZommInOutBtn align-items-center gap-2",style:{display:"flex"},children:[(0,n.jsxs)("button",{className:"newTestZoomInBtn",onClick:()=>f(),children:[(0,n.jsx)("span",{children:"Zoom"})," (+)"]}),(0,n.jsxs)("button",{className:"newTestZoomOutBtn",onClick:()=>g(),children:[(0,n.jsx)("span",{children:"Zoom"})," (-)"]})]})]}),(0,n.jsx)("div",{className:"testHaeder_heading",children:t&&(0,n.jsx)("h1",{children:t})}),(0,n.jsxs)("div",{className:"newTest_timer d-flex align-items-center justify-content-center gap-3",children:[_&&(0,n.jsxs)("button",{className:"testPause",onClick:p,children:[(0,n.jsx)(l.uCd,{})," ",(0,n.jsx)("span",{className:"hide_xsm_screen",children:"Pause"})]}),(0,n.jsxs)("div",{className:"newtimeRemaining",children:["Time Left ",(0,n.jsx)("br",{}),(0,n.jsx)("span",{children:S})]}),(0,n.jsx)("div",{className:"userImgae",children:(0,n.jsx)(a(),{src:"/assets/images/user-icon.png",width:40,height:40,alt:""})})]})]})}}},function(e){e.O(0,[3365,4838,6660,1627,7909,3126,5675,4245,9151,2673,2888,9774,179],function(){return e(e.s=622)}),_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.