1import{j as o}from"./mui-DeX-rjum.js";import{l as E,a0 as $,f as g,aE as k,p as q}from"./KnowledgeLibraryChapter-BaZoUgLb.js";import"./quesmedTypes-CTL6w_va.js";import{u as y}from"./useSampleQuestions-BW8JKHGS.js";import{r as Q}from"./notistack-DhrX7ru4.js";import"./index-C8HE-GJU.js";import{S as C}from"./SampleQuestionsQuiz-Da8PM_MR.js";import{b as v,d as M}from"./react-C1pCe-cQ.js";import"./emotion-CyBw2-yf.js";import"./lodash-CEdY-VZW.js";import"./stripe-DE9NGnTz.js";import"./apollo-DdYK4m1_.js";import"./milkdown-DCLCkT3u.js";import"./markdown-CAhkHLvi.js";import"./codemirror_state-CTKdpTv7.js";import"./mdi_js-UNb1PnDf.js";import"./instantsearch-DXEzAGsU.js";import"./sentry-0PB8Nvzx.js";import"./agora-2tqzjhiK.js";import"./lightbox-CYU12qnZ.js";import"./mac_calculator-D1q5KOSx.js";import"./FlagRemoveIcon-DzMH9IB-.js";import"./QuestionsQuiz-CZyeu2Sy.js";import"./SingleBestAnswerQuestion-70jnng7m.js";import"./setLikeState-Gz-8YT5d.js";import"./QuestionLike-CvxGkl3a.js";import"./TimerIcon-CyIxPd3b.js";import"./Likes-sm53O-AZ.js";import"./HotKey-D5DwiqlL.js";import"./setQuestionStatus-ByXphiU1.js";import"./ExerciseTimer-qGn7_5E1.js";import"./QuestionValidationMark-Cj4K2Ge4.js";import"./Tabs-Cvap2_at.js";import"./QuestionContainer-Qhexcb_b.js";import"./ArrowRightThinIcon-CRsd30T1.js";import"./ExerciseLaunchedButton-DIT-mlDG.js";import"./publicMockStorage-DVBas9cP.js";const{login:A,appsManagement:P}=q,U=({error:s,loading:e,marksheet:t,product:i})=>{const p=v(),{marksheetId:N="",markId:a="",questionId:r="",mockTestId:c=""}=M(),{isAuthenticated:d}=E(),u=`/sample/${i}/mock-tests/test/${c}/${N}`,{enqueueSnackbar:f}=$({retryError:s}),{marks:n=[]}=t||{},x=!a||a===""||isNaN(Number(a)),l=!r||r===""||isNaN(Number(r));if(Q.useEffect(()=>{if(t&&(l||x)){const m=n.findIndex(({questionChoiceId:h,mark:T})=>!h&&!T),I=m<0?0:m,{id:j,question:{id:S}}=n[I];I>=0?p(`${u}/${j}/${S}`,{replace:!0}):(p(d?P:A),f("Mock test data not found"))}},[t,n,r,u,l,x,p,d,f]),e)return o.jsx(g,{description:"Getting Marksheet Info"});if(s)return o.jsx(k,{description:s.message});const b=n.findIndex(({question:m})=>Number(m.id)===Number(r));return t?o.jsx(C,{baseUrl:u,isMockTest:!0,marksheet:t,mockTestId:c,productType:i,questionIndex:r?b:0}):o.jsx(k,{description:"Something wrong happened. Try refreshing page or contact administrator."})},Mt=()=>{const{marksheetId:s="",productType:e="1"}=M(),{loading:t,sampleMarksheet:i}=y(e,s);return t?o.jsx(g,{}):o.jsx(U,{loading:t,marksheet:i,product:e})};export{Mt as SampleMockTestsQuery,Mt as default};
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.