1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3038],{23038:(e,n,l)=>{"use strict";l.r(n),l.d(n,{default:()=>g});var a=l(95155),t=l(12115),s=l(56929),i=l(84014),o=l(21342);l(38690);var r=l(27647),c=l(26975),d=l(49639),u=l(93921),p=l(88907);let v=(0,s.default)(()=>l.e(6075).then(l.bind(l,16075)),{loadableGenerated:{webpack:()=>[require.resolveWeak("./typeWriter")]},ssr:!1}),g=e=>{let{data:n,clicked:l,pageId:s,setmcqSelectedOptions:g,settotalMarks:m,timeSpendForEachMcq:h,settimeSpendForEachMcq:x,mcqSelectedOptions:y,currentlayer:_,layerKey:q,isCompleted:j,choosedoption:w,setchoosedoption:f,setIsAnswered:b,clickedIndex:A,setclickedIndex:N,isAnswered:k,istestSeriesSubmitted:C,showAnswersData:I,isShowAnswersClicked:E,isGenerateBtnClicked:B,setResult:D,result:O}=e,R=i.A.get("token"),[S,T]=(0,t.useState)({}),U=(0,t.useRef)(null);(0,t.useEffect)(()=>{(E||B)&&(()=>{let e=setInterval(()=>{x(e=>e.map(e=>(null==e?void 0:e.id)!==l||(null==e?void 0:e.completed)?e:{...e,timespend:(null==e?void 0:e.timespend)+1}))},1e3);return()=>clearInterval(e)})()},[l]);let W="layer3"==_?"layer3_page":"layer2"==_?"layer2_page":"layer1"==_?"layer1_page":"subject_page",G=async(e,a,t,i,r)=>{var c,d,u,p,v;r.stopPropagation(),r.preventDefault(),x(e=>e.map(e=>(null==e?void 0:e.id)!==l||(null==e?void 0:e.completed)?e:{...e,completed:!0}));let g={[W]:s,attempt_data:{time_taken_seconds:e,question_data:{answer:null==(c=n[l])?void 0:c.answer,explanation:null==(d=n[l])?void 0:d.explanation,user_answer:0===a?"A":1===a?"B":2===a?"C":"D",options:null==(u=n[l])?void 0:u.options,question:null==(p=n[l])?void 0:p.question,category:null==(v=n[l])?void 0:v.category,question_no:l+1}}};try{await (0,o.h1)(g,_,q,R),S.find(e=>Object.keys(e)[0]==a),t&&w["".concat(a)]}catch(e){console.log(e)}};(0,t.useEffect)(()=>{S["".concat(l)]&&m(e=>e+1)},[S]);let L=e=>{if(e)return"reasoning"===e?"/assests/svg/reasoningImg.svg":"direct"===e?"/assests/svg/directImg.svg":"application"===e?"/assests/svg/applicationImg.svg":"/assests/svg/criticalThinkingImg.svg"};return(null==n?void 0:n.length)>0&&(null==n?void 0:n.map((e,t)=>{var s,i,o;let g={};g=Array.isArray(e.options)?e.options.map(e=>Object.values(e)):null==(o=Object)?void 0:o.values(e.options),null==(s=Object)||s.keys(null==e?void 0:e.options);let m=(null==e?void 0:e.answer)==="A"?0:(null==e?void 0:e.answer)==="B"?1:(null==e?void 0:e.answer)==="C"?2:3;return l===t?(0,a.jsxs)("div",{className:"mcq-question-container ",children:[(0,a.jsx)("div",{className:"mcq-header-container",children:(0,a.jsx)("div",{className:"category-container",children:(0,a.jsxs)("div",{className:"category-wrapper ".concat(e.category,"-category-wrapper"),children:[L(null==e?void 0:e.category)&&(0,a.jsx)(p.default,{className:"category-image",alt:"category-image",src:L(null==e?void 0:e.category),width:24,height:24}),(0,a.jsx)("div",{className:"question-category ".concat(e.category),children:(e=>{if("string"!=typeof e||!(e.length>0))return"";switch(e.toLowerCase()){case"direct":return"Direct Comprehension";case"reasoning":return"Reasoning Skills";case"application":return"Clinical Understanding";case"critical_thinking":return"Critical Thinking";default:return e.charAt(0).toUpperCase()+e.slice(1)}})(null==e?void 0:e.category)})]})})}),(0,a.jsx)("div",{className:"question-container",children:(null==e||null==(i=e.question)?void 0:i.length)>0&&(0,a.jsxs)("p",{className:"question d-flex-col gap-8",children:[l+1,". ",null==e?void 0:e.question,!k[t]&&!(null==e?void 0:e.user_answer)&&(null==I?void 0:I.length)>0&&!B&&(0,a.jsx)("span",{style:{color:"red"},children:"Not Attended"})]})}),(0,a.jsx)("div",{className:"answer-container ".concat((null==I?void 0:I.length)>0&&!B&&"disabled"),children:(0,a.jsx)(r.A,{className:"answer-options",children:(0,a.jsx)(u.A,{"aria-labelledby":"demo-radio-buttons-group-label",name:"radio-buttons-group",value:w[l]||"",children:(null==g?void 0:g.length)>0&&(null==g?void 0:g.map((e,s)=>{let i=s===m,o=s===A[l];return(0,a.jsx)("div",{className:"answer",onClick:a=>{var o,r,c,d,u;T(e=>({...e,[t]:!!i&&i})),f(n=>({...n,[l]:e})),N(e=>({...e,[l]:s})),b(e=>({...e,[l]:!0})),G(null==(o=h[l])?void 0:o.timespend,s,i,t,a),((e,n,a,t,s,i,o)=>{let r=0===n?"A":1===n?"B":2===n?"C":"D",c=+!!a,d=l+1;D(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=null==e?void 0:e.findIndex(e=>e.question_no===d);return n>=0?(e[n]={question_no:d,user_answer:r,mark:c,question_type:t,category:s,q_id:i,meta_tags:o},[...e]):[...e,{question_no:d,user_answer:r,mark:c,question_type:t,category:s,q_id:i,meta_tags:o}]})})(0,s,i,(null==(r=n[l])?void 0:r.question_type)||"mcq",(null==(c=n[l])?void 0:c.category)||"",(null==(d=n[l])?void 0:d.id)||"",(null==(u=n[l])?void 0:u.meta_tags)||{})},style:{border:(null==I?void 0:I.length)>0&&k[l]&&!B?o?i?"1px solid #00A575":"1px solid red":i?"1px solid #00A575":"1px solid transparent":(null==I?void 0:I.length)>0&&!B?i?"1px solid #00A575":"1px solid transparent":A[t]==s?"1px solid #00A575":"1px solid transparent"},children:(0,a.jsx)(c.A,{value:Array.isArray(e)?e[0]||"":e||"",control:(0,a.jsx)(d.A,{sx:{"&.Mui-checked":{color:"#00A575"},color:"var(--mcqAnswerRadioButtonColor)"}}),label:e||"",className:"radio-button"})},s)}))})})}),k[l]&&C&&E&&(0,a.jsxs)("div",{className:"mcq-explanation-container d-flex-col",children:[(0,a.jsx)("p",{className:"mcq-explanation-title",children:"Explanation "}),(0,a.jsx)("p",{className:"mcq-explanation-content",children:(0,a.jsx)(v,{text:null==e?void 0:e.explanation})})]}),(0,a.jsx)("div",{ref:U,className:"mcq-explanation-bottom-scroll-container"})]},t):""}))}},38690:()=>{}}]);
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.