PageSourceSearch

https://www.adda247.com/dist/4490.components-CuetResultTracker-CuetResultPrediction.51f020e8.js

js adda247.com collected 2026-09-27 20:57:29 UTC 8,051 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4490],{14161(e,t,a){a.r(t),a.d(t,{default:()=>p});var l=a(31838),n=a(63696),s=a(97705);const r=({activeSection:e,originalAnswerKey:t,isFinalAnswer:a})=>n.createElement("table",{className:"cuet-result-table"},n.createElement("thead",null,n.createElement("tr",null,n.createElement("th",null,"Q. No."),n.createElement("th",null,"Question ID"),n.createElement("th",null,"Your Choice"),a&&n.createElement("th",null,"Previous Answer"),n.createElement("th",null,a?"Final Answer":"Correct Answer ID"),n.createElement("th",null,"Final Result"))),n.createElement("tbody",null,e?.questionList?.length?e.questionList.map((l,s)=>{const r=l.status??0;let c=r,o="";r>0?(c=`+${r}`,o="positive"):r<0&&(o="negative");const i=l.correctAnswer?.join(", ")||"NA";let u="NA",m=!1;if(a){const a=t?.find(t=>t?.sectionName===e?.sectionName),n=a?.questionList?.find(e=>e.questionId===l.questionId);u=n?.correctAnswer?.join(", ")||"NA",m="NA"!==i&&"NA"!==u&&i!==u}return n.createElement("tr",{key:s},n.createElement("td",null,l?.questionNumber),n.createElement("td",null,l?.questionId),n.createElement("td",null,l?.selectedOption||"NA"),a&&n.createElement("td",{className:m?"previous-answer-changed":""},u),n.createElement("td",{className:m?"updated-answer":""},i),n.createElement("td",{className:`status ${o}`},c))}):n.createElement("tr",null,n.createElement("td",{colSpan:a?"6":"5",style:{textAlign:"center",fontSize:"20px"}},"No content found"))));var c=a(7635),o=a(92299),i=a.n(o),u=a(98651);function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}function d(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}const p=()=>
1{const[e,t]=(0,n.useState)(!1),[a,l]=(0,n.useState)(null),[o,m]=(0,n.useState)({}),[p,E]=(0,n.useState)(null),[A,w]=(0,n.useState)(!1),[g,v]=(0,n.useState)({resultData:[],originalAnswerKey:[],isFinalAnswer:!1,candidateDetails:null});(0,n.useEffect)(()=>{try{const e=localStorage.getItem("cuet_applications_history"),t=localStorage.getItem("cuet_active_application");if(e){const a=JSON.parse(e),l=Object.keys(a),n={};if(l.forEach(e=>{n[e]={applicationNo:e,candidateDetails:a[e]?.candidateDetails,uploadTimestamp:a[e]?.uploadTimestamp||(new Date).toISOString()}}),m(n),l.length>0){const e=t&&a[t]?t:l[0];E(e),b(e)}}else{const e=localStorage.getItem("cuet_result_history");if(e){const t=JSON.parse(e),a=N(t.resultData||[]);v(d(d({},t),{},{resultData:a}))}}}catch(e){v({resultData:[],originalAnswerKey:[],isFinalAnswer:!1,candidateDetails:null})}},[]);const b=async e=>{const t=await(async e=>{const t=i().get("cp_token");try{w(!0);const a=await fetch(`${u.nU}/api/cuet/fetchApplicationDetails?ApplicationNumber=${e}`,{method:"GET",headers:{"x-auth-token":"fpoa43edty5","x-jwt-token":t}});if(!a.ok){const e=`HTTP error! status: ${a.status} - ${a.statusText}`;return(0,c.A)(e),{success:!1,error:e}}const l=await a.json();return{success:!0,data:{resultData:l?.secondAnswerKeyResponse?.length?l.secondAnswerKeyResponse:l?.firstAnswerKeyResponse?.length?l.firstAnswerKeyResponse:[],originalAnswerKey:l?.firstAnswerKeyResponse||[],isFinalAnswer:!!l?.secondAnswerKeyResponse?.length,candidateDetails:l?.candidateDetails,applicationNo:e,uploadTimestamp:(new Date).toISOString()}}}catch(a){return(0,c.A)("Failed to fetch application details. Please try again."),{success:!1,error:a.message}}finally{w(!1)}})(e);if(t.success)f(t.data);else{(0,c.A)("Failed to load application data");try{const t=localStorage.getItem("cuet_applications_history");if(t){const a=JSON.parse(t);a[e]&&f(a[e])}}catch(a){}}},N=e=>{const t=new Map;return e?.forEach(e=>{e?.sectionName&&t.set(e.sectionName,e)}),Array.from(t.values())},f=e=>{const t=N(e.resultData||[]);v({resultData:t,originalAnswerKey:e.originalAnswerKey||[],isFinalAnswer:e.isFinalAnswer||!1,candidateDetails:e.candidateDetails||null})},y=(e=null)=>{l(e),t(e=>!e)},h=g.resultData.reduce((e,t)=>e+(t?.totalSectionMarks||0),0),S=Object.keys(o).sort((e,t)=>{const a=o[e]?.uploadTimestamp||"",l=o[t]?.uploadTimestamp||"";return new Date(l)-new Date(a)}),D=S.length>1;return n.createElement(n.Fragment,null,D&&n.createElement("div",{className:"cuet-applications-tabs"},n.createElement("div",{className:"cuet-tabs-container"},S.map(e=>{return n.createElement("button",{key:e,className:`cuet-tab-button ${p===e?"active":""} ${A?"loading":""}`,onClick:()=>(async e=>{e!==p&&(E(e),localStorage.setItem("cuet_active_application",e),await b(e))})(e),disabled:A},A&&p===e?n.createElement("span",null,"Loading..."):(t=e,a=o[e]?.candidateDetails,a?.candidateName?`${a.candidateName} (${t})`:t));var t,a}))),A&&n.createElement("p",null,"Loading application data..."),g.resultData.length>0&&!A&&n.createElement("div",{className:"cuet-result-total-marks"},n.createElement("p",null,"Total Score: ",n.createElement("span",null," ",h," ")," "),n.createElement("p",null," | "),n.createElement("p",{className:"cuet-norm",onClick:()=>(0,c.A)("Normalised Score will be Available After 10K Submission","info")}," Normalisation Score")),!A&&n.createElement("div",{className:"cuet-result-grid"},g.resultData.map((e,t)=>{const a=[{label:"Total Questions",value:e?.sectionTotalQuestion},{label:"Total Answers",value:e?.sectionTotalAttemptedQuestion},{label:"Not Answered",value:e?.sectionTotalNotAttemptedQuestion},{label:"Correct Answered",value:`${e?.sectionTotalCorrectQuestion||0} × 5 = ${5*(e?.sectionTotalCorrectQuestion||0)}`},{label:"Incorrect Answered",value:e?.sectionTotalIncorrectQuestion},{label:"Not Applicable Questions",value:e?.notApplicableQuestion}];return n.createElement("div",{key:`${e?.sectionName}-${t}`,className:"cuet-result-card"},(e=>{const t=[{icon:"/images/score-target.svg",label:"Top Scorer in Section",value:`${e?.topScorerMarksInSection??0} / 250`},{icon:"/images/overall-rank.svg",label:"Overall Rank",value:null!=e?.overAllRank?e?.overAllRank:"Yet to be calculated"},{icon:"/images/scorer-shift.svg",label:"Top Scorer in Shift",value:null!=e?.topScorerMarksInShift?e?.topScorerMarksInShift:"Yet to be calculated"},{icon:"/images/shift-rank.svg",label:"Shift Rank",value:null!=e?.currentShiftRank?e?.currentShiftRank:"Yet to be calculated"}];return n.createElement("div",{className:"cuet-result-score-section"},t.map((e,t)=>n.createElement("div",{className:"cuet-result-score-wrapper",key:t},n.createElement("img",{src:e.icon,alt:e.label}),n.createElement("div",{className:"cuet-result-score-content"},n.createElement("p",null,e.label),n.createElement("span",null,e.value)))))})(e),n.createElement("div",{className:"cuet-result-header-wrap"},n.createElement("div",{className:"subject-name"},n.createElement("strong",null,e?.sectionName)),n.createElement("div",{className:"view-details"},n.createElement("span",{className:"score"},5*(e?.sectionTotalCorrectQuestion||0)," −",e?.sectionTotalIncorrectQuestion," =",e?.totalSectionMarks))),n.createElement("div",{className:"cuet-result-card-content-wrap"},n.createElement("ul",null,a.map((e,t)=>n.createElement("li",{key:t},e.label,n.createElement("span",null,e.value))))),n.createElement("div",{className:"cuet-result-bottom-wrap"},n.createElement("span",{className:"view-detail-text",onClick:()=>y(e)},"View Details")))}),n.createElement(s.default,{visible:e,title:n.createElement("div",{className:"cuet-result-modal-heading"},a?.sectionName," - Question Details"),onCancel:()=>y(null),closeCallback:()=>y(null),closable:!0,bodyStyle:{height:"550px",overflowY:"scroll"},modalClassName:"cuet-result-modal"},n.createElement(r,{activeSection:a,originalAnswerKey:g.originalAnswerKey,isFinalAnswer:g.isFinalAnswer}))))}}}]);

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.