1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[754],{96691:e=>{var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"QuizUpdateAndSubmit"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QuizAttemptDataInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"saveQuizProcess"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attemptStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attemptData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"remainingTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionAttempts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attemptStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionId"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:253}};t.loc.source={body:"mutation QuizUpdateAndSubmit($input: QuizAttemptDataInput!) {\n saveQuizProcess(input: $input) {\n attemptStatus\n attemptData {\n remainingTime\n questionAttempts {\n attemptStatus\n answer\n questionId\n }\n }\n }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var n={};function i(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;(function e(t,n){if("FragmentSpread"===t.kind)n.add(t.name.value);else if("VariableDefinition"===t.kind){var i=t.type;"NamedType"===i.kind&&n.add(i.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(t){e(t,n)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(t){e(t,n)}),t.definitions&&t.definitions.forEach(function(t){e(t,n)})})(e,t),n[e.name.value]=t}}),e.exports=t,e.exports.QuizUpdateAndSubmit=function(e,t){var a={kind:e.kind,definitions:[i(e,t)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var s=n[t]||new Set,l=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var d=r;r=new Set,d.forEach(function(e){l.has(e)||(l.add(e),(n[e]||new Set).forEach(function(e){r.add(e)}))})}return l.forEach(function(t){var n=i(e,t);n&&a.definitions.push(n)}),a}(t,"QuizUpdateAndSubmit")},49422:e=>{var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetQuizById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quizId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getQuizById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"quizId"},value:{kind:"Variable",name:{kind:"Name",value:"quizId"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationInSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quizType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"supportedLanguages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"questions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"choices"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"questionCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"instruction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userQuizResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attemptData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lastUpdatedOn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionAttempts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sectionIndex"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"indexInSection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"indexInTest"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attemptStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"questionId"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"remainingTime"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"attemptStatus"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"maximumMarks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"language"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:702}};
1t.loc.source={body:"query GetQuizById($quizId: ID!, $lang: String!) {\n getQuizById(quizId: $quizId, lang: $lang) {\n name\n duration\n durationInSeconds\n quizType\n supportedLanguages {\n label\n value\n }\n questions {\n content\n choices\n type\n id\n }\n questionCount\n instruction\n userQuizResponse {\n attemptData {\n lastUpdatedOn\n questionAttempts {\n sectionIndex\n indexInSection\n indexInTest\n questionId\n answer\n attemptStatus\n evaluation {\n questionId\n }\n }\n remainingTime\n }\n attemptStatus\n }\n maximumMarks\n id\n language\n }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var n={};function i(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;(function e(t,n){if("FragmentSpread"===t.kind)n.add(t.name.value);else if("VariableDefinition"===t.kind){var i=t.type;"NamedType"===i.kind&&n.add(i.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(t){e(t,n)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(t){e(t,n)}),t.definitions&&t.definitions.forEach(function(t){e(t,n)})})(e,t),n[e.name.value]=t}}),e.exports=t,e.exports.GetQuizById=function(e,t){var a={kind:e.kind,definitions:[i(e,t)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var s=n[t]||new Set,l=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var d=r;r=new Set,d.forEach(function(e){l.has(e)||(l.add(e),(n[e]||new Set).forEach(function(e){r.add(e)}))})}return l.forEach(function(t){var n=i(e,t);n&&a.definitions.push(n)}),a}(t,"GetQuizById")},64970:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/next.f91f89f4.svg",height:25,width:25,blurWidth:0,blurHeight:0}},6771:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/notFound.8a66dcef.png",height:246,width:320,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAb1BMVEW42a3c4eRVtP/L4u+/3uSWyemT0vZuxfz9skSl3f20zuaS1Pzj8eq0qoro27eCwent2ajE19Ov5/+33PNQvP86sv+MwOWC0fus2fLS6Pe+z+DR8P/2xGyr4P+e3f9nwv//0Wj5//+62PNYwf/p/v/i6GhdAAAAIHRSTlMJ/h37Xev5Yy7O/mwlGJb77vxA0KE52PE+Z/Ktsv2S29oPw44AAAAJcEhZcwAACxMAAAsTAQCanBgAAAA8SURBVHicBcGHAYAgEACxA4EHG/bedf8ZTcAXzao14HMTzlfoO8nCtx/I6JY0UYapvdVTXxvzYF20VfkDRQICzFnGbMEAAAAASUVORK5CYII=",blurWidth:8,blurHeight:6}},52026:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/map.a1e71d0c.svg",height:18,width:18,blurWidth:0,blurHeight:0}},10754:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>W});var i=n(74848),a=n(96540),s=n(95420),l=n(68195),r=n(86715),d=n(29965),o=n.n(d),u=n(52026);let c=a.memo(e=>{let{iconShow:t,languageHandleChange:n,list:s,changeLang:l}=e,[r,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)((e=>{let t=null==s?void 0:s.find(t=>t.value===e);return(null==t?void 0:t.label)||""})(l)),v=e=>{let t=e.target.title,i=e.target.dataset.idValue;m(t),d(!1),n(i)};return(0,i.jsxs)("div",{className:"relative w-auto z-20",children:[(0,i.jsxs)("button",{onClick:()=>{d(!r)},className:"flex items-center justify-between w-[160px] lg:w-[300px] px-4 py-[10px] bg-white border border-thinBlue rounded-lg shadow-sm",children:[(0,i.jsxs)("div",{className:"flex items-center",children:[t&&(0,i.jsx)(o(),{width:18,height:18,src:u.A,className:"text-blue-500 mr-2",alt:"mapicons"}),(0,i.jsx)("span",{className:"text-gray-700 text-sm",children:c})]}),(0,i.jsx)("svg",{width:"14",height:"7",viewBox:"0 0 14 7",className:"text-customBlue transition-transform ".concat(r?"rotate-180":""),fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M0.707108 1.09218C0.316607 1.41761 0.316607 1.94527 0.707107 2.27069L5.59941 6.34352C6.3805 6.99386 7.6463 6.99361 8.4271 6.34302L13.3175 2.26769C13.708 1.94227 13.708 1.41461 13.3175 1.08917C12.9269 0.763732 12.2938 0.763732 11.9032 1.08917L7.7176 4.57719C7.3271 4.90269 6.6939 4.90269 6.3034 4.57719L2.12131 1.09218C1.73081 0.76674 1.09771 0.76674 0.707108 1.09218Z",fill:"#217ABB"})})]}),r&&(0,i.jsx)("ul",{className:"absolute z-10 mt-2 w-full bg-white border border-blueThinDobule rounded-lg shadow-md max-h-60 overflow-auto border-b-[4px] border-b-[#00C3FF]",children:null==s?void 0:s.map(e=>(0,i.jsx)("li",{title:e.label,onClick:v,"data-id-value":e.value,className:"px-4 py-2 m-2 cursor-pointer hover:bg-blue-50 border-b ".concat(c===e.label?"bg-lightThinBlue text-customBlue font-semibold":"text-gray-700"),children:e.label},e.value))})]})}),m={src:"https://assets.madeeasy.in/prod/_next/static/media/quizInstruction.ace320c1.svg",height:208,width:401,blurWidth:0,blurHeight:0};
1var v=n(73551),x=n(25006),g=n(27736),h=n(19702);let p=function(e){let{handleStartQuiz:t,initialData:n,handleRefechByLanguage:s,lang:l}=e,[r]=(0,a.useState)(n),{FREE_QUIZ_STARTED:d,FREE_QUIZ_LANGUAGE_SWITCHED:u}=g.A,p=(0,a.useCallback)(e=>{(0,h.sx)(u,{language:e,quizId:null==r?void 0:r.id,quizTitle:null==r?void 0:r.name}),(0,x.GB)("language",e),s(e)},[s]),f=(0,a.useMemo)(()=>(null==n?void 0:n.supportedLanguages)||[],[null==n?void 0:n.supportedLanguages]);return(0,i.jsx)("div",{className:"px-0 mx-auto lg:px-4",children:(0,i.jsxs)("div",{className:"bg-white rounded-xl lg:shadow lg:p-8 p-4",children:[(0,i.jsx)("div",{className:"flex-1 flex justify-center mb-6 md:mb-0",children:(0,i.jsx)(o(),{width:300,height:200,src:m,className:"max-w-max h-56 object-contain",alt:"mapicons"})}),(0,i.jsxs)("div",{className:"justify-between items-center",children:[(0,i.jsxs)("div",{className:"flex justify-between mb-6 md:mb-4",children:[(0,i.jsxs)("p",{className:"text-sm lg:text-base font-semibold text-gray-800 mb-2",children:[(0,i.jsx)("span",{className:"text-black font-bold",children:"Duration :"})," ",null==r?void 0:r.duration]}),(0,i.jsxs)("p",{className:"text-sm lg:text-base font-semibold text-gray-800 mb-3 text-right",children:[(0,i.jsx)("span",{className:"text-black font-bold",children:"Maximum Marks :"})," ",null==r?void 0:r.maximumMarks]})]}),(0,i.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,i.jsxs)("p",{className:"text-sm lg:text-base font-semibold text-gray-800",children:[(0,i.jsx)("span",{className:"text-black font-bold",children:"Questions :"})," ",null==r?void 0:r.questionCount]}),(0,i.jsx)(c,{languageHandleChange:p,list:f,changeLang:l})]})]}),(0,i.jsx)("hr",{}),(0,i.jsx)("div",{className:"pt-3",children:(0,i.jsx)(v.A,{htmlData:null==r?void 0:r.instruction})}),(0,i.jsx)("div",{className:"z-10 right-0 bottom-0 left-0 p-5 mx-auto bg-[#DFF3FF] border-t border-[#81C4F5] lg:relative lg:p-0 lg:bg-transparent lg:border-t-0 lg:bottom-0 fixed text-center",children:(0,i.jsx)("button",{type:"submit",className:"w-full lg:w-[432px] p-4 rounded-md text-white bg-customBlue hover:bg-customBlue",onClick:()=>{(0,h.sx)(d,{quizId:null==r?void 0:r.id,quizName:null==r?void 0:r.name,screen_name:"Home"}),t()},children:"Start"})})]})})};var f=n(49422),b=n.n(f),k=n(75042),A=n(16142),N=n(67547),j=n(13380);let w=function(e){let{handleSubmit:t,buttonText:n="Submit Quiz",fullScreenBtn:s,disabledBtn:l=!1}=e,[r,d]=(0,a.useState)(!1),o=()=>{console.log("click ss1"),d(!r)};return(0,i.jsxs)(i.Fragment,{children:[r&&(0,i.jsx)(y,{handleSubmitYes:e=>{console.log("submit the quiz ",e),d(!1),t()},handleSubmitNo:()=>{console.log("no submit the quiz "),d(!1)}}),s?(0,i.jsx)("div",{className:"z-10 right-0 bottom-0 left-0 p-5 mx-auto bg-[#DFF3FF] border-t border-[#81C4F5] fixed flex justify-center",children:(0,i.jsx)("button",{type:"submit",className:"w-full md:w-[500px] text-center p-4 rounded-md text-white transition\n ".concat(l?"bg-gray-400 cursor-not-allowed":"bg-customBlue hover:bg-customBlue","\n "),onClick:()=>o(),disabled:l,children:n})}):(0,i.jsx)("button",{className:"px-6 py-2 bg-customBlue text-white rounded",onClick:()=>o(),children:n})]})};function y(e){let{handleSubmitYes:t,handleSubmitNo:n,confirmationMessage:s}=e,[l,r]=(0,a.useState)(!0),d=()=>{console.log("click no"),r(!l),n()};return(0,i.jsx)(N.A,{showPopup:l,popupFor:"StartQuiz",divwidth:"w-full lg:w-auto lg:max-w-[95%]",onPopupClose:()=>d,messageData:(0,i.jsx)(S,{handleClose:d,handleSubmit:()=>{console.log("click yes"),t()},confirmationMessage:s})})}function S(e){let{handleClose:t,handleSubmit:n,confirmationMessage:s}=e,[l,r]=(0,a.useState)(!1),d=e=>{"no"===e?t():(r(!0),n())};return(0,i.jsxs)("div",{className:"w-full text-center",children:[(0,i.jsx)("p",{className:"text-base pb-4 text-[#414141]",children:s||(0,i.jsxs)(i.Fragment,{children:["Are you sure you want",(0,i.jsx)("br",{})," ","to submit the quiz?"]})}),(0,i.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,i.jsx)("button",{onClick:()=>d("yes"),className:"w-full px-2 py-1 rounded-md border border-[#939393] text-[#939393] hover:bg-customBlue hover:text-white ".concat(l?"flex justify-center bg-customBlue cursor-not-allowed":""),children:l?(0,i.jsx)(j.A,{}):"Yes"}),(0,i.jsx)("button",{onClick:()=>d("no"),className:"bg-customBlue w-full px-2 py-1 rounded-md text-white",children:"No"})]})]})}var T=n(33905),E=n(96691),C=n.n(E);let F=function(e){let{msg:t="Submitting your quiz..."}=e;return(0,i.jsx)("div",{className:"fixed inset-0 bg-white bg-opacity-80 flex items-center justify-center z-50",children:(0,i.jsxs)("div",{className:"flex flex-col items-center",children:[(0,i.jsxs)("svg",{className:"animate-spin h-10 w-10 text-customBlue mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,i.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,i.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 100 16v-4l-3 3 3 3v-4a8 8 0 01-8-8z"})]}),(0,i.jsx)("p",{className:"text-lg font-medium text-gray-700",children:t})]})})},z={src:"https://assets.madeeasy.in/prod/_next/static/media/back.0f2346d5.svg",height:25,width:25,blurWidth:0,blurHeight:0};var q=n(64970),D=n(34247),I=n(81778);let B=function(e){let{questionData:t,currentIndex:n,totalQuestions:l,onNext:d,onPrev:u,quizId:c,redirectToViewResult:m,lang:p,quizName:f}=e,{isMobile:b}=(0,r.useRouter)().query,[k]=(0,a.useState)(0),[A,N]=(0,a.useState)(!1),j=(0,a.useRef)(!0),{FREE_QUIZ_SUBMITTED:y}=g.A,{userQuizManage:S,userQuizData:E,setUserQuizData:B}=(0,a.useContext)(T.L),Q=t[n],[M,{error:P}]=(0,s.n)(C()),L=e=>{j.current=!0,B(t=>{let n=t.findIndex(t=>t.questionId===e.questionId);if(-1!==n){let i=[...t];return i[n]=e,i}return[...t,e]})},O=()=>(console.log("questionData.length, currentIndex + 1 ",t.length,n+1),0===S.quizCurrentTimeLeft||t.length===n+1),R=(0,a.useCallback)(async()=>
1{let e={isCompleted:O(),remainingTime:S.quizCurrentTimeLeft,quizId:c,questionAttempts:E,attemptLang:p};console.log("input obj ",e);try{let t=await M({variables:{input:e}});return j.current=!1,(null==t?void 0:t.data.saveQuizProcess.attemptStatus)==="COMPLETED"&&(N(!1),m()),t}catch(e){var t,n,a;if(N(!1),401===((null==e?void 0:null===(t=e.networkError)||void 0===t?void 0:t.statusCode)||(null==e?void 0:null===(a=e.networkError)||void 0===a?void 0:null===(n=a.response)||void 0===n?void 0:n.status)))return(0,D.dt)(),null;return(0,i.jsx)(I.A,{error:null==P?void 0:P.message,fullPage:!0})}},[M,c,S.quizCurrentTimeLeft,p,O,m]),V=(e,t)=>{let n=t+1,i="Multi Correct"===e.type,a=E.find(t=>t.questionId===e.id),s=(null==a?void 0:a.answer)||[],l=[];if(i){let t=(l=s.includes(n)?s.filter(e=>e!==n):[...s,n]).length>0?x.rk.ATTEMPTED:x.rk.NOT_ATTEMPTED;L((0,x.xO)(e,t,l))}else{if(1===s.length&&s[0]===n){L((0,x.xO)(e,x.rk.NOT_ATTEMPTED,[]));return}l=[n],L((0,x.xO)(e,x.rk.ATTEMPTED,l))}},_=(0,a.useRef)(null);(0,a.useEffect)(()=>{_.current&&_.current.scrollTo({top:0,behavior:"smooth"})},[n]);let W=e=>{let i=t[n],a=E.find(e=>e.questionId===i.id);a?a.attemptStatus===x.rk.NOT_VIEWED?L((0,x.xO)(i,x.rk.NOT_ATTEMPTED,[])):R():L((0,x.xO)(i,x.rk.NOT_ATTEMPTED,[])),d(k)};return(0,i.jsx)("div",{className:"lg:px-4 lg:-mb-20",children:(0,i.jsxs)("div",{className:"mx-auto bg-white p-3 lg:p-8 lg:pb-6 rounded-lg lg:shadow-md mt-4 lg:mt-0 ".concat(b?"mb-16":""," lg:h-[calc(100dvh-180px)]"),children:[A&&(0,i.jsx)(F,{msg:0===S.quizCurrentTimeLeft?x.A7:x.BQ}),(0,i.jsxs)("div",{className:"lg:h-[calc(100%-60px)] lg:overflow-y-auto scrollbar-colored lg:pr-4",ref:_,children:[(0,i.jsx)("div",{className:"mb-6",children:(0,i.jsx)("div",{className:"",children:t.map((e,t)=>n===t&&(0,i.jsxs)(a.Fragment,{children:[(0,i.jsxs)("div",{className:"list-decimal mt-2 text-gray-700 flex justify-normal items-start mb-3",children:[(0,i.jsx)("h2",{className:"text-xl font-semibold mr-2",children:"Q".concat(n+1,".")}),(0,i.jsx)(v.A,{htmlData:e.content,spanTag:!0})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("p",{className:"font-normal text-[#0F172A7A] mb-4",children:["(",null==e?void 0:e.type,")"]})})]},t))})}),(0,i.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:null==Q?void 0:Q.choices.map((e,t)=>{var n;let a=((null===(n=E.find(e=>e.questionId===Q.id))||void 0===n?void 0:n.answer)||[]).includes(t+1),s=String.fromCharCode(65+t);return(0,i.jsxs)("div",{className:"flex items-center border rounded-lg cursor-pointer transition p-4 gap-3\n ".concat(a?"border-[#269BF0] bg-blue-50":"border border-[#AAAAAA]","\n "),onClick:()=>V(Q,t),children:[(0,i.jsx)("div",{className:"font-semibold w-6 h-6 flex items-center justify-center rounded \n border ".concat(a?"bg-[#045692] text-white border-blue-600":"border-[#939393] text-gray-700","\n "),children:s}),(0,i.jsx)("div",{className:"flex-1 text-sm text-gray-800",children:(0,i.jsx)(v.A,{htmlData:e})})]},t)})})]}),(0,i.jsxs)("div",{className:"fixed left-0 mx-auto w-[94%] lg:w-auto right-0 lg:left-4 bg-[#fff] lg:py-0 py-3 lg:right-4 bottom-0 lg:static flex justify-between items-center mt-6 lg:pr-4",children:[(0,i.jsx)("button",{className:"px-4 ".concat(n>0?"":"invisible"," py-2 border rounded hover:bg-gray-100 transition"),onClick:()=>{u(k)},children:(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(o(),{src:z,width:20,height:20,alt:"prev"}),(0,i.jsx)("span",{children:"Previous"})]})}),(0,i.jsx)("p",{className:"text-[#5B5B5B] text-sm",children:"".concat(String(n+1).padStart(2,"0"),"/").concat(l)}),n+1===l?(0,i.jsx)(w,{handleSubmit:()=>{N(!0),(0,h.sx)(y,{quizId:c,quizName:f,source:(null==S?void 0:S.quizCurrentTimeLeft)===0?"Time Up":"Submit"}),j.current=!1,R()},buttonText:"Submit"}):(0,i.jsx)("button",{className:"px-6 py-2 ".concat(n+1===l?"bg-gray-100 border pointer-events-none":"bg-customBlue text-white hover:bg-[#0267b5]"," rounded transition"),onClick:()=>W(t[n+1]),disabled:n+1===l,children:(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("span",{children:"Next"}),(0,i.jsx)(o(),{src:q.A,width:20,height:20,alt:"next"})]})})]})]})})},Q={src:"https://assets.madeeasy.in/prod/_next/static/media/dots-three-circle.ee606472.svg",height:28,width:28,blurWidth:0,blurHeight:0};var M=n(92746);let P=function(e){let{duration:t,handleAutoSubmitOnTimeUpProp:n,pageName:s}=e,[l,r]=(0,a.useState)(t),{setUserQuizManage:d}=(0,a.useContext)(T.L);return(0,a.useEffect)(()=>
1{if(d({quizCurrentTimeLeft:l}),l<=0){d({quizCurrentTimeLeft:0}),console.log("Time is up! call auto submit here"),n();return}let e=setInterval(()=>{r(e=>e-1)},1e3);return()=>clearInterval(e)},[l]),(0,i.jsx)("div",{children:(0,i.jsxs)("p",{className:"text-sm text-gray-500 text-center",children:[(0,i.jsx)("span",{className:"text-customBlue font-semibold ".concat("reviewPage"===s?"hidden":""),children:"Time Left:"})," ",(0,x.lj)(l)]})})},L=function(e){let{name:t,reviewIcon:n=!1,handleReviewClick:a,timeDuration:s,handleAutoSubmitOnTimeUp:l,questionCount:r}=e;return null==r?(0,i.jsx)("div",{className:"lg:pt-4 lg:pb-6",children:(0,i.jsx)("div",{className:"px-1 lg:px-4 mx-auto flex items-center justify-between",children:(0,i.jsxs)("div",{className:"hidden lg:block ",children:[(0,i.jsx)(M.A,{type:2,headerBreadCrumb:"Quiz",marginClass:"lg:mb-0"}),(0,i.jsx)("h1",{className:"text-2xl font-semibold text-[#1e1e1e]",children:t})]})})}):(0,i.jsx)("div",{className:"lg:pt-4 lg:pb-6",children:(0,i.jsxs)("div",{className:"px-1 lg:px-4 mx-auto flex items-center justify-between shadow-sm lg:shadow-none lg:rounded-none",children:[(0,i.jsxs)("div",{className:"hidden lg:block ",children:[(0,i.jsx)(M.A,{type:2,headerBreadCrumb:"Quiz",marginClass:"lg:mb-0"}),(0,i.jsx)("h1",{className:"text-2xl font-semibold text-[#1e1e1e]",children:t})]}),n&&(0,i.jsxs)("div",{className:"justify-between w-full lg:w-auto lg:justify-normal flex gap-2 items-center p-3 lg:p-0",children:[(0,i.jsx)("div",{className:"flex justify-between gap-2 lg:gap-0 items-center",children:(0,i.jsx)(P,{duration:s,handleAutoSubmitOnTimeUpProp:()=>
1{l()}})}),(0,i.jsx)("div",{className:"",role:"button",onClick:()=>a(),children:(0,i.jsx)(o(),{src:Q,width:30,height:30,alt:"dotIcon"})})]})]})})},O={src:"https://assets.madeeasy.in/prod/_next/static/media/Clock.9a518416.svg",height:96,width:182,blurWidth:0,blurHeight:0},R=function(e){let{questions:t,answers:n,timeLeft:l,handleSubmit:d,handleNavigateToQuestion:u,handleBackQuiz:c}=e,{userQuizData:m,setUserQuizData:v,userQuizManage:g}=(0,a.useContext)(T.L),h=m.filter(e=>"ATTEMPTED"===e.attemptStatus).length,p=m.filter(e=>"NOT_VIEWED"===e.attemptStatus).length,f=t.length-h-p,b=e=>{var t,n;return(null===(t=m[e])||void 0===t?void 0:t.attemptStatus)===x.rk.NOT_VIEWED?"not-viewed":(null===(n=m[e])||void 0===n?void 0:n.attemptStatus)===x.rk.NOT_ATTEMPTED?"unattempted":"attempted"},k=e=>{u(e)},{quizId:A,language:N}=(0,r.useRouter)().query,[j,{error:y}]=(0,s.n)(C()),S=()=>(console.log("questionData.length, currentIndex + 1 ",t.length,1),0===g.quizCurrentTimeLeft||1===t.length),E=(0,a.useCallback)(async()=>{let e={isCompleted:S(),remainingTime:g.quizCurrentTimeLeft,quizId:A,questionAttempts:m,attemptLang:N};console.log("input obj ",e);try{let t=await j({variables:{input:e}});return c(),null==t||t.data.saveQuizProcess.attemptStatus,t}catch(e){var t,n,a;return(null==e?void 0:null===(t=e.networkError)||void 0===t?void 0:t.statusCode)||null==e||null===(a=e.networkError)||void 0===a||null===(n=a.response)||void 0===n||n.status,(0,i.jsx)(I.A,{error:null==y?void 0:y.message,fullPage:!0})}},[j,A,g.quizCurrentTimeLeft,N,S]);return(0,i.jsxs)("div",{className:"mx-auto p-2 lg:p-4",children:[(0,i.jsxs)("div",{className:"bg-white border border-[#D2EDFF] rounded-xl p-3 md:p-6 text-center mb-8 bg-gradient-to-b from-blue-50 to-white-50 opacity-54",children:[(0,i.jsxs)("div",{className:"flex gap-2 cursor-pointer hover:underline",onClick:()=>E(),children:[(0,i.jsx)(o(),{src:z,width:20,height:20,alt:"back button"}),"Back"]}),(0,i.jsx)("div",{className:"flex items-center max-w-fit m-auto mb-4",children:(0,i.jsx)(o(),{src:O,width:100,height:50,style:{margin:"auto"},alt:"timer"})}),(0,i.jsxs)("div",{className:"text-base text-[#0F172A] font-bold flex justify-center items-center",children:["Time Left :"," ",(0,i.jsx)("span",{className:"font-normal pl-2",children:(0,i.jsx)(P,{pageName:"reviewPage",duration:l})})]}),(0,i.jsxs)("div",{className:"flex lg:max-w-[60%] mx-auto justify-center max-w gap-4 md:gap-6 mt-6 bg-white border border-[#D2EDFF] rounded-md p-3",children:[(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("div",{className:"text-base md:text-xl font-bold text-gray-800",children:h.toString().padStart(2,"0")}),(0,i.jsx)("div",{className:"bg-[#B7FFF587] w-[90px] lg:w-[220px] text-[#38A092] border-[#4ED7C5] border font-bold rounded px-1 lg:px-3 py-1 text-[10px] md:text-sm mt-1",children:"Attempted"})]}),(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("div",{className:"text-base md:text-xl font-bold text-gray-800",children:f.toString().padStart(2,"0")}),(0,i.jsx)("div",{className:"bg-[#FFF3ED87] w-[90px] lg:w-[220px] text-[#FF0000] border-[#FFB0B0] border font-bold rounded px-1 lg:px-3 py-1 text-[10px] md:text-sm mt-1",children:"Unattempted"})]}),(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("div",{className:"text-base md:text-xl font-bold text-gray-800",children:p.toString().padStart(2,"0")}),(0,i.jsx)("div",{className:"bg-[#FFE6B552] w-[90px] lg:w-[220px] text-[#825600] border-[#FFDE9D] border font-bold rounded px-1 lg:px-3 py-1 text-[10px] md:text-sm mt-1",children:"Not Viewed Yet"})]})]})]}),(0,i.jsx)("div",{className:"grid grid-cols-4 md:grid-cols-10 gap-2 justify-items-start mb-8",children:t.map((e,t)=>{let n=b(t);return(0,i.jsx)("div",{className:"w-20 lg:w-28 p-[13px] lg:p-[10px] flex items-center justify-center border rounded-md font-semibold cursor-pointer ".concat("attempted"===n?"bg-[#F8FEFC] text-[#4F4F55] border-[#61C3B6] border":"unattempted"===n?"bg-[#FFF9F9] text-[#4F4F55] border-[#FF7878] border":"bg-[#FFF6E4] text-[#4F4F55] border-[#E6BC69] border"),onClick:()=>k(t),children:String(t+1).padStart(2,"0")},t)})}),(0,i.jsx)(w,{handleSubmit:d,fullScreenBtn:!0})]})}
1,V=function(e){let{handleBackQuiz:t,text:n="Back"}=e;return(0,i.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer hover:underline",onClick:()=>t(),children:[(0,i.jsx)(o(),{src:z,width:20,height:20}),n]})};var _=n(67405);let W=function(){var e,t,n,d,o,u,c,m,v;let[f,N]=(0,a.useState)(!1),{userQuizManage:j,setUserQuizManage:w,userQuizData:y,setUserQuizData:S}=(0,a.useContext)(T.L),[E]=(0,s.n)(C()),z=(0,r.useRouter)(),{quizId:q,language:Q}=z.query,[M,P]=(0,a.useState)(Q||"en"),{FREE_QUIZ_SUBMITTED:O}=g.A,W=(0,D.jH)(),{data:U,loading:H,error:G,refetch:Y,networkStatus:K}=(0,l.IT)(b(),{variables:{lang:M,quizId:q},notifyOnNetworkStatusChange:!0}),[J,Z]=(0,a.useState)(!1),[X,$]=(0,a.useState)(!1),[ee,et]=(0,a.useState)([]),[en,ei]=(0,a.useState)(0),[ea,es]=(0,a.useState)([]),el=e=>{S(t=>{let n=t.findIndex(t=>t.questionId===e.questionId);if(-1!==n){let i=[...t];return i[n]=e,i}return[...t,e]})},er=e=>{var t;let n=null==U?void 0:null===(t=U.getQuizById)||void 0===t?void 0:t.questions[e];S(y.map(e=>e.questionId===n.id&&e.attemptStatus===x.rk.NOT_VIEWED?{...e,attemptStatus:x.rk.NOT_ATTEMPTED}:e))},ed=()=>{var e,t,n,i;S([]);let a=(null==U?void 0:null===(e=U.getQuizById)||void 0===e?void 0:e.questions)||[],s=(null==U?void 0:null===(i=U.getQuizById)||void 0===i?void 0:null===(n=i.userQuizResponse)||void 0===n?void 0:null===(t=n.attemptData)||void 0===t?void 0:t.questionAttempts)||[],l=new Map;s.forEach(e=>{l.set(e.questionId,{status:e.attemptStatus,answer:e.answer.map(Number)})}),a.forEach(e=>{let t=l.get(e.id);t?el((0,x.xO)(e,t.status,t.answer)):el((0,x.xO)(e,x.rk.NOT_VIEWED,[]))})},eo=()=>{let{isMobile:e}=z.query;e?z.push({pathname:"/daily-quiz-result/".concat(q),query:{language:M,isMobile:!0}}):z.push({pathname:"/daily-quiz-result/".concat(q),query:{language:M}})},eu=e=>e===x.YK.COMPLETED,ec=e=>e===x.YK.STARTED;(0,a.useEffect)(()=>{var e,t,n,i,a,s,l,r,d,o,u;eu(null==U?void 0:null===(t=U.getQuizById)||void 0===t?void 0:null===(e=t.userQuizResponse)||void 0===e?void 0:e.attemptStatus)?eo():(ec(null==U?void 0:null===(i=U.getQuizById)||void 0===i?void 0:null===(n=i.userQuizResponse)||void 0===n?void 0:n.attemptStatus)&&Z(!0),ed(),et(null==U?void 0:U.getQuizById),w({quizCurrentTimeLeft:(null==U?void 0:null===(l=U.getQuizById)||void 0===l?void 0:null===(s=l.userQuizResponse)||void 0===s?void 0:null===(a=s.attemptData)||void 0===a?void 0:a.remainingTime)?null==U?void 0:null===(o=U.getQuizById)||void 0===o?void 0:null===(d=o.userQuizResponse)||void 0===d?void 0:null===(r=d.attemptData)||void 0===r?void 0:r.remainingTime:null==U?void 0:null===(u=U.getQuizById)||void 0===u?void 0:u.durationInSeconds}))},[U]);let em=(0,a.useCallback)(async e=>{var t;P(e);let n=await Y({lang:e,quizId:q});et((null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.getQuizById)||[])},[Y,q]),ev=(0,a.useCallback)(async function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];N(!0),(0,h.sx)(O,{quizId:null==ee?void 0:ee.id,quizName:null==ee?void 0:ee.name,source:t?"timeOut":"self"});let n={isCompleted:e,remainingTime:t?0:j.quizCurrentTimeLeft,quizId:q,questionAttempts:y,attemptLang:M};try{let e=await E({variables:{input:n}});(null==e?void 0:e.data.saveQuizProcess.attemptStatus)===x.YK.COMPLETED&&(0===j.quizCurrentTimeLeft?setTimeout(()=>{N(!1),eo()},3e3):(N(!1),eo()))}catch(e){var a,s,l;if(401===((null==e?void 0:null===(a=e.networkError)||void 0===a?void 0:a.statusCode)||(null==e?void 0:null===(l=e.networkError)||void 0===l?void 0:null===(s=l.response)||void 0===s?void 0:s.status)))return(0,D.dt)(),null;return N(!1),(0,i.jsx)(I.A,{error:null==e?void 0:e.message,fullPage:!0})}}),ex=()=>{$(!X),er(en)},eg=()=>{ev()};return H?(0,i.jsx)("div",{children:(0,i.jsx)(A.A,{fullPage:!0})}):G?(0,i.jsxs)("div",{className:"lg:px-2",children:[(0,i.jsx)("div",{className:"xl:text-2xl text-lg font-semibold",children:"Daily Quiz "}),(0,i.jsx)("div",{className:"grid grid-cols-1 gap-4 min-h-80 lg:mt-7 mt-4",children:(0,i.jsx)(k.A,{noMsg:"Something went wrong!"})})]}):(0,i.jsxs)("div",{className:"lg:p-0",children:[(0,i.jsx)(_.A,{link:"".concat("madeeasyprime"===W||"madeeasy"===W?"https://applinks.madeeasyprime.com":"https://applinks.nextias.com","/quiz/").concat(q),className:"-right-8 bottom-2"}),!J&&(0,i.jsx)("div",{className:"lg:hidden shadow-sm",children:(0,i.jsx)("h2",{className:"text-base lg:text-xl font-semibold flex gap-2 mb-2 p-3 lg:p-0 lg:block lg:mb-5 kk",children:null==ee?void 0:ee.name})}),f&&(0,i.jsx)(F,{msg:0===j.quizCurrentTimeLeft?x.A7:x.BQ}),(0,i.jsx)(L,{name:null==ee?void 0:ee.name,reviewIcon:J&&!X,handleReviewClick:ex,timeDuration:j.quizCurrentTimeLeft,handleAutoSubmitOnTimeUp:()=>{ev(!0,!0)},questionCount:null==ee?void 0:ee.questions}),!J&&(0,i.jsx)(p,{handleStartQuiz:()=>{var e,t;Z(!0);let n=null==U?void 0:null===(t=U.getQuizById)||void 0===t?void 0:null===(e=t.questions)||void 0===e?void 0:e[0];if(!n)return;let i=y.find(e=>e.questionId===n.id);i&&i.attemptStatus!==x.rk.NOT_VIEWED||el((0,x.xO)(n,x.rk.NOT_ATTEMPTED,[]))},initialData:null==U?void 0:U.getQuizById,handleRefechByLanguage:em,isLanguageNetworkStatus:K,lang:M}),J&&!X?!H&&(null==U?void 0:null===(t=U.getQuizById)||void 0===t?void 0:null===(e=t.questions)||void 0===e?void 0:e.length)?(0,i.jsx)(B,{questionData:null==U?void 0:null===(n=U.getQuizById)||void 0===n?void 0:n.questions,quizResponseData:null==U?void 0:null===(u=U.getQuizById)||void 0===u?void 0:null===(o=u.userQuizResponse)||void 0===o?void 0:null===(d=o.attemptData)||void 0===d?void 0:d.questionAttempts,currentIndex:en,totalQuestions:null==U?void 0:null===(m=U.getQuizById)||void 0===m?void 0:null===(c=m.questions)||void 0===c?void 0:c.length,onNext:e=>{var t;es(t=>[...t,e]),en+1===(null==U?void 0:null===(t=U.getQuizById)||void 0===t?void 0:t.questionCount)?console.log("Auto-submitting..."):ei(e=>e+1)},onPrev:()=>{ei(e=>Math.max(0,e-1))},duration:j.quizCurrentTimeLeft,handleSubmit:eg,quizId:q,redirectToViewResult:eo,lang:M,quizName:null==ee?void 0:ee.name}):(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:mt-7 mt-4 p-4",children:[(0,i.jsx)(V,{handleBack
1Quiz:()=>{console.log("handleQuizStartReset call"),Z(!1)}}),(0,i.jsx)(k.A,{noMsg:"No Question in this quiz!"})]}):null,X&&(0,i.jsx)(R,{questions:null==U?void 0:null===(v=U.getQuizById)||void 0===v?void 0:v.questions,answers:ea,timeLeft:j.quizCurrentTimeLeft,handleSubmit:eg,handleNavigateToQuestion:e=>{ei(e),$(!X),er(e)},handleBackQuiz:ex})]})}},73551:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(74848);n(96540);let a=function(e){let{htmlData:t,spanTag:n}=e;return n?(0,i.jsx)("span",{className:"prose max-w-none list-decimal",dangerouslySetInnerHTML:{__html:t}}):(0,i.jsx)("div",{className:"prose max-w-none list-decimal",dangerouslySetInnerHTML:{__html:t}})}},25006:(e,t,n)=>{"use strict";n.d(t,{A7:()=>o,BQ:()=>u,GB:()=>c,YK:()=>r,lj:()=>i,my:()=>d,q:()=>l,rk:()=>a,xO:()=>s});let i=e=>{let t=String(Math.floor(e/3600)).padStart(2,"0"),n=String(Math.floor(e%3600/60)).padStart(2,"0"),i=String(e%60).padStart(2,"0");return t>0?"".concat(t,":").concat(n,":").concat(i):"".concat(n,":").concat(i)},a={NOT_ATTEMPTED:"NOT_ATTEMPTED",ATTEMPTED:"ATTEMPTED",MARKED_FOR_REVIEW:"MARKED_FOR_REVIEW",MARKED_FOR_REVIEW_AND_ATTEMPTED:"MARKED_FOR_REVIEW_AND_ATTEMPTED",NOT_VIEWED:"NOT_VIEWED"},s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return{answer:n,attemptStatus:t,questionId:e.id?e.id:e.questionId}};function l(e){let t="string"==typeof e?parseFloat(e.replace("%","")):e;return t>70?{message:"Great job",colorClass:"text-[#61C3B6]"}:t>=50?{message:"Needs improvement",colorClass:"text-yellow-500"}:{message:"Revision required.",colorClass:"text-[#FD7067]"}}let r={STARTED:"STARTED",COMPLETED:"COMPLETED"},d=["All","Correct","Incorrect","Unattempted"],o="Timeâs upâsubmitting",u="Your quiz is submitting...",c=(e,t)=>{let n=new URL(window.location.href);return n.searchParams.set(e,t),window.history.pushState({},"",n.toString())}},67405:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var i=n(74848),a=n(96540),s=n(5556),l=n.n(s),r=n(29965),d=n.n(r),o=n(98271);let u={src:"https://assets.madeeasy.in/prod/_next/static/media/deep-link.3a177608.svg",height:66,width:66,blurWidth:0,blurHeight:0};var c=n(26471);function m(e){let{link:t,className:n}=e,{showToast:s}=(0,a.useContext)(o.$),{user:l}=(0,c.Jd)(),r=(0,a.useCallback)(async()=>{if(t)try{await navigator.clipboard.writeText(t),s("Deeplink copied.")}catch(e){s("Failed to copy deeplink.")}},[t,s]),m=(null==l?void 0:l.email)&&["@nextias.com","@madeeasy.in"].some(e=>l.email.toLowerCase().endsWith(e));return t&&m?(0,i.jsxs)("button",{type:"button",onClick:r,className:"fixed -translate-x-1/2 z-[99998] flex flex-col items-center font-semibold hover:cursor-pointer hover:underline gap-1 text-xs px-2 py-1 ".concat(n||"bottom-4 left-8"),"aria-label":"Copy deeplink",children:[(0,i.jsx)(d(),{src:u,alt:"copy",width:58,height:58}),(0,i.jsx)("span",{children:"Deeplink"})]}):null}m.propTypes={link:l().string,className:l().string},m.defaultProps={link:"",className:""}},75042:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var i=n(74848);n(96540);var a=n(5556),s=n.n(a),l=n(29965),r=n.n(l),d=n(6771);let o={src:"https://assets.madeeasy.in/prod/_next/static/media/study-nodata.8cbe61ca.png",height:228,width:288,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAV1BMVEUAcpYDV5zk7vWbwNnI3fDL5vb1/f/7///X5/PH2+vX7vvK5vfd8PvY4Oro8fnP2eLh0tPf8fudyO3F7//Qz9bz+f7p9f3d//+xzOOpx9/k4OPu//+x1fZCqF2dAAAAGXRSTlMBjP3x/iqm/v1fxuVEpf6Qz6n5Yf38hQ+8/KPLKQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAADZJREFUeJwFwYUBwDAMBLELvl1m3n/OSgAhAJS5plSPk/WVdqnDvyVHs4bp2aKGu6W3fI3u5QcrLAHqFUjfeAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:6},u={src:"https://assets.madeeasy.in/prod/_next/static/media/futureDateBanner.5c389c7d.png",height:264,width:324,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAARVBMVEVMaXGx5P+74/1arvKm0/ni8fxjsPCv4P7n+P6q///+/v7H4/jt9v+97f91ufCk2Put1vWHx/ZYqu2w5v9nt/fW7P/s//+RXHX8AAAAE3RSTlMAwoTpqFqY3nYDB1M6yPf4a96EuH6OZQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAADhJREFUeJwVxscRwCAQBMHB3iEvLZB/qCpe3TTK2GkAeeYFtV+9rgTdCsD3SjqBlMwsAk9093JsPzC5AZospaLXAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:7};function c(e){let{noMsg:t,pageType:n,tagName:a,nofoundMsg:s,buttonText:l,onButtonClick:c,buttonClassName:m}
1=e,v=!!(l&&c);return(0,i.jsx)("div",{className:"flex justify-center items-center bg-white h-full w-full border border-[#B8E5FF]",children:"Study Plan"!==n?(0,i.jsxs)("div",{className:"text-red-600 text-center py-6 px-2 bg-white rounded-md w-full flex justify-center items-center flex-col",children:[(0,i.jsx)(r(),{width:140,height:160,src:s||d.A,className:"inline-block mb-2 lg:w-40 w-36",alt:"NoCourseFound"}),(0,i.jsx)("h3",{className:"text-lg font-semibold text-[#334155]",children:"No Data Found!"}),(0,i.jsx)("p",{className:"text-sm font-normal text-[#334155]",children:t}),v&&(0,i.jsx)("button",{type:"button",onClick:c,className:m||"mt-3 bg-[#0267B1] text-white text-xs font-semibold px-4 py-2 rounded-lg hover:bg-[#025a9a] active:bg-[#024f8a] transition-colors",children:l})]}):(0,i.jsx)("div",{children:"FutureDate"===a?(0,i.jsxs)("div",{className:"text-red-600 text-center py-6 flex justify-center items-center flex-col",children:[(0,i.jsx)(r(),{width:500,height:500,src:u,className:"inline-block mb-2 lg:w-40 w-36",alt:"future Date"}),(0,i.jsx)("div",{children:(0,i.jsx)("p",{className:"text-sm font-normal text-[#334155]",children:t})})]}):(0,i.jsxs)("div",{className:"text-red-600 text-center py-6 flex justify-center items-center flex-col",children:[(0,i.jsx)(r(),{width:500,height:500,src:o,className:"inline-block mb-2 lg:w-40 w-36",alt:"NoCourseFound"}),(0,i.jsx)("h3",{className:"text-lg font-semibold text-[#334155]",children:"Oops!"}),(0,i.jsx)("div",{children:(0,i.jsxs)("p",{className:"text-sm font-normal text-[#334155]",children:[t," "]})})]})})})}c.propTypes={noMsg:s().any,tagName:s().string,nofoundMsg:s().any,pageType:s().string,buttonText:s().string,onButtonClick:s().func,buttonClassName:s().string};let m=c},81778:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(74848);n(96540);var a=n(5556),s=n.n(a);function l(e){let{error:t,fullPage:n=!1}=e;return(0,i.jsx)("div",{className:"".concat(n?"flex items-center justify-center h-screen":"p-4 bg-red-50 border-l-4 border-red-400 text-red-700"),children:(0,i.jsxs)("div",{className:"".concat(n?"text-center":""),children:[(0,i.jsx)("h1",{className:"font-bold ".concat(n?"text-2xl text-red-600":""),children:"Error"}),(0,i.jsx)("p",{className:"".concat(n?"mt-2 text-gray-700":""),children:t})]})})}l.propTypes={error:s().string.isRequired,fullPage:s().bool};let r=l},54269:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var i=n(27243),a=n(2619).Sw?i.useLayoutEffect:i.useEffect},95420:(e,t,n)=>{"use strict";n.d(t,{n:()=>c});var i=n(31635),a=n(27243),s=n(60144),l=n(15381),r=n(75443),d=n(9211),o=n(70111),u=n(54269);function c(e,t){var n=(0,o.m)(null==t?void 0:t.client);(0,r.D$)(e,r.KG.Mutation);var c=a.useState({called:!1,loading:!1,client:n}),m=c[0],v=c[1],x=a.useRef({result:m,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});(0,u.E)(function(){Object.assign(x.current,{client:n,options:t,mutation:e})});var g=a.useCallback(function(e){void 0===e&&(e={});var t=x.current,n=t.options,a=t.mutation,r=(0,i.Cl)((0,i.Cl)({},n),{mutation:a}),o=e.client||x.current.client;x.current.result.loading||r.ignoreResults||!x.current.isMounted||v(x.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:o});var u=++x.current.mutationId,c=(0,s.l)(r,e);return o.mutate(c).then(function(t){var n,i,a=t.data,s=t.errors,r=s&&s.length>0?new d.K4({graphQLErrors:s}):void 0,m=e.onError||(null===(n=x.current.options)||void 0===n?void 0:n.onError);if(r&&m&&m(r,c),u===x.current.mutationId&&!c.ignoreResults){var g={called:!0,loading:!1,data:a,error:r,client:o};x.current.isMounted&&!(0,l.L)(x.current.result,g)&&v(x.current.result=g)}var h=e.onCompleted||(null===(i=x.current.options)||void 0===i?void 0:i.onCompleted);return r||null==h||h(t.data,c),t},function(t){if(u===x.current.mutationId&&x.current.isMounted){var n,i={loading:!1,error:t,data:void 0,called:!0,client:o};(0,l.L)(x.current.result,i)||v(x.current.result=i)}var a=e.onError||(null===(n=x.current.options)||void 0===n?void 0:n.onError);if(a)return a(t,c),{data:void 0,errors:t};throw t})},[]),h=a.useCallback(function(){if(x.current.isMounted){var e={called:!1,loading:!1,client:x.current.client};Object.assign(x.current,{mutationId:0,result:e}),v(e)}},[]);return a.useEffect(function(){var e=x.current;return e.isMounted=!0,function(){e.isMounted=!1}},[]),[g,(0,i.Cl)({reset:h},m)]}}}]);
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.